From 544ff3b562f2bfe04a1f05122ebb4b62181b0e51 Mon Sep 17 00:00:00 2001
From: tuqin <tuqin@tuqin.cn>
Date: 星期四, 05 十一月 2026 18:08:20 +0800
Subject: [PATCH] chore(map): 提交与线上一致的 GL 版改写 SDK 与地图诊断页

---
 public/bmap-sdk.js    |    2 +-
 public/bmap-test.html |   54 +++++++++++++++++++++++++++++++++---------------------
 2 files changed, 34 insertions(+), 22 deletions(-)

diff --git a/public/bmap-sdk.js b/public/bmap-sdk.js
index b59bf26..081ba54 100644
--- a/public/bmap-sdk.js
+++ b/public/bmap-sdk.js
@@ -1 +1 @@
-window.B_BUSINESS_INFO={"business":0,"unauth":0,"popup_code":"SO31cu9NxQ","popup_block_time":60,"popup_timestamp":1793868982,"watermark_ratio":0,"signature":"7006bb","sign_content":"{\"business\":0,\"unauth\":0,\"popup_code\":\"SO31cu9NxQ\",\"popup_block_time\":60,\"popup_timestamp\":1793868982,\"watermark_ratio\":0}"};window.B_HOST_TILE_ONLINE_URLS=[(window.location.host + "/bmap-tile0"),(window.location.host + "/bmap-tile1"),(window.location.host + "/bmap-tile2"),(window.location.host + "/bmap-tile3")];window.B_HOST_TILE_BASE_URLS=["apimaponline0.bdimg.com\/starpic\/?qt=satepc&","apimaponline1.bdimg.com\/starpic\/?qt=satepc&","apimaponline2.bdimg.com\/starpic\/?qt=satepc&","apimaponline3.bdimg.com\/starpic\/?qt=satepc&"];window.TILE_VERSION={"ditu":{"normal":{"version":"088","updateDate":"20261102"},"satellite":{"version":"009","updateDate":"20261102"},"normalTraffic":{"version":"081","updateDate":"20261102"},"satelliteTraffic":{"version":"083","updateDate":"20261102"},"mapJS":{"version":"104","updateDate":"20261102"},"satelliteStreet":{"version":"083","updateDate":"20261102"},"earthVector":{"version":"001","updateDate":"20261102"}},"webapp":{"high_normal":{"version":"001","updateDate":"20261102"},"lower_normal":{"version":"002","updateDate":"20261102"}},"api_for_mobile":{"vector":{"version":"002","updateDate":"20261102"},"vectorIcon":{"version":"002","updateDate":"20261102"}}};window.MSV={"mapstyle":{"version":"001","updateDate":"20261013"}};window.BMAP_AUTHENTIC_KEY="Y2aJXiswwPxy6mwFs1z9c7U5gwX9WfUN";window.BMapGL=window.BMapGL||{};(function(cv,h6){var hv=hv||{version:"20150702",emptyFn:function(){}};(function(){hv._log=[];var i=0;var C={};hv.BaseClass=function(oK){C[(this.hashCode=(oK||hv.BaseClass.guid()))]=this;if(!oK&&typeof kU!=="undefined"&&kU.sendMessage){var T=this.toString();if(!T||T.indexOf("[object")===0){T=this._className}if(T){kU.sendMessage(T)}}};hv.BaseClass.guid=function(){return"mz_"+(i++).toString(36)};hv.BaseClass.create=function(){var T=new hv.BaseClass();T.decontrol();return T};var e=hv.instance=hv.I=function(T){return C[T]};hv.BaseClass.prototype.dispose=function(){if(this.hashCode){delete C[this.hashCode]}for(var T in this){if(typeof this[T]!="function"){delete this[T]}}};hv.BaseClass.prototype.getHashCode=function(){if(!this.hashCode){C[(this.hashCode=hv.BaseClass.guid())]=this}return this.hashCode};hv.BaseClass.prototype.decontrol=function(){delete C[this.hashCode]};hv.BaseClass.prototype.toString=function(){return"[object "+(this._className||"Object")+"]"};hv.BaseClass.prototype._wlog=function(oK,oL){var T=hv._log;if(T.length>100){T.reverse().length=50;T.reverse()}T[T.length]="["+oK+"]["+(this._className||"Object")+" "+this.hashCode+"] "+oL}})();Function.prototype.inherits=function(oK,T){var e,oL,oN=this.prototype,oM=function(){};oM.prototype=oK.prototype;oL=this.prototype=new oM();if(typeof(T)=="string"){oL._className=T}for(e in oN){oL[e]=oN[e]}this.prototype.constructor=oN.constructor;oN=oM=null;return oL};hv.BaseEvent=function(e,i){this.type=e;this.returnValue=true;this.target=i||null;this.currentTarget=this.srcElement=null;this.cancelBubble=false;this.domEvent=null};hv.BaseClass.prototype.on=hv.BaseClass.prototype.addEventListener=function(C,i){if(typeof i!=="function"){return this._wlog("error","addEventListener:"+i+" is not a function")}if(!this._listeners){this._listeners={}}var e=this._listeners;if(C.indexOf("on")!==0){C="on"+C}if(typeof e[C]!=="object"){e[C]={}}var T=i.hashCode||hv.BaseClass.guid();i.hashCode=T;if(e[C][T]){this._wlog("warning","repeat key:"+T)}e[C][T]=i};hv.BaseClass.prototype.off=hv.BaseClass.prototype.removeEventListener=function(C,i){if(typeof i=="function"){i=i.hashCode}else{if(typeof i!=="string"&&typeof i!=="undefined"){return}}if(!this._listeners){this._listeners={}}if(C.indexOf("on")!=0){C="on"+C}var e=this._listeners;if(!e[C]){return}if(i===undefined){e[C]={};return}if(e[C][i]){delete e[C][i]}};hv.BaseClass.prototype.fire=hv.BaseClass.prototype.dispatchEvent=function(T){if(!this._listeners){this._listeners={}}var C,e=this._listeners,oK=T.type;if(!T.point&&T.pointMC&&typeof K!=="undefined"&&typeof m8!=="undefined"&&m8.convertMC2LL){if(!K.apiVersionIsGL()){T.point=m8.convertMC2LL(T.pointMC)}else{T.point=T.pointMC}}T.target=T.srcElement=T.target||T.srcElement||this;T.currentTarget=this;if(typeof this[oK]=="function"){this[oK](T)}if(typeof e[oK]=="object"){for(C in e[oK]){if(typeof e[oK][C]=="function"){e[oK][C].call(this,T)}}}return T.returnValue};hv.BaseEvent.prototype.inherit=function(C){var i=this;this.domEvent=C=window.event||C;i.clientX=C.clientX||C.pageX;i.clientY=C.clientY||C.pageY;i.offsetX=C.offsetX||C.layerX;i.offsetY=C.offsetY||C.layerY;i.screenX=C.screenX;i.screenY=C.screenY;i.ctrlKey=C.ctrlKey||C.metaKey;i.shiftKey=C.shiftKey;i.altKey=C.altKey;return i};hv.Browser=(function(){var C=navigator.userAgent;var oK=0;var e=0;var oL=0;var i=0;var oP=0;var oN=0;var oO=0;var oM=0;var T=0;var oQ=0;if(typeof window.opera==="object"&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(C)){oL=parseFloat(RegExp.$2)}else{if(/OPR(\/(\d+)(\..?)?)/.test(C)){oL=parseInt(RegExp.$2,10)}else{if(/Edge\/((\d+)\.\d+)/.test(C)){oK=parseInt(RegExp.$2,10)}else{if(/MSIE (\d+(\.\d+)?)/.test(C)){e=parseFloat(RegExp.$1)}else{if(C.indexOf("Trident")>-1&&/rv:(\d+(\.\d+)?)/.test(C)){e=parseInt(RegExp.$1,10)}else{if(/Firefox(\s|\/)(\d+(\.\d+)?)/.test(C)){oP=parseFloat(RegExp.$2)}else{if(navigator.vendor==="Netscape"&&/Netscape(\s|\/)(\d+(\.\d+)?)/.test(C)){oO=parseFloat(RegExp.$2)}else{if(C.indexOf("Safari")>-1&&/Version\/(\d+(\.\d+)?)/.test(C)){i=parseFloat(RegExp.$1)}}}}}}}}if(C.indexOf("Trident")>-1&&/Trident\/(\d+(\.\d+)?)/.test(C)){oM=parseInt(RegExp.$1,10)}else{if(!e&&!oK&&C.indexOf("Gecko")>-1&&C.indexOf("KHTML")===-1&&/rv\:(\d+(\.\d+)?)/.test(C)){T=parseFloat(RegExp.$1)}else{if(!oK&&/chrome\/(\d+(\.\d+)?)/i.test(C)){oN=parseFloat(RegExp.$1)}else{if(!oK&&/AppleWebKit\/(\d+(\.\d+)?)/.test(C)){oQ=parseInt(RegExp.$1,10)}}}}var oR={edge:oK,ie:e,firefox:oP,netscape:oO,opera:oL,safari:i,chrome:oN,gecko:T,trident:oM,webkit:oQ};return oR})();window.FeBrowser=hv.Browser;hv.Dom={};hv.Dom.createDom=function(i,e){if(hv.isIE&&e&&e.name){i="<"+i+' name="'+hv.String.escapeHTML(e.name)+'">'}var C=document.createElement(i);if(e){hv.Dom.setProperties(C,e)}return C};hv.Dom.getOffset=function(T){var oM=hv.Dom.getOwnerDocument(T);var oL=hv.isGecko>0&&oM.getBoxObjectFor&&hv.Dom.getStyle(T,"position")=="absolute"&&(T.style.top===""||T.style.left==="");var oN={left:0,top:0};var i=(hv.isIE&&!hv.isStrict)?oM.body:oM.documentElement;if(T==i){return oN}var C=null;var oK;if(T.getBoundingClientRect){oK=T.getBoundingClientRect();oN.left=oK.left+Math.max(oM.documentElement.scrollLeft,oM.body.scrollLeft);oN.top=oK.top+Math.max(oM.documentElement.scrollTop,oM.body.scrollTop);oN.left-=oM.documentElement.clientLeft;oN.top-=oM.documentElement.clientTop;if(hv.isIE&&!hv.isStrict){oN.left-=2;oN.top-=2}}else{if(oM.getBoxObjectFor&&!oL){oK=oM.getBoxObjectFor(T);var e=oM.getBoxObjectFor(i);oN.left=oK.screenX-e.screenX;oN.top=oK.screenY-e.screenY}else{C=T;do{oN.left+=C.offsetLeft;oN.top+=C.offsetTop;if(hv.isWebkit>0&&hv.Dom.getStyle(C,"position")=="fixed"){oN.left+=oM.body.scrollLeft;oN.top+=oM.body.scrollTop;break}C=C.offsetParent}while(C&&C!=T);if(hv.isOpera>0||(hv.isWebkit>0&&hv.Dom.getStyle(T,"position")=="absolute")){oN.top-=oM.body.offsetTop}C=T.offsetParent;while(C&&C!=oM.body){oN.left-=C.scrollLeft;if(!hv.isOpera||C.tagName!="TR"){oN.top-=C.scrollTop}C=C.offsetParent}}}return oN};hv.Dom.getOwnerDocument=function(e){return e.nodeType==9?e:e.ownerDocument||e.document};hv.Dom.setProperties=function(i,e){hv.each(e,function(T,C){hv.Dom._setProperty(i,C,T)})};hv.Dom._setProperty=function(i,e,C){if(e=="style"){i.style.cssText=C}else{if(e=="class"){i.className=C}else{if(e=="for"){i.htmlFor=C}else{if(e in hv.Dom._DIRECT_ATTRIBUTE_MAP){i.setAttribute(hv.Dom._DIRECT_ATTRIBUTE_MAP[e],C)}else{i[e]=C}}}}};hv.Dom._DIRECT_ATTRIBUTE_MAP={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder"};hv.G=function(){for(var C=[],T=arguments.length-1;T>-1;T--){var oK=arguments[T];C[T]=null;if(typeof oK=="object"&&oK&&oK.dom){C[T]=oK.dom}else{if((typeof oK=="object"&&oK&&oK.tagName)||oK==window||oK==document){C[T]=oK}else{if(typeof oK=="string"&&(oK=document.getElementById(oK))){C[T]=oK}}}}return C.length<2?C[0]:C};hv.ac=function(e,i){if(!(e=this.G(e))){return}i=this.trim(i);if(!new RegExp("(^| )"+i.replace(/(\W)/g,"\\$1")+"( |$)").test(e.className)){e.className=e.className.split(/\s+/).concat(i).join(" ")}};hv.addClassName=hv.ac;hv.each=function(oL,e){if(typeof e!="function"){return oL}if(oL){if(oL.length===undefined){for(var C in oL){e.call(oL[C],oL[C],C)}}else{for(var T=0,oK=oL.length;T<oK;T++){e.call(oL[T],oL[T],T)}}}return oL};hv.extend=function(oL,T){if(oL&&T&&typeof(T)=="object"){for(var oK in T){oL[oK]=T[oK]}var C=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"];for(var e=0,i;e<C.length;e++){i=C[e];if(Object.prototype.hasOwnProperty.call(T,i)){oL[i]=T[i]}}}return oL};hv.hide=function(){hv.each(arguments,function(e){if(e=hv.G(e)){e.style.display="none"}})};hv.inherit=function(oO,oK,T){var oN=oO.prototype;var oM=function(){};oM.prototype=oK.prototype;var oL=oO.prototype=new oM();if(typeof T=="string"){oL._className=T}for(var e in oN){oL[e]=oN[e]}oO.prototype.constructor=oN.constructor;oN=null;return oL};hv.isIE=0;(function(){if(navigator.userAgent.indexOf("MSIE")>0&&!window.opera){/MSIE (\d+(\.\d+)?)/.test(navigator.userAgent);hv.isIE=parseFloat(RegExp.$1)}})();hv.rc=function(e,i){if(!(e=this.G(e))){return}i=this.trim(i);var C=e.className.replace(new RegExp("(^| +)"+i.replace(/(\W)/g,"\\$1")+"( +|$)","g"),"$2");if(e.className!=C){e.className=C}};hv.removeClassName=hv.rc;hv.show=function(){this.each(arguments,function(e){if(e=hv.G(e)){e.style.display=""}})};hv.trim=function(e){return e.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")};hv.getElementsByClassName=function(e,i){if(e.getElementsByClassName){return e.getElementsByClassName(i)}else{return(function C(oQ,oO){if(oO==null){oO=document}var oN=[],oM=oO.getElementsByTagName("*"),T=oM.length,oP=new RegExp("(^|\\s)"+oQ+"(\\s|$)"),oL,oK;for(oL=0,oK=0;oL<T;oL++){if(oP.test(oM[oL].className)){oN[oK]=oM[oL];oK++}}return oN})(i,e)}};hv.toggleClass=function(e,i){if(hv.hasClass(e,i)){hv.removeClassName(e,i)}else{hv.addClassName(e,i)}};hv.hasClass=function(T,C){if(!T||!T.className||typeof T.className!="string"){return false}var i=-1;try{i=T.className==C||T.className.search(new RegExp("(\\s|^)"+C+"(\\s|$)"))}catch(oK){return false}return i>-1};hv.insertHTML=function(T,e,C){T=hv.G(T);if(T===null){return T}var i,oK;if(T.insertAdjacentHTML){T.insertAdjacentHTML(e,C)}else{i=T.ownerDocument.createRange();e=e.toUpperCase();if(e=="AFTERBEGIN"||e=="BEFOREEND"){i.selectNodeContents(T);i.collapse(e=="AFTERBEGIN")}else{oK=e=="BEFOREBEGIN";i[oK?"setStartBefore":"setEndAfter"](T);i.collapse(oK)}i.insertNode(i.createContextualFragment(C))}return T};if(typeof HTMLElement!="undefined"&&HTMLElement.prototype.__lookupGetter__&&!HTMLElement.prototype.__lookupGetter__("children")&&!window.opera){try{HTMLElement.prototype.__defineGetter__("children",function(){for(var C=[],T=0,oL,oK=0,e=this.childNodes.length;oK<e;oK++){oL=this.childNodes[oK];if(oL.nodeType==1){C[T++]=oL;if(oL.name){if(!C[oL.name]){C[oL.name]=[]}C[oL.name][C[oL.name].length]=oL}if(oL.id){C[oL.id]=oL}}}return C})}catch(nA){}}if(typeof(HTMLElement)!="undefined"&&!window.opera&&HTMLElement.prototype&&!HTMLElement.prototype.insertAdjacentHTML){HTMLElement.prototype.insertAdjacentHTML=function(i,C){var T=this.ownerDocument.createRange();T.setStartBefore(this);T=T.createContextualFragment(C);switch(i){case"beforeBegin":this.parentNode.insertBefore(T,this);break;case"afterBegin":this.insertBefore(T,this.firstChild);break;case"beforeEnd":this.appendChild(T);break;case"afterEnd":if(!this.nextSibling){this.parentNode.appendChild(T)}else{this.parentNode.insertBefore(T,this.nextSibling)}break}}}if(typeof HTMLElement!="undefined"&&!window.opera){HTMLElement.prototype.contains=function(e){if(!e){return false}if(e==this){return true}while(e=e.parentNode){if(e==this){return true}}return false}}if(!hv.Browser.ie&&typeof Event!="undefined"&&!window.opera){Event.prototype.__defineSetter__("returnValue",function(e){if(!e){this.preventDefault()}return e});Event.prototype.__defineSetter__("cancelBubble",function(e){if(e){this.stopPropagation()}return e})}hv.each=function(oK,T){if(c2(T)){for(var C=0,e=oK.length;C<e;C++){if(T.call(oK,oK[C],C)===false){break}}}return oK};hv.Platform={x11:0,macintosh:0,windows:0,android:0,iphone:0,ipad:0};for(var nw in hv.Platform){if(hv.Platform.hasOwnProperty(nw)){hv.Platform[nw]=new RegExp(nw,"i").test(window.navigator.userAgent)?1:0}}if(typeof(hv.Dom)==="undefined"){hv.Dom={}}hv.Dom.getComputedStyle=function(i,e){var T=i.nodeType==9?i:i.ownerDocument||i.document,C;if(T.defaultView&&T.defaultView.getComputedStyle){C=T.defaultView.getComputedStyle(i,null);if(C){return C[e]||C.getPropertyValue(e)}}else{if(i.currentStyle){return i.currentStyle[e]||""}}return""};var ix=hv.BaseEvent;var eX=hv.BaseClass;eX.prototype.toString=function(){return this._className||""};hv.on=function(C,i,e){if(!(C=hv.G(C))){return C}i=i.replace(/^on/,"");if(C.addEventListener){C.addEventListener(i,e,false)}else{if(C.attachEvent){C.attachEvent("on"+i,e)}}return C};hv.un=function(C,i,e){if(!(C=hv.G(C))){return C}i=i.replace(/^on/,"");if(C.removeEventListener){C.removeEventListener(i,e,false)}else{if(C.detachEvent){C.detachEvent("on"+i,e)}}return C};hv.hc=function(T,C){if(!T||!T.className||typeof T.className!="string"){return false}var i=-1;try{i=T.className==C||T.className.search(new RegExp("(\\s|^)"+C+"(\\s|$)"))}catch(oK){return false}return i>-1};hv.isEmptyObject=function(C){if(Object.prototype.toString.call(C)==="[object Object]"){for(var e in C){return false}return true}else{return false}};var s=(typeof window!=="undefined"&&window.BMAP_QT_VERSION)||"gl";function ep(){return s}window.BMAPGL_LANGUAGE_ZH="zh";window.BMAPGL_LANGUAGE_EN="en";window.BMAP_LANGUAGE_ZH="zh";window.BMAP_LANGUAGE_EN="en";window.BMAP_LANGUAGE_ZH_TW="zh-TW";window.BMAP_LANGUAGE_ES="es";window.BMAP_LANGUAGE_PT="pt";window.BMAP_LANGUAGE_FR="fr";window.BMAP_LANGUAGE_DE="de";window.BMAP_LANGUAGE_TH="th";window.BMAP_LANGUAGE_JA="ja";window.BMAP_LANGUAGE_KO="ko";window.BMAP_LANGUAGE_TR="tr";window.BMAP_LANGUAGE_IT="it";window.BMAP_LANGUAGE_RU="ru";window.BMAP_LANGUAGE_MS="ms";window.BMAP_LANGUAGE_VI="vi";window.BMAP_LANGUAGE_ID="id";var dt=[];if(window.B_HOST_TILE_ONLINE_URLS&&window.B_HOST_TILE_ONLINE_URLS.length>=4){dt=window.B_HOST_TILE_ONLINE_URLS}var cZ=window.location.protocol==="http:"?"http:":"https:";var gR={apiVersion:undefined,uiVersion:undefined,apiVersionIsGL:function(){return this.apiVersion==="gl"},uiVersionIsGL:function(){return this.uiVersion==="gl"},urlProtocol:cZ,fontFamily:'Arial,Helvetica,"PingFang SC","Hiragino Sans GB",STHeiti,"Microsoft YaHei",Tahoma,sans-serif',mapStyleNameIdPair:{"default":0,"grayed-out":1},gs:{},mapHost:cZ+"//" + window.location.host + "/bmap-map",apiHost:window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]?window._BMapSecurityConfig["serviceHost"]:cZ+"//" + window.location.host + "/bmap-api",apiIMG:cZ+"//" + window.location.host + "/bmap-api/images",staticHost:cZ+"//" + window.location.host + "/bmap-webmap",imgPath:cZ+"//" + window.location.host + "/bmap-webmap/image/api/",tileDomain:[cZ+"//"+(dt[0]||(window.location.host + "/bmap-tile0")),cZ+"//"+(dt[1]||(window.location.host + "/bmap-tile1")),cZ+"//"+(dt[2]||(window.location.host + "/bmap-tile2")),cZ+"//"+(dt[3]||(window.location.host + "/bmap-tile3"))],enTileDomain:[cZ+"//" + window.location.host + "/bmap-api"],apiTestUrl:cZ+"//" + window.location.host + "/bmap-api",panoTilePath:cZ+"//" + window.location.host + "/bmap-sv1/",rasterTilePath:"/tile/",vectorTilePath:"/pvd/",enVectorTilePath:"/api_enpvd",originTilePath:[cZ+"//pcor.baidu.com"],stylePath:cZ+"//" + window.location.host + "/bmap-webmap/sty/",getIconSetPath:function(e){var i="map_icons2x/";if(typeof e==="string"&&this.mapStyleNameIdPair[e]>0){i="map_icons2x_"+(this.mapStyleNameIdPair[e]-1)+"/"}return this.stylePath+i},getMapStyleFiles:function(C){var oK=true;if(typeof C==="string"&&C!=="default"){oK=false}var oL=oK?"":"_"+(this.mapStyleNameIdPair[C]-1);var i=cw();var T="udt="+i.udt+"&v="+i.ver;var e=this.stylePath;return[e+"icons_2x"+oL+".js?"+T,e+"fs"+oL+".js?"+T,e+"indoor_fs.js?"+T]},tvc:{ditu:{normal:{version:"088",updateDate:"20250110"},satellite:{version:"009",updateDate:"20250110"},normalTraffic:{version:"081",updateDate:"20250110"},satelliteTraffic:{version:"083",updateDate:"20250110"},mapJS:{version:"104",updateDate:"20250110"},satelliteStreet:{version:"083",updateDate:"20250110"},earthVector:{version:"001",updateDate:"20250110"}},webapp:{high_normal:{version:"001",updateDate:"20250110"},lower_normal:{version:"002",updateDate:"20250110"}},api_for_mobile:{vector:{version:"002",updateDate:"20250110"},vectorIcon:{version:"002",updateDate:"20250110"}}},msv:{mapstyle:{version:"001",updateDate:"20241224"}}};gR.gs[BMAP_LANGUAGE_ZH]="GS(2025)4125";gR.gs[BMAP_LANGUAGE_EN]="GS(2025)0741";gR.getGS=function(e){if(e===BMAP_LANGUAGE_ZH){return"GS(2025)4125"}else{if(e===BMAP_LANGUAGE_EN){return"GS(2025)0741"}else{return"GS(2025)4125"}}};gR.imgResources={blankGIF:gR.staticHost+"/res/litemapapi/v1d1/images/blank.gif?20170501",markerPng:gR.staticHost+"/res/litemapapi/v1d1/images/marker.png?20170501",locPng:gR.staticHost+"/res/litemapapi/v1d1/images/loc.png?20180918",locNewPng:gR.staticHost+"/res/litemapapi/v1d1/images/loc_new.png?20190314",zoomPng:gR.staticHost+"/res/litemapapi/v1d1/images/zoombtn.png?20180918",mapLogoPng:gR.staticHost+"/res/litemapapi/v1d1/images/logo-2x.png?20190226"};var K=gR;var nf="ruler.cur";if(hv.Browser.ie||hv.Browser.edge){hv.extend(K,{distCursor:"url("+K.imgPath+nf+"),crosshair",defaultCursor:"url("+K.imgPath+"openhand.cur),default",draggingCursor:"url("+K.imgPath+"closedhand.cur),move"})}else{if(hv.Browser.firefox){hv.extend(K,{distCursor:"url("+K.imgPath+nf+"),crosshair",defaultCursor:"-moz-grab",draggingCursor:"-moz-grabbing"})}else{if(hv.Browser.chrome||hv.Browser.safari){hv.extend(K,{distCursor:"url("+K.imgPath+nf+") 2 6,crosshair",defaultCursor:"url("+K.imgPath+"openhand.cur) 8 8,default",draggingCursor:"url("+K.imgPath+"closedhand.cur) 8 8,move"});if(hv.Platform.macintosh){K.defaultCursor="-webkit-grab";K.draggingCursor="-webkit-grabbing"}}else{hv.extend(K,{distCursor:"url("+K.imgPath+nf+"),crosshair",defaultCursor:"url("+K.imgPath+"openhand.cur),default",draggingCursor:"url("+K.imgPath+"closedhand.cur),move"})}}}cv=cv||{};cv.version="gl";if(!cv.coordType){cv.coordType="BMAP_COORD_BD09"}if(!cv.apiVersion){cv.apiVersion=(typeof window!=="undefined"&&window.BMAP_DEFAULT_API_VERSION)||"gl"}if(!cv.uiVersion){cv.uiVersion=(typeof window!=="undefined"&&window.BMAP_DEFAULT_UI_VERSION)||"gl"}cv._register=[];cv.register=function(e){this._register[this._register.length]=e};cv.guid=1;cv.getGUID=function(e){return(e||"")+cv.guid++};var hj=window.BMAP_AUTHENTIC_KEY||"";function af(e,i,T){var C=new Date();C.setTime(C.getTime()+T*24*60*60*1000);document.cookie=e+"="+escape(i)+";expires="+C.toGMTString()}function bQ(e,i){if(localStorage){return localStorage.setItem(e,i)}if(sessionStorage){return sessionStorage.setItem(e,i)}}cv.getSeckeyCid=function(){var i=+new Date();var e=cZ+"//dlswbr.baidu.com/heicha/mw/abclite-2063-s.js?_t="+i;jW.load(e,mE)};function mE(){if(window.___abvk){bQ("SECKEY_ABVK",window.___abvk)}}window.__abbaidu_2063_cb=function(i){var e=JSON.parse(i);bQ("BMAP_SECKEY",e.data)};cv.bmapVerifyCbk=function(oK){if(oK&&oK.popup===1&&oK.error_msg){dZ(oK.error_msg,{from:"verify"})}else{if(oK&&oK.error!==0){cv=null;BMapGL=null;var oL="鐧惧害鏈巿鏉冧娇鐢ㄥ湴鍥続PI锛屽彲鑳芥槸鍥犱负鎮ㄦ彁渚涚殑瀵嗛挜涓嶆槸鏈夋晥鐨勭櫨搴﹀湴鍥惧紑鏀惧钩鍙板瘑閽ワ紝鎴栨瀵嗛挜鏈鏈簲鐢ㄧ殑鐧惧害鍦板浘JavaScriptAPI鎺堟潈銆傛偍鍙互璁块棶濡備笅缃戝潃浜嗚В濡備綍鑾峰彇鏈夋晥鐨勫瘑閽ワ細https://lbs.baidu.com/apiconsole/key#銆�";switch(oK.error){case 101:oL="鎮ㄦ墍浣跨敤鐨勫瘑閽k鏈夐棶棰橈紝涓嶆敮鎸乯sapi鏈嶅姟锛屽彲浠ヨ闂缃戝潃浜嗚В濡備綍鑾峰彇鏈夋晥瀵嗛挜锛歨ttp://lbsyun.baidu.com/apiconsole/key#銆�";break;case 102:oL="MCODE鍙傛暟涓嶅瓨鍦紝mobile绫诲瀷MCODE鍙傛暟蹇呴渶锛岃鎯呮煡鐪嬶細http://lbsyun.baidu.com/apiconsole/key#銆�";break;case 200:oL="APP涓嶅瓨鍦紝AK鏈夎璇锋鏌ュ啀閲嶈瘯锛岃鎯呮煡鐪嬶細http://lbsyun.baidu.com/apiconsole/key#銆�";break;case 201:oL="APP琚偍绂佺敤鍟︼紝鍙互璁块棶 http://lbsyun.baidu.com/apiconsole/key# 鏌ョ湅鑷繁鐨勫簲鐢ㄥ叿浣撹鎯咃紝鎴栬仈绯绘垜浠簡瑙h鎯呫��";break;case 202:oL="APP琚鐞嗗憳鍒犻櫎鍟︼紝鍙互璁块棶 http://lbsyun.baidu.com/apiconsole/key# 鏌ョ湅鑷繁鐨勫簲鐢ㄥ叿浣撹鎯咃紝鎴栬仈绯绘垜浠簡瑙h鎯呫��";break;case 203:oL="APP绫诲瀷閿欒锛屽彲浠ヨ闂� http://lbsyun.baidu.com/apiconsole/key# 鏌ョ湅鑷繁鐨勫簲鐢ㄥ叿浣撹鎯咃紝鎴栬仈绯绘垜浠簡瑙h鎯呫��";break;case 210:oL="APP IP鏍¢獙澶辫触锛屽彲浠ヨ闂� http://lbsyun.baidu.com/apiconsole/key# 鏌ョ湅鑷繁鐨勫簲鐢ㄥ叿浣撹鎯咃紝鎴栬仈绯绘垜浠簡瑙h鎯呫��";break;case 220:oL="APP Referer鏍¢獙澶辫触銆傝妫�鏌ヨak璁剧疆鐨勭櫧鍚嶅崟涓庤闂墍鏈夌殑鍩熷悕鏄惁涓�鑷淬�傝鎯呮煡鐪嬶細http://lbsyun.baidu.com/apiconsole/key#";break;case 230:oL="APP Mcode鐮佹牎楠屽け璐ワ紝鍙互璁块棶 http://lbsyun.baidu.com/apiconsole/key# 鏌ョ湅鑷繁鐨勫簲鐢ㄥ叿浣撹鎯咃紝鎴栬仈绯绘垜浠簡瑙h鎯呫��";break;case 240:oL="APP鏈嶅姟琚鐢ㄤ簡锛屽彲浠ヨ闂� http://lbsyun.baidu.com/apiconsole/key# 鏌ョ湅鑷繁鐨勫簲鐢ㄥ叿浣撹鎯咃紝鎴栬仈绯绘垜浠簡瑙h鎯呫��";break;case 250:oL="璇ョ敤鎴蜂笉瀛樺湪... 璇风櫥褰� https://lbs.baidu.com 鐨勬帶鍒跺彴锛屾敞鍐屾垚涓哄紑鍙戣�呯敵璇穉k鍚с��";break;case 251:oL="璇ョ敤鎴疯鑷繁鍒犻櫎鍟︼紝鍙互璁块棶 http://lbsyun.baidu.com/apiconsole/key# 鏌ョ湅鑷繁鐨勫簲鐢ㄥ叿浣撹鎯呫��";break;case 252:oL="璇ョ敤鎴疯绠$悊鍛樺垹闄ゅ暒锛屽彲浠ヨ闂� http://lbsyun.baidu.com/apiconsole/key# 浜嗚В濡備綍鑾峰彇鏈夋晥瀵嗛挜锛屾垨璇疯仈绯绘垜浠簡瑙h鎯呫��";break;case 260:oL="鎮ㄦ墍浣跨敤鐨勫瘑閽K涓嶅寘鍚鏈嶅姟鍛紝鍙互璁块棶 http://lbsyun.baidu.com/apiconsole/key# 鏌ョ湅鏈嶅姟閫夋嫨鎯呭喌锛屾垨璇疯仈绯绘垜浠簡瑙h鎯呫��";break;case 261:oL="鎮ㄦ墍浣跨敤鐨勫瘑閽K鐨勮鏈嶅姟琚鐢ㄥ暒锛屽彲浠ヨ闂� http://lbsyun.baidu.com/apiconsole/key# 鏌ョ湅鏈嶅姟閫夋嫨鎯呭喌锛屾垨璇疯仈绯绘垜浠簡瑙h鎯呫��";break;case 401:oL="鎮ㄦ墍浣跨敤鐨凙K骞跺彂瓒呴檺浜嗭紝璇风櫥褰� http://lbsyun.baidu.com/cashier/quota#/home 浜嗚В璇︽儏銆�";break;case 302:oL="鎮ㄦ墍浣跨敤鐨凙K澶╅厤棰濊秴闄愪簡锛岃鐧诲綍 http://lbsyun.baidu.com/cashier/quota#/home 浜嗚В璇︽儏銆�";break}alert(oL);var C=document.getElementsByClassName("bmap-container");if(C){for(var T=0;T<C.length;T++){var e=C[T];if(e&&e.firstChild&&e.firstChild.id==="platform"){e.innerText=""}}}}}};cv.frequencyCbk=function(e){if(e){window.QTFrequency=e}};cv.verify=function(){if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){var e=K.apiHost+"?qt=verify&v="+ep()+"&type=webgl&time="+Date.now()+"&callback="+h6+".bmapVerifyCbk"}else{var e=K.apiHost+"/?qt=verify&v="+ep()+"&type=webgl&ak="+hj+"&time="+Date.now()+"&callback="+h6+".bmapVerifyCbk"}jW.load(e)};cv.frequency=function(){};cv.apiLoad=cv.apiLoad||function(){};function lJ(i,e){this._size=i;this._cache=[];this._totalGetTimes=0;this._totalHitTimes=0;this._options={clearCallback:null,removeOldCallback:null};e=e||{};for(var C in e){if(e.hasOwnProperty(C)){this._options[C]=e[C]}}}lJ.prototype.setData=function(C,T){var e=this._cache;var i=this._size;if(i===0){return}if(e.length>i){this._removeOld()}if(!e[C]){e.push(T)}e[C]=T;T._key_=C};lJ.prototype.getHitRate=function(){return Math.round(this._totalHitTimes/this._totalGetTimes*1000)/1000};lJ.prototype.getData=function(i){var e=this._cache[i];if(e){this._totalHitTimes++}this._totalGetTimes++;return e};lJ.prototype.removeData=function(oK){if(this._options.clearCallback){this._options.clearCallback(this._cache[oK])}var C=this._cache;var oL=C[oK];for(var T=0,e=C.length;T<e;T++){if(C[T]===oL){C.splice(T,1);break}}delete C[oK]};lJ.prototype._removeOld=function(){var e=this._cache;var oK=Math.round(this._size*0.6);for(var T=0;T<oK;T++){var C=e[T]._key_;if(this._options.clearCallback){this._options.clearCallback(e[C])}delete e[C]}e.splice(0,oK);if(this._options.removeOldCallback){this._options.removeOldCallback()}};lJ.prototype.clear=function(){var C=this._cache;for(var oK=0,e=C.length;oK<e;oK++){var T=C[oK]._key_;if(this._options.clearCallback){this._options.clearCallback(C[T])}delete C[T]}this._cache=C=[]};lJ.prototype.forEach=function(T){var C=this._cache;for(var oL=0,e=C.length;oL<e;oL++){var oK=C[oL]._key_;T(C[oK])}};lJ.prototype.getBatch=function(oK){var e=[];for(var T=0,C=oK.length;T<C;T++){if(this.getData(oK[T])){e[e.length]=this.getData(oK[T])}}return e};lJ.prototype.clearExcept=function(oL){var C=this._cache;for(var e=C.length,oK=e-1;oK>=0;oK--){var T=this._cache[oK]._key_;if(!oL[T]){C.splice(oK,1);if(this._options.clearCallback){this._options.clearCallback(C[T])}delete C[T]}}};lJ.prototype.getDataCount=function(){return this._cache.length};var lg="B_NORMAL_MAP";var c1="B_EARTH_MAP";var j9="B_SATELLITE_MAP";function mJ(){}hv.extend(mJ.prototype,{centerAndZoomIn:function(oO,C,oQ){var oM=this;if(!oO&&!C){return}oO=oO||this.centerPoint;C=C||this.zoomLevel;C=this._getProperZoom(C).zoom;if(this.mapType===c1){if(!this._earth){this.mapType=lg;this.temp.originMapType=c1;function oN(){oM._earth=new cv.Earth(oM,{showRealSunlight:oM.config.showRealSunlight,showMilkyway:oM.config.showMilkyway,earthBackground:oM.config.earthBackground});oM._proxyEarthEvents();oM._changeEarthMapType(c1);hv.extend(oM,cv.EarthView.prototype);if(!oM._navigationCtrl&&oM.config.showControls){oM._navigationCtrl=new cv.NavigationControl3D(oM)}delete oM.temp.originMapType}ki.load("earth",function(){if(cv["FeatureStyle"+oM.config.style]){oN()}else{oM.loadMapStyleFiles(function(){oN()})}})}}this.lastLevel=this.zoomLevel||C;this.zoomLevel=C;var oK=new ix("onload");oK.pointMC=oO;oK.zoom=C;this.centerPoint=this.restrictCenter(new d9(oO.lng,oO.lat));if(this.centerPoint.zoom){this.zoomLevel=this.centerPoint.zoom}this.defaultZoomLevel=this.defaultZoomLevel||this.zoomLevel;this.defaultCenter=this.defaultCenter||this.centerPoint;if(!this.loaded&&!(this.temp.originMapType===c1)){var i=this.config.defaultMaxBounds;var oL=new q(i,"baidu",this.mapType);var T=new kT({mapType:this.mapType,copyright:oL,customLayer:false,baseLayer:true,tileTypeName:"web"});T._isInnerLayer=true;this._addTileLayer(T);if(this.mapType===j9&&this._isHybridShow===true){this._addHybirdMap()}}if(K.apiVersionIsGL()){this.loaded=true;this.dispatchEvent(oK)}else{if(!this.loaded){this.loaded=true;if(this._isDefaultView){var oP=this;setTimeout(function(){oP.dispatchEvent(oK)},0)}else{this.dispatchEvent(oK)}}}oQ=oQ||{};oQ.callback&&oQ.callback()},_setPlatformPosition:function(oP,oO,oS){oS=oS||{};if(oP===0&&oO===0&&!oS.point){return}if(isNaN(oS.initMapOffsetX)){oS.initMapOffsetX=this.offsetX}if(isNaN(oS.initMapOffsetY)){oS.initMapOffsetY=this.offsetY}var oQ=oP+oS.initMapOffsetX;var oN=oO+oS.initMapOffsetY;if(oS.point){var i=this.restrictCenter(oS.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new ix("oncenter_changed"))}}else{var T=this.offsetX-oQ;var e=this.offsetY-oN;var C=this.getZoomUnits();var oM=this.centerPoint.lng;var oL=this.centerPoint.lat;var oK=new d9(oM,oL);this.centerPoint=this.restrictCenter(new d9(oK.lng+T*C,oK.lat-e*C),C);this.fire(new ix("oncenter_changed"));if(this.zoomLevel<10){oQ=this.offsetX-(this.centerPoint.lng-oK.lng)/C;oN=this.offsetY+(this.centerPoint.lat-oK.lat)/C}}this.offsetX=oQ;this.offsetY=oN;var oR=this.platform.style;oR.left=oQ+"px";oR.top=oN+"px";this.maskLayer.style.left=-oQ+"px";this.maskLayer.style.top=-oN+"px";if(oS.dispatchEvent!==false){this.dispatchEvent(new ix("onmoving"))}},zoomTo:function(e,oM,oQ){oQ=oQ||{};oQ.zoomCenter=oM;if(oQ.noAnimation!==true){this.deepZoomTo(e,oQ);return}if(typeof e!=="number"){return}var oK=gA[this.mapType];if(!oK){return}var C=e;e=this._getProperZoom(e).zoom;if(e===this.zoomLevel){var oN=new ix("onzoomexceeded");oN.targetZoom=C;this.dispatchEvent(oN);oQ.callback&&oQ.callback();return}this.lastLevel=this.zoomLevel;if(oM){this.temp._cPoint=oM;this.temp._cPixel=this.pointToPixelIn(oM)}else{if(this.getInfoWindow()){var oP=this.getInfoWindow().getPoint();this.temp._cPixel=this.pointToPixelIn(oP);this.temp._cPoint=oP}}if(this.config.zoomCenter){oM=this.config.zoomCenter;this.temp._cPoint=oM;this.temp._cPixel=this.pointToPixelIn(oM)}if(oM||this.temp.infoWin&&this.temp.infoWin.isOpen()){var i=this.temp._cPoint;var oO=this.temp._cPixel;var T=this.getZoomUnits(e);var oL=new d9(i.lng+T*(this.width/2-oO.x),i.lat-T*(this.height/2-oO.y));this.centerPoint=this.restrictCenter(oL,T,e);if(this.centerPoint.zoom){e=this.centerPoint.zoom}}if(oQ.fireEvent!==false){this.dispatchEvent(new ix("onzoomstart"))}if(e!==this.zoomLevel){this.zoomLevel=e;this.dispatchEvent(new ix("onzooming"));this.dispatchEvent(new ix("onzoomstartcode"))}if(oQ.fireEvent!==false){this.dispatchEvent(new ix("onzoomend"))}if(oQ.callback){oQ.callback()}},deepZoomMedia:function(e){var i=this;if(!i.temp.isStdCtrlBusy){i.temp.isStdCtrlBusy=true;i.deepZoomTo(i.zoomLevel+e);setTimeout(function(){i.temp.isStdCtrlBusy=false},400)}},deepZoomTo:function(oN,T){T=T||{};var oL=oN-this.zoomLevel;var oK=this._getProperZoom(oN);if(oK.exceeded){var e=new ix("onzoomexceeded");e.targetZoom=oN;this.dispatchEvent(e);return}var i;if(T.zoomCenter){i=this.pointToPixelIn(T.zoomCenter)}else{if(this.getInfoWindow()){i=this.pointToPixelIn(this.getInfoWindow().getPoint(),{zoom:this.lastLevel})}else{var i=new hV(this.width/2,this.height/2)}}this.lastLevel=this.zoomLevel;var oM=this.deepZoom||new a7(this);var C=oL>0?1:-1;oM.zoomMap(i,oL,C,null,T)},flyToIn:function(oO,e){if(e===this.zoomLevel){this.panToIn(oO);return}var oL=this._getProperZoom(e);if(oL.exceeded){var oP=new ix("onzoomexceeded");oP.targetZoom=e;this.dispatchEvent(oP);return}var oN=e-this.zoomLevel;var C=new hV(this.width/2,this.height/2);var i=this.pointToPixelIn(oO);var oM=new mU(i.x-C.x,i.y-C.y);this.lastLevel=this.zoomLevel;if(Math.abs(oN)>=4||Math.abs(oM.width)>this.width||Math.abs(oM.height)>this.height){this.centerAndZoomIn(oO,e);return}var oK=this.deepZoom||new a7(this);var T=oN>0?1:-1;oK.zoomMap(i,oN,T,oM)},panToIn:function(i,C){C=C||{};if(!i||i.equals(this.centerPoint)){C.callback&&C.callback();return}var T=this.pointToPixelIn(i);var e=Math.round(this.width/2);var oK=Math.round(this.height/2);if(Math.abs(e-T.x)>this.width||Math.abs(oK-T.y)>this.height||C.noAnimation===true){this._panToIn(e-T.x,oK-T.y,i);C.callback&&C.callback()}else{this._panBy(e-T.x,oK-T.y,C)}},_panToIn:function(i,e,T){var C=this.temp;if(C.operating===true){return}if(C.dragAni){C.dragAni.stop();C.dragAni=null;this.dispatchEvent(new ix("onmoveend"))}this.dispatchEvent(new ix("onmovestart"));this._setPlatformPosition(i,e,{point:T});this.dispatchEvent(new ix("onmoveend"))},panBy:function(i,e,C){C=C||{};if(!K.apiVersionIsGL()){if(C.noAnimation===undefined&&C.enableAnimation!==undefined){C.noAnimation=!C.enableAnimation}}i=Math.round(i)||0;e=Math.round(e)||0;if(Math.abs(i)<=this.width&&Math.abs(e)<=this.height&&C.noAnimation!==true){this._panBy(i,e,C)}else{this._panToIn(i,e);C.callback&&C.callback()}},_panBy:function(i,e,oK){if(this.temp.operating===true){return}oK=oK||{};this.dispatchEvent(new ix("onmovestart"));var T=this;var C=T.temp;C.pl=T.offsetX;C.pt=T.offsetY;if(C.tlPan){C.tlPan.cancel()}if(C.dragAni){C.dragAni.stop();C.dragAni=null;this.dispatchEvent(new ix("onmoveend"))}C.tlPan=new ij({fps:oK.fps||T.config.fps,duration:oK.duration||T.config.actionDuration,transition:oK.transition||jF.easeInOutQuad,render:function(oL){this.terminative=T.temp.operating;if(T.temp.operating){return}T._setPlatformPosition(Math.ceil(i*oL),Math.ceil(e*oL),{initMapOffsetX:C.pl,initMapOffsetY:C.pt})},finish:function(oL){T.dispatchEvent(new ix("onmoveend"));T.temp.tlPan=false;if(T.temp.stopArrow===true){T.temp.stopArrow=false;if(T.temp.arrow!==0){T._arrow()}}oK.callback&&oK.callback()}})},getCenterIn:function(){return this.centerPoint},getZoom:function(){return this.zoomLevel},setTilt:function(){},getTilt:function(){return this._tilt},setHeading:function(){},getHeading:function(){return this._heading},restrictCenter:function(oR,i,e){this.isRestrict=false;i=i||this.getZoomUnits();e=e||this.zoomLevel;var oP=this.pixelToPointIn(new hV(this.width,0),{center:oR,zoom:e});var oN=this.pixelToPointIn(new hV(0,this.height),{center:oR,zoom:e});var oS=oR.lng;var oX=oR.lat;if(this.config.restrictBounds!==null&&!this.config.restrictBounds.isEmpty()){var oW=this.config.restrictBounds;var T=oW.getSouthWest();var oU=oW.getNorthEast();var oQ=m8.convertLL2MC(T);var oL=m8.convertLL2MC(oU);oR.lng=this.calcNewLngByBounds(oS,oN,oP,oQ.lng,oL.lng,i);oR.lat=this.calcNewLatByBounds(oX,oN,oP,oQ.lat,oL.lat,i);return oR}var oO=this.pixelToPointIn(new hV(0,0),{center:oR,zoom:e});var oK=this.pixelToPointIn(new hV(0,this.height),{center:oR,zoom:e});if(this.zoomLevel<5){if(oO.lat>li.MAX_LAT&&oK.lat<li.MIN_LAT){this.isRestrict=true;var C=li.MAX_LAT-oR.lat;var oM=oR.lat-li.MIN_LAT;var oV;if(C<oM){oV=C/(this.height/2)}else{oV=oM/(this.height/2)}var oT=18-v(oV);this.zoomLevel=Math.ceil(oT);oR.zoom=Math.ceil(oT);return oR}}if(oO.lat>li.MAX_LAT){this.isRestrict=true;oR.lat=li.MAX_LAT-this.height/2*i}else{if(oK.lat<li.MIN_LAT){this.isRestrict=true;oR.lat=li.MIN_LAT+this.height/2*i}}return oR}});var oE={"--bmap-color-bg-base":"#2b2d33","--bmap-color-bg-base-hover":"rgba(255, 255, 255, .08)","--bmap-color-bg-base-active":"rgba(74, 144, 255, .18)","--bmap-color-primary":"#5ba3ff","--bmap-color-text-base":"#e0e0e0","--bmap-color-text-weak":"#b0b0c0","--bmap-color-text-active":"#5ba3ff","--bmap-color-text-secondary":"#b0b0c0","--bmap-color-text-tertiary":"#9a9ab0","--bmap-color-border":"#3a3d44","--bmap-color-border-secondary":"#3a3d44","--bmap-color-primary-bg":"#1e2a40","--bmap-color-primary-bg-hover":"#243450","--bmap-color-fill":"rgba(255, 255, 255, .08)","--bmap-box-shadow":"0 6px 16px 0 rgba(0,0,0,.45), 0 3px 6px -4px rgba(0,0,0,.55), 0 9px 28px 8px rgba(0,0,0,.35)"};var eH={dark:oE};var k7={};function cO(T){var e=typeof document!=="undefined"&&document.documentElement;if(!e||!e.style){return}for(var C in k7){if(k7.hasOwnProperty(C)){e.style.removeProperty(C)}}k7={};if(T){for(var i in T){if(T.hasOwnProperty(i)){e.style.setProperty(i,T[i]);k7[i]=1}}}}function li(e,oR){if(typeof e==="string"){e=document.getElementById(e)}eX.call(this);this.container=e;this.width=e.clientWidth;this.height=e.clientHeight;this.offsetX=0;this.offsetY=0;this._setStyle(e);e.unselectable="on";e.innerHTML="";hv.ac(e,"bmap-container");e.appendChild(this.render());this._initDate=new Date();this.platform=e.children[0];this.maskLayer=this.platform.children[0];this._panes={};this.centerPoint=new d9(0,0);this.zoomLevel=0;this._heading=0;this._tilt=0;this._bounds=new lz();this.lastLevel=0;this._lock=false;this._enableTiltZoom=7;this._enableHeadingZoom=7;this.defaultZoomLevel=null;this.defaultCenter=null;this.zoomEventStatus="idle";this._uiTheme="light";this.currentOperation=gp.idle;this._setConfig(oR);this._initMapRenderType();this._animationInfo={};this._animationInfoUnstopable={};this.suspendLoad=false;this.earthBoundary=true;this._customTileLabels=[];this.areaCustomLoaded=true;this.defaultPoint=new d9(116.418,39.918);this._projectionMatrix3D="perspective";this.mapExtendBounds=null;if(this._renderType==="webgl"){this._workerMgr=new nH(this);this._featureMgr=new dE();hv.extend(this,M.prototype);this.jobScheduler=new cd(this);this.benchmark=new eJ();this._setupWebGLMap();this.deviceInfo={hardwareInfo:{renderer:"",vendor:""}};if(eV.ifSupportWebGL._renderer){this.deviceInfo.hardwareInfo.renderer=eV.ifSupportWebGL._renderer;this.deviceInfo.hardwareInfo.vendor=eV.ifSupportWebGL._vendor}mL.setMap(this)}else{hv.extend(this,mJ.prototype)}var oP=ft(this.config.mapType);var oO=oP.mapTypeId;if(!gA[oO]){oO=lg}if(oO===c1&&!this.config.enableEarth){if(this.forceEnableEarth()===false){oO=lg}}this.config.mapType=oO;this.mapType=oO;this.preMapType=null;if(this.config.enableEarth){var oM=this.maskLayer.style;oM.opacity=0;oM.background="#000";if(this.config.mapType===c1){oM.opacity=1}setTimeout(function(){oM.WebkitTransition=oM.transition="opacity .4s"},100)}if(typeof oP.showStreetLayer==="boolean"){this.config.showStreetLayer=oP.showStreetLayer}this._isHybridShow=this.config.showStreetLayer;this.temp={operating:false,arrow:0,lastDomMoveTime:0,lastLoadTileTime:0,lastMovingTime:0,canKeyboard:false,I:function(i){return hv.I(i)},curSpots:[],curSpotsArray:[],curAreaSpot:null,spotsGuid:1,registerIndex:-1,hoverOnSpot:null,isStdCtrlBusy:false};this._initViewport={};if(oR){if(oR.center){this._initViewport.center=oR.center}if(oR.zoom!=null){this._initViewport.zoom=oR.zoom}if(oR.heading!=null){this._initViewport.heading=oR.heading}if(oR.tilt!=null){this._initViewport.tilt=oR.tilt}}this.platform.style.cursor=this.config.defaultCursor;this._bind();if(!cv.BMAP_INSTANCES){cv.BMAP_INSTANCES=1}else{cv.BMAP_INSTANCES+=1}for(var oL=0;oL<cv._register.length;oL++){cv._register[oL](this)}this.temp.registerIndex=oL;var oN=this;if(this._renderType==="webgl"){ki.load("oppcgl",function(){oN._asyncRegister()})}else{ki.load("oppc",function(){oN._asyncRegister()})}if(this.config.mapType==="B_EARTH_MAP"){if(!cv.Earth){ki.load("earth",function(){})}else{oN._syncAndChangeMapType("B_EARTH_MAP")}}if(!K.apiVersionIsGL()){this._isDefaultView=true;try{var oK=this._initViewport.center||li.DEFAULT_CENTER;var oQ=this._initViewport.zoom||li.DEFAULT_ZOOM;var C={noAnimation:true};if(this._initViewport.heading!=null){C.heading=this._initViewport.heading}if(this._initViewport.tilt!=null){C.tilt=Math.max(0,Math.min(73,this._initViewport.tilt))}this.centerAndZoomIn(m8.convertLL2MC(oK),oQ,C)}catch(T){this._isDefaultView=false;console.warn("[BMap] default view init failed:",T)}}}li.MAX_TILT=87;li.MAX_DRAG_TILT=73;li.MAX_DRAG_TILT_L2=50;li.MIN_TILT=0;li.DEFAULT_CENTER=new d9(116.404,39.915);li.DEFAULT_ZOOM=12;li.MAX_LAT=19431424;li.MIN_LAT=-16023552;li.WORLD_SIZE_MC_HALF=20037726.372307256;li.WORLD_SIZE_MC=li.WORLD_SIZE_MC_HALF*2;li.RIGHT_EDGE_POINT=new d9(li.WORLD_SIZE_MC_HALF,0);li.LEFT_EDGE_POINT=new d9(-li.WORLD_SIZE_MC_HALF,0);li.HIGH_RES_MIN_RATIO=1.2;li.inherits(eX,"Map");var h5={NORMAL:"B_NORMAL_MAP",EARTH:"B_EARTH_MAP",SATELLITE:"B_STREET_MAP"};cv.MapTypeId=h5;var lg="B_NORMAL_MAP";var j9="B_SATELLITE_MAP";var fp="B_STREET_MAP";var c1="B_EARTH_MAP";var f4="B_NONE_MAP";function mH(e){if(!e){return e}if(typeof e==="string"){return e}if(typeof e==="object"){if(typeof e.id==="string"){return e.id}if(typeof e.mapTypeId==="string"){return e.mapTypeId}if(e===BMAP_NORMAL_MAP){return lg}if(e===BMAP_SATELLITE_MAP){return j9}if(e===BMAP_HYBRID_MAP){return fp}if(e===BMAP_EARTH_MAP){return c1}if(e===BMAP_NONE_MAP){return f4}}return e}function ft(C){var e=mH(C);var i;if(K.apiVersionIsGL()){return{mapTypeId:e}}if(C&&typeof C==="object"&&typeof C.compatType==="string"){if(C.compatType==="BMAP_HYBRID_MAP"){return{mapTypeId:j9,showStreetLayer:true}}if(C.compatType==="BMAP_SATELLITE_MAP"){return{mapTypeId:j9,showStreetLayer:false}}}if(e===fp){return{mapTypeId:j9,showStreetLayer:true}}if(e===j9){return{mapTypeId:j9,showStreetLayer:false}}return{mapTypeId:e,showStreetLayer:i}}function n4(i){var e=cv.MapType&&cv.MapType.builtin;if(!e){return i.getMapTypeId()}switch(i.getMapTypeId()){case lg:return e.BMAP_NORMAL_MAP;case j9:return(i.config.showVectorStreetLayer||i._isHybridShow)?e.BMAP_HYBRID_MAP:e.BMAP_SATELLITE_MAP;case c1:return e.BMAP_EARTH_MAP;case f4:return e.BMAP_NONE_MAP;default:return i.getMapTypeId()}}hv.extend(li.prototype,{compatMapOptions:function(e){if(!K.apiVersionIsGL()){if(e.hasOwnProperty("enableMapClick")&&!e.hasOwnProperty("enableIconClick")){e.enableIconClick=!!e.enableMapClick}if(e.hasOwnProperty("enableIconClick")&&!e.hasOwnProperty("enableMapClick")){e.enableMapClick=!!e.enableIconClick}}if(e.enableIconInfoWindow===true){e.enableIconClick=true}return e},render:function(){var e=da("div",{id:"platform"});var T=e.style;T.overflow="visible";T.position="absolute";T.zIndex=5;T.top=T.left="0px";var i=da("div",{id:"mask","class":"BMap_mask"});var C=i.style;C.position="absolute";C.top=C.left="0px";C.zIndex="9";C.overflow="hidden";C.WebkitUserSelect="none";C.width=this.width+"px";C.height=this.height+"px";e.appendChild(i);return e},_initMapRenderType:function(){var e=this.config.forceRenderType;if(e==="dom"){this._renderType="dom";return}else{if(e==="canvas"){if(eV.isModernBrowser&&!eV.ifCanvas2dInBlackList()){this._renderType="canvas";return}else{this._renderType="dom";return}}else{if(e==="webgl"){if(eV.ifSupportWebGL()){this._renderType="webgl";return}}}}if(eV.ifSupportWebGL()&&eV.ifEnableWebGLMap()){this._renderType="webgl";return}if(eV.isModernBrowser&&eV.ifEnableCanvas2dMap()){this._renderType="canvas";return}this._renderType="dom"},_setConfig:function(i){i=i||{};i=this.compatMapOptions(i);this.config={bottomOffset:0,clickInterval:200,enableDragging:true,enableRotate:true,enableTilt:true,enableKeyboard:false,enableDblclickZoom:true,enableContinuousZoom:true,enableWheelZoom:!K.apiVersionIsGL(),enableRotateGestures:true,enableTiltGestures:true,enablePinchZoom:true,fixCenterWhenPinch:false,enableAutoResize:true,zoomCenter:null,fps:hv.Browser.ie?30:60,zoomerDuration:240,actionDuration:450,defaultCursor:K.defaultCursor,draggingCursor:K.draggingCursor,overlayMoveCursor:"pointer",coordType:cv.coordType,mapType:lg,drawer:BMAP_SYS_DRAWER,enableInertialDragging:true,drawMargin:500,drawMarginGL:500,enableFulltimeSpotClick:false,enableResizeOnCenter:false,isModernBrowser:eV.isModernBrowser,forceRenderType:"",textRenderType:null,ratio:ja()>=li.HIGH_RES_MIN_RATIO?2:1,enableEarth:eV.ifEnableEarth(),defaultMaxBounds:new lz(new d9(-21364736,-10616832),new d9(23855104,15859712)),showControls:false,indoorControl:!K.apiVersionIsGL(),showRealSunlight:true,showMilkyway:true,earthBackground:null,showStreetLayer:true,showVectorStreetLayer:false,showVectorLine:false,textureScale:1,minZoom:null,maxZoom:null,earthUseRound:true,earthMinZoom:null,earthMaxZoom:null,earthSun:true,earthClouds:true,earthMarkerShowAllTime:true,earthOpacity:null,earthFixAxis:false,style:"default",showCustomIndoor:true,backgroundColor:null,enableIconClick:false,enableIconInfoWindow:false,enableIconHighlight:true,autoSafeArea:false,ak:null,webgl2:false,restrictCenter:true,restrictBounds:null,smaa:false,preserveDrawingBuffer:false,privateOn:false,privateRegions:null,popRightClick:false,videoMuted:true,overlayTop:false,highRegion:{lineOpt:null,focusOpt:false},forceReload:true,textureSizeHeight:4096*2,markerUseRound:true,fontFamily:K.fontFamily||"sans-serif",extendTiles:0,enableAdaptiveMinZoom:true,showCopyrightOnMobile:false,zoomWithCenter:false,};for(var C in i){if(i.hasOwnProperty(C)){this.config[C]=i[C];if(C==="fixCenterWhenResize"){this.config.enableResizeOnCenter=i[C]}}}if(i.style){if(i.style["styleId"]&&i.style["styleId"].length<32){this.config.style=i.style["styleId"]}else{this.config.style=i.style}}this._setTextRenderType();this._displayOptions={language:BMAP_LANGUAGE_ZH,poi:true,poiText:true,poiIcon:true,overlay:true,layer:true,building:true,indoor:K.apiVersionIsGL(),street:true,skyColors:["rgba(226, 237, 248, 0)","rgba(186, 211, 252, 1)"],isFlat:false,labelMargin:0,buildingSideGradation:false};if(i.displayOptions){for(var e in i.displayOptions){if(i.displayOptions.hasOwnProperty(e)&&i.displayOptions[e]!==undefined){this._displayOptions[e]=i.displayOptions[e]}}}if(this._displayOptions.language!==BMAP_LANGUAGE_ZH){this._displayOptions.isEn=true;this._setTextRenderType("canvas")}else{this._displayOptions.isEn=false}this.updateFocusOptions(i.focusOptions,true);if(this.config.restrictCenter===false){this._enableTiltZoom=0;this._enableHeadingZoom=0}},getLanguage:function(){return this._displayOptions.language},changeLanguage:function(i){if(i!==BMAP_LANGUAGE_ZH&&i!==BMAP_LANGUAGE_EN){throw new Error("language must be BMAP_LANGUAGE_ZH or BMAP_LANGUAGE_EN")}if(this._displayOptions.language!==i){this._displayOptions.language=i;this._displayOptions.isMultiLanguage=false;if(i!==BMAP_LANGUAGE_ZH){this._displayOptions.isEn=true;if(this.config.textRenderType==="image"){this._setTextRenderType("canvas")}}else{this._displayOptions.isEn=false}this.fire(new ix("onlanguage_change"));this.fire(new ix("onstyle_willchange"));this.fire(new ix("onstyle_loaded"));var e=new ix("onlayer_update");e.name="na";this.fire(e)}},enablePreferredLanguage:function(oK){if(!oK){var T=(navigator.language||navigator.userLanguage||"zh").toLowerCase();var i=["zh","en","zh-tw","es","pt","fr","de","th","ja","ko","tr","it","ru","ms","vi","id"];if(i.indexOf(T)!==-1){oK=T}else{if(T.indexOf("-")>-1){var C=T.split("-")[0];if(i.indexOf(C)!==-1){oK=C}}}if(!oK){oK=BMAP_LANGUAGE_ZH}}if(this._displayOptions.language!==oK){this._displayOptions.language=oK;if(oK!==BMAP_LANGUAGE_ZH){this._displayOptions.isEn=true;this._displayOptions.isMultiLanguage=true;if(this.config.textRenderType==="image"){this._setTextRenderType("canvas")}}else{this._displayOptions.isEn=false;delete this._displayOptions.isMultiLanguage}this.fire(new ix("onlanguage_change"));this.fire(new ix("onstyle_willchange"));this.fire(new ix("onstyle_loaded"));var e=new ix("onlayer_update");e.name="na";this.fire(e)}},disablePreferredLanguage:function(){this._displayOptions.language=BMAP_LANGUAGE_ZH;this._displayOptions.isEn=false;delete this._displayOptions.isMultiLanguage;this.fire(new ix("onlanguage_change"));this.fire(new ix("onstyle_willchange"));this.fire(new ix("onstyle_loaded"));var e=new ix("onlayer_update");e.name="na";this.fire(e)},updateFocusOptions:function(e,C){this._spotOptions={open:false,gray:false,involve:1,focus:0,other:7156516};if(e){for(var i in e){if(e.hasOwnProperty(i)){this._spotOptions[i]=e[i]}}}if(this._webglMapScene&&this._webglMapScene._painter){this._webglMapScene._painter._hightLightEnable()}if(!C){this._drawFrame()}},getMinZoom:function(){var i;if(gA[this.mapType][this._renderType]){i=gA[this.mapType][this._renderType].minZoom}else{i=gA[this.mapType].minZoom}if(this.config.minZoom!==null&&this.config.minZoom>=i){i=this.config.minZoom}if(this.mapType==="B_EARTH_MAP"){return i}if(this.config.enableAdaptiveMinZoom){var e=this.getSize();var C=this.worldSize(i);while(C<e.width){i++;C=this.worldSize(i)}}if(this.config.restrictBounds&&!this.config.restrictBounds.isEmpty()){var oO=m8.convertLL2MC(this.config.restrictBounds.getSouthWest());var oK=m8.convertLL2MC(this.config.restrictBounds.getNorthEast());var T=oK.lng-oO.lng;var oP=oK.lat-oO.lat;var oN=this.getSize();var oQ=18-Math.log2(T/oN.width);var oL=18-Math.log2(oP/oN.height);var oM=Math.max(oQ,oL);if(oM>i){i=oM}}return i},getMaxZoom:function(){var e;if(gA[this.mapType][this._renderType]){e=gA[this.mapType][this._renderType].maxZoom}else{e=gA[this.mapType].maxZoom}if(this.config.maxZoom!==null&&this.config.maxZoom<=e){e=this.config.maxZoom}else{if(this._renderType==="webgl"){e=21}}return e},_drawFrame:function(){if(this._webglMapScene&&this._webglMapScene._painter){this._webglMapScene._painter.draw()}},_setupWebGLMap:function(){var e=this;ki.load("mapgl",function(){e._asyncRegister()})},_setStyle:function(i){var e=i.style;e.overflow="hidden";if(dK(i).position!=="absolute"){e.position="relative"}e.backgroundImage="url("+K.imgPath+"bg.png)";e.textAlign="left";e.touchAction=e.MSTouchAction="none"},_bind:function(){var e=this;if(e._renderType!=="webgl"){e._watchSize=function(){var C=e.getContainerSize();if(e.width!==C.width||e.height!==C.height){var oM=(C.width-e.width)/2;var oO=(C.height-e.height)/2;var T=e.getZoomUnits();var oL=e.centerPoint;if(oL&&!e.config.enableResizeOnCenter){e.centerPoint=new d9(oL.lng+oM*T,oL.lat-oO*T)}e.maskLayer.style.width=(e.width=C.width)+"px";e.maskLayer.style.height=(e.height=C.height)+"px";var oK=new ix("onresize");oK.size=C;e.dispatchEvent(oK);e.fire(new ix("onsize_changed"));var i=parseInt(e.platform.style.left,10)||0;var oN=parseInt(e.platform.style.top,10)||0;if(e.currentOperation!=="undefined"&&e.currentOperation!==gp.idle&&(e.offsetX!==i||e.offsetY!==oN)){e._setPlatformPosition(i,oN)}}}}else{e._watchSize=function(){var i=e.getContainerSize();if(e.width!==i.width||e.height!==i.height){var T=e.getSize();e.maskLayer.style.width=(e.width=i.width)+"px";e.maskLayer.style.height=(e.height=i.height)+"px";if(ja()!==e.config.ratio){e.config.ratio=ja()}var oK=new ix("onresize");oK.size=i;e.dispatchEvent(oK);var C=new ix("onsize_changed");C.size=i;C.oldSize=T;e.fire(C)}}}if(e.config.enableAutoResize){e.temp.autoResizeTimer=setInterval(e._watchSize,16)}this.on("size_changed",function(){var i=e.getMinZoom();if(e.zoomLevel<i){e.setZoomIn(i,{noAnimation:true})}});this.on("zoom_changed",function(){this.dispatchEvent(new ix("onzooming"))})},addControl:function(e){if(e&&c2(e._i)){e._i(this);this.dispatchEvent(new ix("onaddcontrol",e))}},removeControl:function(e){if(e&&c2(e.remove)){e.remove();this.dispatchEvent(new ix("onremovecontrol",e))}},hideEarthBoundary:function(){this.earthBoundary=false},showEarthBoundary:function(){this.earthBoundary=true},addContextMenu:function(i,e){if(i){i.initialize(this,e);this.dispatchEvent(new ix("onaddcontextmenu",i))}},removeContextMenu:function(e){if(e){this.dispatchEvent(new ix("onremovecontextmenu",e));e.remove()}},_addDistrictLayer:function(e){if(e){e.initialize(this)}},_removeDistrictLayer:function(e){if(e){e.removeDistrict(this,e)}},_addCustomHtmlLayer:function(e){if(e){e.initialize(this)}},_removeCustomHtmlLayer:function(e){if(e){e.removeLayer(e)}},addParkingSpot:function(e){if(e){e.initialize(this)}},removeParkingSpot:function(e){if(e){e.removeParkingSpot()}},addOverlay:function(i){if(i&&c2(i._i)){var C=new ix("onbeforeaddoverlay",i);C.overlay=i;this.dispatchEvent(C);i._i(this);C=new ix("onaddoverlay",i);C.overlay=i;this.dispatchEvent(C)}},removeOverlay:function(i){if(i&&c2(i.remove)){if(i instanceof dM){if(this.stencil){this.stencil=null}}var C=new ix("onremoveoverlay",i);C.overlay=i;i.remove();this.dispatchEvent(C)}},addFocusMask:function(e){if(e instanceof mw){mL.addFocusMask(e)}if(e instanceof Array){for(var C=0;C<e.length;C++){if(e[C] instanceof mw){mL.addFocusMask(e[C])}}}this._drawFrame()},removeFocusMask:function(e){if(e instanceof mw){mL.removeFocusMask(e)}if(e instanceof Array){for(var C=0;C<e.length;C++){if(e[C] instanceof mw){mL.removeFocusMask(e[C])}}}this._drawFrame()},clearFocusMasks:function(){mL.removeFocusMask();this._drawFrame()},clearOverlays:function(){this.dispatchEvent(new ix("onclearoverlays"))},_addTileLayer:function(oK){if(!oK){return}if(oK instanceof fm||oK instanceof gg||oK instanceof fl){if(oK.layer){oK=oK.layer}else{return}}for(var T=0,e=this.tileMgr.tileLayers.length;T<e;T++){var C=this.tileMgr.tileLayers[T];if(C===oK||C.getMapType()===oK.getMapType()){return}}oK.initialize(this);this.dispatchEvent(new ix("onaddtilelayer",oK))},_removeTileLayer:function(e){if(e){if(e instanceof fm||e instanceof gg||e instanceof fl){if(e.layer){e=e.layer}else{return}}e.remove();this.dispatchEvent(new ix("onremovetilelayer",e))}},_addNormalLayer:function(e){if(!e||!(e instanceof dQ)){return}this.dispatchEvent(new ix("onaddnormallayer",e))},_removeNormalLayer:function(e){if(e&&e instanceof dQ){this.dispatchEvent(new ix("onremovenormallayer",e))}},_addGeoJSONLayer:function(e){if(e&&e instanceof bk){e.init(this)}},_removeGeoJSONLayer:function(e){if(e&&e instanceof bk){e.remove()}},_addVisualLayer:function(e){if(this._visualMgr){this._visualMgr.addLayer(e)}},_removeVisualLayer:function(e){if(this._visualMgr){this._visualMgr.removeLayer(e)}},addLayer:function(e){if(!e){return}if(e.isNormalLayer){this._addNormalLayer(e)}else{if(e.isGeoJSONLayer){this._addGeoJSONLayer(e)}else{if(e.isTileLayer){this._addTileLayer(e)}else{if(e.isDistrictLayer){this._addDistrictLayer(e)}else{if(e.isCustomHtmlLayer){this._addCustomHtmlLayer(e)}else{if(e.isWebGLLayer){this._addVisualLayer(e)}else{console.warn("[BMap] addLayer: unknown layer type",e)}}}}}}},removeLayer:function(e){if(!e){return}if(e.isNormalLayer){this._removeNormalLayer(e)}else{if(e.isGeoJSONLayer){this._removeGeoJSONLayer(e)}else{if(e.isTileLayer){this._removeTileLayer(e)}else{if(e.isDistrictLayer){this._removeDistrictLayer(e)}else{if(e.isCustomHtmlLayer){this._removeCustomHtmlLayer(e)}else{if(e.isWebGLLayer){this._removeVisualLayer(e)}else{console.warn("[BMap] removeLayer: unknown layer type",e)}}}}}}},addNormalLayer:function(e){if(!K.apiVersionIsGL()){console.warn("[BMap] addNormalLayer is deprecated, use addLayer instead")}this._addNormalLayer(e)},removeNormalLayer:function(e){if(!K.apiVersionIsGL()){console.warn("[BMap] removeNormalLayer is deprecated, use removeLayer instead")}this._removeNormalLayer(e)},addTileLayer:function(e){if(!K.apiVersionIsGL()){console.warn("[BMap] addTileLayer is deprecated, use addLayer instead")}this._addTileLayer(e)},removeTileLayer:function(e){if(!K.apiVersionIsGL()){console.warn("[BMap] removeTileLayer is deprecated, use removeLayer instead")}this._removeTileLayer(e)},addGeoJSONLayer:function(e){if(!K.apiVersionIsGL()){console.warn("[BMap] addGeoJSONLayer is deprecated, use addLayer instead")}this._addGeoJSONLayer(e)},removeGeoJSONLayer:function(e){if(!K.apiVersionIsGL()){console.warn("[BMap] removeGeoJSONLayer is deprecated, use removeLayer instead")}this._removeGeoJSONLayer(e)},addDistrictLayer:function(e){if(!K.apiVersionIsGL()){console.warn("[BMap] addDistrictLayer is deprecated, use addLayer instead")}this._addDistrictLayer(e)},removeDistrictLayer:function(e){if(!K.apiVersionIsGL()){console.warn("[BMap] removeDistrictLayer is deprecated, use removeLayer instead")}this._removeDistrictLayer(e)},addCustomHtmlLayer:function(e){if(!K.apiVersionIsGL()){console.warn("[BMap] addCustomHtmlLayer is deprecated, use addLayer instead")}this._addCustomHtmlLayer(e)},removeCustomHtmlLayer:function(e){if(!K.apiVersionIsGL()){console.warn("[BMap] removeCustomHtmlLayer is deprecated, use removeLayer instead")}this._removeCustomHtmlLayer(e)},getTileLayer:function(e){if(this.tileMgr){return this.tileMgr.getTileLayer(e)}return null},setMapType:function(i){var T=this;var oN=ft(i);var C=oN.mapTypeId;var oL=!!(this.config.showVectorStreetLayer||this._isHybridShow);if(this._mapTypeChanging){return}if(this.getMapTypeId()===C){if(typeof oN.showStreetLayer!=="boolean"||oN.showStreetLayer===oL){return}this.preMapType=this.mapType;this._boundsInPreMapType=this.getBoundsIn();this._mapTypeChanging=true;var oM=!K.apiVersionIsGL()?n4(this):this.getMapTypeId();if(oN.showStreetLayer){if(this.config.showVectorStreetLayer){this._addHybirdVectorMap()}else{this._addHybirdMap()}}else{this.hideVectorStreetLayer();this.hideStreetLayer()}this._mapTypeChanging=false;var oK=new ix("onmaptypechange");oK.zoomLevel=this.zoomLevel;oK.mapType=!K.apiVersionIsGL()?n4(this):this.getMapTypeId();oK.exMapType=oM;this.dispatchEvent(oK);return}if(C===c1&&!this.config.enableEarth){return}if(this._earth&&this._earth.getLock()){return}this._mapTypeChanging=true;this.preMapType=this.mapType;this._boundsInPreMapType=this.getBoundsIn();if(this.preMapType===j9){this._preStreetLayerShow=this._isHybridShow}this._requestedStreetLayerShow=oN.showStreetLayer;if(C===c1){if(T.config.earthOpacity!==null){T._webglPainter&&(T._webglPainter._canvas.style.opacity=0)}if(!cv.Earth){ki.load("earth",function(){T._syncAndChangeMapType(C)});return}T._syncAndChangeMapType(C)}else{if(this.preMapType!==c1){this._changeFlatMapType(C);this._mapTypeChanging=false}else{this._setMapTypeStatus(C,function(e,oO){var oP=T._earth.getEarthCanvas();T._changeFlatMapType(C,this.preMapType);if(T._mapTypeChangAni){T._mapTypeChangAni.stop()}T._mapTypeChangAni=fg.start({el:oP,style:"opacity",startValue:1,endValue:0,duration:200,callback:function(){T._mapTypeChangAni=null;T._mapTypeChanging=false;if(T.config.earthOpacity!==null){T._webglPainter&&(T._webglPainter._canvas.style.opacity=1)}}});e=m8.convertLL2MC(e);if(T._renderType==="webgl"){hv.extend(T,M.prototype);T.setCenterIn(e,{noAnimation:true});T.setZoomIn(oO,{noAnimation:true})}else{hv.extend(T,mJ.prototype);T.centerAndZoomIn(e,oO)}})}}},_changeFlatMapType:function(oN){if(!oN||!gA[oN]){return}var oV=this.preMapType;this.mapType=oN;if(oN!==j9){this._clearSatelliteOverlayState()}if(oV===c1){this._removeInnerTileLayers()}var T=this.getTileLayer(oV);if(T){this._removeTileLayer(T)}else{if(this.tileMgr.tileLayers.length){var oU=this.getTileLayer(lg);if(oU){this._removeTileLayer(oU)}else{oU=this.getTileLayer(j9);oU&&this._removeTileLayer(oU)}}}var oL=typeof this._requestedStreetLayerShow==="boolean"?this._requestedStreetLayerShow:this.config.showStreetLayer;if(oV===j9&&this.config.showVectorStreetLayer){this._removeHybirdVectorMap()}else{if(oV===j9&&this._preStreetLayerShow){this._removeHybirdMap()}}if(this.mapType!==c1||this._renderType!=="webgl"||this.baseLayerAdded!==true){if(oN!==f4){var C=new lz(new d9(-21364736,-10616832),new d9(23855104,15859712));var oS=new q(C,"baidu",oN);var oK=new kT({mapType:this.mapType,copyright:oS,dataType:this.mapType===j9?jK:lf,customLayer:this.mapType===j9,baseLayer:true,transparentPng:false,tileTypeName:this.mapType===j9?"web":"na"});oK._isInnerLayer=true;oK.setZIndex(0);this._addTileLayer(oK);if(this._renderType==="webgl"&&!this.baseLayerAdded){this.baseLayerAdded=true}}if(this.mapType===f4){kU.sendMessage("Map","maptype","none")}else{if(this.mapType===j9){kU.sendMessage("Map","maptype","satellite")}else{kU.sendMessage("Map","maptype","normal")}}}if(oN===j9){this._featureMgr.clearLabelOverlayData();this._featureMgr.setLabelData([]);if(oL===true){if(this.config.showVectorStreetLayer){this._addHybirdVectorMap()}else{this._addHybirdMap()}}else{if(typeof oL==="undefined"){if(this.config.showVectorStreetLayer){this._addHybirdVectorMap()}else{this._addHybirdMap()}}else{this.config.showVectorStreetLayer=false;this._isHybridShow=false}}}var oP=this.tileMgr.tileLayers;for(var oO=0,oM=oP.length;oO<oM;oO++){var oQ=oP[oO];var oT=oQ.tilesDiv;if(!oT){continue}if(!oQ._isInnerLayer&&oT.style.visibility==="hidden"){oT.style.visibility=""}}var oR=new ix("onmaptypechange");oR.zoomLevel=this.zoomLevel;if(!K.apiVersionIsGL()){oR.mapType=n4(this);if(oV===j9){oR.exMapType=this._preStreetLayerShow?cv.MapType.builtin.BMAP_HYBRID_MAP:cv.MapType.builtin.BMAP_SATELLITE_MAP}else{if(oV===lg){oR.exMapType=cv.MapType.builtin.BMAP_NORMAL_MAP}else{if(oV===c1){oR.exMapType=cv.MapType.builtin.BMAP_EARTH_MAP}else{if(oV===f4){oR.exMapType=cv.MapType.builtin.BMAP_NONE_MAP}else{oR.exMapType=oV}}}}}else{oR.mapType=oN;oR.exMapType=oV}this.dispatchEvent(oR);this._requestedStreetLayerShow=undefined},showStreetLayer:function(e){if(e===undefined){e=true}this.config.showStreetLayer=!!e;if(e){this.hideVectorStreetLayer();this._addHybirdMap()}else{this._removeHybirdMap()}},showVectorStreetLayer:function(){this.hideStreetLayer();this.hideVectorStreetLayer();this.config.showStreetLayer=false;this.config.showVectorStreetLayer=true;if(this.mapType===j9||this.mapType===f4){this._addHybirdVectorMap()}},hideStreetLayer:function(){this.config.showStreetLayer=false;this._removeHybirdMap()},hideVectorStreetLayer:function(){this.config.showVectorStreetLayer=false;if(this.mapType===j9||this.mapType===f4){this._removeHybirdVectorMap()}},_clearSatelliteOverlayState:function(){this._removeHybirdVectorMap();this._removeHybirdMap();if(this._featureMgr){this._featureMgr.clearLabelOverlayData();this._featureMgr.setLabelData([])}},_removeInnerTileLayers:function(){var T=this.tileMgr&&this.tileMgr.tileLayers?this.tileMgr.tileLayers.slice():[];for(var C=0,e=T.length;C<e;C++){if(T[C]&&T[C]._isInnerLayer){this._removeTileLayer(T[C])}}},_addHybirdVectorMap:function(){var e=new kT({mapType:lg,dataType:lf,customLayer:false,baseLayer:false,transparentPng:true,tileTypeName:"na"});e._isInnerLayer=true;e.setZIndex(1);this._addTileLayer(e)},_removeHybirdVectorMap:function(){var oK=this.tileMgr.tileLayers;for(var T=0,e=oK.length;T<e;T++){var C=oK[T];if(!C){continue}if(C._isInnerLayer&&C.mapType===lg){this._removeTileLayer(C)}}},_addHybirdMap:function(){this._isHybridShow=true;if(this.mapType===c1){if(this._earth){this._earth.showStreetLayer()}return}if(this._hybridTileLayer){this._addTileLayer(this._hybridTileLayer);var oM=new ix("onstreetlayer_show");this.dispatchEvent(oM);return}var oK=new lz(new d9(-21364736,-10616832),new d9(23855104,15859712));var C=new q(oK,"",fp);var i=new kT({copyright:C,transparentPng:true,pack:true,tileTypeName:"web"});i._isInnerLayer=true;var T=this.isCanvasMap();i.getTilesUrl=function(oN,oT){var oR=gA[fp];var oS=oe("ditu","satelliteStreet");var oO=oS.ver;var e=oS.udt;var oQ=hz.calcLoopParam(oN.x,oT).col;var oP=oR.tileUrls[Math.abs(oN.x+oN.y)%oR.tileUrls.length]+"?qt=vtile&x="+(oQ+"").replace(/-/gi,"M")+"&y="+(oN.y+"").replace(/-/gi,"M")+"&z="+oT+"&styles=sl&v="+oO+"&udt="+e+"&scaler="+ja()+"&showtext="+(T?0:1);return oP};this._isHybridShow=true;this._addTileLayer(i);this._hybridTileLayer=i;var oL=new ix("onstreetlayer_show");this.dispatchEvent(oL)},_removeHybirdMap:function(){this._isHybridShow=false;if(this.mapType===c1){if(this._earth){this._earth.hideStreetLayer()}return}if(this._hybridTileLayer){this._removeTileLayer(this._hybridTileLayer);var i=new ix("onstreetlayer_hide");this.dispatchEvent(i)}},isStreetLayerShow:function(){if(this.mapType===c1&&this._earth){return !!this._earth._streetLayerVisible}return !!(this.config.showVectorStreetLayer||this._isHybridShow)},getTileId:function(e,oL){var T=gA[this.mapType];if(typeof T!=="object"){return null}var C=T.baseUnits*Math.pow(2,(T.zoomLevelBase-oL));var oK=parseInt(e.lng/C,10);var i=parseInt(e.lat/C,10);return{row:oK,column:i,level:oL}},reset:function(){this.centerAndZoomIn(this.defaultCenter,this.defaultZoomLevel,true)},setOptions:function(i){i=i||{};i=this.compatMapOptions(i);var oK=this;for(var T in i){if(i.hasOwnProperty(T)){var C=true;if(typeof i[T]!=="object"){C=i[T]!==this.config[T]}this.config[T]=i[T];if(T==="fixCenterWhenResize"){this.config.enableResizeOnCenter=i[T]}if(!C){continue}switch(T){case"style":case"styleUrl":var e={os:i.style.os,sv:i.style.sv};if(T==="style"&&i.styleUrl){break}this.fire(new ix("onstyle_willchange"));this.loadMapStyleFiles(function(){var oL=new ix("onlayer_update");oL.name="na";oK.fire(oL)},e);break;case"enableAutoResize":if(i[T]===true){this.enableAutoResize()}else{this.disableAutoResize()}break;case"displayOptions":this.setDisplayOptions(i[T]);break;case"indoorControl":if(oK._indoorMgr){oK._indoorMgr._toggleControl(i[T])}break}}}},setPrivateStatus:function(i){if(typeof i==="boolean"){if(this.config.privateOn!==i){this.config.privateOn=i;var e=new ix("onlayer_update");e.name="na";this.fire(e)}}},getPrivateStatus:function(){return this.config.privateOn},setPrivateRegions:function(oK){if(oK&&oK instanceof Array){var T=true;for(var C=0;C<oK.length;C++){if(oK[C] instanceof es){continue}else{T=false;break}}if(T){this.config.privateRegions=oK;var e=new ix("onlayer_update");e.name="na";this.fire(e)}}},getPrivateRegions:function(){if(!this.config.privateRegions){return null}else{return this.config.privateRegions}},enableDragging:function(){this.config.enableDragging=true},disableDragging:function(){this.config.enableDragging=false},enableInertialDragging:function(){this.config.enableInertialDragging=true},disableInertialDragging:function(){this.config.enableInertialDragging=false},enableScrollWheelZoom:function(){this.config.enableWheelZoom=true},disableScrollWheelZoom:function(){this.config.enableWheelZoom=false},enableContinuousZoom:function(){this.config.enableContinuousZoom=true},disableContinuousZoom:function(){this.config.enableContinuousZoom=false},enableResizeOnCenter:function(){this.config.enableResizeOnCenter=true},disableResizeOnCenter:function(){this.config.enableResizeOnCenter=false},enableDoubleClickZoom:function(){this.config.enableDblclickZoom=true},disableDoubleClickZoom:function(){this.config.enableDblclickZoom=false},enableKeyboard:function(){this.config.enableKeyboard=true},disableKeyboard:function(){this.config.enableKeyboard=false},getSize:function(){return new mU(this.width,this.height)},enablePinchToZoom:function(){this.config.enablePinchZoom=true},disablePinchToZoom:function(){this.config.enablePinchZoom=false},enableRotateGestures:function(){this.config.enableRotateGestures=true},disableRotateGestures:function(){this.config.enableRotateGestures=false},enableTilt:function(){this.config.enableTilt=true},disableTilt:function(){this.config.enableTilt=false},enableRotate:function(){this.config.enableRotate=true},disableRotate:function(){this.config.enableRotate=false},enableAutoResize:function(){this.config.enableAutoResize=true;this._watchSize();if(!this.temp.autoResizeTimer){this.temp.autoResizeTimer=setInterval(this._watchSize,16)}},disableAutoResize:function(){this.config.enableAutoResize=false;if(this.temp.autoResizeTimer){clearInterval(this.temp.autoResizeTimer);this.temp.autoResizeTimer=null}},checkResize:function(){this._watchSize()},resize:function(){if(!K.apiVersionIsGL()){console.warn("[BMap] resize is only for GL version, use checkResize instead")}this._watchSize()},getContainerSize:function(){return new mU(this.container.clientWidth,this.container.clientHeight)},_getProperZoom:function(C){if(!C){C=this.zoomLevel}var i=this.getMinZoom();var e=this.getMaxZoom();var T=false;if(C<i){T=true;C=i}if(C>e){T=true;C=e}if(this._renderType!=="webgl"){C=Math.round(C)}return{zoom:C,exceeded:T}},getContainer:function(){return this.container},getZoomUnits:function(C){if(this.mapType===c1){return Math.pow(2,18-this._earth.getImageZoom())}var e=gA[this.mapType];if(typeof e!=="object"){return null}var i=C||this.zoomLevel;return Math.pow(2,(e.zoomLevelBase-i))},pointToPixelIn:function(oT,oV){if(!oT){return}oV=oV||{};if(this.mapType===c1){var T;if(!oT._llPt){T=m8.convertMC2LL(oT);oT._llPt=T}T=oT._llPt;var oP=null;var C=null;if(typeof oV.zoom==="number"){var oS=this._earth;var oU=oS._getEarthZoomByImgZoom(oV.zoom);if(oU<=3){oP=oS._generateTmpPMatrix(oU)}C=oS._generateTmpMVMatrix(oS.getCenter(),oU)}var oL=this._earth.fromLatLngToPixel(T,{useRound:false,isCalcOnBack:true,matrixInfo:{modelViewMatrix:C,projectionMatrix:oP}});return oL}var oK=typeof oV.heading==="number"||typeof oV.tilt==="number";if((this._heading%360===0&&this._tilt===0&&!oK)||!this._webglMapCamera){var oR=this.getZoomUnits(oV.zoom);var oN=oV.center||this.centerPoint;var i=this.width/2;var oM=this.height/2;var oQ=(oT.lng-oN.lng)/oR+i;var oO=(oN.lat-oT.lat)/oR+oM;if(oV.useRound!==false){oQ=Math.round(oQ);oO=Math.round(oO)}return new hV(oQ,oO)}var e=this._webglMapCamera.fromMCToScreenPixel(oT.lng,oT.lat,oV);if(oV.useRound===false){return e}e.x=Math.round(e.x);e.y=Math.round(e.y);return e},pixelToPointIn:function(e,oQ){if(!e){return}oQ=oQ||{};if(this.mapType===c1){if(typeof oQ.zoom==="number"){var oO=this._earth;var oL=null;var C=null;var oP=oO._getEarthZoomByImgZoom(oQ.zoom);if(oP<=3){oL=oO._generateTmpPMatrix(oP)}C=oO._generateTmpMVMatrix(oO.getCenter(),oP)}var i=this._earth.fromPixelToLatLng(e,{matrixInfo:{modelViewMatrix:C,projectionMatrix:oL}});if(i===null){return null}return m8.convertLL2MC(i)}if((this._heading%360!==0||this._tilt>0||typeof oQ.heading==="number"||typeof oQ.tilt==="number")&&this._webglMapCamera){return this._webglMapCamera.fromScreenPixelToMC(e.x,e.y,oQ)}var oM=oQ.center||this.centerPoint;var oN=this.getZoomUnits(oQ.zoom);var oK=oM.lng+oN*(e.x-this.width/2);var T=oM.lat-oN*(e.y-this.height/2);return new d9(oK,T)},pointToOverlayPixelIn:function(e,T){T=T||{};var C=this.pointToPixelIn(e,{zoom:T.zoom,center:T.center,forLabel:true,frustumTest:true,useRound:T.useRound});if(!C){return}if(T.fixPosition&&this.mapType!=="B_EARTH_MAP"){var oK=this.getSize();var i=this.worldSize(T.zoom);if(i>0&&isFinite(C.x)){if(C.x>oK.width){C.x-=Math.ceil((C.x-oK.width)/i)*i}else{if(C.x<0){C.x+=Math.ceil((0-C.x)/i)*i}}}}if(this._renderType==="webgl"){return C}C.x-=this.offsetX;C.y-=this.offsetY;return C},overlayPixelToPointIn:function(i,e){if(!i){return}var C=i.clone();if(this._renderType!=="webgl"){C.x+=this.offsetX;C.y+=this.offsetY}return this.pixelToPointIn(C,e)},getProjection:function(){return new m8()},lnglatToMercator:function(e,T){var i=new d9(e,T);var C=m8.convertLL2MC(i);return[C.lng,C.lat]},lngLatToMercator:function(e,i){return this.lnglatToMercator(e,i)},mercatorToLnglat:function(i,e){if(isNaN(i)||isNaN(e)){return[]}i=parseFloat(i);e=parseFloat(e);var T=new d9(i,e);var C=m8.convertMC2LL(T);return[C.lng,C.lat]},mercatorToLngLat:function(i,e){return this.mercatorToLnglat(i,e)},getBoundsIn:function(){if(!this._bounds){return}var oW=arguments[0];if(this.mapType===c1&&this._earth){var oQ=this._earth.getCustomBounds();if(!oQ){return this.config.defaultMaxBounds}var oP=oQ.getSouthWest();var e=oQ.getNorthEast();if(oP.lng>e.lng){e.lng=180}var pd=m8.convertLL2MC(oP);var o3=m8.convertLL2MC(e);var oT=this.config.defaultMaxBounds;var o2=Math.max(pd.lng,oT.sw.lng);var o1=Math.max(pd.lat,oT.sw.lat);var oV=Math.min(o3.lng,oT.ne.lng);var oU=Math.min(o3.lat,oT.ne.lat);var oY=new lz(new d9(o2,o1),new d9(oV,oU));oY.pointBottomLeft=new d9(o2,o1);oY.pointBottomRight=new d9(oV,o1);oY.pointTopLeft=new d9(o2,oU);oY.pointTopRight=new d9(oV,oU);oY.setMinMax();oY.makeNormalizedPoint(this._earth.getHeading());return oY}oW=oW||{};var oK=oW.margins||[0,0,0,0];var o8=this.pixelToPointIn({x:oK[3],y:this.height-oK[2]},oW);var pc=this.pixelToPointIn({x:this.width-oK[1],y:oK[0]},oW);var o0=typeof oW.heading==="number"?oW.heading:(this._heading%360);var C=typeof oW.tilt==="number"?oW.tilt:this._tilt;var oS=this._webglMapCamera;if((o0===0&&C===0)||!oS){this._bounds.setSouthWest(o8);this._bounds.setNorthEast(pc);this._bounds.pointBottomLeft=o8;this._bounds.pointBottomRight=new d9(pc.lng,o8.lat);this._bounds.pointTopRight=pc;this._bounds.pointTopLeft=new d9(o8.lng,pc.lat);this._bounds.setMinMax();this._bounds.makeNormalizedPoint(o0);return this._bounds}var oZ=this.pixelToPointIn({x:oK[3],y:oK[0]},oW);var T=oS.getPosition();var pe=Math.sqrt(Math.pow(oZ.lng-T[0],2)+Math.pow(oZ.lat-T[1],2));var o9=this.getZoomUnits();var pg=pe/o9;var o6=oS._frustumSideLen;var oO=oS._fovy;if(this._projectionMatrix3D!=="ortho"&&(pg>o6||(90-C)<oO/2)){var pf=[oZ.lng-T[0],oZ.lat-T[1]];if((90-C)<oO/2){pf[0]=-pf[0];pf[1]=-pf[1]}var o7=o6*o9;var oN=[pf[0]/pe*o7+T[0],pf[1]/pe*o7+T[1]];var o4=[pc.lng-T[0],pc.lat-T[1]];if((90-C)<oO/2){o4[0]=-o4[0];o4[1]=-o4[1]}var oL=[o4[0]/pe*o7+T[0],o4[1]/pe*o7+T[1]];oZ.lng=oN[0];oZ.lat=oN[1];pc.lng=oL[0];pc.lat=oL[1]}var oX=this.pixelToPointIn({x:this.width-oK[1],y:this.height-oK[2]},oW);var o5=[o8,pc,oZ,oX];var pb=o5[0].lng;var ph=o5[0].lat;var oM=o5[0].lng;var oR=o5[0].lat;for(var pa=1;pa<4;pa++){if(o5[pa].lng<pb){pb=o5[pa].lng}if(o5[pa].lng>oM){oM=o5[pa].lng}if(o5[pa].lat<ph){ph=o5[pa].lat}if(o5[pa].lat>oR){oR=o5[pa].lat}}this._bounds.setSouthWest(new d9(pb,ph));this._bounds.setNorthEast(new d9(oM,oR));this._bounds.pointTopLeft=oZ;this._bounds.pointTopRight=pc;this._bounds.pointBottomRight=oX;this._bounds.pointBottomLeft=o8;this._bounds.makeNormalizedPoint(o0);this._bounds.setMinMax();return this._bounds},getExtendBounds:function(){var C=lA.getInstance("na");var oT=this.getZoom();var e=Math.floor(oT);var oR=C.getDataZoom(oT);oR=dA(oR,oB.minDataZoom,oB.maxDataZoom);var oL=e;var oP=C.getTileSize(oT);var oZ=C.getBaseTileSize(oT);var oM=this.getBoundsIn();if(!oM){return}var oQ=C.getMercatorSize(oT,oR);var oW;var oS;var o1;var oX;var oV=map.getCenterIn();oV=hz.calcLoopCenterPoint(oV);var T=Math.floor(oV.lng/oQ);var o2=Math.floor(oV.lat/oQ);var o0=0;var oN=0;oM=hz.calcLoopMapBounds(oM,oV);if(oM.ne.lng>hz._mc180X){var oK=hz.getSpaceDistanceInPixel(oR);o0=Math.ceil(oK/oZ)}if(oM.sw.lng<hz._mcM180X){var oK=hz.getSpaceDistanceInPixel(oR);oN=Math.ceil(oK/oZ)}if(oM.ne.lat>19505879.362428114||oM.sw.lat<-15949096.637571886){oM.ne.lat=19505879.362428114;oM.sw.lat=-15949096.637571886}var oY=[Math.floor(oM.sw.lng/oQ)-oN,Math.floor(oM.sw.lat/oQ)];var i=[Math.floor(oM.ne.lng/oQ)+o0,Math.floor(oM.ne.lat/oQ)];oW=oY[0]-this.config.extendTiles;oS=i[0]+1+this.config.extendTiles;o1=oY[1]-this.config.extendTiles;oX=i[1]+1+this.config.extendTiles;var oU=m8.tileToBoundRange({col:oS,row:oX,baseTileSize:oZ,zoom:oR});var oO=m8.tileToBoundRange({col:oW,row:o1,baseTileSize:oZ,zoom:oR});this.mapExtendBounds=new lz(oO.LL.sw,oU.LL.ne);return this.mapExtendBounds},isLoaded:function(){return !!this.loaded},_getBestLevel:function(i,oS){var oL=0;if(this._renderType==="webgl"&&!c9()){oL=100}var oM=oS.margins||[10,10,10,10];var T=oS.zoomFactor||0;var oN=oM[1]+oM[3];var oK=oM[0]+oM[2];var e=this.getMinZoom();var oR=this.getMaxZoom();var oQ=i.toSpan();var oP=oQ.width/(this.width-oN-oL);var oO=oQ.height/(this.height-oK-oL);var C=18-v(Math.max(oP,oO));if(C<e){C=e}if(C>oR){C=oR}C+=T;if(this._renderType!=="webgl"){C=Math.floor(C)}return C},getViewportIn:function(oS,oK){if(this.mapType===c1){oS=oS||[];var oM=[];for(var oT=0;oT<oS.length;oT++){if(!oS[oT]){continue}oM.push(m8.convertMC2LL(oS[oT]))}var oU=this._earth.getViewportIn(oM,oK);var T=oU.center;var oQ=oU.zoom;var oY=m8.convertLL2MC(T);return{center:oY,zoom:oQ}}var oO={center:this.getCenterIn(),zoom:this.getZoom()};if(!oS||oS.length===0){return oO}oK=oK||{};var oN;if(oS instanceof lz){oN=oS}else{var oL=oS;oN=new lz();for(var oR=oL.length-1;oR>=0;oR--){oN.extend(oL[oR])}if(oN.isEmpty()){return oO}}var oX=oN.getCenter();var e=this._getBestLevel(oN,oK);if(oK.margins){var C=oK.margins;var oW=(C[1]-C[3])/2;var oP=(C[0]-C[2])/2;var oV=this.getZoomUnits(e);oX.lng=oX.lng+oV*oW;oX.lat=oX.lat+oV*oP}return{center:oX,zoom:e}},setViewportIn:function(T,oK){if(this.mapType===c1){var oO;if(T&&T.center){var C=m8.convertMC2LL(T.center);var oM=this._earth._getEarthZoomByImgZoom(T.zoom,C);oO={center:C,zoom:oM}}else{oO=[];for(var oL=0;oL<T.length;oL++){var oN=m8.convertMC2LL(T[oL]);oO[oL]=new d1(oN.lat,oN.lng)}}this._earth.setViewportIn(oO,oK);return}var e;if(T&&T.center){e=T}else{e=this.getViewportIn(T,oK)}oK=oK||{};if(this._renderType==="webgl"){this.centerAndZoomIn(e.center,e.zoom,oK);return}if(e.zoom===this.zoomLevel&&oK.enableAnimation!==false){this.panToIn(e.center,{duration:200,callback:oK.callback})}else{this.centerAndZoomIn(e.center,e.zoom,oK)}},addSpots:function(C,i){if(!C||C.length===0){return}i=i||{};var oL=i.zIndex||0;var oK=typeof i.enableMultiResponse==="undefined"?true:!!i.enableMultiResponse;this.spotsPool=this.spotsPool||{};var e="sp"+(this.temp.spotsGuid++);this.spotsPool[e]={spots:C.slice(0),zIndex:oL,enableMultiResponse:oK};var T=this;ki.load("hotspot",function(){T._asyncRegister()},true);return e},getSpots:function(e){return this.spotsPool[e]&&this.spotsPool[e].spots||[]},removeSpots:function(e){if(!e||!this.spotsPool[e]){return}delete this.spotsPool[e]},clearSpots:function(){delete this.spotsPool;delete this._hotspotIndex},addHotspot:function(i,e){if(!i||!(i instanceof dX)||i._invalid){return}e=e||"custom";if(i._bindTag&&i._bindTag!==e){this.removeHotspot(i,i._bindTag)}i.initialize(this);i._bindTag=e;this._hotspotIndex=this._hotspotIndex||{};var T=this._hotspotIndex[e];if(T&&T.spotsId&&this.spotsPool&&this.spotsPool[T.spotsId]){if(T.hotspots[i.guid]){return}this.spotsPool[T.spotsId].spots.push(i);T.hotspots[i.guid]=i}else{var C=this.addSpots([i],{zIndex:0,enableMultiResponse:true});this._hotspotIndex[e]={spotsId:C,hotspots:{}};this._hotspotIndex[e].hotspots[i.guid]=i}this._asyncRegister()},removeHotspot:function(oL,e){e=e||"custom";if(!this._hotspotIndex||!this._hotspotIndex[e]){return}var oM=this._hotspotIndex[e];if(!oM.hotspots[oL.guid]){return}var C=this.spotsPool&&this.spotsPool[oM.spotsId];if(C){var oK=C.spots;for(var T=0;T<oK.length;T++){if(oK[T]===oL){oK.splice(T,1);break}}if(oK.length===0){this.removeSpots(oM.spotsId);delete this._hotspotIndex[e];oL._bindTag=null;oL._map=null;return}}delete oM.hotspots[oL.guid];oL._bindTag=null;oL._map=null},clearHotspots:function(e){e=e||"custom";if(!this._hotspotIndex||!this._hotspotIndex[e]){return}var C=this._hotspotIndex[e];for(var i in C.hotspots){C.hotspots[i]._bindTag=null;C.hotspots[i]._map=null}this.removeSpots(C.spotsId);delete this._hotspotIndex[e]},getIconByClickPosition:function(i){if(!this.config.enableIconClick||!this._spotsMgr){return null}var e=this._spotsMgr.getSpotsByScreenPosition(i);if(e[0]&&e[0].userdata){var C=e[0].userdata;return{name:C.name,uid:C.uid,position:C.iconPoint||e[0].pt}}return null},setBounds:function(e){gA[this.mapType].bounds=e.clone();this.restrictBounds(e)},getCoordType:function(){return cv.coordType},getPanes:function(){return this._panes},getInfoWindow:function(){if(this.temp.infoWin&&this.temp.infoWin.isOpen()){return this.temp.infoWin}return null},getDistanceIn:function(oK,e){if(!oK||!e){return}if(oK.equals(e)){return 0}if(this.mapType===c1){var T=m8.convertMC2LL(oK);var C=m8.convertMC2LL(e);return this._earth.getDistance(T,C)}var i=m8.getDistanceByMC(oK,e);return i},getOverlays:function(){var oL=[];var oM=this._overlays;var oK=this._customOverlays;if(oM){for(var T in oM){if(oM[T] instanceof g2){oL.push(oM[T])}}}if(oK){for(var C=0,e=oK.length;C<e;C++){oL.push(oK[C])}}return oL},getMapTypeId:function(){return mH(this.mapType)},getMapType:function(){if(!K.apiVersionIsGL()){return n4(this)}return this.getMapTypeId()},getMapCoordType:function(){return cv.coordType},_asyncRegister:function(){if(this._destroyed||!this.temp){return}for(var e=this.temp.registerIndex;e<cv._register.length;e++){if(cv._register[e] instanceof Function){cv._register[e](this)}}this.temp.registerIndex=e},setDefaultCursor:function(e){this.config.defaultCursor=e;if(this.platform){this.platform.style.cursor=this.config.defaultCursor}},getDefaultCursor:function(){return this.config.defaultCursor},setOverlayMoveCursor:function(e){this.config.overlayMoveCursor=e},getOverlayMoveCursor:function(){return this.config.overlayMoveCursor},setDraggingCursor:function(e){this.config.draggingCursor=e},getDraggingCursor:function(){return this.config.draggingCursor},_syncAndChangeMapType:function(e){kU.sendMessage("Map","maptype","earth");var i=this;if(i._renderType==="webgl"&&i.getTilt()>li.MAX_DRAG_TILT_L2){i.setTilt(li.MAX_DRAG_TILT_L2,{callback:function(){i._changeEarthMapType(e)}})}else{i._changeEarthMapType(e)}},_changeEarthMapType:function(C){var T=this;var oM=T.tileMgr.tileLayers;if(this.mapType===j9){this._clearSatelliteOverlayState()}if(this._mapTypeChangAni){this._mapTypeChangAni.stop()}var oL;if(this._earth){oL=this._earth.getEarthCanvas()}if(!this._earth){this.maskLayer.style.opacity=1;this.maskLayer.style.zIndex=999;this.maskLayer.style.background="#000"}this._mapTypeChangAni=new ij({duration:400,render:function(e){if(!T._earth){return}oL.style.opacity=e},finish:function(){for(var e=oM.length-1,oN=e;oN>=0;oN--){var oP=oM[oN].tilesDiv;if(oP){oP.style.visibility="hidden"}if(oM[oN]._isInnerLayer&&T._renderType!=="webgl"){T._removeTileLayer(oM[oN])}}T._mapTypeChangAni=null;T._mapTypeChanging=false;function oO(){var oT=T.getZoom()-2;var oU=T.getCenterIn();var oR=m8.convertMC2LL(oU);T._earth=new cv.Earth(T,{center:oR,zoom:oT,showRealSunlight:T.config.showRealSunlight,showMilkyway:T.config.showMilkyway,earthBackground:T.config.earthBackground});if(T.config&&T.config.earthMaxZoom&&T._earth){T._earth.setMaxZoom(T.config.earthMaxZoom)}if(T.config&&T.config.earthMinZoom&&T._earth){T._earth.setMinZoom(T.config.earthMinZoom)}T._proxyEarthEvents();var oQ=T.mapType;T.mapType=C;var oS=new ix("onmaptypechange");oS.zoomLevel=this.zoomLevel;oS.mapType=C;oS.exMapType=oQ;T.dispatchEvent(oS);T._setMapTypeStatus(C);hv.extend(T,cv.EarthView.prototype);if(!T._navigationCtrl&&T.config.showControls){T._navigationCtrl=new hy(T)}}if(!T._earth){if(cv["FeatureStyle"+T.config.style]){oO()}else{T.loadMapStyleFiles(function(){oO()})}}if(parseInt(T.maskLayer.style.opacity,10)===1){setTimeout(function(){T.maskLayer.style.zIndex=9;T.maskLayer.style.opacity=0},1000)}}});if(!this._earth){return}var i=this.mapType;this.mapType=C;var oK=new ix("onmaptypechange");oK.zoomLevel=this.zoomLevel;oK.mapType=C;oK.exMapType=i;this.dispatchEvent(oK);T._setMapTypeStatus(C);hv.extend(T,cv.EarthView.prototype)},getMapStyleId:function(){if(typeof this.config.style==="string"){return this.config.style}return this.config.mapStyleId||"custom"},getAreaStyleId:function(){return this.config.areaStyleId||"areaStyle"},_printLog:function(e){var i;switch(e){case"mapvgl":i=249;break;case"mapvthree":i=248;break;case"bmapdraw":i=247;break;default:break}if(i){kU.sendMessage("Map","library",e)}},_setMapTypeStatus:function(C){var oN=arguments[1];if(C===c1){var oL=this._earth.getEarthCanvas();if(oL){oL.style.display=""}var oO={noAnimation:true};if(this.earthMinZoom){this._earth.setMinZoom(this.earthMinZoom);this.earthMinZoom=undefined}if(this.earthMaxZoom){this._earth.setMaxZoom(this.earthMaxZoom);this.earthMaxZoom=undefined}this._earth.setCenter(m8.convertMC2LL(this.centerPoint),oO);this._earth.setImageZoom(this.zoomLevel,oO);this._earth.setTilt(this.getTilt(),oO);this._earth.setHeading(this.getHeading(),oO);if(this.config.showStreetLayer){this._earth.showStreetLayer()}else{this._earth.hideStreetLayer()}}else{if(this.preMapType===c1&&this._earth){var oM=this._earth;var T=oM.getMapZoom();var oK=oM._imageRawZoom||T;var i=oK-T;var e=oM.getCenter();if(this._renderType==="webgl"){this._tilt=oM.getTilt();if(this.zoomLevel>7){this._heading=oM.getHeading();oN&&oN(e,T);return}if(oM.getHeading()!==0){oM.setTilt(this.getTilt());oM.setHeading(this.getHeading(),{callback:function(){oN&&oN(e,T)}})}else{oN&&oN(e,T)}return}if(i<0.1&&oM.getTilt()===0&&oM.getHeading()===0){oN&&oN(e,T);return}oM.setTilt(0);oM.setHeading(0);oM.setZoom(oM.getZoom()-i,{callback:function(){oN&&oN(e,T)}})}}},_proxyEarthEvents:function(){var oK=this;var oL=this._earth;oL.on("tilesload",function(i){oK.fire(i)});oL.on("centerandzoom",function(i){oK.dispatchEvent(new ix("onmoveend"));oK.dispatchEvent(new ix("onzoomend"))});function T(i){oK.fire(i)}var e=["zoomstart","zoomend","tilesload","sunlighttime_change","sunlighttime_clear","centerandzoom","animation_start","animation_stop","movestart","moveend","moving","dragstart","dragend","dragging"];for(var C=0;C<e.length;C++){oL.on(e[C],T)}},forceEnableEarth:function(){this.config.forceEnableEarth=true;this.config.enableEarth=eV.ifEnableEarth(true);this.dispatchEvent(new ix("forceenableearth"));return this.config.enableEarth},setLock:function(e){if(this.mapType===c1){this._earth.setLock(e)}this._lock=e},getLock:function(){if(this.mapType===c1){return this._earth.getLock()}return this._lock},getEarth:function(){return this._earth},isSupportEarth:function(){return this.config.enableEarth},isCanvasMap:function(){return !!(this._renderType==="canvas"&&this.getMapTypeId()!=="B_EARTH_MAP")},getCanvasMapCoordByUid:function(oK){if(this._renderType==="webgl"){var oL=this.tileMgr.tileLayers;for(var T=0;T<oL.length;T++){if(oL[T].labelProcessor){return oL[T].labelProcessor.getLabelByUid(oK,"")}}return null}var e=this.canvas2dMapMgr._labelClick;var C=e.findLabelByUid(oK);return C?new d9(C.iconPos.geoX,C.iconPos.geoY):null},loadBizData:function(i){var e=new ix("onloadbizdata");e.data=i;this.dispatchEvent(e)},unloadBizData:function(){var e=new ix("onunloadbizdata");this.dispatchEvent(e)},zoomIn:function(e){var i={zoomCenter:e};this.setZoomIn(this.zoomLevel+1,i)},zoomOut:function(e){var i={zoomCenter:e};this.setZoomIn(this.zoomLevel-1,i)},setMaxZoom:function(e){e=Number(e);if(this._renderType==="webgl"){this.config.maxZoom=e<=25?e:25}else{this.config.maxZoom=e<=19?e:19}},setEarthMaxZoom:function(i){var e=i<=this.getMaxZoom()-2?i:this.getMaxZoom()-2;if(this.mapType===c1){this._earth.setMaxZoom(e);this.earthMaxZoom=undefined;return}this.earthMaxZoom=e},setMinZoom:function(e){e=Number(e);this.config.minZoom=e>=3?e:3},setEarthMinZoom:function(e){var i=e-2>=1?e-2:1;if(this.mapType==="B_EARTH_MAP"){this._earth.setMinZoom(i);this.earthMinZoom=undefined;return}this.earthMinZoom=i},setCenterIn:function(e,i){i=i?i:{};i.tilt=i.tilt?i.tilt:this.getTilt();i.heading=i.heading?i.heading:this.getHeading();this.panToIn(e,i)},getRenderType:function(){return this._renderType},getSolarInfo:function(T){T=T||this._initDate;var C=id(T);var e=m8.convertLL2MC(new d9(C[0],C[1]));var oR=e.latLng;var oM=m8.convertMC2LL(this.centerPoint);var oO=T.getUTCHours();var oQ=oO+24*oM.lng/360;var oP=oQ-12;var oN=oP*60*0.25;var oL=Math.asin(Math.sin(mn(oM.lat))*Math.sin(mn(oR.lat))+Math.cos(mn(oM.lat))*Math.cos(mn(oR.lat))*Math.cos(mn(oN)));var oK=Math.asin(Math.sin(mn(oN))*Math.cos(mn(oR.lat))/Math.cos(oL));var i="north";if(oM.lat<oR.lat){i="south"}return{zenith:e,solarAltitude:oL,solarAzimuth:oK,centerPosition:i,position:e}},setDisplayOptions:function(C){if(!C){return}for(var e in this._displayOptions){if(this._displayOptions.hasOwnProperty(e)){if(typeof C[e]==="boolean"||(e==="skyColors"&&typeof C.skyColors==="object")||(e==="labelMargin"&&typeof C.labelMargin==="number")){this._displayOptions[e]=C[e]}}}if(!K.apiVersionIsGL()&&typeof C.indoor==="boolean"){this.config.indoorControl=C.indoor;if(this._indoorMgr){this._indoorMgr._toggleControl(C.indoor)}}var i=this.getMapTypeId();if(i===h5.NORMAL){this.fire(new ix("ondisplayoptions_changed"))}else{if(i===h5.EARTH&&this._earth){this._earth.fire(new ix("ondisplayoptions_changed"))}}},getHorizonPosY:function(e){if(!e||!this._webglMapCamera){return null}var i=this._webglMapCamera.fromMCToScreenPixel(e.lng,e.lat,{heading:0});return i.y},getIndoorInfo:function(){if(!this._indoorMgr){return}return this._indoorMgr.getData()},showIndoor:function(e,C){if(this.map&&this.map.parking){this.map.parking.currentUid=e;this.map.parking.currentFloor=C}var i=new ix("onindoor_status_changed");i.uid=e;i.floor=C;this.fire(i)},addAreaSpot:function(e,C){if(!e||e.length===0){return}C=C||{};this.areaSpots=this.areaSpots||{};var i=C.id||("sp"+(this.temp.spotsGuid++));this.areaSpots[i]={spot:e,userData:C.userData};var T=this;ki.load("hotspot",function(){T._asyncRegister()});return i},getAreaSpot:function(e){if(this.areaSpots&&this.areaSpots[e]){return this.areaSpots[e]}return null},removeAreaSpot:function(e){if(!e||!this.areaSpots[e]){return}delete this.areaSpots[e]},clearAreaSpots:function(){this.areaSpots={}},resetSpotStatus:function(){this.fire(new ix("onspot_status_reset"))},hightlightSpotByUid:function(e,C){var i=new ix("onspot_highlight");i.uid=e;i.tilePosStr=C;this.fire(i)},setZoomIn:function(i,e){e=e||{};this.zoomTo(i,e.zoomCenter||null,e)},restrictBounds:function(e){if(e instanceof lz){this.config.restrictBounds=e;var i=this.getMinZoom();if(this.zoomLevel<i){this.zoomLevel=i}this.restrictCenter(this.getCenterIn());this.fire(new ix("oncenter_changed"))}},getCurrentMaxTilt:function(){var e=this.zoomLevel;if(this.mapType==="B_EARTH_MAP"){return li.MAX_DRAG_TILT_L2}if(this.config.restrictCenter===false){return li.MAX_DRAG_TILT}if(this._projectionMatrix3D==="ortho"){return li.MAX_DRAG_TILT}if(e>=19){return li.MAX_DRAG_TILT}else{if(e<=18){if(e<this._enableTiltZoom){if(e>=this._enableTiltZoom-2){return(1-(this._enableTiltZoom-e)/2)*li.MAX_DRAG_TILT_L2}return 0}return li.MAX_DRAG_TILT_L2}else{return(li.MAX_DRAG_TILT-li.MAX_DRAG_TILT_L2)*(e-18)+li.MAX_DRAG_TILT_L2}}},worldSize:function(i){var e=i||this.zoomLevel;return li.WORLD_SIZE_MC/this.getZoomUnits(e)},setTrafficOn:function(T,e){if(!K.apiVersionIsGL()){console.warn("[BMap] setTrafficOn is deprecated, use BMap.TrafficLayer instead")}var i=this;if(T&&Number(T)>1){nX.setZIndex(Number(T))}e=e||{};if(e.reload){var C=e.reloadTime||5*60*1000;nX.reloadTimer=setInterval(function(){nX.clearCache();var oK=new ix("onupdate");i.fire(oK)},C)}kU.sendMessage("Map","traffic");this._addTileLayer(nX)},setTrafficOff:function(){if(nX.reloadTimer){clearInterval(nX.reloadTimer)}this._removeTileLayer(nX)},showOverlayContainer:function(){this.setDisplayOptions({overlay:true})},hideOverlayContainer:function(){this.setDisplayOptions({overlay:false})},addLabelsToMapTile:function(oM,oL){kU.sendMessage("Map","bindtype","custom_label");for(var T=0;T<oM.length;T++){if(typeof oM[T].type==="undefined"){oM[T].type="fixed"}if(typeof oM[T].rank!=="number"){oM[T].rank=50000}oM[T].pt=oM[T].position;oM[T].custom=true;oM[T].processedInZoom=0;var C=false;for(var e=0;e<this._customTileLabels.length;e++){if(this._customTileLabels[e].uid===oM[T].uid){C=true;break}}if(!C){this._customTileLabels.push(oM[T])}}var oK=new ix("onadd_tile_labels");if(oL&&oL instanceof gg){oK.data=oM;oK.index=oL.layer.drawIndex;oK.model="mvt"}this.dispatchEvent(oK)},addMapLabels:function(oK,oM){if(!oK){return[]}if(!(oK instanceof Array)){oK=[oK]}var oO=[];var oL=[];for(var T=0;T<oK.length;T++){var e=oK[T];if(!e||!e.position){continue}var oN=m8.convertLL2MC(e.position);var C=e.style||{};var oP={position:oN,name:typeof e.text==="string"?e.text:"",displayRange:e.displayRange||[3,21],textMargin:typeof e.textMargin==="number"?e.textMargin:5,style:{fontSize:typeof C.fontSize==="number"?C.fontSize:14,color:C.color||"#333",haloSize:typeof C.haloSize==="number"?C.haloSize:1,strokeColor:C.strokeColor||"#fff",icon:C.icon,iconSize:C.iconSize},uid:e.uid||("mapLabel_"+Date.now()+"_"+Math.random().toString(36).slice(2,10)+"_"+T),direction:typeof e.direction==="number"?e.direction:4,rank:typeof e.rank==="number"?e.rank:50000,type:e.type||"fixed"};oO.push(oP);oL.push(oP.uid)}if(oO.length>0){this.addLabelsToMapTile(oO,oM)}return oL},removeLabelsFromMapTile:function(oK,T,C){var oM=new ix("onremove_tile_labels");if(T&&C){oM.data=oK;oM.index=T;oM.model=C}else{for(var oL=0;oL<oK.length;oL++){for(var e=0;e<this._customTileLabels.length;e++){if(this._customTileLabels[e].uid===oK[oL]){this._customTileLabels.splice(e,1);break}}}}this.dispatchEvent(oM)},removeMapLabels:function(C,i,e){if(!C){return}if(typeof C==="string"){C=[C]}if(!(C instanceof Array)||C.length===0){return}this.removeLabelsFromMapTile(C,i,e)},clearLabels:function(C,i){var e=new ix("onclear_labels");if(C&&i){e.data=[];e.index=C;e.model=i}else{this._customTileLabels.length=0}this.dispatchEvent(e)},loadMapStyleFiles:function(oL,e){this.customLoaded=false;var C=this.config.style;var oK=this.config.styleUrl;var T=this;this._setTextRenderType();if(typeof C==="string"&&!oK){if(this.cpyCtrl){this.cpyCtrl.show();if(this.logoCtrl){this.logoCtrl.setOffset(this.logoCtrl.defaultOffset)}}if(cv["FeatureStyle"+C]){this.customLoaded=true;T.fire(new ix("onstyle_loaded"));oL();return}cv["FeatureStyle"+C]=window.FeatureStyle;cv["iconSetInfo"+C]=window.iconSetInfo_high;cv.indoorStyleDefault=window.indoorStyle;jW.load(K.getMapStyleFiles(C),function(){if(T._destroyed||!T.config){return}if(T.config.style===C){cv["FeatureStyle"+C]=window.FeatureStyle;cv["iconSetInfo"+C]=window.iconSetInfo_high;cv.indoorStyleDefault=window.indoorStyle;T.customLoaded=true;T.fire(new ix("onstyle_loaded"));oL()}})}else{kU.sendMessage("Map","bindtype","custom_style");var i=C;F.init(T);F.getStyleJson(i,function(oP){if(T._destroyed||!T.config){return}var oS=window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]?"":hj;var oM=cv.getGUID("custom");var oQ=T.config.mapStyleId||0;delete cv["customStyleInfo_"+oQ];delete cv["FeatureStyle"+oQ];delete cv["indoorStyle"+oQ];T.config.mapStyleId=oM;cv["customStyleInfo_"+oM]={zoomRegion:{},zoomStyleBody:[],zoomFrontStyle:{}};cv["indoorStyleInfo_"+oM]={zoomRegion:{},zoomStyleBody:[],zoomFrontStyle:{}};var oO=F.getStyleUrl(oP,oS,e,oM);if(!cv.iconSetInfoCustom){F.getDefaultStyle(function(){cv.iconSetInfoCustom=window.iconSetInfo_high;oN()})}else{oN()}function oR(oV,oW,oU){if(cv[oV]){var oT=(function(){var oX=oV;return function(oY){if(!cv[oX]){return}F.onStyleDataBack(oY,oX,cv[oX],oU)}})();cv[oV].xhr=F.getMapStyleFiles(oW,oT,function(){T.fire(new ix("onstyle_loaded_error"))},function(){T.fire(new ix("onstyle_loaded_timeout"))})}}function oN(){oR(oO.custom.id,oO.custom.url,function(){if((oO.hasInfoor||oP.length===0)&&T.config.showCustomIndoor&&F.version==="v3"){oR(oO.indoor.id,oO.indoor.url,function(){T.customLoaded=true;T.fire(new ix("onstyle_loaded"));oL()})}else{T.customLoaded=true;T.fire(new ix("onstyle_loaded"));oL()}})}})}},getFeatureStyleTags:function(){var e=[];var oK=Object.keys(cv);for(var T=0;T<oK.length;T++){var C=oK[T];if(C.indexOf("FeatureStyle")>-1&&cv[C]){e.push(C)}}return e},setCopyrightOffset:function(T,i){var C=new ix("oncopyrightoffsetchange",{logo:T,cpy:i});this.dispatchEvent(C)},_setTextRenderType:function(e){if(e){this.config.textRenderType=e;return}if(this.config.textRenderType!==null){return}if(c9()){this.config.textRenderType="canvas"}else{if(typeof this.config.style==="string"){this.config.textRenderType="image"}else{this.config.textRenderType="canvas"}}},destroy:function(){this._destroyed=true;this.disableAutoResize();this.off("size_changed");this.off("zoom_changed");this.fire(new ix("ondestroy"));var e=this.config.mapStyleId||0;delete cv["customStyleInfo_"+e];delete cv["FeatureStyle"+e];if(nX.reloadTimer){clearInterval(nX.reloadTimer)}cv.BMAP_INSTANCES&&(cv.BMAP_INSTANCES-=1);if(!cv.BMAP_INSTANCES){this.destroyStyle();window.FeatureStyle=null;window.iconSetInfo_high=null;window.indoorStyle=null}this.config={};this.clearSpots();this._webGLStateId&&fV.WebGLState.remove(this._webGLStateId);this.container.onselectstart=null;this.container.style.backgroundImage="";this.container.innerHTML="";this.maskLayer=null;this.platform=null;kU.kill();d5.kill();mL.kill();if(this._listeners){for(var i in this._listeners){if(this._listeners.hasOwnProperty(i)){this.off(i)}}}var C=this;setTimeout(function(){C._listeners=null;C._bounds=null;C.tileLabels=[];C._overlayMgrGL=null;C._overlayMgr=null;C._mapIcon=null;if(C._mouse){C._mouse._drag=null;C._mouse=null}C.deepZoom=null;C.tileMgr=null;C.indexToRgb=null;C.toFormatCoords=null;C._webglMapCamera=null;C._normalLayerMgr=null;C._webglPainter=null;C._webglMapScene=null;C._indoorMgr=null;if(C._renderType==="webgl"){if(C._spotsMgr&&C._spotsMgr.destroy){C._spotsMgr.destroy()}C._spotsMgr=null;C._workerMgr=null;C.jobScheduler=null;C.benchmark=null;C._featureMgr=null;C._labelProcessor=null;C._customLabelMgr=null}if(C.cpyCtrl){C.cpyCtrl._map=null;C.cpyCtrl=null}C.logoCtrl=null;C._spotDataOnCanvas=null;C._navigationCtrl=null;if(C.hashCode){C.dispose();C._destroyed=true}},100)},destroyStyle:function(){var e=[];var oK=Object.keys(cv);for(var T=0;T<oK.length;T++){var C=oK[T];if(C.indexOf("FeatureStyle")>-1||C.indexOf("iconSetInfo")>-1||C.indexOf("indoorStyle")>-1){e.push(C)}}for(var T=0;T<e.length;T++){delete cv[e[T]]}},centerAndZoom:function(e,oN,C){C=C||{};if(this._isDefaultView){this._isDefaultView=false;if(C.noAnimation===undefined){C.noAnimation=true}}if(!K.apiVersionIsGL()){if(C.noAnimation===undefined&&C.enableAnimation!==undefined){C.noAnimation=!C.enableAnimation}if(C.noAnimation===undefined){C.noAnimation=true}}if(Object.prototype.toString.call(oN)!=="[object Undefined]"){oN=parseFloat(oN)}if(typeof e==="string"){var oK=this;var oM=new b5();var T=new d9(120.139406,30.259097);oM.getPoint(e,function(oO){if(oO&&oO.lng&&oO.lat){e=oO;var oP=m8.convertLL2MC(e);oK.centerAndZoomIn(oP,oN,C)}else{var oP=m8.convertLL2MC(T);oK.centerAndZoomIn(oP,oN,C);console.error("鎮ㄥソ锛屽煄甯傚悕鍒濆鍖栧湴鍥句娇鐢ㄥ湴鍧�瑙f瀽鏈嶅姟锛岃妫�鏌ヨ鏈嶅姟鏄惁宸茶秴閰嶉銆�")}},e)}else{var oL=iM(e,cv.coordType);var i=m8.convertLL2MC(oL);this.centerAndZoomIn(i,oN,C)}},pointToPixel:function(e,C){var i=m8.convertLL2MC(e);var T={};hv.extend(T,C);if(T&&T.center){T.center=m8.convertLL2MC(T.center)}return this.pointToPixelIn(i,T)},pixelToPoint:function(C,i){var T={};hv.extend(T,i);if(T&&T.center){T.center=m8.convertLL2MC(T.center)}var e=this.pixelToPointIn(C,T);return m8.convertMC2LL(e)},pointToOverlayPixel:function(e,C){var e=iM(e,cv.coordType);var i=m8.convertLL2MC(e);var T={};hv.extend(T,C);if(T&&T.center){T.center=m8.convertLL2MC(T.center)}return this.pointToOverlayPixelIn(i,T)},overlayPixelToPoint:function(C,i){var T={};hv.extend(T,i);if(T&&T.center){T.center=m8.convertLL2MC(T.center)}var e=this.overlayPixelToPointIn(C,T);return m8.convertMC2LL(e)},setViewport:function(C,oK){oK=oK||{};if(!K.apiVersionIsGL()){if(oK.enableAnimation===undefined&&oK.noAnimation!==undefined){oK.enableAnimation=!oK.noAnimation}if(oK.enableAnimation===undefined){oK.enableAnimation=true}}var e;if(C&&C.center){e={};hv.extend(e,C);e.center=m8.convertLL2MC(e.center)}else{if(!K.apiVersionIsGL()&&C.length>0&&C[0] instanceof g2&&typeof C[0].getBounds==="function"){var oO=new lz();for(var T=0;T<C.length;T++){if(C[T] instanceof g2&&typeof C[T].getBounds==="function"){var oM=C[T].getBounds();if(oM&&!oM.isEmpty()){oO.extend(oM.getSouthWest());oO.extend(oM.getNorthEast())}}else{if(C[T]&&C[T].lng!==undefined&&C[T].lat!==undefined){oO.extend(C[T])}}}if(oO.isEmpty()){return}e=[m8.convertLL2MC(oO.getSouthWest()),m8.convertLL2MC(oO.getNorthEast())];this.setViewportIn(e,oK);return}e=[];for(var oL=0;oL<C.length;oL++){var oN=iM(C[oL],cv.coordType);e[oL]=m8.convertLL2MC(oN)}}this.setViewportIn(e,oK)},getViewport:function(oL,T){var C;if(oL&&oL.length){C=[];for(var oK=0;oK<oL.length;oK++){C[oK]=m8.convertLL2MC(oL[oK])}}else{if(oL instanceof lz){C=new lz(m8.convertLL2MC(oL.getSouthWest()),m8.convertLL2MC(oL.getNorthEast()));C.setMinMax()}}var e=this.getViewportIn(C,T);e.center=m8.convertMC2LL(e.center);return e},getDistance:function(oK,C){var i=m8.convertLL2MC(oK);var T=m8.convertLL2MC(C);var e=this.getDistanceIn(i,T);return e},setCenter:function(e,C){C=C||{};if(!K.apiVersionIsGL()){if(C.noAnimation===undefined&&C.enableAnimation!==undefined){C.noAnimation=!C.enableAnimation}}if(typeof e==="string"){var T=this;var oL=new b5();oL.getPoint(e,function(oM){if(oM){e=iM(oM,cv.coordType)}else{e=T.defaultPoint;console.error("鎮ㄥソ锛屽煄甯傚悕鍒濆鍖栧湴鍥句娇鐢ㄥ湴鍧�瑙f瀽鏈嶅姟锛岃妫�鏌ヨ鏈嶅姟鏄惁宸茶秴閰嶉銆�")}var oN=m8.convertLL2MC(e);T.setCenterIn(oN,C)},e)}else{var oK=iM(e,cv.coordType);var i=m8.convertLL2MC(oK);this.setCenterIn(i,C)}},setZoom:function(C,e){e=e||{};if(!K.apiVersionIsGL()){if(e.noAnimation===undefined&&e.enableAnimation!==undefined){e.noAnimation=!e.enableAnimation}}var i={};hv.extend(i,e);if(i&&i.zoomCenter){i.zoomCenter=m8.convertLL2MC(i.zoomCenter)}this.setZoomIn(C,i)},flyTo:function(e,oL,C){C=C||{};if(C.noAnimation===true){var T=hv.extend({},C);T.noAnimation=true;return this.centerAndZoom(e,oL,T)}var oK=iM(e,cv.coordType);var i=m8.convertLL2MC(oK);this.flyToIn(i,oL,C)},panTo:function(e,C){C=C||{};if(!K.apiVersionIsGL()){if(C.noAnimation===undefined&&C.enableAnimation!==undefined){C.noAnimation=!C.enableAnimation}}var i=m8.convertLL2MC(iM(e,cv.coordType));this.panToIn(i,C)},getCenter:function(){var e=this.getCenterIn();var i=m8.convertMC2LL(e);return m0(i,cv.coordType)},getBounds:function(){var e=this.getBoundsIn();var i=new lz(m8.convertMC2LL(e.getSouthWest()),m8.convertMC2LL(e.getNorthEast()));return i},setMapStyleV2:function(e){if(typeof e==="string"){this._setTextRenderType("image")}else{this._setTextRenderType("canvas")}this.setOptions({style:e})},setMapStyle:function(e){if(e&&e.merge===true){this.setMapStyleV2(Object.assign({},e,{version:"v3"}));return}this.setMapStyleV2(e)},setTheme:function(oK,i){if(K.uiVersionIsGL()){return}if(oK!=="light"&&oK!=="dark"&&!eH.hasOwnProperty(oK)){oK="light"}this._uiTheme=oK;var T=eH[oK]||{};var e={};var C;for(C in T){if(T.hasOwnProperty(C)){e[C]=T[C]}}if(i&&typeof i==="object"){for(C in i){if(i.hasOwnProperty(C)){e[C]=i[C]}}}cO(e)},getTheme:function(){return this._uiTheme||"light"},registerTheme:function(e,i){if(typeof e==="string"&&i&&typeof i==="object"){eH[e]=i}},startViewAnimation:function(C){var e=C._options.delay;var i=this;setTimeout(function(){C._start(i)},e)},pauseViewAnimation:function(e){e._pause(this)},continueViewAnimation:function(e){e._continue(this)},cancelViewAnimation:function(e){e._cancel(this)},getMapScreenshot:function(){if(!K.apiVersionIsGL()){console.warn("[BMap] getMapScreenshot is deprecated, use getScreenshot instead")}return this._webglMapScene._painter._canvas.toDataURL()},getScreenshot:function(){return this._webglMapScene._painter._canvas.toDataURL()},setCustomArea:function(C){this.fire(new ix("onstyle_willchange"));this.areaCustomLoaded=false;var T=C.style;var oK=this;F.getStyleJson(T,function(oN){var oP=window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]?"":hj;var oL=cv.getGUID("customArea");oK.config.areaStyleId=oL;var oO;window["styleCbk_"+oL]=function(oQ){if(!cv["customStyleInfo_"+oL]){return}F.parseStyleData(oQ,oL,cv["customStyleInfo_"+oL],function(){oK.areaCustomLoaded=true;oK.fire(new ix("onstyle_loaded"));var oR=new ix("onlayer_update");oR.name="na";oK.fire(oR)})};cv["customStyleInfo_"+oL]={zoomRegion:{},zoomStyleBody:[],zoomFrontStyle:{}};cv["indoorStyleInfo_"+oL]={zoomRegion:{},zoomStyleBody:[],zoomFrontStyle:{}};var oM=F.getStyleUrl(oN,oP,"",oL);if(!cv.iconSetInfoCustom){F.getDefaultStyle(function(){cv.iconSetInfoCustom=window.iconSetInfo_high;cv["customStyleInfo_"+oL].xhr=F.getMapStyleFiles(oM.custom.url,window["styleCbk_"+oL])})}else{cv["customStyleInfo_"+oL].xhr=F.getMapStyleFiles(oM.custom.url,window["styleCbk_"+oL])}});var e={};if(C.area){if(Array.isArray(C.area)&&Array.isArray(C.area[0])){e.areas=C.area.map(function(oL){return oL.map(function(oM){return m8.convertLL2MC(oM)})})}else{var i=Array.isArray(C.area[0])?C.area:[C.area];e.areas=i.map(function(oL){return oL.map(function(oM){return m8.convertLL2MC(oM)})})}}e.customArea=true;this._workerMgr.setWorkerConfig(e)},setProjectionMatrix3D:function(e){this._projectionMatrix3D=e;this._webglMapCamera._updateProjectionMatrix();this._drawFrame()},getPoiByUid:function(e,C){var i=this;if(!e){if(typeof C==="function"){C(null)}return}ki.load("hotspot",function(){if(!i._spotsMgr){i._asyncRegister()}if(i._spotsMgr&&typeof i._spotsMgr.getPoiByUid==="function"){i._spotsMgr.getPoiByUid(e,C)}else{if(typeof C==="function"){C(null)}}},true)},enableIconClick:function(){var e=this.config.enableIconClick;this.config.enableIconClick=true;if(!e&&this._mapIcon&&typeof this._mapIcon.enable==="function"){this._mapIcon.enable()}},disableIconClick:function(){this.config.enableIconClick=false;if(this._mapIcon&&typeof this._mapIcon.disable==="function"){this._mapIcon.disable()}if(this.config.enableIconInfoWindow){this.disableIconInfoWindow()}},enableIconInfoWindow:function(){if(!this.config.enableIconClick){this.enableIconClick()}this.config.enableIconInfoWindow=true;var e=this;if(!e._iconInfoWindowHandler){e._iconInfoWindowHandler=function(oL){if(!e.config.enableIconInfoWindow){return}var T=oL.spots;if(!T||!T.length){e._closeIconInfoWindow();return}var oK=T[0];var C=oK.userdata&&oK.userdata.uid;if(!C){return}var i=m8.convertMC2LL(oK.pt);e._openIconInfoWindow(C,i)}}this.addEventListener("spotclick",e._iconInfoWindowHandler)},disableIconInfoWindow:function(){this.config.enableIconInfoWindow=false;if(this._iconInfoWindowHandler){this.removeEventListener("spotclick",this._iconInfoWindowHandler)}this._closeIconInfoWindow()},_openIconInfoWindow:function(C,e){this._closeIconInfoWindow();var T=this;var i=document.createElement("div");function oK(){var oL=new bH(i,{compact:true});oL.addEventListener("open",function(){var oM=new cS(function(){hv.ac(i,"BMap_PDPannel_container4map");return i},{point:e,offsetY:-68});T.addOverlay(oM);oM.draw();T.temp._iconInfoWindowOverlay=oM;setTimeout(function(){oL.panIntoView(T,oM)},200)});T.temp._iconInfoWindowPanel=oL;oL.render(C)}ki.load("place",oK,true)},_closeIconInfoWindow:function(){if(!this.temp){return}if(this.temp._iconInfoWindowOverlay){this.removeOverlay(this.temp._iconInfoWindowOverlay);this.temp._iconInfoWindowOverlay=null}if(this.temp._iconInfoWindowPanel){this.temp._iconInfoWindowPanel.dispose();this.temp._iconInfoWindowPanel=null}},enableMapClick:function(){if(!K.apiVersionIsGL()){this.enableIconClick()}},disableMapClick:function(){if(!K.apiVersionIsGL()){this.disableIconClick()}}});window.BMAP_NORMAL_MAP="B_NORMAL_MAP";window.BMAPGL_NORMAL_MAP="B_NORMAL_MAP";window.BMAP_SATELLITE_MAP="B_SATELLITE_MAP";window.BMAP_HYBRID_MAP="B_STREET_MAP";window.BMAP_EARTH_MAP="B_EARTH_MAP";window.BMAP_NONE_MAP="B_NONE_MAP";window.BMAP_COORD_MERCATOR="BMAP_COORD_MERCATOR";window.BMAP_COORD_GCJ02="BMAP_COORD_GCJ02";window.BMAP_COORD_BD09="BMAP_COORD_BD09";window.BMAP_COORD_GCJ02MERCATOR="BMAP_COORD_GCJ02MERCATOR";window.BMAP_COORD_WGS84="BMAP_COORD_WGS84";window.BMAP_COORD_EPSG3857="BMAP_COORD_EPSG3857";window.BMAP_SYS_DRAWER=0;window.BMAP_SVG_DRAWER=1;window.BMAP_VML_DRAWER=2;window.BMAP_CANVAS_DRAWER=3;var jC="妫�娴嬪埌褰撳墠浜у搧浣跨敤鐨勫湴鍥炬湇鍔℃湭瀹屾垚鎶�鏈湇鍔℃巿鏉冿紝鍙兘鍑虹幇涓嶇ǔ瀹�/鍙楅檺锛涖�愪骇鍝佺敤鎴枫�戣鑱旂郴浜у搧瀹樻柟瀹㈡湇锛涖�愪骇鍝佸紑鍙戣�呫�戣浜�3涓伐浣滄棩鍐呭畬鎴愭巿鏉冩垨鑱旂郴锛歨ttps://lbsyun.baidu.com/surl/f5d6f5 鎴栬仈绯荤數璇濓細400-099-8998锛堝紑鍙戣�呬笓鐢級銆�";var c0={};if(window.B_BUSINESS_INFO&&window.B_BUSINESS_INFO["sign_content"]){try{c0=JSON.parse(window.B_BUSINESS_INFO["sign_content"])}catch(nS){c0=window.B_BUSINESS_INFO}}var bj=false;var F={environment:"jsapi",map:null,ontilesloaded:false,onstyle_loaded:false,_dataList:[],msgpack:null,_default:false,version:"v2",init:function(i){this.resetEventListener(i);this.version=i.config.style.version||"v2";if(this.map){if(eY(this.map,i)){return}}var e=this;e.map=i;this.changeCopyright();this.setEnvironment(e.map.config.style)},resetEventListener:function(i){var e=this;this.ontilesloaded=false;this.onstyle_loaded=false;i.addEventListener("ontilesloaded",e.checkLoadedStatus);i.addEventListener("onstyle_loaded",e.checkLoadedStatus)},checkLoadedStatus:function(i){F[i.type]=true;if(F.ontilesloaded&&F.onstyle_loaded){this.dispatchEvent(new ix("onstylechangetilesloaded"));this.removeEventListener("ontilesloaded",F.checkLoadedStatus);this.removeEventListener("onstyle_loaded",F.checkLoadedStatus)}},changeCopyright:function(){var e=this;if(e.map.cpyCtrl){e.map.cpyCtrl.hide();if(e.environment!=="customEditor"){e.map.setCopyrightOffset(new mU(1,1))}}else{e.map.addEventListener("oncopyrightaddend",function(){e.map.cpyCtrl.hide();if(e.environment!=="customEditor"){e.map.setCopyrightOffset(new mU(1,1))}})}},setEnvironment:function(e){if(e.customEditor){this.environment="customEditor";bI.map=this.map}else{if(e.sharing){this.environment="sharing"}else{if(e.preview){this.environment="preview"}else{this.environment="jsapi"}}}},getStyleJson:function(T,oL){var oK=this;if(T.styleJson){oL&&oL(T.styleJson)}else{if(T.styleId){var i=T.styleId;var e=(Math.random()*100000).toFixed(0);cv["_cbk_si_phpui"+e]=function(oN){var oM=[];if(oN.result&&oN.result["error"]===0&&oN.content&&oN.content["status"]===0){oM=oK.parseJson(oN.content["data"]["json"]);oL&&oL(oM)}else{oL&&oL("default")}};cv["_cbk_si_api"+e]=function(oN){var oM=[];if(oN.status===0){if(oN.info){oM=oK.parseJson(oN.info["json"])}else{oM=oK.parseJson(oN.data["json"])}oL&&oL(oM)}else{oL&&oL("default")}};var C="";switch(this.environment){case"jsapi":if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){C=window._BMapSecurityConfig["serviceHost"]+"?qt=custom_map&v=3.0&style_id="+i+"&type=publish"}else{C=K.apiHost+"/?qt=custom_map&v=3.0&style_id="+i+"&type=publish&ak="+hj}C+="&callback="+h6+"._cbk_si_phpui"+e;break;case"sharing":C+="/apiconsole/custommap/getSharingJson";C+="?styleid="+i+"&type=edit";C+="&ck="+h6+"._cbk_si_api"+e;break;case"preview":C+="/apiconsole/custommap/getJson";C+="?styleid="+i+"&type=edit";C+="&ck="+h6+"._cbk_si_api"+e;break}jW.load(C)}else{oL&&oL("default")}}},parseJson:function(C){if(C===null||C===""){return[]}var i={t:"featureType",e:"elementType",v:"visibility",c:"color",o:"opacity",l:"lightness",s:"saturation",w:"weight",z:"level",h:"hue",f:"fontsize",zri:"curZoomRegionId",zr:"curZoomRegion",i:"image",st:"styleType"};var oK={all:"all",g:"geometry","g.f":"geometry.fill","g.s":"geometry.stroke",l:"labels","l.t.f":"labels.text.fill","l.t.s":"labels.text.stroke","l.t":"labels.text","l.i":"labels.icon","g.tf":"geometry.topfill","g.sf":"geometry.sidefill",t:"texture"};var T=C.split(",");var e=T.map(function(oO){var oN=oO.split("|").map(function(oU){var oS=i[oU.split(":")[0]];var oR=oK[oU.split(":")[1]]?oK[oU.split(":")[1]]:oU.slice(oU.indexOf(":")+1,oU.length);switch(oR){case"poi":oR="poilabel";break;case"districtlabel":oR="districtlabel";break}var oT={};oT[oS]=oR;return oT});var oL=oN[0];var oQ=1;if(oN[1]["elementType"]){oQ=2;hv.extend(oL,oN[1])}if(oN[2]["styleType"]){oQ=3;hv.extend(oL,oN[2])}var oP={};for(var oM=oQ;oM<oN.length;oM++){hv.extend(oP,oN[oM])}return hv.extend(oL,{stylers:oP})});return e},getStyleUrl:function(e,oP,T,oV){this.styleJson=e;var oT=cv["customStyleInfo_"+oV];var oU=cv["indoorStyleInfo_"+oV];var oN=[];var oO=[];for(var oM=0;oM<e.length;oM++){if(e[oM]["featureType"]&&e[oM]["featureType"].indexOf("IN")>-1&&e[oM]["featureType"]!=="INTERNATIONALIZEICONICON"){oO.push(e[oM])}else{oN.push(e[oM])}}var oS=K.apiHost+"/";var oR=K.apiHost+"/";if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){var oS=window._BMapSecurityConfig["serviceHost"]+"custom/"+this.version+"/mapstyle?version="+4+"&qt=custom_v2&is_all=true&is_new=1&";var oR=window._BMapSecurityConfig["serviceHost"]+"custom/"+this.version+"/mapstyle?version="+4+"&qt=custom_v2&is_all=true&is_new=1&space=indoor&"}else{var oS=oS+"custom/"+this.version+"/mapstyle?version="+4+"&ak="+oP+"&qt=custom_v2&is_all=true&is_new=1&";var oR=oR+"custom/"+this.version+"/mapstyle?version="+4+"&ak="+oP+"&qt=custom_v2&is_all=true&is_new=1&space=indoor&"}var oL=this.styleJson2styleStringV2(oN,oT);var C=this.styleJson2styleStringV2(oO,oU);oS+="styles="+encodeURIComponent(oL);oR+="styles="+encodeURIComponent(C);if(T&&T.os&&T.sv){oS+="&os="+T.os+"&sv="+T.sv;oR+="&os="+T.os+"&sv="+T.sv}var oK=new Date()["getTime"]();oS+="&timeStamp="+oK;oS+=np()(oS);oR+="&timeStamp="+oK;oR+=np()(oR);var oQ={custom:{url:oS,id:"customStyleInfo_"+oV,},indoor:{url:oR,id:"indoorStyleInfo_"+oV,},hasInfoor:oO.length>0,};return oQ},styleJson2styleStringV2:function(e,oN){var oR={featureType:"t",elementType:"e",visibility:"v",color:"c",opacity:"o",lightness:"l",saturation:"s",weight:"w",level:"z",hue:"h",fontsize:"f",image:"i"};var oT={all:"all",geometry:"g","geometry.fill":"g.f","geometry.stroke":"g.s",labels:"l","labels.text.fill":"l.t.f","labels.text.stroke":"l.t.s","labels.text":"l.t","labels.icon":"l.i","geometry.topfill":"g.tf","geometry.sidefill":"g.sf",texture:"t"};var oU=[];for(var T=this.map.getMinZoom();T<=this.map.getMaxZoom();T++){oN.zoomFrontStyle[T]={}}oN.zoomFrontStyle.main={};var C=false;for(var T=0;!!e[T];T++){var oS=e[T];if(this.isOnlyZoomStyler(oS)){continue}var oQ=this.getFrontZoom(oS);if((oS.featureType==="land"||oS.featureType==="all"||oS.featureType==="background")&&typeof oS.elementType==="string"&&(oS.elementType==="geometry"||oS.elementType==="texture"||oS.elementType==="geometry.fill"||oS.elementType==="all")&&oS.stylers&&!C){if(oS.stylers["color"]){oN.bmapLandColor=oS.stylers["color"]}if(oS.stylers["image"]){oN.bmapLandFillTexture=oS.stylers["image"]}if(oS.stylers["opacity"]){oN.bmapLandColor=oS.stylers["opacity"]}if(oS.stylers["visibility"]&&oS.stylers["visibility"]==="off"){oN.bmapLandColor="#00000000"}if(oS.featureType==="land"){C=true}}if(oS.featureType==="building"&&typeof oS.elementType==="string"&&oS.elementType==="geometry.fill"){oN.buildingFill=true}if(oS.featureType==="roadarrow"&&oS.elementType==="labels.icon"&&oS.stylers){var oO=oS.stylers["visibility"];oN.zoomFrontStyle[oQ]["bmapRoadarrowVisibility"]=oO}var oK={};hv.extend(oK,oS);var oM=oK.stylers;delete oK.stylers;hv.extend(oK,oM);var oL=[];for(var oP in oR){if(oK[oP]){if(this.isEditorZoomKeys(oP)){continue}if(oP==="elementType"){oL.push(oR[oP]+":"+oT[oK[oP]])}else{if(oP==="image"){oL.push(oR[oP]+":"+encodeURIComponent(encodeURIComponent(oK[oP])))}else{switch(oK[oP]){case"poilabel":oK[oP]="poi";break;case"districtlabel":oK[oP]="label";break}oL.push(oR[oP]+":"+oK[oP])}}}}if(oL.length>2){oU.push(oL.join("|"))}}return oU.join(",")},getFrontZoom:function(e){var i=e.stylers["level"];if(i===undefined){return"main"}else{return parseInt(i,10)}},isZoomConfig:function(e){var i=e.stylers["level"];if(i===undefined){return false}else{return true}},isOnlyZoomStyler:function(e){var i={};hv.extend(i,e.stylers);delete i.curZoomRegionId;delete i.curZoomRegion;delete i.level;if(hv.isEmptyObject(i)){return true}else{return false}},isSelectZoom:function(i,e){var C=i.stylers["level"];if(C===undefined){return true}else{if(C===e+""){return true}else{return false}}},isEditorZoomKeys:function(e){var i={curZoomRegionId:true,curZoomRegion:true};if(i[e]){return true}else{return false}},getZoomRegion:function(e,i){var T=e.stylers["level"];var C={};hv.extend(C,i);if(T===undefined){return C}else{C[parseInt(T,10)]=true;return C}},onStyleDataBack:function(C,i,e,T){if(this._default){this.parseStyleData(C,i,e,T)}else{this._dataList.push({method:"parseStyleData",arguments:[C,i,e,T]})}},parseStyleData:function(oK,C,i,oM){oK=JSON.parse(oK);var T="Feature";if(C.indexOf("indoor")!==-1){T="indoor"}if(oK.status===0&&oK.data&&oK.data.style&&oK.data.style.length>=3){if(!i.baseFs){if(this.version==="v3"){var e=JSON.parse(JSON.stringify(cv[T+"StyleDefault"]));i.baseFs=this.combindStyle(e,oK.data.style)}else{i.baseFs=oK.data.style}}}else{if(!i.baseFs){i.baseFs=cv[T+"StyleDefault"]}}var oL=i.baseFs;this.updateFrontFeatureStyle(i);oM&&oM()},updateFrontFeatureStyle:function(C){if(C.zoomFrontStyle.main["bmapRoadarrowVisibility"]){for(var e=this.map.getMinZoom();e<=this.map.getMaxZoom();e++){if(!C.zoomFrontStyle[e]){C.zoomFrontStyle[e]={}}if(!C.zoomFrontStyle[e]["bmapRoadarrowVisibility"]){C.zoomFrontStyle[e]["bmapRoadarrowVisibility"]=C.zoomFrontStyle.main["bmapRoadarrowVisibility"]}}}},getMapStyleFiles:function(T,oM,e,C){var i=T.split("?")[0];var oL=T.split("?")[1];var oK=new XMLHttpRequest();oK.open("POST",i,true);oK.setRequestHeader("Content-type","application/x-www-form-urlencoded");oK.timeout=10000;oK.ontimeout=function(){C&&C()};oK.onreadystatechange=function(oN){if(this.readyState===4){if(this.status===200){oM&&oM(this.responseText)}else{e&&e()}}};oK.send(oL);return oK},getDefaultStyle:function(i){var e=this;jW.load(K.getMapStyleFiles("default"),function(){cv.FeatureStyleDefault=window.FeatureStyle;cv.iconSetInfoDefault=window.iconSetInfo_high;cv.iconSetInfoCustom=window.iconSetInfo_high;cv.indoorStyleDefault=window.indoorStyle;e._default=true;e.syncDataList.call(e);i&&i()})},syncDataList:function(){if(this._default){for(var C=0,e=this._dataList.length;C<e;C++){var T=this._dataList[C];this[T.method].apply(this,T.arguments)}this._dataList=[]}},combindStyle:function(C,oK){for(var oM=0;oM<oK[1].length;oM++){var oN=oK[1][oM][0];if(!C[1][oM]||!C[1][oM][0]){continue}for(var oL in oN){if(oN.hasOwnProperty(oL)){C[1][oM][0][oL]=oN[oL]}}}for(var oM=0;oM<oK[2].length;oM++){var e=oK[2][oM];for(var oL in e){if(e.hasOwnProperty(oL)){for(var T=0;T<C[2].length;T++){if(C[2][T]&&C[2][T][oL]){delete C[2][T][oL];break}}C[2][oM][oL]=e[oL]}}}return C}};var bI={map:null,labelCache:{},calcDrawMc:function(C,i,e){var T=[];switch(i){case"fill":T=this.calcFill(C,e);break;case"line":break;case"building3d":T=this.calcBuilding3d(C,e);break}return T},calcFill:function(oK,C){var oL=[];for(var T=0;T<oK.length;T=T+5){var e=this.coordToMc({x:oK[T],y:oK[T+1]},C.row,C.col,C.mercatorSize,C.baseTileSize);oL.push(e[0],e[1])}return oL},calcLine:function(oK,C){var oL=[];var oM=new Int16Array(oK.buffer);for(var T=0;T<oM.length;T=T+10){var e=this.coordToMc({x:oM[T]/10,y:oM[T+1]/10},C.row,C.col,C.mercatorSize,C.baseTileSize);oL.push(e[0],e[1])}return oL},calcBuilding3d:function(oL,C){var oM=[];var T={};for(var oK=0;oK<oL.length/2;oK=oK+7){if(oL[oK]===oL[oK-7]&&oL[oK+1]===oL[oK-6]){continue}if(T[oL[oK].toString()+oL[oK+1].toString()]){continue}T[oL[oK].toString()+oL[oK+1].toString()]=true;var e=this.coordToMc({x:oL[oK],y:oL[oK+1]},C.row,C.col,C.mercatorSize,C.baseTileSize);oM.push(e[0],e[1])}return oM},coordToMc:function(oK,T,e,i,C){return[oK.x*(i/C)+e*i,oK.y*(i/C)+T*i]},addDrawIntoAreaSpots:function(e,oK){if(F.environment!=="customEditor"){return}if(!oK.styleIds){return}for(var C=0;C<oK.styleIds.length;C++){var oN=0;if(C>0){oN=oK.verticesLength[C-1]}end=oK.verticesLength[C];var oL=[];var T="";if(oK.vertex){oL=oK.vertex;T="building3d"}else{if(oK.data[0]){oL=oK.data[0];T=oK.type}else{continue}}var oM=this.calcDrawMc(oL.slice(oN,end),T,e);this.map.addAreaSpot(oM,{userData:{styleId:oK.styleIds[C],type:"mapstyle"}})}},addLabelIntoAreaSpots:function(e){if(F.environment!=="customEditor"){return}for(var oK=0;oK<e.length;oK++){var oL=e[oK];for(var T=0;T<oL.fixedLabel.length;T++){var C=oL.fixedLabel[T];if(!C._mcBds){continue}var oM=[C._mcBds[0].lng,C._mcBds[0].lat,C._mcBds[0].lng,C._mcBds[1].lat,C._mcBds[1].lng,C._mcBds[1].lat,C._mcBds[1].lng,C._mcBds[0].lat];if(!this.labelCache[oM.join()]){this.labelCache[oM.join()]=true;this.map.addAreaSpot(oM,{userData:{styleId:C.styleId,type:"mapstyle",name:C.name}})}}}}};function dP(i,e,T,C){this.cx=3*i;this.bx=3*(T-i)-this.cx;this.ax=1-this.cx-this.bx;this.cy=3*e;this.by=3*(C-e)-this.cy;this.ay=1-this.cy-this.by;this.p1x=i;this.p1y=C;this.p2x=T;this.p2y=C}dP.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e};dP.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e};dP.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx};dP.prototype.solveCurveX=function(e,oO){if(typeof oO==="undefined"){oO=0.000001}var oN;var oM;var oK;var C;var T;for(oK=e,T=0;T<8;T++){C=this.sampleCurveX(oK)-e;if(Math.abs(C)<oO){return oK}var oL=this.sampleCurveDerivativeX(oK);if(Math.abs(oL)<0.000001){break}oK=oK-C/oL}oN=0;oM=1;oK=e;if(oK<oN){return oN}if(oK>oM){return oM}while(oN<oM){C=this.sampleCurveX(oK);if(Math.abs(C-e)<oO){return oK}if(e>C){oN=oK}else{oM=oK}oK=(oM-oN)*0.5+oN}return oK};dP.prototype.solve=function(e,i){return this.sampleCurveY(this.solveCurveX(e,i))};var jF={};function ij(C){var e={duration:1000,fps:30,delay:0,transition:jF.linear,dropLastAnimation:false};if(C){for(var T in C){e[T]=C[T]}}if(C.beginTime){this._beginTime=C.beginTime}this._callbacks=[];this._options=e;if(e.delay){var oK=this;setTimeout(function(){oK._doStart()},e.delay)}else{this._doStart()}this._pauseTime=0}ij.INFINITE="INFINITE";ij.prototype._doStart=function(){if(this._isPausing){var e=performance.now()||new Date().getTime();this._pauseTime+=e-this._isPausing;this._isPausing=undefined}if(window.requestAnimationFrame){var i=this;i._timer=window.requestAnimationFrame(function(C){i._loop(C)})}else{this._beginTime=new Date().getTime();if(this._options.duration===ij.INFINITE){this._endTime=null}else{this._endTime=this._beginTime+this._options.duration}this._loop()}};ij.prototype.setBeginTime=function(e){this._beginTime=e};ij.prototype.setDuration=function(e){this._options.duration=e};ij.prototype._loop=function(T){var oM=this;T=T||new Date().getTime();T=T-this._pauseTime;if(!this._beginTime){this._beginTime=T}this._endTime=this._beginTime+this._options.duration;if(oM._endTime!==null&&T>=oM._endTime){if(oM._options.dropLastAnimation===false){oM._options.render(oM._options.transition(1),1,T)}if(typeof oM._options.finish==="function"){oM._options.finish(T,this)}for(var oL=0,e=oM._callbacks.length;oL<e;oL++){oM._callbacks[oL]()}return}var oK;if(typeof oM._options.duration==="number"){oK=(T-oM._beginTime)/oM._options.duration;oM.schedule=oM._options.transition(oK)}else{oK=T-oM._beginTime;oM.schedule=0}oM._options.render(oM.schedule,oK,T);if(!oM.terminative){if(window.requestAnimationFrame){oM._timer=requestAnimationFrame(function C(i){oM._loop(i)})}else{oM._timer=setTimeout(function(){oM._loop()},1000/oM._options.fps)}}};ij.prototype.stop=function(i,e){this.terminative=true;if(this._timer){if(window.cancelAnimationFrame){cancelAnimationFrame(this._timer)}else{clearTimeout(this._timer)}this._timer=null;if(typeof this._options.onStop==="function"){this._options.onStop(e)}}if(i){this._endTime=this._beginTime;this._loop()}};ij.prototype.pause=function(){if(!this._isPausing){this.stop();this.terminative=undefined;this._isPausing=performance.now()||new Date().getTime()}};ij.prototype.cancel=function(){this.stop()};ij.prototype.append=function(e){this._callbacks.push(e);return this};jF={_p1:1,_p2:1*1.525,linear:function(e){return e},reverse:function(e){return 1-e},easeInQuad:function(e){return e*e},easeInCubic:function(e){return Math.pow(e,3)},easeInBiquad:function(e){return Math.pow(e,4)},easeInBack:function(e){return e*e*((jF._p1+1)*e-jF._p1)},easeOutQuad:function(e){return -(e*(e-2))},easeOutCubic:function(e){return Math.pow((e-1),3)+1},easeOutBiquad:function(e){return 1-Math.pow((e-1),4)},easeOutBack:function(e){return((e=e-1)*e*((jF._p1+1)*e+jF._p1)+1)},easeInOutQuad:function(e){if(e<0.5){return e*e*2}else{return -2*(e-2)*e-1}},easeInOutCubic:function(e){if(e<0.5){return Math.pow(e,3)*4}else{return Math.pow(e-1,3)*4+1}},easeInOutBiquad:function(e){if(e<0.5){return Math.pow(e,4)*8}else{return 1-(Math.pow(e-1,4)*8)}},easeInOutSine:function(e){return(1-Math.cos(Math.PI*e))/2}};jF.ease=(function(){var e=new dP(0.4,0,0.6,1);return function(i){return e.solve(i)}})();jF["ease-in"]=jF.easeInQuad;jF["ease-out"]=jF.easeOutQuad;var fg={start:function(oP){var T=oP.el;var e=oP.style;var i=oP.startValue;var oM=oP.endValue;var oK=oP.duration||1400;var oL=oP.transition||jF.linear;var oO=oP.callback;var oN=oM-i;var C=oP.unit||"";return new ij({fps:60,duration:oK,transition:oL,render:function(oQ){T.style[e]=i+oN*oQ+C},finish:function(){oO&&oO()}})}};function w(oK,C){eX.call(this);this.keyframes=oK;var e={duration:1000,delay:0,transition:jF.linear,interation:1};if(C){for(var T in C){e[T]=C[T]}}this._options=e}w.inherits(eX,"ViewAnimation");w.prototype._start=function(C){var oS=this;oS.map=C;var oN=C.getCenter();var oT=C.getZoom();var oU=C.getTilt();var T=C.getHeading();for(var oO=0;oO<oS.keyframes.length;oO++){var oK=oS.keyframes[oO];if(oK.center===undefined||oK.center===null){oK.center=new d9(oN.lng,oN.lat)}if(oK.zoom===undefined||oK.zoom===null){oK.zoom=oT}if(oK.tilt===undefined||oK.tilt===null){oK.tilt=oU}if(oK.heading===undefined||oK.heading===null){oK.heading=T}}var oQ=new ix("onanimationstart");oS.dispatchEvent(oQ);this._initStatus(oS.map);var oM=this._options.duration;var oP=this._options.interation;var oR=this._options.transition;var oL=0;oS.poiStatus=oS.map._displayOptions.poi;if(oS.poiStatus){oS.map.setDisplayOptions({poi:false})}oS.map.viewAnimationTime=new Date().getTime();this.animation=new ij({duration:oM,transition:oR,start:function(e){},render:function(i,e){if(i===0){oS._initStatus(oS.map)}else{oS._setViewByRate(i)}},finish:function(oV,i){if(++oL<oP||oP==="INFINITE"){var oW=new ix("onanimationiterations");oS.dispatchEvent(oW);delete i._beginTime;delete i._endTime;i._doStart()}else{var oW=new ix("onanimationend");oS.dispatchEvent(oW);delete oS.map.viewAnimationTime;oS.map.setDisplayOptions({poi:oS.poiStatus})}}})};w.prototype._getTotalDuration=function(e,i){if(e===ij.INFINITE){return ij.INFINITE}else{return e*i}};w.prototype._initStatus=function(e){if(this.keyframes[0]){e.setCenter(this.keyframes[0].center,{noAnimation:true});e.setZoom(this.keyframes[0].zoom,{noAnimation:true});e.setTilt(this.keyframes[0].tilt,{noAnimation:true});e.setHeading(this.keyframes[0].heading,{noAnimation:true})}};w.prototype._setViewByRate=function(T){for(var e=0;e<this.keyframes.length-1;e++){var oK=this.keyframes[e];var C=this.keyframes[e+1];if(T>=oK.percentage&&T<C.percentage){this.map.setHeading(this._getHeadingDelta(oK,C,T),{noAnimation:true});this.map.setTilt(this._getTiltDelta(oK,C,T),{noAnimation:true});this.map.setCenter(this._getCenterDelta(oK,C,T),{noAnimation:true});this.map.setZoom(this._getZoomDelta(oK,C,T),{noAnimation:true})}}};w.prototype._getHeadingDelta=function(C,i,e){var oK=(e-C.percentage)/(i.percentage-C.percentage);var T=C.heading+(i.heading-C.heading)*oK;return T};w.prototype._getTiltDelta=function(C,i,e){var oK=(e-C.percentage)/(i.percentage-C.percentage);var T=C.tilt+(i.tilt-C.tilt)*oK;return T};w.prototype._getCenterDelta=function(C,i,e){var oK=(e-C.percentage)/(i.percentage-C.percentage);var T=C.center.add(i.center.sub(C.center).mult(oK));return T};w.prototype._getZoomDelta=function(T,C,i){var oK=(i-T.percentage)/(C.percentage-T.percentage);var e=T.zoom+(C.zoom-T.zoom)*oK;return e};w.prototype._pause=function(e){this.animation.pause()};w.prototype._continue=function(e){this.animation._doStart()};w.prototype._cancel=function(C){C.setDisplayOptions({poi:this.poiStatus});this.animation.cancel();delete C.viewAnimationTime;var i=new ix("onanimationcancel");this.dispatchEvent(i)};var en=undefined;var h8={is64Bit:function(){if(/Windows/.test(navigator.userAgent)){if(/Win64; x64/.test(navigator.userAgent)){return true}else{if(/WOW64/.test(navigator.userAgent)){return true}else{return false}}}return true},isIOS112:function bR(e){return/11_2/.test(navigator.userAgent)},canUseWebAssembly:function(i){if(en!==undefined){i&&i(en);return}if(window.WebAssembly&&this.is64Bit()){if(window.disableWebAssembly===true){en=false;i&&i(en)}else{if(!d4()){en=true;i&&i(en)}else{if(this.isIOS112()){en=false;i&&i(en)}else{var e=new Uint8Array([0,97,115,109,1,0,0,0,1,133,128,128,128,0,1,96,0,1,127,3,130,128,128,128,0,1,0,4,132,128,128,128,0,1,112,0,0,5,131,128,128,128,0,1,0,1,6,129,128,128,128,0,0,7,145,128,128,128,0,2,6,109,101,109,111,114,121,2,0,4,109,97,105,110,0,0,10,138,128,128,128,0,1,132,128,128,128,0,0,65,42,11]);WebAssembly.instantiate(e).then(function(C){en=true;i&&i(en)},function(C){en=false;i&&i(en)})}}}}else{en=false;i&&i(en)}}};var bb={};cv.Utils=bb;function lK(){var i=new Date(c0.popup_timestamp*1000);var T=i.getFullYear();var e=i.getMonth()+1;var C=i.getDate();return{year:T,month:e,day:C}}var dZ=(function(){var C=0;var i=c0.popup_code;var T=(c0.popup_block_time||60)*1000;var e=lK();return function(oO,oM){oM=oM||{};var oQ=oM.from;var oL=new Date().getTime();if(oL-C>T){C=oL;var oK="绯荤粺浜�"+e.year+"骞�"+e.month+"鏈�"+e.day+"鏃�";oO="銆�"+i+"銆�"+oK+oO;try{var oP=document.createElement("iframe");oP.style.display="none";document.body.appendChild(oP);if(oP.contentWindow&&oP.contentWindow.alert){oP.contentWindow.alert(oO)}else{window.alert(oO)}document.body.removeChild(oP)}catch(oN){window.alert(oO)}d5.sendMessage("popup",oQ,i)}}})();function oA(e){return e.style}function lC(i){if(hv.Browser.ie>0){i.unselectable="on";i.selectstart=function(){return false};i.onmousedown=function(C){C.preventDefault();return false}}else{var e=oA(i);e.MozUserSelect="none";e.WebkitUserSelect="none";i.addEventListener("mousedown",function(C){C.preventDefault()},false)}}function bx(e){return e&&e.parentNode&&e.parentNode.nodeType!==11}function cQ(i,e){if(!i){return null}i.insertAdjacentHTML("beforeEnd",e);return i.lastChild}function iC(C,i){var T=document.createElement("div");T.innerHTML=i;var e=T.childNodes[0];return C.parentNode.insertBefore(e,C)}function aF(i){i=i||window.event;i.stopPropagation?i.stopPropagation():i.cancelBubble=true}function g(i){i=i||window.event;i.preventDefault?i.preventDefault():i.returnValue=false;return false}function kK(i){aF(i);return g(i)}function j4(){var e=document.documentElement;var i=document.body;if(e&&(e.scrollTop||e.scrollLeft)){return[e.scrollTop,e.scrollLeft]}else{if(i){return[i.scrollTop,i.scrollLeft]}else{return[0,0]}}}function l5(oK){if(!oK){return}oK.onload=oK.onerror=null;var C=oK.attributes,T,e,oL;if(C){e=C.length;for(T=0;T<e;T+=1){oL=C[T].name;if(typeof oK[oL]==="function"){oK[oL]=null}}}C=oK.children;if(C){e=C.length;for(T=0;T<e;T+=1){l5(oK.children[T])}}}function iF(i,oM,oL){var oK=oM.lng-oL.lng;var T=oM.lat-oL.lat;if(oK===0){return Math.abs(i.lng-oM.lng)}if(T===0){return Math.abs(i.lat-oM.lat)}var C=T/oK;var e=oM.lat-C*oM.lng;return Math.abs(C*i.lng-i.lat+e)/Math.sqrt(C*C+1)}function dL(i,e){if(!i||!e){return}return Math.round(Math.sqrt(Math.pow(i.x-e.x,2)+Math.pow(i.y-e.y,2)))}function gQ(i,e){if(!i||!e){return 0}return Math.round(Math.sqrt(Math.pow(i.lng-e.lng,2)+Math.pow(i.lat-e.lat,2)))}function iw(oO,C,oK){var oL=(oK.lng-C.lng)*(oO.lng-C.lng)+(oK.lat-C.lat)*(oO.lat-C.lat);if(oL<=0){return gQ(oO,C)}var e=(oK.lng-C.lng)*(oK.lng-C.lng)+(oK.lat-C.lat)*(oK.lat-C.lat);if(oL>=e){return gQ(oO,oK)}var i=oL/e;var oN=C.lng+(oK.lng-C.lng)*i;var oM=C.lat+(oK.lat-C.lat)*i;const T={lng:oN,lat:oM};return gQ(oO,T)}function hK(C,i){var e=Math.round((C.x+i.x)/2);var T=Math.round((C.y+i.y)/2);return new hV(e,T)}function nk(e,C){var i=[];C=C||function(oK){return oK};for(var T in e){i.push(T+"="+C(e[T]))}return i.join("&")}function da(C,i,oL){var oM=document.createElement(C);if(oL){oM=document.createElementNS(oL,C)}i=i||{};for(var T in i){var oK={"for":"htmlFor","class":"cssClass"}[T]||T;if(T==="style"){oM.style.cssText=i[T];continue}if(T==="class"){hv.ac(oM,i[T]);continue}if(oM.setAttribute){oM.setAttribute(oK,i[T])}else{try{oM[oK]=i[T]}catch(oM){}}}return oM}function dK(e){if(e.currentStyle){return e.currentStyle}else{if(e.ownerDocument&&e.ownerDocument.defaultView){return e.ownerDocument.defaultView.getComputedStyle(e,null)}}}function c2(e){return typeof e==="function"}function i9(e){return e===void 0}function nU(e,i){return Object.prototype.hasOwnProperty.call(e,i)}function k(oK,oL){if(i9(oK.length)){for(var T in oK){if(nU(oK,T)){oL.call(null,T,oK[T])}}}else{var C=oK.length;if(C){for(var e=0;e<C;e++){oL.call(null,e,oK[e])}}}}function aP(i,e){if(!e){return i}k(e,function(C,T){i[C]=T});return i}var kl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function fd(oK){var C="";var oR;var oP;var oN="";var oQ;var oO;var oM;var oL="";var T=0;var e=/[^A-Za-z0-9+/=]/g;if(!oK||e.exec(oK)){return oK}oK=oK.replace(/[^A-Za-z0-9+/=]/g,"");do{oQ=kl.indexOf(oK.charAt(T++));oO=kl.indexOf(oK.charAt(T++));oM=kl.indexOf(oK.charAt(T++));oL=kl.indexOf(oK.charAt(T++));oR=(oQ<<2)|(oO>>4);oP=((oO&15)<<4)|(oM>>2);oN=((oM&3)<<6)|oL;C=C+String.fromCharCode(oR);if(oM!==64){C=C+String.fromCharCode(oP)}if(oL!==64){C=C+String.fromCharCode(oN)}oR=oP=oN="";oQ=oO=oM=oL=""}while(T<oK.length);return C}function ni(e){return btoa(encodeURIComponent(e))}function iO(e){return decodeURIComponent(atob(e))}(function(e){if(!e.Utils){e.Utils={}}var i=e.Utils;i.format=(function(){function C(oM,oL,oN){var oK=oN[+oL];return typeof(oK)==="function"?oK(oL):oK}function T(oM,oL,oN){var oP=oL;var oQ=[];var oK=oL.split(":");if(oK.length===2){oP=oK[0];oQ.push(oK[1])}var oO=typeof(oN[oP]);if(oO==="function"){return oN[oP].apply(undefined,oQ)}else{if(oO==="undefined"){return oM}else{return String(oN[oP])}}}return function(oK,oL){var oN=oL.splice?C:T;var oM=oK.splice?oK.join(""):oK;return oM.replace(/{([a-zA-Z0-9_$:.]+)}/g,function(oP,oO){return oN(oP,oO,oL)})}})();i.ErrorMonitor=function(T,C,oK){};h8.canUseWebAssembly(function(C){i.canUseWebAssembly=C})})(cv);function c9(){return(d4()||lt()||nI())}function d4(){var e=navigator.userAgent;if(e.indexOf("iPhone")>-1||e.indexOf("iPad")>-1){return true}return false}function lt(){var e=navigator.userAgent;if(e.indexOf("Android")>-1){return true}return false}function hM(){var e=navigator.userAgent;if(e.indexOf("Harmony")>-1){return true}return false}function eY(T,C){var e=T.getContainer();var i=C.getContainer();return e===i}function nI(){var e=navigator.userAgent;if(e.indexOf("Mobile")>-1){return true}return false}function mn(e){return e*Math.PI/180}function hJ(e){return e/Math.PI*180}function cC(e,oK){var T=Math.pow(10,oK);if(typeof e==="number"){return Math.round(e*T)/T}for(var C=0;C<e.length;C++){e[C]=cC(e[C],oK)}return e}function dA(C,i,e){if(C<i){C=i}else{if(C>e){C=e}}return C}function gq(e,i){while(e<0){e+=i}return e%i}function lp(i,e){return(i>=0&&e>=0)||(i<0&&e<0)}function Z(i){if(i._gl){return i._gl}var e={alpha:true,antialias:false,failIfMajorPerformanceCaveat:false,preserveDrawingBuffer:false,stencil:false};var C=i.getContext("webgl",e)||i.getContext("experimental-webgl",e);i._gl=C;return C}function mj(T,C){for(var e=0;e<C.length;e++){hv.on(T,C[e],aF)}}function hn(i,C,e){C[e]=i.getUniformLocation(C,e)}function de(oK,oL,e,C,i){var T="";switch(i){case"mat4":oK.uniformMatrix4fv(oL[e],false,C);return;case"v3":T="uniform3fv";break;case"f":T="uniform1f";break;case"i":T="uniform1i";break}if(T===""){throw"error"}oK[T](oL[e],C)}function kZ(oR,e){while(oR<0){oR+=360}oR=oR%360;var T=e.width;var oQ=e.height;var oM=T;var C=oQ;if(oR<90){var i=Math.sin(mn(oR))*T;var oO=Math.sin(mn(oR))*oQ;var oP=Math.cos(mn(oR))*T;var oL=Math.cos(mn(oR))*oQ;var oM=Math.ceil(oP+oO);var C=Math.ceil(i+oL)}else{if(oR<180){var oR=oR-90;var i=Math.sin(mn(oR))*T;var oO=Math.sin(mn(oR))*oQ;var oP=Math.cos(mn(oR))*T;var oL=Math.cos(mn(oR))*oQ;var oM=Math.ceil(i+oL);var C=Math.ceil(oP+oO)}else{if(oR<270){var oR=oR-180;var i=Math.sin(mn(oR))*T;var oO=Math.sin(mn(oR))*oQ;var oP=Math.cos(mn(oR))*T;var oL=Math.cos(mn(oR))*oQ;var oM=Math.ceil(oP+oO);var C=Math.ceil(i+oL)}else{var oR=oR-270;var i=Math.sin(mn(oR))*T;var oO=Math.sin(mn(oR))*oQ;var oP=Math.cos(mn(oR))*T;var oL=Math.cos(mn(oR))*oQ;var oM=Math.ceil(i+oL);var C=Math.ceil(oP+oO)}}}var oN=oM-T;var oK=C-oQ;return[0-oN/2,0-oK/2,T+oN/2,oQ+oK/2]}function dz(e){if(e.toDataURL()===dz._blankData){return true}return false}function aj(oK,T,C){var i=[C.lng-oK.lng,C.lat-oK.lat];var e=[T.lng-oK.lng,T.lat-oK.lat];return i[0]*e[1]-i[1]*e[0]}function mS(oL,oK,C){var e;var oM;var T;var i;if(oL.lng<oK.lng){e=oL.lng;T=oK.lng}else{e=oK.lng;T=oL.lng}if(oL.lat<oK.lat){oM=oL.lat;i=oK.lat}else{oM=oK.lat;i=oL.lat}if(C.lng<e||C.lng>T||C.lat<oM||C.lat>i){return false}return true}function m7(oN,oM,oL,T){var oK=aj(oL,T,oN);var C=aj(oL,T,oM);var i=aj(oN,oM,oL);var e=aj(oN,oM,T);if(oK*C<0&&i*e<0){return true}else{if(oK===0&&mS(oL,T,oN)){return true}else{if(C===0&&mS(oL,T,oM)){return true}else{if(i===0&&mS(oN,oM,oL)){return true}else{if(e===0&&mS(oN,oM,T)){return true}else{return false}}}}}}function k5(C,i){var e=i.parentNode;if(e.lastChild===i){e.appendChild(C)}else{e.insertBefore(C,i.nextSibling)}}function fS(oP,oQ){if(oQ===0){return oP}var oO=0;var oM=0;if(!oP){throw"寮傚父"}if(oP.length===0){return[]}for(var oK=1,C=oP.length-1;oK<C;oK++){var oN=iF(oP[oK],oP[0],oP[oP.length-1]);if(oN>oO){oM=oK;oO=oN}}var e=[];if(oO>=oQ){var oS=oP.slice(0,oM);var oR=oP.slice(oM,oP.length);var oL=fS(oS,oQ);var T=fS(oR,oQ);for(var oK=0,C=oL.length;oK<C;oK++){e.push(oL[oK])}for(var oK=0,C=T.length;oK<C;oK++){e.push(T[oK])}}else{e.push(oP[0]);e.push(oP[oP.length-1])}return e}function mo(T,oK){if(T.length<2){return T}const C=[T[0]];for(var e=1;e<T.length;e++){if(gQ(C[C.length-1],T[e])>=oK){C.push(T[e])}}return C}function v(e){if(Math.log2){return Math.log2(e)}return Math.log(e)/Math.LN2}function e3(C,i,e){return Math.min(e,Math.max(i,C))}function aO(e,i){if(!i){return e}var oL=i[0];var oK=i[1];var T=i[2];var C=i[3];var oN=[];var oM=[];oN[0]=C*e[0]+T*e[2];oN[1]=e[1];oN[2]=-T*e[0]+C*e[2];oM[0]=oN[0];oM[1]=oK*oN[1]-oL*oN[2];oM[2]=oL*oN[1]+oK*oN[2];return oM}var r=Math.PI/180;var jV=180/Math.PI;function id(C){var i=(C-Date.UTC(2000,0,1,12))/86400000/36525;var e=(d3.utcDay.floor(C)-C)/86400000*360-180;return[e-hY(i)*jV,fZ(i)*jV]}function hY(T){var oK=cj(T);var i=gd(T);var C=mf(T);var oL=Math.tan(me(T)/2);oL*=oL;return oL*Math.sin(2*C)-2*oK*Math.sin(i)+4*oK*oL*Math.sin(i)*Math.cos(2*C)-0.5*oL*oL*Math.sin(4*C)-1.25*oK*oK*Math.sin(2*i)}function fZ(e){return Math.asin(Math.sin(me(e))*Math.sin(cq(e)))}function cq(e){return ot(e)-(0.00569+0.00478*Math.sin((125.04-1934.136*e)*r))*r}function ot(e){return mf(e)+nd(e)}function gd(e){return(357.52911+e*(35999.05029-0.0001537*e))*r}function mf(i){var e=(280.46646+i*(36000.76983+i*0.0003032))%360;return(e<0?e+360:e)/180*Math.PI}function nd(i){var e=gd(i);return(Math.sin(e)*(1.914602-i*(0.004817+0.000014*i))+Math.sin(e+e)*(0.019993-0.000101*i)+Math.sin(e+e+e)*0.000289)*r}function me(e){return fo(e)+0.00256*Math.cos((125.04-1934.136*e)*r)*r}function fo(e){return(23+(26+(21.448-e*(46.815+e*(0.00059-e*0.001813)))/60)/60)*r}function cj(e){return 0.016708634-e*(0.000042037+1.267e-7*e)}function ja(){return window.devicePixelRatio||1}function my(C){var i;var e;var T;if(C>=0){T=Math.floor(C/65536)*65536;i=T;e=C-T}else{T=Math.floor(-C/65536)*65536;i=-T;e=C+T}return[i,e]}function ej(e){if(e.lng>=0&&e.lat>=0){return new d9(e.lng-10000000,e.lat-6000000)}if(e.lng>=0&&e.lat<0){return new d9(e.lng-10000000,e.lat+6000000)}if(e.lng<0&&e.lat>=0){return new d9(e.lng+10000000,e.lat-6000000)}if(e.lng<0&&e.lat<0){return new d9(e.lng+10000000,e.lat+6000000)}}var lQ=null;if(window.performance&&window.performance.now){lQ=function(){return performance.now()}}else{if(Date.now){lQ=function(){return Date.now()}}else{lQ=function(){return(new Date).getTime()}}}function lo(T,e,i){var C="mouseWheel";if(hv.Platform.macintosh){if(!isNaN(T)&&(T<10||T!==120)&&(e%1===0&&e<5)){C="padScroll"}if(hv.Browser.firefox&&(e%1===0&&e<5&&i===0)){C="padScroll"}}if(hv.Browser.safari&&T===12){C="mouseWheel"}return C}function cR(oS,oN){var oR=oS[0];var oQ=oS[1];var T=false;for(var oM=0,oL=oN.length-2;oM<oN.length;oM+=2){var oP=oN[oM];var oK=oN[oM+1];var oO=oN[oL];var C=oN[oL+1];var e=((oK>oQ)!==(C>oQ))&&(oR<(oO-oP)*(oQ-oK)/(C-oK)+oP);if(e){T=!T}oL=oM}return T}function lm(oK,oM){oM=oM||[];var e=oM.length;var C=0;var oL=false;for(var T=0;T<e;T++){C=(T===e-1)?0:C+1;if((oM[T].lat!==oM[C].lat)&&(((oK.lat>=oM[T].lat)&&(oK.lat<oM[C].lat))||((oK.lat>=oM[C].lat)&&(oK.lat<oM[T].lat)))&&(oK.lng<(oM[C].lng-oM[T].lng)*(oK.lat-oM[T].lat)/(oM[C].lat-oM[T].lat)+oM[T].lng)){oL=!oL}}return oL}function aV(i,oK,C){if(C===undefined||C===null){C=false}if(C){var T=false;for(var e=0;e<oK.length;e++){if(lm(i,oK[e])){T=true;break}}return T}return lm(i,oK)}function fQ(C,e,i,T){T=T||0.4;if(C>i){C=Math.pow(C-i+1,T)+i-1}else{if(C<e){C=e-Math.pow(e-C+1,T)+1}}return C}function hq(oN){var oL="";for(var C=0;C<oN.length;C++){var oO=oN.charCodeAt(C)<<1;var e=oO.toString(2);var oK=e.length;var oR=e;if(oK<8){oR="00000000"+e;oR=oR.substr(e.length,8)}oL+=oR}var oP=5-oL.length%5;var T=[];for(var C=0;C<oP;C++){T[C]="0"}oL=T.join("")+oL;var oQ=[];for(var C=0;C<oL.length/5;C++){var oO=oL.substr(C*5,5);var oM=parseInt(oO,2)+50;oQ.push(String.fromCharCode(oM))}return oQ.join("")+oP.toString()}function oe(C,i){var e=cv.TILE_VERSION||window.TILE_VERSION;if(!e||!e[C]||!e[C][i]||!e[C][i].version||!e[C][i].updateDate){e=K.tvc}return{ver:e[C][i].version,udt:e[C][i].updateDate}}function cw(){var e=cv.MSV||window.MSV;if(!e||!e.mapstyle||!e.mapstyle.updateDate||!e.mapstyle.version){e=K.msv}return{ver:e.mapstyle.version,udt:e.mapstyle.updateDate}}function fx(e,oK){var T=e.slice(0);for(var C=0;C<T.length;C++){T[C]+=oK}return T}var kf=null;function kB(e){if(kf){return}e.fire(new ix("onloadtile"));kf=setTimeout(function(){kf=null},1000)}function bi(){if(N("//" + window.location.host + "/bmap-map")||N("//maps.baidu.com")||N("//" + window.location.host + "/bmap-api")){return true}return false}bb.inMapHost=bi();if(typeof window._inMapHost==="boolean"){bb.inMapHost=window._inMapHost}function N(i){var C=window.location;var e=document.createElement("a");e.href=i;return e.hostname===C.hostname&&e.port===C.port&&e.protocol===C.protocol}var fY=[72.685732,0.193351,136.10888,54.392257];var hu=[72.6892532,0.1939743381,136.1168614,54.392257];var E=[72.69566833,0.1999420909,136.1232863,54.39791217];var mg=158;var ff=[98.789081,122.948721,107.857301,118.082148,119.126627,128.021934,79.939914,99.021873,119.912937,122.084572,127.906381,130.933385,106.496057,108.066113,119.818772,126.367919,111.789929,119.311401,100.742164,102.220151,99.853589,100.781289,97.522631,98.834615,99.092638,99.892947,122.905967,123.761867,123.716213,125.494726,123.723977,124.755034,125.475833,126.398284,125.471687,126.065118,130.817003,133.605851,127.900156,128.656536,128.646633,129.625389,132.88057,134.104549,117.365548,119.230813,116.073074,117.416898,114.406274,116.123791,116.479038,119.591534,110.566812,111.851324,74.465162,79.993155,82.858046,91.345214,85.71485,98.969834,127.651377,129.532029,129.462275,130.209769,133.716214,134.731053,134.366834,135.103133,130.854579,131.32966,115.499125,117.530421,115.765224,116.734157,108.524336,110.601747,121.351282,124.612037,126.151954,127.332751,91.273562,95.604179,79.87318,82.935667,76.413314,78.336484,78.275229,79.993668,83.956612,85.725267,85.500637,89.346601,97.990127,98.94176,106.641956,108.599215,111.386259,111.810312,111.578597,111.803167,115.99273,117.010413,116.24461,116.675246,119.422198,119.909078,120.646056,121.38098,120.335038,120.662183,124.579855,125.773243,126.207803,126.774849,95.565331,102.037736,95.576121,96.158028,95.556699,97.799055,91.296205,93.348146,93.321994,94.690522,89.339313,90.540241,82.263039,82.882528,78.335615,80.023512,76.623947,78.352608,73.495149,74.48155,74.846872,76.479412,91.560058,94.871116,88.759515,89.235995,83.237883,83.965264,82.292123,83.246813,81.876477,83.253307,80.75212,81.463265,86.463409,88.267232,102.199623,104.225963,112.153727,116.823265,108.965663,113.021145,111.166575,117.972799];var fe=[22.548416,42.276971,17.227969,22.7346,41.292761,50.741667,30.365133,42.324913,21.701924,22.69335,42.4176,48.936335,21.429059,22.648399,50.650499,52.914825,42.20449,45.199078,21.13391,22.568612,21.441033,22.583349,23.73862,25.298628,22.00409,22.563095,38.97849,41.338631,40.287973,41.330108,39.732801,40.343252,40.966852,41.323446,40.719312,41.05937,44.869472,48.009884,41.336325,42.443362,42.008104,42.434713,45.873151,48.205746,45.132322,46.784582,45.133383,46.392803,45.148771,45.740273,47.478161,50.064393,42.216229,43.461282,37.014302,40.662281,42.219985,47.31417,27.726965,30.466651,48.911271,49.642488,48.831706,49.434487,46.941762,48.37425,47.651781,48.463782,42.851964,44.905396,47.598273,48.438467,48.409141,48.901651,42.22756,42.906402,52.821047,53.578094,50.701837,51.654278,42.292419,44.392214,42.295918,45.385017,34.680866,37.027803,30.743515,37.066586,28.245649,30.406053,47.270872,48.497371,25.238932,27.778469,42.215754,42.540416,43.427677,44.689208,44.685587,44.994131,48.878657,49.318659,49.281099,49.624515,50.710468,51.306809,52.90717,53.331981,52.903016,53.107959,52.900867,53.250033,51.638073,52.400678,42.229657,42.691928,43.061242,43.891083,42.663095,43.074222,44.37174,45.180155,44.375135,44.974219,47.3035,48.053221,45.352401,46.807875,40.563053,42.040289,40.581871,41.405172,38.516328,40.178756,35.790476,37.02337,26.825605,27.761303,27.197399,27.74932,29.147561,30.37813,29.570893,30.062042,30.045026,30.380952,29.998038,30.385203,48.487385,49.16832,22.395733,22.598229,7.441114,11.501436,3.767491,9.000793,12.642067,17.406563];var ds=[98.795985,122.960792,107.867379,118.093451,119.139658,128.035888,79.948212,99.029524,119.923388,122.094977,127.918527,130.94789,106.50606,108.076783,119.8329,126.382207,111.803567,119.324928,100.749858,102.227985,99.860885,100.788921,97.529435,98.841564,99.100017,99.90035,122.917416,123.774367,123.728314,125.507211,123.736065,124.767299,125.488463,126.410675,125.484326,126.07764,130.830784,133.620042,127.912178,128.668957,128.658937,129.638599,132.894179,134.119086,117.379378,119.244569,116.086736,117.431212,114.420233,116.137458,116.492775,119.605527,110.579401,111.86488,74.468228,80.001908,82.867432,91.353788,85.721075,98.976964,127.664757,129.546833,129.476893,130.22449,133.730358,134.745235,134.381034,135.1178,130.868117,131.34409,115.513245,117.544751,115.779271,116.748045,108.536254,110.614326,121.365534,124.626434,126.165992,127.347013,91.281869,95.611754,79.879648,82.945041,76.413314,78.345207,78.275229,80.002329,83.956612,85.734098,85.510186,89.356499,97.997001,98.948845,106.653208,108.610811,111.400183,111.824179,111.592224,111.817136,116.00682,117.024631,116.258574,116.689291,119.436876,119.922961,120.659806,121.395479,120.349116,120.676014,124.59389,125.787788,126.221756,126.788962,95.572955,102.046581,95.583772,96.165551,95.564318,97.806095,91.30446,93.356438,93.330319,94.698145,89.349129,90.548677,82.268802,82.892025,78.335615,80.032266,76.625755,78.361413,73.498248,74.490992,74.846872,76.488771,91.563521,94.878444,88.768214,89.244787,83.247076,83.974127,82.29595,83.256003,81.885315,83.26249,80.760619,81.472404,86.470983,88.276988,102.207537,104.234614,112.164795,116.833667,108.965663,113.032246,111.166575,117.983363];var dp=[22.551183,42.284787,17.227969,22.738314,41.300981,50.749638,30.368087,42.332701,21.705055,22.696452,42.426047,48.944674,21.432184,22.651387,50.657409,52.92296,42.212192,45.206905,21.137031,22.57186,21.444502,22.586566,23.741571,25.301472,22.006806,22.56637,38.985114,41.346531,40.295617,41.338581,39.740021,40.351012,40.974644,41.331562,40.726852,41.067192,44.877158,48.018285,41.344597,42.451798,42.016305,42.443235,45.880906,48.214001,45.140027,46.792775,45.141083,46.400433,45.156418,45.748281,47.485889,50.071879,42.223667,43.469487,37.019867,40.668675,42.226823,47.321605,27.72944,30.469853,48.919002,49.650614,48.840188,49.443166,46.949801,48.382798,47.660603,48.472692,42.859946,44.913298,47.605896,48.445914,48.41698,48.909667,42.23507,42.914193,52.8281,53.585952,50.709311,51.662219,42.29968,44.399225,42.302746,45.391958,34.680866,37.03377,30.743515,37.07228,28.245649,30.408935,47.277693,48.504255,25.241528,27.780726,42.223363,42.548418,43.435888,44.696952,44.693193,45.00187,48.886267,49.326755,49.288642,49.632304,50.717486,51.314369,52.914204,53.33964,52.910094,53.115926,52.908382,53.258095,51.64533,52.408305,42.236825,42.699126,43.068466,43.898632,42.670403,43.082219,44.379045,45.187742,44.382336,44.981379,47.310362,48.06019,45.359099,46.814439,40.569751,42.047741,40.587956,41.41263,38.519192,40.185033,35.790476,37.029005,26.825605,27.763896,27.199658,27.751649,29.150192,30.381073,29.573886,30.065162,30.047775,30.384089,30.001277,30.388525,48.494118,49.173841,22.398528,22.601198,7.441114,11.505968,3.767491,9.005209,12.642067,17.410886];var au=95;var eP=[110.3961374,105.0743788,96.8991824,95.61810411,93.82412598,91.3892353,91.38931858,89.08325955,87.22469808,86.26278402,85.17353,85.23741211,82.86627441,81.90481038,79.59687147,80.39829237,79.93319363,77.80279948,75.2557704,73.49357829,73.1892532,73.87758816,74.4064738,74.10215224,75.46409695,76.77739692,78.28299615,78.15499485,78.37920654,78.89145345,79.69282199,81.19938178,81.80830295,83.89093424,85.94149523,87.86447266,89.03414958,90.05918132,91.10026937,92.15733832,93.74361735,95.82597331,97.95655545,97.12363037,98.2129739,99.2068571,101.6587874,102.5239084,102.2356106,105.0249238,106.0992342,107.8617093,111.6439372,109.591869,112.284586,117.7961157,118.9495128,114.2076584,118.693565,123.1475225,122.730705,120.9361393,123.4207441,122.3787782,122.1385425,121.5904281,121.1773763,120.6805404,120.2483355,122.795807,122.8759077,121.3060262,122.1392177,123.7418799,126.4177599,128.5647409,129.7194884,131.2259136,131.9950494,133.6289931,135.6168614,131.3875545,130.8743365,128.6303223,126.0997773,124.4015375,122.22161,119.6586483,119.7866827,118.5685878,116.5177976,114.819101,119.0812964,116.453265,111.7431171];var eN=[43.2190351,42.38053385,43.17417589,44.42226915,45.09863634,45.56708116,47.33599718,48.68832709,49.62448486,48.9482175,48.4800472,47.33564399,47.43948676,46.03452067,45.20221788,43.34563043,42.32965739,41.39690972,40.82972331,39.95567654,39.25892877,38.36098768,38.05441569,37.16878445,36.38899414,35.36126817,34.30953451,32.58503879,31.56975694,30.77800266,30.43559814,29.7744892,30.0931977,28.71103299,27.70739665,27.5775472,27.01096137,27.77857883,27.50707954,26.50328315,26.70387804,27.95548557,27.29428901,23.64685493,23.62310601,21.67493381,20.77751465,21.32070991,22.1824113,22.31232964,22.51316054,16.80037679,13.19749864,0.6939743381,1.541660428,10.50208252,15.58926975,17.89090007,19.94928467,22.18490153,25.37285292,25.61456434,30.62532552,31.08099284,31.89238173,32.50092692,32.80325765,34.25546956,35.15486138,36.90170139,37.8348272,37.941604,38.6480797,38.96797201,40.98146918,41.25573296,42.07218153,42.49132813,44.65259766,44.69330702,48.62286865,48.09383952,49.19628499,50.03402317,53.27678901,53.62976345,53.89420546,52.98933322,52.01872884,50.23210259,50.18807048,47.49769857,47.34362712,46.50502143,45.24770128];var g7=[98.7895,122.954182,107.860913,118.087007,119.133165,128.029533,79.941749,99.023087,119.916883,122.08841,127.912143,130.941471,106.499502,108.070244,119.826245,126.375818,111.797006,119.318387,100.743285,102.221517,99.854448,100.782445,97.522928,98.835028,99.093518,99.893783,122.910927,123.767769,123.721954,125.50077,123.729657,124.760724,125.481902,126.404079,125.477737,126.071019,130.824331,133.613395,127.905767,128.662524,128.652527,129.6321,132.887552,134.11249,117.37297,119.237999,116.080154,117.424589,114.413586,116.130948,116.486264,119.598927,110.5728,111.858437,74.465162,79.995337,82.860821,91.347291,85.716024,98.970481,127.658331,129.540202,129.470528,130.21808,133.723748,134.738785,134.374555,135.111443,130.861475,131.337438,115.506627,117.538123,115.772783,116.741632,108.529656,110.60782,121.358945,124.619773,126.159424,127.340582,91.275275,95.605228,79.874427,82.938601,76.413314,78.338763,78.275229,79.995765,83.956612,85.727511,85.503554,89.349858,97.990418,98.942257,106.646704,108.604437,111.393667,111.817723,111.585811,111.810645,116.000232,117.018216,116.252108,116.682705,119.430384,119.916417,120.653168,121.38883,120.342727,120.669383,124.587426,125.781376,126.215282,126.782323,95.566367,102.040026,95.577158,96.159009,95.557772,97.799728,91.298032,93.350057,93.323794,94.691771,89.342471,90.542019,82.264229,82.885485,78.335615,80.025844,76.623947,78.355027,73.495149,74.484473,74.846872,76.482208,91.560117,94.871859,88.761692,89.23822,83.240549,83.967602,82.292367,83.2495,81.878825,83.256003,80.75421,81.465955,86.465421,88.270356,102.201019,104.228033,112.158282,116.827153,108.965663,113.025767,111.166575,117.97687];var g5=[22.545421,42.279053,17.226272,22.731982,41.294917,50.743316,30.361986,42.326603,21.699185,22.690751,42.419757,48.938435,21.426505,22.64567,50.651745,52.916705,42.20641,45.201064,21.131326,22.565685,21.438288,22.580379,23.735785,25.295582,22.001087,22.560315,38.979333,41.340757,40.28938,41.332289,39.734164,40.344718,40.968803,41.325813,40.721073,41.061503,44.871533,48.012179,41.338366,42.445601,42.010343,42.436934,45.875217,48.208327,45.134237,46.786509,45.135376,46.394665,45.150734,45.742257,47.480099,50.065931,42.217982,43.46329,37.014057,40.662848,42.221079,47.315558,27.723432,30.46385,48.913298,49.644555,48.83396,49.436824,46.944059,48.376613,47.654503,48.466331,42.854333,44.907682,47.600253,48.440245,48.410926,48.903468,42.229292,42.908294,52.822466,53.58012,50.703491,51.656037,42.29378,44.393379,42.296912,45.385809,34.679282,37.027699,30.740622,37.066377,28.241967,30.403134,47.271949,48.49848,25.235818,27.774976,42.217425,42.542102,43.429763,44.691016,44.687044,44.995758,48.880431,49.320551,49.282865,49.626267,50.711607,51.308382,52.908547,53.333963,52.904419,53.109706,52.902338,53.251938,51.639701,52.402205,42.231045,42.693581,43.062756,43.892771,42.664519,43.075927,44.372942,45.1815,44.376327,44.975476,47.304623,48.054453,45.353174,46.808493,40.563653,42.041556,40.582164,41.4064,38.51618,40.179105,35.789745,37.023144,26.825402,27.757641,27.193806,27.745766,29.144229,30.375186,29.567889,30.059102,30.041938,30.378006,29.995047,30.382338,48.48834,49.169021,22.392816,22.595333,7.439914,11.500161,3.766676,9.000793,12.640512,17.406563];var iv=3000;var j3=0.00002;var j1=0.000003;var mN=0.0174532925194;var lc=0.0065;var lb=0.006;var fG=40000;var ia=0;var ne=1;var a0=2;var lE=3;var h0=4;var kF=1e-10;var mt=6370996.81;var iz=100000000;function kQ(C,oK,i,T){var e=arguments.length;this.ll={};this.ru={};if(e===0){}else{if(e===4){this.normalize(C,oK,i,T)}}}kQ.prototype.contains=function(e){if(e.lng>this.ll.lng&&e.lng<this.ru.lng&&e.lat>this.ll.lat&&e.lat<this.ru.lat){return lE}if(Math.abs(e.lng-this.ll.lng)<kF||Math.abs(e.lng-this.ru.lng)<kF||Math.abs(e.lat-this.ll.lat)<kF||Math.abs(e.y-this.ru.lat)>kF){return a0}return ia};kQ.prototype.normalize=function(i,T,e,C){if(i>e){this.ll.lng=e;this.ru.lng=i}else{this.ll.lng=i;this.ru.lng=e}if(T>C){this.ll.lat=C;this.ru.lat=T}else{this.ll.lat=T;this.ru.lat=C}};function gV(i,T,e,C){this.sp={lng:i,lat:T};this.ep={lng:e,lat:C};this.mbr=new kQ(i,T,e,C)}function lT(T,e,oL,oK){for(var C=0;C<oK;C=C+2){if(T.lng>=e[C]&&T.lng<=e[C+1]&&T.lat>=oL[C]&&T.lat<=oL[C+1]){return true}}return false}function jh(oO){var i=oO.lng;var oN=oO.lat;var T=Math.sqrt(i*i+oN*oN);var oL=Math.atan2(oN,i);var C=T+ju(oN);var oK=oL+jt(i);var e=C*Math.cos(oK);var oM=C*Math.sin(oK);return{lng:e+lc,lat:oM+lb}}function bL(oO){var i=oO.lng-lc;var oN=oO.lat-lb;var T=Math.sqrt(i*i+oN*oN);var oL=Math.atan2(oN,i);var C=T-ju(oN);var oK=oL-jt(i);var e=C*Math.cos(oK);var oM=C*Math.sin(oK);return{lng:e,lat:oM}}function ju(e){return Math.sin(e*iv*mN)*j3}function jt(e){return Math.cos(e*iv*mN)*j1}function aS(C,i,e){return((i.lng-C.lng)*(e.lat-C.lat)-(e.lng-C.lng)*(i.lat-C.lat))}function lj(i,e){return Math.abs(i-e)<=kF}function jG(T,C){var i=T.lat*mN;var oO=T.lng*mN;var e=C.lat*mN;var oN=C.lng*mN;var oL=Math.cos(i)*Math.cos(e);var oK=Math.cos(oO)*Math.cos(oN);var oQ=Math.sin(i)*Math.sin(e);var oP=Math.sin(oO)*Math.sin(oN);var oR=oL*oK+oL*oP+oQ;if(oR<-1){oR=-1}else{if(oR>1){oR=1}}var oM=Math.acos(oR)*mt;return oM}function n(oN,oM){var i=oN.lat*mN;var e=oM.lat*mN;var T=oN.lng*mN;var C=oM.lng*mN;var oL=i-e;var oK=T-C;var oO=Math.sin(oL/2)*Math.sin(oL/2)+Math.cos(i)*Math.cos(e)*Math.sin(oK/2)*Math.sin(oK/2);return 2*Math.asin(Math.sqrt(oO))*mt}function jE(oO,C){var oQ=cy(oO,C);var oP=180;var oN=90;var oM=-180;var oK=-90;var oL=C.sp;var T=C.ep;oP=oL.lng<T.lng?oL.lng:T.lng;oN=oL.lat<T.lat?oL.lat:T.lat;oM=oL.lng<T.lng?oL.lng:T.lng;oK=oL.lat<T.lat?oL.lat:T.lat;if(oQ.lng<=oM&&oQ.lng>=oP&&oQ.lng<=oK&&oQ.lat>=oN){return jG(oO,oQ)}else{var i=n(oO,C.sp);var e=n(oO,C.ep);return i<e?i:e}}function bN(i,e){}function cE(i,T,e,C){return Math.sqrt((i-e)*(i-e)+(T-C)*(T-C))}function cy(oU,oM){var oL=oU.lng;var oT=oU.lat;var oK=oM.sp.lng;var oS=oM.sp.lat;var C=oM.ep.lng;var oQ=oM.ep.lat;var oR=oQ-oS;var oP=oK-C;if(lj(oR,0)&&lj(oP,0)){return oM.sp}var oO=C*oS-oK*oQ;var oN=oP*oL-oR*oT;var e=oR*oR-oP*oP;var T=oP*oN-oR*oO;var i=oR*oN+oP*oO;return{lng:T/e,lat:-i/e}}function cL(T){var C=0;for(var e=0;e<au;++e){if(eN[e]<=T.lat){if(eN[(e+1)%au]>T.lat){if(aS({lng:eP[e],lat:eN[e]},{lng:eP[(e+1)%au],lat:eN[(e+1)%au]},T)>0){++C}}}else{if(eN[(e+1)%au]<=T.lat){if(aS({lng:eP[e],lat:eN[e]},{lng:eP[(e+1)%au],lat:eN[(e+1)%au]},T)<0){--C}}}}return C===0?ia:lE}function ok(T){var oM={};if(T.lng<hu[0]-0.4||T.lat<hu[1]-0.4||T.lng>hu[2]+0.4||T.lat>hu[3]+0.4){oM.lng=T.lng;oM.lat=T.lat;return oM}else{if(lT(T,g7,g5,mg)){oM=jh(T);return oM}}var e=0;var oP=fG;var C=0;var oN=new kQ();var oO=1;if(cL(T)===ia){for(var oL=0;oL<au;++oL){var oK=new gV(eP[oL],eN[oL],eP[(oL+1)%au],eN[(oL+1)%au]);oN.ll.lng=oK.mbr.ll.lng-0.5;oN.ll.lat=oK.mbr.ll.lat-0.5;oN.ru.lng=oK.mbr.ru.lng+0.5;oN.ru.lat=oK.mbr.ru.lat+0.5;if(oN.contains(T)===ia){continue}C=jE(T,oK);if(C<oP){oP=C}}if(oP<fG){e=(fG-oP)/fG;oO=2}}else{oO=3;e=1}var oQ=jh(T);oM={lng:T.lng+(oQ.lng-T.lng)*e,lat:T.lat+(oQ.lat-T.lat)*e};return oM}function hx(i){var C={};if(i.lng<E[0]-0.4||i.lat<E[1]-0.4||i.lng>E[2]+0.4||i.lat>E[3]+0.4){C.lng=i.lng;C.lat=i.lat;return C}else{if(lT(i,ds,dp,mg)){C=bL(i);return C}}var e=ok(i);if(i.lng===e.lng&&i.lat===e.lng){C.lng=i.lng;C.lat=i.lat;return C}return decryptPt1(i,ok)}function md(i,e){if(e===3&&i instanceof d9){var C=ok(i);return new d9(C.lng,C.lat)}else{return i}}function g9(i,e){if(e===3&&i instanceof d9){var C=hx(i);return new d9(C.lng,C.lat)}else{if(e===5&&i instanceof d9){return new d9(i.lng,i.lat)}else{return i}}}function iM(i,e){if(i&&!lT(i,g7,g5,mg)){return i}switch(e){case BMAP_COORD_GCJ02:var C=fU.transform([i.lng,i.lat],fU.GCJ02,fU.BD09LL);return new d9(C[0],C[1]);case BMAP_COORD_WGS84:var C=fU.transform([i.lng,i.lat],fU.WGS84,fU.BD09LL);return new d9(C[0],C[1]);case 3:var C=fU.transform([i.lng,i.lat],fU.GCJ02,fU.BD09LL);return new d9(C[0],C[1]);default:return i}}function m0(i,e){if(i&&!lT(i,g7,g5,mg)){return i}switch(e){case BMAP_COORD_GCJ02:var C=fU.transform([i.lng,i.lat],fU.BD09LL,fU.GCJ02);return new d9(C[0],C[1]);case BMAP_COORD_WGS84:var C=fU.transform([i.lng,i.lat],fU.BD09LL,fU.WGS84);return new d9(C[0],C[1]);case 3:var C=fU.transform([i.lng,i.lat],fU.BD09LL,fU.GCJ02);return new d9(C[0],C[1]);default:return i}}function u(oL){if(!oL){oL={}}var oM=JSON.stringify(oL);var oK=0,C,T,e;if(oM.length===0){return oK}for(C=0,e=oM.length;C<e;C++){T=oM.charCodeAt(C);oK=((oK<<5)-oK)+T;oK|=0}return oK}function eR(){var i=new Date().getTime();var e="xxxyxxxy".replace(/[xy]/g,function(T){var C=(i+Math.random()*16)%16|0;i=Math.floor(i/16);return(T=="x"?C:(C&3|8)).toString(16)});return e}function b1(e,i){return Math.atan2(i,e)*180/Math.PI}function fc(oM,C,i){var e=[],oL=[];e[0]=oM[0]-C[0];e[1]=oM[1]-C[1];oL[0]=i[0]-C[0];oL[1]=i[1]-C[1];var oK=e[0]*oL[0]+e[1]*oL[1];var T=Math.sqrt((e[0]*e[0])+(e[1]*e[1]))*Math.sqrt(oL[0]*oL[0])+Math.sqrt(oL[1]*oL[1]);return Math.acos(oK/T)/Math.PI*180}function jX(oN,C,i){var e=[],oM=[];e[0]=oN[0]-C[0];e[1]=oN[1]-C[1];oM[0]=i[0]-C[0];oM[1]=i[1]-C[1];var oK=e[0]*oM[1]-e[1]*oM[0];var oL=e[0]*oM[0]+e[1]*oM[1];var T=Math.atan2(oK,oL);return T*180/Math.PI}var df=0;function iW(){return df++}function b6(i,oL){var C=i.toLowerCase();var T=C.lastIndexOf("?");var e=C.lastIndexOf("#");var oK=Math.max(T,e);if(oK===-1){return i+"?"+oL}return i+"&"+oL}function jp(oK){if(oK instanceof Array&&oK.length>=3){var T=oK[0]||0;var C=oK[1]||0;var e=oK[2]||0;var i=oK[3]||1}else{var T=(oK)&255;var C=(oK>>8)&255;var e=(oK>>16)&255;var i=(oK>>24)&255}if(!oK){return 0}return T+C*256+e*65536-1}function l(e){var i=true;var C=e.charAt(0);switch(C){case"\n":return"\\n";break;case"\r":return"\\r";break;case"'":return"\\'";break;case'"':return'\\"';break;case"&":return"\\&";break;case"\\":return"\\\\";break;case"\t":return"\\t";break;case"\b":return"\\b";break;case"\f":return"\\f";break;case"/":return"\\x2F";break;case"<":return"\\x3C";break;case">":return"\\x3E";break;default:i=false;break}if(!i){return e}}function b(oK){var C=oK;var T="";var e=0;for(e=0;e<C.length;e++){T=T+l(C.charAt(e))}return T}function bT(){if(!URL){return{origin:"",protocol:"https:"}}try{var T=window.location.href;var i=new URL(T);if(i.protocol!=="http:"&&i.protocol!=="https:"){return{origin:"",protocol:"https:"}}return i}catch(C){return{origin:"",protocol:"https:"}}}function gF(oK,T){if(typeof document==="undefined"||!document.documentElement){return T}try{var i=window.getComputedStyle(document.documentElement).getPropertyValue(oK);i=i&&i.trim();return i||T}catch(C){return T}}var c4={};c4[0]=[0,0];c4[1]=[1,0];c4[2]=[0,1];c4[3]=[1,1];c4[4]=[0.5,0];c4[5]=[0,0.5];c4[6]=[0.5,0.5];c4[7]=[1,0.5];c4[8]=[0.5,1];function nt(T,C,e){var i=c4[T];if(!i){return null}return new mU(Math.floor(C*i[0]),Math.floor(e*i[1]))}function fq(){if(!K.uiVersionIsGL()){var e=gF("--bmap-color-primary","#1677ff");var i=gF("--bmap-color-primary-bg","#eaf1ff");return{strokeColor:e,fillColor:i,labelBorderColor:e,labelTextColor:e,labelBackground:"#fff"}}return{strokeColor:"#000",fillColor:"#fff",labelBorderColor:"#f00",labelTextColor:"#000",labelBackground:"#fff"}}function np(){var C=function(oY,oX){var oW={"\x6c\x78\x61\x78\x78":"\x78\x65\x61","\x61\x65\x65\x6d\x78":"\x61\x65\x61\x69","\x64\x64\x61\x78\x6d":function(o5,T){return o5(T)},"\x68\x6d\x61\x65\x61":"\x64\x61\x65","\x78\x65\x64\x65\x63":"\x6d\x64\x61","\x63\x61\x61\x78\x61":function(o5,T){return o5+T},"\x63\x61\x61\x68\x69":function(o5,T){return o5(T)},"\x6c\x61\x65\x78\x6d":function(o6,o5,T){return o6(o5,T)},"\x78\x69\x61\x61\x63":function(T,o5){return T(o5)},"\x65\x6d\x6c\x69\x65":function(o5,T){return o5(T)},"\x68\x6c\x65\x61\x61":function(o5,T){return o5+T},"\x64\x63\x61\x61\x68":function(o5,T){return o5(T)},"\x69\x61\x6d\x6c\x6d":function(o5,T){return o5<T}};var oV="\x31\x2e\x31\x2e\x32";function oU(o6,o5){var T=oW["\x6c\x78\x61\x78\x78"];while(T!==oW["\x61\x65\x65\x6d\x78"]){switch(T){case"\x61\x69\x6c":return o7;case"\x6d\x64\x61":for(var pa=0;pa<o8;pa++){var o9=oW["\x64\x64\x61\x78\x6d"](o5,o6[pa]);o7["\x70\x75\x73\x68"](o9)}T="\x61\x69\x6c";break;case"\x78\x65\x61":var o8=o6["\x6c\x65\x6e\x67\x74\x68"];T=oW["\x68\x6d\x61\x65\x61"];break;case oW["\x68\x6d\x61\x65\x61"]:var o7=[];T=oW["\x78\x65\x64\x65\x63"];break}}}var oT,oS,oR,oQ,oP,oO=decodeURIComponent,oN="\x43\x68\x61\x72",oM="";var oL=[C];oT="\x64\x65";oS="\x66\x72";oR="\x6f";oP=oW["\x63\x61\x61\x78\x61"](oS+oR,"\x6d");oQ=oW["\x68\x6c\x65\x61\x61"]("\x43\x6f",oT);var oK=function(T){return oW["\x63\x61\x61\x78\x61"](T,oM)["\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72"][oP+oN+oQ](T)};var o4=function(T){var o5={"\x65\x61\x6c\x68\x69":function(o7,o6){return oW["\x63\x61\x61\x68\x69"](o7,o6)}};return oW["\x6c\x61\x65\x78\x6d"](oU,T,function(o6){return o5["\x65\x61\x6c\x68\x69"](oK,o6)})};var o0=o4["\x63\x61\x6c\x6c"](oK,[39,34,37,96,60,120,97,65,98,66,99,67,100,68,101,69,102,70,103,110,109,111,112,48,49,50,51,52,53,54,55,56,57]);var oZ=oU([28782,27702,26416,25167,24183],function(T){return oW["\x78\x69\x61\x61\x63"](oO,T)});var o3=o4["\x63\x61\x6c\x6c"](oZ,[22354,22749,24415,23346,22257,22688,24306,25174,23595,25547,22984,25690,22212,27547,21594,27210,23090,29193,22394,29368,29532,29459,29530,24146,24500,26352,27441,28788,29370,27673,26925,25249,24430]),o2={};oZ=oW["\x64\x63\x61\x61\x68"](o4,oZ);var o1=new RegExp(oZ["\x6a\x6f\x69\x6e"]("\x7c"));for(var oT=0;oW["\x69\x61\x6d\x6c\x6d"](oT,o0["\x6c\x65\x6e\x67\x74\x68"]);oT++){o2[o3[oT]]=o0[oT]}oX=oW["\x6c\x61\x65\x78\x6d"](oU,oX["\x73\x70\x6c\x69\x74"](oM),function(T){return o2[T]||T})["\x6a\x6f\x69\x6e"](oM);return oU(oX["\x73\x70\x6c\x69\x74"](o1),function(T){return oW["\x65\x6d\x6c\x69\x65"](oO,T)})}(this,"\x6c\u545a\u72b8\u577a\x74\x68\u624f\u545a\u735c\u5ef2\u735c\u545a\u6c36\x69\u5ef2\u545a\u545a\u58a0\u5e77\u56c4\u58a0\u59c8\x6c\x69\u6c36\u545a\u56c4\u58a0\u59c8\u545a\u6c36\u56c4\u56c4\u545a\u545a\u59c8\u5e77\x73\x75\u5c2b\x73\x74\x72\u624f\u59c8\u58a0\u56c4\u5ef2\u735c\u624f\x69\u72b8\u56c4\u545a\u58a0\x4f\u5a32\u6c36\x68\u58a0\u545a\u545a\u735c\u5e77\u58a0\x6c\u545a\x6c\x6c\u5e77\x68\u5ef2\u5ef2\u6c36\u735c\u545a\u735c\u6730\x48\u5e52\u6256\u5f6e\x50\u62a1\x50\u692d\x59\u6c19\u6256\u63cb\x51\x4f\u5e52\u706e\u59c8\x69\x6c\u6c36\x6c\u58a0\u59c8\u706e\u545a\u5ef2\u5ef2\u624f\u7209\u72ba\x4c\u66f0\x4f\u6c19\x52\u6c19\u6256\u6b9b\u62a1\u5f6e\u5f6e\u5e52\x4f\u5e77\u56c4\x6c\u545a\u56c4\x69\u6730\u59c8\u545a\u545a\u545a\u706e\u545a\u58a0\x6c\u5ef2\u735c\u6730\u5f5f\u66f0\u6c19\x73\x69\u577a\u72b8\u5f5f\u6b31\u6b9b\u6730\x73\x75\u5c2b\x73\x74\x72\x69\u72b8\u577a\u706e\u5ef2\u58a0\u545a\x6c\u56c4");(function(oL,oK){var T=function(oM){while(--oM){oL.push(oL.shift())}};T(++oK)}(C,491));var i=function(oL,oK){oL=oL-0;var T=C[oL];return T};function e(oO){var oN={"\x64\x6c\x65\x64\x69":function(oR,oQ){return oR!==oQ},"\x65\x78\x6c\x61\x6d":i("0x0"),"\x61\x78\x65\x6c\x64":function(oQ,oR){return oQ-oR},"\x65\x6d\x61\x6d\x65":i("0x1"),"\x69\x61\x65\x65\x78":i("0x2"),"\x64\x78\x63\x6c\x69":i("0x3"),"\x65\x64\x78\x63\x65":i("0x4"),"\x64\x68\x63\x6d\x68":function(oR,oQ){return oR(oQ)},"\x64\x64\x65\x65\x63":function(oR,oQ){return oR(oQ)},"\x63\x78\x64\x61\x6d":function(oR,oQ){return oR+oQ},"\x68\x78\x65\x65\x6d":i("0x5"),"\x78\x6c\x65\x6c\x6c":i("0x6")};var oM=i("0x5");while(oN[i("0x7")](oM,i("0x8"))){switch(oM){case oN[i("0x9")]:return i("0xa")+oK[i("0xb")](oN[i("0xc")](oK[i("0xd")],12));case oN[i("0xe")]:var oL=oN[i("0xf")];oM=oN[i("0x10")];break;case oN[i("0x11")]:var oK=oN["\x64\x68\x63\x6d\x68"](md5,oN[i("0x12")](md5,T+oP)+oL);oM=oN[i("0x9")];break;case oN[i("0x10")]:var T=oO[i("0x13")](oN[i("0x14")](oO[i("0x15")]("\x3f"),1));oM=i("0x4");break;case oN[i("0x16")]:var oP=oN[i("0x17")];oM=oN["\x65\x6d\x61\x6d\x65"];break}}}return e}function ki(){}hv.extend(ki,{Request:{INITIAL:-1,WAITING:0,LOADED:1,COMPLETED:2},Dependency:{poly:["marker"],layer:["poly"],hotspot:["poly"],infowindow:["marker","hotspot"],simpleInfowindow:["marker"],tools:["marker","poly"],mapgl:["glcommon","poly"],earth:["glcommon"],control:["scommon"],scommon:[],localSearch:["scommon"],otherSearch:["scommon"],route:["scommon"],buslineSearch:["route"],autocomplete:["scommon"],mvtParse:["marker","poly","style"],panorama:["glcommon"],visual:["mapgl"],visualold:["style","mapgl"]},MD5Mapping:{control:"ki3cxy",marker:"gr3nte",poly:"0gq4ob",layer:"g2sasv",infowindow:"fj4ukm",simpleInfowindow:"puz4v0",hotspot:"4wut2x",menu:"ar0ymx",tools:"hdqtl0",oppc:"5wrpin",oppcgl:"candte",mapgl:"5lsoga",markeranimation:"pjygxw",earth:"2ylfwn",glcommon:"mp5vfj",localSearch:"vnv4lf",scommon:"zzbpg0",otherSearch:"oz30jf",route:"fwik03",buslineSearch:"mbtfho",autocomplete:"wdi0up",style:"xjftwm",mvtParse:"ie5afn",place:"hglokd",panorama:"deunb5",visual:"ymuo4n",visualold:"zcxtiz"},Config:{baseUrl:(function(){var e=ep();var i=e==="gl"?"/getmodules?v=1.0&type=webgl":"/getmodules?v="+e;return window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]?window._BMapSecurityConfig["serviceHost"]+i:K.apiHost+i})(),jsModPath:(bb.inMapHost?"":K.mapHost)+"/res/newui/",timeout:5000},delayFlag:false,Module:{modules:{},modulesNeedToLoad:[]},_getMd5ModsStr:function(oL){var oK=[];for(var oN=0,C=oL.length;oN<C;oN++){var oM=oL[oN];var e=this.MD5Mapping[oM];var T="$"+oM+"$";if(e!==T){oK.push(oM+"_"+e)}}return oK.join(",")},load:function(i,oL,T){var e=this.getModuleInfo(i);if(e.status===this.Request.COMPLETED){if(T===true){oL()}}else{if(e.status===this.Request.INITIAL){this.combine(i);this.addToLoadQueue(i);var C=this;if(C.delayFlag===false){C.delayFlag=true;setTimeout(function(){var oM=C.Config.baseUrl+"&mod="+C._getMd5ModsStr(C.Module.modulesNeedToLoad);jW.load(oM);C.Module.modulesNeedToLoad.length=0;C.delayFlag=false},1)}e.status=this.Request.WAITING;function oK(oO){var oN=C.getModuleInfo(i);if(oN.status!==C.Request.COMPLETED){if(window.map&&window.map.fire){var oM=new ix("onmod_timeout");oM.timeout=oO/1000;oM.moduleName=i;window.map.fire(oM)}}}setTimeout(oK,this.Config.timeout,this.Config.timeout);setTimeout(oK,this.Config.timeout*2,this.Config.timeout*2)}if(oL){e.callbacks.push(oL)}}},combine:function(e){if(e&&this.Dependency[e]){var T=this.Dependency[e];for(var C=0;C<T.length;C++){this.combine(T[C]);if(!this.Module.modules[T[C]]){this.addToLoadQueue(T[C])}}}},addToLoadQueue:function(e){var i=this.getModuleInfo(e);if(i.status===this.Request.INITIAL){i.status=this.Request.WAITING;this.Module.modulesNeedToLoad.push(e)}},_pendingModuleCode:null,_evalModuleCode:function(){return eval(this._pendingModuleCode)},run:function(C,T){var oN=this.getModuleInfo(C);var oQ=this.Dependency[C];if(oQ){for(var oL=0;oL<oQ.length;oL++){var oM=this.getModuleInfo(oQ[oL]);if(oM.status!==this.Request.COMPLETED){oM.modsNeedToRun.push({name:C,code:T});return}}}try{this._pendingModuleCode=T;this._evalModuleCode()}catch(oO){return}finally{this._pendingModuleCode=null}if(!K.apiVersionIsGL()){hi.mirrorWindowGlobalsToExports(cv)}oN.status=this.Request.COMPLETED;for(var oL=0,oK=oN.callbacks.length;oL<oK;oL++){oN.callbacks[oL]()}oN.callbacks.length=0;for(oL=0;oL<oN.modsNeedToRun.length;oL++){var oP=oN.modsNeedToRun[oL];this.run(oP.name,oP.code)}oN.modsNeedToRun.length=0},getModuleInfo:function(i){var e;if(!this.Module.modules[i]){this.Module.modules[i]={status:this.Request.INITIAL,callbacks:[],modsNeedToRun:[]}}e=this.Module.modules[i];return e}});window._jsload=function(oK,oL){var i=ki.getModuleInfo(oK);i.status=ki.Request.LOADED;if(oL!==""){ki.run(oK,oL)}else{if(window.map&&window.map.fire){var e=new ix("ongetmodules_fail");e.moduleName=oK;window.map.fire(e)}var C=document.createElement("script");var T=ki.MD5Mapping[oK];C.src=ki.Config.jsModPath+oK+"_"+T+".js";document.getElementsByTagName("head")[0].appendChild(C)}};function eJ(){this._timeData={}}var cs;if(typeof window!=="undefined"){cs=window}else{cs=self}eJ.prototype.mark=function(e){this._timeData[e]=this._getTime()};eJ.prototype.getMark=function(e){return this._timeData[e]};eJ.prototype.getTime=function(i,e){return parseFloat((this._timeData[e]-this._timeData[i]).toFixed(2))};eJ.prototype.print=function(){};eJ.prototype.clear=function(){this._timeData={}};if(cs.performance&&cs.performance.now){eJ.prototype._getTime=function(){return performance.now()}}else{eJ.prototype._getTime=function(){return Date.now()}}!function(i,C){C(i.d3=i.d3||{})}(window,function(pn){function pF(pL,pM,C,T){function e(i){return pL(i=new Date(+i)),i}return e.floor=e,e.ceil=function(i){return pL(i=new Date(i-1)),pM(i,1),pL(i),i},e.round=function(i){var pN=e(i),pO=e.ceil(i);return pO-i>i-pN?pN:pO},e.offset=function(i,pN){return pM(i=new Date(+i),null==pN?1:Math.floor(pN)),i},e.range=function(pO,i,pN){var pP=[];if(pO=e.ceil(pO),pN=null==pN?1:Math.floor(pN),!(i>pO&&pN>0)){return pP}do{pP.push(new Date(+pO))}while(pM(pO,pN),pL(pO),i>pO);return pP},e.filter=function(i){return pF(function(pN){for(;pL(pN),!i(pN);){pN.setTime(pN-1)}},function(pN,pO){for(;--pO>=0;){for(;pM(pN,1),!i(pN);){}}})},C&&(e.count=function(i,pN){return pp.setTime(+i),pt.setTime(+pN),pL(pp),pL(pt),Math.floor(C(pp,pt))},e.every=function(i){return i=Math.floor(i),isFinite(i)&&i>0?i>1?e.filter(T?function(pN){return T(pN)%i===0}:function(pN){return e.count(0,pN)%i===0}):e:null}),e}function pu(e){return pF(function(i){i.setDate(i.getDate()-(i.getDay()+7-e)%7),i.setHours(0,0,0,0)},function(i,C){i.setDate(i.getDate()+7*C)},function(i,C){return(C-i-(C.getTimezoneOffset()-i.getTimezoneOffset())*po)/pC})}function pm(e){return pF(function(i){i.setUTCDate(i.getUTCDate()-(i.getUTCDay()+7-e)%7),i.setUTCHours(0,0,0,0)},function(i,C){i.setUTCDate(i.getUTCDate()+7*C)},function(i,C){return(C-i)/pC})}var pp=new Date,pt=new Date,pA=pF(function(){},function(i,C){i.setTime(+i+C)},function(i,C){return C-i});pA.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?pF(function(i){i.setTime(Math.floor(i/e)*e)},function(i,C){i.setTime(+i+C*e)},function(i,C){return(C-i)/e}):pA:null};var pJ=pA.range,pH=1000,po=60000,pE=3600000,pw=86400000,pC=604800000,oQ=pF(function(e){e.setTime(Math.floor(e/pH)*pH)},function(i,C){i.setTime(+i+C*pH)},function(i,C){return(C-i)/pH},function(e){return e.getUTCSeconds()}),pG=oQ.range,pv=pF(function(e){e.setTime(Math.floor(e/po)*po)},function(i,C){i.setTime(+i+C*po)},function(i,C){return(C-i)/po},function(e){return e.getMinutes()}),oY=pv.range,pi=pF(function(i){var C=i.getTimezoneOffset()*po%pE;0>C&&(C+=pE),i.setTime(Math.floor((+i-C)/pE)*pE+C)},function(i,C){i.setTime(+i+C*pE)},function(i,C){return(C-i)/pE},function(e){return e.getHours()}),pB=pi.range,o8=pF(function(e){e.setHours(0,0,0,0)},function(i,C){i.setDate(i.getDate()+C)},function(i,C){return(C-i-(C.getTimezoneOffset()-i.getTimezoneOffset())*po)/pw},function(e){return e.getDate()-1}),oP=o8.range,o5=pu(0),o7=pu(1),oL=pu(2),o3=pu(3),oS=pu(4),pl=pu(5),ps=pu(6),oN=o5.range,pk=o7.range,oW=oL.range,ph=o3.range,px=oS.range,pj=pl.range,pI=ps.range,pz=pF(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(i,C){i.setMonth(i.getMonth()+C)},function(i,C){return C.getMonth()-i.getMonth()+12*(C.getFullYear()-i.getFullYear())},function(e){return e.getMonth()}),pK=pz.range,o2=pF(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(i,C){i.setFullYear(i.getFullYear()+C)},function(i,C){return C.getFullYear()-i.getFullYear()},function(e){return e.getFullYear()});o2.every=function(e){return isFinite(e=Math.floor(e))&&e>0?pF(function(i){i.setFullYear(Math.floor(i.getFullYear()/e)*e),i.setMonth(0,1),i.setHours(0,0,0,0)},function(i,C){i.setFullYear(i.getFullYear()+C*e)}):null};var oV=o2.range,pq=pF(function(e){e.setUTCSeconds(0,0)},function(i,C){i.setTime(+i+C*po)},function(i,C){return(C-i)/po},function(e){return e.getUTCMinutes()}),pa=pq.range,o9=pF(function(e){e.setUTCMinutes(0,0,0)},function(i,C){i.setTime(+i+C*pE)},function(i,C){return(C-i)/pE},function(e){return e.getUTCHours()}),o6=o9.range,o4=pF(function(e){e.setUTCHours(0,0,0,0)},function(i,C){i.setUTCDate(i.getUTCDate()+C)},function(i,C){return(C-i)/pw},function(e){return e.getUTCDate()-1}),o1=o4.range,o0=pm(0),oZ=pm(1),oX=pm(2),oU=pm(3),oT=pm(4),oO=pm(5),oM=pm(6),oK=o0.range,pg=oZ.range,pD=oX.range,pr=oU.range,py=oT.range,pf=oO.range,pe=oM.range,pd=pF(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(i,C){i.setUTCMonth(i.getUTCMonth()+C)},function(i,C){return C.getUTCMonth()-i.getUTCMonth()+12*(C.getUTCFullYear()-i.getUTCFullYear())},function(e){return e.getUTCMonth()}),pc=pd.range,oR=pF(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(i,C){i.setUTCFullYear(i.getUTCFullYear()+C)},function(i,C){return C.getUTCFullYear()-i.getUTCFullYear()},function(e){return e.getUTCFullYear()});oR.every=function(e){return isFinite(e=Math.floor(e))&&e>0?pF(function(i){i.setUTCFullYear(Math.floor(i.getUTCFullYear()/e)*e),i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0)},function(i,C){i.setUTCFullYear(i.getUTCFullYear()+C*e)}):null};var pb=oR.range;pn.timeInterval=pF,pn.timeMillisecond=pA,pn.timeMilliseconds=pJ,pn.utcMillisecond=pA,pn.utcMilliseconds=pJ,pn.timeSecond=oQ,pn.timeSeconds=pG,pn.utcSecond=oQ,pn.utcSeconds=pG,pn.timeMinute=pv,pn.timeMinutes=oY,pn.timeHour=pi,pn.timeHours=pB,pn.timeDay=o8,pn.timeDays=oP,pn.timeWeek=o5,pn.timeWeeks=oN,pn.timeSunday=o5,pn.timeSundays=oN,pn.timeMonday=o7,pn.timeMondays=pk,pn.timeTuesday=oL,pn.timeTuesdays=oW,pn.timeWednesday=o3,pn.timeWednesdays=ph,pn.timeThursday=oS,pn.timeThursdays=px,pn.timeFriday=pl,pn.timeFridays=pj,pn.timeSaturday=ps,pn.timeSaturdays=pI,pn.timeMonth=pz,pn.timeMonths=pK,pn.timeYear=o2,pn.timeYears=oV,pn.utcMinute=pq,pn.utcMinutes=pa,pn.utcHour=o9,pn.utcHours=o6,pn.utcDay=o4,pn.utcDays=o1,pn.utcWeek=o0,pn.utcWeeks=oK,pn.utcSunday=o0,pn.utcSundays=oK,pn.utcMonday=oZ,pn.utcMondays=pg,pn.utcTuesday=oX,pn.utcTuesdays=pD,pn.utcWednesday=oU,pn.utcWednesdays=pr,pn.utcThursday=oT,pn.utcThursdays=py,pn.utcFriday=oO,pn.utcFridays=pf,pn.utcSaturday=oM,pn.utcSaturdays=pe,pn.utcMonth=pd,pn.utcMonths=pc,pn.utcYear=oR,pn.utcYears=pb,Object.defineProperty(pn,"__esModule",{value:!0})});function hH(e){this._elemType=e;this._objCollection={}}hH.prototype.get=function(){var i=null;for(var e in this._objCollection){if(this._objCollection[e]&&this._objCollection[e]._free===true){this._objCollection[e]._free=false;return this._objCollection[e]}}i=da(this._elemType);e=cv.getGUID("obj_pool_");this._objCollection[e]=i;return i};hH.prototype.free=function(e){if(!e){return}e._free=true;if(e.tagName.toLowerCase()==="img"){e.src="";e.crossOrigin=null;e.onload=e.onerror=null}};hH.prototype.clear=function(){for(var e in this._objCollection){if(this._objCollection[e]&&this._objCollection[e].tagName.toLowerCase==="img"){this._objCollection[e].onload=this._objCollection[e].onerror=null}}this._objCollection={}};var lI={get:function(i,oK,e,C){var T=new XMLHttpRequest();T.open("GET",i,true);T.timeout=10000;T.ontimeout=function(){C&&C()};T.onreadystatechange=function(oL){if(this.readyState===4){if(this.status===200){oK&&oK(T.responseText)}else{e&&e()}}};T.send()},post:function(i,oL,oK,e,C){var T=new XMLHttpRequest();T.open("POST",i,true);T.setRequestHeader("Content-type","application/x-www-form-urlencoded");T.timeout=10000;T.ontimeout=function(){C&&C()};T.onreadystatechange=function(oM){if(this.readyState===4){if(this.status===200){oK&&oK(T.responseText,oL)}else{e&&e()}}};T.send(oL);return T}};var jW=(function(e){function i(oL,C,oK){if(oL.indexOf("v=")===-1){oL+="&v="+ep()}var T=da("script",{src:oL,type:"text/javascript",charset:"utf-8"});if(T.addEventListener){T.addEventListener("load",function(oN){var oM=oN.target;oM.parentNode.removeChild(oM);C&&C()},false);T.addEventListener("error",function(oN){if(oN){var oM=oN.target;oM&&oM.parentNode&&oM.parentNode.removeChild(oM)}oK&&oK(null)},false)}else{if(T.attachEvent){T.attachEvent("onreadystatechange",function(oN){var oM=window.event.srcElement;if(oM&&(oM.readyState==="loaded"||oM.readyState==="complete")){oM.parentNode.removeChild(oM)}C&&C()})}}e.getElementsByTagName("head")[0].appendChild(T)}return{load:function(oM,C,T){if(typeof oM==="string"){i(oM,C,T)}else{if(oM.length>0){var oL=oM.length;for(var oK=0;oK<oL;oK++){i(oM[oK],function(){oL--;if(oL===0&&C){C()}})}}}}}})(window.document);function lA(){}lA.instances={};lA.getInstance=function(i,C){if(lA.instances[i]){return lA.instances[i]}var e=new oG(i,C);lA.instances[i]=e;return e};function oG(e,i){this._name=e;this._baseZoom=18;this._opts={tileSize:256};hv.extend(this._opts,i||{})}oG.mapZoomBaseIndex=[8,8,8,8,7,7,6,6,5,5,4,3,3,3,2,2,1,1,0,0,0,0,0,0,0,0];oG.baseScaleZoom=[19,17,15,12,10,9,7,5,3];oG.baseScaleZoomMercatorSize=[512,2048,4096,32768,65536,262144,1048576,4194304,8388608];oG.mapZoomBaseZoomMapping=[3,3,3,3,5,5,7,7,9,9,10,12,12,12,15,15,17,17,19,19,19,19,19,19,19,19];oG.mapZoomStartZoomMapping=[3,3,3,3,4,4,6,6,8,8,10,11,11,11,14,14,16,16,18,18,18,18,18,18,18,18];oG.baseScaleTileSize=[1024,1024,512,512,256,512,512,512,256];oG.mapZoomTileSize=[256,256,256,256,256,512,256,512,256,512,256,256,512,1024,256,512,512,1024,512,1024,2048,4096,4096*2,4096*2*2,4096*2*2*2,4096*2*2*2*2];oG.baseZoomInfo={"3":[3],"5":[4,5],"7":[6,7],"9":[8,9],"10":[10],"12":[11,12,13],"15":[14,15],"17":[16,17],"19":[18,19,20,21,22,23,24,25]};oG.prototype={getName:function(){return this._name},getTileSize:function(e){e=Math.floor(e);if(e<3){e=3}if(this._name==="na"){return oG.mapZoomTileSize[e]}return this._opts.tileSize},getBaseTileSize:function(i){i=Math.floor(i);if(this._name==="na"){var e=oG.mapZoomBaseZoomMapping[i];return oG.mapZoomTileSize[e]}return this._opts.tileSize},getDataZoom:function(e){e=Math.floor(e);if(this._name==="na"){return oG.mapZoomBaseZoomMapping[e]}return e},getZoomUnits:function(e){return Math.pow(2,(this._baseZoom-e))},getMercatorSize:function(C,i){if(this._name==="na"){C=Math.floor(C);var e=oG.mapZoomBaseIndex[C];return oG.baseScaleZoomMercatorSize[e]}return this._opts.tileSize*this.getZoomUnits(i)},getBaseZoom:function(){return this._baseZoom},getParentTile:function(T,oP,oO,C,i){if(this._name==="na"){var oK=oG.baseZoomInfo[oO];C--;if(oK.indexOf(C)>-1){return{col:T,row:oP,zoom:oO,useZoom:C}}else{var oM=oG.mapZoomBaseIndex[oO];var oL=oG.baseScaleZoom[oM+1];if(!oL){return null}var oN=this.getFactorByZooms(oL,oO);var e=oG.baseZoomInfo[oL];return{col:Math.floor(T/oN),row:Math.floor(oP/oN),zoom:oL,useZoom:e[e.length-1]}}return null}if(oO-1<i){return null}return{col:Math.floor(T/2),row:Math.floor(oP/2),zoom:oO-1,useZoom:oO-1}},getChildTiles:function(oK,oM,e,C,oT,oZ){if(this._name==="na"){var T=oG.baseZoomInfo[e];C+=oZ;if(T.indexOf(C)>-1){return[{col:oK,row:oM,zoom:e,useZoom:C}]}else{var oX=0;var oU=e;while(oX<oZ){var oY=oG.mapZoomBaseIndex[oU];var oO=oG.baseScaleZoom[oY-1];if(!oO){return null}var oP=oG.baseZoomInfo[oO];if(oP[oZ-1]){var oQ=[];var oS=this.getFactorByZooms(e,oO);var i=oK*oS;var oR=oM*oS;for(var oW=0;oW<oS;oW++){var oL=i+oW;for(var oV=0;oV<oS;oV++){var oN=oR+oV;oQ.push({col:oL,row:oN,zoom:oO,useZoom:oP[oZ-1]})}}return oQ}oX+=oP.length;if(oZ===oP.length){oU=oO}}}return null}var oQ=[];if(e+oZ>oT){return null}var oS=Math.pow(2,oZ);var i=oK*oS;var oR=oM*oS;var oO=e+oZ;var oQ=[];for(var oW=0;oW<2;oW++){var oL=i+oW;for(var oV=0;oV<2;oV++){var oN=oR+oV;oQ.push({col:oL,row:oN,zoom:oO,useZoom:oO})}}return oQ},getFactorByZooms:function(i,T){var C=oG.mapZoomBaseIndex[i];var oK=oG.mapZoomBaseIndex[T];var e=oG.baseScaleZoomMercatorSize[C];var oL=oG.baseScaleZoomMercatorSize[oK];return e/oL}};var eV={};var ao=["swiftshader","microsoft basic render driver"];var kJ=["intel","nvidia","amd","apple","geforce"];function jI(e){e=e.toLowerCase();if(ao.indexOf(e)>=0){return true}if(e.indexOf("mobile")>=0){return true}return false}function ed(C){C=C.toLowerCase();for(var e=0;e<kJ.length;e++){if(C.indexOf(kJ[e])>=0){return true}}return false}function oC(e){if(!e){return false}if(jI(e)){return false}if(ed(e)){return true}return false}eV.ifEnableEarth=function(i){var e=eV.ifEnableEarth;if(!i&&typeof e._enable==="boolean"){return e._enable}if(eV.ifSupportWebGL()){e._enable=true;return true}e._enable=false;return false};eV.ifEnableWebGLMap=function(i){var e=eV.ifEnableWebGLMap;if(!i&&typeof e._enable==="boolean"){return e._enable}if(eV.ifSupportWebGL()){if(bb.inMapHost){e._enable=true;return true}else{if(window.Blob||window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder){e._enable=true;return true}else{e._enable=false;return false}}}e._enable=false;return false};eV.params={};eV.ifSupportWebGL=function(){var i=eV.ifSupportWebGL;if(typeof i._supportWebGL==="boolean"){return i._supportWebGL}if(!window.WebGLRenderingContext){i._supportWebGL=false;return false}var C=document.createElement("canvas");C.width=300;C.height=150;var oK=null;var oQ={alpha:true,antialias:false,failIfMajorPerformanceCaveat:false,preserveDrawingBuffer:false,stencil:false};try{oK=C.getContext("webgl",oQ)||C.getContext("experimental-webgl",oQ)}catch(oM){i._supportWebGL=false}if(oK===null){i._supportWebGL=false}else{i._supportWebGL=true;var oO=oK.getExtension("WEBGL_debug_renderer_info");var oN="";if(oO){oN=oK.getParameter(oO.UNMASKED_RENDERER_WEBGL);if(oC(oN)===true){i._supportWebGL=true}var oP=oK.getParameter(oO.UNMASKED_VENDOR_WEBGL);i._renderer=oN;i._vendor=oP}if(!oO&&hv.Browser.firefox){i._supportWebGL=true}if(!oO&&hv.Platform.macintosh){i._supportWebGL=true}if(oK.drawingBufferWidth!==C.width||oK.drawingBufferHeight!==C.height){i._supportWebGL=false}if(oK.getParameter(oK.MAX_VERTEX_TEXTURE_IMAGE_UNITS)<4){i._supportWebGL=false}var T=oK.getParameter(oK.MAX_TEXTURE_SIZE);eV.params.maxTextureSize=T;if(T<4096){i._supportWebGL=false}var oL=oK.getParameter(oK.MAX_TEXTURE_IMAGE_UNITS);if(oL<8){i._supportWebGL=false}if(oK.getShaderPrecisionFormat&&!oK.getShaderPrecisionFormat(oK.FRAGMENT_SHADER,oK.HIGH_FLOAT)){kU.sendMessage("Monitor","ShaderPrecision","sys_"+oN);return i._supportWebGL}if(!oK.getShaderPrecisionFormat||!oK.getShaderPrecisionFormat(oK.FRAGMENT_SHADER,oK.HIGH_FLOAT)){kU.sendMessage("Monitor","ShaderPrecision","sys_"+oN);return i._supportWebGL}if(!oK.getShaderPrecisionFormat||oK.getShaderPrecisionFormat(oK.FRAGMENT_SHADER,oK.HIGH_FLOAT).precision<23){i._supportWebGL=false}}return i._supportWebGL};eV.ifSupportCanvas2d=function(){var oK=eV.ifSupportCanvas2d;if(typeof oK.supportCanvas2d==="boolean"){return oK.supportCanvas2d}var C=document.createElement("canvas");var i=null;try{i=C.getContext("2d")}catch(T){oK.supportCanvas2d=false}if(i===null){oK.supportCanvas2d=false}else{oK.supportCanvas2d=true}return oK.supportCanvas2d};eV.ifCanvas2dInBlackList=function(){return true};eV.ifEnableCanvas2dMap=function(){return false;var i=navigator.userAgent;var e=0;var T=0;var oK=0;if(/macintosh/ig.test(i)){var C=0;if(/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(i)&&!/chrome/i.test(i)){C=parseInt((RegExp["\x241"]||RegExp["\x242"]),10)}if(C>0){return false}return true}if(/windows nt (\d+\.\d)/ig.test(i)){T=parseFloat(RegExp.$1);if(T>=6.1){if(/chrome\/(\d+\.\d)/i.test(i)){e=parseFloat(RegExp.$1);if(e>=31){return true}}if(/MSIE (\d+(\.\d+)?)/.test(i)){oK=parseFloat(RegExp.$1);if(oK>=10){return true}}if(/Firefox/.test(i)){return true}if(/rv:11.0/ig.test(i)){return true}if(/edge/ig.test(i)){return true}}}return false};eV.ifSupportCSS3=function(oN,i){var oM=document.createElement("div");var oL="Webkit Moz O ms".split(" ");var e=oL.length;var C="";var T=oM.style;if(oN in T){C=oN}oN=oN.replace(/^[a-z]/,function(oO){return oO.toUpperCase()});while(e--){var oK=oL[e]+oN;if(oK in T){C=oK;break}}if(i){return C}else{return C.length>0?true:false}};eV.isModernBrowser=eV.ifSupportCanvas2d()&&eV.ifSupportCSS3("transform");function a1(i,e){this._size=i;this._curSize=0;this._cache={};this._least=null;this._most=null;this._options={clearCallback:null,removeOldCallback:null};e=e||{};for(var C in e){this._options[C]=e[C]}this._getDataTimes=0;this._hitTimes=0}a1.prototype.setData=function(T,oL){var i=this._cache;var C=this._size;if(C===0){return}var e=this._curSize;if(e===C){this._removeOld()}var oK;if(!i[T]){oK={key:T,data:oL,older:null,newwer:null};i[T]=oK;if(this._least===null){this._least=oK}if(this._most===null){this._most=oK}this._curSize++}else{oK=i[T];oK.data=oL;if(this._most===oK){return}oK.older&&(oK.older.newer=oK.newer);oK.newer&&(oK.newer.older=oK.older);if(this._least===oK){this._least=oK.newer}}if(this._most&&this._most!==oK){this._most.newer=oK;oK.older=this._most;this._most=oK;oK.newer=null}};a1.prototype.getData=function(e){var i=this._cache[e];this._getDataTimes++;if(i){this._hitTimes++;var C=i.data;if(this._most===i){return C}i.older&&(i.older.newer=i.newer);i.newer&&(i.newer.older=i.older);if(this._least===i){this._least=i.newer}this._most.newer=i;i.older=this._most;i.newer=null;this._most=i;return C}return null};a1.prototype.getAllData=function(){return this._cache};a1.prototype.getHitRate=function(){return this._hitTimes/this._getDataTimes};a1.prototype.removeData=function(i){var e=this._cache;var C=e[i];if(!C){return}if(this._options.clearCallback){this._options.clearCallback(C.data,C.key)}C.older&&(C.older.newer=C.newer);C.newer&&(C.newer.older=C.older);if(this._least===C){this._least=C.newer}if(this._most===C){this._most=C.older}delete e[i];this._curSize--};a1.prototype._removeOld=function(){var e=this._cache;var T=Math.round(this._size*0.6);var C=0;while(this._least&&C<T){var i=this._least;this._least=i.newer;i.newer&&(i.newer.older=null);if(this._options.clearCallback){this._options.clearCallback(i.data,i.key)}delete e[i.key];C++}this._curSize-=C;if(this._options.removeOldCallback){this._options.removeOldCallback()}};a1.prototype.clear=function(){var e=this._cache;var i=this._least;if(this._options.clearCallback){while(i){this._options.clearCallback(i.data,i.key);i=i.newer}}this._least=this._most=null;this._cache={};this._curSize=0};a1.prototype.forEach=function(e){var i=this._least;while(i){e(i.data);i=i.newer}};a1.prototype.clearExcept=function(i){var e=this._cache;var C=this._least;while(C){if(!i[C.key]){if(this._options.clearCallback){this._options.clearCallback(C.data,C.key)}C.older&&(C.older.newer=C.newer);C.newer&&(C.newer.older=C.older);if(this._least===C){this._least=C.newer}if(this._most===C){this._most=C.older}delete e[C.key];this._curSize--}C=C.newer}};var fU=(function(){var pu=function(){return(pu=Object.assign||function(T){for(var i,C=1,pA=arguments.length;C<pA;C++){for(var pz in i=arguments[C]){Object.prototype.hasOwnProperty.call(i,pz)&&(T[pz]=i[pz])}}return T}).apply(this,arguments)},pf=Math.sin,ph=Math.cos,pl=Math.sqrt,pk=Math.abs,py=Math.PI,pq=6378245,pe=0.006693421622965823;function pt(C,i){return C>=72.004&&C<=137.8347&&i>=0.8293&&i<=55.8271}function pw(pA,pz){var pD,i,pF,C=(pF=300+(pD=pA-105)+2*(i=pz-35)+0.1*pD*pD+0.1*pD*i+0.1*pl(pk(pD)),pF+=2*(20*pf(6*pD*py)+20*pf(2*pD*py))/3,(pF+=2*(20*pf(pD*py)+40*pf(pD/3*py))/3)+2*(150*pf(pD/12*py)+300*pf(pD/30*py))/3),T=function(pI,pH){var pG=2*pI-100+3*pH+0.2*pH*pH+0.1*pI*pH+0.2*pl(pk(pI));return pG+=2*(20*pf(6*pI*py)+20*pf(2*pI*py))/3,pG+=2*(20*pf(pH*py)+40*pf(pH/3*py))/3,pG+2*(160*pf(pH/12*py)+320*pf(pH*py/30))/3}(pA-105,pz-35),pC=pz/180*py,pB=pf(pC),pE=pl(pB=1-pe*pB*pB);return[C=180*C/(pq/pE*ph(pC)*py),T=180*T/(pq*(1-pe)/(pB*pE)*py)]}function pn(T){var i=T[0],C=T[1];if(!pt(i,C)){return[i,C]}var pz=pw(i,C);return[i+pz[0],C+pz[1]]}function pg(pA){var pE=pA[0],C=pA[1];if(!pt(pE,C)){return[pE,C]}for(var T=[pE,C],pC=T[0],pz=T[1],pD=pn([pC,pz]),pB=pD[0]-pE,pF=pD[1]-C;pk(pB)>0.000001||pk(pF)>0.000001;){pB=(pD=pn([pC-=pB,pz-=pF]))[0]-pE,pF=pD[1]-C}return[pC,pz]}var pr=Math.sin,ps=Math.cos,oT=Math.atan2,pv=Math.sqrt,pd=3000*Math.PI/180;function pj(T){var i=T[0]-0.0065,C=T[1]-0.006,pA=pv(i*i+C*C)-0.00002*pr(C*pd),pz=oT(C,i)-0.000003*ps(i*pd);return[pA*ps(pz),pA*pr(pz)]}function oX(T){var i=T[0],C=T[1],pA=pv(i*i+C*C)+0.00002*pr(C*pd),pz=oT(C,i)+0.000003*ps(i*pd);return[pA*ps(pz)+0.0065,pA*pr(pz)+0.006]}var pa=180/Math.PI,oO=Math.PI/180,oQ=6378137,px=20037508.342789244;function o2(i){return[i[0]*pa/oQ,(0.5*Math.PI-2*Math.atan(Math.exp(-i[1]/oQ)))*pa]}function pm(T){var i=Math.abs(T[0])<=180?T[0]:T[0]-360*(T[0]<0?-1:1),C=[oQ*i*oO,oQ*Math.log(Math.tan(0.25*Math.PI+0.5*T[1]*oO))];return C[0]>px&&(C[0]=px),C[0]<-px&&(C[0]=-px),C[1]>px&&(C[1]=px),C[1]<-px&&(C[1]=-px),C}var o1,o0,oZ,pc,oW,oL,o9,o6,o5,o7,oK,o4,pb=Math.abs,po=[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],oV=[75,60,45,30,15,0],oN=[[1.410526172116255e-8,0.00000898305509648872,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-0.03801003308653,17337981.2],[-7.435856389565537e-9,0.000008983055097726239,-0.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,10260144.86],[-3.030883460898826e-8,0.00000898305509983578,0.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,0.32710905363475,6856817.37],[-1.981981304930552e-8,0.000008983055099779535,0.03278182852591,40.31678527705744,0.65659298677277,-4.44255534477492,0.85341911805263,0.12923347998204,-0.04625736007561,4482777.06],[3.09191371068437e-9,0.000008983055096812155,0.00006995724062,23.10934304144901,-0.00023663490511,-0.6321817810242,-0.00663494467273,0.03430082397953,-0.00466043876332,2555164.4],[2.890871144776878e-9,0.000008983055095805407,-3.068298e-8,7.47137025468032,-0.00000353937994,-0.02145144861037,-0.00001234426596,0.00010322952773,-0.00000323890364,826088.5]],pp=[[-0.0015702102444,111320.7020616939,1704480524535203,-10338987376042340,26112667856603880,-35149669176653700,26595700718403920,-10725012454188240,1800819912950474,82.5],[0.0008277824516172526,111320.7020463578,647795574.6671607,-4082003173.641316,10774905663.51142,-15171875531.51559,12053065338.62167,-5124939663.577472,913311935.9512032,67.5],[0.00337398766765,111320.7020202162,4481351.045890365,-23393751.19931662,79682215.47186455,-115964993.2797253,97236711.15602145,-43661946.33752821,8477230.501135234,52.5],[0.00220636496208,111320.7020209128,51751.86112841131,3796837.749470245,992013.7397791013,-1221952.21711287,1340652.697009075,-620943.6990984312,144416.9293806241,37.5],[-0.0003441963504368392,111320.7020576856,278.2353980772752,2485758.690035394,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-0.0003218135878613132,111320.7020701615,0.00369383431289,823725.6402795718,0.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,0.37238884252424,7.45]];function oU(pz,C,T){var pB=pb(C)/T[9],pA=T[0]+T[1]*pb(pz),i=T[2]+T[3]*pB+T[4]*Math.pow(pB,2)+T[5]*Math.pow(pB,3)+T[6]*Math.pow(pB,4)+T[7]*Math.pow(pB,5)+T[8]*Math.pow(pB,6);return[pA*=pz<0?-1:1,i*=C<0?-1:1]}function pi(T){for(var i=T[0],C=T[1],pA=[],pz=0;pz<oV.length;pz++){if(pb(C)>oV[pz]){pA=pp[pz];break}}return oU(i,C,pA)}function oS(T){for(var i=T[0],C=T[1],pA=[],pz=0;pz<po.length;pz++){if(C>=po[pz]){pA=oN[pz];break}}return oU(i,C,pA)}function oR(C,i){if(!C){throw new Error(i)}}function o3(i){return !!i&&"[object Array]"===Object.prototype.toString.call(i)}function oY(i){return !isNaN(Number(i))&&null!==i&&!o3(i)}function oP(){for(var T=[],i=0;i<arguments.length;i++){T[i]=arguments[i]}var C=T.length-1;return function(){for(var pz=[],pB=0;pB<arguments.length;pB++){pz[pB]=arguments[pB]}for(var pA=C,e=T[C].apply(null,pz);pA--;){e=T[pA].call(null,e)}return e}}function oM(pP,pE,pG){if(void 0===pG&&(pG=!1),null!==pP){for(var pJ,pI,pS,pL,pD,pO,pR,pK,pF=0,pM=0,pN=pP.type,pz="FeatureCollection"===pN,pQ="Feature"===pN,pC=pz?pP.features.length:1,pH=0;pH<pC;pH++){pD=(pK=!!(pR=pz?pP.features[pH].geometry:pQ?pP.geometry:pP)&&"GeometryCollection"===pR.type)?pR.geometries.length:1;for(var pB=0;pB<pD;pB++){var pA=0,C=0;if(null!==(pL=pK?pR.geometries[pB]:pR)){var T=pL.type;switch(pF=!pG||"Polygon"!==T&&"MultiPolygon"!==T?0:1,T){case null:break;case"Point":if(!1===pE(pO=pL.coordinates,pM,pH,pA,C)){return !1}pM++,pA++;break;case"LineString":case"MultiPoint":for(pO=pL.coordinates,pJ=0;pJ<pO.length;pJ++){if(!1===pE(pO[pJ],pM,pH,pA,C)){return !1}pM++,"MultiPoint"===T&&pA++}"LineString"===T&&pA++;break;case"Polygon":case"MultiLineString":for(pO=pL.coordinates,pJ=0;pJ<pO.length;pJ++){for(pI=0;pI<pO[pJ].length-pF;pI++){if(!1===pE(pO[pJ][pI],pM,pH,pA,C)){return !1}pM++}"MultiLineString"===T&&pA++,"Polygon"===T&&C++}"Polygon"===T&&pA++;break;case"MultiPolygon":for(pO=pL.coordinates,pJ=0;pJ<pO.length;pJ++){for(C=0,pI=0;pI<pO[pJ].length;pI++){for(pS=0;pS<pO[pJ][pI].length-pF;pS++){if(!1===pE(pO[pJ][pI][pS],pM,pH,pA,C)){return !1}pM++}C++}pA++}break;case"GeometryCollection":for(pJ=0;pJ<pL.geometries.length;pJ++){if(!1===oM(pL.geometries[pJ],pE,pG)){return !1}}break;default:throw new Error("Unknown Geometry Type")}}}}}}!function(i){i.WGS84="WGS84",i.WGS1984="WGS84",i.EPSG4326="WGS84",i.GCJ02="GCJ02",i.AMap="GCJ02",i.BD09="BD09",i.BD09LL="BD09",i.Baidu="BD09",i.BMap="BD09",i.BD09MC="BD09MC",i.BD09Meter="BD09MC",i.EPSG3857="EPSG3857",i.EPSG900913="EPSG3857",i.EPSG102100="EPSG3857",i.WebMercator="EPSG3857",i.WM="EPSG3857"}(oL||(oL={}));var o8={WGS84:{to:(o1={},o1[oL.GCJ02]=pn,o1[oL.BD09]=oP(oX,pn),o1[oL.BD09MC]=oP(pi,oX,pn),o1[oL.EPSG3857]=pm,o1)},GCJ02:{to:(o0={},o0[oL.WGS84]=pg,o0[oL.BD09]=oX,o0[oL.BD09MC]=oP(pi,oX),o0[oL.EPSG3857]=oP(pm,pg),o0)},BD09:{to:(oZ={},oZ[oL.WGS84]=oP(pg,pj),oZ[oL.GCJ02]=pj,oZ[oL.EPSG3857]=oP(pm,pg,pj),oZ[oL.BD09MC]=pi,oZ)},EPSG3857:{to:(pc={},pc[oL.WGS84]=o2,pc[oL.GCJ02]=oP(pn,o2),pc[oL.BD09]=oP(oX,pn,o2),pc[oL.BD09MC]=oP(pi,oX,pn,o2),pc)},BD09MC:{to:(oW={},oW[oL.WGS84]=oP(pg,pj,oS),oW[oL.GCJ02]=oP(pj,oS),oW[oL.EPSG3857]=oP(pm,pg,pj,oS),oW[oL.BD09]=oS,oW)},};return pu(pu({},oL),{CRSTypes:oL,transform:function(pC,pA,pB){if(oR(!!pC,"The args[0] input coordinate is required"),oR(!!pA,"The args[1] original coordinate system is required"),oR(!!pB,"The args[2] target coordinate system is required"),pA===pB){return pC}var pE=o8[pA]||oL[pA];oR(!!pE,"Invalid original coordinate system: "+pA);var pD=pE.to[pB];oR(!!pD,"Invalid target coordinate system: "+pB);var C=typeof pC;if(oR("string"===C||"object"===C,"Invalid input coordinate type: "+C),"string"===C){try{pC=JSON.parse(pC)}catch(pA){throw new Error("Invalid input coordinate: "+pC)}}var pz=!1;o3(pC)&&(oR(pC.length>=2,"Invalid input coordinate: "+pC),oR(oY(pC[0])&&oY(pC[1]),"Invalid input coordinate: "+pC),pC=pC.map(Number),pz=!0);var T=pD;return pz?T(pC):(oM(pC,(function(pF){var i;i=T(pF),pF[0]=i[0],pF[1]=i[1]})),pC)}})})();var k0={ColorRefTable:{aliceblue:["#f0f8ff","rgb(240,248,255)"],antiquewhite:["#faebd7","rgb(250,235,215)"],aqua:["#00ffff","rgb(0,255,255)"],aquamarine:["#7fffd4","rgb(127,255,212)"],azure:["#f0ffff","rgb(240,255,255)"],beige:["#f5f5dc","rgb(245,245,220)"],bisque:["#ffe4c4","rgb(255,228,196)"],black:["#000000","rgb(0,0,0)"],blanchedalmond:["#ffebcd","rgb(255,235,205)"],blue:["#0000ff","rgb(0,0,255)"],blueviolet:["#8a2be2","rgb(138,43,226)"],brown:["#a52a2a","rgb(165,42,42)"],burlywood:["#deb887","rgb(222,184,135)"],cadetblue:["#5f9ea0","rgb(95,158,160)"],chartreuse:["#7fff00","rgb(127,255,0)"],chocolate:["#d2691e","rgb(210,105,30)"],coral:["#ff7f50","rgb(255,127,80)"],cornflowerblue:["#6495ed","rgb(100,149,237)"],cornsilk:["#fff8dc","rgb(255,248,220)"],crimson:["#dc143c","rgb(220,20,60)"],cyan:["#00ffff","rgb(0,255,255)"],darkblue:["#00008b","rgb(0,0,139)"],darkcyan:["#008b8b","rgb(0,139,139)"],darkgoldenrod:["#b8860b","rgb(184,134,11)"],darkgray:["#a9a9a9","rgb(169,169,169)"],darkgreen:["#006400","rgb(0,100,0)"],darkgrey:["#a9a9a9","rgb(169,169,169)"],darkkhaki:["#bdb76b","rgb(189,183,107)"],darkmagenta:["#8b008b","rgb(139,0,139)"],darkolivegreen:["#556b2f","rgb(85,107,47)"],darkorange:["#ff8c00","rgb(255,140,0)"],darkorchid:["#9932cc","rgb(153,50,204)"],darkred:["#8b0000","rgb(139,0,0)"],darksalmon:["#e9967a","rgb(233,150,122)"],darkseagreen:["#8fbc8f","rgb(143,188,143)"],darkslateblue:["#483d8b","rgb(72,61,139)"],darkslategray:["#2f4f4f","rgb(47,79,79)"],darkslategrey:["#2f4f4f","rgb(47,79,79)"],darkturquoise:["#00ced1","rgb(0,206,209)"],darkviolet:["#9400d3","rgb(148,0,211)"],deeppink:["#ff1493","rgb(255,20,147)"],deepskyblue:["#00bfff","rgb(0,191,255)"],dimgray:["#696969","rgb(105,105,105)"],dimgrey:["#696969","rgb(105,105,105)"],dodgerblue:["#1e90ff","rgb(30,144,255)"],firebrick:["#b22222","rgb(178,34,34)"],floralwhite:["#fffaf0","rgb(255,250,240)"],forestgreen:["#228b22","rgb(34,139,34)"],fuchsia:["#ff00ff","rgb(255,0,255)"],gainsboro:["#dcdcdc","rgb(220,220,220)"],ghostwhite:["#f8f8ff","rgb(248,248,255)"],gold:["#ffd700","rgb(255,215,0)"],goldenrod:["#daa520","rgb(218,165,32)"],gray:["#808080","rgb(128,128,128)"],green:["#008000","rgb(0,128,0)"],greenyellow:["#adff2f","rgb(173,255,47)"],grey:["#808080","rgb(128,128,128)"],honeydew:["#f0fff0","rgb(240,255,240)"],hotpink:["#ff69b4","rgb(255,105,180)"],indianred:["#cd5c5c","rgb(205,92,92)"],indigo:["#4b0082","rgb(75,0,130)"],ivory:["#fffff0","rgb(255,255,240)"],khaki:["#f0e68c","rgb(240,230,140)"],lavender:["#e6e6fa","rgb(230,230,250)"],lavenderblush:["#fff0f5","rgb(255,240,245)"],lawngreen:["#7cfc00","rgb(124,252,0)"],lemonchiffon:["#fffacd","rgb(255,250,205)"],lightblue:["#add8e6","rgb(173,216,230)"],lightcoral:["#f08080","rgb(240,128,128)"],lightcyan:["#e0ffff","rgb(224,255,255)"],lightgoldenrodyellow:["#fafad2","rgb(250,250,210)"],lightgray:["#d3d3d3","rgb(211,211,211)"],lightgreen:["#90ee90","rgb(144,238,144)"],lightgrey:["#d3d3d3","rgb(211,211,211)"],lightpink:["#ffb6c1","rgb(255,182,193)"],lightsalmon:["#ffa07a","rgb(255,160,122)"],lightseagreen:["#20b2aa","rgb(32,178,170)"],lightskyblue:["#87cefa","rgb(135,206,250)"],lightslategray:["#778899","rgb(119,136,153)"],lightslategrey:["#778899","rgb(119,136,153)"],lightsteelblue:["#b0c4de","rgb(176,196,222)"],lightyellow:["#ffffe0","rgb(255,255,224)"],lime:["#00ff00","rgb(0,255,0)"],limegreen:["#32cd32","rgb(50,205,50)"],linen:["#faf0e6","rgb(250,240,230)"],magenta:["#ff00ff","rgb(255,0,255)"],maroon:["#800000","rgb(128,0,0)"],mediumaquamarine:["#66cdaa","rgb(102,205,170)"],mediumblue:["#0000cd","rgb(0,0,205)"],mediumorchid:["#ba55d3","rgb(186,85,211)"],mediumpurple:["#9370db","rgb(147,112,219)"],mediumseagreen:["#3cb371","rgb(60,179,113)"],mediumslateblue:["#7b68ee","rgb(123,104,238)"],mediumspringgreen:["#00fa9a","rgb(0,250,154)"],mediumturquoise:["#48d1cc","rgb(72,209,204)"],mediumvioletred:["#c71585","rgb(199,21,133)"],midnightblue:["#191970","rgb(25,25,112)"],mintcream:["#f5fffa","rgb(245,255,250)"],mistyrose:["#ffe4e1","rgb(255,228,225)"],moccasin:["#ffe4b5","rgb(255,228,181)"],navajowhite:["#ffdead","rgb(255,222,173)"],navy:["#000080","rgb(0,0,128)"],oldlace:["#fdf5e6","rgb(253,245,230)"],olive:["#808000","rgb(128,128,0)"],olivedrab:["#6b8e23","rgb(107,142,35)"],orange:["#ffa500","rgb(255,165,0)"],orangered:["#ff4500","rgb(255,69,0)"],orchid:["#da70d6","rgb(218,112,214)"],palegoldenrod:["#eee8aa","rgb(238,232,170)"],palegreen:["#98fb98","rgb(152,251,152)"],paleturquoise:["#afeeee","rgb(175,238,238)"],palevioletred:["#db7093","rgb(219,112,147)"],papayawhip:["#ffefd5","rgb(255,239,213)"],peachpuff:["#ffdab9","rgb(255,218,185)"],peru:["#cd853f","rgb(205,133,63)"],pink:["#ffc0cb","rgb(255,192,203)"],plum:["#dda0dd","rgb(221,160,221)"],powderblue:["#b0e0e6","rgb(176,224,230)"],purple:["#800080","rgb(128,0,128)"],red:["#ff0000","rgb(255,0,0)"],rosybrown:["#bc8f8f","rgb(188,143,143)"],royalblue:["#4169e1","rgb(65,105,225)"],saddlebrown:["#8b4513","rgb(139,69,19)"],salmon:["#fa8072","rgb(250,128,114)"],sandybrown:["#f4a460","rgb(244,164,96)"],seagreen:["#2e8b57","rgb(46,139,87)"],seashell:["#fff5ee","rgb(255,245,238)"],sienna:["#a0522d","rgb(160,82,45)"],silver:["#c0c0c0","rgb(192,192,192)"],skyblue:["#87ceeb","rgb(135,206,235)"],slateblue:["#6a5acd","rgb(106,90,205)"],slategray:["#708090","rgb(112,128,144)"],slategrey:["#708090","rgb(112,128,144)"],snow:["#fffafa","rgb(255,250,250)"],springgreen:["#00ff7f","rgb(0,255,127)"],steelblue:["#4682b4","rgb(70,130,180)"],tan:["#d2b48c","rgb(210,180,140)"],teal:["#008080","rgb(0,128,128)"],thistle:["#d8bfd8","rgb(216,191,216)"],tomato:["#ff6347","rgb(255,99,71)"],turquoise:["#40e0d0","rgb(64,224,208)"],violet:["#ee82ee","rgb(238,130,238)"],wheat:["#f5deb3","rgb(245,222,179)"],white:["#ffffff","rgb(255,255,255)"],whitesmoke:["#f5f5f5","rgb(245,245,245)"],yellow:["#ffff00","rgb(255,255,0)"],yellowgreen:["#9acd32","rgb(154,205,50)"]},regGroup:{hex:/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,rgb:/rgb\(\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*\)/,rgba:/rgba\(\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(0|1|0\.[1-9])\s*\)/},parseHexToRgbaArray:function(oL){var oM=oL.replace("#","");if(oM.length===3){oM+="f"}else{if(oM.length===6){oM+="ff"}}var e=[];var oK=oM.length;var T=oK===8?2:1;for(var C=0;C<oK;C=C+T){if(T===2){e.push(parseInt(oM.slice(C,C+2),16))}else{e.push(parseInt(oM.slice(C,C+1)+oM.slice(C,C+1),16))}}return e},parseRgbaStrToArray:function(i){var e=[0,0,0,255];if(i.indexOf("rgba(")===0){var T=i.replace("rgba(","").replace(")","");var C=T.split(",");e[0]=parseInt(C[0],10);e[1]=parseInt(C[1],10);e[2]=parseInt(C[2],10);e[3]=Math.round(parseFloat(C[3])*255)}else{if(i.indexOf("rgb(")===0){var T=i.replace("rgb(","").replace(")","");var oK=T.split(",");e[0]=parseInt(oK[0],10);e[1]=parseInt(oK[1],10);e[2]=parseInt(oK[2],10);e[3]=255}}return e},parseHexAndOpacityToRgbaArray:function(oK,oL){var C=[];var oO=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;var oN=oK.toLowerCase();if(oO.test(oN)){if(oN.length===4){var e="#";for(var oM=1;oM<4;oM++){e+=oN.slice(oM,oM+1).concat(oN.slice(oM,oM+1))}oN=e}for(var T=1;T<7;T+=2){C.push(parseInt(oN.slice(T,T+2),16))}C.push(oL)}return C},parseCSSColor:function(e){if(e.indexOf("#")===0){return k0.parseHexToRgbaArray(e)}return k0.parseRgbaStrToArray(e)},rgbToHSV:function(oK){var e=oK[0]/255;var C=oK[1]/255;var oL=oK[2]/255;var oO=Math.max(e,C,oL);var T=Math.min(e,C,oL);var oN=oO-T;var i;if(oN===0){i=0}else{if(oO===e){i=60*(((C-oL)/oN)%6)}else{if(oO===C){i=60*((oL-e)/oN+2)}else{if(oO===oL){i=60*((e-C)/oN+4)}}}}var oP=oO===0?0:(oN/oO);var oM=oO;while(i<0){i+=360}return[i,oP,oM]},hsvToRGB:function(T){var oN=T[2]*T[1];var C=oN*(1-Math.abs((T[0]/60)%2-1));var i=T[2]-oN;var oK=T[0];var oM;var oL;var e;if(oK>=0&&oK<60){oM=oN;oL=C;e=0}else{if(oK>=60&&oK<120){oM=C;oL=oN;e=0}else{if(oK>=120&&oK<180){oM=0;oL=oN;e=C}else{if(oK>=180&&oK<240){oM=0;oL=C;e=oN}else{if(oK>=240&&oK<300){oM=C;oL=0;e=oN}else{if(oK>=300&&oK<360){oM=oN;oL=0;e=C}}}}}}oM=(oM+i)*255>255?255:(oM+i)*255;oL=(oL+i)*255>255?255:(oL+i)*255;e=(e+i)*255>255?255:(e+i)*255;return[Math.round(oM),Math.round(oL),Math.round(e)]},formatColorCssToRgbaArray:function(oL,C,T){T=(typeof T!=="boolean")?true:T;if(typeof oL!=="string"){return T?[0,0,0,1]:[0,0,0,255]}var i=(oL||"Black").trim().toLowerCase();var e=[];var oK=k0.ColorRefTable[i];if(oK!==undefined){i=oK[0]}e=k0.parseCSSColor(i);if(C!==undefined&&!isNaN(Number(C))){C=Number(C);e[3]=k0.fitTo(C,0,1)}else{e[3]=Number((e[3]/255).toFixed(2))}if(!T){e[3]=Math.floor(e[3]*255)}return e},fitTo:function(C,i,e){if(C<i){C=i}else{if(C>e){C=e}}return C},generateColorRamp:function(e,oP,oQ,T,oV){oQ=oQ||[];T=T||"#ccc";oV=oV||1;const C=document.createElement("canvas");const oW=C.getContext("2d");C.width=256;C.height=oV;const oL=oP[0];const oS=oP[oP.length-1];if(e.length===oP.length){const oT=oW.createLinearGradient(0,0,256,1);for(var oO=0;oO<e.length;++oO){var oU=(oP[oO]-oL)/(oS-oL);oT.addColorStop(oU,e[oO])}oW.fillStyle=oT;oW.fillRect(0,0,256,oV)}else{if(e.length-oP.length===-1){var oN=0;var oK=1;for(var oO=0;oO<e.length;++oO){var oR=(oP[oK]-oL)/(oS-oL);var oU=Math.floor(oR*256);oW.fillStyle=e[oO];oW.fillRect(oN,0,oU,oV);oN=oU;oK++}}else{oW.fillStyle=T||"#ccc";oW.fillRect(0,0,256,oV)}}if(e.length-oP.length<=-1&&oQ.length===2){oW.fillStyle=T||"#ccc";var oR=(oQ[0]-oL)/(oS-oL);var oU=Math.floor(oR*256);oW.fillRect(0,0,oU,oV);oR=(oQ[1]-oL)/(oS-oL);oU=Math.floor(oR*256);oW.fillRect(oU,0,255,oV)}var oM=new Uint8Array(new Uint8ClampedArray(oW.getImageData(0,0,256,oV).data));return{canvas:C,data:oM,width:256,height:oV}},validateColor:function(e,i){return k0.regGroup[i].test(e)},convert2rgba:function(e,i){if(i===undefined){i=1}if(k0.validateColor(e,"rgba")){return e}if(k0.validateColor(e,"rgb")){e=e.replace(/rgb/g,"rgba");e=e.replace(/\)/,","+i+")");return e}var C=k0.formatColorCssToRgbaArray(e,i,true);return"rgba("+C.join(",")+")"}};(function(oL){function oV(o0,o3){var o2=(o0&65535)+(o3&65535);var o1=(o0>>16)+(o3>>16)+(o2>>16);return(o1<<16)|(o2&65535)}function oU(o0,o1){return(o0<<o1)|(o0>>>(32-o1))}function oP(o5,o2,o1,o0,o4,o3){return oV(oU(oV(oV(o2,o5),oV(o0,o3)),o4),o1)}function e(o2,o1,o6,o5,o0,o4,o3){return oP((o1&o6)|(~o1&o5),o2,o1,o0,o4,o3)}function oM(o2,o1,o6,o5,o0,o4,o3){return oP((o1&o5)|(o6&~o5),o2,o1,o0,o4,o3)}function oS(o2,o1,o6,o5,o0,o4,o3){return oP(o1^o6^o5,o2,o1,o0,o4,o3)}function oY(o2,o1,o6,o5,o0,o4,o3){return oP(o6^(o1|~o5),o2,o1,o0,o4,o3)}function C(pa,o5){pa[o5>>5]|=128<<(o5%32);pa[((o5+64)>>>9<<4)+14]=o5;var o2;var o4;var o3;var o1;var o0;var o9=1732584193;var o8=-271733879;var o7=-1732584194;var o6=271733878;for(o2=0;o2<pa.length;o2+=16){o4=o9;o3=o8;o1=o7;o0=o6;o9=e(o9,o8,o7,o6,pa[o2],7,-680876936);o6=e(o6,o9,o8,o7,pa[o2+1],12,-389564586);o7=e(o7,o6,o9,o8,pa[o2+2],17,606105819);o8=e(o8,o7,o6,o9,pa[o2+3],22,-1044525330);o9=e(o9,o8,o7,o6,pa[o2+4],7,-176418897);o6=e(o6,o9,o8,o7,pa[o2+5],12,1200080426);o7=e(o7,o6,o9,o8,pa[o2+6],17,-1473231341);o8=e(o8,o7,o6,o9,pa[o2+7],22,-45705983);o9=e(o9,o8,o7,o6,pa[o2+8],7,1770035416);o6=e(o6,o9,o8,o7,pa[o2+9],12,-1958414417);o7=e(o7,o6,o9,o8,pa[o2+10],17,-42063);o8=e(o8,o7,o6,o9,pa[o2+11],22,-1990404162);o9=e(o9,o8,o7,o6,pa[o2+12],7,1804603682);o6=e(o6,o9,o8,o7,pa[o2+13],12,-40341101);o7=e(o7,o6,o9,o8,pa[o2+14],17,-1502002290);o8=e(o8,o7,o6,o9,pa[o2+15],22,1236535329);o9=oM(o9,o8,o7,o6,pa[o2+1],5,-165796510);o6=oM(o6,o9,o8,o7,pa[o2+6],9,-1069501632);o7=oM(o7,o6,o9,o8,pa[o2+11],14,643717713);o8=oM(o8,o7,o6,o9,pa[o2],20,-373897302);o9=oM(o9,o8,o7,o6,pa[o2+5],5,-701558691);o6=oM(o6,o9,o8,o7,pa[o2+10],9,38016083);o7=oM(o7,o6,o9,o8,pa[o2+15],14,-660478335);o8=oM(o8,o7,o6,o9,pa[o2+4],20,-405537848);o9=oM(o9,o8,o7,o6,pa[o2+9],5,568446438);o6=oM(o6,o9,o8,o7,pa[o2+14],9,-1019803690);o7=oM(o7,o6,o9,o8,pa[o2+3],14,-187363961);o8=oM(o8,o7,o6,o9,pa[o2+8],20,1163531501);o9=oM(o9,o8,o7,o6,pa[o2+13],5,-1444681467);o6=oM(o6,o9,o8,o7,pa[o2+2],9,-51403784);o7=oM(o7,o6,o9,o8,pa[o2+7],14,1735328473);o8=oM(o8,o7,o6,o9,pa[o2+12],20,-1926607734);o9=oS(o9,o8,o7,o6,pa[o2+5],4,-378558);o6=oS(o6,o9,o8,o7,pa[o2+8],11,-2022574463);o7=oS(o7,o6,o9,o8,pa[o2+11],16,1839030562);o8=oS(o8,o7,o6,o9,pa[o2+14],23,-35309556);o9=oS(o9,o8,o7,o6,pa[o2+1],4,-1530992060);o6=oS(o6,o9,o8,o7,pa[o2+4],11,1272893353);o7=oS(o7,o6,o9,o8,pa[o2+7],16,-155497632);o8=oS(o8,o7,o6,o9,pa[o2+10],23,-1094730640);o9=oS(o9,o8,o7,o6,pa[o2+13],4,681279174);o6=oS(o6,o9,o8,o7,pa[o2],11,-358537222);o7=oS(o7,o6,o9,o8,pa[o2+3],16,-722521979);o8=oS(o8,o7,o6,o9,pa[o2+6],23,76029189);o9=oS(o9,o8,o7,o6,pa[o2+9],4,-640364487);o6=oS(o6,o9,o8,o7,pa[o2+12],11,-421815835);o7=oS(o7,o6,o9,o8,pa[o2+15],16,530742520);o8=oS(o8,o7,o6,o9,pa[o2+2],23,-995338651);o9=oY(o9,o8,o7,o6,pa[o2],6,-198630844);o6=oY(o6,o9,o8,o7,pa[o2+7],10,1126891415);o7=oY(o7,o6,o9,o8,pa[o2+14],15,-1416354905);o8=oY(o8,o7,o6,o9,pa[o2+5],21,-57434055);o9=oY(o9,o8,o7,o6,pa[o2+12],6,1700485571);o6=oY(o6,o9,o8,o7,pa[o2+3],10,-1894986606);o7=oY(o7,o6,o9,o8,pa[o2+10],15,-1051523);o8=oY(o8,o7,o6,o9,pa[o2+1],21,-2054922799);o9=oY(o9,o8,o7,o6,pa[o2+8],6,1873313359);o6=oY(o6,o9,o8,o7,pa[o2+15],10,-30611744);o7=oY(o7,o6,o9,o8,pa[o2+6],15,-1560198380);o8=oY(o8,o7,o6,o9,pa[o2+13],21,1309151649);o9=oY(o9,o8,o7,o6,pa[o2+4],6,-145523070);o6=oY(o6,o9,o8,o7,pa[o2+11],10,-1120210379);o7=oY(o7,o6,o9,o8,pa[o2+2],15,718787259);o8=oY(o8,o7,o6,o9,pa[o2+9],21,-343485551);o9=oV(o9,o4);o8=oV(o8,o3);o7=oV(o7,o1);o6=oV(o6,o0)}return[o9,o8,o7,o6]}function oT(o1){var o2;var o0="";var o3=o1.length*32;for(o2=0;o2<o3;o2+=8){o0+=String.fromCharCode((o1[o2>>5]>>>(o2%32))&255)}return o0}function oO(o1){var o3;var o0=[];o0[(o1.length>>2)-1]=undefined;for(o3=0;o3<o0.length;o3+=1){o0[o3]=0}var o2=o1.length*8;for(o3=0;o3<o2;o3+=8){o0[o3>>5]|=(o1.charCodeAt(o3/8)&255)<<(o3%32)}return o0}function oN(o0){return oT(C(oO(o0),o0.length*8))}function oZ(o2,o5){var o1;var o4=oO(o2);var o0=[];var o3=[];var o6;o0[15]=o3[15]=undefined;if(o4.length>16){o4=C(o4,o2.length*8)}for(o1=0;o1<16;o1+=1){o0[o1]=o4[o1]^909522486;o3[o1]=o4[o1]^1549556828}o6=C(o0.concat(oO(o5)),512+o5.length*8);return oT(C(o3.concat(o6),512+128))}function oX(o3){var o2="0123456789abcdef";var o1="";var o0;var o4;for(o4=0;o4<o3.length;o4+=1){o0=o3.charCodeAt(o4);o1+=o2.charAt((o0>>>4)&15)+o2.charAt(o0&15)}return o1}function oQ(o0){return unescape(encodeURIComponent(o0))}function T(o0){return oN(oQ(o0))}function oR(o0){return oX(T(o0))}function i(o0,o1){return oZ(oQ(o0),oQ(o1))}function oW(o0,o1){return oX(i(o0,o1))}function oK(o1,o2,o0){if(!o2){if(!o0){return oR(o1)}return T(o1)}if(!o0){return oW(o2,o1)}return i(o2,o1)}oL.md5=oK})(this);cv._rd=cv._rd||{};var e7={request:function(T,e){var oK=(Math.random()*100000).toFixed(0);if(e){cv._rd["_cbk"+oK]=function(oL){e&&e(oL);delete cv._rd["_cbk"+oK]};T+="&callback=BMapGL._rd._cbk"+oK}function C(oM){var oL;var oN=new RegExp("(^| )"+oM+"=([^;]*)(;|$)");if(oL=document.cookie.match(oN)){return unescape(oL[2])}else{return -1}}if(T.indexOf("v=")===-1){T+="&v="+ep()}T=e7.getSeckeyAndSign(T);var i=da("script",{src:T,type:"text/javascript",charset:"utf-8"});if(i.addEventListener){i.addEventListener("load",function(oM){var oL=oM.target;oL.parentNode.removeChild(oL)},false);i.addEventListener("error",function(oL){e&&e([,,,,,])},false)}else{if(i.attachEvent){i.attachEvent("onreadystatechange",function(oM){var oL=window.event.srcElement;if(oL&&(oL.readyState=="loaded"||oL.readyState=="complete")){oL.parentNode.removeChild(oL)}})}}document.getElementsByTagName("head")[0].appendChild(i);i=null},getSeckeyAndSign:function(oL){var C=decodeURIComponent(oL);var oK=new Date().getTime();var i=window.___abvk?window.___abvk:e7.getSeckeyCidItem("SECKEY_ABVK");var oM=e7.getSeckeyCidItem("BMAP_SECKEY");var e=encodeURIComponent(i+","+oM);var T=i+","+oM;oL+="&seckey="+e+"&timeStamp="+oK;C+="&seckey="+T+"&timeStamp="+oK;oL+=np()(C);return oL},getSeckeyCidItem:function(e){if(localStorage){return localStorage.getItem(e)?localStorage.getItem(e):-1}if(sessionStorage){return sessionStorage.getItem(e)?sessionStorage.getItem(e):-1}}};var or={request:function(oM,oK,i,oO,T){var oL=(Math.random()*100000)["toFixed"](0);cv._rd["_cbk"+oL]=function(oP){if(oP.result&&oP.result["popup"]&&oP.result["popup"]===1&&oP.result["error_msg"]){dZ(oP.result["error_msg"],{from:oK.qt});return}i=i||{};oM&&oM(oP,i);delete cv._rd["_cbk"+oL]};oO=oO||"";var oN;if(i&&i.useEncodeURI){oN=nk(oK,encodeURI)}else{oN=nk(oK,encodeURIComponent)}var e="";if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){e=window._BMapSecurityConfig["serviceHost"]+oO+"?"+oN+"&ie=utf-8&oue=1&fromproduct=jsapi"}else{var C=K.apiHost;e=C+"/"+oO+"?"+oN+"&ie=utf-8&oue=1&fromproduct=jsapi&ak="+hj}if(!T){e+="&res=api"}e+="&callback="+h6+"._rd._cbk"+oL;e7.request(e)}};var eq={levels:{INFO:"info",WARNING:"warning",ERROR:"error"},category:{JS:"js",RESOURCE:"resource",AJAX:"ajax"},config:{jsError:true,resourceError:true,ajaxError:true},hosts:"api.map.baidu.com|webmap0.bdimg.com|maponline0.bdimg.com|",ignoreUrl:"api.map.baidu.com/images/blank.gif",sender:true,collections:[],sendError:function(){},init:function(i,e,C){this.hosts+=i?i:"";aP&&aP(this.config,e);this.sender=true;if(C){this.sender=false}this.hosts=this.urlScope(this.hosts);this.sendError=this.notifyError();var T=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};this.config.jsError&&this.handleJavaScriptError(T);this.config.resourceError&&this.handleResourceError(T);this.config.ajaxError&&this.handleAjaxError(T)},handleJavaScriptError:function(C){var e=this;var i=C.onerror;C.onerror=function(oN,oM,T,oL,oK){if(e.isFetch(e.category.JS)&&e.hostExit(oM)){if(oK&&oK.stack){e.sendError({title:oN,msg:oK.stack,category:e.category.JS,level:e.levels.ERROR})}else{if(typeof oN==="string"){e.sendError({title:oN,msg:JSON.stringify({resourceUrl:oM,rowNum:T,colNum:oL}),category:"js",level:e.levels.ERROR})}}}if(i&&c2(i)){i&&i.apply(C,arguments)}}},handleResourceError:function(i){var e=this;i.addEventListener("error",function(oL){if(oL){var oM=oL.target||oL.srcElement;var oK=oM instanceof HTMLScriptElement||oM instanceof HTMLLinkElement||oM instanceof HTMLImageElement;if(!oK){if(!i.onerror){var C=oL.filename||null;if(!e.isFetch(e.category.JS)||!e.hostExit(C)){return}if(oL.error&&oL.error.stack){e.sendError({title:oL.message,msg:oL.error.stack,category:e.category.JS,level:e.levels.ERROR})}else{if(typeof oL.message==="string"){e.sendError({title:oL.message,msg:JSON.stringify({resourceUrl:C,rowNum:oL.lineno,colNum:oL.cowno}),category:e.category.JS,level:e.levels.ERROR})}}}return}var T=oM.src||oM.href;if(e.isFetch(e.category.RESOURCE)&&e.hostExit(T)){e.sendError({title:oM.nodeName,msg:T,category:e.category.RESOURCE,level:e.levels.ERROR})}}},true)},handleAjaxError:function(oL){var e=this;var oK=oL.location.protocol;if(oK==="file:"){return}if(!oL.XMLHttpRequest){return}var i=oL.XMLHttpRequest;var C=i.prototype.send;var T=function(oN){if(oN&&oN.currentTarget&&oN.currentTarget.status!==200){var oM=oN.target.responseURL;if(e.isFetch(e.category.AJAX)&&e.hostExit(oM)){e.sendError({title:oM,msg:JSON.stringify({response:oN.target.response,responseURL:oM,status:oN.target.status,statusText:oN.target.statusText}),category:e.category.AJAX,level:e.levels.ERROR})}}};i.prototype.send=function(){if(this["addEventListener"]){this["addEventListener"]("error",T);this["addEventListener"]("load",T);this["addEventListener"]("abort",T)}else{var oM=this["onreadystatechange"];this["onreadystatechange"]=function(oN){if(this.readyState===4){T(oN)}oM&&oM.apply(this,arguments)}}return C.apply(this,arguments)}},notifyError:function(C){var i=C||1000;this._idleWorkerTicker=(function(T){return function(){T.runJob()}})(this);var e=this;return function(oK){if(oK.url){if(!e.isFetch(oK.category)){return}var T=oK.url||"";if(!e.hostExit(T)){return}delete oK.url}if(!navigator.onLine){return}e.collections.push(oK);e.checkJob(i)}},runJob:function(){if(this.collections.length===0){clearInterval(this.idleWork);this.idleWork=null;return}var oK=this.collections.slice(0,2);var C=ni(JSON.stringify({dataset:oK}));var T=new Date().getTime();if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){var i=K.apiIMG+"/blank.gif?product=jsapi&v="+ep()+"&l="+C+"&t="+T}else{var i=K.apiIMG+"/blank.gif?product=jsapi&v="+ep()+"&l="+C+"&ak="+hj+"&t="+T}if(this.sender){try{var oM=document.createElement("div");oM.style="width:0;height:0;visibility: hidden;opacity: 0;z-index:-999;background-image: url("+i+");";document.querySelector("BODY").appendChild(oM);setTimeout(function(){document.querySelector("BODY").removeChild(oM)})}catch(oL){}}this.collections.splice(0,2);if(this.collections.length===0){clearInterval(this.idleWork);this.idleWork=null}},checkJob:function(e){if(!this.idleWork&&this._idleWorkerTicker){this.idleWork=setInterval(this._idleWorkerTicker,e)}},urlScope:function(T){var C={};var oL=Object.keys(K);if(K&&oL.length>0){for(var oK in K){if(K[oK]&&(typeof K[oK]!=="function")){C[oK]=K[oK]}}}try{var oN=JSON.stringify(C);if(oN.length>2){return T+"|"+oN}else{return T}}catch(oM){return T}},hostExit:function(i){try{if(i&&i.indexOf("//")===0){i=window.location.protocol+i}var C=new URL(i);if(!C||!C.host){return false}var oK=C.host+C.pathname;if(this.ignoreUrl.indexOf(oK)===-1&&this.hosts.indexOf(C.host)>-1){return true}return false}catch(T){return false}},isFetch:function(e){return this.config[e+"Error"]||false}};cv.fetchDebug=eq;var be={TYPE:"TypeError",REF:"ReferenceError",SYNTAX:"SyntaxError",RANGE:"RangeError",URI:"URIError",EVAL:"EvalError",NETWORK:"NetworkError",TIMEOUT:"TimeoutError",PROMISE:"UnhandledRejection",UNKNOWN:"Unknown"};var c8={TypeError:be.TYPE,ReferenceError:be.REF,SyntaxError:be.SYNTAX,RangeError:be.RANGE,URIError:be.URI,EvalError:be.EVAL};var hf=8*1024;var ic=new RegExp(["bot","spider","crawler","crawl","slurp","scraper","fetcher","indexer","yisou","sogou","yandex","duckduck","facebookexternalhit","externalagent","semrush","ahrefs","mj12","ia_archiver","archive\\.org","perplexity","bingpreview","embedly","dataforseo","proximic","seekport","headlesschrome","phantomjs","puppeteer","playwright","lighthouse","python-requests","python-urllib","scrapy","curl/","wget","okhttp","libwww","go-http-client","java/","apache-httpclient","axios/","node-fetch","monitoring","uptime","pingdom","apachebench"].join("|"),"i");var ma={_denominatorSent:false,_denominatorAcked:false,_pendingError:null,_numeratorSent:false,_inited:false,_bot:false,_mapJsHosts:[],_mapUrlPrefixes:[],init:function(){if(this._inited){return}this._inited=true;this._bot=this._isBot();if(this._bot){return}var oN=!!(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]);var oM=[K.staticHost,K.apiTestUrl,K.panoTilePath,K.stylePath,K.imgPath,K.apiIMG,K.mapHost];if(!oN){oM.push(K.apiHost)}oM.push(K.urlProtocol+"//" + window.location.host + "/bmap-api");if(K.tileDomain&&K.tileDomain.length){oM=oM.concat(K.tileDomain)}if(K.enTileDomain&&K.enTileDomain.length){oM=oM.concat(K.enTileDomain)}if(K.originTilePath&&K.originTilePath.length){oM=oM.concat(K.originTilePath)}var C=[];for(var T=0;T<oM.length;T++){var oK=this._extractHost(oM[T]);if(oK&&C.indexOf(oK)===-1){C.push(oK)}}this._mapJsHosts=C;var oL=[];var e=this._getCurrentScriptUrl();if(e){oL.push(e)}if(oN){oL.push(window._BMapSecurityConfig["serviceHost"]+"")}this._mapUrlPrefixes=oL;this._bindErrorListeners();this.sendDenominator()},sendDenominator:function(){if(!this._inited||this._denominatorSent||this._bot){return}this._denominatorSent=true;var e=this;this._sendSla({type:"den",ak:hj},function(i){if(!i){e._pendingError=null;return}e._denominatorAcked=true;var C=e._pendingError;if(C){e._pendingError=null;e._reportNumerator(C.title,C.detailMsg)}})},_classifyTitle:function(i,C){var e=i&&i.name;if(e&&c8[e]){return c8[e]}var T=(C||(i&&i.message)||"")+"";if((e&&/timeout/i.test(e))||/timeout/i.test(T)){return be.TIMEOUT}if((e&&/network/i.test(e))||/network|failed to fetch|load.*fail/i.test(T)){return be.NETWORK}return null},_bindErrorListeners:function(){var i=this;var C=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};var e=C.onerror;C.onerror=function(oQ,oM,T,oL,oK){var oO=false;if(i._isMapUrl(oM)||i._isMapStack(oK&&oK.stack)){oO=true}else{if(!oK&&typeof oQ==="string"&&oQ.indexOf("WorkerGlobalScope")>-1){var oN=/((?:https?:)?\/\/[^\s'"]+)/.exec(oQ);if(oN&&i._isMapUrl(oN[1])){oO=true}}}if(oO){var oP=oK&&oK.stack?oK.stack:JSON.stringify({resourceUrl:oM,rowNum:T,colNum:oL,msg:oQ});i._onError(oK,oQ,oP,false)}if(e&&c2(e)){e.apply(C,arguments)}};C.addEventListener("unhandledrejection",function(oL){var oO=oL.reason;var T=oO instanceof Error?(oO.stack||""):"";var oN=false;if(i._isMapStack(T)){oN=true}else{if(!T&&typeof oO==="string"){var oK=/((?:https?:)?\/\/[^\s'"]+)/.exec(oO);if(oK&&i._isMapUrl(oK[1])){oN=true}}}if(!oN){return}var oM=oO instanceof Error?(oO.message||""):String(oO);var oP=T||oM;i._onError(oO instanceof Error?oO:null,oM,oP,true)});C.addEventListener("error",function(oK){if(oK instanceof window.ErrorEvent){return}var oN=oK.target||oK.srcElement;if(!oN){return}var T=oN.src||oN.href;if(i._isMapUrl(T)){var oM="NetworkError: resource load failed";var oO=JSON.stringify({tagName:oN.tagName,url:T});var oL=new Error(oM);oL.name="NetworkError";i._onError(oL,oM,oO,false)}},true)},_extractHost:function(i){try{if(i&&i.indexOf("//")>-1){return i.split("//")[1].split("/")[0]}}catch(C){}return""},_isMapUrl:function(T){if(!T){return false}T=T+"";if(T.indexOf("/jsapi_monitor/")>-1){return false}var e=this._extractHost(T);if(e){for(var oK=0;oK<this._mapJsHosts.length;oK++){if(e===this._mapJsHosts[oK]){return true}}}for(var C=0;C<this._mapUrlPrefixes.length;C++){if(T.indexOf(this._mapUrlPrefixes[C])===0){return true}}return false},_isMapStack:function(C){if(!C){return false}var oK=(C+"").split("\n");for(var oM=0;oM<oK.length;oM++){var T=oK[oM];if(!/^\s*at /.test(T)&&T.indexOf("@")===-1){continue}var oL=/((?:https?:)?\/\/[^\s()@]+)/.exec(T);if(oL){var e=oL[1].replace(/:\d+:\d+\)?$/,"");return this._isMapUrl(e)}}return false},_isBot:function(){var i=typeof navigator!=="undefined"?navigator:null;if(!i){return true}if(i.webdriver===true){return true}var e=i.userAgent||"";if(!e){return true}return ic.test(e.replace(/cubot/ig,""))},_onError:function(e,i,T,oK){if(this._numeratorSent||this._bot){return}this.sendDenominator();var C=this._classifyTitle(e,i)||(oK?be.PROMISE:be.UNKNOWN);this._numeratorSent=true;if(!this._denominatorAcked){this._pendingError={title:C,detailMsg:T};return}this._reportNumerator(C,T)},_reportNumerator:function(C,i){var e=this;this._sendSla({type:"num",ak:hj,title:C},function(oK){if(!oK){return}var T=(i||"")+"";if(T.length>hf){T=T.slice(0,hf)}e._sendDetail(oK,{type:"num",ak:hj,title:C,ua:(typeof navigator!=="undefined"&&navigator.userAgent)||"",msg:T})})},_sendSla:function(oK,i){if(this._bot){i&&i(null);return}if(typeof navigator!=="undefined"&&navigator.onLine===false){i&&i(null);return}var C=this._buildUrl("/jsapi_monitor/sla",oK,null);try{e7.request(C,function(e){i&&i(e&&e.status===0?e.id:null)})}catch(T){i&&i(null)}},_sendDetail:function(C,oK){if(this._bot){return}if(typeof navigator!=="undefined"&&navigator.onLine===false){return}var i=this._buildUrl("/jsapi_monitor/detail",oK,C);try{e7.request(i,function(){})}catch(T){}},_buildUrl:function(oK,T,i){var oL=ni(JSON.stringify(T));var e="from=jsapi_"+ep()+"&sla="+encodeURIComponent(oL);if(i){e+="&id="+encodeURIComponent(i)}var C=(K.apiHost+"").replace(/\/+$/,"");return C+oK+"?"+e},_getCurrentScriptUrl:function(){try{var T="";if(typeof document!=="undefined"){if(document.currentScript&&document.currentScript.src){T=document.currentScript.src}else{var i=document.getElementsByTagName("script");if(i.length){T=i[i.length-1].src||""}}}return T?T.split("?")[0]:""}catch(C){return""}}};cv.slaDebug=ma;var kU={device:{PC:0,NA:1},config:{mask:["FFFFFFFF"],open:true},url:K.apiHost+"?qt=jsapi_log",counts:{},values:{},records:{},flushInterval:30*1000,sendMessage:function(i,C,e){},init:function(i,T){this.kill();var e=this;this.config.open=!!i;T=T||{};if(T.flushInterval){this.flushInterval=T.flushInterval}var C=T.timers||200;e._idleWorkerTicker=(function(oK){return function(){oK.runJob()}})(e);e._flushTicker=setInterval(function(){e._flushAll(C)},e.flushInterval);e._firstFlushTimer=setTimeout(function(){e._flushAll(C);e._firstFlushTimer=null},5*1000);if(typeof document!=="undefined"){document.addEventListener("visibilitychange",function(){if(document.visibilityState==="hidden"){e._flushAll(C)}})}this.sendMessage=function(oM,oN,oK){if(window.navigator&&!navigator.onLine){return}oM=oM||"";oN=oN||"";oK=oK||"";var oL=oM+"-"+oN+"-"+oK;if(!e.counts[oL]){e.counts[oL]=0}e.counts[oL]++;e.values[oL]=[oM,oN,oK]}},_flushAll:function(T){var i=false;for(var e in this.counts){if(this.counts[e]>0){var C=this.counts[e]>10000?10000:this.counts[e];this.records[e]={value:this.values[e],count:C};this.counts[e]=0;i=true}}if(i){this.checkJob(T)}},runJob:function(){if(Object.keys(this.records).length===0){clearInterval(this.idleWork);this.idleWork=null;return}var oP=Object.keys(this.records);var oO=oP[0];var T=this.records[oO]||{};var oN=T.value||[];var oK=T.count||1;var i=new Date().getTime();var C="logCbk"+Math.floor(Math.random()*10000000000);if(cv){cv[C]=function(e){delete cv[C]}}if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){var oM=this.url+"&bmapgl2=1&v="+ep()+"&device="+(c9()?this.device.NA:this.device.PC)+"&module="+(oN[0]||"")+"&func="+(oN[1]||"")+"&subfunc="+(oN[2]||"")+"&count="+oK+"&t="+i+"&callback="+h6+"."+C}else{var oM=this.url+"&ak="+hj+"&bmapgl2=1&v="+ep()+"&device="+(c9()?this.device.NA:this.device.PC)+"&module="+(oN[0]||"")+"&func="+(oN[1]||"")+"&subfunc="+(oN[2]||"")+"&count="+oK+"&t="+i+"&callback="+h6+"."+C}oM+=np()(oM);if(this.config.open){try{jW.load(oM);delete this.records[oO]}catch(oL){}}if(Object.keys(this.records).length===0){clearInterval(this.idleWork);this.idleWork=null}},checkJob:function(e){if(!this.idleWork&&this._idleWorkerTicker){this.idleWork=setInterval(this._idleWorkerTicker,e)}},kill:function(){if(this.idleWork){clearInterval(this.idleWork);this.idleWork=null}if(this._flushTicker){clearInterval(this._flushTicker);this._flushTicker=null}if(this._firstFlushTimer){clearTimeout(this._firstFlushTimer);this._firstFlushTimer=null}this._idleWorkerTicker=null;this.counts={};this.values={};this.records={}}};kU.init(true);var d5={device:{PC:0,NA:1},config:{open:true},url:K.apiHost+"?qt=jsapi_log",sent:{},records:{},sendMessage:function(C,T,e){if(window.navigator&&!navigator.onLine){return}C=C||"";T=T||"";e=e||"";var i=C+"-"+T+"-"+e;if(this.sent[i]){return}this.sent[i]=true;this.records[i]=[C,T,e];this.checkJob()},runJob:function(){if(Object.keys(this.records).length===0){clearInterval(this.idleWork);this.idleWork=null;return}var oL=Object.keys(this.records);var T=oL[0];var oM=this.records[T]||[];var C=new Date().getTime();var oK="logCbk"+Math.floor(Math.random()*10000000000);if(cv){cv[oK]=function(e){delete cv[oK]}}if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){var i=this.url+"&bmapgl2=1&v="+ep()+"&device="+(c9()?this.device.NA:this.device.PC)+"&module="+(oM[0]||"")+"&func="+(oM[1]||"")+"&subfunc="+(oM[2]||"")+"&count=1&t="+C+"&callback="+h6+"."+oK}else{var i=this.url+"&ak="+hj+"&bmapgl2=1&v="+ep()+"&device="+(c9()?this.device.NA:this.device.PC)+"&module="+(oM[0]||"")+"&func="+(oM[1]||"")+"&subfunc="+(oM[2]||"")+"&count=1&t="+C+"&callback="+h6+"."+oK}i+=np()(i);if(this.config.open){try{jW.load(i);delete this.records[T]}catch(oN){}}if(Object.keys(this.records).length===0){clearInterval(this.idleWork);this.idleWork=null}},checkJob:function(){if(!this.idleWork){var e=this;this.idleWork=setInterval(function(){e.runJob()},200)}},kill:function(){if(this.idleWork){clearInterval(this.idleWork);this.idleWork=null}this.sent={};this.records={}}};var nT={LOCATION:'<svg width="64" height="64" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="7" fill="none" stroke="currentColor" stroke-width="2"/><circle cx="10" cy="10" r="3" fill="currentColor"/><rect x="9" y="0" width="2" height="1.8" fill="currentColor"/><rect x="9" y="18.2" width="2" height="1.8" fill="currentColor"/><rect x="0" y="9" width="1.8" height="2" fill="currentColor"/><rect x="18.2" y="9" width="1.8" height="2" fill="currentColor"/></svg>',PLUS:'<svg width="64" height="64" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M8 1.25C8.41421 1.25 8.75 1.58579 8.75 2V7.25H14C14.3797 7.25 14.6935 7.53215 14.7432 7.89823L14.75 8C14.75 8.41421 14.4142 8.75 14 8.75H8.75V14C8.75 14.3797 8.46785 14.6935 8.10177 14.7432L8 14.75C7.58579 14.75 7.25 14.4142 7.25 14V8.75H2C1.6203 8.75 1.30651 8.46785 1.25685 8.10177L1.25 8C1.25 7.58579 1.58579 7.25 2 7.25H7.25V2C7.25 1.6203 7.53215 1.30651 7.89823 1.25685L8 1.25Z"/></svg>',MINUS:'<svg width="64" height="64" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M14 7.25C14.4142 7.25 14.75 7.58579 14.75 8C14.75 8.41421 14.4142 8.75 14 8.75H2C1.58579 8.75 1.25 8.41421 1.25 8C1.25 7.58579 1.58579 7.25 2 7.25H14Z"/></svg>',ARROW_TOP_LEFT:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor"><path d="M2 2L10 2L10 5L7 5L14 12L12 14L5 7L5 10L2 10Z"/></svg>',ARROW_TOP_RIGHT:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor"><path d="M14 2L6 2L6 5L9 5L2 12L4 14L11 7L11 10L14 10Z"/></svg>',ARROW_BOTTOM_LEFT:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor"><path d="M2 14L10 14L10 11L7 11L14 4L12 2L5 9L5 6L2 6Z"/></svg>',ARROW_BOTTOM_RIGHT:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor"><path d="M14 14L6 14L6 11L9 11L2 4L4 2L11 9L11 6L14 6Z"/></svg>',TRAFFIC_LIGHT:'<svg width="64" height="64" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.3672 3.36068L9.37153 3.37242L7.97243 4.79307L7.96788 2.62596L9.10331 2.61675L9.10764 2.62849C9.28797 2.63494 9.44881 2.76153 9.49059 2.95764C9.52284 3.11163 9.46808 3.25987 9.3672 3.36068ZM5.52648 9.99989C4.25034 10.0121 3.42491 9.04788 3.42491 8.01278V2.86006C3.42491 1.82495 4.21419 0.998162 5.55679 1C6.74374 1.00184 7.53345 1.82495 7.53345 2.86006V8.01278C7.53345 9.04788 6.76647 9.98792 5.52648 9.99989ZM5.49215 2.3903C4.91826 2.3903 4.42383 2.88518 4.42383 3.4956C4.42383 4.1058 4.91826 4.63152 5.49215 4.63152C6.06625 4.63152 6.53146 4.1058 6.53146 3.4956C6.53146 2.88518 6.06625 2.3903 5.49215 2.3903ZM5.49215 6.25326C4.91826 6.25326 4.42383 6.74814 4.42383 7.35833C4.42383 7.96876 4.91826 8.49448 5.49215 8.49448C6.06625 8.49448 6.53146 7.96876 6.53146 7.35833C6.53146 6.74814 6.06625 6.25326 5.49215 6.25326ZM9.10764 6.08113C9.28797 6.08758 9.44881 6.21417 9.49059 6.41028C9.52284 6.56404 9.46808 6.71227 9.3672 6.81332L9.37153 6.82506L7.97243 8.24571L7.96788 6.0786L9.10331 6.06939L9.10764 6.08113ZM1.6328 3.36068L1.62848 3.37242L3.02757 4.79307L3.03212 2.62596L1.89669 2.61675L1.89236 2.62849C1.71204 2.63494 1.55119 2.76153 1.50941 2.95764C1.47716 3.11163 1.53193 3.25987 1.6328 3.36068ZM1.89236 6.08113C1.71204 6.08758 1.55119 6.21417 1.50941 6.41028C1.47716 6.56404 1.53193 6.71227 1.6328 6.81332L1.62848 6.82506L3.02757 8.24571L3.03212 6.0786L1.89669 6.06939L1.89236 6.08113Z" fill="currentColor"/></svg>',SUBWAY:'<svg width="64" height="64" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M12 2C7.5 2 4 3 4 7v8c0 1.7 1.3 3 3 3l-1.5 1.5V20h2.2l2-2h4.6l2 2H18v-.5L16.5 18c1.7 0 3-1.3 3-3V7c0-4-3.5-5-7.5-5zm-3 14c-.8 0-1.5-.7-1.5-1.5S8.2 13 9 13s1.5.7 1.5 1.5S9.8 16 9 16zm6 0c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm2.5-5h-11V7h11v4z"/></svg>',BUS:'<svg width="64" height="64" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M4 16c0 .9.4 1.7 1 2.2V20c0 .5.5 1 1 1h1c.6 0 1-.5 1-1v-1h8v1c0 .5.5 1 1 1h1c.6 0 1-.5 1-1v-1.8c.6-.5 1-1.3 1-2.2V6c0-3.5-3.6-4-8-4s-8 .5-8 4v10zm3.5 1c-.8 0-1.5-.7-1.5-1.5S6.7 14 7.5 14s1.5.7 1.5 1.5S8.3 17 7.5 17zm9 0c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm1.5-6H6V6h12v5z"/></svg>',TRAIN:'<svg width="64" height="64" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M12 2C7 2 5 3 5 6v9c0 1.4 1 2.6 2.3 2.9L6 19v1h2l1.3-1.3h5.4L16 20h2v-1l-1.3-1.1c1.3-.3 2.3-1.5 2.3-2.9V6c0-3-2-4-7-4zm-3 13c-.8 0-1.5-.7-1.5-1.5S8.2 12 9 12s1.5.7 1.5 1.5S9.8 15 9 15zm6 0c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm2-5h-4V5h4v5zm-6 0H7V5h4v5z"/></svg>',AIRPLANE:'<svg width="64" height="64" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"/></svg>',SEARCH:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>',ROAD:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M4 21 8 3"/><path d="M20 21 16 3"/><path d="M12 5v2"/><path d="M12 11v2"/><path d="M12 17v2"/></svg>',CHEVRON_DOWN:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>',MARKER_PIN:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 21s-7-6.2-7-11a7 7 0 1 1 14 0c0 4.8-7 11-7 11Z"/><circle cx="12" cy="10" r="2.6"/></svg>',FLAG:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M5 21V4"/><path d="M5 4h13l-3 4 3 4H5"/></svg>',CAR:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round"><path d="M21.1 11.8V16.7H2.9V11.8L4.3 9.7 5 6.2C5.26 4.89 5.77 4.1 7.1 4.1H16.9C18.23 4.1 18.74 4.89 19 6.2L19.7 9.7 21.1 11.8Z"/><path d="M18.3 16.7H21.1V19.5H18.3Z" fill="currentColor"/><path d="M2.9 16.7H5.7V19.5H2.9Z" fill="currentColor"/><path d="M4.3 9.7 9.2 11.1H14.8L19.7 9.7"/><path d="M21.1 12.5V16.7H2.9V12.5H6.4L9.2 11.1H14.8L17.6 12.5H21.1Z" fill="currentColor" stroke="none"/></svg>',TAXI:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round"><path d="M21.1 11.8V16.7H2.9V11.8L4.3 9.7 5 6.2C5.04 5.73 5.51 5.5 6.4 5.5H17.6C18.49 5.5 18.96 5.73 19 6.2L19.7 9.7 21.1 11.8Z"/><path d="M21.1 16.7H2.9V13.9H7.1V11.1H16.9V13.9H21.1Z" fill="currentColor"/><path d="M18.3 16.7H21.1V19.5H18.3ZM2.9 16.7H5.7V19.5H2.9Z" fill="currentColor"/><path d="M4.3 10.4 7.1 11.1H16.9L19.7 10.4"/><path d="M8.5 4.8 9.2 2.7H14.8L15.5 4.8" fill="currentColor"/></svg>',WALK:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><circle cx="12.96" cy="4.17" r="1.98"/><path d="M11.44 6.54L12.24 6.6L12.71 6.79L13.09 7.05L13.46 7.51L13.69 8L13.77 8.41L13.88 8.53L15.48 9.94L17.34 11.04L17.54 11.28L17.64 11.51L17.66 11.89L17.51 12.25L17.2 12.51L17 12.59L16.67 12.59L16.45 12.51L14.73 11.49L13.41 10.61L13.27 10.61L12.95 12.34L12.93 12.78L15.3 15.23L16.43 18.8L16.49 19.27L16.35 19.67L16.07 19.99L15.69 20.18L15.09 20.16L14.8 20.01L14.52 19.71L13.44 16.61L13.29 16.37L12.86 15.95L10.22 13.93L9.89 13.63L9.69 13.32L9.52 12.89L9.48 12.32L9.99 9.04L8.89 9.68L8.55 10.06L8.36 10.59L8.02 12.21L7.89 12.47L7.72 12.64L7.34 12.81L6.97 12.8L6.63 12.61L6.38 12.23L6.36 11.72L6.85 9.96L7.16 9.23L7.42 8.85L8.01 8.32L10.23 6.96L10.84 6.68Z"/><path d="M9.8 14.02L11.22 15.27L10.99 15.86L10.5 16.71L8.16 19.71L7.91 19.94L7.57 20.07L7.23 20.07L7 19.99L6.63 19.69L6.48 19.39L6.44 18.93L6.51 18.69L8.93 15.67L9.16 15.33L9.52 14.5Z"/></svg>',BIKE:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round"><circle cx="6.05" cy="15.65" r="3.85"/><circle cx="17.6" cy="15.3" r="4.2"/><path d="M9.2 12.5 8.01 8.3M5.7 8.3H9.9"/><path d="M17.6 15.3 14.1 4.1H10.6"/><path d="M6.05 15.65 14.8 8.3"/><path d="M15.5 7.6H19.7V6.2"/></svg>',SCOOTER:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round"><path d="M3.63 4.76H7.57M5.6 4.76V11.34"/><path d="M10.74 15.61C10.74 14.34 10.73 13.49 10.65 12.86 10.58 12.25 10.45 11.99 10.29 11.82 10.13 11.65 9.88 11.51 9.32 11.42 8.72 11.34 8.2 11.34 7.02 11.34H6.28C5.81 11.34 5.63 11.34 5.48 11.35 3.52 11.51 2.23 13.18 2.08 15.28 2.06 15.61 2.06 15.94 2.06 16.27 2.08 16.43 2.22 16.59 2.37 16.6H10.74V15.61Z"/><path d="M4.16 17.16C4.56 18.46 5.61 19.33 6.79 19.33 7.98 19.33 9.03 18.46 9.43 17.16"/><path d="M9.54 16.6H16.27"/><path d="M17.86 11.58 18 11.47C18.29 11.26 18.44 11.14 18.56 11.05 18.6 11.02 18.63 10.99 18.66 10.95 18.69 10.91 18.72 10.86 18.74 10.81 18.73 10.82 18.74 10.8 18.75 10.67 18.76 10.52 18.76 10.32 18.76 9.97 18.76 9.31 18.76 8.92 18.73 8.63 18.73 8.54 18.71 8.45 18.69 8.36 18.65 8.28 18.58 8.22 18.51 8.18 18.42 8.15 18.33 8.14 18.24 8.13 17.79 8.11 17.34 8.1 16.9 8.11H16.13"/><path d="M18.38 13.54C16.81 10.52 15.75 8.44 15.21 7.3 14.4 5.59 13.41 5.8 11.52 5.8"/><circle cx="19.04" cy="16.6" r="2.9"/></svg>',TRUCK:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round"><path d="M2.9 5.5H16.9V16.7H2.9Z"/><path d="M16.9 9.7H19L21.1 11.8V16.7H16.9Z"/><path d="M4.3 17.4A2.1 2.1 0 0 0 8.5 17.4M15.5 17.4A2.1 2.1 0 0 0 19.7 17.4"/></svg>',CLOSE:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M5.5 5.5 18.5 18.5"/><path d="M18.5 5.5 5.5 18.5"/></svg>',LAYERS:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3 3 8l9 5 9-5-9-5Z"/><path d="M3 12l9 5 9-5"/><path d="M3 16l9 5 9-5"/></svg>',ROUTE:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="6" cy="19" r="2"/><circle cx="18" cy="5" r="2"/><path d="M8 19h7a3 3 0 0 0 3-3v-1a3 3 0 0 0-3-3H9a3 3 0 0 1-3-3V8a3 3 0 0 1 3-3h7"/></svg>'};function eC(C,i,oK,e){var T=i?C.replace(/currentColor/g,i):C;T=T.replace(/<svg\b[^>]*>/i,function(oL){return oL.replace(/\s(?:width|height)\s*=\s*("[^"]*"|'[^']*')/gi,"").replace(/^<svg/i,'<svg width="'+oK+'" height="'+e+'"')});return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(T)}function gS(e,i){i=i||{};var T=i.size||32;if(typeof T==="number"){T=new mU(T,T)}var oK={};for(var C in i){if(i.hasOwnProperty(C)&&C!=="color"&&C!=="size"&&C!=="srcset"){oK[C]=i[C]}}oK.imageSize=new mU(T.width,T.height);oK.srcset={"2x":eC(e,i.color,T.width*2,T.height*2)};return new nF(eC(e,i.color,T.width,T.height),T,oK)}if(Object.defineProperty){Object.defineProperty(nT,"createIcon",{value:gS,enumerable:false,writable:false,configurable:false})}else{nT.createIcon=gS}if(Object.freeze){Object.freeze(nT)}var dm=(function(oL){var oP=Object.create||(function(){function C(){}return function(oV){var oU;C.prototype=oV;oU=new C();C.prototype=null;return oU}}());var e={};var i=e.lib={};var oQ=i.Base=(function(){return{extend:function(oU){var C=oP(this);if(oU){C.mixIn(oU)}if(!C.hasOwnProperty("init")||this["init"]===C.init){C.init=function(){C.$super.init.apply(this,arguments)}}C.init.prototype=C;C.$super=this;return C},create:function(){var C=this.extend();C.init.apply(C,arguments);return C},init:function(){},mixIn:function(oU){for(var C in oU){if(oU.hasOwnProperty(C)){this[C]=oU[C]}}if(oU.hasOwnProperty("toString")){this.toString=oU.toString}},clone:function(){return this["init"].prototype.extend(this)}}}());var oS=i.WordArray=oQ.extend({init:function(oU,C){oU=this.words=oU||[];if(C!=undefined){this.sigBytes=C}else{this.sigBytes=oU.length*4}},toString:function(C){return(C||oN).stringify(this)},concat:function(oZ){var oW=this.words;var oV=oZ.words;var C=this.sigBytes;var oY=oZ.sigBytes;this.clamp();if(C%4){for(var oX=0;oX<oY;oX++){var oU=(oV[oX>>>2]>>>(24-(oX%4)*8))&255;oW[(C+oX)>>>2]|=oU<<(24-((C+oX)%4)*8)}}else{for(var oX=0;oX<oY;oX+=4){oW[(C+oX)>>>2]=oV[oX>>>2]}}this.sigBytes+=oY;return this},clamp:function(){var oU=this.words;var C=this.sigBytes;oU[C>>>2]&=4294967295<<(32-(C%4)*8);oU.length=oL.ceil(C/4)},clone:function(){var C=oQ.clone.call(this);C.words=this.words.slice(0);return C},random:function(oY){var oX=[];var oV=(function(o1){var o1=o1;var o0=987654321;var oZ=4294967295;return function(){o0=(36969*(o0&65535)+(o0>>16))&oZ;o1=(18000*(o1&65535)+(o1>>16))&oZ;var o2=((o0<<16)+o1)&oZ;o2/=4294967296;o2+=0.5;return o2*(oL.random()>0.5?1:-1)}});for(var oU=0,C;oU<oY;oU+=4){var oW=oV((C||oL.random())*4294967296);C=oW()*987654071;oX.push((oW()*4294967296)|0)}return new oS.init(oX,oY)}});var oT=e.enc={};var oN=oT.Hex={stringify:function(oV){var oX=oV.words;var oU=oV.sigBytes;var oW=[];for(var C=0;C<oU;C++){var oY=(oX[C>>>2]>>>(24-(C%4)*8))&255;oW.push((oY>>>4).toString(16));oW.push((oY&15).toString(16))}return oW.join("")},parse:function(oV){var C=oV.length;var oW=[];for(var oU=0;oU<C;oU+=2){oW[oU>>>3]|=parseInt(oV.substr(oU,2),16)<<(24-(oU%8)*4)}return new oS.init(oW,C/2)}};var oK=oT.Latin1={stringify:function(oW){var oX=oW.words;var oV=oW.sigBytes;var C=[];for(var oU=0;oU<oV;oU++){var oY=(oX[oU>>>2]>>>(24-(oU%4)*8))&255;C.push(String.fromCharCode(oY))}return C.join("")},parse:function(oV){var C=oV.length;var oW=[];for(var oU=0;oU<C;oU++){oW[oU>>>2]|=(oV.charCodeAt(oU)&255)<<(24-(oU%4)*8)}return new oS.init(oW,C)}};var T=oT.Utf8={stringify:function(C){try{return decodeURIComponent(escape(oK.stringify(C)))}catch(oU){throw new Error("Malformed UTF-8 data")}},parse:function(C){return oK.parse(unescape(encodeURIComponent(C)))}};var oO=i.BufferedBlockAlgorithm=oQ.extend({reset:function(){this._data=new oS.init();this._nDataBytes=0},_append:function(C){if(typeof C=="string"){C=T.parse(C)}this._data.concat(C);this._nDataBytes+=C.sigBytes},_process:function(o2){var oW=this._data;var o3=oW.words;var C=oW.sigBytes;var oZ=this.blockSize;var o1=oZ*4;var o0=C/o1;if(o2){o0=oL.ceil(o0)}else{o0=oL.max((o0|0)-this._minBufferSize,0)}var oY=o0*oZ;var oX=oL.min(oY*4,C);if(oY){for(var oV=0;oV<oY;oV+=oZ){this._doProcessBlock(o3,oV)}var oU=o3.splice(0,oY);oW.sigBytes-=oX}return new oS.init(oU,oX)},clone:function(){var C=oQ.clone.call(this);C._data=this._data.clone();return C},_minBufferSize:0});var oM=i.Hasher=oO.extend({cfg:oQ.extend(),init:function(C){this.cfg=this.cfg.extend(C);this.reset()},reset:function(){oO.reset.call(this);this._doReset()},update:function(C){this._append(C);this._process();return this},finalize:function(C){if(C){this._append(C)}var oU=this._doFinalize();return oU},blockSize:512/32,_createHelper:function(C){return function(oV,oU){return new C.init(oU).finalize(oV)}},_createHmacHelper:function(C){return function(oV,oU){return new oR.HMAC.init(C,oU).finalize(oV)}}});var oR=e.algo={};return e}(Math));var nY=dm;(function(i){var e=nY.lib;if(!e||!e.Hasher){return console.error("CryptoJS core library not properly loaded - missing Hasher class")}var oL=e.WordArray;var T=e.Hasher;var oM=nY.algo||(nY.algo={});if(typeof T.extend!=="function"){return console.error("Hasher.extend is not a function")}var oO=[];var oN=[];(function(){function oR(oV){var oU=i.sqrt(oV);for(var oT=2;oT<=oU;oT++){if(!(oV%oT)){return false}}return true}function oQ(oT){return((oT-(oT|0))*4294967296)|0}var oS=2;var oP=0;while(oP<64){if(oR(oS)){if(oP<8){oO[oP]=oQ(i.pow(oS,1/2))}oN[oP]=oQ(i.pow(oS,1/3));oP++}oS++}}());var C=[];var oK=oM.SHA256=T.extend({_doReset:function(){this._hash=new oL.init(oO.slice(0))},_doProcessBlock:function(oS,oR){var oV=this._hash.words;var o8=oV[0];var o7=oV[1];var o6=oV[2];var o5=oV[3];var o4=oV[4];var o3=oV[5];var o2=oV[6];var o1=oV[7];for(var o0=0;o0<64;o0++){if(o0<16){C[o0]=oS[oR+o0]|0}else{var oQ=C[o0-15];var pa=((oQ<<25)|(oQ>>>7))^((oQ<<14)|(oQ>>>18))^(oQ>>>3);var oW=C[o0-2];var o9=((oW<<15)|(oW>>>17))^((oW<<13)|(oW>>>19))^(oW>>>10);C[o0]=pa+C[o0-7]+o9+C[o0-16]}var oX=(o4&o3)^(~o4&o2);var oP=(o8&o7)^(o8&o6)^(o7&o6);var oZ=((o8<<30)|(o8>>>2))^((o8<<19)|(o8>>>13))^((o8<<10)|(o8>>>22));var oY=((o4<<26)|(o4>>>6))^((o4<<21)|(o4>>>11))^((o4<<7)|(o4>>>25));var oU=o1+oY+oX+oN[o0]+C[o0];var oT=oZ+oP;o1=o2;o2=o3;o3=o4;o4=(o5+oU)|0;o5=o6;o6=o7;o7=o8;o8=(oU+oT)|0}oV[0]=(oV[0]+o8)|0;oV[1]=(oV[1]+o7)|0;oV[2]=(oV[2]+o6)|0;oV[3]=(oV[3]+o5)|0;oV[4]=(oV[4]+o4)|0;oV[5]=(oV[5]+o3)|0;oV[6]=(oV[6]+o2)|0;oV[7]=(oV[7]+o1)|0},_doFinalize:function(){var oR=this._data;var oS=oR.words;var oP=this._nDataBytes*8;var oQ=oR.sigBytes*8;oS[oQ>>>5]|=128<<(24-oQ%32);oS[(((oQ+64)>>>9)<<4)+14]=i.floor(oP/4294967296);oS[(((oQ+64)>>>9)<<4)+15]=oP;oR.sigBytes=oS.length*4;this._process();return this._hash},clone:function(){var oP=T.clone.call(this);oP._hash=this._hash.clone();return oP}});nY.SHA256=T._createHelper(oK);nY.HmacSHA256=T._createHmacHelper(oK)}(Math));dm.SHA256=nY.SHA256;dm.HmacSHA256=nY.HmacSHA256;var cz=(function(){try{return typeof BigInt!=="undefined"&&typeof BigInt("1")!=="undefined"}catch(i){return false}})();function bY(oL,oM){var oK=dm.SHA256(dm.enc.Utf8.parse(oL));var T=oK.toString(dm.enc.Hex);var e=[];for(var C=0;C<T.length;C+=2){e.push(parseInt(T.substr(C,2),16))}oM(e)}function nQ(C){var i=C.toLowerCase().replace(/^0x/,"");if(!/^[0-9a-f]+$/.test(i)){throw new Error("invalid hex")}try{return BigInt("0x"+i)}catch(T){throw new Error("BigInt conversion failed")}}function nL(oL,oN,T){try{oL=oL%T;var C=BigInt(1);var oK=BigInt(0);var i=C%T;while(oN>oK){if(oN&C){i=(i*oL)%T}oN>>=C;if(oN>oK){oL=(oL*oL)%T}}return i}catch(oM){throw new Error("BigInt operation failed")}}function bt(e){if(typeof e==="string"){if(e.indexOf("0x")===0||e.indexOf("0X")===0){e=e.substring(2)}this.value=this.hexToArray(e)}else{if(typeof e==="number"){this.value=this.numToArray(e)}else{if(e instanceof Array){this.value=e.slice()}else{this.value=[0]}}}this.normalize()}bt.prototype.hexToArray=function(T){var e=[];for(var C=T.length-2;C>=0;C-=2){e.push(parseInt(T.substr(C,2),16))}if(T.length%2===1){e.push(parseInt(T.charAt(0),16))}return e};bt.prototype.numToArray=function(i){if(i===0){return[0]}var e=[];while(i>0){e.push(i&255);i=Math.floor(i/256)}return e};bt.prototype.normalize=function(){while(this.value.length>1&&this.value[this.value.length-1]===0){this.value.pop()}};bt.prototype.isZero=function(){return this.value.length===1&&this.value[0]===0};bt.prototype.compare=function(e){if(this.value.length!==e.value.length){return this.value.length-e.value.length}for(var C=this.value.length-1;C>=0;C--){if(this.value[C]!==e.value[C]){return this.value[C]-e.value[C]}}return 0};bt.prototype.add=function(T){var C=[];var oO=0;var oL=Math.max(this.value.length,T.value.length);for(var oM=0;oM<oL;oM++){var oK=oM<this.value.length?this.value[oM]:0;var e=oM<T.value.length?T.value[oM]:0;var oN=oK+e+oO;C.push(oN%256);oO=Math.floor(oN/256)}if(oO>0){C.push(oO)}return new bt(C)};bt.prototype.subtract=function(T){var C=[];var oN=0;var oL=Math.max(this.value.length,T.value.length);for(var oM=0;oM<oL;oM++){var oK=oM<this.value.length?this.value[oM]:0;var e=oM<T.value.length?T.value[oM]:0;var oO=oK-e-oN;if(oO<0){oO+=256;oN=1}else{oN=0}C.push(oO)}return new bt(C)};bt.prototype.multiply=function(oK){var T=[];var C=this.value.length+oK.value.length;for(var oM=0;oM<C;oM++){T.push(0)}for(var oM=0;oM<this.value.length;oM++){for(var oL=0;oL<oK.value.length;oL++){var e=this.value[oM]*oK.value[oL];T[oM+oL]+=e}}for(var oM=0;oM<T.length-1;oM++){T[oM+1]+=Math.floor(T[oM]/256);T[oM]%=256}return new bt(T)};bt.prototype.mod=function(T){var C=new bt(this.value);while(C.compare(T)>=0){var e=new bt(T.value);while(true){var i=new bt(e.value);i.value.unshift(0);if(i.compare(C)>0){break}e=i}C=C.subtract(e)}return C};function eg(oL,oN,oK){oL=oL.mod(oK);var e=new bt(1);while(!oN.isZero()){if(oN.value[0]&1){e=e.multiply(oL).mod(oK)}var oM=0;for(var T=oN.value.length-1;T>=0;T--){var C=oN.value[T]|(oM<<8);oN.value[T]=C>>1;oM=C&1}oN.normalize();if(!oN.isZero()){oL=oL.multiply(oL).mod(oK)}}return e}function la(i){var e=i.toLowerCase().replace(/^0x/,"");if(!/^[0-9a-f]+$/.test(e)){throw new Error("invalid hex")}return new bt(e)}function hr(T,C,i,oL){if(!T||!C||!i||!oL){if(oL){oL(false)}return}if(cz){try{mq(T,C,i,oL)}catch(oK){bA(T,C,i,oL)}}else{bA(T,C,i,oL)}}function mq(C,i,e,T){bY(C,function(oR){try{var oK=BigInt(0);var oM=BigInt(256);for(var oN=0;oN<8;oN++){oK=(oK*oM+BigInt(oR[oN]))%e.n}var oO=nQ(i);var oP=BigInt(0);if(oO<oP||oO>=e.n){T(false);return}var oL=nL(oO,e.e,e.n);T(oL===oK)}catch(oQ){bA(C,i,e,T)}})}function bA(C,i,e,T){bY(C,function(oR){try{var oK=new bt(0);var oM=new bt(256);for(var oN=0;oN<8;oN++){oK=oK.multiply(oM);var oQ=new bt(oR[oN]);oK=oK.add(oQ);oK=oK.mod(e.n)}var oO=la(i);if(oO.compare(new bt(0))<0||oO.compare(e.n)>=0){T(false);return}var oL=eg(oO,e.e,e.n);T(oL.compare(oK)===0)}catch(oP){T(false)}})}var gt;if(cz){gt={n:BigInt(9173503),e:BigInt(65537)}}else{gt={n:new bt(9173503),e:new bt(65537)}}if(window.B_BUSINESS_INFO){hr(window.B_BUSINESS_INFO["sign_content"],window.B_BUSINESS_INFO["signature"],gt,function(e){if(!e){var i=c0.popup_code;d5.sendMessage("sign_check","sign_error",i)}else{if(c0.business===0&&c0.unauth===1){dZ(jC,{from:"vtile"})}}})}var mL=(function(){var oW={};var oV="HIGH";var oP="FOCUS";var C={};var T;function i(oX){var o2=oX||[];for(var o3=0;o3<o2.length;o3++){var o6=o2[o3];var o5=[];for(var o1=0;o1<o6.length;o1++){var oY=o6[o1];o5.push(new d9(oY[0],oY[1]))}var oZ=new mw(o5);var o4=new ix("onbeforeaddoverlay",oZ);o4.overlay=oZ;o4.isLayerMask=true;T.dispatchEvent(o4);oZ._i(T);oT(oV,oZ);if(T.config.highRegion){if(T.config.highRegion.lineOpt){var o0=new cf(o5,T.config.highRegion.lineOpt);T.addOverlay(o0)}if(T.config.highRegion.focusOpt){oT(oP,oZ)}}}}function e(oX){var oY=new ix("onbeforeaddoverlay",oX);oY.overlay=oX;oY.isLayerMask=true;T.dispatchEvent(oY);oX._i(T);oT(oP,oX)}function oR(oX){oS(oP,oX)}function oT(oX,oY){if(oY){if(!oN(oX)){oW[oX]=[]}oW[oX].push(oY)}oL(oX)}function oS(oY,oZ){if(oZ){if(oN(oY)){for(var oX=0;oX<oW[oY].length;oX++){if(oW[oY][oX]===oZ){oW[oY].splice(oX,1);break}}}}else{delete oW[oY]}oL(oY)}function oL(o1){if(oN(o1)){var o2=[];for(var o0=0;o0<oU(o1).length;o0++){var oZ=oU(o1)[o0];var oX=oZ.getFillStyleForGL();var o3=oZ.buildFillVertex(k4);var oY=[oX,o3[0],o3[1]];oY.hashCode=oZ.hashCode;oY.hasMultipleParts=oZ.hasMultipleParts;o2.push(oY)}C[o1]=o2}else{delete C[o1]}}function oO(oX){return C[oX]}function oN(oX){return oW[oX]?true:false}function oU(oX){return oW[oX]}function oQ(oX,oY){if(oW[oX]){oW[oX].visible=oY}}function oK(oX){T=oX}function oM(){oW[oV]=[];oW[oP]=[];oW={};C={}}return{HIGH:oV,FOCUS:oP,kill:oM,setMap:oK,dataProcessFromHigh:i,addFocusMask:e,removeFocusMask:oR,getMask:oU,getRender:oO,setVisible:oQ}})();function jM(){this._map=null;this._container;this._type="control";this.blockInfoWindow=true;this._visible=true}jM.inherits(eX,"Control");hv.extend(jM.prototype,{initialize:function(e){this._map=e;if(this._container){if(this._opts&&this._opts.container){this._opts.container.appendChild(this._container)}else{e.container.appendChild(this._container)}return this._container}return},_i:function(e){if(!this._container&&this.initialize&&c2(this.initialize)){this._container=this.initialize(e)}this._opts=this._opts||{printable:false};this._setStyle();this._setPosition();if(this._container){this._container._jsobj=this}},_setStyle:function(){var i=this._container;if(i){var e=i.style;e.position="absolute";e.zIndex=this._cZIndex||"10";e.MozUserSelect="none";if(!this._opts.printable){hv.ac(i,"BMap_noprint")}hv.on(i,"contextmenu",kK)}},remove:function(){this._map=null;if(!this._container){return}this._container.parentNode&&this._container.parentNode.removeChild(this._container);this._container._jsobj=null;this._container=null},_render:function(e){if(this._opts&&this._opts.container){this._container=cQ(this._opts.container,'<div unselectable="on"></div>')}else{var i='<div unselectable="on"></div>';if(e&&e.config.autoSafeArea&&d4()){this._safeAreaContainer=cQ(this._map.container,i);this._safeAreaContainer.style.position="absolute";this._safeAreaContainer.style.bottom="env(safe-area-inset-bottom)";this._container=cQ(this._safeAreaContainer,i)}else{this._container=cQ(this._map.container,i)}}if(this._visible===false){this._container.style.display="none"}return this._container},_setPosition:function(){this.setAnchor(this._opts.anchor)},setAnchor:function(T){if(this.anchorFixed||typeof T!=="number"||isNaN(T)||T<BMAP_ANCHOR_TOP_LEFT||T>BMAP_ANCHOR_BOTTOM_RIGHT){T=this.defaultAnchor}this._opts.offset=this._opts.offset||this.defaultOffset;var C=this._opts.anchor;this._opts.anchor=T;if(!this._container){return}var oL=this._container;var e=this._opts.offset.width;var oK=this._opts.offset.height;oL.style.left=oL.style.top=oL.style.right=oL.style.bottom="auto";switch(T){case BMAP_ANCHOR_TOP_LEFT:oL.style.top=oK+"px";oL.style.left=e+"px";break;case BMAP_ANCHOR_TOP_RIGHT:oL.style.top=oK+"px";oL.style.right=e+"px";break;case BMAP_ANCHOR_BOTTOM_LEFT:oL.style.bottom=oK+"px";oL.style.left=e+"px";break;case BMAP_ANCHOR_BOTTOM_RIGHT:oL.style.bottom=oK+"px";oL.style.right=e+"px";break;default:break}var i=["TL","TR","BL","BR"];hv.rc(this._container,"anchor"+i[C]);hv.ac(this._container,"anchor"+i[T])},getAnchor:function(){return this._opts.anchor},setOffset:function(e){if(!e){return}this._opts=this._opts||{};this._opts.offset=new mU(e.width,e.height);if(!this._container){return}this.setAnchor(this._opts.anchor)},getOffset:function(){return this._opts.offset},getDom:function(){return this._container},show:function(){if(this._visible===true){return}this._visible=true;if(this._container){this._container.style.display=""}this.dispatchEvent(new ix("onshow"))},hide:function(){if(this._visible===false){return}this._visible=false;if(this._container){this._container.style.display="none"}this.dispatchEvent(new ix("onhide"))},isPrintable:function(){return !!this._opts.printable},isVisible:function(){if(!this._container&&!this._map){return false}return !!this._visible},_asyncLoadCode:function(){var e=this;ki.load("control",function(){if(e._asyncDraw){e._asyncDraw()}})}});var gv={TOP_LEFT:0,TOP_RIGHT:1,BOTTOM_LEFT:2,BOTTOM_RIGHT:3};cv.ControlAnchor=gv;window.BMAP_ANCHOR_TOP_LEFT=0;window.BMAP_ANCHOR_TOP_RIGHT=1;window.BMAP_ANCHOR_BOTTOM_LEFT=2;window.BMAP_ANCHOR_BOTTOM_RIGHT=3;window.BMAP_ANCHOR_TOP_CENTER=4;window.BMAP_ANCHOR_MIDDLE_LEFT=5;window.BMAP_ANCHOR_CENTER=6;window.BMAP_ANCHOR_MIDDLE_RIGHT=7;window.BMAP_ANCHOR_BOTTOM_CENTER=8;function i0(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("CopyrightControl")}jM.call(this);e=e||{};this._opts={printable:false};hv.extend(this._opts,e);this._copyrightCollection=[];this.defaultAnchor=BMAP_ANCHOR_BOTTOM_LEFT;this.defaultOffset=new mU(5,2);this.setAnchor(e.anchor);this._canShow=true;this.sateMapStyle=false;this.blockInfoWindow=false;this._asyncLoadCode()}i0.inherits(jM,"CopyrightControl");hv.extend(i0.prototype,{initialize:function(e){this._map=e;return this._container},addCopyright:function(T){var e={minZoom:0,bounds:null,content:"",mapType:""};for(var C in T){e[C]=T[C]}if(this._map){var oM=e.minZoom;if(oM===-1||oM<this._map.getMinZoom()||oM>this._map.getMaxZoom()){e.minZoom=this._map.getMinZoom()}if(e.mapType!==""&&!gA[e.mapType]){e.mapType=BMAP_NORMAL_MAP}}var oK=this.getCopyright(T.id);if(oK){for(var oL in e){oK[oL]=e[oL]}}else{this._copyrightCollection.push(e)}},getCopyright:function(T){for(var C=0,e=this._copyrightCollection.length;C<e;C++){if(this._copyrightCollection[C].id===T){return this._copyrightCollection[C]}}},getCopyrightCollection:function(){return this._copyrightCollection},addSateMapStyle:function(){this.sateMapStyle=true;if(this._container){hv.ac(this._container,"BMap_cpyCtrl_w")}},removeSateMapStyle:function(){this.sateMapStyle=false;if(this._container){hv.rc(this._container,"BMap_cpyCtrl_w")}}});function co(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("CityListControl")}jM.call(this);e=e||{};this.canCheckSize=e.canCheckSize===false?false:true;this.curCityName="";this.curCityCode="";this.defaultOffset=new mU(10,10);this.defaultAnchor=gv.TOP_LEFT;this.onChangeBefore=e.onChangeBefore||null;this.onChangeAfter=e.onChangeAfter||null;this.onChangeSuccess=e.onChangeSuccess||null;this.onOpen=e.onOpen||null;this.onClose=e.onClose||null;this._opts={printable:false,offset:e.offset||this.defaultOffset,anchor:e.anchor||this.defaultAnchor,expand:!!(e.expand),trigger:e.trigger};this.setAnchor(e.anchor);this._asyncLoadCode()}co.inherits(jM,"CityListControl");hv.extend(co.prototype,{initialize:function(e){this._map=e;return this._container}});function oJ(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("ScaleControl")}jM.call(this);e=e||{};this._opts={printable:false};this._opts=hv.extend(hv.extend(this._opts,{unit:"metric"}),e);this.defaultAnchor=BMAP_ANCHOR_BOTTOM_LEFT;this.defaultOffset=new mU(81,18);if(c9()){this.defaultOffset=new mU(75,10)}this.setAnchor(e.anchor);this._units={metric:{name:"metric",conv:1,incon:1000,u1:"m_2",u2:"km_2"},us:{name:"us",conv:3.2808,incon:5280,u1:"feet",u2:"mile"}};this.sateMapStyle=false;if(!this._units[this._opts.unit]){this._opts.unit="metric"}this._scaleText=null;this._numberArray={};this._asyncLoadCode();this.language=BMAP_LANGUAGE_ZH}window.BMAP_UNIT_METRIC="metric";window.BMAP_UNIT_IMPERIAL="us";oJ.inherits(jM,"ScaleControl");hv.extend(oJ.prototype,{initialize:function(e){this._map=e;return this._container},setUnit:function(e){this._opts.unit=this._units[e]&&this._units[e].name||this._opts.unit},getUnit:function(){return this._opts.unit},addSateMapStyle:function(){this.sateMapStyle=true;var e=this._container;if(e){hv.ac(e.children[0],"dark")}},removeSateMapStyle:function(){this.sateMapStyle=false;var e=this._container;if(e){hv.rc(e.children[0],"dark")}}});window.BMAP_NAVIGATION_CONTROL_LARGE=0;window.BMAP_NAVIGATION_CONTROL_SMALL=1;window.BMAP_NAVIGATION_CONTROL_PAN=2;window.BMAP_NAVIGATION_CONTROL_ZOOM=3;function n5(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("NavigationControl")}jM.call(this);e=e||{};this._opts={printable:false,showZoomInfo:true,enableGeolocation:false,type:BMAP_NAVIGATION_CONTROL_LARGE};hv.extend(this._opts,e);this.defaultOffset=new mU(30,10);this.defaultAnchor=BMAP_ANCHOR_TOP_LEFT;this._asyncLoadCode()}n5.inherits(jM,"NavigationControl");hv.extend(n5.prototype,{initialize:function(e){this._map=e;return this._container},setType:function(e){if(typeof e!=="number"||e<BMAP_NAVIGATION_CONTROL_LARGE||e>BMAP_NAVIGATION_CONTROL_ZOOM){this._opts.type=BMAP_NAVIGATION_CONTROL_LARGE;return}this._opts.type=e},getType:function(){return this._opts.type}});window.BMAP_MAPTYPE_CONTROL_HORIZONTAL=0;window.BMAP_MAPTYPE_CONTROL_DROPDOWN=1;window.BMAP_MAPTYPE_CONTROL_MAP=2;function G(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("MapTypeControl")}jM.call(this);i=i||{};this._opts={printable:false,type:i.type||BMAP_MAPTYPE_CONTROL_MAP,mapTypes:[BMAP_NORMAL_MAP,BMAP_SATELLITE_MAP,BMAP_HYBRID_MAP]};if(K.apiVersionIsGL()){this._opts.mapTypes=[BMAP_NORMAL_MAP,BMAP_EARTH_MAP,BMAP_HYBRID_MAP]}this.defaultAnchor=BMAP_ANCHOR_TOP_RIGHT;this.defaultOffset=new mU(10,10);this.setAnchor(i.anchor);this._opts=hv.extend(hv.extend(this._opts,{offset:this.defaultOffset,enableSwitch:true}),i);if(i.mapTypes instanceof Array){this._opts.mapTypes=i.mapTypes.slice(0)}var e=this;ki.load("control",function(){e._asyncDraw()})}G.inherits(jM,"MapTypeControl");hv.extend(G.prototype,{initialize:function(e){this._map=e;return this._container},showStreetLayer:function(e){this._map.showStreetLayer(e)}});function nc(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("ZoomControl")}jM.call(this);e=e||{};this._opts={};this._opts=hv.extend(this._opts,e);this._zoomInDisabled=false;this._zoomOutDisabled=false;this._zoomInTapped=false;this._zoomOutTapped=false;this.defaultAnchor=gv.BOTTOM_RIGHT;this.defaultOffset=new mU(15,20);this.setAnchor(e.anchor);this._asyncLoadCode()}nc.inherits(jM,"ZoomControl");hv.extend(nc.prototype,{initialize:function(e){this._map=e;return this._container}});function jn(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("LocationControl")}jM.call(this);e=e||{};this._opts={autoZoom:true,autoViewport:true,showAddressBar:!K.apiVersionIsGL(),enableAutoLocation:false,locationIcon:null,};this._opts=hv.extend(this._opts,e);this.defaultAnchor=gv.BOTTOM_LEFT;this.defaultOffset=new mU(10,50);this.watchPosition=this._opts.watchPosition||false;this.useCompass=this._opts.useCompass||false;this.locMarker=null;this.locLevel=16;this.addressComponent=null;this.setAnchor(this._opts.anchor);this.onLocationStart=e.onLocationStart||null;this._asyncLoadCode()}jn.inherits(jM,"LocationControl");hv.extend(jn.prototype,{initialize:function(e){this._map=e;return this._container},startLocation:function(){this._startLocationCalled=true},location:function(){this.startLocation()},getAddressComponent:function(){return this.addressComponent},stopLocationTrace:function(){},setOptions:function(e){e=e||{};hv.extend(this._opts,e)}});function cB(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("LogoControl")}jM.call(this);e=e||{};this._opts={};this._opts=hv.extend(this._opts,e);this.defaultAnchor=gv.BOTTOM_LEFT;this.defaultOffset=new mU(5,15);if(c9()){this.defaultOffset=new mU(10,10)}this.setAnchor(e.anchor)}cB.inherits(jM,"LogoControl");hv.extend(cB.prototype,{initialize:function(i){this._map=i;var e=this._container=document.createElement("div");e.innerHTML='<img src="'+K.apiHost+'/images/logo_hd.png"  style="height:21px;width:62px;"/>';i.getContainer().appendChild(e);return e}});function n9(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("OverviewMapControl")}jM.call(this);e=e||{};this._opts={printable:false,zoomInterval:4,isOpen:Boolean(e.isOpen),size:e.size||new mU(150,150),padding:4};this._opts=hv.extend(this._opts,e);this.defaultAnchor=gv.BOTTOM_RIGHT;this.defaultOffset=new mU(0,0);this.setSize(this._opts.size);this.setAnchor(this._opts.anchor);this._asyncLoadCode()}n9.inherits(jM,"OverviewMapControl");hv.extend(n9.prototype,{initialize:function(e){this._map=e;return this._container},remove:function(){jM.prototype.remove.call(this)},isOpen:function(){return this._opts.isOpen},changeView:function(){this._opts.isOpen=!this._opts.isOpen},setSize:function(e){if(!(e instanceof mU)){e=new mU(150,150)}if(e.width<=0){e.width=150}if(e.height<=0){e.height=150}this._opts.size=e},getSize:function(){return this._opts.size},});function aW(e,i){this._map=e;this._indoorInfo=i;this._visible=true;this._adjustVisible=true;this._isMobile=c9();this._sizeConfig={FLOOR_BTN_HEIGHT:this._isMobile?35:26,SWITCH_ARROW_HEIGHT:this._isMobile?20:15};this._init()}aW.prototype._init=function(){this._render();this._bindDom();this._bind();this._adjustDisplayHeight();var e=new ix("onindoor_bar_show");e.uid=this._indoorInfo.uid;e.floors=this._indoorInfo.floors;this._map.dispatchEvent(e)};aW.prototype._render=function(){if(!this._indoorInfo){return}var oN=this._isMobile;var e=this._div=da("div");hv.ac(e,"floor-select-container");oN&&hv.ac(e,"mobile");oN&&hv.ac(e,"all-border-radius");var i=this._btnTop=da("button");hv.ac(i,"floor-switch-top");hv.ac(i,"top-border-radius");var oL=da("div");hv.ac(oL,"floor-switch-top-icon");i.appendChild(oL);var oK=this._btnBottom=da("button");var C=da("div");hv.ac(C,"floor-switch-bottom-icon");oK.appendChild(C);hv.ac(oK,"floor-switch-bottom");hv.ac(oK,"bottom-border-radius");var T=this._floorsContainer=da("div");hv.ac(T,"floors-container");T.appendChild(this._createFloorsDom());this._div.appendChild(i);this._div.appendChild(T);this._div.appendChild(oK);var oO=0;if(this._btnTop.style.display===""){oO=2*this._sizeConfig.SWITCH_ARROW_HEIGHT}this._div.style.height=parseInt(this._floorsContainer.style.height,10)+oO+"px";this._map.getContainer().appendChild(this._div);if(!oN){var oM=this;setTimeout(function(){oM._div.style.right="20px"},20)}};aW.prototype._createFloorsDom=function(){if(!this._indoorInfo){return}var C=this._ol=da("ol");var oL=this._indoorInfo.currentFloor;for(var oK=this._indoorInfo.floors.length-1;oK>=0;oK--){var oM=this._indoorInfo.floors[oK].floorName;var e=da("li");var T=da("button");hv.ac(T,"btn-select-floor");if(oK===oL){hv.ac(T,"selected")}T.setAttribute("data-floor",oK);T.innerHTML=oM;e.appendChild(T);C.appendChild(e)}return C};aW.prototype._updateUI=function(){if(!this._ol){this._render();this._bind();this._adjustDisplayHeight();return}this._ol=null;this._ol=this._createFloorsDom();this._floorsContainer.innerHTML="";this._floorsContainer.appendChild(this._ol);this._adjustDisplayHeight()};aW.prototype._bindDom=function(){var e=this;hv.on(this._floorsContainer,"click",function(T){var C=T.target||T.srcElement;if(C.tagName.toLowerCase()==="button"){e._map.showIndoor(e._indoorInfo.uid,parseInt(C.getAttribute("data-floor"),10));var i=new ix("onindoor_bar_click");i.uid=e._indoorInfo.uid;e._map.dispatchEvent(i)}});hv.on(this._floorsContainer,"mouseover",function(C){var i=C.target;if(i.tagName.toLowerCase()==="button"){hv.ac(i,"hover")}});hv.on(this._floorsContainer,"mouseout",function(C){var i=C.target;if(i.tagName.toLowerCase()==="button"){hv.rc(i,"hover")}});hv.on(this._floorsContainer,"touchstart",function(C){var i=C.target;if(i.tagName.toLowerCase()==="button"){hv.ac(i,"onmousedown")}});hv.on(this._floorsContainer,"touchend",function(C){var i=C.target;if(i.tagName.toLowerCase()==="button"){hv.rc(i,"onmousedown")}});hv.on(this._btnTop,"mouseover",function(i){if(this._disable){return}hv.ac(this,"hover")});hv.on(this._btnTop,"mouseout",function(i){hv.rc(this,"hover")});hv.on(this._btnBottom,"mouseover",function(i){if(this._disable){return}hv.ac(this,"hover")});hv.on(this._btnBottom,"mouseout",function(i){hv.rc(this,"hover")});hv.on(this._btnTop,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}hv.ac(this,"onmousedown")});hv.on(this._btnTop,"touchend",function(i){hv.rc(this,"onmousedown")});hv.on(this._btnBottom,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}hv.ac(this,"onmousedown")});hv.on(this._btnBottom,"touchend",function(i){hv.rc(this,"onmousedown")});hv.on(this._btnTop,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)+26)});hv.on(this._btnBottom,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)-26)});hv.on(this._div,"mousemove",aF);hv.on(this._div,"wheel",kK);hv.on(this._div,"mousewheel",kK);this._map.addEventListener("resize",function(){e._adjustDisplayHeight()})};aW.prototype._adjustDisplayHeight=function(){if(!this._indoorInfo){return}var oL=this._map.getSize().height;var oM=this._sizeConfig.FLOOR_BTN_HEIGHT;var oN=oL-291-100;if(this._isMobile){oN=oL-12-108-this._map.config.bottomOffset}var e=this._indoorInfo.floors.length;var C=e*oM;var T=e;var oP=0;var oQ=this._floorsContainer.children[0];if(C>oN){this._showArrow=true;hv.rc(oQ.children[0].children[0],"top-border-radius");hv.rc(oQ.children[e-1].children[0],"bottom-border-radius")}else{this._showArrow=false;hv.ac(oQ.children[0].children[0],"top-border-radius");hv.ac(oQ.children[e-1].children[0],"bottom-border-radius")}while(C>oN){if(T===0){break}T--;oP=2*this._sizeConfig.SWITCH_ARROW_HEIGHT;C=T*oM+oP}this._currentDisplayHeight=C;if(T<3){this._setAdjustVisbile(false)}else{this._setAdjustVisbile(true)}this._floorsContainer.style.height=T*oM+"px";var oK=this._indoorInfo.currentFloor;var i=e-oK;var oO=oK-1;this._div.style.height=parseInt(this._floorsContainer.style.height,10)+oP+"px";var oR=-(e-(oK+Math.round(T/2)))*oM;this._setBarSliderTop(oR);if(T<e){hv.show(this._btnTop);hv.show(this._btnBottom)}else{hv.hide(this._btnTop);hv.hide(this._btnBottom);this._setBarSliderTop(0)}if(this._isMobile){this._div.style.bottom=108+this._map.config.bottomOffset+"px"}};aW.prototype._setBarSliderTop=function(T){var C=26;var i=this._indoorInfo.floors.length;var e=i*C;if(this._currentDisplayHeight){if(this._showArrow){e=this._currentDisplayHeight-30}else{e=this._currentDisplayHeight}}if(e-T>=i*C){T=e-i*C;hv.ac(this._btnBottom,"disable");hv.rc(this._btnBottom,"hover");this._btnBottom._disable=true}else{hv.rc(this._btnBottom,"disable");this._btnBottom._disable=false}if(T>=0){T=0;hv.ac(this._btnTop,"disable");hv.rc(this._btnTop,"hover");this._btnTop._disable=true}else{hv.rc(this._btnTop,"disable");this._btnTop._disable=false}this._ol.style.top=T+"px"};aW.prototype._setAdjustVisbile=function(e){if(this._adjustVisible===e){return}this._adjustVisible=e;if(e&&this._visible){this._div.style.display="";this._div.style.right="20px"}else{this._div.style.display="none"}};aW.prototype._bind=function(){var i=this._map;var e=this;i.on("indoor_status_changed",function(oN){if(e._visible===false){return}var C=e._ol;var oL=oN.uid;if(!oL){return}var oM=oN.floor;for(var oK=0;oK<C.children.length;oK++){var T=C.children[oK].children[0];if(parseInt(T.getAttribute("data-floor"),10)===oM){hv.ac(T,"selected")}else{hv.rc(T,"selected")}}});i.on("zoomend",function(C){if(this.getZoom()<17){e._setAdjustVisbile(false)}else{e._setAdjustVisbile(true)}})};aW.prototype.setInfo=function(e){if(this._indoorInfo&&this._indoorInfo.uid===e.uid){return}this._indoorInfo=e;this._updateUI()};aW.prototype.show=function(){if(this._visible===true){return}this._visible=true;if(!this._isMobile){this._div.style.right="20px"}else{this._div.style.display=""}var e=new ix("onindoor_bar_show");e.uid=this._indoorInfo.uid;e.floors=this._indoorInfo.floors;this._map.dispatchEvent(e)};aW.prototype.hide=function(){if(this._visible===false){return}this._visible=false;if(!this._isMobile){this._div.style.right="-30px"}else{this._div.style.display="none"}};function hy(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("NavigationControl3D")}this._opts=e||{};this.defaultOffset=new mU(2,80);this.defaultAnchor=BMAP_ANCHOR_TOP_RIGHT;if(this._opts.anchor===undefined){this.setAnchor(this.defaultAnchor)}else{this.setAnchor(this._opts.anchor)}this._firstAnimation=true}hy.inherits(jM,"NavigationControl3D");hv.extend(hy.prototype,{initialize:function(C){this._map=C;this._createDom();this._bindDom();this._bind();if(!c9()){this._headingControl=new mv(this._map,this._div)}this._tiltControl=new eB(this._map,this._div);this._render();var i=this._map.getMapTypeId();var e=this;if(i==="B_EARTH_MAP"||this._map._renderType==="webgl"){e._div.style.opacity="1";e._div.style.visibility="visible"}else{e._div.style.opacity="0";e._div.style.visibility="hidden"}return this._container},_createDom:function(){var i=this._div=document.createElement("div");this._container=i;var e=i.style;e.position="absolute";e.zIndex=5;e.width="52px";e.height="88px";if(K.uiVersionIsGL()){e.height="82px"}e.right="-3px";e.bottom="79px";e.opacity="0";e.visibility="hidden";e.WebkitTransition=e.transition="opacity .3s ease-out,visibility .3s ease-out"},_render:function(){var e=document.getElementById("map-operate");if(e){e.appendChild(this._div)}else{this._map.getContainer().appendChild(this._div)}},_bindDom:function(){this._div.addEventListener("mousemove",aF)},_bind:function(){if(this._map._renderType==="webgl"){return}var e=this;this._map.on("maptypechange",function(){if(this.mapType==="B_EARTH_MAP"){if(e._firstAnimation){e._firstAnimation=false;setTimeout(function(){e._div.style.opacity="1";e._div.style.visibility="visible"},300)}else{e._div.style.opacity="1";e._div.style.visibility="visible"}}else{e._div.style.opacity="0";e._div.style.visibility="hidden"}})}});function mv(C,i){this._map=C;this._target=C;var T=C.temp.originMapType||C.mapType;if(T==="B_EARTH_MAP"&&C._earth){this._target=C._earth}this._outContainer=i||C.getContainer();this._imgRatio=ja()>=li.HIGH_RES_MIN_RATIO?2:1;this._imgPath=K.imgPath+"earth-navi-control-pc4"+(this._imgRatio===2?"-2x.png":".png");this._enabled=true;var e=this;this._setHeadingOptions={callback:function(){e._target.setLock(false)}};this._init()}hv.extend(mv.prototype,{_init:function(){this._createDom();this._render();this._bindDom();this._bind();this._updateUI();this._checkEnable()},_checkEnable:function(){if(this._target.getZoom()>=this._target._enableHeadingZoom){this.enable()}else{this.disable()}},_createDom:function(){var e=!K.uiVersionIsGL();var C=this._div=da("div");var i=C.style;i.position="absolute";i.zIndex=5;i.top="0";i.left="0";i.width="52px";i.height="52px";if(e){C.className="BMap_navCtrl3D_compass"}else{i.height="54px";i.background="url("+this._imgPath+") no-repeat";i.backgroundSize="266px auto"}this._rotateCCW=this._createButton();this._rotateCCW.title="閫嗘椂閽堣浆鍔�";i=this._rotateCCW.style;i.left="2px";i.top="5px";i.zIndex="1";i.width="15px";i.height="42px";i.backgroundPosition="-75px -5px";this._rotateCW=this._createButton();this._rotateCW.title="椤烘椂閽堣浆鍔�";i=this._rotateCW.style;i.right="2px";i.top="5px";i.zIndex="1";i.width="15px";i.height="42px";i.backgroundPosition="-75px -5px";i.WebkitTransform=i.transform="scaleX(-1)";this._compass=this._createButton();this._compass.title="鎭㈠姝e寳鏂瑰悜";i=this._compass.style;i.left="19px";i.top="4px";i.width="14px";i.height="44px";if(e){this._compass.className="BMap_navCtrl3D_needle";i.background="none"}else{i.backgroundPosition="-56px -4px"}i.WebkitTransform=i.transform="rotate(0deg)";this._div.appendChild(this._rotateCCW);this._div.appendChild(this._compass);this._div.appendChild(this._rotateCW);this._domRendered=true},_createButton:function(){var e=da("button");var i=e.style;i.position="absolute";i.outline="none";i.border="none";i.background="url("+this._imgPath+") no-repeat";i.backgroundSize="266px auto";i.cursor="pointer";return e},_render:function(){this._outContainer.appendChild(this._div)},enable:function(){this._enabled=true;if(this._domRendered){this._rotateCCW.style.cursor="pointer";this._rotateCCW.style.opacity=1;this._rotateCW.style.cursor="pointer";this._rotateCW.style.opacity=1;this._compass.style.cursor="pointer";this._compass.style.opacity=1}},disable:function(){this._enabled=false;if(this._domRendered){this._rotateCCW.style.cursor="";this._rotateCCW.style.opacity=0.4;this._rotateCW.style.cursor="";this._rotateCW.style.opacity=0.4;this._compass.style.cursor="";this._compass.style.opacity=0.4}},_bindDom:function(){mj(this._div,["mousedown","click","dblclick"]);var i=this._map;var e=this;this._rotateCW.addEventListener("click",function(){if(e._isOperating||e._enabled===false){return}if(e._target.getLock()){return}if(e._target.getHeading()===360){e._target.setHeading(0)}e._target.setLock(true);e._target.setHeading(e._target.getHeading()+90,e._setHeadingOptions);i.fire(new ix("onrotatecwclick"))},false);this._rotateCCW.addEventListener("click",function(){if(e._isOperating||e._enabled===false){return}if(e._target.getLock()){return}if(e._target.getHeading()===-360){e._target.setHeading(0)}e._target.setLock(true);e._target.setHeading(e._target.getHeading()-90,e._setHeadingOptions);i.fire(new ix("onrotateccwclick"))},false);this._rotateCW.addEventListener("mouseover",function(){if(e._enabled===false){return}this.style.backgroundPosition="-89px -5px"},false);this._rotateCW.addEventListener("mouseout",function(){if(e._enabled===false){return}this.style.backgroundPosition="-75px -5px"},false);this._rotateCCW.addEventListener("mouseover",function(){if(e._enabled===false){return}this.style.backgroundPosition="-89px -5px"},false);this._rotateCCW.addEventListener("mouseout",function(){if(e._enabled===false){return}this.style.backgroundPosition="-75px -5px"},false);this._compass.addEventListener("click",function(){if(e._isOperating||e._enabled===false){return}if(e._target.getLock()){return}e._target.setLock(true);var C=false;if(e._target.getTilt()!==0){C=true;e._target.setTilt(0,e._setHeadingOptions)}if(e._target.getHeading()%360!==0){C=true;e._target.resetHeading(e._setHeadingOptions)}if(!C){e._target.setLock(false)}i.fire(new ix("oncompassclick"))},false)},_bind:function(){var e=this;this._bindTarget(this._target);if(this._map._renderType==="webgl"){this._map.addEventListener("maptypechange",function(i){if(this.mapType==="B_EARTH_MAP"){e._target=e._map._earth}else{e._target=e._map}e._bindTarget(e._target);e._checkEnable()})}},_bindTarget:function(i){if(i===this._map&&this._mapBinded){return}if(i===this._map._earth&&this._earthBinded){return}var e=this;i.addEventListener("heading_changed",function(C){e._updateUI()});i.addEventListener("animation_start",function(C){e._isOperating=true});i.addEventListener("animation_end",function(C){e._isOperating=false});i.on("load",function(){e._checkEnable()});i.on("zoom_changed",function(){e._checkEnable()});if(i===this._map){this._mapBinded=true}else{this._earthBinded=true}},_updateUI:function(){var e=this._target.getHeading();var i=this._compass.style;i.WebkitTransform=i.transform="rotate("+e+"deg)"},hide:function(){this._div.style.display="none"},show:function(){this._div.style.display="block"}});function eB(C,i){this._map=C;this._target=C;var T=C.temp.originMapType||C.mapType;if(T==="B_EARTH_MAP"&&C._earth){this._target=C._earth}this._outContainer=i||C.getContainer();this._imgRatio=ja()>=li.HIGH_RES_MIN_RATIO?2:1;this._imgPath=K.imgPath+"gl-navi-control-pc4"+(this._imgRatio===2?"-2x.png":".png");this._enabled=true;this._diffBgPosition=3;if(K.uiVersionIsGL()){this._diffBgPosition=0}var e=this;this._setTiltOptions={callback:function(){e._target.setLock(false)}};this._init()}hv.extend(eB.prototype,{_init:function(){this._createDom();this._render();this._bindDom();this._bind();this._checkEnable()},_checkEnable:function(){if(this._target.getZoom()>=this._target._enableTiltZoom){this.enable()}else{this.disable()}},_createDom:function(){var i=!K.uiVersionIsGL();this._isV4=i;var e=this._div=da("button");e.title="鍊炬枩";var C=e.style;if(i){e.className="BMap_navCtrl3D_tilt";e.textContent="2D"}else{C.backgroundImage="url("+this._imgPath+")";C.position="absolute";C.zIndex=5;C.outline="none";C.border="none";C.cursor="pointer";C.width="26px";C.height="26px";C.top="56px";C.right="13px";C.backgroundSize="266px auto";C.backgroundPosition="-110px 1px";C.backgroundColor="#fff";C.backgroundRepeat="no-repeat";C.boxShadow="1px 2px 1px rgba(0, 0, 0, .15)"}},enable:function(){this._enabled=true;if(this._div){this._div.style.cursor="pointer"}this._updateUI()},disable:function(){this._enabled=false;if(this._div){this._div.style.cursor=""}this._updateUI()},_render:function(){this._outContainer.appendChild(this._div)},_bindDom:function(){var e=this;this._div.addEventListener("mousedown",function(T){if(!e._enabled){return}if(e._target.getLock()){return}var i=e._target.getTilt();var C;if(i===e._map.getCurrentMaxTilt()){C="out"}else{if(i===0){C="in"}else{C=e._preTrend?e._preTrend:"in"}}e._curTrend=C;e._clickTimer=setTimeout(function(){e._map.fire(new ix("ontiltmsdown"));e._tiltAni=new ij({duration:9999999,render:function(oK){i=e._target.getTilt();if(C==="in"&&i<e._map.getCurrentMaxTilt()){e._target.setTilt(i+1,{noAnimation:true})}else{if(C==="out"&&i>0){e._target.setTilt(i-1,{noAnimation:true})}}},finish:function(){e._tiltAni=null}});e._clickTimer=null},200);T.stopPropagation()},false);this._div.addEventListener("mouseup",function(i){if(!e._enabled){return}if(e._tiltAni){e._tiltAni.stop()}e._preTrend=e._curTrend},false);this._div.addEventListener("click",function(T){if(!e._enabled){return}if(!e._clickTimer){return}if(e._target.getLock()){return}clearTimeout(e._clickTimer);e._map.fire(new ix("ontiltclick"));var i=e._target.getTilt();e._target.setLock(true);T.stopPropagation();var C=e._map.getCurrentMaxTilt();if(e._curTrend==="in"){e._target.setTilt(C,e._setTiltOptions)}else{if(e._curTrend==="out"){e._target.setTilt(0,e._setTiltOptions)}else{if(i<C){e._target.setTilt(C,e._setTiltOptions)}else{e._target.setTilt(0,e._setTiltOptions)}}}},false);this._div.addEventListener("mouseover",function(i){if(!e._enabled){return}e._mouseOver=true;e._updateUI()},false);this._div.addEventListener("mouseout",function(i){if(!e._enabled){return}e._mouseOver=false;e._updateUI()},false);mj(this._div,["mousedown","click","dblclick"])},_bind:function(){var e=this;var i=this._map;this._bindTarget(this._target);if(this._map._renderType==="webgl"){this._map.addEventListener("maptypechange",function(C){if(this.mapType==="B_EARTH_MAP"){e._target=e._map._earth}else{e._target=e._map}e._bindTarget(e._target);e._checkEnable()})}},_bindTarget:function(i){if(i===this._map&&this._mapBinded){return}if(i===this._map._earth&&this._earthBinded){return}var e=this;i.on("load",function(){e._checkEnable()});i.on("zoom_changed",function(){e._checkEnable()});i.on("tilt_changed",function(){e._updateUI()});if(i===this._map){this._mapBinded=true}else{this._earthBinded=true}},_updateUI:function(){var C=this._target.getTilt();if(this._isV4){if(!this._div){return}this._div.textContent=C>0?"3D":"2D";if(this._enabled){this._div.title=C>0?"鎭㈠":"鍊炬枩";this._div.classList.remove("BMap_navCtrl3D_tilt_disabled")}else{this._div.title="璇锋斁澶у湴鍥惧悗鎿嶄綔";this._div.classList.add("BMap_navCtrl3D_tilt_disabled")}return}var i=0;var T=0;var e=0;if(C>0){i=78}if(this._mouseOver){e=52}if(this._enabled===false){T=26;e=0;i=0}var oK="-"+(110+i+T+e-this._diffBgPosition)+"px "+(1+this._diffBgPosition)+"px";this._div&&(this._div.style.backgroundPosition=oK);if(this._enabled){if(C>0){this._div&&(this._div.title="鎭㈠")}else{this._div&&(this._div.title="鍊炬枩")}}else{this._div&&(this._div.title="璇锋斁澶у湴鍥惧悗鎿嶄綔")}},hide:function(){this._div.style.display="none"},show:function(){this._div.style.display="block"}});function kH(i){eX.call(this);this._opts={container:null,cursor:"default",marker:true};this._opts=hv.extend(this._opts,i);this._type="contextmenu";this._map=null;this._container;this._left=0;this._top=0;this._items=[];this._rItems=[];this._dividers=[];this._enable=true;this.curPixel=null;this.curPoint=null;this._isOpen=false;var e=this;ki.load("menu",function(){e._draw()})}kH.inherits(eX,"ContextMenu");hv.extend(kH.prototype,{initialize:function(i,e){this._map=i;this._overlay=e||null},remove:function(){this._map=this._overlay=null},addItem:function(oK,e){if(!oK||oK._type!="menuitem"||oK._text==""||oK._width<=0){return}for(var T=0,C=this._items.length;T<C;T++){if(this._items[T]===oK){return}}if(e===undefined||e>this._items.length-1){e=-1}oK._insertIndex=e;if(e===-1){this._items.push(oK);this._rItems.push(oK)}else{this._items.splice(e,0,oK);this._rItems.splice(e,0,oK)}},removeItem:function(T){if(!T||T._type!="menuitem"){return}for(var C=0,e=this._items.length;C<e;C++){if(this._items[C]===T){this._items[C].remove();this._items.splice(C,1);delete T._insertIndex;e--}}for(var C=0,e=this._rItems.length;C<e;C++){if(this._rItems[C]===T){this._rItems[C].remove();this._rItems.splice(C,1);delete T._insertIndex;e--}}},addSeparator:function(e){if(e===undefined||e>this._items.length-1){e=-1}var i={_type:"divider",_dIndex:this._dividers.length,_insertIndex:e};this._dividers.push({dom:null});if(e===-1){this._items.push(i)}else{this._items.splice(e,0,i)}},removeSeparator:function(C){if(!this._dividers[C]){return}for(var T=0,e=this._items.length;T<e;T++){if(this._items[T]&&this._items[T]._type=="divider"&&this._items[T]._dIndex==C){this._items.splice(T,1);e--}if(this._items[T]&&this._items[T]._type=="divider"&&this._items[T]._dIndex>C){this._items[T]._dIndex--}}this._dividers.splice(C,1)},getDom:function(){return this._container},show:function(){if(this._isOpen==true){return}this._isOpen=true},hide:function(){if(this._isOpen==false){return}this._isOpen=false},setCursor:function(e){if(!e){return}this._opts.cursor=e},getItem:function(e){return this._rItems[e]},enable:function(){this._enable=true},disable:function(){this._enable=false}});function lx(C,T,i){if(!C||!T||typeof T!="function"){return}eX.call(this);this._opts={width:100,id:""};i=i||{};this._opts.width=(i.width*1)?i.width:100;this._opts.id=i.id?i.id:"";this._text=C+"";this._callback=T;this._map=null;this._type="menuitem";this._contextmenu=null;this._container=null;this._enabled=true;var e=this;ki.load("menu",function(){e._draw()})}lx.inherits(eX,"MenuItem");hv.extend(lx.prototype,{initialize:function(e,i){this._map=e;this._contextmenu=i},remove:function(){this._contextmenu=null;this._map=null},setText:function(e){if(!e){return}this._text=e+""},getDom:function(){return this._container},enable:function(){this._enabled=true},disable:function(){this._enabled=false},setIcon:function(){console.warn("褰撳墠鐗堟湰鏆備笉鏀寔 menuItem.setIcon")}});function lz(e,i){this.setSouthWest(e);this.setNorthEast(i)}hv.extend(lz.prototype,{isEmpty:function(){return this.sw===null&&this.ne===null},equals:function(e){if(!e||e.isEmpty()||this.isEmpty()){return false}return this.sw.equals(e.sw)&&this.ne.equals(e.ne)},containsBounds:function(e){if(!e||e.isEmpty()||this.isEmpty()){return false}return(e.sw.lng>this.sw.lng&&e.ne.lng<this.ne.lng&&e.sw.lat>this.sw.lat&&e.ne.lat<this.ne.lat)},getCenter:function(){if(this.isEmpty()){return null}if(Math.abs(this.sw.lng-this.ne.lng)<=fA.HALF_SIZE){return new d9((this.sw.lng+this.ne.lng)/2,(this.sw.lat+this.ne.lat)/2)}else{var i=this.sw.lng;var C=this.ne.lng;if(i<0){i+=fA.HALF_SIZE*2}else{C+=fA.HALF_SIZE*2}var e=(i+C)/2;if(e>fA.HALF_SIZE){e-=fA.HALF_SIZE*2}return new d9(e,(this.sw.lat+this.ne.lat)/2)}},intersects:function(C){if(!C||C.isEmpty()||this.isEmpty()){return null}if(Math.max(C.sw.lng,C.ne.lng)<Math.min(this.sw.lng,this.ne.lng)||Math.min(C.sw.lng,C.ne.lng)>Math.max(this.sw.lng,this.ne.lng)||Math.max(C.sw.lat,C.ne.lat)<Math.min(this.sw.lat,this.ne.lat)||Math.min(C.sw.lat,C.ne.lat)>Math.max(this.sw.lat,this.ne.lat)){return null}var oK=Math.max(this.sw.lng,C.sw.lng);var i=Math.min(this.ne.lng,C.ne.lng);var T=Math.max(this.sw.lat,C.sw.lat);var e=Math.min(this.ne.lat,C.ne.lat);return new lz(new d9(oK,T),new d9(i,e))},setMinMax:function(){this.minX=this.sw?this.sw.lng:null;this.minY=this.sw?this.sw.lat:null;this.maxX=this.ne?this.ne.lng:null;this.maxY=this.ne?this.ne.lat:null},containsPoint:function(e){if(!e){return}return(e.lng>=this.sw.lng&&e.lng<=this.ne.lng&&e.lat>=this.sw.lat&&e.lat<=this.ne.lat)},extend:function(e){if(!e){return}var i=e.lng;var C=e.lat;if(!this.sw){this.sw=e.clone()}if(!this.ne){this.ne=e.clone()}if(this.sw.lng>i){this.sw.lng=i}if(this.ne.lng<i){this.ne.lng=i}if(this.sw.lat>C){this.sw.lat=C}if(this.ne.lat<C){this.ne.lat=C}},getMin:function(){return this.sw},getMax:function(){return this.ne},getSouthWest:function(){return this.sw},getNorthEast:function(){return this.ne},setSouthWest:function(e){this.sw=e?e.clone():null},setNorthEast:function(e){this.ne=e?e.clone():null},clone:function(){return new lz(this.sw,this.ne)},toSpan:function(){var e;if(this.isEmpty()){e=new mU(0,0)}else{e=new mU(Math.abs(this.ne.lng-this.sw.lng),Math.abs(this.ne.lat-this.sw.lat))}Object.defineProperties(e,{lng:{value:e.width},lat:{value:e.height}});return e},div:function(e){if(!e||e.isEmpty()||this.isEmpty()){return 0}return((this.ne.lng-this.sw.lng)*(this.ne.lat-this.sw.lat))/((e.ne.lng-e.sw.lng)*(e.ne.lat-e.sw.lat))},makeNormalizedPoint:function(e){this.normalizedTopLeft=this.pointTopLeft.clone();this.normalizedTopRight=this.pointTopRight.clone();this.normalizedBottomRight=this.pointBottomRight.clone();this.normalizedBottomLeft=this.pointBottomLeft.clone();while(e<0){e+=360}e=e%360;if(e>=0&&e<90||e>=270&&e<360){if(this.normalizedTopRight.lng<this.normalizedTopLeft.lng){this.normalizedTopRight.lng+=li.WORLD_SIZE_MC}if(this.normalizedBottomRight.lng<this.normalizedBottomLeft.lng){this.normalizedBottomRight.lng+=li.WORLD_SIZE_MC}}else{if(this.normalizedTopLeft.lng<this.normalizedTopRight.lng){this.normalizedTopLeft.lng+=li.WORLD_SIZE_MC}if(this.normalizedBottomLeft.lng<this.normalizedBottomRight.lng){this.normalizedBottomLeft.lng+=li.WORLD_SIZE_MC}}},toString:function(){return"Bounds"}});function d9(e,i){if(isNaN(e)){e=fd(e);e=isNaN(e)?0:e}if(typeof e==="string"){e=parseFloat(e)}if(isNaN(i)){i=fd(i);i=isNaN(i)?0:i}if(typeof i==="string"){i=parseFloat(i)}this.lng=e;this.lat=i}d9.prototype.equals=function(i){if(!i){return false}var T=Math.abs(this.lat-i.lat);var C=Math.abs(this.lng-i.lng);var e=1e-8;if(T<e&&C<e){return true}return false};d9.prototype.similar=function(i){if(!i){return false}var T=Math.abs(this.lat-i.lat);var C=Math.abs(this.lng-i.lng);var e=0.00001;if(T<e&&C<e){return true}return false};d9.prototype.clone=function(){return new d9(this.lng,this.lat)};d9.prototype.add=function(e){return new d9(this.lng+e.lng,this.lat+e.lat)};d9.prototype.sub=function(e){return new d9(this.lng-e.lng,this.lat-e.lat)};d9.prototype.mult=function(e){return new d9(this.lng*e,this.lat*e)};d9.prototype.div=function(e){return new d9(this.lng/e,this.lat/e)};d9.prototype.mag=function(){return Math.sqrt(this.lng*this.lng+this.lat*this.lat)};d9.prototype.toString=function(){return"Point"};d9.serialize=function(i,e){return[i.lng,i.lat]};d9.deserialize=function(e){return new d9(e[0],e[1])};d9.prototype.toGeoJSON=function(){var i="Point";var C=[this.lng,this.lat];var e={type:"Feature",geometry:{type:i,coordinates:C},properties:this.properties};return e};function je(){}function m8(){}m8.prototype=new je();hv.extend(m8,{EARTHRADIUS:6370996.81,MCBAND:[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],LLBAND:[86,60,45,30,15,0],MC2LL:[[1.410526172116255e-8,0.00000898305509648872,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-0.03801003308653,17337981.2],[-7.435856389565537e-9,0.000008983055097726239,-0.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,10260144.86],[-3.030883460898826e-8,0.00000898305509983578,0.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,0.32710905363475,6856817.37],[-1.981981304930552e-8,0.000008983055099779535,0.03278182852591,40.31678527705744,0.65659298677277,-4.44255534477492,0.85341911805263,0.12923347998204,-0.04625736007561,4482777.06],[3.09191371068437e-9,0.000008983055096812155,0.00006995724062,23.10934304144901,-0.00023663490511,-0.6321817810242,-0.00663494467273,0.03430082397953,-0.00466043876332,2555164.4],[2.890871144776878e-9,0.000008983055095805407,-3.068298e-8,7.47137025468032,-0.00000353937994,-0.02145144861037,-0.00001234426596,0.00010322952773,-0.00000323890364,826088.5]],LL2MC:[[-0.0015702102444,111320.7020616939,1704480524535203,-10338987376042340,26112667856603880,-35149669176653700,26595700718403920,-10725012454188240,1800819912950474,82.5],[0.0008277824516172526,111320.7020463578,647795574.6671607,-4082003173.641316,10774905663.51142,-15171875531.51559,12053065338.62167,-5124939663.577472,913311935.9512032,67.5],[0.00337398766765,111320.7020202162,4481351.045890365,-23393751.19931662,79682215.47186455,-115964993.2797253,97236711.15602145,-43661946.33752821,8477230.501135234,52.5],[0.00220636496208,111320.7020209128,51751.86112841131,3796837.749470245,992013.7397791013,-1221952.21711287,1340652.697009075,-620943.6990984312,144416.9293806241,37.5],[-0.0003441963504368392,111320.7020576856,278.2353980772752,2485758.690035394,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-0.0003218135878613132,111320.7020701615,0.00369383431289,823725.6402795718,0.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,0.37238884252424,7.45]],getDistanceByMC:function(oL,T){if(!oL||!T){return 0}var i;var oK;var e;var C;oL=this.convertMC2LL(oL);if(!oL){return 0}i=mn(oL.lng);oK=mn(oL.lat);T=this.convertMC2LL(T);if(!T){return 0}e=mn(T.lng);C=mn(T.lat);return this.getDistance(i,e,oK,C)},getDistanceByLL:function(oL,T){if(!oL||!T){return 0}oL.lng=this.getLoop(oL.lng,-180,180);oL.lat=this.getRange(oL.lat,-80,84);T.lng=this.getLoop(T.lng,-180,180);T.lat=this.getRange(T.lat,-80,84);var i;var e;var oK;var C;i=mn(oL.lng);oK=mn(oL.lat);e=mn(T.lng);C=mn(T.lat);return this.getDistance(i,e,oK,C)},proximityCovertMC2LL:function(e){if(e===null){return e}if(e.lng<180&&e.lng>-180&&e.lat<90&&e.lat>-90){return e}return this.convertMC2LL(e)},convertMC2LL:function(e){if(e===null){return e}if(!e){return new d9(0,0)}var C;var oK;C=new d9(Math.abs(e.lng),Math.abs(e.lat));for(var T=0;T<this.MCBAND.length;T++){if(C.lat>=this.MCBAND[T]){oK=this.MC2LL[T];break}}var oL=this.convertor(e,oK);return new d1(oL.lat,oL.lng)},convertLL2MC:function(oM){if(!oM){return new d9(0,0)}var oO=oM.lat;var T=oM.lng;T=this.getLoop(oM.lng,-180,180);oO=dA(oO,-85,85);var oL;for(var oK=0;oK<this.LLBAND.length;oK++){if(oO>=this.LLBAND[oK]){oL=this.LL2MC[oK];break}}if(!oL){for(oK=0;oK<this.LLBAND.length;oK++){if(oO<=-this.LLBAND[oK]){oL=this.LL2MC[oK];break}}}var C=new d9(T,oO);var oN=this.convertor(C,oL);var e=new d9(oN.lng,oN.lat);e.latLng=new d1(oM.lat,oM.lng);return e},convertor:function(C,T){if(!C||!T){return}var e=T[0]+T[1]*Math.abs(C.lng);var i=Math.abs(C.lat)/T[9];var oK=T[2]+T[3]*i+T[4]*i*i+T[5]*i*i*i+T[6]*i*i*i*i+T[7]*i*i*i*i*i+T[8]*i*i*i*i*i*i;e*=(C.lng<0?-1:1);oK*=(C.lat<0?-1:1);return new d9(e,oK)},getDistance:function(C,i,oL,T){var oM=Math.sin(oL)*Math.sin(T);var e=Math.cos(oL)*Math.cos(T)*Math.cos(i-C);var oK=oM+e;if(oK>1){oK=1}if(oK<-1){oK=-1}return this.EARTHRADIUS*Math.acos(oK)},getRange:function(C,i,e){if(i!=null){C=Math.max(C,i)}if(e!=null){C=Math.min(C,e)}return C},getLoop:function(C,i,e){while(C>e){C-=e-i}while(C<i){C+=e-i}return C},tileToBoundRange:function(C){var i=C.col;var oQ=C.row;var oP=C.baseTileSize;var oN=Math.pow(2,(18-C.zoom));var oL={lbx:i*oP,lby:oQ*oP,rtx:(i+1)*oP,rty:(oQ+1)*oP};var e={lbx:oL.lbx*oN,lby:oL.lby*oN,rtx:oL.rtx*oN,rty:oL.rty*oN};var oO=new d9(e.lbx,e.lby);var oK=new d9(e.rtx,e.rty);var T=this.convertMC2LL(oO);var oM=this.convertMC2LL(oK);return{MC:new lz(oO,oK),LL:new lz(T,oM)}}});hv.extend(m8.prototype,{lnglatToMercator:function(e){return m8.convertLL2MC(e)},lngLatToMercator:function(e){return m8.convertLL2MC(e)},lngLatToPoint:function(e){var i=m8.convertLL2MC(e);return new hV(i.lng,i.lat)},mercatorToLnglat:function(e){return m8.convertMC2LL(e)},mercatorToLngLat:function(e){return m8.convertMC2LL(e)},pointToLngLat:function(i){var e=new d9(i.x,i.y);var C=m8.convertMC2LL(e);return new d1(C.lat,C.lng)},pointToPixel:function(i,oL,oK,T){if(!i){return}i=this.lngLatToMercator(i);var C=this.getZoomUnits(oL);var e=Math.round((i.lng-oK.lng)/C+T.width/2);var oM=Math.round((oK.lat-i.lat)/C+T.height/2);return new hV(e,oM)},mercatorToPixel:function(oL,oK,T,C){if(!oL){return}var i=this.getZoomUnits(oK);var e=Math.round((oL.lng-T.lng)/i+C.width/2);var oM=Math.round((T.lat-oL.lat)/i+C.height/2);return new hV(e,oM)},pixelToPoint:function(T,oM,oL,oK){if(!T){return}var i=this.getZoomUnits(oM);var C=oL.lng+i*(T.x-oK.width/2);var oN=oL.lat-i*(T.y-oK.height/2);var e=new d9(C,oN);return this.mercatorToLngLat(e)},tileToBound:function(T,oN){var i=T.col;var oQ=T.row;var oP=T.baseTileSize;var oO=this.getZoomUnits(T.zoom);var C={x:Math.round(oN.lng/oO),y:Math.round(oN.lat/oO)};var oL={lbx:i*oP,lby:oQ*oP,rtx:(i+1)*oP,rty:(oQ+1)*oP};var e={lbx:oN.lng+(oL.lbx-C.x)*oO,lby:oN.lat+(oL.lby-C.y)*oO,rtx:oN.lng+(oL.rtx-C.x)*oO,rty:oN.lat+(oL.rty-C.y)*oO};var oK=m8.convertMC2LL(new d9(e.lbx,e.lby));var oM=m8.convertMC2LL(new d9(e.rtx,e.rty));return{MC:new lz(new d9(e.lbx,e.lby),new d9(e.rtx,e.rty)),LL:new lz(oK,oM)}},getZoomUnits:function(e){return Math.pow(2,(18-e))},setCoordType:function(e){this.coordsType=e}});function fA(){}fA.prototype=new je();hv.extend(fA,{RADIUS:6378137,EXTENT4326:[-180,-90,180,90],WORLD_EXTENT:[-180,-85,180,85],HALF_SIZE:20037508.342789244,METERS_PER_UNIT:111319.49079327358,EXTENT3857:[-20037508.342789244,-20037508.342789244,20037508.342789244,20037508.342789244],MAX_SAFE_Y:238107693.26496765,origin:[-20037508.342789244,20037508.342789244],size:156543.03392804097,gridSize:[256,256],resolutions:[156543.03392804097,78271.51696402048,39135.75848201024,19567.87924100512,9783.93962050256,4891.96981025128,2445.98490512564,1222.99245256282,611.49622628141,305.748113140705,152.8740565703525,76.43702828517625,38.21851414258813,19.109257071294063,9.554628535647032,4.777314267823516,2.388657133911758,1.194328566955879,0.5971642834779395,0.29858214173896974,0.14929107086948487,0.07464553543474244,0.03732276771737122],gridScaleFrom3857ToBDMC:0.5971642834779395,gridScaleFromBDMCTo3857:1.674581061974954,calcResolutions:function(i){if(this.resolutions.length-1<i){this.resolutions=[];for(var e=0;e<i;++e){this.resolutions.push(this.size/Math.pow(2,e))}}return this.resolutions},forEachTileCoord:function(oP,oO,C,oM){var e=this.getTileRangeForExtentFactory(oP,oO,C);for(var oK=e.minX,oN=e.maxX;oK<=oN;++oK){for(var T=e.minY,oL=e.maxY;T<=oL;++T){oM([oO,oK,T])}}},getTileRangeForExtentFactory:function(C,oK,i,T){var e;switch(i.source){case"BD09MC":if(i.target==="EPSG3857"){e=this.getBDTileRangeForExtentAndZ(C,oK,T)}else{e=this.getTileRangeForExtentAndZ(C,oK,T)}break;case"EPSG3857":e=this.getTileRangeForExtentAndZ(C,oK,T);break;default:e=this.getTileRangeForExtentAndZ(C,oK,T);break}return e},getBDTileRangeForExtentAndZ:function(C,oK,T){var i=[0,0,0];this.getBDTileCoordForXYAndZ_(C[0],C[1],oK,false,i);var e=i[1];var oL=i[2];this.getBDTileCoordForXYAndZ_(C[2],C[3],oK,true,i);return this.createOrUpdateTileRange(e,i[1],oL,i[2],T)},getTileRangeForExtentAndZ:function(C,oK,T){var i=[0,0,0];this.getTileCoordForXYAndZ_(C[0],C[3],oK,false,i);var e=i[1];var oL=i[2];this.getTileCoordForXYAndZ_(C[2],C[1],oK,true,i);return this.createOrUpdateTileRange(e,i[1],oL,i[2],T)},getBDTileCoordForXYAndZ_:function(e,oN,oL,oK,T){var oM=256*Math.pow(2,(18-oL));var C=e/oM;var i=oN/oM;if(oK){C=Math.ceil(C)-1;i=Math.ceil(i)-1}else{C=Math.floor(C);i=Math.floor(i)}return this.createOrUpdateTileCoord(oL,C,i,T)},getTileCoordForXYAndZ_:function(oQ,oP,oN,oO,e){var oR=this.origin;var i=(this.resolutions.length===0?this.calcResolutions(21)[oN]:this.resolutions[oN]);var oT=this.gridSize;var T=oO?0.5:0;var C=oO?0.5:0;var oS=Math.floor((oQ-oR[0])/i+T);var oL=Math.floor((oR[1]-oP)/i+C);var oM=oS/oT[0];var oK=oL/oT[1];if(oO){oM=Math.ceil(oM)-1;oK=Math.ceil(oK)-1}else{oM=Math.floor(oM);oK=Math.floor(oK)}return this.createOrUpdateTileCoord(oN,oM,oK,e)},getTileCoordForCoordAndZ:function(C,i,e){return this.getTileCoordForXYAndZ_(C[0],C[1],i,false,e)},getTileRangeExtent:function(C,oM){var oN=this.origin;if(this.resolutions.length===0){this.calcResolutions(23)}var oK=this.resolutions[C[0]];var oO=this.gridSize;var oL=oN[0]+C[1]*oO[0]*oK;var T=oN[1]-(C[2]+1)*oO[1]*oK;var i=oL+oO[0]*oK;var e=T+oO[1]*oK;return this.createOrUpdateTileRange(oL,i,T,e,oM)},getTileLeftBottomMCPoint:function(oK,C){var i=this.origin;if(this.resolutions.length===0){this.calcResolutions(23)}var T=this.resolutions[oK[0]];var oM=this.gridSize;var e=i[0]+oK[1]*oM[0]*T;var oN=i[1]-(oK[2]+1)*oM[1]*T;var oL=fU.transform([e,oN],fU.EPSG3857,fU.BD09MC);return oL},getRangeExtent:function(i,oR,oN,oT,T){var oO=this.calPiexlResolution(oT,T);var oM=oR/2*oO;var oP=oN/2*oO;var oL=i[0]-oM;var C=i[0]+oM;var oK=i[1]-oP;var e=i[1]+oP;var oQ=fU.transform([oL,oK],fU[T.target],fU[T.source]);var oS=fU.transform([C,e],fU[T.target],fU[T.source]);return this.createOrUpdateTileRange(oQ[0],oS[0],oQ[1],oS[1])},getMousePoint:function(oM,oL,i,oK,C){var T=oF(oM,oL);return this.calLngLatByMapViewPixelInverse(T.clientPos,i,oL.width,oL.height,oK,C)},calLngLatByMapViewPixelInverse:function(T,e,i,oQ,oR,C){var oM=this.calPiexlResolution(oR,C);var oL=T.x-i/2;var oK=T.y-oQ/2;var oO=e[0]+oL*oM;var oN=e[1]-oK*oM;var oP=fU.transform([oO,oN],fU[C.target],fU[C.source]);return oP},calPiexlResolution:function(C,i){var e;switch(i.target){case"BD09MC":e=Math.pow(2,(18-C));break;case"EPSG3857":e=this.resolutions[Math.floor(C)];break;default:e=Math.pow(2,(18-C));break}return e},getXYZCellPixelCoor:function(oM,oK,T,i){var oO=this.gridSize;var oN;var oL;switch(i.source){case"GCJ02":case"EPSG3857":var C=Math.pow(2,T-1)-(oK+1);var e=oM-Math.pow(2,T-1);oN=e*oO[0];oL=C*oO[1];break;case"BD09MC":if(i.target==="EPSG3857"){oN=oM*oO[0];oL=oK*oO[1]}else{var C=Math.pow(2,T-1)-(oK+1);var e=oM-Math.pow(2,T-1);oN=e*oO[0];oL=C*oO[1]}default:break}return{x:oN,y:oL}},mcToPixel:function(i){var C=this.resolutions[Math.floor(zoom)];var e=i.lng/C;var T=i.lat/C;return[e,T]},getBaiduCellPixelCoor:function(e,T,C){var i=256;return{x:e*i,y:T*i}},getRelativePixelCoor:function(oL,T){var i=this.origin;var oK=oL[0];var C=this.resolutions[Math.floor(oK)];var oM=this.gridSize;var e=i[0]/C+oL[1]*oM[0];var oN=i[1]/C-(oL[2]+1)*oM[1];return[T[0]-e,T[1]-oN]},getPointPixelCoor:function(e,oO,i){var oM;var oL;var C=Math.pow(2,(18-oO));var T=this.resolutions[Math.floor(oO)];var oK=m8.convertMC2LL(e);switch(i.source){case"GCJ02":var oN=fU.transform([oK.lng,oK.lat],fU.BD09LL,fU.GCJ02);oN=fU.transform(oN,fU.WGS84,fU.EPSG3857);oM=oN[0]/T;oL=oN[1]/T;break;case"BD09LL":case"EPSG3857":var oN=fU.transform([oK.lng,oK.lat],fU.BD09LL,fU.EPSG3857);oM=oN[0]/T;oL=oN[1]/T;break;case"BD09MC":oM=e.lng/C;oL=e.lat/C;if(i.target==="BD09MC"){oM*=fA.gridScaleFromBDMCTo3857;oL*=fA.gridScaleFromBDMCTo3857}default:break}return[oM,oL]},getResolutionScale:function(i,e){var C;switch(e.target){case"BD09MC":C=this.gridScaleFrom3857ToBDMC;break;case"EPSG3857":C=this.gridScaleFromBDMCTo3857;break;default:C=this.gridScaleFrom3857ToBDMC;break}return C},getBaiduResolutionScale:function(C){var i=this.resolutions[Math.floor(C)];var e=Math.pow(2,(18-C));var T=e/i;return T},getTileCoordCenter:function(C){var e=this.origin;if(this.resolutions.length===0){this.calcResolutions(23)}var i=this.resolutions[C[0]];var T=this.gridSize;return[e[0]+(C[1]+0.5)*T[0]*i,e[1]-(C[2]+0.5)*T[1]*i,]},transformBDmcPoint:function(oK,i){i=i||{};var C=i.source||"EPSG3857";var T=m8.convertMC2LL(new d9(oK.lng,oK.lat));var e;switch(C){case"GCJ02":e=fU.transform([T.lng,T.lat],fU.BD09LL,fU.GCJ02);e=fU.transform(e,fU.WGS84,fU.EPSG3857);break;case"EPSG3857":e=fU.transform([T.lng,T.lat],fU.BD09LL,fU.EPSG3857);break;case"BD09MC":if(i.target==="EPSG3857"){e=fU.transform([T.lng,T.lat],fU.BD09LL,fU.EPSG3857)}else{e=[oK.lng,oK.lat]}break;default:e=fU.transform([T.lng,T.lat],fU.BD09LL,fU[C]);break}return e},transformPointArr:function(e,i,C){return fU.transform(e,fU[i||"BD09LL"],fU[C||"BD09MC"])},getTilesLoop:function(C,e){var i=Math.pow(2,C);while(e>i-1){e=e-i}while(e<0){e=e+i}return e},getLoopBox:function(e,C){var i=this.HALF_SIZE*2;if(e[0]>0&&C[2]<0){C[2]=C[2]+i}else{if(e[0]<0&&C[0]>0){C[0]=C[0]-i}}return C},createOrUpdateTileCoord:function(C,e,T,i){if(i!==undefined){i[0]=C;i[1]=e;i[2]=T;return i}else{return[C,e,T]}},createOrUpdateTileRange:function(e,T,oK,C,i){if(i!==undefined){i.minX=e;i.maxX=T;i.minY=oK;i.maxY=C;return i}else{return{minX:e,maxX:T,minY:oK,maxY:C}}},fromEPSG4326:function(C,oO,oM){var oK=C.length;var oL=oM>1?oM:2;var e=oO;if(e===undefined){if(oL>2){e=C.slice()}else{e=new Array(oK)}}for(var T=0;T<oK;T+=oL){e[T]=(this.HALF_SIZE*C[T])/180;var oN=this.RADIUS*Math.log(Math.tan((Math.PI*(+C[T+1]+90))/360));if(oN>this.MAX_SAFE_Y){oN=this.MAX_SAFE_Y}else{if(oN<-this.MAX_SAFE_Y){oN=-this.MAX_SAFE_Y}}e[T+1]=oN}return e},toEPSG4326:function(C,oN,oM){var oK=C.length;var oL=oM>1?oM:2;var e=oN;if(e===undefined){if(oL>2){e=C.slice()}else{e=new Array(oK)}}for(var T=0;T<oK;T+=oL){e[T]=(180*C[T])/this.HALF_SIZE;e[T+1]=(360*Math.atan(Math.exp(C[T+1]/this.RADIUS)))/Math.PI-90}return e},findParentGridAndPosition:function(T,oT,oS,oN,oO,oQ,oM){if(oS-1<0){return false}var oU=T;var oP=oT;var C=oS;for(var oL=1;oL<=oM;oL++){var e=this.findParent(oU,oP,C,oL);if(!e){return false}var oR=this.getTileKey(e);var oK=oN.getData(oR);if(oK&&oK.status==="ready"){if(oO[oR]){continue}oQ.setData(oK,this.drawIndex,0);oO[oR]=true;return true}oU=e.col;oP=e.row;C=e.zoom}},findParent:function(i,oK,C,T){if(C-1<0){return null}var e=i%2;var oL=oK%2;return{col:Math.floor(i/2),row:Math.floor(oK/2),sonX:e,sonY:oL,thumbLB:[e*0.5,1-oL*0.5-0.5],thumbRT:[e*0.5+0.5,1-oL*0.5],radio:Math.pow(2,T),zoom:C-1,useZoom:C-1}},getTileKey:function(e,T){T=T||{};var i=typeof T.useZoom==="number"?T.useZoom:e.useZoom;var C=e.style||this.mapStyleId||"default";return this.mapType+"_"+C+"_"+e.col+"_"+e.row+"_"+e.zoom+"_"+i},lon2tile:function(i,e){return(Math.floor((i+180)/360*Math.pow(2,e)))},lat2tile:function(C,i){var e=Math.tan(C*Math.PI/180)+1/Math.cos(C*Math.PI/180);return(Math.floor((1-Math.log(e)/Math.PI)/2*Math.pow(2,i)))},tile2long:function(e,i){return(e/Math.pow(2,i)*360-180)},tile2lat:function(C,e){var i=Math.PI-2*Math.PI*C/Math.pow(2,e);return(180/Math.PI*Math.atan(0.5*(Math.exp(i)-Math.exp(-i))))},wgs84ToBd09mc:function(e,T){var C=fU.transform([e,T],fU.WGS84,fU.BD09);var i=m8.convertLL2MC(new d9(C[0],C[1]));return[i.lng,i.lat]}});function k8(){this.curCityName="bj"}k8.prototype=new m8();k8.prototype.constructor=k8;function d1(i,e){if(i<-90){i=-90}else{if(i>90){i=90}}while(e<-180){e+=360}while(e>180){e-=360}e=e||0;i=i||0;d9.call(this,e,i)}d1.inherits(d9,"LatLng");hv.extend(d1.prototype,{equals:function(e){return(this.lat===e.lat&&this.lng===e.lng)},equalsEpsilon:function(e,i){i=i||1e-7;return(Math.abs(this.lat-e.lat)<i&&Math.abs(this.lng-e.lng)<i)},clone:function(){return new d1(this.lat,this.lng)},add:function(e){return new d1(this.lng+e.lng,this.lat+e.lat)},sub:function(e){return new d1(this.lat-e.lat,this.lng-e.lng)},mult:function(e){return new d1(this.lng*e,this.lat*e)},div:function(e){return new d1(this.lng/e,this.lat/e)},mag:function(){return Math.sqrt(this.lng*this.lng+this.lat*this.lat)},getLngSpan:function(e){var i=this.lng;var C=Math.abs(e-i);if(C>180){C=360-C}return C},toString:function(){return"LatLng"},toGeoJSON:function(){var i="Point";var C=[this.lng,this.lat];var e={type:"Feature",geometry:{type:i,coordinates:C},properties:this.properties};return e}});function el(e,i){if(e&&!i){i=e}this._sw=this._ne=null;this._swLng=this._swLat=null;this._neLng=this._neLat=null;if(e){this._sw=new d1(e.lat,e.lng);this._ne=new d1(i.lat,i.lng);this._swLng=e.lng;this._swLat=e.lat;this._neLng=i.lng;this._neLat=i.lat}}hv.extend(el.prototype,{isEmpty:function(){return !this._sw||!this._ne},equals:function(e){if(this.isEmpty()){return false}return this.getSouthWest().equals(e.getSouthWest())&&this.getNorthEast().equals(e.getNorthEast())},getSouthWest:function(){return this._sw},getNorthEast:function(){return this._ne},containsBounds:function(e){if(this.isEmpty()||e.isEmpty()){return false}return(e._swLng>this._swLng&&e._neLng<this._neLng&&e._swLat>this._swLat&&e._neLat<this._neLat)},getCenter:function(){if(this.isEmpty()){return null}return new d1((this._swLat+this._neLat)/2,(this._swLng+this._neLng)/2)},intersects:function(C){if(Math.max(C._swLng,C._neLng)<Math.min(this._swLng,this._neLng)||Math.min(C._swLng,C._neLng)>Math.max(this._swLng,this._neLng)||Math.max(C._swLat,C._neLat)<Math.min(this._swLat,this._neLat)||Math.min(C._swLat,C._neLat)>Math.max(this._swLat,this._neLat)){return false}var oK=Math.max(this._swLng,C._swLng);var i=Math.min(this._neLng,C._neLng);var T=Math.max(this._swLat,C._swLat);var e=Math.min(this._neLat,C._neLat);this._sw=new d1(T,oK);this._ne=new d1(e,i);this._swLng=oK;this._swLat=T;this._neLng=i;this._neLat=e;return true},containsPoint:function(e){if(this.isEmpty()){return false}return(e.lng>=this._swLng&&e.lng<=this._neLng&&e.lat>=this._swLat&&e.lat<=this._neLat)},extend:function(e){var i=e.lng;var C=e.lat;if(!this._sw){this._sw=new d1(0,0)}if(!this._ne){this._ne=new d1(0,0)}if(!this._swLng||this._swLng>i){this._sw.lng=this._swLng=i}if(!this._neLng||this._neLng<i){this._ne.lng=this._neLng=i}if(!this._swLat||this._swLat>C){this._sw.lat=this._swLat=C}if(!this._neLat||this._neLat<C){this._ne.lat=this._neLat=C}},toSpan:function(){if(this.isEmpty()){return new d1(0,0)}return new d1(Math.abs(this._neLat-this._swLat),Math.abs(this._neLng-this._swLng))},union:function(i){if(i.isEmpty()){return false}var e=i.getSouthWest();var C=i.getNorthEast();if(this._swLat>e.lat){this._swLat=e.lat}if(this._swLng>e.lng){this._swLng=e.lng}if(this._neLat<C.lat){this._neLat=C.lat}if(this._neLng<C.lng){this._neLng=C.lng}this._sw=new d1(this._swLat,this._swLng);this._ne=new d1(this._neLat,this._neLng);return true},toString:function(){return this._swLat+", "+this._swLng+", "+this._neLat+", "+this._neLng}});window.COORDINATES_WGS84=1;window.COORDINATES_WGS84_MC=2;window.COORDINATES_GCJ02=3;window.COORDINATES_GCJ02_MC=4;window.COORDINATES_BD09=5;window.COORDINATES_BD09_MC=6;window.COORDINATES_MAPBAR=7;window.COORDINATES_51=8;function iI(){}iI.inherits(eX,"Convertor");hv.extend(iI.prototype,{translate:function(i,oM,oL,oK){oM=oM||1;oL=oL||5;var T=function(oO,oR){var oQ=oO.toString();var oP=oQ.indexOf(".");if(oP===-1){return oO}var oN=oQ.length-oP-1;if(oN<=oR){return oO}return parseFloat(oQ.substring(0,oP+oR+1))};function C(oO,oQ){var oP=Math.round(T(oO,6)*1000000);var oN=Math.round(T(oQ,6)*1000000);return oP.toString(36)+","+oN.toString(36)}if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){var e=window._BMapSecurityConfig["serviceHost"]+"?qt=coords&coords_encoding=36&coords=";hv.each(i,function(oN){e+=C(oN.lng,oN.lat)+";"});e=e.replace(/;$/gi,"");e=e+"&from="+oM+"&to="+oL+"&v="+ep()+"&type=webgl"}else{var e=K.apiHost+"?qt=coords&coords_encoding=36&coords=";hv.each(i,function(oN){e+=C(oN.lng,oN.lat)+";"});e=e.replace(/;$/gi,"");e=e+"&from="+oM+"&to="+oL+"&v="+ep()+"&type=webgl&ak="+hj}e7.request(e,function(oO){data=oO.content;if(typeof data!=="undefined"&&data!==null&&data.status===0){var oN=[];hv.each(data.result,function(oP){oN.push(new d9(oP.x,oP.y))});delete data.result;data.points=oN}else{if(oO.result&&oO.result.error){data={status:oO.result.errror,message:"璁块棶閿欒锛岃鍙傝�冮敊璇姸鎬佺爜https://lbsyun.baidu.com/index.php?title=webapi/appendix"}}}oK&&oK(data)})}});var gp={idle:0,freeze:1,zooming:2,dragging:3,moving:4,readyToDrag:5,readyToPinch:6,pinching:7,stdMapCtrlDrag:8,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,arrowOpCodes:{37:1,38:2,39:4,40:8}};var aG={_map:null,_html:"<div class='BMap_opMask' unselectable='on'></div>",_maskElement:null,_cursor:"default",inUse:false,show:function(e){if(!this._map){this._map=e}this.inUse=true;if(!this._maskElement){this._createMask(e)}this._maskElement.style.display="block"},_createMask:function(i){if(!this._map){this._map=i}if(!this._map){return}var e=this._maskElement=cQ(this._map.container,this._html);hv.on(e,"mouseup",function(C){if(C.button==2){kK(C)}});hv.on(e,"contextmenu",kK);e.style.display="none"},getDrawPoint:function(T,oM,oK){T=window.event||T;var i=T.offsetX||T.layerX||0;var oL=parseInt(T.offsetY)||parseInt(T.layerY)||0;var C=T.target||T.srcElement;if(C!=aG.getDom(this._map)&&oM==true){while(C&&C!=this._map.container){if(!(C.clientWidth==0&&C.clientHeight==0&&C.offsetParent&&C.offsetParent.nodeName.toLowerCase()=="td")){i+=C.offsetLeft;oL+=C.offsetTop}C=C.offsetParent}}if(C!=aG.getDom(this._map)&&C!=this._map.container){return}if(typeof i==="undefined"||typeof oL==="undefined"){return}if(isNaN(i)||isNaN(oL)){return}if(oK){i=i+oK.x;oL=oL+oK.y}return this._map.pixelToPointIn(new hV(i,oL))},hide:function(){if(!this._map){return}this.inUse=false;if(this._maskElement){this._maskElement.style.display="none"}},getDom:function(e){if(!this._maskElement){this._createMask(e)}return this._maskElement},setCursor:function(e){this._cursor=e||"default";if(this._maskElement){this._maskElement.style.cursor=this._cursor}}};function bw(){this._type="overlay"}bw.inherits(hv.BaseClass,"Overlay");bw.getZIndex=function(i,e){i=i*1;if(!i){return 0}if(e){i=m8.convertMC2LL(new d9(0,i)).lat}return(i*-100000)<<1};hv.extend(bw.prototype,{_i:function(oM){this._map=oM;if(!this.domElement&&c2(this.initialize)){this.domElement=this.initialize(oM);if(this.domElement){this.domElement.style.WebkitUserSelect="none";if(this.enableDraggingMap!==undefined&&!this.enableDraggingMap&&!(this instanceof D)){var oL=["mouseout","mouseover","click","keydown","selectstart"];var C=(window.PointerEvent||window.MSPointerEvent)&&(navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0);var e=["mousedown"];if(C){if(window.PointerEvent){e=["pointerdown"]}else{if(window.MSPointerEvent){e=["MSPointerDown"]}}}for(var T=0;T<e.length;T++){oL.push(e[T])}var oK=this;hv.each(oL,function(i){hv.on(oK.domElement,i,aF)})}}}this.draw()},initialize:function(e){throw"initialize鏂规硶鏈疄鐜�"},draw:function(){throw"draw鏂规硶鏈疄鐜�"},remove:function(){if(this.domElement&&this.domElement.parentNode){this.domElement.parentNode.removeChild(this.domElement)}this.domElement=null;this.dispatchEvent(new ix("onremove"))},hide:function(){this._visible=false;hv.hide(this.domElement)},show:function(){this._visible=true;hv.show(this.domElement)},isVisible:function(){return this._visible},getMap:function(){return this._map},dispose:function(){hv.BaseClass.prototype.decontrol.call(this)}});function g2(){hv.BaseClass.call(this);bw.call(this);this._visible=true;this._visibleInternal=true;this.zIndex=0;this.infoWindow=null;this._dblclickTime=0}g2.inherits(bw,"OverlayInternal");hv.extend(g2.prototype,{initialize:function(e){this.map=e;hv.BaseClass.call(this,this.hashCode);return null},draw:function(){},remove:function(){this.decontrol();bw.prototype.remove.call(this)},destroy:function(){},hide:function(){this._visible=false},show:function(){this._visible=true},getDom:function(){return this.domElement},getContainer:function(){return this.domElement},setClassName:function(){},setConfig:function(i){if(!i){return}for(var e in i){if(i.hasOwnProperty(e)){this._config[e]=i[e]}}},getPoint:function(C,T){if(!C){return this.point}else{var e=T?T.width:0;var oK=T?T.height:0;if(this.map){var i=this.map.pointToPixelIn(this.point);if(this._config&&this._config.offset){i.x=i.x+this._config.offset.width+e;i.y=i.y+this._config.offset.height+oK}else{i.x=i.x+e;i.y=i.y+oK}return this.map.pixelToPointIn(i)}}},setZIndex:function(e){this.zIndex=e},isVisible:function(){if(!this.domElement){return false}return !!this._visible},enableMassClear:function(){this._config.enableMassClear=true},disableMassClear:function(){this._config.enableMassClear=false},showInternal:function(){this._visibleInternal=true},hideInternal:function(e){this._visibleInternal=false;this._hideInternalReason=e},addContextMenu:function(e){this._menu=e},removeContextMenu:function(e){this._menu=null}});function bs(e){this.map=e;this._overlays={};this._overlayArray=[];this._customOverlays=[];e._overlays=this._overlays;e._overlayArray=this._overlayArray;e._customOverlays=this._customOverlays;this._zoomingOrMoving=false;this._init()}bs.prototype._init=function(){if(this.map._renderType!=="webgl"){this._createOverlayContainers()}else{this._createWebGLOverlayContainers()}this._bind()};bs.prototype._createOverlayContainers=function(){var e=this.map;e.temp.overlayDiv=e.overlayDiv=this._createOverlayDiv(e.platform,200);e.temp.overlayDivEx=e.overlayDivEx=this._createOverlayDiv(e.platform,50);e._panes.floatPane=this._createOverlayDiv(e.temp.overlayDiv,800);e._panes.markerMouseTarget=this._createOverlayDiv(e.temp.overlayDiv,700);e._panes.floatShadow=this._createOverlayDiv(e.temp.overlayDiv,600);e._panes.labelPane=this._createOverlayDiv(e.temp.overlayDiv,500);e._panes.markerPane=this._createOverlayDiv(e.temp.overlayDiv,400);if(e.isCanvasMap()){e._panes.mapPane=this._createOverlayDiv(e.temp.overlayDivEx,50)}else{e._panes.mapPane=this._createOverlayDiv(e.temp.overlayDiv,200)}};bs.prototype._createWebGLOverlayContainers=function(){var e=this.map;e.temp.overlayDiv=e.overlayDiv=this._createOverlayDiv(e.platform,200);e._panes.floatPane=this._createOverlayDiv(e.temp.overlayDiv,800);e._panes.markerMouseTarget=this._createOverlayDiv(e.temp.overlayDiv,700);e._panes.floatShadow=this._createOverlayDiv(e.temp.overlayDiv,600);e._panes.labelPane=this._createOverlayDiv(e.temp.overlayDiv,500);e._panes.markerPane=this._createOverlayDiv(e.temp.overlayDiv,400)};bs.prototype._createOverlayDiv=function(e,T){var C=da("div");var i=C.style;i.position="absolute";i.top=i.left=i.width=i.height="0";i.zIndex=T;e.appendChild(C);return C};bs.prototype._bind=function(){var oK=this.map;var T=this;function i(oM){T.draw(oM)}if(oK._renderType!=="webgl"){oK.addEventListener("load",i);oK.addEventListener("moveend",i);oK.addEventListener("resize",i);oK.addEventListener("zoomend",i);oK.addEventListener("zooming_inner",i)}else{oK.on("update",i)}oK.on("destroy",function(){oK._overlays={};oK._overlayArray=[];oK._customOverlays=[];oK.overlayDiv=null;oK.overlayDivEx=null;var oM=Object.keys(oK._panes);for(var oN=0;oN<oM.length;oN++){oK._panes[oM[oN]]=null}var oO=Object.keys(oK.temp);for(var oN=0;oN<oO.length;oN++){oK.temp[oO[oN]]=null}});oK.addEventListener("zoomend",function(oM){if(this.mapType==="B_EARTH_MAP"){if(this._earth.getZoom()<this._earth.zoomForNight+1){this.temp.overlayDiv.style.display="none";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display="none"}}else{if(this.temp.overlayDiv.style.display==="none"){this.temp.overlayDiv.style.display="";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display=""}if(this.temp.infoWin&&this.temp.infoWin.isOpen()){this.temp.infoWin.redraw()}}}}});oK.addEventListener("oncenterandzoom",function(oM){T.draw(oM);if(this.mapType==="B_EARTH_MAP"){if(this._earth.getZoom()<this._earth.zoomForNight+1){this.temp.overlayDiv.style.display="none";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display="none"}}else{if(this.temp.overlayDiv.style.display==="none"){this.temp.overlayDiv.style.display="";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display=""}if(this.temp.infoWin&&this.temp.infoWin.isOpen()){this.temp.infoWin.redraw()}}}}});oK.addEventListener("maptypechange",function(oM){if(this.mapType==="B_EARTH_MAP"){if(this._panes.mapPane){this._panes.mapPane.style.display="none"}if(this._earth.getZoom()<this._earth.zoomForNight+1){this.temp.overlayDiv.style.display="none";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display="none"}}else{if(this.temp.overlayDiv.style.display==="none"){this.temp.overlayDiv.style.display="";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display=""}if(this.temp.infoWin&&this.temp.infoWin.isOpen()){this.temp.infoWin.redraw()}}}if(this._panes.markerPane){this._panes.markerPane.style.display="none"}}else{if(this._panes.mapPane){this._panes.mapPane.style.display=""}if(this._panes.markerPane){this._panes.markerPane.style.display=""}if(this.temp.overlayDiv.style.display==="none"){this.temp.overlayDiv.style.display="";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display=""}if(this.temp.infoWin&&this.temp.infoWin.isOpen()){this.temp.infoWin.redraw()}}}T.draw(oM)});oK.on("earthstatuschange",function oL(oM){T.draw(oM)});oK.addEventListener("addoverlay",function(oQ){var oN=oQ.target;if(oN instanceof g2){if(!T._overlays[oN.hashCode]){T._overlays[oN.hashCode]=oN;T._overlayArray.push(oN)}}else{var oP=false;for(var oO=0,oM=T._customOverlays.length;oO<oM;oO++){if(T._customOverlays[oO]===oN){oP=true;break}}if(!oP){T._customOverlays.push(oN)}}});oK.addEventListener("removeoverlay",function(oP){var oN=oP.target;if(oN instanceof g2){delete T._overlays[oN.hashCode];for(var oO=0;oO<T._overlayArray.length;oO++){if(T._overlayArray[oO]===oN){T._overlayArray.splice(oO,1);break}}}else{for(var oO=0,oM=T._customOverlays.length;oO<oM;oO++){if(T._customOverlays[oO]===oN){T._customOverlays.splice(oO,1);break}}}});oK.addEventListener("clearoverlays",function(oO){this.closeInfoWindow();this.closeSimpleInfoWindow();for(var oN in T._overlays){if(T._overlays[oN]._config.enableMassClear){this.removeOverlay(T._overlays[oN])}}for(var oM=T._customOverlays.length-1;oM>=0;oM--){if(T._customOverlays[oM].enableMassClear!==false){this.removeOverlay(T._customOverlays[oM]);T._customOverlays.splice(oM,1)}}});oK.addEventListener("infowindowopen",function(oN){var oM=this.infoWindow;if(oM){hv.hide(oM.popDom);hv.hide(oM.shadowDom)}});function C(){if(this.getMapTypeId()==="B_EARTH_MAP"||this._renderType==="webgl"){if(T._zoomingOrMoving===false){this._panes.markerMouseTarget.style.display="none";T._zoomingOrMoving=true}}}function e(oO){if(this.getMapTypeId()==="B_EARTH_MAP"||this._renderType==="webgl"){if(T._zoomingOrMoving===true){if(this._panes.markerMouseTarget){this._panes.markerMouseTarget.style.display=""}T._zoomingOrMoving=false;for(var oN=0;oN<T._overlayArray.length;oN++){var oM=T._overlayArray[oN];if(oM instanceof og===true){oM.draw(oO)}}}}}oK.addEventListener("tilt_changed",e);oK.addEventListener("heading_changed",e);oK.addEventListener("movestart",C);oK.addEventListener("moveend",e);oK.addEventListener("zoomstart",C);oK.addEventListener("zoomend",e);oK.addEventListener("animation_start",C);oK.addEventListener("animation_end",e);oK.addEventListener("displayoptions_changed",function(oM){if(this._displayOptions.overlay===false){this.temp.overlayDiv.style.display="none"}else{this.temp.overlayDiv.style.display=""}})};bs.prototype.draw=function(oM){oM=oM||{};if(this.map.getMapTypeId()==="B_EARTH_MAP"){for(var oK=0;oK<this._overlayArray.length;oK++){var C=this._overlayArray[oK];if(C instanceof mk===true){continue}if(this._zoomingOrMoving){if(C instanceof og===true){continue}}C.draw(oM)}}else{for(var oK=0,T=this._overlayArray.length;oK<T;oK++){var C=this._overlayArray[oK];if(this._zoomingOrMoving&&C instanceof og===true){continue}C.draw(oM)}}hv.each(this._customOverlays,function(e){e.draw(oM)});if(this.map.temp.infoWin){this.map.temp.infoWin.setPosition(oM.center,oM.zoom)}if(this.map.getMapTypeId()!=="B_EARTH_MAP"&&this.map._renderType!=="webgl"){if(cv.DrawerSelector){var oL=cv.DrawerSelector.getDrawer(this.map);oL.setPalette()}}};cv.register(function(e){e._overlayMgr=new bs(e)});function mk(e){g2.call(this);var i=fq();this._config={strokeColor:i.strokeColor,strokeWeight:2,strokeOpacity:1,strokeStyle:"solid",dashArray:null,strokeLineCap:"round",strokeLineJoin:"round",enableMassClear:true,getParseTolerance:null,getParseCacheIndex:null,enableParse:true,enableEditing:false,enableClicking:true,mouseOverTolerance:5,geodesic:false,linkRight:false,clip:true,texture:null,textureSize:null,textureZoomWithMap:false,textureRepeat:true,zIndex:0};this.setConfig(e);if(this._config.zIndex!==undefined){this.zIndex=this._config.zIndex}if(this._config.strokeOpacity<0||this._config.strokeOpacity>1){this._config.strokeOpacity=1}if(this._config.fillOpacity<0||this._config.fillOpacity>1){this._config.fillOpacity=1}if(this._config.strokeStyle!=="solid"&&this._config.strokeStyle!=="dashed"&&this._config.strokeStyle!=="dotted"){this._config.strokeStyle="solid"}this.domElement=null;this._bounds=new lz();this.points=[];this.greatCirclePoints=[];this._parseCache=[];this._holesCache=[];this._parseCacheGL=[];this._parseCacheGLRaw=[];this._areaCacheGL=[];this._strokeStyleInfoForGL=[[]];this._fillStyleInfoForGL="";this.vertexMarkers=[];this._temp={}}mk.JOININDEX={miter:0,round:1,bevel:2};mk.CAPINDEX={round:0,butt:1,square:2};mk.inherits(g2,"Graph");mk.getGraphPoints=function(i){var e=[];if(!i||i.length===0){return e}if(typeof i==="string"){var C=i.split(";");hv.each(C,function(oK){var T=oK.split(",");e.push(new d9(T[0],T[1]))})}if(i.constructor===Array&&i.length>0){e=i}return e};mk.parseTolerance={0:[0.09,0.005,0.0001,0.00001],1:[9000,500,20,1]};hv.extend(mk.prototype,{initialize:function(e){this.map=e;return null},draw:function(){},setPoints:function(e){this._clearCache();this.points=mk.getGraphPoints(e).slice(0);this._calcBounds()},setPathIn:function(e){this.setPoints(e)},_calcBounds:function(){if(!this.points){return}var e=this;e._bounds=new lz();if(!this.hasMultipleParts){hv.each(this.points,function(i){e._bounds.extend(i)})}else{hv.each(this.points,function(i){hv.each(i,function(C){e._bounds.extend(C)})})}},getPoints:function(){return this.points},getPathIn:function(){return this.points},setPointAt:function(i,e){if(!e||!this.points[i]){return}this._clearCache();this.points[i]=new d9(e.lng,e.lat);this._calcBounds()},setPositionAt:function(i,e){if(!e||!this.points[i]){return}var C=m8.convertLL2MC(e);this.setPointAt(i,C)},setOptions:function(i){i=i||{};for(var e in i){if(i.hasOwnProperty(e)){this._config[e]=i[e]}}},setStrokeColor:function(e){this._config.strokeColor=e},getStrokeColor:function(){return this._config.strokeColor},setStrokeLineCap:function(e){this._config.strokeLineCap=e},getStrokeLineCap:function(){return this._config.strokeLineCap},setStrokeLineJoin:function(e){this._config.strokeLineJoin=e},getStrokeLineJoin:function(){return this._config.strokeLineJoin},setStrokeWeight:function(e){if(e>0){this._config.strokeWeight=e}},getStrokeWeight:function(){return this._config.strokeWeight},setStrokeOpacity:function(e){if(!e||e>1||e<0){return}this._config.strokeOpacity=e},getStrokeOpacity:function(){return this._config.strokeOpacity},setFillOpacity:function(e){if(e>1||e<0){return}this._config.fillOpacity=e},getFillOpacity:function(){return this._config.fillOpacity},setStrokeStyle:function(e){if(e!=="solid"&&e!=="dashed"&&e!=="dotted"){return}this._config.strokeStyle=e},getStrokeStyle:function(){return this._config.strokeStyle},setFillColor:function(e){this._config.fillColor=e||""},getFillColor:function(){return this._config.fillColor},getBoundsIn:function(){this._bounds.setMinMax();return this._bounds},getBounds:function(){var e=this.getBoundsIn();var i=new lz(m8.convertMC2LL(e.getSouthWest()),m8.convertMC2LL(e.getNorthEast()));i.setMinMax();return i},remove:function(){if(this.map){this.map.removeEventListener("onmousemove",this._graphMouseEvent);this.map.removeEventListener("onclick",this._graphClickEvent)}g2.prototype.remove.call(this);this._clearCache();var e=new ix("onlineupdate");e.action="remove";e.overlay=this;this.fire(e)},enableEditing:function(){if(this.points.length<2){return}this._config.enableEditing=true;var e=this;ki.load("poly",function(){e.addVertexs()},true)},disableEditing:function(){this._config.enableEditing=false;var e=this;ki.load("poly",function(){e.clearVertexs()},true)},getLength:function(){if(typeof this._length==="number"){return this._length}if(typeof this._config.totalLength==="number"){this._length=this._config.totalLength;return this._length}var C=0;if(this.points.length<=1){this._length=0;return C}for(var e=0;e<this.points.length-1;e++){C+=gQ(this.points[e],this.points[e+1])}this._length=C;return C},getParsedPoints:function(){var e=this._simplification(this.points);if(this.hasMultipleParts){return e}return[e]},_simplification:function(oN){var e=this.map;var oM=this.getParseCacheIndex(e.getZoom());var oP;if(this._parseCache[oM]){oP=this._parseCache[oM]}else{var oK=oN;if(this.greatCirclePoints.length>0){oK=this.greatCirclePoints}var oL=this.getParseTolerance(e.getZoom(),1);if(!this.hasMultipleParts){var oO=fS(oK,oL);oO=mo(oO,oL)}else{var oO=[];for(var C=0;C<oK.length;C++){var T=fS(oK[C],oL);T=mo(T,oL);oO.push(T)}}oP=this._parseCache[oM]=oO}return oP},_clearCache:function(){this._parseCache.length=0;this._parseCacheGL.length=0;this._parseCacheGLRaw.length=0;this._areaCacheGL.length=0},canRenderDataBeMerged:function(){var e=this._config;if(e.texture){return false}return true}});if(hv.Browser.ie&&document.namespaces&&!document.namespaces.olv){document.namespaces.add("olv","urn:schemas-microsoft-com:vml")}function cl(oL,T,oS){var oP=false,oN=false,oQ=false,oU=new hV(oL.x,oL.y),oT=new hV(T.x,T.y),oK=iy(oU,oS),C=iy(oT,oS),oR;var oW,oV;var oO=oS.minX,oM=oS.minY,i=oS.maxX,e=oS.maxY;do{if(oK.all==0&&C.all==0){oP=true;oQ=true}else{if((oK.all&C.all)!=0){oQ=true}else{if(oK.all!=0){oR=oK}else{oR=C}if(oR.top){oW=oU.x+(oT.x-oU.x)*(oM-oU.y)/(oT.y-oU.y);oV=oM}else{if(oR.bottom){oW=oU.x+(oT.x-oU.x)*(e-oU.y)/(oT.y-oU.y);oV=e}else{if(oR.right){oV=oU.y+(oT.y-oU.y)*(i-oU.x)/(oT.x-oU.x);oW=i}else{if(oR.left){oV=oU.y+(oT.y-oU.y)*(oO-oU.x)/(oT.x-oU.x);oW=oO}}}}oN=true;if(oR.all==oK.all){oU.x=Math.round(oW);oU.y=Math.round(oV);oK=iy(oU,oS)}else{oT.x=Math.round(oW);oT.y=Math.round(oV);C=iy(oT,oS)}}}}while(!oQ);if(oP){return{pixel0:new hV(oU.x,oU.y),pixel1:new hV(oT.x,oT.y),clip:oN?true:false}}}function iy(i,oK){var C={top:0,bottom:0,right:0,left:0,all:0};var e=i.x,T=i.y;if(T<oK.minY){C.top=8;C.all+=C.top}else{if(T>oK.maxY){C.bottom=4;C.all+=C.bottom}}if(e>oK.maxX){C.right=2;C.all+=C.right}else{if(e<oK.minX){C.left=1;C.all+=C.left}}return C}function fH(e){e=e.replace(/,/gm," ");e=e.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2");e=e.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2");e=e.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,"$1 $2");e=e.replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2");e=e.replace(/([0-9])([+\-])/gm,"$1 $2");e=e.replace(/(\.[0-9]*)(\.)/gm,"$1 $2");e=e.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ");e=fH.compressSpaces(e);e=fH.trim(e);this.PathParser=new (function(i){this.tokens=i.split(" ");this.reset=function(){this.i=-1;this.command="";this.previousCommand="";this.start=new fH.Point(0,0);this.control=new fH.Point(0,0);this.current=new fH.Point(0,0);this.points=[];this.angles=[]};this.isEnd=function(){return this.i>=this.tokens.length-1};this.isCommandOrEnd=function(){if(this.isEnd()){return true}return this.tokens[this.i+1].match(/^[A-Za-z]$/)!=null};this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return true;break}return false};this.getToken=function(){this.i++;return this.tokens[this.i]};this.getScalar=function(){return parseFloat(this.getToken())};this.nextCommand=function(){this.previousCommand=this.command;this.command=this.getToken()};this.getPoint=function(){var C=new fH.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(C)};this.getAsControlPoint=function(){var C=this.getPoint();this.control=C;return C};this.getAsCurrentPoint=function(){var C=this.getPoint();this.current=C;return C};this.getReflectedControlPoint=function(){if(this.previousCommand.toLowerCase()!="c"&&this.previousCommand.toLowerCase()!="s"&&this.previousCommand.toLowerCase()!="q"&&this.previousCommand.toLowerCase()!="t"){return this.current}var C=new fH.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return C};this.makeAbsolute=function(C){if(this.isRelativeCommand()){C.x+=this.current.x;C.y+=this.current.y}return C};this.addMarker=function(T,oK,C){if(C!=null&&this.angles.length>0&&this.angles[this.angles.length-1]==null){this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(C)}this.addMarkerAngle(T,oK==null?null:oK.angleTo(T))};this.addMarkerAngle=function(T,C){this.points.push(T);this.angles.push(C)};this.getMarkerPoints=function(){return this.points};this.getMarkerAngles=function(){for(var T=0;T<this.angles.length;T++){if(this.angles[T]==null){for(var C=T+1;C<this.angles.length;C++){if(this.angles[C]!=null){this.angles[T]=this.angles[C];break}}}}return this.angles}})(e);this.bounds=function(){return this.draw(null)};this.draw=function(o3){var o5=this.PathParser;o5.reset();var oQ=new fH.BoundingBox();if(o3!=null){o3.beginPath()}while(!o5.isEnd()){o5.nextCommand();switch(o5.command){case"M":case"m":var o0=o5.getAsCurrentPoint();o5.addMarker(o0);oQ.addPoint(o0.x,o0.y);if(o3!=null){o3.moveTo(o0.x,o0.y)}o5.start=o5.current;while(!o5.isCommandOrEnd()){var o0=o5.getAsCurrentPoint();o5.addMarker(o0,o5.start);oQ.addPoint(o0.x,o0.y);if(o3!=null){o3.lineTo(o0.x,o0.y)}}break;case"L":case"l":while(!o5.isCommandOrEnd()){var o9=o5.current;var o0=o5.getAsCurrentPoint();o5.addMarker(o0,o9);oQ.addPoint(o0.x,o0.y);if(o3!=null){o3.lineTo(o0.x,o0.y)}}break;case"H":case"h":while(!o5.isCommandOrEnd()){var T=new fH.Point((o5.isRelativeCommand()?o5.current.x:0)+o5.getScalar(),o5.current.y);o5.addMarker(T,o5.current);o5.current=T;oQ.addPoint(o5.current.x,o5.current.y);if(o3!=null){o3.lineTo(o5.current.x,o5.current.y)}}break;case"V":case"v":while(!o5.isCommandOrEnd()){var T=new fH.Point(o5.current.x,(o5.isRelativeCommand()?o5.current.y:0)+o5.getScalar());o5.addMarker(T,o5.current);o5.current=T;oQ.addPoint(o5.current.x,o5.current.y);if(o3!=null){o3.lineTo(o5.current.x,o5.current.y)}}break;case"C":case"c":while(!o5.isCommandOrEnd()){var o7=o5.current;var oL=o5.getPoint();var oM=o5.getAsControlPoint();var oS=o5.getAsCurrentPoint();o5.addMarker(oS,oM,oL);oQ.addBezierCurve(o7.x,o7.y,oL.x,oL.y,oM.x,oM.y,oS.x,oS.y);if(o3!=null){o3.bezierCurveTo(oL.x,oL.y,oM.x,oM.y,oS.x,oS.y)}}break;case"S":case"s":while(!o5.isCommandOrEnd()){var o7=o5.current;var oL=o5.getReflectedControlPoint();var oM=o5.getAsControlPoint();var oS=o5.getAsCurrentPoint();o5.addMarker(oS,oM,oL);oQ.addBezierCurve(o7.x,o7.y,oL.x,oL.y,oM.x,oM.y,oS.x,oS.y);if(o3!=null){o3.bezierCurveTo(oL.x,oL.y,oM.x,oM.y,oS.x,oS.y)}}break;case"Q":case"q":while(!o5.isCommandOrEnd()){var o7=o5.current;var oM=o5.getAsControlPoint();var oS=o5.getAsCurrentPoint();o5.addMarker(oS,oM,oM);oQ.addQuadraticCurve(o7.x,o7.y,oM.x,oM.y,oS.x,oS.y);if(o3!=null){o3.quadraticCurveTo(oM.x,oM.y,oS.x,oS.y)}}break;case"T":case"t":while(!o5.isCommandOrEnd()){var o7=o5.current;var oM=o5.getReflectedControlPoint();o5.control=oM;var oS=o5.getAsCurrentPoint();o5.addMarker(oS,oM,oM);oQ.addQuadraticCurve(o7.x,o7.y,oM.x,oM.y,oS.x,oS.y);if(o3!=null){o3.quadraticCurveTo(oM.x,oM.y,oS.x,oS.y)}}break;case"A":case"a":while(!o5.isCommandOrEnd()){var o7=o5.current;var oP=o5.getScalar();var oO=o5.getScalar();var C=o5.getScalar()*(Math.PI/180);var oR=o5.getScalar();var oN=o5.getScalar();var oS=o5.getAsCurrentPoint();var pc=new fH.Point(Math.cos(C)*(o7.x-oS.x)/2+Math.sin(C)*(o7.y-oS.y)/2,-Math.sin(C)*(o7.x-oS.x)/2+Math.cos(C)*(o7.y-oS.y)/2);var o4=Math.pow(pc.x,2)/Math.pow(oP,2)+Math.pow(pc.y,2)/Math.pow(oO,2);if(o4>1){oP*=Math.sqrt(o4);oO*=Math.sqrt(o4)}var oW=(oR==oN?-1:1)*Math.sqrt(((Math.pow(oP,2)*Math.pow(oO,2))-(Math.pow(oP,2)*Math.pow(pc.y,2))-(Math.pow(oO,2)*Math.pow(pc.x,2)))/(Math.pow(oP,2)*Math.pow(pc.y,2)+Math.pow(oO,2)*Math.pow(pc.x,2)));if(isNaN(oW)){oW=0}var oV=new fH.Point(oW*oP*pc.y/oO,oW*-oO*pc.x/oP);var oK=new fH.Point((o7.x+oS.x)/2+Math.cos(C)*oV.x-Math.sin(C)*oV.y,(o7.y+oS.y)/2+Math.sin(C)*oV.x+Math.cos(C)*oV.y);var o2=function(pd){return Math.sqrt(Math.pow(pd[0],2)+Math.pow(pd[1],2))};var oY=function(pe,pd){return(pe[0]*pd[0]+pe[1]*pd[1])/(o2(pe)*o2(pd))};var pa=function(pe,pd){return(pe[0]*pd[1]<pe[1]*pd[0]?-1:1)*Math.acos(oY(pe,pd))};var pb=pa([1,0],[(pc.x-oV.x)/oP,(pc.y-oV.y)/oO]);var oU=[(pc.x-oV.x)/oP,(pc.y-oV.y)/oO];var oT=[(-pc.x-oV.x)/oP,(-pc.y-oV.y)/oO];var o8=pa(oU,oT);if(oY(oU,oT)<=-1){o8=Math.PI}if(oY(oU,oT)>=1){o8=0}var o1=1-oN?1:-1;var o6=pb+o1*(o8/2);var i=new fH.Point(oK.x+oP*Math.cos(o6),oK.y+oO*Math.sin(o6));o5.addMarkerAngle(i,o6-o1*Math.PI/2);o5.addMarkerAngle(oS,o6-o1*Math.PI);oQ.addPoint(oS.x,oS.y);if(o3!=null){var oY=oP>oO?oP:oO;var oZ=oP>oO?1:oP/oO;var oX=oP>oO?oO/oP:1;o3.translate(oK.x,oK.y);o3.rotate(C);o3.scale(oZ,oX);o3.arc(0,0,oY,pb,pb+o8,1-oN);o3.scale(1/oZ,1/oX);o3.rotate(-C);o3.translate(-oK.x,-oK.y)}}break;case"Z":case"z":if(o3!=null){o3.closePath()}o5.current=o5.start}}return oQ};this.getMarkers=function(){var T=this.PathParser.getMarkerPoints();var oL=this.PathParser.getMarkerAngles();var oK=[];for(var C=0;C<T.length;C++){oK.push([T[C],oL[C]])}return oK}}fH.trim=function(e){return e.replace(/^\s+|\s+$/g,"")};fH.compressSpaces=function(e){return e.replace(/[\s\r\t\n]+/gm," ")};fH.Point=function(e,i){this.x=e;this.y=i};fH.Point.prototype.angleTo=function(e){return Math.atan2(e.y-this.y,e.x-this.x)};fH.Point.prototype.applyTransform=function(e){var i=this.x*e[0]+this.y*e[2]+e[4];var C=this.x*e[1]+this.y*e[3]+e[5];this.x=i;this.y=C};fH.BoundingBox=function(i,T,e,C){this.x1=Number.NaN;this.y1=Number.NaN;this.x2=Number.NaN;this.y2=Number.NaN;this.x=function(){return this.x1};this.y=function(){return this.y1};this.width=function(){return this.x2-this.x1};this.height=function(){return this.y2-this.y1};this.addPoint=function(oK,oL){if(oK!=null){if(isNaN(this.x1)||isNaN(this.x2)){this.x1=oK;this.x2=oK}if(oK<this.x1){this.x1=oK}if(oK>this.x2){this.x2=oK}}if(oL!=null){if(isNaN(this.y1)||isNaN(this.y2)){this.y1=oL;this.y2=oL}if(oL<this.y1){this.y1=oL}if(oL>this.y2){this.y2=oL}}};this.addX=function(oK){this.addPoint(oK,null)};this.addY=function(oK){this.addPoint(null,oK)};this.addBoundingBox=function(oK){this.addPoint(oK.x1,oK.y1);this.addPoint(oK.x2,oK.y2)};this.addQuadraticCurve=function(oP,oO,oL,oK,oR,oQ){var oN=oP+2/3*(oL-oP);var oM=oO+2/3*(oK-oO);var oT=oN+1/3*(oR-oP);var oS=oM+1/3*(oQ-oO);this.addBezierCurve(oP,oO,oN,oT,oM,oS,oR,oQ)};this.addBezierCurve=function(oX,oW,oO,oM,oT,oR,oZ,oY){var oP=[oX,oW],oN=[oO,oM],oL=[oT,oR],oK=[oZ,oY];this.addPoint(oP[0],oP[1]);this.addPoint(oK[0],oK[1]);for(nw=0;nw<=1;nw++){var o0=function(o4){return Math.pow(1-o4,3)*oP[nw]+3*Math.pow(1-o4,2)*o4*oN[nw]+3*(1-o4)*Math.pow(o4,2)*oL[nw]+Math.pow(o4,3)*oK[nw]};var o2=6*oP[nw]-12*oN[nw]+6*oL[nw];var o3=-3*oP[nw]+9*oN[nw]-9*oL[nw]+3*oK[nw];var o1=3*oN[nw]-3*oP[nw];if(o3==0){if(o2==0){continue}var oV=-o1/o2;if(0<oV&&oV<1){if(nw==0){this.addX(o0(oV))}if(nw==1){this.addY(o0(oV))}}continue}var oQ=Math.pow(o2,2)-4*o1*o3;if(oQ<0){continue}var oU=(-o2+Math.sqrt(oQ))/(2*o3);if(0<oU&&oU<1){if(nw==0){this.addX(o0(oU))}if(nw==1){this.addY(o0(oU))}}var oS=(-o2-Math.sqrt(oQ))/(2*o3);if(0<oS&&oS<1){if(nw==0){this.addX(o0(oS))}if(nw==1){this.addY(o0(oS))}}}};this.isPointInBox=function(oK,oL){return(this.x1<=oK&&oK<=this.x2&&this.y1<=oL&&oL<=this.y2)};this.addPoint(i,T);this.addPoint(e,C)};function hS(i,e){this.id=cv.getGUID("symbol_icon_");this.size=(i instanceof mU)?i:new mU(2,2);this.anchor=(e instanceof mU)?e:new mU(this.size.width/2,this.size.height/2);this.data=null;this.offset=this.anchor;this.imageSize=this.size;this.imageOffset=new mU(0,0);this.style={scale:1,rotation:0};this.srcSetObject={};this._initOptions={size:this.size,scale:this.style.scale,rotation:this.style.rotation};this.overlay=null;this.isReDraw=false}hS.prototype.add=function(){const e=document.createElement("canvas");e.width=this.size.width;e.height=this.size.height;this.context=e.getContext("2d")};hS.prototype.remove=function(){if(this.context){this.context.clearRect(0,0,this.context.canvas.width,this.context.canvas.height);this.context.canvas.width=0;this.context.canvas.height=0}this.context=null;this.data=null};hS.prototype.render=function(e){return true};hS.prototype.resetInitOptions=function(){this._initOptions=new mU(this.size.width,this.size.height);this._initOptions.scale=this.style.scale;this._initOptions.rotation=this.style.rotation};hS.prototype.update=function(){var e=this.overlay;if(e){if(e.domElement){var T=(this.style.scale-this._initOptions.scale)/this._initOptions.scale;if(T>=0){T=T+1}else{T=1+T}var i=this._initOptions.rotation===0?this.style.rotation:(this.style.rotation-this._initOptions.rotation);while(i<0){i+=360}var C=e.domElement.style;C.width=this._initOptions.width+"px";C.height=this._initOptions.height+"px";C.transform="rotate("+i+"deg) scale("+T+")"}if(!this.isReDraw){this._refresh(e)}}};hS.prototype._refresh=function(e){e.textureCoord=e.textureCoordGLMap=null;var i=new ix("onstatus_change");i.overlay=e;i.action="setIcon";i.imageUrlChanged=true;setTimeout(function(){e.fire(i)},100)};hS.prototype.generateRenderData=function(){var i=this.offset=this.anchor;var e=this.size;var C=[];C.push(-i.width,i.height-e.height,0);C.push(e.width-i.width,i.height-e.height,0);C.push(e.width-i.width,i.height,0);C.push(-i.width,i.height-e.height,0);C.push(e.width-i.width,i.height,0);C.push(-i.width,i.height,0);return{vertex:C}};hS.prototype.getCurrentImageUrl=function(){return this.id};hS.prototype.getRenderData=function(){this._renderData=this.generateRenderData();return this._renderData};hS.prototype.setAnchor=function(e){if(e instanceof mU){this.anchor=e;this.offset=e}};hS.prototype.toString=function(){return"Symbol"};var ie={14:"m-0.00573,-10c-5.51975,0 -9.99427,4.47453 -9.99427,9.99428c0,5.51974 4.47452,9.99425 9.99427,9.99425c5.51972,0 9.99426,-4.47452 9.99426,-9.99425c0,-5.51975 -4.47453,-9.99428 -9.99426,-9.99428zm0,17.92491c-4.37412,0 -7.93132,-3.55788 -7.93132,-7.93063c0,-4.37345 3.5572,-7.93134 7.93132,-7.93134c4.37411,0 7.93062,3.55721 7.93062,7.93134c0,4.37412 -3.55789,7.93063 -7.93062,7.93063zm-0.00068,-15.4088c-0.38027,0 -0.68696,0.30807 -0.68696,0.68765l0,6.34078l-4.15752,1.81815c-0.34794,0.15266 -0.50611,0.55837 -0.35344,0.90632c0.11278,0.25787 0.36445,0.4119 0.6292,0.4119c0.09214,0 0.18635,-0.01857 0.27575,-0.05845l4.55635,-1.99279c0.00344,-0.00137 0.00619,-0.00275 0.00894,-0.00412l0.00275,-0.00138c0.01032,-0.00413 0.01581,-0.01376 0.02545,-0.01719c0.07151,-0.03576 0.13821,-0.07771 0.19185,-0.1341c0.02337,-0.02338 0.03644,-0.05364 0.05431,-0.08045c0.03301,-0.04401 0.06946,-0.08733 0.0894,-0.14028c0.0165,-0.04126 0.01787,-0.08596 0.02613,-0.12997c0.00894,-0.04469 0.02614,-0.08389 0.02614,-0.1286l0,-6.7905c0,-0.37889 -0.30807,-0.68697 -0.68833,-0.68697z",13:"m-0.00706,-9.5c-5.24281,0 -9.49294,4.25065 -9.49294,9.49294c0,5.24331 4.25014,9.49294 9.49294,9.49294c5.24281,0 9.49294,-4.24964 9.49294,-9.49294c0,-5.2423 -4.25013,-9.49294 -9.49294,-9.49294zm3.08857,3.85997c0.61044,0 1.10279,0.96873 1.10279,2.16271s-0.49384,2.1647 -1.10279,2.1647c-0.60844,0 -1.10228,-0.96873 -1.10228,-2.16372s0.49434,-2.16369 1.10228,-2.16369zm-6.28628,0c0.60844,0 1.10228,0.96873 1.10228,2.16271s-0.49284,2.1647 -1.10228,2.1647s-1.10277,-0.96873 -1.10277,-2.16372s0.49383,-2.16369 1.10277,-2.16369zm3.21167,12.16493c-1.87667,0 -3.63373,-1.14814 -5.14663,-3.14239c1.56571,1.02156 3.27993,1.59064 5.07786,1.59064c1.90905,0 3.72343,-0.63985 5.36539,-1.78497c-1.54429,2.11685 -3.35767,3.33672 -5.29662,3.33672l-0.00001,0z",12:"m9.27295,5.92958l-2.64443,-4.57961c-0.79727,-1.37992 -2.10131,-3.63983 -2.8986,-5.01973l-2.64441,-4.57858c-0.79782,-1.38093 -2.10186,-1.38093 -2.89913,0l-2.64335,4.57858c-0.79728,1.3799 -2.10188,3.63981 -2.89916,5.01973l-2.64387,4.57961c-0.79728,1.38101 -0.14472,2.50988 1.44983,2.50988l16.37221,0c1.59561,0 2.24711,-1.12887 1.45091,-2.50988l0,0zm-8.88166,0.70811l-1.56837,0l0,-1.50484l1.56837,0l0,1.50484zm-0.07527,-2.61447l-1.41621,0l-0.14044,-6.44231l1.68427,0l-0.12761,6.44231l0,0z",11:"m8.08295,-6.56414l-3.59319,0l0,-1.43586l-8.98155,0l0,1.43586l-3.59321,0c-1.0569,0 -1.915,0.85509 -1.915,1.91159l0,9.92258c0,1.05357 0.8581,1.91158 1.915,1.91158l16.16796,0c1.05692,0 1.91501,-0.85801 1.91501,-1.91158l0,-9.92258c0,-1.0565 -0.85809,-1.91159 -1.91501,-1.91159l0,0zm-8.08397,12.66884c-3.20143,0 -5.80643,-2.60031 -5.80643,-5.79596c0,-3.19569 2.605,-5.79891 5.80643,-5.79891s5.80789,2.60322 5.80789,5.79891c0,3.19565 -2.60794,5.79596 -5.80789,5.79596zm0,-9.6804c-2.15036,0 -3.89142,1.7394 -3.89142,3.88444c0,2.14503 1.74252,3.8844 3.89142,3.8844c2.1489,0 3.89141,-1.73937 3.89141,-3.8844c0,-2.14503 -1.74105,-3.88444 -3.89141,-3.88444z",10:"m0,-10c-0.20885,0 -0.39491,0.08583 -0.55177,0.24149c-0.15674,0.15536 -0.28646,0.37838 -0.39429,0.65665c-0.21586,0.55655 -0.34853,1.33844 -0.42114,2.27477c-0.07231,0.93446 -0.08474,2.02273 -0.05447,3.18765c-2.58175,1.05925 -7.81787,3.24648 -8.23854,3.73474c-0.56001,0.65029 -0.37908,1.3954 -0.15331,1.89002l8.608,-1.75235c0.18202,2.28374 0.4407,4.5455 0.66615,6.31771c-0.8418,0.24646 -2.41323,0.73303 -2.73754,1.03474c-0.4469,0.41562 -0.4469,1.75793 -0.4469,1.75793l3.52318,-0.28665c0.08286,0.57874 0.13486,0.9163 0.13486,0.9163l0.00511,0.03042l0.02778,0l0.06486,0l0.02778,0l0.00511,-0.03042c0,0 0.05185,-0.33756 0.13486,-0.9163l3.52424,0.28665c0,0 0,-1.34231 -0.44688,-1.75793c-0.32446,-0.30172 -1.89697,-0.7895 -2.73847,-1.0358c0.22484,-1.76681 0.4832,-4.02001 0.66507,-6.29634l8.50712,1.73203c0.22561,-0.49462 0.40765,-1.23973 -0.15237,-1.89002c-0.41538,-0.48221 -5.52504,-2.62071 -8.1386,-3.69423c0.03119,-1.17999 0.01971,-2.28285 -0.05353,-3.22816l0,-0.00233c-0.07263,-0.93523 -0.20545,-1.71635 -0.42114,-2.27244c-0.10784,-0.27827 -0.23634,-0.50114 -0.3932,-0.65665c-0.15689,-0.15567 -0.34293,-0.24149 -0.55195,-0.24149l0,0l0,0l0,0l0.00001,0l0,0l-0.00003,0.00001z",3:"m-10,0l10,-10l10,10l-10,10l-10,-10z",5:"M0,0 L-5,-15 0,-10 5,-15 z",6:"M0,0 L5,15 0,10 -5,15z",7:"M-5,-15 L0,0 5,-15",8:"M-5,15 L0,0 5,15",9:"m0,-24c-4.4183,0 -8,3.58167 -8,8c0,1.42102 0.3816,2.75 1.0312,3.90601c0.1079,0.19202 0.221,0.38098 0.3438,0.56299l6.625,11.53101l6.625,-11.53101c0.102,-0.151 0.19,-0.31097 0.281,-0.46899l0.063,-0.09399c0.649,-1.15601 1.031,-2.48499 1.031,-3.90601c0,-4.41833 -3.582,-8 -8,-8zm0,4c2.209,0 4,1.79089 4,4c0,2.20898 -1.791,4 -4,4c-2.2091,0 -4,-1.79102 -4,-4c0,-2.20911 1.7909,-4 4,-4z"};var dq={BMap_Symbol_SHAPE_CIRCLE:1,BMap_Symbol_SHAPE_RECTANGLE:2,BMap_Symbol_SHAPE_RHOMBUS:3,BMap_Symbol_SHAPE_STAR:4,BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW:5,BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW:6,BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW:7,BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW:8,BMap_Symbol_SHAPE_POINT:9,BMap_Symbol_SHAPE_PLANE:10,BMap_Symbol_SHAPE_CAMERA:11,BMap_Symbol_SHAPE_WARNING:12,BMap_Symbol_SHAPE_SMILE:13,BMap_Symbol_SHAPE_CLOCK:14};function fK(i,e){hS.call(this);e=e||{};this.style={anchor:e.anchor||new mU(0,0),fillColor:e.fillColor||"#000",fillOpacity:e.fillOpacity||0,scale:e.scale||1,rotation:e.rotation||0,strokeColor:e.strokeColor||"#000",strokeOpacity:e.strokeOpacity===undefined?1:e.strokeOpacity,strokeWeight:e.strokeWeight};this._type=(typeof i==="number")?i:"UserDefined";this._anchor=this.style.anchor;this._originOffset=new mU(0,0);this.anchor=new mU(0,0);this._rawPath=i;this._buildPath(true)}fK.inherits(hS,"SVGSymbol");fK.generateKey=function(T,i){if(!T){return null}if(parseInt(T)){T=parseInt(T)}if(typeof T==="number"){if(!ie[T]&&![0,1,2,0,4][T]){return null}}var e={anchor:i.anchor||new mU(0,0),fillColor:i.fillColor||"#000",fillOpacity:i.fillOpacity||0,scale:i.scale||1,rotation:i.rotation||0,strokeColor:i.strokeColor||"#000",strokeOpacity:i.strokeOpacity===undefined?1:i.strokeOpacity,strokeWeight:i.strokeWeight};var C=u({path:T,style:e});return"symbol_svg_icon_"+C};hv.extend(fK.prototype,{_buildPath:function(oU){var oO=this;var oQ=oO._rawPath;if(parseInt(oQ)){oQ=parseInt(oQ)}if(ie[oQ]){oQ=ie[oQ]}oO.id=fK.generateKey(oQ,oO.style);if(!oO.id){return}this._originOffset=new mU(0,0);this._innerOffset=null;this._rotationAngle=0;switch(oQ){case dq.BMap_Symbol_SHAPE_CIRCLE:var oR=oO._calSize(2),oP=oR,oZ=oO.style.scale,oK=oO._anchor;this.size=new mU(oR,oP);this.anchor=new mU(oR/2+oK.width*oZ,oP/2+oK.height*oZ);oO.path=dq.BMap_Symbol_SHAPE_CIRCLE;break;case dq.BMap_Symbol_SHAPE_RECTANGLE:var oR=oO._calSize(4),oP=oO._calSize(2),oK=oO._anchor,oW=oO.style.strokeWeight!==undefined?oO.style.strokeWeight:oO.style.scale,oZ=oO.style.scale;this.size=new mU(oR,oP);this._originOffset=new mU(Math.floor(-oW/2),Math.floor(-oW/2));this.anchor=new mU(oR/2+oK.width*oZ,oP/2+oK.height*oZ);oO.path=dq.BMap_Symbol_SHAPE_RECTANGLE;break;case dq.BMap_Symbol_SHAPE_STAR:var oR=oO._calSize(20),oP=oR,oK=oO._anchor,oZ=oO.style.scale;this.size=new mU(oR,oP);this.anchor=new mU(oR/2+oK.width*oZ,oP/2+oK.height*oZ);oO.path=dq.BMap_Symbol_SHAPE_STAR;break;default:var oQ=new fH(oQ),T=oQ.bounds(),oT=oO.style.rotation*Math.PI/180,oW=oO.style.strokeWeight!==undefined?oO.style.strokeWeight:oO.style.scale,oZ=oO.style.scale,oK=oO._anchor;var oY=new mU(Math.floor(T.x1*oZ-oW/2),Math.floor(T.y1*oZ-oW/2)),e={topleft:new hV(Math.floor(T.x1*oZ-oW/2)-oZ*oK.width,Math.floor(T.y1*oZ-oW/2)-oZ*oK.height),bottomleft:new hV(Math.floor(T.x1*oZ-oW/2)-oZ*oK.width,Math.ceil(T.y2*oZ-oW/2)-oZ*oK.height),topright:new hV(Math.ceil(T.x2*oZ+oW/2)-oZ*oK.width,Math.floor(T.y1*oZ-oW/2)-oZ*oK.height),bottomright:new hV(Math.ceil(T.x2*oZ+oW/2)-oZ*oK.width,Math.ceil(T.y2*oZ+oW/2)-oZ*oK.height)},i={},oX=[],oN=[];var oV=e.topleft.x===0?0:Math.atan(e.topleft.y/e.topleft.x),C=oV+oT;for(var oS in e){var oM=Math.cos(oT)*e[oS].x-Math.sin(oT)*e[oS].y,oL=Math.sin(oT)*e[oS].x+Math.cos(oT)*e[oS].y;i[oS]=new hV(oM,oL);oX.push(oM);oN.push(oL)}xmax=Math.max.apply(Math,oX),ymax=Math.max.apply(Math,oN),xmin=Math.min.apply(Math,oX),ymin=Math.min.apply(Math,oN);this.size=new mU(Math.ceil(xmax-xmin),Math.ceil(ymax-ymin));this.anchor=new mU(-xmin,-ymin);this._originOffset=new mU(xmin-i.topleft.x,ymin-i.topleft.y);this._innerOffset=new hV(oY.width,oY.height);this._rotationAngle=oT;oO.path=oQ;break}this.imageSize=new mU(this.size.width,this.size.height);this.offset=this.anchor;if(oU){this.resetInitOptions()}},_calSize:function(e){if(this.style.strokeWeight){return e*this.style.scale+this.style.strokeWeight%3+this.style.strokeWeight}else{return e*this.style.scale+this.style.scale+this.style.scale%2}},render:function(C){var oQ=this,T=this.style.scale,oR,oS=this.size;var oO=(C&&C.config&&C.config.ratio)||1;if(this.context){oR=this.context;if(this.context.canvas.width/oO!==this.size.width||this.context.canvas.height/oO!==this.size.height){this.context.canvas.width=this.size.width*oO;this.context.canvas.height=this.size.height*oO}oR.clearRect(0,0,this.size.width*oO,this.size.height*oO);oR.fillStyle=k0.convert2rgba(oQ.style.fillColor,oQ.style.fillOpacity);oR.strokeStyle=k0.convert2rgba(oQ.style.strokeColor,oQ.style.strokeOpacity);oR.save()}else{return false}oR.scale(oO,oO);oR.lineCap="round";oR.lineJoin="round";oR.lineWidth=oQ.style.strokeWeight||T;if(oQ._originOffset){oR.translate(-oQ._originOffset.width,-oQ._originOffset.height)}if(oQ._rotationAngle){oR.rotate(oQ._rotationAngle)}if(oQ._innerOffset){oR.translate(-oQ._innerOffset.x,-oQ._innerOffset.y)}switch(oQ.path){case dq.BMap_Symbol_SHAPE_CIRCLE:oR.arc(oS.width/2,oS.height/2,T,0,2*Math.PI);break;case dq.BMap_Symbol_SHAPE_RECTANGLE:oR.rect(0,0,4*T,2*T);break;case dq.BMap_Symbol_SHAPE_STAR:oR.beginPath();var oL=oS.width/2,oN=T*10;var oK=(2*Math.PI)/10;for(var oM=11;oM!=0;oM--){var e=oN*(oM%2+1)/2;var oP=oK*oM;oR.lineTo((e*Math.sin(oP))+oL,(e*Math.cos(oP))+oL)}oR.closePath();break;default:oR.lineWidth=oR.lineWidth/T;oR.scale(T,T);oQ.path.draw(oR)}oR.fill();oR.stroke();oR.restore();this.data=oR.getImageData(0,0,this.size.width*oO,this.size.height*oO);return true},setPath:function(e){this._rawPath=e;this._buildPath();this.update()},setAnchor:function(e){if(K.apiVersionIsGL()){this._anchor=this.style.anchor=e;this._buildPath();this.update()}else{if(e instanceof mU){this.anchor=e;this.offset=e}}},setRotation:function(e){this.style.rotation=e;this._buildPath();this.update()},setScale:function(e){this.style.scale=e;this._buildPath();this.update()},setStrokeWeight:function(e){this.style.strokeWeight=e;this._buildPath();this.update()},setStrokeColor:function(e){e=k0.convert2rgba(e,this.style.strokeOpacity);this.style.strokeColor=e;this._buildPath();this.update()},setStrokeOpacity:function(e){this.style.strokeOpacity=e;this._buildPath();this.update()},setFillOpacity:function(e){this.style.fillOpacity=e;this._buildPath();this.update()},setFillColor:function(e){this.style.fillColor=e;this._buildPath();this.update()}});cv.SymbolShapeType=dq;(function(){for(var e in dq){if(dq.hasOwnProperty(e)){window[e]=dq[e]}}})();function nF(oL,T,C){if(!oL||!T){return}this.imageUrl=null;this.imageDom=null;if(typeof oL==="string"){this.imageUrl=oL}else{this.imageDom=oL;if(!this.imageDom.id){this.imageDom.id=cv.getGUID("icon_dom_")}}this.size=T;var oK=new mU(Math.floor(T.width/2),Math.floor(T.height/2));var i={offset:oK,imageOffset:new mU(0,0)};C=C||{};for(var e in C){i[e]=C[e]}if(C.anchor){i.offset=C.anchor}this.anchor=this.offset=i.offset;this.imageOffset=i.imageOffset;this.infoWindowOffset=C.infoWindowOffset||this.offset;if(C.infoWindowAnchor){this.infoWindowOffset=C.infoWindowAnchor}this.printImageUrl=C.printImageUrl||"";this.imageSize=C.imageSize||this.size;this.srcSetObject={};this.setImageSrcset(C.srcset||C.srcSet)}nF.prototype.setImageUrl=function(e){if(!e){return}this.imageUrl=e;this._renderData=null};nF.prototype.getCurrentImageUrl=function(){if(window.devicePixelRatio>1&&this.srcSetObject["2x"]){return this.srcSetObject["2x"]}return this.imageUrl};nF.prototype.setPrintImageUrl=function(e){if(!e){return}this.printImageUrl=e};nF.prototype.setSize=function(e){if(!e){return}this.size=new mU(e.width,e.height);this._renderData=null};nF.prototype.setOffset=function(e){if(!e){return}this.anchor=this.offset=new mU(e.width,e.height);this._renderData=null};nF.prototype.setAnchor=function(e){this.setOffset(e)};nF.prototype.setImageOffset=function(e){if(!e){return}this.imageOffset=new mU(e.width,e.height);this._renderData=null};nF.prototype.setInfoWindowOffset=function(e){if(!e){return}this.infoWindowOffset=new mU(e.width,e.height)};nF.prototype.setInfoWindowAnchor=function(e){this.setInfoWindowOffset(e)};nF.prototype.setImageSize=function(e){if(!e){return}this.imageSize=new mU(e.width,e.height)};nF.prototype.setImageSrcset=function(C){var e="";if(!C){return}for(var i in C){if(C.hasOwnProperty(i)){this.srcSetObject[i]=C[i];e=C[i]+" "+i+","}}this.srcSet=e};nF.prototype.toString=function(){return"Icon"};nF.prototype.generateRenderData=function(oL){var C=this.offset;var e=this.size;var oN=this.imageOffset;var oM=[];oM.push(-C.width,C.height-e.height,0);oM.push(e.width-C.width,C.height-e.height,0);oM.push(e.width-C.width,C.height,0);oM.push(-C.width,C.height-e.height,0);oM.push(e.width-C.width,C.height,0);oM.push(-C.width,C.height,0);if(oL!==0){for(var oK=0;oK<oM.length;oK+=3){var T=i5.fromValues(oM[oK],oM[oK+1]);i5.rotate(T,T,[0,0],mn(-oL));oM[oK]=T[0];oM[oK+1]=T[1]}}return{vertex:oM}};nF.prototype.getRenderData=function(e){this._renderData=this.generateRenderData(e);return this._renderData};function f9(C,i){hv.BaseClass.call(this);this.content=C;this.map=null;this.coordType=(i&&i.coordType)||cv.coordType;this._config={width:0,height:0,maxWidth:730,offset:new mU(0,0),title:"",maxContent:"",enableMaximize:false,enableAutoPan:true,enableCloseOnClick:true,margin:[10,10,40,10],collisions:[[10,10],[10,10],[10,10],[10,10]],ifMaxScene:false,canScroll:false,onClosing:function(){return true},enableMessage:false,enableParano:false,message:"",enableSearchTool:false,headerContent:"",enableContentScroll:false};this.setConfig(i);if(this._config.width!==0){if(this._config.width<220){this._config.width=220}if(this._config.width>730){this._config.width=730}}if(this._config.height!==0){if(this._config.height<60){this._config.height=60}if(this._config.height>650){this._config.height=650}}if(this._config.maxWidth!==0){if(this._config.maxWidth<220){this._config.maxWidth=220}if(this._config.maxWidth>730){this._config.maxWidth=730}}this.isWinMax=false;this.IMG_PATH=K.imgPath;this.overlay=null;this._extraMargins=null;var e=this;ki.load("infowindow",function(){e._draw()})}f9.inherits(hv.BaseClass,"InfoWindow");hv.extend(f9.prototype,{_setExtraMargins:function(e){if(e&&e.length===4){this._extraMargins=[e[0],e[1],e[2],e[3]]}else{this._extraMargins=null}},setWidth:function(e){e=e*1;if(!e&&e!==0||isNaN(e)||e<0){return}if(e!==0){if(e<220){e=220}if(e>730){e=730}}this._config.width=e},setHeight:function(e){e=e*1;if(!e&&e!==0||isNaN(e)||e<0){return}if(e!==0){if(e<60){e=60}if(e>650){e=650}}this._config.height=e},setMaxWidth:function(e){e=e*1;if(!e&&e!==0||isNaN(e)||e<0){return}if(e!==0){if(e<220){e=220}if(e>730){e=730}}this._config.maxWidth=e},setTitle:function(e){this._config.title=e||""},setContent:function(e){this.content=e||""},getContent:function(){return this.content},setMaxContent:function(e){this._config.maxContent=e||""},redraw:function(){},enableAutoPan:function(){this._config.enableAutoPan=true},disableAutoPan:function(){this._config.enableAutoPan=false},enableCloseOnClick:function(){this._config.enableCloseOnClick=true},disableCloseOnClick:function(){this._config.enableCloseOnClick=false},enableMaximize:function(){this._config.enableMaximize=true},disableMaximize:function(){this._config.enableMaximize=false},show:function(){this._visible=true},hide:function(){this._visible=false},close:function(){this.hide()},dispose:function(){hv.BaseClass.prototype.decontrol.call(this)},maximize:function(){this.isWinMax=true},restore:function(){this.isWinMax=false},setConfig:function(i){if(!i){return}for(var e in i){if(typeof(this._config[e])===typeof(i[e])){this._config[e]=i[e]}}},isVisible:function(){return this.isOpen()},isOpen:function(){return false},getPositionIn:function(){if(this.overlay&&this.overlay.getPositionIn){return this.overlay.getPositionIn()}if(this.overlay&&this.overlay.getPoint){var e=this.overlay.getPoint();if(!e){return null}if(!K.apiVersionIsGL()){return m8.convertLL2MC(e)}return e}return null},getTitle:function(){return this._config.title||""},getPosition:function(){if(!K.apiVersionIsGL()){if(this.overlay&&this.overlay.getPosition){return this.overlay.getPosition()}}return this.latLng},getPoint:function(){var e=this.getPositionIn();return m0(m8.convertMC2LL(e),this.coordType)},getOffset:function(){return this._config.offset},dispose:function(){hv.BaseClass.prototype.decontrol.call(this)},toString:function(){return"InfoWindow"}});li.prototype.openInfoWindow=function(oL,e,T){if(!K.apiVersionIsGL()){return this._openInfoWindow30(oL,e)}var oK=e;var C=(T&&T.coordType)||cv.coordType;oK=iM(oK,C);oL.latLng=new d1(oK.lat,oK.lng);var i=m8.convertLL2MC(oK);this.openInfoWindowIn(oL,i)};li.prototype._openInfoWindow30=function(T,e){if(!(T instanceof f9)||!e){return}T.latLng=new d1(e.lat,e.lng);var i=this.temp;if(!i.marker){var C=new nF(K.imgPath+"blank.gif",{width:1,height:1});i.marker=new og(e,{icon:C,offset:new mU(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openInfoWindow(T)};li.prototype.closeInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeInfoWindow()}};li.prototype.openInfoWindowIn=function(T,e){if(!T||T.toString()!=="InfoWindow"||!e||e.toString()!=="Point"){return}var i=this.temp;if(!i.marker){var C=new nF(K.imgPath+"blank.gif",{width:1,height:1});i.marker=new og(e,{icon:C,width:1,height:1,offset:new mU(0,0),infoWindowOffset:new mU(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openInfoWindow(T)};g2.prototype.openInfoWindow=function(e){if(this.map){this.map.closeInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;hv.BaseClass.call(e,e.hashCode)}};g2.prototype.closeInfoWindow=function(){if(this.map&&this.map.temp._infoWin){this.map.temp._infoWin._visible=false;this.map.temp._infoWin.decontrol();this.map.temp._infoWin=null}};function b3(C,i){g2.call(this);this.content=C;this.map=null;this.domElement=null;var T=fq();this._config={width:0,offset:new mU(0,0),styles:{backgroundColor:T.labelBackground,border:"1px solid "+T.labelBorderColor,color:T.labelTextColor,padding:"1px",whiteSpace:"nowrap",fontSize:"12px",zIndex:"80",MozUserSelect:"none"},enableClicking:true,point:null,enableMassClear:true,anchor:0};i=i||{};this.coordType=i.coordType||cv.coordType;this.setConfig(i);if(this._config.width<0){this._config.width=0}this.point=this._config.point;var e=this;ki.load("marker",function(){e._draw()})}b3.inherits(g2,"Label");hv.extend(b3.prototype,{setPoint:function(e){if(e&&e.toString()==="Point"&&!this.getMarker()){this.point=this._config.point=iM(e,this.coordType)}},setContent:function(e){this.content=e},getContent:function(e){return this.content},setOpacity:function(e){if(e>=0&&e<=1){this._config.opacity=e}},setOffset:function(e){if(!e||e.toString()!=="Size"){return}this._config.offset=new mU(e.width,e.height)},getOffset:function(){return this._config.offset},setStyle:function(e){e=e||{};this._config.styles=hv.extend(this._config.styles,e)},setStyles:function(e){this.setStyle(e)},setTitle:function(e){this._config.title=e||""},getTitle:function(){return this._config.title},setMarker:function(e){if(this._marker&&this._marker!==e){this._marker._config.label=null}this._marker=e;if(e){this.point=this._config.point=e.getPoint()}else{this.point=this._config.point=null}},getMarker:function(){return this._marker||null},setAnchor:function(e){this._config.anchor=e!=null?e:0;this.draw()},getAnchor:function(){return this._config.anchor},getPositionIn:function(){var e=this.getPoint?this.getPoint():this.point;if(!e){return null}if(!K.apiVersionIsGL()){return m8.convertLL2MC(e)}return e},setPositionIn:function(e){if(!e){return}if(!K.apiVersionIsGL()){this.setPoint(m8.convertMC2LL(e))}else{this.point=this._config.point=new d9(e.lng,e.lat)}},});function ls(T,C){var oK={};var e=(C&&C.coordType)||cv.coordType;for(var i in C){if(C.hasOwnProperty(i)){if(i==="position"){if(!K.apiVersionIsGL()){oK.point=iM(C[i],e)}else{oK.point=m8.convertLL2MC(iM(C[i],e))}this.latLng=iM(C[i],e)}else{oK[i]=C[i]}}}b3.call(this,T,oK)}ls.inherits(b3,"LabelOut");hv.extend(ls.prototype,{toString:function(){return"Label"},setPosition:function(e){this.latLng=new d1(e.lat,e.lng);var i;if(!K.apiVersionIsGL()){i=e}else{i=m8.convertLL2MC(e)}this.setPoint(i)},getPosition:function(){return m0(this.latLng,this.coordType)}});function cx(){}hv.extend(cx,{isGeoJSON:function(e){if(!e||typeof e!=="object"){return false}if(e instanceof Array){var i=e[0];if(!i||typeof i!=="object"){return false}return i.type==="Feature"||!!i.geometry}if(e.type==="FeatureCollection"||e.type==="Feature"){return true}return !!(e.type&&e.coordinates)},pick:function(e,oK){if(!this.isGeoJSON(e)){return null}var C=h7.normalize(e);if(!C.length){return null}if(C.length>1){this._warn("GeoJSON 鍚涓绱狅紝浠呬娇鐢ㄧ涓�涓紱濡傞渶鍏ㄩ儴娓叉煋璇蜂娇鐢� GeoJSONLayer 鎴栧彲瑙嗗寲鍥惧眰")}var i=C[0];var T=null;if(oK==="point"){T=this._pickPoint(i)}else{if(oK==="polygon"){T=this._pickPolygon(i)}else{T=this._pickLine(i)}}if(!T){return null}return{points:T,properties:i.properties,id:i.id}},_pickPoint:function(e){var i=e.coordinates;if(e.type==="Point"){return this._toPoint(i)}if(e.type==="MultiPoint"){if(i.length>1){this._warn("GeoJSON 鍚涓偣锛孧arker 浠呬娇鐢ㄧ涓�涓�")}return this._toPoint(i[0])}this._warn("GeoJSON 鍑犱綍绫诲瀷 "+e.type+" 涓嶉�傜敤浜� Marker");return null},_pickLine:function(i){var e=h7.toLineStrings(i);if(!e.length){this._warn("GeoJSON 鍑犱綍绫诲瀷 "+i.type+" 涓嶉�傜敤浜� Polyline");return null}if(e.length>1){this._warn("GeoJSON 鍚鏉$嚎锛孭olyline 浠呬娇鐢ㄧ涓�鏉�")}return this._toPoints(e[0])},_pickPolygon:function(i){var e=h7.toPolygons(i);if(!e.length){this._warn("GeoJSON 鍑犱綍绫诲瀷 "+i.type+" 涓嶉�傜敤浜� Polygon");return null}if(e.length>1){this._warn("GeoJSON 鍚涓潰锛孭olygon 浠呬娇鐢ㄧ涓�涓�")}var C=e[0];if(C.length>1){this._warn("Polygon 瑕嗙洊鐗╀笉鏀寔宀涙礊锛屽凡蹇界暐鍐呯幆")}return this._toPoints(C[0])},_toPoint:function(e){if(!e||e.length<2){return null}return new d9(e[0],e[1])},_toPoints:function(C){if(!C||!C.length){return null}var e=[];for(var T=0;T<C.length;T++){var oK=this._toPoint(C[T]);if(oK){e.push(oK)}}return e.length?e:null},_warn:function(e){if(typeof console!=="undefined"&&console.warn){console.warn("[BMapGL] "+e)}}});window.BMAP_ANIMATION_DROP=1;window.BMAP_ANIMATION_BOUNCE=2;window.BMAP_ANIMATION_RAISEUP=3;window.BMAP_ANIMATION_DROPDOWN=4;function og(e,i){g2.call(this);i=i||{};this.delFlag=i.delFlag;this.coordType=i.coordType||cv.coordType;this.point=e;this._rotation=i.rotation||0;this._rotationOrigin=0;this.map=null;this._animation=null;this.domElement=null;this.iconDom=null;this.infoWindowDom=null;this.siblingElement=null;this.textureCoord=null;this.textureCoordGLMap=null;this.collisionDetectionFailed=false;this._config={offset:new mU(0,0),opacity:1,icon:null,title:"",infoWindow:null,label:null,zIndex:null,baseZIndex:0,clickable:true,zIndexFixed:false,isTop:false,enableMassClear:true,enableDragging:false,raiseOnDrag:false,restrictDraggingArea:false,startAnimation:"",enableCollisionDetection:false,rank:0,enableDraggingMap:false,autoFollowHeadingChanged:false,enableClicking:true,draggingCursor:K.draggingCursor,color:null,anchor:null,};this.setOptions(i);if(this._config.zIndex!==undefined){this.zIndex=this._config.zIndex}this._addlog();this._isDragging=false;var C=this;ki.load("marker",function(){C._draw()})}og.TOP_ZINDEX=bw.getZIndex(-90)+1000000;og.DRAG_ZINDEX=og.TOP_ZINDEX+1000000;og._injectMethond=function(e){hv.extend(og.prototype,e)};og._createDefaultIcon=function(){if(K.uiVersionIsGL()){return new nF(K.imgPath+"marker_red.png",new mU(23,25),{offset:new mU(10,25),infoWindowOffset:new mU(10,0)})}return new nF(K.apiIMG+"/marker_new.png",new mU(22,33),{offset:new mU(11,30),infoWindowOffset:new mU(10,0)})};og.inherits(g2,"Marker");hv.extend(og.prototype,{toString:function(){return"Marker"},_addlog:function(){var e=1;var i="normal";if(this._config.icon instanceof fK){e=2;i="svg_symbol"}else{if(this._config.icon instanceof hS){e=3;i="custom_symbol"}}kU.sendMessage("Marker","icontype",i)},setOptions:function(e){this.setConfig(e);if(!e.icon){this._config.icon=og._createDefaultIcon()}},setIcon:function(e){if(e){this._config.icon=e;this.textureCoord=this.textureCoordGLMap=null}},getIcon:function(){return this._config.icon},setLabel:function(e){if(!(e instanceof b3)){return}this._config.label=e;e._config.enableMassClear=this._config.enableMassClear;e.setPoint(this.point)},getLabel:function(){return this._config.label},enableDragging:function(){this._config.enableDragging=true},disableDragging:function(){this._config.enableDragging=false},setPoint:function(e){if(e){this.point=this._config.point=new d9(e.lng,e.lat);if(!K.apiVersionIsGL()){this.latLng=m0(e,this.coordType)}else{this.latLng=m0(m8.convertMC2LL(e),this.coordType)}}},setPositionIn:function(e){if(!e){return}if(!K.apiVersionIsGL()){this.setPoint(m8.convertMC2LL(e))}else{this.setPoint(e)}},getPositionIn:function(){var e=this.getPoint();if(!e){return null}if(!K.apiVersionIsGL()){return m8.convertLL2MC(e)}return e},setTop:function(i,e){this._config.isTop=!!i;if(i){this._addi=e||0}},setTitle:function(e){this._config.title=e||""},getTitle:function(){return b(this._config.title)},setColor:function(e){this._config.color=e||"#f00"},getColor:function(){return this._config.color},setOffset:function(e){if(e){this._config.offset=e}},getOffset:function(){return this._config.offset},setAnimation:function(e){this._animation=e},setRank:function(e){this._config.rank=e},getRank:function(){return this._config.rank},setRotation:function(e){while(e<0){e+=360}this._rotation=e%360},setRotationOrigin:function(e){while(e<0){e+=360}this._rotationOrigin=e%360},getRotation:function(){return this._rotation},getShadow:function(){if(!K.apiVersionIsGL()){return this._config.shadow||null}console.warn("褰撳墠鐗堟湰鏆備笉鏀寔 marker.getShadow")},setShadow:function(e){if(!K.apiVersionIsGL()){this._config.shadow=e;return}console.warn("褰撳墠鐗堟湰鏆備笉鏀寔 marker.setShadow")}});function D(e,T){var i=cv.coordType;if(T&&T.coordType){i=T.coordType}var oK=cx.pick(e,"point");if(oK){e=oK.points;this.properties=oK.properties}var oL=iM(e,i);this.latLng=new d1(oL.lat,oL.lng);var C;if(!K.apiVersionIsGL()){C=oL}else{C=m8.convertLL2MC(oL)}og.call(this,C,T)}D.inherits(og,"MarkerOut");hv.extend(D.prototype,{toString:function(){return"Marker"},toGeoJSON:function(){var i="Point";var C=[this.latLng.lng,this.latLng.lat];var e={type:"Feature",geometry:{type:i,coordinates:C},properties:this.properties};return e},updateByGeoJSON:function(e){this.setPosition(e)},setPosition:function(e){var C=cx.pick(e,"point");if(C){e=C.points;this.properties=C.properties}if(!e){return}this.latLng=iM(new d1(e.lat,e.lng),this.coordType);var i=m8.convertLL2MC(this.latLng);this.setPositionIn(i)},getPosition:function(){return m0(this.latLng,this.coordType)},});window.BMAP_SHAPE_CIRCLE=1;window.BMAP_SHAPE_RECT=2;function gr(i,e,C){g2.call(this,e,C);this.domElement=null;this.point=i;C=C||{};this.coordType=C.coordType||cv.coordType;this._config={};this._config.height=e||0;this._config.size=typeof C.size==="number"?C.size:50;this._config.fillOpacity=typeof C.fillOpacity==="number"?C.fillOpacity:0.8;this._config.shape=typeof C.shape==="number"?C.shape:1;dA(this._config.fillOpacity,0,1);var oK=K.uiVersionIsGL()?"#f00":fq().fillColor;if(C.fillColor===""){this._config.fillColor=""}else{this._config.fillColor=C.fillColor?C.fillColor:oK}this._config.icon=(C.icon instanceof nF||C.icon instanceof hS)?C.icon:"";this._config.enableMassClear=C.enableMassClear||true;var T=this;ki.load("marker",function(){T._draw()})}gr.inherits(g2,"Marker3D");hv.extend(gr.prototype,{setPoint:function(e){var i=this.coordType;var T=iM(e,i);this.latLng=this._config.point=new d9(T.lng,T.lat);this.point=m8.convertLL2MC(T);var C=new ix("onstatus_change");C.overlay=this;C.action="setPoint";this.fire(C)},setPositionIn:function(e){this.setPoint(e)},getPositionIn:function(){return this.getPoint()},setDomAttribute:function(i,C){var e=new ix("onlineupdate");e.overlay=this;this.dispatchEvent(e)}});function gn(i,e,oK){var C=(oK&&oK.coordType)||cv.coordType;this.latLng=iM(new d1(i.lat,i.lng),C);var T=m8.convertLL2MC(i);gr.call(this,T,e,oK)}gn.inherits(gr,"Marker3d");hv.extend(gn.prototype,{toString:function(){return"Marker3D"},setHeight:function(e){this._config.height=Number(e);this.draw();var i=new ix("onlineupdate");i.overlay=this;this.dispatchEvent(i)},getHeight:function(){return this._config.height},setFillOpacity:function(e){if(e>1||e<0){return}this._config.fillOpacity=e;this.setDomAttribute("fillopacity",e)},getFillOpacity:function(){return this._config.fillOpacity},setFillColor:function(e){this._config.fillColor=e||"";this.setDomAttribute("fillcolor",e)},getFillColor:function(){return this._config.fillColor},setIcon:function(i){if(!i||!this.map){return}this._config.icon=i;if(this._config.icon){var e=this._config.icon.getCurrentImageUrl();var T=i.getCurrentImageUrl()!==e;this._config.icon=i;this.textureCoord=this.textureCoordGLMap=null;this.draw();var C=new ix("onstatus_change");C.overlay=this;C.action="setIcon";C.imageUrlChanged=T;this.fire(C)}},getIcon:function(){return this._config.icon},setPosition:function(e){this.latLng=new d1(e.lat,e.lng);var i=m8.convertLL2MC(e);this.setPositionIn(i)},getPosition:function(){var e=this.getPositionIn();return m0(m8.convertMC2LL(e),this.coordType)}});function iJ(C,e){mk.call(this,e);this._normalizedBounds=new lz();this.setPoints(C);this._addlog(e);var i=this;ki.load("poly",function(){i._draw()})}iJ.inherits(mk,"Polyline");hv.extend(iJ.prototype,{_addlog:function(e){var i=1;var C="normal";if(e&&e.strokeTexture){i=2;C="texture"}kU.sendMessage("Polyline","bindtype",C)},getBoundsIn:function(e){if(!e){this._bounds.setMinMax();return this._bounds}this._normalizedBounds.setMinMax();return this._normalizedBounds},setPoints:function(oM){this._clearCache();this.points=mk.getGraphPoints(oM).slice(0);if(this._config.geodesic===true){this.greatCirclePoints.length=0;for(var oK=0;oK<this.points.length-1;oK++){this.calcGreatCirclePoints(this.points[oK],this.points[oK+1])}}else{if(this._config.linkRight){var oN=[];var oL=null;for(var oK=0;oK<this.points.length-1;oK++){if(!oK){oN.push(this.points[oK])}var C=oL||this.points[oK];oL=this.points[oK+1];var T=gQ(oL,C);if(T>15437726){if(oL.lng<C.lng){oL.lng+=li.WORLD_SIZE_MC}else{oL.lng-=li.WORLD_SIZE_MC}}oN.push(oL)}this.points=oN}}this._calcBounds();this.draw();var e=new ix("onlineupdate");e.overlay=this;this.dispatchEvent(e);if(this._visible&&this._config.enableEditing===true&&!this._config.geodesic){this.clearVertexs&&this.clearVertexs();this.addVertexs&&this.addVertexs()}},_calcBounds:function(){if(!this.points||this.points.length===0){return}var e=this;e._bounds.setNorthEast(null);e._bounds.setSouthWest(null);if(e.greatCirclePoints&&e.greatCirclePoints.length>0){hv.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{hv.each(e.points,function(i){e._bounds.extend(i)})}e._normalizedBounds.setSouthWest(e._bounds.getSouthWest());e._normalizedBounds.setNorthEast(e._bounds.getNorthEast());if(e._normalizedBounds.sw.lng<-li.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>li.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-li.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=li.WORLD_SIZE_MC_HALF}},calcGreatCirclePoints:function(T,C){var oL=T.latLng;var oK=C.latLng;if(oL.equalsEpsilon(oK,0.00001)){return}var e=m8.getDistance(mn(oL.lng),mn(oL.lat),mn(oK.lng),mn(oK.lat));if(e<250000){return}var oP=Math.round(e/150000);var oT=this.calcAngularDistance(oL,oK);this.greatCirclePoints.push(T);var oS=oL.lng;var oR=T;for(var oM=0;oM<oP;oM++){var oO=this.calcMiddlePoint(oL,oK,oM/oP,oT);var oQ=m8.convertLL2MC(oO);var oN=oQ.lng;var oU=gQ(oQ,oR);if(oU>30037726){if(oQ.lng<oR.lng){oQ.lng+=li.WORLD_SIZE_MC}else{oQ.lng-=li.WORLD_SIZE_MC}}this.greatCirclePoints.push(oQ);oR=oQ}var oU=gQ(C,oR);if(oU>30037726){if(C.lng<oR.lng){C.lng+=li.WORLD_SIZE_MC}else{C.lng-=li.WORLD_SIZE_MC}}this.greatCirclePoints.push(C)},calcMiddlePoint:function(oQ,oP,oR,oV){var oK=oQ.lat;var T=oP.lat;var oU=oQ.lng;var oS=oP.lng;var oW=mn(oK);var oT=mn(T);var i=mn(oU);var e=mn(oS);var oY=Math.sin((1-oR)*oV)/Math.sin(oV);var oX=Math.sin(oR*oV)/Math.sin(oV);var oN=oY*Math.cos(oW)*Math.cos(i)+oX*Math.cos(oT)*Math.cos(e);var oM=oY*Math.cos(oW)*Math.sin(i)+oX*Math.cos(oT)*Math.sin(e);var oL=oY*Math.sin(oW)+oX*Math.sin(oT);var C=Math.atan2(oL,Math.sqrt(Math.pow(oN,2)+Math.pow(oM,2)));var oO=Math.atan2(oM,oN);return new d9(hJ(oO),hJ(C))},calcAngularDistance:function(oK,i){var oL=mn(oK.lat);var T=mn(i.lat);var C=mn(oK.lng);var e=mn(i.lng);return Math.acos(Math.sin(oL)*Math.sin(T)+Math.cos(oL)*Math.cos(T)*Math.cos(Math.abs(e-C)))}});function cf(oL,e){this.coordType=(e&&e.coordType)||cv.coordType;var oK=cx.pick(oL,"line");if(oK){oL=oK.points;this.properties=oK.properties}if(!oL||oL.length===0){return}var T=[];if(e&&e.noCoordTrans){for(var C=0;C<oL.length;C++){T[C]=m8.convertLL2MC(oL[C])}}else{for(var C=0;C<oL.length;C++){T[C]=m8.convertLL2MC(iM(oL[C],this.coordType))}}iJ.call(this,T,e)}cf.inherits(iJ,"PolylineOut");hv.extend(cf.prototype,{toString:function(){return"Polyline"},toGeoJSON:function(){var T="LineString";var oK=[];var oL=this.getPath();for(var C=0;C<oL.length;C++){oK.push([oL[C].lng,oL[C].lat])}var e={type:"Feature",geometry:{type:T,coordinates:oK},properties:this.properties};return e},updateByGeoJSON:function(e){this.setPath(e)},setPath:function(oK){var T=cx.pick(oK,"line");if(T){oK=T.points;this.properties=T.properties}if(!oK||oK.length===0){return}var C=[];for(var e=0;e<oK.length;e++){C[e]=m8.convertLL2MC(iM(oK[e],this.coordType))}this.setPathIn(C);this._mouseEventPixels=null},getPath:function(){var e=this.getPathIn();if(!e||e.length===0){return[]}var T=[];for(var C=0;C<e.length;C++){T[C]=m0(m8.convertMC2LL(e[C]),this.coordType)}return T},getBounds:function(i){var e=this.getBoundsIn(i);var C=new lz(m0(m8.convertMC2LL(e.getSouthWest()),this.coordType),m0(m8.convertMC2LL(e.getNorthEast(),this.coordType)));return C}});function j0(C,T,e){mk.call(this,e);this._normalizedBounds=new lz();this._cps=T;this._path=C;this.setPoints(C);var i=this;ki.load("poly",function(){i._draw()})}j0.inherits(iJ,"BezierCurve");hv.extend(j0.prototype,{getBoundsIn:function(e){if(!e){this._bounds.setMinMax();return this._bounds}this._normalizedBounds.setMinMax();return this._normalizedBounds},setPoints:function(e){this._clearCache();this.points=mk.getGraphPoints(e).slice(0);this.points=this.calcBezierPoints(this.points,this._cps);this._calcBounds()},_calcBounds:function(){if(!this.points){return}var e=this;e._bounds.setNorthEast(null);e._bounds.setSouthWest(null);if(e.greatCirclePoints&&e.greatCirclePoints.length>0){hv.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{hv.each(e.points,function(i){e._bounds.extend(i)})}e._normalizedBounds.setSouthWest(e._bounds.getSouthWest());e._normalizedBounds.setNorthEast(e._bounds.getNorthEast());if(e._normalizedBounds.sw.lng<-li.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>li.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-li.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=li.WORLD_SIZE_MC_HALF}},getPathIn:function(){return this._path},setPathIn:function(e){this._path=e;this.setPoints(e)},getCpsIn:function(){return this._cps},setCpsIn:function(e){this._cps=e;this.setPoints(this._path)},calcBezierPoints:function(T,oL){var C=[];for(var e=0;e<T.length-1;e++){var oK=[T[e],oL[e][0],oL[e][1],T[e+1]];C=C.concat((this.bezierbetweenTwoP(oK)))}return C},bezierbetweenTwoP:function(oL){var C=100;var oK=1/C;var e=[];for(var T=0;T<C;T++){e.push(this.getPointOnCubicBezier(oL,T*oK))}return e},getPointOnCubicBezier:function(oM,oQ){var i;var oL;var T;var oR;var oK;var C;var oP;var e;var oO;var oN;T=3*(oM[1].lng-oM[0].lng);oL=3*(oM[2].lng-oM[1].lng)-T;i=oM[3].lng-oM[0].lng-T-oL;C=3*(oM[1].lat-oM[0].lat);oK=3*(oM[2].lat-oM[1].lat)-C;oR=oM[3].lat-oM[0].lat-C-oK;oP=oQ*oQ;e=oP*oQ;oO=(i*e)+(oL*oP)+(T*oQ)+oM[0].lng;oN=(oR*e)+(oK*oP)+(C*oQ)+oM[0].lat;return new d9(oO,oN)}});function em(oK,oM,e){if(!oK||oK.length===0){return}this.userPath=oK;this.userCps=oM;var T=[];for(var C=0;C<oK.length;C++){T[C]=m8.convertLL2MC(oK[C])}if(!oM||oM.length===0){return}var oL=[];for(var C=0;C<oM.length;C++){oL[C]=[];oL[C][0]=m8.convertLL2MC(oM[C][0]);if(oM[C][1]){oL[C][1]=m8.convertLL2MC(oM[C][1])}else{oL[C][1]=m8.convertLL2MC(oM[C][0])}}j0.call(this,T,oL,e)}em.inherits(j0,"BezierCurveOut");hv.extend(em.prototype,{toString:function(){return"BezierCurve"},setPath:function(T){if(!T||T.length===0){return}this.userPath=T;var C=[];for(var e=0;e<T.length;e++){C[e]=m8.convertLL2MC(T[e])}this.setPathIn(C);this._mouseEventPixels=null},getPath:function(){return this.userPath;var e=this.getPathIn();if(!e||e.length===0){return[]}var T=[];for(var C=0;C<e.length;C++){T[C]=m8.convertMC2LL(e[C])}return T},getControlPoints:function(){return this.userCps;var e=this.getCpsIn();if(!e||e.length===0){return[]}var T=[];for(var C=0;C<e.length;C++){T[C]=[];T[C][0]=m8.convertMC2LL(e[C][0]);T[C][1]=m8.convertMC2LL(e[C][1])}return T},setControlPoints:function(T){if(!T||T.length===0){return}this.userCps=T;var C=[];for(var e=0;e<T.length;e++){C[e]=[];C[e][0]=m8.convertLL2MC(T[e][0]);if(T[e][1]){C[e][1]=m8.convertLL2MC(T[e][1])}else{C[e][1]=m8.convertLL2MC(T[e][0])}}this.setCpsIn(C)},getBounds:function(i){var e=this.getBoundsIn(i);var C=new lz(m8.convertMC2LL(e.getSouthWest()),m8.convertMC2LL(e.getNorthEast()));return C}});function gE(e,C){mk.call(this,C);this._normalizedBounds=new lz();this.setPoints(e);var i=this;ki.load("poly",function(){i._draw()})}gE.inherits(iJ,"PolylineMultipart");hv.extend(gE.prototype,{setPoints:function(e){if(!e){return}this._clearCache();this.points=this._unifyArgs(e);this._calcBounds()},_unifyArgs:function(C){var e=[];var i=[];if(C.constructor===Array){if(C[0].constructor===d9){i.push(C)}else{i=C}}else{if(typeof C==="string"){i.push(C)}}hv.each(i,function(T){e.push(mk.getGraphPoints(T))});return e},setPointAt:function(i,e,C){C=C||0;if(!e||!this.points[C]||!this.points[C][i]){return}this._clearCache();this.points[C][i]=new d9(e.lng,e.lat);this._calcBounds()},getBoundsIn:function(e){if(!e){this._bounds.setMinMax();return this._bounds}this._normalizedBounds.setMinMax();return this._normalizedBounds},_calcBounds:function(){if(!this.points){return}var e=this;e._bounds.setNorthEast(null);e._bounds.setSouthWest(null);if(e.greatCirclePoints&&e.greatCirclePoints.length>0){hv.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{hv.each(e.points,function(i){hv.each(i,function(C){e._bounds.extend(C)})})}e._normalizedBounds.setSouthWest(e._bounds.getSouthWest());e._normalizedBounds.setNorthEast(e._bounds.getNorthEast());if(e._normalizedBounds.sw.lng<-li.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>li.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-li.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=li.WORLD_SIZE_MC_HALF}}});function kC(C,e){mk.call(this,e);e=e||{};this.coordType=this.coordType||e.coordType||cv.coordType;if(typeof e.fillOpacity==="number"){this._config.fillOpacity=e.fillOpacity}else{this._config.fillOpacity=0.6}dA(this._config.fillOpacity,0,1);if(e.fillColor===""){this._config.fillColor=""}else{if(e.fillColor){this._config.fillColor=e.fillColor}else{this._config.fillColor=fq().fillColor}}this._parseFillCacheWebGL=[];this.setPoints(C,e);var i=this;ki.load("poly",function(){i._draw()})}kC.inherits(mk,"Polygon");hv.extend(kC.prototype,{setPoints:function(oL){var T=[];if(typeof oL==="string"||oL.length===1||oL[0] instanceof d9||oL[0] instanceof d1||this instanceof ka||oL.length===0){if(oL.length===1){oL=oL[0]}var e=this._processSinglePointArray(oL);this._userPoints=e.userPoints;T=e.innerPoints;this.hasMultipleParts=false}else{this._userPoints=[];for(var oK=0;oK<oL.length;oK++){var C=this._processSinglePointArray(oL[oK]);this._userPoints.push(C.userPoints);T.push(C.innerPoints)}this.hasMultipleParts=true}mk.prototype.setPoints.call(this,T)},setPathIn:function(e){this.setPoints(e)},_processSinglePointArray:function(e){var i=mk.getGraphPoints(e).slice(0);innerPoints=i.slice(0);if(innerPoints.length>1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new d9(innerPoints[0].lng,innerPoints[0].lat))}return{userPoints:i,innerPoints:innerPoints}},setPointAt:function(C,e,i){var T=i!==undefined&&i!==null;if(!T&&this._userPoints[0]&&this._userPoints[0][C]){T=true;i=0}if((!this._userPoints[C]&&!T)||(T&&!this._userPoints[i]&&!this._userPoints[i][C])){return}this._clearCache();if(T){this._userPoints[i][C]=new d9(e.lng,e.lat);this.points[i][C]=new d9(e.lng,e.lat);if(C===0&&!this.points[i][0].equals(this.points[i][this.points[i].length-1])){this.points[i][this.points[i].length-1]=new d9(e.lng,e.lat)}}else{this._userPoints[C]=new d9(e.lng,e.lat);this.points[C]=new d9(e.lng,e.lat);if(C===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new d9(e.lng,e.lat)}}this._calcBounds()},setPositionAt:function(C,e,i){var T=i!==undefined&&i!==null;if(!T&&this._userPoints[0]&&this._userPoints[0][C]){T=true;i=0}if((!this._userPoints[C]&&!T)||(T&&!(this._userPoints[i]&&this._userPoints[i][C]))){return}var oK=m8.convertLL2MC(e);this.setPointAt(C,oK,i)},getPoints:function(){var e=this._userPoints;if(e.length===0){e=this.points}return e},getPathIn:function(){return this.getPoints()}});function mw(C,e){this.coordType=(e&&e.coordType)||cv.coordType;if(!C||C.length===0){return}var i=this.setPath(C,true);kC.call(this,i,e)}mw.inherits(kC,"PolygonOut");hv.extend(mw.prototype,{toString:function(){return"Polygon"},toGeoJSON:function(){var oK="Polygon";var oL=[];var oN=this.getPath();if(this.hasMultipleParts){oK="Multi"+oK;for(var T=0;T<oN.length;T++){var oM=[];for(var C=0;C<oN[T].length;C++){oM.push([oN[T][C].lng,oN[T][C].lat])}oL.push(oM)}}else{for(var T=0;T<oN.length;T++){oL.push([oN[T].lng,oN[T].lat])}}var e={type:"Feature",geometry:{type:oK,coordinates:[oL]},properties:this.properties};return e},updateByGeoJSON:function(e){this.setPath(e)},setPath:function(oO,oL){var oN=cx.pick(oO,"polygon");if(oN){oO=oN.points;this.properties=oN.properties}if(!oO||oO.length===0){return}var e=[];if(typeof oO==="string"||oO[0] instanceof d9||oO[0] instanceof d1){var oP=this._processSinglePointArray(oO);for(var oK=0;oK<oP.innerPoints.length;oK++){e[oK]=m8.convertLL2MC(iM(oP.innerPoints[oK],this.coordType))}}else{for(var oK=0;oK<oO.length;oK++){var oM=this._processSinglePointArray(oO[oK]);var C=[];for(var T=0;T<oM.innerPoints.length;T++){C[T]=m8.convertLL2MC(iM(oM.innerPoints[T],this.coordType))}e.push(C)}}if(oL){return e}this.setPathIn(e);this._mouseEventPixels=null},getPath:function(){var e=this.getPathIn();if(!e||e.length===0){return[]}var oL=[];if(this.hasMultipleParts){for(var T=0;T<e.length;T++){var oK=[];for(var C=0;C<e[T].length;C++){oK[C]=m0(m8.convertMC2LL(e[T][C]),this.coordType)}oL.push(oK)}}else{for(var T=0;T<e.length;T++){oL[T]=m0(m8.convertMC2LL(e[T]),this.coordType)}}return oL}});function ka(i,e,C){this.point=i;this.radius=Math.abs(e);kC.call(this,[],C)}ka.parseTolerance={0:[0.01,0.0001,0.00001,0.000004],1:[1000,10,1,0.4]};ka.inherits(kC,"Circle");hv.extend(ka.prototype,{initialize:function(e){this.map=e;this.points=this._getPerimeterPoints(this.point,this.radius);this._calcBounds();return null},getPoint:function(){return this.point},setPoint:function(e){if(!e){return}this.point=e;this.latLng=m8.convertMC2LL(e)},setCenterIn:function(e){var i=arguments[1];this.setPoint(e,i)},setRadius:function(e){this.radius=Math.abs(e)},getCenterIn:function(){return this.point},getRadius:function(){return this.radius},_getPerimeterPoints:function(e,oQ){if(!e||!oQ||!this.map){return[]}var C=this.map;var oN=e.lng;var oL=e.lat;var oW=m8.convertMC2LL(e);oN=oW.lng;oL=oW.lat;var oX=[];var oS=oQ/m8.EARTHRADIUS;var oP=(Math.PI/180)*oL;var oV=(Math.PI/180)*oN;for(var oO=0;oO<360;oO+=9){var oM=(Math.PI/180)*oO;var oT=Math.asin(Math.sin(oP)*Math.cos(oS)+Math.cos(oP)*Math.sin(oS)*Math.cos(oM));var oR=Math.atan2(Math.sin(oM)*Math.sin(oS)*Math.cos(oP),Math.cos(oS)-Math.sin(oP)*Math.sin(oT));var oU=((oV-oR+Math.PI)%(2*Math.PI))-Math.PI;var oK=new d1(oT*(180/Math.PI),oU*(180/Math.PI));oX.push(m8.convertLL2MC(oK))}var T=oX[0];oX.push(new d9(T.lng,T.lat));if(T){this._radiusMercator=Math.sqrt(Math.pow(T.lng-this.point.lng,2)+Math.pow(T.lat-this.point.lat,2))}else{this._radiusMercator=this.radius}return oX}});function bz(i,e,oK){var T=(oK&&oK.coordType)||cv.coordType;this.latLng=iM(new d1(i.lat,i.lng),T);var C=m8.convertLL2MC(this.latLng);ka.call(this,C,e,oK)}bz.inherits(ka,"CircleOut");hv.extend(bz.prototype,{toString:function(){return"Circle"},setCenter:function(e){this.latLng=iM(new d1(e.lat,e.lng),this.coordType);var i=m8.convertLL2MC(this.latLng);this.setCenterIn(i)},getCenter:function(){return m0(new d1(this.latLng.lat,this.latLng.lng),this.coordType)},getPath:function(){var e=this.getPathIn();if(!e||e.length===0){return[]}var T=[];for(var C=0;C<e.length;C++){T[C]=m8.convertMC2LL(e[C])}return T},toGeoJSON:function(){var T="Polygon";var oK=[];var oL=this.getPath();for(var C=0;C<oL.length;C++){oK.push([oL[C].lng,oL[C].lat])}var e={type:"Feature",geometry:{type:T,coordinates:[oK]},properties:this.properties};return e},updateByGeoJSON:function(e){}});function aA(i,e){kC.call(this,[],e);this._bounds=i}aA.inherits(kC,"Rectangle");hv.extend(aA.prototype,{initialize:function(e){this.map=e;this.points=this._getBoundsPoints(this._bounds);this._calcBounds();return null},_getBoundsPoints:function(i){if(!i){return[]}var e=i.getSouthWest();var C=i.getNorthEast();if(!e||!C){return[]}return[new d9(e.lng,e.lat),new d9(e.lng,C.lat),new d9(C.lng,C.lat),new d9(C.lng,e.lat),new d9(e.lng,e.lat)]},setBoundsIn:function(e){this._bounds=e},getBoundsIn:function(){return this._bounds}});function g6(e,oO){var oK=(oO&&oO.coordType)||cv.coordType;if(!e){return}var oN=e.getSouthWest();var T=e.getNorthEast();if(!oN||!T){return}this.coordType=oK;var i=iM(new d1(oN.lat,oN.lng),oK);var oL=iM(new d1(T.lat,T.lng),oK);var C=m8.convertLL2MC(i);var oM=m8.convertLL2MC(oL);this._latLngBounds=new lz(new d9(i.lng,i.lat),new d9(oL.lng,oL.lat));aA.call(this,new lz(C,oM),oO)}g6.inherits(aA,"RectangleOut");hv.extend(g6.prototype,{toString:function(){return"Rectangle"},setBounds:function(oM){if(!oM){return}var e=oM.getSouthWest();var oN=oM.getNorthEast();if(!e||!oN){return}var oL=this.coordType||cv.coordType;var oK=iM(new d1(e.lat,e.lng),oL);var C=iM(new d1(oN.lat,oN.lng),oL);var T=m8.convertLL2MC(oK);var i=m8.convertLL2MC(C);this._latLngBounds=new lz(new d9(oK.lng,oK.lat),new d9(C.lng,C.lat));this.setBoundsIn(new lz(T,i))},getBounds:function(){var oL=this._bounds;if(!oL){return null}var e=oL.getSouthWest();var oK=oL.getNorthEast();if(!e||!oK){return null}var T=this.coordType||cv.coordType;var C=m0(m8.convertMC2LL(e),T);var i=m0(m8.convertMC2LL(oK),T);return new lz(new d9(C.lng,C.lat),new d9(i.lng,i.lat))},getPath:function(){var e=this.getPathIn();if(!e||e.length===0){return[]}var oK=[];var C=this.coordType||cv.coordType;for(var T=0;T<e.length;T++){oK[T]=m0(m8.convertMC2LL(e[T]),C)}return oK},toGeoJSON:function(){var C=[];var T=this.getPath();for(var e=0;e<T.length;e++){C.push([T[e].lng,T[e].lat])}return{type:"Feature",geometry:{type:"Polygon",coordinates:[C]},properties:this.properties}}});function oy(oK,i,C){mk.call(this,C);C=C||{};if(typeof C.topFillOpacity==="number"){this._config.topFillOpacity=C.topFillOpacity}else{this._config.topFillOpacity=0.6}if(typeof C.sideFillOpacity==="number"){this._config.sideFillOpacity=C.sideFillOpacity}else{this._config.sideFillOpacity=0.8}dA(this._config.sideFillOpacity,0,1);var e=fq().fillColor;if(C.topFillColor===""){this._config.topFillColor=""}else{this._config.topFillColor=C.topFillColor?C.topFillColor:e}if(C.sideFillColor===""){this._config.sideFillColor=""}else{this._config.sideFillColor=C.sideFillColor?C.sideFillColor:e}this._parseFillCacheWebGL=[];this.setPoints(oK,C);this._config.altitude=i||0;var T=this;ki.load("poly",function(){T._draw()})}oy.inherits(mk,"Prism");hv.extend(oy.prototype,{setPoints:function(oL){var T=[];if(typeof oL==="string"||oL[0] instanceof d9||oL[0] instanceof d1||this instanceof ka||oL.length===0){var e=this._processSinglePointArray(oL);this._userPoints=e.userPoints;T=e.innerPoints;this.hasMultipleParts=false}else{this._userPoints=[];for(var oK=0;oK<oL.length;oK++){var C=this._processSinglePointArray(oL[oK]);this._userPoints.push(C.userPoints);T.push(C.innerPoints)}this.hasMultipleParts=true}mk.prototype.setPoints.call(this,T)},setPathIn:function(e){this.setPoints(e)},_processSinglePointArray:function(e){var i=mk.getGraphPoints(e).slice(0);innerPoints=i.slice(0);if(innerPoints.length>1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new d9(innerPoints[0].lng,innerPoints[0].lat))}return{userPoints:i,innerPoints:innerPoints}},setPointAt:function(i,e){if(!this._userPoints[i]){return}this._clearCache();this._userPoints[i]=new d9(e.lng,e.lat);this.points[i]=new d9(e.lng,e.lat);if(i===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new d9(e.lng,e.lat)}this._calcBounds()},getPoints:function(){var e=this._userPoints;if(e.length===0){e=this.points}return e},getPathIn:function(){return this.getPoints()},setTopFillOpacity:function(e){if(e>1||e<0){return}this._config.topFillOpacity=e;this._setDomAttribute("topfillopacity",e)},getTopFillOpacity:function(){return this._config.topFillOpacity},setSideFillOpacity:function(e){if(e>1||e<0){return}this._config.sideFillOpacity=e;this._setDomAttribute("sidefillopacity",e)},getSideFillOpacity:function(){return this._config.sideFillOpacity},setTopFillColor:function(e){this._config.topFillColor=e||"";this._setDomAttribute("topfillcolor",e)},getTopFillColor:function(){return this._config.topFillColor},setSideFillColor:function(e){this._config.sideFillColor=e||"";this._setDomAttribute("sidefillcolor",e)},getSideFillColor:function(){return this._config.sideFillColor},setAltitude:function(e){this._config.altitude=Number(e);this.draw();var i=new ix("onlineupdate");i.overlay=this;this.dispatchEvent(i)},getAltitude:function(){return this._config.altitude}});function cm(oN,oL,oO){if(!oN||oN.length===0){return}this.userPath=oN;var e=[];if(typeof oN==="string"||oN[0] instanceof d9||oN[0] instanceof d1){var oP=this._processSinglePointArray(oN);for(var oK=0;oK<oP.innerPoints.length;oK++){e[oK]=m8.convertLL2MC(oP.innerPoints[oK])}}else{for(var oK=0;oK<oN.length;oK++){var oM=this._processSinglePointArray(oN[oK]);var C=[];for(var T=0;T<oM.innerPoints.length;T++){C[T]=m8.convertLL2MC(oM.innerPoints[T])}e.push(C)}}oy.call(this,e,oL,oO)}cm.inherits(oy,"PrismOut");hv.extend(cm.prototype,{toString:function(){return"Prism"},setPath:function(T){if(!T||T.length===0){return}this.userPath=T;var C=[];for(var e=0;e<T.length;e++){C[e]=m8.convertLL2MC(T[e])}this.setPathIn(C);this._mouseEventPixels=null},getPath:function(){return this.userPath;var e=this.getPathIn();if(!e||e.length===0){return[]}var T=[];for(var C=0;C<e.length;C++){T[C]=m8.convertMC2LL(e[C])}return T}});function dc(oK,i){mk.call(this,i);i=i||{};this._config.type=i.type||"image";this._config.url=i.url||"";this._config.opacity=typeof i.opacity==="number"?i.opacity:1;this._config.sysType=i.sysType!=="fixed"?"geo":"fixed";this._config.top=i.top||false;this._config.displayOnMinLevel=i.displayOnMinLevel||3;this._config.displayOnMaxLevel=i.displayOnMaxLevel||21;this.isReDraw=i.isReDraw||false;this.drawHook=(i.drawHook instanceof Function)?i.drawHook:null;dA(this._config.opacity,0,1);if(i.imageURL){this._config.url=i.imageURL}if(i.type==="image"&&i.isPixelMap){this._config.isPixelMap=i.isPixelMap||false;var C=i.pixelMap||{};this._config.colors=C.colors||["#F9F871","#FFC75F","#FF9671","#FF6F91","#D65DB1","#845EC2"];this._config.positions=C.positions||[0,0.2,0.4,0.6,0.8,1];this._config.domain=C.domain||[0,255];this._config.clamp=C.clamp||this._config.domain;this._config.noData=(C.noData!==undefined)?C.noData:-99999;this._config.fomularC=C.fomularC||"float generateValue(vec4 pixel){return pixel.r * 255.;}";this._config.fomularJS=C.fomularJS||function(oL){return oL.r};this._config.maskPng=C.maskPng||null;this._config.maskData=C.maskData||-1;this._config.maskCoord=C.maskCoord||null;this.fHashcode=u({str:this._config.fomularC});var e=this.canPixelMap();if(e){this.isPixelMap=true;this.setPixelMap()}}this._parseFillCacheWebGL=[];if(this._config.sysType==="fixed"){this.points=oK}else{this.setPoints(oK,i)}if(oK instanceof lz){this._addlog(i)}var T=this;ki.load("poly",function(){T._draw()})}dc.inherits(mk,"GroundOverlay");hv.extend(dc.prototype,{_addlog:function(e){var i=1;var C="picture";if(e){if(e.type==="canvas"&&!e.isReDraw){i=2;C="static_canvas"}else{if(e.type==="canvas"&&e.isReDraw){i=3;C="dynamic_canvas"}else{if(e.type==="video"){i=4;C="video"}else{if(e.type==="image"&&e.isPixelMap){i=5;C="raster"}}}}}kU.sendMessage("GroundOverlay","bindtype",C)},setPoints:function(i){var e=mk.getGraphPoints(i).slice(0);this.hasMultipleParts=false;mk.prototype.setPoints.call(this,e)},setPathIn:function(e){this.setPoints(e)},getPoints:function(){return this.points},getPathIn:function(){return this.getPoints()},canPixelMap:function(){if(this._config.colors&&this._config.positions){return true}return false},setPixelMap:function(){if(!this._config.isPixelMap||!this.canPixelMap()){return}var i=this._config.colors;var e=this._config.positions;this.pHashcode=u({colors:i,positions:e});this.pixelColorMap=k0.generateColorRamp(i,e)},setDomain:function(e){if(e instanceof Array&&e.length===2){this._config.domain=e;this.doOnceDraw()}},setClamp:function(e){if(e instanceof Array&&e.length===2){this._config.clamp=e;this.doOnceDraw()}},setMaskPng:function(i){this._config.maskPng=i;if(this.map){var e=new ix("hide");e.overlay=this;this.dispatchEvent(e);var e=new ix("show");e.overlay=this;this.dispatchEvent(e)}this.doOnceDraw()},setMaskData:function(e){this._config.maskData=e;this.doOnceDraw()},setMaskCoord:function(e){this._config.maskCoord=e;this.maskUV=null;this.doOnceDraw()},setNoData:function(e){this._config.noData=e;this.doOnceDraw()},setPositions:function(e){this._config.positions=e;this.setPixelMap();this.doOnceDraw()},setColors:function(e){this._config.colors=e;this.setPixelMap();this.doOnceDraw()},setBounds:function(C,oM){if(C instanceof lz){var oO=Math.min(C.sw.lng,C.ne.lng);var oL=Math.max(C.sw.lng,C.ne.lng);var oN=Math.min(C.sw.lat,C.ne.lat);var e=Math.max(C.sw.lat,C.ne.lat);var oQ=[new d9(oO,oN),new d9(oL,oN),new d9(oL,e),new d9(oO,e)];var T=mk.getGraphPoints(oQ).slice(0);var oK=[];for(var oP=0;oP<T.length;oP++){oK[oP]=m8.convertLL2MC(T[oP])}}else{if(C.length===4){var oK=C}else{return false}}this.setPoints(oK);if(oM){return true}this.doOnceDraw()},setOpacity:function(e){if(e>1||e<0){return}this._config.opacity=e;this.doOnceDraw()},setDisplayOnMinLevel:function(e){this._config.displayOnMinLevel=e;this.doOnceDraw()},getDisplayOnMinLevel:function(){return this._config.displayOnMinLevel},setDisplayOnMaxLevel:function(e){this._config.displayOnMaxLevel=e;this.doOnceDraw()},getDisplayOnMaxLevel:function(){return this._config.displayOnMaxLevel},getOpacity:function(){return this._config.opacity},getImageURL:function(){return this._config.url},setImage:function(e,C){this._config.src=e;this._config.url=e;this._texture=null;var i=this;this.imageLoad&&this.imageLoad(this._config.src,function(T,oK){if(oK){i._texture=T;if(C){i.setBounds(C,true)}i.doOnceDraw()}})},setImageURL:function(e,i){this.setImage(e,i)},setFomular:function(e,i){if(e&&i){this._config.fomularJS=e;this._config.fomularC=i;this.fHashcode=u({str:this._config.fomularC});this.doOnceDraw()}},setIsPixelMap:function(e){this.isPixelMap=e;this.doOnceDraw()},getImagePixel:function(T){if(!this._config.isPixelMap||!this.canPixelMap()){return null}if(!this.getImageMaskPixel(T)){return null}if(this.imageObject){var C=Math.floor((T.lng-this.points[3].lng)/this.lngMC);var e=Math.floor((-T.lat+this.points[3].lat)/this.latMC);var i=Math.floor((e*this.imageObject.width+C)*4);if(C>this.imageObject.width||C<0){return null}if(e>this.imageObject.height||e<0){return null}if(i+3>this.imageObject.data.data.length){return null}return[this.imageObject.data.data[i],this.imageObject.data.data[i+1],this.imageObject.data.data[i+2],this.imageObject.data.data[i+3],]}return null},getValue:function(i){if(this._config.isPixelMap&&i&&this._config.fomularJS){if(!(i instanceof Array)){i=this.getImagePixel(i.point)}var e=this._config.fomularJS({r:i[0],g:i[1],b:i[2],a:i[3]});if(e>=this._config.clamp[0]&&e<=this._config.clamp[1]){return e}}return null},setImageObject:function(C){var e=document.createElement("canvas");e.width=C.width;e.height=C.height;var i=e.getContext("2d");i.drawImage(C,0,0,C.width,C.height);this.imageObject={width:C.width,height:C.height,data:i.getImageData(0,0,C.width,C.height)};this.updatePixelMc();i=null;e=null},updatePixelMc:function(){if(this.imageObject){var e=Math.abs(this.points[2].lng-this.points[0].lng);var i=Math.abs(this.points[2].lat-this.points[0].lat);this.lngMC=e/this.imageObject.width;this.latMC=i/this.imageObject.height}},setMaskImageObject:function(C){var e=document.createElement("canvas");e.width=C.width;e.height=C.height;var i=e.getContext("2d");i.drawImage(C,0,0,C.width,C.height);this.imageMaskObject={width:C.width,height:C.height,data:i.getImageData(0,0,C.width,C.height)};i=null;e=null},getImageMaskPixel:function(e){if(!this.imageMaskObject){return true}var T=this._toOverlayPixelsGL([e]);var oO=this.maskOverlayPixels;var oL=oO[1][0]-oO[0][0];var oK=oO[1][1]-oO[0][1];var C=Math.floor((T[0][0]-oO[0][0])/oL*this.imageMaskObject.width);var i=Math.floor((-T[0][1]+oO[1][1])/oK*this.imageMaskObject.height);var oN=Math.floor((i*this.imageMaskObject.width+C)*4);if(C>this.imageMaskObject.width||C<0){return null}if(i>this.imageMaskObject.height||i<0){return null}var oM=this.imageMaskObject.data.data;if(oN+3>oM.length){return false}if(oM[oN+3]>0){if(this._config.maskData>-1&&this._config.maskData!==oM[oN]){return false}return true}return false},doOnceDraw:function(){var e=new ix("onlineupdate");e.overlay=this;this.dispatchEvent(e)},destroy:function(){this.points=[];this.imageMaskObject=null}});function iQ(T,oQ){if(!T){return}oQ=oQ||{};var oL=[];if(oQ.sysType==="fixed"){oL=T}else{if(T instanceof lz){var oN=Math.min(T.sw.lng,T.ne.lng);var oK=Math.max(T.sw.lng,T.ne.lng);var oM=Math.min(T.sw.lat,T.ne.lat);var C=Math.max(T.sw.lat,T.ne.lat);var oP=[new d9(oN,oM),new d9(oK,oM),new d9(oK,C),new d9(oN,C)];var e=mk.getGraphPoints(oP).slice(0);for(var oO=0;oO<e.length;oO++){oL[oO]=m8.convertLL2MC(e[oO])}}else{if(T.length===4){oL=T}else{return false}}}dc.call(this,oL,oQ)}iQ.inherits(dc,"GroundOverlayOut");hv.extend(iQ.prototype,{toString:function(){return"GroundOverlay"}});function fP(e,i){if(!(e instanceof d9)){return}this.point=e;var e=m8.convertLL2MC(e);this.mc_point=[e.lng,e.lat];this.size=(i.size instanceof mU)?i.size:new mU(32,32);this.scale=i.scale||1;this.anchor=(i.anchor instanceof mU)?i.anchor:new mU(0,0);this.rotation=i.rotation||0;this.offset=(i.offset instanceof mU)?i.offset:new mU(0,0);this.level=i.level||18;var C=this.calBounds(false);iQ.call(this,C,i)}fP.inherits(iQ,"GroundPoint");hv.extend(fP.prototype,{calBounds:function(oL){var e=Math.pow(2,18-this.level);var C=this.scale*e;var oP=this.size.width/2*C;var oW=this.size.height/2*C;var oO=this.anchor.width*C;var oV=this.anchor.height*C;var T=this.offset.width*C;var oQ=this.offset.height*C;var oX=[[-1,-1],[1,-1],[1,1],[-1,1]];var oK=[];var oR=this.rotation*Math.PI/180;var oY=gh.create();gh.rotate(oY,oY,oR);for(var oT=0;oT<oX.length;oT++){var oU=oX[oT][0]*oP-oO;var oS=oX[oT][1]*oW-oV;var oN=oY[0]*oU+oY[1]*oS;var oM=oY[2]*oU+oY[3]*oS;oK.push(new d9(this.mc_point[0]+oN+T,this.mc_point[1]+oM+oQ))}if(oL){this._mouseEventPixels=null;this.setBounds(oK)}else{return oK}},setPoint:function(C,i){if(!(C instanceof d9)){return}this.point=C;var e=m8.convertLL2MC(C);this.mc_point=[e.lng,e.lat];if(i||i===undefined){this.calBounds(true)}return this},setScale:function(e,i){this.scale=e;if(i||i===undefined){this.calBounds(true)}return this},setSize:function(e,i){if(e instanceof mU){this.size=e;if(i||i===undefined){this.calBounds(true)}}return this},setRotation:function(e,i){this.rotation=e;if(i||i===undefined){this.calBounds(true)}return this},setAnchor:function(e,i){if(e instanceof mU){this.anchor=e;if(i||i===undefined){this.calBounds(true)}}return this},setOffset:function(e,i){if(e instanceof mU){this.offset=e;if(i||i===undefined){this.calBounds(true)}}return this}});function cS(i,e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("CustomOverlay")}bw.call(this,e);if(!i||!e.point||!c2(i)){throw new Error("鍙傛暟绫诲瀷閿欒")}e=e||{};this.coordType=e.coordType||cv.coordType;this.point=iM(e.point,this.coordType);this.createDom=i;this.offsetX=e.offsetX||0;this.offsetY=e.offsetY||0;this.minZoom=e.minZoom||3;this.maxZoom=e.maxZoom||21;this.nextTick=e.nextTick||false;this.properties=e.properties||{};this.zIndex=this.properties.zIndex||e.zIndex||0;this.enableMassClear=e.enableMassClear||true;this.enableDraggingMap=e.enableDraggingMap||false;this.fixBottom=e.fixBottom||false;this.anchors=e.anchors||[0.5,1];this.visible=e.visible===undefined?true:!!e.visible;this.useTranslate=e.useTranslate||false;this.rotationInit=e.rotationInit||0;this.rotationFlip=e.rotationFlip||false;this.autoFollowHeadingChanged=e.autoFollowHeadingChanged||false;this.synUpdate=e.synUpdate||false;this._rotation=0;this._rotationOrigin=0;this._originOpt=e;this.customLayer=null}cS.inherits(bw,"CustomOverlay");hv.extend(cS.prototype,{initialize:function(T){this.map=T;this.show(true);this.div=document.createElement("div");this.div.id="cus_overlay";this.div.setAttribute("data-tag-touch","stop");if(this.useTranslate){var e=-this.anchors[0]*100;var oK=-this.anchors[1]*100;this.div.style.transform="translate("+e+"%,"+oK+"%)";if(this.autoFollowHeadingChanged){var C=this;T.addEventListener("heading_changed",function(){C.updateRotation()});this.updateRotation()}}if(this.synUpdate){var C=this;this.map.on("ondraw",function(oL){C.draw()})}var i=this.createDom(this.properties);this.div.appendChild(i);this.map.getPanes().labelPane.appendChild(this.div);if(this.zIndex!==0){this.div.style.zIndex=this.zIndex}return this.div},isDraw:function(){if(this.map){var C=this.map.getZoom();var e=false;var i=this._getPixPos(this.map.getZoom(),this.map.getCenter());e=i.onBack;if(C<this.minZoom||C>this.maxZoom||e||!this.visible){this.hide(true);return false}else{this.show(true);return true}}return false},hide:function(e){if(!e){this.visible=false}this._visible=false;hv.hide(this.domElement)},show:function(e){if(!e){this.visible=true}this._visible=true;hv.show(this.domElement)},draw:function(){if(!this.div||!this.point){return}if(this.nextTick&&this.div.style.position!=="absolute"){this.div.style.opacity=0;setTimeout(function(){this.div.style.opacity=1;this.draw()}.bind(this),0)}if(this.div.children[0]){var oL=this.div.children[0].clientWidth;var e=this.div.children[0].clientHeight;if(!oL&&this.lastClientWidth){oL=this.lastClientWidth;e=this.lastClientHeight}this.lastClientWidth=oL;this.lastClientHeight=e}var T=0;var C=0;var oK=m8.convertLL2MC(this.point);var i=this.map.pointToOverlayPixelIn(oK,{useRound:false});if(!this.useTranslate){T=this.div.children[0]?oL*this.anchors[0]:0;C=this.div.children[0]?e*this.anchors[1]-(this.fixBottom?0:25):0}this.div.style.position="absolute";this.div.style.left=i.x-T+this.offsetX+"px";this.div.style.top=i.y-C+this.offsetY+"px";this.div.style.boxSizing="border-box";if(!this.isDraw()){return}},addEventListener:function(C,oK){if(!this.div||!this.map){return}var i=this;var T=this.map;function e(oO){var oM=new ix("onclick").inherit(oO);oM.type=oO.type;var oN=oO.srcElement||oO.target;var oL=oO.clientX||oO.pageX;var oQ=oO.clientY||oO.pageY;if(oO&&oM&&oN&&oL&&oQ){var oP=hv.Dom.getOffset(T.container);oM.pixel=new hV(oL-oP.left,oQ-oP.top);oM.latLng=T.pixelToPoint(oM.pixel)}return oM}switch(C){case"mouseover":if(this.div.style){this.div.style.cursor="pointer"}hv.on(this.div,"mouseover",function(oM){i.div.style.cursor="pointer";var oL=e(oM);i.dispatchEvent(oL);oK(oL)});break;case"mouseout":hv.on(this.div,"mouseout",function(oM){var oL=e(oM);i.dispatchEvent(oL);oK(oL)});break;case"click":if(this.div.style){this.div.style.cursor="pointer"}hv.on(this.div,"click",function(oM){var oL=e(oM);i.dispatchEvent(oL);oK(oL)});break;default:break}},setPoint:function(e,oK){if(e instanceof d9){if(!oK){this.div.innerHTML="";this.div.appendChild(this.createDom(this.properties))}this.point=iM(e,this.coordType);if(this.synUpdate){this.map.dispatchEvent(new ix("onrefresh"));return}var T=0;var C=0;if(!this.useTranslate){T=this.div.clientWidth*this.anchors[0];C=this.div.clientHeight*this.anchors[1]-(this.fixBottom?0:25)}var oL=m8.convertLL2MC(this.point);var i=this.map.pointToOverlayPixelIn(oL,{useRound:false});this.div.style.position="absolute";this.div.style.left=i.x-T+this.offsetX+"px";this.div.style.top=i.y-C+this.offsetY+"px"}},setRotation:function(oN){oN=oN+this.rotationInit;while(oN<0){oN+=360}this._rotation=oN%360;var oL=0;var C=this._rotation;if((this._rotation>90&&this._rotation<270)&&this.rotationFlip){oL=180;C-=360}else{oL=0}if(this.rotationFlip){var oP=((this.div.clientWidth||0)*this.anchors[0]||0)-(this._originOpt.offsetY||0)+(this._originOpt.offsetX||0);if(Math.abs(this._rotation-80)<=10||Math.abs(this._rotation-260)<=10){this.offsetX=oP}else{if(Math.abs(this._rotation-100)<=10||Math.abs(this._rotation-280)<=10){this.offsetX=-oP}else{this.offsetX=this._originOpt.offsetX||0}}}var i=this.div.style.transform;const oK=/translate\(([^)]+)/;const oO=i.match(oK);if(oO){const oM=oO[1].split(",");const T=oM[0].trim();const e=oM[1].trim();this.div.style.transform="translate("+T+", "+e+") rotateZ("+C+"deg) rotateX("+oL+"deg)"}else{this.div.style.transform="rotateZ("+C+"deg) rotateX("+oL+"deg)"}},setRotationOrigin:function(e){while(e<0){e+=360}this._rotationOrigin=e%360;this.updateRotation()},updateRotation:function(){if(!this.map||!this.autoFollowHeadingChanged){return}var e=(this._rotationOrigin+this.map.getHeading());this.setRotation(e)},getRotation:function(){return this._rotation},getPoint:function(){return m0(this.point,this.coordType)},setProperties:function(e){if(e instanceof Object){Object.assign(this.properties,e);this.div.innerHTML="";this.div.appendChild(this.createDom(this.properties))}},getProperties:function(){return this.properties},toString:function(){return"CustomOverlay"},_getPixPos:function(C,e){var T=m8.convertLL2MC(this.point);var i=this.map.pointToOverlayPixelIn(T,{zoom:C,center:e,fixPosition:true});return i},});function ik(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("CanvasLayer")}bw.call(this);this.options=e||{};this.paneName=this.options.paneName||"labelPane";this.zIndex=this.options.zIndex||0;this.contextType=this.options.contextType||"2d";this.enableMassClear=this.options.enableMassClear!==false;this._bindedResize=null}ik.inherits(bw,"CanvasLayer");ik.prototype.initialize=function(T){this._map=T;var i=this.canvas=document.createElement("canvas");var e=this.ctx=this.canvas.getContext(this.contextType);i.style.cssText="position:absolute;left:0;top:0;pointer-events:none;z-index:"+this.zIndex+";";this.adjustSize();this.adjustRatio(e);var oK=T.getPanes()[this.paneName];if(oK){oK.appendChild(i)}var C=this;this._bindedResize=function(){if(!C.canvas||!C._map){return}C.adjustSize();C.adjustRatio(C.ctx);C.draw()};T.addEventListener("resize",this._bindedResize);return this.canvas};ik.prototype.adjustSize=function(){var i=this._map.getSize();var e=this.canvas;e.width=i.width;e.height=i.height;e.style.width=e.width+"px";e.style.height=e.height+"px"};ik.prototype.adjustRatio=function(i){var oK=i.backingStorePixelRatio||i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1;var T=(window.devicePixelRatio||1)/oK;var e=i.canvas.width;var C=i.canvas.height;i.canvas.width=e*T;i.canvas.height=C*T;i.canvas.style.width=e+"px";i.canvas.style.height=C+"px";i.scale(T,T)};ik.prototype.draw=function(){if(!this.canvas||!this._map){return}if(this._map._renderType!=="webgl"){this.canvas.style.left=-this._map.offsetX+"px";this.canvas.style.top=-this._map.offsetY+"px"}this.dispatchEvent("draw");this.options.update&&this.options.update.apply(this,arguments)};ik.prototype.remove=function(){if(this._map&&this._bindedResize){this._map.removeEventListener("resize",this._bindedResize);this._bindedResize=null}if(this.canvas&&this.canvas.parentNode){this.canvas.parentNode.removeChild(this.canvas)}this.canvas=null;this.ctx=null;this.domElement=null;this.dispatchEvent(new ix("onremove"))};ik.prototype.getContainer=function(){return this.canvas};ik.prototype.show=function(){if(!this.canvas&&this._map){this._map.addOverlay(this)}if(this.canvas){this.canvas.style.display="block"}};ik.prototype.hide=function(){if(this.canvas){this.canvas.style.display="none"}};ik.prototype.setZIndex=function(e){this.zIndex=e;if(this.canvas){this.canvas.style.zIndex=e}};ik.prototype.getZIndex=function(){return this.zIndex};var aX={};function lD(C,i){hv.BaseClass.call(this);this.content=C;this.map=null;this._config={width:0,height:0,maxWidth:600,offset:new mU(0,0),title:"",maxContent:"",enableMaximize:false,enableAutoPan:true,enableCloseOnClick:true,margin:[10,10,40,10],collisions:[[10,10],[10,10],[10,10],[10,10]],ifMaxScene:false,onClosing:function(){return true}};this.setConfig(i);if(this._config.width<50){this._config.width=50}if(this._config.width>730){this._config.width=730}if(this._config.height!=0){if(this._config.height<50){this._config.height=50}if(this._config.height>650){this._config.height=650}}if(this._config.maxWidth!==0){if(this._config.maxWidth<50){this._config.maxWidth=50}if(this._config.maxWidth>730){this._config.maxWidth=730}}this.isWinMax=false;this.IMG_PATH=K.imgPath;this.overlay=null;var e=this;ki.load("simpleInfowindow",function(){e._draw()})}lD.inherits(hv.BaseClass,"SimpleInfoWindow");hv.extend(lD.prototype,{setWidth:function(e){e=e*1;if(!e&&e!=0||isNaN(e)||e<0){return}if(e!=0){if(e<50){e=50}if(e>730){e=730}}this._config.width=e},setHeight:function(e){e=e*1;e-=10;if(!e&&e!=0||isNaN(e)||e<0){return}if(e!=0){if(e<50){e=50}if(e>650){e=650}}this._config.height=e},setMaxWidth:function(e){e=e*1;if(!e&&e!=0||isNaN(e)||e<0){return}if(e!=0){if(e<50){e=50}if(e>730){e=730}}this._config.maxWidth=e},setTitle:function(e){this._config.title=e||""},setContent:function(e){this.content=e||""},setMaxContent:function(e){this._config.maxContent=e||""},redraw:function(){},enableAutoPan:function(){this._config.enableAutoPan=true},disableAutoPan:function(){this._config.enableAutoPan=false},enableCloseOnClick:function(){this._config.enableCloseOnClick=true},disableCloseOnClick:function(){this._config.enableCloseOnClick=false},enableMaximize:function(){this._config.enableMaximize=true},disableMaximize:function(){this._config.enableMaximize=false},show:function(){this._visible=true},hide:function(){this._visible=false},close:function(){this.hide()},dispose:function(){hv.BaseClass.prototype.decontrol.call(this)},maximize:function(){this.isWinMax=true},restore:function(){this.isWinMax=false},setConfig:function(i){if(!i){return}for(var e in i){if(typeof(this._config[e])==typeof(i[e])){this._config[e]=i[e]}}},isVisible:function(){return this.isOpen()},isOpen:function(){return false},getPoint:function(){if(this.overlay&&this.overlay.getPoint){return this.overlay.getPoint()}},getOffset:function(){return this._config.offset},dispose:function(){hv.BaseClass.prototype.decontrol.call(this)},toString:function(){return"SimpleInfoWindow"}});li.prototype.openSimpleInfoWindow=function(oK,e){if(!oK||oK.toString()!="SimpleInfoWindow"||!e||e.toString()!="Point"){return}var i=m8.convertLL2MC(e);var C=this.temp;if(!C.marker){var T=new nF(K.imgPath+"blank.gif",{width:1,height:1});C.marker=new og(i,{icon:T,width:1,height:1,offset:new mU(0,0),infoWindowOffset:new mU(0,0),clickable:false});C.marker._fromMap=1}C.marker.setPositionIn(i);this.addOverlay(C.marker);C.marker.show();C.marker.openSimpleInfoWindow(oK)};li.prototype.closeSimpleInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeSimpleInfoWindow()}};g2.prototype.openSimpleInfoWindow=function(e){if(this.map){this.map.closeSimpleInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;hv.BaseClass.call(e,e.hashCode)}};g2.prototype.closeSimpleInfoWindow=function(){if(this.map&&this.map.temp._infoWin){this.map.temp._infoWin._visible=false;this.map.temp._infoWin.decontrol();this.map.temp._infoWin=null}};function dM(C,e){mk.call(this,e);e=e||{};this._config.showRegion=e.showRegion||"inside";this._config.isBuildingMask=e.isBuildingMask&&true;this._config.isPoiMask=e.isPoiMask&&true;this._config.isMapMask=e.isMapMask&&true;this._config.path=C;this._parseFillCacheWebGL=[];this.setPoints(C,e);var i=this;ki.load("poly",function(){i._draw()})}dM.inherits(mk,"MapMask");hv.extend(dM.prototype,{setPoints:function(i){var e=mk.getGraphPoints(i).slice(0);this.hasMultipleParts=false;mk.prototype.setPoints.call(this,e)},setPathIn:function(e){this.setPoints(e)},_processSinglePointArray:function(e){var i=mk.getGraphPoints(e).slice(0);innerPoints=i.slice(0);if(innerPoints.length>1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new d9(innerPoints[0].lng,innerPoints[0].lat))}return{userPoints:i,innerPoints:innerPoints}},getPoints:function(){var e=this._userPoints;if(e.length===0){e=this.points}return e},getPathIn:function(){return this.getPoints()}});function ov(oL,C){if(!oL||oL.length===0){return}var oK=[];if(oL[0] instanceof d9){var e=this._processSinglePointArray(oL);for(var T=0;T<e.innerPoints.length;T++){oK[T]=m8.convertLL2MC(e.innerPoints[T])}}dM.call(this,oK,C)}ov.inherits(dM,"MapMaskOut");hv.extend(ov.prototype,{toString:function(){return"MapMask"}});function ks(i,T,e,C){if(!i){return}this._positionsCache={};this.fixedRotation=C?!!C:false;this._markers=[];this.symbol=(i instanceof hS)?i:null;this._relativeOffset=T===undefined?true:!!(T.indexOf("%")+1);this._offset=isNaN(parseFloat(T))?1:(this._relativeOffset?parseFloat(T)/100:parseFloat(T));this._relativeRepeat=!!(e.indexOf("%")+1);this.repeat=e!=undefined?(this._relativeRepeat?parseFloat(e)/100:parseFloat(e)):0}function hV(e,i){e=isNaN(e)?0:e;i=isNaN(i)?0:i;this.x=e;this.y=i}hV.prototype.equals=function(e){if(!e){return false}return e.x===this.x&&e.y===this.y};hV.prototype.clone=function(){return new hV(this.x,this.y)};hV.prototype.toString=function(){return"Pixel"};function mU(i,e){if(typeof i!=="number"){this.width=parseFloat(i)}else{this.width=i}if(typeof e!=="number"){this.height=parseFloat(e)}else{this.height=e}}mU.prototype.equals=function(e){return !!(e&&this.width===e.width&&this.height===e.height)};mU.prototype.toString=function(){return"Size"};var ms=[];if(window.B_HOST_TILE_BASE_URLS&&window.B_HOST_TILE_BASE_URLS.length>=4){ms=window.B_HOST_TILE_BASE_URLS}var oB={B_NORMAL_MAP:{tileUrls:fx(K.tileDomain,K.rasterTilePath),vectorTileUrls:fx(K.tileDomain,K.vectorTilePath),languageTileUrls:function(e){switch(e){case BMAP_LANGUAGE_ZH:return fx(K.tileDomain,K.vectorTilePath);default:if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){return fx([window._BMapSecurityConfig["serviceHost"]],K.enVectorTilePath)}return fx(K.enTileDomain,K.enVectorTilePath)}},tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,webgl:{minZoom:3,maxZoom:25},zoomLevelBase:18,errorUrl:K.imgPath+"bg.png",bounds:new lz(new d9(-21364736,-11708041.66),new d9(23855104,12474104.17)),imgExtend:"png"},B_SATELLITE_MAP:{tileUrls:[K.urlProtocol+"//"+(ms[0]||"apimaponline0.bdimg.com/starpic/?qt=satepc&"),K.urlProtocol+"//"+(ms[0]||"apimaponline1.bdimg.com/starpic/?qt=satepc&"),K.urlProtocol+"//"+(ms[0]||"apimaponline2.bdimg.com/starpic/?qt=satepc&"),K.urlProtocol+"//"+(ms[0]||"apimaponline3.bdimg.com/starpic/?qt=satepc&"),],tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,zoomLevelBase:18,errorUrl:K.imgPath+"bg.png",bounds:new lz(new d9(-21364736,-10616832),new d9(23855104,15859712)),imgExtend:"png"},B_STREET_MAP:{tileUrls:fx(K.tileDomain,K.rasterTilePath),tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,zoomLevelBase:18,errorUrl:K.imgPath+"bg.png",bounds:new lz(new d9(-21364736,-10616832),new d9(23855104,15859712)),imgExtend:"png"},BMAP_CUSTOM_LAYER:{tileUrls:[""],tileSize:256,baseUnits:256,zoomLevelMin:1,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,zoomLevelBase:18,errorUrl:K.imgPath+"blank.gif",bounds:new lz(new d9(-21364736,-10616832),new d9(23855104,15859712)),imgExtend:"png"},B_EARTH_MAP:{tileUrls:[""],tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,webgl:{minZoom:3,maxZoom:21},zoomLevelBase:18,errorUrl:K.imgPath+"blank.gif",bounds:new lz(new d9(-21364736,-10616832),new d9(23855104,15859712)),imgExtend:"png"},B_NONE_MAP:{tileUrls:"",tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,zoomLevelBase:18,errorUrl:K.imgPath+"bg.png",bounds:new lz(new d9(-21364736,-11708041.66),new d9(23855104,12474104.17)),imgExtend:"png"}};var gA=oB;function at(e,i,C){this._name=e;this._layers=[];if(i){this._layers=i instanceof kT?[i]:(i.slice?i.slice(0):[i])}C=C||{};this._opts={tips:C.tips||"",labelText:C.labelText||"",minZoom:C.minZoom==null?3:C.minZoom,maxZoom:C.maxZoom==null?19:C.maxZoom,tileSize:C.tileSize==null?256:C.tileSize,textColor:C.textColor||"black",errorImageUrl:C.errorImageUrl||"",bounds:C.bounds||new lz(new d9(-21364736,-16023552),new d9(23855104,19431424)),projection:C.projection||new m8()};if(typeof C.id==="string"){this.id=C.id;this.mapTypeId=C.id;this._config=gA&&gA[C.id]?gA[C.id]:null}if(typeof C.compatType==="string"){this.compatType=C.compatType}}hv.extend(at.prototype,{getName:function(){return this._name},getTips:function(){return this._opts.tips},getLabelText:function(){return this._opts.labelText},getTileLayer:function(){return this._layers[0]},getTileLayers:function(){return this._layers},getTileSize:function(){return this._opts.tileSize},getMinZoom:function(){return this._opts.minZoom},getMaxZoom:function(){return this._opts.maxZoom},getTextColor:function(){return this._opts.textColor},getProjection:function(){return this._opts.projection},getErrorImageUrl:function(){return this._opts.errorImageUrl}});function mR(oL,C,e,T){var i=gA&&gA[oL]?gA[oL]:null;T=T||{};var oK={id:oL,compatType:T.compatType||"",tips:e||"",labelText:T.labelText||"",minZoom:i&&i.minZoom!=null?i.minZoom:3,maxZoom:i&&i.maxZoom!=null?i.maxZoom:19,tileSize:i&&i.tileSize!=null?i.tileSize:256,errorImageUrl:i&&i.errorUrl?i.errorUrl:"",bounds:i&&i.bounds?i.bounds.clone?i.bounds.clone():i.bounds:undefined,projection:new m8()};return new at(C,null,oK)}at.builtin={BMAP_NORMAL_MAP:mR("B_NORMAL_MAP","鍦板浘","鏄剧ず鏅�氬湴鍥�",{compatType:"BMAP_NORMAL_MAP"}),BMAP_SATELLITE_MAP:mR("B_SATELLITE_MAP","鍗槦","鏄剧ず鍗槦褰卞儚",{compatType:"BMAP_SATELLITE_MAP"}),BMAP_HYBRID_MAP:mR("B_SATELLITE_MAP","娣峰悎","鏄剧ず甯︽湁琛楅亾鐨勫崼鏄熷奖鍍�",{compatType:"BMAP_HYBRID_MAP",labelText:"璺綉"}),BMAP_EARTH_MAP:mR("B_EARTH_MAP","鍦扮悆","鏄剧ず鍦扮悆",{compatType:"BMAP_EARTH_MAP"}),BMAP_NONE_MAP:mR("B_NONE_MAP","绌虹櫧","鏄剧ず绌虹櫧鍦板浘",{compatType:"BMAP_NONE_MAP"})};function es(oM,oN,C,e,oL){if(oL&&gA[oL]){this.mapTypeName=oL}else{this.mapTypeName=lg}if(oM&&oM instanceof Array){var oK=true;for(var T=0;T<oM.length;T++){if(oM[T] instanceof lz){continue}else{oK=false;break}}oK&&(this.bounds=oM)}if(typeof oN==="number"&&oN>=gA[this.mapTypeName].webgl.minZoom){if(gA[this.mapTypeName].webgl){if(oN>=gA[this.mapTypeName].webgl.minZoom){this.minZoom=oN}else{this.minZoom=gA[this.mapTypeName].webgl.minZoom}}else{if(oN>=gA[this.mapTypeName].minZoom){this.minZoom=oN}else{this.minZoom=gA[this.mapTypeName].minZoom}}}if(typeof C==="number"){if(gA[this.mapTypeName].webgl){if(C<=gA[this.mapTypeName].webgl.maxZoom){this.maxZoom=C}else{this.maxZoom=gA[this.mapTypeName].webgl.maxZoom}}else{if(C<=gA[this.mapTypeName].maxZoom){this.maxZoom=C}else{this.maxZoom=gA[this.mapTypeName].maxZoom}}}if(this.maxZoom<this.minZoom){this.maxZoom=null}if(e&&typeof e==="function"){this.tileUrlFunction=e}}hv.extend(es.prototype,{addBoundary:function(e){if(e instanceof lz){if(this.bounds){this.bounds.push(e)}else{this.bounds=[e]}}},setTileUrlFunction:function(e){if(e&&typeof e==="function"){this.tileUrlFunction=e}},crossPoint:function(e,T,oK){if(oK<this.minZoom||oK>this.maxZoom){return false}var oL=this.containsPoint(e,oK);if(oL){return oL}for(var C=0;C<this.bounds.length;C++){if(this.bounds[C].intersects(T)){oL=true;break}}return oL},containsPoint:function(e,T){if(!e||!(e instanceof d9)||!this.isValid()){return false}var oK=false;if(T<this.minZoom||T>this.maxZoom){return oK}for(var C=0;C<this.bounds.length;C++){if(this.bounds[C].containsPoint(e)){oK=true;break}}return oK},isValid:function(){return this.bounds&&this.minZoom&&this.maxZoom&&this.tileUrlFunction},toString:function(){return"PrivateRegionDataModel"}});function lh(oO,i,oK,C,T){this.mgr=oO;this.position=oK;this._cbks=[];this.name=oO.getTileName(C,T,oO.map.config.style);this.info=C;this._transparentPng=T.isTransparentPng();var oP=da("img");lC(oP);oP.galleryImg=false;var oN=oP.style;oN.position="absolute";oN.width=oO.tileSize+"px";oN.height=oO.tileSize+"px";oN.left=oK[0]+"px";oN.top=oK[1]+"px";this.img=oP;this.src=i;if(g3&&oK._offsetX===0){oN.opacity=0;oN.willChange="opacity"}var oM=this;this.img.onload=function(oX){if(!oM.mgr){return}var oS=oM.mgr;var oQ=oS.bufferTiles;if(oS.bufferNumber>0){oQ[oM.name]=oM;oQ.push(oM.name)}var oU=oQ.length-oS.bufferNumber;for(var oV=0;oU>0&&oV<oQ.length;oV++){var oW=oQ[oV];if(!oS.mapTiles[oW]){if(oQ[oW]){oQ[oW].mgr=null;var oT=oQ[oW].img;if(oT.parentNode){l5(oT);oT.parentNode.removeChild(oT)}oT=null;oQ[oW].img=null;oQ[oW]=null;delete oQ[oW]}oQ.splice(oV,1);oV--;oU--}}oM.loaded=true;oS.imgNumber++;if(!bx(oM.img)){if(T.tilesDiv){T.tilesDiv.appendChild(oM.img)}}var oX=new ix("onimagechange");oX.action="show";oX.tile=oM.name;oS.map.dispatchEvent(oX);if(g3&&oK._offsetX===0){var oR=new ij({fps:10,duration:300,render:function(e){if(oM.img&&oM.img.style){oM.img.style.opacity=e*1}},finish:function(){if(oM.img&&oM.img.style){delete oM.img.style.opacity;oM.img.style.willChange="auto"}}})}oM._callCbks()};this.img.onerror=function(oS){oM.error=true;oM._callCbks();if(!oM.mgr){return}var oQ=oM.mgr;var oR=gA[T.mapType];if(oR&&oR.errorUrl){oM.img.src=oR.errorUrl}if(!bx(oM.img)){if(T.tilesDiv){T.tilesDiv.appendChild(oM.img)}}};oP=null;var oL=new ix("onimagebefore");oL.tile=oM.name;oO.map.dispatchEvent(oL)}lh.prototype._addLoadCbk=function(e){this._cbks.push(e)};lh.prototype._load=function(){if(FeBrowser.ie<=6&&FeBrowser.ie>0&&this._transparentPng){this.img.src=K.imgPath+"blank.gif"}else{this.img.src=this.src}};lh.prototype._callCbks=function(){var C=this;for(var e=0;e<C._cbks.length;e++){C._cbks[e]()}C._cbks.length=0};var g3=(!hv.Browser.ie||hv.Browser.ie>8);function nh(e){this.tileLayers=[];this.map=e;this.bufferNumber=300;this.mapTiles=[];this.bufferTiles=[];this.config=gA[this.map.mapType];this.errorUrl=this.config.errorUrl;this.tileSize=this.config.tileSize;this.baseUnits=this.config.baseUnits;this.baseZoomLevel=this.config.zoomLevelBase;this.tileURLs=this.config.tileUrls;this.imgNumber=0;this.numLoading=0;this.temp={}}cv.register(function(i){if(i._renderType==="webgl"){return}var e=i.tileMgr=new nh(i);i.addEventListener("mousewheel",function(C){e.mouseWheel(C)});i.addEventListener("dblclick",function(C){e.dblClick(C)});i.addEventListener("rightdblclick",function(C){e.dblClick(C)});i.addEventListener("minuspress",function(C){e.keypress(C)});i.addEventListener("pluspress",function(C){e.keypress(C)});i.addEventListener("load",function(C){if(this.mapType===c1){return}e.loadTiles()});i.addEventListener("zoomstartcode",function(C){if(this.mapType===c1){return}e._zoom(C)});i.addEventListener("moving",function(C){if(this.mapType===c1){return}e.moveGridTiles()});i.addEventListener("resize",function(C){if(this.mapType===c1){return}e.resizeMap(C)});i.addEventListener("addtilelayer",function(C){e.addTileLayer(C)});i.addEventListener("removetilelayer",function(C){e.removeTileLayer(C)})});hv.extend(nh.prototype,{addTileLayer:function(T){var C=this;var i=T.target;C.tileLayers.push(i);if(C.map.loaded){C.moveGridTiles()}},removeTileLayer:function(oQ){var oR=this;var oO=oQ.target;var oM=oO.mapType;var oL=oR.mapTiles;var oT=oR.bufferTiles;for(var C in oT){var T=C.split("-")[1];if(T==oM){delete oT[C]}}for(var C in oL){var T=C.split("-")[1];if(T==oM){delete oL[C]}}if(oR.zoomsDiv&&oR.zoomsDiv.parentNode){oR.zoomsDiv.parentNode.removeChild(oR.zoomsDiv);oR.zoomsDiv.innerHTML=""}var oK=oR.map;if(oK.deepZoom){var oS=oK.deepZoom.preDeepZoomDiv;if(oS&&oS.parentNode){oS.parentNode.removeChild(oS)}}for(var oP=0,oN=oR.tileLayers.length;oP<oN;oP++){if(oO==oR.tileLayers[oP]){oR.tileLayers.splice(oP,1)}}oR.moveGridTiles()},hideDeepZoomDiv:function(){var i=this,C=i.map;if(C.deepZoom){var e=C.deepZoom.preDeepZoomDiv;if(e&&e.style.display!="none"){e.style.display="none"}}},getTileLayer:function(oK){var T=this;for(var C=0,e=T.tileLayers.length;C<e;C++){tilelayer=T.tileLayers[C];if(tilelayer.mapType==oK){return tilelayer}}return null},_zoom:function(C){var i=this;if(i.zoomsDiv&&i.zoomsDiv.style.display!="none"){i.zoomsDiv.style.display="none"}i.hideDeepZoomDiv();i.moveGridTiles()},resizeMap:function(i){this.loaded=false;this.moveGridTiles()},_checkTilesLoaded:function(){this.numLoading--;var e=this;if(this.numLoading==0){if(this._checkLoadedTimer){clearTimeout(this._checkLoadedTimer);this._checkLoadedTimer=null}this._checkLoadedTimer=setTimeout(function(){if(e.numLoading==0){if(!K.apiVersionIsGL()&&!e.map._firstTileLoadedFired){e.map._firstTileLoadedFired=true;e.map.dispatchEvent(new ix("onfirsttileloaded"));e.map.dispatchEvent(new ix("onfirsttilesloaded"))}e.map.dispatchEvent(new ix("ontilesloaded"))}e._checkLoadedTimer=null},80)}},getTileName:function(e,C,i){var oK=C.mapType;var T="TILE-"+oK+"-"+i+"-"+e[0]+"-"+e[1]+"-"+e[2];return T},hideTile:function(T,C){var i=T.img;if(bx(i)){if(T.loaded){this.imgNumber--}if(i.parentNode){l5(i);i.parentNode.removeChild(i)}}var oK=new ix("onimagechange");oK.tile=this.getTileName(T.info,C,this.map.config.style);oK.action="hide";delete this.mapTiles[T.name];if(!T.loaded){l5(i);T._callCbks();i=null;T.img=null;T.mgr=null}this.map.dispatchEvent(oK)},loadTiles:function(){var i=this;if(hv.Browser.ie){try{document.execCommand("BackgroundImageCache",false,true)}catch(C){}}if(this.zoomsDiv&&this.zoomsDiv.style.display!="none"){this.zoomsDiv.style.display="none"}i.hideDeepZoomDiv();i.moveGridTiles()},getCell:function(oK,T){var e=this.baseUnits*Math.pow(2,(this.baseZoomLevel-T));var C=parseInt(oK.lng/e);var i=parseInt(oK.lat/e);return[C,i,e*(C+0.5),e*(i+0.5)]},moveGridTiles:function(){var oX=this.map,o6=oX.getMapTypeId(),o4=this.tileLayers.length;var o2=oX.centerPoint;if(o6!==j9){o2=hz.calcLoopCenterPoint(o2)}var oO=oX.width;var pi=oX.getZoomUnits();var o3=pi*oO;var o8=o2.lng-o3/2;var oT=o2.lng+o3/2;var oW=hz.isAddWidth(o8,oT);for(var pa=0;pa<o4;pa++){var oK=this.tileLayers[pa];if(oK.baseLayer||o4==1){this.tilesDiv=oK.tilesDiv}var oY=gA[oK.mapType];var T=oX.zoomLevel;var pd=oX.getZoomUnits(oX.zoomLevel);var oS=oY.baseUnits*Math.pow(2,(oY.zoomLevelBase-T));var oQ=Math.floor(o2.lng/oS);var o9=Math.floor(o2.lat/oS);var oV=oY.tileSize;var oZ=[oQ,o9,(o2.lng-oQ*oS)/oS*oV,(o2.lat-o9*oS)/oS*oV];var oR=oW?oX.width/2*1.5:oX.width/2;var oU=oZ[0]-Math.ceil((oR-oZ[2])/oV);var ph=oZ[1]-Math.ceil((oX.height/2-oZ[3])/oV);var pb=oZ[0]+Math.ceil((oR+oZ[2])/oV);var o0=oZ[1]+Math.ceil((oX.height/2+oZ[3])/oV);var oP=[];for(var pf=oU;pf<pb;pf++){for(var pe=ph;pe<o0;pe++){oP.push([pf,pe]);var o5="id_"+pf+"_"+pe+"_"+T;oP[o5]=true}}if(oK.mapType!==j9){oP=hz.calcLoopTiles(oP,T)}oP.sort((function(i){return function(pk,pl){return((0.4*Math.abs(pk[0]-i[0])+0.6*Math.abs(pk[1]-i[1]))-(0.4*Math.abs(pl[0]-i[0])+0.6*Math.abs(pl[1]-i[1])))}})([oZ[0],oZ[1]]));var C=this.mapTiles;var e=-o2.lng/pd;var pj=o2.lat/pd;var o7=[e,pj];for(var o1 in C){var oM=C[o1];var pg=oM.info;if(!pg){continue}var o5="id_"+pg[0]+"_"+pg[1]+"_"+pg[2];if(!oP[o5]){this.hideTile(oM,oK)}}var oL=-oX.offsetX+oX.width/2;var oN=-oX.offsetY+oX.height/2;oK.tilesDiv.style.left=Math.round(e+oL)-o7[0]+"px";oK.tilesDiv.style.top=Math.round(pj+oN)-o7[1]+"px";this.numLoading+=oP.length;for(var pf=0,pc=oP.length;pf<pc;pf++){this.showTile([oP[pf][0],oP[pf][1],oX.zoomLevel],o7,oK,pf,oX.config.style)}}},showTile:function(oM,oL,oP,oU){this.centerPos=oL;var oN=gA[oP.mapType];var oQ=this.map.config.style;var T=this.getTileName(oM,oP,oQ);var oK=(oM[0]*oN.tileSize)+oL[0];var C=(-1-oM[1])*oN.tileSize+oL[1];var oT=[oK,C];var oO=null;if(oP.mapType!==j9){oO=hz.calcLoopParam(oM[0],oM[2]);var oS=oO.offsetX;oT[0]+=oS;oT._offsetX=oS}var oX=this;var oW=this.mapTiles[T];if(oW){oW.img.style.left=oT[0]+"px";oW.img.style.top=oT[1]+"px";if(oW.loaded){this._checkTilesLoaded()}else{oW._addLoadCbk(function(){oX._checkTilesLoaded()})}return}oW=this.bufferTiles[T];if(oW){this.imgNumber++;oP.tilesDiv.insertBefore(oW.img,oP.tilesDiv.lastChild);this.mapTiles[T]=oW;oW.img.style.left=oT[0]+"px";oW.img.style.top=oT[1]+"px";if(oW.loaded){this._checkTilesLoaded()}else{oW._addLoadCbk(function(){oX._checkTilesLoaded()})}var oV=new ix("onimagechange");oV.action="cache";oV.tile=this.getTileName(oM,oP,oQ);this.map.dispatchEvent(oV)}else{var oR=new hV(oM[0],oM[1]);if(oO){oR.x=oO.col}var i=oP.getTilesUrl(oR,oM[2]);oW=new lh(this,i,oT,oM,oP);oW._addLoadCbk(function(){oX._checkTilesLoaded()});oW._load();this.mapTiles[T]=oW;kB(this.map)}},mouseWheel:function(oN){var oM=this.map;if(!oM.config.enableWheelZoom){return}var oO=oM.zoomLevel+(oN.trend===true?1:-1);var oK=oM._getProperZoom(oO);if(oK.exceeded){var C=new ix("onzoomexceeded");C.targetZoom=oO;oM.dispatchEvent(C);return}oM.dispatchEvent(new ix("onzoomstart"));oM.lastLevel=oM.zoomLevel;oM.zoomLevel=oK.zoom;var i=oN.pixel;var T=oM.pixelToPointIn(i,{zoom:oM.lastLevel});var oL=oM.getZoomUnits(oM.zoomLevel);oM.centerPoint=new d9(T.lng+oL*(oM.width/2-i.x),T.lat-oL*(oM.height/2-i.y));this.zoom(i)},dblClick:function(C){var i=this.map;if(!i.config.enableDblclickZoom){return}if(i.mapType===c1){return}if(i.currentOperation===gp.dragging){return}if(C.type=="onrightdblclick"){i.zoomOut(C.pointMC)}else{i.zoomIn(C.pointMC)}},keypress:function(C){var i=this.map;if(i.getMapTypeId()===c1){return}C.type=="onpluspress"?i.zoomIn():i.zoomOut()}});function kT(T){this.opts=T||{};this.copyright=this.opts.copyright||{};this.transparentPng=this.opts.transparentPng||false;this.png8=this.opts.png8||false;this.height=this.opts.height||0;this.opacity=this.opts.opacity||1;this.pack=this.opts.pack||false;this.baseLayer=this.opts.baseLayer||false;this.dataType=this.opts.dataType||1;this.transform=this.opts.transform||0;this.spanLevel=this.opts.spanLevel||0;this.isFlat=!this.opts.isFlat?false:true;this.showLabel=this.opts.showLabel===false?false:true;var e=this.opts.tileTypeName||"web";this.tileType=lA.getInstance(e);this.clipTile=this.opts.clipTile||false;this._type="tilelayer";this.isTop=this.opts.isTop||false;var i=c9()?128:256;this.cacheSize=this.opts.cacheSize||i;var C=this;this.tileCache=new a1(this.cacheSize,{clearCallback:function(oK){if(oK.label){if(oK.label.textImageBitmap){oK.label.textImageBitmap.close()}if(oK.label.indoorTextImageBitmap){oK.label.indoorTextImageBitmap.close()}}if(C._removeIndoorData){C._removeIndoorData(oK)}}});this.scaler=ja()>=1.5?2:1;this.normalUdt=oe("ditu","normal").udt;this.numLoading=0;this.numTileLoading=0;this.firstTileLoad=false;this.retry=this.opts.retry||false;this.retryTime=this.opts.retryTime||600;this.useThumbData=false;this.useThumbData=this.opts.useThumbData||false;this.thumbUpsample=this.opts.thumbUpsample||false;this.preciseVertex=this.opts.preciseVertex||false;if(this.baseLayer){this.useThumbData=true}if(typeof this.opts.customLayer==="boolean"){this.customLayer=this.opts.customLayer}else{this.customLayer=true}this.tileLoadFunction=this.opts.tileLoadFunction}kT.inherits(eX,"TileLayer");kT.prototype.isTileLayer=true;hv.extend(kT.prototype,{isTransparentPng:function(){return this.transparentPng},getTilesUrl:function(oR,e){var oQ=mH(this.mapType);var C=gA[oQ];if(typeof C!=="object"){return null}var T=oR.x;var oS=oR.y;T=hz.calcLoopParam(T,e).col;var i="";if(this.opts.tileUrlTemplate){i=this.opts.tileUrlTemplate;i=i.replace(/\{X\}/,oS);i=i.replace(/\{Y\}/,T);i=i.replace(/\{Z\}/,e)}else{if(oQ===lg){var oP=this.isCanvasMap?0:1;var oL=C.tileUrls[Math.abs(oS+T)%C.tileUrls.length];if(window.offLineIPAddress){oL=window.offLineIPAddress+"tile5/"}var oK=this.map.config.style;i=oL+"?qt=vtile&x="+T+"&y="+oS+"&z="+e+(oK==="default"?"":("&styleId=1"))+"&styles=pl&udt="+this.normalUdt+"&scaler="+this.scaler+"&showtext="+oP+"&ak="+hj+"&is_has_bmap_proxy="+k1+"&from=gl";i=i.replace(/-(\d+)/gi,"M$1")}if(oQ===j9){var oM=oe("ditu","satellite");var oO=oM.ver;var oN=oM.udt;i=C.tileUrls[Math.abs(oS+T)%C.tileUrls.length]+"u=x="+T+";y="+oS+";z="+e+";v="+oO+";type=sate&fm=46&udt="+oN;i=i.replace(/-(\d+)/gi,"M$1")}}return i},initialize:function(oM){this.map=oM;if(oM._renderType==="webgl"){var oL=null;if(this.customLayer!==false){oL=this.getTilesUrl}hv.extend(this,hQ);this.labelProcessor=new na(this);this.callbackDataQueue=[];if(oL){this.getTilesUrl=oL}var C=this;oM.on("indoor_data_refresh",function(oN){if(!C.baseLayer){return}C._refreshIndoorData(oN.uid,oN.floor)});oM.on("custom_labels_ready",function(oN){if(C.mapType!==lg&&oN.model==="custom"){return}if((oN.model==="custom")||oN.model==="mvt_"+C.drawIndex){C._doWorkAfterLabelImageLoad(oN.virtualTile,oN.labelCanvas,null,oN.imgKey)}});oM.on("glmoduleloaded",function(){if(!C.baseLayer){return}C.updateAllIconsTextureCoords()});oM.on("layer_update",function(oO){if(C.dataType===2&&oM.customLoaded&&oM.areaCustomLoaded){var oN=new ix("onlayer_clear");oM.fire(oN)}});oM.on("layer_clear",function(oN){if(C.dataType===2){C.clearCache()}});if(this.ontology&&this.ontology._initEvent){this.ontology._initEvent(oM)}}if(!oM.temp.layerZIndex){oM.temp.layerZIndex=0}this.zIndex=this.zIndex||1;if(oM.getRenderType()==="dom"){this.zIndex=oM.tileMgr.tileLayers.length}else{if(this.baseLayer){this.zIndex=0}else{if(this.zIndex>0){this.adjustZIndex()}else{var e=oM._featureMgr.result.bkData;this.zIndex=e.length||1}}}if(!oM.temp.layid){oM.temp.layid=0}if(!this.opts.mapType){this.mapType="BMAP_CUSTOM_LAYER_"+oM.temp.layid;oM.temp.layid++}else{this.mapType=mH(this.opts.mapType)}var T=gA[this.mapType];if(!T){gA[this.mapType]={tileUrls:[],tileSize:256,baseUnits:256,zoomLevelMin:1,zoomLevelMax:19,minZoom:3,maxZoom:19,minDataZoom:3,maxDataZoom:19,zoomLevelBase:18,errorUrl:K.imgPath+"/blank.gif",bounds:new lz(new d9(-21364736,-10616832),new d9(23855104,15859712)),imgExtend:"png"}}if(oM._renderType!=="webgl"){var oK=cQ(oM.platform,'<div style="position:absolute;z-index:'+this.zIndex+'"></div>');oK.style.display="";oK.style.left=Math.ceil(-oM.offsetX+oM.width/2)+"px";oK.style.top=Math.ceil(-oM.offsetY+oM.height/2)+"px";this.tilesDiv=oK}this.isCanvasMap=oM.isCanvasMap();this.lastZoom=oM.getZoom();var i=this;this.addEventListener("initDrawData",function(oN){if(i.opts.boundary){i.addBoundary(i.opts.boundary)}});oM.on("destroy",function(){i.destroy()})},clearCache:function(){this.tileCache.clear();this.map._featureMgr.clearData(this.drawIndex);this.map._featureMgr.setLabelData([],this.drawIndex);this.map._featureMgr.clearLabelOverlayData(this.drawIndex);this.labelProcessor.iconCache.clear()},remove:function(){if(this.tilesDiv&&this.tilesDiv.parentNode){this.tilesDiv.innerHTML="";this.tilesDiv.parentNode.removeChild(this.tilesDiv)}delete this.tilesDiv},getCopyright:function(){return this.copyright},getMapType:function(){return this.mapType},adjustZIndex:function(){if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;while(e[this.zIndex]){this.zIndex+=1}}},_getAdjoinZIndex:function(oK){var C=this.zIndex;if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;if(oK==="up"){for(var T=this.zIndex+1;T<e.length;T++){if(e[T]){C=T+1;break}}}else{for(var T=this.zIndex-1;T>0;T--){if(e[T]){C=T;break}}}}return C},setZIndex:function(e){this.setTargetZIndex(e)},setTargetZIndex:function(e){this.removeLabel&&this.removeLabel(this.zIndex);this.zIndex=e;this.drawIndex=e;if(this.tilesDiv){this.tilesDiv.style.zIndex=e}},calcLoopParam:function(e,i){return hz.calcLoopParam(e,i)},addBoundary:function(oL){if(!oL||!this.map){return}if(typeof oL==="string"){oL=[oL]}for(var T=0;T<oL.length;T++){var C=new BMapGL.Polygon(oL[T]);if(C&&c2(C._i)){var oK=new ix("onbeforeaddoverlay",C);oK.overlay=C;oK.isLayerMask=true;this.map.dispatchEvent(oK);C._i(this.map);if(this.boundary){this.boundary.push(C)}else{this.boundary=[C]}}}this.updateBoundary()},clearBoundary:function(){this.boundary=false;this.updateBoundary()},updateBoundary:function(){if(this.boundary===undefined||!this.map){return}var i=this.map._featureMgr.result.bkData;if(i[this.zIndex]){i[this.zIndex].showRegion=this.opts.showRegion;i[this.zIndex].boundary=this.boundary;this.map.dispatchEvent(new ix("onrefresh"));if(this.boundary===false){var C=new ix("onremoveLayerMask");C.hasLayerBoundary=this.map._featureMgr.hasLayerBoundary();this.map.dispatchEvent(C)}}},destroy:function(){if(this.collisionTimer){clearTimeout(this.collisionTimer);this.collisionTimer=null}if(this._collisionTimer){clearTimeout(this._collisionTimer);this._collisionTimer=null}this.copyright=null;this.clearCache();if(this.hashCode){this.decontrol()}},setTop:function(e){this.isTop=!!e;if(this.map){this.map._featureMgr.updateLayerMeta(this.zIndex,{isTop:this.isTop});this.map.dispatchEvent(new ix("onupdate"))}},setLowText:function(e){this.isLowText=!!e;if(this.map){this.map._featureMgr.updateLayerMeta(this.zIndex,{isLowText:this.isLowText});this.map.dispatchEvent(new ix("onupdate"))}},});function q(i,e,C){if(!K.apiVersionIsGL()){this.id=arguments[0];this.bounds=arguments[1];this.content=arguments[2];this.mapType=arguments[3];return this}this.bounds=i;this.content=e;this.mapType=C}q.inherits(eX,"Copyright");var gK={get:function(e){if(!gK.singleton){gK.singleton=new iZ(e)}return gK.singleton}};function iZ(i){this._map=i;this._tileMgr=i.tileMgr;this._animationDiv=null;this._preAnimationDiv=null;this._animation=null;this._baseLayerDiv=null;this._transformStyleName=eV.ifSupportCSS3("transform",true);this._transformOriginStyleName=eV.ifSupportCSS3("transformOrigin",true);this._preZoomTimes=1;this._preRenderTick=1;this._enableCanvas2dMap=!!(i.getRenderType()==="canvas");this._isIE9=!!(hv.Browser.ie===9);var e=this;i.addEventListener("maptypechange",function(){e.hide()});i.addEventListener("load",function(){e.hide()})}hv.extend(iZ.prototype,{prepareLayer:function(){var T=this._map;var e=this._tileMgr;this._canvas2dMapMgr=T.canvas2dMapMgr;var C=this._baseLayerDiv=e.tilesDiv;if(!this._animationDiv){var i=this._preAnimationDiv;if(i){i.parentNode&&i.parentNode.removeChild(i);this._preAnimationDiv=null}this._preAnimationDiv=this._animationDiv=C.cloneNode(true);T.platform.insertBefore(this._animationDiv,T.platform.firstChild)}this.show()},prepareAniParam:function(){var T=this._animationDiv;if(!T){return}var e=T.children.length;var C;this._zoomAniInfo=[];for(var oK=e-1;oK>-1;oK--){var oL={};C=T.children[oK].style;oL.top=parseInt(C.top,10);oL.left=parseInt(C.left,10);this._zoomAniInfo[oK]=oL}},prepareLabelLayer:function(){var oK=this._map;if(this._enableCanvas2dMap&&oK.canvas2dMapMgr){if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.parentNode.removeChild(this.touchZoomLabelCanvas)}var i=oK.canvas2dMapMgr._labelCanvas;this.touchZoomLabelCanvas=i.cloneNode(false);var e=this.touchZoomLabelCanvas.getContext("2d");e.drawImage(i,0,0);oK.platform.insertBefore(this.touchZoomLabelCanvas,oK.platform.firstChild);var T=parseInt(i.style.left,10);var C=parseInt(i.style.top,10);this.touchZoomLabelCanvas.style.zIndex=9;this.touchZoomLabelCanvas.style[this._transformOriginStyleName]=(this._fixPosition.x-(oK.offsetX+T))+"px "+(this._fixPosition.y-(oK.offsetY+C))+"px";i.style.visibility="hidden"}},show:function(){if(this._animationDiv){this._animationDiv.style.visibility=""}},showLabel:function(){var i=this._map;if(this._enableCanvas2dMap&&i.canvas2dMapMgr){var e=i.canvas2dMapMgr._labelCanvas;if(e){e.style.visibility=""}if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.style.zIndex=-2;this.touchZoomLabelCanvas.style.visibility="hidden"}}},hide:function(){if(this._animationDiv){this._animationDiv.style.visibility="hidden"}if(this._preAnimationDiv){this._preAnimationDiv.style.visibility="hidden"}},hideNonAnimationLayers:function(){var T=this._map;if(T.getRenderType()==="dom"){if(T.overlayDiv){T.overlayDiv.style.visibility="hidden"}if(T.overlayDivEx){T.overlayDivEx.style.visibility="hidden"}}var oL=T.tileMgr.tileLayers;var oK;for(var C=0,e=oL.length;C<e;C++){oK=oL[C];oK.tilesDiv.style.visibility="hidden"}},showNonAnimationLayers:function(){var T=this._map;if(T.getRenderType()==="dom"){if(T.overlayDiv){T.overlayDiv.style.visibility=""}if(T.overlayDivEx){T.overlayDivEx.style.visibility=""}}var oL=T.tileMgr.tileLayers;var oK;for(var C=0,e=oL.length;C<e;C++){oK=oL[C];oK.tilesDiv.style.visibility=""}},setFixPosition:function(e){this._fixPosition=e},setZoom:function(e,oP){var oM=this._fixPosition;var oV=this._map;var oW=this._baseLayerDiv;var oN={x:oM.x-parseInt(oW.style.left,10)-oV.offsetX,y:oM.y-parseInt(oW.style.top,10)-oV.offsetY};var T=this._animationDiv;if(!T){return}var oT=T.children.length;var oR;var oU=this._transformStyleName;var oL=this._transformOriginStyleName;var oX=this;var oZ;var oO;for(var oS=oT-1;oS>-1;oS--){var oQ=this._zoomAniInfo[oS];oR=T.children[oS].style;var oK=oQ.left-oN.x;var C=oQ.top-oN.y;oQ.dx=oK*e-oK;oQ.dy=C*e-C;oQ.preDx=oK-oK;oQ.preDy=C-C;oZ=oQ.preDx+(oQ.dx-oQ.preDx);oO=oQ.preDy+(oQ.dy-oQ.preDy)+oP;oR.left=oQ.left+oZ+"px";oR.top=oQ.top+oO+"px";oR.width=oR.height=256*e+"px"}if(this._enableCanvas2dMap){var oY=!oX._isIE9?"translate3d(0px, "+oP+"px, 0) scale("+e+")":"translate(0px, "+oP+"px) scale("+e+")";this.touchZoomLabelCanvas.style[oU]=oY}},setZoomFinish:function(){this._animationDiv=null},startAnimation:function(oM){this.prepareLayer();this.hideNonAnimationLayers();var o5=this._map;if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.style.display="none"}oM=oM||{};var o3=oM.zoomCount||0;var oR=oM.fixPosition;var o1=oM.fixMCPosition;var oP=oM.pixOffset;this._zoomCount=o3;var T=o5.getZoom();var o4=T+o3;var e=o5.config.enableContinuousZoom;var oV=0.5;var oQ=5;var C=Math.pow(2,o3);var o7=this._baseLayerDiv;var oS={x:oR.x-parseInt(o7.style.left,10)-o5.offsetX,y:oR.y-parseInt(o7.style.top,10)-o5.offsetY};var oN=this._animationDiv;var oZ=oN.children.length;var o9=this._preZoomTimes;var o2=[];var o0=this._transformStyleName;var oO=this._transformOriginStyleName;for(var oY=oZ-1;oY>-1;oY--){var oW={};var oX=oN.children[oY].style;oW.top=parseInt(oX.top,10);oW.left=parseInt(oX.left,10);var oL=oW.left-oS.x;var oK=oW.top-oS.y;oW.dx=oL*C-oL;oW.dy=oK*C-oK;oW.preDx=oL*o9-oL;oW.preDy=oK*o9-oK;o2[oY]=oW}var o6=this;var oU;var o8;var oT;this._zoomAni=new ij({fps:60,duration:e?500:1,transition:function(i){i=i*oQ/(2*oV);return oQ*i-oV*i*i},render:function(pi){pi=pi*(4*oV)/(oQ*oQ);oU=o9+pi*(C-o9);var pb=T+v(oU);var pg=null;var pf=0;var pj=0;if(oM.onAnimationBeforeLooping){var pk=oM.onAnimationBeforeLooping(pi,pb);pg=pk.loopingCenter;pf=pk.yDiff;pj=pk.totalYDiff}for(var pc=o2.length-1;pc>-1;pc--){var pd=o2[pc];if(oN.children[pc]){var ph=oN.children[pc].style;o8=pd.preDx+(pd.dx-pd.preDx)*pi-oP.width*pi;oT=pd.preDy+(pd.dy-pd.preDy)*pi-oP.height*pi+pf;ph.left=pd.left+o8+"px";ph.top=pd.top+oT+"px";ph.height=ph.width=256*oU+"px"}}var pa=oP.width*pi;var pe=oP.height*pi;if(o5.isRestrict){o6._enableCanvas2dMap&&o6._canvas2dMapMgr.clearLabel()}else{o6._enableCanvas2dMap&&o6._canvas2dMapMgr.drawLabel(oU,oR,T,o4,o3,pi,pa,pe,pj,pf)}o6._preZoomTimes=oU;o6._preRenderTick=pi;oM.onAnimationLooping&&oM.onAnimationLooping(pi,pb,pg)},finish:function(){o6._preZoomTimes=1;o6._zoomAni=null;o6._animationDiv=null;oM.onAnimationFinish&&oM.onAnimationFinish();o6.showNonAnimationLayers()}});return this._zoomAni},stopAnimation:function(){if(this._zoomAni){this._zoomAni.stop();this._zoomAni=null}}});function oH(e){this._initVars(e);this._initColorCanvas();this._bindEvent(e)}hv.extend(oH.prototype,{_initVars:function(e){this._map=e._map;this._canvas2dMapMgr=e;this._labelCtx=e._labelCtx;this.ratio=this._map.config.ratio;this.sizeRatio=this.ratio>1?2:1;this.RANK1=1000000;this.RANK2=2000000;this.RANK3=3000000;this.RANK4=4000000;this.RANK5=5000000},_initColorCanvas:function(){var i=256,C=da("canvas"),e=C.style;e.width=i+"px";e.height=i+"px";C.width=i;C.height=i;this._colorCvsSize=i;this._colorCvs=C;this._colorCtx=C.getContext("2d")},getLabelImageData:function(oW){var oV=oW.textImg;var C=oW.textPos;var oT=this.ratio;var oR=this.sizeRatio/oT;var oK=this._colorCtx;var oO=this._colorCvsSize;oK.clearRect(0,0,oO,oO);var oQ=0;var e=0;var oN=0;for(var oP=0;oP<C.length;oP++){if(C[oP].width>oQ){oQ=C[oP].width;e=oP;oN=C[oP].drawX}}oQ/=oR;var oS=0;for(var oP=0,oM=C.length;oP<oM;oP++){var oU=C[oP];var oX;if(oP===e){oX=0}else{oX=oU.drawX-oN}oK.drawImage(oV,oU.srcX,oU.srcY,oU.width,oU.height,oX,oS,oU.width/oR,oU.height/oR);if(oU.width/oR>oQ){oQ=oU.width/oR}oS+=oU.height/oR+2*oT}var T=oK.getImageData(0,0,oQ,oS);var oL=oK.getImageData(0,0,oQ,oS);return[T,oL]},_bindEvent:function(i){var e=this,C=i._map;C.addEventListener("onspotmouseover",function(oM){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver||this.config.enableIconHighlight===false){return}if(oM.spots.length>0){var oL=oM.spots[0].userdata.uid;var oK=oM.spots[0].userdata.name;var T=e.findLabelByUid(oL,oK);T&&e._toHighLightColor(T)}});C.addEventListener("onspotmouseout",function(oM){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(oM.spots.length>0){var oL=oM.spots[0].userdata.uid;var oK=oM.spots[0].userdata.name;var T=e.findLabelByUid(oL,oK);T&&e._toDefaultColor(T)}});C.addEventListener("onspotclick",function(oM){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(oM.spots&&oM.spots.length>0){var oL=oM.spots[0].userdata.uid;var oK=oM.spots[0].userdata.name;var T=e.findLabelByUid(oL,oK);T&&e._changeBaseMapState(T)}else{e._recoverNormalState()}});C.on("spot_status_reset",function(){e._recoverNormalState()});C.on("spot_highlight",function(oK){var T=e.findLabelByUid(oK.uid);T&&e._changeBaseMapState(T)})},_getTextBound:function(oU){if(!oU.textPos){return null}var oS=this.ratio;var oQ=this.sizeRatio/oS;var C=oU.textPos;var oT=oU.baseDrawX;var oR=oU.baseDrawY;var oO=oT*oS+(C[0].drawX-oT)/oQ;var oM=oR*oS+(C[0].drawY-oR)/oQ;var oK=oO+C[0].width/oQ;var e=oM+C[0].height/oQ;for(var oP=0,oN=C.length;oP<oN;oP++){var oV=C[oP];var oL=oT*oS+(oV.drawX-oT)/oQ;if(oL<oO){oO=oL}var T=oR*oS+(oV.drawY-oR)/oQ;if(T<oM){oM=T}if(oL+oV.width>oK){oK=oL+oV.width}if(T+oV.height>e){e=T+oV.height}}return[oO,oM,oK,e]},_toHighLightColor:function(C){if(C._tempRank&&C._tempRank==this.RANK5){return}var oN=this._getTextBound(C);if(!oN){return}var T=Math.round(oN[0]);var i=Math.round(oN[1]);var e=this.getLabelImageData(C);var oL=e[0];var oK=e[1];var oM=this._canvas2dMapMgr.getFilterImageData(oL,this.RANK5);C._oldImgData=oK;this._labelCtx.putImageData(oM,T,i)},_toDefaultColor:function(e){if(e._tempRank&&e._tempRank==this.RANK5){return}if(e._oldImgData){var i=this.sizeRatio;var C=this._getTextBound(e);if(!C){return}this._labelCtx.putImageData(e._oldImgData,Math.round(C[0]),Math.round(C[1]));e._oldImgData=null}},_changeBaseMapState:function(T){var C=this._canvas2dMapMgr;var i=T.guid;var e=T.guidExt;var oK={guid:i,name:T.name,guidExt:e};C._labelStrategy.setStrategyInfo(oK);C._loadData()},_recoverNormalState:function(){var e=this._canvas2dMapMgr;e._labelStrategy.setStrategyInfo(null);e._loadData()},findLabelByUid:function(oL,T){var oN=this._canvas2dMapMgr,e=oN._computedLabel;for(var oK=0,C=e.length;oK<C;oK++){var oM=e[oK];if(!oN.isClickableLabel(oM)){continue}if(oL&&oM.guid===oL){return oM}if(T&&oM.name===T){return oM}}return null}});function Q(e){this._initVars(e)}hv.extend(Q.prototype,{_initVars:function(e){this._map=e._map;this._canvas2dMapMgr=e;this.ratio=this._map.config.ratio;this._strategyInfo=null;this.RANK1=1000000;this.RANK2=2000000;this.RANK3=3000000;this.RANK4=4000000;this.RANK5=5000000},setStrategyInfo:function(e){this._strategyInfo=e},preComputeLabel:function(oP,pG,pp,o1,pA,pU){var pj=[],oX=oP._centerX,oV=oP._centerY,pV=o1*pA;var pv=this.ratio;var oO=this._map.getZoom();var pe=0;if(oO===5){pe=4}if(oO===8){pe=-6}oP.sort(function(pW,i){if(pW.x*pW.y<i.x*i.y){return -1}else{return 1}});for(var pg=0,pc=oP.length;pg<pc;pg++){var pL=oP[pg],o7=pL.x,o4=pL.y,o2=pL.z;var o9=hz.calcLoopParam(o7,o2).offsetX;var pt=o7*pV,ps=(o4+1)*pV,T=(pt-oX)/o1+pG/2+o9,C=(oV-ps)/o1+pp/2;for(var pd=0,pP=pL.length;pd<pP;pd++){var oR=pL[pd],oY=undefined,oW=undefined,pN=undefined,pM=undefined;var pC=oR.baseDrawX=T+oR.baseX;var pB=oR.baseDrawY=C+oR.baseY;if(oR.type=="fixed"){var pn=oR.iconPos,o0=oR.textPos,pR=oR.textImg;if(pn){pn.drawX=T+pn.destX;pn.drawY=C+pn.destY;oY=pn.drawX;oW=pn.drawY;pN=pn.drawX+pn.width;pM=pn.drawY+pn.height}if(o0&&pR){for(var pD=0;pD<o0.length;pD++){var pQ=o0[pD];pQ.drawX=T+pQ.destX;pQ.drawY=C+pQ.destY;if(!oY){oY=pQ.drawX;oW=pQ.drawY;pN=pQ.drawX+pQ.width;pM=pQ.drawY+pQ.height}else{if(pQ.drawX<oY){oY=pQ.drawX}if(pQ.drawY<oW){oW=pQ.drawY}if(pQ.drawX+pQ.width>pN){pN=pQ.drawX+pQ.width}if(pQ.drawY+pQ.height>pM){pM=pQ.drawY+pQ.height}}}}}else{oR.tileX=T;oR.tileY=C;oY=T+oR.minXOriginal;oW=C+oR.minYOriginal;pN=T+oR.maxXOriginal;pM=C+oR.maxYOriginal}if(oY!=undefined){var pF=pC+(oY-pC)/pv;var pE=pB+(oW-pB)/pv;var ph=pC+(pN-pC)/pv;var pf=pB+(pM-pB)/pv;oR.minX=pF;oR.minY=pE;oR.maxX=ph;oR.maxY=pf;var pJ=(pF+ph)/2,pI=(pE+pf)/2,pq=oX+(pJ-pG/2)*o1,po=oV+(pp/2-pI)*o1;oR.geoX=pq;oR.geoY=po;pj.push(oR)}}}if(pU){for(var pg=0,pc=pU.length;pg<pc;pg++){var pb=pU[pg];var py=pb[0];var oS=pb[1];var pn=py.iconPos;var oM=pn.geoX;var oK=pn.geoY;var pC=(oM-oX)/o1+pG/2;var pB=(oV-oK)/o1+pp/2;var oY=pC+pn.destX;var oW=pB+pn.destY;var pN=oY+pn.width;var pM=oW+pn.height;py.textPos=py.textPos||py._textPos;var o0=py.textPos;var pH=o0[0];var o6=pC+pH.destX;var oU=pB+pH.destY;if(oU<oW){oW=oU}if(o6+pH.width>pN){pN=o6+pH.width}if(oU+pH.height>pM){pM=oU+pH.height}if(o0.length===2){var o5=o0[1];var o3=pC+o5.destX;var oT=pB+o5.destY;if(oT<oW){oW=oT}if(o3+o5.width>pN){pN=o3+o5.width}if(oT+o5.height>pM){pM=oT+o5.height}}py._tempBounds=[oY,oW,pN,pM];var pn=oS.iconPos;var oM=pn.geoX;var oK=pn.geoY;var pC=(oM-oX)/o1+pG/2;var pB=(oV-oK)/o1+pp/2;var oY=pC+pn.destX;var oW=pB+pn.destY;var pN=oY+pn.width;var pM=oW+pn.height;oS.textPos=oS.textPos||oS._textPos;var o0=oS.textPos;var pH=o0[0];var o6=pC+pH.destX;var oU=pB+pH.destY;if(o6<oY){oY=o6}if(oU<oW){oW=oU}if(oU+pH.height>pM){pM=oU+pH.height}if(o0.length===2){var o5=o0[1];var o3=pC+o5.destX;var oT=pB+o5.destY;if(o3<oY){oY=o3}if(oT<oW){oW=oT}if(oT+o5.height>pM){pM=oT+o5.height}}oS._tempBounds=[oY,oW,pN,pM]}for(var pg=0,pc=pU.length;pg<pc;pg++){var pb=pU[pg];var py=pb[0];var oS=pb[1];if(pg===0&&oS.textPos){oS._textPos=oS.textPos;delete oS.textPos}var pK=py;if(!py.textPos&&oS.textPos){pK=oS}var pO=pK._tempBounds;for(pd=pg+1;pd<pc;pd++){var pa=pU[pd];var pk=pa[0];var pT=pa[1];var oZ=0;var pS=pk._tempBounds;if(!(pO[2]<pS[0]||pO[0]>pS[2]||pO[3]<pS[1]||pO[1]>pS[3])){oZ++;if(pk.textPos){pk._textPos=pk.textPos;delete pk.textPos}}var pS=pT._tempBounds;if(!(pO[2]<pS[0]||pO[0]>pS[2]||pO[3]<pS[1]||pO[1]>pS[3])){oZ++;if(pT.textPos){pT._textPos=pT.textPos;delete pT.textPos}}if(oZ>=2){if(pK.textPos){pK._textPos=pK.textPos;delete pK.textPos}}}}for(var pg=0,pc=pU.length;pg<pc;pg++){var pb=pU[pg];var py=pb[0];var oS=pb[1];var pl=py;if(!py.textPos&&oS.textPos){pl=oS}var pn=pl.iconPos;var oM=pn.geoX;var oK=pn.geoY;var pC=pl.baseDrawX=(oM-oX)/o1+pG/2;var pB=pl.baseDrawY=(oV-oK)/o1+pp/2;pn.drawX=pC+pn.destX;pn.drawY=pB+pn.destY;var oY=pn.drawX;var oW=pn.drawY;var pN=pn.drawX+pn.width;var pM=pn.drawY+pn.height;var o0=pl.textPos;if(o0){var pH=o0[0];pH.drawX=pC+pH.destX;pH.drawY=pB+pH.destY;if(pH.drawX<oY){oY=pH.drawX}if(pH.drawY<oW){oW=pH.drawY}if(pH.drawX+pH.width>pN){pN=pH.drawX+pH.width}if(pH.drawY+pH.height>pM){pM=pH.drawY+pH.height}if(o0.length===2){var o5=o0[1];o5.drawX=pC+o5.destX;o5.drawY=pB+o5.destY;if(o5.drawX<oY){oY=o5.drawX}if(o5.drawY<oW){oW=o5.drawY}if(o5.drawX+o5.width>pN){pN=o5.drawX+o5.width}if(o5.drawY+o5.height>pM){pM=o5.drawY+o5.height}}}var pF=pC+(oY-pC)/pv;var pE=pB+(oW-pB)/pv;var ph=pC+(pN-pC)/pv;var pf=pB+(pM-pB)/pv;pl.minX=pF;pl.minY=pE;pl.maxX=ph;pl.maxY=pf;var px=(pF+ph)/2;var pw=(pE+pf)/2;var oN=oX+(px-pG/2)*o1;var oL=oV+(pp/2-pw)*o1;pl.geoX=oN;pl.geoY=oL;pj.push(pl)}}var pz=this._strategyInfo;if(pz){var pi=pz.guid;var pr=pz.name;var o8=pz.guidExt;for(var pg=0,pc=pj.length;pg<pc;pg++){var oQ=pj[pg];delete oQ._tempRank;if(!this._canvas2dMapMgr.isClickableLabel(oQ)||(o8===1&&!oQ.guidExt)){continue}if((pi&&pi===oQ.guid)||(pr&&pr===oQ.name)){oQ._tempRank=this.RANK5}}}else{for(var pg=0,pc=pj.length;pg<pc;pg++){var oQ=pj[pg];if(oQ.type=="line"||!oQ.iconPos){continue}delete oQ._tempRank}}pj.sort(function(pX,pW){var pY=pX._tempRank?pX._tempRank:pX.rank,i=pW._tempRank?pW._tempRank:pW.rank;if(pY===i){return pX.baseX-pW.baseX}return i-pY});for(var pg=0,pc=pj.length;pg<pc;pg++){var pK=pj[pg];pK.isDel=false;pK.isFadeout=false;pK._schedule=0;pK._isIgnore=false;pK.arrIntersectIndex=[];for(pd=pg+1;pd<pc;pd++){var pm=pj[pd];if(!(pK.maxX-pe<pm.minX||pK.minX>pm.maxX-pe||pK.maxY-pe<pm.minY||pK.minY>pm.maxY-pe)){pK.arrIntersectIndex.push(pd)}}}for(var pg=0,pc=pj.length;pg<pc;pg++){var oQ=pj[pg];if(oQ.isDel==false){var e=oQ.arrIntersectIndex;for(var pd=0,pP=e.length;pd<pP;pd++){var pu=pj[e[pd]];pu.isDel=true;if(pu.guidExt===1){pu.isDel=false}}}}return pj}});function am(e){this._map=e;this._initCanvas();this._initVars();this._bindEvent();this._tileType=lA.getInstance("na")}cv.register(function(i){if(i.getRenderType()==="canvas"){var e=i.config.style;if(cv["FeatureStyle"+e]){i.canvas2dMapMgr=new am(i)}else{i.loadMapStyleFiles(function(){i.canvas2dMapMgr=new am(i);i.canvas2dMapMgr._loadData()})}}});hv.extend(am.prototype,{_initCanvas:function(){var oM=this._map,oK=oM.getSize(),T=oK.width,i=oK.height,e=oM.platform,oN=da("canvas"),oL=oN.style;var C=this.ratio=oM.config.ratio;this._width=T;this._height=i;oL.cssText="position: absolute;left:0;top:0;width:"+T+"px;height:"+i+"px;z-index:100;";oN.width=T*C;oN.height=i*C;this._labelCanvas=oN;this._labelCtx=oN.getContext("2d");e.appendChild(oN)},_initVars:function(){var e=oe("ditu","normal");this._udt=e.udt;this._version=e.ver;this._labelDataUrls=gA.B_NORMAL_MAP.vectorTileUrls;this._style=cv["FeatureStyle"+this._map.config.style];this._labelCount=0;this._vectorDrawLib=new kg(this);this._cache={maxNum:500,delNum:50,arrCache:[]};this._computedLabel=null;this._spotData=null;this._labelStrategy=new Q(this);this._labelClick=new oH(this);this._biz=new gN(this);this._map.temp.isPermitSpotOver=true;this.labelStyleParam="pl";if(this._map.getMapTypeId()===j9){this.labelStyleParam="sl"}this.statRequestCount=0;this.statResponseCount=0},_resizeHandler:function(oL){var oN=this,i=oN._map,oK=i.getSize(),C=oK.width,oP=oK.height;var oM=this.ratio;var oQ=this._labelCanvas,T=oQ.style;T.width=C+"px";T.height=oP+"px";oQ.width=C*oM;oQ.height=oP*oM;oN._width=C;oN._height=oP;var oO=true;oN._loadData(oO)},_bindEvent:function(){var e=this,i=e._map;i.addEventListener("load",function(C){e.clearLabel();e._loadData()});i.addEventListener("zoomend",function(C){if(!C.notClearLabel){e.clearLabel()}e._loadData()});i.addEventListener("moveend",function(C){e._loadData()});i.addEventListener("resize",function(C){e._resizeHandler(C)});i.addEventListener("maptypechange",function(C){if(C.mapType===c1){e.hideLabelCanvas()}else{e.showLabelCanvas();if(C.mapType===lg){e.labelStyleParam="pl"}else{if(C.mapType===j9){e.labelStyleParam="sl"}}e._loadData()}});i.addEventListener("streetlayer_show",function(C){if(this.isCanvasMap()){e.showLabelCanvas()}});i.addEventListener("streetlayer_hide",function(C){if(this.isCanvasMap()){e.hideLabelCanvas()}});i.addEventListener("loadbizdata",function(T){var C=T.data;e._biz.proecessBizData(C,function(){e.updateLabel()})});i.addEventListener("unloadbizdata",function(C){e._biz.clearBizData();e.updateLabel()});e.isDrawText=false;setTimeout(function(){if(!e.isDrawText){i.dispatchEvent(new ix("onmapwhitescreen"))}},10000)},getStyle:function(){return this._style},_getZoomUnits:function(e){return Math.pow(2,18-e)},_createCacheForm:function(C,oN,oM,i){var oL=this;var e=oL._cache;var T=e.arrCache;var oO=this._getLabelId(C,oN,oM,i);var oK={id:oO,updateLabelCounter:0};T.push(oK);T[oO]=oK;return oK},_getLabelId:function(i,T,C,e){return"_"+i+"_"+T+"_"+C+"_"+e+"_"+this.labelStyleParam},_getCache:function(i,T,C,e){return this._cache.arrCache[this._getLabelId(i,T,C,e)]},_setCacheValue:function(oK,oX,oV,T,oQ){var oS=this;var e=oS._cache;var oM=e.arrCache;var oO=e.maxNum;var oL=e.delNum;var oW=this._getLabelId(oK,oX,oV,T);var oR=oM[oW];if(oQ){oR.lb=oQ}if(oM.length>oO){var C=oM.splice(0,oL);for(var oP=0,oN=C.length;oP<oN;oP++){var oT=C[oP],oU=oT.id;if(oM[oU].lb){oM[oU].lb=null}oM[oU]=null;delete oM[oU]}C=null}},_loadData:function(oV){var pe=this._map;if(!pe.isCanvasMap()){return}var oO=pe.getCenterIn();var pd=hz.calcLoopCenterPoint(oO);var oN=this._tileType;var oQ=this._width/2;var o2=this._height;var o3=pe.getZoom();var oZ=oN.getDataZoom(o3);var oS=pe.getZoomUnits(o3);var oY=oS*oQ;var pc=pd.lng-oY;var pb=pd.lng+oY;var oW=hz.isAddWidth(pc,pb);oQ=oW?oQ*1.5:oQ;var oX=oN.getTileSize(o3);var oK=oN.getMercatorSize(o3,oZ);var oR=Math.floor(pd.lng/oK);var oT=Math.floor(pd.lat/oK);var oL=[oR,oT,(pd.lng-oR*oK)/oK*oX,(pd.lat-oT*oK)/oK*oX];var o5=oL[0]-Math.ceil((oQ-oL[2])/oX);var o9=oL[1]-Math.ceil((o2/2-oL[3])/oX);var o1=oL[0]+Math.ceil((oQ+oL[2])/oX);var o6=oL[1]+Math.ceil((o2/2+oL[3])/oX);pe.temp.isPermitSpotOver=false;var e=[];for(var o8=o5;o8<o1;o8++){for(var o7=o9;o7<o6;o7++){e.push([o8,o7,oZ]);var o0="id_"+o8+"_"+o7+"_"+o3;e[o0]=true}}e._zoom=oZ;e=hz.calcLoopTiles(e,o3);e.sort((function(i){return function(pg,ph){return((0.4*Math.abs(pg[0]-i[0])+0.6*Math.abs(pg[1]-i[1]))-(0.4*Math.abs(ph[0]-i[0])+0.6*Math.abs(ph[1]-i[1])))}})([oL[0],oL[1]]));var oU=this._cache.arrCache;this._curViewLabels=[];var T="viewKey_"+Math.floor(oO.lng)+"_"+Math.floor(oO.lat)+"_"+o3;this.statRequestCount=0;this.statResponseCount=0;this._labelCount+=e.length;var oP=o3;for(var o8=0,o4=e.length;o8<o4;o8++){var oR=e[o8][0];var oT=e[o8][1];var C=e[o8][2];var oM=this._getLabelId(oR,oT,C,oP);var pa=oU[oM];if(!pa){pa=this._createCacheForm(oR,oT,C,oP)}if(typeof pa.lb==="undefined"){pa.lb=null;this._loadLabelData(oR,oT,C,oP,oX,T);this.statRequestCount++}else{if(pa.lb){this._curViewLabels.push(pa.lb);this._labelCount--}else{if(oV){this._loadLabelData(oR,oT,C,oP,oX,T)}pa.updateLabelCounter++}}}if(this._labelCount===0){this.updateLabel()}var pf=this;if(pf.errorTimer){clearTimeout(pf.errorTimer)}pf.errorTimer=setTimeout(function(){if(pf._labelCount!==0){pf._labelCount=0;pf.updateLabel()}var ph=new ix("onloaddatatimeout");var pi=0;var pg=0;var pj=0;var i=0;if(pf.statRequestCount===pf.statResponseCount){pi=1}else{pg=1}if(pg===1){i=pf.statRequestCount-pf.statResponseCount;pj=pf.statResponseCount}ph.noTimeoutCount=pi;ph.timeoutCount=pg;ph.timeoutNoLoaded=i;ph.timeoutLoaded=pj;pf._map.dispatchEvent(ph)},500)},clearLabel:function(){var e=this._width;var C=this._height;var i=this.ratio;this._labelCtx.clearRect(0,0,e*i,C*i)},updateLabel:function(){var i=this._map;var e=i.getCenterIn();var T=this._width;var oM=this._height;var oP=i.getZoom();var oO=this._tileType.getTileSize(oP);var oN=this._getZoomUnits(oP);var C=this._labelCtx;this._labelCanvas.style.left=-i.offsetX+"px";this._labelCanvas.style.top=-i.offsetY+"px";var oL=this._curViewLabels;oL._centerX=e.lng;oL._centerY=e.lat;var oK=this._biz.bizLabels;this._computedLabel=this._labelStrategy.preComputeLabel(oL,T,oM,oN,oO,oK);this._computedLabel._zoom=oP;this.clearLabel();this._vectorDrawLib.drawIconAndText(C,this._computedLabel,oP);this._addSpotData();i.temp.isPermitSpotOver=true;if(oL.length>0){this.isDrawText=true}},_loadLabelData:function(oS,oR,oQ,C,oT,e){var oL=oS.toString();var T=oR.toString();var oN="cbk_"+oL.replace("-","_")+"_"+T.replace("-","__")+"_"+Math.floor(oQ);var oX=h6+"."+oN;var oW=this._labelDataUrls;var oP=Math.abs(oS+oR)%oW.length;var o2=oW[oP];if(window.offLineIPAddress){o2=window.offLineIPAddress+"pvd/"}var i=this.labelStyleParam;var oV="?qt=vtile";var oY="";if(this._map.config.style!=="default"){oY="&styleId=1"}var oU="x={x}&y={y}&z={z}&udt={udt}&v={v}&styles={styles}"+oY+"&textonly=1&textimg=1&scaler={scaler}&fn="+encodeURIComponent(oX);var oZ=hz.calcLoopParam(oS,oQ).col;var oO=this.ratio>1?2:1;var oM=oU.replace(/{x}/,oZ).replace(/{y}/,oR).replace(/{z}/,Math.floor(oQ)).replace(/{styles}/,i).replace(/{udt}/,this._udt).replace(/{v}/,this._version).replace(/{scaler}/,oO);var oK=o2+oV+"&param="+window.encodeURIComponent(hq(oM));var o1=this;var o0=o1._map;cv[oN]=function(o3){o1._vectorDrawLib.parseLabelData(o3,oS,oR,oQ,C,oT,function(o8){var o5=o0.getCenterIn();var o9=o0.getZoom();var pb="viewKey_"+Math.floor(o5.lng)+"_"+Math.floor(o5.lat)+"_"+o9;o1._labelCount--;var pc=o1._getCache(oS,oR,oQ,C).updateLabelCounter;o1._labelCount-=pc;var o6=o1._curViewLabels;if(pb===e||(o1._labelCount<0&&o9===oQ)){o6.push(o8)}if(pb===e){o1.statResponseCount++}if(o1._labelCount<=0){var o4=(new Date()).getTime();o1.updateLabel();var o7=(new Date()).getTime();var pa=new ix("oncanvasmaploaded");pa.drawTime=o7-o4;if(o1.statResponseCount===o1.statRequestCount){pa.isAllLoadedDrawing=true}o0.dispatchEvent(pa)}o1._setCacheValue(oS,oR,oQ,C,o8);delete cv[oN]})};jW.load(oK)},drawLabel:function(C,T,oQ,i,oO,oK,e,oL,oP,oM){var oN=this;if(!oN._computedLabel){return}if(oN._computedLabel._zoom!==oQ){oN.clearLabel();return}oN._map.temp.isPermitSpotOver=false;oN.clearLabel();oN._vectorDrawLib.zoomingIconAndText(this._labelCtx,oN._computedLabel,C,T,i,oO,oK,e,oL,oP,oM)},_addSpotData:function(){this._spotData=[];var oQ=this._map.getZoom();for(var oL=0,oK=this._computedLabel.length;oL<oK;oL++){var oN=this._computedLabel[oL];if(!this.isClickableLabel(oN)||(oN.guidExt===1&&oN.startScale>oQ)){continue}var oM=[];oM[0]=(oN.minX-oN.maxX)/2;oM[1]=(oN.minY-oN.maxY)/2;oM[2]=(oN.maxX-oN.minX)/2;oM[3]=(oN.maxY-oN.minY)/2;var T=null;if(oN.iconPos){T=new d9(oN.iconPos.geoX,oN.iconPos.geoY)}var C=oN.name?oN.name.replace("\\\\","<br>"):"";if(oN.iconPos&&oN.iconPos.iconType.indexOf("ditie")>-1&&this._map.getZoom()>14){C=""}var oP={n:C,pt:new d9(oN.geoX,oN.geoY),userdata:{iconPoint:T,uid:oN.guid,name:C,type:oN.iconPos?oN.iconPos.iconType:"",iconImg:oN.iconImg,mapPoi:true,adver_log:oN.adver_log||""},bd:oM,tag:"MAP_SPOT_INFO"};this._spotData.push(oP)}var oO=new ix("onspotsdataready");oO.spots=this._spotData;this._map._spotDataOnCanvas=this._spotData;this._map.dispatchEvent(oO)},isClickableLabel:function(e){if(e.isDel||(!e.guid&&!e.name)){return false}return true},getFilterImageData:function(C,oM){if(this._map&&this._map.config.enableIconHighlight===false){return C}var oN=C.data,oL=this._labelStrategy,oM=parseInt(oM);for(var oO=0,oK=oN.length;oO<oK;oO+=4){var e=oN[oO],oP=oN[oO+1],oQ=oN[oO+2],oR=oN[oO+3];if(oR===0){continue}var T=Math.round((e+oP+oQ)/3);var oS=T-90;oS=oS<0?0:oS;if(oM===oL.RANK5){oN[oO]=51+oS*1.3;oN[oO+1]=133+oS*0.8;oN[oO+2]=255}}return C},showLabelCanvas:function(){this._labelCanvas.style.visibility=""},hideLabelCanvas:function(){this._labelCanvas.style.visibility="hidden"}});var by=5;var m4=4;var jD=3;var aa=2;var gM=1;var kR=0;var oI=3;var l6=5;var hT={3:{start:3,base:3},4:{start:4,base:5},5:{start:4,base:5},6:{start:6,base:7},7:{start:6,base:7},8:{start:8,base:9},9:{start:8,base:9},10:{start:10,base:10},11:{start:11,base:12},12:{start:11,base:12},13:{start:11,base:12},14:{start:14,base:15},15:{start:14,base:15},16:{start:16,base:17},17:{start:16,base:17},18:{start:18,base:19},19:{start:18,base:19},20:{start:18,base:19},21:{start:18,base:19}};function kg(T){this._canvas2dMapMgr=T;var i=this.ratio=T._map.config.ratio;this._featureStyle=null;this._map=T._map;var C=cw();var e="udt="+C.udt+"&v="+C.ver;this.sizeRatio=this.ratio>1?2:1;this._binaryCache={};this._iconCache={};this._initColorCanvas()}hv.extend(kg.prototype,{_initColorCanvas:function(){var i=256,C=da("canvas"),e=C.style;e.width=i+"px";e.height=i+"px";C.width=i;C.height=i;this._colorCvs=C;this._colorCtx=C.getContext("2d")},parseLabelData:function(i,oL,oK,T,e,oO,oN){if(!this._featureStyle){this._featureStyle=this._canvas2dMapMgr.getStyle()}if(!i||!i[0]){oN([]);return}var oM=this._map.getZoomUnits();var C=this;this.loadTextPng(i,oO,oL,oK,T,e,oM,oN)},loadTextPng:function(o0,oR,oP,oO,oM,i,oK,T){var oZ=this;var e=o0[5];var oY=this._map;var oV=oY.getZoom();var C=oY.getSize();var oW=C.width;var oU=C.height;var oX=oY.getCenterIn();var oN=oX.lng;var oL=oX.lat;var oT=oP*oR*oK;var oS=(oO+1)*oR*oK;if(e){var oQ=new Image();oQ.onload=function(){oZ.calcIconAndTextInfo(o0,oQ,oR,oP,oO,oM,i,oK,oT,oS,T);delete this.onload};oQ.src=e}else{setTimeout(function(){oZ.calcIconAndTextInfo(o0,null,oR,oP,oO,oM,i,oK,oT,oS,T)},1)}},calcIconAndTextInfo:function(o2,oT,oU,oS,oP,oN,T,oL,oW,oV,oK){var o1=this;var o0=o1._featureStyle;var oQ=[];oQ.x=oS;oQ.y=oP;oQ.z=oN;var oR=o1._canvas2dMapMgr,C=oS*oL*oU,oZ=(oP+1)*oL*oU,oM={tileLeft:C,tileTop:oZ,zoomUnits:oL};var e=[];if(o2[0]){for(var oX=0;oX<o2[0].length;oX++){if(o2[0][oX][0]===oI){e.push(o2[0][oX])}}}var oO=o2[2]||[];for(var oX=0;oX<e.length;oX++){this._getFixedLabelInfo(e[oX],oT,T,oL,oU,oW,oV,oQ)}var oY=Math.pow(2,T-oN);for(oX=0;oX<oO.length;oX++){this._getLineLabelInfo(oO[oX],oT,oN,T,oL,oU,oW,oV,oY,oQ)}oK(oQ)},_getFixedLabelInfo:function(oT,oX,oK,oO,oY,o1,o0,o3){var oS=oT[1];if(!oS){return}var o5=this._map.getZoom();var pd=this._map.config.style;var pe=this._featureStyle;var oP=oK;if(oP===9){oP=8}for(var pa=0;pa<oS.length;pa++){var pf=oS[pa];var e=pf[0];var T=bJ.getStyleFromCache(pd,e,"point",oP,pe);var o9=bJ.getStyleFromCache(pd,e,"pointText",oP,pe);if((!o9||o9.length===0)&&(!T||T.length===0)){if(oP===5){var oN=pf[1];if(!oN){continue}for(var o6=0;o6<oN.length;o6++){var o4=oN[o6][4];if(o4&&o4[7]==="鍖椾含"){T=bJ.getStyleFromCache(pd,e,"point",6,pe);o9=bJ.getStyleFromCache(pd,e,"pointText",6,pe);break}else{continue}}}else{continue}}var oN=pf[1];if(!oN){continue}var pb=null;var oQ=1;var C=0;var oW=0;if(T&&T[0]){T=T[0];pb=T.icon;oQ=T.zoom?T.zoom/100:1}else{T=null}for(var o6=0;o6<oN.length;o6++){var o4=oN[o6][4];if(!o4){continue}var o8=o4[2];if(!this._isVisible(o8,o5)){continue}var oR=o4[12];if(o9&&o9.length>0&&!oR){continue}var oV=Math.round(o4[0]/100);var oU=Math.round(o4[1]/100);var o7={lng:o1+oV,lat:o0-(oY*oO-oU)};var oM=oV/oO;var oL=oY-oU/oO;var oZ=o4[7]||"";var pc=o4[5];var o2={type:"fixed",name:oZ,textImg:oX,rank:o4[4],baseX:oM,baseY:oL,iconPos:null,textPos:null,guid:o4[3]||"",tracer:o8,direction:pc,startScale:3};if((pc!==m4&&oR||!oR)&&pb!==null){o2.iconPos=this._getIconPosition(pb,oQ,oM,oL,o7);if(o2.iconPos){C=o2.iconPos.width;oW=o2.iconPos.height}}if(C===0){o2.direction=m4}if(oR){o2.textPos=this._getTextDrawData(o4,oM,oL,C,oW)}if(o2.textPos||o2.iconPos){o3.push(o2)}}}},_isVisible:function(e,i){var T;if(!this._binaryCache[e]){T=e.toString(2);if(T.length<8){T=new Array(8-T.length+1).join("0")+T}this._binaryCache[e]=T}T=this._binaryCache[e];var C=hT[i].start;return T[i-C]==="1"},_getIconPosition:function(oN,oL,C,i,e){var T=this._map.config.style;var oO=cv["iconSetInfo"+T][oN];if(!oO){if(oN.charCodeAt(0)>=48&&oN.charCodeAt(0)<=57){oO=cv["iconSetInfo"+T]["_"+oN]}}if(!oO){return null}var oK=oO[0];var oM=oO[1];oK=oK*oL;oM=oM*oL;return{srcX:0,srcY:0,destX:C-oK/2,destY:i-oM/2,width:oK,height:oM,geoX:e.lng,geoY:e.lat,mcPt:e,iconType:oN}},_getTextDrawData:function(oU,oT,oS,T,oQ){var oZ=oU[5];if(typeof oZ!=="number"){oZ=0}var oO=this.ratio;var oN=oO/2;T*=oN;oQ*=oN;var oP=oU[12];var oK=oP.length;var o2=0;var o1=0;var oY=[];var oX=0;var o0=0;for(var oW=0;oW<oK;oW++){o0+=Math.round(oP[oW][3])}for(var oW=0;oW<oK;oW++){var oM=oP[oW];var oL=oM[0];var i=oM[1];var C=oM[2];var e=oM[3];var o3=2*oO;var oV=0;if(T!==0){oV=2*oO}if(T===0){oZ=m4}switch(oZ){case jD:var oR=oS-o0/2-o3*(oK-1)/2;o2=oT-C-T/2-oV;o1=oR+oX+o3*oW;break;case gM:var oR=oS-o0/2-o3*(oK-1)/2;o2=oT+T/2+oV;o1=oR+oX+o3*oW;break;case aa:var oR=oS-oQ/2-o0-o3*(oK-1)-o3;o2=oT-C/2;o1=oR+oX+o3*oW;break;case kR:var oR=oS+oQ/2+o3/2;o2=oT-C/2;o1=oR+oX+o3*oW;break;case m4:var oR=oS-e/2-o3*(oK-1)/2;o2=oT-C/2;o1=oR+oX+o3*oW;break}oX+=e;if(C>0&&e>0){oY.push({srcX:oL,srcY:i,destX:o2,destY:o1,width:C,height:e})}}if(oY.length>0){return oY}return null},_getLineLabelInfo:function(oR,T,oK,o6,pj,oY,o4,o3,o5,oX){if(oR.length!==10){return}var o8=this.ratio;var C=this.ratio;var pf=oR[7].length;var oZ=oR[1];var ph=oR[3];var pn=oR[8];var oN=oR[4];var e=2;var oL=oN.slice(0,e);for(var pk=e;pk<oN.length;pk+=e){oL[pk]=oL[pk-e]+oN[pk];oL[pk+1]=oL[pk-(e-1)]+oN[pk+1]}for(var pk=e;pk<oN.length;pk+=e){if(pk%(ph*e)===0||pk%(ph*e)===1){continue}oL[pk]=oL[pk-e]+oN[pk]/o5;oL[pk+1]=oL[pk-(e-1)]+oN[pk+1]/o5}for(var pm=0;pm<pf;pm++){var pi=oR[7][pm];if(!this._isVisible(pi,o6)){continue}var pa=oR[6][pm];var oW=pm*ph*e;oN=oL.slice(oW,oW+ph*e);var o0=[];var o9=undefined;var o7=undefined;var oV=undefined;var oU=undefined;var pn=oR[9].slice(0);if(pa){pn.reverse()}var pd;var pb;for(var pl=0;pl<ph;pl++){var oT=oR[5][ph*pm+pl];var pe=oN[pl*e]/100;var pc=oN[pl*e+1]/100;var oS=pn[pl];var oO=oS[0];var oQ=oS[1];var oM=oS[2];var oP=oS[3];var o2;var o1;var pp;var po;if(pl===0){pd=pp=pe/pj;pb=oY-pc/pj;po=pc/pj}else{pp=pe/pj;po=pc/pj}var pr=pd+(pp-pd)*C-oM/2;var pq=pb+(oY-po-pb)*C-oP/2;if(o9===undefined){o9=pd-oM/2;o7=pb-oP/2;oV=o9+oM;oU=o7+oP}else{if(pr<o9){o9=pr}if(pq<o7){o7=pq}if(pr+oM>oV){oV=pr+oM}if(pq+oP>oU){oU=pq+oP}}o0.push({angle:oT,srcX:oO,srcY:oQ,destX:pr,destY:pq,width:oM,height:oP})}var pg={type:"line",textImg:T,rank:oZ,baseX:pd,baseY:pb,arrWordPos:o0,minXOriginal:o9,minYOriginal:o7,maxXOriginal:oV,maxYOriginal:oU,text:""};oX.push(pg)}},alterColor:function(oM,e,oL){var C=this._colorCtx,i=this._canvas2dMapMgr;C.clearRect(0,0,oM.width,oM.height);C.drawImage(e,oM.srcX,oM.srcY,oM.width,oM.height,0,0,oM.width,oM.height);var oK=C.getImageData(0,0,oM.width,oM.height),T=i.getFilterImageData(oK,oL);C.putImageData(T,0,0)},drawIconAndText:function(oY,oX,e){var oP=this.ratio;var oN=this.sizeRatio/oP;var oR=2/oP;var o9=this;for(var o1=0,oZ=oX.length;o1<oZ;o1++){var oQ=oX[o1];if(oQ.isDel==false){var oK=oQ.baseDrawX;var T=oQ.baseDrawY;if(oQ.type=="fixed"){var oM=oQ.iconPos,o2=oQ.textPos,oV=oQ.textImg,o5=oQ.startScale;if(oM&&o5<=e){var C=this._iconCache[oM.iconType];if(C){if(C.img){oY.drawImage(C.img,0,0,C.img.width,C.img.height,Math.round(oK*oP+(oM.drawX-oK)/oR),Math.round(T*oP+(oM.drawY-T)/oR),oM.width/oR,oM.height/oR)}else{C.drawLabels.push(oQ)}}else{if(!C){this._iconCache[oM.iconType]={img:null,drawLabels:[oQ]};var pb=new Image();pb._iconName=oM.iconType;pb.onload=function(){var ph=o9._iconCache[this._iconName];ph.img=this;this.onload=null;for(var pd=0;pd<ph.drawLabels.length;pd++){var pf=ph.drawLabels[pd];var pe=pf.baseDrawX;var pc=pf.baseDrawY;var pg=pf.iconPos;oY.drawImage(this,0,0,this.width,this.height,Math.round(pe*oP+(pg.drawX-pe)/oR),Math.round(pc*oP+(pg.drawY-pc)/oR),pg.width/oR,pg.height/oR)}ph.drawPos=[]};pb.src=K.getIconSetPath(o9._map.config.style)+oM.iconType+".png"}}}if(o2&&oV&&o5<=e){for(var oO=0;oO<o2.length;oO++){var oW=o2[oO];if(!oQ._tempRank){oY.drawImage(oV,oW.srcX,oW.srcY,oW.width,oW.height,Math.round(oK*oP+(oW.drawX-oK)/oN),Math.round(T*oP+(oW.drawY-T)/oN),oW.width/oN,oW.height/oN)}else{this.alterColor(oW,oV,oQ._tempRank);oY.drawImage(this._colorCvs,0,0,oW.width,oW.height,Math.round(oK*oP+(oW.drawX-oK)/oN),Math.round(T*oP+(oW.drawY-T)/oN),oW.width/oN,oW.height/oN)}}}}else{var oL=oQ.arrWordPos,oV=oQ.textImg,oU=oQ.tileX,oS=oQ.tileY;for(var o0=0,oT=oL.length;o0<oT;o0++){var o3=oL[o0];var pa=Math.round(oU+o3.destX);var o8=Math.round(oS+o3.destY);var o4=o3.angle;pa=oK*oP+pa-oK;o8=T*oP+o8-T;if(o4>10&&o4<350){oY.save();var o7=Math.round(pa+o3.width/2);var o6=Math.round(o8+o3.height/2);oY.translate(o7,o6);oY.rotate(-o4/180*Math.PI);oY.drawImage(oV,o3.srcX,o3.srcY,o3.width,o3.height,-Math.round(o3.width/2),-Math.round(o3.height/2),o3.width/oN,o3.height/oN);oY.restore()}else{oY.drawImage(oV,o3.srcX,o3.srcY,o3.width,o3.height,pa,o8,o3.width/oN,o3.height/oN)}}}}}},isCollide:function(oL,oU,oT,e,oN,C,oP){for(var oK=0,T=C.length;oK<T;oK++){var oO=C[oK],oM=1/Math.pow(2,oP+1),oS=oM*oO[3]/2,oR=oM*oO[4]/2,oQ=oO[0];if(oQ!=oL){if(!(oU+e<oO[1]-oS||oU>oO[1]+oO[3]+oS||oT+oN<oO[2]-oR||oT>oO[2]+oO[4]+oR)){return true}}}return false},zoomingIconAndText:function(o9,o3,T,o7,o8,pA,pg,oR,pm,pf,o0){var pB=this.ratio;var oS=this.sizeRatio/pB;var pC=2/pB;var pM=pB/2;var pw=o7.x;var pv=o7.y;var pa=2*pB;if(o0!==0){pv+=pf}var oV=undefined,oO=undefined,oL=undefined,oQ=undefined,oZ=undefined;var pl=pA>0?true:false;if(!pl){oV=[];var pp=1-pg}for(var pI=0,pG=o3.length;pI<pG;pI++){var pD=o3[pI];if(pD.isDel==false){var pN=pD.baseDrawX;var pK=pD.baseDrawY;o9.save();o9.translate(-oR*pB,-pm*pB);if(pD.isFadeout){if(!pl&&pD._schedule<=pg&&!pD._isIgnore){o9.globalAlpha=pp;pD._schedule=pg}else{pD._isIgnore=true;continue}}if(pD.type=="fixed"){var pb=pD.iconPos,pi=pD.textPos,oM=pD.textImg,pc=pD.startScale;var C;var pt=0;if(pb){pt=pa}if(pb&&!pD.iconImg&&this._iconCache[pb.iconType]){C=this._iconCache[pb.iconType].img}if(pb&&pc<=o8&&C){oQ=pb.width;oZ=pb.height;oO=(pw+(pN-pw)*T)*pB-oQ/2/pC;oL=(pv+(pK-pv)*T)*pB-oZ/2/pC+o0;if(!pl&&this.isCollide(pI,oO,oL,oQ,oZ,oV,pA)){pD.isFadeout=true}o9.drawImage(C,pb.srcX,pb.srcY,C.width,C.height,Math.round(oO),Math.round(oL),oQ/pC,oZ/pC);!pl&&oV.push([pI,oO,oL,oQ,oZ])}if(pi&&oM&&pc<=o8){var ph;var pj;var o2=0;var pe=0;if(pb){o2=pb.width;pe=pb.height}var pu=pi.length;var oU=0;var pk=0;for(var o4=0;o4<pu;o4++){var pF=pi[o4];pk+=pF.height;if(oU<pF.width){oU=pF.width}}pk+=(o4-1)*pa;if(!pl&&this.isCollide(pI,oO,oL,oU,pk,oV,pA)){pD.isFadeout=true}var pE=0;for(var o4=0;o4<pu;o4++){var pF=pi[o4];switch(pD.direction){case jD:ph=-(o2/2/pC+pF.width+pt);pj=-pk/2+pE+pa*o4;break;case gM:ph=o2/2/pC+pt;pj=-pk/2+pE+pa*o4;break;case aa:ph=-pF.width/2;pj=-pe/2/pC-pk+pE-pa*(o4+1);break;case kR:ph=-pF.width/2;pj=pe/2/pC+pE+pa*(o4+1);break;case m4:ph=-pF.width/2;pj=-pk/2+pE+pa*o4;break}pE+=pF.height;oO=(pw+(pN-pw)*T)*pB+ph/oS;oL=(pv+(pK-pv)*T)*pB+pj/oS;+o0;oQ=pF.width;oZ=pF.height;if(!pD._tempRank){o9.drawImage(oM,pF.srcX,pF.srcY,oQ,oZ,Math.round(oO),Math.round(oL),oQ/oS,oZ/oS)}else{this.alterColor(pF,oM,pD._tempRank);o9.drawImage(this._colorCvs,0,0,oQ,oZ,Math.round(oO),Math.round(oL),oQ/oS,oZ/oS)}!pl&&oV.push([pI,oO,oL,oQ,oZ])}}}else{var o1=pD.arrWordPos,oM=pD.textImg,pL=pD.tileX,pJ=pD.tileY;var oT=o1[0];var oP=Math.round(pL+oT.destX);var oN=Math.round(pJ+oT.destY);for(var pH=0,ps=o1.length;pH<ps;pH++){var pz=o1[pH];var pP=Math.round(pL+pz.destX);var pO=Math.round(pJ+pz.destY);var o6=pz.angle;var pr=Math.round((pw+(pN-pw)*T)*pB-oT.width/2+pP-oP);var pq=Math.round((pv+(pK-pv)*T)*pB-oT.height/2+pO-oN);oO=pr;oL=pq;oQ=pz.width;oZ=pz.height;if(!pl&&this.isCollide(pI,oO,oL,oQ,oZ,oV,pA)){pD.isFadeout=true}if(o6>10&&o6<350){var py=pr+pz.width/2;var px=pq+pz.height/2;var oK=o6/180*Math.PI;var pd=Math.cos(oK);var oW=Math.sin(oK);var po=pd;var oX=pd;var pn=oW;var oY=-oW;var o5=py-py*pd-px*oW;var e=px+py*oW-px*pd;o9.save();o9.transform(po,oY,pn,oX,o5,e);o9.drawImage(oM,pz.srcX,pz.srcY,oQ,oZ,oO,oL,oQ/oS,oZ/oS);o9.restore()}else{o9.drawImage(oM,pz.srcX,pz.srcY,oQ,oZ,oO,oL,oQ/oS,oZ/oS)}!pl&&oV.push([pI,oO,oL,oQ,oZ])}}o9.restore()}}}});function gN(e){this.initVars(e)}hv.extend(gN.prototype,{initVars:function(e){this._map=e._map;this._canvas2dMapMgr=e;this.base64Prefix="data:image/png;base64,";this.bizData=null;this.objTextsPng=null;this.arrIconsPng=null;this.bizLabels=null},proecessBizData:function(oL,oP){var oN=this;this.bizData=oL;this.objTextsPng=null;this.arrIconsPng=null;var C=oL.textsPng;var oR=oL.iconsPng;if(!C||!oR){return}var oO=new Image();oO.onload=function(){oN.objTextsPng=this;oN.calcIconAndTextInfo(oP);this.onload=null};oO.src=this.base64Prefix+C;var oQ=oR.length;var e=[];for(var oK=0;oK<oQ;oK++){var oM=oR[oK];var T=new Image();(function(i){T.onload=function(){oQ--;e[i]=this;if(oQ===0){oN.arrIconsPng=e;oN.calcIconAndTextInfo(oP)}this.onload=null}})(oK);T.src=this.base64Prefix+oM}},calcIconAndTextInfo:function(oS){if(this.objTextsPng&&this.arrIconsPng){var oO=this.bizData;var oM=oO.pois;var e=[];for(var oP=0,oL=oM.length;oP<oL;oP++){var T=oM[oP];var oN=this.arrIconsPng[T.iconPng];var oK=oN.height/2;var oR={type:"fixed",name:"",textImg:this.objTextsPng,iconImg:oN,rank:T.rank,iconPos:{srcX:0,srcY:0,destX:-oN.width/2,destY:-oK/2,width:oN.width,height:oK,geoX:T.x,geoY:T.y,iconType:"vectorCustom"},textPos:this.calcTextPos(T.pos,oN),startScale:T.from<12?12:T.from,guid:T.guid,guidExt:1,adver_log:T.adver_log||""};var C={type:"fixed",textDirLeft:"left",name:"",textImg:this.objTextsPng,iconImg:oN,rank:T.rank,iconPos:{srcX:0,srcY:0,destX:-oN.width/2,destY:-oK/2,width:oN.width,height:oK,geoX:T.x,geoY:T.y,iconType:"vectorCustom"},textPos:this.calcTextPosLeft(T.pos,oN),startScale:T.from<12?12:T.from,guid:T.guid,guidExt:1,adver_log:T.adver_log||""};var oQ=[oR,C];e.push(oQ)}this.bizLabels=e;oS&&oS()}},calcTextPos:function(oM,C){var i=[];var oL=oM.length/4;var oK=C.width/2;if(oL===1){var T={srcX:oM[0],srcY:oM[1],destX:oK,destY:-oM[3]/2,width:oM[2],height:oM[3]};i.push(T)}else{var T={srcX:oM[0],srcY:oM[1],destX:oK,destY:-oM[3],width:oM[2],height:oM[3]};var e={srcX:oM[4],srcY:oM[5],destX:oK,destY:0,width:oM[6],height:oM[7]};i.push(T);i.push(e)}return i},calcTextPosLeft:function(oM,C){var i=[];var oL=oM.length/4;var oK=C.width/2;if(oL===1){var T={srcX:oM[0],srcY:oM[1],destX:-oK-oM[2],destY:-oM[3]/2,width:oM[2],height:oM[3]};i.push(T)}else{var T={srcX:oM[0],srcY:oM[1],destX:-oK-oM[2],destY:-oM[3],width:oM[2],height:oM[3]};var e={srcX:oM[4],srcY:oM[5],destX:-oK-oM[2],destY:0,width:oM[6],height:oM[7]};i.push(T);i.push(e)}return i},clearBizData:function(){this.bizData=null;this.bizLabels=null}});var nM={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};var lF={Int8:1,Uint8:1,Int16:2,Uint16:2,Uint32:4,Float32:4};function H(T,oL,C,oK){this.arrayBuffer=T;this.attributes=oL.members;this.bytesPerElement=0;if(this.attributes){for(var e=0;e<this.attributes.length;e++){this.bytesPerElement+=lF[this.attributes[e].type]*this.attributes[e].components}}else{this.bytesPerElement=T.BYTES_PER_ELEMENT*oL.components}this.length=oK||T.byteLength/this.bytesPerElement;this.type=C;this.arrayType=oL}H.prototype.bind=function(i){var e=i[this.type];if(!this.buffer){this.buffer=i.createBuffer();i.bindBuffer(e,this.buffer);i.bufferData(e,this.arrayBuffer,i.STATIC_DRAW);this.arrayBuffer=null}else{i.bindBuffer(e,this.buffer)}};H.prototype.setVertexAttribPointers=function(T,e){for(var i=0;i<this.attributes.length;i++){var oK=this.attributes[i];var C=e.attributes[oK.name];T.vertexAttribPointer(C,oK.components,T[nM[oK.type]],oK.normalize,this.bytesPerElement,oK.offset)}};H.prototype.updateVertexData=function(T,i,C){this.arrayBuffer=i;if(!this.buffer){return this.bind(T)}if(C<=this.length){var e=T[this.type];T.bindBuffer(e,this.buffer);T.bufferData(e,this.arrayBuffer,T.STATIC_DRAW)}else{this.destroy(T);this.bind(T)}this.length=C};H.prototype.destroy=function(e){if(this.buffer){e.deleteBuffer(this.buffer);this.buffer=null}};H.BufferType={VERTEX:"ARRAY_BUFFER",ELEMENT:"ELEMENT_ARRAY_BUFFER"};H.ELEMENT_ATTRIBUTE_TYPE="Uint16";H.VERTEX_ATTRIBUTE_ALIGNMENT=4;function fO(){this.boundProgram=null;this.boundVertexBuffer=null;this.boundElementBuffer=null;this.vao=null}fO.prototype.bind=function(oN,e,T,oM){var oK=oN.extVertexArrayObject;if(oK===undefined){oK=oN.extVertexArrayObject=oN.getExtension("OES_vertex_array_object")}if(oK){if(!this.vao){this.vao=oK.createVertexArrayOES()}oK.bindVertexArrayOES(this.vao)}else{}if(!this.boundProgram){var oO=oK?0:(oN.currentNumAttributes||0);var oL=e.numAttributes;var C;for(C=oO;C<oL;C++){oN.enableVertexAttribArray(C)}if(!oK){for(C=oL;C<oO;C++){oN.disableVertexAttribArray(C)}oN.currentNumAttributes=oL}T.bind(oN);T.setVertexAttribPointers(oN,e);if(oM){oM.bind(oN)}if(oK){this.boundProgram=e;this.boundVertexBuffer=T;this.boundElementBuffer=oM}}};fO.prototype.update=function(oN,T,C,oM,e,i,oL){var oK=oN.extVertexArrayObject;if(oK===undefined){oK=oN.extVertexArrayObject=oN.getExtension("OES_vertex_array_object")}if(oK){oK.bindVertexArrayOES(this.vao);if(this.boundVertexBuffer){this.boundVertexBuffer.updateVertexData(oN,C,oM);this.boundVertexBuffer.setVertexAttribPointers(oN,this.boundProgram)}if(e&&this.boundElementBuffer){this.boundElementBuffer.updateVertexData(oN,i,oL)}}else{T.updateVertexData(oN,C,oM);if(e){e.updateVertexData(oN,i,oL)}}};fO.prototype.unbind=function(i){var e=i.extVertexArrayObject;if(e){e.bindVertexArrayOES(null);this.boundProgram=null;this.boundVertexBuffer=null;this.boundElementBuffer=null}};fO.prototype.destroy=function(i){var e=i.extVertexArrayObject;if(e&&this.vao){e.deleteVertexArrayOES(this.vao);this.vao=null;this.boundProgram=null;this.boundVertexBuffer=null;this.boundElementBuffer=null}};function M(){}hv.extend(M.prototype,{centerAndZoomIn:function(C,oQ,oR){oR=oR||{};if(!this.loaded){this.firstTileLoad=false}oQ=this._getProperZoom(oQ).zoom;if(oR.noAnimation!==true&&this.loaded){var oL=this._ifUseAnimation(C,oQ);if(oL){this.flyToIn(C,oQ,oR);return}}var oN=this;if(!C&&!oQ){return}this._stopAllAnimations();if(C&&!C.equals(this.centerPoint)){this.fire(new ix("oncenter_changed"))}if(oQ&&oQ!==this.zoomLevel){this.fire(new ix("onzoom_changed"))}C=C||this.centerPoint;oQ=oQ||this.zoomLevel;oQ=this._getProperZoom(oQ).zoom;if(this.mapType===c1){if(!this._earth){this.mapType=lg;this.temp.originMapType=c1;function oO(){oN._earth=new cv.Earth(oN,{showRealSunlight:oN.config.showRealSunlight,showMilkyway:oN.config.showMilkyway,earthBackground:oN.config.earthBackground});oN._proxyEarthEvents();oN._changeEarthMapType(c1);hv.extend(oN,cv.EarthView.prototype);delete oN.temp.originMapType}ki.load("earth",function(){if(cv["FeatureStyle"+oN.config.style]){oO()}else{oN.loadMapStyleFiles(function(){oO()})}})}}this.lastLevel=this.zoomLevel||oQ;this.zoomLevel=oQ;var oM=new ix("onload");oM.pointMC=C;oM.zoom=oQ;this.centerPoint=new d9(C.lng,C.lat);this.defaultZoomLevel=this.defaultZoomLevel||this.zoomLevel;this.defaultCenter=this.defaultCenter||this.centerPoint;if(this.mapType!==c1){this.centerPoint=this.restrictCenter(this.centerPoint)}if(!this.loaded&&!(this.temp.originMapType===c1)){var i=this.config.defaultMaxBounds;var oK=new q(i,"baidu",this.mapType);if(this.mapType!==f4){var T=new kT({mapType:this.mapType,copyright:oK,dataType:this.mapType===j9?jK:lf,customLayer:this.mapType===j9,baseLayer:true,transparentPng:false,tileTypeName:this.mapType===j9?"web":"na"});T._isInnerLayer=true;this._addTileLayer(T);this.baseLayerAdded=true}if(this.mapType===f4){kU.sendMessage("TileLayer","blank")}else{if(this.mapType===j9){kU.sendMessage("TileLayer","raster","satellite")}else{kU.sendMessage("TileLayer","vector","normal")}}if(this.mapType===j9&&this.config.showVectorStreetLayer){this._addHybirdVectorMap()}else{if(this.mapType===j9&&this._isHybridShow===true){this._addHybirdMap()}}this.on("zoom_changed",function(){if(this._heading===0){return}if(this.getZoom()<7&&this.config.restrictCenter===true){oN.resetHeading()}})}this._applyHeadingTilt(oR);if(K.apiVersionIsGL()){this.loaded=true;this.dispatchEvent(oM)}else{if(!this.loaded){this.loaded=true;if(this._isDefaultView){var oP=this;setTimeout(function(){oP.dispatchEvent(oM)},0)}else{this.dispatchEvent(oM)}}}oR.callback&&oR.callback()},_ifUseAnimation:function(T,oO){var oN=this.getSize();var C={zoom:this.zoomLevel};var oQ={zoom:oO};var oP=this.pointToPixelIn(this.centerPoint);var oK=this.pointToPixelIn(T,C);var oM=this.pointToPixelIn(this.centerPoint,oQ);var oS=this.pointToPixelIn(T,oQ);var oL=Math.abs(oP.x-oK.x);var i=Math.abs(oP.y-oK.y);var e=Math.abs(oM.x-oS.x);var oR=Math.abs(oM.y-oS.y);if((oL>oN.width||i>oN.height)&&(e>oN.width||oR>oN.height)){return false}return true},_setPlatformPosition:function(oQ,oP,oS){oS=oS||{};if(oQ===0&&oP===0&&!oS.point){return}if(isNaN(oS.initMapOffsetX)){oS.initMapOffsetX=this.offsetX}if(isNaN(oS.initMapOffsetY)){oS.initMapOffsetY=this.offsetY}var oM=mn(this._heading);if(this._tilt>0){oP=oP/Math.cos(mn(this._tilt))}var oR=oQ*Math.cos(oM)+oP*Math.sin(oM);var oO=-oQ*Math.sin(oM)+oP*Math.cos(oM);oR=oR+oS.initMapOffsetX;oO=oO+oS.initMapOffsetY;if(oS.point){var i=this.restrictCenter(oS.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new ix("oncenter_changed"))}}else{var T=this.offsetX-oR;var e=this.offsetY-oO;var oN=this.centerPoint.lng;var oL=this.centerPoint.lat;var oK=new d9(oN,oL);var C=this.getZoomUnits();this.centerPoint=this.restrictCenter(new d9(oK.lng+T*C,oK.lat-e*C),C);this.fire(new ix("oncenter_changed"))}this.offsetX=oR;this.offsetY=oO;this.dispatchEvent(new ix("onmoving"))},restrictCenter:function(oT,oM){if(this.config.restrictCenter===false){return oT}oM=oM||this.getZoomUnits();var oQ=this.pixelToPointIn(new hV(this.width,0),{center:oT});var e=this.pixelToPointIn(new hV(0,this.height),{center:oT});var oS=oT.lng;var oR=oT.lat;if(!!this.config.restrictBounds&&!this.config.restrictBounds.isEmpty()){var oV=this.config.restrictBounds;var oN=oV.getSouthWest();var oW=oV.getNorthEast();var oU=m8.convertLL2MC(oN);var oK=m8.convertLL2MC(oW);oT.lng=this.calcNewLngByBounds(oS,e,oQ,oU.lng,oK.lng,oM);oT.lat=this.calcNewLatByBounds(oR,e,oQ,oU.lat,oK.lat,oM);return oT}var T=this.pixelToPointIn(new hV(0,0),{center:oT});var oO=this.pixelToPointIn(new hV(0,this.height),{center:oT});if(this.zoomLevel<5){if(T.lat>li.MAX_LAT&&oO.lat<li.MIN_LAT){var C=li.MAX_LAT-oT.lat;var i=oT.lat-li.MIN_LAT;var oP;if(C<i){oP=C/(this.height/2)}else{oP=i/(this.height/2)}var oL=18-v(oP);this.zoomLevel=oL;return oT}}if(T.lat>li.MAX_LAT){oT.lat=li.MAX_LAT-this.height/2*oM}else{if(oO.lat<li.MIN_LAT){oT.lat=li.MIN_LAT+this.height/2*oM}}return oT},calcNewZoomByRestriction:function(oQ,oP,e,oO,oK,oM,T,oL){var oT=0;var oU=0;if(typeof T==="number"&&typeof oL==="number"&&oO.lat>oL&&e.lat<T){var C=oL-oP;var i=oP-T;var oN;if(C<i){oN=C/(this.height/2)}else{oN=i/(this.height/2)}oT=18-v(oN)}if(typeof oK==="number"&&typeof oM==="number"&&oO.lng>oM&&e.lng<oK){var oS=oM-oQ;var oR=oQ-oK;var oN;if(oS<oR){oN=oS/(this.width/2)}else{oN=oR/(this.width/2)}oU=18-v(oN)}return Math.max(oT,oU)||this.zoomLevel},calcNewLatByBounds:function(i,T,C,oM,oL,e){var oK=i;if(C.lat>oL){oK=oL-this.height/2*e}else{if(T.lat<oM){oK=oM+this.height/2*e}}return oK},calcNewLngByBounds:function(oM,oL,T,oK,C,e){var i=oM;if(T.lng>C){i=C-this.width/2*e}else{if(oL.lng<oK){i=oK+this.width/2*e}}return i},zoomTo:function(C,oU,oL){var oO=gA[this.mapType];if(!oO){return}var oM=this._getProperZoom(C);C=oM.zoom;if(this.zoomLevel===C){oL&&oL.callback&&oL.callback();return}var oT=C;this.lastLevel=this.zoomLevel;oL=oL||{};if(!oL.fromMouseWheel&&oL.noAnimation===undefined){oL.noAnimation=(this.config.enableContinuousZoom===false)}if(this.zoomEventStatus==="idle"){var oV=new ix("onzoomstart");oV.isGesture=!!oL.isGesture;this.fire(oV);this.zoomEventStatus="zooming"}var oN=null;if(oL.fixPixel){oN=oL.fixPixel}else{if(oU){oN=this.pointToPixelIn(oU,{useRound:false})}}var oS=this.pixelToPointIn(oN);var T=this.centerPoint.clone();this.fixPoint=oU;this.fixPixel=oN;this.fixCenter=T;this.mousePosMCPoint=oS;if(oL.noAnimation){C=oM.zoom;this.zoomLevel=C;this.fire(new ix("onzoom_changed"));var oQ=this.getCurrentMaxTilt();if(this._tilt>oQ){this._tilt=oQ}if(oU){if(this._heading%360!==0||this._tilt>0){var oR=this._webglMapCamera.fromScreenPixelToMC(oN.x,oN.y,{center:T,zoom:this.zoomLevel});if(oR){var oX=oR.sub(oS);var e=T.sub(oX);this.centerPoint=this.restrictCenter(e)}}else{var i=this.getZoomUnits();var e=new d9(oU.lng-i*(oN.x-this.width/2),oU.lat+i*(oN.y-this.height/2));this.centerPoint=this.restrictCenter(e,i)}this.fire(new ix("oncenter_changed"))}this._checkFireZoomend();oL.callback&&oL.callback();return}this._animationInfo.zoom={current:this.zoomLevel,diff:C-this.zoomLevel,target:C};var oW=this;var oK=this._tilt;if(this.fixPoint||oK>li.MAX_DRAG_TILT_L2){oL.renderCallback=function(){var o1=oW.getCurrentMaxTilt();if(oW._tilt>o1){oW._tilt=o1}var o2=oW.fixPixel;if(!oW.fixPixel||!oW.fixPoint){return}var oY=oW.fixPixel;var o8=oW.fixPoint;var o5=oW.fixCenter;var o3=oW.mousePosMCPoint;if(oW._heading%360!==0||oW._tilt>0){var oZ=oW._webglMapCamera.fromScreenPixelToMC(oY.x,oY.y,{center:o5,zoom:oW.zoomLevel,tilt:oW._tilt});if(oZ){var o7=oZ.sub(o3);var o0=o5.sub(o7);oW.centerPoint=oW.restrictCenter(o0)}}else{var o4=oY;var o6=oW.getZoomUnits();var o0=new d9(o8.lng-o6*(o4.x-oW.width/2),o8.lat+o6*(o4.y-oW.height/2));oW.centerPoint=oW.restrictCenter(o0,o6)}oW.fire(new ix("oncenter_changed"))}}if(oL.fromMouseWheel===true){this._startInfiniteZoomAnimation(oL);oL.callback&&oL.callback();oW._checkFireZoomend();return}if(!oL.callback){oL.callback=function(){oW._checkFireZoomend()}}else{var oP=oL.callback;oL.callback=function(oY,oZ){oP(oY,oZ);oW._checkFireZoomend()}}this._startAnimation(oL)},_checkFireZoomend:function(){var e=this;if(e.fireZoomendTimer){clearTimeout(e.fireZoomendTimer)}e.fireZoomendTimer=setTimeout(function(){if(e.zoomEventStatus==="zooming"){e.fire(new ix("onzoomend"));e.zoomEventStatus="idle"}e.fireZoomendTimer=null},150)},deepZoomMedia:function(e){var i=this;if(!i.temp.isStdCtrlBusy){i.temp.isStdCtrlBusy=true;i.deepZoomTo(i.zoomLevel+e);setTimeout(function(){i.temp.isStdCtrlBusy=false},400)}},deepZoomTo:function(e){this.zoomTo(e)},flyToIn:function(C,pd,oY){oY=oY||{};var oK=this._getProperZoom(pd);pd=oK.zoom;if(this.centerPoint.equals(C)&&this.zoomLevel===pd&&typeof oY.heading!=="number"&&typeof oY.tilt!=="number"){return}var e=this.getHeading()%360;var oQ=this.getTilt();var oW=0;var o0=0;var oT=this.getBounds().containsPoint(C);if(typeof oY.heading==="number"){oW=oY.heading}else{if(oT){oW=e}}if(typeof oY.tilt==="number"){o0=oY.tilt}else{if(oT){o0=oQ}}this._heading=e;var pa=oW-e;var o6=o0-oQ;var oU=this;var oM=this.zoomLevel;var oN=1.42;var o2=this.zoomScale(pd-oM);var pf=this.getZoomUnits();var oS=this.centerPoint.div(pf);var pg=C.div(pf);var o9=this.worldSize();var o5=oN;var o4=Math.max(this.width,this.height);var o3=o4/o2;var oR=pg.sub(oS).mag();var i=o5*o5;function pc(pi){var ph=(o3*o3-o4*o4+(pi?-1:1)*i*i*oR*oR)/(2*(pi?o3:o4)*i*oR);return Math.log(Math.sqrt(ph*ph+1)-ph)}function T(ph){return(Math.exp(ph)-Math.exp(-ph))/2}function oO(ph){return(Math.exp(ph)+Math.exp(-ph))/2}function oX(ph){return T(ph)/oO(ph)}var oP=pc(0);var o7=function(ph){return(oO(oP)/oO(oP+o5*ph))};var o8=function(ph){return o4*((oO(oP)*oX(oP+o5*ph)-T(oP))/i)/oR};var oL=(pc(1)-oP)/o5;if(Math.abs(oR)<0.000001||oL===Infinity||isNaN(oL)){if(Math.abs(o4-o3)<0.000001){this._animationInfo.zoom={current:this.zoomLevel,diff:pd-this.zoomLevel};this._animationInfo.center={current:this.centerPoint,diff:C.sub(this.centerPoint)};this._animationInfo.heading={current:e,diff:oW-e};this._animationInfo.tilt={current:oQ,diff:o0-oQ};this.setLock(true);this._startAnimation({callback:function(ph){oU.setLock(false);if(oY.callback){oY.callback(ph)}},duration:oY.duration});return}var pe=o3<o4?-1:1;oL=Math.abs(Math.log(o3/o4))/o5;o8=function(){return 0};o7=function(ph){return Math.exp(pe*o5*ph)}}var pb=1.7;if(oL<0.3){pb=0.8}else{if(oL>5){pb=(oL-5)/2+pb}}var oZ=oY.duration||1000*oL/pb;if(isNaN(oZ)){var o1={};for(var oV in oY){o1[oV]=oY[oV];o1.noAnimation=true}this.centerAndZoomIn(C,pd,o1);return}this.fire(new ix("onmovestart"));this.fire(new ix("onzoomstart"));this.setLock(true);this._startAnimation({duration:oZ,renderCallback:function(ph,pi){var pj=ph*oL;var pm=o8(pj);var pl=oM+oU.scaleZoom(1/o7(pj));if(pl<oU.getMinZoom()){pl=oU.getMinZoom()}if(pl>oU.getMaxZoom()){pl=oU.getMaxZoom()}if(pl!==oU.zoomLevel){oU.zoomLevel=pl;oU.fire(new ix("onzoom_changed"))}oU.centerPoint=oS.add(pg.sub(oS).mult(pm)).mult(pf);oU.fire(new ix("oncenter_changed"));if(typeof oW==="number"){var pk=ph/0.7;if(pk>1){pk=1}oU.setHeading(e+pa*ph,{noAnimation:true})}if(typeof o0==="number"){oU.setTilt(oQ+o6*ph,{noAnimation:true})}},callback:function(ph,pi){oU.setLock(false);if(pi&&pi.stop===true){oU.fire(new ix("onmoveend"));oU.fire(new ix("onzoomend"));oY.callback&&oY.callback(ph);return}if(pd!==oU.zoomLevel){oU.zoomLevel=pd;oU.fire(new ix("onzoom_changed"))}oU.fire(new ix("onmoveend"));oU.fire(new ix("onzoomend"));oY.callback&&oY.callback(ph)}})},zoomScale:function(e){return Math.pow(2,e)},scaleZoom:function(e){return Math.log(e)/Math.LN2},panToIn:function(i,C){C=C||{};if(!i||i.equals(this.centerPoint)){C.callback&&C.callback();return}var T=this.pointToPixelIn(i);var e=Math.round(this.width/2);var oL=Math.round(this.height/2);var oK=this._ifUseAnimation(i,this.zoomLevel);if(C.noAnimation===true||oK===false){this._stopAllAnimations();this._applyHeadingTilt(C);this._panToIn(e-T.x,oL-T.y,i);C.callback&&C.callback();return}this.flyToIn(i,this.zoomLevel,C)},_applyHeadingTilt:function(e){if(!e){return}if(typeof e.heading==="number"&&e.heading!==this._heading){this._setValue("heading",e.heading)}if(typeof e.tilt==="number"&&e.tilt!==this._tilt){this._setValue("tilt",e.tilt)}},_panToIn:function(i,e,T){var C=this.temp;if(C.operating===true){return}if(C.dragAni){C.dragAni.stop(false,{readyToMove:true});C.dragAni=null}this.dispatchEvent(new ix("onmovestart"));this._setPlatformPosition(i,e,{point:T});this.dispatchEvent(new ix("onmoveend"))},_stopAllAnimations:function(e){e=e||{};if(this._ani){this._ani.stop(!!e.goToEnd,{stopCurrentAnimation:e.stopCurrentAnimation});this._ani=null}if(this._infiniteAni){this._infiniteAni.stop();this._infiniteAni=null}},panBy:function(i,e,C){i=Math.round(i)||0;e=Math.round(e)||0;C=C||{};if(!K.apiVersionIsGL()){if(C.noAnimation===undefined&&C.enableAnimation!==undefined){C.noAnimation=!C.enableAnimation}}if(Math.abs(i)<=this.width&&Math.abs(e)<=this.height&&C.noAnimation!==true){this._panBy(i,e,C)}else{this._panToIn(i,e,C.point);C.callback&&C.callback()}},_panBy:function(i,e,oK){if(this.temp.operating===true){return}oK=oK||{};this.dispatchEvent(new ix("onmovestart"));var T=this;var C=T.temp;C.pl=T.offsetX;C.pt=T.offsetY;if(C.tlPan){C.tlPan._options.onStop=null;C.tlPan.cancel()}if(C.dragAni){C.dragAni.stop(false,{readyToMove:true});C.dragAni=null}C.tlPan=new ij({fps:oK.fps||T.config.fps,duration:oK.duration||T.config.actionDuration,transition:oK.transition||jF.easeInOutQuad,render:function(oL){this.terminative=T.temp.operating;if(T.temp.operating){return}T._setPlatformPosition(i*oL,e*oL,{initMapOffsetX:C.pl,initMapOffsetY:C.pt})},finish:function(oL){T.dispatchEvent(new ix("onmoveend"));T.temp.tlPan=false;if(T.temp.stopArrow===true){T.temp.stopArrow=false;if(T.temp.arrow!==0){T._arrow()}}},onStop:function(){T.dispatchEvent(new ix("onmoveend"));T.temp.tlPan=false}})},_startAnimation:function(i){var oK=this._animationInfo;var C=this;i=i||{};if(C._ani){C._ani.stop(!!i.goToEnd,{stopCurrentAnimation:i.stopCurrentAnimation})}if(C._infiniteAni){C._infiniteAni.stop();C._infiniteAni=null}var oL=i.duration||500;var oM=i.transition||jF.ease;var e=new ix("onanimation_start");this.fire(e);if(i.unstopable){oK=this._animationInfoUnstopable}var T=new ij({duration:oL,transition:oM,render:function(oP,oO){for(var oN in oK){if(!oK.hasOwnProperty(oN)){continue}var oR=oK[oN].current;var oQ=oK[oN].diff;C._setValueTick(oN,oR,oQ,oP)}if(i.renderCallback){i.renderCallback(oP,oO)}},finish:function(oN){C.fire(new ix("onanimation_end"));if(i.unstopable){C._animationInfoUnstopable={};C._unstopableAni=null}else{C._ani=null;C._animationInfo={}}if(i.mapNeedCbk){i.mapNeedCbk()}if(i.callback){i.callback(oN)}},onStop:function(oN){oN=oN||{};C.fire(new ix("onanimation_end"));if(oN.stopCurrentAnimation){C._animationInfo={}}C._ani=null;if(i.mapNeedCbk){i.mapNeedCbk()}if(i.callback){i.callback(null,{stop:true})}}});if(i.unstopable){C._unstopableAni=T}else{C._ani=T}},_startInfiniteZoomAnimation:function(e){var i=this;if(i._ani){i._ani.stop(!!e.goToEnd,{stopCurrentAnimation:e.stopCurrentAnimation})}if(i._infiniteAni){return}this.fire(new ix("onanimation_start"));i._infiniteAni=new ij({duration:10000,transition:jF.linear,render:function(){var C=i._animationInfo.zoom;if(Math.abs(C.current-C.target)<0.001){i._setValue("zoom",C.target);i._infiniteAni&&i._infiniteAni.stop();return}C.current+=(C.target-C.current)*0.35;i._setValue("zoom",C.current);if(e.renderCallback){e.renderCallback()}},finish:function(){i._infiniteAni=null;i._animationInfo={};i.fire(new ix("onanimation_end"));if(e.callback){e.callback()}},onStop:function(){i._infiniteAni=null;i._animationInfo={};i.fire(new ix("onanimation_end"));if(e.callback){e.callback()}}})},_setValue:function(e,C){if(e==="zoom"){this._preZoomLevel=this.zoomLevel;var i=this._getProperZoom(C);C=i.zoom;if(C!==this.zoomLevel){this.zoomLevel=C;if(C<5&&!this.config.restrictBounds){this.restrictCenter(this.centerPoint)}this.fire(new ix("on"+e+"_changed"))}return}else{if(e==="center"){this.centerPoint=C}}this["_"+e]=C;this.fire(new ix("on"+e+"_changed"))},_setValueTick:function(e,oK,T,i){if(e==="center"){var C=new d9(oK.lng+T.lng*i,oK.lat+T.lat*i);this._setValue(e,C);return}if(e==="zoom"){this._setValue(e,Math.pow(oK,1-i)*Math.pow(oK+T,i));return}this._setValue(e,oK+T*i)},setHeading:function(T,i){i=i||{};if(T===this._heading){i.callback&&i.callback();return}var C=gq(this._heading,360);var e=gq(T,360);if(e===C){this._heading=e;i.callback&&i.callback();return}if(e===0&&C>180){e=360}if(i.noAnimation){this._setValue("heading",e);i.callback&&i.callback();return}if(i.unstopable){this._animationInfoUnstopable.heading={current:C,diff:e-C}}else{var oK=e-C;if(Math.abs(e-C)>180){if(oK>0){oK=oK-360}else{oK=oK+360}}this._animationInfo.heading={current:C,diff:oK}}this._startAnimation(i)},resetHeading:function(e){var C=this._heading;while(C<0){C+=360}C=C%360;if(C>180){C-=360}this._heading=C;var T={};if(e){for(var i in e){if(e.hasOwnProperty(i)){T[i]=e[i]}}}T.unstopable=true;this.setHeading(0,T)},getHeading:function(){while(this._heading>360){this._heading-=360}if(this._heading>180){this._heading-=360}return this._heading},setTilt:function(e,i){i=i||{};if(e===this._tilt){i.callback&&i.callback();return}if(e>li.MAX_TILT){e=li.MAX_TILT}if(e<li.MIN_TILT){e=li.MIN_TILT}if(i&&i.noAnimation){this._setValue("tilt",e);i.callback&&i.callback();return}this._animationInfo.tilt={current:this._tilt,diff:e-this._tilt};this._startAnimation(i)},getTilt:function(){return this._tilt},getCenterIn:function(){return this.centerPoint},getZoom:function(){return this.zoomLevel},getCameraPosition:function(C){C=C||{};var e=C.center||this.centerPoint;var T=C.zoom||this.zoomLevel;var oM=typeof C.heading==="number"?C.heading:this._heading;var i=typeof C.tilt==="number"?C.tilt:this._tilt;var oL=this._webglMapCamera.generateMVMatrix(e,T,oM,i);var oK=gc.create(Float32Array);gc.invert(oK,oL);return this._webglMapCamera.getPosition(oK)}});function cd(i){this._jobQueue=[];this._idleOnlyJobQueue=[];var e=this;this.isIdle=true;i.on("updateframe",function(T){var C=12-T.frameTime;C=C<1?1:C;e.isIdle=false;if(e.idleWorkTimer){clearInterval(e.idleWorkTimer);e.idleWorkTimer=null}e.runJobs(C)});this._idleWorkerTicker=(function(C){return function(){if(C.isIdle){C.runJobs();C.runIdleOnlyJobs()}}})(this);i.on("mapglidle",function(){e.isIdle=true;e.runJobs();e.runIdleOnlyJobs();e.idleWorkTimer=setInterval(e._idleWorkerTicker,cd.MAX_IDLE_TIME)});i.on("destroy",function(){if(e.idleWorkTimer){clearInterval(e.idleWorkTimer);e.idleWorkTimer=null}})}cd.MAX_IDLE_TIME=50;cd.MAX_FRAME_TIME=6;cd.prototype.runJobs=function(i){if(this._jobQueue.length===0){return}var T=lQ();var e=0;i=i||cd.MAX_FRAME_TIME;while(this._jobQueue.length&&e<i){var C=this._jobQueue.shift();if(C.state!=="invalid"){C.call()}e=lQ()-T}};cd.prototype.runIdleOnlyJobs=function(){if(this._idleOnlyJobQueue.length===0){return}var C=lQ();var e=0;while(this._idleOnlyJobQueue.length&&e<cd.MAX_IDLE_TIME){var i=this._idleOnlyJobQueue.shift();if(i.state!=="invalid"){i.call()}e=lQ()-C}};cd.prototype.checkIdleRunning=function(){if(this.isIdle&&!this.idleWorkTimer){this.runJobs();this.runIdleOnlyJobs();this.idleWorkTimer=setInterval(this._idleWorkerTicker,50)}};cd.prototype.addJob=function(e){this._jobQueue.push(e);this.checkIdleRunning()};cd.prototype.clearJobs=function(){this._jobQueue.length=0;this._idleOnlyJobQueue.length=0};cd.prototype.addIdleOnlyJob=function(e){this._idleOnlyJobQueue.push(e);this.checkIdleRunning()};var fV={};var i5;var i4;var i2;var gh;var gc;var nB={};(function(oM){if(!oQ){var oQ=0.000001}if(!i){var i=(typeof Float32Array!=="undefined")?Float32Array:Array}if(!oK){var oK=Math.random}var C={};var oL=Math.PI/180;C.toRadian=function(oR){return oR*oL};var oP={};oP.create=function(oS){oS=oS||i;var oR=new oS(2);oR[0]=0;oR[1]=0;return oR};oP.clone=function(oR,oT){oT=oT||i;var oS=new oT(2);oS[0]=oR[0];oS[1]=oR[1];return oS};oP.fromValues=function(oR,oU,oT){oT=oT||i;var oS=new oT(2);oS[0]=oR;oS[1]=oU;return oS};oP.copy=function(oS,oR){oS[0]=oR[0];oS[1]=oR[1];return oS};oP.set=function(oS,oR,oT){oS[0]=oR;oS[1]=oT;return oS};oP.add=function(oT,oS,oR){oT[0]=oS[0]+oR[0];oT[1]=oS[1]+oR[1];return oT};oP.subtract=function(oT,oS,oR){oT[0]=oS[0]-oR[0];oT[1]=oS[1]-oR[1];return oT};oP.sub=oP.subtract;oP.multiply=function(oT,oS,oR){oT[0]=oS[0]*oR[0];oT[1]=oS[1]*oR[1];return oT};oP.mul=oP.multiply;oP.divide=function(oT,oS,oR){oT[0]=oS[0]/oR[0];oT[1]=oS[1]/oR[1];return oT};oP.div=oP.divide;oP.min=function(oT,oS,oR){oT[0]=Math.min(oS[0],oR[0]);oT[1]=Math.min(oS[1],oR[1]);return oT};oP.max=function(oT,oS,oR){oT[0]=Math.max(oS[0],oR[0]);oT[1]=Math.max(oS[1],oR[1]);return oT};oP.scale=function(oT,oS,oR){oT[0]=oS[0]*oR;oT[1]=oS[1]*oR;return oT};oP.scaleAndAdd=function(oT,oS,oR,oU){oT[0]=oS[0]+(oR[0]*oU);oT[1]=oS[1]+(oR[1]*oU);return oT};oP.distance=function(oT,oS){var oR=oS[0]-oT[0],oU=oS[1]-oT[1];return Math.sqrt(oR*oR+oU*oU)};oP.dist=oP.distance;oP.squaredDistance=function(oT,oS){var oR=oS[0]-oT[0],oU=oS[1]-oT[1];return oR*oR+oU*oU};oP.sqrDist=oP.squaredDistance;oP.length=function(oS){var oR=oS[0],oT=oS[1];return Math.sqrt(oR*oR+oT*oT)};oP.len=oP.length;oP.squaredLength=function(oS){var oR=oS[0],oT=oS[1];return oR*oR+oT*oT};oP.sqrLen=oP.squaredLength;oP.negate=function(oS,oR){oS[0]=-oR[0];oS[1]=-oR[1];return oS};oP.normalize=function(oU,oT){var oS=oT[0],oV=oT[1];var oR=oS*oS+oV*oV;if(oR>0){oR=1/Math.sqrt(oR);oU[0]=oT[0]*oR;oU[1]=oT[1]*oR}return oU};oP.dot=function(oS,oR){return oS[0]*oR[0]+oS[1]*oR[1]};oP.cross=function(oT,oS,oR){var oU=oS[0]*oR[1]-oS[1]*oR[0];oT[0]=oT[1]=0;oT[2]=oU;return oT};oP.lerp=function(oT,oS,oR,oU){var oW=oS[0],oV=oS[1];oT[0]=oW+oU*(oR[0]-oW);oT[1]=oV+oU*(oR[1]-oV);return oT};oP.random=function(oR,oT){oT=oT||1;var oS=oK()*2*Math.PI;oR[0]=Math.cos(oS)*oT;oR[1]=Math.sin(oS)*oT;return oR};oP.transformMat2=function(oU,oT,oS){var oR=oT[0],oV=oT[1];oU[0]=oS[0]*oR+oS[2]*oV;oU[1]=oS[1]*oR+oS[3]*oV;return oU};oP.transformMat2d=function(oU,oT,oS){var oR=oT[0],oV=oT[1];oU[0]=oS[0]*oR+oS[2]*oV+oS[4];oU[1]=oS[1]*oR+oS[3]*oV+oS[5];return oU};oP.transformMat3=function(oU,oT,oS){var oR=oT[0],oV=oT[1];oU[0]=oS[0]*oR+oS[3]*oV+oS[6];oU[1]=oS[1]*oR+oS[4]*oV+oS[7];return oU};oP.transformMat4=function(oU,oT,oS){var oR=oT[0],oV=oT[1];oU[0]=oS[0]*oR+oS[4]*oV+oS[12];oU[1]=oS[1]*oR+oS[5]*oV+oS[13];return oU};oP.rotate=function(oU,oS,oR,oY){var oX=oS[0]-oR[0];var oW=oS[1]-oR[1];var oT=Math.sin(oY);var oV=Math.cos(oY);oU[0]=oX*oV-oW*oT+oR[0];oU[1]=oX*oT+oW*oV+oR[1];return oU};oP.forEach=(function(){var oR=oP.create();return function(oU,oY,oZ,oX,oW,oS){var oV,oT;if(!oY){oY=2}if(!oZ){oZ=0}if(oX){oT=Math.min((oX*oY)+oZ,oU.length)}else{oT=oU.length}for(oV=oZ;oV<oT;oV+=oY){oR[0]=oU[oV];oR[1]=oU[oV+1];oW(oR,oR,oS);oU[oV]=oR[0];oU[oV+1]=oR[1]}return oU}})();oP.str=function(oR){return"vec2("+oR[0]+", "+oR[1]+")"};oM.vec2=oP;var oO={};oO.create=function(oS){oS=oS||i;var oR=new oS(3);oR[0]=0;oR[1]=0;oR[2]=0;return oR};oO.clone=function(oR,oT){oT=oT||i;var oS=new oT(3);oS[0]=oR[0];oS[1]=oR[1];oS[2]=oR[2];return oS};oO.fromValues=function(oR,oV,oT,oU){oU=oU||i;var oS=new oU(3);oS[0]=oR;oS[1]=oV;oS[2]=oT;return oS};oO.copy=function(oS,oR){oS[0]=oR[0];oS[1]=oR[1];oS[2]=oR[2];return oS};oO.set=function(oS,oR,oU,oT){oS[0]=oR;oS[1]=oU;oS[2]=oT;return oS};oO.add=function(oT,oS,oR){oT[0]=oS[0]+oR[0];oT[1]=oS[1]+oR[1];oT[2]=oS[2]+oR[2];return oT};oO.subtract=function(oT,oS,oR){oT[0]=oS[0]-oR[0];oT[1]=oS[1]-oR[1];oT[2]=oS[2]-oR[2];return oT};oO.sub=oO.subtract;oO.multiply=function(oT,oS,oR){oT[0]=oS[0]*oR[0];oT[1]=oS[1]*oR[1];oT[2]=oS[2]*oR[2];return oT};oO.mul=oO.multiply;oO.divide=function(oT,oS,oR){oT[0]=oS[0]/oR[0];oT[1]=oS[1]/oR[1];oT[2]=oS[2]/oR[2];return oT};oO.div=oO.divide;oO.min=function(oT,oS,oR){oT[0]=Math.min(oS[0],oR[0]);oT[1]=Math.min(oS[1],oR[1]);oT[2]=Math.min(oS[2],oR[2]);return oT};oO.max=function(oT,oS,oR){oT[0]=Math.max(oS[0],oR[0]);oT[1]=Math.max(oS[1],oR[1]);oT[2]=Math.max(oS[2],oR[2]);return oT};oO.scale=function(oT,oS,oR){oT[0]=oS[0]*oR;oT[1]=oS[1]*oR;oT[2]=oS[2]*oR;return oT};oO.scaleAndAdd=function(oT,oS,oR,oU){oT[0]=oS[0]+(oR[0]*oU);oT[1]=oS[1]+(oR[1]*oU);oT[2]=oS[2]+(oR[2]*oU);return oT};oO.distance=function(oT,oS){var oR=oS[0]-oT[0],oV=oS[1]-oT[1],oU=oS[2]-oT[2];return Math.sqrt(oR*oR+oV*oV+oU*oU)};oO.dist=oO.distance;oO.squaredDistance=function(oT,oS){var oR=oS[0]-oT[0],oV=oS[1]-oT[1],oU=oS[2]-oT[2];return oR*oR+oV*oV+oU*oU};oO.sqrDist=oO.squaredDistance;oO.length=function(oS){var oR=oS[0],oU=oS[1],oT=oS[2];return Math.sqrt(oR*oR+oU*oU+oT*oT)};oO.len=oO.length;oO.squaredLength=function(oS){var oR=oS[0],oU=oS[1],oT=oS[2];return oR*oR+oU*oU+oT*oT};oO.sqrLen=oO.squaredLength;oO.negate=function(oS,oR){oS[0]=-oR[0];oS[1]=-oR[1];oS[2]=-oR[2];return oS};oO.normalize=function(oU,oT){var oS=oT[0],oW=oT[1],oV=oT[2];var oR=oS*oS+oW*oW+oV*oV;if(oR>0){oR=1/Math.sqrt(oR);oU[0]=oT[0]*oR;oU[1]=oT[1]*oR;oU[2]=oT[2]*oR}return oU};oO.dot=function(oS,oR){return oS[0]*oR[0]+oS[1]*oR[1]+oS[2]*oR[2]};oO.cross=function(oS,oX,oW){var oR=oX[0],oZ=oX[1],oY=oX[2],oV=oW[0],oU=oW[1],oT=oW[2];oS[0]=oZ*oT-oY*oU;oS[1]=oY*oV-oR*oT;oS[2]=oR*oU-oZ*oV;return oS};oO.lerp=function(oT,oS,oR,oU){var oX=oS[0],oW=oS[1],oV=oS[2];oT[0]=oX+oU*(oR[0]-oX);oT[1]=oW+oU*(oR[1]-oW);oT[2]=oV+oU*(oR[2]-oV);return oT};oO.random=function(oR,oV){oV=oV||1;var oT=oK()*2*Math.PI;var oU=(oK()*2)-1;var oS=Math.sqrt(1-oU*oU)*oV;oR[0]=Math.cos(oT)*oS;oR[1]=Math.sin(oT)*oS;oR[2]=oU*oV;return oR};oO.transformMat4=function(oU,oT,oS){var oR=oT[0],oW=oT[1],oV=oT[2];oU[0]=oS[0]*oR+oS[4]*oW+oS[8]*oV+oS[12];oU[1]=oS[1]*oR+oS[5]*oW+oS[9]*oV+oS[13];oU[2]=oS[2]*oR+oS[6]*oW+oS[10]*oV+oS[14];return oU};oO.transformMat3=function(oU,oT,oS){var oR=oT[0],oW=oT[1],oV=oT[2];oU[0]=oR*oS[0]+oW*oS[3]+oV*oS[6];oU[1]=oR*oS[1]+oW*oS[4]+oV*oS[7];oU[2]=oR*oS[2]+oW*oS[5]+oV*oS[8];return oU};oO.transformQuat=function(oX,o3,oR){var o4=o3[0],o2=o3[1],o1=o3[2],oZ=oR[0],oY=oR[1],oW=oR[2],o0=oR[3],oU=o0*o4+oY*o1-oW*o2,oT=o0*o2+oW*o4-oZ*o1,oS=o0*o1+oZ*o2-oY*o4,oV=-oZ*o4-oY*o2-oW*o1;oX[0]=oU*o0+oV*-oZ+oT*-oW-oS*-oY;oX[1]=oT*o0+oV*-oY+oS*-oZ-oU*-oW;oX[2]=oS*o0+oV*-oW+oU*-oY-oT*-oZ;return oX};oO.rotateX=function(oT,oS,oR,oW){var oV=[],oU=[];oV[0]=oS[0]-oR[0];oV[1]=oS[1]-oR[1];oV[2]=oS[2]-oR[2];oU[0]=oV[0];oU[1]=oV[1]*Math.cos(oW)-oV[2]*Math.sin(oW);oU[2]=oV[1]*Math.sin(oW)+oV[2]*Math.cos(oW);oT[0]=oU[0]+oR[0];oT[1]=oU[1]+oR[1];oT[2]=oU[2]+oR[2];return oT};oO.rotateY=function(oT,oS,oR,oW){var oV=[],oU=[];oV[0]=oS[0]-oR[0];oV[1]=oS[1]-oR[1];oV[2]=oS[2]-oR[2];oU[0]=oV[2]*Math.sin(oW)+oV[0]*Math.cos(oW);oU[1]=oV[1];oU[2]=oV[2]*Math.cos(oW)-oV[0]*Math.sin(oW);oT[0]=oU[0]+oR[0];oT[1]=oU[1]+oR[1];oT[2]=oU[2]+oR[2];return oT};oO.rotateZ=function(oT,oS,oR,oW){var oV=[],oU=[];oV[0]=oS[0]-oR[0];oV[1]=oS[1]-oR[1];oV[2]=oS[2]-oR[2];oU[0]=oV[0]*Math.cos(oW)-oV[1]*Math.sin(oW);oU[1]=oV[0]*Math.sin(oW)+oV[1]*Math.cos(oW);oU[2]=oV[2];oT[0]=oU[0]+oR[0];oT[1]=oU[1]+oR[1];oT[2]=oU[2]+oR[2];return oT};oO.forEach=(function(){var oR=oO.create();return function(oU,oY,oZ,oX,oW,oS){var oV,oT;if(!oY){oY=3}if(!oZ){oZ=0}if(oX){oT=Math.min((oX*oY)+oZ,oU.length)}else{oT=oU.length}for(oV=oZ;oV<oT;oV+=oY){oR[0]=oU[oV];oR[1]=oU[oV+1];oR[2]=oU[oV+2];oW(oR,oR,oS);oU[oV]=oR[0];oU[oV+1]=oR[1];oU[oV+2]=oR[2]}return oU}})();oO.str=function(oR){return"vec3("+oR[0]+", "+oR[1]+", "+oR[2]+")"};oM.vec3=oO;var oN={};oN.create=function(oS){oS=oS||i;var oR=new oS(4);oR[0]=0;oR[1]=0;oR[2]=0;oR[3]=0;return oR};oN.clone=function(oR,oT){oT=oT||i;var oS=new oT(4);oS[0]=oR[0];oS[1]=oR[1];oS[2]=oR[2];oS[3]=oR[3];return oS};oN.fromValues=function(oR,oW,oU,oS,oV){oV=oV||i;var oT=new oV(4);oT[0]=oR;oT[1]=oW;oT[2]=oU;oT[3]=oS;return oT};oN.copy=function(oS,oR){oS[0]=oR[0];oS[1]=oR[1];oS[2]=oR[2];oS[3]=oR[3];return oS};oN.set=function(oT,oR,oV,oU,oS){oT[0]=oR;oT[1]=oV;oT[2]=oU;oT[3]=oS;return oT};oN.add=function(oT,oS,oR){oT[0]=oS[0]+oR[0];oT[1]=oS[1]+oR[1];oT[2]=oS[2]+oR[2];oT[3]=oS[3]+oR[3];return oT};oN.subtract=function(oT,oS,oR){oT[0]=oS[0]-oR[0];oT[1]=oS[1]-oR[1];oT[2]=oS[2]-oR[2];oT[3]=oS[3]-oR[3];return oT};oN.sub=oN.subtract;oN.multiply=function(oT,oS,oR){oT[0]=oS[0]*oR[0];oT[1]=oS[1]*oR[1];oT[2]=oS[2]*oR[2];oT[3]=oS[3]*oR[3];return oT};oN.mul=oN.multiply;oN.divide=function(oT,oS,oR){oT[0]=oS[0]/oR[0];oT[1]=oS[1]/oR[1];oT[2]=oS[2]/oR[2];oT[3]=oS[3]/oR[3];return oT};oN.div=oN.divide;oN.min=function(oT,oS,oR){oT[0]=Math.min(oS[0],oR[0]);oT[1]=Math.min(oS[1],oR[1]);oT[2]=Math.min(oS[2],oR[2]);oT[3]=Math.min(oS[3],oR[3]);return oT};oN.max=function(oT,oS,oR){oT[0]=Math.max(oS[0],oR[0]);oT[1]=Math.max(oS[1],oR[1]);oT[2]=Math.max(oS[2],oR[2]);oT[3]=Math.max(oS[3],oR[3]);return oT};oN.scale=function(oT,oS,oR){oT[0]=oS[0]*oR;oT[1]=oS[1]*oR;oT[2]=oS[2]*oR;oT[3]=oS[3]*oR;return oT};oN.scaleAndAdd=function(oT,oS,oR,oU){oT[0]=oS[0]+(oR[0]*oU);oT[1]=oS[1]+(oR[1]*oU);oT[2]=oS[2]+(oR[2]*oU);oT[3]=oS[3]+(oR[3]*oU);return oT};oN.distance=function(oU,oS){var oR=oS[0]-oU[0],oW=oS[1]-oU[1],oV=oS[2]-oU[2],oT=oS[3]-oU[3];return Math.sqrt(oR*oR+oW*oW+oV*oV+oT*oT)};oN.dist=oN.distance;oN.squaredDistance=function(oU,oS){var oR=oS[0]-oU[0],oW=oS[1]-oU[1],oV=oS[2]-oU[2],oT=oS[3]-oU[3];return oR*oR+oW*oW+oV*oV+oT*oT};oN.sqrDist=oN.squaredDistance;oN.length=function(oT){var oR=oT[0],oV=oT[1],oU=oT[2],oS=oT[3];return Math.sqrt(oR*oR+oV*oV+oU*oU+oS*oS)};oN.len=oN.length;oN.squaredLength=function(oT){var oR=oT[0],oV=oT[1],oU=oT[2],oS=oT[3];return oR*oR+oV*oV+oU*oU+oS*oS};oN.sqrLen=oN.squaredLength;oN.negate=function(oS,oR){oS[0]=-oR[0];oS[1]=-oR[1];oS[2]=-oR[2];oS[3]=-oR[3];return oS};oN.normalize=function(oV,oU){var oS=oU[0],oX=oU[1],oW=oU[2],oT=oU[3];var oR=oS*oS+oX*oX+oW*oW+oT*oT;if(oR>0){oR=1/Math.sqrt(oR);oV[0]=oU[0]*oR;oV[1]=oU[1]*oR;oV[2]=oU[2]*oR;oV[3]=oU[3]*oR}return oV};oN.dot=function(oS,oR){return oS[0]*oR[0]+oS[1]*oR[1]+oS[2]*oR[2]+oS[3]*oR[3]};oN.lerp=function(oT,oS,oR,oU){var oX=oS[0],oW=oS[1],oV=oS[2],oY=oS[3];oT[0]=oX+oU*(oR[0]-oX);oT[1]=oW+oU*(oR[1]-oW);oT[2]=oV+oU*(oR[2]-oV);oT[3]=oY+oU*(oR[3]-oY);return oT};oN.random=function(oR,oS){oS=oS||1;oR[0]=oK();oR[1]=oK();oR[2]=oK();oR[3]=oK();oN.normalize(oR,oR);oN.scale(oR,oR,oS);return oR};oN.transformMat4=function(oV,oU,oS){var oR=oU[0],oX=oU[1],oW=oU[2],oT=oU[3];oV[0]=oS[0]*oR+oS[4]*oX+oS[8]*oW+oS[12]*oT;oV[1]=oS[1]*oR+oS[5]*oX+oS[9]*oW+oS[13]*oT;oV[2]=oS[2]*oR+oS[6]*oX+oS[10]*oW+oS[14]*oT;oV[3]=oS[3]*oR+oS[7]*oX+oS[11]*oW+oS[15]*oT;return oV};oN.transformQuat=function(oX,o3,oR){var o4=o3[0],o2=o3[1],o1=o3[2],oZ=oR[0],oY=oR[1],oW=oR[2],o0=oR[3],oU=o0*o4+oY*o1-oW*o2,oT=o0*o2+oW*o4-oZ*o1,oS=o0*o1+oZ*o2-oY*o4,oV=-oZ*o4-oY*o2-oW*o1;oX[0]=oU*o0+oV*-oZ+oT*-oW-oS*-oY;oX[1]=oT*o0+oV*-oY+oS*-oZ-oU*-oW;oX[2]=oS*o0+oV*-oW+oU*-oY-oT*-oZ;return oX};oN.forEach=(function(){var oR=oN.create();return function(oU,oY,oZ,oX,oW,oS){var oV,oT;if(!oY){oY=4}if(!oZ){oZ=0}if(oX){oT=Math.min((oX*oY)+oZ,oU.length)}else{oT=oU.length}for(oV=oZ;oV<oT;oV+=oY){oR[0]=oU[oV];oR[1]=oU[oV+1];oR[2]=oU[oV+2];oR[3]=oU[oV+3];oW(oR,oR,oS);oU[oV]=oR[0];oU[oV+1]=oR[1];oU[oV+2]=oR[2];oU[oV+3]=oR[3]}return oU}})();oN.str=function(oR){return"vec4("+oR[0]+", "+oR[1]+", "+oR[2]+", "+oR[3]+")"};oM.vec4=oN;var T={};T.create=function(oS){oS=oS||i;var oR=new oS(4);oR[0]=1;oR[1]=0;oR[2]=0;oR[3]=1;return oR};T.clone=function(oR,oT){oT=oT||i;var oS=new oT(4);oS[0]=oR[0];oS[1]=oR[1];oS[2]=oR[2];oS[3]=oR[3];return oS};T.copy=function(oS,oR){oS[0]=oR[0];oS[1]=oR[1];oS[2]=oR[2];oS[3]=oR[3];return oS};T.identity=function(oR){oR[0]=1;oR[1]=0;oR[2]=0;oR[3]=1;return oR};T.transpose=function(oT,oS){if(oT===oS){var oR=oS[1];oT[1]=oS[2];oT[2]=oR}else{oT[0]=oS[0];oT[1]=oS[2];oT[2]=oS[1];oT[3]=oS[3]}return oT};T.invert=function(oV,oT){var oU=oT[0],oS=oT[1],oR=oT[2],oX=oT[3],oW=oU*oX-oR*oS;if(!oW){return null}oW=1/oW;oV[0]=oX*oW;oV[1]=-oS*oW;oV[2]=-oR*oW;oV[3]=oU*oW;return oV};T.adjoint=function(oT,oR){var oS=oR[0];oT[0]=oR[3];oT[1]=-oR[1];oT[2]=-oR[2];oT[3]=oS;return oT};T.determinant=function(oR){return oR[0]*oR[3]-oR[2]*oR[1]};T.multiply=function(oV,o0,oY){var oU=o0[0],oT=o0[1],oS=o0[2],oR=o0[3];var o1=oY[0],oZ=oY[1],oX=oY[2],oW=oY[3];oV[0]=oU*o1+oS*oZ;oV[1]=oT*o1+oR*oZ;oV[2]=oU*oX+oS*oW;oV[3]=oT*oX+oR*oW;return oV};T.mul=T.multiply;T.rotate=function(oV,oY,oX){var oU=oY[0],oT=oY[1],oS=oY[2],oR=oY[3],oZ=Math.sin(oX),oW=Math.cos(oX);oV[0]=oU*oW+oS*oZ;oV[1]=oT*oW+oR*oZ;oV[2]=oU*-oZ+oS*oW;oV[3]=oT*-oZ+oR*oW;return oV};T.scale=function(oV,oW,oY){var oU=oW[0],oT=oW[1],oS=oW[2],oR=oW[3],oZ=oY[0],oX=oY[1];oV[0]=oU*oZ;oV[1]=oT*oZ;oV[2]=oS*oX;oV[3]=oR*oX;return oV};T.str=function(oR){return"mat2("+oR[0]+", "+oR[1]+", "+oR[2]+", "+oR[3]+")"};T.frob=function(oR){return(Math.sqrt(Math.pow(oR[0],2)+Math.pow(oR[1],2)+Math.pow(oR[2],2)+Math.pow(oR[3],2)))};T.LDU=function(oR,oU,oT,oS){oR[2]=oS[2]/oS[0];oT[0]=oS[0];oT[1]=oS[1];oT[3]=oS[3]-oR[2]*oT[1];return[oR,oU,oT]};oM.mat2=T;var e={};e.create=function(oS){oS=oS||i;var oR=new oS(16);oR[0]=1;oR[1]=0;oR[2]=0;oR[3]=0;oR[4]=0;oR[5]=1;oR[6]=0;oR[7]=0;oR[8]=0;oR[9]=0;oR[10]=1;oR[11]=0;oR[12]=0;oR[13]=0;oR[14]=0;oR[15]=1;return oR};e.clone=function(oR){var oS=new i(16);oS[0]=oR[0];oS[1]=oR[1];oS[2]=oR[2];oS[3]=oR[3];oS[4]=oR[4];oS[5]=oR[5];oS[6]=oR[6];oS[7]=oR[7];oS[8]=oR[8];oS[9]=oR[9];oS[10]=oR[10];oS[11]=oR[11];oS[12]=oR[12];oS[13]=oR[13];oS[14]=oR[14];oS[15]=oR[15];return oS};e.copy=function(oS,oR){oS[0]=oR[0];oS[1]=oR[1];oS[2]=oR[2];oS[3]=oR[3];oS[4]=oR[4];oS[5]=oR[5];oS[6]=oR[6];oS[7]=oR[7];oS[8]=oR[8];oS[9]=oR[9];oS[10]=oR[10];oS[11]=oR[11];oS[12]=oR[12];oS[13]=oR[13];oS[14]=oR[14];oS[15]=oR[15];return oS};e.identity=function(oR){oR[0]=1;oR[1]=0;oR[2]=0;oR[3]=0;oR[4]=0;oR[5]=1;oR[6]=0;oR[7]=0;oR[8]=0;oR[9]=0;oR[10]=1;oR[11]=0;oR[12]=0;oR[13]=0;oR[14]=0;oR[15]=1;return oR};e.transpose=function(oU,oT){if(oU===oT){var oY=oT[1],oW=oT[2],oV=oT[3],oR=oT[6],oX=oT[7],oS=oT[11];oU[1]=oT[4];oU[2]=oT[8];oU[3]=oT[12];oU[4]=oY;oU[6]=oT[9];oU[7]=oT[13];oU[8]=oW;oU[9]=oR;oU[11]=oT[14];oU[12]=oV;oU[13]=oX;oU[14]=oS}else{oU[0]=oT[0];oU[1]=oT[4];oU[2]=oT[8];oU[3]=oT[12];oU[4]=oT[1];oU[5]=oT[5];oU[6]=oT[9];oU[7]=oT[13];oU[8]=oT[2];oU[9]=oT[6];oU[10]=oT[10];oU[11]=oT[14];oU[12]=oT[3];oU[13]=oT[7];oU[14]=oT[11];oU[15]=oT[15]}return oU};e.invert=function(pa,pf){var pj=pf[0],ph=pf[1],pg=pf[2],pd=pf[3],oV=pf[4],oU=pf[5],oT=pf[6],oS=pf[7],o9=pf[8],o8=pf[9],o7=pf[10],o6=pf[11],pl=pf[12],pk=pf[13],pi=pf[14],pe=pf[15],o5=pj*oU-ph*oV,o4=pj*oT-pg*oV,o3=pj*oS-pd*oV,o2=ph*oT-pg*oU,o1=ph*oS-pd*oU,o0=pg*oS-pd*oT,oZ=o9*pk-o8*pl,oY=o9*pi-o7*pl,oX=o9*pe-o6*pl,oW=o8*pi-o7*pk,pc=o8*pe-o6*pk,pb=o7*pe-o6*pi,oR=o5*pb-o4*pc+o3*oW+o2*oX-o1*oY+o0*oZ;if(!oR){return null}oR=1/oR;pa[0]=(oU*pb-oT*pc+oS*oW)*oR;pa[1]=(pg*pc-ph*pb-pd*oW)*oR;pa[2]=(pk*o0-pi*o1+pe*o2)*oR;pa[3]=(o7*o1-o8*o0-o6*o2)*oR;pa[4]=(oT*oX-oV*pb-oS*oY)*oR;pa[5]=(pj*pb-pg*oX+pd*oY)*oR;pa[6]=(pi*o3-pl*o0-pe*o4)*oR;pa[7]=(o9*o0-o7*o3+o6*o4)*oR;pa[8]=(oV*pc-oU*oX+oS*oZ)*oR;pa[9]=(ph*oX-pj*pc-pd*oZ)*oR;pa[10]=(pl*o1-pk*o3+pe*o5)*oR;pa[11]=(o8*o3-o9*o1-o6*o5)*oR;pa[12]=(oU*oY-oV*oW-oT*oZ)*oR;pa[13]=(pj*oW-ph*oY+pg*oZ)*oR;pa[14]=(pk*o4-pl*o2-pi*o5)*oR;pa[15]=(o9*o2-o8*o4+o7*o5)*oR;return pa};e.adjoint=function(oZ,o2){var o6=o2[0],o4=o2[1],o3=o2[2],o0=o2[3],oU=o2[4],oT=o2[5],oS=o2[6],oR=o2[7],oY=o2[8],oX=o2[9],oW=o2[10],oV=o2[11],o8=o2[12],o7=o2[13],o5=o2[14],o1=o2[15];oZ[0]=(oT*(oW*o1-oV*o5)-oX*(oS*o1-oR*o5)+o7*(oS*oV-oR*oW));oZ[1]=-(o4*(oW*o1-oV*o5)-oX*(o3*o1-o0*o5)+o7*(o3*oV-o0*oW));oZ[2]=(o4*(oS*o1-oR*o5)-oT*(o3*o1-o0*o5)+o7*(o3*oR-o0*oS));oZ[3]=-(o4*(oS*oV-oR*oW)-oT*(o3*oV-o0*oW)+oX*(o3*oR-o0*oS));oZ[4]=-(oU*(oW*o1-oV*o5)-oY*(oS*o1-oR*o5)+o8*(oS*oV-oR*oW));oZ[5]=(o6*(oW*o1-oV*o5)-oY*(o3*o1-o0*o5)+o8*(o3*oV-o0*oW));oZ[6]=-(o6*(oS*o1-oR*o5)-oU*(o3*o1-o0*o5)+o8*(o3*oR-o0*oS));oZ[7]=(o6*(oS*oV-oR*oW)-oU*(o3*oV-o0*oW)+oY*(o3*oR-o0*oS));oZ[8]=(oU*(oX*o1-oV*o7)-oY*(oT*o1-oR*o7)+o8*(oT*oV-oR*oX));oZ[9]=-(o6*(oX*o1-oV*o7)-oY*(o4*o1-o0*o7)+o8*(o4*oV-o0*oX));oZ[10]=(o6*(oT*o1-oR*o7)-oU*(o4*o1-o0*o7)+o8*(o4*oR-o0*oT));oZ[11]=-(o6*(oT*oV-oR*oX)-oU*(o4*oV-o0*oX)+oY*(o4*oR-o0*oT));oZ[12]=-(oU*(oX*o5-oW*o7)-oY*(oT*o5-oS*o7)+o8*(oT*oW-oS*oX));oZ[13]=(o6*(oX*o5-oW*o7)-oY*(o4*o5-o3*o7)+o8*(o4*oW-o3*oX));oZ[14]=-(o6*(oT*o5-oS*o7)-oU*(o4*o5-o3*o7)+o8*(o4*oS-o3*oT));oZ[15]=(o6*(oT*oW-oS*oX)-oU*(o4*oW-o3*oX)+oY*(o4*oS-o3*oT));return oZ};e.determinant=function(pc){var ph=pc[0],pf=pc[1],pd=pc[2],pb=pc[3],oU=pc[4],oT=pc[5],oS=pc[6],oR=pc[7],o8=pc[8],o7=pc[9],o6=pc[10],o5=pc[11],pj=pc[12],pi=pc[13],pg=pc[14],pe=pc[15],o4=ph*oT-pf*oU,o3=ph*oS-pd*oU,o2=ph*oR-pb*oU,o1=pf*oS-pd*oT,o0=pf*oR-pb*oT,oZ=pd*oR-pb*oS,oY=o8*pi-o7*pj,oX=o8*pg-o6*pj,oW=o8*pe-o5*pj,oV=o7*pg-o6*pi,pa=o7*pe-o5*pi,o9=o6*pe-o5*pg;return o4*o9-o3*pa+o2*oV+o1*oW-o0*oX+oZ*oY};e.multiply=function(o3,o7,o4){var pb=o7[0],pa=o7[1],o8=o7[2],o5=o7[3],oX=o7[4],oV=o7[5],oT=o7[6],oR=o7[7],o2=o7[8],o1=o7[9],o0=o7[10],oZ=o7[11],pd=o7[12],pc=o7[13],o9=o7[14],o6=o7[15];var oY=o4[0],oW=o4[1],oU=o4[2],oS=o4[3];o3[0]=oY*pb+oW*oX+oU*o2+oS*pd;o3[1]=oY*pa+oW*oV+oU*o1+oS*pc;o3[2]=oY*o8+oW*oT+oU*o0+oS*o9;o3[3]=oY*o5+oW*oR+oU*oZ+oS*o6;oY=o4[4];oW=o4[5];oU=o4[6];oS=o4[7];o3[4]=oY*pb+oW*oX+oU*o2+oS*pd;o3[5]=oY*pa+oW*oV+oU*o1+oS*pc;o3[6]=oY*o8+oW*oT+oU*o0+oS*o9;o3[7]=oY*o5+oW*oR+oU*oZ+oS*o6;oY=o4[8];oW=o4[9];oU=o4[10];oS=o4[11];o3[8]=oY*pb+oW*oX+oU*o2+oS*pd;o3[9]=oY*pa+oW*oV+oU*o1+oS*pc;o3[10]=oY*o8+oW*oT+oU*o0+oS*o9;o3[11]=oY*o5+oW*oR+oU*oZ+oS*o6;oY=o4[12];oW=o4[13];oU=o4[14];oS=o4[15];o3[12]=oY*pb+oW*oX+oU*o2+oS*pd;o3[13]=oY*pa+oW*oV+oU*o1+oS*pc;o3[14]=oY*o8+oW*oT+oU*o0+oS*o9;o3[15]=oY*o5+oW*oR+oU*oZ+oS*o6;return o3};e.mul=e.multiply;e.translate=function(o3,o5,oY){var oX=oY[0],oW=oY[1],oV=oY[2],o8,o7,o6,o4,oU,oT,oS,oR,o2,o1,o0,oZ;if(o5===o3){o3[12]=o5[0]*oX+o5[4]*oW+o5[8]*oV+o5[12];o3[13]=o5[1]*oX+o5[5]*oW+o5[9]*oV+o5[13];o3[14]=o5[2]*oX+o5[6]*oW+o5[10]*oV+o5[14];o3[15]=o5[3]*oX+o5[7]*oW+o5[11]*oV+o5[15]}else{o8=o5[0];o7=o5[1];o6=o5[2];o4=o5[3];oU=o5[4];oT=o5[5];oS=o5[6];oR=o5[7];o2=o5[8];o1=o5[9];o0=o5[10];oZ=o5[11];o3[0]=o8;o3[1]=o7;o3[2]=o6;o3[3]=o4;o3[4]=oU;o3[5]=oT;o3[6]=oS;o3[7]=oR;o3[8]=o2;o3[9]=o1;o3[10]=o0;o3[11]=oZ;o3[12]=o8*oX+oU*oW+o2*oV+o5[12];o3[13]=o7*oX+oT*oW+o1*oV+o5[13];o3[14]=o6*oX+oS*oW+o0*oV+o5[14];o3[15]=o4*oX+oR*oW+oZ*oV+o5[15]}return o3};e.scale=function(oU,oS,oT){var oR=oT[0],oW=oT[1],oV=oT[2];oU[0]=oS[0]*oR;oU[1]=oS[1]*oR;oU[2]=oS[2]*oR;oU[3]=oS[3]*oR;oU[4]=oS[4]*oW;oU[5]=oS[5]*oW;oU[6]=oS[6]*oW;oU[7]=oS[7]*oW;oU[8]=oS[8]*oV;oU[9]=oS[9]*oV;oU[10]=oS[10]*oV;oU[11]=oS[11]*oV;oU[12]=oS[12];oU[13]=oS[13];oU[14]=oS[14];oU[15]=oS[15];return oU};e.rotate=function(pb,pi,pk,oR){var o1=oR[0],o0=oR[1],oZ=oR[2],pc=Math.sqrt(o1*o1+o0*o0+oZ*oZ),o6,pg,o5,pm,pl,pj,ph,oY,oX,oW,oV,pa,o9,o8,o7,o4,o3,o2,pf,pe,pd,oU,oT,oS;if(Math.abs(pc)<oQ){return null}pc=1/pc;o1*=pc;o0*=pc;oZ*=pc;o6=Math.sin(pk);pg=Math.cos(pk);o5=1-pg;pm=pi[0];pl=pi[1];pj=pi[2];ph=pi[3];oY=pi[4];oX=pi[5];oW=pi[6];oV=pi[7];pa=pi[8];o9=pi[9];o8=pi[10];o7=pi[11];o4=o1*o1*o5+pg;o3=o0*o1*o5+oZ*o6;o2=oZ*o1*o5-o0*o6;pf=o1*o0*o5-oZ*o6;pe=o0*o0*o5+pg;pd=oZ*o0*o5+o1*o6;oU=o1*oZ*o5+o0*o6;oT=o0*oZ*o5-o1*o6;oS=oZ*oZ*o5+pg;pb[0]=pm*o4+oY*o3+pa*o2;pb[1]=pl*o4+oX*o3+o9*o2;pb[2]=pj*o4+oW*o3+o8*o2;pb[3]=ph*o4+oV*o3+o7*o2;pb[4]=pm*pf+oY*pe+pa*pd;pb[5]=pl*pf+oX*pe+o9*pd;pb[6]=pj*pf+oW*pe+o8*pd;pb[7]=ph*pf+oV*pe+o7*pd;pb[8]=pm*oU+oY*oT+pa*oS;pb[9]=pl*oU+oX*oT+o9*oS;pb[10]=pj*oU+oW*oT+o8*oS;pb[11]=ph*oU+oV*oT+o7*oS;if(pi!==pb){pb[12]=pi[12];pb[13]=pi[13];pb[14]=pi[14];pb[15]=pi[15]}return pb};e.rotateX=function(oR,oY,oX){var o3=Math.sin(oX),oW=Math.cos(oX),o2=oY[4],o1=oY[5],o0=oY[6],oZ=oY[7],oV=oY[8],oU=oY[9],oT=oY[10],oS=oY[11];if(oY!==oR){oR[0]=oY[0];oR[1]=oY[1];oR[2]=oY[2];oR[3]=oY[3];oR[12]=oY[12];oR[13]=oY[13];oR[14]=oY[14];oR[15]=oY[15]}oR[4]=o2*oW+oV*o3;oR[5]=o1*oW+oU*o3;oR[6]=o0*oW+oT*o3;oR[7]=oZ*oW+oS*o3;oR[8]=oV*oW-o2*o3;oR[9]=oU*oW-o1*o3;oR[10]=oT*oW-o0*o3;oR[11]=oS*oW-oZ*o3;return oR};e.rotateY=function(oV,o2,o1){var o3=Math.sin(o1),o0=Math.cos(o1),oU=o2[0],oT=o2[1],oS=o2[2],oR=o2[3],oZ=o2[8],oY=o2[9],oX=o2[10],oW=o2[11];if(o2!==oV){oV[4]=o2[4];oV[5]=o2[5];oV[6]=o2[6];oV[7]=o2[7];oV[12]=o2[12];oV[13]=o2[13];oV[14]=o2[14];oV[15]=o2[15]}oV[0]=oU*o0-oZ*o3;oV[1]=oT*o0-oY*o3;oV[2]=oS*o0-oX*o3;oV[3]=oR*o0-oW*o3;oV[8]=oU*o3+oZ*o0;oV[9]=oT*o3+oY*o0;oV[10]=oS*o3+oX*o0;oV[11]=oR*o3+oW*o0;return oV};e.rotateZ=function(oV,oY,oX){var o3=Math.sin(oX),oW=Math.cos(oX),oU=oY[0],oT=oY[1],oS=oY[2],oR=oY[3],o2=oY[4],o1=oY[5],o0=oY[6],oZ=oY[7];if(oY!==oV){oV[8]=oY[8];oV[9]=oY[9];oV[10]=oY[10];oV[11]=oY[11];oV[12]=oY[12];oV[13]=oY[13];oV[14]=oY[14];oV[15]=oY[15]}oV[0]=oU*oW+o2*o3;oV[1]=oT*oW+o1*o3;oV[2]=oS*oW+o0*o3;oV[3]=oR*oW+oZ*o3;oV[4]=o2*oW-oU*o3;oV[5]=o1*oW-oT*o3;oV[6]=o0*oW-oS*o3;oV[7]=oZ*oW-oR*o3;return oV};e.fromRotationTranslation=function(o4,o2,o0){var oX=o2[0],oW=o2[1],oV=o2[2],oY=o2[3],o5=oX+oX,oR=oW+oW,oZ=oV+oV,oU=oX*o5,oT=oX*oR,oS=oX*oZ,o3=oW*oR,o1=oW*oZ,o8=oV*oZ,o9=oY*o5,o7=oY*oR,o6=oY*oZ;o4[0]=1-(o3+o8);o4[1]=oT+o6;o4[2]=oS-o7;o4[3]=0;o4[4]=oT-o6;o4[5]=1-(oU+o8);o4[6]=o1+o9;o4[7]=0;o4[8]=oS+o7;o4[9]=o1-o9;o4[10]=1-(oU+o3);o4[11]=0;o4[12]=o0[0];o4[13]=o0[1];o4[14]=o0[2];o4[15]=1;return o4};e.fromQuat=function(o1,oY){var oV=oY[0],oU=oY[1],oT=oY[2],oW=oY[3],o2=oV+oV,oR=oU+oU,oX=oT+oT,oS=oV*o2,o0=oU*o2,oZ=oU*oR,o8=oT*o2,o7=oT*oR,o5=oT*oX,o6=oW*o2,o4=oW*oR,o3=oW*oX;o1[0]=1-oZ-o5;o1[1]=o0+o3;o1[2]=o8-o4;o1[3]=0;o1[4]=o0-o3;o1[5]=1-oS-o5;o1[6]=o7+o6;o1[7]=0;o1[8]=o8+o4;o1[9]=o7-o6;o1[10]=1-oS-oZ;o1[11]=0;o1[12]=0;o1[13]=0;o1[14]=0;o1[15]=1;return o1};e.frustum=function(oV,oS,o0,oR,oZ,oX,oW){var oY=1/(o0-oS),oU=1/(oZ-oR),oT=1/(oX-oW);oV[0]=(oX*2)*oY;oV[1]=0;oV[2]=0;oV[3]=0;oV[4]=0;oV[5]=(oX*2)*oU;oV[6]=0;oV[7]=0;oV[8]=(o0+oS)*oY;oV[9]=(oZ+oR)*oU;oV[10]=(oW+oX)*oT;oV[11]=-1;oV[12]=0;oV[13]=0;oV[14]=(oW*oX*2)*oT;oV[15]=0;return oV};e.perspective=function(oU,oT,oS,oV,oR){var oX=1/Math.tan(oT/2),oW=1/(oV-oR);oU[0]=oX/oS;oU[1]=0;oU[2]=0;oU[3]=0;oU[4]=0;oU[5]=oX;oU[6]=0;oU[7]=0;oU[8]=0;oU[9]=0;oU[10]=(oR+oV)*oW;oU[11]=-1;oU[12]=0;oU[13]=0;oU[14]=(2*oR*oV)*oW;oU[15]=0;return oU};e.ortho=function(oU,oS,o0,oR,oY,oX,oW){var oV=1/(oS-o0),oZ=1/(oR-oY),oT=1/(oX-oW);oU[0]=-2*oV;oU[1]=0;oU[2]=0;oU[3]=0;oU[4]=0;oU[5]=-2*oZ;oU[6]=0;oU[7]=0;oU[8]=0;oU[9]=0;oU[10]=2*oT;oU[11]=0;oU[12]=(oS+o0)*oV;oU[13]=(oY+oR)*oZ;oU[14]=(oW+oX)*oT;oU[15]=1;return oU};e.lookAt=function(o5,pc,pd,oX){var pb,pa,o8,oT,oS,oR,o0,oZ,oY,o6,o9=pc[0],o7=pc[1],o4=pc[2],oW=oX[0],oV=oX[1],oU=oX[2],o3=pd[0],o2=pd[1],o1=pd[2];if(Math.abs(o9-o3)<oQ&&Math.abs(o7-o2)<oQ&&Math.abs(o4-o1)<oQ){return e.identity(o5)}o0=o9-o3;oZ=o7-o2;oY=o4-o1;o6=1/Math.sqrt(o0*o0+oZ*oZ+oY*oY);o0*=o6;oZ*=o6;oY*=o6;pb=oV*oY-oU*oZ;pa=oU*o0-oW*oY;o8=oW*oZ-oV*o0;o6=Math.sqrt(pb*pb+pa*pa+o8*o8);if(!o6){pb=0;pa=0;o8=0}else{o6=1/o6;pb*=o6;pa*=o6;o8*=o6}oT=oZ*o8-oY*pa;oS=oY*pb-o0*o8;oR=o0*pa-oZ*pb;o6=Math.sqrt(oT*oT+oS*oS+oR*oR);if(!o6){oT=0;oS=0;oR=0}else{o6=1/o6;oT*=o6;oS*=o6;oR*=o6}o5[0]=pb;o5[1]=oT;o5[2]=o0;o5[3]=0;o5[4]=pa;o5[5]=oS;o5[6]=oZ;o5[7]=0;o5[8]=o8;o5[9]=oR;o5[10]=oY;o5[11]=0;o5[12]=-(pb*o9+pa*o7+o8*o4);o5[13]=-(oT*o9+oS*o7+oR*o4);o5[14]=-(o0*o9+oZ*o7+oY*o4);o5[15]=1;return o5};e.str=function(oR){return"mat4("+oR[0]+", "+oR[1]+", "+oR[2]+", "+oR[3]+", "+oR[4]+", "+oR[5]+", "+oR[6]+", "+oR[7]+", "+oR[8]+", "+oR[9]+", "+oR[10]+", "+oR[11]+", "+oR[12]+", "+oR[13]+", "+oR[14]+", "+oR[15]+")"};e.frob=function(oR){return(Math.sqrt(Math.pow(oR[0],2)+Math.pow(oR[1],2)+Math.pow(oR[2],2)+Math.pow(oR[3],2)+Math.pow(oR[4],2)+Math.pow(oR[5],2)+Math.pow(oR[6],2)+Math.pow(oR[6],2)+Math.pow(oR[7],2)+Math.pow(oR[8],2)+Math.pow(oR[9],2)+Math.pow(oR[10],2)+Math.pow(oR[11],2)+Math.pow(oR[12],2)+Math.pow(oR[13],2)+Math.pow(oR[14],2)+Math.pow(oR[15],2)))};oM.mat4=e})(nB);i5=nB.vec2;i4=nB.vec3;i2=nB.vec4;gh=nB.mat2;gc=nB.mat4;function dE(){this.result={bkData:[],eleData:[[],[],[],[],[],[],[],[],[],[]],tileLabels:[]}}hv.extend(dE.prototype,{createLayer:function(C,i){var e=this.result.bkData;if(!e[C]){e[C]=[[],[],[]]}this.updateLayer(C,i)},removeLayer:function(i){var e=this.result.bkData;e[i]=null},updateLayer:function(C,i){var e=this.result.bkData;if(!e[C]){return}i=i||{};e[C].tileTypeName=i.tileTypeName||"na";e[C].dataType=i.dataType||2;e[C].png8=i.png8||false;e[C].pack=i.pack||false;e[C].isTop=i.isTop||false;e[C].opacity=i.opacity||1;e[C].isLowText=i.isLowText||false;e[C].clipTile=i.clipTile||false;e[C].boundary=i.boundary||false;e[C].thumbUpsample=i.thumbUpsample||false;if(i.ontology){e[C].ontology=i.ontology}},updateLayerMeta:function(oK,C){var e=this.result.bkData;if(!e[oK]){return}C=C||{};var oL=Object.keys(C);for(var T=0;T<oL.length;T++){if(C.hasOwnProperty(oL[T])){e[oK][oL[T]]=C[oL[T]]}}},hasLayerBoundary:function(){var e=this.result.bkData;var C=false;for(var T=0;T<e.length;T++){if(e[T]&&e[T].boundary){C=true;break}}return C},getResult:function(){return this.result},setData:function(oL,oK,oM){var e=this.result.bkData;var C=e[oK]?e[oK][oM]:null;if(!C){return}for(var T=0;T<C.length;T++){if(C[T].key&&C[T].key===oL.key){C[T]=oL;return}}C.push(oL)},setLabelData:function(C,i){var e=this.result.tileLabels;e[i||0]=C},getLabelData:function(i){var e=this.result.tileLabels;if(i===undefined){return e}return e[i]||[]},clearLabelData:function(i){var e=this.result.tileLabels;if(i===undefined){e=[];return}e[i]=[]},setOverlayData:function(C,e,i){if(!this.result.eleData[e]){return}if(e>=2&&e<=4){this.result.eleData[e][i||0]=C;return}else{if(e===0||e===5||e===6){C.sort(function(oK,T){return oK.overlay.zIndex-T.overlay.zIndex})}}this.result.eleData[e]=C},clearLabelOverlayData:function(e){if(e===undefined){this.result.eleData[2]=[];this.result.eleData[3]=[];this.result.eleData[4]=[]}this.result.eleData[2][e]=[];this.result.eleData[3][e]=[];this.result.eleData[4][e]=[]},clearData:function(T){var e=this.result.bkData;if(typeof T==="number"){if(e[T]){e[T][0]=[];e[T][1]=[];e[T][2]=[]}return}for(var C=0;C<e.length;C++){if(!e[C]){continue}e[C][0]=[];e[C][1]=[];e[C][2]=[]}},sortThumbData:function(i){var e=this.result.bkData;var C=e[i];if(!C){return}if(C[0]&&C[0].length>0){C[0].sort(function(oK,T){return oK.tileInfo.useZoom-T.tileInfo.useZoom})}}});var jl=(function(){var oT=new Int8Array(4);var C=new Int32Array(oT.buffer,0,1);var oO=new Float32Array(oT.buffer,0,1);function oV(o2){C[0]=o2;return oO[0]}function i(o2){oO[0]=o2;return C[0]}function oP(o2){var o4=(o2[3]<<24|o2[2]<<16|o2[1]<<8|o2[0]);var o3=oV(o4&4278190079);return o3}var oK=0;var oN=1;var oR=2;var oZ=0;var oW=1;var oU=2;var oL=9;function oS(o2,o3){var o4;if(o3%2===0){o4=[-o2[1],o2[0]]}else{o4=[o2[1],-o2[0]]}return o4}function e(o2,o3,o4){var o5=oS(o2,o3);var o6;if(o4===oN){return o5}else{if(o3===4||o3===5){o6=[o5[0]-o2[0],o5[1]-o2[1]]}else{o6=[o5[0]+o2[0],o5[1]+o2[1]]}if(o4===oK){i5.normalize(o6,o6)}return o6}}function oY(o3,o2){return Math.sqrt(Math.pow(o3[0]-o2[0],2)+Math.pow(o3[1]-o2[1],2))}function T(o6,o5,o4,o2){var o3=i5.dot(o6,o5);if(o4===oU||o4===oW){if((o2===0||o2===1)&&o3>0){return true}else{if((o2===2||o2===3)&&o3<0){return true}}}if((o2===0||o2===1)&&o3<0){return true}else{if((o2===2||o2===3)&&o3>0){return true}}return false}function oQ(o3,o8,pa){var o9=oS(o3,o8);var o5;var o7=o3;var o6=pa;var pc=[];i5.normalize(pc,[o7[0]+o6[0],o7[1]+o6[1]]);var pb=i5.dot(o9,[-pc[1],pc[0]]);if(Math.abs(pb)<0.1){pb=1}var o4=1/pb;o5=[-pc[1]*o4,pc[0]*o4];var o2=i5.dot(o3,o5);if(o2<0){i5.negate(o5,o5)}return{cos2:o2,offset:o5}}function o1(o3,o8,pa,o2){var o9=oS(o3,o8);var o7;var o6;var o5;if(o8===0||o8===1){o7=pa;o6=o3}else{o7=o3;o6=pa}if(!o7||!o6){return o9}var pc=[o7[0]+o6[0],o7[1]+o6[1]];if(pc[0]===0&&pc[1]===0){i5.normalize(pc,o6)}else{i5.normalize(pc,pc)}var pd=T(pc,o9,o2,o8);if(pd){return o9}var pb=i5.dot(o9,[-pc[1],pc[0]]);if(Math.abs(pb)<0.1){pb=1}var o4=1/pb;o5=[-pc[1]*o4,pc[0]*o4];return o5}function o0(pd,pe,o7,o6,pg,pc,o5,o8,o4,pb){var pa;var o3=0;var o2=false;pa=pc.length/oL-1;function pf(ph){if(o8 instanceof Array){ph=Math.max(0,Math.min(ph,o8.length-1));return o8[ph]}else{return o8}}oM(pe[0],pd[0],o7[0],pg,o6,4,pf(0),o4,undefined,pc,pb);pa++;o3++;oM(pe[0],pd[0],o7[0],pg,o6,5,pf(0),o4,undefined,pc,pb);pa++;o3++;for(var o9=0;o9<pd.length;o9++){oM(pe[o9],pd[o9],o7[o9],pg,o6,0,pf(o9),o4,pd[o9-1],pc,pb);oX(o5,++pa,++o3,o2);oM(pe[o9],pd[o9],o7[o9],pg,o6,1,pf(o9),o4,pd[o9-1],pc,pb);oX(o5,++pa,++o3,o2);oM(pe[o9+1],pd[o9],o7[o9+1],pg,o6,2,pf(o9+1),o4,pd[o9+1],pc,pb);oX(o5,++pa,++o3,o2);oM(pe[o9+1],pd[o9],o7[o9+1],pg,o6,3,pf(o9+1),o4,pd[o9+1],pc,pb);oX(o5,++pa,++o3,o2);if(o6===oW&&o9!==pd.length-1){oM(pe[o9+1],pd[o9],o7[o9+1],pg,o6,8,pf(o9+1),o4,pd[o9+1],pc,pb);oX(o5,++pa,++o3,o2);o2=o2?false:true}}oM(pe[pe.length-1],pd[pd.length-1],o7[pe.length-1],pg,o6,6,pf(pe.length-1),o4,undefined,pc,pb);oX(o5,++pa,++o3,o2);oM(pe[pe.length-1],pd[pd.length-1],o7[pe.length-1],pg,o6,7,pf(pe.length-1),o4,undefined,pc,pb);oX(o5,++pa,++o3,o2)}function oM(pf,o5,o9,pg,o4,pa,o7,o3,pd,pc,pb){var pe=pa%2===0?1:-1;var o8;if(pa===4||pa===5||pa===6||pa===7){o8=e(o5,pa,pg)}else{if(pa===0||pa===1||pa===2||pa===3){o8=o1(o5,pa,pd,o4)}else{if(pa===8){var o6=oQ(o5,pa,pd);o8=o6.offset;i5.normalize(o8,o8);var o2=o6.cos2;if(o2<0){pe=-pe}}}}pc[pc.length]=pf[0]*10;pc[pc.length]=pf[1]*10;pc[pc.length]=o8[0]*o3*10;pc[pc.length]=o8[1]*o3*10;pc[pc.length]=o7;pc[pc.length]=pe;pc[pc.length]=0;pc[pc.length]=pb||0;pc[pc.length]=o9}function oX(o6,o4,o2,o5){var o3;if(o2%2===0){if(o5){o6[o6.length]=o4-2;o6[o6.length]=o4-1;o6[o6.length]=o4}else{o6[o6.length]=o4-1;o6[o6.length]=o4-2;o6[o6.length]=o4}}else{if(o5){o6[o6.length]=o4-1;o6[o6.length]=o4-2;o6[o6.length]=o4}else{o6[o6.length]=o4-2;o6[o6.length]=o4-1;o6[o6.length]=o4}}}return{getVertexCount:function(o3,o2){if(o2===oW){return o3*5-2}else{return o3*4}},buildData:function(pf,o4,pg,pa,o2,o7,o3,pb,pd){var pc=[];var o9=pd?pd:0;var o6=[o9*10];for(var o8=0;o8<pf.length;o8++){if(o8>0){o9+=oY(pf[o8],pf[o8-1]);o6.push(o9*10)}if(o8!==pf.length-1){var o5=[pf[o8+1][0]-pf[o8][0],pf[o8+1][1]-pf[o8][1]];var pi=[];if(o5[0]===0&&o5[1]===0){pi=[0,0]}else{i5.normalize(pi,o5)}pc[pc.length]=[pi[0],pi[1]]}}var ph;if(o7[0] instanceof Array){for(var o8=0;o8<o7.length;o8++){var pe=oP(o7[o8]);if(!ph){ph=[pe]}else{ph.push(pe)}}}else{ph=oP(o7)}return o0(pc,pf,o6,o4,pg,pa,o2,ph,o3,pb)},toTileSolidLineVertices:function(o6,o3){var o4=new Float32Array(o6.length/oL*5);var o2=new Int16Array(o4.buffer);var o8=0;var o5=0;for(var o7=0;o7<o6.length;o7+=oL){o2[o8]=~~o6[o7];o2[o8+1]=~~o6[o7+1];o2[o8+2]=~~o6[o7+2];o2[o8+3]=~~o6[o7+3];o4[o5+2]=o6[o7+4];o2[o8+6]=o6[o7+5];o2[o8+7]=o3?o3:0;o2[o8+8]=o6[o7+7];o2[o8+9]=0;o8+=10;o5+=5}return o4}}})();var jK=1;var lf=2;var k1=false;if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){k1=true}var hQ={drawIndex:0,devicePixelRatio:ja(),zoomState:1,curViewTilesInfo:null,iconSetImg:null,LAST_CALC_ZOOM:-1,LAST_LOAD_VECTOR_ZOOM_CHANGE:false,lastCollisionTestTime:0,watermarkTileKeys:[],remove:function(){this.tileCache.clear();this._lastScreenTiles=null;this.removeLabel(this.drawIndex);if(this.tileLabels){this.tileLabels=[]}},removeLabel:function(i){if(this.dataType===2&&((this.tileType&&this.tileType.getName()==="na")||(this.ontology&&this.ontology instanceof gg))){this.map._featureMgr.clearData(i);this.map._featureMgr.clearLabelOverlayData(i);this.map._featureMgr.clearLabelData(i);var C=new ix("onspotsdataremove");C.index=i;this.map.dispatchEvent(C);if(this.ontology&&(this.ontology instanceof gg||this.ontology instanceof fl)){this.clearCache();return}var e=new ix("onlayer_update");e.name="na";this.map.fire(e)}},initDrawData:function(){this.drawIndex=this.zIndex;var e={tileTypeName:this.tileType.getName(),dataType:this.dataType,png8:this.png8,pack:this.pack,isTop:this.isTop||false,opacity:this.opacity,isLowText:this.isLowText||false,clipTile:this.clipTile,boundary:this.boundary,thumbUpsample:this.thumbUpsample||false};if(this.ontology){e.ontology=this.ontology}this.map._featureMgr.createLayer(this.drawIndex,e);this.dispatchEvent(new ix("oninitDrawData"))},destroyDrawData:function(){this.map._featureMgr.removeLayer(this.drawIndex);var i=new ix("onremoveLayerMask");i.hasLayerBoundary=this.map._featureMgr.hasLayerBoundary();this.map.dispatchEvent(i)},setZIndex:function(oN){oN=Math.abs(Math.floor(oN))||1;if(!oN||oN===this.zIndex){return}var oK=this.map._featureMgr.result.bkData;var T=this.map.tileMgr.tileLayers;var oP=this.map._normalLayerMgr.layers;function oQ(oV){var oT=null;var oU=[T,oP];for(var oR=0;oR<oU.length;oR++){for(var oS=0;oS<oU[oR].length;oS++){if(oU[oR][oS].zIndex===oV){oT=oU[oR][oS];break}}if(oT){break}}return oT}var C=[];var oM=[];var oO=this.zIndex;var i=oQ(oN);if(oK[oN]&&i){C.push(i);oM.push(oK[oN]);this.setTargetZIndex(oN);oK[oN]=oK[oO];oK[oO]=null}else{this.setTargetZIndex(oN);oK[oN]=oK[oO];oK[oO]=null;this.map.dispatchEvent(new ix("onupdate"));return}var oL=oN+1;while(oL){var e=oQ(oL);if(oK[oL]&&e){C.push(e);oM.push(oK[oL]);C.shift().setTargetZIndex(oL);oK[oL]=oM.shift();oL+=1}else{C.shift().setTargetZIndex(oL);oK[oL]=oM.shift();oL=0}}this.map.dispatchEvent(new ix("onupdate"))},setZIndexTop:function(){var e=this.map._featureMgr.result.bkData;e[e.length]=e[this.zIndex];e[this.zIndex]=null;this.setTargetZIndex(e.length-1);this.map.dispatchEvent(new ix("onrefresh"))},setUpLevel:function(){var e=this._getAdjoinZIndex("up");if(this.zIndex!==e){this.setZIndex(e)}},setDownLevel:function(){var e=this._getAdjoinZIndex("down");if(this.zIndex!==e){this.setZIndex(e)}},getTileKey:function(e,T){T=T||{};var i=typeof T.useZoom==="number"?T.useZoom:e.useZoom;var C=e.style||this.mapStyleId||"default";return this.mapType+"_"+C+"_"+e.col+"_"+e.row+"_"+e.zoom+"_"+i},getTileRenderDataKey:function(i){var C=i.col;var T=i.zoom;var e=i.baseTileSize;C=hz.calcLoopParam(C,T,e).col;return this.mapType+"_"+C+"_"+i.row+"_"+T+"_"+i.useZoom},getTileUnits:function(e){var T=this.map;var C=gA[T.getMapTypeId()];var i=C.baseUnits*Math.pow(2,C.zoomLevelBase-e);return i},getTilesUrl:function(oT,e,oW){var oK=oT.x;var oM=oT.y;var oU=oe("ditu","normal");var T=oU.ver;var oL=oU.udt;oK=hz.calcLoopParam(oK,e,oW).col;var oV=this.map._displayOptions.language;var oQ=this.map._displayOptions.isEn;var oS=this.map._displayOptions.isMultiLanguage;var oX=gA.B_NORMAL_MAP.languageTileUrls(oV);var oN=Math.abs(oK+oM)%oX.length;var oR=oX[oN];if(window.offLineIPAddress){oX=[window.offLineIPAddress+"pvd/"];oR=oX[0]}var oO="x="+oK+"&y="+oM+"&z="+Math.floor(e);var oP=this.devicePixelRatio>1?"&scaler=2":"";var i="&textimg=1";if(this.map.config.textRenderType==="canvas"){i="&textimg=0"}var oY=this.map.config.style;if(typeof oY==="string"&&oY!=="default"){oO+="&styleId="+K.mapStyleNameIdPair[oY]}oO+="&styles=pl"+i+oP+"&v="+T+"&udt="+oL+"&json=0";var C=oR+"?qt=vtile&v="+ep()+"&param="+window.encodeURIComponent(hq(oO))+"&ak="+hj+"&is_has_bmap_proxy="+k1;if(oQ){if(oS){C+="&language="+oV+"&multi_lang_version=1&single_lang=0"}else{C+="&single_lang=1"}}return C},getRasterTilesUrl:function(C,oL,T){var oK=gA[this.map.mapType];var i=this.map.config.style;var e=oK.tileUrls[Math.abs(oL+C)%oK.tileUrls.length]+"?qt=tile&x="+C+"&y="+oL+"&z="+T+((i==="default"||typeof i!=="string")?"":("&styleId="+K.mapStyleNameIdPair[i]))+"&styles=pl&udt="+this.normalUdt+"&scaler="+this.scaler+"&p=1";e=e.replace(/-(\d+)/gi,"M$1");return e},getZoomState:function(){var C=this.map;var i=C.getZoom();var e=i-this.lastZoom;if(e>0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState},releaseOutViewTileData:function(e){var oK=this.map._workerMgr.releasePendingData(e);for(var T=0,C=oK.length;T<C;T++){var oL=this.getTileKey(oK[T]);this.tileCache.removeData(oL);this._checkTilesLoaded()}},loadLayerData:function(e,T,i){this.hasZoomChange=i;this.curViewTilesInfo=e;if(this.ontology instanceof gg){this.loadTileData&&this.loadTileData(e,T);return}if(this.ontology instanceof fl){this.loadTileData&&this.loadTileData(e,T);return}this.mapStyleId=this.map.getMapStyleId();this.releaseOutViewTileData(e);var C=this.getZoomState();if(this.dataType===lf){if(T){this.getVectorLayerDataFromCache(e,C)}else{this.loadVectorLayerData(e)}}else{this.loadRasterLayerData(e,T)}},getVectorLayerDataFromCache:function(oP,o0){if(!this.map||this.map._destroyed||!this.map._customLabelMgr){return}this.map.temp.isPermitSpotOver=false;this.tileLabels=[];var o3=this.map._displayOptions;if(this.mapType===lg){var oT=this.map._customLabelMgr.virtualTiles.custom;if(oT&&oT instanceof Array){for(var oY=0;oY<oT.length;oY++){this.tileLabels.push(oT[oY].label);if(!oT[oY].label.iconReady){var oV=false;var o2=oT[oY].label.fixedLabel;for(var oX=0;oX<o2.length;oX++){var oO=o2[oX];if(!oO.iconPos){continue}else{if(!oO.iconPos.texcoord){oV=true;break}}}if(!oV){oT[oY].label.iconReady=true}else{oT[oY].label.iconReady=false;this.updateAllIconsTextureCoords(oT[oY])}}}}}this.thumbCache={};var o1=-1;for(var oY=0,oU=oP.length;oY<oU;oY++){var oZ=oP[oY];var oK=oZ.col;var oL=oZ.row;var C=oZ.zoom;var oW=this._getTileTexImgKey(oZ);var T=oZ.useZoom;o1=C;var oM=this.getTileKey(oZ);var o5=this.tileCache.getData(oM);if(o5&&o5.status==="ready"){var o6=o5;this.map._featureMgr.setData(o5,this.drawIndex,2);if(o3.poi&&o5.label){if(o5.label.status==="ready"){o5.label.tileInfo=o5.tileInfo;this.tileLabels.push(o5.label);if(o5.label.textureSources&&o5.label.textureSources[T]&&this.map._webglMapScene){var o4=this.map._webglMapScene._painter;if(!o4._labelTextureAtlasOffset[oW]){o4._addToAsyncJob(o5.label.textureSources[T])}}}else{if(o5.label.status!=="processing"){this.processLabelData(o5)}}}}else{if(this.useThumbData){if(this.thumbUpsample){this._setThumbDataUpsample(oK,oL,C,T,o0,oM,oZ)}else{this._setDumbTileData(oM,oZ);this.setThumbData(oK,oL,C,T,o0)}}else{this._setDumbTileData(oM,oZ)}}}this.tileLabels.labelZoom=o1;this.updateLabels(o0);var oQ=this.map.getZoom();var oN=Math.floor(oQ);var oS=oQ-oN;var oR=Math.floor(this.LAST_CALC_ZOOM);var e=this.LAST_CALC_ZOOM-oR;var o7=false;if(this.hasZoomChange){if(Math.abs(oQ-this.LAST_CALC_ZOOM)>=0.5){o7=true}else{if(oS<0.5&&e>=0.5){o7=true}else{if(oS>=0.5&&e<0.5){o7=true}}}if(o7){this.cacheDataCollideLabels(0)}this.LAST_CALC_ZOOM=oQ}else{if(this.tileLabels.length>0){this.cacheDataCollideLabels(hv.Browser.ie?50:30)}}},loadVectorLayerData:function(oP){this.map.temp.isPermitSpotOver=false;var oO=this;function oN(i,oS){var oV=oO.tileCache.getData(oS);if(!oV){return}if(!i||i.error){if(i.event){var oR=JSON.parse(i.event.msg||"{}");if(oR.status===403){if(c0.business===0&&c0.unauth===1){oO.watermarkTileKeys.push(oS);oO._checkTilesLoaded()}}cv.fetchDebug&&cv.fetchDebug.sendError({title:i.event.title,msg:i.event.msg,category:cv.fetchDebug.category.AJAX,level:cv.fetchDebug.levels.ERROR,url:i.event.title})}bj=true;if(oO.map.stickySpamCtrl&&c0.business===0&&c0.unauth===1){dZ(jC,{from:"vtile"});oO.map.stickySpamCtrl.update(jC)}var oU=new ix("ontileloaderror");i=i||{};oU.error=i.error||"";oU.message=i.message||"";oO.map.fire(oU);if(c0.business!==0||c0.unauth!==1){oV.status="init";oV.reloadTimer=setTimeout(function(){if(oV.retry<3){oV.retry++;oV.status="loading";oO.loadVectorTileData(i.tileInfo,oN)}else{oO.tileCache.removeData(oS);oO._checkTilesLoaded()}},4000)}if(oO.map._featureMgr){oO.map._featureMgr.clearData(oO.drawIndex)}oO.getVectorLayerDataFromCache(oO.curViewTilesInfo,oO.getZoomState());return}if(oV.reloadTimer){clearTimeout(oV.reloadTimer);oV.reloadTimer=null}var oQ=oO.map._displayOptions.language||"zh";var oT=i.tileInfo.language||"zh";if(oT!==oQ){oO.tileCache.removeData(oS);oO._checkTilesLoaded();return}oO.callbackDataQueue.push([i,oS]);if(oO.processDataTimer){return}oO.processDataTimer=setTimeout(function(){while(oO.callbackDataQueue.length>0){var oX=oO.callbackDataQueue.shift();var oY=oO.map._displayOptions.language||"zh";var oZ=oX[0].tileInfo.language||"zh";if(oZ!==oY){oO.tileCache.removeData(oS)}else{oO.vectorTileDataCbk(oX[0],oX[1])}oO._checkTilesLoaded()}if(oO.map._featureMgr){oO.map._featureMgr.clearData(oO.drawIndex)}oO.getVectorLayerDataFromCache(oO.curViewTilesInfo,oO.getZoomState());var oW=new ix("onrefresh");oW.source="webgllayer";oO.map.dispatchEvent(oW);oO.processDataTimer=null},200)}for(var oM=0,oK=oP.length;oM<oK;oM++){var C=oP[oM];var oL=this.getTileKey(C);var e=this.tileCache.getData(oL);if(!e){e={status:"init",tileInfo:C,dataType:lf,key:oL,retry:0}}if(e.status!=="ready"&&e.status!=="loading"){this.numLoading++;this.numTileLoading++;e.status="loading";this.tileCache.setData(oL,e);var T=this.getProcessedLabelZoom(C);if(T){C.processedLabelZooms=T}this.loadVectorTileData(C,oN)}}},setThumbData:function(C,oN,oL,i,oK){var oM=this.thumbParentDepth||8;var T=this.thumbChildDepth||3;var e=false;if(oK===1){e=this._findParentZoomTile(C,oN,oL,i,oM)!==false;if(!e){e=this._findChildZoomTile(C,oN,oL,i,T)!==false}}else{if(oK===-1){e=this._findChildZoomTile(C,oN,oL,i,T)!==false;if(!e){e=this._findParentZoomTile(C,oN,oL,i,oM)!==false}}}this.map._featureMgr.sortThumbData(this.drawIndex);return e},_setThumbDataUpsample:function(T,oQ,oP,e,oM,oN,i){if(oM!==1&&oM!==-1){return false}var C=this.thumbParentDepth||8;var oK=this.thumbChildDepth||3;var oO=false;var oL=false;if(oM===1){oO=this._findParentZoomTileUpsample(T,oQ,oP,e,C,oN,i)!==false;if(!oO){oL=this._findChildZoomTileUpsample(T,oQ,oP,e,oK)}}else{oL=this._findChildZoomTileUpsample(T,oQ,oP,e,oK);if(!oL){oO=this._findParentZoomTileUpsample(T,oQ,oP,e,C,oN,i)!==false}}if(!oO&&!oL){this._setDumbTileData(oN,i)}return oO},_findParentZoomTile:function(oM,oV,oU,oK,oP){var oL=gA[this.getMapType()];var C=oL.minDataZoom;var e=oM;var oS=oV;var oQ=oU;var oR=oK;for(var oO=1;oO<=oP;oO++){var T=this.tileType.getParentTile(e,oS,oQ,oR,C);if(T===null){continue}var oT=this.getTileKey(T);var oN=this.tileCache.getData(oT);if(oN&&oN.status==="ready"){if(this.thumbCache[oT]){continue}this.map._featureMgr.setData(oN,this.drawIndex,0);this.thumbCache[oT]=true;return true}e=T.col;oS=T.row;oQ=T.zoom;oR=T.useZoom}return false},_findChildZoomTile:function(C,oM,T,i,oL){var oK=gA[this.getMapType()];var e=this.thumbMaxZoom||oK.maxDataZoom;return this._findChildZoomTileRecursive(C,oM,T,i,oL,e)},_findChildZoomTileRecursive:function(T,oS,oQ,i,e,oP){if(e<=0){return false}var oO=this.tileType.getChildTiles(T,oS,oQ,i,oP,1);if(!oO){return false}var oK=true;for(var oM=0;oM<oO.length;oM++){var oR=oO[oM];var C=this.getTileKey(oR);var oN=this.tileCache.getData(C);if(oN&&oN.status==="ready"){if(!this.thumbCache[C]){this.map._featureMgr.setData(oN,this.drawIndex,1);this.thumbCache[C]=true}}else{var oL=this._findChildZoomTileRecursive(oR.col,oR.row,oR.zoom,oR.useZoom,e-1,oP);if(!oL){oK=false}}}return oK},_setDumbTileData:function(C,e){var i={tileInfo:e,dataType:lf,key:C};this.map._featureMgr.setData(i,this.drawIndex,2)},_calcThumbUV:function(oN,T,oP,e,oR,i){var oO;if(this.tileType._name==="na"){oO=this.tileType.getFactorByZooms(i,oP)}else{var oQ=oP-i;oO=Math.pow(2,oQ)}var C=1/oO;var oK=(oN-e*oO)*C;var oL=T-oR*oO;var oM=(oO-1-oL)*C;return{u0:oK,v0:oM,u1:oK+C,v1:oM+C}},_findParentZoomTileUpsample:function(oN,oX,oW,oK,oQ,oL,oS){var oM=gA[this.getMapType()];var C=oM.minDataZoom;var e=oN;var oU=oX;var oR=oW;var oT=oK;for(var oP=1;oP<=oQ;oP++){var T=this.tileType.getParentTile(e,oU,oR,oT,C);if(T===null){continue}var oV=this.getTileKey(T);var oO=this.tileCache.getData(oV);if(oO&&oO.status==="ready"){if(this.thumbCache[oL]){return true}if(this._placeUpsampleThumb(oO,T,oL,oS)){this.thumbCache[oL]=true;return true}}e=T.col;oU=T.row;oR=T.zoom;oT=T.useZoom}return false},_placeUpsampleThumb:function(oL,oM,C,oN){var i=this._calcThumbUV(oN.col,oN.row,oN.zoom,oM.col,oM.row,oM.zoom);var e=this._calcXYZTileVertex(oN,oN.tileSize||256,this.height);if(!e){return false}var T;if(e.length===30){T=[e[0],e[1],e[2],i.u0,i.v0,e[5],e[6],e[7],i.u1,i.v0,e[10],e[11],e[12],i.u1,i.v1,e[15],e[16],e[17],i.u0,i.v0,e[20],e[21],e[22],i.u1,i.v1,e[25],e[26],e[27],i.u0,i.v1]}else{T=new Float32Array(e.length);for(var oK=0;oK<e.length;oK+=5){T[oK]=e[oK];T[oK+1]=e[oK+1];T[oK+2]=e[oK+2];var oQ=e[oK+3];var oP=e[oK+4];T[oK+3]=i.u0+oQ*(i.u1-i.u0);T[oK+4]=i.v0+oP*(i.v1-i.v0)}}var oO={key:C,tileInfo:oN,textureSource:oL.textureSource,dataType:jK,renderData:{vertexAll:T},srcTile:oL};this.map._featureMgr.setData(oO,this.drawIndex,2);return true},_findChildZoomTileUpsample:function(C,oN,oK,i,oM){var oL=gA[this.getMapType()];var e=this.thumbMaxZoom||oL.maxDataZoom;var T=this._findChildZoomTileRecursiveUpsample(C,oN,oK,i,oM,e);return T},_findChildZoomTileRecursiveUpsample:function(oK,oS,oQ,C,i,oO){if(i<=0){return false}var oN=this.tileType.getChildTiles(oK,oS,oQ,C,oO,1);if(!oN){return false}var e=false;for(var oL=0;oL<oN.length;oL++){var oR=oN[oL];var T=this.getTileKey(oR);var oM=this.tileCache.getData(T);if(oM&&oM.status==="ready"){e=true;if(!this.thumbCache[T]){this.map._featureMgr.setData(oM,this.drawIndex,1);this.thumbCache[T]=true}}else{var oP=this._findChildZoomTileRecursiveUpsample(oR.col,oR.row,oR.zoom,oR.useZoom,i-1,oO);if(oP){e=true}}}return e},_fillHoldoverTiles:function(oP){if(!oP||!oP.length||!this._lastScreenTiles){return}var e=Object.keys(this._lastScreenTiles);if(!e.length){return}var oX=false;for(var oO=0;oO<oP.length;oO++){var T=oP[oO];var oL=T.col;var oW=T.row;var oV=T.zoom;var oM=false;var C=null;for(var oN=0;oN<e.length;oN++){var oU=this._lastScreenTiles[e[oN]];var oT=oU.zoom-oV;if(oT===0){if(oU.col===oL&&oU.row===oW){if(!this.thumbCache[oU.key]){this.map._featureMgr.setData(oU.tile,this.drawIndex,1);this.thumbCache[oU.key]=true;oX=true}oM=true}}else{if(oT>0){var oR=Math.pow(2,oT);if(Math.floor(oU.col/oR)===oL&&Math.floor(oU.row/oR)===oW){if(!this.thumbCache[oU.key]){this.map._featureMgr.setData(oU.tile,this.drawIndex,1);this.thumbCache[oU.key]=true;oX=true}}}else{if(oT<0){var oQ=Math.pow(2,-oT);if(Math.floor(oL/oQ)===oU.col&&Math.floor(oW/oQ)===oU.row){if(!C||oU.zoom>C.zoom){C=oU}}}}}}if(!oM&&C){var oK=this.getTileKey(T);if(!this.thumbCache[oK]&&this._placeUpsampleThumb(C.tile,C.tile.tileInfo,oK,T)){this.thumbCache[oK]=true;oX=true}}}if(oX){this.map._featureMgr.sortThumbData(this.drawIndex);var oS=this.map._featureMgr.result.bkData[this.drawIndex];if(oS&&oS[1]&&oS[1].length>1){oS[1].sort(function(oY,i){return oY.tileInfo.useZoom-i.tileInfo.useZoom})}}},_recordScreenTiles:function(){var oP=this.map._featureMgr.result.bkData[this.drawIndex];if(!oP){return}var oN={};var oK=0;for(var oQ=0;oQ<3;oQ++){var e=oP[oQ];if(!e){continue}for(var T=0;T<e.length;T++){var oM=e[T];if(!oM||!oM.tileInfo||!oM.textureSource){continue}var oL=oM.srcTile||oM;var C=oL.tileInfo;var oO=oL.key||this.getTileKey(C);if(oN[oO]){continue}oN[oO]={key:oO,col:C.col,row:C.row,zoom:C.zoom,tile:oL};oK++}}if(oK===0&&this._lastScreenTiles&&Object.keys(this._lastScreenTiles).length>0){return}this._lastScreenTiles=oN},loadVectorTileData:function(oW,oX){var oK=oW.col;var oL=oW.row;var e=oW.zoom;var oU=oW.baseTileSize;var T=this.getTilesUrl(new hV(oK,oL),e,oU);var oM=this.map.getPrivateRegions();if(!this.processData&&this.map.getPrivateStatus()&&oM){var oS=oW.useZoom;var oR=this.tileType.getMercatorSize(oS);var oQ=oK*oR;var oP=oL*oR;var oT=new d9(oQ+oR/2,oP+oR/2);var oO=new lz(new d9(oQ,oP),new d9(oQ+oR,oP+oR));var oN=ja()>=1.5?2:1;for(var oV=0;oV<oM.length;oV++){if(oM[oV] instanceof es){if(oM[oV].crossPoint(oT,oO,oS)){var oY={x:oK,y:oL,z:e,mapZoom:oS,scalerRadio:oN,textimg:this.map.config.textRenderType==="canvas"?0:1};var C=oM[oV].tileUrlFunction(T,oY);if(C&&C.url){T=C.url;C.header&&(oW.header=C.header)}break}}}}if(!T){return}var o0=this.getTileKey(oW);kB(this.map);if(!this.processData){if(!this.map||!this.map._workerMgr){return}this.map._workerMgr.loadTileData(T,oW,o0,oX);return}var oX="cbk"+o0.replace(/-/g,"_");var oZ=this;cv[oX]=function(i){var o1=(function(o2){return function(){o2.tileInfo=oW;var o8=oZ.processData(o2);if(!o8.road){return}var o5={tileInfo:oW,renderData:{base:[]},status:"ready",key:o0,mapType:oZ.mapType};var pb=[];var pe=[];for(var o7=0;o7<o8.road.length;o7++){var pa=o8.road[o7];var o9=-1;for(var o6=0;o6<pa.length;o6++){var pc=pa[o6];var pd=[];if(pb.length/7+pc[0].length/2>65536){o5.renderData.base.push({type:"line",data:[jl.toTileSolidLineVertices(pb,4000),new Uint16Array(pe)]});pb=[];pe=[]}for(var o4=0;o4<pc[0].length;o4+=2){pd[pd.length]=[pc[0][o4],pc[0][o4+1]]}var o3=pc[3];jl.buildData(pd,pc[1],pc[2],pb,pe,o3,pc[4],o7+20)}o5.renderData.base.push({type:"line",data:[jl.toTileSolidLineVertices(pb,4000),new Uint16Array(pe)]})}oZ.tileCache.setData(o0,o5);if(oZ.map._featureMgr){oZ.map._featureMgr.clearData(oZ.drawIndex)}oZ.getVectorLayerDataFromCache(oZ.curViewTilesInfo,oZ.getZoomState());oZ.map.dispatchEvent(new ix("onrefresh"))}})(i);oZ.map.jobScheduler.addJob(o1);delete cv[oX]};T+="&fn="+encodeURIComponent(h6+"."+oX);jW.load(T)},vectorTileDataCbk:function(T,oK){var oO=new ix("ontileloaded");oO.perfStat=T.perfStat||[];var e=this.map;e.fire(oO);var i=T.tileInfo;var C=i.col;var oT=i.row;var oS=i.zoom;var oR=i.baseTileSize;var oM=this.tileCache.getData(oK);if(!oM){return}if(!this.showLabel){T.label=null}oM.renderData=T;oM.tileInfo=i;var oL=hz.calcLoopParam(C,oS,oR);var oP=oL.geoOffsetX;oM.tileInfo.loopOffsetX=oP;oM.status="ready";oM.mapType=this.mapType;this.tileCache.setData(oK,oM);oM.label=T.label;T.label=null;if(T.indoorData&&e._indoorMgr){e._indoorMgr.setData(T.indoorData)}var oN="id_"+C+"_"+oT+"_"+oS;if(!this.curViewTilesInfo[oN]){e.fire(new ix("ontilenotinview"));return}var oQ=e._displayOptions;if(oQ.poi){this.processLabelData(oM)}if(T.indoorData&&e._indoorMgr&&e._indoorMgr.currentUid){this._refreshIndoorData(e._indoorMgr.currentUid,e._indoorMgr.currentFloor)}},_refreshIndoorData:function(oR,oQ){var oT=this.map._indoorMgr.getIndoorData(oR);if(this.map&&this.map.parking){this.map.parking.currentUid=oR;this.map.parking.currentFloor=oQ}var oW=oT.tileKeys;var oU=Math.floor(this.map.getZoom());for(var oO=0;oO<oW.length;oO++){var oL=oW[oO];var oN=this.tileCache.getData(oL);if(!oN||!oN.renderData){continue}var oV=oN.renderData;if(!oV){continue}oV.indoorBase=[];oV.indoorBaseContour=[];oV.indoorBorder3D=[];oV.indoorArea3D=[];oN.label.indoorLabel=[];this.labelProcessor.clearCollisionCache(oN.label);for(var oP in oV.indoorData){if(oP==="tileInfo"){continue}var e=oV.indoorData[oP];var oK=e.defaultFloor;if(oP===oR){oK=oQ;e.currentFloor=oQ}if(e.floors[oK]){if(e.floors[oK].base){for(var oM=0;oM<e.floors[oK].base.length;oM++){oV.indoorBase.push(e.floors[oK].base[oM])}}if(e.floors[oK].contour){for(var oM=0;oM<e.floors[oK].contour.length;oM++){oV.indoorBaseContour.push(e.floors[oK].contour[oM])}}if(e.floors[oK].indoorBorder3D){oV.indoorBorder3D.push(e.floors[oK].indoorBorder3D)}if(e.floors[oK].area3D){oV.indoorArea3D.push(e.floors[oK].area3D)}if(e.floors[oK].pois){oN.label.indoorLabel=oN.label.indoorLabel.concat(e.floors[oK].pois)}}}this.updateAllIconsTextureCoords(oN);var oS=this;this.labelProcessor.loadIconImages(oN,function(i){oS.updateAllIconsTextureCoords(i)},"indoor");var T=oL.split("_");var C=parseInt(T[T.length-1],10);if(C!==oU){continue}oS.map._featureMgr.setData(oN,this.drawIndex,2)}this.dataBackCollideLabels();this.map.dispatchEvent(new ix("onrefresh"))},_removeIndoorData:function(i){if(!i.indoorData){return}for(var e in i.indoorData){if(e==="tileInfo"){continue}this.map._indoorMgr.removeData(e,i.key)}},getProcessedLabelZoom:function(T){var oK=oG.baseZoomInfo[T.zoom];if(!oK){return false}var C=[];for(var oL=0;oL<oK.length;oL++){var oM=this.getTileKey(T,{useZoom:oK[oL]});var e=this.tileCache.getData(oM);if(e&&e.status==="ready"&&e.label&&e.label.status==="ready"){C.push(oK[oL])}}if(C.length){return C}else{return false}},getSameZoomDataFromCache:function(C){var T=oG.baseZoomInfo[C.zoom];for(var oK=0;oK<T.length;oK++){var oL=this.getTileKey(C,{useZoom:T[oK]});if(C.useZoom===T[oK]){continue}var e=this.tileCache.getData(oL);if(e&&e.status==="ready"&&e.label&&e.label.status==="ready"){return e}}return false},hasSameLabelData:function(T,C){for(var e=0;e<C.length;e++){if(C[e].key===T){return true}}return false},getDataByFloorName:function(C,T){for(var e=0;e<C.length;e++){if(C[e].floorName===T){return C[e]}}return null},mergeIndoorLabelData:function(oO,e){for(var oM in oO){if(oM==="tileInfo"){continue}if(e[oM]){var C=oO[oM].floors;var oP=e[oM].floors;for(var oK=0;oK<C.length;oK++){var T=C[oK];var oN=T.floorName;var oL=this.getDataByFloorName(oP,oN);if(oL){if(oL.pois){oL.pois=oL.pois.concat(T.pois);T.pois=oL.pois}else{oL.pois=T.pois}}}}}},mergeSameZoomLabelData:function(oM){var oK=oM.label;if(!oK){return}var e=oM.tileInfo;var oL=this.getSameZoomDataFromCache(e);if(!oL){return}var T=oL.label;if(!T){return}for(var C=0;C<oK.fixedLabel.length;C++){if(!this.hasSameLabelData(oK.fixedLabel[C].key,T.fixedLabel)){T.hasNewData=true;T.fixedLabel.push(oK.fixedLabel[C])}}for(var C=0;C<oK.lineLabel.length;C++){if(!this.hasSameLabelData(oK.lineLabel[C].key,T.lineLabel)){T.hasNewData=true;T.lineLabel.push(oK.lineLabel[C])}}for(var C=0;C<oK.indoorLabel.length;C++){if(!this.hasSameLabelData(oK.indoorLabel[C].key,T.indoorLabel)){T.hasNewData=true;T.indoorLabel.push(oK.indoorLabel[C])}}oM.label=T;if(oL.renderData.indoorData&&oM.renderData.indoorData){this.mergeIndoorLabelData(oM.renderData.indoorData,oL.renderData.indoorData)}},processLabelData:function(oL){if(!oL.label){return}if(oL.label.status==="processing"){return}oL.label.fixedLabel.sort(function(oN,oM){return oM.rank-oN.rank});oL.label.status="processing";var T=this;T.updateAllIconsTextureCoords(oL);this.labelProcessor.loadIconImages(oL,function(oM){T.updateAllIconsTextureCoords(oM)});if(this.map.config.textRenderType==="canvas"){var e=this.labelProcessor.drawLabelsOnCanvas(oL,function(oO,oQ){var oN=oL.tileInfo;var oP=T.map.config.mapStyleId;if(!cv["customStyleInfo_"+oP]){T.mergeSameZoomLabelData(oL)}if(oO){if(!oL.label.textureHeights){oL.label.textureHeights=[]}oL.label.textureHeights[oN.useZoom]=oO.height}if(oQ){if(!oL.label.indoorTextureHeights){oL.label.indoorTextureHeights=[]}oL.label.indoorTextureHeights[oN.useZoom]=oQ.height}var oM=T._getTileTexImgKey(oN);T._doWorkAfterLabelImageLoad(oL,oO,oQ,oM)});return}var C=oL.label.textImageBitmap||oL.label.textImgStr;var oK=oL.label.indoorTextImageBitmap||oL.label.indoorTextImgStr;this.labelProcessor.loadImgByStr(C,oK,function i(oR,oP){var oO=oL.label.textureHeight;var oS=oL.label.indoorTextureHeight;oL.label.textureHeight=undefined;oL.label.indoorTextureHeight=undefined;var oN=oL.tileInfo;T.mergeSameZoomLabelData(oL);var oQ=oL.label;oQ.textImgStr="";oQ.indoorTextImgStr&&(oQ.indoorTextImgStr="");if(!oQ.textureHeights){oQ.textureHeights=[]}oQ.textureHeights[oN.useZoom]=oO;if(!oQ.indoorTextureHeights){oQ.indoorTextureHeights=[]}oQ.indoorTextureHeights[oN.useZoom]=oS;var oM=T._getTileTexImgKey(oN);T._doWorkAfterLabelImageLoad(oL,oR,oP,oM)})},_getTileTexImgKey:function(i){var C=i.style||this.mapStyleId||"default";var e=C+"_"+i.col+"_"+i.row+"_"+i.zoom;if(this.map.config.textRenderType==="canvas"){e+="_"+i.useZoom}return e},_doWorkAfterLabelImageLoad:function(T,oM,e,oQ){var oL=this;var oO=T.label;oO.tileInfo=T.tileInfo;oO.status="ready";if(oM||e){var C=oO.tileInfo;if(oM){oM.id=oQ;if(!oO.textureSources){oO.textureSources=[]}oO.textureSources[C.useZoom]=oM}if(e){e.id=oQ+"_indoor";if(!oO.indoorTextureSources){oO.indoorTextureSources=[]}oO.indoorTextureSources[C.useZoom]=e}if(oL.map._webglMapScene){var oP=oL.map._webglMapScene._painter;if(oM){oP._addToAsyncJob(oO.textureSources[C.useZoom])}}}if(T.custom!==true){oL.tileLabels.push(oO)}else{if(!oM&&oL.tileLabels){for(var oK=0;oK<oL.tileLabels.length;oK++){var oN=oL.tileLabels[oK];this.labelProcessor.clearCollisionCache(oN)}}setTimeout(function(){oL.updateAllIconsTextureCoords(T);oL.labelProcessor.loadIconImages(T,function(i){oL.updateAllIconsTextureCoords(T)},true);oL.map.dispatchEvent(new ix("onupdate"))},200)}if(oL.collisionTimer){return}oL.collisionTimer=setTimeout(function(){oL.dataBackCollideLabels();oL.collisionTimer=null},300)},_updateIconTextureCoords:function(oN,C){if(!oN){return}var oM=this.map;for(var T=0;T<oN.length;T++){var oL=oN[T];if(!oL.iconPos){continue}if(oM._webglMapScene){var e=oM._webglMapScene._painter;var oK=C+"_"+oL.iconPos.iconType;oL.iconPos.texcoord=e._iconTextureAtlasCoords[oK]||null}}},updateAllIconsTextureCoords:function(oK){if(this.map.viewAnimationTime){return}if(oK){if(oK.label){var i=oK.tileInfo.style;this._updateIconTextureCoords(oK.label.fixedLabel,i);this._updateIconTextureCoords(oK.label.indoorLabel,i)}}else{var T=this.tileCache.getAllData();for(var C in T){var e=T[C].data;if(e.status==="ready"&&e.label){var i=e.tileInfo.style;this._updateIconTextureCoords(e.label.fixedLabel,i);this._updateIconTextureCoords(e.label.indoorLabel,i)}}}this.updateLabels();this.map.dispatchEvent(new ix("onrefresh"))},cacheDataCollideLabels:function(C){var oK=this;var i=this.map._featureMgr;function T(){if(oK&&!oK.map.tileMgr&&!oK.map.tileMgr.isExitTileLayer(oK)){return}oK.cacheLabelTimer=null;var oL;var oM=oK.map.getTilt();var oO=oK.map.getHeading()%360;if(oK.tileLabels.length===0||(oK.tileLabels.length===1&&oK.tileLabels[0].tileInfo.zoom===0)){oL=i.getLabelData(oK.drawIndex);if(oL.length>0){oL=oK.labelProcessor.collisionTest(oL,-1)}}else{if(oM||oO){if(this._collisionTimer){if(!oM){clearTimeout(this._collisionTimer)}else{if(Date.now()-oK.lastCollisionTestTime>500){oK.lastCollisionTestTime=Date.now()}else{clearTimeout(this._collisionTimer)}}}this._collisionTimer=setTimeout(function(){if(oK&&!oK.map.tileMgr&&!oK.map.tileMgr.isExitTileLayer(oK)){oK._collisionTimer=null;return}oL=oK.labelProcessor.collisionTest(oK.tileLabels);if(oL){if(oK._isInnerLayer&&oK.map.stencil&&oK.map.stencil.isPoiMask){var oP=oK.isPoiInPolygon(oL);i.setLabelData(oP,oK.drawIndex)}else{i.setLabelData(oL,oK.drawIndex)}}oK.updateLabels();oK.map.dispatchEvent(new ix("onrefresh"));oK._collisionTimer=null},60);return}else{oL=oK.labelProcessor.getCachedLabels(oK.tileLabels)}}if(oL){if(oK._isInnerLayer&&oK.map.stencil&&oK.map.stencil.isPoiMask){var oN=oK.isPoiInPolygon(oL);i.setLabelData(oN,oK.drawIndex)}else{i.setLabelData(oL,oK.drawIndex)}}oK.updateLabels();oK.map.dispatchEvent(new ix("onrefresh"))}if(!C){clearTimeout(oK.cacheLabelTimer);T()}else{if(oK.cacheLabelTimer){return}oK.cacheLabelTimer=setTimeout(function e(){T()},C)}},isPoiInPolygon:function(C){var o5=this;var oT=o5.map.stencil;var oL=o5.map._featureMgr.result.eleData[9];var oK=[];var T=false;for(var oZ=0;oZ<oL.length;oZ++){var o4=oL[oZ].overlay;var o6=oL[oZ].overlays;if(o6&&o6.length>1){T=true;for(var oW=0;oW<o6.length;oW++){var oU=o6[oW].points;oK=oK.concat([oU])}}else{var oU=o4.points;oK=oK.concat(oU)}}for(var o2=0;o2<C.length;o2++){var oN=[];var oM=[];for(var o1=0;o1<C[o2].fixedLabel.length;o1++){var oS=C[o2].fixedLabel[o1];var oY=oS.pt;if(oS.pt&&aV(oY,oK,T)){oN.push(oS)}else{oM.push(oS)}}if(oT.showRegion==="inside"){C[o2].fixedLabel=oN}else{if(oT.showRegion==="outside"){C[o2].fixedLabel=oM}}var oX=[];var oP=[];for(var oZ=0;oZ<C[o2].lineLabel.length;oZ++){var o0=C[o2].lineLabel[oZ];var e=o0.pt;if(e&&aV(e,oK,T)){oX.push(o0)}else{oP.push(o0)}}if(oT.showRegion==="inside"){C[o2].lineLabel=oX}else{if(oT.showRegion==="outside"){C[o2].lineLabel=oP}}var oV=[];var oR=[];for(var oQ=0;oQ<C[o2].indoorLabel.length;oQ++){var o3=C[o2].indoorLabel[oQ];var oO=o3.pt;if(oO&&aV(oO,oK,T)){oV.push(o3)}else{oR.push(o3)}}if(oT.showRegion==="inside"){C[o2].indoorLabel=oV}else{if(oT.showRegion==="outside"){C[o2].indoorLabel=oR}}}return C},dataBackCollideLabels:function(){var C=this;if(!C.map||C.map._destroyed){return}if(!C.map.tileMgr||!C.map.tileMgr.isExitTileLayer(C)){return}if(!C.tileLabels||(C.tileLabels&&C.tileLabels.length===0)){return}var e;C.labelProcessor.calcLabelsCollision(C.tileLabels);e=C.labelProcessor.getCachedLabels(C.tileLabels);if(e){if(C._isInnerLayer&&C.map.stencil&&C.map.stencil.isPoiMask){var i=C.isPoiInPolygon(e);C.map._featureMgr.setLabelData(i,C.drawIndex)}else{C.map._featureMgr.setLabelData(e,C.drawIndex)}}C.updateLabels();C.map.dispatchEvent(new ix("onupdate"));if(c9()){this.labelProcessor._refreshSpotData()}},updateLabels:function(oK){var oL=this.map;if(!oL._featureMgr){return}var i=oL._featureMgr;var C=i.getLabelData(this.drawIndex);if(C.length>0){var T=oL.getZoom();if(C.labelZoom-T<3){this.labelProcessor.updateLabels(C);var e=this.labelProcessor.fixDataFormat(C);i.setOverlayData(e[0],2,this.drawIndex);i.setOverlayData(e[1],3,this.drawIndex);i.setOverlayData(e[2],4,this.drawIndex)}else{i.clearLabelOverlayData(this.drawIndex)}oL.temp.isPermitSpotOver=false;this.labelProcessor.curSpotAdded=false}},loadRasterLayerData:function(oR,T){this.thumbCache={};var oS=this.getZoomState();if(T){var oQ=this.useThumbData&&this.thumbUpsample&&this.tileType.getName()==="xyz";var oO=oQ?[]:null;for(var oM=0,oK=oR.length;oM<oK;oM++){var C=oR[oM];var oL=this.getTileKey(C);var e=this.tileCache.getData(oL);if(e&&e.status==="ready"){if(C.tileTypeName==="xyz"){e.tileInfo=C}this.map._featureMgr.setData(e,this.drawIndex,2)}else{if(this.useThumbData){var oN=false;if(this.thumbUpsample){oN=this._setThumbDataUpsample(C.col,C.row,C.zoom,C.useZoom,oS,oL,C)}else{oN=this.setThumbData(C.col,C.row,C.zoom,C.useZoom,oS)}if(oO&&!oN){oO.push(C)}}}}if(oQ){this._fillHoldoverTiles(oO);this._recordScreenTiles()}return}for(var oM=0,oK=oR.length;oM<oK;oM++){var C=oR[oM];var oL=this.getTileKey(C);var e=this.tileCache.getData(oL);if(!e){this.numTileLoading++;this.tileCache.setData(oL,{});var oP=this;this.loadRasterTileData(C,function(i,oT){oP._checkLayerTilesLoaded();oP.rasterTileDataCbk(i,oT)})}}},loadRasterTileData:function(i,e){var T=i.col;var oM=i.row;var oK=i.zoom;var C=this.getTilesUrl(new hV(T,oM),oK,i);if(!C){var oL=this.getTileKey(i);this.tileCache.removeData(oL);e&&e(null,oL);return}if(C.indexOf("apimaponline")>-1){C+="&ak="+hj+"&is_has_bmap_proxy="+k1+"&from=gl"}var oL=this.getTileKey(i);this.loadTileImage(C,oL,e,i)},loadTileImage:function(oN,C,oL,e){var T=new Image();T.crossOrigin="anonymous";T.tileInfo=e;var oK;var oM=this;function oO(){if(oM.retry){oK&&clearInterval(oK);oK=null}}if(this.retry){var i=1;oK=setInterval(function(){if(i>3){oO();return}if(e.tileLoadFunction){e.tileLoadFunction(T,oN)}else{T.src=oN}i++},this.retryTime)}T.onload=function(){oO();oL&&oL(this,C)};T.onerror=function(){oO();cv.fetchDebug&&cv.fetchDebug.sendError({title:oN,msg:oN,category:cv.fetchDebug.category.RESOURCE,level:cv.fetchDebug.levels.ERROR,url:oN});oL&&oL(null,C)};if(e.tileLoadFunction){e.tileLoadFunction(T,oN)}else{T.src=oN}return T},_calcXYZTileVertex:function(oO,o7,C){var ps=oO.zoom;var oN=oO.col;var oV=oO.row;if(!oO.preciseVertex){return[0,0,C,0,0,o7,0,C,1,0,o7,o7,C,1,1,0,0,C,0,0,o7,o7,C,1,1,0,o7,C,0,1]}var pk=fA.resolutions[Math.floor(ps)];var o8=fA.gridSize;var pp=fA.origin;var o1=Math.pow(2,(18-ps));var pj=pp[0]+oN*o8[0]*pk;var o2=pp[1]-oV*o8[1]*pk;var o3=pj+o8[0]*pk;var pi=o2-o8[1]*pk;if(this.reproject){var pn=fA.toEPSG4326([pj,pi]);var pf=fA.toEPSG4326([o3,o2]);var pl=Math.max(Math.abs(pf[0]-pn[0]),Math.abs(pf[1]-pn[1]));var oM=Math.max(1,Math.min(16,Math.ceil(pl/0.5)));var pc=oM+1;var py=(o3-pj)/oM,px=(o2-pi)/oM;var oT=fA.wgs84ToBd09mc(pn[0],pn[1]);var o5=oT[0]/o1;var o4=oT[1]/o1;oO._tileLBBdPixel=[o5,o4];var oS=this.reprojectSourceCRS==="EPSG4326";var oL=oS?(pf[0]-pn[0]):0;var pr=oS?(pf[1]-pn[1]):0;var oP=pc*pc;var oR=new Float64Array(oP);var oQ=new Float64Array(oP);var oX=new Float64Array(oP);var oU=new Float64Array(oP);for(var T=0;T<=oM;T++){for(var oK=0;oK<=oM;oK++){var pe=fA.toEPSG4326([pj+py*oK,pi+px*T]);var pm=fA.wgs84ToBd09mc(pe[0],pe[1]);var pw=T*pc+oK;oR[pw]=pm[0]/o1-o5;oQ[pw]=pm[1]/o1-o4;if(oS){oX[pw]=(pe[0]-pn[0])/oL;oU[pw]=(pe[1]-pn[1])/pr}else{oX[pw]=oK/oM;oU[pw]=T/oM}}}var pv=oM*oM*30;var pu=new Float32Array(pv);var o0=0;for(var o9=0;o9<oM;o9++){for(var pa=0;pa<oM;pa++){var ph=o9*pc+pa,oY=ph+1,pg=ph+pc,oW=pg+1;pu[o0++]=oR[ph];pu[o0++]=oQ[ph];pu[o0++]=C;pu[o0++]=oX[ph];pu[o0++]=oU[ph];pu[o0++]=oR[oY];pu[o0++]=oQ[oY];pu[o0++]=C;pu[o0++]=oX[oY];pu[o0++]=oU[oY];pu[o0++]=oR[oW];pu[o0++]=oQ[oW];pu[o0++]=C;pu[o0++]=oX[oW];pu[o0++]=oU[oW];pu[o0++]=oR[ph];pu[o0++]=oQ[ph];pu[o0++]=C;pu[o0++]=oX[ph];pu[o0++]=oU[ph];pu[o0++]=oR[oW];pu[o0++]=oQ[oW];pu[o0++]=C;pu[o0++]=oX[oW];pu[o0++]=oU[oW];pu[o0++]=oR[pg];pu[o0++]=oQ[pg];pu[o0++]=C;pu[o0++]=oX[pg];pu[o0++]=oU[pg]}}return pu}var oZ=[[pj,pi],[o3,pi],[o3,o2],[pj,o2]];var pd=fA.toEPSG4326(oZ[0]);var pb=fU.transform(pd,fU.WGS84,fU.BD09LL);var oT=fU.transform(pb,fU.BD09LL,fU.BD09MC);var o5=oT[0]/o1;var o4=oT[1]/o1;oO._tileLBBdPixel=[o5,o4];var o6=[];for(var pt=0;pt<4;pt++){if(pt===0){o6.push({x:0,y:0});continue}var pe=fA.toEPSG4326(oZ[pt]);var e=fU.transform(pe,fU.WGS84,fU.BD09LL);var pm=fU.transform(e,fU.BD09LL,fU.BD09MC);var pq=pm[0]/o1;var po=pm[1]/o1;o6.push({x:pq-o5,y:po-o4})}return[o6[0].x,o6[0].y,C,0,0,o6[1].x,o6[1].y,C,1,0,o6[2].x,o6[2].y,C,1,1,o6[0].x,o6[0].y,C,0,0,o6[2].x,o6[2].y,C,1,1,o6[3].x,o6[3].y,C,0,1]},rasterTileDataCbk:function(oO,oM){if(!oO||typeof oO==="string"){this.tileCache.removeData(oM);return}var T=oO.tileInfo;var oK=T.col;var oV=T.row;var oU=T.zoom;var i=this.tileCache.getData(oM);if(!i){return}var oP="id_"+oK+"_"+oV+"_"+oU;var oT=this;i.dataType=jK;i.tileInfo=T;if(T.tileTypeName==="xyz"){var oS=T.tileSize;i.textureSource=oO;var C=this._calcXYZTileVertex(T,oS,this.height);i.renderData={vertexAll:C};oT.setRasterTileData(oM,i,oP)}else{i.textureSource=oO;var oN=hz.calcLoopParam(oK,oU);var oR=oN.geoOffsetX;oO.tileInfo.loopOffsetX=oR;if(T.combine){var oL=0.0035;if(T.dataIndex>0){var oQ=T.dataIndex/256;i.renderData={vertexAll:[0,0,this.height,0,0,T.dataIndex,0,this.height,oQ-oL,0,T.dataIndex,256,this.height,oQ-oL,1,0,0,this.height,0,0,T.dataIndex,256,this.height,oQ-oL,1,0,256,this.height,0,1]}}else{var e=-T.dataIndex;var oQ=e/256;i.renderData={vertexAll:[e,0,this.height,oQ+oL,0,256,0,this.height,1,0,256,256,this.height,1,1,e,0,this.height,oQ+oL,0,256,256,this.height,1,1,e,256,this.height,oQ+oL,1]}}}else{i.renderData={vertexAll:[0,0,this.height,0,0,256,0,this.height,1,0,256,256,this.height,1,1,0,0,this.height,0,0,256,256,this.height,1,1,0,256,this.height,0,1]}}this.setRasterTileData(oM,i,oP)}},setRasterTileData:function(oK,e,T){e.status="ready";if(this.thumbUpsample){e.key=oK}this.tileCache.setData(oK,e);if(this.tileType.getName()==="xyz"&&this.useThumbData&&this.thumbUpsample&&this._lastScreenTiles&&e.tileInfo){this._lastScreenTiles[oK]={key:oK,col:e.tileInfo.col,row:e.tileInfo.row,zoom:e.tileInfo.zoom,tile:e}}var C=false;if(this.curViewTilesInfo[T]){e.dataType=jK;e.png8=this.png8||false;this.map._featureMgr.setData(e,this.drawIndex,2);C=true;if(!this.thumbUpsample&&this.tileType.getName()==="xyz"&&this.useThumbData){this._clearThumbDataIfReady()}}if(C){var i=new ix("onrefresh");i.source="webgllayer";this.map.dispatchEvent(i)}},_clearThumbDataIfReady:function(){var e=this.map._featureMgr.result.bkData[this.drawIndex];if(!e){return}if(e[2].length>=this.curViewTilesInfo.length){e[0]=[];e[1]=[]}},_checkLayerTilesLoaded:function(){this.numTileLoading--;if(this.firstTileLoad===false){this.dispatchEvent(new ix("ontilesloadstart"));this.firstTileLoad=true}var e=this;if(this.numTileLoading===0){if(this._checkTileLoadedTimer){clearTimeout(this._checkTileLoadedTimer);this._checkTileLoadedTimer=null}this._checkTileLoadedTimer=setTimeout(function(){if(e.numTileLoading===0){e.dispatchEvent(new ix("ontilesloadend"));e.firstTileLoad=false;if(e.tileType.getName()==="xyz"&&e.useThumbData&&e.map&&e.map._featureMgr){var i=e.map._featureMgr.result.bkData[e.drawIndex];var C=i&&(i[0].length||i[1].length);var T=e.curViewTilesInfo?e.curViewTilesInfo.length:0;if(C&&i[2].length>=T){i[0]=[];i[1]=[]}e.map.dispatchEvent(new ix("onrefresh"))}}e._checkTileLoadedTimer=null},60)}},_checkTilesLoaded:function(){this._checkLayerTilesLoaded();this.numLoading--;if(this.map.firstTileLoad===false){if(K.apiVersionIsGL()){this.map.dispatchEvent(new ix("onfirsttilesloaded"));this.map.dispatchEvent(new ix("onfirsttileloaded"))}else{if(!this.map._firstTileLoadedFired){this.map._firstTileLoadedFired=true;this.map.dispatchEvent(new ix("onfirsttilesloaded"));this.map.dispatchEvent(new ix("onfirsttileloaded"))}}this.map.firstTileLoad=true}var e=this;if(this.numLoading===0){if(this._checkLoadedTimer){clearTimeout(this._checkLoadedTimer);this._checkLoadedTimer=null}this._checkLoadedTimer=setTimeout(function(){if(e.numLoading===0){e.map.dispatchEvent(new ix("ontilesloaded"));e.map.firstTileLoad=false}e._checkLoadedTimer=null},60);if(c0.business===0&&c0.unauth===1){e.shuffleTiles()}}},shuffleTiles:function(){var oM=this.watermarkTileKeys;for(var oL=oM.length-1;oL>0;oL--){var oK=Math.floor(Math.random()*(oL+1));var T=oM[oL];oM[oL]=oM[oK];oM[oK]=T}var C=Math.floor(oM.length*c0.watermark_ratio);var oN=[];for(var e=0;e<C;e++){oN.push(oM[e])}this.map._watermarkTileKeys=oN},isClickableLabel:function(e){if(e.isDel){return false}if(e.zoom>9&&!e.guid){return false}if(e.zoom<=9&&!e.name&&!e.guid){return false}return true}};var by=5;var m4=4;var jD=3;var aa=2;var gM=1;var kR=0;function aY(i){this._ratio=ja();this._iconCache={};this._map=i;this._drawingCanvasPool=[];this._drawingCanvasHeight=4096;this._drawingCanvasWidth=512;this._bufferSpan=[5,5];this._debugContainer=null;var e=this;i.addEventListener("onlanguage_change",function(){e._clearLabelTextCanvas()})}hv.extend(aY.prototype,{_loadIcons:function(C,oP,oL){var T=0;var oM=this;var oK=this._map.config.style;for(var oN in C){T++;var oO=new Image();oO.id=oN;oO.crossOrigin="anonymous";oO.onload=function(){oM._iconCache[this.id].loaded=true;T--;if(T===0){oP()}this.onload=null};oO.onerror=function(){oM._iconCache[this.id]=null;T--;if(T===0){oP()}this.onerror=null};if(!oL){var e=K.getIconSetPath(oK)+oN+".png";var i=cw();if(i&&i.udt){e+="?udt="+i.udt}}else{var e=oN}oO.src=e;this._iconCache[oN]={loaded:false,image:oO}}},_getEmptyDrawingCanvas:function(){for(var C=0;C<this._drawingCanvasPool.length;C++){if(this._drawingCanvasPool[C]._free===true){this._drawingCanvasPool[C]._free=false;this._showDebugCanvas();return this._drawingCanvasPool[C]}}var e=this._createNewDrawingCanvas();this._drawingCanvasPool.push(e);e._free=false;this._showDebugCanvas();return e},_clearLabelTextCanvas:function(){var T=this._map;var e=T._displayOptions.isEn;var C=T._displayOptions.isMultiLanguage;var i=e&&C?1024:512;if(this._drawingCanvasWidth===i){return}this._drawingCanvasWidth=i;this._drawingCanvasPool=[]},_createNewDrawingCanvas:function(){var e=da("canvas");e.width=this._drawingCanvasWidth;e.height=this._drawingCanvasHeight;e._free=true;e._id=cv.getGUID();var i=e.getContext("2d",{colorSpace:"display-p3"});i.textBaseline="bottom";i.lineJoin="round";return e},_showDebugCanvas:function(){},drawLabelsOnCanvas:function(o2,T){var oR=o2.label.fixedLabel.slice(0);var oX=o2.label.lineLabel.slice(0);var C=o2.label.indoorLabel.slice(0);if(oR.length===0&&oX.length===0&&C.length===0){T();return}var oM=function(o7,i){return o7.styleId-i.styleId};oX.sort(oM);C.sort(oM);var o0={};var o1=false;var e=this._getEmptyDrawingCanvas();var oW=e.getContext("2d",{colorSpace:"display-p3"});oW.clearRect(0,0,e.width,e.height);var o5=0;var oS=null;var oL=0;if(oR.length>0){while(oL<oR.length&&!oR[oL].styleText[0]){oL++}if(oR[oL]&&oR[oL].styleText[0]){oS=oR[oL].styleText[0].fontSize+oR[oL].styleText[0].haloSize*2}}if(oS===null&&C.length>0){oL=0;while(oL<C.length&&!C[oL].styleText[0]){oL++}if(C[oL]&&C[oL].styleText[0]){oS=C[oL].styleText[0].fontSize+C[oL].styleText[0].haloSize*2}}if(oS===null&&oX.length>0){oL=0;while(oL<oX.length&&!oX[oL].styleText[0]){oL++}if(oX[oL]&&oX[oL].styleText[0]){oS=oX[oL].styleText[0].fontSize+oX[oL].styleText[0].haloSize*2}}if(oS===null||isNaN(oS)){T();return}var oO=0;var oN=oS;oN+=this._bufferSpan[1];var oU={};var o6=0;var oV=[];for(var oZ=0;oZ<oR.length;oZ++){var oQ=oR[oZ];var oT=oQ.name;var oY=oQ.styleText;if(!oT||oY.length===0){continue}var oK=oQ.icon;if(oQ.textOnIcon&&(!this._iconCache[oK]||this._iconCache[oK].loaded===false)){oV.push(oQ);o6++;if(!oU[oK]){oU[oK]=true}continue}var o3=this._drawEachText(oW,oQ,o5,oO,oN,oS,o0);if(!o3){continue}if(o3.overHeight){o1=true;break}oO=o3.curX;oN=o3.curY;oS=o3.curLineHeight;o5=o3.styleId}if(!o1&&C.length>0){o3=this._drawEachTypeOfLabels(oW,C,o5,oO,oN,oS,o0);o5=o3.curStyleId;oO=o3.curX;oN=o3.curY;oS=o3.curLineHeight;o1=o3.overHeight||o1}if(!o1&&oX.length>0){o3=this._drawEachTypeOfLabels(oW,oX,o5,oO,oN,oS,o0);o5=o3.curStyleId;oO=o3.curX;oN=o3.curY;oS=o3.curLineHeight;o1=o3.overHeight||o1}if(!o1&&o6>0){var o4=this;this._loadIcons(oU,function(){o3=o4._drawEachTypeOfLabels(oW,oV,o5,oO,oN,oS,o0);o5=o3.curStyleId;oO=o3.curX;oN=o3.curY;oN+=o4._bufferSpan[1];oS=o3.curLineHeight;o1=o1||o3.overHeight;var i=o4._generateEachLabelCanvas(e,oN,oR,oX,C,o2);T(i[0],i[1])});return}oN+=this._bufferSpan[1];var oP=this._generateEachLabelCanvas(e,oN,oR,oX,C,o2);T(oP[0],oP[1])},drawCustomLabelsOnCanvas:function(oO,oN,C){if(oO.length===0){oN();return}var oL={};var oK=false;for(var T=0;T<oO.length;T++){var oM=null;if(oO[T].textOnIcon&&oO[T].icon){oM=oO[T].icon}if(oM&&!oL[oM]&&(!this._iconCache[oM]||this._iconCache[oM].loaded===false)){oL[oM]=true;oK=true}}var e=this;if(oK){this._loadIcons(oL,function(){e._drawCustomLabel(oO,oN,C)},true)}else{e._drawCustomLabel(oO,oN,C)}},_drawCustomLabel:function(oW,oK,C){var oM;var oL;var oN;var oV;var oY;var e;var oR;var T=0;var oU=oW.length;var oP=C?[]:null;var oQ=this;for(var oS=0;oS<oW.length;oS++){if(!oW[oS].name){continue}var oX=oT(oW[oS]);if(!oX){continue}if(oX.overHeight){if(C){oU=(oS-T);oP.push(oO(T,oU));oR=null;T=oS;oU=oW.length;oS=oS-1}else{break}}oM=oX.curX+this._bufferSpan[0];oL=oX.curY;oN=oX.curLineHeight;oY=oX.styleId}if(!oR){oZ({style:{}})}if(C){oU=oU-T;oP.push(oO(T,oU))}else{oP=oO(T,oU)}oR=null;oK(oP);function oZ(i){oM=0+oQ._bufferSpan[0];oL=((i.style.fontSize||0)+(i.style.haloSize||0)*2)+oQ._bufferSpan[1]||0;oN=oL-oQ._bufferSpan[1];oV={};oY=-1;e=oQ._getEmptyDrawingCanvas();oR=e.getContext("2d",{colorSpace:"display-p3"});oR.clearRect(0,0,e.width,e.height)}function oT(i){if(!oR){oZ(i)}if(C){i.cachedIsDel={}}var o0=oQ._drawEachText(oR,i,oY,oM,oL,oN,oV);return o0}function oO(o4,o3){var o1=oL;var o0=oQ._copyToNewCanvas(e,o1+oQ._bufferSpan[0]);for(var o2=o4;o2<oW.length&&o2<o4+o3;o2++){if(!oW[o2].name&&oW[o2].style.iconSize){oQ._addFixedLabelBounds(oW[o2]);continue}if(!oW[o2].textSize){continue}oQ._updateFixedLabelCoords(oW[o2],o1+oQ._bufferSpan[0]);oQ._addFixedLabelBounds(oW[o2])}o0.range=[o4,o3];return o0}},_drawEachTypeOfLabels:function(oT,oN,oR,T,C,oK,oP){var oL=false;for(var oM=0;oM<oN.length;oM++){var oO=oN[oM];var oS=oO.name;var e=oO.styleText;if(!oS||e.length===0){continue}var oQ=this._drawEachText(oT,oO,oR,T,C,oK,oP);if(!oQ){continue}if(oQ.overHeight){oL=true;return{overHeight:oL,curX:T,curY:C,curLineHeight:oK,curStyleId:oR}}T=oQ.curX+this._bufferSpan[0];C=oQ.curY;oK=oQ.curLineHeight;oR=oQ.styleId}return{overHeight:oL,curX:T,curY:C,curLineHeight:oK,curStyleId:oR}},_drawIndoorTextLabelOnCanvas:function(oK){var e=this._getEmptyDrawingCanvas();var oR=e.getContext("2d",{colorSpace:"display-p3"});oR.clearRect(0,0,e.width,e.height);var oZ=0;var oQ=null;var oP=0;var oN;var oW={};var oV=[];for(var oL in oK){if(oL==="tileInfo"){continue}var T=oK[oL];var oU=T.defaultFloor;var oO=T.floors;for(var oT=0;oT<oO.length;oT++){if(oT===oU){continue}var oX=oO[oT];if(!oX.pois){continue}var oM=oX.pois;for(var oS=0;oS<oM.length;oS++){if(oQ===null&&oM[oS].styleText[0]){oQ=oM[oS].styleText[0].fontSize+oM[oS].styleText[0].haloSize*2;oN=oQ}oV.push(oM[oS])}}}if(oQ===null){return null}oV.sort(function(o0,i){return i.rank-o0.rank||o0.styleId-i.styleId});var oY=this._drawEachTypeOfLabels(oR,oV,oZ,oP,oN,oQ,oW);oZ=oY.curStyleId;oP=oY.curX;oN=oY.curY;oQ=oY.curLineHeight;var C=this._copyToNewCanvas(e,oN);return C},_updateIndoorLabelsCoords:function(oQ,oR){for(var oP in oQ){if(oP==="tileInfo"){continue}var e=oQ[oP];var oL=e.defaultFloor;var oM=e.floors;for(var oN=0;oN<oM.length;oN++){if(oN===oL){continue}var C=oM[oN];if(!C.pois){continue}var oK=C.pois;for(var T=0;T<oK.length;T++){var oO=oK[T];if(oO.name&&(!oO.textSize||oO.textSize.length===0)){oK.splice(T,1);T--;continue}this._updateFixedLabelCoords(oO,oR);this._addFixedLabelBounds(oO)}}}},_generateEachLabelCanvas:function(oM,oL,oN,e,oP,C){oL=Math.min(oL,this._drawingCanvasHeight);var oO=this._copyToNewCanvas(oM,oL);var T=null;if(C.renderData.indoorData){T=this._drawIndoorTextLabelOnCanvas(C.renderData.indoorData);if(T){this._updateIndoorLabelsCoords(C.renderData.indoorData,T.height)}}for(var oK=0;oK<oN.length;oK++){if(!oN[oK].textSize){if(oN[oK].name&&oN[oK].styleText&&oN[oK].styleText.length>0){oN[oK].textPos=null;oN[oK].iconPos=null}continue}this._updateFixedLabelCoords(oN[oK],oL);this._addFixedLabelBounds(oN[oK])}for(var oK=0;oK<oP.length;oK++){if(!oP[oK].textSize){if(oP[oK].name&&oP[oK].styleText&&oP[oK].styleText.length>0){oP[oK].textPos=null;oP[oK].iconPos=null}continue}this._updateFixedLabelCoords(oP[oK],oL);this._addFixedLabelBounds(oP[oK])}for(var oK=0;oK<e.length;oK++){this._updateLineLabelCoords(e[oK],oL)}return[oO,T]},_copyToNewCanvas:function(C,i){if(i===0){return null}var T=da("canvas");T.width=C.width;T.height=i;var e=T.getContext("2d",{colorSpace:"display-p3"});e.drawImage(C,0,0,this._drawingCanvasWidth,i,0,0,this._drawingCanvasWidth,i);T._id=C._id;C._free=true;return T},_drawEachText:function(o2,oN,C,o4,o3,pd,oK){var pc=oN.name;var oS=oN.styleText?oN.styleText[0]:oN.style;if(!oS){return null}var oV=oS.fontSize||0;var ph=oS.fontWeight;var pu=oS.haloSize||0;var pz=oS.padding||[0,0];if(!oX){}if(oS.fontRgba){var pC=oS.fontRgba[3]/255;var oR=[];oR[3]=pC;for(var pB=0;pB<3;pB++){oR[pB]=oS.fontRgba[pB]}}if(oS.haloRgba){var pC=oS.haloRgba[3]/255;var oY=[];oY[3]=pC;for(var pB=0;pB<3;pB++){oY[pB]=oS.haloRgba[pB]}}var po=oR?"rgba("+oR.join(",")+")":oS.color;var oM=oY?"rgba("+oY.join(",")+")":oS.strokeColor;var pw=oN.styleId||0;if(pu>4){pu=4}var pe=[];var o0=[];var pa=0;if(oK&&!oK[pw]){oK[pw]={}}var oU=oV+pu*2+pz[0]*2;var pf=oU;if(oN.containDescendings){pf+=4}if(pu===0){pf+=2}if(oN.textOnIcon){pf=Math.max(pf,oN.iconSize[1])}if(pw!==C||pf>pd){C=pw;if(ph>=10&&ph%10===0){o2.font=ph*10+" "+oV+"px "+this._map.config.fontFamily}else{o2.font=oV+"px "+this._map.config.fontFamily}if(pf>pd){var pb=pf-pd;pd+=pb;o3+=pb}if(pu>0){o2.lineWidth=pu*2;o2.strokeStyle=oM}o2.fillStyle=po}if(oN.type==="line"){var oP=pc.split("");var o6=[];for(var py=0;py<oP.length;py++){var pr=oP[py];var o7;var pi;if(o3+pf+this._bufferSpan[1]>this._drawingCanvasHeight){for(var px=0;px<o6.length;px++){delete oK[pw][o6[px]]}return{overHeight:true,curX:o4,curY:o3,curLineHeight:pd,styleId:pw}}if(oK[pw][pr]){var oX=oK[pw][pr];o7=oX.displaySize;pi=oX.curWordPosition}else{var T=Math.ceil(o2.measureText(pr).width);o4+=this._bufferSpan[0];if(o4+T>this._drawingCanvasWidth){o4=0+this._bufferSpan[0];o3+=pf;o3+=this._bufferSpan[1];pd=pf;if(o3+pf+this._bufferSpan[1]>this._drawingCanvasHeight){for(var px=0;px<o6.length;px++){delete oK[pw][o6[px]]}return{overHeight:true,curX:o4,curY:o3,curLineHeight:pd,styleId:pw}}}var pq=o4;if(pu>0){T+=pu;pq-=Math.round(pu/2);o2.strokeText(pr,o4,o3)}o2.fillText(pr,o4,o3);var pn=[T,pf];o7=[Math.round(pn[0]/2),Math.round(pn[1]/2)];if(oN.containDescendings){pi=[pq,o3-pf+4]}else{pi=[pq,o3-pf]}oK[pw][pr]={displaySize:o7,curWordPosition:pi,totalHeight:pa};o6.push(pr);o4+=T}pe.push(o7);o0.push(pi)}pa=Math.round(pe[0][1])}else{if(oK[pw][pc]){var oX=oK[pw][pc];pe=oX.textSize;o0=oX.labelImagePosition;pa=oX.totalHeight}else{var oW=pc.split("\\");if(oW.length>1&&oN.textOnIcon){var pA=0;var pv=0;var pD=[];var o8=8;for(var py=0;py<oW.length;py++){var pc=oW[py];var oT=Math.ceil(o2.measureText(pc).width);if(oT>pA){pA=oT}pD.push(Math.round(oT/2));pv+=pf}var oQ=pA+2*o8;var pt=pv+2*o8;if(o4+oQ>this._drawingCanvasWidth){o4=0+this._bufferSpan[0];o3+=pd;o3+=this._bufferSpan[1]}var pb=pt-pd;if(pb>0){o3+=pb;pd+=pb}if(o3+this._bufferSpan[1]>this._drawingCanvasHeight){return{overHeight:true,curX:o4,curY:o3-(pb>0?pb:0),curLineHeight:pd-(pb>0?pb:0),styleId:pw}}var pm=o4;var o9=o3-pt;var e=Math.round(oQ/2);var oZ=this._iconCache[oN.icon].image;this.drawStretchedIcon(o2,oZ,[pm,o9],o8,pA,pv);for(var py=0;py<oW.length;py++){var pc=oW[py];var ps=pm+(e-pD[py]);var pp=o9+4+(py+1)*pf;o2.fillText(pc,ps,pp)}pe.push([Math.round(oQ/2),Math.round(pt/2)]);o0.push([pm,o9]);o4+=oQ;pa=Math.round(pt/2)}else{for(var py=0;py<oW.length;py++){var pc=oW[py];var oT=Math.ceil(o2.measureText(pc).width);if(oT>this._drawingCanvasWidth&&oW.length==1){oW[py]=pc.substring(0,Math.floor(pc.length/2));oW[py+1]=pc.substring(Math.floor(pc.length/2));py--;continue}var oQ=oT;var oL=0;if(oN.textOnIcon){oL=10;oQ+=oL*2;if(oN.styleId===519){oQ=oN.iconSize[0];oL=Math.round((oQ-oT)/2)}}if(o4+oQ>this._drawingCanvasWidth){var o5=o3+pf+this._bufferSpan[1];if(o5+this._bufferSpan[1]>this._drawingCanvasHeight){return{overHeight:true,curX:o4,curY:o3,curLineHeight:pd,styleId:pw}}o3=o5;o4=0+this._bufferSpan[0];pd=pf}else{if(o3+this._bufferSpan[1]>this._drawingCanvasHeight){return{overHeight:true,curX:o4,curY:o3,curLineHeight:pd,styleId:pw}}}var pm=o4;var o9=o3-pf;var pl=o4;var pk=o3;if(oN.containDescendings){pk-=4}if(oN.textOnIcon){var pg=false;var oZ=this._iconCache[oN.icon].image;var pj=oN.iconSize.concat([]);if(oU>=pj[1]){pj[1]=oU;pg=true;pf+=oL*2;var pb=pf-pd;if(pb>0){if(o3+pb+this._bufferSpan[1]>this._drawingCanvasHeight){return{overHeight:true,curX:o4,curY:o3,curLineHeight:pd,styleId:pw}}o3+=pb;pd=pf;pk+=(pb-oL);o9+=(pb-oL*2)}else{pk-=oL;o9-=oL*2}}if(oT>=pj[0]){pj[0]=oT}if(oN.styleId===519){o2.drawImage(oZ,0,0,pj[0],pj[1],pm,o9,pj[0],pj[1])}else{if(oN.noStretch){pk-=oU/2;var o1=oT+oL*2;o2.drawImage(oZ,0,0,oZ.width,oZ.height,pm,o9,o1,oU)}else{if(pg){this.drawStretchedIcon(o2,oZ,[pm,o9],oL,oT,pj[1])}else{this.draw3StretchedIcon(o2,oZ,[pm,o9],oL,oT,pj[1])}}}pl+=oL;if(oN.iconSize[1]>oU){pk-=(oN.iconSize[1]-oU)/2-1;if(oN.containDescendings){pk+=4}}}if(pu>0){if(pw===71028){pf-=2}if(pw===32){pf-=2}o2.strokeText(pc,pl,pk)}o2.fillText(pc,pl,pk);var oO=[oQ,pf];var o7=[Math.round(oO[0]/2),Math.round(oO[1]/2)];pe.push(o7);o0.push([pm,o9]);pa+=Math.round(o7[1]);o4+=oQ}}oK[pw][pc]={textSize:pe,labelImagePosition:o0,totalHeight:pa}}}oN.textSize=pe;oN.labelImagePosition=o0;oN.totalHeight=pa;return{curX:o4,curY:o3,curLineHeight:pd,styleId:pw}},drawStretchedIcon:function(e,C,T,oM,oN,i){var oL=T[0];var oK=T[1];e.drawImage(C,0,0,oM,oM,oL,oK,oM,oM);e.drawImage(C,oM,0,1,oM,oL+oM,oK,oN,oM);e.drawImage(C,C.width-oM,0,oM,oM,oL+oN+oM,oK,oM,oM);e.drawImage(C,0,oM,oM,1,oL,oK+oM,oM,i);e.drawImage(C,oM,oM,1,1,oL+oM,oK+oM,oN,i);e.drawImage(C,C.width-oM,oM,oM,1,oL+oN+oM,oK+oM,oM,i);e.drawImage(C,0,C.height-oM,oM,oM,oL,oK+i+oM,oM,oM);e.drawImage(C,oM,C.height-oM,1,oM,oL+oM,oK+i+oM,oN,oM);e.drawImage(C,C.width-oM,C.height-oM,oM,oM,oL+oN+oM,oK+i+oM,oM,oM)},draw3StretchedIcon:function(e,i,C,oL,oN,oM){var oK=C[0];var T=C[1];e.drawImage(i,0,0,oL,i.height,oK,T,oL,i.height);e.drawImage(i,oL,0,1,i.height,oK+oL,T,oN,i.height);e.drawImage(i,i.width-oL,0,oL,i.height,oK+oL+oN,T,oL,i.height)},_updateFixedLabelCoords:function(oK,oZ){if(oZ===0){return}var oU=[];var o6=[];var o7=0;var oX=oK.totalHeight;var pf=oK.textSize.length;var oL=oK.direction;if(typeof oL!=="number"){oL=0}for(var o8=0;o8<pf;o8++){var o0=oK.labelImagePosition[o8];var oY=oK.textSize[o8];var oW=o0[0];var T=o0[1];var oM=oY[0];var oR=oY[1];var oT=0;var o5=0;if(typeof oK.textMargin==="number"){o5=oK.textMargin}var oS;var e;var oO=0;var oV=0;if(!oK.iconPos){if(!oK.custom){oL=m4}}else{oO=oK.iconPos.width;oV=oK.iconPos.height}switch(oL){case jD:var C=oX/2-oR+oT*(pf-1)/2;oS=Math.round(-oO/2-oM-o5);e=Math.round(C-o7-oT*o8);break;case gM:var C=oX/2-oR+oT*(pf-1)/2;oS=Math.round(oO/2+o5);e=Math.round(C-o7-oT*o8);break;case aa:var C=oV/2+oX-oR+oT*pf;oS=Math.round(-oM/2);e=Math.round(C-o7-oT*o8);break;case kR:var C=-oV/2-oT-oR;oS=Math.round(-oM/2);e=Math.round(C-o7-oT*o8);break;case m4:var C=-oX/2-oT*(pf-1)/2;oS=Math.round(-oM/2);e=Math.round(C-o7-oT*o8);break}o7+=oR;var oQ=oS+oM;var pg=e;var oP=oQ;var pe=pg+oR;var oN=oS;var pd=pe;oU.push(oS,e,oQ,pg,oP,pe,oS,e,oP,pe,oN,pd);var pc=oW/this._drawingCanvasWidth;var o4=(oZ-T-oR*2)/oZ;var pb=(oW+oM*2)/this._drawingCanvasWidth;var o3=o4;var pa=pb;var o2=(oZ-T)/oZ;var o9=pc;var o1=o2;o6.push(pc,o4,pb,o3,pa,o2,pc,o4,pa,o2,o9,o1)}if(!oK.textPos){oK.textPos={}}oK.textPos.vertex=oU;oK.textPos.texcoord=o6},_addFixedLabelBounds:function(oP){var oL=1000;var T=1000;var C=-1000;var e=-1000;if(oP.iconPos){var oN=oP.iconPos["vertex"];for(var oO=0,oK=oN.length;oO<oK;oO+=2){var oT=oN[oO];var oR=oN[oO+1];if(oT<oL){oL=oT}if(oT>C){C=oT}if(oR<T){T=oR}if(oR>e){e=oR}}}if(oP.custom&&oP.style.iconSize&&!oP.name){var oQ=oP.style.iconSize;var oS=oP.direction;switch(oS){case m4:oL=-Math.round(oQ[0]/2);T=-Math.round(oQ[1]/2);C=Math.round(oQ[0]/2);e=Math.round(oQ[1]/2);break;case aa:oL=-Math.round(oQ[0]/2);T=0;C=Math.round(oQ[0]/2);e=oQ[1];break}}if(oP.textPos){var oM=oP.textPos["vertex"];for(var oO=0,oK=oM.length;oO<oK;oO+=2){var oT=oM[oO];var oR=oM[oO+1];if(oT<oL){oL=oT}if(oT>C){C=oT}if(oR<T){T=oR}if(oR>e){e=oR}}}oP.bds=[oL,T,C,e]},_updateLineLabelCoords:function(o1,oQ){if(oQ===0){return}var T=o1.wordsInfo;var oY=o1.wordCount;if(!o1.labelImagePosition){return}var oS=this._map._displayOptions.isEn;var oT=o1.labelImagePosition.slice(0);var o2=o1.textSize.slice(0);if(o1.reverse&&!oS){oT.reverse();o2.reverse()}var pb=1000;var o8=1000;var o9=-1000;var o7=-1000;for(var o3=0;o3<oY;o3++){var pc=oT[o3];var pa=pc[0];var oZ=pc[1];var oX=o2[o3];var oP=oX[0];var e=oX[1];var oO=pa/this._drawingCanvasWidth;var oW=(oQ-oZ-e*2)/oQ;var oM=(pa+oP*2)/this._drawingCanvasWidth;var oV=oW;var oK=oM;var oU=(oQ-oZ)/oQ;var C=oO;var oR=oU;if(oS){T[o3]={}}T[o3].size=[oP,e];T[o3].texcoord=[oO,oW,oM,oV,oK,oU,oO,oW,oK,oU,C,oR];if(oS||!T[o3].offset){continue}var o6=T[o3].offset[0];var o5=T[o3].offset[1];var o4=o6-oP/2;var oN=o5+e/2;var oL=o5-e/2;var o0=o6+oP/2;if(o4<pb){pb=o4}if(o0>o9){o9=o0}if(oL<o8){o8=oL}if(oN>o7){o7=oN}}if(!oS){o1.bds=[pb,o8,o9,o7]}}});var iV={0:"00000000",16:"00010000",32:"00100000",48:"00110000",64:"01000000",96:"01100000"};function gw(oL,oN,T){var oK=oL.bds;if(!oK){return false}var oM=oL.tracer;var C;if(oM){if(!iV[oM]){C=oM.toString(2);if(C.length<8){C=new Array(8-C.length+1).join("0")+C}iV[oM]=C}C=iV[oM];var e=oG.mapZoomStartZoomMapping[oN];var oO=oN>20?21:oN;return C[oO-e]==="1"}var i=oL.displayRange;if(T>=i[0]&&T<=i[1]){return true}return false}function na(i,e){this.map=i.map;this.layer=i;e=e||[];this.allLabels=[];this._spotData=[];this._strategyInfo=null;this.RANK1=1000000;this.RANK2=2000000;this.RANK3=3000000;this.RANK4=4000000;this.RANK5=5000000;this._ratio=ja();this._useRound=true;this._sharpenRender=false;if(this._ratio>li.HIGH_RES_MIN_RATIO){this._useRound=false;this._sharpenRender=true}this._mapIsMoving=false;this._onMapIdleCallback=e.onMapIdleCallback;this.map.temp.isPermitSpotOver=true;this.currentSelectedLabel=null;this.map._labelProcessor=this;this.iconCache=new a1((c9()||hv.Browser.ie)?64:128,{clearCallback:function(C){if(C&&C.image){var T=C.image;if(T.onload){T.onload=null}if(T.onerror){T.onerror=null}T.src="";T.remove();C.image=null}}});this.fixedLabelData=[];this.lineLabelData=[];this.highlightLabelData=[];this._iconLoadTimer=null;this._labelTextCanvas=null;if(this.map.config.textRenderType==="canvas"){this._labelTextCanvas=this.map.tileMgr.getLabelTextCanvas()}this.bind()}hv.extend(na.prototype,{bind:function(){var C=this.map;var i=this;C.addEventListener("mapstatusbusy_inner",function(T){i._mapIsMoving=true;if(i._ratio>li.HIGH_RES_MIN_RATIO){i._sharpenRender=false}else{i._useRound=false}});C.addEventListener("mapstatusidle_inner",function(T){if(i._ratio>li.HIGH_RES_MIN_RATIO){i._sharpenRender=true}else{i._useRound=true}i._mapIsMoving=false});C.addEventListener("onspotmouseover",function(oL){if(!this.temp.isPermitSpotOver||this.config.enableIconHighlight===false){return}if(oL.spots.length>0){var oK=oL.spots[0].userdata.uid;var oM=oL.spots[0].userdata.tilePosStr;var T=i.getLabelByUid(oK,oM);T&&T.formatedData&&i._toHighlightColor(T.formatedData)}});C.addEventListener("onspotmouseout",function(oL){if(!this.temp.isPermitSpotOver){return}if(oL.spots.length>0){var oK=oL.spots[0].userdata.uid;var oM=oL.spots[0].userdata.tilePosStr;var T=i.getLabelByUid(oK,oM);T&&T.formatedData&&i._toDefaultColor(T.formatedData)}});C.addEventListener("spotclick",function(oL){if(oL.spots&&oL.spots.length>0){if(oL.spots[0].userdata.zoom<10){return}var oK=oL.spots[0].userdata.uid;var oM=oL.spots[0].userdata.tilePosStr;if(i.currentSelectedLabel&&(i.currentSelectedLabel.uid!==oK||i.currentSelectedLabel.tilePosStr!==oM)){i._recoverNormalState()}var T=i.getLabelByUid(oK,oM);T&&i._changeBaseMapState(T)}else{i._recoverNormalState()}});C.on("spot_status_reset",function(){i._recoverNormalState()});C.on("spot_highlight",function(oK){var T=i.getLabelByUid(oK.uid,oK.tilePosStr);T&&T.formatedData&&i._toHighlightColor(T.formatedData)});C.addEventListener("mousemove",function(T){if(i.curSpotAdded){return}if(this.currentOperation!==gp.idle||i._mapIsMoving===true){return}i._refreshSpotData();this.temp.isPermitSpotOver=true;i.curSpotAdded=true});if(c9()){function e(){i._refreshSpotData()}C.addEventListener("mapstatusidle_inner",e)}C.on("style_loaded",function(){if(i.map.config.textRenderType==="canvas"&&!i._labelTextCanvas){i._labelTextCanvas=i.map.tileMgr.getLabelTextCanvas()}});C.on("destroy",function(){i.iconCache.clear();for(var T=0;T<i.fixedLabelData.length;T++){i.fixedLabelData[T]=null}i.fixedLabelData=[];i.lineLabelData=[];i.highlightLabelData=[];for(var T=0;T<i.allLabels.length;T++){i.allLabels[T]._mcBds=null;i.allLabels[T]=null}i.allLabels=[];for(var T=0;T<i._spotData.length;T++){i._spotData[T].pt=null;i._spotData[T].userdata.iconPoint=null;i._spotData[T]=null}i._spotData=[]})},getLabelByUid:function(oN,oO){var e=this.map._featureMgr.getResult().tileLabels[this.layer.drawIndex]||[];for(var oM=0;oM<e.length;oM++){var T=e[oM].fixedLabel;for(var oL=0;oL<T.length;oL++){if(e[oM].fixedLabel[oL].guid===oN&&e[oM].fixedLabel[oL].tilePosStr===oO){return e[oM].fixedLabel[oL]}}var oK=e[oM].indoorLabel;for(var C=0;C<oK.length;C++){if(e[oM].indoorLabel[C].guid===oN&&e[oM].indoorLabel[C].tilePosStr===oO){return e[oM].indoorLabel[C]}}}return null},getTileByLabelUid:function(oN){var e=this.map._featureMgr.getResult().tileLabels[this.layer.drawIndex]||[];for(var oM=0;oM<e.length;oM++){var T=e[oM].fixedLabel;for(var oL=0;oL<T.length;oL++){if(e[oM].fixedLabel[oL].guid===oN){return e[oM]}}var oK=e[oM].indoorLabel;for(var C=0;C<oK.length;C++){if(e[oM].indoorLabel[C].guid===oN){return e[oM]}}}return null},_toHighlightColor:function(C){if(C.tempRank&&C.tempRank===this.RANK5){return}var e=this.map._featureMgr.getResult().eleData[4][this.layer.drawIndex]||[];var oK=false;for(var T=0;T<e.length;T++){if(e[T]===C||(e[T].guid===C.guid&&e[T].tilePosStr===C.tilePosStr&&e[T].zoom===C.zoom)){oK=true;break}}if(oK){return}e.push(C);this.map._featureMgr.setOverlayData(e,4,this.layer.drawIndex);this.map.dispatchEvent(new ix("onrefresh"))},_toDefaultColor:function(C){if(C.tempRank&&C.tempRank===this.RANK5){return}var e=this.map._featureMgr.getResult().eleData[4][this.layer.drawIndex]||[];var oK=false;for(var T=0;T<e.length;T++){if(C===e[T]||(C.guid===e[T].guid&&C.tilePosStr===e[T].tilePosStr&&C.zoom===e[T].zoom)){e.splice(T,1);oK=true;break}}if(!oK){return}this.map._featureMgr.setOverlayData(e,4,this.layer.drawIndex);this.map.dispatchEvent(new ix("onrefresh"))},_changeBaseMapState:function(i){var oK=i.guid;var oO=i.formatedData.guidExt;var oP={guid:oK,tilePosStr:i.tilePosStr,guidExt:oO};this._strategyInfo=oP;this.currentSelectedLabel=i;var T=this.map._featureMgr;var e=T.getLabelData(this.layer.drawIndex);e=this.collisionTest(e);this.updateLabels(e);var oQ=this.fixDataFormat(e);T.setOverlayData(oQ[0],2,this.layer.drawIndex);T.setOverlayData(oQ[1],3,this.layer.drawIndex);T.setOverlayData(oQ[2],4,this.layer.drawIndex);var C=this.getTileByLabelUid(oK);this.currentSelectedLabel.tileInfo=C.tileInfo;var oN=this.layer.tileCache.getAllData();for(var oM in oN){var oL=oN[oM].data;if(!oL.label){continue}this.clearCollisionCache(oL.label)}this.map.dispatchEvent(new ix("onrefresh"))},_recoverNormalState:function(){this._strategyInfo=null;var oN=false;var oL=this.map._featureMgr.getLabelData(this.layer.drawIndex);if(this.currentSelectedLabel){var C=this.currentSelectedLabel.guid;this.clearCollisionCache(this.getTileByLabelUid(C));var oK=this.layer.tileCache.getAllData();for(var T in oK){if(Object.prototype.hasOwnProperty.call(oK,T)){var oM=oK[T].data;if(!oM.label){continue}this.clearCollisionCache(oM.label)}}this.currentSelectedLabel.tempRank=null;this.currentSelectedLabel=null;oN=true}oL=this.collisionTest(oL);this.updateLabels(oL);var e=this.fixDataFormat(oL);var i=this.map._featureMgr;i.setOverlayData(e[0],2,this.layer.drawIndex);i.setOverlayData(e[1],3,this.layer.drawIndex);i.setOverlayData([],4,this.layer.drawIndex);this.map.dispatchEvent(new ix("onrefresh"));if(oN){this.curSpotAdded=false;this._refreshSpotData()}},loadIconImages:function(oW,oM,C){var oV=oW.label;var oY=oW.tileInfo.style;var oK=oV.fixedLabel;if(C==="indoor"){oK=[]}var oU=oV.indoorLabel;var oT=oK.length+oU.length;var oZ=this;var oX=0;var oR=200;for(var oS=0;oS<oT;oS++){var oP;if(oS<oK.length){oP=oK[oS]}else{oP=oU[oS-oK.length]}if(!oP.iconPos){var oO=this.loadSVGSymbol(oP,oY);if(!oO){continue}else{if(oO!==true){var oN=oP.iconPos.iconType;var e=oY+"_"+oN;this.iconCache.setData(e,{loaded:false,image:oO});oP.iconPos.img=oO}}}var oN=oP.iconPos.iconType;var e=oY+"_"+oN;oX++;if(this.iconCache.getData(e)){if(this.iconCache.getData(e).loaded){oM(oW)}else{if(oP.iconPos.img){oP.iconPos.img.id=e;oP.iconPos.img.iconUrl=oN;this.iconCache.setData(e,{loaded:true,image:oP.iconPos.img});this._addToIconTexture(oP.iconPos.img);oM(oW)}else{}}continue}if(!C||C==="indoor"){var oL=K.getIconSetPath(this.map.config.style)+oN+".png";var oQ=cw();if(oQ&&oQ.udt){oL+="?udt="+oQ.udt}}else{var oL=oN}var T=new Image();T.id=e;T.iconUrl=oL;T.crossOrigin="anonymous";T.onload=function(){if(oZ.iconCache.getData(this.id)){oZ.iconCache.getData(this.id).loaded=true;oZ._addToIconTexture(this)}if(!oZ._iconLoadTimer){oZ._iconLoadTimer=setTimeout(function(){oM();oZ._iconLoadTimer=null},oR)}this.onload=null};T.onerror=function(){if(!oZ._iconLoadTimer){oZ._iconLoadTimer=setTimeout(function(){oM();oZ._iconLoadTimer=null},oR)}oZ.iconCache.removeData(this.id);this.onerror=null;cv.fetchDebug&&cv.fetchDebug.sendError({title:this.iconUrl,msg:this.iconUrl,category:cv.fetchDebug.category.RESOURCE,level:cv.fetchDebug.levels.ERROR,url:this.iconUrl})};T.src=oL;this.iconCache.setData(e,{loaded:false,image:T})}return oX},_addToIconTexture:function(oL){if(!this.map._webglMapScene){return}var oN=this.map._webglMapScene._painter;var e=oN._iconTextureAtlas.addTexture(oL);if(e===false){this.map.fire(new ix("onlayer_clear"))}if(!e){return}oN._iconTextureAtlasOffset[oL.id]=e;var oQ=0*oL.width/1024+e.width;var oK=0*oL.height/1024+e.height;var oP=oL.width/1024+e.width;var T=oK;var oO=oP;var C=oL.height/1024+e.height;var oM=oQ;var i=C;oN._iconTextureAtlasCoords[oL.id]=[oQ,oK,oP,T,oO,C,oQ,oK,oO,C,oM,i]},loadSVGSymbol:function(T,C){var i=T.symbol||{};var oM=fK.generateKey(i.path,i);if(!oM){return null}var oL=this.iconCache.getData(C+"_"+oM);if(oL&&oL.loaded){T.iconPos=this.createVertex(oL.image.width/2,oL.image.height/2,oM);return true}var oK=new fK(i.path,i);oK.add();var e=oK.render();if(!e){return null}T.iconPos=this.createVertex(oK.size.width,oK.size.height,oM);return oK.data},createVertex:function(oL,oP,C){var oK=Math.round(-oL/2);var oR=Math.round(-oP/2);var T=oK+oL;var oQ=oR;var i=T;var oO=oQ+oP;var e=oK;var oN=oO;var oM={vertex:[oK,oR,T,oQ,i,oO,oK,oR,i,oO,e,oN],texcoord:null,width:oL,height:oP,iconType:C};return oM},loadImgByStr:function(T,oK,oL){if(!T&&!oK){oL&&oL(null,null);return}if(typeof T==="object"&&typeof oK==="object"){oL(T,oK);return}var i=0;var C=null;var e=null;if(T){i++;C=new Image();C.onload=function(){i--;if(i===0){oL&&oL(this,e)}this.onload=null};C.src=T}if(oK){i++;e=new Image();e.onload=function(){i--;if(i===0){oL&&oL(C,this)}this.onload=null};e.src=oK}},collisionTest:function(pJ,oW,o4){if(this.map.viewAnimationTime){return[]}if(!pJ){return[]}if(this.layer.ontology&&this.layer.ontology.noCollision){for(var pg=0;pg<pJ.length;pg++){var p0=pJ[pg].fixedLabel;for(var pe=0;pe<p0.length;pe++){var oO=p0[pe];var p2=this.layer.ontology.getLayerVisible(oO.layerName);oO.isDel=!p2}}return pJ}var o0=this.map;var pP=o0.getHeading();pP=this.calcLoopHeading(pP);var ps=o0.height;var pk=this.allLabels;for(var pg=0;pg<pk.length;pg++){pk[pg]._mcBds=null}pk.length=0;pJ.sort(function(p3,i){var p5=p3.tileInfo;var p4=i.tileInfo;if(p5.col*p5.row<p4.col*p4.row){return -1}else{return 1}});var o1=o0.getTilt();var pQ=o0.getZoom();if(this.layer.ontology){pQ+=(this.layer.spanLevel||0)}var pc;if(o4){pc=o4}else{pc=this.getZoomStep();o4=pc}for(var pg=0,pa=pJ.length;pg<pa;pg++){var C=pJ[pg];var pl=C.tileInfo;var pd=pl.zoom;var pv=pl.loopOffsetX/Math.pow(2,18-pd);if(!pP&&!o1){if(C.unnecessaryCollisionTest&&C.unnecessaryCollisionTest[o4]){continue}}var p0=C.fixedLabel||[];for(var pe=0,pX=p0.length;pe<pX;pe++){var oO=p0[pe];oO.zoom=pd;if(oW===-1&&oO.isDel){continue}if(this.layer.ontology){var p2=this.layer.ontology.getLayerVisible(oO.layerName);if(!p2){continue}}if(!gw(oO,pl.useZoom,pQ)){oO.isDel=true;continue}this.calcCollisionBounds(oO,pc,pv,ps);pk.push(oO)}var pf=C.indoorLabel||[];for(var pb=0,po=pf.length;pb<po;pb++){var pn=pf[pb];pn.zoom=pd;if(oW===-1&&pn.isDel){continue}if(!gw(pn,pl.useZoom)){pn.isDel=true;continue}this.calcCollisionBounds(pn,pc,pv,ps);pk.push(pn)}var pW=C.lineLabel||[];if(!this.map._displayOptions.isEn){for(var pj=0,o2=pW.length;pj<o2;pj++){var pF=pW[pj];if(oW===-1&&pF.isDel){continue}if(!gw(pF,pl.useZoom)){pF.isDel=true;continue}var oP=pF.pt;var pE=o0.pointToPixelIn(oP,{zoom:pc,useRound:this._useRound});var pZ=pE.x+pv;var pY=ps-pE.y;var oL=pF.bds;var pH=oL[0];var pG=oL[1];var o7=oL[2];var o5=oL[3];var oZ=pH;var oY=pG;var pV=o7;var pU=o5;if((pP>=0&&pP<45)||(pP>=315&&pP<360)){oZ=pH;oY=pG;pV=o7;pU=o5}else{if(pP>=45&&pP<135){oZ=pG;oY=-o7;pV=o5;pU=-pH}else{if(pP>=135&&pP<225){oZ=-o7;oY=-o5;pV=-pH;pU=-pG}else{if(pP>=225&&pP<315){oZ=-o5;oY=pH;pV=-pG;pU=o7}}}}pF._tempBds=[pZ+oZ,pY+oY,pZ+pV,pY+pU];var pN=o0.pixelToPointIn(new hV(pF._tempBds[0],pE.y+oY),{zoom:pc});var pC=o0.pixelToPointIn(new hV(pF._tempBds[2],pE.y+pU),{zoom:pc});pF._mcBds=[pN,pC];pk.push(pF)}}else{for(var pj=0,o2=pW.length;pj<o2;pj++){var pK=pW[pj];if(!pK.wordsInfo.length){continue}if(!pK[pc]){pK[pc]=this.calcLineLabelEnInfos(pK,pc)}var oN="datas_"+pc;pK[oN]=[];var pu=pK[pc];var T=o0.getCenterIn();for(var pt=0;pt<pu.length;pt++){var pw=pu[pt];var pL=-1;var ph=Infinity;for(var pD=0;pD<pw.length;pD++){var o6=pw[pD];if(o6.isDel||!gw(o6,pl.useZoom)){continue}var oX=Math.sqrt(Math.pow(o6.pt.lng-T.lng,2)+Math.pow(o6.pt.lat-T.lat,2));if(oX<ph){pL=pD;ph=oX}}if(pL===-1){continue}var o6=pw[pL];var pR=Object.assign({},o6);pR.name=pK.name;pR.key=pK.key+"_"+pt+"_"+pD;pR.labelAngle=pK.labelAngle;pR.processedInZoom=pK.processedInZoom;pR.styleText=pK.styleText;pR.rank=pK.rank;pR.cachedIsDel={};pR.cachedIsDel[pc]=false;this.calcWordsInfoMCBds(o0,pc,pv,pR);pk.push(pR);pK[oN].push(pR)}}}}var pB=this._strategyInfo;if(pB){var pi=pB.guid;var o8=pB.guidExt;var pz=false;for(var o9=0,oV=pk.length;o9<oV;o9++){var oM=pk[o9];delete oM.tempRank;if(!this.layer.isClickableLabel(oM)||(o8===1&&!oM.guidExt)){continue}if(pi===oM.guid&&pB.tilePosStr===oM.tilePosStr){oM.tempRank=this.RANK5;pz=true}}if(!pz&&this.currentSelectedLabel){this.currentSelectedLabel.tempRank=this.RANK5;var pm=this.currentSelectedLabel.tileInfo;if(pm){var o3=pm.zoom;var pO=pm.loopOffsetX/Math.pow(2,18-o3);this.calcCollisionBounds(this.currentSelectedLabel,pc,pO,ps);pk.push(this.currentSelectedLabel)}}}else{for(var oK=0,oU=pk.length;oK<oU;oK++){var oR=pk[oK];if(oR.type==="line"||!oR.iconPos){continue}delete oR.tempRank}}pk.sort(function(p4,p3){var p5=p4.tempRank?p4.tempRank:p4.rank;var i=p3.tempRank?p3.tempRank:p3.rank;return i-p5||p4.startZoom-p3.startZoom||p3.pt.lng-p4.pt.lng||p3.pt.lat-p4.pt.lat});var pT=0;if(o1>0){pT=6}pQ=o0.getZoom();if(pQ>=8&&pQ<9){pQ<8.5?(pT=6):(pT=3)}if(o0._displayOptions.labelMargin>0){pT=o0._displayOptions.labelMargin}var px=2;if(pQ<6&&pQ>=5){px=-1}for(var pA=0,oT=pk.length;pA<oT;pA++){var pS=pk[pA];var pI=pS._tempBds;pS.isDel=false;pS._intersectIdx=[];for(var pq=pA+1;pq<oT;pq++){var pr=pk[pq];var p1=pr._tempBds;if(!(pI[2]+pT+px<p1[0]-pT||pI[0]-pT>p1[2]+pT+px||pI[3]+pT+px<p1[1]-pT||pI[1]-pT>p1[3]+pT+px)){pS._intersectIdx.push(pq)}}}for(var py=0,oS=pk.length;py<oS;py++){var oQ=pk[py];if(oQ.isDel===false){var e=oQ._intersectIdx;for(var pp=0,pM=e.length;pp<pM;pp++){pk[e[pp]].isDel=true;if(pk[e[pp]].cachedIsDel){pk[e[pp]].cachedIsDel[o4]=true}}}}return pJ},calcCollisionBounds:function(oP,oN,i,oO){var oL=oP.ptFix||oP.pt;var T=this.map;var oK=T.pointToPixelIn(oL,{zoom:oN,useRound:this._useRound});var C=oK.x+i;var oR=oO-oK.y;var e=oP.bds;oP._tempBds=[C+e[0],oR+e[1],C+e[2],oR+e[3]];var oM=T.pixelToPointIn(new hV(oP._tempBds[0],oK.y+e[1]),{zoom:oN});var oQ=T.pixelToPointIn(new hV(oP._tempBds[2],oK.y+e[3]),{zoom:oN});oP._mcBds=[oM,oQ]},getZoomStep:function(){var C=this.map.getZoom();var e=Math.floor(C);var i=C-e>=0.5?e+0.5:e;return i},clearCollisionCache:function(e){if(!e){return}e.cacheState=null;e.unnecessaryCollisionTest=null},getCachedLabels:function(e){e=e||[];var C=this.getZoomStep();var oL=false;for(var T=0;T<e.length;T++){var oK=e[T];if(!oK.cacheState||!oK.cacheState[C]){oL=true;break}if(oK.hasNewData){oL=true;break}}if(oL){this.calcLabelsCollision(e)}return e},calcLabelsCollision:function(C){var oK=this.getZoomStep();var oL={};var oS;var T;var oU;var oW;var oV;var oT;C=this.collisionTest(C,undefined,oK);bI.addLabelIntoAreaSpots(C);for(var oP=0;oP<C.length;oP++){oS=C[oP];T=oS.tileInfo;oW=T.col+","+T.row;oL[oW]=1}var e={};for(var oN=0;oN<C.length;oN++){oS=C[oN];if(!oS.cacheState){oS.cacheState={}}T=oS.tileInfo;oV=T.col;oT=T.row;oW=oV+","+oT;if(oS.cacheState[oK]==="stable"){e[oW]=1;if(!oS.hasNewData){continue}}for(var oO=0;oO<oS.fixedLabel.length;oO++){oU=oS.fixedLabel[oO];if(!oU.cachedIsDel){oU.cachedIsDel={}}oU.cachedIsDel[oK]=oU.isDel}for(var oR=0;oR<oS.indoorLabel.length;oR++){oU=oS.indoorLabel[oR];if(!oU.cachedIsDel){oU.cachedIsDel={}}oU.cachedIsDel[oK]=oU.isDel}for(var oQ=0;oQ<oS.lineLabel.length;oQ++){oU=oS.lineLabel[oQ];if(!oU.cachedIsDel){oU.cachedIsDel={}}oU.cachedIsDel[oK]=oU.isDel}if(oL[(oV-1)+","+(oT-1)]&&oL[(oV-1)+","+oT]&&oL[(oV-1)+","+(oT+1)]&&oL[oV+","+(oT-1)]&&oL[oV+","+(oT+1)]&&oL[(oV+1)+","+(oT-1)]&&oL[(oV+1)+","+oT]&&oL[(oV+1)+","+(oT+1)]){oS.cacheState[oK]="stable";e[oW]=1}else{if(!oS.cacheState[oK]){oS.cacheState[oK]="unstable"}}}for(var oM=0;oM<C.length;oM++){oS=C[oM];T=oS.tileInfo;oW=T.col+","+T.row;oV=+T.col;oT=+T.row;if(e[(oV-1)+","+(oT-1)]&&e[(oV-1)+","+oT]&&e[(oV-1)+","+(oT+1)]&&e[oV+","+(oT-1)]&&e[oV+","+(oT+1)]&&e[(oV+1)+","+(oT-1)]&&e[(oV+1)+","+oT]&&e[(oV+1)+","+(oT+1)]){if(!oS.unnecessaryCollisionTest){oS.unnecessaryCollisionTest={}}oS.unnecessaryCollisionTest[oK]=1}}C.hasNewData=false},updateLabels:function(oL){var C=this.map;var oT=C.getZoom();var oV=C.getHeading();oV=this.calcLoopHeading(oV);var oU=C.getTilt();var oM=this.getZoomStep();for(var oR=0,oO=oL.length;oR<oO;oR++){var oQ=oL[oR];var oK=oQ.tileInfo;var oP=oK.loopOffsetX||0;var e={zoom:oT,mcOffsetX:oP};this.updateFixedLabel(oQ.fixedLabel,oU,oV,oQ,oM,e);e={zoom:oT,mcOffsetX:0};this.updateFixedLabel(oQ.indoorLabel,oU,oV,oQ,oM,e);if(!this.map._displayOptions.isEn){this.updateLineLabel(oQ.lineLabel,oU,oV,oQ,oM)}else{for(var oN=0,oS=oQ.lineLabel.length;oN<oS;oN++){var T=oQ.lineLabel[oN];if(T["datas_"+oM]){this.updateLineLabel(T["datas_"+oM],oU,oV,oQ,oM)}}}}},updateFixedLabel:function(oP,oS,i,oV,oL,oQ){if(oP.length===1){}var e=oQ.zoom;var oK=oQ.mcOffsetX;var o0;for(var oW=0,oN=oP.length;oW<oN;oW++){var oR=oP[oW];if(!oR.cachedIsDel){continue}if(!oS&&!i&&oV.cacheState&&oV.cacheState[oL]){oR.isDel=oR.cachedIsDel[oL];if(typeof oR.isDel==="undefined"){oR.isDel=oR.cachedIsDel[oL]=true}}if(oR.startScale>e){oR.isDel=true}if(oR.isDel){continue}var oZ=oR.pt;var C=(oR.hue||0)?jp(oR.hue):0;var T=oR.iconPos;if(T&&T.texcoord){if(!T.rtVertex){T.rtVertex=[];o0=T.vertex;var oO=my(oZ.lng);var oY=my(oZ.lat);T.rtVertex=[oO[0],oY[0],oO[1],oY[1],0,o0[0],o0[1],0,0,T.texcoord[0],T.texcoord[1],C,oO[0],oY[0],oO[1],oY[1],0,o0[2],o0[3],0,0,T.texcoord[2],T.texcoord[3],C,oO[0],oY[0],oO[1],oY[1],0,o0[4],o0[5],0,0,T.texcoord[4],T.texcoord[5],C,oO[0],oY[0],oO[1],oY[1],0,o0[6],o0[7],0,0,T.texcoord[6],T.texcoord[7],C,oO[0],oY[0],oO[1],oY[1],0,o0[8],o0[9],0,0,T.texcoord[8],T.texcoord[9],C,oO[0],oY[0],oO[1],oY[1],0,o0[10],o0[11],0,0,T.texcoord[10],T.texcoord[11],C]}}if(!oR.textOnIcon){C=0}var oX=oR.textPos;if(oX){if(!oX.rtVertex){oX.rtVertex=[];o0=oX.vertex;var oM=oX.rtVertex;var oU=my(oZ.lng);var o3=my(oZ.lat);var o2=my(oK);for(var oT=0,o1=o0.length;oT<o1;oT+=12){oM.push(oU[0],o3[0],oU[1],o3[1],0,o0[oT],o0[oT+1],o2[0],o2[1],oX.texcoord[0],oX.texcoord[1],C);oM.push(oU[0],o3[0],oU[1],o3[1],0,o0[oT+2],o0[oT+3],o2[0],o2[1],oX.texcoord[2],oX.texcoord[3],C);oM.push(oU[0],o3[0],oU[1],o3[1],0,o0[oT+4],o0[oT+5],o2[0],o2[1],oX.texcoord[4],oX.texcoord[5],C);oM.push(oU[0],o3[0],oU[1],o3[1],0,o0[oT+6],o0[oT+7],o2[0],o2[1],oX.texcoord[6],oX.texcoord[7],C);oM.push(oU[0],o3[0],oU[1],o3[1],0,o0[oT+8],o0[oT+9],o2[0],o2[1],oX.texcoord[8],oX.texcoord[9],C);oM.push(oU[0],o3[0],oU[1],o3[1],0,o0[oT+10],o0[oT+11],o2[0],o2[1],oX.texcoord[10],oX.texcoord[11],C)}}}}},updateLineLabel:function(oQ,pk,pa,o5,o6){oQ=oQ||[];var o0=this.map;var oT=o0.getZoomUnits();var oM=o0._displayOptions.isEn;for(var pj=0,ph=oQ.length;pj<ph;pj++){var oP=oQ[pj];if(!oP.cachedIsDel){continue}if(!pk&&!pa&&o5.cacheState&&o5.cacheState[o6]){oP.isDel=oP.cachedIsDel[o6];if(typeof oP.isDel==="undefined"){oP.isDel=oP.cachedIsDel[o6]=true}}if(oP.isDel){continue}if(!oP.styleText||oP.styleText.length===0){continue}var oR=oP.mcInTile;var pd=oR.x;var pb=oR.y;var o4=oP.wordsInfo;var oU=oP.isReverse;var o2=oP.labelAngle;var oY=false;var pc=0;if(pa!==0){var oZ=0;if(o4&&o4.length>0&&o4[0]){oZ=o4[0].angle||0}var pg=this.calcLoopHeading(oZ-pa);if(oM&&pg>90&&pg<270){pc=180;oY=true}if(!oM&&pg>45&&pg<315){if(pg>45&&pg<=135){pc=270}else{if(pg>135&&pg<=225){pc=180}else{if(pg>225&&pg<315){pc=90}}}if(o2>225&&o2<=315&&pc<=180){oY=true}else{if((o2>=0&&o2<=45||o2>=315&&o2<360)&&pc>=180){oY=true}}}}if(oM){if(oU===oY){continue}else{oU=oY}if(oY){o4=oP.reverse_wordsInfo}}for(var pi=0,oV=o4.length;pi<oV;pi++){var pf=o4[pi];if(!pf.offset){continue}var oO=oP.wordsInfo[pi];var oX=oO.calcInfo;var o9=pf.offset[0];var o7=pf.offset[1];if(!pf.size){continue}if(oM){oO.formatedData=null}oO.texcoordArr=pf.texcoord;var e=pf.size[0];var C=pf.size[1];var oW=pf.angle;if(!oX){oX={}}if(pa!==oX.mapHeading||oT!==oX.zoomUnits){oX.mapHeading=pa;oX.zoomUnits=oT;if(oY&&!oM){var o1=o4[oV-1-pi];o9=o1.offset[0];o7=o1.offset[1];oW=o1.angle}var oK=pd+o9*oT;var T=pb+o7*oT;oX.rotationCenter={lng:oK,lat:T};oX.calcHeading=pc;oX.angle=oW;oX.offsetX=o9;oX.offsetY=o7;oO.calcInfo=oX}if(!oO.rtVertex){oO.rtVertex=[]}oO.rtVertex.length=0;var o3=oX.calcHeading+oX.angle;var oL=oX.rotationCenter;o9=oX.offsetX;o7=oX.offsetY;var oN=Math.round(o9-e/2);var pe=Math.round(o9+e/2);var o8=Math.round(o7+C/2);var oS=Math.round(o7-C/2);oO.rtVertex.push(pd,pb,pf.z,oN,oS,oL.lng,oL.lat,o3,pf.texcoord[0],pf.texcoord[1],pd,pb,pf.z,pe,oS,oL.lng,oL.lat,o3,pf.texcoord[2],pf.texcoord[3],pd,pb,pf.z,pe,o8,oL.lng,oL.lat,o3,pf.texcoord[4],pf.texcoord[5],pd,pb,pf.z,oN,oS,oL.lng,oL.lat,o3,pf.texcoord[6],pf.texcoord[7],pd,pb,pf.z,pe,o8,oL.lng,oL.lat,o3,pf.texcoord[8],pf.texcoord[9],pd,pb,pf.z,oN,o8,oL.lng,oL.lat,o3,pf.texcoord[10],pf.texcoord[11])}}},calcLineLabelEnInfos:function(e,C){var oT=e.labelsInfo||[];var oO=[];var oK=[60799];var T=oK.indexOf(e.styleId);for(var oL=0,i=oT.length;oL<i;oL++){var oS=oT[oL][0];var oQ=oT[oL][1];var oN=oT[oL][2];if((T>-1&&C<14)||C<=13){oS=oT[oL][3];oQ=oT[oL][4]}var oR=this.calcLineLabelOffsetAndAngle(e,oS,oN,oQ,C);var oP=oT[oL][5];for(var oM=0;oM<oR.length;oM++){oR[oM].tracer=oP[oM]}oO.push(oR)}return oO},calcLineLabelOffsetAndAngle:function(oS,oM,T,oO,oN){var e=[];var i=oS.wordsInfo;var oR=oS.mcInTile;var oX=oS.name;for(var oQ=0,oL=T.length;oQ<oL;oQ++){var oU=T[oQ];var oT=[oR.x+oM[oU*2],oR.y+oM[oU*2+1]];var C=[];var oV=Math.floor(i.length/2);this.calcWordsInfo(i,oV-1,0,C,oM,oU,oO,oN);C.length&&this.calcWordsInfo(i,oV,i.length-1,C,oM,oU,oO,oN);var oW=true;if(C.length!==oX.length){oW=false}var oP=[];if(oW){var oK=this.reverseArray(i);this.calcWordsInfo(oK,oV-1,0,oP,oM,oU,oO,oN);oP.length&&this.calcWordsInfo(oK,oV,i.length-1,oP,oM,oU,oO,oN);if(oP.length!==oX.length){oP=[]}}e.push({isDel:!oW?true:false,pt:new d9(oT[0],oT[1]),mcInTile:{x:oM[oU*2],y:oM[oU*2+1]},wordsInfo:oW?C:[],reverse_wordsInfo:oP.length?oP:[],bds:!oW?[]:this.calWordsInfoBds(C)})}return e},reverseArray:function(oK){var e=[];for(var T=0;T<oK.length;T++){e[T]=oK[T]}for(var T=0;T<Math.floor(e.length/2);T++){var oL=e.length-1-T;var C=e[T];e[T]=e[oL];e[oL]=C}return e},calcWordsInfo:function(e,oO,oM,C,oZ,o8,o5,o2){var i=Math.pow(2,o2-18);var T=1/i;var o0=oZ[o8*2];var oY=oZ[o8*2+1];var oQ=oO<oM?1:-1;var oR=Math.abs(oM-oO)+1;var oW=[oZ[o8*2],oZ[o8*2+1]];var oU=[oZ[(o8+oQ)*2],oZ[(o8+oQ)*2+1]];var o7=oW;var oV=0;var oT=0;var oS=0;function o4(){o8=o8+oQ;if(oQ===1&&o8>=(oZ.length/2-1)){return false}if(oQ===-1&&o8<=0){return false}oW=[oZ[o8*2],oZ[o8*2+1]];oU=[oZ[(o8+oQ)*2],oZ[(o8+oQ)*2+1]];o7=oW;return true}var o3=1;for(var o6=oO;oQ===1?o6<=oM:o6>=0;oQ===1?o6++:o6--){var o9=e[o6];var o1=o9.size[0]*T;var oX=o9.size[1]*T;while(o3===1){var pa=o5[o8+(oQ===1?0:oQ)];var pb=oW;if(C.length){var oK=C[C.length-1];pb=oK.mc;var oL=this.calculateAngleDifference(pb,o7,oU);if(oL>0&&oL<90){o3=0;break}}var oN=this.linearEquationAndNextPoint(oW,oU,o7,pb,oT,o1/2,oS);if(!oN){oS+=o1/2}else{if(oN.length===1){oT=oN[0];if(!o4()){o3=0;break}}else{oS=0;var oP=[(oN[0]-o0)*i,(oN[1]-oY)*i];o7=[oN[2],oN[3]];C.push(Object.assign({offset:oP,angle:pa,z:0,mc:[oN[0],oN[1]],},o9));oT=0;break}}}if(o3===0){break}oV++}if(oV<oR){C=[]}else{if(oQ===-1){C.reverse()}}},linearEquationAndNextPoint:function(T,C,i,e,oQ,oO,oP){var o6=T[0];var oM=T[1];var o5=C[0];var oK=C[1];var oY=i[0];var oV=i[1];var oZ=e[0];var oW=e[1];const o4=Math.sqrt(Math.pow(o5-oY,2)+Math.pow(oK-oV,2));if((o4+oQ-oP)<oO*2){return[o4+oQ]}const oU=o5-o6;const oT=oK-oM;const oN=Math.sqrt(oU*oU+oT*oT);const o2=oU/oN;const o1=oT/oN;const oS=oY+o2*(oO-oQ+oP);const oR=oV+o1*(oO-oQ+oP);const oL=oS-oZ;const o3=oR-oW;const o7=Math.sqrt(oL*oL+o3*o3);if(o7<oO/10){return false}const o0=oS+o2*oO;const oX=oR+o1*oO;return[oS,oR,o0,oX]},calculateAngleDifference:function(oO,oN,oL){const oM={x:oO[0]-oN[0],y:oO[1]-oN[1]};const T={x:oL[0]-oN[0],y:oL[1]-oN[1]};const oP=oM.x*T.x+oM.y*T.y;const C=Math.sqrt(Math.pow(oM.x,2)+Math.pow(oM.y,2));const e=Math.sqrt(Math.pow(T.x,2)+Math.pow(T.y,2));const i=oP/(C*e);const oK=Math.acos(i.toFixed(2));const oQ=oK*(180/Math.PI);return oQ},calWordsInfoBds:function(oT){var oM=1000;var oL=1000;var C=-1000;var e=-1000;for(var oP=0;oP<oT.length;oP++){var oQ=oT[oP].offset[0];var oO=oT[oP].offset[1];var oS=oT[oP].size[0];var oU=oT[oP].size[1];var oR=oQ-oS/2;var oK=oO+oU/2;var T=oO-oU/2;var oN=oQ+oS/2;if(oR<oM){oM=oR}if(oN>C){C=oN}if(T<oL){oL=T}if(oK>e){e=oK}}return[oM,oL,C,e]},calcWordsInfoMCBds:function(o0,oR,oS,oP){var i=o0.getHeading();i=this.calcLoopHeading(i);var oQ=o0.height;var oT=oP.pt;var oO=o0.pointToPixelIn(oT,{zoom:oR,useRound:this._useRound});var oV=oO.x+oS;var oU=oQ-oO.y;var T=oP.bds;var oM=T[0];var oK=T[1];var oL=T[2];var C=T[3];var oZ=oM;var oY=oK;var oX=oL;var oW=C;if((i>=0&&i<45)||(i>=315&&i<360)){oZ=oM;oY=oK;oX=oL;oW=C}else{if(i>=45&&i<135){oZ=oK;oY=-oL;oX=C;oW=-oM}else{if(i>=135&&i<225){oZ=-oL;oY=-C;oX=-oM;oW=-oK}else{if(i>=225&&i<315){oZ=-C;oY=oM;oX=-oK;oW=oL}}}}oP._tempBds=[oV+oZ,oU+oY,oV+oX,oU+oW];var oN=o0.pixelToPointIn(new hV(oP._tempBds[0],oO.y+oY),{zoom:oR});var e=o0.pixelToPointIn(new hV(oP._tempBds[2],oO.y+oW),{zoom:oR});oP._mcBds=[oN,e]},calcLoopHeading:function(e){while(e>=360){e-=360}while(e<0){e+=360}return e},fixDataFormat:function(oS){var T=this.fixedLabelData;var e=this.lineLabelData;var C=this.highlightLabelData;var o1=0;var oN=0;var oX=0;var oY;if(this.currentSelectedLabel){var oM=this.getLabelByUid(this.currentSelectedLabel.guid,this.currentSelectedLabel.tilePosStr);if(!oM||oM.isDel){T[o1]=this.currentSelectedLabel.formatedData;o1++;if(this.map.config.enableIconHighlight!==false){C[oX]=this.currentSelectedLabel.formatedData;oX++}}}for(var oW=0;oW<oS.length;oW++){var oP=oS[oW];var oO=oP.fixedLabel;var oK=oP.indoorLabel;var oV=oP.lineLabel;var oZ={highlightLabelData:C,highlightLabelDataLen:oX};oY=this.fixFixedLabelDataFormat(oO,oP,T,o1,oZ);o1=oY[0];oX=oY[1];if(this.map._displayOptions.indoor){oY=this.fixFixedLabelDataFormat(oK,oP,T,o1,oZ,true);o1=oY[0];oX=oY[1]}e[oN]={tileInfo:oP.tileInfo,lineLabels:[]};for(var oU=0;oU<oV.length;oU++){if(!this.map._displayOptions.isEn){if(oV[oU].isDel){continue}var oR=oV[oU].wordsInfo;if(oR){for(var oT=0;oT<oR.length;oT++){if(!oR[oT].rtVertex){continue}var oL=oR[oT].formatedData;if(!oL){oL={textureSource:oP.textureSources[oV[oU].processedInZoom],textureHeight:oP.textureHeights[oV[oU].processedInZoom],renderData:{vertex:oR[oT].rtVertex,textureCoord:oR[oT].texcoord}};oR[oT].formatedData=oL}e[oN].lineLabels.push(oL)}}}else{var oQ=oV[oU]["datas_"+this.getZoomStep()];if(oQ){for(var oT=0;oT<oQ.length;oT++){if(oQ[oT].isDel){continue}var oR=oQ[oT].wordsInfo;if(oR){for(var o0=0;o0<oR.length;o0++){if(!oR[o0].rtVertex){continue}var oL=oR[o0].formatedData;if(!oL){oL={textureSource:oP.textureSources[oQ[oT].processedInZoom],textureHeight:oP.textureHeights[oQ[oT].processedInZoom],renderData:{vertex:oR[o0].rtVertex,textureCoord:oR[o0].texcoordArr}};oR[o0].formatedData=oL}e[oN].lineLabels.push(oL)}}}}}}oN++}T.length=o1;e.length=oN;C.length=oX;return[e,T,C]},fixFixedLabelDataFormat:function(oN,oQ,oR,oO,C,oP){var oL=C.highlightLabelData;var e=C.highlightLabelDataLen;for(var i=0;i<oN.length;i++){if(oN[i].isDel){continue}var oM=oN[i].textPos;var oK=oN[i].iconPos;var T=null;if(oM&&oM.rtVertex){if(!oN[i].formatedData){T={guid:oN[i].guid,guidExt:oN[i].guidExt,tilePosStr:oN[i].tilePosStr,zoom:oN[i].zoom,tempRank:oN[i].tempRank,textureSource:oQ.textureSources?oQ.textureSources[oN[i].processedInZoom]:[],textureHeight:oQ.textureHeights?oQ.textureHeights[oN[i].processedInZoom]:[],renderData:{vertex:oM.rtVertex,textureCoord:oM.texcoord}};if(oP&&oN[i].onDefaultFloor===false){T.textureSource=oQ.indoorTextureSources[oN[i].processedInZoom];T.textureHeight=oQ.indoorTextureHeights[oN[i].processedInZoom]}oN[i].formatedData=T}else{T=oN[i].formatedData;T.tempRank=oN[i].tempRank}if(this.currentSelectedLabel&&T.guid===this.currentSelectedLabel.guid&&T.tilePosStr===this.currentSelectedLabel.tilePosStr&&this.map.config.enableIconHighlight!==false){oL[e]=T;e++}}if(oK&&oK.rtVertex){if(T){if(!T.iconRenderData){T.iconRenderData={vertex:oK.rtVertex,textureCoord:oK.texcoord}}}else{T={guid:oN[i].guid,guidExt:oN[i].guidExt,zoom:oN[i].zoom,tempRank:oN[i].tempRank,iconRenderData:{vertex:oK.rtVertex,textureCoord:oK.texcoord}};oN[i].formatedData=T}}oR[oO]=T;oO++}return[oO,e]},_refreshSpotData:function(){this._spotData.length=0;var oO=this.map;var oM=Math.floor(oO.getZoom());var C=this.map._featureMgr.getLabelData(this.layer.drawIndex);if(this.layer.drawIndex!==0){return}if(C){for(var oK=0,T=C.length;oK<T;oK++){this._addFixedSpotData(C[oK].fixedLabel,oM);this._addFixedSpotData(C[oK].indoorLabel,oM)}}var oP=this.currentSelectedLabel;if(oP&&!this.getTileByLabelUid(oP.guid,oP.tilePosStr)){var oL=this._getSpotDataFromLabel(this.currentSelectedLabel);if(oL){this._spotData.push(oL)}}var oN=new ix("onspotsdataready");oN.spots=this._spotData;oN.index=this.layer.drawIndex;oO._spotDataOnCanvas=this._spotData;oO.dispatchEvent(oN)},_addFixedSpotData:function(oK,T){for(var e=0;e<oK.length;e++){var C=oK[e];if(!this.layer.isClickableLabel(C)||(C.guidExt===1&&C.startScale>T)){continue}var i=oK[e].spot||this._getSpotDataFromLabel(oK[e]);if(i){this._spotData.push(i)}}},_getSpotDataFromLabel:function(C){var oL=this.map;if(!C.bds){return null}var e=C.bds.slice(0);var T=null;if(C.iconPos){T=new d9(C.pt.lng,C.pt.lat)}var i=C.name?C.name.replace("\\\\","<br>"):"";if(C.iconPos&&C.iconPos.iconType.indexOf("ditie")>-1&&oL.getZoom()>14){i=""}var oK={n:i,pt:new d9(C.pt.lng,C.pt.lat),userdata:{iconPoint:T,uid:C.guid,name:i,mapPoi:true,type:C.iconPos?C.iconPos.iconType:"",rank:C.rank,zoom:C.zoom,tilePosStr:C.tilePosStr},bd:e,tag:"MAP_SPOT_INFO"};C.spot=oK;return oK},drawLabelsOnCanvas:function(i,e){if(this._labelTextCanvas){this._labelTextCanvas.drawLabelsOnCanvas(i,e)}}});function m2(e){this._map=e;this.virtualTiles={};this.virtualTile={custom:true,label:{fixedLabel:[],indoorLabel:[],lineLabel:[],textureHeights:[],status:"ready"},tileInfo:{col:0,row:0,zoom:0,useZoom:0,loopOffsetX:0},status:"ready"};this._task={};this.init()}m2.prototype.init=function(){var C=this._map;var i=this;function e(T){i.updateLabels(T)}C.addEventListener("add_tile_labels",e);C.addEventListener("onremove_tile_labels",e);C.addEventListener("onclear_labels",e);C.addEventListener("onlayer_clear",e)};m2.prototype.updateLabels=function(oM){var oQ=this._map.tileMgr.getLabelTextCanvas();var C=this._map;var oO=this;var oN=eR();if(oM&&oM.model==="mvt"){var oS=oM.data;var oR="mvt_"+oM.index;if(!this._task[oR]){this._task[oR]=[oN]}else{this._task[oR].push(oN)}}else{var oS=C._customTileLabels;var oR="custom";if(!this._task[oR]){this._task[oR]=[oN]}else{this._task[oR].push(oN)}}var oL=JSON.parse(JSON.stringify(oS));for(var oK=0;oK<oL.length;oK++){var oP=oL[oK];oP.guid=oP.guid||oP.uid;oP.iconPos=this.getIconVertexData(oP.style,1);var T={textMargin:oP.textMargin,textOnIcon:oP.textOnIcon,iconSize:oP.iconSize,style:{color:oP.style.color,strokeColor:oP.style.strokeColor,fontSize:oP.style.fontSize,haloSize:oP.style.haloSize,}};oL[oK].styleId=oL[oK].styleId||u(T)}oL.taskId=oN;oQ.drawCustomLabelsOnCanvas(oL,function(oX){var oY=true;for(var oV=0;oV<oO._task[oR].length;oV++){if(oO._task[oR][oV]===oL.taskId){oO._task[oR].splice(0,oV+1);oY=false;break}}if(oY){return}if(!oX||!oL||oL.length===0){var e=JSON.parse(JSON.stringify(oO.virtualTile));e.label.tileInfo=e.tileInfo;var oT=null;e.label.fixedLabel=oL;oO.virtualTiles[oR]={};var oW=new ix("oncustom_labels_ready");oW.virtualTile=e;oW.labelCanvas=oT;oW.model=oR;oW.imgKey=cv.getGUID("custom_labels_");C.dispatchEvent(oW);return}else{oO.virtualTiles[oR]=[]}for(var oV=0;oV<oX.length;oV++){var e=JSON.parse(JSON.stringify(oO.virtualTile));e.label.tileInfo=e.tileInfo;var oT=oX[oV];var oU=oL.slice(oT.range[0],oT.range[0]+oT.range[1]);if(oT){e.label.textureHeights[0]=[oT.height]}e.label.fixedLabel=oU;oO.virtualTiles[oR].push(e);var oW=new ix("oncustom_labels_ready");oW.virtualTile=e;oW.labelCanvas=oT;oW.model=oR;oW.imgKey=cv.getGUID("custom_labels_");C.dispatchEvent(oW)}},true)};m2.prototype.getIconVertexData=function(oS,oL){if(!oS||!oS.icon||!oS.iconSize||oS.iconSize.length<2){return null}var oM=2;var oK=oS.iconSize[0]/oM*oL;var oP=oS.iconSize[1]/oM*oL;var T=Math.round(-oK/2);var oR=Math.round(-oP/2);var C=T+oK;var oQ=oR;var i=C;var oO=oQ+oP;var e=T;var oN=oO;return{vertex:[T,oR,C,oQ,i,oO,T,oR,i,oO,e,oN],texcoord:null,width:oK,height:oP,iconType:oS.icon}};cv.register(function(e){e._customLabelMgr=new m2(e)});function ob(i){var T=null;try{if(N(i)){T=new Worker(i);T.onerror=function(e){e.preventDefault();if(/WebAssembly\.Memory|could not allocate memory/i.test((e&&e.message)||"")){return}T=jA(i)}}else{T=jA(i)}}catch(C){T=jA(i)}return T}function jA(oL){var oO=null;try{var C;try{C=new Blob(['importScripts("'+oL+'");'],{type:"application/javascript"})}catch(oM){var oK=new (window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder)();oK.append('importScripts("'+oL+'");');C=oK.getBlob("application/javascript")}var T=window.URL||window.webkitURL;var i=T.createObjectURL(C);oO=new Worker(i)}catch(oN){}return oO}function nH(e){this.init(e)}var kk={init:function(C){var i=this;this.map=C;this.arrPendingData=[];var e=Math.max(navigator.hardwareConcurrency-2,0)||4;if((c9()||hv.Browser.ie)&&e>2){e=2}this._workerNum=e;this.arrWorker=[];this.ratio=ja();this.wordSpaceRatio=this.ratio;this.textSizeRatio=hQ.devicePixelRatio>1?2:1;if(typeof this.map.config.style==="string"){this.stringifiedCustomStyleInfo=null;this.stringifiedCustomStyleInfoZoom=[];this.stringifiedAreaStyleInfo=null}h8.canUseWebAssembly(function(T){var oN;if(T){oN=(window.location.protocol === "http:" ? "http:" : "https:") + "//" + window.location.host + "/bmap-api/res/webgl/10/worker_wasm_g0l1oe.js"}else{oN=(window.location.protocol === "http:" ? "http:" : "https:") + "//" + window.location.host + "/bmap-api/res/webgl/10/worker_asm_3u43mq.js"}i._onWorkerMessage=function oL(oR){if(oR.data&&oR.data.action==="wasm_alloc_failed"){i._fallbackToAsm();return}if(oR.data){this._cbk&&this._cbk(oR.data,this._parsingTileKey)}else{this._cbk&&this._cbk(null,this._parsingTileKey)}this._isBusy=false;this._cbk=null;this._parsingTileInfo=null;this._parsingTileKey=null;if(i.arrPendingData.length>0){var oT=i.arrPendingData.shift();var oQ=oT.cbk;i.loadTileData(oT.url,oT.tileInfo,oT.tileKey,oQ)}var oS=new ix("onrefresh");oS.source="workermgr";C.fire(oS)};for(var oM=0;oM<e;oM++){var oP=ob(oN);oP.onmessage=i._onWorkerMessage;i.arrWorker.push(oP)}if(i.arrPendingData.length>0){for(var oK=0;oK<Math.min(i.arrPendingData.length,e);oK++){var oO=i.arrPendingData.shift();i.loadTileData(oO.url,oO.tileInfo,oO.tileKey,oO.cbk)}}});C.on("onstyle_loaded",function(){for(var oK=0,T=i.arrWorker.length;oK<T;oK++){i.arrWorker[oK].isSendFS=false;i.arrWorker[oK].postMessage({action:"clearStyleCache"})}if(typeof this.config.style!=="string"){i.stringifiedCustomStyleInfo=null;i.stringifiedCustomStyleInfoZoom=[];i.stringifiedAreaStyleInfo=null}});C.on("onstylezoomupdate",function(){for(var oK=0,T=i.arrWorker.length;oK<T;oK++){i.arrWorker[oK].isSendFS=false}if(typeof this.config.style!=="string"){i.stringifiedCustomStyleInfo=null;i.stringifiedCustomStyleInfoZoom=[];i.stringifiedAreaStyleInfo=null}});C.on("destroy",function(){for(var oK=0;oK<i.arrWorker.length;oK++){if(i.arrWorker[oK]){i.arrWorker[oK].terminate()}}i.arrWorker.length=0;var T=i.arrPendingData;for(var oK=T.length-1;oK>=0;oK--){T[oK]=null}i.stringifiedIndoorStyle=null;i.stringifiedCustomStyleInfo=null;i.stringifiedCustomStyleInfoZoom=[];i.stringifiedAreaStyleInfo=null;var oL=Object.keys(i);for(var oK=0;oK<oL.length;oK++){if(oL[oK].indexOf("stringifiedFeatureStyle")>-1||oL[oK].indexOf("stringifiedIconSetInfo")>-1){delete i[oL[oK]]}}})},_fallbackToAsm:function(){var oO=this;if(oO._isAsm||oO._fallingBack){return}oO._fallingBack=true;oO._isAsm=true;window.disableWebAssembly=true;for(var oM=0;oM<oO.arrWorker.length;oM++){var oP=oO.arrWorker[oM];if(oP&&oP._isBusy&&oP._cbk&&oP._parsingUrl){oO.arrPendingData.push({url:oP._parsingUrl,tileInfo:oP._parsingTileInfo,tileKey:oP._parsingTileKey,cbk:oP._cbk})}try{oP&&oP.terminate()}catch(oN){}}oO.arrWorker=[];var oQ=(window.location.protocol === "http:" ? "http:" : "https:") + "//" + window.location.host + "/bmap-api/res/webgl/10/worker_asm_3u43mq.js";for(var oL=0;oL<oO._workerNum;oL++){var C=ob(oQ);C.onmessage=oO._onWorkerMessage;oO.arrWorker.push(C)}oO._fallingBack=false;if(oO.arrPendingData.length>0){for(var oK=0;oK<Math.min(oO.arrPendingData.length,oO._workerNum);oK++){var T=oO.arrPendingData.shift();oO.loadTileData(T.url,T.tileInfo,T.tileKey,T.cbk)}}},getIdleWorker:function(){for(var C=0,e=this.arrWorker.length;C<e;C++){var T=this.arrWorker[C];if(!T._isBusy){T._isBusy=true;return T}}return null},releasePendingData:function(C){var T=[];var oM=this.arrPendingData;for(var oL=oM.length-1;oL>=0;oL--){var oN=oM[oL];var e=oN.tileInfo;if(C.tileTypeName!==e.tileTypeName){continue}var oK="id_"+e.col+"_"+e.row+"_"+e.zoom;if(!C[oK]){oM.splice(oL,1);T.push(e)}}return T},loadTileData:function(i,T,oU,oT){var oL=this.getIdleWorker();var e=this.map._displayOptions.poi;var oN=e?this.map._displayOptions.poiText:false;var oS=this.map._displayOptions.buildingSideGradation;if(oL){oL._cbk=oT;oL._parsingTileInfo=T;oL._parsingTileKey=oU;oL._parsingUrl=i;var oR=(this.map.mapType!==lg&&this.map.config.showVectorStreetLayer);if(this.map.parking){var oK=this.map.parking._auth}var C={action:"loadTileData",url:i,tileInfo:T,tileKey:oU,isText:oN,isPoi:e,buildingSideGradation:oS,hasPoly:oR?false:true,hasLine:oR?this.map.config.showVectorLine:true,carport:oK,isEn:this.map._displayOptions.isEn,language:this.map._displayOptions.language||"zh",referrer:window.location.href};var oQ=this.map.getMapStyleId();var oV=this.map.getAreaStyleId();var oP=!!(oQ.indexOf("custom")===0);var oO=oQ;if(oP){oO="Custom"}if(oP&&cv["customStyleInfo_"+oQ]&&!cv["customStyleInfo_"+oQ]["baseFs"]){oT()}if(!oL.isSendFS){if(!this["stringifiedFeatureStyle"+oQ]&&cv["FeatureStyle"+oQ]){this["stringifiedFeatureStyle"+oQ]=JSON.stringify(cv["FeatureStyle"+oQ])}if(!this["stringifiedIconSetInfo"+oO]){this["stringifiedIconSetInfo"+oO]=JSON.stringify(cv["iconSetInfo"+oO])}if(oP&&cv["indoorStyleInfo_"+oQ]&&cv["indoorStyleInfo_"+oQ]["baseFs"]){this.stringifiedIndoorStyle=JSON.stringify(cv["indoorStyleInfo_"+oQ]["baseFs"])}else{if(!this.stringifiedIndoorStyle){this.stringifiedIndoorStyle=JSON.stringify(cv.indoorStyleDefault)}}if(oP&&cv["customStyleInfo_"+oQ]&&cv["customStyleInfo_"+oQ]["baseFs"]){if(!this.stringifiedCustomStyleInfo){this.stringifiedCustomStyleInfo=JSON.stringify(cv["customStyleInfo_"+oQ])}}if(oP&&cv["customStyleInfo_"+oV]){if(!this.stringifiedAreaStyleInfo){this.stringifiedAreaStyleInfo=JSON.stringify(cv["customStyleInfo_"+oV])}}if(this["stringifiedFeatureStyle"+oQ]){C.featureStyle=this["stringifiedFeatureStyle"+oQ]}C.iconSetInfo=this["stringifiedIconSetInfo"+oO];if(!(oP&&!this.map.config.showCustomIndoor)){C.indoorStyle=this.stringifiedIndoorStyle}if(oP&&this.stringifiedCustomStyleInfo){C.customMapStyle=this.stringifiedCustomStyleInfo}if(oP&&this.stringifiedAreaStyleInfo){C.areaMapStyle=this.stringifiedAreaStyleInfo}C.iconInfo={wordSpaceRatio:this.wordSpaceRatio,textSizeRatio:this.textSizeRatio};C.mapStyleId=oQ;C.areaStyleId=oV;oL.isSendFS=true}oL.postMessage(C)}else{var oM={url:i,tileInfo:T,tileKey:oU,cbk:oT};this.arrPendingData.push(oM)}},setWorkerConfig:function(C){var e={action:"setWorkerConfig"};for(var oK in C){if(C.hasOwnProperty(oK)){e[oK]=C[oK]}}for(var T=0;T<this.arrWorker.length;T++){this.arrWorker[T].postMessage(e)}}};hv.extend(nH.prototype,kk);function mI(i){this.tileLayers=[];this.map=i;var e=this.config=gA[this.map.mapType];this.errorUrl=e.errorUrl;this.tileSize=e.tileSize;this.baseUnits=e.baseUnits;this.baseZoomLevel=e.zoomLevelBase;this.tileURLs=e.tileUrls;this.tilesInfoCache={};this.loadDelay=10;this._labelTextCanvas=null}cv.register(function(i){if(i._renderType!=="webgl"){return}var e=i.tileMgr=new mI(i);i.addEventListener("addtilelayer",function(T){e.addWebGLLayer(T.target)});i.addEventListener("removetilelayer",function(T){e.removeWebGLLayer(T.target)});i.on("update",function C(oK){if(i.getFeatureStyleTags().length===0||!(i.customLoaded&&i.areaCustomLoaded)){return}var T=false;if(oK.changedStatus&&oK.changedStatus.onzoom_changed){T=true}e.loadLayersData({zoomChanged:T})});i.on("style_changed",function(){e.loadLayersData()});i.on("destroy",function(){for(var T=0;T<e.tileLayers.length;T++){e.tileLayers[T].remove();e.tileLayers[T].destroyDrawData();e.tileLayers[T]=null}e.tilesInfoCache={};e.tileLayers=[];e._labelTextCanvas=null;e.map=null;e.requestTime=null})});hv.extend(mI.prototype,{addWebGLLayer:function(C){this.tileLayers.push(C);C.initDrawData();if(this.tileLayers.length>1){for(var e=1;e<this.tileLayers.length;e++){if(this.tileLayers[e].isFlat){this.map.setDisplayOptions({isFlat:true});break}}}if(this.map.getFeatureStyleTags().length>0&&this.map.customLoaded&&this.map.areaCustomLoaded){this.loadLayersData()}else{if(C.baseLayer){var T=this;this.map.loadMapStyleFiles(function(){var i=new ix("onlayer_update");i.name="na";T.map.fire(i);T.loadLayersData()})}}},removeWebGLLayer:function(oL){var oM=false;for(var oK=0,T=this.tileLayers.length;oK<T;oK++){if(oL===this.tileLayers[oK]){oM=true;this.tileLayers.splice(oK,1);break}}if(oM===false){return}oL.destroyDrawData();if(this.map.getFeatureStyleTags().length>0){this.loadLayersData()}if(this.tileLayers.length===1){this.map.setDisplayOptions({isFlat:false})}else{var e=false;for(var oK=1;oK<this.tileLayers.length;oK++){if(this.tileLayers[oK].isFlat){e=true;break}}this.map.setDisplayOptions({isFlat:e})}var C=new ix("onrefresh");C.source="removewebgllayer";this.map.fire(C)},getLabelTextCanvas:function(){if(!this._labelTextCanvas){this._labelTextCanvas=new aY(this.map)}return this._labelTextCanvas},loadLayersData:function(i){if(!this.map||this.map.suspendLoad){return}var oK=this;i=i||{};var T=!!i.zoomChanged;var e=(T===true||this.map.getTilt()>50);if(!e){if(!this.syncLoadTimer){this.syncLoadTimer=setTimeout(function(){oK._loadLayersFromCache(T);oK.syncLoadTimer=null},40)}}else{this._loadLayersFromCache(T)}if(!oK.map.viewAnimationTime){this.timer&&window.clearTimeout(this.timer)}if(!this.requestTime){this.requestTime=new Date().getTime()}else{if(new Date().getTime()-this.requestTime>=1000){C()}}function C(){if(!oK.map){return}if(oK.map.viewAnimationTime){if(new Date().getTime()-oK.map.viewAnimationTime<1000){return}oK.map.viewAnimationTime=new Date().getTime()}var oM=oK.tileLayers.length;oK.tilesInfoCache={};for(var oO=0;oO<oM;oO++){var oQ=oK.tileLayers[oO];var oP=oQ.tileType;var oL=null;var oN=oK._getTilesInfoKey(oP,oQ);if(oK.tilesInfoCache[oN]){oL=oK.tilesInfoCache[oN]}else{oL=oK.calcTilesInfo(oP,oQ);oK.tilesInfoCache[oN]=oL}oL&&oQ.loadLayerData(oL,false,T)}oK.timer=null;oK.requestTime=null}this.timer=window.setTimeout(C,this.loadDelay);if((c9()||hv.Browser.ie)&&T){this.loadDelay=200}else{this.loadDelay=80}},_getTilesInfoKey:function(i,C){var e=i.getName();e+=("_"+(C.transform?C.transform.source:"default"));e+=("_"+C.spanLevel||0);return e},_loadLayersFromCache:function(oL){if(!this.map){return}this.map._featureMgr.clearData();this.map.tileLabels=[];var oO=this.tileLayers;oO.sort(function(oP,i){return oP.zIndex-i.zIndex>0});var C=oO.length;this.tilesInfoCache={};for(var oK=0;oK<C;oK++){var oN=oO[oK];var oM=oN.tileType;var e=null;var T=this._getTilesInfoKey(oM,oN);if(this.tilesInfoCache[T]){e=this.tilesInfoCache[T]}else{e=this.calcTilesInfo(oM,oN);this.tilesInfoCache[T]=e}e&&oN.loadLayerData(e,true,oL)}},calcTilesInfo:function(oW,pn){var o9=this.map;var pf=o9.getMapTypeId();var pa=gA[pf];var o4=o9.getZoom();var e=Math.floor(o4);var oM=oW.getDataZoom(o4);var pr=oW.getName();if(pr==="xyz"){oM=dA(oM,pa.minDataZoom,22)}else{oM=dA(oM,pa.minDataZoom,pa.maxDataZoom)}var pi=e;if(oW._name==="web"||oW._name==="xyz"){pi=oM}else{if(pi<3){pi=3}}var o8=oW.getTileSize(o4);var oL=oW.getBaseTileSize(o4);var o6=o9.getBoundsIn();if(!o6){return}var o0=oW.getMercatorSize(o4,oM);var oZ;var ph;var o7;var pk;var pb=o9.getCenterIn();pb=hz.calcLoopCenterPoint(pb);if(pr==="xyz"){return this.calcXYZTilesInfo(pb,o6,oM,pr,pn,o9)}var o5=Math.floor(pb.lng/o0);var oO=Math.floor(pb.lat/o0);var pd=0;var C=0;o6=hz.calcLoopMapBounds(o6,pb);if(o6.ne.lng>hz._mc180X){var oU=hz.getSpaceDistanceInPixel(oM);pd=Math.ceil(oU/oL)}if(o6.sw.lng<hz._mcM180X){var oU=hz.getSpaceDistanceInPixel(oM);C=Math.ceil(oU/oL)}if(o6.ne.lat>19505879.362428114||o6.sw.lat<-15949096.637571886){o6.ne.lat=19505879.362428114;o6.sw.lat=-15949096.637571886}var oQ=[Math.floor(o6.sw.lng/o0)-C,Math.floor(o6.sw.lat/o0)];var pp=[Math.floor(o6.ne.lng/o0)+pd,Math.floor(o6.ne.lat/o0)];oZ=oQ[0]-o9.config.extendTiles;ph=pp[0]+1+o9.config.extendTiles;o7=oQ[1]-o9.config.extendTiles;pk=pp[1]+1+o9.config.extendTiles;var oV=[];for(var oS=oZ;oS<ph;oS++){if(hz.isTileBlank(oS,oM,oL)===true){continue}for(var oX=o7;oX<pk;oX++){var pm=false;var oR=256;if(pr==="web"){var o2=this._webTileRaste180(oS,oX,oM);pm=o2.combine;oR=o2.dataIndex}var oT={col:oS,row:oX,zoom:oM,useZoom:pi,tileTypeName:pr,loopOffsetX:0,tileSize:o8,baseTileSize:oL,mercatorSize:o0,combine:pm,dataIndex:oR,tileLoadFunction:pn.tileLoadFunction,};oV.push(oT);var pe="id_"+oS+"_"+oX+"_"+oM;oV[pe]=true}}if(oM<=5){for(var po=0,pl=oV.length;po<pl;po++){var oS=oV[po].col;var oX=oV[po].row;var pg=hz.calcLoopParam(oS,oM);var oN=pg.T;var o1=oS>=0?oS-oN:oS+oN;var o3="id_"+o1+"_"+oX+"_"+oM;if(hz.isTileBlank(o1,oM,oL)===true){continue}if(!oV[o3]){var pm=false;var oR=256;if(pr==="web"){var o2=this._webTileRaste180(o1,oX,oM);pm=o2.combine;oR=o2.dataIndex}var oT={col:o1,row:oX,zoom:oM,useZoom:pi,loopOffsetX:0,tileSize:o8,baseTileSize:oL,mercatorSize:o0,combine:pm,dataIndex:oR,tileLoadFunction:pn.tileLoadFunction,};oV.push(oT);oV[o3]=true}}}if(this.map._tilt>0&&(pr!=="web"||o4>=8)){for(var po=0;po<oV.length;po++){var oP=oV[po];var pj=oP.col;var pq=oP.row;var pc=[];pc.minX=pj*o0;pc.maxX=(pj+1)*o0;pc.minY=pq*o0;pc.maxY=(pq+1)*o0;var oK=new d9(0,0);oK.lng=(pc.minX+pc.maxX)/2;oK.lat=(pc.minY+pc.maxY)/2;var oY=o9.pointToPixelIn(oK);if(oY.x>0&&oY.x<this.map.width&&oY.y>0&&oY.y<this.map.height){continue}if(pc.minX<pb.lng&&pc.maxX>pb.lng&&pc.minY<pb.lat&&pc.maxY>pb.lat){continue}if(!this.ifTileInMapBounds(pc,o6,pj,pq)){oV.splice(po,1);po--}}}oV.sort((function(i){return function(T,ps){return((0.4*Math.abs(T.col-i[0])+0.6*Math.abs(T.row-i[1]))-(0.4*Math.abs(ps.col-i[0])+0.6*Math.abs(ps.row-i[1])))}})([o5,oO]));oV.zoom=oM;oV.tileTypeName=pr;return oV},_webTileRaste180:function(C,oO,e){var i=this.map;var oL=false;var oM=256;var oK=hz.calcLoopParam(C,e);var oN={col:oK.col,row:oO,baseTileSize:256,zoom:e};var T=m8.prototype.tileToBound(oN,i.getCenter());if(Math.ceil(T.LL.sw.lng)*Math.floor(T.LL.ne.lng)<0){oL=true;oM=hz.pixelWidth(T.MC.sw.lng,e);if(oN.col<0){oM=-oM}}return{combine:oL,dataIndex:oM}},calcXYZTilesInfo:function(oU,oN,oT,oY,oM,o1){var oP=o1.width;var oZ=o1.height;var oO=Math.floor(oT);var oQ=null;if(oM.transform.target==="EPSG3857"){var T=fA.transformBDmcPoint(oU,oM.transform);var oK=fA.getRangeExtent(T,oP,oZ,oO,oM.transform);oQ=[oK.minX,oK.minY,oK.maxX,oK.maxY]}else{if(oM.transform.source==="BD09MC"){var T=[oU.lng,oU.lat];oQ=[oN.sw.lng,oN.sw.lat,oN.ne.lng,oN.ne.lat]}else{var T=fA.transformBDmcPoint(oU,oM.transform);var oL=fA.transformBDmcPoint(oN.ne,oM.transform);var oS=fA.transformBDmcPoint(oN.sw,oM.transform);oQ=fA.getLoopBox(T,[oS[0],oS[1],oL[0],oL[1]])}}if(!T||!oQ){return[]}oO=oO+oM.spanLevel;var C=fA.getTileRangeForExtentFactory(oQ,oO,oM.transform);var e=[];var o2=fA.getResolutionScale(oO,oM.transform);for(var oX=C.minX;oX<=C.maxX;oX++){for(var oV=C.minY;oV<=C.maxY;oV++){var oW={col:oX,row:oV,zoom:oO,useZoom:oO,tileTypeName:oY,loopOffsetX:0,tileSize:256*o2,transform:oM.transform,combine:false,dataIndex:0,tileLoadFunction:oM.tileLoadFunction,preciseVertex:oM.preciseVertex||false};e.push(oW);var oR="id_"+oX+"_"+oV+"_"+oO;e[oR]=true}}var o0=fA.getTileCoordForCoordAndZ(T,oO);e.sort((function(i){return function(o3,o4){return((0.4*Math.abs(o3.col-i[0])+0.6*Math.abs(o3.row-i[1]))-(0.4*Math.abs(o4.col-i[0])+0.6*Math.abs(o4.row-i[1])))}})([o0[1],o0[2]]));e.zoom=oO;e.tileTypeName=oY;return e},getCurrentViewTilesInfo:function(C,T){var i=this._getTilesInfoKey(C,T);var e=this.tilesInfoCache[i];if(!e){return this.calcTilesInfo(C,T)}return e},ifTileInMapBounds:function(e,oL,C,oK){var i=oL.normalizedBottomLeft;var oW=oL.normalizedTopRight;var oO=oL.normalizedTopLeft;var oM=oL.normalizedBottomRight;var T=false;var oV=new d9(e.minX,e.minY);var oS=new d9(e.maxX,e.maxY);var oN=new d9(oS.lng,oV.lat);var oT=new d9(oV.lng,oS.lat);var oQ=[oT,oS,oN,oV];for(var oU=0,oP=oQ.length;oU<oP;oU++){var oR=oU+1;if(oR===oP){oR=0}var oX=oU;var oY=m7(oQ[oR],oQ[oX],oO,i);if(oY){T=true;break}oY=m7(oQ[oR],oQ[oX],oM,oW);if(oY){T=true;break}oY=m7(oQ[oR],oQ[oX],oW,oO);if(oY){T=true;break}oY=m7(oQ[oR],oQ[oX],i,oM);if(oY){T=true;break}}return T},getTileLayer:function(oK){for(var T=0,e=this.tileLayers.length;T<e;T++){var C=this.tileLayers[T];if(C.mapType===oK){return C}}return null},isExitTileLayer:function(oK){for(var T=0,e=this.tileLayers.length;T<e;T++){var C=this.tileLayers[T];if(C===oK){return true}}return false},getZoomState:function(i){var e=i-this.lastZoom;if(e>0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState}});function ml(e){this.map=e;this.gl=null;this.layers=[];this.mouseEventThrottle=this.throttle(this.pick,100).bind(this);this.mousePointerThrottle=this.throttle(this.mouseStatus,300).bind(this);this.base=new d9(12069475.280738307,3929271.1724863998);this.iconCache=new a1((c9()||hv.Browser.ie)?64:128,{clearCallback:function(i){}});this._boundMouseEvent=this._layerMouseEvent.bind(this);this._boundClickEvent=this._layerClickEvent.bind(this);this._boundDBLClickEvent=this._layerDBLClickEvent.bind(this);this._boundRightClickEvent=this._layerRightClickEvent.bind(this)}cv.register(function(i){if(i._renderType!=="webgl"){return}var e=i._normalLayerMgr=new ml(i);i.toFormatCoords=function(oL,oO){var oN=[];var oM=e.base;if(oO&&oO.center){oM=m8.convertLL2MC(oO.center)}for(var oK=0;oK<oL.length;oK++){var C=m8.convertLL2MC(new d9(oL[oK][0],oL[oK][1]));var T=[C.lng-oM.lng,C.lat-oM.lat];oN.push(T)}return oN};i.indexToRgb=function(T){T++;var C=Math.floor(T/65536);T-=C*65536;var oL=Math.floor(T/256);T-=oL*256;var oK=T;return[oK,oL,C]};i.addEventListener("addnormallayer",function(C){e.addWebGLLayer(C.target)});i.addEventListener("removenormallayer",function(C){e.removeWebGLLayer(C.target)});i.addEventListener("update",function(oM){if(oM.changedStatus&&oM.changedStatus.onsize_changed){if(e.gl){e.clearFramebuffer();var oL=i.getSize();var oK=oL.width;var C=oL.height;var T=i.config.ratio;oK=Math.round(oK*T);C=Math.round(C*T);e.pickFBO=e.createFramebuffer(oK,C)}}});i.addEventListener("onmousemove",e._boundMouseEvent);i.addEventListener("onclick",e._boundClickEvent);i.addEventListener("ondblclick",e._boundDBLClickEvent);i.addEventListener("onrightclick",e._boundRightClickEvent);i.on("destroy",function(){i.removeEventListener("onmousemove",e._boundMouseEvent);i.removeEventListener("onclick",e._boundClickEvent);i.removeEventListener("ondblclick",e._boundDBLClickEvent);i.removeEventListener("onrightclick",e._boundRightClickEvent);e.removeAllLayers(true);i.indexToRgb=null;i.toFormatCoords=null;e.pickFBO=null;e.preFramebuffer=null;e.gl=null;e.iconCache.clear()});i.on("glmoduleloaded",function(){e.gl=i._webglPainter.gl;e.pickFBO=e.createFramebuffer();for(var C=0;C<e.layers.length;C++){e.layers[C].onInit(i,e.gl)}i.dispatchEvent(new ix("onupdate"))});i.addEventListener("layer_clear",function(C){e.iconCache.clear()})});hv.extend(ml.prototype,{init:function(){var e=this;this.map.toFormatCoords=function(oL){var oM=[];for(var oK=0;oK<oL.length;oK++){var C=m8.convertLL2MC(new d9(oL[oK][0],oL[oK][1]));var T=[C.lng-e.base.lng,C.lat-e.base.lat];oM.push(T)}return oM};this.map.indexToRgb=function(T){T++;var C=Math.floor(T/65536);T-=C*65536;var oL=Math.floor(T/256);T-=oL*256;var oK=T;return[oK,oL,C]};this.pickFBO=this.createFramebuffer();var i=this;this.map.addEventListener("addnormallayer",function(C){i.addWebGLLayer(C.target)});this.map.addEventListener("removenormallayer",function(C){i.removeWebGLLayer(C.target)});this.map.addEventListener("onmousemove",this._layerMouseEvent.bind(this));this.map.addEventListener("onclick",this._layerClickEvent.bind(this));this.map.addEventListener("onrightclick",this._layerRightClickEvent.bind(this));this.map.addEventListener("ondblclick",this._layerDBLClickEvent.bind(this));this.map.on("destroy",function(){i.removeAllLayers(true);i.map.indexToRgb=null;i.map.toFormatCoords=null;i.pickFBO=null;i.preFramebuffer=null})},addWebGLLayer:function(C){var T=false;for(var e=0;e<this.layers.length;e++){if(this.layers[e]===C){T=true;break}}if(!T){this.layers.push(C);if(this.gl){C.onInit(this.map,this.gl)}this.map.dispatchEvent(new ix("onupdate"))}},removeWebGLLayer:function(C){for(var e=0;e<this.layers.length;e++){if(this.layers[e]===C){this.map._featureMgr.removeLayer(C.zIndex);this.layers.splice(e,1);C.onDestroy();this.map.dispatchEvent(new ix("onupdate"));break}}},removeAllLayers:function(T){for(var C=0;C<this.layers.length;C++){var e=this.layers[C];if(e.visible){this.map._featureMgr.removeLayer(e.zIndex)}if(T){e.onKill&&e.onKill()}e.onDestroy()}this.layers=[];this.map.dispatchEvent(new ix("onupdate"))},sortLayer:function(){this.layers.sort(function(i,e){return i.zIndex-e.zIndex>0})},_layerMouseEvent:function(i){this.mouseEventThrottle(i,"onmousemove")},_layerClickEvent:function(i){this.pick(i,"onclick")},_layerDBLClickEvent:function(i){this.pick(i,"ondblclick")},_layerRightClickEvent:function(i){this.pick(i,"onrightclick")},throttle:function(C,e){var T=null;var i=Date.now();return function(){var oN=Date.now();var oM=e-(oN-i);var oL=this;var oK=arguments;if(T){clearTimeout(T)}if(oM<=0){C.apply(oL,oK);i=Date.now()}else{T=setTimeout(function(){C.apply(oL,oK)},oM)}}},pick:function(oO,oM){if(!this.layers.length){return false}var T=false;var C=false;for(var oL=this.layers.length-1;oL>=0;oL--){var oK=this.layers[oL];if(oK.doRender()&&oK.testEvent(oM)){C=true;if(oK.pick){if(oM==="onmousemove"||oK.hasEvent(oM)){var oN=oK.pick(oO.x,oO.y,oM)}else{continue}if(oN&&oN.dataIndex!==-1){if(oM==="onmousemove"){T=true}if(oK.hasEvent(oM)){oK.dispatcher(oO,oN,oM)}if(!oK.popEvent){break}}else{if(oK.hasEvent(oM)){oK.dispatcher(oO,oN,oM)}}}}}if(oM==="onmousemove"&&C){this.mousePointerThrottle(T)}this.map.dispatchEvent(new ix("onupdate"))},mouseStatus:function(e){if(e){this.map.platform.style.cursor=this.map.config.overlayMoveCursor}else{this.map.platform.style.cursor=this.map.config.defaultCursor}},saveFramebuffer:function(){var e=this.gl;this.preFramebuffer=e.getParameter(e.FRAMEBUFFER_BINDING)},bindFramebuffer:function(e){var i=this.gl;if(e){i.bindFramebuffer(i.FRAMEBUFFER,e)}else{i.bindFramebuffer(i.FRAMEBUFFER,null)}},clear:function(e){var i=this.gl;i.clearColor(0,0,0,0);if(e instanceof Array){i.clearColor(e[0],e[1],e[2],e[3])}i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT)},restoreFramebuffer:function(){var i=this.gl;if(this.map&&this.map._webglPainter){var e=this.map._webglPainter.background||[1,1,1,1];i.clearColor(e[0]/255,e[1]/255,e[2]/255,e[3]/255)}i.bindFramebuffer(i.FRAMEBUFFER,this.preFramebuffer)},clearFramebuffer:function(){if(this.pickFBO){var e=this.gl;e.deleteTexture(this.pickFBO.texture);e.deleteFramebuffer(this.pickFBO)}},createFramebuffer:function(T,i){var oN=this.gl;T=T||oN.canvas.width;i=i||oN.canvas.height;var oL=oN.createFramebuffer();var oK=oN.createTexture();oN.bindTexture(oN.TEXTURE_2D,oK);oN.texImage2D(oN.TEXTURE_2D,0,oN.RGBA,T,i,0,oN.RGBA,oN.UNSIGNED_BYTE,null);oN.texParameteri(oN.TEXTURE_2D,oN.TEXTURE_MAG_FILTER,oN.LINEAR);oN.texParameteri(oN.TEXTURE_2D,oN.TEXTURE_MIN_FILTER,oN.LINEAR);oN.texParameteri(oN.TEXTURE_2D,oN.TEXTURE_WRAP_S,oN.CLAMP_TO_EDGE);oN.texParameteri(oN.TEXTURE_2D,oN.TEXTURE_WRAP_T,oN.CLAMP_TO_EDGE);oL.texture=oK;var C=oN.createRenderbuffer();oN.bindRenderbuffer(oN.RENDERBUFFER,C);oN.renderbufferStorage(oN.RENDERBUFFER,oN.DEPTH_STENCIL,T,i);oL.depthBuffer=C;oN.bindFramebuffer(oN.FRAMEBUFFER,oL);oN.framebufferTexture2D(oN.FRAMEBUFFER,oN.COLOR_ATTACHMENT0,oN.TEXTURE_2D,oK,0);oN.framebufferRenderbuffer(oN.FRAMEBUFFER,oN.DEPTH_STENCIL_ATTACHMENT,oN.RENDERBUFFER,C);var oM=oN.checkFramebufferStatus(oN.FRAMEBUFFER);if(oN.FRAMEBUFFER_COMPLETE!==oM){console.log("Frame buffer object is incomplete: "+oM.toString());this._clearBuffer(oN);return}this._clearBuffer(oN);return oL},_clearBuffer:function(e){e.bindFramebuffer(e.FRAMEBUFFER,null);e.bindTexture(e.TEXTURE_2D,null);e.bindRenderbuffer(e.RENDERBUFFER,null)},loadIconImages:function(T,oQ){var oR=T;var oS=oR.length;var oM=this;var C=0;var oP=200;for(var oK=0;oK<oS;oK++){var oL=oR[oK];var e=oL.icon;var oO=e;if(e instanceof HTMLCanvasElement){oO=e.id;if(!this.iconCache.getData(oO)){this._addToIconTexture(e);this.iconCache.setData(oO,{loaded:true,image:e})}continue}C++;if(this.iconCache.getData(oO)){if(this.iconCache.getData(oO).loaded){oQ(T)}continue}var oN=new Image();oN.id=oO;oN.iconUrl=e;oN.crossOrigin="anonymous";oN.onload=function(){if(oM.iconCache.getData(this.id)){oM.iconCache.getData(this.id).loaded=true;oM._addToIconTexture(this)}if(!oM._iconLoadTimer){oM._iconLoadTimer=setTimeout(function(){oQ(T);oM._iconLoadTimer=null},oP)}this.onload=null};oN.onerror=function(){if(!oM._iconLoadTimer){oM._iconLoadTimer=setTimeout(function(){oQ(T);oM._iconLoadTimer=null},oP)}oM.iconCache.removeData(this.id);this.onerror=null};oN.src=e;this.iconCache.setData(oO,{loaded:false,image:oN})}oQ(T)},_addToIconTexture:function(oL){if(!this.map._webglMapScene){return}var oN=this.map._webglMapScene._painter;var e=oN._iconTextureAtlas.addTexture(oL);if(e===false){this.map.fire(new ix("onlayer_clear"));return}if(!e){return}oN._iconTextureAtlasOffset[oL.id]=e;var oQ=0*oL.width/1024+e.width;var oK=0*oL.height/1024+e.height;var oP=oL.width/1024+e.width;var T=oK;var oO=oP;var C=oL.height/1024+e.height;var oM=oQ;var i=C;oN._iconTextureAtlasCoords[oL.id]=[oQ,oK,oP,T,oO,C,oM,i]}});var k4=(function(){function oP(pg,pl,ph,pi,pn){ph=ph||2;var pj=pl&&pl.length;var pe=pj?pl[0]*ph:pg.length;var pk=o4(pg,0,pe,ph,true);var pd=pn||[];if(!pk){return pd}var pc;var pb;var pa;var o9;var po;var pm;var pp;pi=pi||0;if(pj){pk=oY(pg,pl,pk,ph)}if(pg.length>80*ph){pc=pa=pg[0];pb=o9=pg[1];for(var pf=ph;pf<pe;pf+=ph){po=pg[pf];pm=pg[pf+1];if(po<pc){pc=po}if(pm<pb){pb=pm}if(po>pa){pa=po}if(pm>o9){o9=pm}}pp=Math.max(pa-pc,o9-pb)}C(pk,pd,ph,pc,pb,pp,null,pi);return pd}function o4(pd,pf,o9,pe,pa){var pb;var pc;if(pa===(o8(pd,pf,o9,pe)>0)){for(pb=pf;pb<o9;pb+=pe){pc=oM(pb,pd[pb],pd[pb+1],pc)}}else{for(pb=o9-pe;pb>=pf;pb-=pe){pc=oM(pb,pd[pb],pd[pb+1],pc)}}if(pc&&oS(pc,pc.next)){o0(pc);pc=pc.next}return pc}function oW(pc,o9){if(!pc){return pc}if(!o9){o9=pc}var pb=pc;var pa;do{pa=false;if(!pb.steiner&&(oS(pb,pb.next)||o2(pb.prev,pb,pb.next)===0)){o0(pb);pb=o9=pb.prev;if(pb===pb.next){return null}pa=true}else{pb=pb.next}}while(pa||pb!==o9);return o9}function C(pa,pc,pf,pd,o9,pj,pi,pg){if(!pa){return}if(!pi&&pj){oR(pa,pd,o9,pj)}var ph=pa;var pb;var pe;while(pa.prev!==pa.next){pb=pa.prev;pe=pa.next;if(pj?o7(pa,pd,o9,pj):oZ(pa)){pc.push(pb.i/pf+pg);pc.push(pa.i/pf+pg);pc.push(pe.i/pf+pg);o0(pa);pa=pe.next;ph=pe.next;continue}pa=pe;if(pa===ph){if(!pi){C(oW(pa),pc,pf,pd,o9,pj,1,pg)}else{if(pi===1){pa=oV(pa,pc,pf,pg);C(pa,pc,pf,pd,o9,pj,2,pg)}else{if(pi===2){oU(pa,pc,pf,pd,o9,pj,pg)}}}break}}}function oZ(pb){var pa=pb.prev;var o9=pb;var pd=pb.next;if(o2(pa,o9,pd)>=0){return false}var pc=pb.next.next;while(pc!==pb.prev){if(oT(pa.x,pa.y,o9.x,o9.y,pd.x,pd.y,pc.x,pc.y)&&o2(pc.prev,pc,pc.next)>=0){return false}pc=pc.next}return true}function o7(pe,pf,pd,pl){var pi=pe.prev;var ph=pe;var pg=pe.next;if(o2(pi,ph,pg)>=0){return false}var pm=pi.x<ph.x?(pi.x<pg.x?pi.x:pg.x):(ph.x<pg.x?ph.x:pg.x);var pj=pi.y<ph.y?(pi.y<pg.y?pi.y:pg.y):(ph.y<pg.y?ph.y:pg.y);var pc=pi.x>ph.x?(pi.x>pg.x?pi.x:pg.x):(ph.x>pg.x?ph.x:pg.x);var pb=pi.y>ph.y?(pi.y>pg.y?pi.y:pg.y):(ph.y>pg.y?ph.y:pg.y);var pa=e(pm,pj,pf,pd,pl);var pk=e(pc,pb,pf,pd,pl);var o9=pe.nextZ;while(o9&&o9.z<=pk){if(o9!==pe.prev&&o9!==pe.next&&oT(pi.x,pi.y,ph.x,ph.y,pg.x,pg.y,o9.x,o9.y)&&o2(o9.prev,o9,o9.next)>=0){return false}o9=o9.nextZ}o9=pe.prevZ;while(o9&&o9.z>=pa){if(o9!==pe.prev&&o9!==pe.next&&oT(pi.x,pi.y,ph.x,ph.y,pg.x,pg.y,o9.x,o9.y)&&o2(o9.prev,o9,o9.next)>=0){return false}o9=o9.prevZ}return true}function oV(pf,pb,pe,pd){var pc=pf;do{var pa=pc.prev;var o9=pc.next.next;if(!oS(pa,o9)&&i(pa,pc,pc.next,o9)&&o3(pa,o9)&&o3(o9,pa)){pb.push(pa.i/pe+pd);pb.push(pc.i/pe+pd);pb.push(o9.i/pe+pd);o0(pc);o0(pc.next);pc=pf=o9}pc=pc.next}while(pc!==pf);return pc}function oU(o9,pb,pd,pc,pa,pi,pe){var ph=o9;do{var pg=ph.next.next;while(pg!==ph.prev){if(ph.i!==pg.i&&o1(ph,pg)){var pf=oQ(ph,pg);ph=oW(ph,ph.next);pf=oW(pf,pf.next);C(ph,pb,pd,pc,pa,pi,null,pe);C(pf,pb,pd,pc,pa,pi,null,pe);return}pg=pg.next}ph=ph.next}while(ph!==o9)}function oY(pb,pi,pe,pd){var pf=[];var pc;var pg;var o9;var pa;var ph;for(pc=0,pg=pi.length;pc<pg;pc++){o9=pi[pc]*pd;pa=pc<pg-1?pi[pc+1]*pd:pb.length;ph=o4(pb,o9,pa,pd,false);if(ph===ph.next){ph.steiner=true}pf.push(oN(ph))}pf.sort(oO);for(pc=0;pc<pf.length;pc++){oL(pf[pc],pe);pe=oW(pe,pe.next)}return pe}function oO(pa,o9){return pa.x-o9.x}function oL(pb,pa){pa=o5(pb,pa);if(pa){var o9=oQ(pa,pb);oW(o9,o9.next)}}function o5(o9,pd){var pa=pd;var pf=o9.x;var pe=o9.y;var pc=-Infinity;var pb;do{if(pe<=pa.y&&pe>=pa.next.y){var pi=pa.x+(pe-pa.y)*(pa.next.x-pa.x)/(pa.next.y-pa.y);if(pi<=pf&&pi>pc){pc=pi;if(pi===pf){if(pe===pa.y){return pa}if(pe===pa.next.y){return pa.next}}pb=pa.x<pa.next.x?pa:pa.next}}pa=pa.next}while(pa!==pd);if(!pb){return null}if(pf===pc){return pb.prev}var ph=pb;var pl=pb.x;var pj=pb.y;var pk=Infinity;var pg;pa=pb.next;while(pa!==ph){if(pf>=pa.x&&pa.x>=pl&&oT(pe<pj?pf:pc,pe,pl,pj,pe<pj?pc:pf,pe,pa.x,pa.y)){pg=Math.abs(pe-pa.y)/(pf-pa.x);if((pg<pk||(pg===pk&&pa.x>pb.x))&&o3(pa,o9)){pb=pa;pk=pg}}pa=pa.next}return pb}function oR(pd,o9,pc,pa){var pb=pd;do{if(pb.z===null){pb.z=e(pb.x,pb.y,o9,pc,pa)}pb.prevZ=pb.prev;pb.nextZ=pb.next;pb=pb.next}while(pb!==pd);pb.prevZ.nextZ=null;pb.prevZ=null;oK(pb)}function oK(pf){var pc;var pb;var pa;var pe;var pg;var o9;var ph;var pd;var pi=1;do{pb=pf;pf=null;pg=null;o9=0;while(pb){o9++;pa=pb;ph=0;for(pc=0;pc<pi;pc++){ph++;pa=pa.nextZ;if(!pa){break}}pd=pi;while(ph>0||(pd>0&&pa)){if(ph===0){pe=pa;pa=pa.nextZ;pd--}else{if(pd===0||!pa){pe=pb;pb=pb.nextZ;ph--}else{if(pb.z<=pa.z){pe=pb;pb=pb.nextZ;ph--}else{pe=pa;pa=pa.nextZ;pd--}}}if(pg){pg.nextZ=pe}else{pf=pe}pe.prevZ=pg;pg=pe}pb=pa}pg.nextZ=null;pi*=2}while(o9>1);return pf}function e(pa,pd,o9,pc,pb){pa=32767*(pa-o9)/pb;pd=32767*(pd-pc)/pb;pa=(pa|(pa<<8))&16711935;pa=(pa|(pa<<4))&252645135;pa=(pa|(pa<<2))&858993459;pa=(pa|(pa<<1))&1431655765;pd=(pd|(pd<<8))&16711935;pd=(pd|(pd<<4))&252645135;pd=(pd|(pd<<2))&858993459;pd=(pd|(pd<<1))&1431655765;return pa|(pd<<1)}function oN(pb){var pa=pb;var o9=pb;do{if(pa.x<o9.x){o9=pa}pa=pa.next}while(pa!==pb);return o9}function oT(pd,pc,pf,pe,o9,pg,pb,pa){return(o9-pb)*(pc-pa)-(pd-pb)*(pg-pa)>=0&&(pd-pb)*(pe-pa)-(pf-pb)*(pc-pa)>=0&&(pf-pb)*(pg-pa)-(o9-pb)*(pe-pa)>=0}function o1(pa,o9){return pa.next.i!==o9.i&&pa.prev.i!==o9.i&&!oX(pa,o9)&&o3(pa,o9)&&o3(o9,pa)&&T(pa,o9)}function o2(pb,pa,o9){return(pa.y-pb.y)*(o9.x-pa.x)-(pa.x-pb.x)*(o9.y-pa.y)}function oS(pa,o9){return pa.x===o9.x&&pa.y===o9.y}function i(pb,o9,pa,pc){if((oS(pb,o9)&&oS(pa,pc))||(oS(pb,pc)&&oS(pa,o9))){return true}return o2(pb,o9,pa)>0!==o2(pb,o9,pc)>0&&o2(pa,pc,pb)>0!==o2(pa,pc,o9)>0}function oX(pa,o9){var pb=pa;do{if(pb.i!==pa.i&&pb.next.i!==pa.i&&pb.i!==o9.i&&pb.next.i!==o9.i&&i(pb,pb.next,pa,o9)){return true}pb=pb.next}while(pb!==pa);return false}function o3(pa,o9){return o2(pa.prev,pa,pa.next)<0?o2(pa,o9,pa.next)>=0&&o2(pa,pa.prev,o9)>=0:o2(pa,o9,pa.prev)<0||o2(pa,pa.next,o9)<0}function T(pb,pa){var pe=pb;var o9=false;var pd=(pb.x+pa.x)/2;var pc=(pb.y+pa.y)/2;do{if(((pe.y>pc)!==(pe.next.y>pc))&&(pd<(pe.next.x-pe.x)*(pc-pe.y)/(pe.next.y-pe.y)+pe.x)){o9=!o9}pe=pe.next}while(pe!==pb);return o9}function oQ(pb,pa){var o9=new o6(pb.i,pb.x,pb.y);var pc=new o6(pa.i,pa.x,pa.y);var pe=pb.next;var pd=pa.prev;pb.next=pa;pa.prev=pb;o9.next=pe;pe.prev=o9;pc.next=o9;o9.prev=pc;pd.next=pc;pc.prev=pd;return pc}function oM(pa,o9,pd,pb){var pc=new o6(pa,o9,pd);if(!pb){pc.prev=pc;pc.next=pc}else{pc.next=pb.next;pc.prev=pb;pb.next.prev=pc;pb.next=pc}return pc}function o0(o9){o9.next.prev=o9.prev;o9.prev.next=o9.next;if(o9.prevZ){o9.prevZ.nextZ=o9.nextZ}if(o9.nextZ){o9.nextZ.prevZ=o9.prevZ}}function o6(pa,o9,pb){this.i=pa;this.x=o9;this.y=pb;this.prev=null;this.next=null;this.z=null;this.prevZ=null;this.nextZ=null;this.steiner=false}oP.deviation=function(pe,pj,pg,pb){var ph=pj&&pj.length;var pd=ph?pj[0]*pg:pe.length;var pa=Math.abs(o8(pe,0,pd,pg));if(ph){for(var pf=0,pi=pj.length;pf<pi;pf++){var o9=pj[pf]*pg;var pc=pf<pi-1?pj[pf+1]*pg:pe.length;pa-=Math.abs(o8(pe,o9,pc,pg))}}var pn=0;for(pf=0;pf<pb.length;pf+=3){var pm=pb[pf]*pg;var pl=pb[pf+1]*pg;var pk=pb[pf+2]*pg;pn+=Math.abs((pe[pm]-pe[pk])*(pe[pl+1]-pe[pm+1])-(pe[pm]-pe[pl])*(pe[pk+1]-pe[pm+1]))}return pa===0&&pn===0?0:Math.abs((pn-pa)/pa)};function o8(pd,pf,o9,pe){var pc=0;for(var pb=pf,pa=o9-pe;pb<o9;pb+=pe){pc+=(pd[pa]-pd[pb])*(pd[pb+1]+pd[pa+1]);pa=pb}return pc}oP.flatten=function(pd){var pe=pd[0][0].length;var o9={vertices:[],holes:[],dimensions:pe};var pb=0;for(var pc=0;pc<pd.length;pc++){for(var pa=0;pa<pd[pc].length;pa++){for(var pf=0;pf<pe;pf++){o9.vertices.push(pd[pc][pa][pf])}}if(pc>0){pb+=pd[pc-1].length;o9.holes.push(pb)}}return o9};return oP})();function eh(i,e){this.id=iW();this.workerPool=i;this.actors=[];this.currentActorIndex=0;this.ready=false;this.init(e)}eh.prototype.init=function(oL){const e=this.workerPool.acquire(this.id);for(var T=0;T<e.length;T++){const oM=e[T];const oK=new nC(oM,oL,this.id);oK.name="Worker "+T;this.actors.push(oK)}var C=this;this.broadcast("hasReady",null,function(){C.ready=true})};eh.prototype.broadcast=function(i,C,e){e=e||function(){};o(this.actors,function(oK,T){oK.send(i,C,T)},e)};eh.prototype.getActor=function(){const e=this.actors.filter(function(i){return !i.busy})[0];if(e){return e}this.currentActorIndex=(this.currentActorIndex+1)%this.actors.length;return this.actors[this.currentActorIndex]};eh.prototype.stop=function(){for(var e=0;e<this.actors.length;e++){var C=this.actors[e];C.stop()}};eh.prototype.remove=function(){for(var e=0;e<this.actors.length;e++){var C=this.actors[e];C.remove()}this.actors.length=0;this.workerPool.release(this.id)};function nC(C,i,e){this.target=C;this.parent=i;this.mapId=e;this.busy=false;this.taskQueue=[];this.callbacks={};this.init()}nC.prototype.init=function(){this.receive=this.receive.bind(this);this.target.addEventListener("message",this.receive,false)};nC.prototype.setBusy=function(e){this.busy=e;if(!e&&this.taskQueue.length){var i=this.taskQueue.shift();this.send(i.action,i.data,i.callback,i.targetMapId,i.mustQueue,i.callbackMetadata)}};nC.prototype.receive=function(T){const oK=T.data;const oN=oK.id;if(!oN){return}if(oK.targetMapId&&this.mapId!==oK.targetMapId){return}if(oK.action==="<response>"){this.setBusy(false);const oM=this.callbacks[oN];delete this.callbacks[oN];if(oM){if(oK.error){oM(lP(oK.error))}else{oM(null,lP(oK.data))}}}else{var C=this;const i=[];const e=oK.hasCallback?function(oO,oP){C.target.postMessage({id:oN,action:"<response>",sourceMapId:C.mapId,error:oO?nE(oO):null,data:nE(oP,i)},i)}:function(oO){};const oL=lP(oK.data);if(this.parent[oK.action]){this.parent[oK.action](oK.sourceMapId,oL,e)}}};nC.prototype.send=function(i,C,oM,T,oK,oN){if(i==="release"){this.releasePendingData(C,oM);return}if(this.busy){this.taskQueue.push({action:i,data:C,callback:oM,targetMapId:T,mustQueue:oK,callbackMetadata:oN});return}this.setBusy(true);var oL=Math.round((Math.random()*1000000000000000000)).toString(36).substring(0,10);const e=this.mapId+"_"+i+"_"+oL;if(oM){oM.metadata=oN;this.callbacks[e]=oM}const oO=[];this.target.postMessage({id:e,action:i,hasCallback:!!oM,targetMapId:T,mustQueue:oK,sourceMapId:this.mapId,data:nE(C,oO)},oO);return{cancel:function(){if(oM){delete this.callbacks[e]}this.target.postMessage({id:e,action:"<cancel>",targetMapId:T,sourceMapId:this.mapId})}}};nC.prototype.stop=function(){this.taskQueue.length=0;this.busy=false;this.callbacks={}};nC.prototype.remove=function(){this.taskQueue.length=0;this.busy=false;this.target.removeEventListener("message",this.receive,false)};nC.prototype.releasePendingData=function(e,oM){var C=[];var oK=this.taskQueue;for(var T=oK.length-1;T>=0;T--){var oL=oK[T]["data"];if(!oL||!oL.layerId){break}if(oL.layerId!==e.layerId){continue}if(!e["id_"+oL.x+"_"+oL.y+"_"+oL.z]){oK.splice(T,1);C.push(oL)}}oM(null,C)};var oz;function kG(){if(!oz){oz=new kO()}return oz}function kO(){this.active={}}kO.prototype.acquire=function(i){if(!this.workers){this.workers=[];var C=(window.location.protocol === "http:" ? "http:" : "https:") + "//" + window.location.host + "/bmap-api/res/webgl/10/worker_mvt_0u0jye.js";while(this.workers.length<kO.workerCount){var e=ob(C);this.workers.push(e)}}this.active[i]=true;return this.workers.slice()};kO.prototype.release=function(C){delete this.active[C];if(this.numActive()===0){for(var e=0;e<this.workers.length;e++){this.workers[e].terminate()}this.workers=null}};kO.prototype.numActive=function(){return Object.keys(this.active).length};kO.workerCount=2;function kP(e){this._map=e;this._spotsId={};this._enabled=false;this._onReady=null;this._onRemove=null}kP.prototype.enable=function(){if(this._enabled){return}var i=this._map;var e=this;e._onReady=function(T){var C=T.spots;if(e._spotsId[T.index]){i.removeSpots(e._spotsId[T.index])}e._spotsId[T.index]=i.addSpots(C)};e._onRemove=function(C){if(e._spotsId[C.index]){i.removeSpots(e._spotsId[C.index]);delete e._spotsId[C.index]}};i.addEventListener("onspotsdataready",e._onReady);i.addEventListener("onspotsdataremove",e._onRemove);e._enabled=true};kP.prototype.disable=function(){if(!this._enabled){return}var i=this._map;i.removeEventListener("onspotsdataready",this._onReady);i.removeEventListener("onspotsdataremove",this._onRemove);for(var e in this._spotsId){i.removeSpots(this._spotsId[e])}this._spotsId={};this._onReady=null;this._onRemove=null;this._enabled=false};cv.register(function(e){e._mapIcon=new kP(e);if(e.config.enableIconClick){e._mapIcon.enable()}if(e.config.enableIconInfoWindow){e.enableIconInfoWindow()}});function eW(e){this._indoorData={};this._map=e;this.currentUid=null;this.currentFloor=null;this._indoorControl=null;this.enterMethod=null;this.showMask=true;this._isMobile=c9();this._autoEnterZoom=19;if(this._isMobile){this._autoEnterZoom=17}this._init(e)}eW.prototype._init=function(i){var e=this;i.on("indoor_status_changed",function(oM){var C=oM.uid;var oK=oM.floor;if(C===null){C=e.currentUid;if(e._indoorData[C]){oK=e._indoorData[C].defaultFloor}if(e._indoorControl){e._indoorControl.hide()}e.currentUid=null;e.currentFloor=null;e.enterMethod=null}else{if(e._indoorData[C]){var oL=e._indoorData[C];oK=(typeof oK==="number")?oK:oL.defaultFloor;if(!e._indoorControl){if((i.config.showControls||i.config.indoorControl)&&i._displayOptions.indoor){e._indoorControl=new aW(i,oL)}}else{e._indoorControl.setInfo(oL);if(i.config.showControls||i.config.indoorControl){e._indoorControl.show()}}e.currentUid=C;e.currentFloor=oK}}if(!e._indoorData||!e._indoorData[C]||e._indoorData[C].currentFloor===oK){this.fire(new ix("onrefresh"));return}var T=new ix("onindoor_data_refresh");T.uid=C;T.floor=oK;T.tileKey=e._indoorData[C].tileKey;e._indoorData[C].currentFloor=oK;e.currentFloor=oK;this.fire(T);kU.sendMessage("IndoorManager")});i.on("spotclick",function(T){var C=null;if(T.curAreaSpot&&this.areaSpots[T.curAreaSpot]){C=this.areaSpots[T.curAreaSpot].userData.uid}if(C===e.currentUid){if(T.curAreaSpot){e.enterMethod="byClick"}return}if(C===null){if(e.currentUid&&e.enterMethod==="byClick"){i.showIndoor(null);e.enterMethod=null}}else{e.enterMethod="byClick";if(e.currentUid){i.showIndoor(e.currentUid,e._indoorData[e.currentUid].defaultFloor)}i.showIndoor(C,e._indoorData[C].defaultFloor)}});i.on("moveend",function(){if(this.getZoom()>=e._autoEnterZoom){e._checkIndoorByMove()}});i.on("zoomend",function(){if(this.getZoom()>=e._autoEnterZoom){e._checkIndoorByMove()}else{if(e.enterMethod!=="byClick"&&e.currentUid!==null){this.showIndoor(null)}}})};eW.prototype._checkIndoorByMove=function(){var C=this._map;var oP=C.getSize();var oU={x:oP.width/2,y:oP.height/2};var oT=Math.max(oP.width,oP.height);var oV=[];for(var oQ in this._indoorData){var e=this._indoorData[oQ].center;var T=C.pointToPixelIn(new cv.Point(e[0],e[1]));var oM=dL(oU,T);oV.push({uid:oQ,distance:oM})}if(oV.length===0){return}oV.sort(function(oW,i){return oW.distance-i.distance});var oL=oV[0];var oR=C.getCenterIn();var oK=false;for(var oO=0;oO<this._indoorData[oL.uid].contour.length;oO++){if(cR([oR.lng,oR.lat],this._indoorData[oL.uid].contour[oO])){oK=true;break}}if(oK===false&&oL.uid==="e96b44200baa3b4082288acc"){var oN=this._indoorData[oL.uid].boundsMin;var oS=this._indoorData[oL.uid].boundsMax;if(oR.lng>oN[0]&&oR.lat>oN[1]&&oR.lng<oS[0]&&oR.lat<oS[1]){oK=true}}if(oK){if(this.enterMethod!=="byClick"){if(this.currentUid!==null&&this.currentUid!==oL.uid){this._map.showIndoor(this.currentUid,this._indoorData[this.currentUid].defaultFloor)}if(this.currentUid!==oL.uid){this._map.showIndoor(oL.uid,this._indoorData[oL.uid].defaultFloor)}this.enterMethod="byMove"}}else{if(this.enterMethod!=="byClick"){this._map.showIndoor(null)}}};eW.prototype.setData=function(T){if(T===null){return}for(var C in T){if(C==="tileInfo"){continue}var oK=T[C].tileKey;if(this._indoorData[C]){if(!this._indoorData[C][oK]){this._indoorData[C].tileKeys.push(oK);this._indoorData[C][oK]=true}}else{this._indoorData[C]=T[C];this._indoorData[C].tileKeys=[T[C].tileKey];this._indoorData[C][oK]=true;for(var e=0;e<this._indoorData[C].contour.length;e++){this._map.addAreaSpot(this._indoorData[C].contour[e],{id:C+e,userData:{uid:C}})}}}if(this._map.getZoom()>=this._autoEnterZoom){this._checkIndoorByMove()}};eW.prototype.removeData=function(C,oK){if(!this._indoorData[C]){return}var T=this._indoorData[C];for(var e=0;e<T.tileKeys.length;e++){if(T.tileKeys[e]===oK){T.tileKeys.splice(e,1);break}}delete T[oK];if(T.tileKeys.length===0){delete this._indoorData[C]}};eW.prototype.getIndoorData=function(e){return this._indoorData[e]||null};eW.prototype.getData=function(){return this._indoorData};eW.prototype._toggleControl=function(e){var C=this._map;if(e){if(!this._indoorControl&&this.currentUid&&C._displayOptions.indoor){var i=this._indoorData[this.currentUid];if(i){this._indoorControl=new aW(C,i)}}else{if(this._indoorControl&&this.currentUid){this._indoorControl.show()}}}else{if(this._indoorControl){this._indoorControl.hide()}}};cv.register(function(e){e._indoorMgr=new eW(e)});var bJ=(function(){var T={};var oS={};var oO={};function oQ(oU){if(Object.prototype.toString.call(oU)==="[object Object]"){for(var oT in oU){return false}return true}else{return false}}function oP(o0,o1,o4,oX,o3){var oT=oT||null;oX=oX||oT;var oV;if(o4>21){o4=21}if(oX){oV=oR(o0,o1,o4,oX)}else{oV=C(o0,o1,o4,o3)}var oZ=oV.drawId;var oU=oV.style;var o2=oV.styleUpdate;var o5=[];if(!oZ){return o5}for(var oW=0;oW<oZ.length;oW++){var oY=o2[oZ[oW]]||oU[oZ[oW]];if(oY){switch(o1){case"polygon":oY=oK(oY,o0);break;case"line":oY=oN(oY,o0);break;case"pointText":oY=oL(oY,o0);break;case"point":oY=e(oY,o0);break;case"polygon3d":oY=oM(oY,o0);break}if(oY){oY.did=oZ[oW];o5[o5.length]=oY}}}return o5}function oR(oU,oW,oX,oT){var oV=oT[2];switch(oW){case"point":oV=oV[0];break;case"pointText":oV=oV[1];break;case"line":oV=oV[3];break;case"polygon":oV=oV[4];break;case"polygon3d":oV=oV[5];break}var oZ=oX-1;if(oW==="line"&&oX===12){oZ=oX}var o0=oT[1][oZ][0];var oY=o0[oU];if(!oY&&oX<21){if(oW==="point"||oW==="pointText"){o0=oT[1][oX][0];oY=o0[oU]}}return{drawId:oY,style:oV,styleUpdate:[]}}function C(oX,oY,o1,o0){if(!o0||!o0.baseFs){return{drawId:null,style:[],styleUpdate:[]}}var oZ;var oV=o0.baseFs;if(oQ(o0.zoomRegion)){oZ=o0.StyleBody||[]}else{oZ=o0.zoomStyleBody[o1]||[]}var oU=oV[2];switch(oY){case"point":oU=oU[0];oZ=oZ[0]||{};break;case"pointText":oU=oU[1];oZ=oZ[1]||{};break;case"line":oU=oU[3];oZ=oZ[3]||{};break;case"polygon":oU=oU[4];oZ=oZ[4]||{};break;case"polygon3d":oU=oU[5];oZ=oZ[5]||{};break}var oT=oV[1][o1-1][0];var oW=oT[oX];if(!oW&&o1<21){if(oY==="point"||oY==="pointText"){oT=oV[1][o1][0];oW=oT[oX]}}return{drawId:oW,style:oU,styleUpdate:oZ}}function oL(oU,oT){if(!oU||oU.length===0){return null}return{sid:oT,fontRgba:i(oU[0]),haloRgba:i(oU[1]),backRgba:i(oU[2]),fontSize:oU[3],haloSize:oU[4],fontWeight:oU[5],fontStyle:oU[6],density:oU[7]}}function e(oV,oT){var oU=null;if(oV[oV.length-1]&&oV[oV.length-1] instanceof Array&&oV[oV.length-1][0]==="openmap"){oU=oV[oV.length-1][1]?oV[oV.length-1][1]:null}return{sid:oT,rank:oV[0],ucflag:oV[1],icon:oV[2],iconType:oV[3],nineGG:oV[4],density:oV[5],zoom:oV[6],hue:oU>>>0}}function oN(oV,oT){var oU=null;var oW=null;if(oV[oV.length-1]&&oV[oV.length-1] instanceof Array&&oV[oV.length-1][0]==="openmap"){oU=oV[oV.length-1][1]?oV[oV.length-1][1]:null;oW=oV[oV.length-1][2]?oV[oV.length-1][2]:null}return{sid:oT,borderRgba:i(oV[0]),fillRgba:i(oV[1]),borderWidth:oV[2],fillWidth:oV[3],borderCap:oV[4],fillCap:oV[5],haveBorderLine:oV[6],haveBorderTexture:oV[7],haveFillTexture:oV[8],isUseBorderRgba:oV[9],isUseFillRgba:oV[10],borderTexture:oV[11],fillTexture:oV[12],borderTextureType:oV[13],fillTextureType:oV[14],isRealWidth:oV[15],haveArrow:oV[16],needRound:oV[17],realBorderWidth:oV[18],customTextureUrl:oW,hue:i(oU)}}function oK(oV,oT){var oU=null;var oW=null;if(oV[oV.length-1]&&oV[oV.length-1] instanceof Array&&oV[oV.length-1][0]==="openmap"){oU=oV[oV.length-1][1]?oV[oV.length-1][1]:null;oW=oV[oV.length-1][2]?oV[oV.length-1][2]:null}return{sid:oT,fillRgba:i(oV[0]),borderRgba:i(oV[1]),borderWidth:oV[2],borderTexture:oV[3],borderTextureType:oV[4],waterStyle:oV[5],haloStyle:oV[6],textureStyle:oV[7],thickRgba:i(oV[8]),fillTexture:oW,hue:i(oU)}}function oM(oU,oT){return{sid:oT,filter:oU[0],ratio:oU[1],haveBorder:oU[2],borderWidth:oU[3],borderRgba:i(oU[4]),fillTop:i(oU[5]),fillSide:i(oU[6]),polyTexture:oU[7]}}function i(oY){var oX=oY;if(oO[oX]){return oO[oX]}oY=oY>>>0;var oW=(oY)&255;var oV=(oY>>8)&255;var oT=(oY>>16)&255;var oU=(oY>>24)&255;oO[oX]=[oW,oV,oT,oU];return oO[oX]}return{getStyleFromCache:function(o0,oV,oY,oZ,oU,oX,oT){o0=o0||"default";var oW=o0+"-"+oV+"-"+oY+"-"+oZ;if(oX){oW+="-indoor"}if(oU){if(!oS[oW]){oS[oW]=oP(oV,oY,oZ,oU)}return oS[oW]}if(!T[oW]){T[oW]=oP(oV,oY,oZ,oU,oT)}return T[oW]},clearStyleFromCache:function(){T={};oS={}}}})();cv.register(function(i){var e=new lO(i)});function lO(e){e.container.appendChild(this.render());this.bind(e)}lO.prototype.render=function(){var i=document.createElement("div");i.className="click-ripple-container";var e=document.createElement("div");e.className="click-ripple";i.appendChild(e);this._div=i;this._ripple=e;return i};lO.prototype.bind=function(i){var e=this;i.addEventListener("spotclick",function(C){if(!C.spots||C.spots.length===0){return}e._div.style.left=C.pixel.x+"px";e._div.style.top=C.pixel.y+"px";hv.ac(e._ripple,"ripple-playing")});i.addEventListener("hotclick",function(C){if(!C||!C.pixel||!(C.pixel instanceof hV)){return}e._div.style.left=C.pixel.x+"px";e._div.style.top=C.pixel.y+"px";hv.ac(e._ripple,"ripple-playing")});hv.on(e._ripple,"transitionend",function(){hv.rc(e._ripple,"ripple-playing")})};function c7(e){eX.call(this);if(!e){return}this._opts={};this._map=e;this._maxLat=84.6;this._minLat=-80.6;this._maxLatMC=m8.convertLL2MC(new d1(this._maxLat,0)).lat;this._minLatMC=m8.convertLL2MC(new d1(this._minLat,0)).lat}c7.inherits(eX,"ToolbarItem");hv.extend(c7.prototype,{open:function(){if(this._isOpen==true){return true}if(this._map._toolInUse){return false}this._map._toolInUse=true;this._isOpen=true;return true},close:function(){if(!this._isOpen){return}this._map._toolInUse=false;this._isOpen=false},_checkStr:function(e){if(!e){return""}return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}});function dH(C,i){c7.call(this,C);i=i||{};this._opts=hv.extend(hv.extend(this._opts||{},{autoClear:false,tips:"娴嬭窛",followText:"鍗曞嚮纭畾璧风偣锛屽弻鍑荤粨鏉熺粯鍒�",unit:"metric",showResult:true,lineColor:"blue",lineStroke:2,opacity:1,lineStyle:"solid",cursor:K.distCursor,styleCodes:{lnCode:0,spCode:0,slCode:0,tlCode:0},enableMassClear:true}),i);if(this._opts.showResult===false){if(typeof i.tips==="undefined"){this._opts.tips="缁樺埗鎶樼嚎"}if(!i.cursor){this._opts.cursor="crosshair"}}if(this._opts.lineStroke<=0){this._opts.lineStroke=2}if(this._opts.opacity>1){this._opts.opacity=1}else{if(this._opts.opacity<0){this._opts.opacity=0}}if(this._opts.lineStyle!=="solid"&&this._opts.lineStyle!=="dashed"){this._opts.lineStyle="solid"}this._checked=false;this._drawing=null;this.followTitle=null;this._totalDis={};this._points=[];this._paths=[];this._dots=[];this._segDistance=[];this._overlays=[];this._units={metric:{name:"metric",conv:1,incon:1000,u1:"绫�",u2:"鍏噷"},us:{name:"us",conv:3.2808,incon:5279.856,u1:"鑻卞昂",u2:"鑻遍噷"}};if(!this._units[this._opts.unit]){this._opts.unit="metric"}this._dLineColor="#ff6319";this._dLineStroke=3;this._dOpacity=0.8;this._dLineStyle="solid";this._dCursor=K.distCursor;if(this._opts.showResult){this._opts.followText="鍗曞嚮纭畾璧风偣"}this._followTextM="鍗曞嚮纭畾鍦扮偣锛屽弻鍑荤粨鏉�";this._sectionMarkerTip="鍗曞嚮鍙垹闄ゆ鐐癸紝鎷栨嫿鍙皟鏁翠綅缃�";this._movingTimerId=null;if(this._opts.showResult){this.text="娴嬭窛"}else{this.text="缁樼嚎"}this._isOpen=false;var e=this;ki.load("tools",function(){e._draw()})}dH.inherits(c7,"PolylineTItem");hv.extend(dH.prototype,{setLineColor:function(e){this._opts.lineColor=e},setLineStroke:function(e){if(Math.round(e)>0){this._opts.lineStroke=Math.round(e)}},setOpacity:function(e){if(e>=0&&e<=1){this._opts.opacity=e}},setLineStyle:function(e){if(e==="solid"||e==="dashed"){this._opts.lineStyle=e}},clear:function(){for(var C=0,e=this._overlays.length;C<e;C++){if(this._overlays[C]){this._map.removeOverlay(this._overlays[C])}}this._overlays.length=0;for(var C=0,e=this._dots.length;C<e;C++){if(this._dots[C]&&this._dots[C].parentNode){this._dots[C].parentNode.removeChild(this._dots[C])}}this._dots.length=0},setCursor:function(e){if(this._opts.showResult===true){return}this._opts.cursor=e},getCursor:function(){if(this._opts.showResult===true){return this._dCursor}var e=this._opts.cursor.match(/^url\((.+)\)(,.*)?/);if(e!==null){return e[1]}else{return this._opts.cursor}},showResult:function(e){this._opts.showResult=!!e}});function cD(){var oK=3;var oR=256;var T=Math.pow(2,18-oK)*oR;var oS=2;var oQ=(oS+1)*T;var C=m8.convertLL2MC(new d9(180,0));var oO=C.lng;var oM=oQ-oO;var oP=-3;var e=oP*T;var oL=m8.convertLL2MC(new d9(-180,0));var oN=oL.lng;var i=oN-e;this._validPixels=oO/Math.pow(2,18-oK);this._mc180X=oO;this._mcM180X=oN;this._loopOffset=oM+i;this._mcTSpan=oO-oN;this._spaceDistance=oM;this._mSpaceDistance=i}cD.prototype={calcLoopParam:function(C,i,oQ){oQ=oQ||256;var oN=0;var oK=3;var oM=6;var oL=oM*Math.pow(2,(i-oK))*256/oQ;var oP=oL/2-1;var oO=-oL/2;while(C>oP){C-=oL;oN-=this._loopOffset}while(C<oO){C+=oL;oN+=this._loopOffset}var e=oN;oN=Math.round(oN/Math.pow(2,18-i));return{offsetX:oN,geoOffsetX:e,col:C,T:oL,maxCol:oP,minCol:oO}},calcLoopCenterPoint:function(i){var e=i.lng;while(e>this._mc180X){e-=this._mcTSpan}while(e<this._mcM180X){e+=this._mcTSpan}i.lng=e;return i},calcLoopMapBounds:function(C,T){var i=T||C.getCenter();var e=C.sw.lng;var oK=C.ne.lng;while(i.lng>this._mc180X){i.lng-=this._mcTSpan;e-=this._mcTSpan;oK-=this._mcTSpan}while(i.lng<this._mcM180X){i.lng+=this._mcTSpan;e+=this._mcTSpan;oK+=this._mcTSpan}C.sw.lng=e;C.ne.lng=oK;if(C.pointBottomLeft){C.pointBottomLeft=this.calcLoopCenterPoint(C.pointBottomLeft);C.pointTopLeft=this.calcLoopCenterPoint(C.pointTopLeft);C.pointTopRight=this.calcLoopCenterPoint(C.pointTopRight);C.pointBottomRight=this.calcLoopCenterPoint(C.pointBottomRight)}return C},calcLoopTiles:function(oR,e,oV,oO){oV=oV||256;var oK=oO||Math.pow(2,18-e)*oV;var oQ=Math.floor(this._mc180X/oK);var oM=Math.floor(this._mcM180X/oK);var oS=Math.floor(this._loopOffset/oK);var oT=[];for(var oN=0;oN<oR.length;oN++){var oU=oR[oN];var T=oU[0];var oW=oU[1];if(T>=oQ){var oP=T+oS;if(this.isTileBlank(oP,e,oV)===true){continue}var C="id_"+oP+"_"+oW+"_"+e;if(!oR[C]){oR[C]=true;oT.push([oP,oW,e,0])}}else{if(T<=oM){var oP=T-oS;if(this.isTileBlank(oP,e,oV)===true){continue}var C="id_"+oP+"_"+oW+"_"+e;if(!oR[C]){oR[C]=true;oT.push([oP,oW,e,0])}}}}for(var oN=0,oL=oT.length;oN<oL;oN++){oR.push(oT[oN])}for(var oN=oR.length-1;oN>=0;oN--){var T=oR[oN][0];if(this.isTileBlank(T,e,oV)){oR.splice(oN,1)}}return oR},isTileBlank:function(C,oK,e){var oL=Math.pow(2,oK-3);var i=Math.round(this._validPixels*oL);var T=6*oL*256/e;while(C>T/2-1){C-=T}while(C<-(T/2)){C+=T}if(C>0&&C*e>i){return true}if(C<0&&Math.abs((C+1)*e)>i){return true}return false},isAddWidth:function(e,i){return e<this._mcM180X||i>this._mc180X},pixelWidth:function(e,i){if(e<0){e=-e}return Math.abs(e-this._mc180X)/(Math.pow(2,18-i))},getSpaceDistanceInPixel:function(i){var e=Math.round((this._spaceDistance+this._mSpaceDistance)/Math.pow(2,18-i));return e}};var hz=new cD();function gJ(){this._id=undefined;this._type=undefined;this.grid=undefined;this.layerName=undefined;this.geojson=undefined;this._geometry=null;this._properties={};this._box=null;this._state={};this._style=null;this._visible=true;this.renderData={};return this}gJ.prototype.serialize=function(){return{id:this.getId(),type:this.getType(),grid:this.grid,layerName:this.layerName,geojson:this.geojson,renderData:this.renderData,geometry:this.getGeometry(),box:this.getBox(),properties:this.getProperties(),state:this.getState(),visible:this._visible}};gJ.prototype.deserialize=function(oK){this.setId(oK.id);this.setType(oK.type);this.grid=oK.grid;this.layerName=oK.layerName;this.geojson=oK.geojson;this.setProperties(oK.properties);this.setState(oK.state);this._visible=oK.visible||true;this.renderData=oK.renderData;this.setGeometry(oK.geometry);this.setBox(oK.box);if(this.geojson.geometry&&this.geojson.geometry["type"]==="MultiPolygon"){for(var C=0;C<this._geometry.length;C++){if(this._geometry[C][0] instanceof Array){for(var e in this.renderData){var T=this.renderData[e];if(T.fill&&T.fill[C]){T.fill[C]["hasMultipleParts"]=true}}}}}if(this.geojson.geometry&&this.geojson.geometry["type"]==="Polygon"){for(var C=0;C<this._geometry.length;C++){if(this._geometry[C] instanceof Array){for(var e in this.renderData){var T=this.renderData[e];if(T.fill&&T.fill[C]){T.fill[C]["hasMultipleParts"]=true}}}}}return this};gJ.prototype.getType=function(){return this._type};gJ.prototype.getGeometry=function(){return this._geometry};gJ.prototype.getId=function(){return this._id};gJ.prototype.getProperties=function(){return this._properties};gJ.prototype.getBox=function(){return this._box};gJ.prototype.getState=function(){if(Object.keys(this._state).length>0){return this._state}else{return null}};gJ.prototype.getStyle=function(){return this._style};gJ.prototype.getStyleFunction=function(){return this._styleFunction};gJ.prototype.setType=function(e){return this._type=e};gJ.prototype.setGeometry=function(e){this._geometry=e};gJ.prototype.setStyle=function(e){if(!e||Object.keys(e).length===0){return}for(var i in e){this.set(i,e[i],this._style)}};gJ.prototype.setState=function(e){for(var i in e){this.set(i,e[i],this._state)}};gJ.prototype.setId=function(e){this._id=e};gJ.prototype.setProperties=function(e){for(var i in e){this.set(i,e[i],this._properties)}};gJ.prototype.setBox=function(e){return this._box=e};gJ.prototype.isPointInBox=function(e){return this._pointInBox(e,this._box)};gJ.prototype.getPointGeoJSON=function(T){var oS=this.renderData;if(oS){var oM=oS.active;if(!oS[oM]||!oS[oM]["poi"]){return null}var oR=[];var oO=oS[oM]["poi"];for(var oP=0;oP<oO.length;oP++){if(oO[oP].bds&&oO[oP].bds.length===4){var oK=T.pointToPixelIn(oO[oP].pt);var oN=oK.x-oO[oP].bds[0];var oL=oK.y-oO[oP].bds[1];var C=oK.x-oO[oP].bds[2];var e=oK.y-oO[oP].bds[3];oR.push([[oN,oL],[C,oL],[C,e],[oN,e],[oN,oL]])}}if(oR.length===0){return null}else{var oQ="Polygon";if(oR.length>0){oQ="MultiPolygon"}return{type:"Feature",properties:{},geometry:{type:oQ,coordinates:[oR]}}}}};gJ.prototype._pointInBox=function(e,i){if(i[0]>e[0]||i[1]>e[1]||i[2]<e[0]||i[3]<e[1]){return false}else{return true}};gJ.prototype._pixelPnpoint=function(oK,oO,e){var oP=false;if(oO){var T=oO.active;if(!oO[T]||!oO[T]["poi"]){return oP}var oL=oO[T]["poi"];for(var oM=0;oM<oL.length;oM++){if(oL[oM].bds&&oL[oM].bds.length===4){var C=e.pointToPixelIn(oL[oM].pt);if((oK.x-C.x<oL[oM].bds[2]&&oK.x-C.x>oL[oM].bds[0])&&(C.y-oK.y<oL[oM].bds[3]&&C.y-oK.y>oL[oM].bds[1])){if(e.getTilt()>55){var oN=e.pointToOverlayPixelIn(oL[oM].pt);if(oN.outOfFrustum){continue}}oP=true;break}}}}return oP};gJ.prototype._pixelPnpoly=function(oK,oM){var e=oM.length;var C=0;var oL=false;for(var T=0;T<e;T++){C=(T===e-1)?0:C+1;if((oM[T].lat!==oM[C].lat)&&(((oK.lat>=oM[T].lat)&&(oK.lat<oM[C].lat))||((oK.lat>=oM[C].lat)&&(oK.lat<oM[T].lat)))&&(oK.lng<(oM[C].lng-oM[T].lng)*(oK.lat-oM[T].lat)/(oM[C].lat-oM[T].lat)+oM[T].lng)){oL=!oL}}return oL};gJ.prototype._getProximity=function(oT,oP){var C,T,oS,oN,oM,oR,oQ;var oW=oP.length;if(oW>1){for(var oU=1;oU<oW;oU++){var oO=oP[oU-1];var o0=oP[oU];if(!oO||!o0){continue}if(oO.lng!=o0.lng){var oZ=(o0.lat-oO.lat)/(o0.lng-oO.lng);var oX=o0.lat-oZ*o0.lng;oQ=Math.abs(oZ*oT.lng+oX-oT.lat)/Math.sqrt(oZ*oZ+1)}else{oQ=Math.abs(oT.lng-o0.lng)}var oV=Math.pow(o0.lat-oO.lat,2)+Math.pow(o0.lng-oO.lng,2);var oK=Math.pow(o0.lat-oT.lat,2)+Math.pow(o0.lng-oT.lng,2);var oY=Math.pow(oO.lat-oT.lat,2)+Math.pow(oO.lng-oT.lng,2);var oL=Math.pow(oQ,2);var e=oK-oL+oY-oL;if(e>oV){oQ=Math.sqrt(Math.min(oK,oY))}if((C==null)||(C>oQ)){T=Math.sqrt(oY-oL)/Math.sqrt(oV);oS=Math.sqrt(oK-oL)/Math.sqrt(oV);C=oQ;oR=oU}C=Math.min(C,oQ)}}return{dist:C}};gJ.prototype.isPointInGeometry=function(oO,e){var oP=false;switch(this._type){case iE.POINT:oP=this._pixelPnpoint(oO,this.renderData,e);break;case iE.LINE_STRING:var oN=this._getProximity({lng:oO[0],lat:oO[1]},this._geometry);var T=this.renderData[this.renderData.active];if(!T||!T.line||!T.line[0]||!T.line[0].width){var C=2}else{var C=this.renderData[this.renderData.active]["line"][0].width;if(this.grid===gg.GridModel.GOOGLEWEB){C=Math.max(C/2*fA.gridScaleFromBDMCTo3857,2)}else{C=Math.max(C/2,2)}}if(oN.dist<C){oP=true}break;case iE.POLYGON:if(this._geometry[0] instanceof d9){oP=this._pixelPnpoly({lng:oO[0],lat:oO[1]},this._geometry)}else{oP=this._pixelPnpoly({lng:oO[0],lat:oO[1]},this._geometry[0]);if(oP){for(var oL=1;oL<this._geometry.length;oL++){var oM=this._pixelPnpoly({lng:oO[0],lat:oO[1]},this._geometry[oL]);if(oM){oP=false;break}}}}break;case iE.MULTI_POLYGON:for(var oL=0;oL<this._geometry.length;oL++){if(this._geometry[oL][0] instanceof d9){oP=this._pixelPnpoly({lng:oO[0],lat:oO[1]},this._geometry[oL])}else{oP=this._pixelPnpoly({lng:oO[0],lat:oO[1]},this._geometry[oL][0]);if(oP){for(var oK=1;oK<this._geometry[oL].length;oK++){var oM=this._pixelPnpoly({lng:oO[0],lat:oO[1]},this._geometry[oL][oK]);if(oM){oP=false;break}}}}if(oP){break}}break;case iE.MULTI_LINE_STRING:var T=this.renderData[this.renderData.active];if(!T||!T.line||!T.line[0]||!T.line[0].width){var C=6}else{var C=this.renderData[this.renderData.active]["line"][0].width;C=Math.max(C/2*fA.gridScaleFromBDMCTo3857,6)}for(var oL=0;oL<this._geometry.length;oL++){if(this._geometry[oL][0] instanceof d9){var oN=this._getProximity({lng:oO[0],lat:oO[1]},this._geometry[oL]);if(oN.dist<C){oP=true;break}}}break;case iE.MULTI_POINT:oP=this._pixelPnpoint(oO,this.renderData,e);break;default:throw new Error("geojson绫诲瀷閿欒: "+this._type)}return oP};gJ.prototype.set=function(i,C,T){var e=T||(T={});e[i]=C};var jz=(function(){function oQ(oW){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("GeoJSONParse")}var oV=oW?oW:{};if(oV.reference){this.reference=oV.reference}else{this.reference=null}return this}oQ.prototype.readFeatureFromObject=function(oW,oZ){var oV=null;if(oW.type&&oW.type.toLowerCase()==="feature"){oV=oW}else{oV={type:"Feature",geometry:oW,properties:null,}}oZ=oZ||{};oZ.reference=(oZ.reference===undefined?this.reference:oZ.reference);if(oZ.isPoints){oZ.onlyGeometry=true}var o0=C(oV.geometry,oZ,oV.properties);var oY=e(oL(oV),oZ);if(!o0){return null}if(oZ&&oZ.onlyGeometry&&!oZ.isPoints){return{geometry:o0,type:oV.geometry["type"],bBox:oY}}if(o0 instanceof Array&&!(o0[0] instanceof d9)){for(var oX=0;oX<o0.length;oX++){if(oZ.isPoints){o0[oX]={points:o0[oX],properties:oV.properties,index:oZ.__index,brotherIndex:oX}}else{o0[oX]["properties"]=oV.properties}}}else{if(oZ.isPoints){o0={points:o0,properties:oV.properties,index:oZ.__index,brotherIndex:-1}}else{o0.properties=oV.properties}}return o0};oQ.prototype.readFeaturesFromObject=function(oY,o6,oV){var o3=oY;var oW=null;if(o3.type&&o3.type.toLowerCase()==="featurecollection"){var o0=oY;oW=[];var o2=o0.features;var oX=o6||{};for(var o1=0,o4=o2.length;o1<o4;++o1){oX.__index=o1;var o5=this.readFeatureFromObject(o2[o1],o6);if(o5 instanceof Array){for(var oZ=0;oZ<o5.length;oZ++){oV&&oV(o5[oZ]);oW.push(o5[oZ])}}else{oV&&oV(o5);oW.push(o5)}}}else{var o5=this.readFeatureFromObject(oY,o6);if(o5 instanceof Array){oW=[];for(var o1=0;o1<o5.length;o1++){oV&&oV(o5[o1]);oW.push(o5[o1])}}else{oV&&oV(o5);oW=[o5]}}return oW};function C(oV,oX,oW){if(!oV){return null}var oY;switch(oV.type){case iE.POINT:oY=oN(oV,oX,oW);break;case iE.LINE_STRING:oY=T(oV,oX,oW);break;case iE.POLYGON:oY=oO(oV,oX,oW);break;case iE.MULTI_POINT:oY=oP(oV,oX,oW);break;case iE.MULTI_LINE_STRING:oY=oS(oV,oX,oW);break;case iE.MULTI_POLYGON:oY=oT(oV,oX,oW);break;default:throw new Error("geojson绫诲瀷閿欒: "+oV.type)}return oY}function oN(oW,oZ,oX){var o0=oW.coordinates;if(oZ.reference&&oZ.reference!=="BD09LL"){o0=fU.transform(o0,oZ.reference||"WGS84",fU.BD09LL)}if(oZ&&oZ.onlyGeometry){return new d9(o0[0],o0[1])}var oY=oZ;if(oZ.markerStyle){oY=oZ.markerStyle;if(oZ.markerStyle instanceof Function){oY=oZ.markerStyle(oX)||{}}}var oV=new D(new d9(o0[0],o0[1]),oY);return oV}function oU(oZ,oW){if(!oZ){return[]}var oY=[];for(var oV=0;oV<oZ.length;oV++){var oX=oZ[oV];if(oW.reference&&oW.reference!=="BD09LL"){oX=fU.transform(oX,oW.reference||"WGS84",fU.BD09LL)}oY.push(new d9(oX[0],oX[1]))}return oY}function T(oW,oZ,oX){var o0=oW.coordinates;if(oZ&&oZ.onlyGeometry){return oU(o0,oZ)}var oY=oZ;if(oZ.polylineStyle){oY=oZ.polylineStyle;if(oZ.polylineStyle instanceof Function){oY=oZ.polylineStyle(oX)||{}}}oY.noCoordTrans=true;var oV=new cf(oU(o0,oZ),oY);return oV}function oO(oV,o0,oY){var o2=oV.coordinates;var o1=[];for(var oX=0;oX<o2.length;oX++){o1[oX]=oU(o2[oX],o0)}if(o0&&o0.onlyGeometry){return o1.length>1?[o1]:(o1[0]||[])}var oZ=o0;if(o0.polygonStyle){oZ=o0.polygonStyle;if(o0.polygonStyle instanceof Function){oZ=o0.polygonStyle(oY)||{}}}var oW=new mw(o1,oZ);return oW}function oP(oX,o3,o0){var o1=oX.coordinates;var oV=[];for(var oZ=0;oZ<o1.length;oZ++){var o2=o1[oZ];if(o3.reference&&o3.reference!=="BD09LL"){o2=fU.transform(o2,o3.reference||"WGS84",fU.BD09LL)}if(o3&&o3.onlyGeometry){oV.push(new d9(o2[0],o2[1]))}else{var oW=o3;if(o3.markerStyle){oW=o3.markerStyle;if(o3.markerStyle instanceof Function){oW=o3.markerStyle(o0)||{}}}var oY=new D(new d9(o2[0],o2[1]),oW);oV.push(oY)}}return oV}function oS(oW,o0,oY){var o2=oW.coordinates;var o1=[];for(var oX=0;oX<o2.length;oX++){if(o0&&o0.onlyGeometry){o1.push(oU(o2[oX],o0))}else{var oZ=o0;if(o0.polylineStyle){oZ=o0.polylineStyle;if(o0.polylineStyle instanceof Function){oZ=o0.polylineStyle(oY)||{}}}oZ.noCoordTrans=true;var oV=new cf(oU(o2[oX],o0),oZ);o1.push(oV)}}return o1}function oT(oY,o5,o2){var o4=oY.coordinates;var oV=[];for(var o1=0;o1<o4.length;o1++){var o6=[];for(var oZ=0,oX=o4[o1];oZ<oX.length;oZ++){var o0=oU(oX[oZ],o5);if(o5&&o5.onlyGeometry){if(oX.length===1){oV.push(o0)}else{o6.push(o0)}}else{if(oX.length===1){var oW=o5;if(o5.polygonStyle){oW=o5.polygonStyle;if(o5.polygonStyle instanceof Function){oW=o5.polygonStyle(o2)||{}}}var o3=new mw(o0,oW);oV.push(o3)}else{o6.push(o0)}}}if(oX.length!==1){if(o5&&o5.onlyGeometry){oV.push(o6)}else{var oW=o5;if(o5.polygonStyle){oW=o5.polygonStyle;if(o5.polygonStyle instanceof Function){oW=o5.polygonStyle(o2)||{}}}var o3=new mw(o6,oW);oV.push(o3)}}}return oV}function oK(oV){}function e(oZ,oW){var oY=[];for(var oV=0;oV<oZ.length;oV+=2){var oX=[oZ[oV],oZ[oV+1]];if(oW.reference&&oW.reference!=="BD09LL"){oX=fU.transform(oX,oW.reference||"WGS84",fU.BD09LL)}oY.push(oX[0]);oY.push(oX[1])}return oY}function oL(oV){var oW=[Infinity,Infinity,-Infinity,-Infinity];oM(oV,function(oX){if(oW[0]>oX[0]){oW[0]=oX[0]}if(oW[1]>oX[1]){oW[1]=oX[1]}if(oW[2]<oX[0]){oW[2]=oX[0]}if(oW[3]<oX[1]){oW[3]=oX[1]}});return oW}function oM(o4,o9){var o0,oX,oW,o3,oV,o6,o8,o7,oZ,o2,oY=(o4.type&&o4.type.toLowerCase()==="featurecollection"),o1=(o4.type&&o4.type.toLowerCase()==="feature"),o5=oY?o4.features.length:1;for(o0=0;o0<o5;o0++){oZ=(oY?o4.features[o0]["geometry"]:(o1?o4.geometry:o4));o2=oZ.type==="GeometryCollection";o8=o2?oZ.geometries.length:1;for(o3=0;o3<o8;o3++){o6=o2?oZ.geometries[o3]:oZ;o7=o6.coordinates;if(o6.type==="Point"){o9(o7)}else{if(o6.type==="LineString"||o6.type==="MultiPoint"){for(oX=0;oX<o7.length;oX++){o9(o7[oX])}}else{if(o6.type==="Polygon"||o6.type==="MultiLineString"){for(oX=0;oX<o7.length;oX++){for(oW=0;oW<o7[oX].length;oW++){o9(o7[oX][oW])}}}else{if(o6.type==="MultiPolygon"){for(oX=0;oX<o7.length;oX++){for(oW=0;oW<o7[oX].length;oW++){for(oV=0;oV<o7[oX][oW].length;oV++){o9(o7[oX][oW][oV])}}}}else{throw new Error("绫诲瀷閿欒")}}}}}}}function i(o4,o9){var o0,oX,oW,o3,oV,o6,o8,o7,oZ,o2,oY=o4.type==="FeatureCollection",o1=o4.type==="Feature",o5=oY?o4.features.length:1;for(o0=0;o0<o5;o0++){oZ=(oY?o4.features[o0]["geometry"]:(o1?o4.geometry:o4));o2=oZ.type==="GeometryCollection";o8=o2?oZ.geometries.length:1;for(o3=0;o3<o8;o3++){o6=o2?oZ.geometries[o3]:oZ;o7=o6.coordinates;if(o6.type==="Point"){o7=o9(o7)}else{if(o6.type==="LineString"||o6.type==="MultiPoint"){for(oX=0;oX<o7.length;oX++){o7[oX]=o9(o7[oX])}}else{if(o6.type==="Polygon"||o6.type==="MultiLineString"){for(oX=0;oX<o7.length;oX++){for(oW=0;oW<o7[oX].length;oW++){o7[oX][oW]=o9(o7[oX][oW])}}}else{if(o6.type==="MultiPolygon"){for(oX=0;oX<o7.length;oX++){for(oW=0;oW<o7[oX].length;oW++){for(oV=0;oV<o7[oX][oW].length;oV++){o7[oX][oW][oV]=o9(o7[oX][oW][oV])}}}}else{throw new Error("绫诲瀷閿欒")}}}}}}}function oR(oW){var oV=oW.type==="FeatureCollection";var oX=oW.type==="Feature";var oY=(oV?oW.features[0]["geometry"]:(oX?oW.geometry:oW));if(oY.type){return oY.type}else{throw new Error("绫诲瀷閿欒")}}oQ.bbox=oL;oQ.coordEachReplace=i;oQ.getType=oR;return oQ})();const eL={point:{symbolPath:{format:"string",defaultValue:""},symbolFillColor:{format:"string",defaultValue:"#000"},symbolFillOpacity:{format:"number",defaultValue:1},symbolScale:{format:"number",defaultValue:1},symbolRotation:{format:"number",defaultValue:0},symbolStrokeColor:{format:"string",defaultValue:"#000"},symbolStrokeOpacity:{format:"number",defaultValue:0},symbolStrokeWeight:{format:"number",defaultValue:0},icon:{format:"string",defaultValue:""},iconSize:{format:"array",defaultValue:[32,32]},uid:{format:"string",defaultValue:"custom-vector-0"},name:{format:"string",defaultValue:""},fontSize:{format:"number",defaultValue:22},color:{format:"string",defaultValue:"#0d20c9"},haloSize:{format:"number",defaultValue:2},strokeColor:{format:"string",defaultValue:"#fff"},textOnIcon:{format:"string",defaultValue:false},textOnIconSize:{format:"array",defaultValue:[32,32]},textOnIconUrl:{format:"string",defaultValue:""},textMargin:{format:"number",defaultValue:0},direction:{format:"number",defaultValue:0},rank:{format:"number",defaultValue:50000},visibility:{format:"boolean",defaultValue:true},nodeType:{format:"number",defaultValue:0},shapeType:{format:"number",defaultValue:0},anchor:{format:"number",defaultValue:0},size:{format:"number",defaultValue:32},scale:{format:"number",defaultValue:1},offset:{format:"object",defaultValue:[0,0]},rotation:{format:"number",defaultValue:0},opacity:{format:"number",defaultValue:1},strokeWeight:{format:"number",defaultValue:0}},polyline:{strokeLineJoin:{format:"string",defaultValue:"miter"},strokeLineCap:{format:"string",defaultValue:"round"},strokeColor:{format:"string",defaultValue:"#142655"},strokeWeight:{format:"number",defaultValue:2},strokeOpacity:{format:"number",defaultValue:1},borderColor:{format:"string",defaultValue:"rgba(27, 142, 236, 1)"},borderWeight:{format:"number",defaultValue:0},strokeTextureUrl:{format:"string",defaultValue:""},strokeTextureWidth:{format:"number",defaultValue:16},strokeTextureHeight:{format:"number",defaultValue:16},strokeStyle:{format:"string",defaultValue:"solid"},dashArray:{format:"object",defaultValue:[8,4]},shapeType:{format:"number",defaultValue:0},visibility:{format:"boolean",defaultValue:true}},polygon:{fillColor:{format:"string",defaultValue:"#142655"},fillOpacity:{format:"number",defaultValue:1},patternMapping:{format:"string",defaultValue:"0, 0, 32, 32"},patternScale:{format:"number",defaultValue:1},patternOffset:{format:"string",defaultValue:"0, 0"},strokeWeight:{format:"number",defaultValue:0},strokeLineJoin:{format:"string",defaultValue:"bevel"},strokeLineCap:{format:"string",defaultValue:"round"},strokeColor:{format:"string",defaultValue:"#dec41b"},strokeOpacity:{format:"number",defaultValue:1},strokeStyle:{format:"string",defaultValue:"solid"},dashArray:{format:"object",defaultValue:[8,4]},visibility:{format:"boolean",defaultValue:true}}};const d2=(function(i){var e={};for(var T in i){e[T]={};for(var C in i[T]){e[T][C]=i[T][C].defaultValue}}return e})(eL);const iE={POINT:"Point",LINE_STRING:"LineString",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",CIRCLE:"Circle",};function iu(e){return e&&typeof ArrayBuffer!=="undefined"&&(e instanceof ArrayBuffer||(e.constructor&&e.constructor.name==="ArrayBuffer"))}function jg(e){if(self){if(self.ImageBitmap&&e instanceof self.ImageBitmap){return true}}else{if(window&&window.ImageBitmap){if(e instanceof window.ImageBitmap){return true}}}return false}const mX={};function a9(i,T,C){var e=C||{};Object.defineProperty(i,"_classRegistryKey",{value:T,writeable:false});mX[T]={_class:i,escape:e.escape||[]}}a9(Object,"Object");a9(d9,"Point");function nE(oO,oM){if(oO===null||oO===undefined||typeof oO==="boolean"||typeof oO==="number"||typeof oO==="string"||oO instanceof Boolean||oO instanceof Number||oO instanceof String||oO instanceof Date||oO instanceof RegExp){return oO}if(iu(oO)){if(oM){oM.push(oO)}return oO}if(jg(oO)){if(oM){var oR=oM.filter(function(i){if(i===oO){return true}else{return false}});!oR&&oM.push(oO)}return oO}if(ArrayBuffer.isView(oO)){const oN=oO;if(oM){oM.push(oN.buffer)}return oN}if(oO instanceof ImageData){if(oM){var oR=oM.filter(function(i){if(i===oO.data.buffer){return true}else{return false}});!oR&&oM.push(oO.data.buffer)}return oO}if(Array.isArray(oO)){const C=[];for(var T=0;T<oO.length;T++){var oS=oO[T];C.push(nE(oS,oM))}return C}if(typeof oO==="object"){const oK=oO.constructor;const e=oK._classRegistryKey;if(!e){throw new Error("涓嶈兘琚簭鍒楀寲")}const oL=oK.serialize?oK.serialize(oO,oM):{};if(!oK.serialize){for(var oQ in oO){if(!oO.hasOwnProperty(oQ)){continue}if(mX[e]["escape"].indexOf(oQ)>=0){continue}const oP=oO[oQ];oL[oQ]=nE(oP,oM)}if(oO instanceof Error){oL.message=oO.message}}if(e!=="Object"){oL["_$name"]=e}return oL}else{if(oO instanceof Function){return null}}throw new Error("涓嶈兘琚簭鍒楀寲")}function lP(oL){if(oL===null||oL===undefined||typeof oL==="boolean"||typeof oL==="number"||typeof oL==="string"||oL instanceof Boolean||oL instanceof Number||oL instanceof String||oL instanceof Date||oL instanceof RegExp||iu(oL)||jg(oL)||ArrayBuffer.isView(oL)||oL instanceof ImageData){return oL}if(Array.isArray(oL)){var e=oL["_$name"];if(e){var T=mX[e]["_class"];if(!T){throw new Error("涓嶈兘琚弽搴忓垪鍖�")}if(T.deserialize){return T.deserialize(oL)}}const oK=[];for(var C=0;C<oL.length;C++){var oO=oL[C];oK.push(lP(oO))}return oK}if(typeof oL==="object"){var e=oL["_$name"]||"Object";var T=mX[e]["_class"];if(!T){throw new Error("涓嶈兘琚弽搴忓垪鍖�")}if(T.deserialize){return T.deserialize(oL)}const oQ=Object.create(T.prototype);const oP=Object.keys(oL);for(var C=0;C<oP.length;C++){const oN=oP[C];if(oN==="_$name"){continue}const oM=oL[oN];oQ[oN]=lP(oM)}return oQ}throw new Error("涓嶈兘琚弽搴忓垪鍖�")}function o(oN,oL,oM){if(!oN.length){return oM(null,[])}var oK=oN.length;const T=new Array(oN.length);var e=null;for(var C=0;C<oN.length;C++){oL(oN[C],function(oO,i){if(oO){e=oO}T[C]=i;if(--oK===0){oM(e,T)}},C)}}function i1(oO,oL,oN){if(!oO.length){return oN(null,[])}var oK=oO.length;const T=new Array(oO.length);var e=null;var C=0;function oM(){oL(oO[C],function(oP,i){if(oP){e=oP}T[C]=i;if(--oK===0){oN(e,T)}else{C++;oM()}},C)}oM()}var nX=(function(){var oM=true;var oO=256;var e=true;var T=oe("ditu","normalTraffic");var oL=T.udt;var C=K.urlProtocol+"//" + window.location.host + "/bmap-api/traffic/";var i=[[2,"79,210,125,1",3,2,0,[],0,0],[2,"79,210,125,1",3,2,0,[],0,0],[2,"79,210,125,1",4,2,0,[],0,0],[2,"79,210,125,1",5,2,0,[],0,0],[2,"79,210,125,1",6,2,0,[],0,0],[2,"255,208,69,1",3,2,0,[],0,0],[2,"255,208,69,1",3,2,0,[],0,0],[2,"255,208,69,1",4,2,0,[],0,0],[2,"255,208,69,1",5,2,0,[],0,0],[2,"255,208,69,1",6,2,0,[],0,0],[2,"232,14,14,1",3,2,0,[],0,0],[2,"232,14,14,1",3,2,0,[],0,0],[2,"232,14,14,1",4,2,0,[],0,0],[2,"232,14,14,1",5,2,0,[],0,0],[2,"232,14,14,1",6,2,0,[],0,0],[2,"181,0,0,1",3,2,0,[],0,0],[2,"181,0,0,1",3,2,0,[],0,0],[2,"181,0,0,1",4,2,0,[],0,0],[2,"181,0,0,1",5,2,0,[],0,0],[2,"181,0,0,1",6,2,0,[],0,0],[2,"255,255,255,1",4,0,0,[],0,0],[2,"255,255,255,1",5.5,0,0,[],0,0],[2,"255,255,255,1",7,0,0,[],0,0],[2,"255,255,255,1",8.5,0,0,[],0,0],[2,"255,255,255,1",10,0,0,[],0,0]];var oN=new kT({transparentPng:true,dataType:2,cacheSize:256,clipTile:true,isFlat:true});oN.zIndex=2;oN.autoRefresh=true;oN.refreshInterval=60000;if(!K.apiVersionIsGL()){var oK=oN.initialize;oN.initialize=function(oR){oK&&oK.call(this,oR);var oP=this;var oQ=this.remove;this.remove=function(){if(oP.reloadTimer){clearInterval(oP.reloadTimer);oP.reloadTimer=null}oQ&&oQ.call(this)};if(this.autoRefresh===true){this.reloadTimer=setInterval(function(){oP._refreshTiles()},this.refreshInterval)}};oN.setAutoRefresh=function(oQ){this.autoRefresh=!!oQ;if(this.reloadTimer){clearInterval(this.reloadTimer);this.reloadTimer=null}if(this.autoRefresh&&this.map){var oP=this;this.reloadTimer=setInterval(function(){oP._refreshTiles()},this.refreshInterval)}};oN.setRefreshInterval=function(oP){this.refreshInterval=Math.max(10000,oP);if(this.autoRefresh&&this.map){if(this.reloadTimer){clearInterval(this.reloadTimer)}var oQ=this;this.reloadTimer=setInterval(function(){oQ._refreshTiles()},this.refreshInterval)}}}oN.getTilesUrl=function(oR,oS){if(!oR||oS<7){return null}var oQ=oR.x;var oT=oR.y;var oP=C+"TrafficTileService?level="+oS+"&x="+oQ+"&y="+oT+"&time="+(+new Date());if(this.map.getRenderType()==="webgl"){oP=C+"?qt=vtraffic&z="+oS+"&x="+oQ+"&y="+oT+"&udt="+oL}return oP};oN.setColors=function(oP){for(var oS=0;oS<i.length;oS++){var oR=Math.floor(oS/5);var oQ=oP[oR];if(oQ){if(Object.prototype.toString.call(oQ)==="[object String]"){oQ=k0.parseCSSColor(oQ)}i[oS][1]=[oQ[0],oQ[1],oQ[2],oQ[3]/255].join(",")}}this._refreshTiles()};oN.setEdge=function(oP){e=!!oP;this._refreshTiles()};oN._refreshTiles=function(){if(!this.map){return}this.clearCache();var oP=this.map._webglPainter;if(oP&&oP._cache){var oQ=oP._cache;var oS=oQ.getAllData();if(oS){var oT=this.mapType+"_";for(var oR in oS){if(oR.indexOf(oT)===0){oQ.removeData(oR)}}}}this.map.dispatchEvent(new ix("onupdate"))};oN.processData=function(oS){var oW=oS.content;var oU=10;if(typeof oS.precision==="number"){oU=oS.precision*10}var o3={road:[[],[]]};if(!oW){return o3}var o1=oW.tf;if(!o1){return o3}for(var oT=0;oT<o1.length;oT++){var o2=o1[oT][1];var o0=[];var oY=0;var oX=0;var oZ=i[o1[oT][3]];for(var oR=0,oP=o2.length;oR<oP/2;oR++){oY+=o2[oR*2]/oU;oX+=o2[oR*2+1]/oU;o0.push(oY,256-oX)}var oQ=oZ[1].split(",");oQ[3]=oQ[3]*255;var oV=oZ[2]/2;if(e){o3.road[0].push([o0,1,2,[255,255,255,255],oV+2])}o3.road[1].push([o0,1,2,oQ,oV])}return o3};return oN})();function ng(e){if(e&&e.autoRefresh===false){nX.autoRefresh=false}if(e&&typeof e.refreshInterval==="number"){nX.refreshInterval=Math.max(10000,e.refreshInterval)}}ng.prototype=nX;function f2(e){g2.call(this);e=e||{};this._opts={};this._opts.districts=e.name||"";this._opts.adcode=e.adcode||"";this._opts.kind=e.kind||0;this._config={};var C=K.uiVersionIsGL()?{strokeColor:"#00f",fillColor:"#ff0"}:fq();this._config.strokeColor=e.strokeColor||C.strokeColor;this._config.strokeOpacity=typeof e.strokeOpacity==="number"?e.strokeOpacity:1;dA(this._config.strokeOpacity,0,1);this._config.fillColor=e.fillColor||C.fillColor;this._config.fillOpacity=typeof e.fillOpacity==="number"?e.fillOpacity:0.6;dA(this._config.fillOpacity,0,1);this._config.strokeWeight=e.strokeWeight||1;this._config.autoViewport=e.autoViewport||e.viewport||false;this._config.onComplete=typeof e.onComplete==="function"?e.onComplete:null;this.disOverlays=[];this.eventAndCallback={};this._layer=null;this._queryList=[];var i=this;ki.load("layer",function(){i._asyncSearch()},true)}f2.inherits(eX,"DistrictLayer");f2.prototype.isDistrictLayer=true;hv.extend(f2.prototype,{initialize:function(e){this._map=e;this.addDistrict()},addDistrict:function(){this._queryList.push({method:"addDistrict",arguments:arguments})},deleteDistrict:function(){this._queryList.push({method:"deleteDistrict",arguments:arguments})},getDistrictData:function(){this._queryList.push({method:"getDistrictData",arguments:arguments})},searchBoundary:function(){this._queryList.push({method:"searchBoundary",arguments:arguments})},addEventListener:function(e,i){this.eventAndCallback[e]=i},removeEventListener:function(C,oK){var T=this.eventAndCallback[C];if(!T||oK!==T){return}if(this._layer){this._layer.removeEventListener(C,T);for(var e=0;e<this._layer.overlayData.length;e++){this._layer.overlayData[e].removeEventListener(C,T)}}delete this.eventAndCallback[C]},removeDistrict:function(i,e){this._map=i;this.deleteDistrict(e)},toString:function(){return"DistrictLayer"}});function bk(e,i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("GeoJSONLayer")}i=i||{};this.layerName=e||"unknown";this.reference=i.reference;this.level=i.level||-99;this.visible=(i.visible===undefined?true:!!i.visible);this.minZoom=i.minZoom||3;this.maxZoom=i.maxZoom||21;this.markerStyle=i.markerStyle||{};this.polylineStyle=i.polylineStyle||{};this.polygonStyle=i.polygonStyle||{};this.overlayData=[];this._onMap=false;this.clickDistrict=5;this._queryList=[];var C=this;ki.load("layer",function(){C._asyncReplay()},true);this.setData(i.dataSource)}bk.inherits(hv.BaseClass,"GeoJSONLayer");bk.prototype.isGeoJSONLayer=true;bk.prototype.init=function(oM){if(this.map){return}this.map=oM;var oK=this;this._onZoomEvent=function(){if(oK.map.getZoom()>=oK.minZoom&&oK.map.getZoom()<=oK.maxZoom){if(!oK._onMap){oK.addDataToMap();oK._onMap=true}}else{if(oK._onMap){oK.removeDataFromMap();oK._onMap=false}}};this.map.on("zoomend",this._onZoomEvent);var oK=this;var e=false;var T={x:0,y:0};this._layerMouseEvent=function(oP){if(!oK.map||!oK._listeners||!oK.visible||!oK._onMap){return}if(!oK._listeners.onmousemove||Object.keys(oK._listeners.onmousemove).length===0){return}var oO=oK.pickOverlays(oP);var i;if(oO&&oO.length>0){i=new ix("onmousemove");i.features=oO;oK.map.platform.style.cursor=oK.map.config.overlayMoveCursor;e=true}else{if(!e||!oK._listeners.onmouseout||Object.keys(oK._listeners.onmouseout).length===0){return}oK.map.platform.style.cursor=oK.map.config.defaultCursor;i=new ix("onmouseout");i.features=null;e=false}if(i){i.pointMC=oP.pointMC;i.pixel=oP.pixel;i.latLng=oP.latlng;oK.dispatchEvent(i)}};this._layerClickEvent=function(oQ){if(!oK.map||!oK._listeners||!oK.visible){return}if((!oK._listeners.onclick&&!oK._listeners.dblclick)||(Object.keys(oK._listeners.onclick||{}).length===0&&Object.keys(oK._listeners.dblclick||{}).length===0)){return}var oO={x:oQ.clientX,y:oQ.clientY};if(Math.abs(oO.x-T.x)>oK.clickDistrict||Math.abs(oO.y-T.y)>oK.clickDistrict){return}var oP=oK.pickOverlays(oQ);var i=new ix(oQ.type);i.pointMC=oQ.pointMC;i.pixel=oQ.pixel;i.latLng=oQ.latlng;i.features=oP;oK.dispatchEvent(i)};this._layerMouseDownEvent=function(i){T={x:i.clientX,y:i.clientY}};oM.addEventListener("onmousemove",this._layerMouseEvent);oM.addEventListener("onmouseout",this._layerMouseEvent);oM.addEventListener("onmousedown",this._layerMouseDownEvent);var oL=["onclick"];for(var C=0;C<oL.length;C++){var oN=oL[C];oM.addEventListener(oN,this._layerClickEvent)}this._onZoomEvent()};bk.prototype.remove=function(){if(this.map){this.removeDataFromMap();this.map.removeEventListener("onmousemove",this._layerMouseEvent);this.map.removeEventListener("onmouseout",this._layerMouseEvent);this.map.removeEventListener("onclick",this._layerClickEvent);this.map.removeEventListener("onmousedown",this._layerMouseDownEvent);this.map.removeEventListener("onzoomend",this._onZoomEvent)}this.map=null};bk.prototype.destroy=function(){if(this.map){this.clearData();this.map.removeEventListener("onmousemove",this._layerMouseEvent);this.map.removeEventListener("onmouseout",this._layerMouseEvent);this.map.removeEventListener("onclick",this._layerClickEvent);this.map.removeEventListener("onmousedown",this._layerMouseDownEvent);this.map.removeEventListener("onzoomend",this._onZoomEvent)}this.map=null};bk.prototype.getData=function(){return this.overlayData};bk.prototype.addDataToMap=function(){if(this.visible&&this.map&&this.map.getZoom()>=this.minZoom&&this.map.getZoom()<=this.maxZoom){for(var e=0;e<this.overlayData.length;e++){this.map.addOverlay(this.overlayData[e])}}};bk.prototype.removeDataFromMap=function(){if(this.map&&this.overlayData.length>0){for(var e=0;e<this.overlayData.length;e++){this.map.removeOverlay(this.overlayData[e])}}};bk.prototype.clearData=function(){this.dataSource=null;if(this.map&&this.overlayData.length>0){this.removeDataFromMap()}this.overlayData=[]};bk.prototype.setLevel=function(e){if(e>-999&&e<9999){this.level=e;for(var C=0;C<this.overlayData.length;C++){this.overlayData[C].setZIndex(this.level)}if(this.map){this.map.fire(new BMapGL.Event("onupdate","line"))}}};bk.prototype.setClickDistrict=function(e){this.clickDistrict=e||5};bk.prototype.getLevel=function(){return this.level};bk.prototype.setVisible=function(i){var e=!!i;if(this.visible!==e){this.visible=e;if(e){this.addDataToMap()}else{this.removeDataFromMap()}}};bk.prototype.getVisible=function(){return this.visible};bk.prototype.toString=function(){return"GeoJSONLayer"};bk.prototype.setData=function(){this._queryList.push({method:"setData",arguments:arguments})};bk.prototype.addOverlay=function(){this._queryList.push({method:"addOverlay",arguments:arguments})};bk.prototype.removeOverlay=function(){this._queryList.push({method:"removeOverlay",arguments:arguments})};bk.prototype.resetStyle=function(){this._queryList.push({method:"resetStyle",arguments:arguments})};bk.prototype.pickOverlays=function(){return null};bk.prototype._asyncReplay=function(){var C=this._queryList||[];this._queryList=[];for(var e=0;e<C.length;e++){this[C[e].method].apply(this,C[e].arguments)}};function ow(oQ){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("XYZLayer")}var oQ=oQ||{};var oY=oQ.reproject===true;var oK=oQ.reprojectSourceCRS||"EPSG3857";var oO=oQ.transform||{source:"EPSG3857",target:"BD09MC"};if(!oO.source){oO.source="EPSG3857"}if(!oO.target){oO.target="BD09MC"}const oV=oQ.tileUrlTemplate||"";const T=oQ.xTemplate||function(oZ,o1,o0){return oZ};const oW=oQ.yTemplate||(oQ.tms?function(oZ,o1,o0){return Math.pow(2,o0)-o1-1}:function(oZ,o1,o0){return o1});const C=oQ.zTemplate||function(oZ,o1,o0){return o0};function oM(o9,o8,o7){var o2=fA.getTileRangeExtent([o7,o9,o8]);var o5=o2.minX,o4=o2.minY,o1=o2.maxX,oZ=o2.maxY;var o0=20037508.34;var o6=function(pa){return pa/o0*180};var o3=function(pa){return 180/Math.PI*(2*Math.atan(Math.exp(pa/o0*180*Math.PI/180))-Math.PI/2)};if(oK==="EPSG3857"){return o5+","+o4+","+o1+","+oZ}return o3(o4)+","+o6(o5)+","+o3(oZ)+","+o6(o1)}const oU=oQ.bTemplate||(oY?oM:function(oZ,o2,o1){const o0=fA.getTileRangeExtent([o1,oZ,o2]);return o0.minX+","+o0.minY+","+o0.maxX+","+o0.maxY});const oX=oQ.wTemplate||function(oZ,o1,o0){return 512};const e=oQ.hTemplate||function(oZ,o1,o0){return 512};var oP=oQ.extent||[];const i=oQ.extentCRSIsWGS84||false;var oN=oQ.minZoom||0;var oT=oQ.maxZoom||23;var oL=oQ.spanLevel||0;if(!oQ.showRegion||"insideoutside".indexOf(oQ.showRegion)===-1){oQ.showRegion="inside"}var oS=new kT({transform:oO,png8:oQ.png8||false,height:oQ.height||0,retry:oQ.retry||false,retryTime:oQ.retryTime||600,transparentPng:true,dataType:oQ.dataType||1,spanLevel:oL,tileTypeName:"xyz",cacheSize:oQ.cacheSize||256,customLayer:true,clipTile:false,isTop:oQ.isTop||false,opacity:oQ.opacity||1,isLowText:oQ.isLowText||false,boundary:oQ.boundary||false,showRegion:oQ.showRegion,useThumbData:oQ.useThumbData||false,thumbUpsample:oQ.thumbUpsample||false,tileLoadFunction:oQ.tileLoadFunction,preciseVertex:oQ.preciseVertex||false});oS.thumbMaxZoom=oT;if(typeof oQ.thumbParentDepth==="number"){oS.thumbParentDepth=oQ.thumbParentDepth}if(typeof oQ.thumbChildDepth==="number"){oS.thumbChildDepth=oQ.thumbChildDepth}if(oQ.zIndex){oS.zIndex=oQ.zIndex}oS.reproject=oY;oS.reprojectSourceCRS=oK;(oP.length===4)&&i&&(oP=fA.fromEPSG4326(oP));oS.getTilesUrl=function(o6,o0,o4){if(!o6||o0<0||o0<(oN+oL)||o0>(oT+oL)){oS.tileCache.clear();return null}if(oO.source!=="BD09MC"){o6.x=fA.getTilesLoop(o0,o6.x)}if(oP.length===4){var o5=fA.getTileRangeExtent([o0,o6.x,o6.y]);var o7=oR([o5.minX,o5.minY,o5.maxX,o5.maxY]);if(!o7){return null}}var o1="";if(oV){o1=oV;var o3=/[^\{}]*\{(.*)\}[^\}]*/;o1.match(o3);var o2=[];if(RegExp.$1){o2=RegExp.$1.split(",")}var oZ=C(o6.x,o6.y,o0);if(!oZ){return null}o1=o1.replace(/\{(.*)\}/,o2[(o6.x+o6.y)%o2.length]);o1=o1.replace(/\[x\]/gi,T(o6.x,o6.y,o0));o1=o1.replace(/\[y\]/gi,oW(o6.x,o6.y,o0));o1=o1.replace(/\[z\]/gi,oZ);o1=o1.replace(/\[b\]/gi,oU(o6.x,o6.y,o0));o1=o1.replace(/\[w\]/gi,oX(o6.x,o6.y,o0));o1=o1.replace(/\[h\]/gi,e(o6.x,o6.y,o0))}else{return null}return o1};function oR(oZ){if(oP&&oP instanceof Array&&oP.length===4){if((oP[0]<=oZ[2]&&oP[1]<=oZ[3])&&(oP[2]>=oZ[0]&&oP[3]>=oZ[1])){return true}else{return false}}return true}return oS}function cr(e){e=e||{};var i=e.url||"";var oR=e.params||{};var oM=oR.VERSION||"1.3.0";var oL=e.projection||"EPSG:3857";if(oL!=="EPSG:3857"){console.warn("[WMSLayer] 浠呮敮鎸� EPSG:3857銆備紶鍏ュ��:"+oL);oL="EPSG:3857"}if(!oR.LAYERS){console.warn("[WMSLayer] params.LAYERS 缂哄け,WMS 鏈嶅姟閫氬父蹇呭~銆�")}var oN=oM==="1.1.1"?"SRS":"CRS";var oO={SERVICE:"WMS",REQUEST:"GetMap",VERSION:oM,FORMAT:"image/png",TRANSPARENT:"true",STYLES:""};oO[oN]=oL;for(var T in oR){if(oR.hasOwnProperty(T)){oO[T]=oR[T]}}delete oO.BBOX;delete oO.WIDTH;delete oO.HEIGHT;var C=[];for(var oP in oO){if(oO.hasOwnProperty(oP)){var oK=encodeURIComponent(oO[oP]).replace(/%2C/gi,",");C.push(encodeURIComponent(oP)+"="+oK)}}C.push("BBOX=[b]","WIDTH=[w]","HEIGHT=[h]");var oQ=i.indexOf("?")===-1?"?":"&";return{tileUrlTemplate:i+oQ+C.join("&"),transform:{source:"EPSG3857",target:"BD09MC"},projection:oL,version:oM}}function ev(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("WMSLayer")}i=i||{};var C=i.tileSize||256;var e=cr({url:i.url,params:i.params,projection:i.projection});return new ow({tileUrlTemplate:e.tileUrlTemplate,transform:e.transform,wTemplate:function(){return C},hTemplate:function(){return C},minZoom:i.minZoom,maxZoom:i.maxZoom,extent:i.extent||[],extentCRSIsWGS84:i.extentCRSIsWGS84||false,opacity:i.opacity,zIndex:i.zIndex,spanLevel:i.spanLevel,useThumbData:i.useThumbData,reproject:i.reproject,reprojectSourceCRS:i.reprojectSourceCRS,png8:i.png8,height:i.height,retry:i.retry,retryTime:i.retryTime,dataType:i.dataType,cacheSize:i.cacheSize,isTop:i.isTop,boundary:i.boundary,showRegion:i.showRegion,thumbParentDepth:i.thumbParentDepth,thumbChildDepth:i.thumbChildDepth,tileLoadFunction:i.tileLoadFunction})}function f6(e){var e=e||{};var C=e.url||"";var oK=e.params||{};var oO={Service:"WMTS",Request:"GetTile",Version:"1.0.0",Format:"image/png",TileMatrixSet:"GoogleMapsCompatible"};for(var oQ in oO){if(!oK[oQ]&&!oK[oQ.toLowerCase()]){oK[oQ]=oO[oQ]}}var oL=oK.TileMatrix||oK.tilematrix||"[z]";var oP=oK.TileCol||oK.tilecol||"[x]";var oN=oK.TileRow||oK.tilerow||"[y]";delete oK.TileMatrix;delete oK.tilematrix;delete oK.TileCol;delete oK.tilecol;delete oK.TileRow;delete oK.tilerow;var oR=[];for(var oQ in oK){oR.push(oQ+"="+encodeURIComponent(oK[oQ]))}var oM=C.indexOf("?")===-1?"?":"&";var T=C+oM+oR.join("&")+"&TileMatrix="+oL+"&TileCol="+oP+"&TileRow="+oN;var i={tileUrlTemplate:T,opacity:e.opacity,minZoom:e.minZoom,maxZoom:e.maxZoom,zIndex:e.zIndex,extent:e.extent,extentCRSIsWGS84:e.extentCRSIsWGS84,transform:e.transform,xTemplate:e.xTemplate,yTemplate:e.yTemplate,zTemplate:e.zTemplate,useThumbData:e.useThumbData,spanLevel:e.spanLevel,reproject:e.reproject,reprojectSourceCRS:e.reprojectSourceCRS,png8:e.png8,height:e.height,retry:e.retry,retryTime:e.retryTime,dataType:e.dataType,cacheSize:e.cacheSize,isTop:e.isTop,boundary:e.boundary,showRegion:e.showRegion,thumbParentDepth:e.thumbParentDepth,thumbChildDepth:e.thumbChildDepth,tileLoadFunction:e.tileLoadFunction};return new ow(i)}function le(e){var C={"EPSG:3857":"EPSG3857",EPSG3857:"EPSG3857",BD09MC:"BD09MC"};var i=C[e];if(!i){if(e&&typeof console!=="undefined"&&console.warn){console.warn("[RasterTileLayer] 浠呮敮鎸� EPSG:3857 / BD09MC, 浼犲叆:"+e)}i="EPSG3857"}return i}function cW(T,i,oN,oM,e){var oL=Math.pow(2,oM)-oN-1;var C=T.replace(/\{z\}/gi,oM).replace(/\{x\}/gi,i).replace(/\{-y\}/gi,oL).replace(/\{reverseY\}/gi,oL).replace(/\{y\}/gi,oN);if(C.indexOf("{s}")!==-1||C.indexOf("{S}")!==-1){var oK=(e&&e.length)?e[Math.abs(i+oN)%e.length]:"";C=C.replace(/\{s\}/gi,oK)}return C}function eM(C){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("RasterTileLayer")}C=C||{};var oT=C.url||"";var oN=C.subdomains||[];var oL=typeof console!=="undefined"&&console.warn;if(!oT&&oL){console.warn("[RasterTileLayer] url 蹇呭~(瀛楃涓叉ā鏉挎垨 function(x, y, z))銆�")}if(typeof oT==="string"&&/\{s\}/i.test(oT)&&!oN.length&&oL){console.warn("[RasterTileLayer] url 鍚� {s} 浣嗘湭鎻愪緵 subdomains銆�")}var i=le(C.projection||"EPSG:3857");var oM={source:i,target:"BD09MC"};var T=C.bounds||[];var oO=C.boundsInWGS84||false;var oK=C.minZoom||0;var oP=C.maxZoom||23;var oR=C.spanLevel||0;var oQ=C.showRegion;if(oQ!=="inside"&&oQ!=="outside"){oQ="inside"}var e=new kT({transform:oM,height:C.height||0,retry:C.retry||false,retryTime:C.retryTime||600,transparentPng:true,dataType:1,spanLevel:oR,tileTypeName:"xyz",cacheSize:C.cacheSize||256,customLayer:true,clipTile:false,opacity:C.opacity||1,boundary:C.boundary||false,showRegion:oQ,useThumbData:C.useThumbData!==false,tileLoadFunction:C.tileLoadFunction});if(C.zIndex){e.zIndex=C.zIndex}if(T.length===4&&oO){T=fA.fromEPSG4326(T)}e.getTilesUrl=function(oU,oW){if(!oU||oW<0||oW<(oK+oR)||oW>(oP+oR)){e.tileCache.clear();return null}if(oM.source!=="BD09MC"){oU.x=fA.getTilesLoop(oW,oU.x)}if(T.length===4){var oV=fA.getTileRangeExtent([oW,oU.x,oU.y]);if(!oS([oV.minX,oV.minY,oV.maxX,oV.maxY])){return null}}if(typeof oT==="function"){return oT(oU.x,oU.y,oW)||null}if(oT){return cW(oT,oU.x,oU.y,oW,oN)}return null};function oS(oU){return(T[0]<=oU[2]&&T[1]<=oU[3]&&T[2]>=oU[0]&&T[3]>=oU[1])}return e}function fm(C){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("PixelLayer")}this.src=eR();this._queryList=[];var e=this;ki.load("layer",function(){e._asyncReplay()},true);this.tileMaskUvCache=new a1(64,{clearCallback:function(oM){}});var oL=6;if(C.pixelMap){this.opacity=typeof C.pixelMap.opacity==="number"?C.pixelMap.opacity:1;dA(this.opacity,0,1);if(this.opacity<1){C.useThumbData=false}var oK=C.pixelMap||{};this.colors=oK.colors||["#F9F871","#FFC75F","#FF9671","#FF6F91","#D65DB1","#845EC2"];this.positions=oK.positions||[0,0.2,0.4,0.6,0.8,1];this.domain=oK.domain||[0,255];this.clamp=oK.clamp||this.domain;this.noData=(oK.noData!==undefined)?oK.noData:-99999;this.fomularC=oK.fomularC||"float generateValue(vec4 pixel){return pixel.r * 255.;}";this.fomularJS=oK.fomularJS||function(oM){return oM.r};this.maskPng=oK.maskPng||null;if(this.maskPng){this.loadMaskPng(this.maskPng)}this.maskData=oK.maskData||-1;this.maskCoord=oK.maskCoord||null;this.fHashcode=u({str:this.fomularC});var i=this.canPixelMap();if(i){this.isPixelMap=true;this.setPixelMap()}oL=C.pixelMap.cacheSize||oL}var T=new ow(C);T.ontology=this;this.layer=T;this.cacheSize=oL;this.tileCache=new a1(this.cacheSize,{clearCallback:function(oM){}});this.tileImageDataCache=new a1(this.cacheSize,{clearCallback:function(oM){}})}fm.inherits(hv.BaseClass,"PixelLayer");fm.prototype.isTileLayer=true;hv.extend(fm.prototype,{canPixelMap:function(){if(this.colors&&this.positions){return true}return false},setPixelMap:function(){if(!this.isPixelMap||!this.canPixelMap()){return}var i=this.colors;var e=this.positions;this.pHashcode=u({colors:i,positions:e});this.pixelColorMap=k0.generateColorRamp(i,e)},setDomain:function(e){if(e instanceof Array&&e.length===2){this.domain=e;this.doOnceDraw()}},setClamp:function(e){if(e instanceof Array&&e.length===2){this.clamp=e;this.doOnceDraw()}},setNoData:function(e){this.noData=e;this.doOnceDraw()},setPositions:function(e){this.positions=e;this.setPixelMap();this.doOnceDraw()},setColors:function(e){this.colors=e;this.setPixelMap();this.doOnceDraw()},setFomular:function(e,i){if(e&&i){this.fomularJS=e;this.fomularC=i;this.fHashcode=u({str:this.fomularC});this.doOnceDraw()}},setOpacity:function(e){this.opacity=e;this.doOnceDraw()},setIsPixelMap:function(e){this.isPixelMap=e;this.doOnceDraw()},setMaskPng:function(e){this.maskPng=e;this.loadMaskPng(this.maskPng);this.doOnceDraw()},setMaskData:function(e){this.maskData=e;this.doOnceDraw()},setMaskCoord:function(e){this.maskCoord=e||null;this.calMaskBox();this.doOnceDraw()},setZIndex:function(e){if(this.layer&&parseInt(e)>0){this.layer.setZIndex(e)}},getZIndex:function(){if(this.layer){return this.layer.zIndex}},setUpLevel:function(){if(this.layer){var e=this.layer._getAdjoinZIndex("up");if(this.layer.zIndex!==e){this.layer.setZIndex(e)}}},setDownLevel:function(){if(this.layer){var e=this.layer._getAdjoinZIndex("down");if(this.layer.zIndex!==e){this.layer.setZIndex(e)}}},setZIndexTop:function(){if(this.layer){this.layer.setZIndexTop()}},doOnceDraw:function(){if(this.layer.map){var e=new ix("onupdate");this.layer.map.dispatchEvent(e)}},_getInLayer:function(oR){if(!this.map){return null}var oQ=Math.floor(this.map.getZoom());var T=fA.transformBDmcPoint(oR,this.layer.transform);var oN=fA.getTileCoordForXYAndZ_(T[0],T[1],oQ,false);var C=oN.join("-");var e=this.tileCache.getData(C);if(e){return e}var oK=this.layer.zIndex;var oM=this.map._featureMgr.result.bkData;var oO=oM[oK][2];var oS=null;for(var oL=0;oL<oO.length;oL++){var oN=oO[oL];var oP=oN.tileInfo.zoom+"-"+oN.tileInfo.col+"-"+oN.tileInfo.row;if(C===oP){oS=oN;break}}this.tileCache.setData(C,oS);return oS},_initEvent:function(oK){this.map=oK;var C=this;this._layerMouseEvent=function(oO){if(!C.map){return}var i;var oN=oO.pointMC;var oM=C._getInLayer(oN);if(oM){C.prox=oM;i=new ix("onmousemove");C.map.platform.style.cursor=C.map.config.overlayMoveCursor}else{C.map.platform.style.cursor=C.map.config.defaultCursor;C.prox=null}if(i){i.pointMC=oO.pointMC;i.pixel=oO.pixel;i.latLng=oO.latlng;C.dispatchEvent(i)}};this._layerClickEvent=function(oO){if(!C.map){return}var i;var oN=oO.pointMC;var oM=C.getImagePixel(oN);if(oM){i=new ix(oO.type);i.pointMC=oN;i.pixel=oO.pixel;i.latLng=oO.latlng;i.color=oM;i.value=C.getValue(i.color);C.dispatchEvent(i)}};oK.addEventListener("onmousemove",this._layerMouseEvent);var T=["onclick","dblclick"];for(var e=0;e<T.length;e++){var oL=T[e];oK.addEventListener(oL,this._layerClickEvent)}oK.addEventListener("removetilelayer",function(i){if(i.target&&i.target.ontology){if(i.target.ontology.src===C.src){oK.removeEventListener("onmousemove",C._layerMouseEvent);oK.removeEventListener("onclick",C._layerClickEvent);oK.removeEventListener("ondblclick",C._layerClickEvent);C._clearCache()}}});oK.on("destroy",function(){C._clearCache()})},_clearCache:function(){var e=this;e.prox=null;e.tileCache.clear();e.tileImageDataCache.clear();e.tileMaskUvCache.clear();e._layerMouseEvent=null;e._layerClickEvent=null;e.imageMaskObject=null;e.pHashcode=null;e.pixelColorMap=null;e.layer.ontology=null;e.layer=null},calMaskBox:function(){var C=this.maskCoord||[];if(this.hasMaskPng&&C&&C.length===2){var e=[];for(var T=0;T<C.length;T++){e[T]=fA.transformBDmcPoint(m8.convertLL2MC(C[T]),this.layer.transform)}this.maskBox=e;this.tileMaskUvCache.clear()}else{this.maskBox=null}},buildFillMaskVertex:function(oP,oN,oM){var oO=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];if(!this.maskBox){return oO}var oR=[oP,oN,oM].join("-");var e=this.tileMaskUvCache.getData(oR);if(e){return e}if(this.hasMaskPng){var oU=this.maskBox||[];var oL=[oM,oP,oN];var oQ=fA.getTileRangeExtent(oL);var oK=oU[1][0]-oU[0][0];var C=oU[1][1]-oU[0][1];var oT=(oQ.minX-oU[0][0])/oK;var oS=(oQ.minY-oU[0][1])/C;var T=(oQ.maxX-oU[0][0])/oK;var i=(oQ.maxY-oU[0][1])/C;oO=[oT,oS,T,oS,T,i,oT,oS,T,i,oT,i]}this.tileMaskUvCache.setData(oR,oO);return oO},toString:function(){return"PixelLayer"},loadMaskPng:function(){this._queryList.push({method:"loadMaskPng",arguments:arguments})},_asyncReplay:function(){var C=this._queryList||[];this._queryList=[];for(var e=0;e<C.length;e++){this[C[e].method].apply(this,C[e].arguments)}},getImagePixel:function(){return null},getValue:function(){return null}});function m9(i,e){this.id=i;this.layerName=e;this.properties=null}function gg(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("MVTLayer")}this._opt=e||{};this._layerId=eR();this._opt.defaultOrder=(this._opt.defaultOrder===undefined)?true:this._opt.defaultOrder;this.minZoom=this._opt.minZoom||3;this.maxZoom=this._opt.maxZoom||23;this.useThumb=(this._opt.useThumb===undefined)?true:this._opt.useThumb;this.gridModel=this._opt.gridModel||gg.GridModel.BAIDUWEB;this.noCollision=(this._opt.noCollision===undefined)?true:this._opt.noCollision;if(this.gridModel===gg.GridModel.BAIDUWEB){this._opt.reference="BD09MC"}else{if(!this._opt.transform){this._opt.transform={source:"BD09MC",target:"BD09MC"};this._opt.reference="BD09MC"}else{this._opt.reference=this._opt.transform.source||"GCJ02";if(this._opt.reference==="EPSG3857"){this._opt.reference="WGS84"}}}this.loadModule=false;if(this._opt.useWorker===undefined){this._opt.useWorker=true}this.upStyle=this._opt.useWorker?false:"useMain";this._stateCube={};var i=this;this._implReady=false;this._pendingTile=null;ki.load("mvtParse",function(){i._async()},true);ki.load("layer",function(){i._onImplReady()},true);i.init(this._opt)}gg.GridModel={BAIDUWEB:0,GOOGLEWEB:1};gg.LayerTypes={POINT:"point",LINE:"line",FILL:"fill"};gg.inherits(hv.BaseClass,"MVTLayer");gg.prototype.isTileLayer=true;hv.extend(gg.prototype,{_async:function(){this.loadModule=true;this.mvt=new gg.MVTParse(this._opt);this.resolveStyle(this._opt);if(this.upStyle){this.doOnceDraw()}},init:function(C){var T=c9()?64:256;C.dataType=2;C.cacheSize=Math.max(C.cacheSize||T,16);if(C.spanLevel===undefined||typeof C.spanLevel!=="number"){C.spanLevel=0}if(this.gridModel===gg.GridModel.BAIDUWEB){var i=this.createTileLayer(C);C.spanLevel=0;this.spanLevel=0}else{if(this.gridModel===gg.GridModel.GOOGLEWEB){var i=new ow(C);this.spanLevel=C.spanLevel}}var oL={type:"vector",layerId:this._layerId,g:this.gridModel,mc:this._opt.reference==="BD09MC"?true:false,};this.layerOption=Object.assign(oL,this._opt);if(C.index&&C.index>0){i.zIndex=C.index}var e=this;i.loadTileData=function(){return e._loadTile.apply(e,arguments)};i.ontology=this;this.layer=i;var oK=this;i.addEventListener("ontilesloadstart",function(){oK.dispatchEvent(new ix("ontilesloadstart"))});i.addEventListener("ontilesloadend",function(){oK.dispatchEvent(new ix("ontilesloadend"))})},createTileLayer:function(i){const T=i.tileUrlTemplate||"";const oO=i.xTemplate||function(oV,oX,oW){return oV};const oT=i.yTemplate||function(oV,oX,oW){return oX};const oM=i.zTemplate||function(oV,oX,oW){return oW};const oS=i.bTemplate||function(oV,oY,oX){const oW=m8.tileToBoundRange({col:oV,row:oY,zoom:oX,baseTileSize:256});return oW.MC.sw.lng+","+oW.MC.sw.lat+","+oW.MC.ne.lng+","+oW.MC.ne.lat};var oU=i.extent||[];const oN=i.extentCRSIsWGS84||false;var C=i.minZoom||0;var oQ=i.maxZoom||23;var oR=i.spanLevel||0;var oP=new kT({transparentPng:true,dataType:2,spanLevel:oR,tileTypeName:"web",cacheSize:i.cacheSize||256,customLayer:true,clipTile:false,boundary:false,useThumbData:i.useThumbData||false});if(oU.length===4){if(oN){oU=fA.fromEPSG4326(oU)}var oK=fA.transformPointArr([oU[0],oU[1]],"EPSG3857","BD09MC");var oL=fA.transformPointArr([oU[2],oU[3]],"EPSG3857","BD09MC");oU=[oK[0],oK[1],oL[0],oL[1]]}oP.getTilesUrl=function(o2,oW,o1){if(!o2||oW<0||oW<(C+oR)||oW>(oQ+oR)){oP.tileCache.clear();return null}if(oU.length===4){const o0=m8.tileToBoundRange({col:x,row:y,zoom:z,baseTileSize:256});var o3=e([o0.MC.getMin().lng,o0.MC.getMin().lat,o0.MC.getMax().lng,o0.MC.getMax().lat]);if(!o3){return null}}var oX="";if(T){oX=T;var oZ=/[^\{}]*\{(.*)\}[^\}]*/;oX.match(oZ);var oY=[];if(RegExp.$1){oY=RegExp.$1.split(",")}var oV=oM(o2.x,o2.y,oW);if(!oV){return null}oX=oX.replace(/\{(.*)\}/,oY[(o2.x+o2.y)%oY.length]);oX=oX.replace(/\[x\]/gi,oO(o2.x,o2.y,oW));oX=oX.replace(/\[y\]/gi,oT(o2.x,o2.y,oW));oX=oX.replace(/\[z\]/gi,oM(o2.x,o2.y,oW));oX=oX.replace(/\[b\]/gi,oS(o2.x,o2.y,oW))}else{return null}return oX};function e(oV){if(oU&&oU instanceof Array&&oU.length===4){if((oU[0]<=oV[2]&&oU[1]<=oV[3])&&(oU[2]>=oV[0]&&oU[3]>=oV[1])){return true}else{return false}}return true}return oP},compileExpress:function(i,e){var i=gg.ExpressParse.normalizePropertyExpression(i,e);return i},resolveStyle:function(oL){var T=oL||{};if(T.style){var oK={};if(!T.layers||T.layers.length===0){var oN=gg.LayerTypes.POINT;var i=gg.LayerTypes.LINE;var oM=gg.LayerTypes.FILL;if(T.style[oN]){T.style[oN].type="point"}if(T.style[i]){T.style[i].type="polyline"}if(T.style[oM]){T.style[oM].type="polygon"}}for(var C in T.style){if(T.style.hasOwnProperty(C)){var e=T.style[C];this._styleFormat(e.type,e.painter,C,oK)}}this.styleExpress=oK}},_styleFormat:function(oK,e,i,T){var oM={};var oN=eL[oK];if(!oN){return}for(var C in e){if(e.hasOwnProperty(C)){var oL=this.compileExpress(e[C],oN[C]);oM[C]=oL}}T[i]={type:oK,painter:oM}},evaluateContext:function(e,C,T){var i=e+"_"+C.getId();var oK=this._stateCube[i];if(oK){C.setState(oK)}else{C._state={}}return{properties:function(){return C&&C.getProperties()},featureState:T===true?{}:(C&&C.getState())}},evaluates:function(i,T,oK){if(!this.styleExpress||!this.styleExpress.hasOwnProperty(i)){return null}var oM=this.styleExpress[i].painter;var e={};for(var C in oM){if(oM.hasOwnProperty(C)){var oL=oM[C].evaluate(this.evaluateContext(i,T,oK));e[C]=oL}}return e},_updateState:function(C,T,e){if(C instanceof m9&&C.layerName&&C.id){var i=C.layerName+"_"+C.id;if(e){this._set(T,this._stateCube,i)}else{this._stateCube[i]=T}this._stateCube[i].rank=(this._stateCube[i].rank||0)+1}else{if(typeof C==="string"){if(e){this._set(T,this._stateCube,C)}else{this._stateCube[C]=T}this._stateCube[C].rank=(this._stateCube[C].rank||0)+1}}},updateState:function(oK,oL,e){var C=JSON.stringify(this._stateCube);if(!(oL&&typeof oL==="object"&&Object.keys(oL).length>0)){return}if(!e){this._stateCube={}}if(oK instanceof Array){for(var T=0;T<oK.length;T++){this._updateState(oK[T],oL,e)}}else{this._updateState(oK,oL,e)}var oM=JSON.stringify(this._stateCube);if(C!==oM){this.doOnceDraw()}},replaceAllState:function(e){var i=JSON.stringify(this._stateCube);this._stateCube=e;var C=JSON.stringify(this._stateCube);if(i!==C){this.doOnceDraw()}},getAllState:function(){return this._stateCube},getStateByLayerName:function(){},removeState:function(T){var e=JSON.stringify(this._stateCube);if(T instanceof Array){for(var C=0;C<T.length;C++){if(T[C] instanceof m9&&T[C].layerName){delete this._stateCube[T[C].layerName+"_"+T[C].id]}else{if(typeof T[C]==="string"){delete this._stateCube[T[C]]}}}}else{if(T instanceof m9&&T.layerName){delete this._stateCube[T.layerName+"_"+T.id]}else{if(typeof T==="string"){delete this._stateCube[T]}}}var oK=JSON.stringify(this._stateCube);if(e!==oK){this.doOnceDraw()}},clearState:function(){var e=JSON.stringify(this._stateCube);if(e!=="{}"){this._stateCube={};this.doOnceDraw()}},_set:function(i,oK,C){var T=oK[C]||(oK[C]={});for(var e in i){T[e]=i[e]}},doOnceDraw:function(){if(this.map){var e=new ix("onupdate");this.map.dispatchEvent(e)}},getLayerVisible:function(i){var C=this._opt.style;if(!C||!C[i]){return true}else{if(C[i].visible===false){return false}else{var oK=this._opt.style[i].minZoom||3;var e=this._opt.style[i].maxZoom||23;var T=this.map.getZoom();if(T<oK||T>e){return false}return true}}},_initEvent:function(oM){this.map=oM;if(!this.map.dispatcher){this.map.dispatcher=new eh(kG(),gg)}var oK=this;this.map.dispatcher.broadcast("setLayerStyle",oK.layerOption,function(oO,i){oK.upStyle=true;if(oK.loadModule){oK.doOnceDraw()}});var T=this;var e=false;this._layerMouseEvent=function(oQ){if(!T.map||!T._listeners){return}if(!T._listeners.onmousemove||Object.keys(T._listeners.onmousemove).length===0){return}var i;var oP=oQ.pointMC;var oO=T.pickFeatures(oP,oQ.pixel);if(oO&&oO.length>0){i=new ix("onmousemove");i.value=oO;T.map.platform.style.cursor=T.map.config.overlayMoveCursor;e=true}else{T.map.platform.style.cursor=T.map.config.defaultCursor;if(!e||!T._listeners.onmouseout||Object.keys(T._listeners.onmouseout).length===0){return}i=new ix("onmouseout");e=false}if(i){i.pointMC=oQ.pointMC;i.pixel=oQ.pixel;i.latLng=oQ.latlng;T.dispatchEvent(i)}};this._layerClickEvent=function(oQ){if(!T.map||!T._listeners){return}if((!T._listeners.onclick&&!T._listeners.dblclick)||(Object.keys(T._listeners.onclick).length===0&&Object.keys(T._listeners.dblclick).length===0)){return}var i;var oP=oQ.pointMC;var oO=T.pickFeatures(oP,oQ.pixel);i=new ix(oQ.type);i.pointMC=oP;i.pixel=oQ.pixel;i.latLng=oQ.latlng;i.value=oO;T.dispatchEvent(i)};oM.addEventListener("onmousemove",this._layerMouseEvent);var oL=["onclick","dblclick"];for(var C=0;C<oL.length;C++){var oN=oL[C];oM.addEventListener(oN,this._layerClickEvent)}oM.addEventListener("removetilelayer",function(i){if(i.target&&i.target.ontology){if(i.target.ontology===T){T.layer.tileCache.clear();T.stateCube={};T.upStyle=false;oM.removeEventListener("onmousemove",T._layerMouseEvent);oM.removeEventListener("onclick",T._layerClickEvent);oM.removeEventListener("ondblclick",T._layerClickEvent);if(oM.dispatcher){oM.dispatcher.broadcast("removeLayer",T.layerOption,function(oQ,oO){var oS=oM.tileMgr.tileLayers;var oP=false;for(var oR=0;oR<oS.length;oR++){if(oS[oR].ontology instanceof gg){oP=true;break}}if(!oP&&oM.dispatcher){oM.dispatcher.remove();oM.dispatcher=null}})}}}});oM.on("destroy",function(){if(T.map&&T.map.dispatcher){T.map.dispatcher.remove();T.map.dispatcher=null}T.layer.ontology=null;T.layer=null});this.addEventListener("onmousemove",function(){})},setStyle:function(e){this._opt.style=e;if(!this.map||!this.loadModule){return}this.resolveStyle(this._opt);var i=this;if(this.upStyle===true){this.map.dispatcher.stop();this.map.dispatcher.broadcast("stop",null,function(T,C){i.layerOption=Object.assign(i.layerOption,i._opt);i.map.dispatcher.broadcast("setLayerStyle",i.layerOption,function(oL,oK){i.layer.tileCache.clear();i.doOnceDraw()})})}else{i.layer.tileCache.clear();i.doOnceDraw()}},setZIndex:function(e){if(this.layer&&parseInt(e)>0){this.layer.setZIndex(e)}},getZIndex:function(){if(this.layer){return this.layer.zIndex}},setZIndexTop:function(){if(this.layer){this.layer.setZIndexTop()}},setUpLevel:function(){if(this.layer){var e=this.layer._getAdjoinZIndex("up");if(this.layer.zIndex!==e){this.layer.setZIndex(e)}}},setDownLevel:function(){if(this.layer){var e=this.layer._getAdjoinZIndex("down");if(this.layer.zIndex!==e){this.layer.setZIndex(e)}}},toString:function(){return"MVTLayer"},_loadTile:function(e){this.curViewTilesInfo=e;this._pendingTile=arguments},_onImplReady:function(){this._implReady=true;var e=this._pendingTile;this._pendingTile=null;if(e){this._loadTile.apply(this,e)}},intersectFeatures:function(){return null},pickFeatures:function(){return null}});gg._generateTexture=function(oM,oL,C){var oK=document.createElement("canvas");var e;var T;if(oL.strokeStyle==="dashed"){e=16;T=e*8}else{if(oL.strokeStyle==="dotted"){e=32;T=e*2}}oK.width=e;oK.height=T;var i=oK.getContext("2d");i.fillStyle=oL.strokeColor;i.globalAlpha=oL.strokeOpacity;var oN=oL.strokeWeight*2;if(oL.strokeStyle==="dashed"){oN=gg._drawDashArrayTexture(i,e,T,oL)}else{if(oL.strokeStyle==="dotted"){oN=gg._drawDottedTexture(i,e,T,oL.strokeWeight)}}if(window.createImageBitmap&&!oL.sync){createImageBitmap(oK,{imageOrientation:"flipY"}).then(function(oO){C(null,{totalDashLen:oN,texture:oO,textureSize:[e,T]})})}else{C(null,{totalDashLen:oN,texture:oK.toDataURL(),textureSize:[e,T]})}};gg._drawDashArrayTexture=function(oP,T,oL,C){var oN=C.dashArray;if(!oN){oP.fillRect(0,0,T,oL/2);return C.strokeWeight*4}else{var oO=0;if(oN.length%2!==0){oN=oN.concat(oN)}for(var oK=0;oK<oN.length;oK++){oO+=oN[oK]}var e=0;for(var oK=0;oK<oN.length;oK++){var oM=oN[oK]/oO*oL;if(oK%2===0){oP.fillRect(0,e,T,oM)}e+=oM}return oO}};gg._drawDottedTexture=function(i,e,C,T){i.beginPath();i.arc(e/2,e/2,e/2,0,2*Math.PI);i.fill();i.closePath();return T*2};function fl(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("BaiduVectorLayer")}this._opt=e||{};this._layerId=eR();this.minZoom=this._opt.minZoom||3;this.maxZoom=this._opt.maxZoom||23;this.showLabel=this._opt.showLabel!==false;if(this._opt.displayOptions&&this._opt.displayOptions.poi===false){this.showLabel=false}this._url=this._opt.url||"";this._visible=true;this._workerStyleMap=this._buildWorkerStyleMap(this._opt.styleMap);this._displayOptions=this._opt.displayOptions||null;this.init(this._opt);this._pendingTile=null;var i=this;ki.load("layer",function(){i._asyncReplay()},true)}fl.inherits(hv.BaseClass,"BaiduVectorLayer");fl.prototype.isTileLayer=true;hv.extend(fl.prototype,{init:function(oL){var C=c9()?64:256;var oM=Math.max(oL.cacheSize||C,16);var oK=oL.spanLevel||0;var i=new kT({transparentPng:true,dataType:2,spanLevel:oK,tileTypeName:"na",cacheSize:oM,customLayer:true,clipTile:false,boundary:false,opacity:typeof oL.opacity==="number"?oL.opacity:1,useThumbData:oL.useThumbData||false,thumbUpsample:oL.thumbUpsample||false});if(oL.zIndex){i.zIndex=oL.zIndex}i.showLabel=this.showLabel;var e=this;i.loadTileData=function(){return e._loadTile.apply(e,arguments)};i.ontology=this;this.layer=i;var T=this;i.addEventListener("ontilesloadstart",function(){T.dispatchEvent(new ix("ontilesloadstart"))});i.addEventListener("ontilesloadend",function(){T.dispatchEvent(new ix("ontilesloadend"))})},_buildWorkerStyleMap:function(oM){if(!oM){return null}function oL(oO,oP){var oQ=[0,255,0,255];if(typeof oO==="string"&&oO.charAt(0)==="#"){var oR=oO.substring(1);if(oR.length===3){oR=oR.charAt(0)+oR.charAt(0)+oR.charAt(1)+oR.charAt(1)+oR.charAt(2)+oR.charAt(2)}oQ=[parseInt(oR.substring(0,2),16),parseInt(oR.substring(2,4),16),parseInt(oR.substring(4,6),16),255]}else{if(oO instanceof Array){oQ=[oO[0]||0,oO[1]||0,oO[2]||0,oO.length>3?oO[3]:255]}}if(typeof oP==="number"){oQ[3]=Math.round(Math.max(0,Math.min(1,oP))*255)}return oQ}var e={};var T=false;for(var i in oM){if(!oM.hasOwnProperty(i)){continue}var C=oM[i]||{};var oK=typeof C.strokeWeight==="number"?C.strokeWeight:2;var oN=typeof C.borderWeight==="number"?C.borderWeight:0;e[i]={borderCap:1,borderRgba:oL(C.borderColor||[0,0,0,255]),borderTexture:"",borderTextureType:null,borderWidth:oN*2,fillCap:0,fillRgba:oL(C.strokeColor,C.strokeOpacity),fillTexture:"",fillTextureType:null,fillWidth:oK*2,haveArrow:null,haveBorderLine:oN>0?1:0,haveBorderTexture:0,haveFillTexture:0,isRealWidth:null,isUseBorderRgba:1,isUseFillRgba:1};T=true}return T?e:null},show:function(){this._visible=true;if(this.layer){this.layer.show&&this.layer.show()}},hide:function(){this._visible=false;if(this.layer){this.layer.hide&&this.layer.hide()}},setOpacity:function(e){if(this.layer){this.layer.setOpacity&&this.layer.setOpacity(e)}},getOpacity:function(){if(this.layer){return this.layer.getOpacity?this.layer.getOpacity():1}return 1},destroy:function(){if(this.layer){if(this.layer.processDataTimer){clearTimeout(this.layer.processDataTimer);this.layer.processDataTimer=null}this.layer.callbackDataQueue=[];var e=this.layer.map;if(e){e.removeTileLayer(this)}this.layer.ontology=null;this.layer.loadTileData=null;this.layer=null}},_loadTile:function(){this._pendingTile=arguments},_asyncReplay:function(){var e=this._pendingTile;this._pendingTile=null;if(e){this._loadTile.apply(this,e)}}});var ai=function(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("BaiduLayer")}var i=i||{};this.inputCRS=i.inputCRS||"EPSG3857";this.outCRS=i.outCRS||"EPSG3857";this.minZoom=i.minZoom||3;this.maxZoom=i.maxZoom||19;this.retry=i.retry||false;this.retryTime=i.retryTime||600;this.useThumbData=i.useThumbData||true;this.lastZoom=3;this.cacheSize=i.cacheSize||128;this.tileType=lA.getInstance("web");this._mapCenter={};this._featureMgr=[[],[],[]];this._gridRefs={row:{},col:{}};this.tileCache=new a1(this.cacheSize,{clearCallback:function(C){}});this._queryList=[];var e=this;ki.load("layer",function(){e._asyncReplay()},true)};ai.inherits(eX,"BaiduLayer");hv.extend(ai.prototype,{clearData:function(){this._featureMgr=[[],[],[]]},clearRefs:function(){this._gridRefs={row:{},col:{}}},destroy:function(){this.tileCache.clear();this.clearData();this.clearRefs();this._mapCenter={}},fetch:function(){this._queryList.push({method:"fetch",arguments:arguments})},_asyncReplay:function(){var C=this._queryList||[];this._queryList=[];for(var e=0;e<C.length;e++){this[C[e].method].apply(this,C[e].arguments)}}});function fw(T,C){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("CustomHtmlLayer")}bw.call(this,C);if(!c2(T)){throw new Error("createDOM鍙傛暟绫诲瀷閿欒锛岃妫�鏌ユ槸鍚︿负Function")}var e=C||{};this.config={};this.config.enableMassClear=false;this.config.minZoom=e.minZoom||3;this.config.maxZoom=e.maxZoom||21;this.config.zIndex=e.zIndex||0;this.config.nextTick=e.nextTick||false;this.config.offsetX=e.offsetX||0;this.config.offsetY=e.offsetY||0;this.config.fixBottom=e.fixBottom||false;this.config.anchors=e.anchors||[0.5,1];this.config.coordinate=e.coordinate||"BD09";this.config.enableDraggingMap=e.enableDraggingMap||false;this.config.visible=e.visible===undefined?true:!!e.visible;this.config.useTranslate=e.useTranslate||false;this.sliceRepeat=e.sliceRepeat||false;this.displayType=e.displayType||"normal";this.clusterAnimation=e.clusterAnimation||{};this.clusterWait=null;this.clusterStatus=0;this.createDOM=T;this.data=e.data||null;this.overlaysList=[];this.retainOverlays=[];this._eventList={};this._queryList=[];var i=this;ki.load("layer",function(){i._asyncReplay()},true)}fw.inherits(eX,"CustomHtmlLayer");fw.prototype.isCustomHtmlLayer=true;hv.extend(fw.prototype,{initialize:function(i){this.map=i;this.addToMap();this.initEvent(i);var e=this;this.map.on("destory",function(){e._distory()})},initEvent:function(){if(!this.overlaysList||!this.map){return}this._overlayEvent()},setStyleOptions:function(e){e=e||{};Object.assign(this.config,e);this.updateData(this.data)},addEventListener:function(e,i){if(!this._eventList[e]){this._eventList[e]=[i]}else{this._eventList[e].push(i)}this._overlayEvent()},_overlayEvent:function(){if(!this.overlaysList||!this.map){return}var oO=this.overlaysList;var e=this.overlaysList.length;var oN=Object.keys(this._eventList);for(var oM=0;oM<oN.length;oM++){var T=oN[oM];var oL=this._eventList[T];for(var oK=0;oK<oL.length;oK++){for(var C=0;C<e;C++){oO[C].addEventListener(T,oL[oK])}}}if(this.sliceRepeat&&this.retainOverlays.length>0){this.overlaysList=this.overlaysList.concat(this.retainOverlays);this.retainOverlays=[]}},show:function(){this.config.visible=true;this.updateData(this.data)},hide:function(){this.config.visible=false;this.updateData(this.data)},addToMap:function(){if(!this.overlaysList||!this.map){return}var e=this.overlaysList.length;var T=this.overlaysList;if(e>0){for(var C=0;C<e;C++){this.map.addOverlay(T[C])}}},clearData:function(){this.removeAllOverlays();this.data=null},updateData:function(e){this.removeAllOverlays();this.data=null;this.setData(e)},removeLayer:function(C){if(!(C instanceof fw)||!this.map){return}var T=C.overlaysList;for(var e=0;e<T.length;e++){this.map.removeOverlay(T[e])}this._distory(C)},removeAllOverlays:function(){if(!this.map||!this.overlaysList){return}var C=this.overlaysList;for(var e=0;e<C.length;e++){this.map.removeOverlay(C[e])}this.overlaysList=[]},removeOverlay:function(C){if(!this.map||!(this.overlaysList)||this.overlaysList.length<=0){return}var e=this.overlaysList.length;var oK=this.overlaysList;if(typeof C==="string"){for(var T=0;T<e;T++){if(oK[T].id===C){this.map.removeOverlay(oK[T]);oK.splice(T,1)}}}else{if(C instanceof bw){for(var T=0;T<e;T++){if(C===oK[T]){this.map.removeOverlay(C);this.overlaysList.splice(T,1);return}}}}},_distory:function(){var C=this.overlaysList;for(var e=0;e<C.length;e++){C[e].div=null}this.overlaysList=[];this.createDOM=null;this.config=null;this.data=null},getCustomOverlays:function(){return this.overlaysList},toString:function(){return"CustomHtmlLayer"},setData:function(){this._queryList.push({method:"setData",arguments:arguments})},_asyncReplay:function(){var C=this._queryList||[];this._queryList=[];for(var e=0;e<C.length;e++){this[C[e].method].apply(this,C[e].arguments)}}});function l2(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("ParkingSpot")}bw.call(this,i);var i=i||{};this.options={};this.options.callback=i.callback?i.callback:null;this._auth=false;this._remove=false;this.currentFloor=i.floor||1;this.currentFloorName="B1";this.currentFloorKV=[];this.currentFloorStr="";this.currentUid="";this.currentCityId=0;this.floorsCache=[];this.spotFillCache=[];this.spotFillLayer;this.spotFillData=[];this.spotOutFillLayer;this.spotOutFillData=[];this.cusInLabelUids=[];this.cusInBubbleUids=[];this.cusOutLabelUids=[];this.cusOutBubbleUids=[];this.labels=[];this.labelDatas=[];this.outLabels=[];this.outLabelDatas=[];this.bubbleDatas=[];this.jixieDatas=[];this.indoorUids;this.outdoorUids;this.indoorChange=true;this.cityChange=true;this._queryList=[];var e=this;ki.load("layer",function(){e._asyncReplay()},true)}l2.inherits(eX,"ParkingSpot");hv.extend(l2.prototype,{initialize:function(e){this.map=e;this.map.parking=this;this._verify()},removeParkingSpot:function(){if(this.spotFillLayer){this.map._removeNormalLayer(this.spotFillLayer);this.spotFillLayer=null;this.spotFillData=[]}if(this.spotOutFillLayer){this.map._removeNormalLayer(this.spotOutFillLayer);this.spotOutFillLayer=null;this.spotOutFillData=[]}if(this.cusOutLabelUids){this.map.removeLabelsFromMapTile(this.cusOutLabelUids);this.cusOutLabelUids=[]}if(this.cusOutBubbleUids){this.map.removeLabelsFromMapTile(this.cusOutBubbleUids);this.cusOutBubbleUids=[]}if(this.cusInLabelUids){this.map.removeLabelsFromMapTile(this.cusInLabelUids);this.cusInLabelUids=[]}if(this.cusInBubbleUids){this.map.removeLabelsFromMapTile(this.cusInBubbleUids);this.cusInBubbleUids=[]}this.spotFillCache=[];this.floorsCache=[];this._remove=true},hideLayer:function(e){if(e==="indoor"&&this.spotFillLayer){var i=this._parseParkingData([]);this.spotFillLayer.setData(i)}else{if(e==="outdoor"&&this.spotOutFillLayer){var i=this._parseParkingData([]);this.spotOutFillLayer.setData(i)}}},hideLabel:function(){if(this.cusInLabelUids){this.map.removeLabelsFromMapTile(this.cusInLabelUids)}if(this.cusInBubbleUids){this.map.removeLabelsFromMapTile(this.cusInBubbleUids)}},showLayer:function(e){if(e==="indoor"&&this.spotFillLayer){var i=this._parseParkingData([]);this.spotFillLayer.setData(i)}else{if(e==="outdoor"&&this.spotOutFillLayer){}}},searchParkingRoute:function(C,e,i){if(!this.auth){return}},toString:function(){return"ParkingSpot"},_verify:function(){this._queryList.push({method:"_verify",arguments:arguments})},_asyncReplay:function(){var C=this._queryList||[];this._queryList=[];for(var e=0;e<C.length;e++){this[C[e].method].apply(this,C[e].arguments)}}});function dQ(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("NormalLayer")}e=e||{};this.visible=(e.visible===undefined?true:!!e.visible);this.minZoom=e.minZoom||3;this.maxZoom=e.maxZoom||21;this.opacity=isNaN(Number(e.opacity))?1:Math.max(0,Math.min(1,Number(e.opacity)));this.zIndex=e.zIndex||1;this.enablePicked=e.enablePicked||false;this.supportMouseStyleChange=(e.mouseStyleChange===undefined?true:!!e.mouseStyleChange);this.autoSelect=e.autoSelect||false;this.popEvent=e.popEvent===undefined?true:!!e.popEvent;this.autoUpdate=false;this.pickWidth=e.pickWidth||30;this.pickHeight=e.pickHeight||30;this.center=e.referCenter||null;this.isTop=e.isTop||false;this.isLowText=e.isLowText||false;this.guid=cv.getGUID("normal_layer_")}dQ.inherits(eX,"NormalLayer");dQ.prototype.isNormalLayer=true;hv.extend(dQ.prototype,{onInit:function(T,oK){if(this.zIndex>0){this.adjustZIndex(T);T._normalLayerMgr.sortLayer()}else{var e=T._featureMgr.result.bkData;this.zIndex=e.length||1}var C={tileTypeName:this.getType?this.getType():"custom",dataType:this.toString(),ontology:this};T._featureMgr.createLayer(this.zIndex,C);this.map=T;this.gl=oK;this.onAdd(T,oK);var i=this;T.on("destroy",function(){i.onDestroy()})},adjustZIndex:function(i){if(i&&i._featureMgr){var e=i._featureMgr.result.bkData;while(e[this.zIndex]){this.zIndex+=1}}},_getAdjoinZIndex:function(oK){var C=this.zIndex;if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;if(oK==="up"){for(var T=this.zIndex+1;T<e.length;T++){if(e[T]){C=T+1;break}}}else{for(var T=this.zIndex-1;T>0;T--){if(e[T]){C=T;break}}}}return C},setTargetZIndex:function(e){this.zIndex=e;if(this.map){this.map._normalLayerMgr.sortLayer()}},setZIndex:function(oN){oN=Math.abs(Math.floor(oN))||1;if(!oN||oN===this.zIndex){return}var oK=this.map._featureMgr.result.bkData;var T=this.map.tileMgr.tileLayers;var oP=this.map._normalLayerMgr.layers;function oQ(oV){var oT=null;var oU=[T,oP];for(var oR=0;oR<oU.length;oR++){for(var oS=0;oS<oU[oR].length;oS++){if(oU[oR][oS].zIndex===oV){oT=oU[oR][oS];break}}if(oT){break}}return oT}var C=[];var oM=[];var oO=this.zIndex;var i=oQ(oN);if(oK[oN]&&i){C.push(i);oM.push(oK[oN]);this.setTargetZIndex(oN);oK[oN]=oK[oO];oK[oO]=null}else{this.setTargetZIndex(oN);oK[oN]=oK[oO];oK[oO]=null;this.doOnceDraw();return}var oL=oN+1;while(oL){var e=oQ(oL);if(oK[oL]&&e){C.push(e);oM.push(oK[oL]);C.shift().setTargetZIndex(oL);oK[oL]=oM.shift();oL+=1}else{C.shift().setTargetZIndex(oL);oK[oL]=oM.shift();oL=0}}this.doOnceDraw()},setRefCenter:function(e){if(e instanceof d9){this.center=e;this.parseData&&this.parseData(e)}},getRefCenter:function(){return this.center},setTop:function(e){this.isTop=!!e;this.doOnceDraw()},setLowText:function(e){this.isLowText=!!e;this.doOnceDraw()},setOpacity:function(e){if(isNaN(Number(e))){return}this.opacity=Math.max(0,Math.min(1,Number(e)));this.doOnceDraw()},getOpacity:function(){return this.opacity},setZIndexTop:function(){var e=this.map._featureMgr.result.bkData;e[e.length]=e[this.zIndex];e[this.zIndex]=null;this.setTargetZIndex(e.length-1);this.doOnceDraw()},setUpLevel:function(){var e=this._getAdjoinZIndex("up");if(this.zIndex!==e){this.setZIndex(e)}},setDownLevel:function(){var e=this._getAdjoinZIndex("down");if(this.zIndex!==e){this.setZIndex(e)}},onAdd:function(e,i){throw new Error("鐢ㄦ埛鏈疄鐜皁nAdd鏂规硶")},preRender:function(i,e){},rgbToIndex:function(oK){var oN=oK.length/4;var T=Math.floor(oN/2);const C=function(oP){return oK[oP]+oK[oP+1]*256+oK[oP+2]*65536-1};for(var oM=0;;oM++){var oL=T+oM;var oO=T-oM;if(oL===oO){var e=C(oL*4);if(e>-1){return e}continue}if(oL<oN){var e=C(oL*4);if(e>-1){return e}}if(oO>=0){var e=C(oO*4);if(e>-1){return e}}if(oL>=oN&&oO<0){break}}return -1},testEvent:function(e){if(this.autoSelect){return true}if(this.enablePicked&&(this.supportMouseStyleChange||(e!=="onmousemove"&&!this.supportMouseStyleChange))){return true}return false},pick:function(oN,oM,T){var C=this.gl;var oO=this.map.config.ratio;this.map._normalLayerMgr.saveFramebuffer();this.map._normalLayerMgr.bindFramebuffer(this.map._normalLayerMgr.pickFBO);this.map._normalLayerMgr.clear();this.map._webglPainter._camera._updatePolyLayerMatrix(this.center);var i=this.map._webglPainter._camera._modelViewMatrixLayer;var oL=gc.create(Float64Array);gc.multiply(oL,this.map._webglPainter.projMatrix,i);this.render(C,oL,{isPickRender:true});var e=new Uint8Array(4*this.pickWidth*this.pickHeight);C.readPixels(oN*oO-Math.floor(this.pickWidth/2),C.canvas.height-oM*oO-Math.floor(this.pickHeight/2),this.pickWidth,this.pickHeight,C.RGBA,C.UNSIGNED_BYTE,e);var oK=this.rgbToIndex(e);if(this.getPickedItem){var oP=this.getPickedItem(oK,T)}this.map._normalLayerMgr.restoreFramebuffer();return oP},render:function(C,e,i){throw new Error("鐢ㄦ埛鏈疄鐜皉ender鏂规硶")},afterRender:function(i,e){},onDestroy:function(e,i){},onHide:function(e,i){},onShow:function(e,i){},doOnceDraw:function(){if(this.map){var e=new ix("onupdate");this.map.dispatchEvent(e)}},doRender:function(){if(!this.map){return false}var e=this.map.getZoom();if(this.visible){if(e>=this.minZoom&&e<=this.maxZoom){if(!this._status){this.onShow(this.map,this.gl);this._status=1}return true}}if(this._status){this.onHide(this.map,this.gl);this._status=0}return false},getZIndex:function(){if(this.zIndex===undefined){throw new Error("鍥惧眰鏈坊鍔犲埌鍦板浘")}return this.zIndex},getVisible:function(){return this.visible},setVisible:function(e){this.visible=e;this.doOnceDraw()},getMinZoom:function(){return this.minZoom},setMinZoom:function(e){if(e<=this.maxZoom){this.minZoom=e}},getMaxZoom:function(){return this.maxZoom},setMaxZoom:function(e){if(e>=this.minZoom){this.maxZoom=e}},dispatcher:function(oK,T,C){var i=new ix(C);i.pixel=oK.pixel;i.latLng=oK.latlng;i.value=T;this.dispatchEvent(i)},hasEvent:function(e){if(this.enablePicked){if(e.substr(0,2)!=="on"){e+="on"}if(this._listeners&&this._listeners[e]&&Object.keys(this._listeners[e]).length>0){return true}return false}return false},toString:function(){return"normal"}});function jZ(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("ThreeLayer")}i=i||{};const e={alpha:false,antialias:false};this.options=Object.assign({},e,i);if(!window.THREE){throw new Error("ThreeLayer requires THREE")}this._unsetlist=[];this._added=false;this._implReady=false;this._inited=false;dQ.call(this,this.options);var C=this;ki.load("visualold",function(){C._onImplReady()},true)}jZ.inherits(dQ,"ThreeLayer");hv.extend(jZ.prototype,{triggerRepaint:function(){this.needsUpdate=true;this.animate()},triggerStop:function(){this.needsUpdate=false},animate:function(){if(this.needsUpdate){this.doOnceDraw()}else{return}var e=this;this.frameTimer=requestAnimationFrame(function(){e.animate()})},refreshMap:function(){if(this.map){this.doOnceDraw()}},convertLngLat:function(e){this.customCoords.setCenter(this.center);const i=this.customCoords.lngLatsToCoords([e]);return i[0]},add:function(e){if(!this.scene){this._unsetlist.push(e);return}this.scene.add(e);this.refreshMap()},remove:function(e){if(!this.scene){var C=this._unsetlist.indexOf(e);if(C>=0){this._unsetlist.splice(C,1)}return}this.scene.remove(e);this.refreshMap()},getScene:function(){return this.scene},getCamera:function(){return this.camera},getRender:function(){return this.renderer},getMap:function(){if(this.map){return this.map}return null},onAdd:function(i,e){this.map=i;this.gl=e;this.customCoords=i.toFormatCoords;this._added=true;this._tryInit()},_onImplReady:function(){this._implReady=true;this._tryInit()},_tryInit:function(){if(this._implReady&&this._added&&!this._inited&&this._initImpl){this._inited=true;this._initImpl(this.gl)}},preRender:function(){},afterRender:function(){},render:function(){},onDestroy:function(){},onHide:function(){},onShow:function(){},pick:function(){return null}});function f8(e){e=e||{};dQ.call(this,e);this.base_opt={idKey:"id",crs:"BD09LL",isFlat:true,drawPart:1,selectedIndex:-1,selectedColor:"rgba(20, 20, 200, 1.0)",enableChangeSelectIndexByPick:true,};this.setBaseOptions(e);this.loadModule=false;this._stateCube={};this.def=[];this.DEL_COUNT=20;this.delIndexs=[];var i=this;ki.load("visualold",function(){i._async()},true);this.select_color=this.getColorStyleForGL(this.base_opt.selectedColor);var C=new Int8Array(4);this.int32View=new Int32Array(C.buffer,0,1);this.float32View=new Float32Array(C.buffer,0,1)}f8.inherits(dQ,"FeatureLayer");hv.extend(f8.prototype,{_async:function(){this.loadModule=true;this.resolveStyle();this.parseData()},compileExpress:function(i,e){var i=gg.ExpressParse.normalizePropertyExpression(i,e);return i},resolveStyle:function(){if(!gg.ExpressParse){return}var e=this.style_opt||{};var T=eL[this.type];if(this._appendStyle){T=JSON.parse(JSON.stringify(T));Object.assign(T,this._appendStyle)}if(e&&this.type&&T){var C={};for(var i in e){var oL=T[i];if(e.hasOwnProperty(i)&&oL!==undefined){var oK=this.compileExpress(e[i],oL);C[i]=oK}}this.styleExpress=C}},_updateState:function(C,i,e){if(e){this._set(i,this._stateCube,C)}else{this._stateCube[C]=i}},_set:function(i,oK,C){var T=oK[C]||(oK[C]={});for(var e in i){T[e]=i[e]}},updateState:function(oK,oL,e){var C=JSON.stringify(this._stateCube);if(!(oL&&typeof oL==="object"&&Object.keys(oL).length>0)){return}if(!e){this._stateCube={}}if(oK instanceof Array){for(var T=0;T<oK.length;T++){this._updateState(oK[T],oL,e)}}else{this._updateState(oK,oL,e)}var oM=JSON.stringify(this._stateCube);if(C!==oM){this.parseData()}if(this.attach){this.attach.updateState(oK,oL,e)}},replaceAllState:function(e){var i=JSON.stringify(this._stateCube);this._stateCube=e;var C=JSON.stringify(this._stateCube);if(i!==C){this.parseData()}},getAllState:function(){return this._stateCube},removeState:function(T){var e=JSON.stringify(this._stateCube);if(T instanceof Array){for(var C=0;C<T.length;C++){delete this._stateCube[T[C]]}}else{delete this._stateCube[T]}var oK=JSON.stringify(this._stateCube);if(e!==oK){this.parseData()}},clearState:function(){var e=JSON.stringify(this._stateCube);if(e!=="{}"){this._stateCube={};this.parseData()}},getType:function(){return"feature"},setData:function(C,oK){if(C.length<=0){return}this.params=oK=oK||{};this.data=C;this.delIndexs=[];this._stateCube={};if(oK.changeCenter&&C&&C.features&&C.features[0]){var e=C.features[0];var oL=null;if(e.geometry&&e.geometry.type==="Point"){oL=e.geometry.coordinates}if(e.geometry&&e.geometry.type==="LineString"){var T=e.geometry.coordinates[0];if(T instanceof Array){oL=T}}if(e.geometry&&(e.geometry.type==="MultiLineString"||e.geometry.type==="Polygon")){var i=e.geometry.coordinates[0];if(i&&i[0] instanceof Array){oL=i[0]}}if(oL){if(this.base_opt.crs==="BD09LL"){this.center=new d9(oL[0],oL[1])}else{oL=fU.transform(oL,this.base_opt.crs,fU.BD09LL);this.center=new d9(oL[0],oL[1])}}}this.parseData&&this.parseData(this.center)},getData:function(){return this.data},clearData:function(){this.data=null;this.buffer=null;if(this.attach){this.attach.clearData()}this.doOnceDraw()},addDelIndex:function(C){if(this.delIndexs.length>=this.DEL_COUNT){new Error("瓒呭嚭"+this.DEL_COUNT+"涓檺鍒�")}var e=false;for(var T=0;T<this.delIndexs.length;T++){if(this.delIndexs[T]===C){e=true;break}}if(!e){this.delIndexs.push(C);this.doOnceDraw()}if(this.attach){this.attach.addDelIndex(C)}},removeDelIndex:function(e){for(var C=0;C<this.delIndexs.length;C++){if(this.delIndexs[C]===e){this.delIndexs.splice(C,1);this.doOnceDraw();break}}if(this.attach){this.attach.removeDelIndex(e)}},clearDelIndex:function(){this.delIndexs=[];this.doOnceDraw();if(this.attach){this.attach.clearDelIndex()}},setBaseOptions:function(i){i=i||{};var e=Object.assign({},this.getBaseOptions());Object.assign(this.base_opt,i);this.onOptionsChanged&&this.onOptionsChanged(this.getBaseOptions(),e);if(i.data){this.setData(i.data);delete i.data}},setStyleOptions:function(i){i=i||{};var e=Object.assign({},this.getStyleOptions());Object.assign(this.style_opt,i);this.onOptionsChanged&&this.onOptionsChanged(this.getStyleOptions(),e);if(i.data){this.setData(i.data);delete i.data}else{if(i.autoRender!==false){this.resolveStyle();this.parseData()}}},getBaseOptions:function(){var e=this.base_opt||{};switch(cv.coordType){case 2:this.base_opt.crs="GCJ02";break;case 5:this.base_opt.crs="WGS84";break;default:this.base_opt.crs="BD09LL";break}return e},getStyleOptions:function(){return this.style_opt||{}},getProperty:function(e,T,C){if(Object.prototype.toString.call(T)==="[object Function]"){return T(C)}else{var i=C[e]||T;if("properties" in C&&e in C.properties){i=C.properties[e]}return i}},getPickedItem:function(i,e){if(this.autoSelect){if(e==="onmousemove"){this.selectedIndex=i}else{this.selectedIndex=-1}}if(e==="onclick"&&this.enablePicked&&this.base_opt.enableChangeSelectIndexByPick){this.selectedIndex=i}var C=this.dataset?this.dataset.normal:[];return{dataIndex:i,dataItem:C[i]}},getColorStyleForGL:function(T,e,C){var i=k0.formatColorCssToRgbaArray(T,e,C);return i},drawLinearTexture:function(C){if(!C||!(C instanceof Array)){return null}var T=document.createElement("canvas");T.width=Math.pow(2,9);T.height=2;var e=T.getContext("2d");var oL=e.createLinearGradient(0,0,T.width,0);for(var oK=0;oK<C.length;oK++){oL.addColorStop(C[oK][0],C[oK][1])}e.fillStyle=oL;e.fillRect(0,0,T.width,T.height);return T},onDestroy:function(){this.data=null;this.params={};this._stateCube={};this.delIndexs.length=0},toString:function(){return"FeatureLayer"},parseData:function(){}});function c3(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("LineLayer")}i=i||{};this.type="polyline";var C=K.uiVersionIsGL()?"rgba(25, 25, 250, 1)":fq().strokeColor;var e=K.uiVersionIsGL()?"rgba(27, 142, 236, 1)":fq().strokeColor;this.style_opt={sequence:false,marginLength:16,traceControl:null,traceColor:[],traceDisappear:false,traceStart:true,linksLine:false,strokeColorControl:null,verticesValueControl:null,arrowColor:"rgba(255, 255, 255, 1)",strokeColor:C,strokeWeight:2,borderCovered:true,borderColor:e,borderWeight:0,borderMask:true,strokeOpacity:1,strokeLineJoin:"round",strokeLineCap:"square",strokeTextureUrl:"",strokeTextureWidth:16,strokeTextureHeight:16,strokeStyle:"solid",dashArray:[8,4],height:0,strokeDisappear:false,};this._appendStyle={height:{format:"number",defaultValue:0},};this.setStyleOptions(i.style||{});this._bufferArray=[];this._texture={};this._length={};this.linearTexture=null;i.isLinear=i.isLinear===undefined?false:i.isLinear;i.linearTexture=i.linearTexture===undefined?null:i.linearTexture;i.nodeShow=i.nodeShow===undefined?false:i.nodeShow;i.linkLine=i.linkLine===undefined?true:i.linkLine;i.nodeMask=i.nodeMask===undefined?false:i.nodeMask;i.nodeStrict=i.nodeStrict===undefined?false:i.nodeStrict;i.nodeJoin=i.nodeJoin===undefined?5:i.nodeJoin;i.nodeBreakpoint=i.nodeBreakpoint===undefined?false:i.nodeBreakpoint;i.nodeMiddleShow=i.nodeMiddleShow===undefined?false:i.nodeMiddleShow;i.nodeMinZoom=(!i.nodeMinZoom||i.nodeMinZoom<3||i.nodeMinZoom>25)?6:i.nodeMinZoom;this.arrow_color=this.getColorStyleForGL(this.style_opt.arrowColor,null,false);f8.call(this,i);if(i.nodeShow){var oK=JSON.parse(JSON.stringify(i));oK=Object.assign(oK,{enablePicked:false,autoSelect:false,coorSysMc:true});this.attachNode=new bD(oK)}if(i.nodeStrict){var T=this;ki.load("mvtParse",function(){T.parseData()},true)}}c3.Segment={START_POINT:1,END_POINT:2,BREAK_POINT:3,MIDDLE_POINT:4,1:1,2:2,3:3,4:4};c3.inherits(f8,"LineLayer");hv.extend(c3.prototype,{onAdd:function(C,T){if(this.attachNode){this.attachNode.onAdd(C,T)}if(!this.map){this.map=C;this.gl=T}if(this.base_opt.isLinear&&this.base_opt.linearTexture){var i=this.drawLinearTexture(this.base_opt.linearTexture);if(i instanceof HTMLCanvasElement||(window.ImageBitmap&&textureName instanceof window.ImageBitmap)){if(!this.linearTexture){var e=fV.utils.createTexture(T,i,{flipY:false,wrap:T.CLAMP_TO_EDGE,mipmap:true,unpackAlpha:true});this.linearTexture=e}}}if(!this.buffer){this.parseData()}},preRender:function(C,i,e){},onDestroy:function(e,i){this.lines=null;this.buffer=null;this._bufferArray=[];this._texture={};f8.prototype.onDestroy.call(this);if(this.attachNode){this.attachNode.onDestroy()}},toString:function(){return"LineLayer"},render:function(){}});function f7(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("FillLayer")}i=i||{};this.type="polygon";var e=K.uiVersionIsGL()?"#142655":fq().fillColor;this.style_opt={fillColor:e,fillOpacity:1,pattern:false,patternMask:true,patternUrl:"",patternMapping:"0, 0, 32, 32",patternScale:1,patternOffset:"0, 0",height:0};this._appendStyle={height:{format:"number",defaultValue:0},};this.setStyleOptions(i.style||{});this._bufferArray=[];this._texture=null;f8.call(this,i);i.border=i.border===undefined?true:i.border;if(i.border){var C=JSON.parse(JSON.stringify(i));C=Object.assign(C,{enablePicked:false,autoSelect:false});this.attach=new c3(C)}}f7.inherits(f8,"FillLayer");hv.extend(f7.prototype,{onAdd:function(e,i){if(this.attach){this.attach.onAdd(e,i)}if(!this.map){this.map=e;this.gl=i}if(!this.buffer){this.parseData()}},preRender:function(C,i,e){},onDestroy:function(e,i){this.fills=null;this.buffer=null;this._bufferArray=[];this._texture=null;f8.prototype.onDestroy.call(this);if(this.attach){this.attach.onDestroy()}},toString:function(){return"FillLayer"},render:function(){}});function bD(i){i=i||{};this.type="point";var e=K.uiVersionIsGL()?{color:"green",strokeColor:"red"}:{color:fq().fillColor,strokeColor:fq().strokeColor};this.style_opt={visibility:true,nodeType:bD.NodeType.SHAPE,shapeType:bD.ShapeType.TRIANGLE,anchor:bD.Anchor.CENTER,size:32,scale:1,rotation:0,offset:[0,0],color:e.color,opacity:1,strokeColor:e.strokeColor,strokeWeight:0};this.setStyleOptions(i.style||{});this._bufferArray=[];i.isFlat=i.isFlat===undefined?true:i.isFlat;f8.call(this,i);kU.sendMessage("PointShapeLayer")}bD.Anchor={CENTER:0,TOP_LEFT:1,TOP_CENTER:2,TOP_RIGHT:3,RIGHT_CENTER:4,BOTTOM_RIGHT:5,BOTTOM_CENTER:6,BOTTOM_LEFT:7,LEFT_CENTER:8,0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8};bD.NodeType={ICON:1,SHAPE:2};bD.ShapeType={CIRCLE:0,SQUARE:1,TRIANGLE:2,DIAMOND:3,CROSS:4,ARROW:5,ARROW_TAIL:6,STAR:7,WATERDROP:9,0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,9:9};bD.inherits(f8,"PointShapeLayer");bD.hasMask=function(e){if(e===bD.ShapeType.TRIANGLE||e===bD.ShapeType.ARROW){return true}else{return false}};hv.extend(bD.prototype,{onAdd:function(e,i){if(!this.map){this.map=e;this.gl=i}if(!this.buffer){this.parseData()}},preRender:function(C,i,e){},onDestroy:function(e,i){this.buffer=null;this._bufferArray=[];f8.prototype.onDestroy.call(this)},toString:function(){return"PointShapeLayer"},render:function(){}});function i3(e){e=e||{};this.type="point";this.style_opt={visibility:true,nodeType:i3.NodeType.ICON,icon:"",iconObj:null,userSizes:true,anchors:[0,0],sizes:[32,32],scale:1,rotation:0,offset:[0,0],opacity:1,width:0,height:0,};this._appendStyle={anchors:{format:"object",defaultValue:[0,0]},sizes:{format:"object",defaultValue:[32,32]},width:{format:"number",defaultValue:32},height:{format:"number",defaultValue:32},};this.setStyleOptions(e.style||{});this._bufferArray=[];e.isFlat=e.isFlat===undefined?true:e.isFlat;e.isFixed=e.isFixed===undefined?true:e.isFixed;e.refLevel=e.refLevel===undefined?18:e.refLevel;f8.call(this,e);kU.sendMessage("PointIconLayer")}i3.NodeType={ICON:1,SHAPE:2};i3.inherits(f8,"PointIconLayer");hv.extend(i3.prototype,{onAdd:function(i,C){if(!this.map){this.map=i;this.gl=C}if(!this.buffer){this.parseData()}var e=this;i.addEventListener("oniconupdate",function(T){e.updateVertex()})},preRender:function(C,i,e){},onDestroy:function(e,i){this.buffer=null;this._bufferArray=[];f8.prototype.onDestroy.call(this)},toString:function(){return"PointIconLayer"},updateVertex:function(){},render:function(){}});function ku(e){this.gl=e;this.cache={};this.currentProgram=null}ku.get=function(e,i){if(!e._visualProgramCache||e._visualProgramCache.gl!==i){e._visualProgramCache=new ku(i)}return e._visualProgramCache};ku._hash=function(T){var C=5381;for(var e=0;e<T.length;e++){C=((C<<5)+C+T.charCodeAt(e))|0}return C>>>0};ku._withLineNumbers=function(oK){var e=String(oK).split("\n");var T=String(e.length).length;for(var C=0;C<e.length;C++){var oL=String(C+1);while(oL.length<T){oL=" "+oL}e[C]=oL+" | "+e[C]}return e.join("\n")};hv.extend(ku.prototype,{acquire:function(e,T){var i=ku._hash(e+"\u0000"+T);var C=this.cache[i];if(C&&(C.vsSource!==e||C.fsSource!==T)){C=null;i=null}if(C){C.refCount++;return C}C=this._create(e,T,i);if(i!==null&&!C.error){this.cache[i]=C}return C},release:function(e){if(!e){return}e.refCount--;if(e.refCount>0){return}if(e.program){this.gl.deleteProgram(e.program);e.program=null}if(e.key!==null&&this.cache[e.key]===e){delete this.cache[e.key]}if(this.currentProgram===e){this.currentProgram=null}},use:function(e){if(!e||!e.program){return false}this.gl.useProgram(e.program);this.currentProgram=e;return true},_compileShader:function(i,T){var oK=this.gl;var C=oK.createShader(i);oK.shaderSource(C,T);oK.compileShader(C);if(!oK.getShaderParameter(C,oK.COMPILE_STATUS)){var e=oK.getShaderInfoLog(C);oK.deleteShader(C);return{error:e}}return{shader:C}},_create:function(oK,e,oO){var oL=this.gl;var oN={key:oO,vsSource:oK,fsSource:e,program:null,attributes:{},attributeInfo:{},uniforms:{},uniformInfo:{},numAttributes:0,refCount:1,error:null};var oP=this._compileShader(oL.VERTEX_SHADER,oK);var oM=this._compileShader(oL.FRAGMENT_SHADER,e);if(oP.error||oM.error){var i=oP.error?"vertexShader":"fragmentShader";var C=oP.error||oM.error;oP.shader&&oL.deleteShader(oP.shader);oM.shader&&oL.deleteShader(oM.shader);oN.error={type:"compile",message:i+" 缂栬瘧澶辫触: "+C,source:oP.error?oK:e};console.error("[BMap] VisualProgram "+oN.error.message+"\n"+ku._withLineNumbers(oN.error.source));return oN}var T=oL.createProgram();oL.attachShader(T,oP.shader);oL.attachShader(T,oM.shader);oL.linkProgram(T);oL.deleteShader(oP.shader);oL.deleteShader(oM.shader);if(!oL.getProgramParameter(T,oL.LINK_STATUS)){oN.error={type:"link",message:"閾炬帴澶辫触: "+oL.getProgramInfoLog(T),source:oK+"\n// ---- fragment ----\n"+e};oL.deleteProgram(T);console.error("[BMap] VisualProgram "+oN.error.message);return oN}oN.program=T;this._reflect(oN);return oN},_reflect:function(oR){var oL=this.gl;var oK=oR.program;var oO=oL.getProgramParameter(oK,oL.ACTIVE_ATTRIBUTES);oR.numAttributes=oO;for(var T=0;T<oO;T++){var oP=oL.getActiveAttrib(oK,T);var oN=oL.getAttribLocation(oK,oP.name);oR.attributes[oP.name]=oN;oR.attributeInfo[oP.name]={location:oN,type:oP.type,components:ku.componentsOf(oL,oP.type)}}var C=oL.getProgramParameter(oK,oL.ACTIVE_UNIFORMS);for(var oS=0;oS<C;oS++){var oM=oL.getActiveUniform(oK,oS);var e=oM.name.replace(/\[0\]$/,"");var oQ=oL.getUniformLocation(oK,oM.name);oR.uniforms[e]=oQ;oR.uniformInfo[e]={location:oQ,type:oM.type,size:oM.size,isArray:oM.name!==e||oM.size>1}}}});ku.componentsOf=function(i,e){switch(e){case i.FLOAT_VEC2:case i.INT_VEC2:case i.BOOL_VEC2:return 2;case i.FLOAT_VEC3:case i.INT_VEC3:case i.BOOL_VEC3:return 3;case i.FLOAT_VEC4:case i.INT_VEC4:case i.BOOL_VEC4:return 4;case i.FLOAT_MAT2:return 4;case i.FLOAT_MAT3:return 9;case i.FLOAT_MAT4:return 16;default:return 1}};function h7(){}hv.extend(h7,{normalize:function(oP,oN){oN=oN||"id";var oK=this._toFeatureArray(oP);var C=[];for(var T=0;T<oK.length;T++){var oL=oK[T];var oO=oL&&oL.geometry?oL.geometry:oL;if(!oO||!oO.type||!oO.coordinates){continue}var oM=oL.properties||{};var e=oL.id!==undefined?oL.id:(oM[oN]!==undefined?oM[oN]:T);C.push({type:oO.type,coordinates:oO.coordinates,properties:oM,id:e})}return C},_toFeatureArray:function(e){if(!e){return[]}if(e instanceof Array){return e}if(e.type==="FeatureCollection"){return e.features||[]}if(e.type==="Feature"){return[e]}if(e.type&&e.coordinates){return[{geometry:e,properties:{}}]}return[]},extractPoints:function(e,oL){oL=oL||"count";var oP=[];var oN=[];for(var T=0;T<e.length;T++){var oK=e[T];var oM=[];if(oK.type==="Point"){oM=[oK.coordinates]}else{if(oK.type==="MultiPoint"){oM=oK.coordinates}else{continue}}var oO=oK.properties&&oK.properties[oL]!=null?Number(oK.properties[oL]):1;if(isNaN(oO)){oO=1}for(var C=0;C<oM.length;C++){oP.push(oM[C]);oN.push(oO)}}return{points:oP,weights:oN}},toLineStrings:function(oK){var T=oK.type;var oM=oK.coordinates;if(T==="LineString"){return[oM]}if(T==="MultiLineString"){return oM}if(T==="Polygon"){return oM}if(T==="MultiPolygon"){var oL=[];for(var C=0;C<oM.length;C++){for(var e=0;e<oM[C].length;e++){oL.push(oM[C][e])}}return oL}return[]},toPolygons:function(i){var e=i.type;var C=i.coordinates;if(e==="Polygon"){return[C]}if(e==="MultiPolygon"){return C}return[]}});function kn(e){this.map=e;this.gl=null;this.layers=[];this._preFramebuffer=null;this.pickFBO=null}cv.register(function(i){if(i._renderType!=="webgl"){return}var e=i._visualMgr=new kn(i);i._addVisualLayer=function(C){e.addLayer(C)};i._removeVisualLayer=function(C){e.removeLayer(C)};i.on("glmoduleloaded",function(){e.gl=i._webglPainter.gl;e.pickFBO=e.createFramebuffer();for(var C=0;C<e.layers.length;C++){e._initLayer(e.layers[C])}i.dispatchEvent(new ix("onupdate"))});i.addEventListener("update",function(oK){if(!oK.changedStatus||!oK.changedStatus.onsize_changed||!e.gl){return}e._destroyPickFBO();var C=e.map.getSize();var T=e.map.config.ratio;e.pickFBO=e.createFramebuffer(Math.round(C.width*T),Math.round(C.height*T))});i.on("destroy",function(){e.removeAllLayers();e._destroyPickFBO();i._addVisualLayer=null;i._removeVisualLayer=null;e._preFramebuffer=null;e.gl=null;i._visualMgr=null})});hv.extend(kn.prototype,{addLayer:function(e){if(!e||!e.isWebGLLayer){console.warn("[BMap] addVisualLayer: 闇�瑕� WebGLLayer 瀹炰緥");return}if(this.layers.indexOf(e)>-1){return}e.map=this.map;this.layers.push(e);this.sortLayer();if(e.enablePicked){aD.ensure(this.map)}if(this.gl){this._initLayer(e)}this.map.dispatchEvent(new ix("onupdate"))},removeLayer:function(i){var e=this.layers.indexOf(i);if(e===-1){return}this.layers.splice(e,1);i.onDestroy&&i.onDestroy(this.map,this.gl);this.map.dispatchEvent(new ix("onupdate"))},removeAllLayers:function(){for(var e=0;e<this.layers.length;e++){this.layers[e].onDestroy&&this.layers[e].onDestroy(this.map,this.gl)}this.layers=[]},_initLayer:function(e){e._onAttached(this.map,this.gl)},sortLayer:function(){this.layers.sort(function(i,e){return i.zIndex-e.zIndex})},saveFramebuffer:function(){var e=this.gl;this._preFramebuffer=e.getParameter(e.FRAMEBUFFER_BINDING)},bindFramebuffer:function(e){var i=this.gl;i.bindFramebuffer(i.FRAMEBUFFER,e||null)},clear:function(e){var i=this.gl;if(e instanceof Array){i.clearColor(e[0],e[1],e[2],e[3])}else{i.clearColor(0,0,0,0)}i.clear(i.COLOR_BUFFER_BIT)},restoreFramebuffer:function(){var i=this.gl;if(this.map&&this.map._webglPainter){var e=this.map._webglPainter.background||[255,255,255,255];i.clearColor(e[0]/255,e[1]/255,e[2]/255,e[3]/255)}i.bindFramebuffer(i.FRAMEBUFFER,this._preFramebuffer)},createFramebuffer:function(C,e){var oL=this.gl;C=C||oL.canvas.width;e=e||oL.canvas.height;var oK=oL.createFramebuffer();var T=oL.createTexture();oL.bindTexture(oL.TEXTURE_2D,T);oL.texImage2D(oL.TEXTURE_2D,0,oL.RGBA,C,e,0,oL.RGBA,oL.UNSIGNED_BYTE,null);oL.texParameteri(oL.TEXTURE_2D,oL.TEXTURE_MAG_FILTER,oL.LINEAR);oL.texParameteri(oL.TEXTURE_2D,oL.TEXTURE_MIN_FILTER,oL.LINEAR);oL.texParameteri(oL.TEXTURE_2D,oL.TEXTURE_WRAP_S,oL.CLAMP_TO_EDGE);oL.texParameteri(oL.TEXTURE_2D,oL.TEXTURE_WRAP_T,oL.CLAMP_TO_EDGE);oK.texture=T;oL.bindFramebuffer(oL.FRAMEBUFFER,oK);oL.framebufferTexture2D(oL.FRAMEBUFFER,oL.COLOR_ATTACHMENT0,oL.TEXTURE_2D,T,0);var i=oL.checkFramebufferStatus(oL.FRAMEBUFFER);oL.bindFramebuffer(oL.FRAMEBUFFER,null);oL.bindTexture(oL.TEXTURE_2D,null);if(oL.FRAMEBUFFER_COMPLETE!==i){console.warn("[BMap] VisualManager framebuffer incomplete: "+i);return null}return oK},_destroyPickFBO:function(){if(!this.pickFBO||!this.gl){this.pickFBO=null;return}var e=this.gl;e.deleteTexture(this.pickFBO.texture);e.deleteFramebuffer(this.pickFBO);this.pickFBO=null}});function aD(e){this.map=e;this.throttle=30;this._bound=false;this._lastMoveTime=0;this._hoverTarget=null;this._hoverItem=null;this._cursorOwned=false}aD.MAX_CANDIDATES=8;aD.ensure=function(i){if(!i||i._renderType!=="webgl"){return null}if(i._visualPicker){return i._visualPicker}var e=i._visualPicker=new aD(i);e.bind();i.on("destroy",function(){e.unbind();e.map=null;i._visualPicker=null});return e};hv.extend(aD.prototype,{bind:function(){var i=this.map;if(this._bound||!i){return}var e=this;this._onMouseMove=function(T){var C=Date.now();if(C-e._lastMoveTime<e.throttle){return}e._lastMoveTime=C;e._handleMove(T)};this._onMouseOut=function(C){e._clearHover(C)};this._onClick=function(C){e._handleClick("onclick",C)};this._onDblClick=function(C){e._handleClick("ondblclick",C)};this._onRightClick=function(C){e._handleClick("onrightclick",C)};i.addEventListener("onmousemove",this._onMouseMove);i.addEventListener("onmouseout",this._onMouseOut);i.addEventListener("onclick",this._onClick);i.addEventListener("ondblclick",this._onDblClick);i.addEventListener("onrightclick",this._onRightClick);this._bound=true},unbind:function(){var e=this.map;if(!this._bound||!e){return}e.removeEventListener("onmousemove",this._onMouseMove);e.removeEventListener("onmouseout",this._onMouseOut);e.removeEventListener("onclick",this._onClick);e.removeEventListener("ondblclick",this._onDblClick);e.removeEventListener("onrightclick",this._onRightClick);this._resetCursor();this._hoverTarget=null;this._hoverItem=null;this._bound=false},_handleMove:function(oK){var T=this.pick(oK.x,oK.y);var C=this._hoverTarget;var i=this._hoverItem;if(!T){if(C){this._hoverTarget=null;this._hoverItem=null;this._dispatch(C,"onmouseout",oK,i)}this._resetCursor();return}this._hoverTarget=T.target;this._hoverItem=T.item;this._applyCursor(T.target);if(C!==T.target||i!==T.item){if(C){this._dispatch(C,"onmouseout",oK,i)}this._dispatch(T.target,"onmouseover",oK,T.item)}this._dispatch(T.target,"onmousemove",oK,T.item)},_handleClick:function(oK,oL){var C=this.pickAll(oL.x,oL.y);for(var T=0;T<C.length;T++){this._dispatch(C[T].target,oK,oL,C[T].item)}},_clearHover:function(T){var C=this._hoverTarget;var i=this._hoverItem;this._hoverTarget=null;this._hoverItem=null;this._resetCursor();if(C){this._dispatch(C,"onmouseout",T,i)}},dropTarget:function(e){if(this._hoverTarget!==e){return}this._hoverTarget=null;this._hoverItem=null;this._resetCursor()},_dispatch:function(oL,C,oK,T){if(!oL){return}if(oL.dispatchPickEvent){oL.dispatchPickEvent(C,oK,T);return}var i=new ix(C);i.pixel=oK.pixel;i.point=oK.latlng;i.value=T;i.domEvent=oK.domEvent;oL.dispatchEvent(i)},_applyCursor:function(i){var e=this.map;if(!e||!e.platform){return}if(i&&i.supportMouseStyleChange===false){this._resetCursor();return}var C=e.config.overlayMoveCursor;if(e.platform.style.cursor!==C){e.platform.style.cursor=C}this._cursorOwned=true},_resetCursor:function(){var e=this.map;if(!this._cursorOwned||!e||!e.platform){return}this._cursorOwned=false;var i=e.config.defaultCursor;if(e.platform.style.cursor!==i){e.platform.style.cursor=i}},_collectTargets:function(){var oN=this.map&&this.map._visualMgr;var T=[];if(!oN||!oN.gl||!oN.pickFBO||!oN.layers.length){return T}for(var oL=0;oL<oN.layers.length;oL++){var oK=oN.layers[oL];var e=oK.getPickTargets?oK.getPickTargets():[oK];if(!e||!e.length){continue}for(var C=0;C<e.length;C++){var oM=e[C];if(oM&&oM.pickable&&oM.pickable()&&oM.resolvePickIndex){T.push(oM)}}}return T},pick:function(i,C){var e=this.pickAll(i,C,true);return e.length?e[0]:null},pickAll:function(e,oO,oL){var T=[];var C=this._collectTargets();if(!C.length){return T}for(var oK=C.length-1;oK>=0;oK--){var oN=C[oK];var oM=this._pickTarget(oN,e,oO);if(!oM){continue}T.push({target:oN,item:oM});if(oL||!oN.pickThrough){break}}return T},_pickTarget:function(oL,oO,oM){var e=this.map;var oQ=e&&e._visualMgr;var oN=e&&e._webglPainter;if(!oQ||!oQ.gl||!oQ.pickFBO||!oN||!oN.drawVisualPickPass){return null}var T=oQ.gl;var oK=null;oQ.saveFramebuffer();oQ.bindFramebuffer(oQ.pickFBO);oQ.clear();try{if(oN.drawVisualPickPass([oL])){var oP=oL.pickTolerance==null?4:oL.pickTolerance;oK=this._readCandidates(T,oO,oM,oP)}}finally{oQ.restoreFramebuffer()}if(!oK||!oK.length){return null}for(var C=0;C<oK.length;C++){var oR=oL.resolvePickIndex(oK[C],oO,oM);if(oR){return oR}}return null},_readCandidates:function(o3,oQ,oP,oX){var e=this.map.config.ratio||1;var oL=o3.canvas.width;var oS=o3.canvas.height;var o2=Math.max(0,Math.round(oX*e));var oW=Math.round(oQ*e);var oU=oS-1-Math.round(oP*e);var o7=Math.max(0,oW-o2);var oK=Math.max(0,oU-o2);var o6=Math.min(oL-1,oW+o2);var T=Math.min(oS-1,oU+o2);var oR=o6-o7+1;var o4=T-oK+1;if(oR<=0||o4<=0){return[]}var oY=this._ensureBuffer(oR*o4*4);o3.readPixels(o7,oK,oR,o4,o3.RGBA,o3.UNSIGNED_BYTE,oY);var pb=oW-o7;var C=oU-oK;var i={};var oT=[];for(var oO=0;oO<o4;oO++){for(var oM=0;oM<oR;oM++){var o1=(oO*oR+oM)*4;var oV=oY[o1];var o5=oY[o1+1];var o8=oY[o1+2];if(!oV&&!o5&&!o8){continue}var oN=oV+o5*256+o8*65536-1;var o9=oM-pb;var o0=oO-C;var pa=o9*o9+o0*o0;var oZ=i[oN];if(oZ===undefined){i[oN]=pa;oT.push(oN)}else{if(pa<oZ){i[oN]=pa}}}}oT.sort(function(pd,pc){return i[pd]-i[pc]});return oT.length>aD.MAX_CANDIDATES?oT.slice(0,aD.MAX_CANDIDATES):oT},_ensureBuffer:function(e){if(!this._pixelBuffer||this._pixelBuffer.length<e){this._pixelBuffer=new Uint8Array(e)}return this._pixelBuffer}});function bS(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("WebGLLayer")}e=e||{};this.visible=e.visible===undefined?true:!!e.visible;this.opacity=isNaN(Number(e.opacity))?1:Math.max(0,Math.min(1,Number(e.opacity)));this.zIndex=e.zIndex||1;this.minZoom=e.minZoom||3;this.maxZoom=e.maxZoom||21;this.center=e.referCenter||null;this.renderStage=bS._normalizeStage(e.renderStage);this.guid=cv.getGUID("visual_layer_");this._added=false;this._inited=false;this._implReady=false;this._status=0;this._mvp=null;var i=this;ki.load("visual",function(){i._onImplReady()},true)}bS.inherits(eX,"WebGLLayer");bS.prototype.isWebGLLayer=true;bS.RENDER_STAGES=["basemap","tilelayer","overlay","building","poi"];bS.DEFAULT_RENDER_STAGE="tilelayer";bS._normalizeStage=function(e){if(!e){return bS.DEFAULT_RENDER_STAGE}if(bS.RENDER_STAGES.indexOf(e)===-1){console.warn("[BMap] renderStage 鍙栧�奸潪娉�: "+e+"锛屽彲閫夊�� "+bS.RENDER_STAGES.join(" / "));return bS.DEFAULT_RENDER_STAGE}return e};hv.extend(bS.prototype,{addTo:function(e){if(e&&typeof e.addLayer==="function"){e.addLayer(this)}else{console.warn("[BMap] addTo: map 鏈氨缁�")}return this},remove:function(){if(this.map&&typeof this.map.removeLayer==="function"){this.map.removeLayer(this)}return this},setVisible:function(e){this.visible=!!e;this.triggerRepaint()},getVisible:function(){return this.visible},setOpacity:function(e){if(isNaN(Number(e))){return}this.opacity=Math.max(0,Math.min(1,Number(e)));this.triggerRepaint()},getOpacity:function(){return this.opacity},setZIndex:function(e){this.zIndex=Math.abs(Math.floor(e))||1;if(this.map&&this.map._visualMgr){this.map._visualMgr.sortLayer()}this.triggerRepaint()},getZIndex:function(){return this.zIndex},setRenderStage:function(e){this.renderStage=bS._normalizeStage(e);this.triggerRepaint()},getRenderStage:function(){return this.renderStage},setRefCenter:function(e){this.center=e;this._rebuild&&this._rebuild();this.triggerRepaint()},getRefCenter:function(){return this.center},getMap:function(){return this.map||null},getMVPMatrix:function(){return this._mvp},triggerRepaint:function(){if(this.map){this.map.dispatchEvent(new ix("onupdate"));if(this.map._webglMapScene&&this.map._webglMapScene.startRenderThread){this.map._webglMapScene.startRenderThread()}}},onAdd:function(e,i){},preRender:function(i,e){},render:function(i,e){},afterRender:function(i,e){},onShow:function(e,i){},onHide:function(e,i){},onDestroy:function(e,i){},_onImplReady:function(){this._implReady=true;this._tryInit()},_onAttached:function(e,i){this.map=e;this.gl=i;this._added=true;this._tryInit()},_tryInit:function(){if(this._implReady&&this._added&&!this._inited&&this.gl){this.onAdd(this.map,this.gl);this._initGL&&this._initGL();this._inited=true;this.triggerRepaint()}},_inZoomRange:function(){if(!this.map){return false}var e=this.map.getZoom();var i=e>=this.minZoom&&e<=this.maxZoom;if(this.visible&&i){if(!this._status){this.onShow(this.map,this.gl);this._status=1}return true}if(this._status){this.onHide(this.map,this.gl);this._status=0}return false},toString:function(){return"WebGLLayer"}});function nJ(e){e=e||{};bS.call(this,e);this._style={blend:e.blend||"default"};this._data=e.data||null;this._features=null;this._buffers=[];this._idKey=e.idKey||"id";this.enablePicked=e.enablePicked===undefined?false:!!e.enablePicked;this.supportMouseStyleChange=e.mouseStyleChange===undefined?true:!!e.mouseStyleChange;this.pickTolerance=e.pickTolerance==null?4:e.pickTolerance;this.pickThrough=e.pickThrough===undefined?false:!!e.pickThrough}nJ.inherits(bS,"FeatureVisualLayer");nJ.INSTANCE_SETTERS={opacity:"setOpacity",visible:"setVisible",zIndex:"setZIndex",referCenter:"setRefCenter",renderStage:"setRenderStage",enablePicked:"setEnablePicked"};hv.extend(nJ.prototype,{setData:function(e){this._data=e;if(this._inited){this._rebuild();this.triggerRepaint()}return this},getData:function(){return this._data},clearData:function(){this._data=null;this._features=null;if(this._inited){this._destroyBuffers(this._buffers);this._buffers=[];this.triggerRepaint()}return this},_warnOnce:function(e,i){this._optWarned=this._optWarned||{};if(!this._optWarned[e]){this._optWarned[e]=true;console.warn(i)}},setOptions:function(i){i=i||{};for(var e in i){if(!i.hasOwnProperty(e)){continue}if(this._style.hasOwnProperty(e)){this._style[e]=i[e]}else{if(nJ.INSTANCE_SETTERS[e]){this[nJ.INSTANCE_SETTERS[e]](i[e])}else{if(e==="minZoom"||e==="maxZoom"){this[e]=Number(i[e])}else{this._warnOnce("unknown_"+e,"[BMap] "+this.toString()+": 鏈煡閫夐」 "+e+"锛屽凡蹇界暐")}}}}this._onOptionsChanged&&this._onOptionsChanged(i);this.triggerRepaint();return this},getOptions:function(){return this._style},_buildGeometry:function(e){},_draw:function(i,e){},setEnablePicked:function(e){this.enablePicked=!!e;if(!this.enablePicked&&this.map&&this.map._visualPicker){this.map._visualPicker.dropTarget(this)}if(this.enablePicked&&this.map){aD.ensure(this.map)}return this},getEnablePicked:function(){return this.enablePicked},pickable:function(){if(!this.enablePicked||!this.visible||!this.map||!this._inited){return false}var e=this.map.getZoom();return e>=this.minZoom&&e<=this.maxZoom&&this._hasPickData()},getPickTargets:function(){return[this]},_hasPickData:function(){return !!(this._buffers&&this._buffers.length)},resolvePickIndex:null,toString:function(){return"FeatureVisualLayer"}});function bp(e){this.layer=e;this.map=null;this.gl=null;this._gl=null;this._state=null;this._program=null;this._uniforms={};this._attributes={};this._vertices=null;this._indices=null;this._textures={};this._textureUnits=0;this._drawSpec=null;this._bound=false;this._enabledLocations=[];this._warned={}}hv.extend(bp.prototype,{toString:function(){return"CustomRenderContext"}});function L(e){e=e||{};if(!e.vertexShader||!e.fragmentShader){throw new Error("WebGLCustomLayer 闇�瑕� vertexShader 涓� fragmentShader")}bS.call(this,e);L._checkOptions(e);this._vs=e.vertexShader;this._fs=e.fragmentShader;this._unsafeGL=!!e.unsafeGL;this._onReadyCb=e.onReady;this._onRenderCb=e.onRender;this._onDestroyCb=e.onDestroy;this._onErrorCb=e.onError;this._readyStatus="pending";this._animating=!!e.animation;this._addTime=Date.now();this._spec={uniforms:hv.extend({},e.uniforms||{}),attributes:hv.extend({},e.attributes||{}),textures:hv.extend({},e.textures||{}),vertices:e.vertices||null,indices:e.indices||null,draw:e.draw||null};this._renderState=L._normalizeRenderState(e.renderState);this._ctx=new bp(this)}L.inherits(bS,"WebGLCustomLayer");L.OPTION_KEYS=["vertexShader","fragmentShader","attributes","vertices","indices","uniforms","textures","draw","renderState","animation","unsafeGL","onReady","onRender","onDestroy","onError","visible","opacity","zIndex","minZoom","maxZoom","referCenter","renderStage"];L._checkOptions=function(i){for(var e in i){if(i.hasOwnProperty(e)&&L.OPTION_KEYS.indexOf(e)===-1){console.warn('[BMap] WebGLCustomLayer: 鏈煡閫夐」 "'+e+'"锛屽凡蹇界暐銆傚彲鐢ㄩ�夐」瑙� '+L.OPTION_KEYS.join(" / "))}}};L._normalizeRenderState=function(e){e=e||{};return{depthTest:!!e.depthTest,depthWrite:!!e.depthWrite,depthFunc:e.depthFunc||null,blend:e.blend===undefined?"normal":e.blend,cullFace:e.cullFace||"none",frontFace:e.frontFace||null}};L.DEFAULT_BASE_MC=[12069475.280738307,3929271.1724863998];hv.extend(L.prototype,{_getBaseMC:function(){if(this.center){var i=m8.convertLL2MC(this.center);return[i.lng,i.lat]}var e=this.map&&this.map._normalLayerMgr;if(e&&e.base){return[e.base.lng,e.base.lat]}return L.DEFAULT_BASE_MC},projectToLayer:function(oL){if(!oL||!oL.length){return oL}var oK=this._getBaseMC();if(typeof oL[0]==="number"){var oM=m8.convertLL2MC(new d9(oL[0],oL[1]));return[oM.lng-oK[0],oM.lat-oK[1]]}var e=[];for(var C=0;C<oL.length;C++){var T=m8.convertLL2MC(new d9(oL[C][0],oL[C][1]));e.push([T.lng-oK[0],T.lat-oK[1]])}return e},unprojectFromLayer:function(oM){if(!oM||!oM.length){return oM}var oK=this._getBaseMC();if(typeof oM[0]==="number"){var oL=m8.convertMC2LL(new d9(oM[0]+oK[0],oM[1]+oK[1]));return[oL.lng,oL.lat]}var e=[];for(var C=0;C<oM.length;C++){var T=m8.convertMC2LL(new d9(oM[C][0]+oK[0],oM[C][1]+oK[1]));e.push([T.lng,T.lat])}return e},convertLngLat:function(e){return this.projectToLayer(e)},convertLngLats:function(e){return this.projectToLayer(e)},getStatus:function(){return this._readyStatus},getTime:function(){return(Date.now()-this._addTime)/1000},getContext:function(){return this._ctx},setUniforms:function(e){hv.extend(this._spec.uniforms,e);if(this._inited){this._ctx.setUniforms(e)}this.triggerRepaint();return this},setUniform:function(e,i){var C={};C[e]=i;return this.setUniforms(C)},setAttributes:function(e){hv.extend(this._spec.attributes,e);if(this._inited){this._ctx.setAttributes(e)}this.triggerRepaint();return this},setAttribute:function(i,e){var C={};C[i]=e;return this.setAttributes(C)},setVertices:function(e){this._spec.vertices=e;if(this._inited){this._ctx.setVertices(e)}this.triggerRepaint();return this},setIndices:function(e){this._spec.indices=e;if(this._inited){this._ctx.setIndices(e)}this.triggerRepaint();return this},setTextures:function(e){hv.extend(this._spec.textures,e);if(this._inited){this._ctx.setTextures(e)}this.triggerRepaint();return this},setTexture:function(e,C,i){this._spec.textures[e]=i?hv.extend({source:C},i):C;if(this._inited){this._ctx.setTexture(e,C,i)}this.triggerRepaint();return this},setDraw:function(e){this._spec.draw=e;if(this._inited){this._ctx.setDraw(e)}this.triggerRepaint();return this},setRenderState:function(e){this._renderState=L._normalizeRenderState(hv.extend(hv.extend({},this._renderState),e||{}));this.triggerRepaint();return this},getRenderState:function(){return this._renderState},setShaders:function(i,e){if(!i||!e){console.warn("[BMap] WebGLCustomLayer.setShaders 闇�瑕佷袱娈垫簮鐮�");return this}this._vs=i;this._fs=e;this._readyStatus="pending";if(this._inited&&this._reloadProgram){this._reloadProgram()}this.triggerRepaint();return this},startAnimation:function(){this._animating=true;this.triggerRepaint();return this},stopAnimation:function(){this._animating=false;return this},isAnimating:function(){return !!this._animating},_emitError:function(e){e.layer=this;if(e.type==="compile"||e.type==="link"){this._readyStatus="error"}else{console.warn("[BMap] WebGLCustomLayer: "+e.message)}if(typeof this._onErrorCb==="function"){this._onErrorCb.call(this,e)}},toString:function(){return"WebGLCustomLayer"}});function ca(e){e=e||{};if(!window.THREE){throw new Error("ThreejsLayer 闇�瑕佸叏灞� THREE锛岃鍏堝紩鍏� three.js")}bS.call(this,e);ca._checkOptions(e);this.options=hv.extend({alpha:true,antialias:false},e);this.renderer=null;this.scene=null;this.camera=null;this._unsetList=[];this._readyStatus="pending";this._animating=!!e.animation;this._addTime=Date.now()}ca.inherits(bS,"ThreejsLayer");ca.OPTION_KEYS=["alpha","antialias","animation","onInit","preRender","onRender","afterRender","onDestroy","onError","visible","opacity","zIndex","minZoom","maxZoom","referCenter","renderStage"];ca._checkOptions=function(i){for(var e in i){if(i.hasOwnProperty(e)&&ca.OPTION_KEYS.indexOf(e)===-1){console.warn('[BMap] ThreejsLayer: 鏈煡閫夐」 "'+e+'"锛屽凡蹇界暐銆傚彲鐢ㄩ�夐」瑙� '+ca.OPTION_KEYS.join(" / "))}}};hv.extend(ca.prototype,{add:function(e){if(!e){return this}if(!this.scene){this._unsetList.push(e);return this}this.scene.add(e);this.triggerRepaint();return this},removeObject:function(e){if(this.scene&&e){this.scene.remove(e);this.triggerRepaint()}else{if(e){var C=this._unsetList.indexOf(e);if(C>-1){this._unsetList.splice(C,1)}}}return this},getScene:function(){return this.scene},getCamera:function(){return this.camera},getRenderer:function(){return this.renderer},getStatus:function(){return this._readyStatus},getTime:function(){return(Date.now()-this._addTime)/1000},projectToLayer:function(oL){if(!oL||!oL.length){return oL}var oK=this._getBaseMC();if(typeof oL[0]==="number"){var oM=m8.convertLL2MC(new d9(oL[0],oL[1]));return[oM.lng-oK[0],oM.lat-oK[1]]}var e=[];for(var C=0;C<oL.length;C++){var T=m8.convertLL2MC(new d9(oL[C][0],oL[C][1]));e.push([T.lng-oK[0],T.lat-oK[1]])}return e},_getBaseMC:function(){if(this.center){var i=m8.convertLL2MC(this.center);return[i.lng,i.lat]}var e=this.map&&this.map._normalLayerMgr;if(e&&e.base){return[e.base.lng,e.base.lat]}return[12069475.280738307,3929271.1724863998]},convertLngLat:function(e){return this.projectToLayer(e)},startAnimation:function(){this._animating=true;this.triggerRepaint();return this},stopAnimation:function(){this._animating=false;return this},isAnimating:function(){return !!this._animating},_emitError:function(e){e.layer=this;this._readyStatus="error";console.error("[BMap] ThreejsLayer: "+e.message);if(typeof this.options.onError==="function"){this.options.onError.call(this,e)}},toString:function(){return"ThreejsLayer"}});function ex(e){e=e||{};if(!window.deck||!window.deck.Deck){throw new Error("DeckglLayer 闇�瑕佸叏灞� deck锛岃鍏堝紩鍏� deck.gl")}bS.call(this,e);this._props=hv.extend({},e);this._deck=null;this._readyStatus="pending";this._animating=!!e.animation;this._addTime=Date.now();this._renderFails=0;this._errorReported=false}ex.inherits(bS,"DeckglLayer");ex.WORLD_TILE_SIZE=512;ex.MAX_RENDER_FAILS=30;ex.OWN_PROPS={animation:1,onInit:1,onDestroy:1,onError:1,visible:1,opacity:1,zIndex:1,minZoom:1,maxZoom:1,referCenter:1,renderStage:1,_customRender:1};hv.extend(ex.prototype,{setProps:function(e){this._props=hv.extend(this._props||{},e||{});if(this._deck){this._deck.setProps(e)}this.triggerRepaint();return this},getDeck:function(){return this._deck},getStatus:function(){return this._readyStatus},getTime:function(){return(Date.now()-this._addTime)/1000},startAnimation:function(){this._animating=true;this.triggerRepaint();return this},stopAnimation:function(){this._animating=false;return this},isAnimating:function(){return !!this._animating},_emitError:function(e,i){e.layer=this;if(i){this._readyStatus="error"}if(!this._errorReported){this._errorReported=true;console.error("[BMap] DeckglLayer: "+e.message)}if(typeof this._props.onError==="function"){this._props.onError.call(this,e)}},toString:function(){return"DeckglLayer"}});function gZ(e){e=e||{};nJ.call(this,e);var i=K.uiVersionIsGL()?"rgba(25, 25, 250, 1)":fq().strokeColor;this._style.strokeColor=e.strokeColor||i;this._style.strokeWeight=e.strokeWeight==null?4:e.strokeWeight;this._style.strokeOpacity=e.strokeOpacity==null?1:e.strokeOpacity;this._style.strokeLineJoin=e.strokeLineJoin||"round";this._style.strokeLineCap=e.strokeLineCap||"round";this._style.strokeStyle=e.strokeStyle||"solid";this._style.dashArray=e.dashArray||[8,4];this._style.strokeTextureUrl=e.strokeTextureUrl||"";this._style.strokeTextureWidth=e.strokeTextureWidth==null?null:e.strokeTextureWidth;this._style.strokeTextureHeight=e.strokeTextureHeight==null?null:e.strokeTextureHeight;this._style.strokeTextureSpaced=!!e.strokeTextureSpaced;this._style.strokeTextureGap=e.strokeTextureGap==null?16:e.strokeTextureGap;this._style.strokeTextureColor=e.strokeTextureColor==null?"rgba(255, 255, 255, 1)":e.strokeTextureColor;this._strokeTex=null;this._items=null;this._texWarned={}}gZ.inherits(nJ,"PolylineLayer");hv.extend(gZ.prototype,{_onOptionsChanged:function(e){if(!this._inited){return}e=e||{};if(e.strokeColor!==undefined||e.strokeWeight!==undefined||e.strokeLineJoin!==undefined||e.strokeLineCap!==undefined){this._rebuild()}},clearData:function(){this._items=null;return nJ.prototype.clearData.call(this)},getItems:function(){return this._items},resolvePickIndex:function(i,e,C){return this._resolvePickIndex?this._resolvePickIndex(i,e,C):null},hitTest:function(e,i){return this._hitTest?this._hitTest(e,i):null},toString:function(){return"PolylineLayer"}});function eQ(e){e=e||{};nJ.call(this,e);var i=K.uiVersionIsGL()?"rgba(255, 71, 26, 0.9)":fq().strokeColor;this._style.strokeColor=e.strokeColor||i;this._style.strokeWeight=e.strokeWeight==null?4:e.strokeWeight;this._style.strokeOpacity=e.strokeOpacity==null?1:e.strokeOpacity;this._style.strokeLineJoin=e.strokeLineJoin||"round";this._style.strokeLineCap=e.strokeLineCap||"round";this._style.mode=e.mode||"arc";this._style.arcHeight=e.arcHeight==null?0.2:e.arcHeight;this._style.curvature=e.curvature==null?0.15:e.curvature;this._style.segments=e.segments==null?32:e.segments;this._style.animation=e.animation===undefined?true:!!e.animation;this._style.duration=e.duration==null?2:e.duration;this._style.interval=e.interval==null?0.25:e.interval;this._style.trailLength=e.trailLength==null?0.6:e.trailLength;this._style.baseOpacity=e.baseOpacity==null?0.25:e.baseOpacity;this._style.randomPhase=e.randomPhase===undefined?true:!!e.randomPhase;this._phase=0;this._rafId=null;this._lastFrameTime=0}eQ.inherits(nJ,"FlyLineLayer");eQ.MODES={arc:1,path:1};eQ.effectiveInterval=function(e){e=Number(e);if(isNaN(e)){e=0}return Math.max(0.001,Math.min(1,e))};hv.extend(eQ.prototype,{_onOptionsChanged:function(e){if(!this._inited){return}e=e||{};if(e.strokeColor!==undefined||e.strokeWeight!==undefined||e.strokeLineJoin!==undefined||e.strokeLineCap!==undefined||e.mode!==undefined||e.arcHeight!==undefined||e.curvature!==undefined||e.segments!==undefined||e.randomPhase!==undefined){this._rebuild()}if(e.animation!==undefined){if(this._style.animation){this._startFrame()}else{this._stopFrame()}}},toString:function(){return"FlyLineLayer"}});function lS(e){e=e||{};nJ.call(this,e);var i=K.uiVersionIsGL()?"rgba(25, 25, 250, 1)":fq().strokeColor;this._style.strokeColor=e.strokeColor||i;this._style.strokeWeight=e.strokeWeight==null?8:e.strokeWeight;this._style.strokeLineJoin=e.strokeLineJoin||"round";this._style.strokeLineCap=e.strokeLineCap||"round";this._style.passedColor=e.passedColor===undefined?"rgba(153, 153, 153, 1)":e.passedColor;this._style.upcomingColor=e.upcomingColor===undefined?null:e.upcomingColor;this._style.lineVisible=e.lineVisible===undefined?true:!!e.lineVisible;this._style.strokeTextureUrl=e.strokeTextureUrl||"";this._style.strokeTextureWidth=e.strokeTextureWidth==null?16:e.strokeTextureWidth;this._style.strokeTextureHeight=e.strokeTextureHeight==null?16:e.strokeTextureHeight;this._style.strokeTextureSpaced=!!e.strokeTextureSpaced;this._style.strokeTextureGap=e.strokeTextureGap==null?16:e.strokeTextureGap;this._style.strokeTextureColor=e.strokeTextureColor==null?"rgba(255, 255, 255, 1)":e.strokeTextureColor;this._style.isLinear=!!e.isLinear;this._style.linearTexture=e.linearTexture||null;this._style.duration=e.duration==null?60:e.duration;this._style.speedMode=e.speedMode==null?1:e.speedMode;this._style.timestampKey=e.timestampKey||"timestamps";this._style.autoStart=!!e.autoStart;this._style.movePoint=e.movePoint===undefined?{}:e.movePoint;this._style.autoFollow=!!e.autoFollow;this._style.followOptions=e.followOptions||null;this._trace=0;this._traceStyle={color:this._style.strokeColor,start:true,disappear:false,hideAll:false,none:false};this._traceWarned=false;this._normalizeTrace();this._distance=0;this._elapsed=0;this._process=0;this._playStatus=lS.Status.INIT;this._steps=null;this._mcPoints=null;this._speed=1;this._originDuration=this._style.duration;this._effectSpeedMode=this._style.speedMode;this._movePointObj=null;this._rafId=null;this._arrowTex=null;this._linearTex=null;this._linearWarned=false;this._lastFrameTime=0;this._elapsedIndex=0;this._elapsedTime=0;this._elapsedDistance=0;this._followOpt={position:[0,0],lookAt:0,fixedLookAt:true,rotationDuration:500,minRotation:5,idleTimeout:2000};this._normalizeFollowOptions(e.followOptions);this._followIdleAt=0;this._followIdleTimer=null;this._followHandlers=null}lS.inherits(nJ,"TrackLine");lS.Status={INIT:0,PLAY:1,PAUSE:2,STOP:3,FINISH:4};lS.StatusName=["init","play","pause","stop","finish"];hv.extend(lS.prototype,{_onOptionsChanged:function(e){if(e&&e.followOptions!==undefined){this._normalizeFollowOptions(e.followOptions)}if(e&&(e.passedColor!==undefined||e.upcomingColor!==undefined||e.lineVisible!==undefined||e.strokeColor!==undefined)){this._normalizeTrace()}if(!this._inited){return}this._onPlayOptionsChanged&&this._onPlayOptionsChanged(e);this.triggerRepaint()},_isHiddenColor:function(T){if(T===false){return true}if(typeof T!=="string"){return false}var i=T.replace(/^\s+|\s+$/g,"").toLowerCase();if(i==="none"||i==="transparent"){return true}var e=i.match(/^rgba\(([^)]+)\)$/);if(e){var C=e[1].split(",");return C.length>3&&parseFloat(C[3])===0}return false},_normalizeTrace:function(){var T=this._style;var C=this._traceStyle;var i=this._isHiddenColor(T.passedColor);var oL=this._isHiddenColor(T.upcomingColor);var e=!i&&T.passedColor!=null;var oM=!oL&&T.upcomingColor!=null;C.hideAll=!T.lineVisible||(i&&oL);C.none=!(i||oL||e||oM);C.color=T.strokeColor;C.start=true;C.disappear=false;if(i){C.disappear=true}else{if(oL){C.start=false;C.disappear=true}else{if(e){C.color=T.passedColor}else{if(oM){C.start=false;C.color=T.upcomingColor}}}}if(C.hideAll){C.none=false;C.start=true;C.disappear=true}var oK=!(i&&oL)&&(i||e)&&(oL||oM);if(oK&&!this._traceWarned){this._traceWarned=true;console.warn("[BMap] TrackLine: passedColor 涓� upcomingColor 鍙兘鏈変竴涓亸绂讳富绾胯壊 strokeColor锛屽凡鎸夈�岄殣钘忎紭鍏堜簬鏌撹壊锛屽悓绾ф椂 passedColor 浼樺厛銆嶅彇鍏朵竴锛屽彟涓�涓蹇界暐")}return C},_normalizeFollowOptions:function(i){var e=this._followOpt;if(!i){return e}if(i.position instanceof Array){e.position=[Number(i.position[0])||0,Number(i.position[1])||0]}if(i.lookAt!=null){e.lookAt=Number(i.lookAt)||0}if(i.fixedLookAt!==undefined){e.fixedLookAt=!!i.fixedLookAt}if(i.rotationDuration!=null&&Number(i.rotationDuration)>=0){e.rotationDuration=Number(i.rotationDuration)}if(i.minRotation!=null&&Number(i.minRotation)>=0){e.minRotation=Number(i.minRotation)}if(i.idleTimeout!=null&&Number(i.idleTimeout)>=0){e.idleTimeout=Number(i.idleTimeout)}return e},clearData:function(){this.stop();this._steps=null;this._mcPoints=null;this._distance=0;return nJ.prototype.clearData.call(this)},start:function(){this._start&&this._start();return this},pause:function(){this._pause&&this._pause();return this},resume:function(){this._resume&&this._resume();return this},stop:function(){this._stop&&this._stop();return this},setSpeed:function(e){this._setSpeed&&this._setSpeed(e);return this},getSpeed:function(){return this._speed},setProcess:function(e){this._setProcess&&this._setProcess(e);return this},getProcess:function(){return this._process},setElapsed:function(e){this._setElapsed&&this._setElapsed(e);return this},getElapsed:function(){return this._elapsed},getStatus:function(){return this._playStatus},getDistance:function(){return this._distance},getInfoByProcess:function(e){return this._getInfoByProcess?this._getInfoByProcess(e):null},getMovePoint:function(){return this._movePointObj},setMovePoint:function(e){this._style.movePoint=e;this._applyMovePoint&&this._applyMovePoint();return this},getSpeedMode:function(){return this._effectSpeedMode},setAutoFollow:function(e){this._style.autoFollow=!!e;this._applyAutoFollow&&this._applyAutoFollow();return this},getAutoFollow:function(){return !!this._style.autoFollow},setFollowOptions:function(e){this._normalizeFollowOptions(e);this._style.followOptions=e||this._style.followOptions;this._applyAutoFollow&&this._applyAutoFollow();return this},getFollowOptions:function(){var e=this._followOpt;return{position:[e.position[0],e.position[1]],lookAt:e.lookAt,fixedLookAt:e.fixedLookAt,rotationDuration:e.rotationDuration,minRotation:e.minRotation,idleTimeout:e.idleTimeout}},setVisible:function(e){bS.prototype.setVisible.call(this,e);this._syncMovePointVisible&&this._syncMovePointVisible()},toString:function(){return"TrackLine"}});function i8(i){i=i||{};nJ.call(this,i);var e=K.uiVersionIsGL()?"rgba(25, 25, 250, 0.6)":fq().fillColor;var C=K.uiVersionIsGL()?"rgba(250, 250, 25, 1)":fq().strokeColor;this._style.fillColor=i.fillColor||e;this._style.fillOpacity=i.fillOpacity==null?1:i.fillOpacity;this._style.strokeColor=i.strokeColor||C;this._style.strokeWeight=i.strokeWeight==null?0:i.strokeWeight;this._style.strokeOpacity=i.strokeOpacity==null?1:i.strokeOpacity;this._style.fillTextureUrl=i.fillTextureUrl||"";this._style.fillTextureSize=i.fillTextureSize==null?null:i.fillTextureSize;this._style.fillTextureAlphaOnly=!!i.fillTextureAlphaOnly;this._border=null;this._fillTex=null;this._items=null;this._texWarned={};this._syncBorder()}i8.inherits(nJ,"PolygonLayer");hv.extend(i8.prototype,{_onOptionsChanged:function(e){e=e||{};var i=this._syncBorder(e);if(!this._inited){return}if(i){this._rebuild()}else{if(e.fillColor!==undefined||e.fillOpacity!==undefined){this._restyleFill()}}},_syncBorder:function(oM){var oK=this._style;var e=typeof oK.strokeWeight==="function"||oK.strokeWeight>0;if(!e){if(this._border){this._border.onDestroy();this._border=null}return false}var oN=!this._border;if(oN){this._border=new gZ({strokeLineJoin:"miter",strokeLineCap:"butt",referCenter:this.center||null})}var oL=["strokeColor","strokeWeight","strokeOpacity"];var T=null;for(var C=0;C<oL.length;C++){if(oN||!oM||oM[oL[C]]!==undefined){T=T||{};T[oL[C]]=oK[oL[C]]}}if(T){this._border.setOptions(T)}return oN},getItems:function(){return this._items},resolvePickIndex:function(i,e,C){return this._resolvePickIndex?this._resolvePickIndex(i,e,C):null},hitTest:function(e,i){return this._hitTest?this._hitTest(e,i):null},toString:function(){return"PolygonLayer"}});function op(i){i=i||{};nJ.call(this,i);this._style.shape=i.shape==null?"circle":i.shape;this._style.size=i.size==null?20:i.size;var e=K.uiVersionIsGL()?"rgba(50, 50, 255, 1)":fq().strokeColor;this._style.fillColor=i.fillColor==null?e:i.fillColor;this._style.fillOpacity=i.fillOpacity==null?1:i.fillOpacity;this._style.strokeColor=i.strokeColor==null?"rgba(255, 255, 255, 1)":i.strokeColor;this._style.strokeWeight=i.strokeWeight==null?0:i.strokeWeight;this._style.scale=i.scale==null?1:i.scale;this._style.rotation=i.rotation==null?0:i.rotation;this._style.offset=i.offset||[0,0];this._style.anchor=i.anchor==null?"center":i.anchor;this._style.isFlat=i.isFlat===undefined?false:!!i.isFlat;this._style.icon=i.icon==null?null:i.icon;this._style.iconSize=i.iconSize==null?null:i.iconSize;this._items=null;this._iconList=null;this._iconToken=0}op.inherits(nJ,"PointLayer");op.ShapeType={circle:0,square:1,triangle:2,diamond:3,cross:4,arrow:5,arrowTail:6,star:7,waterdrop:9};op.Anchor={center:0,topLeft:1,topCenter:2,topRight:3,rightCenter:4,bottomRight:5,bottomCenter:6,bottomLeft:7,leftCenter:8};op.IconAnchor={center:[0,0],topLeft:[-1,1],topCenter:[0,1],topRight:[1,1],rightCenter:[1,0],bottomRight:[1,-1],bottomCenter:[0,-1],bottomLeft:[-1,-1],leftCenter:[-1,0]};hv.extend(op.prototype,{_isIconMode:function(){return !!this._style.icon},_onOptionsChanged:function(){if(this._inited){this._rebuild()}},setOpacity:function(e){bS.prototype.setOpacity.call(this,e);if(this._inited){this._rebuild();this.triggerRepaint()}},clearData:function(){this._items=null;this._iconList=null;return nJ.prototype.clearData.call(this)},getItems:function(){return this._items},_hasPickData:function(){return !!(this._items&&this._items.length)},resolvePickIndex:function(i,e,C){return this._resolvePickIndex?this._resolvePickIndex(i,e,C):null},hitTest:function(e,i){return this._hitTest?this._hitTest(e,i):null},toString:function(){return"PointLayer"}});function lZ(e){e=e||{};nJ.call(this,e);var i=K.uiVersionIsGL()?"rgba(0, 180, 0, 1)":fq().strokeColor;this._style.color=e.color||i;this._style.size=e.size==null?50000:e.size;this._style.height=e.height==null?100000:e.height;this._style.edgeCount=e.edgeCount==null?4:e.edgeCount;this._style.unit=e.unit||"m"}lZ.inherits(nJ,"BarLayer");hv.extend(lZ.prototype,{_onOptionsChanged:function(e){if(!this._inited){return}e=e||{};if(e.color!==undefined||e.size!==undefined||e.height!==undefined||e.edgeCount!==undefined||e.unit!==undefined){this._rebuild()}},toString:function(){return"BarLayer"}});function bB(e){e=e||{};nJ.call(this,e);this._style.text=e.text==null?null:e.text;this._style.fontSize=e.fontSize==null?14:e.fontSize;this._style.fontFamily=e.fontFamily==null?"寰蒋闆呴粦":e.fontFamily;this._style.fontWeight=e.fontWeight==null?"normal":e.fontWeight;this._style.color=e.color==null?"#333":e.color;this._style.strokeColor=e.strokeColor==null?"rgba(255, 255, 255, 1)":e.strokeColor;this._style.strokeWeight=e.strokeWeight==null?0:e.strokeWeight;this._style.padding=e.padding||[2,2];this._style.margin=e.margin||[0,0];this._style.collides=e.collides===undefined?true:!!e.collides;this._style.waitTime=e.waitTime==null?200:e.waitTime;this._style.textMaxWidth=e.textMaxWidth==null?0:e.textMaxWidth;this._style.lineHeight=e.lineHeight==null?20:e.lineHeight;this._style.textAlign=e.textAlign==null?"center":e.textAlign;this._style.offset=e.offset||[0,0];this._style.anchor=e.anchor==null?"center":e.anchor;this._style.rotation=e.rotation==null?0:e.rotation;this._style.scale=e.scale==null?1:e.scale;this._style.fillOpacity=e.fillOpacity==null?1:e.fillOpacity;this._style.isFlat=e.isFlat===undefined?false:!!e.isFlat;this._items=null;this._atlasTexture=null;this._atlasWidth=0;this._atlasHeight=0;this._visibleIndexes=null;this._baseVisible=null;this._collideTime=0;this._collideDirty=true}bB.inherits(nJ,"TextLayer");bB.Anchor={center:[0,0],topLeft:[-1,1],topCenter:[0,1],topRight:[1,1],rightCenter:[1,0],bottomRight:[1,-1],bottomCenter:[0,-1],bottomLeft:[-1,-1],leftCenter:[-1,0]};hv.extend(bB.prototype,{_onOptionsChanged:function(){this._collideDirty=true;if(this._inited){this._rebuild()}},setOpacity:function(e){bS.prototype.setOpacity.call(this,e);if(this._inited){this._rebuild();this.triggerRepaint()}},clearData:function(){this._items=null;this._visibleIndexes=null;this._collideDirty=true;return nJ.prototype.clearData.call(this)},getItems:function(){return this._items},_hasPickData:function(){return !!(this._items&&this._items.length)},resolvePickIndex:function(i,e,C){return this._resolvePickIndex?this._resolvePickIndex(i,e,C):null},hitTest:function(e,i){return this._hitTest?this._hitTest(e,i):null},toString:function(){return"TextLayer"}});function n0(i){i=i||{};nJ.call(this,i);this._style.tileSize=i.tileSize||256;this._style.clusterRadius=i.clusterRadius==null?60:i.clusterRadius;this._style.clusterMinPoints=i.clusterMinPoints==null?2:i.clusterMinPoints;this._style.clusterMinZoom=i.clusterMinZoom==null?3:i.clusterMinZoom;this._style.clusterMaxZoom=i.clusterMaxZoom==null?16:i.clusterMaxZoom;this._style.fitViewOnClick=i.fitViewOnClick===undefined?true:!!i.fitViewOnClick;this._style.fitViewMargin=i.fitViewMargin||[12,12,12,12];this._style.updateRealTime=!!i.updateRealTime;this._style.waitTime=i.waitTime==null?300:i.waitTime;this._style.clusterIcon=i.clusterIcon||null;this._style.clusterIconSize=i.clusterIconSize||null;this._style.singleStyle=i.singleStyle||null;this._bubbleColor=K.uiVersionIsGL()?null:fq().strokeColor;this._points=null;this._trees=null;this._clusterBBox=null;var C=this;this.enablePicked=i.enablePicked===undefined?true:!!i.enablePicked;var e={enablePicked:true,mouseStyleChange:this.supportMouseStyleChange,pickTolerance:this.pickTolerance};this._clusterLayer=new op(hv.extend({icon:function(oL){return C._clusterIcon(oL)},iconSize:function(oL){return C._clusterIconSize(oL)},anchor:"center",referCenter:i.referCenter||null,opacity:i.opacity,minZoom:i.minZoom,maxZoom:i.maxZoom},e));var T=K.uiVersionIsGL()?"rgba(255, 80, 80, 1)":fq().strokeColor;var oK={shape:"circle",size:14,fillColor:T,strokeColor:"rgba(255, 255, 255, 1)",strokeWeight:2,referCenter:i.referCenter||null,opacity:i.opacity,minZoom:i.minZoom,maxZoom:i.maxZoom};if(i.singleStyle){hv.extend(oK,i.singleStyle)}this._singleLayer=new op(hv.extend(oK,e))}n0.inherits(nJ,"ClusterLayer");hv.extend(n0.prototype,{_onOptionsChanged:function(){if(this._inited){this._rebuild();this.triggerRepaint()}},setVisible:function(e){bS.prototype.setVisible.call(this,e);this._clusterLayer&&(this._clusterLayer.visible=this.visible);this._singleLayer&&(this._singleLayer.visible=this.visible)},setOpacity:function(e){bS.prototype.setOpacity.call(this,e);this._clusterLayer&&this._clusterLayer.setOpacity(this.opacity);this._singleLayer&&this._singleLayer.setOpacity(this.opacity)},clearData:function(){this._points=null;this._trees=null;this._clusterBBox=null;this._clusterLayer&&this._clusterLayer.clearData();this._singleLayer&&this._singleLayer.clearData();return nJ.prototype.clearData.call(this)},getClusterLayer:function(){return this._clusterLayer},getSingleLayer:function(){return this._singleLayer},getPickTargets:function(){if(!this.enablePicked){return[]}return[this._singleLayer,this._clusterLayer]},setEnablePicked:function(e){this.enablePicked=!!e;if(!this.enablePicked&&this.map&&this.map._visualPicker){this.map._visualPicker.dropTarget(this._singleLayer);this.map._visualPicker.dropTarget(this._clusterLayer)}if(this.enablePicked&&this.map){aD.ensure(this.map)}return this},redraw:function(){this._refresh&&this._refresh()},toString:function(){return"ClusterLayer"}});function fj(e){e=e||{};nJ.call(this,e);this._style.size=e.size==null?20:e.size;this._style.unit=e.unit==="m"?"m":"px";this._style.max=isNaN(Number(e.max))?100:Number(e.max);this._style.min=isNaN(Number(e.min))?0:Number(e.min);this._style.minOpacity=isNaN(Number(e.minOpacity))?0:Number(e.minOpacity);this._style.maxOpacity=isNaN(Number(e.maxOpacity))?1:Number(e.maxOpacity);this._style.gradient=e.gradient||{0.25:"rgba(0,0,255,1)",0.55:"rgba(0,255,0,1)",0.85:"rgba(255,255,0,1)",1:"rgba(255,0,0,1)"};this._style.weightField=e.weightField||"count"}fj.inherits(nJ,"Heatmap");hv.extend(fj.prototype,{_onOptionsChanged:function(e){e=e||{};if(!this._inited){return}if(e.gradient!==undefined){this._updatePalette()}if(e.weightField!==undefined){this._rebuild()}},setGradient:function(e){return this.setOptions({gradient:e})},setRadius:function(e){this._style.size=e;this.triggerRepaint();return this},toString:function(){return"Heatmap"}});var dS=1;var j2=2;var kr=3;var m=4;var aM=5;var aC=1;var lk=2;var gC=3;var l7=4;var hw=5;var lH=6;var iY=7;var mr={};mr[aC]=2;mr[lk]=4;mr[gC]=8;mr[l7]=10;mr[hw]=16;mr[lH]=20;mr[iY]=30;var oj={};oj[dS]=bD.ShapeType.STAR;oj[j2]=bD.ShapeType.WATERDROP;oj[kr]=bD.ShapeType.CIRCLE;oj[m]=bD.ShapeType.SQUARE;oj[aM]=bD.ShapeType.DIAMOND;function ih(C,e){if(C===undefined){throw new Error("娌℃湁浼犲叆points鏁版嵁")}if(Object.prototype.toString.call(C)!=="[object Array]"){throw new Error("points鏁版嵁涓嶆槸鏁扮粍")}g2.call(this);e=e||{};this._points=C;var i=K.uiVersionIsGL()?"#fa937e":fq().fillColor;this._config={shape:e.shape||kr,size:e.size||l7,color:e.color||i,enableMassClear:true};this._layer=null;this._bindingToMap=false;this._hoverPoint=null}ih.inherits(g2,"PointCollection");hv.extend(ih.prototype,{initialize:function(e){if(this._bindingToMap){return null}this.map=e;hv.BaseClass.call(this,this.hashCode);if(!this._layer){this._createLayer()}if(!this._bindingToMap){this.map._addNormalLayer(this._layer);this._bindingToMap=true}this._updateData();return null},_createLayer:function(){var C=this._config;var i=mr[C.size]||10;var e=oj[C.shape]!==undefined?oj[C.shape]:bD.ShapeType.CIRCLE;this._layer=new bD({enablePicked:true,autoSelect:false,selectedIndex:-1,enableChangeSelectIndexByPick:false,style:{size:i,color:C.color,shapeType:e,opacity:1}});this._bindLayerEvents()},_bindLayerEvents:function(){var e=this;e._layer.addEventListener("click",function(T){var i=e._getPointByPickResult(T);if(i){var C=new ix("onclick");C.pointMC=i;e.dispatchEvent(C)}});e._layer.addEventListener("mousemove",function(oL){var C=e._getPointByPickResult(oL);if(C){if(!e._hoverPoint||e._hoverPoint.lng!==C.lng||e._hoverPoint.lat!==C.lat){if(e._hoverPoint){var i=new ix("onmouseout");i.pointMC=e._hoverPoint;e.dispatchEvent(i)}e._hoverPoint=C;var oK=new ix("onmouseover");oK.pointMC=C;e.dispatchEvent(oK)}}else{if(e._hoverPoint){var T=new ix("onmouseout");T.pointMC=e._hoverPoint;e.dispatchEvent(T);e._hoverPoint=null}}})},_getPointByPickResult:function(T){if(!T||!T.value){return null}var C=T.value.dataIndex;if(C>=0&&C<this._points.length){var i=this._points[C];if(i&&i.lng!==undefined&&i.lat!==undefined){return i}}return null},draw:function(){},setPoints:function(e){this._points=e||[];this._updateData()},_updateData:function(){if(!this._layer||!this.map){return}var e=this._toGeoJSON(this._points);if(e.features.length>0){this._layer.setData(e)}else{this._layer.clearData()}},_toGeoJSON:function(T){var C=[];for(var e=0;e<T.length;e++){var oK=T[e];if(!oK||oK.lng===undefined||oK.lat===undefined){C.push({type:"Feature",geometry:{type:"Point",coordinates:[0,0]},properties:{index:e,visibility:false}});continue}C.push({type:"Feature",geometry:{type:"Point",coordinates:[oK.lng,oK.lat]},properties:{index:e}})}return{type:"FeatureCollection",features:C}},setStyles:function(oK){if(!oK){return}if(oK.color){this._config.color=oK.color}if(oK.size){this._config.size=oK.size}if(oK.shape){this._config.shape=oK.shape}if(this._layer){var T=this._config;var C=mr[T.size]||10;var e=oj[T.shape]!==undefined?oj[T.shape]:bD.ShapeType.CIRCLE;var i=this._layer.style_opt;i.size=C;i.color=T.color;i.shapeType=e;this._layer.resolveStyle();this._layer.parseData()}},clear:function(){this._points=[];if(this._layer){this._layer.clearData()}},remove:function(){this.clear();if(this._layer&&this.map&&this._bindingToMap){this.map._removeNormalLayer(this._layer);this._bindingToMap=false}var e=new ix("onremove");this.dispatchEvent(e);this._layer=null;this.map=null;this.decontrol()},hide:function(){this._visible=false;if(this._layer){this._layer.setVisible(false)}},show:function(){this._visible=true;if(this._layer){this._layer.setVisible(true)}},isVisible:function(){return !!this._visible},toString:function(){return"PointCollection"}});window.BMAP_POINT_SHAPE_STAR=dS;window.BMAP_POINT_SHAPE_WATERDROP=j2;window.BMAP_POINT_SHAPE_CIRCLE=kr;window.BMAP_POINT_SHAPE_SQUARE=m;window.BMAP_POINT_SHAPE_RHOMBUS=aM;window.BMAP_POINT_SIZE_TINY=aC;window.BMAP_POINT_SIZE_SMALLER=lk;window.BMAP_POINT_SIZE_SMALL=gC;window.BMAP_POINT_SIZE_NORMAL=l7;window.BMAP_POINT_SIZE_BIG=hw;window.BMAP_POINT_SIZE_BIGGER=lH;window.BMAP_POINT_SIZE_HUGE=iY;function dX(e,i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("Hotspot")}if(!e){this._invalid=true;return}this._position=e;this.guid="hotspot"+(dX._guid++);i=i||{};this._text=i.text||"";this._offsets=i.offsets?i.offsets.slice(0):[5,5,5,5];this._userData=i.userData||null;this._minZoom=i.minZoom||null;this._maxZoom=i.maxZoom||null;this._syncSpotFields()}dX._guid=0;hv.extend(dX.prototype,{initialize:function(e){this._map=e;if(this._minZoom==null){this._minZoom=e.config.minZoom}if(this._maxZoom==null){this._maxZoom=e.config.maxZoom}this._syncSpotFields()},_syncSpotFields:function(){this.pt=m8.convertLL2MC(this._position);this.bd=[-this._offsets[3],-this._offsets[2],this._offsets[1],this._offsets[0]];this.lr=(this._minZoom!=null&&this._maxZoom!=null)?[this._minZoom,this._maxZoom]:null;this.userdata=this._userData},setPosition:function(e){this._position=e;this.pt=m8.convertLL2MC(e)},getPosition:function(){return this._position},setText:function(e){this._text=e},getText:function(){return this._text},setUserData:function(e){this._userData=e;this.userdata=e},getUserData:function(){return this._userData}});var kd=null;var nO=null;cv.register(function(i){if(i.config&&i.config.isOverviewMap){return}if(i.isLoaded()){X(i);if(!kd){kd=nj(i)}if(!nO){nO=cA(i)}}else{i.addEventListener("load",function(){X(this);if(!kd){kd=nj(this)}if(!nO){nO=cA(this)}})}i.cityName="涓浗";i.cCode="1";var e={};e.enableRequest=true;e.request=function(){if(e.enableRequest){e.enableRequest=false;setTimeout(function(){e._request()},500)}};e._request=function(){var T=i.getBoundsIn();if(!T){return}var oL=i.getZoom();var C=T.getSouthWest();var oK=T.getNorthEast();or.request(function(oP){if(oP.current_city["code"]>=9000&&oP.current_city["code"]<=9378){oP.current_city["name"]="鍙版咕鐪�"}if(oP.current_city["code"]>=20000&&oP.current_city["code"]<=20499){oP.current_city["name"]="鏂板姞鍧�"}if(oP.current_city["code"]>=20500&&oP.current_city["code"]<=25999){oP.current_city["name"]="娉板浗"}if(oP.current_city["code"]>=26000&&oP.current_city["code"]<=29999){oP.current_city["name"]="鏃ユ湰"}if(oP.current_city["code"]>=30000&&oP.current_city["code"]<=30999){oP.current_city["name"]="闊╁浗"}if(oP.current_city["code"]>=31000&&oP.current_city["code"]<=37000){oP.current_city["name"]="浜氬お"}if(oP.current_city["code"]>=46609&&oP.current_city["code"]<=52505){oP.current_city["name"]="娆ф床"}if(oP.current_city["code"]>=39509&&oP.current_city["code"]<=53500){oP.current_city["name"]="鍗楃編娲�"}if(oP.current_city["code"]>=54000&&oP.current_city["code"]<=70000){oP.current_city["name"]="鍖楃編娲�"}if(oP.current_city["code"]===54003&&oP.current_city["code"]>=60731&&oP.current_city["code"]<=61123){oP.current_city["name"]="缇庡浗"}if(oP.current_city["code"]===54015||oP.current_city["code"]>=57970&&oP.current_city["code"]<=60223){oP.current_city["name"]="鍔犳嬁澶�"}if(oP.current_city["code"]===54025||oP.current_city["code"]>=54338&&oP.current_city["code"]<=57374){oP.current_city["name"]="澧ㄨタ鍝�"}e.enableRequest=true;if(oP&&oP.current_city){var oO=oP.current_city["name"];var oN=oP.current_city["code"];if(oN!==i.cCode){var oM=new ix("oncitychange");oM.name=oO;oM.code=oN;i.dispatchEvent(oM)}i.cityName=oO;i.cCode=oN;if(!c9()){eO(i)}}},{qt:"cen",b:C.lng+","+C.lat+";"+oK.lng+","+oK.lat,l:oL},"","",true)};i.addEventListener("load",function(C){e.request()});i.addEventListener("moveend",function(C){e.request()});i.addEventListener("zoomend",function(C){e.request()});e.request()});function nj(C){var e={};var i=new oo(e);C.addControl(i);return i}function cA(C){var i={};var e=new nl(i);C.stickySpamCtrl=e;C.addControl(e);return e}function X(i){if(i.temp.copyadded){return}i.temp.copyadded=true;if(!i.cpyCtrl){var T=new mU(2,2);i.config.cpyCtrlOffset=T;if(c9()){T.width=72;T.height=0}var C=new i0({offset:T,printable:true});i.cpyCtrl=C}if(!c9()||i.config.showCopyrightOnMobile){eO(i);i.addEventListener("maptypechange",function(){eO(i)});i.addEventListener("onlanguage_change",function(){eO(i)})}i.addControl(C);var e=new cB();e._opts={printable:true};i.logoCtrl=e;i.addControl(e);i.addEventListener("resize",function(){if(this.getSize().width>=300&&i.getSize().height>=100){e.show();C&&C.setOffset(i.config.cpyCtrlOffset)}else{e.hide();C&&C.setOffset(new mU(4,2))}});if(i.getSize().width>=300&&i.getSize().height>=100){e.show()}else{e.hide();C.setOffset(new mU(4,2))}i.addEventListener("oncopyrightoffsetchange",function(oK){i.logoCtrl.setOffset(oK.target.logo);i.cpyCtrl.setOffset(oK.target.cpy);if(oK.target.cpy){i.config.cpyCtrlOffset=oK.target.cpy}});i.dispatchEvent(new ix("oncopyrightaddend"))}function eO(oZ){if(!oZ.cpyCtrl){var o7=new mU(2,2);if(c9()){o7.width=72;o7.height=0}var o2=new i0({offset:o7,printable:true});oZ.cpyCtrl=o2}var pg=oZ.cityName||"涓浗";var o0=oZ.getMapTypeId();var o1=["甯稿窞甯�","鍗楁槍甯�","涔岄瞾鏈ㄩ綈甯�","鏃犻敗甯�","绂忓窞甯�","娉夊窞甯�","鐝犳捣甯�","璐甸槼甯�"];var oT=["鍖椾含甯�","涓婃捣甯�","骞垮窞甯�","娣卞湷甯�","瀹佹尝甯�","鐭冲搴勫競","娌堥槼甯�","闀挎槬甯�","闈掑矝甯�","娓╁窞甯�","鍙板窞甯�","閲戝崕甯�","浣涘北甯�","涓北甯�","鏄嗘槑甯�","鍗楀畞甯�","鑻忓窞甯�","瑗垮畨甯�","娴庡崡甯�","閮戝窞甯�","鍚堣偉甯�","鍛煎拰娴╃壒甯�","鏉窞甯�","鎴愰兘甯�","姝︽眽甯�","闀挎矙甯�","澶╂触甯�","鍗椾含甯�","閲嶅簡甯�","澶ц繛甯�","涓滆帪甯�","鍘﹂棬甯�"];var oV=["棣欐腐鐗瑰埆琛屾斂鍖�"];var oO=["鍙版咕鐪�"];var o8=["鏃ユ湰"];var pe=["闊╁浗"];var o3=["娉板浗"];var o6=["浜氬お"];var oP=["鏂板姞鍧�"];var pf=["娆ф床"];var T=["鍗楃編娲�"];var pb=["鍖楃編娲�"];var C=["缇庡浗"];var o5=["澧ㄨタ鍝�"];var oM=["鍔犳嬁澶�"];for(var pc in o1){if(o1[pc]===pg){var oW=true;break}}for(var pc in oT){if(oT[pc]===pg){var oK=true;break}}for(var pc in oV){if(oV[pc]===pg){var pi=true;break}}if(oO[0]===pg){var pa=true}if(oP[0]===pg){var i=true}if(o8[0]===pg){var oS=true}if(pe[0]===pg){var oY=true}if(o3[0]===pg){var oX=true}if(o6[0]===pg){var oN=true}if(pf[0]===pg){var oU=true}if(T[0]===pg){var oR=true}if(pb[0]===pg){var e=true}if(C[0]===pg){var pd=true}if(oM[0]===pg){var o9=true}if(o5[0]===pg){var oL=true}var oQ=K.getGS(oZ.getLanguage());var ph=["&copy;&nbsp;2026 Baidu - "+oQ+"鍙� - 鐢叉祴璧勫瓧11111342 - 浜琁CP璇�030173鍙� - Data &copy; "];var o4="rgba(255, 255, 255, 0.701961)";if(oZ.getZoom()<=9){ph.push("鐧惧害鏅哄浘");ph.push(' &amp; <a target="_blank" href="http://www.openstreetmap.org/">OpenStreetMap</a>');ph.push(' &amp; <a target="_blank" href="http://corporate.navteq.com/supplier_terms.html">HERE</a>');if(o0===j9||o0===fp){ph.push(' &amp; <a target="_blank" href="http://www.eso.org/public/">ESO</a>');o4="rgba(0,0,0,.7)"}}else{if(oS||oY){ph.push('<a target="_blank" href="http://www.openstreetmap.org/">OpenStreetMap</a>')}else{if(i||oX){ph.push('<a target="_blank" href="http://corporate.navteq.com/supplier_terms.html">HERE</a>')}else{if(oN){ph.push('<a target="_blank" href="http://corporate.navteq.com/supplier_terms.html">HERE</a>');ph.push(' &amp; <a target="_blank" href="https://www.mapbox.com/">Mapbox</a>')}else{if(oU){ph.push('<a target="_blank" href="http://www.openstreetmap.org/">OpenStreetMap</a>');ph.push(' &amp; <a target="_blank" href="https://www.mapbox.com/">Mapbox</a>')}else{if(oR){ph.push('<a target="_blank" href="http://www.openstreetmap.org/">OpenStreetMap</a>');ph.push(' &amp; <a target="_blank" href="https://www.mapbox.com/">Mapbox</a>')}else{if(pd||oL||o9){ph.push('<a target="_blank" href="http://corporate.navteq.com/supplier_terms.html">HERE</a>');ph.push(' &amp; <a target="_blank" href="https://www.mapbox.com/">Mapbox</a>')}else{if(e){ph.push('<a target="_blank" href="http://www.openstreetmap.org/">OpenStreetMap</a>');ph.push(' &amp; <a target="_blank" href="https://www.mapbox.com/">Mapbox</a>')}else{ph.push("鐧惧害鏅哄浘");if(oW){ph.push(' &amp; <a target="_blank" href="http://www.palmcity.cn/palmcity/">PalmCity</a>')}if(pi){ph.push(' &amp; <a target="_blank" href="http://www.mapking.com/HongKong/eng/home/MapKing_Webmap.html">MapKing</a>')}if(pa){ph.push(' &amp; <a target="_blank" href="http://corporate.navteq.com/supplier_terms.html">HERE</a>');ph.push(' &amp; <a target="_blank" href="http://www.localking.com.tw/about/localking.aspx">妯傚LocalKing</a>')}if(o0===j9||o0===fp){o4="rgba(0,0,0,.6)"}}}}}}}}}ph.unshift('<span style="background: '+o4+';padding: 0px 1px;line-height: 16px;display: inline;height: 16px;">');ph.push("</span>");ph=ph.join("");oZ.cpyCtrl.addCopyright({id:1,content:ph})}function oo(e){this["defaultAnchor"]=BMAP_ANCHOR_TOP_RIGHT;this["defaultOffset"]=e.defaultOffset||new mU(90,6);this._cZIndex=9999;this._visible=false}oo.prototype=new jM();oo.prototype.initialize=function(oK){this._map=oK;var T=this;var e=da("div");var i=e.style;i.left=i.top="50%";i.display="none";i.padding="24px";i.overflow="visible";i.position="absolute";i.width="50%";i.maxWidth="360px";i.transform="translate(-50% , -50%)";i.zIndex="9999";i.background="#fff";i.userSelect="none";var oL=da("span",{style:"margin-top: 12px;\n    margin-bottom: -12px;\n    margin-left: calc(100% - 48px);\n    width: 56px;\n    height: 32px;\n    font-size: 14px;\n    text-align: center;\n    line-height: 32px;\n    display: block;\n    cursor: pointer;\n    background: #3894FF;\n    border: solid 1px #3f51b53b;\n    color: #fff;\n    border-radius: 3px;"});oL.innerText="纭畾";oL.addEventListener("click",function(){T.hide()});var C=da("div");var oM=C.style;oM.position="relative";oM.width="100%";oM.height="100%";oM.color="#000";oM.fontSize="14px";oM.wordBreak="break-all";e.appendChild(C);e.appendChild(oL);oK.getContainer().appendChild(e);return e};oo.prototype._setPosition=function(){};oo.prototype.update=function(e){if(!this.isVisible()){this._container.firstChild.innerText=e;this.show()}};function nl(C){jM.call(this);C=C||{};this._opts={};this._opts=hv.extend(this._opts,C);var i=lK();var oK=c0.popup_code;var e="绯荤粺浜�"+i.year+"骞�"+i.month+"鏈�"+i.day+"鏃�";this._prefixMsg="銆�"+oK+"銆�"+e;this["defaultAnchor"]=gv.TOP_RIGHT;var T=c9()?new mU(40,40):new mU(200,40);this["defaultOffset"]=C.defaultOffset||T;this._cZIndex=9999;this._visible=false}nl.inherits(jM,"StickySpam");nl.prototype.initialize=function(oK){this._map=oK;var T=this;var e=this._container=da("div");var i=e.style;i.display="none";i.padding="10px 15px";i.overflow="visible";i.maxWidth=c9()?"250px":"360px";i.background="#fff8ee";i.borderWidth="3px";i.borderStyle="solid";i.borderColor="#e29e32";i.position="relative";var C=da("div");var oL=C.style;oL.position="relative";oL.width="100%";oL.height="100%";oL.color="#e29e32";oL.fontSize="14px";oL.fontWeight="500";oL.wordBreak="break-all";oL.lineHeight="1.5";C.style.cssText+="; a { color: #1565c0; text-decoration: none; border-bottom: 1px solid rgba(21, 101, 192, 0.3); }";C.style.cssText+='; a[href^="tel:"] { color: #2e7d32; border-bottom-color: rgba(46, 125, 50, 0.3); }';e.appendChild(C);oK.getContainer().appendChild(e);return e};nl.prototype.update=function(i){if(!this.isVisible()){var e=this._convertUrlsToLinks(this._prefixMsg+i);this._container.firstChild.innerHTML=e;this.show()}};nl.prototype._convertUrlsToLinks=function(C){C=C.replace(/\n/g,"<br/>");var i=/(https?:\/\/[^\s]+)/g;C=C.replace(i,function(T){if(T.length>200){return T}if(!T.match(/^https?:\/\//)){return T}return'<a href="'+T+'" target="_blank">'+T+"</a>"});var e=/(\d{3,4}[-\s]?\d{3,4}[-\s]?\d{4}|\d{11})/g;C=C.replace(e,function(T){var oK=T.replace(/[-\s]/g,"");return'<a href="tel:'+oK+'">'+T+"</a>"});return C};window.BMAP_STATUS_SUCCESS=0;window.BMAP_STATUS_CITY_LIST=1;window.BMAP_STATUS_UNKNOWN_LOCATION=2;window.BMAP_STATUS_UNKNOWN_ROUTE=3;window.BMAP_STATUS_INVALID_KEY=4;window.BMAP_STATUS_INVALID_REQUEST=5;window.BMAP_STATUS_PERMISSION_DENIED=6;window.BMAP_STATUS_SERVICE_UNAVAILABLE=7;window.BMAP_STATUS_TIMEOUT=8;window.BMAP_ROUTE_TYPE_WALKING=2;window.BMAP_ROUTE_TYPE_DRIVING=3;window.BMAP_ROUTE_TYPE_RIDING=6;window.BMAP_ROUTE_STATUS_NORMAL=0;window.BMAP_ROUTE_STATUS_EMPTY=1;window.BMAP_ROUTE_STATUS_ADDRESS=2;var J="carport_list";var fT="carport_auth";var e6="cur";var an="cen";var W="s";var fv="con";var fh="bd";var eA="nb";var kc="bt";var bo="nav";var lL="walk";var iG="gc";var fX="rgc";var Y="dec";var l8="iploc";var jR="bse";var jb="nse";var e2="s";var gH="bsl";var iD="bda";var gB="sa";var bW="nba";var lV="drag";var mV="ext";var nZ="exts";var n6="hip";var kY="ride";var mZ="drct_riding";var on="drct";var dg="ldt";var aU="place";var h2=2;var b4=4;var iP=7;var lW=11;var dv=12;var hp=14;var ew=15;var gm=18;var a2=20;var bV=21;var S=19;var a=23;var mp=26;var a4=28;var jc=31;var hE=35;var l9=44;var b2=45;var aZ=46;var nW=47;var ji=-1;var bZ=0;var cu=1;var m5=2;var fM=3;window.BMAP_POI_TYPE_NORMAL=0;var ef=1;var l0=2;BMapGL.I=hv.I;var cK={};cK.removeHtml=function(e){e=e.replace(/<\/?[^>]*>/g,"");e=e.replace(/[ | ]* /g," ");return e};cK.parseGeoExtReg1=function(e){return e.replace(/([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*),([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*)(,)/g,"$1,$2;")};cK.parseGeoExtReg2=function(i,e){var C=new RegExp("(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){"+e+"}","ig");return i.replace(C,"$1")};var fD=0;var e4=1;var ah=2;cK.unique=function(C){var oL=false;var oK=[];var oM={};for(var T=0,e=C.length;T<e;T++){if(!oM[C[T]]){oM[C[T]]=true;oK.push(C[T])}}return oK};cK.getBestLevel=function(C,i){if(i){var e=Math.min(i.width/1100,i.height/660);C=Math.round(C+(Math.log(e)/Math.log(2)))}if(C<1){C=1}if(C>21){C=21}return C};cK.parseGeo=function(oM,oP){if(typeof oM!="string"||!oM){return}var oR=oM.split("|");var e;var oK;var C;if(oR.length==1){e=di(oM)}else{e=di(oR[2]);oK=di(oR[0]);C=di(oR[1]);if(!oP){return e}}var oN={type:e.geoType};if(oP){switch(oN.type){case ah:var oO=new d9(e.geo[0][0],e.geo[0][1]);var oQ=m8.convertMC2LL(oO);oN.point=oQ;oN.points=[oQ];break;case e4:oN.points=[];var oS=e.geo[0];for(var oL=0,T=oS.length-1;oL<T;oL+=2){var oT=new d9(oS[oL],oS[oL+1]);oT=m8.convertMC2LL(oT);oN.points.push(oT)}oK=new d9(oK.geo[0][0],oK.geo[0][1]);C=new d9(C.geo[0][0],C.geo[0][1]);oK=m8.convertMC2LL(oK);C=m8.convertMC2LL(C);oN.bounds=new lz(oK,C);break;default:break}}return oN};cK.parseGeoExt=function(o2,oT){if(!oT){oT=0}else{if(oT<0.25){oT=0}else{if(oT>0.25&&oT<1){oT=1}else{if(oT>32){oT=32}}}}var oO=o2.split("|");if(oO.length==1){var T=di(oO[0]);return{type:T.type,bound:"",points:T.geo.join(",")}}else{if(oO.length>1){var oU=o2.split(";.=");var oQ=[];var oK=[];var oV=0;var oZ=oU.length;for(var oW=0;oW<oZ;oW++){var o1=oU[oW];if(oZ>1){if(oW==0){o1=o1+";"}if(oW>0&&oW<oZ-1){o1=".="+o1+";"}if(oW==oZ-1){o1=".="+o1}}var oL=o1.split("|");var oY=di(oL[0]);var oX=di(oL[1]);oQ.push(oY.geo.join(","));oQ.push(oX.geo.join(","));var T=di(oL[2]);oV=T.type;var o0=T.geo.join(",");o0=cK.parseGeoExtReg1(o0);if(oT>0){o0=cK.parseGeoExtReg2(o0,oT)}oK.push(o0)}if(oZ<=1){oK=oK.join(";")}if(oZ==2){var C=oK[0]+";"+oK[1];var oM=C.split(";");var e=[];for(var oW=0;oW<oM.length;oW++){var oP=oM[oW].split(",")[0];var oN=oM[oW].split(",")[1];var oR=new d9(oP,oN);var oS=m8.convertMC2LL(oR);e.push(oS)}oK=e}return{type:oV,bound:oQ.join(";"),points:oK}}}};cK.getPoiPoint=function(e){var C=[];var i=null;if(e.toString()=="Point"){i=e}else{if(typeof e=="string"){C=hv.trim(e).split(",");if(C.length<2){return}C[0]=parseFloat(hv.trim(C[0]));C[1]=parseFloat(hv.trim(C[1]))}else{C=e.slice(0);if(C.length<2){return}}i=new BMap.Point(C[0],C[1])}return i};cK.parseGeoStr=function(C){var i=C.split(",");var e=new d9(i[0],i[1]);return m8.convertMC2LL(e)};cK.level={country:4,province:11,city:12,area:13};var kw=["=",".","-","*"];var e0=1<<23;function di(oP){var oO=lv(oP.charAt(0));var C=oP.substr(1);var oR=0;var e=C.length;var oS=[];var oM=[];var oN=[];while(oR<e){if(C.charAt(oR)==kw[0]){if((e-oR)<13){return 0}oN=gk(C.substr(oR,13),oS);if(oN<0){return 0}oR+=13}else{if(C.charAt(oR)==";"){oM.push(oS.slice(0));oS.length=0;++oR}else{if((e-oR)<8){return 0}oN=dG(C.substr(oR,8),oS);if(oN<0){return 0}oR+=8}}}for(var oL=0,T=oM.length;oL<T;oL++){for(var oK=0,oQ=oM[oL].length;oK<oQ;oK++){oM[oL][oK]/=100}}return{geoType:oO,geo:oM}}function lv(i){var e=-1;if(i==kw[1]){e=ah}else{if(i==kw[2]){e=e4}else{if(i==kw[3]){e=fD}}}return e}function gk(oK,C){var e=0;var oM=0;var oL=0;for(var T=0;T<6;T++){oL=fu(oK.substr(1+T,1));if(oL<0){return -1-T}e+=oL<<(6*T);oL=fu(oK.substr(7+T,1));if(oL<0){return -7-T}oM+=oL<<(6*T)}C.push(e);C.push(oM);return 0}function dG(oL,T){var C=T.length;if(C<2){return -1}var e=0;var oN=0;var oM=0;for(var oK=0;oK<4;oK++){oM=fu(oL.substr(oK,1));if(oM<0){return -1-oK}e+=oM<<(6*oK);oM=fu(oL.substr(4+oK,1));if(oM<0){return -5-oK}oN+=oM<<(6*oK)}if(e>e0){e=e0-e}if(oN>e0){oN=e0-oN}T.push(T[C-2]+e);T.push(T[C-1]+oN);return 0}function fu(i){var e=i.charCodeAt(0);if(i>="A"&&i<="Z"){return e-"A".charCodeAt(0)}else{if(i>="a"&&i<="z"){return(26+e-"a".charCodeAt(0))}else{if(i>="0"&&i<="9"){return(52+e-"0".charCodeAt(0))}else{if(i=="+"){return 62}else{if(i=="/"){return 63}}}}}return -1}cK.pathToPoints=function(oL){var T=[];if(typeof oL!=="string"){return T}else{var oK=oL.split(";");for(var C=0;C<oK.length;C++){var e=oK[C].split(",");T.push(new d9(e[0],e[1]))}}return T};cK.pointsToString=function(oK){var T="";if(typeof oK!=="object"){return oK}else{for(var C=0;C<oK.length;C++){var e=oK[C].lat+","+oK[C].lng;if(C!==oK.length-1){T=T+e+"|"}else{T=T+e}}}return T};cK.stringToPoints=function(oL){var T=[];if(typeof oL!=="string"||!oL){return T}else{var oK=oL.split("|");for(var C=0;C<oK.length;C++){var e=oK[C].split(",");T.push(new d9(e[1],e[0]))}}return T};window.BMAP_POI_TYPE_NORMAL=0;window.BMAP_POI_TYPE_BUSSTOP=1;window.BMAP_POI_TYPE_BUSLINE=2;window.BMAP_POI_TYPE_SUBSTOP=3;window.BMAP_POI_TYPE_SUBLINE=4;var ae=0;var k6=1;var iq={};window.APIPack=iq;function fb(){}fb.dictionary={start:["鍑哄彂","start"],startP:["璧风偣","start"],endP:["缁堢偣","destination"],startShort:["璧�","S"],endShort:["缁�","E"],via:["缁忚繃","via"],waypoint:["閫旂粡鐐�","waypoint"],travel:["琛岄┒","travel"],route:["璺嚎","route"],arrive:["鍒拌揪","arrive"],"goto":["鍓嶅線","go to"],walk:["姝ヨ","walking"],ride:["楠戣","riding"],ebike:["鐢靛姩杞�","e-bike"],drive:["椹捐溅","driving"],take:["涔樺潗","take"],meter:["绫�","meter"],km:["鍏噷","kilometer"],m_2:["绫�","m"],km_2:["鍏噷","km"],feet:["鑻卞昂","feet"],mile:["鑻遍噷","mile"],days:["澶�","days"],hours:["灏忔椂","hours"],minutes:["鍒嗛挓","minutes"],total:["鍏�","total"],to:["鍒�","to"],towards:["鏈�","towards"],towards2:["鍚�","towards"],item:["鏉�","item"],onTheLeft:["宸︿晶鐨�","on the left"],onTheRight:["鍙充晶鐨�","on the right"],pass:["杩�","pass"],at:["鍦�","at"],leave:["绂诲紑","leave"],from:["浠�","from"],"continue":["缁х画","continue"],goStraight:["鐩磋蛋","go straight"],takeRightTurnAhead:["鍙冲墠鏂硅浆寮�","take a right turn ahead"],takeLeftTurnAhead:["宸﹀墠鏂硅浆寮�","take a left turn ahead"],takeRightTurnBehind:["鍙冲悗鏂硅浆寮�","take a right turn onto the road behind you"],takeLeftTurnBehind:["宸﹀悗鏂硅浆寮�","take a left turn onto the road behind you"],turnAround:["鍚戝悗杞�","turn around"],turnAround_2:["璋冨ご","turn around"],turnLeft:["宸﹁浆","turn left"],turnRight:["鍙宠浆","turn right"],keepLeft:["闈犲乏","keep left"],keepRight:["闈犲彸","keep right"],turnRightAhead:["鍚戝彸鍓嶆柟杞�","turn right ahead"],turnLeftAhead:["鍚戝乏鍓嶆柟杞�","turn left ahead"],turnRightBehind:["鍚戝彸鍚庢柟杞�","turn right behind"],turnLeftBehind:["鍚戝乏鍚庢柟杞�","turn left behind"],turnLeftAndContinueStraight:["宸﹁浆绌胯繃椹矾骞剁户缁悜鍓�","turn left across the street and continue straight"],turnRightAndContinueStraight:["鍙宠浆绌胯繃椹矾骞剁户缁悜鍓�","turn right across the street and continue straight"],turnLeftAndGoBack:["宸﹁浆绌胯繃椹矾骞跺線鍥炶蛋","turn left across the street and go back"],turnRightAndGoBack:["鍙宠浆绌胯繃椹矾骞跺線鍥炶蛋","turn right across the street and go back"],dueNorth:["姝e寳鏂瑰悜","due north"],northeast:["涓滃寳鏂瑰悜","northeast"],dueEast:["姝d笢鏂瑰悜","due east"],southeast:["涓滃崡鏂瑰悜","southeast"],dueSouth:["姝e崡鏂瑰悜","due south"],southwest:["瑗垮崡鏂瑰悜","southwest"],dueWest:["姝hタ鏂瑰悜","due west"],northwest:["瑗垮寳鏂瑰悜","northwest"],baidumap:["鐧惧害鍦板浘","Baidu Map"],address:["鍦板潃","address"],phone:["鐢佃瘽","phone"],detail:["璇︽儏","detail"],view:["鏌ョ湅","view"],more:["鏇村","more"],result:["缁撴灉","result"],search:["鎼滅储","search"],city:["鍩庡競","city"],list:["鍒楄〃","list"],home:["棣栭〉","home"],previous:["涓婁竴椤�","previous"],next:["涓嬩竴椤�","next"],previousStep:["涓婁竴姝�","previous step"],nextStep:["涓嬩竴姝�","next step"],getOn:["涓婅溅","get on"],getOff:["涓嬭溅","get off"],bus:["鍏氦杞�","bus"],subway:["鍦伴搧","subway"],transport:["浜ら�氬伐鍏�","transportation"],take:["涔樺潗","take"],"public":["鍏叡","public"],stopStation:["绔�","stop"],station:["绔�","station"],number:["娆�","number"],about:["绾�","about"],"delete":["鍒犻櫎","delete"],recommend:["鎺ㄨ崘","recommend"],chooseFor:["閫変负","choose for"],delPoint:["鍒犻櫎璇ョ偣","delete this point"],dragToChangeRoute:["鎷栧姩浠ユ洿鏀硅矾绾�","Drag to change route"],departFromStart:["浠庤捣鐐瑰嚭鍙�","depart from starting point"],arriveAtEnd:["鍒拌揪鐩殑鍦�","arrive at the destination"],lastEndTime:["棣栨湯杞︽椂闂�","first and last transit times"],ownCompany:["鎵�灞炲叕鍙�","operating company"],alongSubways:["娌跨嚎鍦伴搧绔�","subway stations along the route"],alongBusStops:["娌跨嚎鍏氦绔欑偣","bus stops along the route"],noLocResult:["鎶辨瓑锛屾湭鎵惧埌鐩稿叧鍦扮偣銆�","Sorry, no relevant locations found."],selectAccuratePoint:["璇烽�夋嫨鍑嗙‘鐨勮捣鐐广�侀�旂粡鐐规垨缁堢偣銆�","Please select an accurate starting point, via-point or destination."],invalidKey:["鎶辨瓑锛屾偍鎵�鎻愪緵鐨刱ey鏃犳晥銆�","Sorry, the key you provided is invalid."],roundabout:["鐜矝","roundabout"],unknownRoad:["鏃犲睘鎬ч亾璺�","unclassified road"],mainRoad:["涓昏矾","main road"],highwayConnector:["楂橀�熻繛鎺ヨ矾","highway connector"],roadSegWithinInter:["浜ゅ弶鐐瑰唴璺","road segment within intersection"],connectingRoad:["杩炴帴閬撹矾","connecting road"],parkInnerRoad:["鍋滆溅鍦哄唴閮ㄩ亾璺�","parking lot internal road"],serviceInnerRoad:["鏈嶅姟鍖哄唴閮ㄩ亾璺�","service area internal road"],bridge:["妗�","bridge"],pedeStreet:["姝ヨ琛�","pedestrian street"],serviceRoad:["杈呰矾","service road"],ramp:["鍖濋亾","ramp"],fullyEnclosedRoad:["鍏ㄥ皝闂亾璺�","fully enclosed road "],undefinedTrafficArea:["鏈畾涔変氦閫氬尯鍩�","undefined traffic area"],poiConnectorRoad:["POI杩炴帴璺�","POI connector road"],tunnel:["闅ч亾","tunnel"],footpath:["姝ヨ閬�","footpath"],busOnlyLane:["鍏氦涓撶敤閬�","bus-only lane"],advancedLeftLane:["鎻愬墠鍙宠浆閬�","advanced right-turn lane"]};fb.LetterEnum={DEFAULT:0,UPPER_FIRST:1,UPPER_ALL:2,LOWER_ALL:3};fb.SpaceEnum={DEFAULT:0,FRONT:1,END:2,BOTH:3};fb.getIndexByLanguage=function(e){switch(e){case BMAP_LANGUAGE_ZH:return 0;case BMAP_LANGUAGE_EN:return 1;default:return 0}};fb.translate=function(oM,oO,T){if(oO!==BMAP_LANGUAGE_EN&&oO!==BMAP_LANGUAGE_ZH){oO=BMAP_LANGUAGE_ZH}var oN={language:[BMAP_LANGUAGE_EN],singleLetter:fb.LetterEnum.DEFAULT,singleSpace:fb.SpaceEnum.DEFAULT,join:" "};Object.assign(oN,T||{});var oL=oM;if(!(oM instanceof Array)){oL=[oM]}var C=false;for(var oK=0;oK<oN.language.length;oK++){if(oN.language[oK]===oO){C=true}}for(var oK=0;oK<oL.length;oK++){oL[oK]=this.translateOne(oL[oK],oO);if(C){oL[oK]=this.letterParse(oL[oK],oN.singleLetter);oL[oK]=this.spaceParse(oL[oK],oN.singleSpace)}}var e="";if(C){e=oL.join(oN.join)}else{e=oL.join("")}return this.backDoFormat(e,oO,T||{})};fb.backDoFormat=function(e,oM,T){var oL={language:[BMAP_LANGUAGE_EN],space:fb.SpaceEnum.DEFAULT,letter:fb.LetterEnum.DEFAULT};Object.assign(oL,T);var C=false;for(var oK=0;oK<oL.language.length;oK++){if(oL.language[oK]===oM){C=true}}if(!C){return e}e=this.letterParse(e,oL.letter);e=this.spaceParse(e,oL.space);return e};fb.translateOne=function(e,T){if(T!==BMAP_LANGUAGE_EN&&T!==BMAP_LANGUAGE_ZH){T=BMAP_LANGUAGE_ZH}if(typeof e==="number"||(typeof e==="string"&&e.trim()==="")){return e}const i=this.dictionary[e];if(!i){return e}const C=i[this.getIndexByLanguage(T)];if(!C){return i[0]||e}return C};fb.letterParse=function(e,i){if(!e){return e}switch(i){case fb.LetterEnum.UPPER_FIRST:e=e[0].toUpperCase()+e.slice(1);break;case fb.LetterEnum.UPPER_ALL:e=e.toUpperCase();break;case fb.LetterEnum.LOWER_ALL:e=e.toLowerCase();break;default:break}return e};fb.spaceParse=function(e,i){if(!e){return e}switch(i){case fb.SpaceEnum.FRONT:e=" "+e;break;case fb.SpaceEnum.END:e=e+" ";break;case fb.SpaceEnum.BOTH:e=[" ",e," "].join("");break;default:break}return e};function ba(T,C){eX.call(this);this._loc={};this.setLocation(T);C=C||{};C.renderOptions=C.renderOptions||{};this._userSetLanguage=false;var e=ba._getLocType(T);var i=this;if(e===bZ){this._language=T.getLanguage();T.on("language_change",function(){if(!i._userSetLanguage){i._language=T.getLanguage()}})}else{this._language=BMAP_LANGUAGE_ZH}if(C.language&&(C.language===BMAP_LANGUAGE_ZH||C.language===BMAP_LANGUAGE_EN)){this._userSetLanguage=true;this._language=C.language}this._opts={renderOptions:{panel:C.renderOptions.panel||null,map:C.renderOptions.map||null,autoViewport:C.renderOptions.autoViewport||true,viewportOptions:C.renderOptions.viewportOptions||{},selectFirstResult:C.renderOptions.selectFirstResult,highlightMode:C.renderOptions.highlightMode,enableDragging:C.renderOptions.enableDragging||false,lineLayerStyle:C.renderOptions.lineLayerStyle||{},polylineStyle:C.renderOptions.polylineStyle||{},isTop:C.renderOptions.isTop||false,},onSearchComplete:C.onSearchComplete||function(){},onMarkersSet:C.onMarkersSet||function(){},onInfoHtmlSet:C.onInfoHtmlSet||function(){},onResultsHtmlSet:C.onResultsHtmlSet||function(){},onGetBusListComplete:C.onGetBusListComplete||function(){},onGetBusLineComplete:C.onGetBusLineComplete||function(){},onBusListHtmlSet:C.onBusListHtmlSet||function(){},onBusLineHtmlSet:C.onBusLineHtmlSet||function(){},onPolylinesSet:C.onPolylinesSet||function(){},reqFrom:C.reqFrom||""};if(typeof C!="undefined"&&typeof C.renderOptions!="undefined"&&typeof C.renderOptions["autoViewport"]!="undefined"){this._opts.renderOptions.autoViewport=C.renderOptions["autoViewport"]}else{this._opts.renderOptions.autoViewport=true}this._opts.renderOptions.panel=hv.G(this._opts.renderOptions.panel)}ba._getLocType=function(e){if(!e){return ji}if(typeof e=="string"){return m5}if(e instanceof d9||e instanceof d1){return cu}if(e instanceof li){return bZ}if(typeof e=="number"){return fM}return ji};ba.inherits(eX,"BaseSearch");hv.extend(ba.prototype,{getResults:function(){if(!this._isMultiKey){return this._results}else{return this._arrResults}},enableAutoViewport:function(){this._opts.renderOptions.autoViewport=true},disableAutoViewport:function(){this._opts.renderOptions.autoViewport=false},setLocation:function(e){if(!e){return}this._loc.src=e},setSearchCompleteCallback:function(e){this._opts.onSearchComplete=e||function(){}},setMarkersSetCallback:function(e){this._opts.onMarkersSet=e||function(){}},setPolylinesSetCallback:function(e){this._opts.onPolylinesSet=e||function(){}},setInfoHtmlSetCallback:function(e){this._opts.onInfoHtmlSet=e||function(){}},setResultsHtmlSetCallback:function(e){this._opts.onResultsHtmlSet=e||function(){}},getStatus:function(){return this._status}});var ee=function(oL,T){ba.call(this,oL,T);T=T||{};T.renderOptions=T.renderOptions||{};this.setPageCapacity(T.pageCapacity);this.setPageNum(T.pageNum);var e=T.renderOptions["selectFirstResult"];if(typeof e==="undefined"){e=K.uiVersionIsGL()}if(e){this.enableFirstResultSelection()}else{this.disableFirstResultSelection()}var oM=T.resultListRenderOptions||{};if(!this._opts.resultListRenderOptions){this._opts.resultListRenderOptions={}}var C=["displayPlaceImage","displayRating","displayTag","displayPrice","displayAddress","displayShopHours","displayFeaturedTag","displayComment","displayPaging","resetScrollOnPageChange"];hv.each(C,function(oN){if(typeof oM[oN]==="undefined"){oM[oN]=true}this._opts.resultListRenderOptions[oN]=Boolean(oM[oN])}.bind(this));this._opts.cityLimit=typeof T.cityLimit==="boolean"?T.cityLimit:true;this._opts.resultListRenderOptions.displayContactInformation=Boolean(oM.displayContactInformation);this._opts.resultListRenderOptions.contactInformationCount=typeof oM.contactInformationCount==="number"?oM.contactInformationCount:2;this._overlays=[];this._arrPois=[];this._curIndex=-1;this._queryList=[];var i=this;ki.load("localSearch",function(){i&&i._check()},true);if(T.renderOptions["map"]){var oK=T.renderOptions["map"];oK.on("destroy",function(){delete i})}};ee.inherits(ba,"LocalSearch");ee.DEFAULT_PAGE_CAPACITY=10;ee.MIN_PAGE_CAPACITY=1;ee.MAX_PAGE_CAPACITY=100;ee.DEFAULT_RADIUS=2000;ee.MAX_RADIUS=100000;ee.DEFAULT_PAGE_NUM=0;hv.extend(ee.prototype,{search:function(e,i){this._queryList.push({method:"search",arguments:[e,i]});kU.sendMessage("LocalSearch","search")},searchInBounds:function(e,C,i){this._queryList.push({method:"searchInBounds",arguments:[e,C,i]});kU.sendMessage("LocalSearch","searchInBounds")},searchNearby:function(C,i,e,T){this._queryList.push({method:"searchNearby",arguments:[C,i,e,T]});kU.sendMessage("LocalSearch","searchNearby")},clearResults:function(){delete this._json;delete this._status;delete this._results;delete this._ud;this._curIndex=-1;this._setStatus();if(this._opts.renderOptions.panel){this._opts.renderOptions.panel.innerHTML=""}},clearSelected:function(){},gotoPage:function(){},enableFirstResultSelection:function(){this._opts.renderOptions.selectFirstResult=true},disableFirstResultSelection:function(){this._opts.renderOptions.selectFirstResult=false},setPageCapacity:function(e){if(typeof e=="number"&&!isNaN(e)){this._opts.pageCapacity=e<1?ee.DEFAULT_PAGE_CAPACITY:(e>ee.MAX_PAGE_CAPACITY?ee.DEFAULT_PAGE_CAPACITY:e)}else{this._opts.pageCapacity=ee.DEFAULT_PAGE_CAPACITY}},getPageCapacity:function(){return this._opts.pageCapacity},setPageNum:function(e){if(typeof e=="number"&&!isNaN(e)&&e>=0){this._opts.pageNum=e}else{this._opts.pageNum=ee.DEFAULT_PAGE_NUM}},getPageNum:function(){return this._opts.pageNum},toString:function(){return"LocalSearch"}});function b5(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("Geocoder")}this._opts={};this.setOptions(i||{});this._queryList=[];var e=this;ki.load("otherSearch",function(){e._asyncSearch()})}b5.inherits(eX,"Geocoder");hv.extend(b5.prototype,{getPoint:function(e,C,i){kU.sendMessage("Geocoder","getPoint");this._queryList.push({method:"getPoint",arguments:[e,C,i]})},getLocation:function(e,C,i){kU.sendMessage("Geocoder","getLocation");this._queryList.push({method:"getLocation",arguments:[e,C,i]})},setOptions:function(e){hv.extend(this._opts,e||{});if(this._opts.language&&(this._opts.language===BMAP_LANGUAGE_ZH||this._opts.language===BMAP_LANGUAGE_EN)){this._language=this._opts.language}else{this._language=BMAP_LANGUAGE_ZH}},toString:function(){return"Geocoder"}});function eG(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("Geolocation")}e=e||{};this.config={timeout:e.timeout||1000*10,maximumAge:e.maximumAge||0,enableHighAccuracy:e.enableHighAccuracy===undefined?true:e.enableHighAccuracy,SDKLocation:e.SDKLocation||false};this._pendingCalls=[];var i=this;ki.load("otherSearch",function(){var C=i._pendingCalls.length;for(var T=0;T<C;T++){var oK=i._pendingCalls[T];i[oK.method].apply(i,oK.arguments)}})}hv.extend(eG.prototype,{getCurrentPosition:function(e,i){this._pendingCalls.push({method:"getCurrentPosition",arguments:arguments})},getStatus:function(){return BMAP_STATUS_UNKNOWN_LOCATION},enableSDKLocation:function(){if(c9()){this.config.SDKLocation=true}},disableSDKLocation:function(){this.config.SDKLocation=false}});function hX(){if(!K.apiVersionIsGL()){console.warn("[BMap] Boundary is deprecated, use BMap.DistrictLayer instead")}if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("Boundary")}this._queryList=[];var e=this;ki.load("otherSearch",function(){e._asyncSearch()})}hX.inherits(eX,"Boundary");hv.extend(hX.prototype,{get:function(i,e){this._queryList.push({method:"get",arguments:[i,e]})},toString:function(){return"Boundary"},parsebdStr:function(i,e){this._queryList.push({method:"parsebdStr",arguments:[i,e]})}});function hO(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("LocalCity")}i=i||{};i.renderOptions=i.renderOptions||{};this._opts={renderOptions:{map:i.renderOptions.map||null}};this._queryList=[];var e=this;ki.load("otherSearch",function(){e._asyncSearch()})}hO.inherits(eX,"LocalCity");hv.extend(hO.prototype,{get:function(e){this._queryList.push({method:"get",arguments:[e]})},toString:function(){return"LocalCity"}});function kA(e,C){eX.call(this);this.markersList=[];this.destList=[];this.pointsList=[];this._opts=C;this.json=e;this.map=this._opts.renderOptions.map||null;this.sType=this._opts.sType;this.infoWindow=null;this.curPointIndex=0;this.startName="";this.endIndex=1;this.endName="";this.resCity=[0,0,0,0,0,0,0];this.locPois=[];this.curPageIndex=[1,1,1,1,1,1,1];this.totalPage=[1,1,1,1,1,1,1];this.resCount=[0,0,0,0,0,0,0];this.resType=[0,0,0,0,0,0,0];this.qInfo=[{n:"",c:0,u:0,x:0,y:0,t:-1},{n:"",c:0,u:0,x:0,y:0,t:-1},{n:"",c:0,u:0,x:0,y:0,t:-1},{n:"",c:0,u:0,x:0,y:0,t:-1},{n:"",c:0,u:0,x:0,y:0,t:-1},{n:"",c:0,u:0,x:0,y:0,t:-1},{n:"",c:0,u:0,x:0,y:0,t:-1}];this.curSelectedIndex=-1;this.tpList=[];this.tpListInMap=[];this._language=C.language===undefined?BMAP_LANGUAGE_ZH:C.language;var i=this;ki.load("route",function(){})}kA.inherits(eX,"RouteAddr");function bH(T,C){hv.BaseClass.call(this);this._content=hv.G(T);this._defaultContentDisplay=this._content.style.display;if(this._defaultContentDisplay==="none"||!this._defaultContentDisplay){this._defaultContentDisplay="block"}this._opts=C||{};if(!this._opts.renderOptions){this._opts.renderOptions={}}var i={displayCarousel:true,displayTag:true,displayRating:true,displayPrice:true,displayBangdan:true,displayTradeTag:true,displayShopHours:true,displayContactInformation:true,contactInformationCount:Infinity,displayAddress:true,displayComment:false,displayCommentTotalCount:true};for(var e in i){if(this._opts.renderOptions.hasOwnProperty(e)){continue}this._opts.renderOptions[e]=i[e]}ki.load("place",function(){this._draw()}.bind(this))}bH.inherits(hv.BaseClass,"PlaceDetail");hv.extend(bH.prototype,{render:function(e){this._data=e},rerender:function(){if(!this._data){return}this.render(this._data)},setData:function(e){this._data=e},getContent:function(){return this._content},dispose:function(){if(!this._content){return}this._content.innerHTML="";this._content.style.display="none";if(this.overlay){this.overlay.closePlaceDetail()}}});hv.extend(bH,{parsePOIDetail:function(oL,T){if(K.uiVersionIsGL()){return}if(!oL.ext||!oL.ext.detail_info){return}var C=oL.ext.detail_info;var oM={image:C.image||undefined,rating:C.overall_rating||undefined,ratingSrc:C.overall_rating_src||undefined,tag:C.tag||undefined,price:C.price||undefined,shopHours:C.shop_hours||undefined,tradeTag:C.trade_tag||undefined};if(C.bangdan_head&&C.bangdan_head.bid_head){var oK=C.bangdan_head.bid_head;oM.bangdanHead={bidHead:{name:oK.name,rankS:oK.rank_s}}}if(C.comments&&C.comments.length){oM.comments=[];hv.each(C.comments,function(oO){var oN={content:bH.parseComment(oO.content),userName:bH.parseComment(oO.user_name)};oM.comments.push(oN)}.bind(this))}var e=oL.admin_info;if(e){oM.address=e.town_name||e.area_name||e.city_name}if(C.vs_content&&C.vs_content.invisible&&C.vs_content.invisible.bigdata&&C.vs_content.invisible.bigdata.photo_album){var i=C.vs_content.invisible.bigdata.photo_album;oM.album=[];hv.each(i,function(oN){oM.album.push({url:oN.url,type:oN.type,iconUrl:oN.icon_url})})}oM.commentNum=C.comment_num;oM.comments=[];hv.each((C.comments||[]),function(oO){var oN={cnName:oO.cn_name,commentPhoto:[],overallRating:oO.overall_rating,userLogo:oO.user_logo,userName:bH.parseComment(oO.user_name),content:bH.parseComment(oO.content),date:oO.date};hv.each((oO.comment_photo||[]),function(oP){oN.commentPhoto.push({picUrl:oP.pic_url})});oM.comments.push(oN)}.bind(this));T.v4aboveExt=oM},parseComment:function(oM){var i="";try{var oL=atob(oM);var C=Uint8Array.from(oL,function(e){return e.charCodeAt(0)});var T=new TextDecoder("utf-8").decode(C);i=T}catch(oK){}return i}});g2.prototype.openPlaceDetail=function(e,i){e.overlay=this;e._openPlaceDetailOpts=i;var C=this.map;if(!C){return}if(!C.temp){C.temp={}}C.temp._placeDetail=e};g2.prototype.closePlaceDetail=function(){var e=this.map;if(!e||!e.temp||!e.temp._placeDetail){return}e.temp._placeDetail.overlay=null;e.temp._placeDetail._openPlaceDetailOpts=null};function gX(C,i){ba.call(this,C,i);this.QUERY_TYPE_BUSLIST=e2;this.RETURN_TYPE_BUSLIST=ew;this.QUERY_TYPE_BUSLINE=gH;this.RETURN_TYPE_BUSLINE=gm;this._queryList=[];var e=this;ki.load("buslineSearch",function(){e._asyncSearch()})}var im=K.staticHost+"/wolfman/static/common/images/";gX._iconOpen=K.apiIMG+"/iw_plus.gif";gX._iconClose=K.apiIMG+"/iw_minus.gif";gX._stopUrl=im+"new/bus-stop-1x_ddd4723.png";gX.inherits(ba,"BusLineSearch");hv.extend(gX.prototype,{getBusList:function(e){kU.sendMessage("BusLineSearch","getBusList");this._queryList.push({method:"getBusList",arguments:[e]})},getBusLine:function(e){this._queryList.push({method:"getBusLine",arguments:[e]})},setGetBusListCompleteCallback:function(e){this._opts.onGetBusListComplete=e||function(){}},setGetBusLineCompleteCallback:function(e){this._opts.onGetBusLineComplete=e||function(){}},setBusListHtmlSetCallback:function(e){this._opts.onBusListHtmlSet=e||function(){}},setBusLineHtmlSetCallback:function(e){this._opts.onBusLineHtmlSet=e||function(){}},setPolylinesSetCallback:function(e){this._opts.onPolylinesSet=e||function(){}}});function mW(i){ba.call(this,i);i=i||{};this._options={input:i.input||null,suggestionCount:i.suggestionCount,showSuggestion:i.showSuggestion===undefined?true:i.showSuggestion,baseDom:i.baseDom||null,types:i.types||[],onSearchComplete:i.onSearchComplete||function(){},onConfirm:i.onConfirm,onHighlight:i.onHighlight};this._loc.src=i.location||"鍏ㄥ浗";this._word="";this._show=false;this._suggestion=null;this._inputValue="";this._initialize();var e=this;ki.load("autocomplete",function(){e._asyncSearch()},true)}mW.inherits(ba,"Autocomplete");hv.extend(mW.prototype,{_initialize:function(){},show:function(){this._show=true},hide:function(){this._show=false},setTypes:function(e){this._options.types=e},setLocation:function(e){this._loc.src=e},search:function(e){kU.sendMessage("Autocomplete","search");this._word=e},setInputValue:function(e){this._inputValue=e},setSearchCompleteCallback:function(e){this._options.onSearchComplete=e}});var oa=function(i,e){ba.call(this,i,e)};hv.inherit(oa,ba,"BaseRoute");oa.STYLE_BUCKETS=["transit","walking","driving","riding","highlight","jumpLine","decorate"];oa.STYLE_BUCKET_BY_TYPE={0:"transit",1:"transit",2:"walking",3:"driving",4:"highlight",5:"highlight",6:"riding",7:"riding",8:"highlight"};hv.extend(oa.prototype,{clearResults:function(){},setPolylineStyle:function(i){var e=this._opts.renderOptions;e.polylineStyle=hv.extend(e.polylineStyle||{},i);if(this._restylePolylines){this._restylePolylines()}}});window.BMAP_TRANSIT_POLICY_RECOMMEND=0;window.BMAP_TRANSIT_POLICY_LEAST_TIME=4;window.BMAP_TRANSIT_POLICY_LEAST_TRANSFER=1;window.BMAP_TRANSIT_POLICY_LEAST_WALKING=2;window.BMAP_TRANSIT_POLICY_AVOID_SUBWAYS=3;window.BMAP_TRANSIT_POLICY_FIRST_SUBWAYS=5;window.BMAP_LINE_TYPE_BUS=0;window.BMAP_LINE_TYPE_SUBWAY=1;window.BMAP_LINE_TYPE_FERRY=2;window.BMAP_LINE_TYPE_TRAIN=3;window.BMAP_LINE_TYPE_AIRPLANE=4;window.BMAP_LINE_TYPE_COACH=5;var l1=3;var gj=4;var az=1;var lY=2;var bE=5;var ez=6;window.BMAP_TRANSIT_TYPE_IN_CITY=0;window.BMAP_TRANSIT_TYPE_CROSS_CITY=1;window.BMAP_TRANSIT_PLAN_TYPE_ROUTE=0;window.BMAP_TRANSIT_PLAN_TYPE_LINE=1;window.BMAP_TRANSIT_TYPE_POLICY_TRAIN=0;window.BMAP_TRANSIT_TYPE_POLICY_AIRPLANE=1;window.BMAP_TRANSIT_TYPE_POLICY_COACH=2;window.BMAP_INTERCITY_POLICY_LEAST_TIME=0;window.BMAP_INTERCITY_POLICY_EARLY_START=1;window.BMAP_INTERCITY_POLICY_CHEAP_PRICE=2;function hh(C,i){oa.call(this,C,i);i=i||{};this.setPolicy(i.policy);this.setIntercityPolicy(i.intercityPolicy);this.setTransitTypePolicy(i.transitTypePolicy);this.setPageCapacity(i.pageCapacity);this.QUERY_TYPE=kc;this.RETURN_TYPE=hp;this.ROUTE_TYPE=k6;this._overlays=[];this._curIndex=-1;this._opts._enableTraffic=i.enableTraffic||false;this._queryList=[];var e=this;ki.load("route",function(){e._asyncSearch()},true)}hh.MAX_PAGE_CAPACITY=100;hh.LINE_TYPE_MAPPING=[0,1,0,0,0,0,0,0,2,0,0,0,1,1,1];hh.LINE_TYPE_MAPPING_CROSS_CITY=[0,3,4,0,0,0,5];hv.inherit(hh,oa,"TransitRoute");hv.extend(hh.prototype,{setPolicy:function(e){if(e>=BMAP_TRANSIT_POLICY_RECOMMEND&&e<=BMAP_TRANSIT_POLICY_FIRST_SUBWAYS){this._opts.policy=e}else{this._opts.policy=BMAP_TRANSIT_POLICY_RECOMMEND}},setIntercityPolicy:function(e){if(e>=BMAP_INTERCITY_POLICY_LEAST_TIME&&e<=BMAP_INTERCITY_POLICY_CHEAP_PRICE){this._opts.intercityPolicy=e}else{this._opts.intercityPolicy=BMAP_INTERCITY_POLICY_LEAST_TIME}},setTransitTypePolicy:function(e){if(e>=BMAP_TRANSIT_TYPE_POLICY_TRAIN&&e<=BMAP_TRANSIT_TYPE_POLICY_COACH){this._opts.transitTypePolicy=e}else{this._opts.transitTypePolicy=BMAP_TRANSIT_TYPE_POLICY_TRAIN}},_internalSearch:function(i,e){this._queryList.push({method:"_internalSearch",arguments:[i,e]})},search:function(i,e){kU.sendMessage("TransitRoute","search");this._queryList.push({method:"search",arguments:[i,e]})},setPageCapacity:function(e){if(typeof e==="string"){e=parseInt(e,10);if(isNaN(e)){this._opts.pageCapacity=hh.MAX_PAGE_CAPACITY;return}}if(typeof e!=="number"){this._opts.pageCapacity=hh.MAX_PAGE_CAPACITY;return}if(e>=1&&e<=hh.MAX_PAGE_CAPACITY){this._opts.pageCapacity=Math.round(e)}else{this._opts.pageCapacity=hh.MAX_PAGE_CAPACITY}},toString:function(){return"TransitRoute"},_shortTitle:function(e){return e.replace(/\(.*\)/,"")}});window.BMAP_HIGHLIGHT_STEP=1;window.BMAP_HIGHLIGHT_ROUTE=2;var ek=function(e,T){oa.call(this,e,T);this._overlays=[];this._curIndex=-1;this._queryList=[];var C=this;var i=this._opts.renderOptions;if(i.highlightMode!==BMAP_HIGHLIGHT_STEP&&i.highlightMode!==BMAP_HIGHLIGHT_ROUTE){i.highlightMode=BMAP_HIGHLIGHT_STEP}this._enableDragging=this._opts.renderOptions.enableDragging?true:false;ki.load("route",function(){C._asyncSearch()},true);if(this.init_d){this.init_d()}};ek.ROAD_TYPE=["","roundabout","unknownRoad","mainRoad","highwayConnector","roadSegWithinInter","connectingRoad","parkInnerRoad","serviceInnerRoad","bridge","pedeStreet","serviceRoad","ramp","fullyEnclosedRoad","undefinedTrafficArea","poiConnectorRoad","tunnel","footpath","busOnlyLane","advancedLeftLane",];hv.inherit(ek,oa,"DWRoute");hv.extend(ek.prototype,{search:function(C,e,i){kU.sendMessage(this._className,"search");this._queryList.push({method:"search",arguments:[C,e,i]})}});var mB=function(e,oK){oa.call(this,e,oK);this._overlays=[];this._queryList=[];var T=this;this.map=oK.renderOptions.map;this._enableDragging=this._opts.renderOptions.enableDragging?true:false;this._lineLayerStyle={lineLayerColor:this._opts.renderOptions.lineLayerStyle.lineLayerColor||{color:"#0089ff",opacity:1},isTop:this._opts.renderOptions.isTop||false,showTraffic:this._opts.renderOptions.lineLayerStyle.showTraffic||false,sequence:this._opts.renderOptions.sequence||true,marginLength:this._opts.renderOptions.marginLength||32,borderColor:this._opts.renderOptions.lineLayerStyle.borderColor||"#0089ff",borderMask:this._opts.renderOptions.lineLayerStyle.borderMask||false,borderWeight:this._opts.renderOptions.lineLayerStyle.borderWeight||2,strokeWeight:this._opts.renderOptions.lineLayerStyle.strokeWeight||6,strokeLineJoin:this._opts.renderOptions.lineLayerStyle.strokeLineJoin||"round",strokeLineCap:this._opts.renderOptions.lineLayerStyle.strokeLineCap||"round",strokeTextureUrl:K.apiIMG+"/up-to.png",strokeTextureWidth:this._opts.renderOptions.lineLayerStyle.strokeTextureWidth||32,strokeTextureHeight:this._opts.renderOptions.lineLayerStyle.strokeTextureHeight||64,};if(this._opts.renderOptions.lineLayerStyle.strokeTextureUrl){this._lineLayerStyle.strokeTextureUrl=this._opts.renderOptions.lineLayerStyle.strokeTextureUrl}else{if(this._opts.renderOptions.lineLayerStyle.strokeTextureUrl===null){delete this._lineLayerStyle.strokeTextureUrl}}if(this.map){this._menu=new BMapGL.ContextMenu();var i=fb.translate("delPoint",this._language);var C=new lx(i,function(oN,oM,oL){T._deleteVia(oL.curNo-1)},60);this._menu.addItem(C);this.map.addContextMenu(this._menu,true);this.map.addEventListener("onlanguage_change",function(oL){C.setText(fb.translate("delPoint",T.map.getLanguage()))})}ki.load("route",function(){T._asyncSearch()},true);if(this.init_d){this.init_d()}};hv.inherit(mB,oa,"LineLayerRoute");hv.extend(mB.prototype,{search:function(C,e,i){kU.sendMessage(this._className,"search");this._queryList.push({method:"search",arguments:[C,e,i]})}});window.BMAP_DRIVING_POLICY_DEFAULT=0;window.BMAP_DRIVING_POLICY_DESTANCE=2;window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS=3;window.BMAP_DRIVING_POLICY_FIRST_HIGHWAYS=4;window.BMAP_DRIVING_POLICY_AVOID_CONGESTION=5;window.BMAP_DRIVING_POLICY_AVOID_PAY=6;window.BMAP_DRIVING_POLICY_HIGHWAYS_AVOID_CONGESTION=7;window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS_CONGESTION=8;window.BMAP_DRIVING_POLICY_AVOID_CONGESTION_PAY=9;window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS_CONGESTION_PAY=10;window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS_PAY=11;window.BMAP_DRIVING_POLICY_DISTANCE_PRIORITY=12;window.BMAP_DRIVING_POLICY_TIME_PRIORITY=13;window.BMAP_TRAFFICE_STATUS_NONE=0;window.BMAP_TRAFFICE_STATUS_NORMAL=1;window.BMAP_TRAFFICE_STATUS_SLOW=2;window.BMAP_TRAFFICE_STATUS_JAM=3;function dY(i,C){ek.call(this,i,C);C=C||{};var e=!K.apiVersionIsGL();this._opts._enableTraffic=(typeof C.enableTraffic==="boolean")?C.enableTraffic:e;this.setPolicy(C.policy);this.alternatives=C.alternatives?1:0;this.avoidFerry=C.avoidFerry?1:0;this.QUERY_TYPE=bo;this.RETURN_TYPE=a2;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_DRIVING;kU.sendMessage("DrivingRoute","search")}function iS(e,i){mB.call(this,e,i);i=i||{};this.setPolicy(i.policy);this.alternatives=i.alternatives?1:0;this.avoidFerry=i.avoidFerry?1:0;this.QUERY_TYPE=bo;kU.sendMessage("DrivingRoute","searchLine")}hv.inherit(iS,mB,"DrivingRouteLine");hv.inherit(dY,ek,"DrivingRoute");dY.prototype.setPolicy=function(e){if(e>=BMAP_DRIVING_POLICY_DEFAULT&&e<=BMAP_DRIVING_POLICY_TIME_PRIORITY){this._opts.policy=e}else{this._opts.policy=BMAP_DRIVING_POLICY_DEFAULT}};iS.prototype.setPolicy=function(e){if(e>=BMAP_DRIVING_POLICY_DEFAULT&&e<=BMAP_DRIVING_POLICY_TIME_PRIORITY){this._opts.policy=e}else{this._opts.policy=BMAP_DRIVING_POLICY_DEFAULT}};function h3(e,i){ek.call(this,e,i);this.QUERY_TYPE=lL;this.RETURN_TYPE=jc;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_WALKING;this._enableDragging=false}hv.inherit(h3,ek,"WalkingRoute");function eT(e,i){ek.call(this,e,i);this.QUERY_TYPE=kY;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_RIDING;this._enableDragging=false}hv.inherit(eT,ek,"RidingRoute");function cH(e,i){eT.call(this,e,i);this.QUERY_TYPE=mZ}hv.inherit(cH,eT,"EBikeRoute");function ak(e,i){mB.call(this,e,i);i=i||{};if(i.renderOptions&&i.renderOptions["lineType"]!==undefined){this._lineType=i.renderOptions["lineType"]}else{this._lineType=0}this.QUERY_TYPE=dg;this.setPolicy(i.policy)}hv.inherit(ak,mB,"TruckRoute");ak.prototype.setPolicy=function(e){if(e>=BMAP_DRIVING_POLICY_DEFAULT&&e<=BMAP_DRIVING_POLICY_AVOID_CONGESTION){this._opts.policy=e}else{this._opts.policy=BMAP_DRIVING_POLICY_DEFAULT}};window.BMAP_MODE_DRIVING="driving";window.BMAP_MODE_TRANSIT="transit";window.BMAP_MODE_WALKING="walking";window.BMAP_MODE_NAVIGATION="navigation";var bO={web:K.urlProtocol+"//" + window.location.host + "/bmap-api/direction?",android:"bdapp://map/direction?",ios:"baidumap://map/direction?"};function mx(e){this.opts=e||{}}hv.extend(mx.prototype,{routeCall:function(T,e,C){var i=this;ki.load("route",function(){i._asyncSearch(T,e,C)})}});function dB(e,oO){var C=180/Math.pow(2,oO);var T=c9()?2:1;var i=e.width;var oM=e.height;var oP=i/oM>1?oM:i;var oL=C/oP;var oK=Math.floor(oO)+T;var oN=360/(Math.pow(2,oK-2)*2*oL);while(oN>512){oK++;oN=360/(Math.pow(2,oK-2)*2*oL)}if(oK>f.TILE_MAX_ZOOM){oN=oN*Math.pow(2,oK-f.TILE_MAX_ZOOM);oK=f.TILE_MAX_ZOOM}else{if(oK<f.TILE_MIN_ZOOM){oN=oN/Math.pow(2,f.TILE_MIN_ZOOM-oK);oK=f.TILE_MIN_ZOOM}}return{imgZoom:oK,displayTileSize:Math.round(oN)}}function kx(C,e){var i=0;if(C!==0&&e!==0){i=hJ(Math.atan(C/e));i=(i+90)%90;if(C>0&&e<0){i+=90}else{if(C<0&&e<0){i+=180}else{if(C<0&&e>0){i+=270}}}}else{if(C===0){i=e<0?180:0}else{if(e===0){i=C>0?90:270}}}return Math.round(i)}function k2(){var i=navigator.userAgent.match(/android [\d._]+/gi);if(!i||!i.length){return 0}var e=i[0].match(/[\d]+/);return e?parseInt(e[0],10):0}function dh(C){if(C===false){return false}if(typeof dh._supportWebGL==="boolean"){return dh._supportWebGL}var T=false;if(!window.WebGLRenderingContext){T=false}else{if(lt()&&k2()<5){T=false}else{try{var i=document.createElement("canvas");T=!!(i.getContext("webgl")||i.getContext("experimental-webgl"))}catch(oK){T=false}}}dh._supportWebGL=T;return T}function dF(){if(typeof dF._useThumb==="boolean"){return dF._useThumb}var e=navigator.userAgent;dF._useThumb=!!(d4()||e.indexOf("Chrome")>-1||e.indexOf("SAMSUNG-GT-I9508")>-1);return dF._useThumb}function h1(oO,oM){if(!oO||!oM){return 0}var C=oO.lat;var i=oM.lat;var oS=oO.lng;var oN=oM.lng;var T=6371000;var oP=mn(C);var oL=mn(i);var e=mn(i-C);var oR=mn(oN-oS);var oQ=Math.sin(e/2)*Math.sin(e/2)+Math.cos(oP)*Math.cos(oL)*Math.sin(oR/2)*Math.sin(oR/2);var oK=2*Math.atan2(Math.sqrt(oQ),Math.sqrt(1-oQ));return T*oK}function dx(e){return e-Math.floor(e/360)*360}var hU=[K.urlProtocol+"//" + window.location.host + "/bmap-sv0/",K.urlProtocol+"//" + window.location.host + "/bmap-sv1/"];function nN(e){if(typeof e!=="number"){return K.panoTilePath}return hU[Math.abs(e)%hU.length]}function ol(e){var oL=e.split("//");if(oL.length>=2){var oK=oL[1].split("?");if(oK.length>=1){var oN=oK[0].split("/");var C=1;if(window.urlSplitBeginIndex){C=window.urlSplitBeginIndex}var oM="";for(var T=C;T<=oN.length-1;T++){if(T===oN.length-1){oM+=oN[T]}else{oM+=oN[T]+"/"}}return{host:oK[0],origin:oL[0]+"//"+oN[0],path:"/"+oM}}}return null}function eF(oK,oL){var T=(Math.random()*100000).toFixed(0);var C="_panoCbk"+T;var i=false;cv._rd=cv._rd||{};cv._rd[C]=function(oM){i=true;delete cv._rd[C];oL&&oL(oM)};var e=oK+"&callback="+h6+"._rd."+C;e+=np()(e);jW.load(e,null,function(){if(i){return}i=true;delete cv._rd[C];oL&&oL(undefined)})}function jB(T,e){var C=!!(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]);var i=K.apiHost+"/?qt="+T+"&v="+ep();if(!C){i+="&ak="+((typeof hj!=="undefined")?hj:"")}return i+(e||"")}function k3(e){return !!(e&&e.error!==undefined&&e.error===0)}function gT(e){eF(jB("pano_entry"),e)}function iA(e){if(e===undefined){return true}return k3(e)}function n3(){alert("鎮ㄩ渶瑕佺敵璇峰叏鏅湴鍥炬湇鍔′娇鐢ㄦ潈闄�")}var cg=(function(){var i=null;var e=0;return function(C){e+=C;if(i){return}i=setTimeout(function(){var T=e;e=0;i=null;eF(jB("pano_count","&consume="+T),function(oK){if(k3(oK)){return}gT(function(oL){if(!k3(oL)){n3()}})})},5000)}})();function b9(oO,i){var oN="SJvEY5h37ZDh5pHS";var C=1800;var oM=Date.parse(new Date());var T=oM/1000;var oL=(typeof hj!=="undefined")?hj:"";var e=oO+"-"+(T+C)+"-"+oM+"-"+oL+"-"+oN;var oK=md5(e);i=i||{};if(i.isCounter!==false){cg(i.counter||1)}return"auth_key="+(T+C)+"-"+oM+"-"+oL+"-"+oK}function du(i,C){var e=ol(i);if(e){return i+"&"+b9(e.path,C)}return i}function ec(){eX.call(this);this._overlayId="PanoramaOverlay_"+this.hashCode;this._pano=null;this._visible=true}ec.inherits(eX,"PanoramaOverlayBase");hv.extend(ec.prototype,{getOverlayId:function(){return this._overlayId},initialize:function(){},remove:function(){},_setOverlayProperty:function(){}});var mY=0;function f(i,e){if(!(this instanceof f)){return new f(i,e)}if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("Panorama")}eX.call(this);this._guid=f.getGUID();this._container=f._getContainer(i);var T=null;var oK=null;if(e){if(e instanceof li){oK=e}else{T=e;oK=e.map||null}}this._opts={enableScrollWheelZoom:true,visible:true,indoorExitControl:true,indoorFloorControl:false,linksControl:true,clickOnRoad:!K.apiVersionIsGL(),navigationControl:true,closeControl:true,indoorSceneSwitchControl:true,albumsControl:false,albumsControlOptions:{},copyrightControlOptions:{},forceCloseControl:false,haveBreakId:false,hideOverlays:false};this.setOptions(T);this._type="panorama";this._map=oK;this._data=null;this._tmpDataId=null;this._id=null;this._iid=null;this._lastId=null;this._position=null;this._lastPosition=null;this._distanceToLast=0;this._pov={heading:0,pitch:0};this._zoom=1;this._maxZoom=f.MAX_ZOOM;this._minZoom=f.MIN_ZOOM;this._tileMaxZoom=f.TILE_MAX_ZOOM;this._pitchLimit=null;this._links=[];this._topos=[];this._description="";this._relevants=[];this._mode=null;this._sceneType="street";this._visiblePOIType="none";this._nextPanoOptions=null;this._panoOverlays=[];this._isDraw=false;var C=this;if(oK&&oK.on){oK.on("destroy",function(){C.destroy()})}if(this._opts._lazyLoad!==true){this._load()}}f.inherits(eX,"Panorama");f.MIN_ZINDEX=1200;f.getMinZIndex=function(){return K.apiVersionIsGL()?20:f.MIN_ZINDEX};f.MAX_ZOOM=4;f.MIN_ZOOM=1;f.TILE_MAX_ZOOM=5;f.TILE_MIN_ZOOM=4;f.getGUID=function(){return"pano_"+(mY++)+"_"+(+new Date())};f._getContainer=function(e){if(!e){return null}if(typeof e!=="string"){return e}if(e.charAt(0)==="#"){return document.getElementById(e.slice(1))}return document.getElementById(e)};cv._panoRegister=cv._panoRegister||[];cv.panoRegister=function(e){if(typeof e==="function"){cv._panoRegister.push(e)}};f.GL_EVENT_PAYLOADS={ondataload:function(i){return{data:i.data&&i.data.glData?i.data.glData:i.data}},onposition_changed:function(C,i){return i.getPosition()},onpov_changed:function(T,i){var C=i.getPov();return{heading:C.heading,pitch:C.pitch}},onid_changed:function(C,i){return C.id||i.getId()},onscene_type_changed:function(C,i){return{type:i.getSceneType()}},onzoom_changed:function(i){return{noAnimation:!!i.noAnimation}},onoverlay_add:function(i){return i.overlay},onoverlay_remove:function(i){return i.overlay},onclick:function(i){return i.domEvent||i},ondblclick:function(i){return i.domEvent||i},ontouchstart:function(i){return i.domEvent||i},ontouchend:function(i){return i.domEvent||i}};hv.extend(f.prototype,{_load:function(){if(this._loadStarted){return}this._loadStarted=true;var e=this;gT(function(i){if(!iA(i)){n3();return}ki.load("panorama",function(){e._draw()},true)})},addEventListener:function(oL,oK,C){var i=oL.indexOf("on")===0?oL:"on"+oL;var T=f.GL_EVENT_PAYLOADS[i];if(!K.apiVersionIsGL()||!T||typeof oK!=="function"||this._bindingInternal){return eX.prototype.addEventListener.call(this,oL,oK,C)}var e=this;var oM=function(oN){return oK.call(this,T(oN,e))};eX.prototype.addEventListener.call(this,oL,oM,C);oK.hashCode=oM.hashCode},on:function(C,i,e){return this.addEventListener(C,i,e)},_draw:function(){},getContainer:function(){return this._container},getContainerSize:function(){if(!this._container){return new mU(0,0)}return new mU(this._container.clientWidth,this._container.clientHeight)},getId:function(){return this._id},getIid:function(){return this._iid},getPosition:function(){return this._position},getPov:function(){return this._pov},getZoom:function(){return this._zoom},getLinks:function(){if(K.apiVersionIsGL()){return this._topos||[]}return this._links},getDescription:function(){return this._description},getRelevants:function(){return this._relevants},getMode:function(){return this._mode},getSceneType:function(){return this._sceneType},getVisible:function(){return this._opts.visible},setId:function(C,i,e){this._load();if(i&&typeof i==="object"){e=i;i=null}e=e||{};this._lastId=this._id;this._lastPosition=this._position;this._id=C;this._position=null;if(i){this._sceneType=i}if(e.pov){this.setPov(e.pov)}this._nextPanoOptions=e},setPosition:function(e){if(!e){return}this._load();this._lastId=this._id;this._lastPosition=this._position;this._id=null;this._position=e},setPov:function(e){if(!e){return}var C=typeof e.heading==="number"?e.heading:this._pov.heading;var i=typeof e.pitch==="number"?e.pitch:this._pov.pitch;this._pov={heading:dx(C),pitch:i}},setZoom:function(e){if(typeof e!=="number"){return}this._zoom=Math.max(this._minZoom,Math.min(this._maxZoom,e))},setPitchLimit:function(i,e){this._pitchLimit={min:i,max:e}},setPanoramaPOIType:function(e){this._visiblePOIType=e},setMap:function(e){this._map=e},getMap:function(){return this._map},setOptions:function(C){if(!C){return}if(C.closeControl===true){this._opts.forceCloseControl=true}if(C.closeControl===false){this._opts.forceCloseControl=false}for(var i in C){if(!C.hasOwnProperty(i)){continue}var T=C[i];var e=this._opts[i];if(T&&typeof T==="object"&&!(T instanceof Array)&&e&&typeof e==="object"&&!(e instanceof Array)){this._opts[i]=hv.extend(e,T)}else{this._opts[i]=T}}},show:function(){this._load();this._opts.visible=true},hide:function(){this._opts.visible=false},enableScrollWheelZoom:function(){this._opts.enableScrollWheelZoom=true},disableScrollWheelZoom:function(){this._opts.enableScrollWheelZoom=false},addOverlay:function(e){if(!e){return}this._panoOverlays.push(e)},removeOverlay:function(e){if(!e){return}for(var C=0;C<this._panoOverlays.length;C++){if(this._panoOverlays[C]===e){this._panoOverlays.splice(C,1);break}}},clearOverlays:function(){this._panoOverlays=[]},showOverlays:function(){this._opts.hideOverlays=false},hideOverlays:function(){this._opts.hideOverlays=true},exitInter:function(){},clear:function(){},destroy:function(){},getBaiduMapUrl:function(){return K.mapHost+"/?panotype=street&pid="+(this._id||"")+"&panoid="+(this._id||"")+"&l=17&tn=B_NORMAL_MAP&sc=0&newmap=1&shareurl=1"}});window.BMAP_PANORAMA_POI_HOTEL="hotel";window.BMAP_PANORAMA_POI_CATERING="catering";window.BMAP_PANORAMA_POI_MOVIE="movie";window.BMAP_PANORAMA_POI_TRANSIT="transit";window.BMAP_PANORAMA_POI_INDOOR_SCENE="indoor_scene";window.BMAP_PANORAMA_POI_NONE="none";window.BMAP_PANORAMA_INDOOR_SCENE="inter";window.BMAP_PANORAMA_STREET_SCENE="street";function gf(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("PanoramaCoverageLayer")}kT.call(this,{transparentPng:true,dataType:1,cacheSize:32});this._opts=hv.extend(this._opts||{},e||{});this.zIndex=110}gf.inherits(kT,"PanoramaCoverageLayer");gf.UDT="20150114";hv.extend(gf.prototype,{getTilesUrl:function(T,C){var i=nN(Math.abs(T.x)+Math.abs(T.y));var e=i+"?udt="+gf.UDT+"&qt=tile&styles=pl&x="+T.x+"&y="+T.y+"&z="+C;e=e.replace(/-(\d+)/gi,"M$1");return du(e,{isCounter:false})},isTransparentPng:function(){return true}});function hk(e,C){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("PanoramaService")}this._pano=e||null;this._opts=C||{};this._queryList=[];var i=this;ki.load("panorama",function(){i._asyncSearch()},true)}hk.inherits(eX,"PanoramaService");hv.extend(hk.prototype,{getPanoramaById:function(i,e){this._queryList.push({method:"getPanoramaById",arguments:[i,e]})},getPanoramaByLocation:function(i,e,C){this._queryList.push({method:"getPanoramaByLocation",arguments:[i,e,C]})},getVisiblePOIs:function(i,e,C,T){this._queryList.push({method:"getVisiblePOIs",arguments:[i,e,C,T]})},getRecommendPanosById:function(i,e){this._queryList.push({method:"getRecommendPanosById",arguments:[i,e]})},getPanoramaVersions:function(e){this._queryList.push({method:"getPanoramaVersions",arguments:[e]})},checkPanoSupportByCityCode:function(e,i){this._queryList.push({method:"checkPanoSupportByCityCode",arguments:[e,i]})},getPanoramaByPOIId:function(e,i){this._queryList.push({method:"getPanoramaByPOIId",arguments:[e,i]})},getCopyrightProviders:function(e){this._queryList.push({method:"getCopyrightProviders",arguments:[e]})},toString:function(){return"PanoramaService"}});cv.panoRegister(function(e){new hk(e,{from:"api"})});function hR(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("PanoramaControl")}jM.call(this);e=e||{};this._opts={printable:false,offset:e.offset,anchor:e.anchor};this._isOn=false;this._timerId=null;this._panoCoverageLayer=new gf({from:"api"});this._panoService=new hk(null,{from:"api"});this.defaultAnchor=gv.TOP_RIGHT;this.defaultOffset=new mU(10,10);this.setAnchor(e.anchor);this._asyncLoadCode()}hR.inherits(jM,"PanoramaControl");hv.extend(hR.prototype,{_asyncLoadCode:function(){var e=this;ki.load("panorama",function(){if(e._asyncDraw){e._asyncDraw()}},true)},initialize:function(e){this._map=e;return this._container}});function ad(T,C){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("PanoramaLabel")}ec.call(this);var i={position:null,altitude:2,displayDistance:true};C=C||{};for(var e in C){if(C.hasOwnProperty(e)){i[e]=C[e]}}this._opts=i;this._content=T;this._position=i.position;this._altitude=i.altitude;this._displayDistance="displayDistance" in C?!!C.displayDistance:!C.hideDistance}ad.inherits(ec,"PanoramaLabel");hv.extend(ad.prototype,{setPosition:function(e){this._position=e;this._setOverlayProperty("position",e)},getPosition:function(){return this._position},setContent:function(e){this._content=e;this._setOverlayProperty("content",e)},getContent:function(){return this._content},setAltitude:function(e){this._altitude=e;this._setOverlayProperty("altitude",e)},getAltitude:function(){return this._altitude},getPov:function(){return null},show:function(){this._visible=true;this._setOverlayProperty("visible",true)},hide:function(){this._visible=false;this._setOverlayProperty("visible",false)}});function fa(e,T){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("PanoramaMarker")}ec.call(this);var C={icon:"",title:"",panoInfo:null,altitude:2};T=T||{};for(var i in T){if(T.hasOwnProperty(i)){C[i]=T[i]}}this._opts=C;this._position=e;this._icon=C.icon;this._title=C.title;this._altitude=C.altitude;this._panoInfo=C.panoInfo;this._pov={heading:0,pitch:0}}fa.inherits(ec,"PanoramaMarker");hv.extend(fa.prototype,{setPosition:function(e){this._position=e;this._setOverlayProperty("position",e)},getPosition:function(){return this._position},setTitle:function(e){this._title=e;this._setOverlayProperty("title",e)},getTitle:function(){return this._title},setIcon:function(e){this._icon=e;this._setOverlayProperty("icon",e)},getIcon:function(){return this._icon},setAltitude:function(e){this._altitude=e;this._setOverlayProperty("altitude",e)},getAltitude:function(){return this._altitude},getPanoInfo:function(){return this._panoInfo},getPov:function(){return this._pov},show:function(){this._visible=true;this._setOverlayProperty("visible",true)},hide:function(){this._visible=false;this._setOverlayProperty("visible",false)}});var hi=(function(){var oM=(window.location.protocol==="http:"?"http:":"https:")+"//" + window.location.host + "/bmap-api/res/webgl/10/";var oO=null;var oQ=null;var oS=null;var oP={BMAP_AUTHENTIC_KEY:1,BMAP_QT_VERSION:1,BMAP_DEFAULT_API_VERSION:1,BMAP_DEFAULT_UI_VERSION:1,BMAP_SECKEY:1,BMAP_HOST_TYPE:1};function C(oV){if(!oV||typeof window==="undefined"){return}for(var oT in window){if(!Object.prototype.hasOwnProperty.call(window,oT)){continue}if(oT.indexOf("BMAP_")!==0){continue}if(oP[oT]){continue}try{oV[oT]=window[oT]}catch(oU){}}}function oN(oT){if(typeof oT==="string"){var oU=oT.toLowerCase();if(oU==="gl"||oU==="webgl"){return"gl"}}return"4.0"}function oK(oT){oT=oN(oT);if(K){K.apiVersion=oT}if(typeof oQ==="function"){oQ(oT,oO)}if(oT!=="gl"&&oO){C(oO)}}function e(oT){oT=oN(oT);if(K){K.uiVersion=oT}oL(oT);if(typeof oS==="function"){oS(oT,oO)}}function T(o0){var oZ=window.document;var oX=oZ.querySelectorAll?oZ.querySelectorAll("link[data-bmapgl-ui]"):[];var oY=false;for(var oV=0;oV<oX.length;oV++){var oW=oX[oV];if(oW.getAttribute("data-bmapgl-ui")===o0){if(oY&&oW.parentNode){oW.parentNode.removeChild(oW)}else{oY=true}continue}if(oW.parentNode){oW.parentNode.removeChild(oW)}}if(!oY){var oU=oZ.createElement("link");oU.setAttribute("rel","stylesheet");oU.setAttribute("type","text/css");oU.setAttribute("data-bmapgl-ui",o0);oU.href=oM+(o0==="gl"?"bmap.css":"bmap-v4.css");var oT=oZ.head||oZ.getElementsByTagName("head")[0]||oZ.documentElement;if(oT){oT.appendChild(oU)}}}function oL(oV){var oU=typeof window!=="undefined"?window.document:null;if(!oU||!oU.createElement||K.isDev){return}var oT=function(){if(K.uiVersion&&K.uiVersion!==oV){return}T(oV)};if(oU.readyState==="loading"){oU.addEventListener("DOMContentLoaded",oT)}else{oT()}}function oR(oU,oT){oT(oO[oU]);Object.defineProperty(oO,oU,{enumerable:true,configurable:true,get:function(){return K[oU]},set:function(oV){oT(oV)}})}function i(oU,oT){oO=oU;oT=oT||{};oQ=oT.onApiVersionApplied||null;oS=oT.onUiVersionApplied||null;oR("apiVersion",oK);oR("uiVersion",e)}return{install:i,mirrorWindowGlobalsToExports:C}})();cv.MapConfig=K;cv.Map=li;cv.MapType=gA;cv.Point=d9;cv.Pixel=hV;cv.Size=mU;cv.Bounds=lz;cv.PrivateRegionDataModel=es;cv.TileLayer=kT;cv.Copyright=q;cv.Projection=cv.Project=m8;cv.XYZProjection=cv.XYZProject=fA;cv.MercatorProjection=m8;cv.Convertor=iI;cv.RenderTypeUtils=eV;cv.Overlay=bw;cv.Label=ls;cv.Marker=D;var lX=hS;var ce=function(e,i){if(typeof e==="string"||typeof e==="number"){return new fK(e,i)}lX.call(this,e,i)};ce.prototype=lX.prototype;cv.Symbol=ce;cv.SVGSymbol=fK;cv.Icon=nF;cv.Polyline=cf;cv.BezierCurve=em;cv.PolylineMultipart=gE;cv.Polygon=mw;cv.MapMask=ov;cv.Prism=cm;cv.Marker3D=gn;cv.GroundOverlay=iQ;cv.GroundPoint=fP;cv.CustomOverlay=cS;cv.CanvasLayer=ik;cv.CustomHtmlLayer=fw;cv.ParkingSpot=l2;cv.PointCollection=ih;cv.Hotspot=dX;cv.InfoWindow=f9;cv.SimpleInfoWindow=lD;cv.Circle=bz;cv.Rectangle=g6;cv.Control=jM;cv.NavigationControl=n5;cv.IndoorManager=eW;cv.NavigationControl3D=hy;cv.CopyrightControl=i0;cv.ScaleControl=oJ;cv.CityListControl=co;cv.MapTypeControl=G;cv.ZoomControl=nc;cv.LocationControl=jn;cv.GeolocationControl=jn;cv.LogoControl=cB;cv.OverviewMapControl=n9;cv.DistanceTool=dH;cv.ContextMenu=kH;cv.MenuItem=lx;cv.OperationMask=aG;cv.Animation=ij;cv.ViewAnimation=w;cv.Transitions=jF;cv.Event=ix;cv.trafficLayer=nX;cv.TrafficLayer=ng;cv.GeoJSONLayer=bk;cv.XYZLayer=ow;cv.WMTSLayer=f6;cv.WMSLayer=ev;cv.RasterTileLayer=eM;cv.PixelLayer=fm;cv.GeoJSONParse=jz;cv.NormalLayer=dQ;cv.ThreeLayer=jZ;cv.LineLayer=c3;cv.FillLayer=f7;cv.PointShapeLayer=bD;cv.PointIconLayer=i3;cv.Entity=m9;cv.MVTLayer=gg;cv.VectorTileLayer=fl;cv.BaiduLayer=ai;cv.Geolocation=eG;cv.Geocoder=b5;cv.Boundary=hX;cv.DistrictLayer=f2;cv.LocalCity=hO;cv.LocalSearch=ee;cv.Autocomplete=mW;cv.BusLineSearch=gX;cv.WalkingRoute=h3;cv.RidingRoute=eT;cv.DrivingRoute=dY;cv.DrivingRouteLine=iS;cv.TransitRoute=hh;cv.RouteSearch=mx;cv.TruckRoute=ak;cv.IconSequence=ks;cv.PlaceDetail=bH;cv.PanoramaCoverageLayer=gf;cv.PanoramaControl=hR;cv.PanoramaService=hk;cv.PanoramaLabel=ad;cv.PanoramaMarker=fa;cv.Panorama=f;hi.install(cv,{onApiVersionApplied:function(e,i){if(e!=="gl"){i.MapType=at;i.Projection=i.Project=je;i.PerspectiveProjection=k8;i.DOMLayer=fw;i.PolylineLayer=gZ;i.FlyLineLayer=eQ;i.PolygonLayer=i8;i.Heatmap=fj;i.WebGLCustomLayer=L;i.ThreejsLayer=ca;i.DeckglLayer=ex;i.PointLayer=op;i.BarLayer=lZ;i.TextLayer=bB;i.ClusterLayer=n0;i.TrackLine=lS;i.EBikeRoute=cH;i.Icons=nT;window.BMAP_POINT_DENSITY_HIGH=200;window.BMAP_POINT_DENSITY_MEDIUM=100;window.BMAP_POINT_DENSITY_LOW=50;window.BMAP_CONTEXT_MENU_ICON_ZOOMIN=K.imgPath+"menu_zoom_in.png";window.BMAP_CONTEXT_MENU_ICON_ZOOMOUT=K.imgPath+"menu_zoom_out.png";window.BMAP_PERSPECTIVE_MAP=window.BMAP_PERSPECTIVE_MAP||null}else{i.MapType=gA;i.Projection=i.Project=m8;i.BMAP_NORMAL_MAP="B_NORMAL_MAP";i.BMAP_SATELLITE_MAP="B_SATELLITE_MAP";i.BMAP_HYBRID_MAP="B_STREET_MAP";i.BMAP_EARTH_MAP="B_EARTH_MAP";i.BMAP_NONE_MAP="B_NONE_MAP"}}});function ky(e,i){for(var C in i){e[C]=i[C]}}cv.fetchDebug&&cv.fetchDebug.init();cv.slaDebug&&cv.slaDebug.init();cv.verify();cv.apiLoad();cv.frequency();cv.getSeckeyCid();})(BMapGL,"BMapGL");
\ No newline at end of file
+window.B_BUSINESS_INFO={"business":0,"unauth":0,"popup_code":"yjo1AddFgC","popup_block_time":60,"popup_timestamp":1793870403,"watermark_ratio":0,"signature":"4ca6c7","sign_content":"{\"business\":0,\"unauth\":0,\"popup_code\":\"yjo1AddFgC\",\"popup_block_time\":60,\"popup_timestamp\":1793870403,\"watermark_ratio\":0}"};window.B_HOST_TILE_ONLINE_URLS=[(window.location.host + "/bmap-tile0"),(window.location.host + "/bmap-tile1"),(window.location.host + "/bmap-tile2"),(window.location.host + "/bmap-tile3")];window.B_HOST_TILE_BASE_URLS=["apimaponline0.bdimg.com\/starpic\/?qt=satepc&","apimaponline1.bdimg.com\/starpic\/?qt=satepc&","apimaponline2.bdimg.com\/starpic\/?qt=satepc&","apimaponline3.bdimg.com\/starpic\/?qt=satepc&"];window.TILE_VERSION={"ditu":{"normal":{"version":"088","updateDate":"20261102"},"satellite":{"version":"009","updateDate":"20261102"},"normalTraffic":{"version":"081","updateDate":"20261102"},"satelliteTraffic":{"version":"083","updateDate":"20261102"},"mapJS":{"version":"104","updateDate":"20261102"},"satelliteStreet":{"version":"083","updateDate":"20261102"},"earthVector":{"version":"001","updateDate":"20261102"}},"webapp":{"high_normal":{"version":"001","updateDate":"20261102"},"lower_normal":{"version":"002","updateDate":"20261102"}},"api_for_mobile":{"vector":{"version":"002","updateDate":"20261102"},"vectorIcon":{"version":"002","updateDate":"20261102"}}};window.MSV={"mapstyle":{"version":"001","updateDate":"20261013"}};window.BMAP_AUTHENTIC_KEY="Y2aJXiswwPxy6mwFs1z9c7U5gwX9WfUN";window.BMapGL=window.BMapGL||{};(function(cv,h6){var hv=hv||{version:"20150702",emptyFn:function(){}};(function(){hv._log=[];var i=0;var C={};hv.BaseClass=function(oK){C[(this.hashCode=(oK||hv.BaseClass.guid()))]=this;if(!oK&&typeof kU!=="undefined"&&kU.sendMessage){var T=this.toString();if(!T||T.indexOf("[object")===0){T=this._className}if(T){kU.sendMessage(T)}}};hv.BaseClass.guid=function(){return"mz_"+(i++).toString(36)};hv.BaseClass.create=function(){var T=new hv.BaseClass();T.decontrol();return T};var e=hv.instance=hv.I=function(T){return C[T]};hv.BaseClass.prototype.dispose=function(){if(this.hashCode){delete C[this.hashCode]}for(var T in this){if(typeof this[T]!="function"){delete this[T]}}};hv.BaseClass.prototype.getHashCode=function(){if(!this.hashCode){C[(this.hashCode=hv.BaseClass.guid())]=this}return this.hashCode};hv.BaseClass.prototype.decontrol=function(){delete C[this.hashCode]};hv.BaseClass.prototype.toString=function(){return"[object "+(this._className||"Object")+"]"};hv.BaseClass.prototype._wlog=function(oK,oL){var T=hv._log;if(T.length>100){T.reverse().length=50;T.reverse()}T[T.length]="["+oK+"]["+(this._className||"Object")+" "+this.hashCode+"] "+oL}})();Function.prototype.inherits=function(oK,T){var e,oL,oN=this.prototype,oM=function(){};oM.prototype=oK.prototype;oL=this.prototype=new oM();if(typeof(T)=="string"){oL._className=T}for(e in oN){oL[e]=oN[e]}this.prototype.constructor=oN.constructor;oN=oM=null;return oL};hv.BaseEvent=function(e,i){this.type=e;this.returnValue=true;this.target=i||null;this.currentTarget=this.srcElement=null;this.cancelBubble=false;this.domEvent=null};hv.BaseClass.prototype.on=hv.BaseClass.prototype.addEventListener=function(C,i){if(typeof i!=="function"){return this._wlog("error","addEventListener:"+i+" is not a function")}if(!this._listeners){this._listeners={}}var e=this._listeners;if(C.indexOf("on")!==0){C="on"+C}if(typeof e[C]!=="object"){e[C]={}}var T=i.hashCode||hv.BaseClass.guid();i.hashCode=T;if(e[C][T]){this._wlog("warning","repeat key:"+T)}e[C][T]=i};hv.BaseClass.prototype.off=hv.BaseClass.prototype.removeEventListener=function(C,i){if(typeof i=="function"){i=i.hashCode}else{if(typeof i!=="string"&&typeof i!=="undefined"){return}}if(!this._listeners){this._listeners={}}if(C.indexOf("on")!=0){C="on"+C}var e=this._listeners;if(!e[C]){return}if(i===undefined){e[C]={};return}if(e[C][i]){delete e[C][i]}};hv.BaseClass.prototype.fire=hv.BaseClass.prototype.dispatchEvent=function(T){if(!this._listeners){this._listeners={}}var C,e=this._listeners,oK=T.type;if(!T.point&&T.pointMC&&typeof K!=="undefined"&&typeof m8!=="undefined"&&m8.convertMC2LL){if(!K.apiVersionIsGL()){T.point=m8.convertMC2LL(T.pointMC)}else{T.point=T.pointMC}}T.target=T.srcElement=T.target||T.srcElement||this;T.currentTarget=this;if(typeof this[oK]=="function"){this[oK](T)}if(typeof e[oK]=="object"){for(C in e[oK]){if(typeof e[oK][C]=="function"){e[oK][C].call(this,T)}}}return T.returnValue};hv.BaseEvent.prototype.inherit=function(C){var i=this;this.domEvent=C=window.event||C;i.clientX=C.clientX||C.pageX;i.clientY=C.clientY||C.pageY;i.offsetX=C.offsetX||C.layerX;i.offsetY=C.offsetY||C.layerY;i.screenX=C.screenX;i.screenY=C.screenY;i.ctrlKey=C.ctrlKey||C.metaKey;i.shiftKey=C.shiftKey;i.altKey=C.altKey;return i};hv.Browser=(function(){var C=navigator.userAgent;var oK=0;var e=0;var oL=0;var i=0;var oP=0;var oN=0;var oO=0;var oM=0;var T=0;var oQ=0;if(typeof window.opera==="object"&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(C)){oL=parseFloat(RegExp.$2)}else{if(/OPR(\/(\d+)(\..?)?)/.test(C)){oL=parseInt(RegExp.$2,10)}else{if(/Edge\/((\d+)\.\d+)/.test(C)){oK=parseInt(RegExp.$2,10)}else{if(/MSIE (\d+(\.\d+)?)/.test(C)){e=parseFloat(RegExp.$1)}else{if(C.indexOf("Trident")>-1&&/rv:(\d+(\.\d+)?)/.test(C)){e=parseInt(RegExp.$1,10)}else{if(/Firefox(\s|\/)(\d+(\.\d+)?)/.test(C)){oP=parseFloat(RegExp.$2)}else{if(navigator.vendor==="Netscape"&&/Netscape(\s|\/)(\d+(\.\d+)?)/.test(C)){oO=parseFloat(RegExp.$2)}else{if(C.indexOf("Safari")>-1&&/Version\/(\d+(\.\d+)?)/.test(C)){i=parseFloat(RegExp.$1)}}}}}}}}if(C.indexOf("Trident")>-1&&/Trident\/(\d+(\.\d+)?)/.test(C)){oM=parseInt(RegExp.$1,10)}else{if(!e&&!oK&&C.indexOf("Gecko")>-1&&C.indexOf("KHTML")===-1&&/rv\:(\d+(\.\d+)?)/.test(C)){T=parseFloat(RegExp.$1)}else{if(!oK&&/chrome\/(\d+(\.\d+)?)/i.test(C)){oN=parseFloat(RegExp.$1)}else{if(!oK&&/AppleWebKit\/(\d+(\.\d+)?)/.test(C)){oQ=parseInt(RegExp.$1,10)}}}}var oR={edge:oK,ie:e,firefox:oP,netscape:oO,opera:oL,safari:i,chrome:oN,gecko:T,trident:oM,webkit:oQ};return oR})();window.FeBrowser=hv.Browser;hv.Dom={};hv.Dom.createDom=function(i,e){if(hv.isIE&&e&&e.name){i="<"+i+' name="'+hv.String.escapeHTML(e.name)+'">'}var C=document.createElement(i);if(e){hv.Dom.setProperties(C,e)}return C};hv.Dom.getOffset=function(T){var oM=hv.Dom.getOwnerDocument(T);var oL=hv.isGecko>0&&oM.getBoxObjectFor&&hv.Dom.getStyle(T,"position")=="absolute"&&(T.style.top===""||T.style.left==="");var oN={left:0,top:0};var i=(hv.isIE&&!hv.isStrict)?oM.body:oM.documentElement;if(T==i){return oN}var C=null;var oK;if(T.getBoundingClientRect){oK=T.getBoundingClientRect();oN.left=oK.left+Math.max(oM.documentElement.scrollLeft,oM.body.scrollLeft);oN.top=oK.top+Math.max(oM.documentElement.scrollTop,oM.body.scrollTop);oN.left-=oM.documentElement.clientLeft;oN.top-=oM.documentElement.clientTop;if(hv.isIE&&!hv.isStrict){oN.left-=2;oN.top-=2}}else{if(oM.getBoxObjectFor&&!oL){oK=oM.getBoxObjectFor(T);var e=oM.getBoxObjectFor(i);oN.left=oK.screenX-e.screenX;oN.top=oK.screenY-e.screenY}else{C=T;do{oN.left+=C.offsetLeft;oN.top+=C.offsetTop;if(hv.isWebkit>0&&hv.Dom.getStyle(C,"position")=="fixed"){oN.left+=oM.body.scrollLeft;oN.top+=oM.body.scrollTop;break}C=C.offsetParent}while(C&&C!=T);if(hv.isOpera>0||(hv.isWebkit>0&&hv.Dom.getStyle(T,"position")=="absolute")){oN.top-=oM.body.offsetTop}C=T.offsetParent;while(C&&C!=oM.body){oN.left-=C.scrollLeft;if(!hv.isOpera||C.tagName!="TR"){oN.top-=C.scrollTop}C=C.offsetParent}}}return oN};hv.Dom.getOwnerDocument=function(e){return e.nodeType==9?e:e.ownerDocument||e.document};hv.Dom.setProperties=function(i,e){hv.each(e,function(T,C){hv.Dom._setProperty(i,C,T)})};hv.Dom._setProperty=function(i,e,C){if(e=="style"){i.style.cssText=C}else{if(e=="class"){i.className=C}else{if(e=="for"){i.htmlFor=C}else{if(e in hv.Dom._DIRECT_ATTRIBUTE_MAP){i.setAttribute(hv.Dom._DIRECT_ATTRIBUTE_MAP[e],C)}else{i[e]=C}}}}};hv.Dom._DIRECT_ATTRIBUTE_MAP={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder"};hv.G=function(){for(var C=[],T=arguments.length-1;T>-1;T--){var oK=arguments[T];C[T]=null;if(typeof oK=="object"&&oK&&oK.dom){C[T]=oK.dom}else{if((typeof oK=="object"&&oK&&oK.tagName)||oK==window||oK==document){C[T]=oK}else{if(typeof oK=="string"&&(oK=document.getElementById(oK))){C[T]=oK}}}}return C.length<2?C[0]:C};hv.ac=function(e,i){if(!(e=this.G(e))){return}i=this.trim(i);if(!new RegExp("(^| )"+i.replace(/(\W)/g,"\\$1")+"( |$)").test(e.className)){e.className=e.className.split(/\s+/).concat(i).join(" ")}};hv.addClassName=hv.ac;hv.each=function(oL,e){if(typeof e!="function"){return oL}if(oL){if(oL.length===undefined){for(var C in oL){e.call(oL[C],oL[C],C)}}else{for(var T=0,oK=oL.length;T<oK;T++){e.call(oL[T],oL[T],T)}}}return oL};hv.extend=function(oL,T){if(oL&&T&&typeof(T)=="object"){for(var oK in T){oL[oK]=T[oK]}var C=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"];for(var e=0,i;e<C.length;e++){i=C[e];if(Object.prototype.hasOwnProperty.call(T,i)){oL[i]=T[i]}}}return oL};hv.hide=function(){hv.each(arguments,function(e){if(e=hv.G(e)){e.style.display="none"}})};hv.inherit=function(oO,oK,T){var oN=oO.prototype;var oM=function(){};oM.prototype=oK.prototype;var oL=oO.prototype=new oM();if(typeof T=="string"){oL._className=T}for(var e in oN){oL[e]=oN[e]}oO.prototype.constructor=oN.constructor;oN=null;return oL};hv.isIE=0;(function(){if(navigator.userAgent.indexOf("MSIE")>0&&!window.opera){/MSIE (\d+(\.\d+)?)/.test(navigator.userAgent);hv.isIE=parseFloat(RegExp.$1)}})();hv.rc=function(e,i){if(!(e=this.G(e))){return}i=this.trim(i);var C=e.className.replace(new RegExp("(^| +)"+i.replace(/(\W)/g,"\\$1")+"( +|$)","g"),"$2");if(e.className!=C){e.className=C}};hv.removeClassName=hv.rc;hv.show=function(){this.each(arguments,function(e){if(e=hv.G(e)){e.style.display=""}})};hv.trim=function(e){return e.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")};hv.getElementsByClassName=function(e,i){if(e.getElementsByClassName){return e.getElementsByClassName(i)}else{return(function C(oQ,oO){if(oO==null){oO=document}var oN=[],oM=oO.getElementsByTagName("*"),T=oM.length,oP=new RegExp("(^|\\s)"+oQ+"(\\s|$)"),oL,oK;for(oL=0,oK=0;oL<T;oL++){if(oP.test(oM[oL].className)){oN[oK]=oM[oL];oK++}}return oN})(i,e)}};hv.toggleClass=function(e,i){if(hv.hasClass(e,i)){hv.removeClassName(e,i)}else{hv.addClassName(e,i)}};hv.hasClass=function(T,C){if(!T||!T.className||typeof T.className!="string"){return false}var i=-1;try{i=T.className==C||T.className.search(new RegExp("(\\s|^)"+C+"(\\s|$)"))}catch(oK){return false}return i>-1};hv.insertHTML=function(T,e,C){T=hv.G(T);if(T===null){return T}var i,oK;if(T.insertAdjacentHTML){T.insertAdjacentHTML(e,C)}else{i=T.ownerDocument.createRange();e=e.toUpperCase();if(e=="AFTERBEGIN"||e=="BEFOREEND"){i.selectNodeContents(T);i.collapse(e=="AFTERBEGIN")}else{oK=e=="BEFOREBEGIN";i[oK?"setStartBefore":"setEndAfter"](T);i.collapse(oK)}i.insertNode(i.createContextualFragment(C))}return T};if(typeof HTMLElement!="undefined"&&HTMLElement.prototype.__lookupGetter__&&!HTMLElement.prototype.__lookupGetter__("children")&&!window.opera){try{HTMLElement.prototype.__defineGetter__("children",function(){for(var C=[],T=0,oL,oK=0,e=this.childNodes.length;oK<e;oK++){oL=this.childNodes[oK];if(oL.nodeType==1){C[T++]=oL;if(oL.name){if(!C[oL.name]){C[oL.name]=[]}C[oL.name][C[oL.name].length]=oL}if(oL.id){C[oL.id]=oL}}}return C})}catch(nA){}}if(typeof(HTMLElement)!="undefined"&&!window.opera&&HTMLElement.prototype&&!HTMLElement.prototype.insertAdjacentHTML){HTMLElement.prototype.insertAdjacentHTML=function(i,C){var T=this.ownerDocument.createRange();T.setStartBefore(this);T=T.createContextualFragment(C);switch(i){case"beforeBegin":this.parentNode.insertBefore(T,this);break;case"afterBegin":this.insertBefore(T,this.firstChild);break;case"beforeEnd":this.appendChild(T);break;case"afterEnd":if(!this.nextSibling){this.parentNode.appendChild(T)}else{this.parentNode.insertBefore(T,this.nextSibling)}break}}}if(typeof HTMLElement!="undefined"&&!window.opera){HTMLElement.prototype.contains=function(e){if(!e){return false}if(e==this){return true}while(e=e.parentNode){if(e==this){return true}}return false}}if(!hv.Browser.ie&&typeof Event!="undefined"&&!window.opera){Event.prototype.__defineSetter__("returnValue",function(e){if(!e){this.preventDefault()}return e});Event.prototype.__defineSetter__("cancelBubble",function(e){if(e){this.stopPropagation()}return e})}hv.each=function(oK,T){if(c2(T)){for(var C=0,e=oK.length;C<e;C++){if(T.call(oK,oK[C],C)===false){break}}}return oK};hv.Platform={x11:0,macintosh:0,windows:0,android:0,iphone:0,ipad:0};for(var nw in hv.Platform){if(hv.Platform.hasOwnProperty(nw)){hv.Platform[nw]=new RegExp(nw,"i").test(window.navigator.userAgent)?1:0}}if(typeof(hv.Dom)==="undefined"){hv.Dom={}}hv.Dom.getComputedStyle=function(i,e){var T=i.nodeType==9?i:i.ownerDocument||i.document,C;if(T.defaultView&&T.defaultView.getComputedStyle){C=T.defaultView.getComputedStyle(i,null);if(C){return C[e]||C.getPropertyValue(e)}}else{if(i.currentStyle){return i.currentStyle[e]||""}}return""};var ix=hv.BaseEvent;var eX=hv.BaseClass;eX.prototype.toString=function(){return this._className||""};hv.on=function(C,i,e){if(!(C=hv.G(C))){return C}i=i.replace(/^on/,"");if(C.addEventListener){C.addEventListener(i,e,false)}else{if(C.attachEvent){C.attachEvent("on"+i,e)}}return C};hv.un=function(C,i,e){if(!(C=hv.G(C))){return C}i=i.replace(/^on/,"");if(C.removeEventListener){C.removeEventListener(i,e,false)}else{if(C.detachEvent){C.detachEvent("on"+i,e)}}return C};hv.hc=function(T,C){if(!T||!T.className||typeof T.className!="string"){return false}var i=-1;try{i=T.className==C||T.className.search(new RegExp("(\\s|^)"+C+"(\\s|$)"))}catch(oK){return false}return i>-1};hv.isEmptyObject=function(C){if(Object.prototype.toString.call(C)==="[object Object]"){for(var e in C){return false}return true}else{return false}};var s=(typeof window!=="undefined"&&window.BMAP_QT_VERSION)||"gl";function ep(){return s}window.BMAPGL_LANGUAGE_ZH="zh";window.BMAPGL_LANGUAGE_EN="en";window.BMAP_LANGUAGE_ZH="zh";window.BMAP_LANGUAGE_EN="en";window.BMAP_LANGUAGE_ZH_TW="zh-TW";window.BMAP_LANGUAGE_ES="es";window.BMAP_LANGUAGE_PT="pt";window.BMAP_LANGUAGE_FR="fr";window.BMAP_LANGUAGE_DE="de";window.BMAP_LANGUAGE_TH="th";window.BMAP_LANGUAGE_JA="ja";window.BMAP_LANGUAGE_KO="ko";window.BMAP_LANGUAGE_TR="tr";window.BMAP_LANGUAGE_IT="it";window.BMAP_LANGUAGE_RU="ru";window.BMAP_LANGUAGE_MS="ms";window.BMAP_LANGUAGE_VI="vi";window.BMAP_LANGUAGE_ID="id";var dt=[];if(window.B_HOST_TILE_ONLINE_URLS&&window.B_HOST_TILE_ONLINE_URLS.length>=4){dt=window.B_HOST_TILE_ONLINE_URLS}var cZ=window.location.protocol==="http:"?"http:":"https:";var gR={apiVersion:undefined,uiVersion:undefined,apiVersionIsGL:function(){return this.apiVersion==="gl"},uiVersionIsGL:function(){return this.uiVersion==="gl"},urlProtocol:cZ,fontFamily:'Arial,Helvetica,"PingFang SC","Hiragino Sans GB",STHeiti,"Microsoft YaHei",Tahoma,sans-serif',mapStyleNameIdPair:{"default":0,"grayed-out":1},gs:{},mapHost:cZ+"//" + window.location.host + "/bmap-map",apiHost:window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]?window._BMapSecurityConfig["serviceHost"]:cZ+"//" + window.location.host + "/bmap-api",apiIMG:cZ+"//" + window.location.host + "/bmap-api/images",staticHost:cZ+"//" + window.location.host + "/bmap-webmap",imgPath:cZ+"//" + window.location.host + "/bmap-webmap/image/api/",tileDomain:[cZ+"//"+(dt[0]||(window.location.host + "/bmap-tile0")),cZ+"//"+(dt[1]||(window.location.host + "/bmap-tile1")),cZ+"//"+(dt[2]||(window.location.host + "/bmap-tile2")),cZ+"//"+(dt[3]||(window.location.host + "/bmap-tile3"))],enTileDomain:[cZ+"//" + window.location.host + "/bmap-api"],apiTestUrl:cZ+"//" + window.location.host + "/bmap-api",panoTilePath:cZ+"//" + window.location.host + "/bmap-sv1/",rasterTilePath:"/tile/",vectorTilePath:"/pvd/",enVectorTilePath:"/api_enpvd",originTilePath:[cZ+"//pcor.baidu.com"],stylePath:cZ+"//" + window.location.host + "/bmap-webmap/sty/",getIconSetPath:function(e){var i="map_icons2x/";if(typeof e==="string"&&this.mapStyleNameIdPair[e]>0){i="map_icons2x_"+(this.mapStyleNameIdPair[e]-1)+"/"}return this.stylePath+i},getMapStyleFiles:function(C){var oK=true;if(typeof C==="string"&&C!=="default"){oK=false}var oL=oK?"":"_"+(this.mapStyleNameIdPair[C]-1);var i=cw();var T="udt="+i.udt+"&v="+i.ver;var e=this.stylePath;return[e+"icons_2x"+oL+".js?"+T,e+"fs"+oL+".js?"+T,e+"indoor_fs.js?"+T]},tvc:{ditu:{normal:{version:"088",updateDate:"20250110"},satellite:{version:"009",updateDate:"20250110"},normalTraffic:{version:"081",updateDate:"20250110"},satelliteTraffic:{version:"083",updateDate:"20250110"},mapJS:{version:"104",updateDate:"20250110"},satelliteStreet:{version:"083",updateDate:"20250110"},earthVector:{version:"001",updateDate:"20250110"}},webapp:{high_normal:{version:"001",updateDate:"20250110"},lower_normal:{version:"002",updateDate:"20250110"}},api_for_mobile:{vector:{version:"002",updateDate:"20250110"},vectorIcon:{version:"002",updateDate:"20250110"}}},msv:{mapstyle:{version:"001",updateDate:"20241224"}}};gR.gs[BMAP_LANGUAGE_ZH]="GS(2025)4125";gR.gs[BMAP_LANGUAGE_EN]="GS(2025)0741";gR.getGS=function(e){if(e===BMAP_LANGUAGE_ZH){return"GS(2025)4125"}else{if(e===BMAP_LANGUAGE_EN){return"GS(2025)0741"}else{return"GS(2025)4125"}}};gR.imgResources={blankGIF:gR.staticHost+"/res/litemapapi/v1d1/images/blank.gif?20170501",markerPng:gR.staticHost+"/res/litemapapi/v1d1/images/marker.png?20170501",locPng:gR.staticHost+"/res/litemapapi/v1d1/images/loc.png?20180918",locNewPng:gR.staticHost+"/res/litemapapi/v1d1/images/loc_new.png?20190314",zoomPng:gR.staticHost+"/res/litemapapi/v1d1/images/zoombtn.png?20180918",mapLogoPng:gR.staticHost+"/res/litemapapi/v1d1/images/logo-2x.png?20190226"};var K=gR;var nf="ruler.cur";if(hv.Browser.ie||hv.Browser.edge){hv.extend(K,{distCursor:"url("+K.imgPath+nf+"),crosshair",defaultCursor:"url("+K.imgPath+"openhand.cur),default",draggingCursor:"url("+K.imgPath+"closedhand.cur),move"})}else{if(hv.Browser.firefox){hv.extend(K,{distCursor:"url("+K.imgPath+nf+"),crosshair",defaultCursor:"-moz-grab",draggingCursor:"-moz-grabbing"})}else{if(hv.Browser.chrome||hv.Browser.safari){hv.extend(K,{distCursor:"url("+K.imgPath+nf+") 2 6,crosshair",defaultCursor:"url("+K.imgPath+"openhand.cur) 8 8,default",draggingCursor:"url("+K.imgPath+"closedhand.cur) 8 8,move"});if(hv.Platform.macintosh){K.defaultCursor="-webkit-grab";K.draggingCursor="-webkit-grabbing"}}else{hv.extend(K,{distCursor:"url("+K.imgPath+nf+"),crosshair",defaultCursor:"url("+K.imgPath+"openhand.cur),default",draggingCursor:"url("+K.imgPath+"closedhand.cur),move"})}}}cv=cv||{};cv.version="gl";if(!cv.coordType){cv.coordType="BMAP_COORD_BD09"}if(!cv.apiVersion){cv.apiVersion=(typeof window!=="undefined"&&window.BMAP_DEFAULT_API_VERSION)||"gl"}if(!cv.uiVersion){cv.uiVersion=(typeof window!=="undefined"&&window.BMAP_DEFAULT_UI_VERSION)||"gl"}cv._register=[];cv.register=function(e){this._register[this._register.length]=e};cv.guid=1;cv.getGUID=function(e){return(e||"")+cv.guid++};var hj=window.BMAP_AUTHENTIC_KEY||"";function af(e,i,T){var C=new Date();C.setTime(C.getTime()+T*24*60*60*1000);document.cookie=e+"="+escape(i)+";expires="+C.toGMTString()}function bQ(e,i){if(localStorage){return localStorage.setItem(e,i)}if(sessionStorage){return sessionStorage.setItem(e,i)}}cv.getSeckeyCid=function(){var i=+new Date();var e=cZ+"//dlswbr.baidu.com/heicha/mw/abclite-2063-s.js?_t="+i;jW.load(e,mE)};function mE(){if(window.___abvk){bQ("SECKEY_ABVK",window.___abvk)}}window.__abbaidu_2063_cb=function(i){var e=JSON.parse(i);bQ("BMAP_SECKEY",e.data)};cv.bmapVerifyCbk=function(oK){if(oK&&oK.popup===1&&oK.error_msg){dZ(oK.error_msg,{from:"verify"})}else{if(oK&&oK.error!==0){cv=null;BMapGL=null;var oL="鐧惧害鏈巿鏉冧娇鐢ㄥ湴鍥続PI锛屽彲鑳芥槸鍥犱负鎮ㄦ彁渚涚殑瀵嗛挜涓嶆槸鏈夋晥鐨勭櫨搴﹀湴鍥惧紑鏀惧钩鍙板瘑閽ワ紝鎴栨瀵嗛挜鏈鏈簲鐢ㄧ殑鐧惧害鍦板浘JavaScriptAPI鎺堟潈銆傛偍鍙互璁块棶濡備笅缃戝潃浜嗚В濡備綍鑾峰彇鏈夋晥鐨勫瘑閽ワ細https://lbs.baidu.com/apiconsole/key#銆�";switch(oK.error){case 101:oL="鎮ㄦ墍浣跨敤鐨勫瘑閽k鏈夐棶棰橈紝涓嶆敮鎸乯sapi鏈嶅姟锛屽彲浠ヨ闂缃戝潃浜嗚В濡備綍鑾峰彇鏈夋晥瀵嗛挜锛歨ttp://lbsyun.baidu.com/apiconsole/key#銆�";break;case 102:oL="MCODE鍙傛暟涓嶅瓨鍦紝mobile绫诲瀷MCODE鍙傛暟蹇呴渶锛岃鎯呮煡鐪嬶細http://lbsyun.baidu.com/apiconsole/key#銆�";break;case 200:oL="APP涓嶅瓨鍦紝AK鏈夎璇锋鏌ュ啀閲嶈瘯锛岃鎯呮煡鐪嬶細http://lbsyun.baidu.com/apiconsole/key#銆�";break;case 201:oL="APP琚偍绂佺敤鍟︼紝鍙互璁块棶 http://lbsyun.baidu.com/apiconsole/key# 鏌ョ湅鑷繁鐨勫簲鐢ㄥ叿浣撹鎯咃紝鎴栬仈绯绘垜浠簡瑙h鎯呫��";break;case 202:oL="APP琚鐞嗗憳鍒犻櫎鍟︼紝鍙互璁块棶 http://lbsyun.baidu.com/apiconsole/key# 鏌ョ湅鑷繁鐨勫簲鐢ㄥ叿浣撹鎯咃紝鎴栬仈绯绘垜浠簡瑙h鎯呫��";break;case 203:oL="APP绫诲瀷閿欒锛屽彲浠ヨ闂� http://lbsyun.baidu.com/apiconsole/key# 鏌ョ湅鑷繁鐨勫簲鐢ㄥ叿浣撹鎯咃紝鎴栬仈绯绘垜浠簡瑙h鎯呫��";break;case 210:oL="APP IP鏍¢獙澶辫触锛屽彲浠ヨ闂� http://lbsyun.baidu.com/apiconsole/key# 鏌ョ湅鑷繁鐨勫簲鐢ㄥ叿浣撹鎯咃紝鎴栬仈绯绘垜浠簡瑙h鎯呫��";break;case 220:oL="APP Referer鏍¢獙澶辫触銆傝妫�鏌ヨak璁剧疆鐨勭櫧鍚嶅崟涓庤闂墍鏈夌殑鍩熷悕鏄惁涓�鑷淬�傝鎯呮煡鐪嬶細http://lbsyun.baidu.com/apiconsole/key#";break;case 230:oL="APP Mcode鐮佹牎楠屽け璐ワ紝鍙互璁块棶 http://lbsyun.baidu.com/apiconsole/key# 鏌ョ湅鑷繁鐨勫簲鐢ㄥ叿浣撹鎯咃紝鎴栬仈绯绘垜浠簡瑙h鎯呫��";break;case 240:oL="APP鏈嶅姟琚鐢ㄤ簡锛屽彲浠ヨ闂� http://lbsyun.baidu.com/apiconsole/key# 鏌ョ湅鑷繁鐨勫簲鐢ㄥ叿浣撹鎯咃紝鎴栬仈绯绘垜浠簡瑙h鎯呫��";break;case 250:oL="璇ョ敤鎴蜂笉瀛樺湪... 璇风櫥褰� https://lbs.baidu.com 鐨勬帶鍒跺彴锛屾敞鍐屾垚涓哄紑鍙戣�呯敵璇穉k鍚с��";break;case 251:oL="璇ョ敤鎴疯鑷繁鍒犻櫎鍟︼紝鍙互璁块棶 http://lbsyun.baidu.com/apiconsole/key# 鏌ョ湅鑷繁鐨勫簲鐢ㄥ叿浣撹鎯呫��";break;case 252:oL="璇ョ敤鎴疯绠$悊鍛樺垹闄ゅ暒锛屽彲浠ヨ闂� http://lbsyun.baidu.com/apiconsole/key# 浜嗚В濡備綍鑾峰彇鏈夋晥瀵嗛挜锛屾垨璇疯仈绯绘垜浠簡瑙h鎯呫��";break;case 260:oL="鎮ㄦ墍浣跨敤鐨勫瘑閽K涓嶅寘鍚鏈嶅姟鍛紝鍙互璁块棶 http://lbsyun.baidu.com/apiconsole/key# 鏌ョ湅鏈嶅姟閫夋嫨鎯呭喌锛屾垨璇疯仈绯绘垜浠簡瑙h鎯呫��";break;case 261:oL="鎮ㄦ墍浣跨敤鐨勫瘑閽K鐨勮鏈嶅姟琚鐢ㄥ暒锛屽彲浠ヨ闂� http://lbsyun.baidu.com/apiconsole/key# 鏌ョ湅鏈嶅姟閫夋嫨鎯呭喌锛屾垨璇疯仈绯绘垜浠簡瑙h鎯呫��";break;case 401:oL="鎮ㄦ墍浣跨敤鐨凙K骞跺彂瓒呴檺浜嗭紝璇风櫥褰� http://lbsyun.baidu.com/cashier/quota#/home 浜嗚В璇︽儏銆�";break;case 302:oL="鎮ㄦ墍浣跨敤鐨凙K澶╅厤棰濊秴闄愪簡锛岃鐧诲綍 http://lbsyun.baidu.com/cashier/quota#/home 浜嗚В璇︽儏銆�";break}alert(oL);var C=document.getElementsByClassName("bmap-container");if(C){for(var T=0;T<C.length;T++){var e=C[T];if(e&&e.firstChild&&e.firstChild.id==="platform"){e.innerText=""}}}}}};cv.frequencyCbk=function(e){if(e){window.QTFrequency=e}};cv.verify=function(){if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){var e=K.apiHost+"?qt=verify&v="+ep()+"&type=webgl&time="+Date.now()+"&callback="+h6+".bmapVerifyCbk"}else{var e=K.apiHost+"/?qt=verify&v="+ep()+"&type=webgl&ak="+hj+"&time="+Date.now()+"&callback="+h6+".bmapVerifyCbk"}jW.load(e)};cv.frequency=function(){};cv.apiLoad=cv.apiLoad||function(){};function lJ(i,e){this._size=i;this._cache=[];this._totalGetTimes=0;this._totalHitTimes=0;this._options={clearCallback:null,removeOldCallback:null};e=e||{};for(var C in e){if(e.hasOwnProperty(C)){this._options[C]=e[C]}}}lJ.prototype.setData=function(C,T){var e=this._cache;var i=this._size;if(i===0){return}if(e.length>i){this._removeOld()}if(!e[C]){e.push(T)}e[C]=T;T._key_=C};lJ.prototype.getHitRate=function(){return Math.round(this._totalHitTimes/this._totalGetTimes*1000)/1000};lJ.prototype.getData=function(i){var e=this._cache[i];if(e){this._totalHitTimes++}this._totalGetTimes++;return e};lJ.prototype.removeData=function(oK){if(this._options.clearCallback){this._options.clearCallback(this._cache[oK])}var C=this._cache;var oL=C[oK];for(var T=0,e=C.length;T<e;T++){if(C[T]===oL){C.splice(T,1);break}}delete C[oK]};lJ.prototype._removeOld=function(){var e=this._cache;var oK=Math.round(this._size*0.6);for(var T=0;T<oK;T++){var C=e[T]._key_;if(this._options.clearCallback){this._options.clearCallback(e[C])}delete e[C]}e.splice(0,oK);if(this._options.removeOldCallback){this._options.removeOldCallback()}};lJ.prototype.clear=function(){var C=this._cache;for(var oK=0,e=C.length;oK<e;oK++){var T=C[oK]._key_;if(this._options.clearCallback){this._options.clearCallback(C[T])}delete C[T]}this._cache=C=[]};lJ.prototype.forEach=function(T){var C=this._cache;for(var oL=0,e=C.length;oL<e;oL++){var oK=C[oL]._key_;T(C[oK])}};lJ.prototype.getBatch=function(oK){var e=[];for(var T=0,C=oK.length;T<C;T++){if(this.getData(oK[T])){e[e.length]=this.getData(oK[T])}}return e};lJ.prototype.clearExcept=function(oL){var C=this._cache;for(var e=C.length,oK=e-1;oK>=0;oK--){var T=this._cache[oK]._key_;if(!oL[T]){C.splice(oK,1);if(this._options.clearCallback){this._options.clearCallback(C[T])}delete C[T]}}};lJ.prototype.getDataCount=function(){return this._cache.length};var lg="B_NORMAL_MAP";var c1="B_EARTH_MAP";var j9="B_SATELLITE_MAP";function mJ(){}hv.extend(mJ.prototype,{centerAndZoomIn:function(oO,C,oQ){var oM=this;if(!oO&&!C){return}oO=oO||this.centerPoint;C=C||this.zoomLevel;C=this._getProperZoom(C).zoom;if(this.mapType===c1){if(!this._earth){this.mapType=lg;this.temp.originMapType=c1;function oN(){oM._earth=new cv.Earth(oM,{showRealSunlight:oM.config.showRealSunlight,showMilkyway:oM.config.showMilkyway,earthBackground:oM.config.earthBackground});oM._proxyEarthEvents();oM._changeEarthMapType(c1);hv.extend(oM,cv.EarthView.prototype);if(!oM._navigationCtrl&&oM.config.showControls){oM._navigationCtrl=new cv.NavigationControl3D(oM)}delete oM.temp.originMapType}ki.load("earth",function(){if(cv["FeatureStyle"+oM.config.style]){oN()}else{oM.loadMapStyleFiles(function(){oN()})}})}}this.lastLevel=this.zoomLevel||C;this.zoomLevel=C;var oK=new ix("onload");oK.pointMC=oO;oK.zoom=C;this.centerPoint=this.restrictCenter(new d9(oO.lng,oO.lat));if(this.centerPoint.zoom){this.zoomLevel=this.centerPoint.zoom}this.defaultZoomLevel=this.defaultZoomLevel||this.zoomLevel;this.defaultCenter=this.defaultCenter||this.centerPoint;if(!this.loaded&&!(this.temp.originMapType===c1)){var i=this.config.defaultMaxBounds;var oL=new q(i,"baidu",this.mapType);var T=new kT({mapType:this.mapType,copyright:oL,customLayer:false,baseLayer:true,tileTypeName:"web"});T._isInnerLayer=true;this._addTileLayer(T);if(this.mapType===j9&&this._isHybridShow===true){this._addHybirdMap()}}if(K.apiVersionIsGL()){this.loaded=true;this.dispatchEvent(oK)}else{if(!this.loaded){this.loaded=true;if(this._isDefaultView){var oP=this;setTimeout(function(){oP.dispatchEvent(oK)},0)}else{this.dispatchEvent(oK)}}}oQ=oQ||{};oQ.callback&&oQ.callback()},_setPlatformPosition:function(oP,oO,oS){oS=oS||{};if(oP===0&&oO===0&&!oS.point){return}if(isNaN(oS.initMapOffsetX)){oS.initMapOffsetX=this.offsetX}if(isNaN(oS.initMapOffsetY)){oS.initMapOffsetY=this.offsetY}var oQ=oP+oS.initMapOffsetX;var oN=oO+oS.initMapOffsetY;if(oS.point){var i=this.restrictCenter(oS.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new ix("oncenter_changed"))}}else{var T=this.offsetX-oQ;var e=this.offsetY-oN;var C=this.getZoomUnits();var oM=this.centerPoint.lng;var oL=this.centerPoint.lat;var oK=new d9(oM,oL);this.centerPoint=this.restrictCenter(new d9(oK.lng+T*C,oK.lat-e*C),C);this.fire(new ix("oncenter_changed"));if(this.zoomLevel<10){oQ=this.offsetX-(this.centerPoint.lng-oK.lng)/C;oN=this.offsetY+(this.centerPoint.lat-oK.lat)/C}}this.offsetX=oQ;this.offsetY=oN;var oR=this.platform.style;oR.left=oQ+"px";oR.top=oN+"px";this.maskLayer.style.left=-oQ+"px";this.maskLayer.style.top=-oN+"px";if(oS.dispatchEvent!==false){this.dispatchEvent(new ix("onmoving"))}},zoomTo:function(e,oM,oQ){oQ=oQ||{};oQ.zoomCenter=oM;if(oQ.noAnimation!==true){this.deepZoomTo(e,oQ);return}if(typeof e!=="number"){return}var oK=gA[this.mapType];if(!oK){return}var C=e;e=this._getProperZoom(e).zoom;if(e===this.zoomLevel){var oN=new ix("onzoomexceeded");oN.targetZoom=C;this.dispatchEvent(oN);oQ.callback&&oQ.callback();return}this.lastLevel=this.zoomLevel;if(oM){this.temp._cPoint=oM;this.temp._cPixel=this.pointToPixelIn(oM)}else{if(this.getInfoWindow()){var oP=this.getInfoWindow().getPoint();this.temp._cPixel=this.pointToPixelIn(oP);this.temp._cPoint=oP}}if(this.config.zoomCenter){oM=this.config.zoomCenter;this.temp._cPoint=oM;this.temp._cPixel=this.pointToPixelIn(oM)}if(oM||this.temp.infoWin&&this.temp.infoWin.isOpen()){var i=this.temp._cPoint;var oO=this.temp._cPixel;var T=this.getZoomUnits(e);var oL=new d9(i.lng+T*(this.width/2-oO.x),i.lat-T*(this.height/2-oO.y));this.centerPoint=this.restrictCenter(oL,T,e);if(this.centerPoint.zoom){e=this.centerPoint.zoom}}if(oQ.fireEvent!==false){this.dispatchEvent(new ix("onzoomstart"))}if(e!==this.zoomLevel){this.zoomLevel=e;this.dispatchEvent(new ix("onzooming"));this.dispatchEvent(new ix("onzoomstartcode"))}if(oQ.fireEvent!==false){this.dispatchEvent(new ix("onzoomend"))}if(oQ.callback){oQ.callback()}},deepZoomMedia:function(e){var i=this;if(!i.temp.isStdCtrlBusy){i.temp.isStdCtrlBusy=true;i.deepZoomTo(i.zoomLevel+e);setTimeout(function(){i.temp.isStdCtrlBusy=false},400)}},deepZoomTo:function(oN,T){T=T||{};var oL=oN-this.zoomLevel;var oK=this._getProperZoom(oN);if(oK.exceeded){var e=new ix("onzoomexceeded");e.targetZoom=oN;this.dispatchEvent(e);return}var i;if(T.zoomCenter){i=this.pointToPixelIn(T.zoomCenter)}else{if(this.getInfoWindow()){i=this.pointToPixelIn(this.getInfoWindow().getPoint(),{zoom:this.lastLevel})}else{var i=new hV(this.width/2,this.height/2)}}this.lastLevel=this.zoomLevel;var oM=this.deepZoom||new a7(this);var C=oL>0?1:-1;oM.zoomMap(i,oL,C,null,T)},flyToIn:function(oO,e){if(e===this.zoomLevel){this.panToIn(oO);return}var oL=this._getProperZoom(e);if(oL.exceeded){var oP=new ix("onzoomexceeded");oP.targetZoom=e;this.dispatchEvent(oP);return}var oN=e-this.zoomLevel;var C=new hV(this.width/2,this.height/2);var i=this.pointToPixelIn(oO);var oM=new mU(i.x-C.x,i.y-C.y);this.lastLevel=this.zoomLevel;if(Math.abs(oN)>=4||Math.abs(oM.width)>this.width||Math.abs(oM.height)>this.height){this.centerAndZoomIn(oO,e);return}var oK=this.deepZoom||new a7(this);var T=oN>0?1:-1;oK.zoomMap(i,oN,T,oM)},panToIn:function(i,C){C=C||{};if(!i||i.equals(this.centerPoint)){C.callback&&C.callback();return}var T=this.pointToPixelIn(i);var e=Math.round(this.width/2);var oK=Math.round(this.height/2);if(Math.abs(e-T.x)>this.width||Math.abs(oK-T.y)>this.height||C.noAnimation===true){this._panToIn(e-T.x,oK-T.y,i);C.callback&&C.callback()}else{this._panBy(e-T.x,oK-T.y,C)}},_panToIn:function(i,e,T){var C=this.temp;if(C.operating===true){return}if(C.dragAni){C.dragAni.stop();C.dragAni=null;this.dispatchEvent(new ix("onmoveend"))}this.dispatchEvent(new ix("onmovestart"));this._setPlatformPosition(i,e,{point:T});this.dispatchEvent(new ix("onmoveend"))},panBy:function(i,e,C){C=C||{};if(!K.apiVersionIsGL()){if(C.noAnimation===undefined&&C.enableAnimation!==undefined){C.noAnimation=!C.enableAnimation}}i=Math.round(i)||0;e=Math.round(e)||0;if(Math.abs(i)<=this.width&&Math.abs(e)<=this.height&&C.noAnimation!==true){this._panBy(i,e,C)}else{this._panToIn(i,e);C.callback&&C.callback()}},_panBy:function(i,e,oK){if(this.temp.operating===true){return}oK=oK||{};this.dispatchEvent(new ix("onmovestart"));var T=this;var C=T.temp;C.pl=T.offsetX;C.pt=T.offsetY;if(C.tlPan){C.tlPan.cancel()}if(C.dragAni){C.dragAni.stop();C.dragAni=null;this.dispatchEvent(new ix("onmoveend"))}C.tlPan=new ij({fps:oK.fps||T.config.fps,duration:oK.duration||T.config.actionDuration,transition:oK.transition||jF.easeInOutQuad,render:function(oL){this.terminative=T.temp.operating;if(T.temp.operating){return}T._setPlatformPosition(Math.ceil(i*oL),Math.ceil(e*oL),{initMapOffsetX:C.pl,initMapOffsetY:C.pt})},finish:function(oL){T.dispatchEvent(new ix("onmoveend"));T.temp.tlPan=false;if(T.temp.stopArrow===true){T.temp.stopArrow=false;if(T.temp.arrow!==0){T._arrow()}}oK.callback&&oK.callback()}})},getCenterIn:function(){return this.centerPoint},getZoom:function(){return this.zoomLevel},setTilt:function(){},getTilt:function(){return this._tilt},setHeading:function(){},getHeading:function(){return this._heading},restrictCenter:function(oR,i,e){this.isRestrict=false;i=i||this.getZoomUnits();e=e||this.zoomLevel;var oP=this.pixelToPointIn(new hV(this.width,0),{center:oR,zoom:e});var oN=this.pixelToPointIn(new hV(0,this.height),{center:oR,zoom:e});var oS=oR.lng;var oX=oR.lat;if(this.config.restrictBounds!==null&&!this.config.restrictBounds.isEmpty()){var oW=this.config.restrictBounds;var T=oW.getSouthWest();var oU=oW.getNorthEast();var oQ=m8.convertLL2MC(T);var oL=m8.convertLL2MC(oU);oR.lng=this.calcNewLngByBounds(oS,oN,oP,oQ.lng,oL.lng,i);oR.lat=this.calcNewLatByBounds(oX,oN,oP,oQ.lat,oL.lat,i);return oR}var oO=this.pixelToPointIn(new hV(0,0),{center:oR,zoom:e});var oK=this.pixelToPointIn(new hV(0,this.height),{center:oR,zoom:e});if(this.zoomLevel<5){if(oO.lat>li.MAX_LAT&&oK.lat<li.MIN_LAT){this.isRestrict=true;var C=li.MAX_LAT-oR.lat;var oM=oR.lat-li.MIN_LAT;var oV;if(C<oM){oV=C/(this.height/2)}else{oV=oM/(this.height/2)}var oT=18-v(oV);this.zoomLevel=Math.ceil(oT);oR.zoom=Math.ceil(oT);return oR}}if(oO.lat>li.MAX_LAT){this.isRestrict=true;oR.lat=li.MAX_LAT-this.height/2*i}else{if(oK.lat<li.MIN_LAT){this.isRestrict=true;oR.lat=li.MIN_LAT+this.height/2*i}}return oR}});var oE={"--bmap-color-bg-base":"#2b2d33","--bmap-color-bg-base-hover":"rgba(255, 255, 255, .08)","--bmap-color-bg-base-active":"rgba(74, 144, 255, .18)","--bmap-color-primary":"#5ba3ff","--bmap-color-text-base":"#e0e0e0","--bmap-color-text-weak":"#b0b0c0","--bmap-color-text-active":"#5ba3ff","--bmap-color-text-secondary":"#b0b0c0","--bmap-color-text-tertiary":"#9a9ab0","--bmap-color-border":"#3a3d44","--bmap-color-border-secondary":"#3a3d44","--bmap-color-primary-bg":"#1e2a40","--bmap-color-primary-bg-hover":"#243450","--bmap-color-fill":"rgba(255, 255, 255, .08)","--bmap-box-shadow":"0 6px 16px 0 rgba(0,0,0,.45), 0 3px 6px -4px rgba(0,0,0,.55), 0 9px 28px 8px rgba(0,0,0,.35)"};var eH={dark:oE};var k7={};function cO(T){var e=typeof document!=="undefined"&&document.documentElement;if(!e||!e.style){return}for(var C in k7){if(k7.hasOwnProperty(C)){e.style.removeProperty(C)}}k7={};if(T){for(var i in T){if(T.hasOwnProperty(i)){e.style.setProperty(i,T[i]);k7[i]=1}}}}function li(e,oR){if(typeof e==="string"){e=document.getElementById(e)}eX.call(this);this.container=e;this.width=e.clientWidth;this.height=e.clientHeight;this.offsetX=0;this.offsetY=0;this._setStyle(e);e.unselectable="on";e.innerHTML="";hv.ac(e,"bmap-container");e.appendChild(this.render());this._initDate=new Date();this.platform=e.children[0];this.maskLayer=this.platform.children[0];this._panes={};this.centerPoint=new d9(0,0);this.zoomLevel=0;this._heading=0;this._tilt=0;this._bounds=new lz();this.lastLevel=0;this._lock=false;this._enableTiltZoom=7;this._enableHeadingZoom=7;this.defaultZoomLevel=null;this.defaultCenter=null;this.zoomEventStatus="idle";this._uiTheme="light";this.currentOperation=gp.idle;this._setConfig(oR);this._initMapRenderType();this._animationInfo={};this._animationInfoUnstopable={};this.suspendLoad=false;this.earthBoundary=true;this._customTileLabels=[];this.areaCustomLoaded=true;this.defaultPoint=new d9(116.418,39.918);this._projectionMatrix3D="perspective";this.mapExtendBounds=null;if(this._renderType==="webgl"){this._workerMgr=new nH(this);this._featureMgr=new dE();hv.extend(this,M.prototype);this.jobScheduler=new cd(this);this.benchmark=new eJ();this._setupWebGLMap();this.deviceInfo={hardwareInfo:{renderer:"",vendor:""}};if(eV.ifSupportWebGL._renderer){this.deviceInfo.hardwareInfo.renderer=eV.ifSupportWebGL._renderer;this.deviceInfo.hardwareInfo.vendor=eV.ifSupportWebGL._vendor}mL.setMap(this)}else{hv.extend(this,mJ.prototype)}var oP=ft(this.config.mapType);var oO=oP.mapTypeId;if(!gA[oO]){oO=lg}if(oO===c1&&!this.config.enableEarth){if(this.forceEnableEarth()===false){oO=lg}}this.config.mapType=oO;this.mapType=oO;this.preMapType=null;if(this.config.enableEarth){var oM=this.maskLayer.style;oM.opacity=0;oM.background="#000";if(this.config.mapType===c1){oM.opacity=1}setTimeout(function(){oM.WebkitTransition=oM.transition="opacity .4s"},100)}if(typeof oP.showStreetLayer==="boolean"){this.config.showStreetLayer=oP.showStreetLayer}this._isHybridShow=this.config.showStreetLayer;this.temp={operating:false,arrow:0,lastDomMoveTime:0,lastLoadTileTime:0,lastMovingTime:0,canKeyboard:false,I:function(i){return hv.I(i)},curSpots:[],curSpotsArray:[],curAreaSpot:null,spotsGuid:1,registerIndex:-1,hoverOnSpot:null,isStdCtrlBusy:false};this._initViewport={};if(oR){if(oR.center){this._initViewport.center=oR.center}if(oR.zoom!=null){this._initViewport.zoom=oR.zoom}if(oR.heading!=null){this._initViewport.heading=oR.heading}if(oR.tilt!=null){this._initViewport.tilt=oR.tilt}}this.platform.style.cursor=this.config.defaultCursor;this._bind();if(!cv.BMAP_INSTANCES){cv.BMAP_INSTANCES=1}else{cv.BMAP_INSTANCES+=1}for(var oL=0;oL<cv._register.length;oL++){cv._register[oL](this)}this.temp.registerIndex=oL;var oN=this;if(this._renderType==="webgl"){ki.load("oppcgl",function(){oN._asyncRegister()})}else{ki.load("oppc",function(){oN._asyncRegister()})}if(this.config.mapType==="B_EARTH_MAP"){if(!cv.Earth){ki.load("earth",function(){})}else{oN._syncAndChangeMapType("B_EARTH_MAP")}}if(!K.apiVersionIsGL()){this._isDefaultView=true;try{var oK=this._initViewport.center||li.DEFAULT_CENTER;var oQ=this._initViewport.zoom||li.DEFAULT_ZOOM;var C={noAnimation:true};if(this._initViewport.heading!=null){C.heading=this._initViewport.heading}if(this._initViewport.tilt!=null){C.tilt=Math.max(0,Math.min(73,this._initViewport.tilt))}this.centerAndZoomIn(m8.convertLL2MC(oK),oQ,C)}catch(T){this._isDefaultView=false;console.warn("[BMap] default view init failed:",T)}}}li.MAX_TILT=87;li.MAX_DRAG_TILT=73;li.MAX_DRAG_TILT_L2=50;li.MIN_TILT=0;li.DEFAULT_CENTER=new d9(116.404,39.915);li.DEFAULT_ZOOM=12;li.MAX_LAT=19431424;li.MIN_LAT=-16023552;li.WORLD_SIZE_MC_HALF=20037726.372307256;li.WORLD_SIZE_MC=li.WORLD_SIZE_MC_HALF*2;li.RIGHT_EDGE_POINT=new d9(li.WORLD_SIZE_MC_HALF,0);li.LEFT_EDGE_POINT=new d9(-li.WORLD_SIZE_MC_HALF,0);li.HIGH_RES_MIN_RATIO=1.2;li.inherits(eX,"Map");var h5={NORMAL:"B_NORMAL_MAP",EARTH:"B_EARTH_MAP",SATELLITE:"B_STREET_MAP"};cv.MapTypeId=h5;var lg="B_NORMAL_MAP";var j9="B_SATELLITE_MAP";var fp="B_STREET_MAP";var c1="B_EARTH_MAP";var f4="B_NONE_MAP";function mH(e){if(!e){return e}if(typeof e==="string"){return e}if(typeof e==="object"){if(typeof e.id==="string"){return e.id}if(typeof e.mapTypeId==="string"){return e.mapTypeId}if(e===BMAP_NORMAL_MAP){return lg}if(e===BMAP_SATELLITE_MAP){return j9}if(e===BMAP_HYBRID_MAP){return fp}if(e===BMAP_EARTH_MAP){return c1}if(e===BMAP_NONE_MAP){return f4}}return e}function ft(C){var e=mH(C);var i;if(K.apiVersionIsGL()){return{mapTypeId:e}}if(C&&typeof C==="object"&&typeof C.compatType==="string"){if(C.compatType==="BMAP_HYBRID_MAP"){return{mapTypeId:j9,showStreetLayer:true}}if(C.compatType==="BMAP_SATELLITE_MAP"){return{mapTypeId:j9,showStreetLayer:false}}}if(e===fp){return{mapTypeId:j9,showStreetLayer:true}}if(e===j9){return{mapTypeId:j9,showStreetLayer:false}}return{mapTypeId:e,showStreetLayer:i}}function n4(i){var e=cv.MapType&&cv.MapType.builtin;if(!e){return i.getMapTypeId()}switch(i.getMapTypeId()){case lg:return e.BMAP_NORMAL_MAP;case j9:return(i.config.showVectorStreetLayer||i._isHybridShow)?e.BMAP_HYBRID_MAP:e.BMAP_SATELLITE_MAP;case c1:return e.BMAP_EARTH_MAP;case f4:return e.BMAP_NONE_MAP;default:return i.getMapTypeId()}}hv.extend(li.prototype,{compatMapOptions:function(e){if(!K.apiVersionIsGL()){if(e.hasOwnProperty("enableMapClick")&&!e.hasOwnProperty("enableIconClick")){e.enableIconClick=!!e.enableMapClick}if(e.hasOwnProperty("enableIconClick")&&!e.hasOwnProperty("enableMapClick")){e.enableMapClick=!!e.enableIconClick}}if(e.enableIconInfoWindow===true){e.enableIconClick=true}return e},render:function(){var e=da("div",{id:"platform"});var T=e.style;T.overflow="visible";T.position="absolute";T.zIndex=5;T.top=T.left="0px";var i=da("div",{id:"mask","class":"BMap_mask"});var C=i.style;C.position="absolute";C.top=C.left="0px";C.zIndex="9";C.overflow="hidden";C.WebkitUserSelect="none";C.width=this.width+"px";C.height=this.height+"px";e.appendChild(i);return e},_initMapRenderType:function(){var e=this.config.forceRenderType;if(e==="dom"){this._renderType="dom";return}else{if(e==="canvas"){if(eV.isModernBrowser&&!eV.ifCanvas2dInBlackList()){this._renderType="canvas";return}else{this._renderType="dom";return}}else{if(e==="webgl"){if(eV.ifSupportWebGL()){this._renderType="webgl";return}}}}if(eV.ifSupportWebGL()&&eV.ifEnableWebGLMap()){this._renderType="webgl";return}if(eV.isModernBrowser&&eV.ifEnableCanvas2dMap()){this._renderType="canvas";return}this._renderType="dom"},_setConfig:function(i){i=i||{};i=this.compatMapOptions(i);this.config={bottomOffset:0,clickInterval:200,enableDragging:true,enableRotate:true,enableTilt:true,enableKeyboard:false,enableDblclickZoom:true,enableContinuousZoom:true,enableWheelZoom:!K.apiVersionIsGL(),enableRotateGestures:true,enableTiltGestures:true,enablePinchZoom:true,fixCenterWhenPinch:false,enableAutoResize:true,zoomCenter:null,fps:hv.Browser.ie?30:60,zoomerDuration:240,actionDuration:450,defaultCursor:K.defaultCursor,draggingCursor:K.draggingCursor,overlayMoveCursor:"pointer",coordType:cv.coordType,mapType:lg,drawer:BMAP_SYS_DRAWER,enableInertialDragging:true,drawMargin:500,drawMarginGL:500,enableFulltimeSpotClick:false,enableResizeOnCenter:false,isModernBrowser:eV.isModernBrowser,forceRenderType:"",textRenderType:null,ratio:ja()>=li.HIGH_RES_MIN_RATIO?2:1,enableEarth:eV.ifEnableEarth(),defaultMaxBounds:new lz(new d9(-21364736,-10616832),new d9(23855104,15859712)),showControls:false,indoorControl:!K.apiVersionIsGL(),showRealSunlight:true,showMilkyway:true,earthBackground:null,showStreetLayer:true,showVectorStreetLayer:false,showVectorLine:false,textureScale:1,minZoom:null,maxZoom:null,earthUseRound:true,earthMinZoom:null,earthMaxZoom:null,earthSun:true,earthClouds:true,earthMarkerShowAllTime:true,earthOpacity:null,earthFixAxis:false,style:"default",showCustomIndoor:true,backgroundColor:null,enableIconClick:false,enableIconInfoWindow:false,enableIconHighlight:true,autoSafeArea:false,ak:null,webgl2:false,restrictCenter:true,restrictBounds:null,smaa:false,preserveDrawingBuffer:false,privateOn:false,privateRegions:null,popRightClick:false,videoMuted:true,overlayTop:false,highRegion:{lineOpt:null,focusOpt:false},forceReload:true,textureSizeHeight:4096*2,markerUseRound:true,fontFamily:K.fontFamily||"sans-serif",extendTiles:0,enableAdaptiveMinZoom:true,showCopyrightOnMobile:false,zoomWithCenter:false,};for(var C in i){if(i.hasOwnProperty(C)){this.config[C]=i[C];if(C==="fixCenterWhenResize"){this.config.enableResizeOnCenter=i[C]}}}if(i.style){if(i.style["styleId"]&&i.style["styleId"].length<32){this.config.style=i.style["styleId"]}else{this.config.style=i.style}}this._setTextRenderType();this._displayOptions={language:BMAP_LANGUAGE_ZH,poi:true,poiText:true,poiIcon:true,overlay:true,layer:true,building:true,indoor:K.apiVersionIsGL(),street:true,skyColors:["rgba(226, 237, 248, 0)","rgba(186, 211, 252, 1)"],isFlat:false,labelMargin:0,buildingSideGradation:false};if(i.displayOptions){for(var e in i.displayOptions){if(i.displayOptions.hasOwnProperty(e)&&i.displayOptions[e]!==undefined){this._displayOptions[e]=i.displayOptions[e]}}}if(this._displayOptions.language!==BMAP_LANGUAGE_ZH){this._displayOptions.isEn=true;this._setTextRenderType("canvas")}else{this._displayOptions.isEn=false}this.updateFocusOptions(i.focusOptions,true);if(this.config.restrictCenter===false){this._enableTiltZoom=0;this._enableHeadingZoom=0}},getLanguage:function(){return this._displayOptions.language},changeLanguage:function(i){if(i!==BMAP_LANGUAGE_ZH&&i!==BMAP_LANGUAGE_EN){throw new Error("language must be BMAP_LANGUAGE_ZH or BMAP_LANGUAGE_EN")}if(this._displayOptions.language!==i){this._displayOptions.language=i;this._displayOptions.isMultiLanguage=false;if(i!==BMAP_LANGUAGE_ZH){this._displayOptions.isEn=true;if(this.config.textRenderType==="image"){this._setTextRenderType("canvas")}}else{this._displayOptions.isEn=false}this.fire(new ix("onlanguage_change"));this.fire(new ix("onstyle_willchange"));this.fire(new ix("onstyle_loaded"));var e=new ix("onlayer_update");e.name="na";this.fire(e)}},enablePreferredLanguage:function(oK){if(!oK){var T=(navigator.language||navigator.userLanguage||"zh").toLowerCase();var i=["zh","en","zh-tw","es","pt","fr","de","th","ja","ko","tr","it","ru","ms","vi","id"];if(i.indexOf(T)!==-1){oK=T}else{if(T.indexOf("-")>-1){var C=T.split("-")[0];if(i.indexOf(C)!==-1){oK=C}}}if(!oK){oK=BMAP_LANGUAGE_ZH}}if(this._displayOptions.language!==oK){this._displayOptions.language=oK;if(oK!==BMAP_LANGUAGE_ZH){this._displayOptions.isEn=true;this._displayOptions.isMultiLanguage=true;if(this.config.textRenderType==="image"){this._setTextRenderType("canvas")}}else{this._displayOptions.isEn=false;delete this._displayOptions.isMultiLanguage}this.fire(new ix("onlanguage_change"));this.fire(new ix("onstyle_willchange"));this.fire(new ix("onstyle_loaded"));var e=new ix("onlayer_update");e.name="na";this.fire(e)}},disablePreferredLanguage:function(){this._displayOptions.language=BMAP_LANGUAGE_ZH;this._displayOptions.isEn=false;delete this._displayOptions.isMultiLanguage;this.fire(new ix("onlanguage_change"));this.fire(new ix("onstyle_willchange"));this.fire(new ix("onstyle_loaded"));var e=new ix("onlayer_update");e.name="na";this.fire(e)},updateFocusOptions:function(e,C){this._spotOptions={open:false,gray:false,involve:1,focus:0,other:7156516};if(e){for(var i in e){if(e.hasOwnProperty(i)){this._spotOptions[i]=e[i]}}}if(this._webglMapScene&&this._webglMapScene._painter){this._webglMapScene._painter._hightLightEnable()}if(!C){this._drawFrame()}},getMinZoom:function(){var i;if(gA[this.mapType][this._renderType]){i=gA[this.mapType][this._renderType].minZoom}else{i=gA[this.mapType].minZoom}if(this.config.minZoom!==null&&this.config.minZoom>=i){i=this.config.minZoom}if(this.mapType==="B_EARTH_MAP"){return i}if(this.config.enableAdaptiveMinZoom){var e=this.getSize();var C=this.worldSize(i);while(C<e.width){i++;C=this.worldSize(i)}}if(this.config.restrictBounds&&!this.config.restrictBounds.isEmpty()){var oO=m8.convertLL2MC(this.config.restrictBounds.getSouthWest());var oK=m8.convertLL2MC(this.config.restrictBounds.getNorthEast());var T=oK.lng-oO.lng;var oP=oK.lat-oO.lat;var oN=this.getSize();var oQ=18-Math.log2(T/oN.width);var oL=18-Math.log2(oP/oN.height);var oM=Math.max(oQ,oL);if(oM>i){i=oM}}return i},getMaxZoom:function(){var e;if(gA[this.mapType][this._renderType]){e=gA[this.mapType][this._renderType].maxZoom}else{e=gA[this.mapType].maxZoom}if(this.config.maxZoom!==null&&this.config.maxZoom<=e){e=this.config.maxZoom}else{if(this._renderType==="webgl"){e=21}}return e},_drawFrame:function(){if(this._webglMapScene&&this._webglMapScene._painter){this._webglMapScene._painter.draw()}},_setupWebGLMap:function(){var e=this;ki.load("mapgl",function(){e._asyncRegister()})},_setStyle:function(i){var e=i.style;e.overflow="hidden";if(dK(i).position!=="absolute"){e.position="relative"}e.backgroundImage="url("+K.imgPath+"bg.png)";e.textAlign="left";e.touchAction=e.MSTouchAction="none"},_bind:function(){var e=this;if(e._renderType!=="webgl"){e._watchSize=function(){var C=e.getContainerSize();if(e.width!==C.width||e.height!==C.height){var oM=(C.width-e.width)/2;var oO=(C.height-e.height)/2;var T=e.getZoomUnits();var oL=e.centerPoint;if(oL&&!e.config.enableResizeOnCenter){e.centerPoint=new d9(oL.lng+oM*T,oL.lat-oO*T)}e.maskLayer.style.width=(e.width=C.width)+"px";e.maskLayer.style.height=(e.height=C.height)+"px";var oK=new ix("onresize");oK.size=C;e.dispatchEvent(oK);e.fire(new ix("onsize_changed"));var i=parseInt(e.platform.style.left,10)||0;var oN=parseInt(e.platform.style.top,10)||0;if(e.currentOperation!=="undefined"&&e.currentOperation!==gp.idle&&(e.offsetX!==i||e.offsetY!==oN)){e._setPlatformPosition(i,oN)}}}}else{e._watchSize=function(){var i=e.getContainerSize();if(e.width!==i.width||e.height!==i.height){var T=e.getSize();e.maskLayer.style.width=(e.width=i.width)+"px";e.maskLayer.style.height=(e.height=i.height)+"px";if(ja()!==e.config.ratio){e.config.ratio=ja()}var oK=new ix("onresize");oK.size=i;e.dispatchEvent(oK);var C=new ix("onsize_changed");C.size=i;C.oldSize=T;e.fire(C)}}}if(e.config.enableAutoResize){e.temp.autoResizeTimer=setInterval(e._watchSize,16)}this.on("size_changed",function(){var i=e.getMinZoom();if(e.zoomLevel<i){e.setZoomIn(i,{noAnimation:true})}});this.on("zoom_changed",function(){this.dispatchEvent(new ix("onzooming"))})},addControl:function(e){if(e&&c2(e._i)){e._i(this);this.dispatchEvent(new ix("onaddcontrol",e))}},removeControl:function(e){if(e&&c2(e.remove)){e.remove();this.dispatchEvent(new ix("onremovecontrol",e))}},hideEarthBoundary:function(){this.earthBoundary=false},showEarthBoundary:function(){this.earthBoundary=true},addContextMenu:function(i,e){if(i){i.initialize(this,e);this.dispatchEvent(new ix("onaddcontextmenu",i))}},removeContextMenu:function(e){if(e){this.dispatchEvent(new ix("onremovecontextmenu",e));e.remove()}},_addDistrictLayer:function(e){if(e){e.initialize(this)}},_removeDistrictLayer:function(e){if(e){e.removeDistrict(this,e)}},_addCustomHtmlLayer:function(e){if(e){e.initialize(this)}},_removeCustomHtmlLayer:function(e){if(e){e.removeLayer(e)}},addParkingSpot:function(e){if(e){e.initialize(this)}},removeParkingSpot:function(e){if(e){e.removeParkingSpot()}},addOverlay:function(i){if(i&&c2(i._i)){var C=new ix("onbeforeaddoverlay",i);C.overlay=i;this.dispatchEvent(C);i._i(this);C=new ix("onaddoverlay",i);C.overlay=i;this.dispatchEvent(C)}},removeOverlay:function(i){if(i&&c2(i.remove)){if(i instanceof dM){if(this.stencil){this.stencil=null}}var C=new ix("onremoveoverlay",i);C.overlay=i;i.remove();this.dispatchEvent(C)}},addFocusMask:function(e){if(e instanceof mw){mL.addFocusMask(e)}if(e instanceof Array){for(var C=0;C<e.length;C++){if(e[C] instanceof mw){mL.addFocusMask(e[C])}}}this._drawFrame()},removeFocusMask:function(e){if(e instanceof mw){mL.removeFocusMask(e)}if(e instanceof Array){for(var C=0;C<e.length;C++){if(e[C] instanceof mw){mL.removeFocusMask(e[C])}}}this._drawFrame()},clearFocusMasks:function(){mL.removeFocusMask();this._drawFrame()},clearOverlays:function(){this.dispatchEvent(new ix("onclearoverlays"))},_addTileLayer:function(oK){if(!oK){return}if(oK instanceof fm||oK instanceof gg||oK instanceof fl){if(oK.layer){oK=oK.layer}else{return}}for(var T=0,e=this.tileMgr.tileLayers.length;T<e;T++){var C=this.tileMgr.tileLayers[T];if(C===oK||C.getMapType()===oK.getMapType()){return}}oK.initialize(this);this.dispatchEvent(new ix("onaddtilelayer",oK))},_removeTileLayer:function(e){if(e){if(e instanceof fm||e instanceof gg||e instanceof fl){if(e.layer){e=e.layer}else{return}}e.remove();this.dispatchEvent(new ix("onremovetilelayer",e))}},_addNormalLayer:function(e){if(!e||!(e instanceof dQ)){return}this.dispatchEvent(new ix("onaddnormallayer",e))},_removeNormalLayer:function(e){if(e&&e instanceof dQ){this.dispatchEvent(new ix("onremovenormallayer",e))}},_addGeoJSONLayer:function(e){if(e&&e instanceof bk){e.init(this)}},_removeGeoJSONLayer:function(e){if(e&&e instanceof bk){e.remove()}},_addVisualLayer:function(e){if(this._visualMgr){this._visualMgr.addLayer(e)}},_removeVisualLayer:function(e){if(this._visualMgr){this._visualMgr.removeLayer(e)}},addLayer:function(e){if(!e){return}if(e.isNormalLayer){this._addNormalLayer(e)}else{if(e.isGeoJSONLayer){this._addGeoJSONLayer(e)}else{if(e.isTileLayer){this._addTileLayer(e)}else{if(e.isDistrictLayer){this._addDistrictLayer(e)}else{if(e.isCustomHtmlLayer){this._addCustomHtmlLayer(e)}else{if(e.isWebGLLayer){this._addVisualLayer(e)}else{console.warn("[BMap] addLayer: unknown layer type",e)}}}}}}},removeLayer:function(e){if(!e){return}if(e.isNormalLayer){this._removeNormalLayer(e)}else{if(e.isGeoJSONLayer){this._removeGeoJSONLayer(e)}else{if(e.isTileLayer){this._removeTileLayer(e)}else{if(e.isDistrictLayer){this._removeDistrictLayer(e)}else{if(e.isCustomHtmlLayer){this._removeCustomHtmlLayer(e)}else{if(e.isWebGLLayer){this._removeVisualLayer(e)}else{console.warn("[BMap] removeLayer: unknown layer type",e)}}}}}}},addNormalLayer:function(e){if(!K.apiVersionIsGL()){console.warn("[BMap] addNormalLayer is deprecated, use addLayer instead")}this._addNormalLayer(e)},removeNormalLayer:function(e){if(!K.apiVersionIsGL()){console.warn("[BMap] removeNormalLayer is deprecated, use removeLayer instead")}this._removeNormalLayer(e)},addTileLayer:function(e){if(!K.apiVersionIsGL()){console.warn("[BMap] addTileLayer is deprecated, use addLayer instead")}this._addTileLayer(e)},removeTileLayer:function(e){if(!K.apiVersionIsGL()){console.warn("[BMap] removeTileLayer is deprecated, use removeLayer instead")}this._removeTileLayer(e)},addGeoJSONLayer:function(e){if(!K.apiVersionIsGL()){console.warn("[BMap] addGeoJSONLayer is deprecated, use addLayer instead")}this._addGeoJSONLayer(e)},removeGeoJSONLayer:function(e){if(!K.apiVersionIsGL()){console.warn("[BMap] removeGeoJSONLayer is deprecated, use removeLayer instead")}this._removeGeoJSONLayer(e)},addDistrictLayer:function(e){if(!K.apiVersionIsGL()){console.warn("[BMap] addDistrictLayer is deprecated, use addLayer instead")}this._addDistrictLayer(e)},removeDistrictLayer:function(e){if(!K.apiVersionIsGL()){console.warn("[BMap] removeDistrictLayer is deprecated, use removeLayer instead")}this._removeDistrictLayer(e)},addCustomHtmlLayer:function(e){if(!K.apiVersionIsGL()){console.warn("[BMap] addCustomHtmlLayer is deprecated, use addLayer instead")}this._addCustomHtmlLayer(e)},removeCustomHtmlLayer:function(e){if(!K.apiVersionIsGL()){console.warn("[BMap] removeCustomHtmlLayer is deprecated, use removeLayer instead")}this._removeCustomHtmlLayer(e)},getTileLayer:function(e){if(this.tileMgr){return this.tileMgr.getTileLayer(e)}return null},setMapType:function(i){var T=this;var oN=ft(i);var C=oN.mapTypeId;var oL=!!(this.config.showVectorStreetLayer||this._isHybridShow);if(this._mapTypeChanging){return}if(this.getMapTypeId()===C){if(typeof oN.showStreetLayer!=="boolean"||oN.showStreetLayer===oL){return}this.preMapType=this.mapType;this._boundsInPreMapType=this.getBoundsIn();this._mapTypeChanging=true;var oM=!K.apiVersionIsGL()?n4(this):this.getMapTypeId();if(oN.showStreetLayer){if(this.config.showVectorStreetLayer){this._addHybirdVectorMap()}else{this._addHybirdMap()}}else{this.hideVectorStreetLayer();this.hideStreetLayer()}this._mapTypeChanging=false;var oK=new ix("onmaptypechange");oK.zoomLevel=this.zoomLevel;oK.mapType=!K.apiVersionIsGL()?n4(this):this.getMapTypeId();oK.exMapType=oM;this.dispatchEvent(oK);return}if(C===c1&&!this.config.enableEarth){return}if(this._earth&&this._earth.getLock()){return}this._mapTypeChanging=true;this.preMapType=this.mapType;this._boundsInPreMapType=this.getBoundsIn();if(this.preMapType===j9){this._preStreetLayerShow=this._isHybridShow}this._requestedStreetLayerShow=oN.showStreetLayer;if(C===c1){if(T.config.earthOpacity!==null){T._webglPainter&&(T._webglPainter._canvas.style.opacity=0)}if(!cv.Earth){ki.load("earth",function(){T._syncAndChangeMapType(C)});return}T._syncAndChangeMapType(C)}else{if(this.preMapType!==c1){this._changeFlatMapType(C);this._mapTypeChanging=false}else{this._setMapTypeStatus(C,function(e,oO){var oP=T._earth.getEarthCanvas();T._changeFlatMapType(C,this.preMapType);if(T._mapTypeChangAni){T._mapTypeChangAni.stop()}T._mapTypeChangAni=fg.start({el:oP,style:"opacity",startValue:1,endValue:0,duration:200,callback:function(){T._mapTypeChangAni=null;T._mapTypeChanging=false;if(T.config.earthOpacity!==null){T._webglPainter&&(T._webglPainter._canvas.style.opacity=1)}}});e=m8.convertLL2MC(e);if(T._renderType==="webgl"){hv.extend(T,M.prototype);T.setCenterIn(e,{noAnimation:true});T.setZoomIn(oO,{noAnimation:true})}else{hv.extend(T,mJ.prototype);T.centerAndZoomIn(e,oO)}})}}},_changeFlatMapType:function(oN){if(!oN||!gA[oN]){return}var oV=this.preMapType;this.mapType=oN;if(oN!==j9){this._clearSatelliteOverlayState()}if(oV===c1){this._removeInnerTileLayers()}var T=this.getTileLayer(oV);if(T){this._removeTileLayer(T)}else{if(this.tileMgr.tileLayers.length){var oU=this.getTileLayer(lg);if(oU){this._removeTileLayer(oU)}else{oU=this.getTileLayer(j9);oU&&this._removeTileLayer(oU)}}}var oL=typeof this._requestedStreetLayerShow==="boolean"?this._requestedStreetLayerShow:this.config.showStreetLayer;if(oV===j9&&this.config.showVectorStreetLayer){this._removeHybirdVectorMap()}else{if(oV===j9&&this._preStreetLayerShow){this._removeHybirdMap()}}if(this.mapType!==c1||this._renderType!=="webgl"||this.baseLayerAdded!==true){if(oN!==f4){var C=new lz(new d9(-21364736,-10616832),new d9(23855104,15859712));var oS=new q(C,"baidu",oN);var oK=new kT({mapType:this.mapType,copyright:oS,dataType:this.mapType===j9?jK:lf,customLayer:this.mapType===j9,baseLayer:true,transparentPng:false,tileTypeName:this.mapType===j9?"web":"na"});oK._isInnerLayer=true;oK.setZIndex(0);this._addTileLayer(oK);if(this._renderType==="webgl"&&!this.baseLayerAdded){this.baseLayerAdded=true}}if(this.mapType===f4){kU.sendMessage("Map","maptype","none")}else{if(this.mapType===j9){kU.sendMessage("Map","maptype","satellite")}else{kU.sendMessage("Map","maptype","normal")}}}if(oN===j9){this._featureMgr.clearLabelOverlayData();this._featureMgr.setLabelData([]);if(oL===true){if(this.config.showVectorStreetLayer){this._addHybirdVectorMap()}else{this._addHybirdMap()}}else{if(typeof oL==="undefined"){if(this.config.showVectorStreetLayer){this._addHybirdVectorMap()}else{this._addHybirdMap()}}else{this.config.showVectorStreetLayer=false;this._isHybridShow=false}}}var oP=this.tileMgr.tileLayers;for(var oO=0,oM=oP.length;oO<oM;oO++){var oQ=oP[oO];var oT=oQ.tilesDiv;if(!oT){continue}if(!oQ._isInnerLayer&&oT.style.visibility==="hidden"){oT.style.visibility=""}}var oR=new ix("onmaptypechange");oR.zoomLevel=this.zoomLevel;if(!K.apiVersionIsGL()){oR.mapType=n4(this);if(oV===j9){oR.exMapType=this._preStreetLayerShow?cv.MapType.builtin.BMAP_HYBRID_MAP:cv.MapType.builtin.BMAP_SATELLITE_MAP}else{if(oV===lg){oR.exMapType=cv.MapType.builtin.BMAP_NORMAL_MAP}else{if(oV===c1){oR.exMapType=cv.MapType.builtin.BMAP_EARTH_MAP}else{if(oV===f4){oR.exMapType=cv.MapType.builtin.BMAP_NONE_MAP}else{oR.exMapType=oV}}}}}else{oR.mapType=oN;oR.exMapType=oV}this.dispatchEvent(oR);this._requestedStreetLayerShow=undefined},showStreetLayer:function(e){if(e===undefined){e=true}this.config.showStreetLayer=!!e;if(e){this.hideVectorStreetLayer();this._addHybirdMap()}else{this._removeHybirdMap()}},showVectorStreetLayer:function(){this.hideStreetLayer();this.hideVectorStreetLayer();this.config.showStreetLayer=false;this.config.showVectorStreetLayer=true;if(this.mapType===j9||this.mapType===f4){this._addHybirdVectorMap()}},hideStreetLayer:function(){this.config.showStreetLayer=false;this._removeHybirdMap()},hideVectorStreetLayer:function(){this.config.showVectorStreetLayer=false;if(this.mapType===j9||this.mapType===f4){this._removeHybirdVectorMap()}},_clearSatelliteOverlayState:function(){this._removeHybirdVectorMap();this._removeHybirdMap();if(this._featureMgr){this._featureMgr.clearLabelOverlayData();this._featureMgr.setLabelData([])}},_removeInnerTileLayers:function(){var T=this.tileMgr&&this.tileMgr.tileLayers?this.tileMgr.tileLayers.slice():[];for(var C=0,e=T.length;C<e;C++){if(T[C]&&T[C]._isInnerLayer){this._removeTileLayer(T[C])}}},_addHybirdVectorMap:function(){var e=new kT({mapType:lg,dataType:lf,customLayer:false,baseLayer:false,transparentPng:true,tileTypeName:"na"});e._isInnerLayer=true;e.setZIndex(1);this._addTileLayer(e)},_removeHybirdVectorMap:function(){var oK=this.tileMgr.tileLayers;for(var T=0,e=oK.length;T<e;T++){var C=oK[T];if(!C){continue}if(C._isInnerLayer&&C.mapType===lg){this._removeTileLayer(C)}}},_addHybirdMap:function(){this._isHybridShow=true;if(this.mapType===c1){if(this._earth){this._earth.showStreetLayer()}return}if(this._hybridTileLayer){this._addTileLayer(this._hybridTileLayer);var oM=new ix("onstreetlayer_show");this.dispatchEvent(oM);return}var oK=new lz(new d9(-21364736,-10616832),new d9(23855104,15859712));var C=new q(oK,"",fp);var i=new kT({copyright:C,transparentPng:true,pack:true,tileTypeName:"web"});i._isInnerLayer=true;var T=this.isCanvasMap();i.getTilesUrl=function(oN,oT){var oR=gA[fp];var oS=oe("ditu","satelliteStreet");var oO=oS.ver;var e=oS.udt;var oQ=hz.calcLoopParam(oN.x,oT).col;var oP=oR.tileUrls[Math.abs(oN.x+oN.y)%oR.tileUrls.length]+"?qt=vtile&x="+(oQ+"").replace(/-/gi,"M")+"&y="+(oN.y+"").replace(/-/gi,"M")+"&z="+oT+"&styles=sl&v="+oO+"&udt="+e+"&scaler="+ja()+"&showtext="+(T?0:1);return oP};this._isHybridShow=true;this._addTileLayer(i);this._hybridTileLayer=i;var oL=new ix("onstreetlayer_show");this.dispatchEvent(oL)},_removeHybirdMap:function(){this._isHybridShow=false;if(this.mapType===c1){if(this._earth){this._earth.hideStreetLayer()}return}if(this._hybridTileLayer){this._removeTileLayer(this._hybridTileLayer);var i=new ix("onstreetlayer_hide");this.dispatchEvent(i)}},isStreetLayerShow:function(){if(this.mapType===c1&&this._earth){return !!this._earth._streetLayerVisible}return !!(this.config.showVectorStreetLayer||this._isHybridShow)},getTileId:function(e,oL){var T=gA[this.mapType];if(typeof T!=="object"){return null}var C=T.baseUnits*Math.pow(2,(T.zoomLevelBase-oL));var oK=parseInt(e.lng/C,10);var i=parseInt(e.lat/C,10);return{row:oK,column:i,level:oL}},reset:function(){this.centerAndZoomIn(this.defaultCenter,this.defaultZoomLevel,true)},setOptions:function(i){i=i||{};i=this.compatMapOptions(i);var oK=this;for(var T in i){if(i.hasOwnProperty(T)){var C=true;if(typeof i[T]!=="object"){C=i[T]!==this.config[T]}this.config[T]=i[T];if(T==="fixCenterWhenResize"){this.config.enableResizeOnCenter=i[T]}if(!C){continue}switch(T){case"style":case"styleUrl":var e={os:i.style.os,sv:i.style.sv};if(T==="style"&&i.styleUrl){break}this.fire(new ix("onstyle_willchange"));this.loadMapStyleFiles(function(){var oL=new ix("onlayer_update");oL.name="na";oK.fire(oL)},e);break;case"enableAutoResize":if(i[T]===true){this.enableAutoResize()}else{this.disableAutoResize()}break;case"displayOptions":this.setDisplayOptions(i[T]);break;case"indoorControl":if(oK._indoorMgr){oK._indoorMgr._toggleControl(i[T])}break}}}},setPrivateStatus:function(i){if(typeof i==="boolean"){if(this.config.privateOn!==i){this.config.privateOn=i;var e=new ix("onlayer_update");e.name="na";this.fire(e)}}},getPrivateStatus:function(){return this.config.privateOn},setPrivateRegions:function(oK){if(oK&&oK instanceof Array){var T=true;for(var C=0;C<oK.length;C++){if(oK[C] instanceof es){continue}else{T=false;break}}if(T){this.config.privateRegions=oK;var e=new ix("onlayer_update");e.name="na";this.fire(e)}}},getPrivateRegions:function(){if(!this.config.privateRegions){return null}else{return this.config.privateRegions}},enableDragging:function(){this.config.enableDragging=true},disableDragging:function(){this.config.enableDragging=false},enableInertialDragging:function(){this.config.enableInertialDragging=true},disableInertialDragging:function(){this.config.enableInertialDragging=false},enableScrollWheelZoom:function(){this.config.enableWheelZoom=true},disableScrollWheelZoom:function(){this.config.enableWheelZoom=false},enableContinuousZoom:function(){this.config.enableContinuousZoom=true},disableContinuousZoom:function(){this.config.enableContinuousZoom=false},enableResizeOnCenter:function(){this.config.enableResizeOnCenter=true},disableResizeOnCenter:function(){this.config.enableResizeOnCenter=false},enableDoubleClickZoom:function(){this.config.enableDblclickZoom=true},disableDoubleClickZoom:function(){this.config.enableDblclickZoom=false},enableKeyboard:function(){this.config.enableKeyboard=true},disableKeyboard:function(){this.config.enableKeyboard=false},getSize:function(){return new mU(this.width,this.height)},enablePinchToZoom:function(){this.config.enablePinchZoom=true},disablePinchToZoom:function(){this.config.enablePinchZoom=false},enableRotateGestures:function(){this.config.enableRotateGestures=true},disableRotateGestures:function(){this.config.enableRotateGestures=false},enableTilt:function(){this.config.enableTilt=true},disableTilt:function(){this.config.enableTilt=false},enableRotate:function(){this.config.enableRotate=true},disableRotate:function(){this.config.enableRotate=false},enableAutoResize:function(){this.config.enableAutoResize=true;this._watchSize();if(!this.temp.autoResizeTimer){this.temp.autoResizeTimer=setInterval(this._watchSize,16)}},disableAutoResize:function(){this.config.enableAutoResize=false;if(this.temp.autoResizeTimer){clearInterval(this.temp.autoResizeTimer);this.temp.autoResizeTimer=null}},checkResize:function(){this._watchSize()},resize:function(){if(!K.apiVersionIsGL()){console.warn("[BMap] resize is only for GL version, use checkResize instead")}this._watchSize()},getContainerSize:function(){return new mU(this.container.clientWidth,this.container.clientHeight)},_getProperZoom:function(C){if(!C){C=this.zoomLevel}var i=this.getMinZoom();var e=this.getMaxZoom();var T=false;if(C<i){T=true;C=i}if(C>e){T=true;C=e}if(this._renderType!=="webgl"){C=Math.round(C)}return{zoom:C,exceeded:T}},getContainer:function(){return this.container},getZoomUnits:function(C){if(this.mapType===c1){return Math.pow(2,18-this._earth.getImageZoom())}var e=gA[this.mapType];if(typeof e!=="object"){return null}var i=C||this.zoomLevel;return Math.pow(2,(e.zoomLevelBase-i))},pointToPixelIn:function(oT,oV){if(!oT){return}oV=oV||{};if(this.mapType===c1){var T;if(!oT._llPt){T=m8.convertMC2LL(oT);oT._llPt=T}T=oT._llPt;var oP=null;var C=null;if(typeof oV.zoom==="number"){var oS=this._earth;var oU=oS._getEarthZoomByImgZoom(oV.zoom);if(oU<=3){oP=oS._generateTmpPMatrix(oU)}C=oS._generateTmpMVMatrix(oS.getCenter(),oU)}var oL=this._earth.fromLatLngToPixel(T,{useRound:false,isCalcOnBack:true,matrixInfo:{modelViewMatrix:C,projectionMatrix:oP}});return oL}var oK=typeof oV.heading==="number"||typeof oV.tilt==="number";if((this._heading%360===0&&this._tilt===0&&!oK)||!this._webglMapCamera){var oR=this.getZoomUnits(oV.zoom);var oN=oV.center||this.centerPoint;var i=this.width/2;var oM=this.height/2;var oQ=(oT.lng-oN.lng)/oR+i;var oO=(oN.lat-oT.lat)/oR+oM;if(oV.useRound!==false){oQ=Math.round(oQ);oO=Math.round(oO)}return new hV(oQ,oO)}var e=this._webglMapCamera.fromMCToScreenPixel(oT.lng,oT.lat,oV);if(oV.useRound===false){return e}e.x=Math.round(e.x);e.y=Math.round(e.y);return e},pixelToPointIn:function(e,oQ){if(!e){return}oQ=oQ||{};if(this.mapType===c1){if(typeof oQ.zoom==="number"){var oO=this._earth;var oL=null;var C=null;var oP=oO._getEarthZoomByImgZoom(oQ.zoom);if(oP<=3){oL=oO._generateTmpPMatrix(oP)}C=oO._generateTmpMVMatrix(oO.getCenter(),oP)}var i=this._earth.fromPixelToLatLng(e,{matrixInfo:{modelViewMatrix:C,projectionMatrix:oL}});if(i===null){return null}return m8.convertLL2MC(i)}if((this._heading%360!==0||this._tilt>0||typeof oQ.heading==="number"||typeof oQ.tilt==="number")&&this._webglMapCamera){return this._webglMapCamera.fromScreenPixelToMC(e.x,e.y,oQ)}var oM=oQ.center||this.centerPoint;var oN=this.getZoomUnits(oQ.zoom);var oK=oM.lng+oN*(e.x-this.width/2);var T=oM.lat-oN*(e.y-this.height/2);return new d9(oK,T)},pointToOverlayPixelIn:function(e,T){T=T||{};var C=this.pointToPixelIn(e,{zoom:T.zoom,center:T.center,forLabel:true,frustumTest:true,useRound:T.useRound});if(!C){return}if(T.fixPosition&&this.mapType!=="B_EARTH_MAP"){var oK=this.getSize();var i=this.worldSize(T.zoom);if(i>0&&isFinite(C.x)){if(C.x>oK.width){C.x-=Math.ceil((C.x-oK.width)/i)*i}else{if(C.x<0){C.x+=Math.ceil((0-C.x)/i)*i}}}}if(this._renderType==="webgl"){return C}C.x-=this.offsetX;C.y-=this.offsetY;return C},overlayPixelToPointIn:function(i,e){if(!i){return}var C=i.clone();if(this._renderType!=="webgl"){C.x+=this.offsetX;C.y+=this.offsetY}return this.pixelToPointIn(C,e)},getProjection:function(){return new m8()},lnglatToMercator:function(e,T){var i=new d9(e,T);var C=m8.convertLL2MC(i);return[C.lng,C.lat]},lngLatToMercator:function(e,i){return this.lnglatToMercator(e,i)},mercatorToLnglat:function(i,e){if(isNaN(i)||isNaN(e)){return[]}i=parseFloat(i);e=parseFloat(e);var T=new d9(i,e);var C=m8.convertMC2LL(T);return[C.lng,C.lat]},mercatorToLngLat:function(i,e){return this.mercatorToLnglat(i,e)},getBoundsIn:function(){if(!this._bounds){return}var oW=arguments[0];if(this.mapType===c1&&this._earth){var oQ=this._earth.getCustomBounds();if(!oQ){return this.config.defaultMaxBounds}var oP=oQ.getSouthWest();var e=oQ.getNorthEast();if(oP.lng>e.lng){e.lng=180}var pd=m8.convertLL2MC(oP);var o3=m8.convertLL2MC(e);var oT=this.config.defaultMaxBounds;var o2=Math.max(pd.lng,oT.sw.lng);var o1=Math.max(pd.lat,oT.sw.lat);var oV=Math.min(o3.lng,oT.ne.lng);var oU=Math.min(o3.lat,oT.ne.lat);var oY=new lz(new d9(o2,o1),new d9(oV,oU));oY.pointBottomLeft=new d9(o2,o1);oY.pointBottomRight=new d9(oV,o1);oY.pointTopLeft=new d9(o2,oU);oY.pointTopRight=new d9(oV,oU);oY.setMinMax();oY.makeNormalizedPoint(this._earth.getHeading());return oY}oW=oW||{};var oK=oW.margins||[0,0,0,0];var o8=this.pixelToPointIn({x:oK[3],y:this.height-oK[2]},oW);var pc=this.pixelToPointIn({x:this.width-oK[1],y:oK[0]},oW);var o0=typeof oW.heading==="number"?oW.heading:(this._heading%360);var C=typeof oW.tilt==="number"?oW.tilt:this._tilt;var oS=this._webglMapCamera;if((o0===0&&C===0)||!oS){this._bounds.setSouthWest(o8);this._bounds.setNorthEast(pc);this._bounds.pointBottomLeft=o8;this._bounds.pointBottomRight=new d9(pc.lng,o8.lat);this._bounds.pointTopRight=pc;this._bounds.pointTopLeft=new d9(o8.lng,pc.lat);this._bounds.setMinMax();this._bounds.makeNormalizedPoint(o0);return this._bounds}var oZ=this.pixelToPointIn({x:oK[3],y:oK[0]},oW);var T=oS.getPosition();var pe=Math.sqrt(Math.pow(oZ.lng-T[0],2)+Math.pow(oZ.lat-T[1],2));var o9=this.getZoomUnits();var pg=pe/o9;var o6=oS._frustumSideLen;var oO=oS._fovy;if(this._projectionMatrix3D!=="ortho"&&(pg>o6||(90-C)<oO/2)){var pf=[oZ.lng-T[0],oZ.lat-T[1]];if((90-C)<oO/2){pf[0]=-pf[0];pf[1]=-pf[1]}var o7=o6*o9;var oN=[pf[0]/pe*o7+T[0],pf[1]/pe*o7+T[1]];var o4=[pc.lng-T[0],pc.lat-T[1]];if((90-C)<oO/2){o4[0]=-o4[0];o4[1]=-o4[1]}var oL=[o4[0]/pe*o7+T[0],o4[1]/pe*o7+T[1]];oZ.lng=oN[0];oZ.lat=oN[1];pc.lng=oL[0];pc.lat=oL[1]}var oX=this.pixelToPointIn({x:this.width-oK[1],y:this.height-oK[2]},oW);var o5=[o8,pc,oZ,oX];var pb=o5[0].lng;var ph=o5[0].lat;var oM=o5[0].lng;var oR=o5[0].lat;for(var pa=1;pa<4;pa++){if(o5[pa].lng<pb){pb=o5[pa].lng}if(o5[pa].lng>oM){oM=o5[pa].lng}if(o5[pa].lat<ph){ph=o5[pa].lat}if(o5[pa].lat>oR){oR=o5[pa].lat}}this._bounds.setSouthWest(new d9(pb,ph));this._bounds.setNorthEast(new d9(oM,oR));this._bounds.pointTopLeft=oZ;this._bounds.pointTopRight=pc;this._bounds.pointBottomRight=oX;this._bounds.pointBottomLeft=o8;this._bounds.makeNormalizedPoint(o0);this._bounds.setMinMax();return this._bounds},getExtendBounds:function(){var C=lA.getInstance("na");var oT=this.getZoom();var e=Math.floor(oT);var oR=C.getDataZoom(oT);oR=dA(oR,oB.minDataZoom,oB.maxDataZoom);var oL=e;var oP=C.getTileSize(oT);var oZ=C.getBaseTileSize(oT);var oM=this.getBoundsIn();if(!oM){return}var oQ=C.getMercatorSize(oT,oR);var oW;var oS;var o1;var oX;var oV=map.getCenterIn();oV=hz.calcLoopCenterPoint(oV);var T=Math.floor(oV.lng/oQ);var o2=Math.floor(oV.lat/oQ);var o0=0;var oN=0;oM=hz.calcLoopMapBounds(oM,oV);if(oM.ne.lng>hz._mc180X){var oK=hz.getSpaceDistanceInPixel(oR);o0=Math.ceil(oK/oZ)}if(oM.sw.lng<hz._mcM180X){var oK=hz.getSpaceDistanceInPixel(oR);oN=Math.ceil(oK/oZ)}if(oM.ne.lat>19505879.362428114||oM.sw.lat<-15949096.637571886){oM.ne.lat=19505879.362428114;oM.sw.lat=-15949096.637571886}var oY=[Math.floor(oM.sw.lng/oQ)-oN,Math.floor(oM.sw.lat/oQ)];var i=[Math.floor(oM.ne.lng/oQ)+o0,Math.floor(oM.ne.lat/oQ)];oW=oY[0]-this.config.extendTiles;oS=i[0]+1+this.config.extendTiles;o1=oY[1]-this.config.extendTiles;oX=i[1]+1+this.config.extendTiles;var oU=m8.tileToBoundRange({col:oS,row:oX,baseTileSize:oZ,zoom:oR});var oO=m8.tileToBoundRange({col:oW,row:o1,baseTileSize:oZ,zoom:oR});this.mapExtendBounds=new lz(oO.LL.sw,oU.LL.ne);return this.mapExtendBounds},isLoaded:function(){return !!this.loaded},_getBestLevel:function(i,oS){var oL=0;if(this._renderType==="webgl"&&!c9()){oL=100}var oM=oS.margins||[10,10,10,10];var T=oS.zoomFactor||0;var oN=oM[1]+oM[3];var oK=oM[0]+oM[2];var e=this.getMinZoom();var oR=this.getMaxZoom();var oQ=i.toSpan();var oP=oQ.width/(this.width-oN-oL);var oO=oQ.height/(this.height-oK-oL);var C=18-v(Math.max(oP,oO));if(C<e){C=e}if(C>oR){C=oR}C+=T;if(this._renderType!=="webgl"){C=Math.floor(C)}return C},getViewportIn:function(oS,oK){if(this.mapType===c1){oS=oS||[];var oM=[];for(var oT=0;oT<oS.length;oT++){if(!oS[oT]){continue}oM.push(m8.convertMC2LL(oS[oT]))}var oU=this._earth.getViewportIn(oM,oK);var T=oU.center;var oQ=oU.zoom;var oY=m8.convertLL2MC(T);return{center:oY,zoom:oQ}}var oO={center:this.getCenterIn(),zoom:this.getZoom()};if(!oS||oS.length===0){return oO}oK=oK||{};var oN;if(oS instanceof lz){oN=oS}else{var oL=oS;oN=new lz();for(var oR=oL.length-1;oR>=0;oR--){oN.extend(oL[oR])}if(oN.isEmpty()){return oO}}var oX=oN.getCenter();var e=this._getBestLevel(oN,oK);if(oK.margins){var C=oK.margins;var oW=(C[1]-C[3])/2;var oP=(C[0]-C[2])/2;var oV=this.getZoomUnits(e);oX.lng=oX.lng+oV*oW;oX.lat=oX.lat+oV*oP}return{center:oX,zoom:e}},setViewportIn:function(T,oK){if(this.mapType===c1){var oO;if(T&&T.center){var C=m8.convertMC2LL(T.center);var oM=this._earth._getEarthZoomByImgZoom(T.zoom,C);oO={center:C,zoom:oM}}else{oO=[];for(var oL=0;oL<T.length;oL++){var oN=m8.convertMC2LL(T[oL]);oO[oL]=new d1(oN.lat,oN.lng)}}this._earth.setViewportIn(oO,oK);return}var e;if(T&&T.center){e=T}else{e=this.getViewportIn(T,oK)}oK=oK||{};if(this._renderType==="webgl"){this.centerAndZoomIn(e.center,e.zoom,oK);return}if(e.zoom===this.zoomLevel&&oK.enableAnimation!==false){this.panToIn(e.center,{duration:200,callback:oK.callback})}else{this.centerAndZoomIn(e.center,e.zoom,oK)}},addSpots:function(C,i){if(!C||C.length===0){return}i=i||{};var oL=i.zIndex||0;var oK=typeof i.enableMultiResponse==="undefined"?true:!!i.enableMultiResponse;this.spotsPool=this.spotsPool||{};var e="sp"+(this.temp.spotsGuid++);this.spotsPool[e]={spots:C.slice(0),zIndex:oL,enableMultiResponse:oK};var T=this;ki.load("hotspot",function(){T._asyncRegister()},true);return e},getSpots:function(e){return this.spotsPool[e]&&this.spotsPool[e].spots||[]},removeSpots:function(e){if(!e||!this.spotsPool[e]){return}delete this.spotsPool[e]},clearSpots:function(){delete this.spotsPool;delete this._hotspotIndex},addHotspot:function(i,e){if(!i||!(i instanceof dX)||i._invalid){return}e=e||"custom";if(i._bindTag&&i._bindTag!==e){this.removeHotspot(i,i._bindTag)}i.initialize(this);i._bindTag=e;this._hotspotIndex=this._hotspotIndex||{};var T=this._hotspotIndex[e];if(T&&T.spotsId&&this.spotsPool&&this.spotsPool[T.spotsId]){if(T.hotspots[i.guid]){return}this.spotsPool[T.spotsId].spots.push(i);T.hotspots[i.guid]=i}else{var C=this.addSpots([i],{zIndex:0,enableMultiResponse:true});this._hotspotIndex[e]={spotsId:C,hotspots:{}};this._hotspotIndex[e].hotspots[i.guid]=i}this._asyncRegister()},removeHotspot:function(oL,e){e=e||"custom";if(!this._hotspotIndex||!this._hotspotIndex[e]){return}var oM=this._hotspotIndex[e];if(!oM.hotspots[oL.guid]){return}var C=this.spotsPool&&this.spotsPool[oM.spotsId];if(C){var oK=C.spots;for(var T=0;T<oK.length;T++){if(oK[T]===oL){oK.splice(T,1);break}}if(oK.length===0){this.removeSpots(oM.spotsId);delete this._hotspotIndex[e];oL._bindTag=null;oL._map=null;return}}delete oM.hotspots[oL.guid];oL._bindTag=null;oL._map=null},clearHotspots:function(e){e=e||"custom";if(!this._hotspotIndex||!this._hotspotIndex[e]){return}var C=this._hotspotIndex[e];for(var i in C.hotspots){C.hotspots[i]._bindTag=null;C.hotspots[i]._map=null}this.removeSpots(C.spotsId);delete this._hotspotIndex[e]},getIconByClickPosition:function(i){if(!this.config.enableIconClick||!this._spotsMgr){return null}var e=this._spotsMgr.getSpotsByScreenPosition(i);if(e[0]&&e[0].userdata){var C=e[0].userdata;return{name:C.name,uid:C.uid,position:C.iconPoint||e[0].pt}}return null},setBounds:function(e){gA[this.mapType].bounds=e.clone();this.restrictBounds(e)},getCoordType:function(){return cv.coordType},getPanes:function(){return this._panes},getInfoWindow:function(){if(this.temp.infoWin&&this.temp.infoWin.isOpen()){return this.temp.infoWin}return null},getDistanceIn:function(oK,e){if(!oK||!e){return}if(oK.equals(e)){return 0}if(this.mapType===c1){var T=m8.convertMC2LL(oK);var C=m8.convertMC2LL(e);return this._earth.getDistance(T,C)}var i=m8.getDistanceByMC(oK,e);return i},getOverlays:function(){var oL=[];var oM=this._overlays;var oK=this._customOverlays;if(oM){for(var T in oM){if(oM[T] instanceof g2){oL.push(oM[T])}}}if(oK){for(var C=0,e=oK.length;C<e;C++){oL.push(oK[C])}}return oL},getMapTypeId:function(){return mH(this.mapType)},getMapType:function(){if(!K.apiVersionIsGL()){return n4(this)}return this.getMapTypeId()},getMapCoordType:function(){return cv.coordType},_asyncRegister:function(){if(this._destroyed||!this.temp){return}for(var e=this.temp.registerIndex;e<cv._register.length;e++){if(cv._register[e] instanceof Function){cv._register[e](this)}}this.temp.registerIndex=e},setDefaultCursor:function(e){this.config.defaultCursor=e;if(this.platform){this.platform.style.cursor=this.config.defaultCursor}},getDefaultCursor:function(){return this.config.defaultCursor},setOverlayMoveCursor:function(e){this.config.overlayMoveCursor=e},getOverlayMoveCursor:function(){return this.config.overlayMoveCursor},setDraggingCursor:function(e){this.config.draggingCursor=e},getDraggingCursor:function(){return this.config.draggingCursor},_syncAndChangeMapType:function(e){kU.sendMessage("Map","maptype","earth");var i=this;if(i._renderType==="webgl"&&i.getTilt()>li.MAX_DRAG_TILT_L2){i.setTilt(li.MAX_DRAG_TILT_L2,{callback:function(){i._changeEarthMapType(e)}})}else{i._changeEarthMapType(e)}},_changeEarthMapType:function(C){var T=this;var oM=T.tileMgr.tileLayers;if(this.mapType===j9){this._clearSatelliteOverlayState()}if(this._mapTypeChangAni){this._mapTypeChangAni.stop()}var oL;if(this._earth){oL=this._earth.getEarthCanvas()}if(!this._earth){this.maskLayer.style.opacity=1;this.maskLayer.style.zIndex=999;this.maskLayer.style.background="#000"}this._mapTypeChangAni=new ij({duration:400,render:function(e){if(!T._earth){return}oL.style.opacity=e},finish:function(){for(var e=oM.length-1,oN=e;oN>=0;oN--){var oP=oM[oN].tilesDiv;if(oP){oP.style.visibility="hidden"}if(oM[oN]._isInnerLayer&&T._renderType!=="webgl"){T._removeTileLayer(oM[oN])}}T._mapTypeChangAni=null;T._mapTypeChanging=false;function oO(){var oT=T.getZoom()-2;var oU=T.getCenterIn();var oR=m8.convertMC2LL(oU);T._earth=new cv.Earth(T,{center:oR,zoom:oT,showRealSunlight:T.config.showRealSunlight,showMilkyway:T.config.showMilkyway,earthBackground:T.config.earthBackground});if(T.config&&T.config.earthMaxZoom&&T._earth){T._earth.setMaxZoom(T.config.earthMaxZoom)}if(T.config&&T.config.earthMinZoom&&T._earth){T._earth.setMinZoom(T.config.earthMinZoom)}T._proxyEarthEvents();var oQ=T.mapType;T.mapType=C;var oS=new ix("onmaptypechange");oS.zoomLevel=this.zoomLevel;oS.mapType=C;oS.exMapType=oQ;T.dispatchEvent(oS);T._setMapTypeStatus(C);hv.extend(T,cv.EarthView.prototype);if(!T._navigationCtrl&&T.config.showControls){T._navigationCtrl=new hy(T)}}if(!T._earth){if(cv["FeatureStyle"+T.config.style]){oO()}else{T.loadMapStyleFiles(function(){oO()})}}if(parseInt(T.maskLayer.style.opacity,10)===1){setTimeout(function(){T.maskLayer.style.zIndex=9;T.maskLayer.style.opacity=0},1000)}}});if(!this._earth){return}var i=this.mapType;this.mapType=C;var oK=new ix("onmaptypechange");oK.zoomLevel=this.zoomLevel;oK.mapType=C;oK.exMapType=i;this.dispatchEvent(oK);T._setMapTypeStatus(C);hv.extend(T,cv.EarthView.prototype)},getMapStyleId:function(){if(typeof this.config.style==="string"){return this.config.style}return this.config.mapStyleId||"custom"},getAreaStyleId:function(){return this.config.areaStyleId||"areaStyle"},_printLog:function(e){var i;switch(e){case"mapvgl":i=249;break;case"mapvthree":i=248;break;case"bmapdraw":i=247;break;default:break}if(i){kU.sendMessage("Map","library",e)}},_setMapTypeStatus:function(C){var oN=arguments[1];if(C===c1){var oL=this._earth.getEarthCanvas();if(oL){oL.style.display=""}var oO={noAnimation:true};if(this.earthMinZoom){this._earth.setMinZoom(this.earthMinZoom);this.earthMinZoom=undefined}if(this.earthMaxZoom){this._earth.setMaxZoom(this.earthMaxZoom);this.earthMaxZoom=undefined}this._earth.setCenter(m8.convertMC2LL(this.centerPoint),oO);this._earth.setImageZoom(this.zoomLevel,oO);this._earth.setTilt(this.getTilt(),oO);this._earth.setHeading(this.getHeading(),oO);if(this.config.showStreetLayer){this._earth.showStreetLayer()}else{this._earth.hideStreetLayer()}}else{if(this.preMapType===c1&&this._earth){var oM=this._earth;var T=oM.getMapZoom();var oK=oM._imageRawZoom||T;var i=oK-T;var e=oM.getCenter();if(this._renderType==="webgl"){this._tilt=oM.getTilt();if(this.zoomLevel>7){this._heading=oM.getHeading();oN&&oN(e,T);return}if(oM.getHeading()!==0){oM.setTilt(this.getTilt());oM.setHeading(this.getHeading(),{callback:function(){oN&&oN(e,T)}})}else{oN&&oN(e,T)}return}if(i<0.1&&oM.getTilt()===0&&oM.getHeading()===0){oN&&oN(e,T);return}oM.setTilt(0);oM.setHeading(0);oM.setZoom(oM.getZoom()-i,{callback:function(){oN&&oN(e,T)}})}}},_proxyEarthEvents:function(){var oK=this;var oL=this._earth;oL.on("tilesload",function(i){oK.fire(i)});oL.on("centerandzoom",function(i){oK.dispatchEvent(new ix("onmoveend"));oK.dispatchEvent(new ix("onzoomend"))});function T(i){oK.fire(i)}var e=["zoomstart","zoomend","tilesload","sunlighttime_change","sunlighttime_clear","centerandzoom","animation_start","animation_stop","movestart","moveend","moving","dragstart","dragend","dragging"];for(var C=0;C<e.length;C++){oL.on(e[C],T)}},forceEnableEarth:function(){this.config.forceEnableEarth=true;this.config.enableEarth=eV.ifEnableEarth(true);this.dispatchEvent(new ix("forceenableearth"));return this.config.enableEarth},setLock:function(e){if(this.mapType===c1){this._earth.setLock(e)}this._lock=e},getLock:function(){if(this.mapType===c1){return this._earth.getLock()}return this._lock},getEarth:function(){return this._earth},isSupportEarth:function(){return this.config.enableEarth},isCanvasMap:function(){return !!(this._renderType==="canvas"&&this.getMapTypeId()!=="B_EARTH_MAP")},getCanvasMapCoordByUid:function(oK){if(this._renderType==="webgl"){var oL=this.tileMgr.tileLayers;for(var T=0;T<oL.length;T++){if(oL[T].labelProcessor){return oL[T].labelProcessor.getLabelByUid(oK,"")}}return null}var e=this.canvas2dMapMgr._labelClick;var C=e.findLabelByUid(oK);return C?new d9(C.iconPos.geoX,C.iconPos.geoY):null},loadBizData:function(i){var e=new ix("onloadbizdata");e.data=i;this.dispatchEvent(e)},unloadBizData:function(){var e=new ix("onunloadbizdata");this.dispatchEvent(e)},zoomIn:function(e){var i={zoomCenter:e};this.setZoomIn(this.zoomLevel+1,i)},zoomOut:function(e){var i={zoomCenter:e};this.setZoomIn(this.zoomLevel-1,i)},setMaxZoom:function(e){e=Number(e);if(this._renderType==="webgl"){this.config.maxZoom=e<=25?e:25}else{this.config.maxZoom=e<=19?e:19}},setEarthMaxZoom:function(i){var e=i<=this.getMaxZoom()-2?i:this.getMaxZoom()-2;if(this.mapType===c1){this._earth.setMaxZoom(e);this.earthMaxZoom=undefined;return}this.earthMaxZoom=e},setMinZoom:function(e){e=Number(e);this.config.minZoom=e>=3?e:3},setEarthMinZoom:function(e){var i=e-2>=1?e-2:1;if(this.mapType==="B_EARTH_MAP"){this._earth.setMinZoom(i);this.earthMinZoom=undefined;return}this.earthMinZoom=i},setCenterIn:function(e,i){i=i?i:{};i.tilt=i.tilt?i.tilt:this.getTilt();i.heading=i.heading?i.heading:this.getHeading();this.panToIn(e,i)},getRenderType:function(){return this._renderType},getSolarInfo:function(T){T=T||this._initDate;var C=id(T);var e=m8.convertLL2MC(new d9(C[0],C[1]));var oR=e.latLng;var oM=m8.convertMC2LL(this.centerPoint);var oO=T.getUTCHours();var oQ=oO+24*oM.lng/360;var oP=oQ-12;var oN=oP*60*0.25;var oL=Math.asin(Math.sin(mn(oM.lat))*Math.sin(mn(oR.lat))+Math.cos(mn(oM.lat))*Math.cos(mn(oR.lat))*Math.cos(mn(oN)));var oK=Math.asin(Math.sin(mn(oN))*Math.cos(mn(oR.lat))/Math.cos(oL));var i="north";if(oM.lat<oR.lat){i="south"}return{zenith:e,solarAltitude:oL,solarAzimuth:oK,centerPosition:i,position:e}},setDisplayOptions:function(C){if(!C){return}for(var e in this._displayOptions){if(this._displayOptions.hasOwnProperty(e)){if(typeof C[e]==="boolean"||(e==="skyColors"&&typeof C.skyColors==="object")||(e==="labelMargin"&&typeof C.labelMargin==="number")){this._displayOptions[e]=C[e]}}}if(!K.apiVersionIsGL()&&typeof C.indoor==="boolean"){this.config.indoorControl=C.indoor;if(this._indoorMgr){this._indoorMgr._toggleControl(C.indoor)}}var i=this.getMapTypeId();if(i===h5.NORMAL){this.fire(new ix("ondisplayoptions_changed"))}else{if(i===h5.EARTH&&this._earth){this._earth.fire(new ix("ondisplayoptions_changed"))}}},getHorizonPosY:function(e){if(!e||!this._webglMapCamera){return null}var i=this._webglMapCamera.fromMCToScreenPixel(e.lng,e.lat,{heading:0});return i.y},getIndoorInfo:function(){if(!this._indoorMgr){return}return this._indoorMgr.getData()},showIndoor:function(e,C){if(this.map&&this.map.parking){this.map.parking.currentUid=e;this.map.parking.currentFloor=C}var i=new ix("onindoor_status_changed");i.uid=e;i.floor=C;this.fire(i)},addAreaSpot:function(e,C){if(!e||e.length===0){return}C=C||{};this.areaSpots=this.areaSpots||{};var i=C.id||("sp"+(this.temp.spotsGuid++));this.areaSpots[i]={spot:e,userData:C.userData};var T=this;ki.load("hotspot",function(){T._asyncRegister()});return i},getAreaSpot:function(e){if(this.areaSpots&&this.areaSpots[e]){return this.areaSpots[e]}return null},removeAreaSpot:function(e){if(!e||!this.areaSpots[e]){return}delete this.areaSpots[e]},clearAreaSpots:function(){this.areaSpots={}},resetSpotStatus:function(){this.fire(new ix("onspot_status_reset"))},hightlightSpotByUid:function(e,C){var i=new ix("onspot_highlight");i.uid=e;i.tilePosStr=C;this.fire(i)},setZoomIn:function(i,e){e=e||{};this.zoomTo(i,e.zoomCenter||null,e)},restrictBounds:function(e){if(e instanceof lz){this.config.restrictBounds=e;var i=this.getMinZoom();if(this.zoomLevel<i){this.zoomLevel=i}this.restrictCenter(this.getCenterIn());this.fire(new ix("oncenter_changed"))}},getCurrentMaxTilt:function(){var e=this.zoomLevel;if(this.mapType==="B_EARTH_MAP"){return li.MAX_DRAG_TILT_L2}if(this.config.restrictCenter===false){return li.MAX_DRAG_TILT}if(this._projectionMatrix3D==="ortho"){return li.MAX_DRAG_TILT}if(e>=19){return li.MAX_DRAG_TILT}else{if(e<=18){if(e<this._enableTiltZoom){if(e>=this._enableTiltZoom-2){return(1-(this._enableTiltZoom-e)/2)*li.MAX_DRAG_TILT_L2}return 0}return li.MAX_DRAG_TILT_L2}else{return(li.MAX_DRAG_TILT-li.MAX_DRAG_TILT_L2)*(e-18)+li.MAX_DRAG_TILT_L2}}},worldSize:function(i){var e=i||this.zoomLevel;return li.WORLD_SIZE_MC/this.getZoomUnits(e)},setTrafficOn:function(T,e){if(!K.apiVersionIsGL()){console.warn("[BMap] setTrafficOn is deprecated, use BMap.TrafficLayer instead")}var i=this;if(T&&Number(T)>1){nX.setZIndex(Number(T))}e=e||{};if(e.reload){var C=e.reloadTime||5*60*1000;nX.reloadTimer=setInterval(function(){nX.clearCache();var oK=new ix("onupdate");i.fire(oK)},C)}kU.sendMessage("Map","traffic");this._addTileLayer(nX)},setTrafficOff:function(){if(nX.reloadTimer){clearInterval(nX.reloadTimer)}this._removeTileLayer(nX)},showOverlayContainer:function(){this.setDisplayOptions({overlay:true})},hideOverlayContainer:function(){this.setDisplayOptions({overlay:false})},addLabelsToMapTile:function(oM,oL){kU.sendMessage("Map","bindtype","custom_label");for(var T=0;T<oM.length;T++){if(typeof oM[T].type==="undefined"){oM[T].type="fixed"}if(typeof oM[T].rank!=="number"){oM[T].rank=50000}oM[T].pt=oM[T].position;oM[T].custom=true;oM[T].processedInZoom=0;var C=false;for(var e=0;e<this._customTileLabels.length;e++){if(this._customTileLabels[e].uid===oM[T].uid){C=true;break}}if(!C){this._customTileLabels.push(oM[T])}}var oK=new ix("onadd_tile_labels");if(oL&&oL instanceof gg){oK.data=oM;oK.index=oL.layer.drawIndex;oK.model="mvt"}this.dispatchEvent(oK)},addMapLabels:function(oK,oM){if(!oK){return[]}if(!(oK instanceof Array)){oK=[oK]}var oO=[];var oL=[];for(var T=0;T<oK.length;T++){var e=oK[T];if(!e||!e.position){continue}var oN=m8.convertLL2MC(e.position);var C=e.style||{};var oP={position:oN,name:typeof e.text==="string"?e.text:"",displayRange:e.displayRange||[3,21],textMargin:typeof e.textMargin==="number"?e.textMargin:5,style:{fontSize:typeof C.fontSize==="number"?C.fontSize:14,color:C.color||"#333",haloSize:typeof C.haloSize==="number"?C.haloSize:1,strokeColor:C.strokeColor||"#fff",icon:C.icon,iconSize:C.iconSize},uid:e.uid||("mapLabel_"+Date.now()+"_"+Math.random().toString(36).slice(2,10)+"_"+T),direction:typeof e.direction==="number"?e.direction:4,rank:typeof e.rank==="number"?e.rank:50000,type:e.type||"fixed"};oO.push(oP);oL.push(oP.uid)}if(oO.length>0){this.addLabelsToMapTile(oO,oM)}return oL},removeLabelsFromMapTile:function(oK,T,C){var oM=new ix("onremove_tile_labels");if(T&&C){oM.data=oK;oM.index=T;oM.model=C}else{for(var oL=0;oL<oK.length;oL++){for(var e=0;e<this._customTileLabels.length;e++){if(this._customTileLabels[e].uid===oK[oL]){this._customTileLabels.splice(e,1);break}}}}this.dispatchEvent(oM)},removeMapLabels:function(C,i,e){if(!C){return}if(typeof C==="string"){C=[C]}if(!(C instanceof Array)||C.length===0){return}this.removeLabelsFromMapTile(C,i,e)},clearLabels:function(C,i){var e=new ix("onclear_labels");if(C&&i){e.data=[];e.index=C;e.model=i}else{this._customTileLabels.length=0}this.dispatchEvent(e)},loadMapStyleFiles:function(oL,e){this.customLoaded=false;var C=this.config.style;var oK=this.config.styleUrl;var T=this;this._setTextRenderType();if(typeof C==="string"&&!oK){if(this.cpyCtrl){this.cpyCtrl.show();if(this.logoCtrl){this.logoCtrl.setOffset(this.logoCtrl.defaultOffset)}}if(cv["FeatureStyle"+C]){this.customLoaded=true;T.fire(new ix("onstyle_loaded"));oL();return}cv["FeatureStyle"+C]=window.FeatureStyle;cv["iconSetInfo"+C]=window.iconSetInfo_high;cv.indoorStyleDefault=window.indoorStyle;jW.load(K.getMapStyleFiles(C),function(){if(T._destroyed||!T.config){return}if(T.config.style===C){cv["FeatureStyle"+C]=window.FeatureStyle;cv["iconSetInfo"+C]=window.iconSetInfo_high;cv.indoorStyleDefault=window.indoorStyle;T.customLoaded=true;T.fire(new ix("onstyle_loaded"));oL()}})}else{kU.sendMessage("Map","bindtype","custom_style");var i=C;F.init(T);F.getStyleJson(i,function(oP){if(T._destroyed||!T.config){return}var oS=window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]?"":hj;var oM=cv.getGUID("custom");var oQ=T.config.mapStyleId||0;delete cv["customStyleInfo_"+oQ];delete cv["FeatureStyle"+oQ];delete cv["indoorStyle"+oQ];T.config.mapStyleId=oM;cv["customStyleInfo_"+oM]={zoomRegion:{},zoomStyleBody:[],zoomFrontStyle:{}};cv["indoorStyleInfo_"+oM]={zoomRegion:{},zoomStyleBody:[],zoomFrontStyle:{}};var oO=F.getStyleUrl(oP,oS,e,oM);if(!cv.iconSetInfoCustom){F.getDefaultStyle(function(){cv.iconSetInfoCustom=window.iconSetInfo_high;oN()})}else{oN()}function oR(oV,oW,oU){if(cv[oV]){var oT=(function(){var oX=oV;return function(oY){if(!cv[oX]){return}F.onStyleDataBack(oY,oX,cv[oX],oU)}})();cv[oV].xhr=F.getMapStyleFiles(oW,oT,function(){T.fire(new ix("onstyle_loaded_error"))},function(){T.fire(new ix("onstyle_loaded_timeout"))})}}function oN(){oR(oO.custom.id,oO.custom.url,function(){if((oO.hasInfoor||oP.length===0)&&T.config.showCustomIndoor&&F.version==="v3"){oR(oO.indoor.id,oO.indoor.url,function(){T.customLoaded=true;T.fire(new ix("onstyle_loaded"));oL()})}else{T.customLoaded=true;T.fire(new ix("onstyle_loaded"));oL()}})}})}},getFeatureStyleTags:function(){var e=[];var oK=Object.keys(cv);for(var T=0;T<oK.length;T++){var C=oK[T];if(C.indexOf("FeatureStyle")>-1&&cv[C]){e.push(C)}}return e},setCopyrightOffset:function(T,i){var C=new ix("oncopyrightoffsetchange",{logo:T,cpy:i});this.dispatchEvent(C)},_setTextRenderType:function(e){if(e){this.config.textRenderType=e;return}if(this.config.textRenderType!==null){return}if(c9()){this.config.textRenderType="canvas"}else{if(typeof this.config.style==="string"){this.config.textRenderType="image"}else{this.config.textRenderType="canvas"}}},destroy:function(){this._destroyed=true;this.disableAutoResize();this.off("size_changed");this.off("zoom_changed");this.fire(new ix("ondestroy"));var e=this.config.mapStyleId||0;delete cv["customStyleInfo_"+e];delete cv["FeatureStyle"+e];if(nX.reloadTimer){clearInterval(nX.reloadTimer)}cv.BMAP_INSTANCES&&(cv.BMAP_INSTANCES-=1);if(!cv.BMAP_INSTANCES){this.destroyStyle();window.FeatureStyle=null;window.iconSetInfo_high=null;window.indoorStyle=null}this.config={};this.clearSpots();this._webGLStateId&&fV.WebGLState.remove(this._webGLStateId);this.container.onselectstart=null;this.container.style.backgroundImage="";this.container.innerHTML="";this.maskLayer=null;this.platform=null;kU.kill();d5.kill();mL.kill();if(this._listeners){for(var i in this._listeners){if(this._listeners.hasOwnProperty(i)){this.off(i)}}}var C=this;setTimeout(function(){C._listeners=null;C._bounds=null;C.tileLabels=[];C._overlayMgrGL=null;C._overlayMgr=null;C._mapIcon=null;if(C._mouse){C._mouse._drag=null;C._mouse=null}C.deepZoom=null;C.tileMgr=null;C.indexToRgb=null;C.toFormatCoords=null;C._webglMapCamera=null;C._normalLayerMgr=null;C._webglPainter=null;C._webglMapScene=null;C._indoorMgr=null;if(C._renderType==="webgl"){if(C._spotsMgr&&C._spotsMgr.destroy){C._spotsMgr.destroy()}C._spotsMgr=null;C._workerMgr=null;C.jobScheduler=null;C.benchmark=null;C._featureMgr=null;C._labelProcessor=null;C._customLabelMgr=null}if(C.cpyCtrl){C.cpyCtrl._map=null;C.cpyCtrl=null}C.logoCtrl=null;C._spotDataOnCanvas=null;C._navigationCtrl=null;if(C.hashCode){C.dispose();C._destroyed=true}},100)},destroyStyle:function(){var e=[];var oK=Object.keys(cv);for(var T=0;T<oK.length;T++){var C=oK[T];if(C.indexOf("FeatureStyle")>-1||C.indexOf("iconSetInfo")>-1||C.indexOf("indoorStyle")>-1){e.push(C)}}for(var T=0;T<e.length;T++){delete cv[e[T]]}},centerAndZoom:function(e,oN,C){C=C||{};if(this._isDefaultView){this._isDefaultView=false;if(C.noAnimation===undefined){C.noAnimation=true}}if(!K.apiVersionIsGL()){if(C.noAnimation===undefined&&C.enableAnimation!==undefined){C.noAnimation=!C.enableAnimation}if(C.noAnimation===undefined){C.noAnimation=true}}if(Object.prototype.toString.call(oN)!=="[object Undefined]"){oN=parseFloat(oN)}if(typeof e==="string"){var oK=this;var oM=new b5();var T=new d9(120.139406,30.259097);oM.getPoint(e,function(oO){if(oO&&oO.lng&&oO.lat){e=oO;var oP=m8.convertLL2MC(e);oK.centerAndZoomIn(oP,oN,C)}else{var oP=m8.convertLL2MC(T);oK.centerAndZoomIn(oP,oN,C);console.error("鎮ㄥソ锛屽煄甯傚悕鍒濆鍖栧湴鍥句娇鐢ㄥ湴鍧�瑙f瀽鏈嶅姟锛岃妫�鏌ヨ鏈嶅姟鏄惁宸茶秴閰嶉銆�")}},e)}else{var oL=iM(e,cv.coordType);var i=m8.convertLL2MC(oL);this.centerAndZoomIn(i,oN,C)}},pointToPixel:function(e,C){var i=m8.convertLL2MC(e);var T={};hv.extend(T,C);if(T&&T.center){T.center=m8.convertLL2MC(T.center)}return this.pointToPixelIn(i,T)},pixelToPoint:function(C,i){var T={};hv.extend(T,i);if(T&&T.center){T.center=m8.convertLL2MC(T.center)}var e=this.pixelToPointIn(C,T);return m8.convertMC2LL(e)},pointToOverlayPixel:function(e,C){var e=iM(e,cv.coordType);var i=m8.convertLL2MC(e);var T={};hv.extend(T,C);if(T&&T.center){T.center=m8.convertLL2MC(T.center)}return this.pointToOverlayPixelIn(i,T)},overlayPixelToPoint:function(C,i){var T={};hv.extend(T,i);if(T&&T.center){T.center=m8.convertLL2MC(T.center)}var e=this.overlayPixelToPointIn(C,T);return m8.convertMC2LL(e)},setViewport:function(C,oK){oK=oK||{};if(!K.apiVersionIsGL()){if(oK.enableAnimation===undefined&&oK.noAnimation!==undefined){oK.enableAnimation=!oK.noAnimation}if(oK.enableAnimation===undefined){oK.enableAnimation=true}}var e;if(C&&C.center){e={};hv.extend(e,C);e.center=m8.convertLL2MC(e.center)}else{if(!K.apiVersionIsGL()&&C.length>0&&C[0] instanceof g2&&typeof C[0].getBounds==="function"){var oO=new lz();for(var T=0;T<C.length;T++){if(C[T] instanceof g2&&typeof C[T].getBounds==="function"){var oM=C[T].getBounds();if(oM&&!oM.isEmpty()){oO.extend(oM.getSouthWest());oO.extend(oM.getNorthEast())}}else{if(C[T]&&C[T].lng!==undefined&&C[T].lat!==undefined){oO.extend(C[T])}}}if(oO.isEmpty()){return}e=[m8.convertLL2MC(oO.getSouthWest()),m8.convertLL2MC(oO.getNorthEast())];this.setViewportIn(e,oK);return}e=[];for(var oL=0;oL<C.length;oL++){var oN=iM(C[oL],cv.coordType);e[oL]=m8.convertLL2MC(oN)}}this.setViewportIn(e,oK)},getViewport:function(oL,T){var C;if(oL&&oL.length){C=[];for(var oK=0;oK<oL.length;oK++){C[oK]=m8.convertLL2MC(oL[oK])}}else{if(oL instanceof lz){C=new lz(m8.convertLL2MC(oL.getSouthWest()),m8.convertLL2MC(oL.getNorthEast()));C.setMinMax()}}var e=this.getViewportIn(C,T);e.center=m8.convertMC2LL(e.center);return e},getDistance:function(oK,C){var i=m8.convertLL2MC(oK);var T=m8.convertLL2MC(C);var e=this.getDistanceIn(i,T);return e},setCenter:function(e,C){C=C||{};if(!K.apiVersionIsGL()){if(C.noAnimation===undefined&&C.enableAnimation!==undefined){C.noAnimation=!C.enableAnimation}}if(typeof e==="string"){var T=this;var oL=new b5();oL.getPoint(e,function(oM){if(oM){e=iM(oM,cv.coordType)}else{e=T.defaultPoint;console.error("鎮ㄥソ锛屽煄甯傚悕鍒濆鍖栧湴鍥句娇鐢ㄥ湴鍧�瑙f瀽鏈嶅姟锛岃妫�鏌ヨ鏈嶅姟鏄惁宸茶秴閰嶉銆�")}var oN=m8.convertLL2MC(e);T.setCenterIn(oN,C)},e)}else{var oK=iM(e,cv.coordType);var i=m8.convertLL2MC(oK);this.setCenterIn(i,C)}},setZoom:function(C,e){e=e||{};if(!K.apiVersionIsGL()){if(e.noAnimation===undefined&&e.enableAnimation!==undefined){e.noAnimation=!e.enableAnimation}}var i={};hv.extend(i,e);if(i&&i.zoomCenter){i.zoomCenter=m8.convertLL2MC(i.zoomCenter)}this.setZoomIn(C,i)},flyTo:function(e,oL,C){C=C||{};if(C.noAnimation===true){var T=hv.extend({},C);T.noAnimation=true;return this.centerAndZoom(e,oL,T)}var oK=iM(e,cv.coordType);var i=m8.convertLL2MC(oK);this.flyToIn(i,oL,C)},panTo:function(e,C){C=C||{};if(!K.apiVersionIsGL()){if(C.noAnimation===undefined&&C.enableAnimation!==undefined){C.noAnimation=!C.enableAnimation}}var i=m8.convertLL2MC(iM(e,cv.coordType));this.panToIn(i,C)},getCenter:function(){var e=this.getCenterIn();var i=m8.convertMC2LL(e);return m0(i,cv.coordType)},getBounds:function(){var e=this.getBoundsIn();var i=new lz(m8.convertMC2LL(e.getSouthWest()),m8.convertMC2LL(e.getNorthEast()));return i},setMapStyleV2:function(e){if(typeof e==="string"){this._setTextRenderType("image")}else{this._setTextRenderType("canvas")}this.setOptions({style:e})},setMapStyle:function(e){if(e&&e.merge===true){this.setMapStyleV2(Object.assign({},e,{version:"v3"}));return}this.setMapStyleV2(e)},setTheme:function(oK,i){if(K.uiVersionIsGL()){return}if(oK!=="light"&&oK!=="dark"&&!eH.hasOwnProperty(oK)){oK="light"}this._uiTheme=oK;var T=eH[oK]||{};var e={};var C;for(C in T){if(T.hasOwnProperty(C)){e[C]=T[C]}}if(i&&typeof i==="object"){for(C in i){if(i.hasOwnProperty(C)){e[C]=i[C]}}}cO(e)},getTheme:function(){return this._uiTheme||"light"},registerTheme:function(e,i){if(typeof e==="string"&&i&&typeof i==="object"){eH[e]=i}},startViewAnimation:function(C){var e=C._options.delay;var i=this;setTimeout(function(){C._start(i)},e)},pauseViewAnimation:function(e){e._pause(this)},continueViewAnimation:function(e){e._continue(this)},cancelViewAnimation:function(e){e._cancel(this)},getMapScreenshot:function(){if(!K.apiVersionIsGL()){console.warn("[BMap] getMapScreenshot is deprecated, use getScreenshot instead")}return this._webglMapScene._painter._canvas.toDataURL()},getScreenshot:function(){return this._webglMapScene._painter._canvas.toDataURL()},setCustomArea:function(C){this.fire(new ix("onstyle_willchange"));this.areaCustomLoaded=false;var T=C.style;var oK=this;F.getStyleJson(T,function(oN){var oP=window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]?"":hj;var oL=cv.getGUID("customArea");oK.config.areaStyleId=oL;var oO;window["styleCbk_"+oL]=function(oQ){if(!cv["customStyleInfo_"+oL]){return}F.parseStyleData(oQ,oL,cv["customStyleInfo_"+oL],function(){oK.areaCustomLoaded=true;oK.fire(new ix("onstyle_loaded"));var oR=new ix("onlayer_update");oR.name="na";oK.fire(oR)})};cv["customStyleInfo_"+oL]={zoomRegion:{},zoomStyleBody:[],zoomFrontStyle:{}};cv["indoorStyleInfo_"+oL]={zoomRegion:{},zoomStyleBody:[],zoomFrontStyle:{}};var oM=F.getStyleUrl(oN,oP,"",oL);if(!cv.iconSetInfoCustom){F.getDefaultStyle(function(){cv.iconSetInfoCustom=window.iconSetInfo_high;cv["customStyleInfo_"+oL].xhr=F.getMapStyleFiles(oM.custom.url,window["styleCbk_"+oL])})}else{cv["customStyleInfo_"+oL].xhr=F.getMapStyleFiles(oM.custom.url,window["styleCbk_"+oL])}});var e={};if(C.area){if(Array.isArray(C.area)&&Array.isArray(C.area[0])){e.areas=C.area.map(function(oL){return oL.map(function(oM){return m8.convertLL2MC(oM)})})}else{var i=Array.isArray(C.area[0])?C.area:[C.area];e.areas=i.map(function(oL){return oL.map(function(oM){return m8.convertLL2MC(oM)})})}}e.customArea=true;this._workerMgr.setWorkerConfig(e)},setProjectionMatrix3D:function(e){this._projectionMatrix3D=e;this._webglMapCamera._updateProjectionMatrix();this._drawFrame()},getPoiByUid:function(e,C){var i=this;if(!e){if(typeof C==="function"){C(null)}return}ki.load("hotspot",function(){if(!i._spotsMgr){i._asyncRegister()}if(i._spotsMgr&&typeof i._spotsMgr.getPoiByUid==="function"){i._spotsMgr.getPoiByUid(e,C)}else{if(typeof C==="function"){C(null)}}},true)},enableIconClick:function(){var e=this.config.enableIconClick;this.config.enableIconClick=true;if(!e&&this._mapIcon&&typeof this._mapIcon.enable==="function"){this._mapIcon.enable()}},disableIconClick:function(){this.config.enableIconClick=false;if(this._mapIcon&&typeof this._mapIcon.disable==="function"){this._mapIcon.disable()}if(this.config.enableIconInfoWindow){this.disableIconInfoWindow()}},enableIconInfoWindow:function(){if(!this.config.enableIconClick){this.enableIconClick()}this.config.enableIconInfoWindow=true;var e=this;if(!e._iconInfoWindowHandler){e._iconInfoWindowHandler=function(oL){if(!e.config.enableIconInfoWindow){return}var T=oL.spots;if(!T||!T.length){e._closeIconInfoWindow();return}var oK=T[0];var C=oK.userdata&&oK.userdata.uid;if(!C){return}var i=m8.convertMC2LL(oK.pt);e._openIconInfoWindow(C,i)}}this.addEventListener("spotclick",e._iconInfoWindowHandler)},disableIconInfoWindow:function(){this.config.enableIconInfoWindow=false;if(this._iconInfoWindowHandler){this.removeEventListener("spotclick",this._iconInfoWindowHandler)}this._closeIconInfoWindow()},_openIconInfoWindow:function(C,e){this._closeIconInfoWindow();var T=this;var i=document.createElement("div");function oK(){var oL=new bH(i,{compact:true});oL.addEventListener("open",function(){var oM=new cS(function(){hv.ac(i,"BMap_PDPannel_container4map");return i},{point:e,offsetY:-68});T.addOverlay(oM);oM.draw();T.temp._iconInfoWindowOverlay=oM;setTimeout(function(){oL.panIntoView(T,oM)},200)});T.temp._iconInfoWindowPanel=oL;oL.render(C)}ki.load("place",oK,true)},_closeIconInfoWindow:function(){if(!this.temp){return}if(this.temp._iconInfoWindowOverlay){this.removeOverlay(this.temp._iconInfoWindowOverlay);this.temp._iconInfoWindowOverlay=null}if(this.temp._iconInfoWindowPanel){this.temp._iconInfoWindowPanel.dispose();this.temp._iconInfoWindowPanel=null}},enableMapClick:function(){if(!K.apiVersionIsGL()){this.enableIconClick()}},disableMapClick:function(){if(!K.apiVersionIsGL()){this.disableIconClick()}}});window.BMAP_NORMAL_MAP="B_NORMAL_MAP";window.BMAPGL_NORMAL_MAP="B_NORMAL_MAP";window.BMAP_SATELLITE_MAP="B_SATELLITE_MAP";window.BMAP_HYBRID_MAP="B_STREET_MAP";window.BMAP_EARTH_MAP="B_EARTH_MAP";window.BMAP_NONE_MAP="B_NONE_MAP";window.BMAP_COORD_MERCATOR="BMAP_COORD_MERCATOR";window.BMAP_COORD_GCJ02="BMAP_COORD_GCJ02";window.BMAP_COORD_BD09="BMAP_COORD_BD09";window.BMAP_COORD_GCJ02MERCATOR="BMAP_COORD_GCJ02MERCATOR";window.BMAP_COORD_WGS84="BMAP_COORD_WGS84";window.BMAP_COORD_EPSG3857="BMAP_COORD_EPSG3857";window.BMAP_SYS_DRAWER=0;window.BMAP_SVG_DRAWER=1;window.BMAP_VML_DRAWER=2;window.BMAP_CANVAS_DRAWER=3;var jC="妫�娴嬪埌褰撳墠浜у搧浣跨敤鐨勫湴鍥炬湇鍔℃湭瀹屾垚鎶�鏈湇鍔℃巿鏉冿紝鍙兘鍑虹幇涓嶇ǔ瀹�/鍙楅檺锛涖�愪骇鍝佺敤鎴枫�戣鑱旂郴浜у搧瀹樻柟瀹㈡湇锛涖�愪骇鍝佸紑鍙戣�呫�戣浜�3涓伐浣滄棩鍐呭畬鎴愭巿鏉冩垨鑱旂郴锛歨ttps://lbsyun.baidu.com/surl/f5d6f5 鎴栬仈绯荤數璇濓細400-099-8998锛堝紑鍙戣�呬笓鐢級銆�";var c0={};if(window.B_BUSINESS_INFO&&window.B_BUSINESS_INFO["sign_content"]){try{c0=JSON.parse(window.B_BUSINESS_INFO["sign_content"])}catch(nS){c0=window.B_BUSINESS_INFO}}var bj=false;var F={environment:"jsapi",map:null,ontilesloaded:false,onstyle_loaded:false,_dataList:[],msgpack:null,_default:false,version:"v2",init:function(i){this.resetEventListener(i);this.version=i.config.style.version||"v2";if(this.map){if(eY(this.map,i)){return}}var e=this;e.map=i;this.changeCopyright();this.setEnvironment(e.map.config.style)},resetEventListener:function(i){var e=this;this.ontilesloaded=false;this.onstyle_loaded=false;i.addEventListener("ontilesloaded",e.checkLoadedStatus);i.addEventListener("onstyle_loaded",e.checkLoadedStatus)},checkLoadedStatus:function(i){F[i.type]=true;if(F.ontilesloaded&&F.onstyle_loaded){this.dispatchEvent(new ix("onstylechangetilesloaded"));this.removeEventListener("ontilesloaded",F.checkLoadedStatus);this.removeEventListener("onstyle_loaded",F.checkLoadedStatus)}},changeCopyright:function(){var e=this;if(e.map.cpyCtrl){e.map.cpyCtrl.hide();if(e.environment!=="customEditor"){e.map.setCopyrightOffset(new mU(1,1))}}else{e.map.addEventListener("oncopyrightaddend",function(){e.map.cpyCtrl.hide();if(e.environment!=="customEditor"){e.map.setCopyrightOffset(new mU(1,1))}})}},setEnvironment:function(e){if(e.customEditor){this.environment="customEditor";bI.map=this.map}else{if(e.sharing){this.environment="sharing"}else{if(e.preview){this.environment="preview"}else{this.environment="jsapi"}}}},getStyleJson:function(T,oL){var oK=this;if(T.styleJson){oL&&oL(T.styleJson)}else{if(T.styleId){var i=T.styleId;var e=(Math.random()*100000).toFixed(0);cv["_cbk_si_phpui"+e]=function(oN){var oM=[];if(oN.result&&oN.result["error"]===0&&oN.content&&oN.content["status"]===0){oM=oK.parseJson(oN.content["data"]["json"]);oL&&oL(oM)}else{oL&&oL("default")}};cv["_cbk_si_api"+e]=function(oN){var oM=[];if(oN.status===0){if(oN.info){oM=oK.parseJson(oN.info["json"])}else{oM=oK.parseJson(oN.data["json"])}oL&&oL(oM)}else{oL&&oL("default")}};var C="";switch(this.environment){case"jsapi":if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){C=window._BMapSecurityConfig["serviceHost"]+"?qt=custom_map&v=3.0&style_id="+i+"&type=publish"}else{C=K.apiHost+"/?qt=custom_map&v=3.0&style_id="+i+"&type=publish&ak="+hj}C+="&callback="+h6+"._cbk_si_phpui"+e;break;case"sharing":C+="/apiconsole/custommap/getSharingJson";C+="?styleid="+i+"&type=edit";C+="&ck="+h6+"._cbk_si_api"+e;break;case"preview":C+="/apiconsole/custommap/getJson";C+="?styleid="+i+"&type=edit";C+="&ck="+h6+"._cbk_si_api"+e;break}jW.load(C)}else{oL&&oL("default")}}},parseJson:function(C){if(C===null||C===""){return[]}var i={t:"featureType",e:"elementType",v:"visibility",c:"color",o:"opacity",l:"lightness",s:"saturation",w:"weight",z:"level",h:"hue",f:"fontsize",zri:"curZoomRegionId",zr:"curZoomRegion",i:"image",st:"styleType"};var oK={all:"all",g:"geometry","g.f":"geometry.fill","g.s":"geometry.stroke",l:"labels","l.t.f":"labels.text.fill","l.t.s":"labels.text.stroke","l.t":"labels.text","l.i":"labels.icon","g.tf":"geometry.topfill","g.sf":"geometry.sidefill",t:"texture"};var T=C.split(",");var e=T.map(function(oO){var oN=oO.split("|").map(function(oU){var oS=i[oU.split(":")[0]];var oR=oK[oU.split(":")[1]]?oK[oU.split(":")[1]]:oU.slice(oU.indexOf(":")+1,oU.length);switch(oR){case"poi":oR="poilabel";break;case"districtlabel":oR="districtlabel";break}var oT={};oT[oS]=oR;return oT});var oL=oN[0];var oQ=1;if(oN[1]["elementType"]){oQ=2;hv.extend(oL,oN[1])}if(oN[2]["styleType"]){oQ=3;hv.extend(oL,oN[2])}var oP={};for(var oM=oQ;oM<oN.length;oM++){hv.extend(oP,oN[oM])}return hv.extend(oL,{stylers:oP})});return e},getStyleUrl:function(e,oP,T,oV){this.styleJson=e;var oT=cv["customStyleInfo_"+oV];var oU=cv["indoorStyleInfo_"+oV];var oN=[];var oO=[];for(var oM=0;oM<e.length;oM++){if(e[oM]["featureType"]&&e[oM]["featureType"].indexOf("IN")>-1&&e[oM]["featureType"]!=="INTERNATIONALIZEICONICON"){oO.push(e[oM])}else{oN.push(e[oM])}}var oS=K.apiHost+"/";var oR=K.apiHost+"/";if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){var oS=window._BMapSecurityConfig["serviceHost"]+"custom/"+this.version+"/mapstyle?version="+4+"&qt=custom_v2&is_all=true&is_new=1&";var oR=window._BMapSecurityConfig["serviceHost"]+"custom/"+this.version+"/mapstyle?version="+4+"&qt=custom_v2&is_all=true&is_new=1&space=indoor&"}else{var oS=oS+"custom/"+this.version+"/mapstyle?version="+4+"&ak="+oP+"&qt=custom_v2&is_all=true&is_new=1&";var oR=oR+"custom/"+this.version+"/mapstyle?version="+4+"&ak="+oP+"&qt=custom_v2&is_all=true&is_new=1&space=indoor&"}var oL=this.styleJson2styleStringV2(oN,oT);var C=this.styleJson2styleStringV2(oO,oU);oS+="styles="+encodeURIComponent(oL);oR+="styles="+encodeURIComponent(C);if(T&&T.os&&T.sv){oS+="&os="+T.os+"&sv="+T.sv;oR+="&os="+T.os+"&sv="+T.sv}var oK=new Date()["getTime"]();oS+="&timeStamp="+oK;oS+=np()(oS);oR+="&timeStamp="+oK;oR+=np()(oR);var oQ={custom:{url:oS,id:"customStyleInfo_"+oV,},indoor:{url:oR,id:"indoorStyleInfo_"+oV,},hasInfoor:oO.length>0,};return oQ},styleJson2styleStringV2:function(e,oN){var oR={featureType:"t",elementType:"e",visibility:"v",color:"c",opacity:"o",lightness:"l",saturation:"s",weight:"w",level:"z",hue:"h",fontsize:"f",image:"i"};var oT={all:"all",geometry:"g","geometry.fill":"g.f","geometry.stroke":"g.s",labels:"l","labels.text.fill":"l.t.f","labels.text.stroke":"l.t.s","labels.text":"l.t","labels.icon":"l.i","geometry.topfill":"g.tf","geometry.sidefill":"g.sf",texture:"t"};var oU=[];for(var T=this.map.getMinZoom();T<=this.map.getMaxZoom();T++){oN.zoomFrontStyle[T]={}}oN.zoomFrontStyle.main={};var C=false;for(var T=0;!!e[T];T++){var oS=e[T];if(this.isOnlyZoomStyler(oS)){continue}var oQ=this.getFrontZoom(oS);if((oS.featureType==="land"||oS.featureType==="all"||oS.featureType==="background")&&typeof oS.elementType==="string"&&(oS.elementType==="geometry"||oS.elementType==="texture"||oS.elementType==="geometry.fill"||oS.elementType==="all")&&oS.stylers&&!C){if(oS.stylers["color"]){oN.bmapLandColor=oS.stylers["color"]}if(oS.stylers["image"]){oN.bmapLandFillTexture=oS.stylers["image"]}if(oS.stylers["opacity"]){oN.bmapLandColor=oS.stylers["opacity"]}if(oS.stylers["visibility"]&&oS.stylers["visibility"]==="off"){oN.bmapLandColor="#00000000"}if(oS.featureType==="land"){C=true}}if(oS.featureType==="building"&&typeof oS.elementType==="string"&&oS.elementType==="geometry.fill"){oN.buildingFill=true}if(oS.featureType==="roadarrow"&&oS.elementType==="labels.icon"&&oS.stylers){var oO=oS.stylers["visibility"];oN.zoomFrontStyle[oQ]["bmapRoadarrowVisibility"]=oO}var oK={};hv.extend(oK,oS);var oM=oK.stylers;delete oK.stylers;hv.extend(oK,oM);var oL=[];for(var oP in oR){if(oK[oP]){if(this.isEditorZoomKeys(oP)){continue}if(oP==="elementType"){oL.push(oR[oP]+":"+oT[oK[oP]])}else{if(oP==="image"){oL.push(oR[oP]+":"+encodeURIComponent(encodeURIComponent(oK[oP])))}else{switch(oK[oP]){case"poilabel":oK[oP]="poi";break;case"districtlabel":oK[oP]="label";break}oL.push(oR[oP]+":"+oK[oP])}}}}if(oL.length>2){oU.push(oL.join("|"))}}return oU.join(",")},getFrontZoom:function(e){var i=e.stylers["level"];if(i===undefined){return"main"}else{return parseInt(i,10)}},isZoomConfig:function(e){var i=e.stylers["level"];if(i===undefined){return false}else{return true}},isOnlyZoomStyler:function(e){var i={};hv.extend(i,e.stylers);delete i.curZoomRegionId;delete i.curZoomRegion;delete i.level;if(hv.isEmptyObject(i)){return true}else{return false}},isSelectZoom:function(i,e){var C=i.stylers["level"];if(C===undefined){return true}else{if(C===e+""){return true}else{return false}}},isEditorZoomKeys:function(e){var i={curZoomRegionId:true,curZoomRegion:true};if(i[e]){return true}else{return false}},getZoomRegion:function(e,i){var T=e.stylers["level"];var C={};hv.extend(C,i);if(T===undefined){return C}else{C[parseInt(T,10)]=true;return C}},onStyleDataBack:function(C,i,e,T){if(this._default){this.parseStyleData(C,i,e,T)}else{this._dataList.push({method:"parseStyleData",arguments:[C,i,e,T]})}},parseStyleData:function(oK,C,i,oM){oK=JSON.parse(oK);var T="Feature";if(C.indexOf("indoor")!==-1){T="indoor"}if(oK.status===0&&oK.data&&oK.data.style&&oK.data.style.length>=3){if(!i.baseFs){if(this.version==="v3"){var e=JSON.parse(JSON.stringify(cv[T+"StyleDefault"]));i.baseFs=this.combindStyle(e,oK.data.style)}else{i.baseFs=oK.data.style}}}else{if(!i.baseFs){i.baseFs=cv[T+"StyleDefault"]}}var oL=i.baseFs;this.updateFrontFeatureStyle(i);oM&&oM()},updateFrontFeatureStyle:function(C){if(C.zoomFrontStyle.main["bmapRoadarrowVisibility"]){for(var e=this.map.getMinZoom();e<=this.map.getMaxZoom();e++){if(!C.zoomFrontStyle[e]){C.zoomFrontStyle[e]={}}if(!C.zoomFrontStyle[e]["bmapRoadarrowVisibility"]){C.zoomFrontStyle[e]["bmapRoadarrowVisibility"]=C.zoomFrontStyle.main["bmapRoadarrowVisibility"]}}}},getMapStyleFiles:function(T,oM,e,C){var i=T.split("?")[0];var oL=T.split("?")[1];var oK=new XMLHttpRequest();oK.open("POST",i,true);oK.setRequestHeader("Content-type","application/x-www-form-urlencoded");oK.timeout=10000;oK.ontimeout=function(){C&&C()};oK.onreadystatechange=function(oN){if(this.readyState===4){if(this.status===200){oM&&oM(this.responseText)}else{e&&e()}}};oK.send(oL);return oK},getDefaultStyle:function(i){var e=this;jW.load(K.getMapStyleFiles("default"),function(){cv.FeatureStyleDefault=window.FeatureStyle;cv.iconSetInfoDefault=window.iconSetInfo_high;cv.iconSetInfoCustom=window.iconSetInfo_high;cv.indoorStyleDefault=window.indoorStyle;e._default=true;e.syncDataList.call(e);i&&i()})},syncDataList:function(){if(this._default){for(var C=0,e=this._dataList.length;C<e;C++){var T=this._dataList[C];this[T.method].apply(this,T.arguments)}this._dataList=[]}},combindStyle:function(C,oK){for(var oM=0;oM<oK[1].length;oM++){var oN=oK[1][oM][0];if(!C[1][oM]||!C[1][oM][0]){continue}for(var oL in oN){if(oN.hasOwnProperty(oL)){C[1][oM][0][oL]=oN[oL]}}}for(var oM=0;oM<oK[2].length;oM++){var e=oK[2][oM];for(var oL in e){if(e.hasOwnProperty(oL)){for(var T=0;T<C[2].length;T++){if(C[2][T]&&C[2][T][oL]){delete C[2][T][oL];break}}C[2][oM][oL]=e[oL]}}}return C}};var bI={map:null,labelCache:{},calcDrawMc:function(C,i,e){var T=[];switch(i){case"fill":T=this.calcFill(C,e);break;case"line":break;case"building3d":T=this.calcBuilding3d(C,e);break}return T},calcFill:function(oK,C){var oL=[];for(var T=0;T<oK.length;T=T+5){var e=this.coordToMc({x:oK[T],y:oK[T+1]},C.row,C.col,C.mercatorSize,C.baseTileSize);oL.push(e[0],e[1])}return oL},calcLine:function(oK,C){var oL=[];var oM=new Int16Array(oK.buffer);for(var T=0;T<oM.length;T=T+10){var e=this.coordToMc({x:oM[T]/10,y:oM[T+1]/10},C.row,C.col,C.mercatorSize,C.baseTileSize);oL.push(e[0],e[1])}return oL},calcBuilding3d:function(oL,C){var oM=[];var T={};for(var oK=0;oK<oL.length/2;oK=oK+7){if(oL[oK]===oL[oK-7]&&oL[oK+1]===oL[oK-6]){continue}if(T[oL[oK].toString()+oL[oK+1].toString()]){continue}T[oL[oK].toString()+oL[oK+1].toString()]=true;var e=this.coordToMc({x:oL[oK],y:oL[oK+1]},C.row,C.col,C.mercatorSize,C.baseTileSize);oM.push(e[0],e[1])}return oM},coordToMc:function(oK,T,e,i,C){return[oK.x*(i/C)+e*i,oK.y*(i/C)+T*i]},addDrawIntoAreaSpots:function(e,oK){if(F.environment!=="customEditor"){return}if(!oK.styleIds){return}for(var C=0;C<oK.styleIds.length;C++){var oN=0;if(C>0){oN=oK.verticesLength[C-1]}end=oK.verticesLength[C];var oL=[];var T="";if(oK.vertex){oL=oK.vertex;T="building3d"}else{if(oK.data[0]){oL=oK.data[0];T=oK.type}else{continue}}var oM=this.calcDrawMc(oL.slice(oN,end),T,e);this.map.addAreaSpot(oM,{userData:{styleId:oK.styleIds[C],type:"mapstyle"}})}},addLabelIntoAreaSpots:function(e){if(F.environment!=="customEditor"){return}for(var oK=0;oK<e.length;oK++){var oL=e[oK];for(var T=0;T<oL.fixedLabel.length;T++){var C=oL.fixedLabel[T];if(!C._mcBds){continue}var oM=[C._mcBds[0].lng,C._mcBds[0].lat,C._mcBds[0].lng,C._mcBds[1].lat,C._mcBds[1].lng,C._mcBds[1].lat,C._mcBds[1].lng,C._mcBds[0].lat];if(!this.labelCache[oM.join()]){this.labelCache[oM.join()]=true;this.map.addAreaSpot(oM,{userData:{styleId:C.styleId,type:"mapstyle",name:C.name}})}}}}};function dP(i,e,T,C){this.cx=3*i;this.bx=3*(T-i)-this.cx;this.ax=1-this.cx-this.bx;this.cy=3*e;this.by=3*(C-e)-this.cy;this.ay=1-this.cy-this.by;this.p1x=i;this.p1y=C;this.p2x=T;this.p2y=C}dP.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e};dP.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e};dP.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx};dP.prototype.solveCurveX=function(e,oO){if(typeof oO==="undefined"){oO=0.000001}var oN;var oM;var oK;var C;var T;for(oK=e,T=0;T<8;T++){C=this.sampleCurveX(oK)-e;if(Math.abs(C)<oO){return oK}var oL=this.sampleCurveDerivativeX(oK);if(Math.abs(oL)<0.000001){break}oK=oK-C/oL}oN=0;oM=1;oK=e;if(oK<oN){return oN}if(oK>oM){return oM}while(oN<oM){C=this.sampleCurveX(oK);if(Math.abs(C-e)<oO){return oK}if(e>C){oN=oK}else{oM=oK}oK=(oM-oN)*0.5+oN}return oK};dP.prototype.solve=function(e,i){return this.sampleCurveY(this.solveCurveX(e,i))};var jF={};function ij(C){var e={duration:1000,fps:30,delay:0,transition:jF.linear,dropLastAnimation:false};if(C){for(var T in C){e[T]=C[T]}}if(C.beginTime){this._beginTime=C.beginTime}this._callbacks=[];this._options=e;if(e.delay){var oK=this;setTimeout(function(){oK._doStart()},e.delay)}else{this._doStart()}this._pauseTime=0}ij.INFINITE="INFINITE";ij.prototype._doStart=function(){if(this._isPausing){var e=performance.now()||new Date().getTime();this._pauseTime+=e-this._isPausing;this._isPausing=undefined}if(window.requestAnimationFrame){var i=this;i._timer=window.requestAnimationFrame(function(C){i._loop(C)})}else{this._beginTime=new Date().getTime();if(this._options.duration===ij.INFINITE){this._endTime=null}else{this._endTime=this._beginTime+this._options.duration}this._loop()}};ij.prototype.setBeginTime=function(e){this._beginTime=e};ij.prototype.setDuration=function(e){this._options.duration=e};ij.prototype._loop=function(T){var oM=this;T=T||new Date().getTime();T=T-this._pauseTime;if(!this._beginTime){this._beginTime=T}this._endTime=this._beginTime+this._options.duration;if(oM._endTime!==null&&T>=oM._endTime){if(oM._options.dropLastAnimation===false){oM._options.render(oM._options.transition(1),1,T)}if(typeof oM._options.finish==="function"){oM._options.finish(T,this)}for(var oL=0,e=oM._callbacks.length;oL<e;oL++){oM._callbacks[oL]()}return}var oK;if(typeof oM._options.duration==="number"){oK=(T-oM._beginTime)/oM._options.duration;oM.schedule=oM._options.transition(oK)}else{oK=T-oM._beginTime;oM.schedule=0}oM._options.render(oM.schedule,oK,T);if(!oM.terminative){if(window.requestAnimationFrame){oM._timer=requestAnimationFrame(function C(i){oM._loop(i)})}else{oM._timer=setTimeout(function(){oM._loop()},1000/oM._options.fps)}}};ij.prototype.stop=function(i,e){this.terminative=true;if(this._timer){if(window.cancelAnimationFrame){cancelAnimationFrame(this._timer)}else{clearTimeout(this._timer)}this._timer=null;if(typeof this._options.onStop==="function"){this._options.onStop(e)}}if(i){this._endTime=this._beginTime;this._loop()}};ij.prototype.pause=function(){if(!this._isPausing){this.stop();this.terminative=undefined;this._isPausing=performance.now()||new Date().getTime()}};ij.prototype.cancel=function(){this.stop()};ij.prototype.append=function(e){this._callbacks.push(e);return this};jF={_p1:1,_p2:1*1.525,linear:function(e){return e},reverse:function(e){return 1-e},easeInQuad:function(e){return e*e},easeInCubic:function(e){return Math.pow(e,3)},easeInBiquad:function(e){return Math.pow(e,4)},easeInBack:function(e){return e*e*((jF._p1+1)*e-jF._p1)},easeOutQuad:function(e){return -(e*(e-2))},easeOutCubic:function(e){return Math.pow((e-1),3)+1},easeOutBiquad:function(e){return 1-Math.pow((e-1),4)},easeOutBack:function(e){return((e=e-1)*e*((jF._p1+1)*e+jF._p1)+1)},easeInOutQuad:function(e){if(e<0.5){return e*e*2}else{return -2*(e-2)*e-1}},easeInOutCubic:function(e){if(e<0.5){return Math.pow(e,3)*4}else{return Math.pow(e-1,3)*4+1}},easeInOutBiquad:function(e){if(e<0.5){return Math.pow(e,4)*8}else{return 1-(Math.pow(e-1,4)*8)}},easeInOutSine:function(e){return(1-Math.cos(Math.PI*e))/2}};jF.ease=(function(){var e=new dP(0.4,0,0.6,1);return function(i){return e.solve(i)}})();jF["ease-in"]=jF.easeInQuad;jF["ease-out"]=jF.easeOutQuad;var fg={start:function(oP){var T=oP.el;var e=oP.style;var i=oP.startValue;var oM=oP.endValue;var oK=oP.duration||1400;var oL=oP.transition||jF.linear;var oO=oP.callback;var oN=oM-i;var C=oP.unit||"";return new ij({fps:60,duration:oK,transition:oL,render:function(oQ){T.style[e]=i+oN*oQ+C},finish:function(){oO&&oO()}})}};function w(oK,C){eX.call(this);this.keyframes=oK;var e={duration:1000,delay:0,transition:jF.linear,interation:1};if(C){for(var T in C){e[T]=C[T]}}this._options=e}w.inherits(eX,"ViewAnimation");w.prototype._start=function(C){var oS=this;oS.map=C;var oN=C.getCenter();var oT=C.getZoom();var oU=C.getTilt();var T=C.getHeading();for(var oO=0;oO<oS.keyframes.length;oO++){var oK=oS.keyframes[oO];if(oK.center===undefined||oK.center===null){oK.center=new d9(oN.lng,oN.lat)}if(oK.zoom===undefined||oK.zoom===null){oK.zoom=oT}if(oK.tilt===undefined||oK.tilt===null){oK.tilt=oU}if(oK.heading===undefined||oK.heading===null){oK.heading=T}}var oQ=new ix("onanimationstart");oS.dispatchEvent(oQ);this._initStatus(oS.map);var oM=this._options.duration;var oP=this._options.interation;var oR=this._options.transition;var oL=0;oS.poiStatus=oS.map._displayOptions.poi;if(oS.poiStatus){oS.map.setDisplayOptions({poi:false})}oS.map.viewAnimationTime=new Date().getTime();this.animation=new ij({duration:oM,transition:oR,start:function(e){},render:function(i,e){if(i===0){oS._initStatus(oS.map)}else{oS._setViewByRate(i)}},finish:function(oV,i){if(++oL<oP||oP==="INFINITE"){var oW=new ix("onanimationiterations");oS.dispatchEvent(oW);delete i._beginTime;delete i._endTime;i._doStart()}else{var oW=new ix("onanimationend");oS.dispatchEvent(oW);delete oS.map.viewAnimationTime;oS.map.setDisplayOptions({poi:oS.poiStatus})}}})};w.prototype._getTotalDuration=function(e,i){if(e===ij.INFINITE){return ij.INFINITE}else{return e*i}};w.prototype._initStatus=function(e){if(this.keyframes[0]){e.setCenter(this.keyframes[0].center,{noAnimation:true});e.setZoom(this.keyframes[0].zoom,{noAnimation:true});e.setTilt(this.keyframes[0].tilt,{noAnimation:true});e.setHeading(this.keyframes[0].heading,{noAnimation:true})}};w.prototype._setViewByRate=function(T){for(var e=0;e<this.keyframes.length-1;e++){var oK=this.keyframes[e];var C=this.keyframes[e+1];if(T>=oK.percentage&&T<C.percentage){this.map.setHeading(this._getHeadingDelta(oK,C,T),{noAnimation:true});this.map.setTilt(this._getTiltDelta(oK,C,T),{noAnimation:true});this.map.setCenter(this._getCenterDelta(oK,C,T),{noAnimation:true});this.map.setZoom(this._getZoomDelta(oK,C,T),{noAnimation:true})}}};w.prototype._getHeadingDelta=function(C,i,e){var oK=(e-C.percentage)/(i.percentage-C.percentage);var T=C.heading+(i.heading-C.heading)*oK;return T};w.prototype._getTiltDelta=function(C,i,e){var oK=(e-C.percentage)/(i.percentage-C.percentage);var T=C.tilt+(i.tilt-C.tilt)*oK;return T};w.prototype._getCenterDelta=function(C,i,e){var oK=(e-C.percentage)/(i.percentage-C.percentage);var T=C.center.add(i.center.sub(C.center).mult(oK));return T};w.prototype._getZoomDelta=function(T,C,i){var oK=(i-T.percentage)/(C.percentage-T.percentage);var e=T.zoom+(C.zoom-T.zoom)*oK;return e};w.prototype._pause=function(e){this.animation.pause()};w.prototype._continue=function(e){this.animation._doStart()};w.prototype._cancel=function(C){C.setDisplayOptions({poi:this.poiStatus});this.animation.cancel();delete C.viewAnimationTime;var i=new ix("onanimationcancel");this.dispatchEvent(i)};var en=undefined;var h8={is64Bit:function(){if(/Windows/.test(navigator.userAgent)){if(/Win64; x64/.test(navigator.userAgent)){return true}else{if(/WOW64/.test(navigator.userAgent)){return true}else{return false}}}return true},isIOS112:function bR(e){return/11_2/.test(navigator.userAgent)},canUseWebAssembly:function(i){if(en!==undefined){i&&i(en);return}if(window.WebAssembly&&this.is64Bit()){if(window.disableWebAssembly===true){en=false;i&&i(en)}else{if(!d4()){en=true;i&&i(en)}else{if(this.isIOS112()){en=false;i&&i(en)}else{var e=new Uint8Array([0,97,115,109,1,0,0,0,1,133,128,128,128,0,1,96,0,1,127,3,130,128,128,128,0,1,0,4,132,128,128,128,0,1,112,0,0,5,131,128,128,128,0,1,0,1,6,129,128,128,128,0,0,7,145,128,128,128,0,2,6,109,101,109,111,114,121,2,0,4,109,97,105,110,0,0,10,138,128,128,128,0,1,132,128,128,128,0,0,65,42,11]);WebAssembly.instantiate(e).then(function(C){en=true;i&&i(en)},function(C){en=false;i&&i(en)})}}}}else{en=false;i&&i(en)}}};var bb={};cv.Utils=bb;function lK(){var i=new Date(c0.popup_timestamp*1000);var T=i.getFullYear();var e=i.getMonth()+1;var C=i.getDate();return{year:T,month:e,day:C}}var dZ=(function(){var C=0;var i=c0.popup_code;var T=(c0.popup_block_time||60)*1000;var e=lK();return function(oO,oM){oM=oM||{};var oQ=oM.from;var oL=new Date().getTime();if(oL-C>T){C=oL;var oK="绯荤粺浜�"+e.year+"骞�"+e.month+"鏈�"+e.day+"鏃�";oO="銆�"+i+"銆�"+oK+oO;try{var oP=document.createElement("iframe");oP.style.display="none";document.body.appendChild(oP);if(oP.contentWindow&&oP.contentWindow.alert){oP.contentWindow.alert(oO)}else{window.alert(oO)}document.body.removeChild(oP)}catch(oN){window.alert(oO)}d5.sendMessage("popup",oQ,i)}}})();function oA(e){return e.style}function lC(i){if(hv.Browser.ie>0){i.unselectable="on";i.selectstart=function(){return false};i.onmousedown=function(C){C.preventDefault();return false}}else{var e=oA(i);e.MozUserSelect="none";e.WebkitUserSelect="none";i.addEventListener("mousedown",function(C){C.preventDefault()},false)}}function bx(e){return e&&e.parentNode&&e.parentNode.nodeType!==11}function cQ(i,e){if(!i){return null}i.insertAdjacentHTML("beforeEnd",e);return i.lastChild}function iC(C,i){var T=document.createElement("div");T.innerHTML=i;var e=T.childNodes[0];return C.parentNode.insertBefore(e,C)}function aF(i){i=i||window.event;i.stopPropagation?i.stopPropagation():i.cancelBubble=true}function g(i){i=i||window.event;i.preventDefault?i.preventDefault():i.returnValue=false;return false}function kK(i){aF(i);return g(i)}function j4(){var e=document.documentElement;var i=document.body;if(e&&(e.scrollTop||e.scrollLeft)){return[e.scrollTop,e.scrollLeft]}else{if(i){return[i.scrollTop,i.scrollLeft]}else{return[0,0]}}}function l5(oK){if(!oK){return}oK.onload=oK.onerror=null;var C=oK.attributes,T,e,oL;if(C){e=C.length;for(T=0;T<e;T+=1){oL=C[T].name;if(typeof oK[oL]==="function"){oK[oL]=null}}}C=oK.children;if(C){e=C.length;for(T=0;T<e;T+=1){l5(oK.children[T])}}}function iF(i,oM,oL){var oK=oM.lng-oL.lng;var T=oM.lat-oL.lat;if(oK===0){return Math.abs(i.lng-oM.lng)}if(T===0){return Math.abs(i.lat-oM.lat)}var C=T/oK;var e=oM.lat-C*oM.lng;return Math.abs(C*i.lng-i.lat+e)/Math.sqrt(C*C+1)}function dL(i,e){if(!i||!e){return}return Math.round(Math.sqrt(Math.pow(i.x-e.x,2)+Math.pow(i.y-e.y,2)))}function gQ(i,e){if(!i||!e){return 0}return Math.round(Math.sqrt(Math.pow(i.lng-e.lng,2)+Math.pow(i.lat-e.lat,2)))}function iw(oO,C,oK){var oL=(oK.lng-C.lng)*(oO.lng-C.lng)+(oK.lat-C.lat)*(oO.lat-C.lat);if(oL<=0){return gQ(oO,C)}var e=(oK.lng-C.lng)*(oK.lng-C.lng)+(oK.lat-C.lat)*(oK.lat-C.lat);if(oL>=e){return gQ(oO,oK)}var i=oL/e;var oN=C.lng+(oK.lng-C.lng)*i;var oM=C.lat+(oK.lat-C.lat)*i;const T={lng:oN,lat:oM};return gQ(oO,T)}function hK(C,i){var e=Math.round((C.x+i.x)/2);var T=Math.round((C.y+i.y)/2);return new hV(e,T)}function nk(e,C){var i=[];C=C||function(oK){return oK};for(var T in e){i.push(T+"="+C(e[T]))}return i.join("&")}function da(C,i,oL){var oM=document.createElement(C);if(oL){oM=document.createElementNS(oL,C)}i=i||{};for(var T in i){var oK={"for":"htmlFor","class":"cssClass"}[T]||T;if(T==="style"){oM.style.cssText=i[T];continue}if(T==="class"){hv.ac(oM,i[T]);continue}if(oM.setAttribute){oM.setAttribute(oK,i[T])}else{try{oM[oK]=i[T]}catch(oM){}}}return oM}function dK(e){if(e.currentStyle){return e.currentStyle}else{if(e.ownerDocument&&e.ownerDocument.defaultView){return e.ownerDocument.defaultView.getComputedStyle(e,null)}}}function c2(e){return typeof e==="function"}function i9(e){return e===void 0}function nU(e,i){return Object.prototype.hasOwnProperty.call(e,i)}function k(oK,oL){if(i9(oK.length)){for(var T in oK){if(nU(oK,T)){oL.call(null,T,oK[T])}}}else{var C=oK.length;if(C){for(var e=0;e<C;e++){oL.call(null,e,oK[e])}}}}function aP(i,e){if(!e){return i}k(e,function(C,T){i[C]=T});return i}var kl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function fd(oK){var C="";var oR;var oP;var oN="";var oQ;var oO;var oM;var oL="";var T=0;var e=/[^A-Za-z0-9+/=]/g;if(!oK||e.exec(oK)){return oK}oK=oK.replace(/[^A-Za-z0-9+/=]/g,"");do{oQ=kl.indexOf(oK.charAt(T++));oO=kl.indexOf(oK.charAt(T++));oM=kl.indexOf(oK.charAt(T++));oL=kl.indexOf(oK.charAt(T++));oR=(oQ<<2)|(oO>>4);oP=((oO&15)<<4)|(oM>>2);oN=((oM&3)<<6)|oL;C=C+String.fromCharCode(oR);if(oM!==64){C=C+String.fromCharCode(oP)}if(oL!==64){C=C+String.fromCharCode(oN)}oR=oP=oN="";oQ=oO=oM=oL=""}while(T<oK.length);return C}function ni(e){return btoa(encodeURIComponent(e))}function iO(e){return decodeURIComponent(atob(e))}(function(e){if(!e.Utils){e.Utils={}}var i=e.Utils;i.format=(function(){function C(oM,oL,oN){var oK=oN[+oL];return typeof(oK)==="function"?oK(oL):oK}function T(oM,oL,oN){var oP=oL;var oQ=[];var oK=oL.split(":");if(oK.length===2){oP=oK[0];oQ.push(oK[1])}var oO=typeof(oN[oP]);if(oO==="function"){return oN[oP].apply(undefined,oQ)}else{if(oO==="undefined"){return oM}else{return String(oN[oP])}}}return function(oK,oL){var oN=oL.splice?C:T;var oM=oK.splice?oK.join(""):oK;return oM.replace(/{([a-zA-Z0-9_$:.]+)}/g,function(oP,oO){return oN(oP,oO,oL)})}})();i.ErrorMonitor=function(T,C,oK){};h8.canUseWebAssembly(function(C){i.canUseWebAssembly=C})})(cv);function c9(){return(d4()||lt()||nI())}function d4(){var e=navigator.userAgent;if(e.indexOf("iPhone")>-1||e.indexOf("iPad")>-1){return true}return false}function lt(){var e=navigator.userAgent;if(e.indexOf("Android")>-1){return true}return false}function hM(){var e=navigator.userAgent;if(e.indexOf("Harmony")>-1){return true}return false}function eY(T,C){var e=T.getContainer();var i=C.getContainer();return e===i}function nI(){var e=navigator.userAgent;if(e.indexOf("Mobile")>-1){return true}return false}function mn(e){return e*Math.PI/180}function hJ(e){return e/Math.PI*180}function cC(e,oK){var T=Math.pow(10,oK);if(typeof e==="number"){return Math.round(e*T)/T}for(var C=0;C<e.length;C++){e[C]=cC(e[C],oK)}return e}function dA(C,i,e){if(C<i){C=i}else{if(C>e){C=e}}return C}function gq(e,i){while(e<0){e+=i}return e%i}function lp(i,e){return(i>=0&&e>=0)||(i<0&&e<0)}function Z(i){if(i._gl){return i._gl}var e={alpha:true,antialias:false,failIfMajorPerformanceCaveat:false,preserveDrawingBuffer:false,stencil:false};var C=i.getContext("webgl",e)||i.getContext("experimental-webgl",e);i._gl=C;return C}function mj(T,C){for(var e=0;e<C.length;e++){hv.on(T,C[e],aF)}}function hn(i,C,e){C[e]=i.getUniformLocation(C,e)}function de(oK,oL,e,C,i){var T="";switch(i){case"mat4":oK.uniformMatrix4fv(oL[e],false,C);return;case"v3":T="uniform3fv";break;case"f":T="uniform1f";break;case"i":T="uniform1i";break}if(T===""){throw"error"}oK[T](oL[e],C)}function kZ(oR,e){while(oR<0){oR+=360}oR=oR%360;var T=e.width;var oQ=e.height;var oM=T;var C=oQ;if(oR<90){var i=Math.sin(mn(oR))*T;var oO=Math.sin(mn(oR))*oQ;var oP=Math.cos(mn(oR))*T;var oL=Math.cos(mn(oR))*oQ;var oM=Math.ceil(oP+oO);var C=Math.ceil(i+oL)}else{if(oR<180){var oR=oR-90;var i=Math.sin(mn(oR))*T;var oO=Math.sin(mn(oR))*oQ;var oP=Math.cos(mn(oR))*T;var oL=Math.cos(mn(oR))*oQ;var oM=Math.ceil(i+oL);var C=Math.ceil(oP+oO)}else{if(oR<270){var oR=oR-180;var i=Math.sin(mn(oR))*T;var oO=Math.sin(mn(oR))*oQ;var oP=Math.cos(mn(oR))*T;var oL=Math.cos(mn(oR))*oQ;var oM=Math.ceil(oP+oO);var C=Math.ceil(i+oL)}else{var oR=oR-270;var i=Math.sin(mn(oR))*T;var oO=Math.sin(mn(oR))*oQ;var oP=Math.cos(mn(oR))*T;var oL=Math.cos(mn(oR))*oQ;var oM=Math.ceil(i+oL);var C=Math.ceil(oP+oO)}}}var oN=oM-T;var oK=C-oQ;return[0-oN/2,0-oK/2,T+oN/2,oQ+oK/2]}function dz(e){if(e.toDataURL()===dz._blankData){return true}return false}function aj(oK,T,C){var i=[C.lng-oK.lng,C.lat-oK.lat];var e=[T.lng-oK.lng,T.lat-oK.lat];return i[0]*e[1]-i[1]*e[0]}function mS(oL,oK,C){var e;var oM;var T;var i;if(oL.lng<oK.lng){e=oL.lng;T=oK.lng}else{e=oK.lng;T=oL.lng}if(oL.lat<oK.lat){oM=oL.lat;i=oK.lat}else{oM=oK.lat;i=oL.lat}if(C.lng<e||C.lng>T||C.lat<oM||C.lat>i){return false}return true}function m7(oN,oM,oL,T){var oK=aj(oL,T,oN);var C=aj(oL,T,oM);var i=aj(oN,oM,oL);var e=aj(oN,oM,T);if(oK*C<0&&i*e<0){return true}else{if(oK===0&&mS(oL,T,oN)){return true}else{if(C===0&&mS(oL,T,oM)){return true}else{if(i===0&&mS(oN,oM,oL)){return true}else{if(e===0&&mS(oN,oM,T)){return true}else{return false}}}}}}function k5(C,i){var e=i.parentNode;if(e.lastChild===i){e.appendChild(C)}else{e.insertBefore(C,i.nextSibling)}}function fS(oP,oQ){if(oQ===0){return oP}var oO=0;var oM=0;if(!oP){throw"寮傚父"}if(oP.length===0){return[]}for(var oK=1,C=oP.length-1;oK<C;oK++){var oN=iF(oP[oK],oP[0],oP[oP.length-1]);if(oN>oO){oM=oK;oO=oN}}var e=[];if(oO>=oQ){var oS=oP.slice(0,oM);var oR=oP.slice(oM,oP.length);var oL=fS(oS,oQ);var T=fS(oR,oQ);for(var oK=0,C=oL.length;oK<C;oK++){e.push(oL[oK])}for(var oK=0,C=T.length;oK<C;oK++){e.push(T[oK])}}else{e.push(oP[0]);e.push(oP[oP.length-1])}return e}function mo(T,oK){if(T.length<2){return T}const C=[T[0]];for(var e=1;e<T.length;e++){if(gQ(C[C.length-1],T[e])>=oK){C.push(T[e])}}return C}function v(e){if(Math.log2){return Math.log2(e)}return Math.log(e)/Math.LN2}function e3(C,i,e){return Math.min(e,Math.max(i,C))}function aO(e,i){if(!i){return e}var oL=i[0];var oK=i[1];var T=i[2];var C=i[3];var oN=[];var oM=[];oN[0]=C*e[0]+T*e[2];oN[1]=e[1];oN[2]=-T*e[0]+C*e[2];oM[0]=oN[0];oM[1]=oK*oN[1]-oL*oN[2];oM[2]=oL*oN[1]+oK*oN[2];return oM}var r=Math.PI/180;var jV=180/Math.PI;function id(C){var i=(C-Date.UTC(2000,0,1,12))/86400000/36525;var e=(d3.utcDay.floor(C)-C)/86400000*360-180;return[e-hY(i)*jV,fZ(i)*jV]}function hY(T){var oK=cj(T);var i=gd(T);var C=mf(T);var oL=Math.tan(me(T)/2);oL*=oL;return oL*Math.sin(2*C)-2*oK*Math.sin(i)+4*oK*oL*Math.sin(i)*Math.cos(2*C)-0.5*oL*oL*Math.sin(4*C)-1.25*oK*oK*Math.sin(2*i)}function fZ(e){return Math.asin(Math.sin(me(e))*Math.sin(cq(e)))}function cq(e){return ot(e)-(0.00569+0.00478*Math.sin((125.04-1934.136*e)*r))*r}function ot(e){return mf(e)+nd(e)}function gd(e){return(357.52911+e*(35999.05029-0.0001537*e))*r}function mf(i){var e=(280.46646+i*(36000.76983+i*0.0003032))%360;return(e<0?e+360:e)/180*Math.PI}function nd(i){var e=gd(i);return(Math.sin(e)*(1.914602-i*(0.004817+0.000014*i))+Math.sin(e+e)*(0.019993-0.000101*i)+Math.sin(e+e+e)*0.000289)*r}function me(e){return fo(e)+0.00256*Math.cos((125.04-1934.136*e)*r)*r}function fo(e){return(23+(26+(21.448-e*(46.815+e*(0.00059-e*0.001813)))/60)/60)*r}function cj(e){return 0.016708634-e*(0.000042037+1.267e-7*e)}function ja(){return window.devicePixelRatio||1}function my(C){var i;var e;var T;if(C>=0){T=Math.floor(C/65536)*65536;i=T;e=C-T}else{T=Math.floor(-C/65536)*65536;i=-T;e=C+T}return[i,e]}function ej(e){if(e.lng>=0&&e.lat>=0){return new d9(e.lng-10000000,e.lat-6000000)}if(e.lng>=0&&e.lat<0){return new d9(e.lng-10000000,e.lat+6000000)}if(e.lng<0&&e.lat>=0){return new d9(e.lng+10000000,e.lat-6000000)}if(e.lng<0&&e.lat<0){return new d9(e.lng+10000000,e.lat+6000000)}}var lQ=null;if(window.performance&&window.performance.now){lQ=function(){return performance.now()}}else{if(Date.now){lQ=function(){return Date.now()}}else{lQ=function(){return(new Date).getTime()}}}function lo(T,e,i){var C="mouseWheel";if(hv.Platform.macintosh){if(!isNaN(T)&&(T<10||T!==120)&&(e%1===0&&e<5)){C="padScroll"}if(hv.Browser.firefox&&(e%1===0&&e<5&&i===0)){C="padScroll"}}if(hv.Browser.safari&&T===12){C="mouseWheel"}return C}function cR(oS,oN){var oR=oS[0];var oQ=oS[1];var T=false;for(var oM=0,oL=oN.length-2;oM<oN.length;oM+=2){var oP=oN[oM];var oK=oN[oM+1];var oO=oN[oL];var C=oN[oL+1];var e=((oK>oQ)!==(C>oQ))&&(oR<(oO-oP)*(oQ-oK)/(C-oK)+oP);if(e){T=!T}oL=oM}return T}function lm(oK,oM){oM=oM||[];var e=oM.length;var C=0;var oL=false;for(var T=0;T<e;T++){C=(T===e-1)?0:C+1;if((oM[T].lat!==oM[C].lat)&&(((oK.lat>=oM[T].lat)&&(oK.lat<oM[C].lat))||((oK.lat>=oM[C].lat)&&(oK.lat<oM[T].lat)))&&(oK.lng<(oM[C].lng-oM[T].lng)*(oK.lat-oM[T].lat)/(oM[C].lat-oM[T].lat)+oM[T].lng)){oL=!oL}}return oL}function aV(i,oK,C){if(C===undefined||C===null){C=false}if(C){var T=false;for(var e=0;e<oK.length;e++){if(lm(i,oK[e])){T=true;break}}return T}return lm(i,oK)}function fQ(C,e,i,T){T=T||0.4;if(C>i){C=Math.pow(C-i+1,T)+i-1}else{if(C<e){C=e-Math.pow(e-C+1,T)+1}}return C}function hq(oN){var oL="";for(var C=0;C<oN.length;C++){var oO=oN.charCodeAt(C)<<1;var e=oO.toString(2);var oK=e.length;var oR=e;if(oK<8){oR="00000000"+e;oR=oR.substr(e.length,8)}oL+=oR}var oP=5-oL.length%5;var T=[];for(var C=0;C<oP;C++){T[C]="0"}oL=T.join("")+oL;var oQ=[];for(var C=0;C<oL.length/5;C++){var oO=oL.substr(C*5,5);var oM=parseInt(oO,2)+50;oQ.push(String.fromCharCode(oM))}return oQ.join("")+oP.toString()}function oe(C,i){var e=cv.TILE_VERSION||window.TILE_VERSION;if(!e||!e[C]||!e[C][i]||!e[C][i].version||!e[C][i].updateDate){e=K.tvc}return{ver:e[C][i].version,udt:e[C][i].updateDate}}function cw(){var e=cv.MSV||window.MSV;if(!e||!e.mapstyle||!e.mapstyle.updateDate||!e.mapstyle.version){e=K.msv}return{ver:e.mapstyle.version,udt:e.mapstyle.updateDate}}function fx(e,oK){var T=e.slice(0);for(var C=0;C<T.length;C++){T[C]+=oK}return T}var kf=null;function kB(e){if(kf){return}e.fire(new ix("onloadtile"));kf=setTimeout(function(){kf=null},1000)}function bi(){if(N("//" + window.location.host + "/bmap-map")||N("//maps.baidu.com")||N("//" + window.location.host + "/bmap-api")){return true}return false}bb.inMapHost=bi();if(typeof window._inMapHost==="boolean"){bb.inMapHost=window._inMapHost}function N(i){var C=window.location;var e=document.createElement("a");e.href=i;return e.hostname===C.hostname&&e.port===C.port&&e.protocol===C.protocol}var fY=[72.685732,0.193351,136.10888,54.392257];var hu=[72.6892532,0.1939743381,136.1168614,54.392257];var E=[72.69566833,0.1999420909,136.1232863,54.39791217];var mg=158;var ff=[98.789081,122.948721,107.857301,118.082148,119.126627,128.021934,79.939914,99.021873,119.912937,122.084572,127.906381,130.933385,106.496057,108.066113,119.818772,126.367919,111.789929,119.311401,100.742164,102.220151,99.853589,100.781289,97.522631,98.834615,99.092638,99.892947,122.905967,123.761867,123.716213,125.494726,123.723977,124.755034,125.475833,126.398284,125.471687,126.065118,130.817003,133.605851,127.900156,128.656536,128.646633,129.625389,132.88057,134.104549,117.365548,119.230813,116.073074,117.416898,114.406274,116.123791,116.479038,119.591534,110.566812,111.851324,74.465162,79.993155,82.858046,91.345214,85.71485,98.969834,127.651377,129.532029,129.462275,130.209769,133.716214,134.731053,134.366834,135.103133,130.854579,131.32966,115.499125,117.530421,115.765224,116.734157,108.524336,110.601747,121.351282,124.612037,126.151954,127.332751,91.273562,95.604179,79.87318,82.935667,76.413314,78.336484,78.275229,79.993668,83.956612,85.725267,85.500637,89.346601,97.990127,98.94176,106.641956,108.599215,111.386259,111.810312,111.578597,111.803167,115.99273,117.010413,116.24461,116.675246,119.422198,119.909078,120.646056,121.38098,120.335038,120.662183,124.579855,125.773243,126.207803,126.774849,95.565331,102.037736,95.576121,96.158028,95.556699,97.799055,91.296205,93.348146,93.321994,94.690522,89.339313,90.540241,82.263039,82.882528,78.335615,80.023512,76.623947,78.352608,73.495149,74.48155,74.846872,76.479412,91.560058,94.871116,88.759515,89.235995,83.237883,83.965264,82.292123,83.246813,81.876477,83.253307,80.75212,81.463265,86.463409,88.267232,102.199623,104.225963,112.153727,116.823265,108.965663,113.021145,111.166575,117.972799];var fe=[22.548416,42.276971,17.227969,22.7346,41.292761,50.741667,30.365133,42.324913,21.701924,22.69335,42.4176,48.936335,21.429059,22.648399,50.650499,52.914825,42.20449,45.199078,21.13391,22.568612,21.441033,22.583349,23.73862,25.298628,22.00409,22.563095,38.97849,41.338631,40.287973,41.330108,39.732801,40.343252,40.966852,41.323446,40.719312,41.05937,44.869472,48.009884,41.336325,42.443362,42.008104,42.434713,45.873151,48.205746,45.132322,46.784582,45.133383,46.392803,45.148771,45.740273,47.478161,50.064393,42.216229,43.461282,37.014302,40.662281,42.219985,47.31417,27.726965,30.466651,48.911271,49.642488,48.831706,49.434487,46.941762,48.37425,47.651781,48.463782,42.851964,44.905396,47.598273,48.438467,48.409141,48.901651,42.22756,42.906402,52.821047,53.578094,50.701837,51.654278,42.292419,44.392214,42.295918,45.385017,34.680866,37.027803,30.743515,37.066586,28.245649,30.406053,47.270872,48.497371,25.238932,27.778469,42.215754,42.540416,43.427677,44.689208,44.685587,44.994131,48.878657,49.318659,49.281099,49.624515,50.710468,51.306809,52.90717,53.331981,52.903016,53.107959,52.900867,53.250033,51.638073,52.400678,42.229657,42.691928,43.061242,43.891083,42.663095,43.074222,44.37174,45.180155,44.375135,44.974219,47.3035,48.053221,45.352401,46.807875,40.563053,42.040289,40.581871,41.405172,38.516328,40.178756,35.790476,37.02337,26.825605,27.761303,27.197399,27.74932,29.147561,30.37813,29.570893,30.062042,30.045026,30.380952,29.998038,30.385203,48.487385,49.16832,22.395733,22.598229,7.441114,11.501436,3.767491,9.000793,12.642067,17.406563];var ds=[98.795985,122.960792,107.867379,118.093451,119.139658,128.035888,79.948212,99.029524,119.923388,122.094977,127.918527,130.94789,106.50606,108.076783,119.8329,126.382207,111.803567,119.324928,100.749858,102.227985,99.860885,100.788921,97.529435,98.841564,99.100017,99.90035,122.917416,123.774367,123.728314,125.507211,123.736065,124.767299,125.488463,126.410675,125.484326,126.07764,130.830784,133.620042,127.912178,128.668957,128.658937,129.638599,132.894179,134.119086,117.379378,119.244569,116.086736,117.431212,114.420233,116.137458,116.492775,119.605527,110.579401,111.86488,74.468228,80.001908,82.867432,91.353788,85.721075,98.976964,127.664757,129.546833,129.476893,130.22449,133.730358,134.745235,134.381034,135.1178,130.868117,131.34409,115.513245,117.544751,115.779271,116.748045,108.536254,110.614326,121.365534,124.626434,126.165992,127.347013,91.281869,95.611754,79.879648,82.945041,76.413314,78.345207,78.275229,80.002329,83.956612,85.734098,85.510186,89.356499,97.997001,98.948845,106.653208,108.610811,111.400183,111.824179,111.592224,111.817136,116.00682,117.024631,116.258574,116.689291,119.436876,119.922961,120.659806,121.395479,120.349116,120.676014,124.59389,125.787788,126.221756,126.788962,95.572955,102.046581,95.583772,96.165551,95.564318,97.806095,91.30446,93.356438,93.330319,94.698145,89.349129,90.548677,82.268802,82.892025,78.335615,80.032266,76.625755,78.361413,73.498248,74.490992,74.846872,76.488771,91.563521,94.878444,88.768214,89.244787,83.247076,83.974127,82.29595,83.256003,81.885315,83.26249,80.760619,81.472404,86.470983,88.276988,102.207537,104.234614,112.164795,116.833667,108.965663,113.032246,111.166575,117.983363];var dp=[22.551183,42.284787,17.227969,22.738314,41.300981,50.749638,30.368087,42.332701,21.705055,22.696452,42.426047,48.944674,21.432184,22.651387,50.657409,52.92296,42.212192,45.206905,21.137031,22.57186,21.444502,22.586566,23.741571,25.301472,22.006806,22.56637,38.985114,41.346531,40.295617,41.338581,39.740021,40.351012,40.974644,41.331562,40.726852,41.067192,44.877158,48.018285,41.344597,42.451798,42.016305,42.443235,45.880906,48.214001,45.140027,46.792775,45.141083,46.400433,45.156418,45.748281,47.485889,50.071879,42.223667,43.469487,37.019867,40.668675,42.226823,47.321605,27.72944,30.469853,48.919002,49.650614,48.840188,49.443166,46.949801,48.382798,47.660603,48.472692,42.859946,44.913298,47.605896,48.445914,48.41698,48.909667,42.23507,42.914193,52.8281,53.585952,50.709311,51.662219,42.29968,44.399225,42.302746,45.391958,34.680866,37.03377,30.743515,37.07228,28.245649,30.408935,47.277693,48.504255,25.241528,27.780726,42.223363,42.548418,43.435888,44.696952,44.693193,45.00187,48.886267,49.326755,49.288642,49.632304,50.717486,51.314369,52.914204,53.33964,52.910094,53.115926,52.908382,53.258095,51.64533,52.408305,42.236825,42.699126,43.068466,43.898632,42.670403,43.082219,44.379045,45.187742,44.382336,44.981379,47.310362,48.06019,45.359099,46.814439,40.569751,42.047741,40.587956,41.41263,38.519192,40.185033,35.790476,37.029005,26.825605,27.763896,27.199658,27.751649,29.150192,30.381073,29.573886,30.065162,30.047775,30.384089,30.001277,30.388525,48.494118,49.173841,22.398528,22.601198,7.441114,11.505968,3.767491,9.005209,12.642067,17.410886];var au=95;var eP=[110.3961374,105.0743788,96.8991824,95.61810411,93.82412598,91.3892353,91.38931858,89.08325955,87.22469808,86.26278402,85.17353,85.23741211,82.86627441,81.90481038,79.59687147,80.39829237,79.93319363,77.80279948,75.2557704,73.49357829,73.1892532,73.87758816,74.4064738,74.10215224,75.46409695,76.77739692,78.28299615,78.15499485,78.37920654,78.89145345,79.69282199,81.19938178,81.80830295,83.89093424,85.94149523,87.86447266,89.03414958,90.05918132,91.10026937,92.15733832,93.74361735,95.82597331,97.95655545,97.12363037,98.2129739,99.2068571,101.6587874,102.5239084,102.2356106,105.0249238,106.0992342,107.8617093,111.6439372,109.591869,112.284586,117.7961157,118.9495128,114.2076584,118.693565,123.1475225,122.730705,120.9361393,123.4207441,122.3787782,122.1385425,121.5904281,121.1773763,120.6805404,120.2483355,122.795807,122.8759077,121.3060262,122.1392177,123.7418799,126.4177599,128.5647409,129.7194884,131.2259136,131.9950494,133.6289931,135.6168614,131.3875545,130.8743365,128.6303223,126.0997773,124.4015375,122.22161,119.6586483,119.7866827,118.5685878,116.5177976,114.819101,119.0812964,116.453265,111.7431171];var eN=[43.2190351,42.38053385,43.17417589,44.42226915,45.09863634,45.56708116,47.33599718,48.68832709,49.62448486,48.9482175,48.4800472,47.33564399,47.43948676,46.03452067,45.20221788,43.34563043,42.32965739,41.39690972,40.82972331,39.95567654,39.25892877,38.36098768,38.05441569,37.16878445,36.38899414,35.36126817,34.30953451,32.58503879,31.56975694,30.77800266,30.43559814,29.7744892,30.0931977,28.71103299,27.70739665,27.5775472,27.01096137,27.77857883,27.50707954,26.50328315,26.70387804,27.95548557,27.29428901,23.64685493,23.62310601,21.67493381,20.77751465,21.32070991,22.1824113,22.31232964,22.51316054,16.80037679,13.19749864,0.6939743381,1.541660428,10.50208252,15.58926975,17.89090007,19.94928467,22.18490153,25.37285292,25.61456434,30.62532552,31.08099284,31.89238173,32.50092692,32.80325765,34.25546956,35.15486138,36.90170139,37.8348272,37.941604,38.6480797,38.96797201,40.98146918,41.25573296,42.07218153,42.49132813,44.65259766,44.69330702,48.62286865,48.09383952,49.19628499,50.03402317,53.27678901,53.62976345,53.89420546,52.98933322,52.01872884,50.23210259,50.18807048,47.49769857,47.34362712,46.50502143,45.24770128];var g7=[98.7895,122.954182,107.860913,118.087007,119.133165,128.029533,79.941749,99.023087,119.916883,122.08841,127.912143,130.941471,106.499502,108.070244,119.826245,126.375818,111.797006,119.318387,100.743285,102.221517,99.854448,100.782445,97.522928,98.835028,99.093518,99.893783,122.910927,123.767769,123.721954,125.50077,123.729657,124.760724,125.481902,126.404079,125.477737,126.071019,130.824331,133.613395,127.905767,128.662524,128.652527,129.6321,132.887552,134.11249,117.37297,119.237999,116.080154,117.424589,114.413586,116.130948,116.486264,119.598927,110.5728,111.858437,74.465162,79.995337,82.860821,91.347291,85.716024,98.970481,127.658331,129.540202,129.470528,130.21808,133.723748,134.738785,134.374555,135.111443,130.861475,131.337438,115.506627,117.538123,115.772783,116.741632,108.529656,110.60782,121.358945,124.619773,126.159424,127.340582,91.275275,95.605228,79.874427,82.938601,76.413314,78.338763,78.275229,79.995765,83.956612,85.727511,85.503554,89.349858,97.990418,98.942257,106.646704,108.604437,111.393667,111.817723,111.585811,111.810645,116.000232,117.018216,116.252108,116.682705,119.430384,119.916417,120.653168,121.38883,120.342727,120.669383,124.587426,125.781376,126.215282,126.782323,95.566367,102.040026,95.577158,96.159009,95.557772,97.799728,91.298032,93.350057,93.323794,94.691771,89.342471,90.542019,82.264229,82.885485,78.335615,80.025844,76.623947,78.355027,73.495149,74.484473,74.846872,76.482208,91.560117,94.871859,88.761692,89.23822,83.240549,83.967602,82.292367,83.2495,81.878825,83.256003,80.75421,81.465955,86.465421,88.270356,102.201019,104.228033,112.158282,116.827153,108.965663,113.025767,111.166575,117.97687];var g5=[22.545421,42.279053,17.226272,22.731982,41.294917,50.743316,30.361986,42.326603,21.699185,22.690751,42.419757,48.938435,21.426505,22.64567,50.651745,52.916705,42.20641,45.201064,21.131326,22.565685,21.438288,22.580379,23.735785,25.295582,22.001087,22.560315,38.979333,41.340757,40.28938,41.332289,39.734164,40.344718,40.968803,41.325813,40.721073,41.061503,44.871533,48.012179,41.338366,42.445601,42.010343,42.436934,45.875217,48.208327,45.134237,46.786509,45.135376,46.394665,45.150734,45.742257,47.480099,50.065931,42.217982,43.46329,37.014057,40.662848,42.221079,47.315558,27.723432,30.46385,48.913298,49.644555,48.83396,49.436824,46.944059,48.376613,47.654503,48.466331,42.854333,44.907682,47.600253,48.440245,48.410926,48.903468,42.229292,42.908294,52.822466,53.58012,50.703491,51.656037,42.29378,44.393379,42.296912,45.385809,34.679282,37.027699,30.740622,37.066377,28.241967,30.403134,47.271949,48.49848,25.235818,27.774976,42.217425,42.542102,43.429763,44.691016,44.687044,44.995758,48.880431,49.320551,49.282865,49.626267,50.711607,51.308382,52.908547,53.333963,52.904419,53.109706,52.902338,53.251938,51.639701,52.402205,42.231045,42.693581,43.062756,43.892771,42.664519,43.075927,44.372942,45.1815,44.376327,44.975476,47.304623,48.054453,45.353174,46.808493,40.563653,42.041556,40.582164,41.4064,38.51618,40.179105,35.789745,37.023144,26.825402,27.757641,27.193806,27.745766,29.144229,30.375186,29.567889,30.059102,30.041938,30.378006,29.995047,30.382338,48.48834,49.169021,22.392816,22.595333,7.439914,11.500161,3.766676,9.000793,12.640512,17.406563];var iv=3000;var j3=0.00002;var j1=0.000003;var mN=0.0174532925194;var lc=0.0065;var lb=0.006;var fG=40000;var ia=0;var ne=1;var a0=2;var lE=3;var h0=4;var kF=1e-10;var mt=6370996.81;var iz=100000000;function kQ(C,oK,i,T){var e=arguments.length;this.ll={};this.ru={};if(e===0){}else{if(e===4){this.normalize(C,oK,i,T)}}}kQ.prototype.contains=function(e){if(e.lng>this.ll.lng&&e.lng<this.ru.lng&&e.lat>this.ll.lat&&e.lat<this.ru.lat){return lE}if(Math.abs(e.lng-this.ll.lng)<kF||Math.abs(e.lng-this.ru.lng)<kF||Math.abs(e.lat-this.ll.lat)<kF||Math.abs(e.y-this.ru.lat)>kF){return a0}return ia};kQ.prototype.normalize=function(i,T,e,C){if(i>e){this.ll.lng=e;this.ru.lng=i}else{this.ll.lng=i;this.ru.lng=e}if(T>C){this.ll.lat=C;this.ru.lat=T}else{this.ll.lat=T;this.ru.lat=C}};function gV(i,T,e,C){this.sp={lng:i,lat:T};this.ep={lng:e,lat:C};this.mbr=new kQ(i,T,e,C)}function lT(T,e,oL,oK){for(var C=0;C<oK;C=C+2){if(T.lng>=e[C]&&T.lng<=e[C+1]&&T.lat>=oL[C]&&T.lat<=oL[C+1]){return true}}return false}function jh(oO){var i=oO.lng;var oN=oO.lat;var T=Math.sqrt(i*i+oN*oN);var oL=Math.atan2(oN,i);var C=T+ju(oN);var oK=oL+jt(i);var e=C*Math.cos(oK);var oM=C*Math.sin(oK);return{lng:e+lc,lat:oM+lb}}function bL(oO){var i=oO.lng-lc;var oN=oO.lat-lb;var T=Math.sqrt(i*i+oN*oN);var oL=Math.atan2(oN,i);var C=T-ju(oN);var oK=oL-jt(i);var e=C*Math.cos(oK);var oM=C*Math.sin(oK);return{lng:e,lat:oM}}function ju(e){return Math.sin(e*iv*mN)*j3}function jt(e){return Math.cos(e*iv*mN)*j1}function aS(C,i,e){return((i.lng-C.lng)*(e.lat-C.lat)-(e.lng-C.lng)*(i.lat-C.lat))}function lj(i,e){return Math.abs(i-e)<=kF}function jG(T,C){var i=T.lat*mN;var oO=T.lng*mN;var e=C.lat*mN;var oN=C.lng*mN;var oL=Math.cos(i)*Math.cos(e);var oK=Math.cos(oO)*Math.cos(oN);var oQ=Math.sin(i)*Math.sin(e);var oP=Math.sin(oO)*Math.sin(oN);var oR=oL*oK+oL*oP+oQ;if(oR<-1){oR=-1}else{if(oR>1){oR=1}}var oM=Math.acos(oR)*mt;return oM}function n(oN,oM){var i=oN.lat*mN;var e=oM.lat*mN;var T=oN.lng*mN;var C=oM.lng*mN;var oL=i-e;var oK=T-C;var oO=Math.sin(oL/2)*Math.sin(oL/2)+Math.cos(i)*Math.cos(e)*Math.sin(oK/2)*Math.sin(oK/2);return 2*Math.asin(Math.sqrt(oO))*mt}function jE(oO,C){var oQ=cy(oO,C);var oP=180;var oN=90;var oM=-180;var oK=-90;var oL=C.sp;var T=C.ep;oP=oL.lng<T.lng?oL.lng:T.lng;oN=oL.lat<T.lat?oL.lat:T.lat;oM=oL.lng<T.lng?oL.lng:T.lng;oK=oL.lat<T.lat?oL.lat:T.lat;if(oQ.lng<=oM&&oQ.lng>=oP&&oQ.lng<=oK&&oQ.lat>=oN){return jG(oO,oQ)}else{var i=n(oO,C.sp);var e=n(oO,C.ep);return i<e?i:e}}function bN(i,e){}function cE(i,T,e,C){return Math.sqrt((i-e)*(i-e)+(T-C)*(T-C))}function cy(oU,oM){var oL=oU.lng;var oT=oU.lat;var oK=oM.sp.lng;var oS=oM.sp.lat;var C=oM.ep.lng;var oQ=oM.ep.lat;var oR=oQ-oS;var oP=oK-C;if(lj(oR,0)&&lj(oP,0)){return oM.sp}var oO=C*oS-oK*oQ;var oN=oP*oL-oR*oT;var e=oR*oR-oP*oP;var T=oP*oN-oR*oO;var i=oR*oN+oP*oO;return{lng:T/e,lat:-i/e}}function cL(T){var C=0;for(var e=0;e<au;++e){if(eN[e]<=T.lat){if(eN[(e+1)%au]>T.lat){if(aS({lng:eP[e],lat:eN[e]},{lng:eP[(e+1)%au],lat:eN[(e+1)%au]},T)>0){++C}}}else{if(eN[(e+1)%au]<=T.lat){if(aS({lng:eP[e],lat:eN[e]},{lng:eP[(e+1)%au],lat:eN[(e+1)%au]},T)<0){--C}}}}return C===0?ia:lE}function ok(T){var oM={};if(T.lng<hu[0]-0.4||T.lat<hu[1]-0.4||T.lng>hu[2]+0.4||T.lat>hu[3]+0.4){oM.lng=T.lng;oM.lat=T.lat;return oM}else{if(lT(T,g7,g5,mg)){oM=jh(T);return oM}}var e=0;var oP=fG;var C=0;var oN=new kQ();var oO=1;if(cL(T)===ia){for(var oL=0;oL<au;++oL){var oK=new gV(eP[oL],eN[oL],eP[(oL+1)%au],eN[(oL+1)%au]);oN.ll.lng=oK.mbr.ll.lng-0.5;oN.ll.lat=oK.mbr.ll.lat-0.5;oN.ru.lng=oK.mbr.ru.lng+0.5;oN.ru.lat=oK.mbr.ru.lat+0.5;if(oN.contains(T)===ia){continue}C=jE(T,oK);if(C<oP){oP=C}}if(oP<fG){e=(fG-oP)/fG;oO=2}}else{oO=3;e=1}var oQ=jh(T);oM={lng:T.lng+(oQ.lng-T.lng)*e,lat:T.lat+(oQ.lat-T.lat)*e};return oM}function hx(i){var C={};if(i.lng<E[0]-0.4||i.lat<E[1]-0.4||i.lng>E[2]+0.4||i.lat>E[3]+0.4){C.lng=i.lng;C.lat=i.lat;return C}else{if(lT(i,ds,dp,mg)){C=bL(i);return C}}var e=ok(i);if(i.lng===e.lng&&i.lat===e.lng){C.lng=i.lng;C.lat=i.lat;return C}return decryptPt1(i,ok)}function md(i,e){if(e===3&&i instanceof d9){var C=ok(i);return new d9(C.lng,C.lat)}else{return i}}function g9(i,e){if(e===3&&i instanceof d9){var C=hx(i);return new d9(C.lng,C.lat)}else{if(e===5&&i instanceof d9){return new d9(i.lng,i.lat)}else{return i}}}function iM(i,e){if(i&&!lT(i,g7,g5,mg)){return i}switch(e){case BMAP_COORD_GCJ02:var C=fU.transform([i.lng,i.lat],fU.GCJ02,fU.BD09LL);return new d9(C[0],C[1]);case BMAP_COORD_WGS84:var C=fU.transform([i.lng,i.lat],fU.WGS84,fU.BD09LL);return new d9(C[0],C[1]);case 3:var C=fU.transform([i.lng,i.lat],fU.GCJ02,fU.BD09LL);return new d9(C[0],C[1]);default:return i}}function m0(i,e){if(i&&!lT(i,g7,g5,mg)){return i}switch(e){case BMAP_COORD_GCJ02:var C=fU.transform([i.lng,i.lat],fU.BD09LL,fU.GCJ02);return new d9(C[0],C[1]);case BMAP_COORD_WGS84:var C=fU.transform([i.lng,i.lat],fU.BD09LL,fU.WGS84);return new d9(C[0],C[1]);case 3:var C=fU.transform([i.lng,i.lat],fU.BD09LL,fU.GCJ02);return new d9(C[0],C[1]);default:return i}}function u(oL){if(!oL){oL={}}var oM=JSON.stringify(oL);var oK=0,C,T,e;if(oM.length===0){return oK}for(C=0,e=oM.length;C<e;C++){T=oM.charCodeAt(C);oK=((oK<<5)-oK)+T;oK|=0}return oK}function eR(){var i=new Date().getTime();var e="xxxyxxxy".replace(/[xy]/g,function(T){var C=(i+Math.random()*16)%16|0;i=Math.floor(i/16);return(T=="x"?C:(C&3|8)).toString(16)});return e}function b1(e,i){return Math.atan2(i,e)*180/Math.PI}function fc(oM,C,i){var e=[],oL=[];e[0]=oM[0]-C[0];e[1]=oM[1]-C[1];oL[0]=i[0]-C[0];oL[1]=i[1]-C[1];var oK=e[0]*oL[0]+e[1]*oL[1];var T=Math.sqrt((e[0]*e[0])+(e[1]*e[1]))*Math.sqrt(oL[0]*oL[0])+Math.sqrt(oL[1]*oL[1]);return Math.acos(oK/T)/Math.PI*180}function jX(oN,C,i){var e=[],oM=[];e[0]=oN[0]-C[0];e[1]=oN[1]-C[1];oM[0]=i[0]-C[0];oM[1]=i[1]-C[1];var oK=e[0]*oM[1]-e[1]*oM[0];var oL=e[0]*oM[0]+e[1]*oM[1];var T=Math.atan2(oK,oL);return T*180/Math.PI}var df=0;function iW(){return df++}function b6(i,oL){var C=i.toLowerCase();var T=C.lastIndexOf("?");var e=C.lastIndexOf("#");var oK=Math.max(T,e);if(oK===-1){return i+"?"+oL}return i+"&"+oL}function jp(oK){if(oK instanceof Array&&oK.length>=3){var T=oK[0]||0;var C=oK[1]||0;var e=oK[2]||0;var i=oK[3]||1}else{var T=(oK)&255;var C=(oK>>8)&255;var e=(oK>>16)&255;var i=(oK>>24)&255}if(!oK){return 0}return T+C*256+e*65536-1}function l(e){var i=true;var C=e.charAt(0);switch(C){case"\n":return"\\n";break;case"\r":return"\\r";break;case"'":return"\\'";break;case'"':return'\\"';break;case"&":return"\\&";break;case"\\":return"\\\\";break;case"\t":return"\\t";break;case"\b":return"\\b";break;case"\f":return"\\f";break;case"/":return"\\x2F";break;case"<":return"\\x3C";break;case">":return"\\x3E";break;default:i=false;break}if(!i){return e}}function b(oK){var C=oK;var T="";var e=0;for(e=0;e<C.length;e++){T=T+l(C.charAt(e))}return T}function bT(){if(!URL){return{origin:"",protocol:"https:"}}try{var T=window.location.href;var i=new URL(T);if(i.protocol!=="http:"&&i.protocol!=="https:"){return{origin:"",protocol:"https:"}}return i}catch(C){return{origin:"",protocol:"https:"}}}function gF(oK,T){if(typeof document==="undefined"||!document.documentElement){return T}try{var i=window.getComputedStyle(document.documentElement).getPropertyValue(oK);i=i&&i.trim();return i||T}catch(C){return T}}var c4={};c4[0]=[0,0];c4[1]=[1,0];c4[2]=[0,1];c4[3]=[1,1];c4[4]=[0.5,0];c4[5]=[0,0.5];c4[6]=[0.5,0.5];c4[7]=[1,0.5];c4[8]=[0.5,1];function nt(T,C,e){var i=c4[T];if(!i){return null}return new mU(Math.floor(C*i[0]),Math.floor(e*i[1]))}function fq(){if(!K.uiVersionIsGL()){var e=gF("--bmap-color-primary","#1677ff");var i=gF("--bmap-color-primary-bg","#eaf1ff");return{strokeColor:e,fillColor:i,labelBorderColor:e,labelTextColor:e,labelBackground:"#fff"}}return{strokeColor:"#000",fillColor:"#fff",labelBorderColor:"#f00",labelTextColor:"#000",labelBackground:"#fff"}}function np(){var C=function(oY,oX){var oW={"\x6c\x78\x61\x78\x78":"\x78\x65\x61","\x61\x65\x65\x6d\x78":"\x61\x65\x61\x69","\x64\x64\x61\x78\x6d":function(o5,T){return o5(T)},"\x68\x6d\x61\x65\x61":"\x64\x61\x65","\x78\x65\x64\x65\x63":"\x6d\x64\x61","\x63\x61\x61\x78\x61":function(o5,T){return o5+T},"\x63\x61\x61\x68\x69":function(o5,T){return o5(T)},"\x6c\x61\x65\x78\x6d":function(o6,o5,T){return o6(o5,T)},"\x78\x69\x61\x61\x63":function(T,o5){return T(o5)},"\x65\x6d\x6c\x69\x65":function(o5,T){return o5(T)},"\x68\x6c\x65\x61\x61":function(o5,T){return o5+T},"\x64\x63\x61\x61\x68":function(o5,T){return o5(T)},"\x69\x61\x6d\x6c\x6d":function(o5,T){return o5<T}};var oV="\x31\x2e\x31\x2e\x32";function oU(o6,o5){var T=oW["\x6c\x78\x61\x78\x78"];while(T!==oW["\x61\x65\x65\x6d\x78"]){switch(T){case"\x61\x69\x6c":return o7;case"\x6d\x64\x61":for(var pa=0;pa<o8;pa++){var o9=oW["\x64\x64\x61\x78\x6d"](o5,o6[pa]);o7["\x70\x75\x73\x68"](o9)}T="\x61\x69\x6c";break;case"\x78\x65\x61":var o8=o6["\x6c\x65\x6e\x67\x74\x68"];T=oW["\x68\x6d\x61\x65\x61"];break;case oW["\x68\x6d\x61\x65\x61"]:var o7=[];T=oW["\x78\x65\x64\x65\x63"];break}}}var oT,oS,oR,oQ,oP,oO=decodeURIComponent,oN="\x43\x68\x61\x72",oM="";var oL=[C];oT="\x64\x65";oS="\x66\x72";oR="\x6f";oP=oW["\x63\x61\x61\x78\x61"](oS+oR,"\x6d");oQ=oW["\x68\x6c\x65\x61\x61"]("\x43\x6f",oT);var oK=function(T){return oW["\x63\x61\x61\x78\x61"](T,oM)["\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72"][oP+oN+oQ](T)};var o4=function(T){var o5={"\x65\x61\x6c\x68\x69":function(o7,o6){return oW["\x63\x61\x61\x68\x69"](o7,o6)}};return oW["\x6c\x61\x65\x78\x6d"](oU,T,function(o6){return o5["\x65\x61\x6c\x68\x69"](oK,o6)})};var o0=o4["\x63\x61\x6c\x6c"](oK,[39,34,37,96,60,120,97,65,98,66,99,67,100,68,101,69,102,70,103,110,109,111,112,48,49,50,51,52,53,54,55,56,57]);var oZ=oU([28782,27702,26416,25167,24183],function(T){return oW["\x78\x69\x61\x61\x63"](oO,T)});var o3=o4["\x63\x61\x6c\x6c"](oZ,[22354,22749,24415,23346,22257,22688,24306,25174,23595,25547,22984,25690,22212,27547,21594,27210,23090,29193,22394,29368,29532,29459,29530,24146,24500,26352,27441,28788,29370,27673,26925,25249,24430]),o2={};oZ=oW["\x64\x63\x61\x61\x68"](o4,oZ);var o1=new RegExp(oZ["\x6a\x6f\x69\x6e"]("\x7c"));for(var oT=0;oW["\x69\x61\x6d\x6c\x6d"](oT,o0["\x6c\x65\x6e\x67\x74\x68"]);oT++){o2[o3[oT]]=o0[oT]}oX=oW["\x6c\x61\x65\x78\x6d"](oU,oX["\x73\x70\x6c\x69\x74"](oM),function(T){return o2[T]||T})["\x6a\x6f\x69\x6e"](oM);return oU(oX["\x73\x70\x6c\x69\x74"](o1),function(T){return oW["\x65\x6d\x6c\x69\x65"](oO,T)})}(this,"\x6c\u545a\u72b8\u577a\x74\x68\u624f\u545a\u735c\u5ef2\u735c\u545a\u6c36\x69\u5ef2\u545a\u545a\u58a0\u5e77\u56c4\u58a0\u59c8\x6c\x69\u6c36\u545a\u56c4\u58a0\u59c8\u545a\u6c36\u56c4\u56c4\u545a\u545a\u59c8\u5e77\x73\x75\u5c2b\x73\x74\x72\u624f\u59c8\u58a0\u56c4\u5ef2\u735c\u624f\x69\u72b8\u56c4\u545a\u58a0\x4f\u5a32\u6c36\x68\u58a0\u545a\u545a\u735c\u5e77\u58a0\x6c\u545a\x6c\x6c\u5e77\x68\u5ef2\u5ef2\u6c36\u735c\u545a\u735c\u6730\x48\u5e52\u6256\u5f6e\x50\u62a1\x50\u692d\x59\u6c19\u6256\u63cb\x51\x4f\u5e52\u706e\u59c8\x69\x6c\u6c36\x6c\u58a0\u59c8\u706e\u545a\u5ef2\u5ef2\u624f\u7209\u72ba\x4c\u66f0\x4f\u6c19\x52\u6c19\u6256\u6b9b\u62a1\u5f6e\u5f6e\u5e52\x4f\u5e77\u56c4\x6c\u545a\u56c4\x69\u6730\u59c8\u545a\u545a\u545a\u706e\u545a\u58a0\x6c\u5ef2\u735c\u6730\u5f5f\u66f0\u6c19\x73\x69\u577a\u72b8\u5f5f\u6b31\u6b9b\u6730\x73\x75\u5c2b\x73\x74\x72\x69\u72b8\u577a\u706e\u5ef2\u58a0\u545a\x6c\u56c4");(function(oL,oK){var T=function(oM){while(--oM){oL.push(oL.shift())}};T(++oK)}(C,491));var i=function(oL,oK){oL=oL-0;var T=C[oL];return T};function e(oO){var oN={"\x64\x6c\x65\x64\x69":function(oR,oQ){return oR!==oQ},"\x65\x78\x6c\x61\x6d":i("0x0"),"\x61\x78\x65\x6c\x64":function(oQ,oR){return oQ-oR},"\x65\x6d\x61\x6d\x65":i("0x1"),"\x69\x61\x65\x65\x78":i("0x2"),"\x64\x78\x63\x6c\x69":i("0x3"),"\x65\x64\x78\x63\x65":i("0x4"),"\x64\x68\x63\x6d\x68":function(oR,oQ){return oR(oQ)},"\x64\x64\x65\x65\x63":function(oR,oQ){return oR(oQ)},"\x63\x78\x64\x61\x6d":function(oR,oQ){return oR+oQ},"\x68\x78\x65\x65\x6d":i("0x5"),"\x78\x6c\x65\x6c\x6c":i("0x6")};var oM=i("0x5");while(oN[i("0x7")](oM,i("0x8"))){switch(oM){case oN[i("0x9")]:return i("0xa")+oK[i("0xb")](oN[i("0xc")](oK[i("0xd")],12));case oN[i("0xe")]:var oL=oN[i("0xf")];oM=oN[i("0x10")];break;case oN[i("0x11")]:var oK=oN["\x64\x68\x63\x6d\x68"](md5,oN[i("0x12")](md5,T+oP)+oL);oM=oN[i("0x9")];break;case oN[i("0x10")]:var T=oO[i("0x13")](oN[i("0x14")](oO[i("0x15")]("\x3f"),1));oM=i("0x4");break;case oN[i("0x16")]:var oP=oN[i("0x17")];oM=oN["\x65\x6d\x61\x6d\x65"];break}}}return e}function ki(){}hv.extend(ki,{Request:{INITIAL:-1,WAITING:0,LOADED:1,COMPLETED:2},Dependency:{poly:["marker"],layer:["poly"],hotspot:["poly"],infowindow:["marker","hotspot"],simpleInfowindow:["marker"],tools:["marker","poly"],mapgl:["glcommon","poly"],earth:["glcommon"],control:["scommon"],scommon:[],localSearch:["scommon"],otherSearch:["scommon"],route:["scommon"],buslineSearch:["route"],autocomplete:["scommon"],mvtParse:["marker","poly","style"],panorama:["glcommon"],visual:["mapgl"],visualold:["style","mapgl"]},MD5Mapping:{control:"ki3cxy",marker:"gr3nte",poly:"0gq4ob",layer:"g2sasv",infowindow:"fj4ukm",simpleInfowindow:"puz4v0",hotspot:"4wut2x",menu:"ar0ymx",tools:"hdqtl0",oppc:"5wrpin",oppcgl:"candte",mapgl:"5lsoga",markeranimation:"pjygxw",earth:"2ylfwn",glcommon:"mp5vfj",localSearch:"vnv4lf",scommon:"zzbpg0",otherSearch:"oz30jf",route:"fwik03",buslineSearch:"mbtfho",autocomplete:"wdi0up",style:"xjftwm",mvtParse:"ie5afn",place:"hglokd",panorama:"deunb5",visual:"ymuo4n",visualold:"zcxtiz"},Config:{baseUrl:(function(){var e=ep();var i=e==="gl"?"/getmodules?v=1.0&type=webgl":"/getmodules?v="+e;return window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]?window._BMapSecurityConfig["serviceHost"]+i:K.apiHost+i})(),jsModPath:(bb.inMapHost?"":K.mapHost)+"/res/newui/",timeout:5000},delayFlag:false,Module:{modules:{},modulesNeedToLoad:[]},_getMd5ModsStr:function(oL){var oK=[];for(var oN=0,C=oL.length;oN<C;oN++){var oM=oL[oN];var e=this.MD5Mapping[oM];var T="$"+oM+"$";if(e!==T){oK.push(oM+"_"+e)}}return oK.join(",")},load:function(i,oL,T){var e=this.getModuleInfo(i);if(e.status===this.Request.COMPLETED){if(T===true){oL()}}else{if(e.status===this.Request.INITIAL){this.combine(i);this.addToLoadQueue(i);var C=this;if(C.delayFlag===false){C.delayFlag=true;setTimeout(function(){var oM=C.Config.baseUrl+"&mod="+C._getMd5ModsStr(C.Module.modulesNeedToLoad);jW.load(oM);C.Module.modulesNeedToLoad.length=0;C.delayFlag=false},1)}e.status=this.Request.WAITING;function oK(oO){var oN=C.getModuleInfo(i);if(oN.status!==C.Request.COMPLETED){if(window.map&&window.map.fire){var oM=new ix("onmod_timeout");oM.timeout=oO/1000;oM.moduleName=i;window.map.fire(oM)}}}setTimeout(oK,this.Config.timeout,this.Config.timeout);setTimeout(oK,this.Config.timeout*2,this.Config.timeout*2)}if(oL){e.callbacks.push(oL)}}},combine:function(e){if(e&&this.Dependency[e]){var T=this.Dependency[e];for(var C=0;C<T.length;C++){this.combine(T[C]);if(!this.Module.modules[T[C]]){this.addToLoadQueue(T[C])}}}},addToLoadQueue:function(e){var i=this.getModuleInfo(e);if(i.status===this.Request.INITIAL){i.status=this.Request.WAITING;this.Module.modulesNeedToLoad.push(e)}},_pendingModuleCode:null,_evalModuleCode:function(){return eval(this._pendingModuleCode)},run:function(C,T){var oN=this.getModuleInfo(C);var oQ=this.Dependency[C];if(oQ){for(var oL=0;oL<oQ.length;oL++){var oM=this.getModuleInfo(oQ[oL]);if(oM.status!==this.Request.COMPLETED){oM.modsNeedToRun.push({name:C,code:T});return}}}try{this._pendingModuleCode=T;this._evalModuleCode()}catch(oO){return}finally{this._pendingModuleCode=null}if(!K.apiVersionIsGL()){hi.mirrorWindowGlobalsToExports(cv)}oN.status=this.Request.COMPLETED;for(var oL=0,oK=oN.callbacks.length;oL<oK;oL++){oN.callbacks[oL]()}oN.callbacks.length=0;for(oL=0;oL<oN.modsNeedToRun.length;oL++){var oP=oN.modsNeedToRun[oL];this.run(oP.name,oP.code)}oN.modsNeedToRun.length=0},getModuleInfo:function(i){var e;if(!this.Module.modules[i]){this.Module.modules[i]={status:this.Request.INITIAL,callbacks:[],modsNeedToRun:[]}}e=this.Module.modules[i];return e}});window._jsload=function(oK,oL){var i=ki.getModuleInfo(oK);i.status=ki.Request.LOADED;if(oL!==""){ki.run(oK,oL)}else{if(window.map&&window.map.fire){var e=new ix("ongetmodules_fail");e.moduleName=oK;window.map.fire(e)}var C=document.createElement("script");var T=ki.MD5Mapping[oK];C.src=ki.Config.jsModPath+oK+"_"+T+".js";document.getElementsByTagName("head")[0].appendChild(C)}};function eJ(){this._timeData={}}var cs;if(typeof window!=="undefined"){cs=window}else{cs=self}eJ.prototype.mark=function(e){this._timeData[e]=this._getTime()};eJ.prototype.getMark=function(e){return this._timeData[e]};eJ.prototype.getTime=function(i,e){return parseFloat((this._timeData[e]-this._timeData[i]).toFixed(2))};eJ.prototype.print=function(){};eJ.prototype.clear=function(){this._timeData={}};if(cs.performance&&cs.performance.now){eJ.prototype._getTime=function(){return performance.now()}}else{eJ.prototype._getTime=function(){return Date.now()}}!function(i,C){C(i.d3=i.d3||{})}(window,function(pn){function pF(pL,pM,C,T){function e(i){return pL(i=new Date(+i)),i}return e.floor=e,e.ceil=function(i){return pL(i=new Date(i-1)),pM(i,1),pL(i),i},e.round=function(i){var pN=e(i),pO=e.ceil(i);return pO-i>i-pN?pN:pO},e.offset=function(i,pN){return pM(i=new Date(+i),null==pN?1:Math.floor(pN)),i},e.range=function(pO,i,pN){var pP=[];if(pO=e.ceil(pO),pN=null==pN?1:Math.floor(pN),!(i>pO&&pN>0)){return pP}do{pP.push(new Date(+pO))}while(pM(pO,pN),pL(pO),i>pO);return pP},e.filter=function(i){return pF(function(pN){for(;pL(pN),!i(pN);){pN.setTime(pN-1)}},function(pN,pO){for(;--pO>=0;){for(;pM(pN,1),!i(pN);){}}})},C&&(e.count=function(i,pN){return pp.setTime(+i),pt.setTime(+pN),pL(pp),pL(pt),Math.floor(C(pp,pt))},e.every=function(i){return i=Math.floor(i),isFinite(i)&&i>0?i>1?e.filter(T?function(pN){return T(pN)%i===0}:function(pN){return e.count(0,pN)%i===0}):e:null}),e}function pu(e){return pF(function(i){i.setDate(i.getDate()-(i.getDay()+7-e)%7),i.setHours(0,0,0,0)},function(i,C){i.setDate(i.getDate()+7*C)},function(i,C){return(C-i-(C.getTimezoneOffset()-i.getTimezoneOffset())*po)/pC})}function pm(e){return pF(function(i){i.setUTCDate(i.getUTCDate()-(i.getUTCDay()+7-e)%7),i.setUTCHours(0,0,0,0)},function(i,C){i.setUTCDate(i.getUTCDate()+7*C)},function(i,C){return(C-i)/pC})}var pp=new Date,pt=new Date,pA=pF(function(){},function(i,C){i.setTime(+i+C)},function(i,C){return C-i});pA.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?pF(function(i){i.setTime(Math.floor(i/e)*e)},function(i,C){i.setTime(+i+C*e)},function(i,C){return(C-i)/e}):pA:null};var pJ=pA.range,pH=1000,po=60000,pE=3600000,pw=86400000,pC=604800000,oQ=pF(function(e){e.setTime(Math.floor(e/pH)*pH)},function(i,C){i.setTime(+i+C*pH)},function(i,C){return(C-i)/pH},function(e){return e.getUTCSeconds()}),pG=oQ.range,pv=pF(function(e){e.setTime(Math.floor(e/po)*po)},function(i,C){i.setTime(+i+C*po)},function(i,C){return(C-i)/po},function(e){return e.getMinutes()}),oY=pv.range,pi=pF(function(i){var C=i.getTimezoneOffset()*po%pE;0>C&&(C+=pE),i.setTime(Math.floor((+i-C)/pE)*pE+C)},function(i,C){i.setTime(+i+C*pE)},function(i,C){return(C-i)/pE},function(e){return e.getHours()}),pB=pi.range,o8=pF(function(e){e.setHours(0,0,0,0)},function(i,C){i.setDate(i.getDate()+C)},function(i,C){return(C-i-(C.getTimezoneOffset()-i.getTimezoneOffset())*po)/pw},function(e){return e.getDate()-1}),oP=o8.range,o5=pu(0),o7=pu(1),oL=pu(2),o3=pu(3),oS=pu(4),pl=pu(5),ps=pu(6),oN=o5.range,pk=o7.range,oW=oL.range,ph=o3.range,px=oS.range,pj=pl.range,pI=ps.range,pz=pF(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(i,C){i.setMonth(i.getMonth()+C)},function(i,C){return C.getMonth()-i.getMonth()+12*(C.getFullYear()-i.getFullYear())},function(e){return e.getMonth()}),pK=pz.range,o2=pF(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(i,C){i.setFullYear(i.getFullYear()+C)},function(i,C){return C.getFullYear()-i.getFullYear()},function(e){return e.getFullYear()});o2.every=function(e){return isFinite(e=Math.floor(e))&&e>0?pF(function(i){i.setFullYear(Math.floor(i.getFullYear()/e)*e),i.setMonth(0,1),i.setHours(0,0,0,0)},function(i,C){i.setFullYear(i.getFullYear()+C*e)}):null};var oV=o2.range,pq=pF(function(e){e.setUTCSeconds(0,0)},function(i,C){i.setTime(+i+C*po)},function(i,C){return(C-i)/po},function(e){return e.getUTCMinutes()}),pa=pq.range,o9=pF(function(e){e.setUTCMinutes(0,0,0)},function(i,C){i.setTime(+i+C*pE)},function(i,C){return(C-i)/pE},function(e){return e.getUTCHours()}),o6=o9.range,o4=pF(function(e){e.setUTCHours(0,0,0,0)},function(i,C){i.setUTCDate(i.getUTCDate()+C)},function(i,C){return(C-i)/pw},function(e){return e.getUTCDate()-1}),o1=o4.range,o0=pm(0),oZ=pm(1),oX=pm(2),oU=pm(3),oT=pm(4),oO=pm(5),oM=pm(6),oK=o0.range,pg=oZ.range,pD=oX.range,pr=oU.range,py=oT.range,pf=oO.range,pe=oM.range,pd=pF(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(i,C){i.setUTCMonth(i.getUTCMonth()+C)},function(i,C){return C.getUTCMonth()-i.getUTCMonth()+12*(C.getUTCFullYear()-i.getUTCFullYear())},function(e){return e.getUTCMonth()}),pc=pd.range,oR=pF(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(i,C){i.setUTCFullYear(i.getUTCFullYear()+C)},function(i,C){return C.getUTCFullYear()-i.getUTCFullYear()},function(e){return e.getUTCFullYear()});oR.every=function(e){return isFinite(e=Math.floor(e))&&e>0?pF(function(i){i.setUTCFullYear(Math.floor(i.getUTCFullYear()/e)*e),i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0)},function(i,C){i.setUTCFullYear(i.getUTCFullYear()+C*e)}):null};var pb=oR.range;pn.timeInterval=pF,pn.timeMillisecond=pA,pn.timeMilliseconds=pJ,pn.utcMillisecond=pA,pn.utcMilliseconds=pJ,pn.timeSecond=oQ,pn.timeSeconds=pG,pn.utcSecond=oQ,pn.utcSeconds=pG,pn.timeMinute=pv,pn.timeMinutes=oY,pn.timeHour=pi,pn.timeHours=pB,pn.timeDay=o8,pn.timeDays=oP,pn.timeWeek=o5,pn.timeWeeks=oN,pn.timeSunday=o5,pn.timeSundays=oN,pn.timeMonday=o7,pn.timeMondays=pk,pn.timeTuesday=oL,pn.timeTuesdays=oW,pn.timeWednesday=o3,pn.timeWednesdays=ph,pn.timeThursday=oS,pn.timeThursdays=px,pn.timeFriday=pl,pn.timeFridays=pj,pn.timeSaturday=ps,pn.timeSaturdays=pI,pn.timeMonth=pz,pn.timeMonths=pK,pn.timeYear=o2,pn.timeYears=oV,pn.utcMinute=pq,pn.utcMinutes=pa,pn.utcHour=o9,pn.utcHours=o6,pn.utcDay=o4,pn.utcDays=o1,pn.utcWeek=o0,pn.utcWeeks=oK,pn.utcSunday=o0,pn.utcSundays=oK,pn.utcMonday=oZ,pn.utcMondays=pg,pn.utcTuesday=oX,pn.utcTuesdays=pD,pn.utcWednesday=oU,pn.utcWednesdays=pr,pn.utcThursday=oT,pn.utcThursdays=py,pn.utcFriday=oO,pn.utcFridays=pf,pn.utcSaturday=oM,pn.utcSaturdays=pe,pn.utcMonth=pd,pn.utcMonths=pc,pn.utcYear=oR,pn.utcYears=pb,Object.defineProperty(pn,"__esModule",{value:!0})});function hH(e){this._elemType=e;this._objCollection={}}hH.prototype.get=function(){var i=null;for(var e in this._objCollection){if(this._objCollection[e]&&this._objCollection[e]._free===true){this._objCollection[e]._free=false;return this._objCollection[e]}}i=da(this._elemType);e=cv.getGUID("obj_pool_");this._objCollection[e]=i;return i};hH.prototype.free=function(e){if(!e){return}e._free=true;if(e.tagName.toLowerCase()==="img"){e.src="";e.crossOrigin=null;e.onload=e.onerror=null}};hH.prototype.clear=function(){for(var e in this._objCollection){if(this._objCollection[e]&&this._objCollection[e].tagName.toLowerCase==="img"){this._objCollection[e].onload=this._objCollection[e].onerror=null}}this._objCollection={}};var lI={get:function(i,oK,e,C){var T=new XMLHttpRequest();T.open("GET",i,true);T.timeout=10000;T.ontimeout=function(){C&&C()};T.onreadystatechange=function(oL){if(this.readyState===4){if(this.status===200){oK&&oK(T.responseText)}else{e&&e()}}};T.send()},post:function(i,oL,oK,e,C){var T=new XMLHttpRequest();T.open("POST",i,true);T.setRequestHeader("Content-type","application/x-www-form-urlencoded");T.timeout=10000;T.ontimeout=function(){C&&C()};T.onreadystatechange=function(oM){if(this.readyState===4){if(this.status===200){oK&&oK(T.responseText,oL)}else{e&&e()}}};T.send(oL);return T}};var jW=(function(e){function i(oL,C,oK){if(oL.indexOf("v=")===-1){oL+="&v="+ep()}var T=da("script",{src:oL,type:"text/javascript",charset:"utf-8"});if(T.addEventListener){T.addEventListener("load",function(oN){var oM=oN.target;oM.parentNode.removeChild(oM);C&&C()},false);T.addEventListener("error",function(oN){if(oN){var oM=oN.target;oM&&oM.parentNode&&oM.parentNode.removeChild(oM)}oK&&oK(null)},false)}else{if(T.attachEvent){T.attachEvent("onreadystatechange",function(oN){var oM=window.event.srcElement;if(oM&&(oM.readyState==="loaded"||oM.readyState==="complete")){oM.parentNode.removeChild(oM)}C&&C()})}}e.getElementsByTagName("head")[0].appendChild(T)}return{load:function(oM,C,T){if(typeof oM==="string"){i(oM,C,T)}else{if(oM.length>0){var oL=oM.length;for(var oK=0;oK<oL;oK++){i(oM[oK],function(){oL--;if(oL===0&&C){C()}})}}}}}})(window.document);function lA(){}lA.instances={};lA.getInstance=function(i,C){if(lA.instances[i]){return lA.instances[i]}var e=new oG(i,C);lA.instances[i]=e;return e};function oG(e,i){this._name=e;this._baseZoom=18;this._opts={tileSize:256};hv.extend(this._opts,i||{})}oG.mapZoomBaseIndex=[8,8,8,8,7,7,6,6,5,5,4,3,3,3,2,2,1,1,0,0,0,0,0,0,0,0];oG.baseScaleZoom=[19,17,15,12,10,9,7,5,3];oG.baseScaleZoomMercatorSize=[512,2048,4096,32768,65536,262144,1048576,4194304,8388608];oG.mapZoomBaseZoomMapping=[3,3,3,3,5,5,7,7,9,9,10,12,12,12,15,15,17,17,19,19,19,19,19,19,19,19];oG.mapZoomStartZoomMapping=[3,3,3,3,4,4,6,6,8,8,10,11,11,11,14,14,16,16,18,18,18,18,18,18,18,18];oG.baseScaleTileSize=[1024,1024,512,512,256,512,512,512,256];oG.mapZoomTileSize=[256,256,256,256,256,512,256,512,256,512,256,256,512,1024,256,512,512,1024,512,1024,2048,4096,4096*2,4096*2*2,4096*2*2*2,4096*2*2*2*2];oG.baseZoomInfo={"3":[3],"5":[4,5],"7":[6,7],"9":[8,9],"10":[10],"12":[11,12,13],"15":[14,15],"17":[16,17],"19":[18,19,20,21,22,23,24,25]};oG.prototype={getName:function(){return this._name},getTileSize:function(e){e=Math.floor(e);if(e<3){e=3}if(this._name==="na"){return oG.mapZoomTileSize[e]}return this._opts.tileSize},getBaseTileSize:function(i){i=Math.floor(i);if(this._name==="na"){var e=oG.mapZoomBaseZoomMapping[i];return oG.mapZoomTileSize[e]}return this._opts.tileSize},getDataZoom:function(e){e=Math.floor(e);if(this._name==="na"){return oG.mapZoomBaseZoomMapping[e]}return e},getZoomUnits:function(e){return Math.pow(2,(this._baseZoom-e))},getMercatorSize:function(C,i){if(this._name==="na"){C=Math.floor(C);var e=oG.mapZoomBaseIndex[C];return oG.baseScaleZoomMercatorSize[e]}return this._opts.tileSize*this.getZoomUnits(i)},getBaseZoom:function(){return this._baseZoom},getParentTile:function(T,oP,oO,C,i){if(this._name==="na"){var oK=oG.baseZoomInfo[oO];C--;if(oK.indexOf(C)>-1){return{col:T,row:oP,zoom:oO,useZoom:C}}else{var oM=oG.mapZoomBaseIndex[oO];var oL=oG.baseScaleZoom[oM+1];if(!oL){return null}var oN=this.getFactorByZooms(oL,oO);var e=oG.baseZoomInfo[oL];return{col:Math.floor(T/oN),row:Math.floor(oP/oN),zoom:oL,useZoom:e[e.length-1]}}return null}if(oO-1<i){return null}return{col:Math.floor(T/2),row:Math.floor(oP/2),zoom:oO-1,useZoom:oO-1}},getChildTiles:function(oK,oM,e,C,oT,oZ){if(this._name==="na"){var T=oG.baseZoomInfo[e];C+=oZ;if(T.indexOf(C)>-1){return[{col:oK,row:oM,zoom:e,useZoom:C}]}else{var oX=0;var oU=e;while(oX<oZ){var oY=oG.mapZoomBaseIndex[oU];var oO=oG.baseScaleZoom[oY-1];if(!oO){return null}var oP=oG.baseZoomInfo[oO];if(oP[oZ-1]){var oQ=[];var oS=this.getFactorByZooms(e,oO);var i=oK*oS;var oR=oM*oS;for(var oW=0;oW<oS;oW++){var oL=i+oW;for(var oV=0;oV<oS;oV++){var oN=oR+oV;oQ.push({col:oL,row:oN,zoom:oO,useZoom:oP[oZ-1]})}}return oQ}oX+=oP.length;if(oZ===oP.length){oU=oO}}}return null}var oQ=[];if(e+oZ>oT){return null}var oS=Math.pow(2,oZ);var i=oK*oS;var oR=oM*oS;var oO=e+oZ;var oQ=[];for(var oW=0;oW<2;oW++){var oL=i+oW;for(var oV=0;oV<2;oV++){var oN=oR+oV;oQ.push({col:oL,row:oN,zoom:oO,useZoom:oO})}}return oQ},getFactorByZooms:function(i,T){var C=oG.mapZoomBaseIndex[i];var oK=oG.mapZoomBaseIndex[T];var e=oG.baseScaleZoomMercatorSize[C];var oL=oG.baseScaleZoomMercatorSize[oK];return e/oL}};var eV={};var ao=["swiftshader","microsoft basic render driver"];var kJ=["intel","nvidia","amd","apple","geforce"];function jI(e){e=e.toLowerCase();if(ao.indexOf(e)>=0){return true}if(e.indexOf("mobile")>=0){return true}return false}function ed(C){C=C.toLowerCase();for(var e=0;e<kJ.length;e++){if(C.indexOf(kJ[e])>=0){return true}}return false}function oC(e){if(!e){return false}if(jI(e)){return false}if(ed(e)){return true}return false}eV.ifEnableEarth=function(i){var e=eV.ifEnableEarth;if(!i&&typeof e._enable==="boolean"){return e._enable}if(eV.ifSupportWebGL()){e._enable=true;return true}e._enable=false;return false};eV.ifEnableWebGLMap=function(i){var e=eV.ifEnableWebGLMap;if(!i&&typeof e._enable==="boolean"){return e._enable}if(eV.ifSupportWebGL()){if(bb.inMapHost){e._enable=true;return true}else{if(window.Blob||window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder){e._enable=true;return true}else{e._enable=false;return false}}}e._enable=false;return false};eV.params={};eV.ifSupportWebGL=function(){var i=eV.ifSupportWebGL;if(typeof i._supportWebGL==="boolean"){return i._supportWebGL}if(!window.WebGLRenderingContext){i._supportWebGL=false;return false}var C=document.createElement("canvas");C.width=300;C.height=150;var oK=null;var oQ={alpha:true,antialias:false,failIfMajorPerformanceCaveat:false,preserveDrawingBuffer:false,stencil:false};try{oK=C.getContext("webgl",oQ)||C.getContext("experimental-webgl",oQ)}catch(oM){i._supportWebGL=false}if(oK===null){i._supportWebGL=false}else{i._supportWebGL=true;var oO=oK.getExtension("WEBGL_debug_renderer_info");var oN="";if(oO){oN=oK.getParameter(oO.UNMASKED_RENDERER_WEBGL);if(oC(oN)===true){i._supportWebGL=true}var oP=oK.getParameter(oO.UNMASKED_VENDOR_WEBGL);i._renderer=oN;i._vendor=oP}if(!oO&&hv.Browser.firefox){i._supportWebGL=true}if(!oO&&hv.Platform.macintosh){i._supportWebGL=true}if(oK.drawingBufferWidth!==C.width||oK.drawingBufferHeight!==C.height){i._supportWebGL=false}if(oK.getParameter(oK.MAX_VERTEX_TEXTURE_IMAGE_UNITS)<4){i._supportWebGL=false}var T=oK.getParameter(oK.MAX_TEXTURE_SIZE);eV.params.maxTextureSize=T;if(T<4096){i._supportWebGL=false}var oL=oK.getParameter(oK.MAX_TEXTURE_IMAGE_UNITS);if(oL<8){i._supportWebGL=false}if(oK.getShaderPrecisionFormat&&!oK.getShaderPrecisionFormat(oK.FRAGMENT_SHADER,oK.HIGH_FLOAT)){kU.sendMessage("Monitor","ShaderPrecision","sys_"+oN);return i._supportWebGL}if(!oK.getShaderPrecisionFormat||!oK.getShaderPrecisionFormat(oK.FRAGMENT_SHADER,oK.HIGH_FLOAT)){kU.sendMessage("Monitor","ShaderPrecision","sys_"+oN);return i._supportWebGL}if(!oK.getShaderPrecisionFormat||oK.getShaderPrecisionFormat(oK.FRAGMENT_SHADER,oK.HIGH_FLOAT).precision<23){i._supportWebGL=false}}return i._supportWebGL};eV.ifSupportCanvas2d=function(){var oK=eV.ifSupportCanvas2d;if(typeof oK.supportCanvas2d==="boolean"){return oK.supportCanvas2d}var C=document.createElement("canvas");var i=null;try{i=C.getContext("2d")}catch(T){oK.supportCanvas2d=false}if(i===null){oK.supportCanvas2d=false}else{oK.supportCanvas2d=true}return oK.supportCanvas2d};eV.ifCanvas2dInBlackList=function(){return true};eV.ifEnableCanvas2dMap=function(){return false;var i=navigator.userAgent;var e=0;var T=0;var oK=0;if(/macintosh/ig.test(i)){var C=0;if(/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(i)&&!/chrome/i.test(i)){C=parseInt((RegExp["\x241"]||RegExp["\x242"]),10)}if(C>0){return false}return true}if(/windows nt (\d+\.\d)/ig.test(i)){T=parseFloat(RegExp.$1);if(T>=6.1){if(/chrome\/(\d+\.\d)/i.test(i)){e=parseFloat(RegExp.$1);if(e>=31){return true}}if(/MSIE (\d+(\.\d+)?)/.test(i)){oK=parseFloat(RegExp.$1);if(oK>=10){return true}}if(/Firefox/.test(i)){return true}if(/rv:11.0/ig.test(i)){return true}if(/edge/ig.test(i)){return true}}}return false};eV.ifSupportCSS3=function(oN,i){var oM=document.createElement("div");var oL="Webkit Moz O ms".split(" ");var e=oL.length;var C="";var T=oM.style;if(oN in T){C=oN}oN=oN.replace(/^[a-z]/,function(oO){return oO.toUpperCase()});while(e--){var oK=oL[e]+oN;if(oK in T){C=oK;break}}if(i){return C}else{return C.length>0?true:false}};eV.isModernBrowser=eV.ifSupportCanvas2d()&&eV.ifSupportCSS3("transform");function a1(i,e){this._size=i;this._curSize=0;this._cache={};this._least=null;this._most=null;this._options={clearCallback:null,removeOldCallback:null};e=e||{};for(var C in e){this._options[C]=e[C]}this._getDataTimes=0;this._hitTimes=0}a1.prototype.setData=function(T,oL){var i=this._cache;var C=this._size;if(C===0){return}var e=this._curSize;if(e===C){this._removeOld()}var oK;if(!i[T]){oK={key:T,data:oL,older:null,newwer:null};i[T]=oK;if(this._least===null){this._least=oK}if(this._most===null){this._most=oK}this._curSize++}else{oK=i[T];oK.data=oL;if(this._most===oK){return}oK.older&&(oK.older.newer=oK.newer);oK.newer&&(oK.newer.older=oK.older);if(this._least===oK){this._least=oK.newer}}if(this._most&&this._most!==oK){this._most.newer=oK;oK.older=this._most;this._most=oK;oK.newer=null}};a1.prototype.getData=function(e){var i=this._cache[e];this._getDataTimes++;if(i){this._hitTimes++;var C=i.data;if(this._most===i){return C}i.older&&(i.older.newer=i.newer);i.newer&&(i.newer.older=i.older);if(this._least===i){this._least=i.newer}this._most.newer=i;i.older=this._most;i.newer=null;this._most=i;return C}return null};a1.prototype.getAllData=function(){return this._cache};a1.prototype.getHitRate=function(){return this._hitTimes/this._getDataTimes};a1.prototype.removeData=function(i){var e=this._cache;var C=e[i];if(!C){return}if(this._options.clearCallback){this._options.clearCallback(C.data,C.key)}C.older&&(C.older.newer=C.newer);C.newer&&(C.newer.older=C.older);if(this._least===C){this._least=C.newer}if(this._most===C){this._most=C.older}delete e[i];this._curSize--};a1.prototype._removeOld=function(){var e=this._cache;var T=Math.round(this._size*0.6);var C=0;while(this._least&&C<T){var i=this._least;this._least=i.newer;i.newer&&(i.newer.older=null);if(this._options.clearCallback){this._options.clearCallback(i.data,i.key)}delete e[i.key];C++}this._curSize-=C;if(this._options.removeOldCallback){this._options.removeOldCallback()}};a1.prototype.clear=function(){var e=this._cache;var i=this._least;if(this._options.clearCallback){while(i){this._options.clearCallback(i.data,i.key);i=i.newer}}this._least=this._most=null;this._cache={};this._curSize=0};a1.prototype.forEach=function(e){var i=this._least;while(i){e(i.data);i=i.newer}};a1.prototype.clearExcept=function(i){var e=this._cache;var C=this._least;while(C){if(!i[C.key]){if(this._options.clearCallback){this._options.clearCallback(C.data,C.key)}C.older&&(C.older.newer=C.newer);C.newer&&(C.newer.older=C.older);if(this._least===C){this._least=C.newer}if(this._most===C){this._most=C.older}delete e[C.key];this._curSize--}C=C.newer}};var fU=(function(){var pu=function(){return(pu=Object.assign||function(T){for(var i,C=1,pA=arguments.length;C<pA;C++){for(var pz in i=arguments[C]){Object.prototype.hasOwnProperty.call(i,pz)&&(T[pz]=i[pz])}}return T}).apply(this,arguments)},pf=Math.sin,ph=Math.cos,pl=Math.sqrt,pk=Math.abs,py=Math.PI,pq=6378245,pe=0.006693421622965823;function pt(C,i){return C>=72.004&&C<=137.8347&&i>=0.8293&&i<=55.8271}function pw(pA,pz){var pD,i,pF,C=(pF=300+(pD=pA-105)+2*(i=pz-35)+0.1*pD*pD+0.1*pD*i+0.1*pl(pk(pD)),pF+=2*(20*pf(6*pD*py)+20*pf(2*pD*py))/3,(pF+=2*(20*pf(pD*py)+40*pf(pD/3*py))/3)+2*(150*pf(pD/12*py)+300*pf(pD/30*py))/3),T=function(pI,pH){var pG=2*pI-100+3*pH+0.2*pH*pH+0.1*pI*pH+0.2*pl(pk(pI));return pG+=2*(20*pf(6*pI*py)+20*pf(2*pI*py))/3,pG+=2*(20*pf(pH*py)+40*pf(pH/3*py))/3,pG+2*(160*pf(pH/12*py)+320*pf(pH*py/30))/3}(pA-105,pz-35),pC=pz/180*py,pB=pf(pC),pE=pl(pB=1-pe*pB*pB);return[C=180*C/(pq/pE*ph(pC)*py),T=180*T/(pq*(1-pe)/(pB*pE)*py)]}function pn(T){var i=T[0],C=T[1];if(!pt(i,C)){return[i,C]}var pz=pw(i,C);return[i+pz[0],C+pz[1]]}function pg(pA){var pE=pA[0],C=pA[1];if(!pt(pE,C)){return[pE,C]}for(var T=[pE,C],pC=T[0],pz=T[1],pD=pn([pC,pz]),pB=pD[0]-pE,pF=pD[1]-C;pk(pB)>0.000001||pk(pF)>0.000001;){pB=(pD=pn([pC-=pB,pz-=pF]))[0]-pE,pF=pD[1]-C}return[pC,pz]}var pr=Math.sin,ps=Math.cos,oT=Math.atan2,pv=Math.sqrt,pd=3000*Math.PI/180;function pj(T){var i=T[0]-0.0065,C=T[1]-0.006,pA=pv(i*i+C*C)-0.00002*pr(C*pd),pz=oT(C,i)-0.000003*ps(i*pd);return[pA*ps(pz),pA*pr(pz)]}function oX(T){var i=T[0],C=T[1],pA=pv(i*i+C*C)+0.00002*pr(C*pd),pz=oT(C,i)+0.000003*ps(i*pd);return[pA*ps(pz)+0.0065,pA*pr(pz)+0.006]}var pa=180/Math.PI,oO=Math.PI/180,oQ=6378137,px=20037508.342789244;function o2(i){return[i[0]*pa/oQ,(0.5*Math.PI-2*Math.atan(Math.exp(-i[1]/oQ)))*pa]}function pm(T){var i=Math.abs(T[0])<=180?T[0]:T[0]-360*(T[0]<0?-1:1),C=[oQ*i*oO,oQ*Math.log(Math.tan(0.25*Math.PI+0.5*T[1]*oO))];return C[0]>px&&(C[0]=px),C[0]<-px&&(C[0]=-px),C[1]>px&&(C[1]=px),C[1]<-px&&(C[1]=-px),C}var o1,o0,oZ,pc,oW,oL,o9,o6,o5,o7,oK,o4,pb=Math.abs,po=[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],oV=[75,60,45,30,15,0],oN=[[1.410526172116255e-8,0.00000898305509648872,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-0.03801003308653,17337981.2],[-7.435856389565537e-9,0.000008983055097726239,-0.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,10260144.86],[-3.030883460898826e-8,0.00000898305509983578,0.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,0.32710905363475,6856817.37],[-1.981981304930552e-8,0.000008983055099779535,0.03278182852591,40.31678527705744,0.65659298677277,-4.44255534477492,0.85341911805263,0.12923347998204,-0.04625736007561,4482777.06],[3.09191371068437e-9,0.000008983055096812155,0.00006995724062,23.10934304144901,-0.00023663490511,-0.6321817810242,-0.00663494467273,0.03430082397953,-0.00466043876332,2555164.4],[2.890871144776878e-9,0.000008983055095805407,-3.068298e-8,7.47137025468032,-0.00000353937994,-0.02145144861037,-0.00001234426596,0.00010322952773,-0.00000323890364,826088.5]],pp=[[-0.0015702102444,111320.7020616939,1704480524535203,-10338987376042340,26112667856603880,-35149669176653700,26595700718403920,-10725012454188240,1800819912950474,82.5],[0.0008277824516172526,111320.7020463578,647795574.6671607,-4082003173.641316,10774905663.51142,-15171875531.51559,12053065338.62167,-5124939663.577472,913311935.9512032,67.5],[0.00337398766765,111320.7020202162,4481351.045890365,-23393751.19931662,79682215.47186455,-115964993.2797253,97236711.15602145,-43661946.33752821,8477230.501135234,52.5],[0.00220636496208,111320.7020209128,51751.86112841131,3796837.749470245,992013.7397791013,-1221952.21711287,1340652.697009075,-620943.6990984312,144416.9293806241,37.5],[-0.0003441963504368392,111320.7020576856,278.2353980772752,2485758.690035394,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-0.0003218135878613132,111320.7020701615,0.00369383431289,823725.6402795718,0.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,0.37238884252424,7.45]];function oU(pz,C,T){var pB=pb(C)/T[9],pA=T[0]+T[1]*pb(pz),i=T[2]+T[3]*pB+T[4]*Math.pow(pB,2)+T[5]*Math.pow(pB,3)+T[6]*Math.pow(pB,4)+T[7]*Math.pow(pB,5)+T[8]*Math.pow(pB,6);return[pA*=pz<0?-1:1,i*=C<0?-1:1]}function pi(T){for(var i=T[0],C=T[1],pA=[],pz=0;pz<oV.length;pz++){if(pb(C)>oV[pz]){pA=pp[pz];break}}return oU(i,C,pA)}function oS(T){for(var i=T[0],C=T[1],pA=[],pz=0;pz<po.length;pz++){if(C>=po[pz]){pA=oN[pz];break}}return oU(i,C,pA)}function oR(C,i){if(!C){throw new Error(i)}}function o3(i){return !!i&&"[object Array]"===Object.prototype.toString.call(i)}function oY(i){return !isNaN(Number(i))&&null!==i&&!o3(i)}function oP(){for(var T=[],i=0;i<arguments.length;i++){T[i]=arguments[i]}var C=T.length-1;return function(){for(var pz=[],pB=0;pB<arguments.length;pB++){pz[pB]=arguments[pB]}for(var pA=C,e=T[C].apply(null,pz);pA--;){e=T[pA].call(null,e)}return e}}function oM(pP,pE,pG){if(void 0===pG&&(pG=!1),null!==pP){for(var pJ,pI,pS,pL,pD,pO,pR,pK,pF=0,pM=0,pN=pP.type,pz="FeatureCollection"===pN,pQ="Feature"===pN,pC=pz?pP.features.length:1,pH=0;pH<pC;pH++){pD=(pK=!!(pR=pz?pP.features[pH].geometry:pQ?pP.geometry:pP)&&"GeometryCollection"===pR.type)?pR.geometries.length:1;for(var pB=0;pB<pD;pB++){var pA=0,C=0;if(null!==(pL=pK?pR.geometries[pB]:pR)){var T=pL.type;switch(pF=!pG||"Polygon"!==T&&"MultiPolygon"!==T?0:1,T){case null:break;case"Point":if(!1===pE(pO=pL.coordinates,pM,pH,pA,C)){return !1}pM++,pA++;break;case"LineString":case"MultiPoint":for(pO=pL.coordinates,pJ=0;pJ<pO.length;pJ++){if(!1===pE(pO[pJ],pM,pH,pA,C)){return !1}pM++,"MultiPoint"===T&&pA++}"LineString"===T&&pA++;break;case"Polygon":case"MultiLineString":for(pO=pL.coordinates,pJ=0;pJ<pO.length;pJ++){for(pI=0;pI<pO[pJ].length-pF;pI++){if(!1===pE(pO[pJ][pI],pM,pH,pA,C)){return !1}pM++}"MultiLineString"===T&&pA++,"Polygon"===T&&C++}"Polygon"===T&&pA++;break;case"MultiPolygon":for(pO=pL.coordinates,pJ=0;pJ<pO.length;pJ++){for(C=0,pI=0;pI<pO[pJ].length;pI++){for(pS=0;pS<pO[pJ][pI].length-pF;pS++){if(!1===pE(pO[pJ][pI][pS],pM,pH,pA,C)){return !1}pM++}C++}pA++}break;case"GeometryCollection":for(pJ=0;pJ<pL.geometries.length;pJ++){if(!1===oM(pL.geometries[pJ],pE,pG)){return !1}}break;default:throw new Error("Unknown Geometry Type")}}}}}}!function(i){i.WGS84="WGS84",i.WGS1984="WGS84",i.EPSG4326="WGS84",i.GCJ02="GCJ02",i.AMap="GCJ02",i.BD09="BD09",i.BD09LL="BD09",i.Baidu="BD09",i.BMap="BD09",i.BD09MC="BD09MC",i.BD09Meter="BD09MC",i.EPSG3857="EPSG3857",i.EPSG900913="EPSG3857",i.EPSG102100="EPSG3857",i.WebMercator="EPSG3857",i.WM="EPSG3857"}(oL||(oL={}));var o8={WGS84:{to:(o1={},o1[oL.GCJ02]=pn,o1[oL.BD09]=oP(oX,pn),o1[oL.BD09MC]=oP(pi,oX,pn),o1[oL.EPSG3857]=pm,o1)},GCJ02:{to:(o0={},o0[oL.WGS84]=pg,o0[oL.BD09]=oX,o0[oL.BD09MC]=oP(pi,oX),o0[oL.EPSG3857]=oP(pm,pg),o0)},BD09:{to:(oZ={},oZ[oL.WGS84]=oP(pg,pj),oZ[oL.GCJ02]=pj,oZ[oL.EPSG3857]=oP(pm,pg,pj),oZ[oL.BD09MC]=pi,oZ)},EPSG3857:{to:(pc={},pc[oL.WGS84]=o2,pc[oL.GCJ02]=oP(pn,o2),pc[oL.BD09]=oP(oX,pn,o2),pc[oL.BD09MC]=oP(pi,oX,pn,o2),pc)},BD09MC:{to:(oW={},oW[oL.WGS84]=oP(pg,pj,oS),oW[oL.GCJ02]=oP(pj,oS),oW[oL.EPSG3857]=oP(pm,pg,pj,oS),oW[oL.BD09]=oS,oW)},};return pu(pu({},oL),{CRSTypes:oL,transform:function(pC,pA,pB){if(oR(!!pC,"The args[0] input coordinate is required"),oR(!!pA,"The args[1] original coordinate system is required"),oR(!!pB,"The args[2] target coordinate system is required"),pA===pB){return pC}var pE=o8[pA]||oL[pA];oR(!!pE,"Invalid original coordinate system: "+pA);var pD=pE.to[pB];oR(!!pD,"Invalid target coordinate system: "+pB);var C=typeof pC;if(oR("string"===C||"object"===C,"Invalid input coordinate type: "+C),"string"===C){try{pC=JSON.parse(pC)}catch(pA){throw new Error("Invalid input coordinate: "+pC)}}var pz=!1;o3(pC)&&(oR(pC.length>=2,"Invalid input coordinate: "+pC),oR(oY(pC[0])&&oY(pC[1]),"Invalid input coordinate: "+pC),pC=pC.map(Number),pz=!0);var T=pD;return pz?T(pC):(oM(pC,(function(pF){var i;i=T(pF),pF[0]=i[0],pF[1]=i[1]})),pC)}})})();var k0={ColorRefTable:{aliceblue:["#f0f8ff","rgb(240,248,255)"],antiquewhite:["#faebd7","rgb(250,235,215)"],aqua:["#00ffff","rgb(0,255,255)"],aquamarine:["#7fffd4","rgb(127,255,212)"],azure:["#f0ffff","rgb(240,255,255)"],beige:["#f5f5dc","rgb(245,245,220)"],bisque:["#ffe4c4","rgb(255,228,196)"],black:["#000000","rgb(0,0,0)"],blanchedalmond:["#ffebcd","rgb(255,235,205)"],blue:["#0000ff","rgb(0,0,255)"],blueviolet:["#8a2be2","rgb(138,43,226)"],brown:["#a52a2a","rgb(165,42,42)"],burlywood:["#deb887","rgb(222,184,135)"],cadetblue:["#5f9ea0","rgb(95,158,160)"],chartreuse:["#7fff00","rgb(127,255,0)"],chocolate:["#d2691e","rgb(210,105,30)"],coral:["#ff7f50","rgb(255,127,80)"],cornflowerblue:["#6495ed","rgb(100,149,237)"],cornsilk:["#fff8dc","rgb(255,248,220)"],crimson:["#dc143c","rgb(220,20,60)"],cyan:["#00ffff","rgb(0,255,255)"],darkblue:["#00008b","rgb(0,0,139)"],darkcyan:["#008b8b","rgb(0,139,139)"],darkgoldenrod:["#b8860b","rgb(184,134,11)"],darkgray:["#a9a9a9","rgb(169,169,169)"],darkgreen:["#006400","rgb(0,100,0)"],darkgrey:["#a9a9a9","rgb(169,169,169)"],darkkhaki:["#bdb76b","rgb(189,183,107)"],darkmagenta:["#8b008b","rgb(139,0,139)"],darkolivegreen:["#556b2f","rgb(85,107,47)"],darkorange:["#ff8c00","rgb(255,140,0)"],darkorchid:["#9932cc","rgb(153,50,204)"],darkred:["#8b0000","rgb(139,0,0)"],darksalmon:["#e9967a","rgb(233,150,122)"],darkseagreen:["#8fbc8f","rgb(143,188,143)"],darkslateblue:["#483d8b","rgb(72,61,139)"],darkslategray:["#2f4f4f","rgb(47,79,79)"],darkslategrey:["#2f4f4f","rgb(47,79,79)"],darkturquoise:["#00ced1","rgb(0,206,209)"],darkviolet:["#9400d3","rgb(148,0,211)"],deeppink:["#ff1493","rgb(255,20,147)"],deepskyblue:["#00bfff","rgb(0,191,255)"],dimgray:["#696969","rgb(105,105,105)"],dimgrey:["#696969","rgb(105,105,105)"],dodgerblue:["#1e90ff","rgb(30,144,255)"],firebrick:["#b22222","rgb(178,34,34)"],floralwhite:["#fffaf0","rgb(255,250,240)"],forestgreen:["#228b22","rgb(34,139,34)"],fuchsia:["#ff00ff","rgb(255,0,255)"],gainsboro:["#dcdcdc","rgb(220,220,220)"],ghostwhite:["#f8f8ff","rgb(248,248,255)"],gold:["#ffd700","rgb(255,215,0)"],goldenrod:["#daa520","rgb(218,165,32)"],gray:["#808080","rgb(128,128,128)"],green:["#008000","rgb(0,128,0)"],greenyellow:["#adff2f","rgb(173,255,47)"],grey:["#808080","rgb(128,128,128)"],honeydew:["#f0fff0","rgb(240,255,240)"],hotpink:["#ff69b4","rgb(255,105,180)"],indianred:["#cd5c5c","rgb(205,92,92)"],indigo:["#4b0082","rgb(75,0,130)"],ivory:["#fffff0","rgb(255,255,240)"],khaki:["#f0e68c","rgb(240,230,140)"],lavender:["#e6e6fa","rgb(230,230,250)"],lavenderblush:["#fff0f5","rgb(255,240,245)"],lawngreen:["#7cfc00","rgb(124,252,0)"],lemonchiffon:["#fffacd","rgb(255,250,205)"],lightblue:["#add8e6","rgb(173,216,230)"],lightcoral:["#f08080","rgb(240,128,128)"],lightcyan:["#e0ffff","rgb(224,255,255)"],lightgoldenrodyellow:["#fafad2","rgb(250,250,210)"],lightgray:["#d3d3d3","rgb(211,211,211)"],lightgreen:["#90ee90","rgb(144,238,144)"],lightgrey:["#d3d3d3","rgb(211,211,211)"],lightpink:["#ffb6c1","rgb(255,182,193)"],lightsalmon:["#ffa07a","rgb(255,160,122)"],lightseagreen:["#20b2aa","rgb(32,178,170)"],lightskyblue:["#87cefa","rgb(135,206,250)"],lightslategray:["#778899","rgb(119,136,153)"],lightslategrey:["#778899","rgb(119,136,153)"],lightsteelblue:["#b0c4de","rgb(176,196,222)"],lightyellow:["#ffffe0","rgb(255,255,224)"],lime:["#00ff00","rgb(0,255,0)"],limegreen:["#32cd32","rgb(50,205,50)"],linen:["#faf0e6","rgb(250,240,230)"],magenta:["#ff00ff","rgb(255,0,255)"],maroon:["#800000","rgb(128,0,0)"],mediumaquamarine:["#66cdaa","rgb(102,205,170)"],mediumblue:["#0000cd","rgb(0,0,205)"],mediumorchid:["#ba55d3","rgb(186,85,211)"],mediumpurple:["#9370db","rgb(147,112,219)"],mediumseagreen:["#3cb371","rgb(60,179,113)"],mediumslateblue:["#7b68ee","rgb(123,104,238)"],mediumspringgreen:["#00fa9a","rgb(0,250,154)"],mediumturquoise:["#48d1cc","rgb(72,209,204)"],mediumvioletred:["#c71585","rgb(199,21,133)"],midnightblue:["#191970","rgb(25,25,112)"],mintcream:["#f5fffa","rgb(245,255,250)"],mistyrose:["#ffe4e1","rgb(255,228,225)"],moccasin:["#ffe4b5","rgb(255,228,181)"],navajowhite:["#ffdead","rgb(255,222,173)"],navy:["#000080","rgb(0,0,128)"],oldlace:["#fdf5e6","rgb(253,245,230)"],olive:["#808000","rgb(128,128,0)"],olivedrab:["#6b8e23","rgb(107,142,35)"],orange:["#ffa500","rgb(255,165,0)"],orangered:["#ff4500","rgb(255,69,0)"],orchid:["#da70d6","rgb(218,112,214)"],palegoldenrod:["#eee8aa","rgb(238,232,170)"],palegreen:["#98fb98","rgb(152,251,152)"],paleturquoise:["#afeeee","rgb(175,238,238)"],palevioletred:["#db7093","rgb(219,112,147)"],papayawhip:["#ffefd5","rgb(255,239,213)"],peachpuff:["#ffdab9","rgb(255,218,185)"],peru:["#cd853f","rgb(205,133,63)"],pink:["#ffc0cb","rgb(255,192,203)"],plum:["#dda0dd","rgb(221,160,221)"],powderblue:["#b0e0e6","rgb(176,224,230)"],purple:["#800080","rgb(128,0,128)"],red:["#ff0000","rgb(255,0,0)"],rosybrown:["#bc8f8f","rgb(188,143,143)"],royalblue:["#4169e1","rgb(65,105,225)"],saddlebrown:["#8b4513","rgb(139,69,19)"],salmon:["#fa8072","rgb(250,128,114)"],sandybrown:["#f4a460","rgb(244,164,96)"],seagreen:["#2e8b57","rgb(46,139,87)"],seashell:["#fff5ee","rgb(255,245,238)"],sienna:["#a0522d","rgb(160,82,45)"],silver:["#c0c0c0","rgb(192,192,192)"],skyblue:["#87ceeb","rgb(135,206,235)"],slateblue:["#6a5acd","rgb(106,90,205)"],slategray:["#708090","rgb(112,128,144)"],slategrey:["#708090","rgb(112,128,144)"],snow:["#fffafa","rgb(255,250,250)"],springgreen:["#00ff7f","rgb(0,255,127)"],steelblue:["#4682b4","rgb(70,130,180)"],tan:["#d2b48c","rgb(210,180,140)"],teal:["#008080","rgb(0,128,128)"],thistle:["#d8bfd8","rgb(216,191,216)"],tomato:["#ff6347","rgb(255,99,71)"],turquoise:["#40e0d0","rgb(64,224,208)"],violet:["#ee82ee","rgb(238,130,238)"],wheat:["#f5deb3","rgb(245,222,179)"],white:["#ffffff","rgb(255,255,255)"],whitesmoke:["#f5f5f5","rgb(245,245,245)"],yellow:["#ffff00","rgb(255,255,0)"],yellowgreen:["#9acd32","rgb(154,205,50)"]},regGroup:{hex:/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,rgb:/rgb\(\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*\)/,rgba:/rgba\(\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(0|1|0\.[1-9])\s*\)/},parseHexToRgbaArray:function(oL){var oM=oL.replace("#","");if(oM.length===3){oM+="f"}else{if(oM.length===6){oM+="ff"}}var e=[];var oK=oM.length;var T=oK===8?2:1;for(var C=0;C<oK;C=C+T){if(T===2){e.push(parseInt(oM.slice(C,C+2),16))}else{e.push(parseInt(oM.slice(C,C+1)+oM.slice(C,C+1),16))}}return e},parseRgbaStrToArray:function(i){var e=[0,0,0,255];if(i.indexOf("rgba(")===0){var T=i.replace("rgba(","").replace(")","");var C=T.split(",");e[0]=parseInt(C[0],10);e[1]=parseInt(C[1],10);e[2]=parseInt(C[2],10);e[3]=Math.round(parseFloat(C[3])*255)}else{if(i.indexOf("rgb(")===0){var T=i.replace("rgb(","").replace(")","");var oK=T.split(",");e[0]=parseInt(oK[0],10);e[1]=parseInt(oK[1],10);e[2]=parseInt(oK[2],10);e[3]=255}}return e},parseHexAndOpacityToRgbaArray:function(oK,oL){var C=[];var oO=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;var oN=oK.toLowerCase();if(oO.test(oN)){if(oN.length===4){var e="#";for(var oM=1;oM<4;oM++){e+=oN.slice(oM,oM+1).concat(oN.slice(oM,oM+1))}oN=e}for(var T=1;T<7;T+=2){C.push(parseInt(oN.slice(T,T+2),16))}C.push(oL)}return C},parseCSSColor:function(e){if(e.indexOf("#")===0){return k0.parseHexToRgbaArray(e)}return k0.parseRgbaStrToArray(e)},rgbToHSV:function(oK){var e=oK[0]/255;var C=oK[1]/255;var oL=oK[2]/255;var oO=Math.max(e,C,oL);var T=Math.min(e,C,oL);var oN=oO-T;var i;if(oN===0){i=0}else{if(oO===e){i=60*(((C-oL)/oN)%6)}else{if(oO===C){i=60*((oL-e)/oN+2)}else{if(oO===oL){i=60*((e-C)/oN+4)}}}}var oP=oO===0?0:(oN/oO);var oM=oO;while(i<0){i+=360}return[i,oP,oM]},hsvToRGB:function(T){var oN=T[2]*T[1];var C=oN*(1-Math.abs((T[0]/60)%2-1));var i=T[2]-oN;var oK=T[0];var oM;var oL;var e;if(oK>=0&&oK<60){oM=oN;oL=C;e=0}else{if(oK>=60&&oK<120){oM=C;oL=oN;e=0}else{if(oK>=120&&oK<180){oM=0;oL=oN;e=C}else{if(oK>=180&&oK<240){oM=0;oL=C;e=oN}else{if(oK>=240&&oK<300){oM=C;oL=0;e=oN}else{if(oK>=300&&oK<360){oM=oN;oL=0;e=C}}}}}}oM=(oM+i)*255>255?255:(oM+i)*255;oL=(oL+i)*255>255?255:(oL+i)*255;e=(e+i)*255>255?255:(e+i)*255;return[Math.round(oM),Math.round(oL),Math.round(e)]},formatColorCssToRgbaArray:function(oL,C,T){T=(typeof T!=="boolean")?true:T;if(typeof oL!=="string"){return T?[0,0,0,1]:[0,0,0,255]}var i=(oL||"Black").trim().toLowerCase();var e=[];var oK=k0.ColorRefTable[i];if(oK!==undefined){i=oK[0]}e=k0.parseCSSColor(i);if(C!==undefined&&!isNaN(Number(C))){C=Number(C);e[3]=k0.fitTo(C,0,1)}else{e[3]=Number((e[3]/255).toFixed(2))}if(!T){e[3]=Math.floor(e[3]*255)}return e},fitTo:function(C,i,e){if(C<i){C=i}else{if(C>e){C=e}}return C},generateColorRamp:function(e,oP,oQ,T,oV){oQ=oQ||[];T=T||"#ccc";oV=oV||1;const C=document.createElement("canvas");const oW=C.getContext("2d");C.width=256;C.height=oV;const oL=oP[0];const oS=oP[oP.length-1];if(e.length===oP.length){const oT=oW.createLinearGradient(0,0,256,1);for(var oO=0;oO<e.length;++oO){var oU=(oP[oO]-oL)/(oS-oL);oT.addColorStop(oU,e[oO])}oW.fillStyle=oT;oW.fillRect(0,0,256,oV)}else{if(e.length-oP.length===-1){var oN=0;var oK=1;for(var oO=0;oO<e.length;++oO){var oR=(oP[oK]-oL)/(oS-oL);var oU=Math.floor(oR*256);oW.fillStyle=e[oO];oW.fillRect(oN,0,oU,oV);oN=oU;oK++}}else{oW.fillStyle=T||"#ccc";oW.fillRect(0,0,256,oV)}}if(e.length-oP.length<=-1&&oQ.length===2){oW.fillStyle=T||"#ccc";var oR=(oQ[0]-oL)/(oS-oL);var oU=Math.floor(oR*256);oW.fillRect(0,0,oU,oV);oR=(oQ[1]-oL)/(oS-oL);oU=Math.floor(oR*256);oW.fillRect(oU,0,255,oV)}var oM=new Uint8Array(new Uint8ClampedArray(oW.getImageData(0,0,256,oV).data));return{canvas:C,data:oM,width:256,height:oV}},validateColor:function(e,i){return k0.regGroup[i].test(e)},convert2rgba:function(e,i){if(i===undefined){i=1}if(k0.validateColor(e,"rgba")){return e}if(k0.validateColor(e,"rgb")){e=e.replace(/rgb/g,"rgba");e=e.replace(/\)/,","+i+")");return e}var C=k0.formatColorCssToRgbaArray(e,i,true);return"rgba("+C.join(",")+")"}};(function(oL){function oV(o0,o3){var o2=(o0&65535)+(o3&65535);var o1=(o0>>16)+(o3>>16)+(o2>>16);return(o1<<16)|(o2&65535)}function oU(o0,o1){return(o0<<o1)|(o0>>>(32-o1))}function oP(o5,o2,o1,o0,o4,o3){return oV(oU(oV(oV(o2,o5),oV(o0,o3)),o4),o1)}function e(o2,o1,o6,o5,o0,o4,o3){return oP((o1&o6)|(~o1&o5),o2,o1,o0,o4,o3)}function oM(o2,o1,o6,o5,o0,o4,o3){return oP((o1&o5)|(o6&~o5),o2,o1,o0,o4,o3)}function oS(o2,o1,o6,o5,o0,o4,o3){return oP(o1^o6^o5,o2,o1,o0,o4,o3)}function oY(o2,o1,o6,o5,o0,o4,o3){return oP(o6^(o1|~o5),o2,o1,o0,o4,o3)}function C(pa,o5){pa[o5>>5]|=128<<(o5%32);pa[((o5+64)>>>9<<4)+14]=o5;var o2;var o4;var o3;var o1;var o0;var o9=1732584193;var o8=-271733879;var o7=-1732584194;var o6=271733878;for(o2=0;o2<pa.length;o2+=16){o4=o9;o3=o8;o1=o7;o0=o6;o9=e(o9,o8,o7,o6,pa[o2],7,-680876936);o6=e(o6,o9,o8,o7,pa[o2+1],12,-389564586);o7=e(o7,o6,o9,o8,pa[o2+2],17,606105819);o8=e(o8,o7,o6,o9,pa[o2+3],22,-1044525330);o9=e(o9,o8,o7,o6,pa[o2+4],7,-176418897);o6=e(o6,o9,o8,o7,pa[o2+5],12,1200080426);o7=e(o7,o6,o9,o8,pa[o2+6],17,-1473231341);o8=e(o8,o7,o6,o9,pa[o2+7],22,-45705983);o9=e(o9,o8,o7,o6,pa[o2+8],7,1770035416);o6=e(o6,o9,o8,o7,pa[o2+9],12,-1958414417);o7=e(o7,o6,o9,o8,pa[o2+10],17,-42063);o8=e(o8,o7,o6,o9,pa[o2+11],22,-1990404162);o9=e(o9,o8,o7,o6,pa[o2+12],7,1804603682);o6=e(o6,o9,o8,o7,pa[o2+13],12,-40341101);o7=e(o7,o6,o9,o8,pa[o2+14],17,-1502002290);o8=e(o8,o7,o6,o9,pa[o2+15],22,1236535329);o9=oM(o9,o8,o7,o6,pa[o2+1],5,-165796510);o6=oM(o6,o9,o8,o7,pa[o2+6],9,-1069501632);o7=oM(o7,o6,o9,o8,pa[o2+11],14,643717713);o8=oM(o8,o7,o6,o9,pa[o2],20,-373897302);o9=oM(o9,o8,o7,o6,pa[o2+5],5,-701558691);o6=oM(o6,o9,o8,o7,pa[o2+10],9,38016083);o7=oM(o7,o6,o9,o8,pa[o2+15],14,-660478335);o8=oM(o8,o7,o6,o9,pa[o2+4],20,-405537848);o9=oM(o9,o8,o7,o6,pa[o2+9],5,568446438);o6=oM(o6,o9,o8,o7,pa[o2+14],9,-1019803690);o7=oM(o7,o6,o9,o8,pa[o2+3],14,-187363961);o8=oM(o8,o7,o6,o9,pa[o2+8],20,1163531501);o9=oM(o9,o8,o7,o6,pa[o2+13],5,-1444681467);o6=oM(o6,o9,o8,o7,pa[o2+2],9,-51403784);o7=oM(o7,o6,o9,o8,pa[o2+7],14,1735328473);o8=oM(o8,o7,o6,o9,pa[o2+12],20,-1926607734);o9=oS(o9,o8,o7,o6,pa[o2+5],4,-378558);o6=oS(o6,o9,o8,o7,pa[o2+8],11,-2022574463);o7=oS(o7,o6,o9,o8,pa[o2+11],16,1839030562);o8=oS(o8,o7,o6,o9,pa[o2+14],23,-35309556);o9=oS(o9,o8,o7,o6,pa[o2+1],4,-1530992060);o6=oS(o6,o9,o8,o7,pa[o2+4],11,1272893353);o7=oS(o7,o6,o9,o8,pa[o2+7],16,-155497632);o8=oS(o8,o7,o6,o9,pa[o2+10],23,-1094730640);o9=oS(o9,o8,o7,o6,pa[o2+13],4,681279174);o6=oS(o6,o9,o8,o7,pa[o2],11,-358537222);o7=oS(o7,o6,o9,o8,pa[o2+3],16,-722521979);o8=oS(o8,o7,o6,o9,pa[o2+6],23,76029189);o9=oS(o9,o8,o7,o6,pa[o2+9],4,-640364487);o6=oS(o6,o9,o8,o7,pa[o2+12],11,-421815835);o7=oS(o7,o6,o9,o8,pa[o2+15],16,530742520);o8=oS(o8,o7,o6,o9,pa[o2+2],23,-995338651);o9=oY(o9,o8,o7,o6,pa[o2],6,-198630844);o6=oY(o6,o9,o8,o7,pa[o2+7],10,1126891415);o7=oY(o7,o6,o9,o8,pa[o2+14],15,-1416354905);o8=oY(o8,o7,o6,o9,pa[o2+5],21,-57434055);o9=oY(o9,o8,o7,o6,pa[o2+12],6,1700485571);o6=oY(o6,o9,o8,o7,pa[o2+3],10,-1894986606);o7=oY(o7,o6,o9,o8,pa[o2+10],15,-1051523);o8=oY(o8,o7,o6,o9,pa[o2+1],21,-2054922799);o9=oY(o9,o8,o7,o6,pa[o2+8],6,1873313359);o6=oY(o6,o9,o8,o7,pa[o2+15],10,-30611744);o7=oY(o7,o6,o9,o8,pa[o2+6],15,-1560198380);o8=oY(o8,o7,o6,o9,pa[o2+13],21,1309151649);o9=oY(o9,o8,o7,o6,pa[o2+4],6,-145523070);o6=oY(o6,o9,o8,o7,pa[o2+11],10,-1120210379);o7=oY(o7,o6,o9,o8,pa[o2+2],15,718787259);o8=oY(o8,o7,o6,o9,pa[o2+9],21,-343485551);o9=oV(o9,o4);o8=oV(o8,o3);o7=oV(o7,o1);o6=oV(o6,o0)}return[o9,o8,o7,o6]}function oT(o1){var o2;var o0="";var o3=o1.length*32;for(o2=0;o2<o3;o2+=8){o0+=String.fromCharCode((o1[o2>>5]>>>(o2%32))&255)}return o0}function oO(o1){var o3;var o0=[];o0[(o1.length>>2)-1]=undefined;for(o3=0;o3<o0.length;o3+=1){o0[o3]=0}var o2=o1.length*8;for(o3=0;o3<o2;o3+=8){o0[o3>>5]|=(o1.charCodeAt(o3/8)&255)<<(o3%32)}return o0}function oN(o0){return oT(C(oO(o0),o0.length*8))}function oZ(o2,o5){var o1;var o4=oO(o2);var o0=[];var o3=[];var o6;o0[15]=o3[15]=undefined;if(o4.length>16){o4=C(o4,o2.length*8)}for(o1=0;o1<16;o1+=1){o0[o1]=o4[o1]^909522486;o3[o1]=o4[o1]^1549556828}o6=C(o0.concat(oO(o5)),512+o5.length*8);return oT(C(o3.concat(o6),512+128))}function oX(o3){var o2="0123456789abcdef";var o1="";var o0;var o4;for(o4=0;o4<o3.length;o4+=1){o0=o3.charCodeAt(o4);o1+=o2.charAt((o0>>>4)&15)+o2.charAt(o0&15)}return o1}function oQ(o0){return unescape(encodeURIComponent(o0))}function T(o0){return oN(oQ(o0))}function oR(o0){return oX(T(o0))}function i(o0,o1){return oZ(oQ(o0),oQ(o1))}function oW(o0,o1){return oX(i(o0,o1))}function oK(o1,o2,o0){if(!o2){if(!o0){return oR(o1)}return T(o1)}if(!o0){return oW(o2,o1)}return i(o2,o1)}oL.md5=oK})(this);cv._rd=cv._rd||{};var e7={request:function(T,e){var oK=(Math.random()*100000).toFixed(0);if(e){cv._rd["_cbk"+oK]=function(oL){e&&e(oL);delete cv._rd["_cbk"+oK]};T+="&callback=BMapGL._rd._cbk"+oK}function C(oM){var oL;var oN=new RegExp("(^| )"+oM+"=([^;]*)(;|$)");if(oL=document.cookie.match(oN)){return unescape(oL[2])}else{return -1}}if(T.indexOf("v=")===-1){T+="&v="+ep()}T=e7.getSeckeyAndSign(T);var i=da("script",{src:T,type:"text/javascript",charset:"utf-8"});if(i.addEventListener){i.addEventListener("load",function(oM){var oL=oM.target;oL.parentNode.removeChild(oL)},false);i.addEventListener("error",function(oL){e&&e([,,,,,])},false)}else{if(i.attachEvent){i.attachEvent("onreadystatechange",function(oM){var oL=window.event.srcElement;if(oL&&(oL.readyState=="loaded"||oL.readyState=="complete")){oL.parentNode.removeChild(oL)}})}}document.getElementsByTagName("head")[0].appendChild(i);i=null},getSeckeyAndSign:function(oL){var C=decodeURIComponent(oL);var oK=new Date().getTime();var i=window.___abvk?window.___abvk:e7.getSeckeyCidItem("SECKEY_ABVK");var oM=e7.getSeckeyCidItem("BMAP_SECKEY");var e=encodeURIComponent(i+","+oM);var T=i+","+oM;oL+="&seckey="+e+"&timeStamp="+oK;C+="&seckey="+T+"&timeStamp="+oK;oL+=np()(C);return oL},getSeckeyCidItem:function(e){if(localStorage){return localStorage.getItem(e)?localStorage.getItem(e):-1}if(sessionStorage){return sessionStorage.getItem(e)?sessionStorage.getItem(e):-1}}};var or={request:function(oM,oK,i,oO,T){var oL=(Math.random()*100000)["toFixed"](0);cv._rd["_cbk"+oL]=function(oP){if(oP.result&&oP.result["popup"]&&oP.result["popup"]===1&&oP.result["error_msg"]){dZ(oP.result["error_msg"],{from:oK.qt});return}i=i||{};oM&&oM(oP,i);delete cv._rd["_cbk"+oL]};oO=oO||"";var oN;if(i&&i.useEncodeURI){oN=nk(oK,encodeURI)}else{oN=nk(oK,encodeURIComponent)}var e="";if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){e=window._BMapSecurityConfig["serviceHost"]+oO+"?"+oN+"&ie=utf-8&oue=1&fromproduct=jsapi"}else{var C=K.apiHost;e=C+"/"+oO+"?"+oN+"&ie=utf-8&oue=1&fromproduct=jsapi&ak="+hj}if(!T){e+="&res=api"}e+="&callback="+h6+"._rd._cbk"+oL;e7.request(e)}};var eq={levels:{INFO:"info",WARNING:"warning",ERROR:"error"},category:{JS:"js",RESOURCE:"resource",AJAX:"ajax"},config:{jsError:true,resourceError:true,ajaxError:true},hosts:"api.map.baidu.com|webmap0.bdimg.com|maponline0.bdimg.com|",ignoreUrl:"api.map.baidu.com/images/blank.gif",sender:true,collections:[],sendError:function(){},init:function(i,e,C){this.hosts+=i?i:"";aP&&aP(this.config,e);this.sender=true;if(C){this.sender=false}this.hosts=this.urlScope(this.hosts);this.sendError=this.notifyError();var T=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};this.config.jsError&&this.handleJavaScriptError(T);this.config.resourceError&&this.handleResourceError(T);this.config.ajaxError&&this.handleAjaxError(T)},handleJavaScriptError:function(C){var e=this;var i=C.onerror;C.onerror=function(oN,oM,T,oL,oK){if(e.isFetch(e.category.JS)&&e.hostExit(oM)){if(oK&&oK.stack){e.sendError({title:oN,msg:oK.stack,category:e.category.JS,level:e.levels.ERROR})}else{if(typeof oN==="string"){e.sendError({title:oN,msg:JSON.stringify({resourceUrl:oM,rowNum:T,colNum:oL}),category:"js",level:e.levels.ERROR})}}}if(i&&c2(i)){i&&i.apply(C,arguments)}}},handleResourceError:function(i){var e=this;i.addEventListener("error",function(oL){if(oL){var oM=oL.target||oL.srcElement;var oK=oM instanceof HTMLScriptElement||oM instanceof HTMLLinkElement||oM instanceof HTMLImageElement;if(!oK){if(!i.onerror){var C=oL.filename||null;if(!e.isFetch(e.category.JS)||!e.hostExit(C)){return}if(oL.error&&oL.error.stack){e.sendError({title:oL.message,msg:oL.error.stack,category:e.category.JS,level:e.levels.ERROR})}else{if(typeof oL.message==="string"){e.sendError({title:oL.message,msg:JSON.stringify({resourceUrl:C,rowNum:oL.lineno,colNum:oL.cowno}),category:e.category.JS,level:e.levels.ERROR})}}}return}var T=oM.src||oM.href;if(e.isFetch(e.category.RESOURCE)&&e.hostExit(T)){e.sendError({title:oM.nodeName,msg:T,category:e.category.RESOURCE,level:e.levels.ERROR})}}},true)},handleAjaxError:function(oL){var e=this;var oK=oL.location.protocol;if(oK==="file:"){return}if(!oL.XMLHttpRequest){return}var i=oL.XMLHttpRequest;var C=i.prototype.send;var T=function(oN){if(oN&&oN.currentTarget&&oN.currentTarget.status!==200){var oM=oN.target.responseURL;if(e.isFetch(e.category.AJAX)&&e.hostExit(oM)){e.sendError({title:oM,msg:JSON.stringify({response:oN.target.response,responseURL:oM,status:oN.target.status,statusText:oN.target.statusText}),category:e.category.AJAX,level:e.levels.ERROR})}}};i.prototype.send=function(){if(this["addEventListener"]){this["addEventListener"]("error",T);this["addEventListener"]("load",T);this["addEventListener"]("abort",T)}else{var oM=this["onreadystatechange"];this["onreadystatechange"]=function(oN){if(this.readyState===4){T(oN)}oM&&oM.apply(this,arguments)}}return C.apply(this,arguments)}},notifyError:function(C){var i=C||1000;this._idleWorkerTicker=(function(T){return function(){T.runJob()}})(this);var e=this;return function(oK){if(oK.url){if(!e.isFetch(oK.category)){return}var T=oK.url||"";if(!e.hostExit(T)){return}delete oK.url}if(!navigator.onLine){return}e.collections.push(oK);e.checkJob(i)}},runJob:function(){if(this.collections.length===0){clearInterval(this.idleWork);this.idleWork=null;return}var oK=this.collections.slice(0,2);var C=ni(JSON.stringify({dataset:oK}));var T=new Date().getTime();if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){var i=K.apiIMG+"/blank.gif?product=jsapi&v="+ep()+"&l="+C+"&t="+T}else{var i=K.apiIMG+"/blank.gif?product=jsapi&v="+ep()+"&l="+C+"&ak="+hj+"&t="+T}if(this.sender){try{var oM=document.createElement("div");oM.style="width:0;height:0;visibility: hidden;opacity: 0;z-index:-999;background-image: url("+i+");";document.querySelector("BODY").appendChild(oM);setTimeout(function(){document.querySelector("BODY").removeChild(oM)})}catch(oL){}}this.collections.splice(0,2);if(this.collections.length===0){clearInterval(this.idleWork);this.idleWork=null}},checkJob:function(e){if(!this.idleWork&&this._idleWorkerTicker){this.idleWork=setInterval(this._idleWorkerTicker,e)}},urlScope:function(T){var C={};var oL=Object.keys(K);if(K&&oL.length>0){for(var oK in K){if(K[oK]&&(typeof K[oK]!=="function")){C[oK]=K[oK]}}}try{var oN=JSON.stringify(C);if(oN.length>2){return T+"|"+oN}else{return T}}catch(oM){return T}},hostExit:function(i){try{if(i&&i.indexOf("//")===0){i=window.location.protocol+i}var C=new URL(i);if(!C||!C.host){return false}var oK=C.host+C.pathname;if(this.ignoreUrl.indexOf(oK)===-1&&this.hosts.indexOf(C.host)>-1){return true}return false}catch(T){return false}},isFetch:function(e){return this.config[e+"Error"]||false}};cv.fetchDebug=eq;var be={TYPE:"TypeError",REF:"ReferenceError",SYNTAX:"SyntaxError",RANGE:"RangeError",URI:"URIError",EVAL:"EvalError",NETWORK:"NetworkError",TIMEOUT:"TimeoutError",PROMISE:"UnhandledRejection",UNKNOWN:"Unknown"};var c8={TypeError:be.TYPE,ReferenceError:be.REF,SyntaxError:be.SYNTAX,RangeError:be.RANGE,URIError:be.URI,EvalError:be.EVAL};var hf=8*1024;var ic=new RegExp(["bot","spider","crawler","crawl","slurp","scraper","fetcher","indexer","yisou","sogou","yandex","duckduck","facebookexternalhit","externalagent","semrush","ahrefs","mj12","ia_archiver","archive\\.org","perplexity","bingpreview","embedly","dataforseo","proximic","seekport","headlesschrome","phantomjs","puppeteer","playwright","lighthouse","python-requests","python-urllib","scrapy","curl/","wget","okhttp","libwww","go-http-client","java/","apache-httpclient","axios/","node-fetch","monitoring","uptime","pingdom","apachebench"].join("|"),"i");var ma={_denominatorSent:false,_denominatorAcked:false,_pendingError:null,_numeratorSent:false,_inited:false,_bot:false,_mapJsHosts:[],_mapUrlPrefixes:[],init:function(){if(this._inited){return}this._inited=true;this._bot=this._isBot();if(this._bot){return}var oN=!!(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]);var oM=[K.staticHost,K.apiTestUrl,K.panoTilePath,K.stylePath,K.imgPath,K.apiIMG,K.mapHost];if(!oN){oM.push(K.apiHost)}oM.push(K.urlProtocol+"//" + window.location.host + "/bmap-api");if(K.tileDomain&&K.tileDomain.length){oM=oM.concat(K.tileDomain)}if(K.enTileDomain&&K.enTileDomain.length){oM=oM.concat(K.enTileDomain)}if(K.originTilePath&&K.originTilePath.length){oM=oM.concat(K.originTilePath)}var C=[];for(var T=0;T<oM.length;T++){var oK=this._extractHost(oM[T]);if(oK&&C.indexOf(oK)===-1){C.push(oK)}}this._mapJsHosts=C;var oL=[];var e=this._getCurrentScriptUrl();if(e){oL.push(e)}if(oN){oL.push(window._BMapSecurityConfig["serviceHost"]+"")}this._mapUrlPrefixes=oL;this._bindErrorListeners();this.sendDenominator()},sendDenominator:function(){if(!this._inited||this._denominatorSent||this._bot){return}this._denominatorSent=true;var e=this;this._sendSla({type:"den",ak:hj},function(i){if(!i){e._pendingError=null;return}e._denominatorAcked=true;var C=e._pendingError;if(C){e._pendingError=null;e._reportNumerator(C.title,C.detailMsg)}})},_classifyTitle:function(i,C){var e=i&&i.name;if(e&&c8[e]){return c8[e]}var T=(C||(i&&i.message)||"")+"";if((e&&/timeout/i.test(e))||/timeout/i.test(T)){return be.TIMEOUT}if((e&&/network/i.test(e))||/network|failed to fetch|load.*fail/i.test(T)){return be.NETWORK}return null},_bindErrorListeners:function(){var i=this;var C=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};var e=C.onerror;C.onerror=function(oQ,oM,T,oL,oK){var oO=false;if(i._isMapUrl(oM)||i._isMapStack(oK&&oK.stack)){oO=true}else{if(!oK&&typeof oQ==="string"&&oQ.indexOf("WorkerGlobalScope")>-1){var oN=/((?:https?:)?\/\/[^\s'"]+)/.exec(oQ);if(oN&&i._isMapUrl(oN[1])){oO=true}}}if(oO){var oP=oK&&oK.stack?oK.stack:JSON.stringify({resourceUrl:oM,rowNum:T,colNum:oL,msg:oQ});i._onError(oK,oQ,oP,false)}if(e&&c2(e)){e.apply(C,arguments)}};C.addEventListener("unhandledrejection",function(oL){var oO=oL.reason;var T=oO instanceof Error?(oO.stack||""):"";var oN=false;if(i._isMapStack(T)){oN=true}else{if(!T&&typeof oO==="string"){var oK=/((?:https?:)?\/\/[^\s'"]+)/.exec(oO);if(oK&&i._isMapUrl(oK[1])){oN=true}}}if(!oN){return}var oM=oO instanceof Error?(oO.message||""):String(oO);var oP=T||oM;i._onError(oO instanceof Error?oO:null,oM,oP,true)});C.addEventListener("error",function(oK){if(oK instanceof window.ErrorEvent){return}var oN=oK.target||oK.srcElement;if(!oN){return}var T=oN.src||oN.href;if(i._isMapUrl(T)){var oM="NetworkError: resource load failed";var oO=JSON.stringify({tagName:oN.tagName,url:T});var oL=new Error(oM);oL.name="NetworkError";i._onError(oL,oM,oO,false)}},true)},_extractHost:function(i){try{if(i&&i.indexOf("//")>-1){return i.split("//")[1].split("/")[0]}}catch(C){}return""},_isMapUrl:function(T){if(!T){return false}T=T+"";if(T.indexOf("/jsapi_monitor/")>-1){return false}var e=this._extractHost(T);if(e){for(var oK=0;oK<this._mapJsHosts.length;oK++){if(e===this._mapJsHosts[oK]){return true}}}for(var C=0;C<this._mapUrlPrefixes.length;C++){if(T.indexOf(this._mapUrlPrefixes[C])===0){return true}}return false},_isMapStack:function(C){if(!C){return false}var oK=(C+"").split("\n");for(var oM=0;oM<oK.length;oM++){var T=oK[oM];if(!/^\s*at /.test(T)&&T.indexOf("@")===-1){continue}var oL=/((?:https?:)?\/\/[^\s()@]+)/.exec(T);if(oL){var e=oL[1].replace(/:\d+:\d+\)?$/,"");return this._isMapUrl(e)}}return false},_isBot:function(){var i=typeof navigator!=="undefined"?navigator:null;if(!i){return true}if(i.webdriver===true){return true}var e=i.userAgent||"";if(!e){return true}return ic.test(e.replace(/cubot/ig,""))},_onError:function(e,i,T,oK){if(this._numeratorSent||this._bot){return}this.sendDenominator();var C=this._classifyTitle(e,i)||(oK?be.PROMISE:be.UNKNOWN);this._numeratorSent=true;if(!this._denominatorAcked){this._pendingError={title:C,detailMsg:T};return}this._reportNumerator(C,T)},_reportNumerator:function(C,i){var e=this;this._sendSla({type:"num",ak:hj,title:C},function(oK){if(!oK){return}var T=(i||"")+"";if(T.length>hf){T=T.slice(0,hf)}e._sendDetail(oK,{type:"num",ak:hj,title:C,ua:(typeof navigator!=="undefined"&&navigator.userAgent)||"",msg:T})})},_sendSla:function(oK,i){if(this._bot){i&&i(null);return}if(typeof navigator!=="undefined"&&navigator.onLine===false){i&&i(null);return}var C=this._buildUrl("/jsapi_monitor/sla",oK,null);try{e7.request(C,function(e){i&&i(e&&e.status===0?e.id:null)})}catch(T){i&&i(null)}},_sendDetail:function(C,oK){if(this._bot){return}if(typeof navigator!=="undefined"&&navigator.onLine===false){return}var i=this._buildUrl("/jsapi_monitor/detail",oK,C);try{e7.request(i,function(){})}catch(T){}},_buildUrl:function(oK,T,i){var oL=ni(JSON.stringify(T));var e="from=jsapi_"+ep()+"&sla="+encodeURIComponent(oL);if(i){e+="&id="+encodeURIComponent(i)}var C=(K.apiHost+"").replace(/\/+$/,"");return C+oK+"?"+e},_getCurrentScriptUrl:function(){try{var T="";if(typeof document!=="undefined"){if(document.currentScript&&document.currentScript.src){T=document.currentScript.src}else{var i=document.getElementsByTagName("script");if(i.length){T=i[i.length-1].src||""}}}return T?T.split("?")[0]:""}catch(C){return""}}};cv.slaDebug=ma;var kU={device:{PC:0,NA:1},config:{mask:["FFFFFFFF"],open:true},url:K.apiHost+"?qt=jsapi_log",counts:{},values:{},records:{},flushInterval:30*1000,sendMessage:function(i,C,e){},init:function(i,T){this.kill();var e=this;this.config.open=!!i;T=T||{};if(T.flushInterval){this.flushInterval=T.flushInterval}var C=T.timers||200;e._idleWorkerTicker=(function(oK){return function(){oK.runJob()}})(e);e._flushTicker=setInterval(function(){e._flushAll(C)},e.flushInterval);e._firstFlushTimer=setTimeout(function(){e._flushAll(C);e._firstFlushTimer=null},5*1000);if(typeof document!=="undefined"){document.addEventListener("visibilitychange",function(){if(document.visibilityState==="hidden"){e._flushAll(C)}})}this.sendMessage=function(oM,oN,oK){if(window.navigator&&!navigator.onLine){return}oM=oM||"";oN=oN||"";oK=oK||"";var oL=oM+"-"+oN+"-"+oK;if(!e.counts[oL]){e.counts[oL]=0}e.counts[oL]++;e.values[oL]=[oM,oN,oK]}},_flushAll:function(T){var i=false;for(var e in this.counts){if(this.counts[e]>0){var C=this.counts[e]>10000?10000:this.counts[e];this.records[e]={value:this.values[e],count:C};this.counts[e]=0;i=true}}if(i){this.checkJob(T)}},runJob:function(){if(Object.keys(this.records).length===0){clearInterval(this.idleWork);this.idleWork=null;return}var oP=Object.keys(this.records);var oO=oP[0];var T=this.records[oO]||{};var oN=T.value||[];var oK=T.count||1;var i=new Date().getTime();var C="logCbk"+Math.floor(Math.random()*10000000000);if(cv){cv[C]=function(e){delete cv[C]}}if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){var oM=this.url+"&bmapgl2=1&v="+ep()+"&device="+(c9()?this.device.NA:this.device.PC)+"&module="+(oN[0]||"")+"&func="+(oN[1]||"")+"&subfunc="+(oN[2]||"")+"&count="+oK+"&t="+i+"&callback="+h6+"."+C}else{var oM=this.url+"&ak="+hj+"&bmapgl2=1&v="+ep()+"&device="+(c9()?this.device.NA:this.device.PC)+"&module="+(oN[0]||"")+"&func="+(oN[1]||"")+"&subfunc="+(oN[2]||"")+"&count="+oK+"&t="+i+"&callback="+h6+"."+C}oM+=np()(oM);if(this.config.open){try{jW.load(oM);delete this.records[oO]}catch(oL){}}if(Object.keys(this.records).length===0){clearInterval(this.idleWork);this.idleWork=null}},checkJob:function(e){if(!this.idleWork&&this._idleWorkerTicker){this.idleWork=setInterval(this._idleWorkerTicker,e)}},kill:function(){if(this.idleWork){clearInterval(this.idleWork);this.idleWork=null}if(this._flushTicker){clearInterval(this._flushTicker);this._flushTicker=null}if(this._firstFlushTimer){clearTimeout(this._firstFlushTimer);this._firstFlushTimer=null}this._idleWorkerTicker=null;this.counts={};this.values={};this.records={}}};kU.init(true);var d5={device:{PC:0,NA:1},config:{open:true},url:K.apiHost+"?qt=jsapi_log",sent:{},records:{},sendMessage:function(C,T,e){if(window.navigator&&!navigator.onLine){return}C=C||"";T=T||"";e=e||"";var i=C+"-"+T+"-"+e;if(this.sent[i]){return}this.sent[i]=true;this.records[i]=[C,T,e];this.checkJob()},runJob:function(){if(Object.keys(this.records).length===0){clearInterval(this.idleWork);this.idleWork=null;return}var oL=Object.keys(this.records);var T=oL[0];var oM=this.records[T]||[];var C=new Date().getTime();var oK="logCbk"+Math.floor(Math.random()*10000000000);if(cv){cv[oK]=function(e){delete cv[oK]}}if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){var i=this.url+"&bmapgl2=1&v="+ep()+"&device="+(c9()?this.device.NA:this.device.PC)+"&module="+(oM[0]||"")+"&func="+(oM[1]||"")+"&subfunc="+(oM[2]||"")+"&count=1&t="+C+"&callback="+h6+"."+oK}else{var i=this.url+"&ak="+hj+"&bmapgl2=1&v="+ep()+"&device="+(c9()?this.device.NA:this.device.PC)+"&module="+(oM[0]||"")+"&func="+(oM[1]||"")+"&subfunc="+(oM[2]||"")+"&count=1&t="+C+"&callback="+h6+"."+oK}i+=np()(i);if(this.config.open){try{jW.load(i);delete this.records[T]}catch(oN){}}if(Object.keys(this.records).length===0){clearInterval(this.idleWork);this.idleWork=null}},checkJob:function(){if(!this.idleWork){var e=this;this.idleWork=setInterval(function(){e.runJob()},200)}},kill:function(){if(this.idleWork){clearInterval(this.idleWork);this.idleWork=null}this.sent={};this.records={}}};var nT={LOCATION:'<svg width="64" height="64" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="7" fill="none" stroke="currentColor" stroke-width="2"/><circle cx="10" cy="10" r="3" fill="currentColor"/><rect x="9" y="0" width="2" height="1.8" fill="currentColor"/><rect x="9" y="18.2" width="2" height="1.8" fill="currentColor"/><rect x="0" y="9" width="1.8" height="2" fill="currentColor"/><rect x="18.2" y="9" width="1.8" height="2" fill="currentColor"/></svg>',PLUS:'<svg width="64" height="64" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M8 1.25C8.41421 1.25 8.75 1.58579 8.75 2V7.25H14C14.3797 7.25 14.6935 7.53215 14.7432 7.89823L14.75 8C14.75 8.41421 14.4142 8.75 14 8.75H8.75V14C8.75 14.3797 8.46785 14.6935 8.10177 14.7432L8 14.75C7.58579 14.75 7.25 14.4142 7.25 14V8.75H2C1.6203 8.75 1.30651 8.46785 1.25685 8.10177L1.25 8C1.25 7.58579 1.58579 7.25 2 7.25H7.25V2C7.25 1.6203 7.53215 1.30651 7.89823 1.25685L8 1.25Z"/></svg>',MINUS:'<svg width="64" height="64" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M14 7.25C14.4142 7.25 14.75 7.58579 14.75 8C14.75 8.41421 14.4142 8.75 14 8.75H2C1.58579 8.75 1.25 8.41421 1.25 8C1.25 7.58579 1.58579 7.25 2 7.25H14Z"/></svg>',ARROW_TOP_LEFT:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor"><path d="M2 2L10 2L10 5L7 5L14 12L12 14L5 7L5 10L2 10Z"/></svg>',ARROW_TOP_RIGHT:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor"><path d="M14 2L6 2L6 5L9 5L2 12L4 14L11 7L11 10L14 10Z"/></svg>',ARROW_BOTTOM_LEFT:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor"><path d="M2 14L10 14L10 11L7 11L14 4L12 2L5 9L5 6L2 6Z"/></svg>',ARROW_BOTTOM_RIGHT:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor"><path d="M14 14L6 14L6 11L9 11L2 4L4 2L11 9L11 6L14 6Z"/></svg>',TRAFFIC_LIGHT:'<svg width="64" height="64" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.3672 3.36068L9.37153 3.37242L7.97243 4.79307L7.96788 2.62596L9.10331 2.61675L9.10764 2.62849C9.28797 2.63494 9.44881 2.76153 9.49059 2.95764C9.52284 3.11163 9.46808 3.25987 9.3672 3.36068ZM5.52648 9.99989C4.25034 10.0121 3.42491 9.04788 3.42491 8.01278V2.86006C3.42491 1.82495 4.21419 0.998162 5.55679 1C6.74374 1.00184 7.53345 1.82495 7.53345 2.86006V8.01278C7.53345 9.04788 6.76647 9.98792 5.52648 9.99989ZM5.49215 2.3903C4.91826 2.3903 4.42383 2.88518 4.42383 3.4956C4.42383 4.1058 4.91826 4.63152 5.49215 4.63152C6.06625 4.63152 6.53146 4.1058 6.53146 3.4956C6.53146 2.88518 6.06625 2.3903 5.49215 2.3903ZM5.49215 6.25326C4.91826 6.25326 4.42383 6.74814 4.42383 7.35833C4.42383 7.96876 4.91826 8.49448 5.49215 8.49448C6.06625 8.49448 6.53146 7.96876 6.53146 7.35833C6.53146 6.74814 6.06625 6.25326 5.49215 6.25326ZM9.10764 6.08113C9.28797 6.08758 9.44881 6.21417 9.49059 6.41028C9.52284 6.56404 9.46808 6.71227 9.3672 6.81332L9.37153 6.82506L7.97243 8.24571L7.96788 6.0786L9.10331 6.06939L9.10764 6.08113ZM1.6328 3.36068L1.62848 3.37242L3.02757 4.79307L3.03212 2.62596L1.89669 2.61675L1.89236 2.62849C1.71204 2.63494 1.55119 2.76153 1.50941 2.95764C1.47716 3.11163 1.53193 3.25987 1.6328 3.36068ZM1.89236 6.08113C1.71204 6.08758 1.55119 6.21417 1.50941 6.41028C1.47716 6.56404 1.53193 6.71227 1.6328 6.81332L1.62848 6.82506L3.02757 8.24571L3.03212 6.0786L1.89669 6.06939L1.89236 6.08113Z" fill="currentColor"/></svg>',SUBWAY:'<svg width="64" height="64" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M12 2C7.5 2 4 3 4 7v8c0 1.7 1.3 3 3 3l-1.5 1.5V20h2.2l2-2h4.6l2 2H18v-.5L16.5 18c1.7 0 3-1.3 3-3V7c0-4-3.5-5-7.5-5zm-3 14c-.8 0-1.5-.7-1.5-1.5S8.2 13 9 13s1.5.7 1.5 1.5S9.8 16 9 16zm6 0c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm2.5-5h-11V7h11v4z"/></svg>',BUS:'<svg width="64" height="64" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M4 16c0 .9.4 1.7 1 2.2V20c0 .5.5 1 1 1h1c.6 0 1-.5 1-1v-1h8v1c0 .5.5 1 1 1h1c.6 0 1-.5 1-1v-1.8c.6-.5 1-1.3 1-2.2V6c0-3.5-3.6-4-8-4s-8 .5-8 4v10zm3.5 1c-.8 0-1.5-.7-1.5-1.5S6.7 14 7.5 14s1.5.7 1.5 1.5S8.3 17 7.5 17zm9 0c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm1.5-6H6V6h12v5z"/></svg>',TRAIN:'<svg width="64" height="64" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M12 2C7 2 5 3 5 6v9c0 1.4 1 2.6 2.3 2.9L6 19v1h2l1.3-1.3h5.4L16 20h2v-1l-1.3-1.1c1.3-.3 2.3-1.5 2.3-2.9V6c0-3-2-4-7-4zm-3 13c-.8 0-1.5-.7-1.5-1.5S8.2 12 9 12s1.5.7 1.5 1.5S9.8 15 9 15zm6 0c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm2-5h-4V5h4v5zm-6 0H7V5h4v5z"/></svg>',AIRPLANE:'<svg width="64" height="64" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"/></svg>',SEARCH:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>',ROAD:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M4 21 8 3"/><path d="M20 21 16 3"/><path d="M12 5v2"/><path d="M12 11v2"/><path d="M12 17v2"/></svg>',CHEVRON_DOWN:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>',MARKER_PIN:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 21s-7-6.2-7-11a7 7 0 1 1 14 0c0 4.8-7 11-7 11Z"/><circle cx="12" cy="10" r="2.6"/></svg>',FLAG:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M5 21V4"/><path d="M5 4h13l-3 4 3 4H5"/></svg>',CAR:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round"><path d="M21.1 11.8V16.7H2.9V11.8L4.3 9.7 5 6.2C5.26 4.89 5.77 4.1 7.1 4.1H16.9C18.23 4.1 18.74 4.89 19 6.2L19.7 9.7 21.1 11.8Z"/><path d="M18.3 16.7H21.1V19.5H18.3Z" fill="currentColor"/><path d="M2.9 16.7H5.7V19.5H2.9Z" fill="currentColor"/><path d="M4.3 9.7 9.2 11.1H14.8L19.7 9.7"/><path d="M21.1 12.5V16.7H2.9V12.5H6.4L9.2 11.1H14.8L17.6 12.5H21.1Z" fill="currentColor" stroke="none"/></svg>',TAXI:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round"><path d="M21.1 11.8V16.7H2.9V11.8L4.3 9.7 5 6.2C5.04 5.73 5.51 5.5 6.4 5.5H17.6C18.49 5.5 18.96 5.73 19 6.2L19.7 9.7 21.1 11.8Z"/><path d="M21.1 16.7H2.9V13.9H7.1V11.1H16.9V13.9H21.1Z" fill="currentColor"/><path d="M18.3 16.7H21.1V19.5H18.3ZM2.9 16.7H5.7V19.5H2.9Z" fill="currentColor"/><path d="M4.3 10.4 7.1 11.1H16.9L19.7 10.4"/><path d="M8.5 4.8 9.2 2.7H14.8L15.5 4.8" fill="currentColor"/></svg>',WALK:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><circle cx="12.96" cy="4.17" r="1.98"/><path d="M11.44 6.54L12.24 6.6L12.71 6.79L13.09 7.05L13.46 7.51L13.69 8L13.77 8.41L13.88 8.53L15.48 9.94L17.34 11.04L17.54 11.28L17.64 11.51L17.66 11.89L17.51 12.25L17.2 12.51L17 12.59L16.67 12.59L16.45 12.51L14.73 11.49L13.41 10.61L13.27 10.61L12.95 12.34L12.93 12.78L15.3 15.23L16.43 18.8L16.49 19.27L16.35 19.67L16.07 19.99L15.69 20.18L15.09 20.16L14.8 20.01L14.52 19.71L13.44 16.61L13.29 16.37L12.86 15.95L10.22 13.93L9.89 13.63L9.69 13.32L9.52 12.89L9.48 12.32L9.99 9.04L8.89 9.68L8.55 10.06L8.36 10.59L8.02 12.21L7.89 12.47L7.72 12.64L7.34 12.81L6.97 12.8L6.63 12.61L6.38 12.23L6.36 11.72L6.85 9.96L7.16 9.23L7.42 8.85L8.01 8.32L10.23 6.96L10.84 6.68Z"/><path d="M9.8 14.02L11.22 15.27L10.99 15.86L10.5 16.71L8.16 19.71L7.91 19.94L7.57 20.07L7.23 20.07L7 19.99L6.63 19.69L6.48 19.39L6.44 18.93L6.51 18.69L8.93 15.67L9.16 15.33L9.52 14.5Z"/></svg>',BIKE:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round"><circle cx="6.05" cy="15.65" r="3.85"/><circle cx="17.6" cy="15.3" r="4.2"/><path d="M9.2 12.5 8.01 8.3M5.7 8.3H9.9"/><path d="M17.6 15.3 14.1 4.1H10.6"/><path d="M6.05 15.65 14.8 8.3"/><path d="M15.5 7.6H19.7V6.2"/></svg>',SCOOTER:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round"><path d="M3.63 4.76H7.57M5.6 4.76V11.34"/><path d="M10.74 15.61C10.74 14.34 10.73 13.49 10.65 12.86 10.58 12.25 10.45 11.99 10.29 11.82 10.13 11.65 9.88 11.51 9.32 11.42 8.72 11.34 8.2 11.34 7.02 11.34H6.28C5.81 11.34 5.63 11.34 5.48 11.35 3.52 11.51 2.23 13.18 2.08 15.28 2.06 15.61 2.06 15.94 2.06 16.27 2.08 16.43 2.22 16.59 2.37 16.6H10.74V15.61Z"/><path d="M4.16 17.16C4.56 18.46 5.61 19.33 6.79 19.33 7.98 19.33 9.03 18.46 9.43 17.16"/><path d="M9.54 16.6H16.27"/><path d="M17.86 11.58 18 11.47C18.29 11.26 18.44 11.14 18.56 11.05 18.6 11.02 18.63 10.99 18.66 10.95 18.69 10.91 18.72 10.86 18.74 10.81 18.73 10.82 18.74 10.8 18.75 10.67 18.76 10.52 18.76 10.32 18.76 9.97 18.76 9.31 18.76 8.92 18.73 8.63 18.73 8.54 18.71 8.45 18.69 8.36 18.65 8.28 18.58 8.22 18.51 8.18 18.42 8.15 18.33 8.14 18.24 8.13 17.79 8.11 17.34 8.1 16.9 8.11H16.13"/><path d="M18.38 13.54C16.81 10.52 15.75 8.44 15.21 7.3 14.4 5.59 13.41 5.8 11.52 5.8"/><circle cx="19.04" cy="16.6" r="2.9"/></svg>',TRUCK:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round"><path d="M2.9 5.5H16.9V16.7H2.9Z"/><path d="M16.9 9.7H19L21.1 11.8V16.7H16.9Z"/><path d="M4.3 17.4A2.1 2.1 0 0 0 8.5 17.4M15.5 17.4A2.1 2.1 0 0 0 19.7 17.4"/></svg>',CLOSE:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M5.5 5.5 18.5 18.5"/><path d="M18.5 5.5 5.5 18.5"/></svg>',LAYERS:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3 3 8l9 5 9-5-9-5Z"/><path d="M3 12l9 5 9-5"/><path d="M3 16l9 5 9-5"/></svg>',ROUTE:'<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="6" cy="19" r="2"/><circle cx="18" cy="5" r="2"/><path d="M8 19h7a3 3 0 0 0 3-3v-1a3 3 0 0 0-3-3H9a3 3 0 0 1-3-3V8a3 3 0 0 1 3-3h7"/></svg>'};function eC(C,i,oK,e){var T=i?C.replace(/currentColor/g,i):C;T=T.replace(/<svg\b[^>]*>/i,function(oL){return oL.replace(/\s(?:width|height)\s*=\s*("[^"]*"|'[^']*')/gi,"").replace(/^<svg/i,'<svg width="'+oK+'" height="'+e+'"')});return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(T)}function gS(e,i){i=i||{};var T=i.size||32;if(typeof T==="number"){T=new mU(T,T)}var oK={};for(var C in i){if(i.hasOwnProperty(C)&&C!=="color"&&C!=="size"&&C!=="srcset"){oK[C]=i[C]}}oK.imageSize=new mU(T.width,T.height);oK.srcset={"2x":eC(e,i.color,T.width*2,T.height*2)};return new nF(eC(e,i.color,T.width,T.height),T,oK)}if(Object.defineProperty){Object.defineProperty(nT,"createIcon",{value:gS,enumerable:false,writable:false,configurable:false})}else{nT.createIcon=gS}if(Object.freeze){Object.freeze(nT)}var dm=(function(oL){var oP=Object.create||(function(){function C(){}return function(oV){var oU;C.prototype=oV;oU=new C();C.prototype=null;return oU}}());var e={};var i=e.lib={};var oQ=i.Base=(function(){return{extend:function(oU){var C=oP(this);if(oU){C.mixIn(oU)}if(!C.hasOwnProperty("init")||this["init"]===C.init){C.init=function(){C.$super.init.apply(this,arguments)}}C.init.prototype=C;C.$super=this;return C},create:function(){var C=this.extend();C.init.apply(C,arguments);return C},init:function(){},mixIn:function(oU){for(var C in oU){if(oU.hasOwnProperty(C)){this[C]=oU[C]}}if(oU.hasOwnProperty("toString")){this.toString=oU.toString}},clone:function(){return this["init"].prototype.extend(this)}}}());var oS=i.WordArray=oQ.extend({init:function(oU,C){oU=this.words=oU||[];if(C!=undefined){this.sigBytes=C}else{this.sigBytes=oU.length*4}},toString:function(C){return(C||oN).stringify(this)},concat:function(oZ){var oW=this.words;var oV=oZ.words;var C=this.sigBytes;var oY=oZ.sigBytes;this.clamp();if(C%4){for(var oX=0;oX<oY;oX++){var oU=(oV[oX>>>2]>>>(24-(oX%4)*8))&255;oW[(C+oX)>>>2]|=oU<<(24-((C+oX)%4)*8)}}else{for(var oX=0;oX<oY;oX+=4){oW[(C+oX)>>>2]=oV[oX>>>2]}}this.sigBytes+=oY;return this},clamp:function(){var oU=this.words;var C=this.sigBytes;oU[C>>>2]&=4294967295<<(32-(C%4)*8);oU.length=oL.ceil(C/4)},clone:function(){var C=oQ.clone.call(this);C.words=this.words.slice(0);return C},random:function(oY){var oX=[];var oV=(function(o1){var o1=o1;var o0=987654321;var oZ=4294967295;return function(){o0=(36969*(o0&65535)+(o0>>16))&oZ;o1=(18000*(o1&65535)+(o1>>16))&oZ;var o2=((o0<<16)+o1)&oZ;o2/=4294967296;o2+=0.5;return o2*(oL.random()>0.5?1:-1)}});for(var oU=0,C;oU<oY;oU+=4){var oW=oV((C||oL.random())*4294967296);C=oW()*987654071;oX.push((oW()*4294967296)|0)}return new oS.init(oX,oY)}});var oT=e.enc={};var oN=oT.Hex={stringify:function(oV){var oX=oV.words;var oU=oV.sigBytes;var oW=[];for(var C=0;C<oU;C++){var oY=(oX[C>>>2]>>>(24-(C%4)*8))&255;oW.push((oY>>>4).toString(16));oW.push((oY&15).toString(16))}return oW.join("")},parse:function(oV){var C=oV.length;var oW=[];for(var oU=0;oU<C;oU+=2){oW[oU>>>3]|=parseInt(oV.substr(oU,2),16)<<(24-(oU%8)*4)}return new oS.init(oW,C/2)}};var oK=oT.Latin1={stringify:function(oW){var oX=oW.words;var oV=oW.sigBytes;var C=[];for(var oU=0;oU<oV;oU++){var oY=(oX[oU>>>2]>>>(24-(oU%4)*8))&255;C.push(String.fromCharCode(oY))}return C.join("")},parse:function(oV){var C=oV.length;var oW=[];for(var oU=0;oU<C;oU++){oW[oU>>>2]|=(oV.charCodeAt(oU)&255)<<(24-(oU%4)*8)}return new oS.init(oW,C)}};var T=oT.Utf8={stringify:function(C){try{return decodeURIComponent(escape(oK.stringify(C)))}catch(oU){throw new Error("Malformed UTF-8 data")}},parse:function(C){return oK.parse(unescape(encodeURIComponent(C)))}};var oO=i.BufferedBlockAlgorithm=oQ.extend({reset:function(){this._data=new oS.init();this._nDataBytes=0},_append:function(C){if(typeof C=="string"){C=T.parse(C)}this._data.concat(C);this._nDataBytes+=C.sigBytes},_process:function(o2){var oW=this._data;var o3=oW.words;var C=oW.sigBytes;var oZ=this.blockSize;var o1=oZ*4;var o0=C/o1;if(o2){o0=oL.ceil(o0)}else{o0=oL.max((o0|0)-this._minBufferSize,0)}var oY=o0*oZ;var oX=oL.min(oY*4,C);if(oY){for(var oV=0;oV<oY;oV+=oZ){this._doProcessBlock(o3,oV)}var oU=o3.splice(0,oY);oW.sigBytes-=oX}return new oS.init(oU,oX)},clone:function(){var C=oQ.clone.call(this);C._data=this._data.clone();return C},_minBufferSize:0});var oM=i.Hasher=oO.extend({cfg:oQ.extend(),init:function(C){this.cfg=this.cfg.extend(C);this.reset()},reset:function(){oO.reset.call(this);this._doReset()},update:function(C){this._append(C);this._process();return this},finalize:function(C){if(C){this._append(C)}var oU=this._doFinalize();return oU},blockSize:512/32,_createHelper:function(C){return function(oV,oU){return new C.init(oU).finalize(oV)}},_createHmacHelper:function(C){return function(oV,oU){return new oR.HMAC.init(C,oU).finalize(oV)}}});var oR=e.algo={};return e}(Math));var nY=dm;(function(i){var e=nY.lib;if(!e||!e.Hasher){return console.error("CryptoJS core library not properly loaded - missing Hasher class")}var oL=e.WordArray;var T=e.Hasher;var oM=nY.algo||(nY.algo={});if(typeof T.extend!=="function"){return console.error("Hasher.extend is not a function")}var oO=[];var oN=[];(function(){function oR(oV){var oU=i.sqrt(oV);for(var oT=2;oT<=oU;oT++){if(!(oV%oT)){return false}}return true}function oQ(oT){return((oT-(oT|0))*4294967296)|0}var oS=2;var oP=0;while(oP<64){if(oR(oS)){if(oP<8){oO[oP]=oQ(i.pow(oS,1/2))}oN[oP]=oQ(i.pow(oS,1/3));oP++}oS++}}());var C=[];var oK=oM.SHA256=T.extend({_doReset:function(){this._hash=new oL.init(oO.slice(0))},_doProcessBlock:function(oS,oR){var oV=this._hash.words;var o8=oV[0];var o7=oV[1];var o6=oV[2];var o5=oV[3];var o4=oV[4];var o3=oV[5];var o2=oV[6];var o1=oV[7];for(var o0=0;o0<64;o0++){if(o0<16){C[o0]=oS[oR+o0]|0}else{var oQ=C[o0-15];var pa=((oQ<<25)|(oQ>>>7))^((oQ<<14)|(oQ>>>18))^(oQ>>>3);var oW=C[o0-2];var o9=((oW<<15)|(oW>>>17))^((oW<<13)|(oW>>>19))^(oW>>>10);C[o0]=pa+C[o0-7]+o9+C[o0-16]}var oX=(o4&o3)^(~o4&o2);var oP=(o8&o7)^(o8&o6)^(o7&o6);var oZ=((o8<<30)|(o8>>>2))^((o8<<19)|(o8>>>13))^((o8<<10)|(o8>>>22));var oY=((o4<<26)|(o4>>>6))^((o4<<21)|(o4>>>11))^((o4<<7)|(o4>>>25));var oU=o1+oY+oX+oN[o0]+C[o0];var oT=oZ+oP;o1=o2;o2=o3;o3=o4;o4=(o5+oU)|0;o5=o6;o6=o7;o7=o8;o8=(oU+oT)|0}oV[0]=(oV[0]+o8)|0;oV[1]=(oV[1]+o7)|0;oV[2]=(oV[2]+o6)|0;oV[3]=(oV[3]+o5)|0;oV[4]=(oV[4]+o4)|0;oV[5]=(oV[5]+o3)|0;oV[6]=(oV[6]+o2)|0;oV[7]=(oV[7]+o1)|0},_doFinalize:function(){var oR=this._data;var oS=oR.words;var oP=this._nDataBytes*8;var oQ=oR.sigBytes*8;oS[oQ>>>5]|=128<<(24-oQ%32);oS[(((oQ+64)>>>9)<<4)+14]=i.floor(oP/4294967296);oS[(((oQ+64)>>>9)<<4)+15]=oP;oR.sigBytes=oS.length*4;this._process();return this._hash},clone:function(){var oP=T.clone.call(this);oP._hash=this._hash.clone();return oP}});nY.SHA256=T._createHelper(oK);nY.HmacSHA256=T._createHmacHelper(oK)}(Math));dm.SHA256=nY.SHA256;dm.HmacSHA256=nY.HmacSHA256;var cz=(function(){try{return typeof BigInt!=="undefined"&&typeof BigInt("1")!=="undefined"}catch(i){return false}})();function bY(oL,oM){var oK=dm.SHA256(dm.enc.Utf8.parse(oL));var T=oK.toString(dm.enc.Hex);var e=[];for(var C=0;C<T.length;C+=2){e.push(parseInt(T.substr(C,2),16))}oM(e)}function nQ(C){var i=C.toLowerCase().replace(/^0x/,"");if(!/^[0-9a-f]+$/.test(i)){throw new Error("invalid hex")}try{return BigInt("0x"+i)}catch(T){throw new Error("BigInt conversion failed")}}function nL(oL,oN,T){try{oL=oL%T;var C=BigInt(1);var oK=BigInt(0);var i=C%T;while(oN>oK){if(oN&C){i=(i*oL)%T}oN>>=C;if(oN>oK){oL=(oL*oL)%T}}return i}catch(oM){throw new Error("BigInt operation failed")}}function bt(e){if(typeof e==="string"){if(e.indexOf("0x")===0||e.indexOf("0X")===0){e=e.substring(2)}this.value=this.hexToArray(e)}else{if(typeof e==="number"){this.value=this.numToArray(e)}else{if(e instanceof Array){this.value=e.slice()}else{this.value=[0]}}}this.normalize()}bt.prototype.hexToArray=function(T){var e=[];for(var C=T.length-2;C>=0;C-=2){e.push(parseInt(T.substr(C,2),16))}if(T.length%2===1){e.push(parseInt(T.charAt(0),16))}return e};bt.prototype.numToArray=function(i){if(i===0){return[0]}var e=[];while(i>0){e.push(i&255);i=Math.floor(i/256)}return e};bt.prototype.normalize=function(){while(this.value.length>1&&this.value[this.value.length-1]===0){this.value.pop()}};bt.prototype.isZero=function(){return this.value.length===1&&this.value[0]===0};bt.prototype.compare=function(e){if(this.value.length!==e.value.length){return this.value.length-e.value.length}for(var C=this.value.length-1;C>=0;C--){if(this.value[C]!==e.value[C]){return this.value[C]-e.value[C]}}return 0};bt.prototype.add=function(T){var C=[];var oO=0;var oL=Math.max(this.value.length,T.value.length);for(var oM=0;oM<oL;oM++){var oK=oM<this.value.length?this.value[oM]:0;var e=oM<T.value.length?T.value[oM]:0;var oN=oK+e+oO;C.push(oN%256);oO=Math.floor(oN/256)}if(oO>0){C.push(oO)}return new bt(C)};bt.prototype.subtract=function(T){var C=[];var oN=0;var oL=Math.max(this.value.length,T.value.length);for(var oM=0;oM<oL;oM++){var oK=oM<this.value.length?this.value[oM]:0;var e=oM<T.value.length?T.value[oM]:0;var oO=oK-e-oN;if(oO<0){oO+=256;oN=1}else{oN=0}C.push(oO)}return new bt(C)};bt.prototype.multiply=function(oK){var T=[];var C=this.value.length+oK.value.length;for(var oM=0;oM<C;oM++){T.push(0)}for(var oM=0;oM<this.value.length;oM++){for(var oL=0;oL<oK.value.length;oL++){var e=this.value[oM]*oK.value[oL];T[oM+oL]+=e}}for(var oM=0;oM<T.length-1;oM++){T[oM+1]+=Math.floor(T[oM]/256);T[oM]%=256}return new bt(T)};bt.prototype.mod=function(T){var C=new bt(this.value);while(C.compare(T)>=0){var e=new bt(T.value);while(true){var i=new bt(e.value);i.value.unshift(0);if(i.compare(C)>0){break}e=i}C=C.subtract(e)}return C};function eg(oL,oN,oK){oL=oL.mod(oK);var e=new bt(1);while(!oN.isZero()){if(oN.value[0]&1){e=e.multiply(oL).mod(oK)}var oM=0;for(var T=oN.value.length-1;T>=0;T--){var C=oN.value[T]|(oM<<8);oN.value[T]=C>>1;oM=C&1}oN.normalize();if(!oN.isZero()){oL=oL.multiply(oL).mod(oK)}}return e}function la(i){var e=i.toLowerCase().replace(/^0x/,"");if(!/^[0-9a-f]+$/.test(e)){throw new Error("invalid hex")}return new bt(e)}function hr(T,C,i,oL){if(!T||!C||!i||!oL){if(oL){oL(false)}return}if(cz){try{mq(T,C,i,oL)}catch(oK){bA(T,C,i,oL)}}else{bA(T,C,i,oL)}}function mq(C,i,e,T){bY(C,function(oR){try{var oK=BigInt(0);var oM=BigInt(256);for(var oN=0;oN<8;oN++){oK=(oK*oM+BigInt(oR[oN]))%e.n}var oO=nQ(i);var oP=BigInt(0);if(oO<oP||oO>=e.n){T(false);return}var oL=nL(oO,e.e,e.n);T(oL===oK)}catch(oQ){bA(C,i,e,T)}})}function bA(C,i,e,T){bY(C,function(oR){try{var oK=new bt(0);var oM=new bt(256);for(var oN=0;oN<8;oN++){oK=oK.multiply(oM);var oQ=new bt(oR[oN]);oK=oK.add(oQ);oK=oK.mod(e.n)}var oO=la(i);if(oO.compare(new bt(0))<0||oO.compare(e.n)>=0){T(false);return}var oL=eg(oO,e.e,e.n);T(oL.compare(oK)===0)}catch(oP){T(false)}})}var gt;if(cz){gt={n:BigInt(9173503),e:BigInt(65537)}}else{gt={n:new bt(9173503),e:new bt(65537)}}if(window.B_BUSINESS_INFO){hr(window.B_BUSINESS_INFO["sign_content"],window.B_BUSINESS_INFO["signature"],gt,function(e){if(!e){var i=c0.popup_code;d5.sendMessage("sign_check","sign_error",i)}else{if(c0.business===0&&c0.unauth===1){dZ(jC,{from:"vtile"})}}})}var mL=(function(){var oW={};var oV="HIGH";var oP="FOCUS";var C={};var T;function i(oX){var o2=oX||[];for(var o3=0;o3<o2.length;o3++){var o6=o2[o3];var o5=[];for(var o1=0;o1<o6.length;o1++){var oY=o6[o1];o5.push(new d9(oY[0],oY[1]))}var oZ=new mw(o5);var o4=new ix("onbeforeaddoverlay",oZ);o4.overlay=oZ;o4.isLayerMask=true;T.dispatchEvent(o4);oZ._i(T);oT(oV,oZ);if(T.config.highRegion){if(T.config.highRegion.lineOpt){var o0=new cf(o5,T.config.highRegion.lineOpt);T.addOverlay(o0)}if(T.config.highRegion.focusOpt){oT(oP,oZ)}}}}function e(oX){var oY=new ix("onbeforeaddoverlay",oX);oY.overlay=oX;oY.isLayerMask=true;T.dispatchEvent(oY);oX._i(T);oT(oP,oX)}function oR(oX){oS(oP,oX)}function oT(oX,oY){if(oY){if(!oN(oX)){oW[oX]=[]}oW[oX].push(oY)}oL(oX)}function oS(oY,oZ){if(oZ){if(oN(oY)){for(var oX=0;oX<oW[oY].length;oX++){if(oW[oY][oX]===oZ){oW[oY].splice(oX,1);break}}}}else{delete oW[oY]}oL(oY)}function oL(o1){if(oN(o1)){var o2=[];for(var o0=0;o0<oU(o1).length;o0++){var oZ=oU(o1)[o0];var oX=oZ.getFillStyleForGL();var o3=oZ.buildFillVertex(k4);var oY=[oX,o3[0],o3[1]];oY.hashCode=oZ.hashCode;oY.hasMultipleParts=oZ.hasMultipleParts;o2.push(oY)}C[o1]=o2}else{delete C[o1]}}function oO(oX){return C[oX]}function oN(oX){return oW[oX]?true:false}function oU(oX){return oW[oX]}function oQ(oX,oY){if(oW[oX]){oW[oX].visible=oY}}function oK(oX){T=oX}function oM(){oW[oV]=[];oW[oP]=[];oW={};C={}}return{HIGH:oV,FOCUS:oP,kill:oM,setMap:oK,dataProcessFromHigh:i,addFocusMask:e,removeFocusMask:oR,getMask:oU,getRender:oO,setVisible:oQ}})();function jM(){this._map=null;this._container;this._type="control";this.blockInfoWindow=true;this._visible=true}jM.inherits(eX,"Control");hv.extend(jM.prototype,{initialize:function(e){this._map=e;if(this._container){if(this._opts&&this._opts.container){this._opts.container.appendChild(this._container)}else{e.container.appendChild(this._container)}return this._container}return},_i:function(e){if(!this._container&&this.initialize&&c2(this.initialize)){this._container=this.initialize(e)}this._opts=this._opts||{printable:false};this._setStyle();this._setPosition();if(this._container){this._container._jsobj=this}},_setStyle:function(){var i=this._container;if(i){var e=i.style;e.position="absolute";e.zIndex=this._cZIndex||"10";e.MozUserSelect="none";if(!this._opts.printable){hv.ac(i,"BMap_noprint")}hv.on(i,"contextmenu",kK)}},remove:function(){this._map=null;if(!this._container){return}this._container.parentNode&&this._container.parentNode.removeChild(this._container);this._container._jsobj=null;this._container=null},_render:function(e){if(this._opts&&this._opts.container){this._container=cQ(this._opts.container,'<div unselectable="on"></div>')}else{var i='<div unselectable="on"></div>';if(e&&e.config.autoSafeArea&&d4()){this._safeAreaContainer=cQ(this._map.container,i);this._safeAreaContainer.style.position="absolute";this._safeAreaContainer.style.bottom="env(safe-area-inset-bottom)";this._container=cQ(this._safeAreaContainer,i)}else{this._container=cQ(this._map.container,i)}}if(this._visible===false){this._container.style.display="none"}return this._container},_setPosition:function(){this.setAnchor(this._opts.anchor)},setAnchor:function(T){if(this.anchorFixed||typeof T!=="number"||isNaN(T)||T<BMAP_ANCHOR_TOP_LEFT||T>BMAP_ANCHOR_BOTTOM_RIGHT){T=this.defaultAnchor}this._opts.offset=this._opts.offset||this.defaultOffset;var C=this._opts.anchor;this._opts.anchor=T;if(!this._container){return}var oL=this._container;var e=this._opts.offset.width;var oK=this._opts.offset.height;oL.style.left=oL.style.top=oL.style.right=oL.style.bottom="auto";switch(T){case BMAP_ANCHOR_TOP_LEFT:oL.style.top=oK+"px";oL.style.left=e+"px";break;case BMAP_ANCHOR_TOP_RIGHT:oL.style.top=oK+"px";oL.style.right=e+"px";break;case BMAP_ANCHOR_BOTTOM_LEFT:oL.style.bottom=oK+"px";oL.style.left=e+"px";break;case BMAP_ANCHOR_BOTTOM_RIGHT:oL.style.bottom=oK+"px";oL.style.right=e+"px";break;default:break}var i=["TL","TR","BL","BR"];hv.rc(this._container,"anchor"+i[C]);hv.ac(this._container,"anchor"+i[T])},getAnchor:function(){return this._opts.anchor},setOffset:function(e){if(!e){return}this._opts=this._opts||{};this._opts.offset=new mU(e.width,e.height);if(!this._container){return}this.setAnchor(this._opts.anchor)},getOffset:function(){return this._opts.offset},getDom:function(){return this._container},show:function(){if(this._visible===true){return}this._visible=true;if(this._container){this._container.style.display=""}this.dispatchEvent(new ix("onshow"))},hide:function(){if(this._visible===false){return}this._visible=false;if(this._container){this._container.style.display="none"}this.dispatchEvent(new ix("onhide"))},isPrintable:function(){return !!this._opts.printable},isVisible:function(){if(!this._container&&!this._map){return false}return !!this._visible},_asyncLoadCode:function(){var e=this;ki.load("control",function(){if(e._asyncDraw){e._asyncDraw()}})}});var gv={TOP_LEFT:0,TOP_RIGHT:1,BOTTOM_LEFT:2,BOTTOM_RIGHT:3};cv.ControlAnchor=gv;window.BMAP_ANCHOR_TOP_LEFT=0;window.BMAP_ANCHOR_TOP_RIGHT=1;window.BMAP_ANCHOR_BOTTOM_LEFT=2;window.BMAP_ANCHOR_BOTTOM_RIGHT=3;window.BMAP_ANCHOR_TOP_CENTER=4;window.BMAP_ANCHOR_MIDDLE_LEFT=5;window.BMAP_ANCHOR_CENTER=6;window.BMAP_ANCHOR_MIDDLE_RIGHT=7;window.BMAP_ANCHOR_BOTTOM_CENTER=8;function i0(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("CopyrightControl")}jM.call(this);e=e||{};this._opts={printable:false};hv.extend(this._opts,e);this._copyrightCollection=[];this.defaultAnchor=BMAP_ANCHOR_BOTTOM_LEFT;this.defaultOffset=new mU(5,2);this.setAnchor(e.anchor);this._canShow=true;this.sateMapStyle=false;this.blockInfoWindow=false;this._asyncLoadCode()}i0.inherits(jM,"CopyrightControl");hv.extend(i0.prototype,{initialize:function(e){this._map=e;return this._container},addCopyright:function(T){var e={minZoom:0,bounds:null,content:"",mapType:""};for(var C in T){e[C]=T[C]}if(this._map){var oM=e.minZoom;if(oM===-1||oM<this._map.getMinZoom()||oM>this._map.getMaxZoom()){e.minZoom=this._map.getMinZoom()}if(e.mapType!==""&&!gA[e.mapType]){e.mapType=BMAP_NORMAL_MAP}}var oK=this.getCopyright(T.id);if(oK){for(var oL in e){oK[oL]=e[oL]}}else{this._copyrightCollection.push(e)}},getCopyright:function(T){for(var C=0,e=this._copyrightCollection.length;C<e;C++){if(this._copyrightCollection[C].id===T){return this._copyrightCollection[C]}}},getCopyrightCollection:function(){return this._copyrightCollection},addSateMapStyle:function(){this.sateMapStyle=true;if(this._container){hv.ac(this._container,"BMap_cpyCtrl_w")}},removeSateMapStyle:function(){this.sateMapStyle=false;if(this._container){hv.rc(this._container,"BMap_cpyCtrl_w")}}});function co(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("CityListControl")}jM.call(this);e=e||{};this.canCheckSize=e.canCheckSize===false?false:true;this.curCityName="";this.curCityCode="";this.defaultOffset=new mU(10,10);this.defaultAnchor=gv.TOP_LEFT;this.onChangeBefore=e.onChangeBefore||null;this.onChangeAfter=e.onChangeAfter||null;this.onChangeSuccess=e.onChangeSuccess||null;this.onOpen=e.onOpen||null;this.onClose=e.onClose||null;this._opts={printable:false,offset:e.offset||this.defaultOffset,anchor:e.anchor||this.defaultAnchor,expand:!!(e.expand),trigger:e.trigger};this.setAnchor(e.anchor);this._asyncLoadCode()}co.inherits(jM,"CityListControl");hv.extend(co.prototype,{initialize:function(e){this._map=e;return this._container}});function oJ(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("ScaleControl")}jM.call(this);e=e||{};this._opts={printable:false};this._opts=hv.extend(hv.extend(this._opts,{unit:"metric"}),e);this.defaultAnchor=BMAP_ANCHOR_BOTTOM_LEFT;this.defaultOffset=new mU(81,18);if(c9()){this.defaultOffset=new mU(75,10)}this.setAnchor(e.anchor);this._units={metric:{name:"metric",conv:1,incon:1000,u1:"m_2",u2:"km_2"},us:{name:"us",conv:3.2808,incon:5280,u1:"feet",u2:"mile"}};this.sateMapStyle=false;if(!this._units[this._opts.unit]){this._opts.unit="metric"}this._scaleText=null;this._numberArray={};this._asyncLoadCode();this.language=BMAP_LANGUAGE_ZH}window.BMAP_UNIT_METRIC="metric";window.BMAP_UNIT_IMPERIAL="us";oJ.inherits(jM,"ScaleControl");hv.extend(oJ.prototype,{initialize:function(e){this._map=e;return this._container},setUnit:function(e){this._opts.unit=this._units[e]&&this._units[e].name||this._opts.unit},getUnit:function(){return this._opts.unit},addSateMapStyle:function(){this.sateMapStyle=true;var e=this._container;if(e){hv.ac(e.children[0],"dark")}},removeSateMapStyle:function(){this.sateMapStyle=false;var e=this._container;if(e){hv.rc(e.children[0],"dark")}}});window.BMAP_NAVIGATION_CONTROL_LARGE=0;window.BMAP_NAVIGATION_CONTROL_SMALL=1;window.BMAP_NAVIGATION_CONTROL_PAN=2;window.BMAP_NAVIGATION_CONTROL_ZOOM=3;function n5(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("NavigationControl")}jM.call(this);e=e||{};this._opts={printable:false,showZoomInfo:true,enableGeolocation:false,type:BMAP_NAVIGATION_CONTROL_LARGE};hv.extend(this._opts,e);this.defaultOffset=new mU(30,10);this.defaultAnchor=BMAP_ANCHOR_TOP_LEFT;this._asyncLoadCode()}n5.inherits(jM,"NavigationControl");hv.extend(n5.prototype,{initialize:function(e){this._map=e;return this._container},setType:function(e){if(typeof e!=="number"||e<BMAP_NAVIGATION_CONTROL_LARGE||e>BMAP_NAVIGATION_CONTROL_ZOOM){this._opts.type=BMAP_NAVIGATION_CONTROL_LARGE;return}this._opts.type=e},getType:function(){return this._opts.type}});window.BMAP_MAPTYPE_CONTROL_HORIZONTAL=0;window.BMAP_MAPTYPE_CONTROL_DROPDOWN=1;window.BMAP_MAPTYPE_CONTROL_MAP=2;function G(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("MapTypeControl")}jM.call(this);i=i||{};this._opts={printable:false,type:i.type||BMAP_MAPTYPE_CONTROL_MAP,mapTypes:[BMAP_NORMAL_MAP,BMAP_SATELLITE_MAP,BMAP_HYBRID_MAP]};if(K.apiVersionIsGL()){this._opts.mapTypes=[BMAP_NORMAL_MAP,BMAP_EARTH_MAP,BMAP_HYBRID_MAP]}this.defaultAnchor=BMAP_ANCHOR_TOP_RIGHT;this.defaultOffset=new mU(10,10);this.setAnchor(i.anchor);this._opts=hv.extend(hv.extend(this._opts,{offset:this.defaultOffset,enableSwitch:true}),i);if(i.mapTypes instanceof Array){this._opts.mapTypes=i.mapTypes.slice(0)}var e=this;ki.load("control",function(){e._asyncDraw()})}G.inherits(jM,"MapTypeControl");hv.extend(G.prototype,{initialize:function(e){this._map=e;return this._container},showStreetLayer:function(e){this._map.showStreetLayer(e)}});function nc(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("ZoomControl")}jM.call(this);e=e||{};this._opts={};this._opts=hv.extend(this._opts,e);this._zoomInDisabled=false;this._zoomOutDisabled=false;this._zoomInTapped=false;this._zoomOutTapped=false;this.defaultAnchor=gv.BOTTOM_RIGHT;this.defaultOffset=new mU(15,20);this.setAnchor(e.anchor);this._asyncLoadCode()}nc.inherits(jM,"ZoomControl");hv.extend(nc.prototype,{initialize:function(e){this._map=e;return this._container}});function jn(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("LocationControl")}jM.call(this);e=e||{};this._opts={autoZoom:true,autoViewport:true,showAddressBar:!K.apiVersionIsGL(),enableAutoLocation:false,locationIcon:null,};this._opts=hv.extend(this._opts,e);this.defaultAnchor=gv.BOTTOM_LEFT;this.defaultOffset=new mU(10,50);this.watchPosition=this._opts.watchPosition||false;this.useCompass=this._opts.useCompass||false;this.locMarker=null;this.locLevel=16;this.addressComponent=null;this.setAnchor(this._opts.anchor);this.onLocationStart=e.onLocationStart||null;this._asyncLoadCode()}jn.inherits(jM,"LocationControl");hv.extend(jn.prototype,{initialize:function(e){this._map=e;return this._container},startLocation:function(){this._startLocationCalled=true},location:function(){this.startLocation()},getAddressComponent:function(){return this.addressComponent},stopLocationTrace:function(){},setOptions:function(e){e=e||{};hv.extend(this._opts,e)}});function cB(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("LogoControl")}jM.call(this);e=e||{};this._opts={};this._opts=hv.extend(this._opts,e);this.defaultAnchor=gv.BOTTOM_LEFT;this.defaultOffset=new mU(5,15);if(c9()){this.defaultOffset=new mU(10,10)}this.setAnchor(e.anchor)}cB.inherits(jM,"LogoControl");hv.extend(cB.prototype,{initialize:function(i){this._map=i;var e=this._container=document.createElement("div");e.innerHTML='<img src="'+K.apiHost+'/images/logo_hd.png"  style="height:21px;width:62px;"/>';i.getContainer().appendChild(e);return e}});function n9(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("OverviewMapControl")}jM.call(this);e=e||{};this._opts={printable:false,zoomInterval:4,isOpen:Boolean(e.isOpen),size:e.size||new mU(150,150),padding:4};this._opts=hv.extend(this._opts,e);this.defaultAnchor=gv.BOTTOM_RIGHT;this.defaultOffset=new mU(0,0);this.setSize(this._opts.size);this.setAnchor(this._opts.anchor);this._asyncLoadCode()}n9.inherits(jM,"OverviewMapControl");hv.extend(n9.prototype,{initialize:function(e){this._map=e;return this._container},remove:function(){jM.prototype.remove.call(this)},isOpen:function(){return this._opts.isOpen},changeView:function(){this._opts.isOpen=!this._opts.isOpen},setSize:function(e){if(!(e instanceof mU)){e=new mU(150,150)}if(e.width<=0){e.width=150}if(e.height<=0){e.height=150}this._opts.size=e},getSize:function(){return this._opts.size},});function aW(e,i){this._map=e;this._indoorInfo=i;this._visible=true;this._adjustVisible=true;this._isMobile=c9();this._sizeConfig={FLOOR_BTN_HEIGHT:this._isMobile?35:26,SWITCH_ARROW_HEIGHT:this._isMobile?20:15};this._init()}aW.prototype._init=function(){this._render();this._bindDom();this._bind();this._adjustDisplayHeight();var e=new ix("onindoor_bar_show");e.uid=this._indoorInfo.uid;e.floors=this._indoorInfo.floors;this._map.dispatchEvent(e)};aW.prototype._render=function(){if(!this._indoorInfo){return}var oN=this._isMobile;var e=this._div=da("div");hv.ac(e,"floor-select-container");oN&&hv.ac(e,"mobile");oN&&hv.ac(e,"all-border-radius");var i=this._btnTop=da("button");hv.ac(i,"floor-switch-top");hv.ac(i,"top-border-radius");var oL=da("div");hv.ac(oL,"floor-switch-top-icon");i.appendChild(oL);var oK=this._btnBottom=da("button");var C=da("div");hv.ac(C,"floor-switch-bottom-icon");oK.appendChild(C);hv.ac(oK,"floor-switch-bottom");hv.ac(oK,"bottom-border-radius");var T=this._floorsContainer=da("div");hv.ac(T,"floors-container");T.appendChild(this._createFloorsDom());this._div.appendChild(i);this._div.appendChild(T);this._div.appendChild(oK);var oO=0;if(this._btnTop.style.display===""){oO=2*this._sizeConfig.SWITCH_ARROW_HEIGHT}this._div.style.height=parseInt(this._floorsContainer.style.height,10)+oO+"px";this._map.getContainer().appendChild(this._div);if(!oN){var oM=this;setTimeout(function(){oM._div.style.right="20px"},20)}};aW.prototype._createFloorsDom=function(){if(!this._indoorInfo){return}var C=this._ol=da("ol");var oL=this._indoorInfo.currentFloor;for(var oK=this._indoorInfo.floors.length-1;oK>=0;oK--){var oM=this._indoorInfo.floors[oK].floorName;var e=da("li");var T=da("button");hv.ac(T,"btn-select-floor");if(oK===oL){hv.ac(T,"selected")}T.setAttribute("data-floor",oK);T.innerHTML=oM;e.appendChild(T);C.appendChild(e)}return C};aW.prototype._updateUI=function(){if(!this._ol){this._render();this._bind();this._adjustDisplayHeight();return}this._ol=null;this._ol=this._createFloorsDom();this._floorsContainer.innerHTML="";this._floorsContainer.appendChild(this._ol);this._adjustDisplayHeight()};aW.prototype._bindDom=function(){var e=this;hv.on(this._floorsContainer,"click",function(T){var C=T.target||T.srcElement;if(C.tagName.toLowerCase()==="button"){e._map.showIndoor(e._indoorInfo.uid,parseInt(C.getAttribute("data-floor"),10));var i=new ix("onindoor_bar_click");i.uid=e._indoorInfo.uid;e._map.dispatchEvent(i)}});hv.on(this._floorsContainer,"mouseover",function(C){var i=C.target;if(i.tagName.toLowerCase()==="button"){hv.ac(i,"hover")}});hv.on(this._floorsContainer,"mouseout",function(C){var i=C.target;if(i.tagName.toLowerCase()==="button"){hv.rc(i,"hover")}});hv.on(this._floorsContainer,"touchstart",function(C){var i=C.target;if(i.tagName.toLowerCase()==="button"){hv.ac(i,"onmousedown")}});hv.on(this._floorsContainer,"touchend",function(C){var i=C.target;if(i.tagName.toLowerCase()==="button"){hv.rc(i,"onmousedown")}});hv.on(this._btnTop,"mouseover",function(i){if(this._disable){return}hv.ac(this,"hover")});hv.on(this._btnTop,"mouseout",function(i){hv.rc(this,"hover")});hv.on(this._btnBottom,"mouseover",function(i){if(this._disable){return}hv.ac(this,"hover")});hv.on(this._btnBottom,"mouseout",function(i){hv.rc(this,"hover")});hv.on(this._btnTop,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}hv.ac(this,"onmousedown")});hv.on(this._btnTop,"touchend",function(i){hv.rc(this,"onmousedown")});hv.on(this._btnBottom,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}hv.ac(this,"onmousedown")});hv.on(this._btnBottom,"touchend",function(i){hv.rc(this,"onmousedown")});hv.on(this._btnTop,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)+26)});hv.on(this._btnBottom,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)-26)});hv.on(this._div,"mousemove",aF);hv.on(this._div,"wheel",kK);hv.on(this._div,"mousewheel",kK);this._map.addEventListener("resize",function(){e._adjustDisplayHeight()})};aW.prototype._adjustDisplayHeight=function(){if(!this._indoorInfo){return}var oL=this._map.getSize().height;var oM=this._sizeConfig.FLOOR_BTN_HEIGHT;var oN=oL-291-100;if(this._isMobile){oN=oL-12-108-this._map.config.bottomOffset}var e=this._indoorInfo.floors.length;var C=e*oM;var T=e;var oP=0;var oQ=this._floorsContainer.children[0];if(C>oN){this._showArrow=true;hv.rc(oQ.children[0].children[0],"top-border-radius");hv.rc(oQ.children[e-1].children[0],"bottom-border-radius")}else{this._showArrow=false;hv.ac(oQ.children[0].children[0],"top-border-radius");hv.ac(oQ.children[e-1].children[0],"bottom-border-radius")}while(C>oN){if(T===0){break}T--;oP=2*this._sizeConfig.SWITCH_ARROW_HEIGHT;C=T*oM+oP}this._currentDisplayHeight=C;if(T<3){this._setAdjustVisbile(false)}else{this._setAdjustVisbile(true)}this._floorsContainer.style.height=T*oM+"px";var oK=this._indoorInfo.currentFloor;var i=e-oK;var oO=oK-1;this._div.style.height=parseInt(this._floorsContainer.style.height,10)+oP+"px";var oR=-(e-(oK+Math.round(T/2)))*oM;this._setBarSliderTop(oR);if(T<e){hv.show(this._btnTop);hv.show(this._btnBottom)}else{hv.hide(this._btnTop);hv.hide(this._btnBottom);this._setBarSliderTop(0)}if(this._isMobile){this._div.style.bottom=108+this._map.config.bottomOffset+"px"}};aW.prototype._setBarSliderTop=function(T){var C=26;var i=this._indoorInfo.floors.length;var e=i*C;if(this._currentDisplayHeight){if(this._showArrow){e=this._currentDisplayHeight-30}else{e=this._currentDisplayHeight}}if(e-T>=i*C){T=e-i*C;hv.ac(this._btnBottom,"disable");hv.rc(this._btnBottom,"hover");this._btnBottom._disable=true}else{hv.rc(this._btnBottom,"disable");this._btnBottom._disable=false}if(T>=0){T=0;hv.ac(this._btnTop,"disable");hv.rc(this._btnTop,"hover");this._btnTop._disable=true}else{hv.rc(this._btnTop,"disable");this._btnTop._disable=false}this._ol.style.top=T+"px"};aW.prototype._setAdjustVisbile=function(e){if(this._adjustVisible===e){return}this._adjustVisible=e;if(e&&this._visible){this._div.style.display="";this._div.style.right="20px"}else{this._div.style.display="none"}};aW.prototype._bind=function(){var i=this._map;var e=this;i.on("indoor_status_changed",function(oN){if(e._visible===false){return}var C=e._ol;var oL=oN.uid;if(!oL){return}var oM=oN.floor;for(var oK=0;oK<C.children.length;oK++){var T=C.children[oK].children[0];if(parseInt(T.getAttribute("data-floor"),10)===oM){hv.ac(T,"selected")}else{hv.rc(T,"selected")}}});i.on("zoomend",function(C){if(this.getZoom()<17){e._setAdjustVisbile(false)}else{e._setAdjustVisbile(true)}})};aW.prototype.setInfo=function(e){if(this._indoorInfo&&this._indoorInfo.uid===e.uid){return}this._indoorInfo=e;this._updateUI()};aW.prototype.show=function(){if(this._visible===true){return}this._visible=true;if(!this._isMobile){this._div.style.right="20px"}else{this._div.style.display=""}var e=new ix("onindoor_bar_show");e.uid=this._indoorInfo.uid;e.floors=this._indoorInfo.floors;this._map.dispatchEvent(e)};aW.prototype.hide=function(){if(this._visible===false){return}this._visible=false;if(!this._isMobile){this._div.style.right="-30px"}else{this._div.style.display="none"}};function hy(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("NavigationControl3D")}this._opts=e||{};this.defaultOffset=new mU(2,80);this.defaultAnchor=BMAP_ANCHOR_TOP_RIGHT;if(this._opts.anchor===undefined){this.setAnchor(this.defaultAnchor)}else{this.setAnchor(this._opts.anchor)}this._firstAnimation=true}hy.inherits(jM,"NavigationControl3D");hv.extend(hy.prototype,{initialize:function(C){this._map=C;this._createDom();this._bindDom();this._bind();if(!c9()){this._headingControl=new mv(this._map,this._div)}this._tiltControl=new eB(this._map,this._div);this._render();var i=this._map.getMapTypeId();var e=this;if(i==="B_EARTH_MAP"||this._map._renderType==="webgl"){e._div.style.opacity="1";e._div.style.visibility="visible"}else{e._div.style.opacity="0";e._div.style.visibility="hidden"}return this._container},_createDom:function(){var i=this._div=document.createElement("div");this._container=i;var e=i.style;e.position="absolute";e.zIndex=5;e.width="52px";e.height="88px";if(K.uiVersionIsGL()){e.height="82px"}e.right="-3px";e.bottom="79px";e.opacity="0";e.visibility="hidden";e.WebkitTransition=e.transition="opacity .3s ease-out,visibility .3s ease-out"},_render:function(){var e=document.getElementById("map-operate");if(e){e.appendChild(this._div)}else{this._map.getContainer().appendChild(this._div)}},_bindDom:function(){this._div.addEventListener("mousemove",aF)},_bind:function(){if(this._map._renderType==="webgl"){return}var e=this;this._map.on("maptypechange",function(){if(this.mapType==="B_EARTH_MAP"){if(e._firstAnimation){e._firstAnimation=false;setTimeout(function(){e._div.style.opacity="1";e._div.style.visibility="visible"},300)}else{e._div.style.opacity="1";e._div.style.visibility="visible"}}else{e._div.style.opacity="0";e._div.style.visibility="hidden"}})}});function mv(C,i){this._map=C;this._target=C;var T=C.temp.originMapType||C.mapType;if(T==="B_EARTH_MAP"&&C._earth){this._target=C._earth}this._outContainer=i||C.getContainer();this._imgRatio=ja()>=li.HIGH_RES_MIN_RATIO?2:1;this._imgPath=K.imgPath+"earth-navi-control-pc4"+(this._imgRatio===2?"-2x.png":".png");this._enabled=true;var e=this;this._setHeadingOptions={callback:function(){e._target.setLock(false)}};this._init()}hv.extend(mv.prototype,{_init:function(){this._createDom();this._render();this._bindDom();this._bind();this._updateUI();this._checkEnable()},_checkEnable:function(){if(this._target.getZoom()>=this._target._enableHeadingZoom){this.enable()}else{this.disable()}},_createDom:function(){var e=!K.uiVersionIsGL();var C=this._div=da("div");var i=C.style;i.position="absolute";i.zIndex=5;i.top="0";i.left="0";i.width="52px";i.height="52px";if(e){C.className="BMap_navCtrl3D_compass"}else{i.height="54px";i.background="url("+this._imgPath+") no-repeat";i.backgroundSize="266px auto"}this._rotateCCW=this._createButton();this._rotateCCW.title="閫嗘椂閽堣浆鍔�";i=this._rotateCCW.style;i.left="2px";i.top="5px";i.zIndex="1";i.width="15px";i.height="42px";i.backgroundPosition="-75px -5px";this._rotateCW=this._createButton();this._rotateCW.title="椤烘椂閽堣浆鍔�";i=this._rotateCW.style;i.right="2px";i.top="5px";i.zIndex="1";i.width="15px";i.height="42px";i.backgroundPosition="-75px -5px";i.WebkitTransform=i.transform="scaleX(-1)";this._compass=this._createButton();this._compass.title="鎭㈠姝e寳鏂瑰悜";i=this._compass.style;i.left="19px";i.top="4px";i.width="14px";i.height="44px";if(e){this._compass.className="BMap_navCtrl3D_needle";i.background="none"}else{i.backgroundPosition="-56px -4px"}i.WebkitTransform=i.transform="rotate(0deg)";this._div.appendChild(this._rotateCCW);this._div.appendChild(this._compass);this._div.appendChild(this._rotateCW);this._domRendered=true},_createButton:function(){var e=da("button");var i=e.style;i.position="absolute";i.outline="none";i.border="none";i.background="url("+this._imgPath+") no-repeat";i.backgroundSize="266px auto";i.cursor="pointer";return e},_render:function(){this._outContainer.appendChild(this._div)},enable:function(){this._enabled=true;if(this._domRendered){this._rotateCCW.style.cursor="pointer";this._rotateCCW.style.opacity=1;this._rotateCW.style.cursor="pointer";this._rotateCW.style.opacity=1;this._compass.style.cursor="pointer";this._compass.style.opacity=1}},disable:function(){this._enabled=false;if(this._domRendered){this._rotateCCW.style.cursor="";this._rotateCCW.style.opacity=0.4;this._rotateCW.style.cursor="";this._rotateCW.style.opacity=0.4;this._compass.style.cursor="";this._compass.style.opacity=0.4}},_bindDom:function(){mj(this._div,["mousedown","click","dblclick"]);var i=this._map;var e=this;this._rotateCW.addEventListener("click",function(){if(e._isOperating||e._enabled===false){return}if(e._target.getLock()){return}if(e._target.getHeading()===360){e._target.setHeading(0)}e._target.setLock(true);e._target.setHeading(e._target.getHeading()+90,e._setHeadingOptions);i.fire(new ix("onrotatecwclick"))},false);this._rotateCCW.addEventListener("click",function(){if(e._isOperating||e._enabled===false){return}if(e._target.getLock()){return}if(e._target.getHeading()===-360){e._target.setHeading(0)}e._target.setLock(true);e._target.setHeading(e._target.getHeading()-90,e._setHeadingOptions);i.fire(new ix("onrotateccwclick"))},false);this._rotateCW.addEventListener("mouseover",function(){if(e._enabled===false){return}this.style.backgroundPosition="-89px -5px"},false);this._rotateCW.addEventListener("mouseout",function(){if(e._enabled===false){return}this.style.backgroundPosition="-75px -5px"},false);this._rotateCCW.addEventListener("mouseover",function(){if(e._enabled===false){return}this.style.backgroundPosition="-89px -5px"},false);this._rotateCCW.addEventListener("mouseout",function(){if(e._enabled===false){return}this.style.backgroundPosition="-75px -5px"},false);this._compass.addEventListener("click",function(){if(e._isOperating||e._enabled===false){return}if(e._target.getLock()){return}e._target.setLock(true);var C=false;if(e._target.getTilt()!==0){C=true;e._target.setTilt(0,e._setHeadingOptions)}if(e._target.getHeading()%360!==0){C=true;e._target.resetHeading(e._setHeadingOptions)}if(!C){e._target.setLock(false)}i.fire(new ix("oncompassclick"))},false)},_bind:function(){var e=this;this._bindTarget(this._target);if(this._map._renderType==="webgl"){this._map.addEventListener("maptypechange",function(i){if(this.mapType==="B_EARTH_MAP"){e._target=e._map._earth}else{e._target=e._map}e._bindTarget(e._target);e._checkEnable()})}},_bindTarget:function(i){if(i===this._map&&this._mapBinded){return}if(i===this._map._earth&&this._earthBinded){return}var e=this;i.addEventListener("heading_changed",function(C){e._updateUI()});i.addEventListener("animation_start",function(C){e._isOperating=true});i.addEventListener("animation_end",function(C){e._isOperating=false});i.on("load",function(){e._checkEnable()});i.on("zoom_changed",function(){e._checkEnable()});if(i===this._map){this._mapBinded=true}else{this._earthBinded=true}},_updateUI:function(){var e=this._target.getHeading();var i=this._compass.style;i.WebkitTransform=i.transform="rotate("+e+"deg)"},hide:function(){this._div.style.display="none"},show:function(){this._div.style.display="block"}});function eB(C,i){this._map=C;this._target=C;var T=C.temp.originMapType||C.mapType;if(T==="B_EARTH_MAP"&&C._earth){this._target=C._earth}this._outContainer=i||C.getContainer();this._imgRatio=ja()>=li.HIGH_RES_MIN_RATIO?2:1;this._imgPath=K.imgPath+"gl-navi-control-pc4"+(this._imgRatio===2?"-2x.png":".png");this._enabled=true;this._diffBgPosition=3;if(K.uiVersionIsGL()){this._diffBgPosition=0}var e=this;this._setTiltOptions={callback:function(){e._target.setLock(false)}};this._init()}hv.extend(eB.prototype,{_init:function(){this._createDom();this._render();this._bindDom();this._bind();this._checkEnable()},_checkEnable:function(){if(this._target.getZoom()>=this._target._enableTiltZoom){this.enable()}else{this.disable()}},_createDom:function(){var i=!K.uiVersionIsGL();this._isV4=i;var e=this._div=da("button");e.title="鍊炬枩";var C=e.style;if(i){e.className="BMap_navCtrl3D_tilt";e.textContent="2D"}else{C.backgroundImage="url("+this._imgPath+")";C.position="absolute";C.zIndex=5;C.outline="none";C.border="none";C.cursor="pointer";C.width="26px";C.height="26px";C.top="56px";C.right="13px";C.backgroundSize="266px auto";C.backgroundPosition="-110px 1px";C.backgroundColor="#fff";C.backgroundRepeat="no-repeat";C.boxShadow="1px 2px 1px rgba(0, 0, 0, .15)"}},enable:function(){this._enabled=true;if(this._div){this._div.style.cursor="pointer"}this._updateUI()},disable:function(){this._enabled=false;if(this._div){this._div.style.cursor=""}this._updateUI()},_render:function(){this._outContainer.appendChild(this._div)},_bindDom:function(){var e=this;this._div.addEventListener("mousedown",function(T){if(!e._enabled){return}if(e._target.getLock()){return}var i=e._target.getTilt();var C;if(i===e._map.getCurrentMaxTilt()){C="out"}else{if(i===0){C="in"}else{C=e._preTrend?e._preTrend:"in"}}e._curTrend=C;e._clickTimer=setTimeout(function(){e._map.fire(new ix("ontiltmsdown"));e._tiltAni=new ij({duration:9999999,render:function(oK){i=e._target.getTilt();if(C==="in"&&i<e._map.getCurrentMaxTilt()){e._target.setTilt(i+1,{noAnimation:true})}else{if(C==="out"&&i>0){e._target.setTilt(i-1,{noAnimation:true})}}},finish:function(){e._tiltAni=null}});e._clickTimer=null},200);T.stopPropagation()},false);this._div.addEventListener("mouseup",function(i){if(!e._enabled){return}if(e._tiltAni){e._tiltAni.stop()}e._preTrend=e._curTrend},false);this._div.addEventListener("click",function(T){if(!e._enabled){return}if(!e._clickTimer){return}if(e._target.getLock()){return}clearTimeout(e._clickTimer);e._map.fire(new ix("ontiltclick"));var i=e._target.getTilt();e._target.setLock(true);T.stopPropagation();var C=e._map.getCurrentMaxTilt();if(e._curTrend==="in"){e._target.setTilt(C,e._setTiltOptions)}else{if(e._curTrend==="out"){e._target.setTilt(0,e._setTiltOptions)}else{if(i<C){e._target.setTilt(C,e._setTiltOptions)}else{e._target.setTilt(0,e._setTiltOptions)}}}},false);this._div.addEventListener("mouseover",function(i){if(!e._enabled){return}e._mouseOver=true;e._updateUI()},false);this._div.addEventListener("mouseout",function(i){if(!e._enabled){return}e._mouseOver=false;e._updateUI()},false);mj(this._div,["mousedown","click","dblclick"])},_bind:function(){var e=this;var i=this._map;this._bindTarget(this._target);if(this._map._renderType==="webgl"){this._map.addEventListener("maptypechange",function(C){if(this.mapType==="B_EARTH_MAP"){e._target=e._map._earth}else{e._target=e._map}e._bindTarget(e._target);e._checkEnable()})}},_bindTarget:function(i){if(i===this._map&&this._mapBinded){return}if(i===this._map._earth&&this._earthBinded){return}var e=this;i.on("load",function(){e._checkEnable()});i.on("zoom_changed",function(){e._checkEnable()});i.on("tilt_changed",function(){e._updateUI()});if(i===this._map){this._mapBinded=true}else{this._earthBinded=true}},_updateUI:function(){var C=this._target.getTilt();if(this._isV4){if(!this._div){return}this._div.textContent=C>0?"3D":"2D";if(this._enabled){this._div.title=C>0?"鎭㈠":"鍊炬枩";this._div.classList.remove("BMap_navCtrl3D_tilt_disabled")}else{this._div.title="璇锋斁澶у湴鍥惧悗鎿嶄綔";this._div.classList.add("BMap_navCtrl3D_tilt_disabled")}return}var i=0;var T=0;var e=0;if(C>0){i=78}if(this._mouseOver){e=52}if(this._enabled===false){T=26;e=0;i=0}var oK="-"+(110+i+T+e-this._diffBgPosition)+"px "+(1+this._diffBgPosition)+"px";this._div&&(this._div.style.backgroundPosition=oK);if(this._enabled){if(C>0){this._div&&(this._div.title="鎭㈠")}else{this._div&&(this._div.title="鍊炬枩")}}else{this._div&&(this._div.title="璇锋斁澶у湴鍥惧悗鎿嶄綔")}},hide:function(){this._div.style.display="none"},show:function(){this._div.style.display="block"}});function kH(i){eX.call(this);this._opts={container:null,cursor:"default",marker:true};this._opts=hv.extend(this._opts,i);this._type="contextmenu";this._map=null;this._container;this._left=0;this._top=0;this._items=[];this._rItems=[];this._dividers=[];this._enable=true;this.curPixel=null;this.curPoint=null;this._isOpen=false;var e=this;ki.load("menu",function(){e._draw()})}kH.inherits(eX,"ContextMenu");hv.extend(kH.prototype,{initialize:function(i,e){this._map=i;this._overlay=e||null},remove:function(){this._map=this._overlay=null},addItem:function(oK,e){if(!oK||oK._type!="menuitem"||oK._text==""||oK._width<=0){return}for(var T=0,C=this._items.length;T<C;T++){if(this._items[T]===oK){return}}if(e===undefined||e>this._items.length-1){e=-1}oK._insertIndex=e;if(e===-1){this._items.push(oK);this._rItems.push(oK)}else{this._items.splice(e,0,oK);this._rItems.splice(e,0,oK)}},removeItem:function(T){if(!T||T._type!="menuitem"){return}for(var C=0,e=this._items.length;C<e;C++){if(this._items[C]===T){this._items[C].remove();this._items.splice(C,1);delete T._insertIndex;e--}}for(var C=0,e=this._rItems.length;C<e;C++){if(this._rItems[C]===T){this._rItems[C].remove();this._rItems.splice(C,1);delete T._insertIndex;e--}}},addSeparator:function(e){if(e===undefined||e>this._items.length-1){e=-1}var i={_type:"divider",_dIndex:this._dividers.length,_insertIndex:e};this._dividers.push({dom:null});if(e===-1){this._items.push(i)}else{this._items.splice(e,0,i)}},removeSeparator:function(C){if(!this._dividers[C]){return}for(var T=0,e=this._items.length;T<e;T++){if(this._items[T]&&this._items[T]._type=="divider"&&this._items[T]._dIndex==C){this._items.splice(T,1);e--}if(this._items[T]&&this._items[T]._type=="divider"&&this._items[T]._dIndex>C){this._items[T]._dIndex--}}this._dividers.splice(C,1)},getDom:function(){return this._container},show:function(){if(this._isOpen==true){return}this._isOpen=true},hide:function(){if(this._isOpen==false){return}this._isOpen=false},setCursor:function(e){if(!e){return}this._opts.cursor=e},getItem:function(e){return this._rItems[e]},enable:function(){this._enable=true},disable:function(){this._enable=false}});function lx(C,T,i){if(!C||!T||typeof T!="function"){return}eX.call(this);this._opts={width:100,id:""};i=i||{};this._opts.width=(i.width*1)?i.width:100;this._opts.id=i.id?i.id:"";this._text=C+"";this._callback=T;this._map=null;this._type="menuitem";this._contextmenu=null;this._container=null;this._enabled=true;var e=this;ki.load("menu",function(){e._draw()})}lx.inherits(eX,"MenuItem");hv.extend(lx.prototype,{initialize:function(e,i){this._map=e;this._contextmenu=i},remove:function(){this._contextmenu=null;this._map=null},setText:function(e){if(!e){return}this._text=e+""},getDom:function(){return this._container},enable:function(){this._enabled=true},disable:function(){this._enabled=false},setIcon:function(){console.warn("褰撳墠鐗堟湰鏆備笉鏀寔 menuItem.setIcon")}});function lz(e,i){this.setSouthWest(e);this.setNorthEast(i)}hv.extend(lz.prototype,{isEmpty:function(){return this.sw===null&&this.ne===null},equals:function(e){if(!e||e.isEmpty()||this.isEmpty()){return false}return this.sw.equals(e.sw)&&this.ne.equals(e.ne)},containsBounds:function(e){if(!e||e.isEmpty()||this.isEmpty()){return false}return(e.sw.lng>this.sw.lng&&e.ne.lng<this.ne.lng&&e.sw.lat>this.sw.lat&&e.ne.lat<this.ne.lat)},getCenter:function(){if(this.isEmpty()){return null}if(Math.abs(this.sw.lng-this.ne.lng)<=fA.HALF_SIZE){return new d9((this.sw.lng+this.ne.lng)/2,(this.sw.lat+this.ne.lat)/2)}else{var i=this.sw.lng;var C=this.ne.lng;if(i<0){i+=fA.HALF_SIZE*2}else{C+=fA.HALF_SIZE*2}var e=(i+C)/2;if(e>fA.HALF_SIZE){e-=fA.HALF_SIZE*2}return new d9(e,(this.sw.lat+this.ne.lat)/2)}},intersects:function(C){if(!C||C.isEmpty()||this.isEmpty()){return null}if(Math.max(C.sw.lng,C.ne.lng)<Math.min(this.sw.lng,this.ne.lng)||Math.min(C.sw.lng,C.ne.lng)>Math.max(this.sw.lng,this.ne.lng)||Math.max(C.sw.lat,C.ne.lat)<Math.min(this.sw.lat,this.ne.lat)||Math.min(C.sw.lat,C.ne.lat)>Math.max(this.sw.lat,this.ne.lat)){return null}var oK=Math.max(this.sw.lng,C.sw.lng);var i=Math.min(this.ne.lng,C.ne.lng);var T=Math.max(this.sw.lat,C.sw.lat);var e=Math.min(this.ne.lat,C.ne.lat);return new lz(new d9(oK,T),new d9(i,e))},setMinMax:function(){this.minX=this.sw?this.sw.lng:null;this.minY=this.sw?this.sw.lat:null;this.maxX=this.ne?this.ne.lng:null;this.maxY=this.ne?this.ne.lat:null},containsPoint:function(e){if(!e){return}return(e.lng>=this.sw.lng&&e.lng<=this.ne.lng&&e.lat>=this.sw.lat&&e.lat<=this.ne.lat)},extend:function(e){if(!e){return}var i=e.lng;var C=e.lat;if(!this.sw){this.sw=e.clone()}if(!this.ne){this.ne=e.clone()}if(this.sw.lng>i){this.sw.lng=i}if(this.ne.lng<i){this.ne.lng=i}if(this.sw.lat>C){this.sw.lat=C}if(this.ne.lat<C){this.ne.lat=C}},getMin:function(){return this.sw},getMax:function(){return this.ne},getSouthWest:function(){return this.sw},getNorthEast:function(){return this.ne},setSouthWest:function(e){this.sw=e?e.clone():null},setNorthEast:function(e){this.ne=e?e.clone():null},clone:function(){return new lz(this.sw,this.ne)},toSpan:function(){var e;if(this.isEmpty()){e=new mU(0,0)}else{e=new mU(Math.abs(this.ne.lng-this.sw.lng),Math.abs(this.ne.lat-this.sw.lat))}Object.defineProperties(e,{lng:{value:e.width},lat:{value:e.height}});return e},div:function(e){if(!e||e.isEmpty()||this.isEmpty()){return 0}return((this.ne.lng-this.sw.lng)*(this.ne.lat-this.sw.lat))/((e.ne.lng-e.sw.lng)*(e.ne.lat-e.sw.lat))},makeNormalizedPoint:function(e){this.normalizedTopLeft=this.pointTopLeft.clone();this.normalizedTopRight=this.pointTopRight.clone();this.normalizedBottomRight=this.pointBottomRight.clone();this.normalizedBottomLeft=this.pointBottomLeft.clone();while(e<0){e+=360}e=e%360;if(e>=0&&e<90||e>=270&&e<360){if(this.normalizedTopRight.lng<this.normalizedTopLeft.lng){this.normalizedTopRight.lng+=li.WORLD_SIZE_MC}if(this.normalizedBottomRight.lng<this.normalizedBottomLeft.lng){this.normalizedBottomRight.lng+=li.WORLD_SIZE_MC}}else{if(this.normalizedTopLeft.lng<this.normalizedTopRight.lng){this.normalizedTopLeft.lng+=li.WORLD_SIZE_MC}if(this.normalizedBottomLeft.lng<this.normalizedBottomRight.lng){this.normalizedBottomLeft.lng+=li.WORLD_SIZE_MC}}},toString:function(){return"Bounds"}});function d9(e,i){if(isNaN(e)){e=fd(e);e=isNaN(e)?0:e}if(typeof e==="string"){e=parseFloat(e)}if(isNaN(i)){i=fd(i);i=isNaN(i)?0:i}if(typeof i==="string"){i=parseFloat(i)}this.lng=e;this.lat=i}d9.prototype.equals=function(i){if(!i){return false}var T=Math.abs(this.lat-i.lat);var C=Math.abs(this.lng-i.lng);var e=1e-8;if(T<e&&C<e){return true}return false};d9.prototype.similar=function(i){if(!i){return false}var T=Math.abs(this.lat-i.lat);var C=Math.abs(this.lng-i.lng);var e=0.00001;if(T<e&&C<e){return true}return false};d9.prototype.clone=function(){return new d9(this.lng,this.lat)};d9.prototype.add=function(e){return new d9(this.lng+e.lng,this.lat+e.lat)};d9.prototype.sub=function(e){return new d9(this.lng-e.lng,this.lat-e.lat)};d9.prototype.mult=function(e){return new d9(this.lng*e,this.lat*e)};d9.prototype.div=function(e){return new d9(this.lng/e,this.lat/e)};d9.prototype.mag=function(){return Math.sqrt(this.lng*this.lng+this.lat*this.lat)};d9.prototype.toString=function(){return"Point"};d9.serialize=function(i,e){return[i.lng,i.lat]};d9.deserialize=function(e){return new d9(e[0],e[1])};d9.prototype.toGeoJSON=function(){var i="Point";var C=[this.lng,this.lat];var e={type:"Feature",geometry:{type:i,coordinates:C},properties:this.properties};return e};function je(){}function m8(){}m8.prototype=new je();hv.extend(m8,{EARTHRADIUS:6370996.81,MCBAND:[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],LLBAND:[86,60,45,30,15,0],MC2LL:[[1.410526172116255e-8,0.00000898305509648872,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-0.03801003308653,17337981.2],[-7.435856389565537e-9,0.000008983055097726239,-0.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,10260144.86],[-3.030883460898826e-8,0.00000898305509983578,0.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,0.32710905363475,6856817.37],[-1.981981304930552e-8,0.000008983055099779535,0.03278182852591,40.31678527705744,0.65659298677277,-4.44255534477492,0.85341911805263,0.12923347998204,-0.04625736007561,4482777.06],[3.09191371068437e-9,0.000008983055096812155,0.00006995724062,23.10934304144901,-0.00023663490511,-0.6321817810242,-0.00663494467273,0.03430082397953,-0.00466043876332,2555164.4],[2.890871144776878e-9,0.000008983055095805407,-3.068298e-8,7.47137025468032,-0.00000353937994,-0.02145144861037,-0.00001234426596,0.00010322952773,-0.00000323890364,826088.5]],LL2MC:[[-0.0015702102444,111320.7020616939,1704480524535203,-10338987376042340,26112667856603880,-35149669176653700,26595700718403920,-10725012454188240,1800819912950474,82.5],[0.0008277824516172526,111320.7020463578,647795574.6671607,-4082003173.641316,10774905663.51142,-15171875531.51559,12053065338.62167,-5124939663.577472,913311935.9512032,67.5],[0.00337398766765,111320.7020202162,4481351.045890365,-23393751.19931662,79682215.47186455,-115964993.2797253,97236711.15602145,-43661946.33752821,8477230.501135234,52.5],[0.00220636496208,111320.7020209128,51751.86112841131,3796837.749470245,992013.7397791013,-1221952.21711287,1340652.697009075,-620943.6990984312,144416.9293806241,37.5],[-0.0003441963504368392,111320.7020576856,278.2353980772752,2485758.690035394,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-0.0003218135878613132,111320.7020701615,0.00369383431289,823725.6402795718,0.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,0.37238884252424,7.45]],getDistanceByMC:function(oL,T){if(!oL||!T){return 0}var i;var oK;var e;var C;oL=this.convertMC2LL(oL);if(!oL){return 0}i=mn(oL.lng);oK=mn(oL.lat);T=this.convertMC2LL(T);if(!T){return 0}e=mn(T.lng);C=mn(T.lat);return this.getDistance(i,e,oK,C)},getDistanceByLL:function(oL,T){if(!oL||!T){return 0}oL.lng=this.getLoop(oL.lng,-180,180);oL.lat=this.getRange(oL.lat,-80,84);T.lng=this.getLoop(T.lng,-180,180);T.lat=this.getRange(T.lat,-80,84);var i;var e;var oK;var C;i=mn(oL.lng);oK=mn(oL.lat);e=mn(T.lng);C=mn(T.lat);return this.getDistance(i,e,oK,C)},proximityCovertMC2LL:function(e){if(e===null){return e}if(e.lng<180&&e.lng>-180&&e.lat<90&&e.lat>-90){return e}return this.convertMC2LL(e)},convertMC2LL:function(e){if(e===null){return e}if(!e){return new d9(0,0)}var C;var oK;C=new d9(Math.abs(e.lng),Math.abs(e.lat));for(var T=0;T<this.MCBAND.length;T++){if(C.lat>=this.MCBAND[T]){oK=this.MC2LL[T];break}}var oL=this.convertor(e,oK);return new d1(oL.lat,oL.lng)},convertLL2MC:function(oM){if(!oM){return new d9(0,0)}var oO=oM.lat;var T=oM.lng;T=this.getLoop(oM.lng,-180,180);oO=dA(oO,-85,85);var oL;for(var oK=0;oK<this.LLBAND.length;oK++){if(oO>=this.LLBAND[oK]){oL=this.LL2MC[oK];break}}if(!oL){for(oK=0;oK<this.LLBAND.length;oK++){if(oO<=-this.LLBAND[oK]){oL=this.LL2MC[oK];break}}}var C=new d9(T,oO);var oN=this.convertor(C,oL);var e=new d9(oN.lng,oN.lat);e.latLng=new d1(oM.lat,oM.lng);return e},convertor:function(C,T){if(!C||!T){return}var e=T[0]+T[1]*Math.abs(C.lng);var i=Math.abs(C.lat)/T[9];var oK=T[2]+T[3]*i+T[4]*i*i+T[5]*i*i*i+T[6]*i*i*i*i+T[7]*i*i*i*i*i+T[8]*i*i*i*i*i*i;e*=(C.lng<0?-1:1);oK*=(C.lat<0?-1:1);return new d9(e,oK)},getDistance:function(C,i,oL,T){var oM=Math.sin(oL)*Math.sin(T);var e=Math.cos(oL)*Math.cos(T)*Math.cos(i-C);var oK=oM+e;if(oK>1){oK=1}if(oK<-1){oK=-1}return this.EARTHRADIUS*Math.acos(oK)},getRange:function(C,i,e){if(i!=null){C=Math.max(C,i)}if(e!=null){C=Math.min(C,e)}return C},getLoop:function(C,i,e){while(C>e){C-=e-i}while(C<i){C+=e-i}return C},tileToBoundRange:function(C){var i=C.col;var oQ=C.row;var oP=C.baseTileSize;var oN=Math.pow(2,(18-C.zoom));var oL={lbx:i*oP,lby:oQ*oP,rtx:(i+1)*oP,rty:(oQ+1)*oP};var e={lbx:oL.lbx*oN,lby:oL.lby*oN,rtx:oL.rtx*oN,rty:oL.rty*oN};var oO=new d9(e.lbx,e.lby);var oK=new d9(e.rtx,e.rty);var T=this.convertMC2LL(oO);var oM=this.convertMC2LL(oK);return{MC:new lz(oO,oK),LL:new lz(T,oM)}}});hv.extend(m8.prototype,{lnglatToMercator:function(e){return m8.convertLL2MC(e)},lngLatToMercator:function(e){return m8.convertLL2MC(e)},lngLatToPoint:function(e){var i=m8.convertLL2MC(e);return new hV(i.lng,i.lat)},mercatorToLnglat:function(e){return m8.convertMC2LL(e)},mercatorToLngLat:function(e){return m8.convertMC2LL(e)},pointToLngLat:function(i){var e=new d9(i.x,i.y);var C=m8.convertMC2LL(e);return new d1(C.lat,C.lng)},pointToPixel:function(i,oL,oK,T){if(!i){return}i=this.lngLatToMercator(i);var C=this.getZoomUnits(oL);var e=Math.round((i.lng-oK.lng)/C+T.width/2);var oM=Math.round((oK.lat-i.lat)/C+T.height/2);return new hV(e,oM)},mercatorToPixel:function(oL,oK,T,C){if(!oL){return}var i=this.getZoomUnits(oK);var e=Math.round((oL.lng-T.lng)/i+C.width/2);var oM=Math.round((T.lat-oL.lat)/i+C.height/2);return new hV(e,oM)},pixelToPoint:function(T,oM,oL,oK){if(!T){return}var i=this.getZoomUnits(oM);var C=oL.lng+i*(T.x-oK.width/2);var oN=oL.lat-i*(T.y-oK.height/2);var e=new d9(C,oN);return this.mercatorToLngLat(e)},tileToBound:function(T,oN){var i=T.col;var oQ=T.row;var oP=T.baseTileSize;var oO=this.getZoomUnits(T.zoom);var C={x:Math.round(oN.lng/oO),y:Math.round(oN.lat/oO)};var oL={lbx:i*oP,lby:oQ*oP,rtx:(i+1)*oP,rty:(oQ+1)*oP};var e={lbx:oN.lng+(oL.lbx-C.x)*oO,lby:oN.lat+(oL.lby-C.y)*oO,rtx:oN.lng+(oL.rtx-C.x)*oO,rty:oN.lat+(oL.rty-C.y)*oO};var oK=m8.convertMC2LL(new d9(e.lbx,e.lby));var oM=m8.convertMC2LL(new d9(e.rtx,e.rty));return{MC:new lz(new d9(e.lbx,e.lby),new d9(e.rtx,e.rty)),LL:new lz(oK,oM)}},getZoomUnits:function(e){return Math.pow(2,(18-e))},setCoordType:function(e){this.coordsType=e}});function fA(){}fA.prototype=new je();hv.extend(fA,{RADIUS:6378137,EXTENT4326:[-180,-90,180,90],WORLD_EXTENT:[-180,-85,180,85],HALF_SIZE:20037508.342789244,METERS_PER_UNIT:111319.49079327358,EXTENT3857:[-20037508.342789244,-20037508.342789244,20037508.342789244,20037508.342789244],MAX_SAFE_Y:238107693.26496765,origin:[-20037508.342789244,20037508.342789244],size:156543.03392804097,gridSize:[256,256],resolutions:[156543.03392804097,78271.51696402048,39135.75848201024,19567.87924100512,9783.93962050256,4891.96981025128,2445.98490512564,1222.99245256282,611.49622628141,305.748113140705,152.8740565703525,76.43702828517625,38.21851414258813,19.109257071294063,9.554628535647032,4.777314267823516,2.388657133911758,1.194328566955879,0.5971642834779395,0.29858214173896974,0.14929107086948487,0.07464553543474244,0.03732276771737122],gridScaleFrom3857ToBDMC:0.5971642834779395,gridScaleFromBDMCTo3857:1.674581061974954,calcResolutions:function(i){if(this.resolutions.length-1<i){this.resolutions=[];for(var e=0;e<i;++e){this.resolutions.push(this.size/Math.pow(2,e))}}return this.resolutions},forEachTileCoord:function(oP,oO,C,oM){var e=this.getTileRangeForExtentFactory(oP,oO,C);for(var oK=e.minX,oN=e.maxX;oK<=oN;++oK){for(var T=e.minY,oL=e.maxY;T<=oL;++T){oM([oO,oK,T])}}},getTileRangeForExtentFactory:function(C,oK,i,T){var e;switch(i.source){case"BD09MC":if(i.target==="EPSG3857"){e=this.getBDTileRangeForExtentAndZ(C,oK,T)}else{e=this.getTileRangeForExtentAndZ(C,oK,T)}break;case"EPSG3857":e=this.getTileRangeForExtentAndZ(C,oK,T);break;default:e=this.getTileRangeForExtentAndZ(C,oK,T);break}return e},getBDTileRangeForExtentAndZ:function(C,oK,T){var i=[0,0,0];this.getBDTileCoordForXYAndZ_(C[0],C[1],oK,false,i);var e=i[1];var oL=i[2];this.getBDTileCoordForXYAndZ_(C[2],C[3],oK,true,i);return this.createOrUpdateTileRange(e,i[1],oL,i[2],T)},getTileRangeForExtentAndZ:function(C,oK,T){var i=[0,0,0];this.getTileCoordForXYAndZ_(C[0],C[3],oK,false,i);var e=i[1];var oL=i[2];this.getTileCoordForXYAndZ_(C[2],C[1],oK,true,i);return this.createOrUpdateTileRange(e,i[1],oL,i[2],T)},getBDTileCoordForXYAndZ_:function(e,oN,oL,oK,T){var oM=256*Math.pow(2,(18-oL));var C=e/oM;var i=oN/oM;if(oK){C=Math.ceil(C)-1;i=Math.ceil(i)-1}else{C=Math.floor(C);i=Math.floor(i)}return this.createOrUpdateTileCoord(oL,C,i,T)},getTileCoordForXYAndZ_:function(oQ,oP,oN,oO,e){var oR=this.origin;var i=(this.resolutions.length===0?this.calcResolutions(21)[oN]:this.resolutions[oN]);var oT=this.gridSize;var T=oO?0.5:0;var C=oO?0.5:0;var oS=Math.floor((oQ-oR[0])/i+T);var oL=Math.floor((oR[1]-oP)/i+C);var oM=oS/oT[0];var oK=oL/oT[1];if(oO){oM=Math.ceil(oM)-1;oK=Math.ceil(oK)-1}else{oM=Math.floor(oM);oK=Math.floor(oK)}return this.createOrUpdateTileCoord(oN,oM,oK,e)},getTileCoordForCoordAndZ:function(C,i,e){return this.getTileCoordForXYAndZ_(C[0],C[1],i,false,e)},getTileRangeExtent:function(C,oM){var oN=this.origin;if(this.resolutions.length===0){this.calcResolutions(23)}var oK=this.resolutions[C[0]];var oO=this.gridSize;var oL=oN[0]+C[1]*oO[0]*oK;var T=oN[1]-(C[2]+1)*oO[1]*oK;var i=oL+oO[0]*oK;var e=T+oO[1]*oK;return this.createOrUpdateTileRange(oL,i,T,e,oM)},getTileLeftBottomMCPoint:function(oK,C){var i=this.origin;if(this.resolutions.length===0){this.calcResolutions(23)}var T=this.resolutions[oK[0]];var oM=this.gridSize;var e=i[0]+oK[1]*oM[0]*T;var oN=i[1]-(oK[2]+1)*oM[1]*T;var oL=fU.transform([e,oN],fU.EPSG3857,fU.BD09MC);return oL},getRangeExtent:function(i,oR,oN,oT,T){var oO=this.calPiexlResolution(oT,T);var oM=oR/2*oO;var oP=oN/2*oO;var oL=i[0]-oM;var C=i[0]+oM;var oK=i[1]-oP;var e=i[1]+oP;var oQ=fU.transform([oL,oK],fU[T.target],fU[T.source]);var oS=fU.transform([C,e],fU[T.target],fU[T.source]);return this.createOrUpdateTileRange(oQ[0],oS[0],oQ[1],oS[1])},getMousePoint:function(oM,oL,i,oK,C){var T=oF(oM,oL);return this.calLngLatByMapViewPixelInverse(T.clientPos,i,oL.width,oL.height,oK,C)},calLngLatByMapViewPixelInverse:function(T,e,i,oQ,oR,C){var oM=this.calPiexlResolution(oR,C);var oL=T.x-i/2;var oK=T.y-oQ/2;var oO=e[0]+oL*oM;var oN=e[1]-oK*oM;var oP=fU.transform([oO,oN],fU[C.target],fU[C.source]);return oP},calPiexlResolution:function(C,i){var e;switch(i.target){case"BD09MC":e=Math.pow(2,(18-C));break;case"EPSG3857":e=this.resolutions[Math.floor(C)];break;default:e=Math.pow(2,(18-C));break}return e},getXYZCellPixelCoor:function(oM,oK,T,i){var oO=this.gridSize;var oN;var oL;switch(i.source){case"GCJ02":case"EPSG3857":var C=Math.pow(2,T-1)-(oK+1);var e=oM-Math.pow(2,T-1);oN=e*oO[0];oL=C*oO[1];break;case"BD09MC":if(i.target==="EPSG3857"){oN=oM*oO[0];oL=oK*oO[1]}else{var C=Math.pow(2,T-1)-(oK+1);var e=oM-Math.pow(2,T-1);oN=e*oO[0];oL=C*oO[1]}default:break}return{x:oN,y:oL}},mcToPixel:function(i){var C=this.resolutions[Math.floor(zoom)];var e=i.lng/C;var T=i.lat/C;return[e,T]},getBaiduCellPixelCoor:function(e,T,C){var i=256;return{x:e*i,y:T*i}},getRelativePixelCoor:function(oL,T){var i=this.origin;var oK=oL[0];var C=this.resolutions[Math.floor(oK)];var oM=this.gridSize;var e=i[0]/C+oL[1]*oM[0];var oN=i[1]/C-(oL[2]+1)*oM[1];return[T[0]-e,T[1]-oN]},getPointPixelCoor:function(e,oO,i){var oM;var oL;var C=Math.pow(2,(18-oO));var T=this.resolutions[Math.floor(oO)];var oK=m8.convertMC2LL(e);switch(i.source){case"GCJ02":var oN=fU.transform([oK.lng,oK.lat],fU.BD09LL,fU.GCJ02);oN=fU.transform(oN,fU.WGS84,fU.EPSG3857);oM=oN[0]/T;oL=oN[1]/T;break;case"BD09LL":case"EPSG3857":var oN=fU.transform([oK.lng,oK.lat],fU.BD09LL,fU.EPSG3857);oM=oN[0]/T;oL=oN[1]/T;break;case"BD09MC":oM=e.lng/C;oL=e.lat/C;if(i.target==="BD09MC"){oM*=fA.gridScaleFromBDMCTo3857;oL*=fA.gridScaleFromBDMCTo3857}default:break}return[oM,oL]},getResolutionScale:function(i,e){var C;switch(e.target){case"BD09MC":C=this.gridScaleFrom3857ToBDMC;break;case"EPSG3857":C=this.gridScaleFromBDMCTo3857;break;default:C=this.gridScaleFrom3857ToBDMC;break}return C},getBaiduResolutionScale:function(C){var i=this.resolutions[Math.floor(C)];var e=Math.pow(2,(18-C));var T=e/i;return T},getTileCoordCenter:function(C){var e=this.origin;if(this.resolutions.length===0){this.calcResolutions(23)}var i=this.resolutions[C[0]];var T=this.gridSize;return[e[0]+(C[1]+0.5)*T[0]*i,e[1]-(C[2]+0.5)*T[1]*i,]},transformBDmcPoint:function(oK,i){i=i||{};var C=i.source||"EPSG3857";var T=m8.convertMC2LL(new d9(oK.lng,oK.lat));var e;switch(C){case"GCJ02":e=fU.transform([T.lng,T.lat],fU.BD09LL,fU.GCJ02);e=fU.transform(e,fU.WGS84,fU.EPSG3857);break;case"EPSG3857":e=fU.transform([T.lng,T.lat],fU.BD09LL,fU.EPSG3857);break;case"BD09MC":if(i.target==="EPSG3857"){e=fU.transform([T.lng,T.lat],fU.BD09LL,fU.EPSG3857)}else{e=[oK.lng,oK.lat]}break;default:e=fU.transform([T.lng,T.lat],fU.BD09LL,fU[C]);break}return e},transformPointArr:function(e,i,C){return fU.transform(e,fU[i||"BD09LL"],fU[C||"BD09MC"])},getTilesLoop:function(C,e){var i=Math.pow(2,C);while(e>i-1){e=e-i}while(e<0){e=e+i}return e},getLoopBox:function(e,C){var i=this.HALF_SIZE*2;if(e[0]>0&&C[2]<0){C[2]=C[2]+i}else{if(e[0]<0&&C[0]>0){C[0]=C[0]-i}}return C},createOrUpdateTileCoord:function(C,e,T,i){if(i!==undefined){i[0]=C;i[1]=e;i[2]=T;return i}else{return[C,e,T]}},createOrUpdateTileRange:function(e,T,oK,C,i){if(i!==undefined){i.minX=e;i.maxX=T;i.minY=oK;i.maxY=C;return i}else{return{minX:e,maxX:T,minY:oK,maxY:C}}},fromEPSG4326:function(C,oO,oM){var oK=C.length;var oL=oM>1?oM:2;var e=oO;if(e===undefined){if(oL>2){e=C.slice()}else{e=new Array(oK)}}for(var T=0;T<oK;T+=oL){e[T]=(this.HALF_SIZE*C[T])/180;var oN=this.RADIUS*Math.log(Math.tan((Math.PI*(+C[T+1]+90))/360));if(oN>this.MAX_SAFE_Y){oN=this.MAX_SAFE_Y}else{if(oN<-this.MAX_SAFE_Y){oN=-this.MAX_SAFE_Y}}e[T+1]=oN}return e},toEPSG4326:function(C,oN,oM){var oK=C.length;var oL=oM>1?oM:2;var e=oN;if(e===undefined){if(oL>2){e=C.slice()}else{e=new Array(oK)}}for(var T=0;T<oK;T+=oL){e[T]=(180*C[T])/this.HALF_SIZE;e[T+1]=(360*Math.atan(Math.exp(C[T+1]/this.RADIUS)))/Math.PI-90}return e},findParentGridAndPosition:function(T,oT,oS,oN,oO,oQ,oM){if(oS-1<0){return false}var oU=T;var oP=oT;var C=oS;for(var oL=1;oL<=oM;oL++){var e=this.findParent(oU,oP,C,oL);if(!e){return false}var oR=this.getTileKey(e);var oK=oN.getData(oR);if(oK&&oK.status==="ready"){if(oO[oR]){continue}oQ.setData(oK,this.drawIndex,0);oO[oR]=true;return true}oU=e.col;oP=e.row;C=e.zoom}},findParent:function(i,oK,C,T){if(C-1<0){return null}var e=i%2;var oL=oK%2;return{col:Math.floor(i/2),row:Math.floor(oK/2),sonX:e,sonY:oL,thumbLB:[e*0.5,1-oL*0.5-0.5],thumbRT:[e*0.5+0.5,1-oL*0.5],radio:Math.pow(2,T),zoom:C-1,useZoom:C-1}},getTileKey:function(e,T){T=T||{};var i=typeof T.useZoom==="number"?T.useZoom:e.useZoom;var C=e.style||this.mapStyleId||"default";return this.mapType+"_"+C+"_"+e.col+"_"+e.row+"_"+e.zoom+"_"+i},lon2tile:function(i,e){return(Math.floor((i+180)/360*Math.pow(2,e)))},lat2tile:function(C,i){var e=Math.tan(C*Math.PI/180)+1/Math.cos(C*Math.PI/180);return(Math.floor((1-Math.log(e)/Math.PI)/2*Math.pow(2,i)))},tile2long:function(e,i){return(e/Math.pow(2,i)*360-180)},tile2lat:function(C,e){var i=Math.PI-2*Math.PI*C/Math.pow(2,e);return(180/Math.PI*Math.atan(0.5*(Math.exp(i)-Math.exp(-i))))},wgs84ToBd09mc:function(e,T){var C=fU.transform([e,T],fU.WGS84,fU.BD09);var i=m8.convertLL2MC(new d9(C[0],C[1]));return[i.lng,i.lat]}});function k8(){this.curCityName="bj"}k8.prototype=new m8();k8.prototype.constructor=k8;function d1(i,e){if(i<-90){i=-90}else{if(i>90){i=90}}while(e<-180){e+=360}while(e>180){e-=360}e=e||0;i=i||0;d9.call(this,e,i)}d1.inherits(d9,"LatLng");hv.extend(d1.prototype,{equals:function(e){return(this.lat===e.lat&&this.lng===e.lng)},equalsEpsilon:function(e,i){i=i||1e-7;return(Math.abs(this.lat-e.lat)<i&&Math.abs(this.lng-e.lng)<i)},clone:function(){return new d1(this.lat,this.lng)},add:function(e){return new d1(this.lng+e.lng,this.lat+e.lat)},sub:function(e){return new d1(this.lat-e.lat,this.lng-e.lng)},mult:function(e){return new d1(this.lng*e,this.lat*e)},div:function(e){return new d1(this.lng/e,this.lat/e)},mag:function(){return Math.sqrt(this.lng*this.lng+this.lat*this.lat)},getLngSpan:function(e){var i=this.lng;var C=Math.abs(e-i);if(C>180){C=360-C}return C},toString:function(){return"LatLng"},toGeoJSON:function(){var i="Point";var C=[this.lng,this.lat];var e={type:"Feature",geometry:{type:i,coordinates:C},properties:this.properties};return e}});function el(e,i){if(e&&!i){i=e}this._sw=this._ne=null;this._swLng=this._swLat=null;this._neLng=this._neLat=null;if(e){this._sw=new d1(e.lat,e.lng);this._ne=new d1(i.lat,i.lng);this._swLng=e.lng;this._swLat=e.lat;this._neLng=i.lng;this._neLat=i.lat}}hv.extend(el.prototype,{isEmpty:function(){return !this._sw||!this._ne},equals:function(e){if(this.isEmpty()){return false}return this.getSouthWest().equals(e.getSouthWest())&&this.getNorthEast().equals(e.getNorthEast())},getSouthWest:function(){return this._sw},getNorthEast:function(){return this._ne},containsBounds:function(e){if(this.isEmpty()||e.isEmpty()){return false}return(e._swLng>this._swLng&&e._neLng<this._neLng&&e._swLat>this._swLat&&e._neLat<this._neLat)},getCenter:function(){if(this.isEmpty()){return null}return new d1((this._swLat+this._neLat)/2,(this._swLng+this._neLng)/2)},intersects:function(C){if(Math.max(C._swLng,C._neLng)<Math.min(this._swLng,this._neLng)||Math.min(C._swLng,C._neLng)>Math.max(this._swLng,this._neLng)||Math.max(C._swLat,C._neLat)<Math.min(this._swLat,this._neLat)||Math.min(C._swLat,C._neLat)>Math.max(this._swLat,this._neLat)){return false}var oK=Math.max(this._swLng,C._swLng);var i=Math.min(this._neLng,C._neLng);var T=Math.max(this._swLat,C._swLat);var e=Math.min(this._neLat,C._neLat);this._sw=new d1(T,oK);this._ne=new d1(e,i);this._swLng=oK;this._swLat=T;this._neLng=i;this._neLat=e;return true},containsPoint:function(e){if(this.isEmpty()){return false}return(e.lng>=this._swLng&&e.lng<=this._neLng&&e.lat>=this._swLat&&e.lat<=this._neLat)},extend:function(e){var i=e.lng;var C=e.lat;if(!this._sw){this._sw=new d1(0,0)}if(!this._ne){this._ne=new d1(0,0)}if(!this._swLng||this._swLng>i){this._sw.lng=this._swLng=i}if(!this._neLng||this._neLng<i){this._ne.lng=this._neLng=i}if(!this._swLat||this._swLat>C){this._sw.lat=this._swLat=C}if(!this._neLat||this._neLat<C){this._ne.lat=this._neLat=C}},toSpan:function(){if(this.isEmpty()){return new d1(0,0)}return new d1(Math.abs(this._neLat-this._swLat),Math.abs(this._neLng-this._swLng))},union:function(i){if(i.isEmpty()){return false}var e=i.getSouthWest();var C=i.getNorthEast();if(this._swLat>e.lat){this._swLat=e.lat}if(this._swLng>e.lng){this._swLng=e.lng}if(this._neLat<C.lat){this._neLat=C.lat}if(this._neLng<C.lng){this._neLng=C.lng}this._sw=new d1(this._swLat,this._swLng);this._ne=new d1(this._neLat,this._neLng);return true},toString:function(){return this._swLat+", "+this._swLng+", "+this._neLat+", "+this._neLng}});window.COORDINATES_WGS84=1;window.COORDINATES_WGS84_MC=2;window.COORDINATES_GCJ02=3;window.COORDINATES_GCJ02_MC=4;window.COORDINATES_BD09=5;window.COORDINATES_BD09_MC=6;window.COORDINATES_MAPBAR=7;window.COORDINATES_51=8;function iI(){}iI.inherits(eX,"Convertor");hv.extend(iI.prototype,{translate:function(i,oM,oL,oK){oM=oM||1;oL=oL||5;var T=function(oO,oR){var oQ=oO.toString();var oP=oQ.indexOf(".");if(oP===-1){return oO}var oN=oQ.length-oP-1;if(oN<=oR){return oO}return parseFloat(oQ.substring(0,oP+oR+1))};function C(oO,oQ){var oP=Math.round(T(oO,6)*1000000);var oN=Math.round(T(oQ,6)*1000000);return oP.toString(36)+","+oN.toString(36)}if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){var e=window._BMapSecurityConfig["serviceHost"]+"?qt=coords&coords_encoding=36&coords=";hv.each(i,function(oN){e+=C(oN.lng,oN.lat)+";"});e=e.replace(/;$/gi,"");e=e+"&from="+oM+"&to="+oL+"&v="+ep()+"&type=webgl"}else{var e=K.apiHost+"?qt=coords&coords_encoding=36&coords=";hv.each(i,function(oN){e+=C(oN.lng,oN.lat)+";"});e=e.replace(/;$/gi,"");e=e+"&from="+oM+"&to="+oL+"&v="+ep()+"&type=webgl&ak="+hj}e7.request(e,function(oO){data=oO.content;if(typeof data!=="undefined"&&data!==null&&data.status===0){var oN=[];hv.each(data.result,function(oP){oN.push(new d9(oP.x,oP.y))});delete data.result;data.points=oN}else{if(oO.result&&oO.result.error){data={status:oO.result.errror,message:"璁块棶閿欒锛岃鍙傝�冮敊璇姸鎬佺爜https://lbsyun.baidu.com/index.php?title=webapi/appendix"}}}oK&&oK(data)})}});var gp={idle:0,freeze:1,zooming:2,dragging:3,moving:4,readyToDrag:5,readyToPinch:6,pinching:7,stdMapCtrlDrag:8,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,arrowOpCodes:{37:1,38:2,39:4,40:8}};var aG={_map:null,_html:"<div class='BMap_opMask' unselectable='on'></div>",_maskElement:null,_cursor:"default",inUse:false,show:function(e){if(!this._map){this._map=e}this.inUse=true;if(!this._maskElement){this._createMask(e)}this._maskElement.style.display="block"},_createMask:function(i){if(!this._map){this._map=i}if(!this._map){return}var e=this._maskElement=cQ(this._map.container,this._html);hv.on(e,"mouseup",function(C){if(C.button==2){kK(C)}});hv.on(e,"contextmenu",kK);e.style.display="none"},getDrawPoint:function(T,oM,oK){T=window.event||T;var i=T.offsetX||T.layerX||0;var oL=parseInt(T.offsetY)||parseInt(T.layerY)||0;var C=T.target||T.srcElement;if(C!=aG.getDom(this._map)&&oM==true){while(C&&C!=this._map.container){if(!(C.clientWidth==0&&C.clientHeight==0&&C.offsetParent&&C.offsetParent.nodeName.toLowerCase()=="td")){i+=C.offsetLeft;oL+=C.offsetTop}C=C.offsetParent}}if(C!=aG.getDom(this._map)&&C!=this._map.container){return}if(typeof i==="undefined"||typeof oL==="undefined"){return}if(isNaN(i)||isNaN(oL)){return}if(oK){i=i+oK.x;oL=oL+oK.y}return this._map.pixelToPointIn(new hV(i,oL))},hide:function(){if(!this._map){return}this.inUse=false;if(this._maskElement){this._maskElement.style.display="none"}},getDom:function(e){if(!this._maskElement){this._createMask(e)}return this._maskElement},setCursor:function(e){this._cursor=e||"default";if(this._maskElement){this._maskElement.style.cursor=this._cursor}}};function bw(){this._type="overlay"}bw.inherits(hv.BaseClass,"Overlay");bw.getZIndex=function(i,e){i=i*1;if(!i){return 0}if(e){i=m8.convertMC2LL(new d9(0,i)).lat}return(i*-100000)<<1};hv.extend(bw.prototype,{_i:function(oM){this._map=oM;if(!this.domElement&&c2(this.initialize)){this.domElement=this.initialize(oM);if(this.domElement){this.domElement.style.WebkitUserSelect="none";if(this.enableDraggingMap!==undefined&&!this.enableDraggingMap&&!(this instanceof D)){var oL=["mouseout","mouseover","click","keydown","selectstart"];var C=(window.PointerEvent||window.MSPointerEvent)&&(navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0);var e=["mousedown"];if(C){if(window.PointerEvent){e=["pointerdown"]}else{if(window.MSPointerEvent){e=["MSPointerDown"]}}}for(var T=0;T<e.length;T++){oL.push(e[T])}var oK=this;hv.each(oL,function(i){hv.on(oK.domElement,i,aF)})}}}this.draw()},initialize:function(e){throw"initialize鏂规硶鏈疄鐜�"},draw:function(){throw"draw鏂规硶鏈疄鐜�"},remove:function(){if(this.domElement&&this.domElement.parentNode){this.domElement.parentNode.removeChild(this.domElement)}this.domElement=null;this.dispatchEvent(new ix("onremove"))},hide:function(){this._visible=false;hv.hide(this.domElement)},show:function(){this._visible=true;hv.show(this.domElement)},isVisible:function(){return this._visible},getMap:function(){return this._map},dispose:function(){hv.BaseClass.prototype.decontrol.call(this)}});function g2(){hv.BaseClass.call(this);bw.call(this);this._visible=true;this._visibleInternal=true;this.zIndex=0;this.infoWindow=null;this._dblclickTime=0}g2.inherits(bw,"OverlayInternal");hv.extend(g2.prototype,{initialize:function(e){this.map=e;hv.BaseClass.call(this,this.hashCode);return null},draw:function(){},remove:function(){this.decontrol();bw.prototype.remove.call(this)},destroy:function(){},hide:function(){this._visible=false},show:function(){this._visible=true},getDom:function(){return this.domElement},getContainer:function(){return this.domElement},setClassName:function(){},setConfig:function(i){if(!i){return}for(var e in i){if(i.hasOwnProperty(e)){this._config[e]=i[e]}}},getPoint:function(C,T){if(!C){return this.point}else{var e=T?T.width:0;var oK=T?T.height:0;if(this.map){var i=this.map.pointToPixelIn(this.point);if(this._config&&this._config.offset){i.x=i.x+this._config.offset.width+e;i.y=i.y+this._config.offset.height+oK}else{i.x=i.x+e;i.y=i.y+oK}return this.map.pixelToPointIn(i)}}},setZIndex:function(e){this.zIndex=e},isVisible:function(){if(!this.domElement){return false}return !!this._visible},enableMassClear:function(){this._config.enableMassClear=true},disableMassClear:function(){this._config.enableMassClear=false},showInternal:function(){this._visibleInternal=true},hideInternal:function(e){this._visibleInternal=false;this._hideInternalReason=e},addContextMenu:function(e){this._menu=e},removeContextMenu:function(e){this._menu=null}});function bs(e){this.map=e;this._overlays={};this._overlayArray=[];this._customOverlays=[];e._overlays=this._overlays;e._overlayArray=this._overlayArray;e._customOverlays=this._customOverlays;this._zoomingOrMoving=false;this._init()}bs.prototype._init=function(){if(this.map._renderType!=="webgl"){this._createOverlayContainers()}else{this._createWebGLOverlayContainers()}this._bind()};bs.prototype._createOverlayContainers=function(){var e=this.map;e.temp.overlayDiv=e.overlayDiv=this._createOverlayDiv(e.platform,200);e.temp.overlayDivEx=e.overlayDivEx=this._createOverlayDiv(e.platform,50);e._panes.floatPane=this._createOverlayDiv(e.temp.overlayDiv,800);e._panes.markerMouseTarget=this._createOverlayDiv(e.temp.overlayDiv,700);e._panes.floatShadow=this._createOverlayDiv(e.temp.overlayDiv,600);e._panes.labelPane=this._createOverlayDiv(e.temp.overlayDiv,500);e._panes.markerPane=this._createOverlayDiv(e.temp.overlayDiv,400);if(e.isCanvasMap()){e._panes.mapPane=this._createOverlayDiv(e.temp.overlayDivEx,50)}else{e._panes.mapPane=this._createOverlayDiv(e.temp.overlayDiv,200)}};bs.prototype._createWebGLOverlayContainers=function(){var e=this.map;e.temp.overlayDiv=e.overlayDiv=this._createOverlayDiv(e.platform,200);e._panes.floatPane=this._createOverlayDiv(e.temp.overlayDiv,800);e._panes.markerMouseTarget=this._createOverlayDiv(e.temp.overlayDiv,700);e._panes.floatShadow=this._createOverlayDiv(e.temp.overlayDiv,600);e._panes.labelPane=this._createOverlayDiv(e.temp.overlayDiv,500);e._panes.markerPane=this._createOverlayDiv(e.temp.overlayDiv,400)};bs.prototype._createOverlayDiv=function(e,T){var C=da("div");var i=C.style;i.position="absolute";i.top=i.left=i.width=i.height="0";i.zIndex=T;e.appendChild(C);return C};bs.prototype._bind=function(){var oK=this.map;var T=this;function i(oM){T.draw(oM)}if(oK._renderType!=="webgl"){oK.addEventListener("load",i);oK.addEventListener("moveend",i);oK.addEventListener("resize",i);oK.addEventListener("zoomend",i);oK.addEventListener("zooming_inner",i)}else{oK.on("update",i)}oK.on("destroy",function(){oK._overlays={};oK._overlayArray=[];oK._customOverlays=[];oK.overlayDiv=null;oK.overlayDivEx=null;var oM=Object.keys(oK._panes);for(var oN=0;oN<oM.length;oN++){oK._panes[oM[oN]]=null}var oO=Object.keys(oK.temp);for(var oN=0;oN<oO.length;oN++){oK.temp[oO[oN]]=null}});oK.addEventListener("zoomend",function(oM){if(this.mapType==="B_EARTH_MAP"){if(this._earth.getZoom()<this._earth.zoomForNight+1){this.temp.overlayDiv.style.display="none";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display="none"}}else{if(this.temp.overlayDiv.style.display==="none"){this.temp.overlayDiv.style.display="";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display=""}if(this.temp.infoWin&&this.temp.infoWin.isOpen()){this.temp.infoWin.redraw()}}}}});oK.addEventListener("oncenterandzoom",function(oM){T.draw(oM);if(this.mapType==="B_EARTH_MAP"){if(this._earth.getZoom()<this._earth.zoomForNight+1){this.temp.overlayDiv.style.display="none";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display="none"}}else{if(this.temp.overlayDiv.style.display==="none"){this.temp.overlayDiv.style.display="";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display=""}if(this.temp.infoWin&&this.temp.infoWin.isOpen()){this.temp.infoWin.redraw()}}}}});oK.addEventListener("maptypechange",function(oM){if(this.mapType==="B_EARTH_MAP"){if(this._panes.mapPane){this._panes.mapPane.style.display="none"}if(this._earth.getZoom()<this._earth.zoomForNight+1){this.temp.overlayDiv.style.display="none";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display="none"}}else{if(this.temp.overlayDiv.style.display==="none"){this.temp.overlayDiv.style.display="";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display=""}if(this.temp.infoWin&&this.temp.infoWin.isOpen()){this.temp.infoWin.redraw()}}}if(this._panes.markerPane){this._panes.markerPane.style.display="none"}}else{if(this._panes.mapPane){this._panes.mapPane.style.display=""}if(this._panes.markerPane){this._panes.markerPane.style.display=""}if(this.temp.overlayDiv.style.display==="none"){this.temp.overlayDiv.style.display="";if(this.temp.overlayDivEx){this.temp.overlayDivEx.style.display=""}if(this.temp.infoWin&&this.temp.infoWin.isOpen()){this.temp.infoWin.redraw()}}}T.draw(oM)});oK.on("earthstatuschange",function oL(oM){T.draw(oM)});oK.addEventListener("addoverlay",function(oQ){var oN=oQ.target;if(oN instanceof g2){if(!T._overlays[oN.hashCode]){T._overlays[oN.hashCode]=oN;T._overlayArray.push(oN)}}else{var oP=false;for(var oO=0,oM=T._customOverlays.length;oO<oM;oO++){if(T._customOverlays[oO]===oN){oP=true;break}}if(!oP){T._customOverlays.push(oN)}}});oK.addEventListener("removeoverlay",function(oP){var oN=oP.target;if(oN instanceof g2){delete T._overlays[oN.hashCode];for(var oO=0;oO<T._overlayArray.length;oO++){if(T._overlayArray[oO]===oN){T._overlayArray.splice(oO,1);break}}}else{for(var oO=0,oM=T._customOverlays.length;oO<oM;oO++){if(T._customOverlays[oO]===oN){T._customOverlays.splice(oO,1);break}}}});oK.addEventListener("clearoverlays",function(oO){this.closeInfoWindow();this.closeSimpleInfoWindow();for(var oN in T._overlays){if(T._overlays[oN]._config.enableMassClear){this.removeOverlay(T._overlays[oN])}}for(var oM=T._customOverlays.length-1;oM>=0;oM--){if(T._customOverlays[oM].enableMassClear!==false){this.removeOverlay(T._customOverlays[oM]);T._customOverlays.splice(oM,1)}}});oK.addEventListener("infowindowopen",function(oN){var oM=this.infoWindow;if(oM){hv.hide(oM.popDom);hv.hide(oM.shadowDom)}});function C(){if(this.getMapTypeId()==="B_EARTH_MAP"||this._renderType==="webgl"){if(T._zoomingOrMoving===false){this._panes.markerMouseTarget.style.display="none";T._zoomingOrMoving=true}}}function e(oO){if(this.getMapTypeId()==="B_EARTH_MAP"||this._renderType==="webgl"){if(T._zoomingOrMoving===true){if(this._panes.markerMouseTarget){this._panes.markerMouseTarget.style.display=""}T._zoomingOrMoving=false;for(var oN=0;oN<T._overlayArray.length;oN++){var oM=T._overlayArray[oN];if(oM instanceof og===true){oM.draw(oO)}}}}}oK.addEventListener("tilt_changed",e);oK.addEventListener("heading_changed",e);oK.addEventListener("movestart",C);oK.addEventListener("moveend",e);oK.addEventListener("zoomstart",C);oK.addEventListener("zoomend",e);oK.addEventListener("animation_start",C);oK.addEventListener("animation_end",e);oK.addEventListener("displayoptions_changed",function(oM){if(this._displayOptions.overlay===false){this.temp.overlayDiv.style.display="none"}else{this.temp.overlayDiv.style.display=""}})};bs.prototype.draw=function(oM){oM=oM||{};if(this.map.getMapTypeId()==="B_EARTH_MAP"){for(var oK=0;oK<this._overlayArray.length;oK++){var C=this._overlayArray[oK];if(C instanceof mk===true){continue}if(this._zoomingOrMoving){if(C instanceof og===true){continue}}C.draw(oM)}}else{for(var oK=0,T=this._overlayArray.length;oK<T;oK++){var C=this._overlayArray[oK];if(this._zoomingOrMoving&&C instanceof og===true){continue}C.draw(oM)}}hv.each(this._customOverlays,function(e){e.draw(oM)});if(this.map.temp.infoWin){this.map.temp.infoWin.setPosition(oM.center,oM.zoom)}if(this.map.getMapTypeId()!=="B_EARTH_MAP"&&this.map._renderType!=="webgl"){if(cv.DrawerSelector){var oL=cv.DrawerSelector.getDrawer(this.map);oL.setPalette()}}};cv.register(function(e){e._overlayMgr=new bs(e)});function mk(e){g2.call(this);var i=fq();this._config={strokeColor:i.strokeColor,strokeWeight:2,strokeOpacity:1,strokeStyle:"solid",dashArray:null,strokeLineCap:"round",strokeLineJoin:"round",enableMassClear:true,getParseTolerance:null,getParseCacheIndex:null,enableParse:true,enableEditing:false,enableClicking:true,mouseOverTolerance:5,geodesic:false,linkRight:false,clip:true,texture:null,textureSize:null,textureZoomWithMap:false,textureRepeat:true,zIndex:0};this.setConfig(e);if(this._config.zIndex!==undefined){this.zIndex=this._config.zIndex}if(this._config.strokeOpacity<0||this._config.strokeOpacity>1){this._config.strokeOpacity=1}if(this._config.fillOpacity<0||this._config.fillOpacity>1){this._config.fillOpacity=1}if(this._config.strokeStyle!=="solid"&&this._config.strokeStyle!=="dashed"&&this._config.strokeStyle!=="dotted"){this._config.strokeStyle="solid"}this.domElement=null;this._bounds=new lz();this.points=[];this.greatCirclePoints=[];this._parseCache=[];this._holesCache=[];this._parseCacheGL=[];this._parseCacheGLRaw=[];this._areaCacheGL=[];this._strokeStyleInfoForGL=[[]];this._fillStyleInfoForGL="";this.vertexMarkers=[];this._temp={}}mk.JOININDEX={miter:0,round:1,bevel:2};mk.CAPINDEX={round:0,butt:1,square:2};mk.inherits(g2,"Graph");mk.getGraphPoints=function(i){var e=[];if(!i||i.length===0){return e}if(typeof i==="string"){var C=i.split(";");hv.each(C,function(oK){var T=oK.split(",");e.push(new d9(T[0],T[1]))})}if(i.constructor===Array&&i.length>0){e=i}return e};mk.parseTolerance={0:[0.09,0.005,0.0001,0.00001],1:[9000,500,20,1]};hv.extend(mk.prototype,{initialize:function(e){this.map=e;return null},draw:function(){},setPoints:function(e){this._clearCache();this.points=mk.getGraphPoints(e).slice(0);this._calcBounds()},setPathIn:function(e){this.setPoints(e)},_calcBounds:function(){if(!this.points){return}var e=this;e._bounds=new lz();if(!this.hasMultipleParts){hv.each(this.points,function(i){e._bounds.extend(i)})}else{hv.each(this.points,function(i){hv.each(i,function(C){e._bounds.extend(C)})})}},getPoints:function(){return this.points},getPathIn:function(){return this.points},setPointAt:function(i,e){if(!e||!this.points[i]){return}this._clearCache();this.points[i]=new d9(e.lng,e.lat);this._calcBounds()},setPositionAt:function(i,e){if(!e||!this.points[i]){return}var C=m8.convertLL2MC(e);this.setPointAt(i,C)},setOptions:function(i){i=i||{};for(var e in i){if(i.hasOwnProperty(e)){this._config[e]=i[e]}}},setStrokeColor:function(e){this._config.strokeColor=e},getStrokeColor:function(){return this._config.strokeColor},setStrokeLineCap:function(e){this._config.strokeLineCap=e},getStrokeLineCap:function(){return this._config.strokeLineCap},setStrokeLineJoin:function(e){this._config.strokeLineJoin=e},getStrokeLineJoin:function(){return this._config.strokeLineJoin},setStrokeWeight:function(e){if(e>0){this._config.strokeWeight=e}},getStrokeWeight:function(){return this._config.strokeWeight},setStrokeOpacity:function(e){if(!e||e>1||e<0){return}this._config.strokeOpacity=e},getStrokeOpacity:function(){return this._config.strokeOpacity},setFillOpacity:function(e){if(e>1||e<0){return}this._config.fillOpacity=e},getFillOpacity:function(){return this._config.fillOpacity},setStrokeStyle:function(e){if(e!=="solid"&&e!=="dashed"&&e!=="dotted"){return}this._config.strokeStyle=e},getStrokeStyle:function(){return this._config.strokeStyle},setFillColor:function(e){this._config.fillColor=e||""},getFillColor:function(){return this._config.fillColor},getBoundsIn:function(){this._bounds.setMinMax();return this._bounds},getBounds:function(){var e=this.getBoundsIn();var i=new lz(m8.convertMC2LL(e.getSouthWest()),m8.convertMC2LL(e.getNorthEast()));i.setMinMax();return i},remove:function(){if(this.map){this.map.removeEventListener("onmousemove",this._graphMouseEvent);this.map.removeEventListener("onclick",this._graphClickEvent)}g2.prototype.remove.call(this);this._clearCache();var e=new ix("onlineupdate");e.action="remove";e.overlay=this;this.fire(e)},enableEditing:function(){if(this.points.length<2){return}this._config.enableEditing=true;var e=this;ki.load("poly",function(){e.addVertexs()},true)},disableEditing:function(){this._config.enableEditing=false;var e=this;ki.load("poly",function(){e.clearVertexs()},true)},getLength:function(){if(typeof this._length==="number"){return this._length}if(typeof this._config.totalLength==="number"){this._length=this._config.totalLength;return this._length}var C=0;if(this.points.length<=1){this._length=0;return C}for(var e=0;e<this.points.length-1;e++){C+=gQ(this.points[e],this.points[e+1])}this._length=C;return C},getParsedPoints:function(){var e=this._simplification(this.points);if(this.hasMultipleParts){return e}return[e]},_simplification:function(oN){var e=this.map;var oM=this.getParseCacheIndex(e.getZoom());var oP;if(this._parseCache[oM]){oP=this._parseCache[oM]}else{var oK=oN;if(this.greatCirclePoints.length>0){oK=this.greatCirclePoints}var oL=this.getParseTolerance(e.getZoom(),1);if(!this.hasMultipleParts){var oO=fS(oK,oL);oO=mo(oO,oL)}else{var oO=[];for(var C=0;C<oK.length;C++){var T=fS(oK[C],oL);T=mo(T,oL);oO.push(T)}}oP=this._parseCache[oM]=oO}return oP},_clearCache:function(){this._parseCache.length=0;this._parseCacheGL.length=0;this._parseCacheGLRaw.length=0;this._areaCacheGL.length=0},canRenderDataBeMerged:function(){var e=this._config;if(e.texture){return false}return true}});if(hv.Browser.ie&&document.namespaces&&!document.namespaces.olv){document.namespaces.add("olv","urn:schemas-microsoft-com:vml")}function cl(oL,T,oS){var oP=false,oN=false,oQ=false,oU=new hV(oL.x,oL.y),oT=new hV(T.x,T.y),oK=iy(oU,oS),C=iy(oT,oS),oR;var oW,oV;var oO=oS.minX,oM=oS.minY,i=oS.maxX,e=oS.maxY;do{if(oK.all==0&&C.all==0){oP=true;oQ=true}else{if((oK.all&C.all)!=0){oQ=true}else{if(oK.all!=0){oR=oK}else{oR=C}if(oR.top){oW=oU.x+(oT.x-oU.x)*(oM-oU.y)/(oT.y-oU.y);oV=oM}else{if(oR.bottom){oW=oU.x+(oT.x-oU.x)*(e-oU.y)/(oT.y-oU.y);oV=e}else{if(oR.right){oV=oU.y+(oT.y-oU.y)*(i-oU.x)/(oT.x-oU.x);oW=i}else{if(oR.left){oV=oU.y+(oT.y-oU.y)*(oO-oU.x)/(oT.x-oU.x);oW=oO}}}}oN=true;if(oR.all==oK.all){oU.x=Math.round(oW);oU.y=Math.round(oV);oK=iy(oU,oS)}else{oT.x=Math.round(oW);oT.y=Math.round(oV);C=iy(oT,oS)}}}}while(!oQ);if(oP){return{pixel0:new hV(oU.x,oU.y),pixel1:new hV(oT.x,oT.y),clip:oN?true:false}}}function iy(i,oK){var C={top:0,bottom:0,right:0,left:0,all:0};var e=i.x,T=i.y;if(T<oK.minY){C.top=8;C.all+=C.top}else{if(T>oK.maxY){C.bottom=4;C.all+=C.bottom}}if(e>oK.maxX){C.right=2;C.all+=C.right}else{if(e<oK.minX){C.left=1;C.all+=C.left}}return C}function fH(e){e=e.replace(/,/gm," ");e=e.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2");e=e.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2");e=e.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,"$1 $2");e=e.replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2");e=e.replace(/([0-9])([+\-])/gm,"$1 $2");e=e.replace(/(\.[0-9]*)(\.)/gm,"$1 $2");e=e.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ");e=fH.compressSpaces(e);e=fH.trim(e);this.PathParser=new (function(i){this.tokens=i.split(" ");this.reset=function(){this.i=-1;this.command="";this.previousCommand="";this.start=new fH.Point(0,0);this.control=new fH.Point(0,0);this.current=new fH.Point(0,0);this.points=[];this.angles=[]};this.isEnd=function(){return this.i>=this.tokens.length-1};this.isCommandOrEnd=function(){if(this.isEnd()){return true}return this.tokens[this.i+1].match(/^[A-Za-z]$/)!=null};this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return true;break}return false};this.getToken=function(){this.i++;return this.tokens[this.i]};this.getScalar=function(){return parseFloat(this.getToken())};this.nextCommand=function(){this.previousCommand=this.command;this.command=this.getToken()};this.getPoint=function(){var C=new fH.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(C)};this.getAsControlPoint=function(){var C=this.getPoint();this.control=C;return C};this.getAsCurrentPoint=function(){var C=this.getPoint();this.current=C;return C};this.getReflectedControlPoint=function(){if(this.previousCommand.toLowerCase()!="c"&&this.previousCommand.toLowerCase()!="s"&&this.previousCommand.toLowerCase()!="q"&&this.previousCommand.toLowerCase()!="t"){return this.current}var C=new fH.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return C};this.makeAbsolute=function(C){if(this.isRelativeCommand()){C.x+=this.current.x;C.y+=this.current.y}return C};this.addMarker=function(T,oK,C){if(C!=null&&this.angles.length>0&&this.angles[this.angles.length-1]==null){this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(C)}this.addMarkerAngle(T,oK==null?null:oK.angleTo(T))};this.addMarkerAngle=function(T,C){this.points.push(T);this.angles.push(C)};this.getMarkerPoints=function(){return this.points};this.getMarkerAngles=function(){for(var T=0;T<this.angles.length;T++){if(this.angles[T]==null){for(var C=T+1;C<this.angles.length;C++){if(this.angles[C]!=null){this.angles[T]=this.angles[C];break}}}}return this.angles}})(e);this.bounds=function(){return this.draw(null)};this.draw=function(o3){var o5=this.PathParser;o5.reset();var oQ=new fH.BoundingBox();if(o3!=null){o3.beginPath()}while(!o5.isEnd()){o5.nextCommand();switch(o5.command){case"M":case"m":var o0=o5.getAsCurrentPoint();o5.addMarker(o0);oQ.addPoint(o0.x,o0.y);if(o3!=null){o3.moveTo(o0.x,o0.y)}o5.start=o5.current;while(!o5.isCommandOrEnd()){var o0=o5.getAsCurrentPoint();o5.addMarker(o0,o5.start);oQ.addPoint(o0.x,o0.y);if(o3!=null){o3.lineTo(o0.x,o0.y)}}break;case"L":case"l":while(!o5.isCommandOrEnd()){var o9=o5.current;var o0=o5.getAsCurrentPoint();o5.addMarker(o0,o9);oQ.addPoint(o0.x,o0.y);if(o3!=null){o3.lineTo(o0.x,o0.y)}}break;case"H":case"h":while(!o5.isCommandOrEnd()){var T=new fH.Point((o5.isRelativeCommand()?o5.current.x:0)+o5.getScalar(),o5.current.y);o5.addMarker(T,o5.current);o5.current=T;oQ.addPoint(o5.current.x,o5.current.y);if(o3!=null){o3.lineTo(o5.current.x,o5.current.y)}}break;case"V":case"v":while(!o5.isCommandOrEnd()){var T=new fH.Point(o5.current.x,(o5.isRelativeCommand()?o5.current.y:0)+o5.getScalar());o5.addMarker(T,o5.current);o5.current=T;oQ.addPoint(o5.current.x,o5.current.y);if(o3!=null){o3.lineTo(o5.current.x,o5.current.y)}}break;case"C":case"c":while(!o5.isCommandOrEnd()){var o7=o5.current;var oL=o5.getPoint();var oM=o5.getAsControlPoint();var oS=o5.getAsCurrentPoint();o5.addMarker(oS,oM,oL);oQ.addBezierCurve(o7.x,o7.y,oL.x,oL.y,oM.x,oM.y,oS.x,oS.y);if(o3!=null){o3.bezierCurveTo(oL.x,oL.y,oM.x,oM.y,oS.x,oS.y)}}break;case"S":case"s":while(!o5.isCommandOrEnd()){var o7=o5.current;var oL=o5.getReflectedControlPoint();var oM=o5.getAsControlPoint();var oS=o5.getAsCurrentPoint();o5.addMarker(oS,oM,oL);oQ.addBezierCurve(o7.x,o7.y,oL.x,oL.y,oM.x,oM.y,oS.x,oS.y);if(o3!=null){o3.bezierCurveTo(oL.x,oL.y,oM.x,oM.y,oS.x,oS.y)}}break;case"Q":case"q":while(!o5.isCommandOrEnd()){var o7=o5.current;var oM=o5.getAsControlPoint();var oS=o5.getAsCurrentPoint();o5.addMarker(oS,oM,oM);oQ.addQuadraticCurve(o7.x,o7.y,oM.x,oM.y,oS.x,oS.y);if(o3!=null){o3.quadraticCurveTo(oM.x,oM.y,oS.x,oS.y)}}break;case"T":case"t":while(!o5.isCommandOrEnd()){var o7=o5.current;var oM=o5.getReflectedControlPoint();o5.control=oM;var oS=o5.getAsCurrentPoint();o5.addMarker(oS,oM,oM);oQ.addQuadraticCurve(o7.x,o7.y,oM.x,oM.y,oS.x,oS.y);if(o3!=null){o3.quadraticCurveTo(oM.x,oM.y,oS.x,oS.y)}}break;case"A":case"a":while(!o5.isCommandOrEnd()){var o7=o5.current;var oP=o5.getScalar();var oO=o5.getScalar();var C=o5.getScalar()*(Math.PI/180);var oR=o5.getScalar();var oN=o5.getScalar();var oS=o5.getAsCurrentPoint();var pc=new fH.Point(Math.cos(C)*(o7.x-oS.x)/2+Math.sin(C)*(o7.y-oS.y)/2,-Math.sin(C)*(o7.x-oS.x)/2+Math.cos(C)*(o7.y-oS.y)/2);var o4=Math.pow(pc.x,2)/Math.pow(oP,2)+Math.pow(pc.y,2)/Math.pow(oO,2);if(o4>1){oP*=Math.sqrt(o4);oO*=Math.sqrt(o4)}var oW=(oR==oN?-1:1)*Math.sqrt(((Math.pow(oP,2)*Math.pow(oO,2))-(Math.pow(oP,2)*Math.pow(pc.y,2))-(Math.pow(oO,2)*Math.pow(pc.x,2)))/(Math.pow(oP,2)*Math.pow(pc.y,2)+Math.pow(oO,2)*Math.pow(pc.x,2)));if(isNaN(oW)){oW=0}var oV=new fH.Point(oW*oP*pc.y/oO,oW*-oO*pc.x/oP);var oK=new fH.Point((o7.x+oS.x)/2+Math.cos(C)*oV.x-Math.sin(C)*oV.y,(o7.y+oS.y)/2+Math.sin(C)*oV.x+Math.cos(C)*oV.y);var o2=function(pd){return Math.sqrt(Math.pow(pd[0],2)+Math.pow(pd[1],2))};var oY=function(pe,pd){return(pe[0]*pd[0]+pe[1]*pd[1])/(o2(pe)*o2(pd))};var pa=function(pe,pd){return(pe[0]*pd[1]<pe[1]*pd[0]?-1:1)*Math.acos(oY(pe,pd))};var pb=pa([1,0],[(pc.x-oV.x)/oP,(pc.y-oV.y)/oO]);var oU=[(pc.x-oV.x)/oP,(pc.y-oV.y)/oO];var oT=[(-pc.x-oV.x)/oP,(-pc.y-oV.y)/oO];var o8=pa(oU,oT);if(oY(oU,oT)<=-1){o8=Math.PI}if(oY(oU,oT)>=1){o8=0}var o1=1-oN?1:-1;var o6=pb+o1*(o8/2);var i=new fH.Point(oK.x+oP*Math.cos(o6),oK.y+oO*Math.sin(o6));o5.addMarkerAngle(i,o6-o1*Math.PI/2);o5.addMarkerAngle(oS,o6-o1*Math.PI);oQ.addPoint(oS.x,oS.y);if(o3!=null){var oY=oP>oO?oP:oO;var oZ=oP>oO?1:oP/oO;var oX=oP>oO?oO/oP:1;o3.translate(oK.x,oK.y);o3.rotate(C);o3.scale(oZ,oX);o3.arc(0,0,oY,pb,pb+o8,1-oN);o3.scale(1/oZ,1/oX);o3.rotate(-C);o3.translate(-oK.x,-oK.y)}}break;case"Z":case"z":if(o3!=null){o3.closePath()}o5.current=o5.start}}return oQ};this.getMarkers=function(){var T=this.PathParser.getMarkerPoints();var oL=this.PathParser.getMarkerAngles();var oK=[];for(var C=0;C<T.length;C++){oK.push([T[C],oL[C]])}return oK}}fH.trim=function(e){return e.replace(/^\s+|\s+$/g,"")};fH.compressSpaces=function(e){return e.replace(/[\s\r\t\n]+/gm," ")};fH.Point=function(e,i){this.x=e;this.y=i};fH.Point.prototype.angleTo=function(e){return Math.atan2(e.y-this.y,e.x-this.x)};fH.Point.prototype.applyTransform=function(e){var i=this.x*e[0]+this.y*e[2]+e[4];var C=this.x*e[1]+this.y*e[3]+e[5];this.x=i;this.y=C};fH.BoundingBox=function(i,T,e,C){this.x1=Number.NaN;this.y1=Number.NaN;this.x2=Number.NaN;this.y2=Number.NaN;this.x=function(){return this.x1};this.y=function(){return this.y1};this.width=function(){return this.x2-this.x1};this.height=function(){return this.y2-this.y1};this.addPoint=function(oK,oL){if(oK!=null){if(isNaN(this.x1)||isNaN(this.x2)){this.x1=oK;this.x2=oK}if(oK<this.x1){this.x1=oK}if(oK>this.x2){this.x2=oK}}if(oL!=null){if(isNaN(this.y1)||isNaN(this.y2)){this.y1=oL;this.y2=oL}if(oL<this.y1){this.y1=oL}if(oL>this.y2){this.y2=oL}}};this.addX=function(oK){this.addPoint(oK,null)};this.addY=function(oK){this.addPoint(null,oK)};this.addBoundingBox=function(oK){this.addPoint(oK.x1,oK.y1);this.addPoint(oK.x2,oK.y2)};this.addQuadraticCurve=function(oP,oO,oL,oK,oR,oQ){var oN=oP+2/3*(oL-oP);var oM=oO+2/3*(oK-oO);var oT=oN+1/3*(oR-oP);var oS=oM+1/3*(oQ-oO);this.addBezierCurve(oP,oO,oN,oT,oM,oS,oR,oQ)};this.addBezierCurve=function(oX,oW,oO,oM,oT,oR,oZ,oY){var oP=[oX,oW],oN=[oO,oM],oL=[oT,oR],oK=[oZ,oY];this.addPoint(oP[0],oP[1]);this.addPoint(oK[0],oK[1]);for(nw=0;nw<=1;nw++){var o0=function(o4){return Math.pow(1-o4,3)*oP[nw]+3*Math.pow(1-o4,2)*o4*oN[nw]+3*(1-o4)*Math.pow(o4,2)*oL[nw]+Math.pow(o4,3)*oK[nw]};var o2=6*oP[nw]-12*oN[nw]+6*oL[nw];var o3=-3*oP[nw]+9*oN[nw]-9*oL[nw]+3*oK[nw];var o1=3*oN[nw]-3*oP[nw];if(o3==0){if(o2==0){continue}var oV=-o1/o2;if(0<oV&&oV<1){if(nw==0){this.addX(o0(oV))}if(nw==1){this.addY(o0(oV))}}continue}var oQ=Math.pow(o2,2)-4*o1*o3;if(oQ<0){continue}var oU=(-o2+Math.sqrt(oQ))/(2*o3);if(0<oU&&oU<1){if(nw==0){this.addX(o0(oU))}if(nw==1){this.addY(o0(oU))}}var oS=(-o2-Math.sqrt(oQ))/(2*o3);if(0<oS&&oS<1){if(nw==0){this.addX(o0(oS))}if(nw==1){this.addY(o0(oS))}}}};this.isPointInBox=function(oK,oL){return(this.x1<=oK&&oK<=this.x2&&this.y1<=oL&&oL<=this.y2)};this.addPoint(i,T);this.addPoint(e,C)};function hS(i,e){this.id=cv.getGUID("symbol_icon_");this.size=(i instanceof mU)?i:new mU(2,2);this.anchor=(e instanceof mU)?e:new mU(this.size.width/2,this.size.height/2);this.data=null;this.offset=this.anchor;this.imageSize=this.size;this.imageOffset=new mU(0,0);this.style={scale:1,rotation:0};this.srcSetObject={};this._initOptions={size:this.size,scale:this.style.scale,rotation:this.style.rotation};this.overlay=null;this.isReDraw=false}hS.prototype.add=function(){const e=document.createElement("canvas");e.width=this.size.width;e.height=this.size.height;this.context=e.getContext("2d")};hS.prototype.remove=function(){if(this.context){this.context.clearRect(0,0,this.context.canvas.width,this.context.canvas.height);this.context.canvas.width=0;this.context.canvas.height=0}this.context=null;this.data=null};hS.prototype.render=function(e){return true};hS.prototype.resetInitOptions=function(){this._initOptions=new mU(this.size.width,this.size.height);this._initOptions.scale=this.style.scale;this._initOptions.rotation=this.style.rotation};hS.prototype.update=function(){var e=this.overlay;if(e){if(e.domElement){var T=(this.style.scale-this._initOptions.scale)/this._initOptions.scale;if(T>=0){T=T+1}else{T=1+T}var i=this._initOptions.rotation===0?this.style.rotation:(this.style.rotation-this._initOptions.rotation);while(i<0){i+=360}var C=e.domElement.style;C.width=this._initOptions.width+"px";C.height=this._initOptions.height+"px";C.transform="rotate("+i+"deg) scale("+T+")"}if(!this.isReDraw){this._refresh(e)}}};hS.prototype._refresh=function(e){e.textureCoord=e.textureCoordGLMap=null;var i=new ix("onstatus_change");i.overlay=e;i.action="setIcon";i.imageUrlChanged=true;setTimeout(function(){e.fire(i)},100)};hS.prototype.generateRenderData=function(){var i=this.offset=this.anchor;var e=this.size;var C=[];C.push(-i.width,i.height-e.height,0);C.push(e.width-i.width,i.height-e.height,0);C.push(e.width-i.width,i.height,0);C.push(-i.width,i.height-e.height,0);C.push(e.width-i.width,i.height,0);C.push(-i.width,i.height,0);return{vertex:C}};hS.prototype.getCurrentImageUrl=function(){return this.id};hS.prototype.getRenderData=function(){this._renderData=this.generateRenderData();return this._renderData};hS.prototype.setAnchor=function(e){if(e instanceof mU){this.anchor=e;this.offset=e}};hS.prototype.toString=function(){return"Symbol"};var ie={14:"m-0.00573,-10c-5.51975,0 -9.99427,4.47453 -9.99427,9.99428c0,5.51974 4.47452,9.99425 9.99427,9.99425c5.51972,0 9.99426,-4.47452 9.99426,-9.99425c0,-5.51975 -4.47453,-9.99428 -9.99426,-9.99428zm0,17.92491c-4.37412,0 -7.93132,-3.55788 -7.93132,-7.93063c0,-4.37345 3.5572,-7.93134 7.93132,-7.93134c4.37411,0 7.93062,3.55721 7.93062,7.93134c0,4.37412 -3.55789,7.93063 -7.93062,7.93063zm-0.00068,-15.4088c-0.38027,0 -0.68696,0.30807 -0.68696,0.68765l0,6.34078l-4.15752,1.81815c-0.34794,0.15266 -0.50611,0.55837 -0.35344,0.90632c0.11278,0.25787 0.36445,0.4119 0.6292,0.4119c0.09214,0 0.18635,-0.01857 0.27575,-0.05845l4.55635,-1.99279c0.00344,-0.00137 0.00619,-0.00275 0.00894,-0.00412l0.00275,-0.00138c0.01032,-0.00413 0.01581,-0.01376 0.02545,-0.01719c0.07151,-0.03576 0.13821,-0.07771 0.19185,-0.1341c0.02337,-0.02338 0.03644,-0.05364 0.05431,-0.08045c0.03301,-0.04401 0.06946,-0.08733 0.0894,-0.14028c0.0165,-0.04126 0.01787,-0.08596 0.02613,-0.12997c0.00894,-0.04469 0.02614,-0.08389 0.02614,-0.1286l0,-6.7905c0,-0.37889 -0.30807,-0.68697 -0.68833,-0.68697z",13:"m-0.00706,-9.5c-5.24281,0 -9.49294,4.25065 -9.49294,9.49294c0,5.24331 4.25014,9.49294 9.49294,9.49294c5.24281,0 9.49294,-4.24964 9.49294,-9.49294c0,-5.2423 -4.25013,-9.49294 -9.49294,-9.49294zm3.08857,3.85997c0.61044,0 1.10279,0.96873 1.10279,2.16271s-0.49384,2.1647 -1.10279,2.1647c-0.60844,0 -1.10228,-0.96873 -1.10228,-2.16372s0.49434,-2.16369 1.10228,-2.16369zm-6.28628,0c0.60844,0 1.10228,0.96873 1.10228,2.16271s-0.49284,2.1647 -1.10228,2.1647s-1.10277,-0.96873 -1.10277,-2.16372s0.49383,-2.16369 1.10277,-2.16369zm3.21167,12.16493c-1.87667,0 -3.63373,-1.14814 -5.14663,-3.14239c1.56571,1.02156 3.27993,1.59064 5.07786,1.59064c1.90905,0 3.72343,-0.63985 5.36539,-1.78497c-1.54429,2.11685 -3.35767,3.33672 -5.29662,3.33672l-0.00001,0z",12:"m9.27295,5.92958l-2.64443,-4.57961c-0.79727,-1.37992 -2.10131,-3.63983 -2.8986,-5.01973l-2.64441,-4.57858c-0.79782,-1.38093 -2.10186,-1.38093 -2.89913,0l-2.64335,4.57858c-0.79728,1.3799 -2.10188,3.63981 -2.89916,5.01973l-2.64387,4.57961c-0.79728,1.38101 -0.14472,2.50988 1.44983,2.50988l16.37221,0c1.59561,0 2.24711,-1.12887 1.45091,-2.50988l0,0zm-8.88166,0.70811l-1.56837,0l0,-1.50484l1.56837,0l0,1.50484zm-0.07527,-2.61447l-1.41621,0l-0.14044,-6.44231l1.68427,0l-0.12761,6.44231l0,0z",11:"m8.08295,-6.56414l-3.59319,0l0,-1.43586l-8.98155,0l0,1.43586l-3.59321,0c-1.0569,0 -1.915,0.85509 -1.915,1.91159l0,9.92258c0,1.05357 0.8581,1.91158 1.915,1.91158l16.16796,0c1.05692,0 1.91501,-0.85801 1.91501,-1.91158l0,-9.92258c0,-1.0565 -0.85809,-1.91159 -1.91501,-1.91159l0,0zm-8.08397,12.66884c-3.20143,0 -5.80643,-2.60031 -5.80643,-5.79596c0,-3.19569 2.605,-5.79891 5.80643,-5.79891s5.80789,2.60322 5.80789,5.79891c0,3.19565 -2.60794,5.79596 -5.80789,5.79596zm0,-9.6804c-2.15036,0 -3.89142,1.7394 -3.89142,3.88444c0,2.14503 1.74252,3.8844 3.89142,3.8844c2.1489,0 3.89141,-1.73937 3.89141,-3.8844c0,-2.14503 -1.74105,-3.88444 -3.89141,-3.88444z",10:"m0,-10c-0.20885,0 -0.39491,0.08583 -0.55177,0.24149c-0.15674,0.15536 -0.28646,0.37838 -0.39429,0.65665c-0.21586,0.55655 -0.34853,1.33844 -0.42114,2.27477c-0.07231,0.93446 -0.08474,2.02273 -0.05447,3.18765c-2.58175,1.05925 -7.81787,3.24648 -8.23854,3.73474c-0.56001,0.65029 -0.37908,1.3954 -0.15331,1.89002l8.608,-1.75235c0.18202,2.28374 0.4407,4.5455 0.66615,6.31771c-0.8418,0.24646 -2.41323,0.73303 -2.73754,1.03474c-0.4469,0.41562 -0.4469,1.75793 -0.4469,1.75793l3.52318,-0.28665c0.08286,0.57874 0.13486,0.9163 0.13486,0.9163l0.00511,0.03042l0.02778,0l0.06486,0l0.02778,0l0.00511,-0.03042c0,0 0.05185,-0.33756 0.13486,-0.9163l3.52424,0.28665c0,0 0,-1.34231 -0.44688,-1.75793c-0.32446,-0.30172 -1.89697,-0.7895 -2.73847,-1.0358c0.22484,-1.76681 0.4832,-4.02001 0.66507,-6.29634l8.50712,1.73203c0.22561,-0.49462 0.40765,-1.23973 -0.15237,-1.89002c-0.41538,-0.48221 -5.52504,-2.62071 -8.1386,-3.69423c0.03119,-1.17999 0.01971,-2.28285 -0.05353,-3.22816l0,-0.00233c-0.07263,-0.93523 -0.20545,-1.71635 -0.42114,-2.27244c-0.10784,-0.27827 -0.23634,-0.50114 -0.3932,-0.65665c-0.15689,-0.15567 -0.34293,-0.24149 -0.55195,-0.24149l0,0l0,0l0,0l0.00001,0l0,0l-0.00003,0.00001z",3:"m-10,0l10,-10l10,10l-10,10l-10,-10z",5:"M0,0 L-5,-15 0,-10 5,-15 z",6:"M0,0 L5,15 0,10 -5,15z",7:"M-5,-15 L0,0 5,-15",8:"M-5,15 L0,0 5,15",9:"m0,-24c-4.4183,0 -8,3.58167 -8,8c0,1.42102 0.3816,2.75 1.0312,3.90601c0.1079,0.19202 0.221,0.38098 0.3438,0.56299l6.625,11.53101l6.625,-11.53101c0.102,-0.151 0.19,-0.31097 0.281,-0.46899l0.063,-0.09399c0.649,-1.15601 1.031,-2.48499 1.031,-3.90601c0,-4.41833 -3.582,-8 -8,-8zm0,4c2.209,0 4,1.79089 4,4c0,2.20898 -1.791,4 -4,4c-2.2091,0 -4,-1.79102 -4,-4c0,-2.20911 1.7909,-4 4,-4z"};var dq={BMap_Symbol_SHAPE_CIRCLE:1,BMap_Symbol_SHAPE_RECTANGLE:2,BMap_Symbol_SHAPE_RHOMBUS:3,BMap_Symbol_SHAPE_STAR:4,BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW:5,BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW:6,BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW:7,BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW:8,BMap_Symbol_SHAPE_POINT:9,BMap_Symbol_SHAPE_PLANE:10,BMap_Symbol_SHAPE_CAMERA:11,BMap_Symbol_SHAPE_WARNING:12,BMap_Symbol_SHAPE_SMILE:13,BMap_Symbol_SHAPE_CLOCK:14};function fK(i,e){hS.call(this);e=e||{};this.style={anchor:e.anchor||new mU(0,0),fillColor:e.fillColor||"#000",fillOpacity:e.fillOpacity||0,scale:e.scale||1,rotation:e.rotation||0,strokeColor:e.strokeColor||"#000",strokeOpacity:e.strokeOpacity===undefined?1:e.strokeOpacity,strokeWeight:e.strokeWeight};this._type=(typeof i==="number")?i:"UserDefined";this._anchor=this.style.anchor;this._originOffset=new mU(0,0);this.anchor=new mU(0,0);this._rawPath=i;this._buildPath(true)}fK.inherits(hS,"SVGSymbol");fK.generateKey=function(T,i){if(!T){return null}if(parseInt(T)){T=parseInt(T)}if(typeof T==="number"){if(!ie[T]&&![0,1,2,0,4][T]){return null}}var e={anchor:i.anchor||new mU(0,0),fillColor:i.fillColor||"#000",fillOpacity:i.fillOpacity||0,scale:i.scale||1,rotation:i.rotation||0,strokeColor:i.strokeColor||"#000",strokeOpacity:i.strokeOpacity===undefined?1:i.strokeOpacity,strokeWeight:i.strokeWeight};var C=u({path:T,style:e});return"symbol_svg_icon_"+C};hv.extend(fK.prototype,{_buildPath:function(oU){var oO=this;var oQ=oO._rawPath;if(parseInt(oQ)){oQ=parseInt(oQ)}if(ie[oQ]){oQ=ie[oQ]}oO.id=fK.generateKey(oQ,oO.style);if(!oO.id){return}this._originOffset=new mU(0,0);this._innerOffset=null;this._rotationAngle=0;switch(oQ){case dq.BMap_Symbol_SHAPE_CIRCLE:var oR=oO._calSize(2),oP=oR,oZ=oO.style.scale,oK=oO._anchor;this.size=new mU(oR,oP);this.anchor=new mU(oR/2+oK.width*oZ,oP/2+oK.height*oZ);oO.path=dq.BMap_Symbol_SHAPE_CIRCLE;break;case dq.BMap_Symbol_SHAPE_RECTANGLE:var oR=oO._calSize(4),oP=oO._calSize(2),oK=oO._anchor,oW=oO.style.strokeWeight!==undefined?oO.style.strokeWeight:oO.style.scale,oZ=oO.style.scale;this.size=new mU(oR,oP);this._originOffset=new mU(Math.floor(-oW/2),Math.floor(-oW/2));this.anchor=new mU(oR/2+oK.width*oZ,oP/2+oK.height*oZ);oO.path=dq.BMap_Symbol_SHAPE_RECTANGLE;break;case dq.BMap_Symbol_SHAPE_STAR:var oR=oO._calSize(20),oP=oR,oK=oO._anchor,oZ=oO.style.scale;this.size=new mU(oR,oP);this.anchor=new mU(oR/2+oK.width*oZ,oP/2+oK.height*oZ);oO.path=dq.BMap_Symbol_SHAPE_STAR;break;default:var oQ=new fH(oQ),T=oQ.bounds(),oT=oO.style.rotation*Math.PI/180,oW=oO.style.strokeWeight!==undefined?oO.style.strokeWeight:oO.style.scale,oZ=oO.style.scale,oK=oO._anchor;var oY=new mU(Math.floor(T.x1*oZ-oW/2),Math.floor(T.y1*oZ-oW/2)),e={topleft:new hV(Math.floor(T.x1*oZ-oW/2)-oZ*oK.width,Math.floor(T.y1*oZ-oW/2)-oZ*oK.height),bottomleft:new hV(Math.floor(T.x1*oZ-oW/2)-oZ*oK.width,Math.ceil(T.y2*oZ-oW/2)-oZ*oK.height),topright:new hV(Math.ceil(T.x2*oZ+oW/2)-oZ*oK.width,Math.floor(T.y1*oZ-oW/2)-oZ*oK.height),bottomright:new hV(Math.ceil(T.x2*oZ+oW/2)-oZ*oK.width,Math.ceil(T.y2*oZ+oW/2)-oZ*oK.height)},i={},oX=[],oN=[];var oV=e.topleft.x===0?0:Math.atan(e.topleft.y/e.topleft.x),C=oV+oT;for(var oS in e){var oM=Math.cos(oT)*e[oS].x-Math.sin(oT)*e[oS].y,oL=Math.sin(oT)*e[oS].x+Math.cos(oT)*e[oS].y;i[oS]=new hV(oM,oL);oX.push(oM);oN.push(oL)}xmax=Math.max.apply(Math,oX),ymax=Math.max.apply(Math,oN),xmin=Math.min.apply(Math,oX),ymin=Math.min.apply(Math,oN);this.size=new mU(Math.ceil(xmax-xmin),Math.ceil(ymax-ymin));this.anchor=new mU(-xmin,-ymin);this._originOffset=new mU(xmin-i.topleft.x,ymin-i.topleft.y);this._innerOffset=new hV(oY.width,oY.height);this._rotationAngle=oT;oO.path=oQ;break}this.imageSize=new mU(this.size.width,this.size.height);this.offset=this.anchor;if(oU){this.resetInitOptions()}},_calSize:function(e){if(this.style.strokeWeight){return e*this.style.scale+this.style.strokeWeight%3+this.style.strokeWeight}else{return e*this.style.scale+this.style.scale+this.style.scale%2}},render:function(C){var oQ=this,T=this.style.scale,oR,oS=this.size;var oO=(C&&C.config&&C.config.ratio)||1;if(this.context){oR=this.context;if(this.context.canvas.width/oO!==this.size.width||this.context.canvas.height/oO!==this.size.height){this.context.canvas.width=this.size.width*oO;this.context.canvas.height=this.size.height*oO}oR.clearRect(0,0,this.size.width*oO,this.size.height*oO);oR.fillStyle=k0.convert2rgba(oQ.style.fillColor,oQ.style.fillOpacity);oR.strokeStyle=k0.convert2rgba(oQ.style.strokeColor,oQ.style.strokeOpacity);oR.save()}else{return false}oR.scale(oO,oO);oR.lineCap="round";oR.lineJoin="round";oR.lineWidth=oQ.style.strokeWeight||T;if(oQ._originOffset){oR.translate(-oQ._originOffset.width,-oQ._originOffset.height)}if(oQ._rotationAngle){oR.rotate(oQ._rotationAngle)}if(oQ._innerOffset){oR.translate(-oQ._innerOffset.x,-oQ._innerOffset.y)}switch(oQ.path){case dq.BMap_Symbol_SHAPE_CIRCLE:oR.arc(oS.width/2,oS.height/2,T,0,2*Math.PI);break;case dq.BMap_Symbol_SHAPE_RECTANGLE:oR.rect(0,0,4*T,2*T);break;case dq.BMap_Symbol_SHAPE_STAR:oR.beginPath();var oL=oS.width/2,oN=T*10;var oK=(2*Math.PI)/10;for(var oM=11;oM!=0;oM--){var e=oN*(oM%2+1)/2;var oP=oK*oM;oR.lineTo((e*Math.sin(oP))+oL,(e*Math.cos(oP))+oL)}oR.closePath();break;default:oR.lineWidth=oR.lineWidth/T;oR.scale(T,T);oQ.path.draw(oR)}oR.fill();oR.stroke();oR.restore();this.data=oR.getImageData(0,0,this.size.width*oO,this.size.height*oO);return true},setPath:function(e){this._rawPath=e;this._buildPath();this.update()},setAnchor:function(e){if(K.apiVersionIsGL()){this._anchor=this.style.anchor=e;this._buildPath();this.update()}else{if(e instanceof mU){this.anchor=e;this.offset=e}}},setRotation:function(e){this.style.rotation=e;this._buildPath();this.update()},setScale:function(e){this.style.scale=e;this._buildPath();this.update()},setStrokeWeight:function(e){this.style.strokeWeight=e;this._buildPath();this.update()},setStrokeColor:function(e){e=k0.convert2rgba(e,this.style.strokeOpacity);this.style.strokeColor=e;this._buildPath();this.update()},setStrokeOpacity:function(e){this.style.strokeOpacity=e;this._buildPath();this.update()},setFillOpacity:function(e){this.style.fillOpacity=e;this._buildPath();this.update()},setFillColor:function(e){this.style.fillColor=e;this._buildPath();this.update()}});cv.SymbolShapeType=dq;(function(){for(var e in dq){if(dq.hasOwnProperty(e)){window[e]=dq[e]}}})();function nF(oL,T,C){if(!oL||!T){return}this.imageUrl=null;this.imageDom=null;if(typeof oL==="string"){this.imageUrl=oL}else{this.imageDom=oL;if(!this.imageDom.id){this.imageDom.id=cv.getGUID("icon_dom_")}}this.size=T;var oK=new mU(Math.floor(T.width/2),Math.floor(T.height/2));var i={offset:oK,imageOffset:new mU(0,0)};C=C||{};for(var e in C){i[e]=C[e]}if(C.anchor){i.offset=C.anchor}this.anchor=this.offset=i.offset;this.imageOffset=i.imageOffset;this.infoWindowOffset=C.infoWindowOffset||this.offset;if(C.infoWindowAnchor){this.infoWindowOffset=C.infoWindowAnchor}this.printImageUrl=C.printImageUrl||"";this.imageSize=C.imageSize||this.size;this.srcSetObject={};this.setImageSrcset(C.srcset||C.srcSet)}nF.prototype.setImageUrl=function(e){if(!e){return}this.imageUrl=e;this._renderData=null};nF.prototype.getCurrentImageUrl=function(){if(window.devicePixelRatio>1&&this.srcSetObject["2x"]){return this.srcSetObject["2x"]}return this.imageUrl};nF.prototype.setPrintImageUrl=function(e){if(!e){return}this.printImageUrl=e};nF.prototype.setSize=function(e){if(!e){return}this.size=new mU(e.width,e.height);this._renderData=null};nF.prototype.setOffset=function(e){if(!e){return}this.anchor=this.offset=new mU(e.width,e.height);this._renderData=null};nF.prototype.setAnchor=function(e){this.setOffset(e)};nF.prototype.setImageOffset=function(e){if(!e){return}this.imageOffset=new mU(e.width,e.height);this._renderData=null};nF.prototype.setInfoWindowOffset=function(e){if(!e){return}this.infoWindowOffset=new mU(e.width,e.height)};nF.prototype.setInfoWindowAnchor=function(e){this.setInfoWindowOffset(e)};nF.prototype.setImageSize=function(e){if(!e){return}this.imageSize=new mU(e.width,e.height)};nF.prototype.setImageSrcset=function(C){var e="";if(!C){return}for(var i in C){if(C.hasOwnProperty(i)){this.srcSetObject[i]=C[i];e=C[i]+" "+i+","}}this.srcSet=e};nF.prototype.toString=function(){return"Icon"};nF.prototype.generateRenderData=function(oL){var C=this.offset;var e=this.size;var oN=this.imageOffset;var oM=[];oM.push(-C.width,C.height-e.height,0);oM.push(e.width-C.width,C.height-e.height,0);oM.push(e.width-C.width,C.height,0);oM.push(-C.width,C.height-e.height,0);oM.push(e.width-C.width,C.height,0);oM.push(-C.width,C.height,0);if(oL!==0){for(var oK=0;oK<oM.length;oK+=3){var T=i5.fromValues(oM[oK],oM[oK+1]);i5.rotate(T,T,[0,0],mn(-oL));oM[oK]=T[0];oM[oK+1]=T[1]}}return{vertex:oM}};nF.prototype.getRenderData=function(e){this._renderData=this.generateRenderData(e);return this._renderData};function f9(C,i){hv.BaseClass.call(this);this.content=C;this.map=null;this.coordType=(i&&i.coordType)||cv.coordType;this._config={width:0,height:0,maxWidth:730,offset:new mU(0,0),title:"",maxContent:"",enableMaximize:false,enableAutoPan:true,enableCloseOnClick:true,margin:[10,10,40,10],collisions:[[10,10],[10,10],[10,10],[10,10]],ifMaxScene:false,canScroll:false,onClosing:function(){return true},enableMessage:false,enableParano:false,message:"",enableSearchTool:false,headerContent:"",enableContentScroll:false};this.setConfig(i);if(this._config.width!==0){if(this._config.width<220){this._config.width=220}if(this._config.width>730){this._config.width=730}}if(this._config.height!==0){if(this._config.height<60){this._config.height=60}if(this._config.height>650){this._config.height=650}}if(this._config.maxWidth!==0){if(this._config.maxWidth<220){this._config.maxWidth=220}if(this._config.maxWidth>730){this._config.maxWidth=730}}this.isWinMax=false;this.IMG_PATH=K.imgPath;this.overlay=null;this._extraMargins=null;var e=this;ki.load("infowindow",function(){e._draw()})}f9.inherits(hv.BaseClass,"InfoWindow");hv.extend(f9.prototype,{_setExtraMargins:function(e){if(e&&e.length===4){this._extraMargins=[e[0],e[1],e[2],e[3]]}else{this._extraMargins=null}},setWidth:function(e){e=e*1;if(!e&&e!==0||isNaN(e)||e<0){return}if(e!==0){if(e<220){e=220}if(e>730){e=730}}this._config.width=e},setHeight:function(e){e=e*1;if(!e&&e!==0||isNaN(e)||e<0){return}if(e!==0){if(e<60){e=60}if(e>650){e=650}}this._config.height=e},setMaxWidth:function(e){e=e*1;if(!e&&e!==0||isNaN(e)||e<0){return}if(e!==0){if(e<220){e=220}if(e>730){e=730}}this._config.maxWidth=e},setTitle:function(e){this._config.title=e||""},setContent:function(e){this.content=e||""},getContent:function(){return this.content},setMaxContent:function(e){this._config.maxContent=e||""},redraw:function(){},enableAutoPan:function(){this._config.enableAutoPan=true},disableAutoPan:function(){this._config.enableAutoPan=false},enableCloseOnClick:function(){this._config.enableCloseOnClick=true},disableCloseOnClick:function(){this._config.enableCloseOnClick=false},enableMaximize:function(){this._config.enableMaximize=true},disableMaximize:function(){this._config.enableMaximize=false},show:function(){this._visible=true},hide:function(){this._visible=false},close:function(){this.hide()},dispose:function(){hv.BaseClass.prototype.decontrol.call(this)},maximize:function(){this.isWinMax=true},restore:function(){this.isWinMax=false},setConfig:function(i){if(!i){return}for(var e in i){if(typeof(this._config[e])===typeof(i[e])){this._config[e]=i[e]}}},isVisible:function(){return this.isOpen()},isOpen:function(){return false},getPositionIn:function(){if(this.overlay&&this.overlay.getPositionIn){return this.overlay.getPositionIn()}if(this.overlay&&this.overlay.getPoint){var e=this.overlay.getPoint();if(!e){return null}if(!K.apiVersionIsGL()){return m8.convertLL2MC(e)}return e}return null},getTitle:function(){return this._config.title||""},getPosition:function(){if(!K.apiVersionIsGL()){if(this.overlay&&this.overlay.getPosition){return this.overlay.getPosition()}}return this.latLng},getPoint:function(){var e=this.getPositionIn();return m0(m8.convertMC2LL(e),this.coordType)},getOffset:function(){return this._config.offset},dispose:function(){hv.BaseClass.prototype.decontrol.call(this)},toString:function(){return"InfoWindow"}});li.prototype.openInfoWindow=function(oL,e,T){if(!K.apiVersionIsGL()){return this._openInfoWindow30(oL,e)}var oK=e;var C=(T&&T.coordType)||cv.coordType;oK=iM(oK,C);oL.latLng=new d1(oK.lat,oK.lng);var i=m8.convertLL2MC(oK);this.openInfoWindowIn(oL,i)};li.prototype._openInfoWindow30=function(T,e){if(!(T instanceof f9)||!e){return}T.latLng=new d1(e.lat,e.lng);var i=this.temp;if(!i.marker){var C=new nF(K.imgPath+"blank.gif",{width:1,height:1});i.marker=new og(e,{icon:C,offset:new mU(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openInfoWindow(T)};li.prototype.closeInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeInfoWindow()}};li.prototype.openInfoWindowIn=function(T,e){if(!T||T.toString()!=="InfoWindow"||!e||e.toString()!=="Point"){return}var i=this.temp;if(!i.marker){var C=new nF(K.imgPath+"blank.gif",{width:1,height:1});i.marker=new og(e,{icon:C,width:1,height:1,offset:new mU(0,0),infoWindowOffset:new mU(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openInfoWindow(T)};g2.prototype.openInfoWindow=function(e){if(this.map){this.map.closeInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;hv.BaseClass.call(e,e.hashCode)}};g2.prototype.closeInfoWindow=function(){if(this.map&&this.map.temp._infoWin){this.map.temp._infoWin._visible=false;this.map.temp._infoWin.decontrol();this.map.temp._infoWin=null}};function b3(C,i){g2.call(this);this.content=C;this.map=null;this.domElement=null;var T=fq();this._config={width:0,offset:new mU(0,0),styles:{backgroundColor:T.labelBackground,border:"1px solid "+T.labelBorderColor,color:T.labelTextColor,padding:"1px",whiteSpace:"nowrap",fontSize:"12px",zIndex:"80",MozUserSelect:"none"},enableClicking:true,point:null,enableMassClear:true,anchor:0};i=i||{};this.coordType=i.coordType||cv.coordType;this.setConfig(i);if(this._config.width<0){this._config.width=0}this.point=this._config.point;var e=this;ki.load("marker",function(){e._draw()})}b3.inherits(g2,"Label");hv.extend(b3.prototype,{setPoint:function(e){if(e&&e.toString()==="Point"&&!this.getMarker()){this.point=this._config.point=iM(e,this.coordType)}},setContent:function(e){this.content=e},getContent:function(e){return this.content},setOpacity:function(e){if(e>=0&&e<=1){this._config.opacity=e}},setOffset:function(e){if(!e||e.toString()!=="Size"){return}this._config.offset=new mU(e.width,e.height)},getOffset:function(){return this._config.offset},setStyle:function(e){e=e||{};this._config.styles=hv.extend(this._config.styles,e)},setStyles:function(e){this.setStyle(e)},setTitle:function(e){this._config.title=e||""},getTitle:function(){return this._config.title},setMarker:function(e){if(this._marker&&this._marker!==e){this._marker._config.label=null}this._marker=e;if(e){this.point=this._config.point=e.getPoint()}else{this.point=this._config.point=null}},getMarker:function(){return this._marker||null},setAnchor:function(e){this._config.anchor=e!=null?e:0;this.draw()},getAnchor:function(){return this._config.anchor},getPositionIn:function(){var e=this.getPoint?this.getPoint():this.point;if(!e){return null}if(!K.apiVersionIsGL()){return m8.convertLL2MC(e)}return e},setPositionIn:function(e){if(!e){return}if(!K.apiVersionIsGL()){this.setPoint(m8.convertMC2LL(e))}else{this.point=this._config.point=new d9(e.lng,e.lat)}},});function ls(T,C){var oK={};var e=(C&&C.coordType)||cv.coordType;for(var i in C){if(C.hasOwnProperty(i)){if(i==="position"){if(!K.apiVersionIsGL()){oK.point=iM(C[i],e)}else{oK.point=m8.convertLL2MC(iM(C[i],e))}this.latLng=iM(C[i],e)}else{oK[i]=C[i]}}}b3.call(this,T,oK)}ls.inherits(b3,"LabelOut");hv.extend(ls.prototype,{toString:function(){return"Label"},setPosition:function(e){this.latLng=new d1(e.lat,e.lng);var i;if(!K.apiVersionIsGL()){i=e}else{i=m8.convertLL2MC(e)}this.setPoint(i)},getPosition:function(){return m0(this.latLng,this.coordType)}});function cx(){}hv.extend(cx,{isGeoJSON:function(e){if(!e||typeof e!=="object"){return false}if(e instanceof Array){var i=e[0];if(!i||typeof i!=="object"){return false}return i.type==="Feature"||!!i.geometry}if(e.type==="FeatureCollection"||e.type==="Feature"){return true}return !!(e.type&&e.coordinates)},pick:function(e,oK){if(!this.isGeoJSON(e)){return null}var C=h7.normalize(e);if(!C.length){return null}if(C.length>1){this._warn("GeoJSON 鍚涓绱狅紝浠呬娇鐢ㄧ涓�涓紱濡傞渶鍏ㄩ儴娓叉煋璇蜂娇鐢� GeoJSONLayer 鎴栧彲瑙嗗寲鍥惧眰")}var i=C[0];var T=null;if(oK==="point"){T=this._pickPoint(i)}else{if(oK==="polygon"){T=this._pickPolygon(i)}else{T=this._pickLine(i)}}if(!T){return null}return{points:T,properties:i.properties,id:i.id}},_pickPoint:function(e){var i=e.coordinates;if(e.type==="Point"){return this._toPoint(i)}if(e.type==="MultiPoint"){if(i.length>1){this._warn("GeoJSON 鍚涓偣锛孧arker 浠呬娇鐢ㄧ涓�涓�")}return this._toPoint(i[0])}this._warn("GeoJSON 鍑犱綍绫诲瀷 "+e.type+" 涓嶉�傜敤浜� Marker");return null},_pickLine:function(i){var e=h7.toLineStrings(i);if(!e.length){this._warn("GeoJSON 鍑犱綍绫诲瀷 "+i.type+" 涓嶉�傜敤浜� Polyline");return null}if(e.length>1){this._warn("GeoJSON 鍚鏉$嚎锛孭olyline 浠呬娇鐢ㄧ涓�鏉�")}return this._toPoints(e[0])},_pickPolygon:function(i){var e=h7.toPolygons(i);if(!e.length){this._warn("GeoJSON 鍑犱綍绫诲瀷 "+i.type+" 涓嶉�傜敤浜� Polygon");return null}if(e.length>1){this._warn("GeoJSON 鍚涓潰锛孭olygon 浠呬娇鐢ㄧ涓�涓�")}var C=e[0];if(C.length>1){this._warn("Polygon 瑕嗙洊鐗╀笉鏀寔宀涙礊锛屽凡蹇界暐鍐呯幆")}return this._toPoints(C[0])},_toPoint:function(e){if(!e||e.length<2){return null}return new d9(e[0],e[1])},_toPoints:function(C){if(!C||!C.length){return null}var e=[];for(var T=0;T<C.length;T++){var oK=this._toPoint(C[T]);if(oK){e.push(oK)}}return e.length?e:null},_warn:function(e){if(typeof console!=="undefined"&&console.warn){console.warn("[BMapGL] "+e)}}});window.BMAP_ANIMATION_DROP=1;window.BMAP_ANIMATION_BOUNCE=2;window.BMAP_ANIMATION_RAISEUP=3;window.BMAP_ANIMATION_DROPDOWN=4;function og(e,i){g2.call(this);i=i||{};this.delFlag=i.delFlag;this.coordType=i.coordType||cv.coordType;this.point=e;this._rotation=i.rotation||0;this._rotationOrigin=0;this.map=null;this._animation=null;this.domElement=null;this.iconDom=null;this.infoWindowDom=null;this.siblingElement=null;this.textureCoord=null;this.textureCoordGLMap=null;this.collisionDetectionFailed=false;this._config={offset:new mU(0,0),opacity:1,icon:null,title:"",infoWindow:null,label:null,zIndex:null,baseZIndex:0,clickable:true,zIndexFixed:false,isTop:false,enableMassClear:true,enableDragging:false,raiseOnDrag:false,restrictDraggingArea:false,startAnimation:"",enableCollisionDetection:false,rank:0,enableDraggingMap:false,autoFollowHeadingChanged:false,enableClicking:true,draggingCursor:K.draggingCursor,color:null,anchor:null,};this.setOptions(i);if(this._config.zIndex!==undefined){this.zIndex=this._config.zIndex}this._addlog();this._isDragging=false;var C=this;ki.load("marker",function(){C._draw()})}og.TOP_ZINDEX=bw.getZIndex(-90)+1000000;og.DRAG_ZINDEX=og.TOP_ZINDEX+1000000;og._injectMethond=function(e){hv.extend(og.prototype,e)};og._createDefaultIcon=function(){if(K.uiVersionIsGL()){return new nF(K.imgPath+"marker_red.png",new mU(23,25),{offset:new mU(10,25),infoWindowOffset:new mU(10,0)})}return new nF(K.apiIMG+"/marker_new.png",new mU(22,33),{offset:new mU(11,30),infoWindowOffset:new mU(10,0)})};og.inherits(g2,"Marker");hv.extend(og.prototype,{toString:function(){return"Marker"},_addlog:function(){var e=1;var i="normal";if(this._config.icon instanceof fK){e=2;i="svg_symbol"}else{if(this._config.icon instanceof hS){e=3;i="custom_symbol"}}kU.sendMessage("Marker","icontype",i)},setOptions:function(e){this.setConfig(e);if(!e.icon){this._config.icon=og._createDefaultIcon()}},setIcon:function(e){if(e){this._config.icon=e;this.textureCoord=this.textureCoordGLMap=null}},getIcon:function(){return this._config.icon},setLabel:function(e){if(!(e instanceof b3)){return}this._config.label=e;e._config.enableMassClear=this._config.enableMassClear;e.setPoint(this.point)},getLabel:function(){return this._config.label},enableDragging:function(){this._config.enableDragging=true},disableDragging:function(){this._config.enableDragging=false},setPoint:function(e){if(e){this.point=this._config.point=new d9(e.lng,e.lat);if(!K.apiVersionIsGL()){this.latLng=m0(e,this.coordType)}else{this.latLng=m0(m8.convertMC2LL(e),this.coordType)}}},setPositionIn:function(e){if(!e){return}if(!K.apiVersionIsGL()){this.setPoint(m8.convertMC2LL(e))}else{this.setPoint(e)}},getPositionIn:function(){var e=this.getPoint();if(!e){return null}if(!K.apiVersionIsGL()){return m8.convertLL2MC(e)}return e},setTop:function(i,e){this._config.isTop=!!i;if(i){this._addi=e||0}},setTitle:function(e){this._config.title=e||""},getTitle:function(){return b(this._config.title)},setColor:function(e){this._config.color=e||"#f00"},getColor:function(){return this._config.color},setOffset:function(e){if(e){this._config.offset=e}},getOffset:function(){return this._config.offset},setAnimation:function(e){this._animation=e},setRank:function(e){this._config.rank=e},getRank:function(){return this._config.rank},setRotation:function(e){while(e<0){e+=360}this._rotation=e%360},setRotationOrigin:function(e){while(e<0){e+=360}this._rotationOrigin=e%360},getRotation:function(){return this._rotation},getShadow:function(){if(!K.apiVersionIsGL()){return this._config.shadow||null}console.warn("褰撳墠鐗堟湰鏆備笉鏀寔 marker.getShadow")},setShadow:function(e){if(!K.apiVersionIsGL()){this._config.shadow=e;return}console.warn("褰撳墠鐗堟湰鏆備笉鏀寔 marker.setShadow")}});function D(e,T){var i=cv.coordType;if(T&&T.coordType){i=T.coordType}var oK=cx.pick(e,"point");if(oK){e=oK.points;this.properties=oK.properties}var oL=iM(e,i);this.latLng=new d1(oL.lat,oL.lng);var C;if(!K.apiVersionIsGL()){C=oL}else{C=m8.convertLL2MC(oL)}og.call(this,C,T)}D.inherits(og,"MarkerOut");hv.extend(D.prototype,{toString:function(){return"Marker"},toGeoJSON:function(){var i="Point";var C=[this.latLng.lng,this.latLng.lat];var e={type:"Feature",geometry:{type:i,coordinates:C},properties:this.properties};return e},updateByGeoJSON:function(e){this.setPosition(e)},setPosition:function(e){var C=cx.pick(e,"point");if(C){e=C.points;this.properties=C.properties}if(!e){return}this.latLng=iM(new d1(e.lat,e.lng),this.coordType);var i=m8.convertLL2MC(this.latLng);this.setPositionIn(i)},getPosition:function(){return m0(this.latLng,this.coordType)},});window.BMAP_SHAPE_CIRCLE=1;window.BMAP_SHAPE_RECT=2;function gr(i,e,C){g2.call(this,e,C);this.domElement=null;this.point=i;C=C||{};this.coordType=C.coordType||cv.coordType;this._config={};this._config.height=e||0;this._config.size=typeof C.size==="number"?C.size:50;this._config.fillOpacity=typeof C.fillOpacity==="number"?C.fillOpacity:0.8;this._config.shape=typeof C.shape==="number"?C.shape:1;dA(this._config.fillOpacity,0,1);var oK=K.uiVersionIsGL()?"#f00":fq().fillColor;if(C.fillColor===""){this._config.fillColor=""}else{this._config.fillColor=C.fillColor?C.fillColor:oK}this._config.icon=(C.icon instanceof nF||C.icon instanceof hS)?C.icon:"";this._config.enableMassClear=C.enableMassClear||true;var T=this;ki.load("marker",function(){T._draw()})}gr.inherits(g2,"Marker3D");hv.extend(gr.prototype,{setPoint:function(e){var i=this.coordType;var T=iM(e,i);this.latLng=this._config.point=new d9(T.lng,T.lat);this.point=m8.convertLL2MC(T);var C=new ix("onstatus_change");C.overlay=this;C.action="setPoint";this.fire(C)},setPositionIn:function(e){this.setPoint(e)},getPositionIn:function(){return this.getPoint()},setDomAttribute:function(i,C){var e=new ix("onlineupdate");e.overlay=this;this.dispatchEvent(e)}});function gn(i,e,oK){var C=(oK&&oK.coordType)||cv.coordType;this.latLng=iM(new d1(i.lat,i.lng),C);var T=m8.convertLL2MC(i);gr.call(this,T,e,oK)}gn.inherits(gr,"Marker3d");hv.extend(gn.prototype,{toString:function(){return"Marker3D"},setHeight:function(e){this._config.height=Number(e);this.draw();var i=new ix("onlineupdate");i.overlay=this;this.dispatchEvent(i)},getHeight:function(){return this._config.height},setFillOpacity:function(e){if(e>1||e<0){return}this._config.fillOpacity=e;this.setDomAttribute("fillopacity",e)},getFillOpacity:function(){return this._config.fillOpacity},setFillColor:function(e){this._config.fillColor=e||"";this.setDomAttribute("fillcolor",e)},getFillColor:function(){return this._config.fillColor},setIcon:function(i){if(!i||!this.map){return}this._config.icon=i;if(this._config.icon){var e=this._config.icon.getCurrentImageUrl();var T=i.getCurrentImageUrl()!==e;this._config.icon=i;this.textureCoord=this.textureCoordGLMap=null;this.draw();var C=new ix("onstatus_change");C.overlay=this;C.action="setIcon";C.imageUrlChanged=T;this.fire(C)}},getIcon:function(){return this._config.icon},setPosition:function(e){this.latLng=new d1(e.lat,e.lng);var i=m8.convertLL2MC(e);this.setPositionIn(i)},getPosition:function(){var e=this.getPositionIn();return m0(m8.convertMC2LL(e),this.coordType)}});function iJ(C,e){mk.call(this,e);this._normalizedBounds=new lz();this.setPoints(C);this._addlog(e);var i=this;ki.load("poly",function(){i._draw()})}iJ.inherits(mk,"Polyline");hv.extend(iJ.prototype,{_addlog:function(e){var i=1;var C="normal";if(e&&e.strokeTexture){i=2;C="texture"}kU.sendMessage("Polyline","bindtype",C)},getBoundsIn:function(e){if(!e){this._bounds.setMinMax();return this._bounds}this._normalizedBounds.setMinMax();return this._normalizedBounds},setPoints:function(oM){this._clearCache();this.points=mk.getGraphPoints(oM).slice(0);if(this._config.geodesic===true){this.greatCirclePoints.length=0;for(var oK=0;oK<this.points.length-1;oK++){this.calcGreatCirclePoints(this.points[oK],this.points[oK+1])}}else{if(this._config.linkRight){var oN=[];var oL=null;for(var oK=0;oK<this.points.length-1;oK++){if(!oK){oN.push(this.points[oK])}var C=oL||this.points[oK];oL=this.points[oK+1];var T=gQ(oL,C);if(T>15437726){if(oL.lng<C.lng){oL.lng+=li.WORLD_SIZE_MC}else{oL.lng-=li.WORLD_SIZE_MC}}oN.push(oL)}this.points=oN}}this._calcBounds();this.draw();var e=new ix("onlineupdate");e.overlay=this;this.dispatchEvent(e);if(this._visible&&this._config.enableEditing===true&&!this._config.geodesic){this.clearVertexs&&this.clearVertexs();this.addVertexs&&this.addVertexs()}},_calcBounds:function(){if(!this.points||this.points.length===0){return}var e=this;e._bounds.setNorthEast(null);e._bounds.setSouthWest(null);if(e.greatCirclePoints&&e.greatCirclePoints.length>0){hv.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{hv.each(e.points,function(i){e._bounds.extend(i)})}e._normalizedBounds.setSouthWest(e._bounds.getSouthWest());e._normalizedBounds.setNorthEast(e._bounds.getNorthEast());if(e._normalizedBounds.sw.lng<-li.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>li.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-li.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=li.WORLD_SIZE_MC_HALF}},calcGreatCirclePoints:function(T,C){var oL=T.latLng;var oK=C.latLng;if(oL.equalsEpsilon(oK,0.00001)){return}var e=m8.getDistance(mn(oL.lng),mn(oL.lat),mn(oK.lng),mn(oK.lat));if(e<250000){return}var oP=Math.round(e/150000);var oT=this.calcAngularDistance(oL,oK);this.greatCirclePoints.push(T);var oS=oL.lng;var oR=T;for(var oM=0;oM<oP;oM++){var oO=this.calcMiddlePoint(oL,oK,oM/oP,oT);var oQ=m8.convertLL2MC(oO);var oN=oQ.lng;var oU=gQ(oQ,oR);if(oU>30037726){if(oQ.lng<oR.lng){oQ.lng+=li.WORLD_SIZE_MC}else{oQ.lng-=li.WORLD_SIZE_MC}}this.greatCirclePoints.push(oQ);oR=oQ}var oU=gQ(C,oR);if(oU>30037726){if(C.lng<oR.lng){C.lng+=li.WORLD_SIZE_MC}else{C.lng-=li.WORLD_SIZE_MC}}this.greatCirclePoints.push(C)},calcMiddlePoint:function(oQ,oP,oR,oV){var oK=oQ.lat;var T=oP.lat;var oU=oQ.lng;var oS=oP.lng;var oW=mn(oK);var oT=mn(T);var i=mn(oU);var e=mn(oS);var oY=Math.sin((1-oR)*oV)/Math.sin(oV);var oX=Math.sin(oR*oV)/Math.sin(oV);var oN=oY*Math.cos(oW)*Math.cos(i)+oX*Math.cos(oT)*Math.cos(e);var oM=oY*Math.cos(oW)*Math.sin(i)+oX*Math.cos(oT)*Math.sin(e);var oL=oY*Math.sin(oW)+oX*Math.sin(oT);var C=Math.atan2(oL,Math.sqrt(Math.pow(oN,2)+Math.pow(oM,2)));var oO=Math.atan2(oM,oN);return new d9(hJ(oO),hJ(C))},calcAngularDistance:function(oK,i){var oL=mn(oK.lat);var T=mn(i.lat);var C=mn(oK.lng);var e=mn(i.lng);return Math.acos(Math.sin(oL)*Math.sin(T)+Math.cos(oL)*Math.cos(T)*Math.cos(Math.abs(e-C)))}});function cf(oL,e){this.coordType=(e&&e.coordType)||cv.coordType;var oK=cx.pick(oL,"line");if(oK){oL=oK.points;this.properties=oK.properties}if(!oL||oL.length===0){return}var T=[];if(e&&e.noCoordTrans){for(var C=0;C<oL.length;C++){T[C]=m8.convertLL2MC(oL[C])}}else{for(var C=0;C<oL.length;C++){T[C]=m8.convertLL2MC(iM(oL[C],this.coordType))}}iJ.call(this,T,e)}cf.inherits(iJ,"PolylineOut");hv.extend(cf.prototype,{toString:function(){return"Polyline"},toGeoJSON:function(){var T="LineString";var oK=[];var oL=this.getPath();for(var C=0;C<oL.length;C++){oK.push([oL[C].lng,oL[C].lat])}var e={type:"Feature",geometry:{type:T,coordinates:oK},properties:this.properties};return e},updateByGeoJSON:function(e){this.setPath(e)},setPath:function(oK){var T=cx.pick(oK,"line");if(T){oK=T.points;this.properties=T.properties}if(!oK||oK.length===0){return}var C=[];for(var e=0;e<oK.length;e++){C[e]=m8.convertLL2MC(iM(oK[e],this.coordType))}this.setPathIn(C);this._mouseEventPixels=null},getPath:function(){var e=this.getPathIn();if(!e||e.length===0){return[]}var T=[];for(var C=0;C<e.length;C++){T[C]=m0(m8.convertMC2LL(e[C]),this.coordType)}return T},getBounds:function(i){var e=this.getBoundsIn(i);var C=new lz(m0(m8.convertMC2LL(e.getSouthWest()),this.coordType),m0(m8.convertMC2LL(e.getNorthEast(),this.coordType)));return C}});function j0(C,T,e){mk.call(this,e);this._normalizedBounds=new lz();this._cps=T;this._path=C;this.setPoints(C);var i=this;ki.load("poly",function(){i._draw()})}j0.inherits(iJ,"BezierCurve");hv.extend(j0.prototype,{getBoundsIn:function(e){if(!e){this._bounds.setMinMax();return this._bounds}this._normalizedBounds.setMinMax();return this._normalizedBounds},setPoints:function(e){this._clearCache();this.points=mk.getGraphPoints(e).slice(0);this.points=this.calcBezierPoints(this.points,this._cps);this._calcBounds()},_calcBounds:function(){if(!this.points){return}var e=this;e._bounds.setNorthEast(null);e._bounds.setSouthWest(null);if(e.greatCirclePoints&&e.greatCirclePoints.length>0){hv.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{hv.each(e.points,function(i){e._bounds.extend(i)})}e._normalizedBounds.setSouthWest(e._bounds.getSouthWest());e._normalizedBounds.setNorthEast(e._bounds.getNorthEast());if(e._normalizedBounds.sw.lng<-li.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>li.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-li.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=li.WORLD_SIZE_MC_HALF}},getPathIn:function(){return this._path},setPathIn:function(e){this._path=e;this.setPoints(e)},getCpsIn:function(){return this._cps},setCpsIn:function(e){this._cps=e;this.setPoints(this._path)},calcBezierPoints:function(T,oL){var C=[];for(var e=0;e<T.length-1;e++){var oK=[T[e],oL[e][0],oL[e][1],T[e+1]];C=C.concat((this.bezierbetweenTwoP(oK)))}return C},bezierbetweenTwoP:function(oL){var C=100;var oK=1/C;var e=[];for(var T=0;T<C;T++){e.push(this.getPointOnCubicBezier(oL,T*oK))}return e},getPointOnCubicBezier:function(oM,oQ){var i;var oL;var T;var oR;var oK;var C;var oP;var e;var oO;var oN;T=3*(oM[1].lng-oM[0].lng);oL=3*(oM[2].lng-oM[1].lng)-T;i=oM[3].lng-oM[0].lng-T-oL;C=3*(oM[1].lat-oM[0].lat);oK=3*(oM[2].lat-oM[1].lat)-C;oR=oM[3].lat-oM[0].lat-C-oK;oP=oQ*oQ;e=oP*oQ;oO=(i*e)+(oL*oP)+(T*oQ)+oM[0].lng;oN=(oR*e)+(oK*oP)+(C*oQ)+oM[0].lat;return new d9(oO,oN)}});function em(oK,oM,e){if(!oK||oK.length===0){return}this.userPath=oK;this.userCps=oM;var T=[];for(var C=0;C<oK.length;C++){T[C]=m8.convertLL2MC(oK[C])}if(!oM||oM.length===0){return}var oL=[];for(var C=0;C<oM.length;C++){oL[C]=[];oL[C][0]=m8.convertLL2MC(oM[C][0]);if(oM[C][1]){oL[C][1]=m8.convertLL2MC(oM[C][1])}else{oL[C][1]=m8.convertLL2MC(oM[C][0])}}j0.call(this,T,oL,e)}em.inherits(j0,"BezierCurveOut");hv.extend(em.prototype,{toString:function(){return"BezierCurve"},setPath:function(T){if(!T||T.length===0){return}this.userPath=T;var C=[];for(var e=0;e<T.length;e++){C[e]=m8.convertLL2MC(T[e])}this.setPathIn(C);this._mouseEventPixels=null},getPath:function(){return this.userPath;var e=this.getPathIn();if(!e||e.length===0){return[]}var T=[];for(var C=0;C<e.length;C++){T[C]=m8.convertMC2LL(e[C])}return T},getControlPoints:function(){return this.userCps;var e=this.getCpsIn();if(!e||e.length===0){return[]}var T=[];for(var C=0;C<e.length;C++){T[C]=[];T[C][0]=m8.convertMC2LL(e[C][0]);T[C][1]=m8.convertMC2LL(e[C][1])}return T},setControlPoints:function(T){if(!T||T.length===0){return}this.userCps=T;var C=[];for(var e=0;e<T.length;e++){C[e]=[];C[e][0]=m8.convertLL2MC(T[e][0]);if(T[e][1]){C[e][1]=m8.convertLL2MC(T[e][1])}else{C[e][1]=m8.convertLL2MC(T[e][0])}}this.setCpsIn(C)},getBounds:function(i){var e=this.getBoundsIn(i);var C=new lz(m8.convertMC2LL(e.getSouthWest()),m8.convertMC2LL(e.getNorthEast()));return C}});function gE(e,C){mk.call(this,C);this._normalizedBounds=new lz();this.setPoints(e);var i=this;ki.load("poly",function(){i._draw()})}gE.inherits(iJ,"PolylineMultipart");hv.extend(gE.prototype,{setPoints:function(e){if(!e){return}this._clearCache();this.points=this._unifyArgs(e);this._calcBounds()},_unifyArgs:function(C){var e=[];var i=[];if(C.constructor===Array){if(C[0].constructor===d9){i.push(C)}else{i=C}}else{if(typeof C==="string"){i.push(C)}}hv.each(i,function(T){e.push(mk.getGraphPoints(T))});return e},setPointAt:function(i,e,C){C=C||0;if(!e||!this.points[C]||!this.points[C][i]){return}this._clearCache();this.points[C][i]=new d9(e.lng,e.lat);this._calcBounds()},getBoundsIn:function(e){if(!e){this._bounds.setMinMax();return this._bounds}this._normalizedBounds.setMinMax();return this._normalizedBounds},_calcBounds:function(){if(!this.points){return}var e=this;e._bounds.setNorthEast(null);e._bounds.setSouthWest(null);if(e.greatCirclePoints&&e.greatCirclePoints.length>0){hv.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{hv.each(e.points,function(i){hv.each(i,function(C){e._bounds.extend(C)})})}e._normalizedBounds.setSouthWest(e._bounds.getSouthWest());e._normalizedBounds.setNorthEast(e._bounds.getNorthEast());if(e._normalizedBounds.sw.lng<-li.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>li.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-li.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=li.WORLD_SIZE_MC_HALF}}});function kC(C,e){mk.call(this,e);e=e||{};this.coordType=this.coordType||e.coordType||cv.coordType;if(typeof e.fillOpacity==="number"){this._config.fillOpacity=e.fillOpacity}else{this._config.fillOpacity=0.6}dA(this._config.fillOpacity,0,1);if(e.fillColor===""){this._config.fillColor=""}else{if(e.fillColor){this._config.fillColor=e.fillColor}else{this._config.fillColor=fq().fillColor}}this._parseFillCacheWebGL=[];this.setPoints(C,e);var i=this;ki.load("poly",function(){i._draw()})}kC.inherits(mk,"Polygon");hv.extend(kC.prototype,{setPoints:function(oL){var T=[];if(typeof oL==="string"||oL.length===1||oL[0] instanceof d9||oL[0] instanceof d1||this instanceof ka||oL.length===0){if(oL.length===1){oL=oL[0]}var e=this._processSinglePointArray(oL);this._userPoints=e.userPoints;T=e.innerPoints;this.hasMultipleParts=false}else{this._userPoints=[];for(var oK=0;oK<oL.length;oK++){var C=this._processSinglePointArray(oL[oK]);this._userPoints.push(C.userPoints);T.push(C.innerPoints)}this.hasMultipleParts=true}mk.prototype.setPoints.call(this,T)},setPathIn:function(e){this.setPoints(e)},_processSinglePointArray:function(e){var i=mk.getGraphPoints(e).slice(0);innerPoints=i.slice(0);if(innerPoints.length>1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new d9(innerPoints[0].lng,innerPoints[0].lat))}return{userPoints:i,innerPoints:innerPoints}},setPointAt:function(C,e,i){var T=i!==undefined&&i!==null;if(!T&&this._userPoints[0]&&this._userPoints[0][C]){T=true;i=0}if((!this._userPoints[C]&&!T)||(T&&!this._userPoints[i]&&!this._userPoints[i][C])){return}this._clearCache();if(T){this._userPoints[i][C]=new d9(e.lng,e.lat);this.points[i][C]=new d9(e.lng,e.lat);if(C===0&&!this.points[i][0].equals(this.points[i][this.points[i].length-1])){this.points[i][this.points[i].length-1]=new d9(e.lng,e.lat)}}else{this._userPoints[C]=new d9(e.lng,e.lat);this.points[C]=new d9(e.lng,e.lat);if(C===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new d9(e.lng,e.lat)}}this._calcBounds()},setPositionAt:function(C,e,i){var T=i!==undefined&&i!==null;if(!T&&this._userPoints[0]&&this._userPoints[0][C]){T=true;i=0}if((!this._userPoints[C]&&!T)||(T&&!(this._userPoints[i]&&this._userPoints[i][C]))){return}var oK=m8.convertLL2MC(e);this.setPointAt(C,oK,i)},getPoints:function(){var e=this._userPoints;if(e.length===0){e=this.points}return e},getPathIn:function(){return this.getPoints()}});function mw(C,e){this.coordType=(e&&e.coordType)||cv.coordType;if(!C||C.length===0){return}var i=this.setPath(C,true);kC.call(this,i,e)}mw.inherits(kC,"PolygonOut");hv.extend(mw.prototype,{toString:function(){return"Polygon"},toGeoJSON:function(){var oK="Polygon";var oL=[];var oN=this.getPath();if(this.hasMultipleParts){oK="Multi"+oK;for(var T=0;T<oN.length;T++){var oM=[];for(var C=0;C<oN[T].length;C++){oM.push([oN[T][C].lng,oN[T][C].lat])}oL.push(oM)}}else{for(var T=0;T<oN.length;T++){oL.push([oN[T].lng,oN[T].lat])}}var e={type:"Feature",geometry:{type:oK,coordinates:[oL]},properties:this.properties};return e},updateByGeoJSON:function(e){this.setPath(e)},setPath:function(oO,oL){var oN=cx.pick(oO,"polygon");if(oN){oO=oN.points;this.properties=oN.properties}if(!oO||oO.length===0){return}var e=[];if(typeof oO==="string"||oO[0] instanceof d9||oO[0] instanceof d1){var oP=this._processSinglePointArray(oO);for(var oK=0;oK<oP.innerPoints.length;oK++){e[oK]=m8.convertLL2MC(iM(oP.innerPoints[oK],this.coordType))}}else{for(var oK=0;oK<oO.length;oK++){var oM=this._processSinglePointArray(oO[oK]);var C=[];for(var T=0;T<oM.innerPoints.length;T++){C[T]=m8.convertLL2MC(iM(oM.innerPoints[T],this.coordType))}e.push(C)}}if(oL){return e}this.setPathIn(e);this._mouseEventPixels=null},getPath:function(){var e=this.getPathIn();if(!e||e.length===0){return[]}var oL=[];if(this.hasMultipleParts){for(var T=0;T<e.length;T++){var oK=[];for(var C=0;C<e[T].length;C++){oK[C]=m0(m8.convertMC2LL(e[T][C]),this.coordType)}oL.push(oK)}}else{for(var T=0;T<e.length;T++){oL[T]=m0(m8.convertMC2LL(e[T]),this.coordType)}}return oL}});function ka(i,e,C){this.point=i;this.radius=Math.abs(e);kC.call(this,[],C)}ka.parseTolerance={0:[0.01,0.0001,0.00001,0.000004],1:[1000,10,1,0.4]};ka.inherits(kC,"Circle");hv.extend(ka.prototype,{initialize:function(e){this.map=e;this.points=this._getPerimeterPoints(this.point,this.radius);this._calcBounds();return null},getPoint:function(){return this.point},setPoint:function(e){if(!e){return}this.point=e;this.latLng=m8.convertMC2LL(e)},setCenterIn:function(e){var i=arguments[1];this.setPoint(e,i)},setRadius:function(e){this.radius=Math.abs(e)},getCenterIn:function(){return this.point},getRadius:function(){return this.radius},_getPerimeterPoints:function(e,oQ){if(!e||!oQ||!this.map){return[]}var C=this.map;var oN=e.lng;var oL=e.lat;var oW=m8.convertMC2LL(e);oN=oW.lng;oL=oW.lat;var oX=[];var oS=oQ/m8.EARTHRADIUS;var oP=(Math.PI/180)*oL;var oV=(Math.PI/180)*oN;for(var oO=0;oO<360;oO+=9){var oM=(Math.PI/180)*oO;var oT=Math.asin(Math.sin(oP)*Math.cos(oS)+Math.cos(oP)*Math.sin(oS)*Math.cos(oM));var oR=Math.atan2(Math.sin(oM)*Math.sin(oS)*Math.cos(oP),Math.cos(oS)-Math.sin(oP)*Math.sin(oT));var oU=((oV-oR+Math.PI)%(2*Math.PI))-Math.PI;var oK=new d1(oT*(180/Math.PI),oU*(180/Math.PI));oX.push(m8.convertLL2MC(oK))}var T=oX[0];oX.push(new d9(T.lng,T.lat));if(T){this._radiusMercator=Math.sqrt(Math.pow(T.lng-this.point.lng,2)+Math.pow(T.lat-this.point.lat,2))}else{this._radiusMercator=this.radius}return oX}});function bz(i,e,oK){var T=(oK&&oK.coordType)||cv.coordType;this.latLng=iM(new d1(i.lat,i.lng),T);var C=m8.convertLL2MC(this.latLng);ka.call(this,C,e,oK)}bz.inherits(ka,"CircleOut");hv.extend(bz.prototype,{toString:function(){return"Circle"},setCenter:function(e){this.latLng=iM(new d1(e.lat,e.lng),this.coordType);var i=m8.convertLL2MC(this.latLng);this.setCenterIn(i)},getCenter:function(){return m0(new d1(this.latLng.lat,this.latLng.lng),this.coordType)},getPath:function(){var e=this.getPathIn();if(!e||e.length===0){return[]}var T=[];for(var C=0;C<e.length;C++){T[C]=m8.convertMC2LL(e[C])}return T},toGeoJSON:function(){var T="Polygon";var oK=[];var oL=this.getPath();for(var C=0;C<oL.length;C++){oK.push([oL[C].lng,oL[C].lat])}var e={type:"Feature",geometry:{type:T,coordinates:[oK]},properties:this.properties};return e},updateByGeoJSON:function(e){}});function aA(i,e){kC.call(this,[],e);this._bounds=i}aA.inherits(kC,"Rectangle");hv.extend(aA.prototype,{initialize:function(e){this.map=e;this.points=this._getBoundsPoints(this._bounds);this._calcBounds();return null},_getBoundsPoints:function(i){if(!i){return[]}var e=i.getSouthWest();var C=i.getNorthEast();if(!e||!C){return[]}return[new d9(e.lng,e.lat),new d9(e.lng,C.lat),new d9(C.lng,C.lat),new d9(C.lng,e.lat),new d9(e.lng,e.lat)]},setBoundsIn:function(e){this._bounds=e},getBoundsIn:function(){return this._bounds}});function g6(e,oO){var oK=(oO&&oO.coordType)||cv.coordType;if(!e){return}var oN=e.getSouthWest();var T=e.getNorthEast();if(!oN||!T){return}this.coordType=oK;var i=iM(new d1(oN.lat,oN.lng),oK);var oL=iM(new d1(T.lat,T.lng),oK);var C=m8.convertLL2MC(i);var oM=m8.convertLL2MC(oL);this._latLngBounds=new lz(new d9(i.lng,i.lat),new d9(oL.lng,oL.lat));aA.call(this,new lz(C,oM),oO)}g6.inherits(aA,"RectangleOut");hv.extend(g6.prototype,{toString:function(){return"Rectangle"},setBounds:function(oM){if(!oM){return}var e=oM.getSouthWest();var oN=oM.getNorthEast();if(!e||!oN){return}var oL=this.coordType||cv.coordType;var oK=iM(new d1(e.lat,e.lng),oL);var C=iM(new d1(oN.lat,oN.lng),oL);var T=m8.convertLL2MC(oK);var i=m8.convertLL2MC(C);this._latLngBounds=new lz(new d9(oK.lng,oK.lat),new d9(C.lng,C.lat));this.setBoundsIn(new lz(T,i))},getBounds:function(){var oL=this._bounds;if(!oL){return null}var e=oL.getSouthWest();var oK=oL.getNorthEast();if(!e||!oK){return null}var T=this.coordType||cv.coordType;var C=m0(m8.convertMC2LL(e),T);var i=m0(m8.convertMC2LL(oK),T);return new lz(new d9(C.lng,C.lat),new d9(i.lng,i.lat))},getPath:function(){var e=this.getPathIn();if(!e||e.length===0){return[]}var oK=[];var C=this.coordType||cv.coordType;for(var T=0;T<e.length;T++){oK[T]=m0(m8.convertMC2LL(e[T]),C)}return oK},toGeoJSON:function(){var C=[];var T=this.getPath();for(var e=0;e<T.length;e++){C.push([T[e].lng,T[e].lat])}return{type:"Feature",geometry:{type:"Polygon",coordinates:[C]},properties:this.properties}}});function oy(oK,i,C){mk.call(this,C);C=C||{};if(typeof C.topFillOpacity==="number"){this._config.topFillOpacity=C.topFillOpacity}else{this._config.topFillOpacity=0.6}if(typeof C.sideFillOpacity==="number"){this._config.sideFillOpacity=C.sideFillOpacity}else{this._config.sideFillOpacity=0.8}dA(this._config.sideFillOpacity,0,1);var e=fq().fillColor;if(C.topFillColor===""){this._config.topFillColor=""}else{this._config.topFillColor=C.topFillColor?C.topFillColor:e}if(C.sideFillColor===""){this._config.sideFillColor=""}else{this._config.sideFillColor=C.sideFillColor?C.sideFillColor:e}this._parseFillCacheWebGL=[];this.setPoints(oK,C);this._config.altitude=i||0;var T=this;ki.load("poly",function(){T._draw()})}oy.inherits(mk,"Prism");hv.extend(oy.prototype,{setPoints:function(oL){var T=[];if(typeof oL==="string"||oL[0] instanceof d9||oL[0] instanceof d1||this instanceof ka||oL.length===0){var e=this._processSinglePointArray(oL);this._userPoints=e.userPoints;T=e.innerPoints;this.hasMultipleParts=false}else{this._userPoints=[];for(var oK=0;oK<oL.length;oK++){var C=this._processSinglePointArray(oL[oK]);this._userPoints.push(C.userPoints);T.push(C.innerPoints)}this.hasMultipleParts=true}mk.prototype.setPoints.call(this,T)},setPathIn:function(e){this.setPoints(e)},_processSinglePointArray:function(e){var i=mk.getGraphPoints(e).slice(0);innerPoints=i.slice(0);if(innerPoints.length>1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new d9(innerPoints[0].lng,innerPoints[0].lat))}return{userPoints:i,innerPoints:innerPoints}},setPointAt:function(i,e){if(!this._userPoints[i]){return}this._clearCache();this._userPoints[i]=new d9(e.lng,e.lat);this.points[i]=new d9(e.lng,e.lat);if(i===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new d9(e.lng,e.lat)}this._calcBounds()},getPoints:function(){var e=this._userPoints;if(e.length===0){e=this.points}return e},getPathIn:function(){return this.getPoints()},setTopFillOpacity:function(e){if(e>1||e<0){return}this._config.topFillOpacity=e;this._setDomAttribute("topfillopacity",e)},getTopFillOpacity:function(){return this._config.topFillOpacity},setSideFillOpacity:function(e){if(e>1||e<0){return}this._config.sideFillOpacity=e;this._setDomAttribute("sidefillopacity",e)},getSideFillOpacity:function(){return this._config.sideFillOpacity},setTopFillColor:function(e){this._config.topFillColor=e||"";this._setDomAttribute("topfillcolor",e)},getTopFillColor:function(){return this._config.topFillColor},setSideFillColor:function(e){this._config.sideFillColor=e||"";this._setDomAttribute("sidefillcolor",e)},getSideFillColor:function(){return this._config.sideFillColor},setAltitude:function(e){this._config.altitude=Number(e);this.draw();var i=new ix("onlineupdate");i.overlay=this;this.dispatchEvent(i)},getAltitude:function(){return this._config.altitude}});function cm(oN,oL,oO){if(!oN||oN.length===0){return}this.userPath=oN;var e=[];if(typeof oN==="string"||oN[0] instanceof d9||oN[0] instanceof d1){var oP=this._processSinglePointArray(oN);for(var oK=0;oK<oP.innerPoints.length;oK++){e[oK]=m8.convertLL2MC(oP.innerPoints[oK])}}else{for(var oK=0;oK<oN.length;oK++){var oM=this._processSinglePointArray(oN[oK]);var C=[];for(var T=0;T<oM.innerPoints.length;T++){C[T]=m8.convertLL2MC(oM.innerPoints[T])}e.push(C)}}oy.call(this,e,oL,oO)}cm.inherits(oy,"PrismOut");hv.extend(cm.prototype,{toString:function(){return"Prism"},setPath:function(T){if(!T||T.length===0){return}this.userPath=T;var C=[];for(var e=0;e<T.length;e++){C[e]=m8.convertLL2MC(T[e])}this.setPathIn(C);this._mouseEventPixels=null},getPath:function(){return this.userPath;var e=this.getPathIn();if(!e||e.length===0){return[]}var T=[];for(var C=0;C<e.length;C++){T[C]=m8.convertMC2LL(e[C])}return T}});function dc(oK,i){mk.call(this,i);i=i||{};this._config.type=i.type||"image";this._config.url=i.url||"";this._config.opacity=typeof i.opacity==="number"?i.opacity:1;this._config.sysType=i.sysType!=="fixed"?"geo":"fixed";this._config.top=i.top||false;this._config.displayOnMinLevel=i.displayOnMinLevel||3;this._config.displayOnMaxLevel=i.displayOnMaxLevel||21;this.isReDraw=i.isReDraw||false;this.drawHook=(i.drawHook instanceof Function)?i.drawHook:null;dA(this._config.opacity,0,1);if(i.imageURL){this._config.url=i.imageURL}if(i.type==="image"&&i.isPixelMap){this._config.isPixelMap=i.isPixelMap||false;var C=i.pixelMap||{};this._config.colors=C.colors||["#F9F871","#FFC75F","#FF9671","#FF6F91","#D65DB1","#845EC2"];this._config.positions=C.positions||[0,0.2,0.4,0.6,0.8,1];this._config.domain=C.domain||[0,255];this._config.clamp=C.clamp||this._config.domain;this._config.noData=(C.noData!==undefined)?C.noData:-99999;this._config.fomularC=C.fomularC||"float generateValue(vec4 pixel){return pixel.r * 255.;}";this._config.fomularJS=C.fomularJS||function(oL){return oL.r};this._config.maskPng=C.maskPng||null;this._config.maskData=C.maskData||-1;this._config.maskCoord=C.maskCoord||null;this.fHashcode=u({str:this._config.fomularC});var e=this.canPixelMap();if(e){this.isPixelMap=true;this.setPixelMap()}}this._parseFillCacheWebGL=[];if(this._config.sysType==="fixed"){this.points=oK}else{this.setPoints(oK,i)}if(oK instanceof lz){this._addlog(i)}var T=this;ki.load("poly",function(){T._draw()})}dc.inherits(mk,"GroundOverlay");hv.extend(dc.prototype,{_addlog:function(e){var i=1;var C="picture";if(e){if(e.type==="canvas"&&!e.isReDraw){i=2;C="static_canvas"}else{if(e.type==="canvas"&&e.isReDraw){i=3;C="dynamic_canvas"}else{if(e.type==="video"){i=4;C="video"}else{if(e.type==="image"&&e.isPixelMap){i=5;C="raster"}}}}}kU.sendMessage("GroundOverlay","bindtype",C)},setPoints:function(i){var e=mk.getGraphPoints(i).slice(0);this.hasMultipleParts=false;mk.prototype.setPoints.call(this,e)},setPathIn:function(e){this.setPoints(e)},getPoints:function(){return this.points},getPathIn:function(){return this.getPoints()},canPixelMap:function(){if(this._config.colors&&this._config.positions){return true}return false},setPixelMap:function(){if(!this._config.isPixelMap||!this.canPixelMap()){return}var i=this._config.colors;var e=this._config.positions;this.pHashcode=u({colors:i,positions:e});this.pixelColorMap=k0.generateColorRamp(i,e)},setDomain:function(e){if(e instanceof Array&&e.length===2){this._config.domain=e;this.doOnceDraw()}},setClamp:function(e){if(e instanceof Array&&e.length===2){this._config.clamp=e;this.doOnceDraw()}},setMaskPng:function(i){this._config.maskPng=i;if(this.map){var e=new ix("hide");e.overlay=this;this.dispatchEvent(e);var e=new ix("show");e.overlay=this;this.dispatchEvent(e)}this.doOnceDraw()},setMaskData:function(e){this._config.maskData=e;this.doOnceDraw()},setMaskCoord:function(e){this._config.maskCoord=e;this.maskUV=null;this.doOnceDraw()},setNoData:function(e){this._config.noData=e;this.doOnceDraw()},setPositions:function(e){this._config.positions=e;this.setPixelMap();this.doOnceDraw()},setColors:function(e){this._config.colors=e;this.setPixelMap();this.doOnceDraw()},setBounds:function(C,oM){if(C instanceof lz){var oO=Math.min(C.sw.lng,C.ne.lng);var oL=Math.max(C.sw.lng,C.ne.lng);var oN=Math.min(C.sw.lat,C.ne.lat);var e=Math.max(C.sw.lat,C.ne.lat);var oQ=[new d9(oO,oN),new d9(oL,oN),new d9(oL,e),new d9(oO,e)];var T=mk.getGraphPoints(oQ).slice(0);var oK=[];for(var oP=0;oP<T.length;oP++){oK[oP]=m8.convertLL2MC(T[oP])}}else{if(C.length===4){var oK=C}else{return false}}this.setPoints(oK);if(oM){return true}this.doOnceDraw()},setOpacity:function(e){if(e>1||e<0){return}this._config.opacity=e;this.doOnceDraw()},setDisplayOnMinLevel:function(e){this._config.displayOnMinLevel=e;this.doOnceDraw()},getDisplayOnMinLevel:function(){return this._config.displayOnMinLevel},setDisplayOnMaxLevel:function(e){this._config.displayOnMaxLevel=e;this.doOnceDraw()},getDisplayOnMaxLevel:function(){return this._config.displayOnMaxLevel},getOpacity:function(){return this._config.opacity},getImageURL:function(){return this._config.url},setImage:function(e,C){this._config.src=e;this._config.url=e;this._texture=null;var i=this;this.imageLoad&&this.imageLoad(this._config.src,function(T,oK){if(oK){i._texture=T;if(C){i.setBounds(C,true)}i.doOnceDraw()}})},setImageURL:function(e,i){this.setImage(e,i)},setFomular:function(e,i){if(e&&i){this._config.fomularJS=e;this._config.fomularC=i;this.fHashcode=u({str:this._config.fomularC});this.doOnceDraw()}},setIsPixelMap:function(e){this.isPixelMap=e;this.doOnceDraw()},getImagePixel:function(T){if(!this._config.isPixelMap||!this.canPixelMap()){return null}if(!this.getImageMaskPixel(T)){return null}if(this.imageObject){var C=Math.floor((T.lng-this.points[3].lng)/this.lngMC);var e=Math.floor((-T.lat+this.points[3].lat)/this.latMC);var i=Math.floor((e*this.imageObject.width+C)*4);if(C>this.imageObject.width||C<0){return null}if(e>this.imageObject.height||e<0){return null}if(i+3>this.imageObject.data.data.length){return null}return[this.imageObject.data.data[i],this.imageObject.data.data[i+1],this.imageObject.data.data[i+2],this.imageObject.data.data[i+3],]}return null},getValue:function(i){if(this._config.isPixelMap&&i&&this._config.fomularJS){if(!(i instanceof Array)){i=this.getImagePixel(i.point)}var e=this._config.fomularJS({r:i[0],g:i[1],b:i[2],a:i[3]});if(e>=this._config.clamp[0]&&e<=this._config.clamp[1]){return e}}return null},setImageObject:function(C){var e=document.createElement("canvas");e.width=C.width;e.height=C.height;var i=e.getContext("2d");i.drawImage(C,0,0,C.width,C.height);this.imageObject={width:C.width,height:C.height,data:i.getImageData(0,0,C.width,C.height)};this.updatePixelMc();i=null;e=null},updatePixelMc:function(){if(this.imageObject){var e=Math.abs(this.points[2].lng-this.points[0].lng);var i=Math.abs(this.points[2].lat-this.points[0].lat);this.lngMC=e/this.imageObject.width;this.latMC=i/this.imageObject.height}},setMaskImageObject:function(C){var e=document.createElement("canvas");e.width=C.width;e.height=C.height;var i=e.getContext("2d");i.drawImage(C,0,0,C.width,C.height);this.imageMaskObject={width:C.width,height:C.height,data:i.getImageData(0,0,C.width,C.height)};i=null;e=null},getImageMaskPixel:function(e){if(!this.imageMaskObject){return true}var T=this._toOverlayPixelsGL([e]);var oO=this.maskOverlayPixels;var oL=oO[1][0]-oO[0][0];var oK=oO[1][1]-oO[0][1];var C=Math.floor((T[0][0]-oO[0][0])/oL*this.imageMaskObject.width);var i=Math.floor((-T[0][1]+oO[1][1])/oK*this.imageMaskObject.height);var oN=Math.floor((i*this.imageMaskObject.width+C)*4);if(C>this.imageMaskObject.width||C<0){return null}if(i>this.imageMaskObject.height||i<0){return null}var oM=this.imageMaskObject.data.data;if(oN+3>oM.length){return false}if(oM[oN+3]>0){if(this._config.maskData>-1&&this._config.maskData!==oM[oN]){return false}return true}return false},doOnceDraw:function(){var e=new ix("onlineupdate");e.overlay=this;this.dispatchEvent(e)},destroy:function(){this.points=[];this.imageMaskObject=null}});function iQ(T,oQ){if(!T){return}oQ=oQ||{};var oL=[];if(oQ.sysType==="fixed"){oL=T}else{if(T instanceof lz){var oN=Math.min(T.sw.lng,T.ne.lng);var oK=Math.max(T.sw.lng,T.ne.lng);var oM=Math.min(T.sw.lat,T.ne.lat);var C=Math.max(T.sw.lat,T.ne.lat);var oP=[new d9(oN,oM),new d9(oK,oM),new d9(oK,C),new d9(oN,C)];var e=mk.getGraphPoints(oP).slice(0);for(var oO=0;oO<e.length;oO++){oL[oO]=m8.convertLL2MC(e[oO])}}else{if(T.length===4){oL=T}else{return false}}}dc.call(this,oL,oQ)}iQ.inherits(dc,"GroundOverlayOut");hv.extend(iQ.prototype,{toString:function(){return"GroundOverlay"}});function fP(e,i){if(!(e instanceof d9)){return}this.point=e;var e=m8.convertLL2MC(e);this.mc_point=[e.lng,e.lat];this.size=(i.size instanceof mU)?i.size:new mU(32,32);this.scale=i.scale||1;this.anchor=(i.anchor instanceof mU)?i.anchor:new mU(0,0);this.rotation=i.rotation||0;this.offset=(i.offset instanceof mU)?i.offset:new mU(0,0);this.level=i.level||18;var C=this.calBounds(false);iQ.call(this,C,i)}fP.inherits(iQ,"GroundPoint");hv.extend(fP.prototype,{calBounds:function(oL){var e=Math.pow(2,18-this.level);var C=this.scale*e;var oP=this.size.width/2*C;var oW=this.size.height/2*C;var oO=this.anchor.width*C;var oV=this.anchor.height*C;var T=this.offset.width*C;var oQ=this.offset.height*C;var oX=[[-1,-1],[1,-1],[1,1],[-1,1]];var oK=[];var oR=this.rotation*Math.PI/180;var oY=gh.create();gh.rotate(oY,oY,oR);for(var oT=0;oT<oX.length;oT++){var oU=oX[oT][0]*oP-oO;var oS=oX[oT][1]*oW-oV;var oN=oY[0]*oU+oY[1]*oS;var oM=oY[2]*oU+oY[3]*oS;oK.push(new d9(this.mc_point[0]+oN+T,this.mc_point[1]+oM+oQ))}if(oL){this._mouseEventPixels=null;this.setBounds(oK)}else{return oK}},setPoint:function(C,i){if(!(C instanceof d9)){return}this.point=C;var e=m8.convertLL2MC(C);this.mc_point=[e.lng,e.lat];if(i||i===undefined){this.calBounds(true)}return this},setScale:function(e,i){this.scale=e;if(i||i===undefined){this.calBounds(true)}return this},setSize:function(e,i){if(e instanceof mU){this.size=e;if(i||i===undefined){this.calBounds(true)}}return this},setRotation:function(e,i){this.rotation=e;if(i||i===undefined){this.calBounds(true)}return this},setAnchor:function(e,i){if(e instanceof mU){this.anchor=e;if(i||i===undefined){this.calBounds(true)}}return this},setOffset:function(e,i){if(e instanceof mU){this.offset=e;if(i||i===undefined){this.calBounds(true)}}return this}});function cS(i,e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("CustomOverlay")}bw.call(this,e);if(!i||!e.point||!c2(i)){throw new Error("鍙傛暟绫诲瀷閿欒")}e=e||{};this.coordType=e.coordType||cv.coordType;this.point=iM(e.point,this.coordType);this.createDom=i;this.offsetX=e.offsetX||0;this.offsetY=e.offsetY||0;this.minZoom=e.minZoom||3;this.maxZoom=e.maxZoom||21;this.nextTick=e.nextTick||false;this.properties=e.properties||{};this.zIndex=this.properties.zIndex||e.zIndex||0;this.enableMassClear=e.enableMassClear||true;this.enableDraggingMap=e.enableDraggingMap||false;this.fixBottom=e.fixBottom||false;this.anchors=e.anchors||[0.5,1];this.visible=e.visible===undefined?true:!!e.visible;this.useTranslate=e.useTranslate||false;this.rotationInit=e.rotationInit||0;this.rotationFlip=e.rotationFlip||false;this.autoFollowHeadingChanged=e.autoFollowHeadingChanged||false;this.synUpdate=e.synUpdate||false;this._rotation=0;this._rotationOrigin=0;this._originOpt=e;this.customLayer=null}cS.inherits(bw,"CustomOverlay");hv.extend(cS.prototype,{initialize:function(T){this.map=T;this.show(true);this.div=document.createElement("div");this.div.id="cus_overlay";this.div.setAttribute("data-tag-touch","stop");if(this.useTranslate){var e=-this.anchors[0]*100;var oK=-this.anchors[1]*100;this.div.style.transform="translate("+e+"%,"+oK+"%)";if(this.autoFollowHeadingChanged){var C=this;T.addEventListener("heading_changed",function(){C.updateRotation()});this.updateRotation()}}if(this.synUpdate){var C=this;this.map.on("ondraw",function(oL){C.draw()})}var i=this.createDom(this.properties);this.div.appendChild(i);this.map.getPanes().labelPane.appendChild(this.div);if(this.zIndex!==0){this.div.style.zIndex=this.zIndex}return this.div},isDraw:function(){if(this.map){var C=this.map.getZoom();var e=false;var i=this._getPixPos(this.map.getZoom(),this.map.getCenter());e=i.onBack;if(C<this.minZoom||C>this.maxZoom||e||!this.visible){this.hide(true);return false}else{this.show(true);return true}}return false},hide:function(e){if(!e){this.visible=false}this._visible=false;hv.hide(this.domElement)},show:function(e){if(!e){this.visible=true}this._visible=true;hv.show(this.domElement)},draw:function(){if(!this.div||!this.point){return}if(this.nextTick&&this.div.style.position!=="absolute"){this.div.style.opacity=0;setTimeout(function(){this.div.style.opacity=1;this.draw()}.bind(this),0)}if(this.div.children[0]){var oL=this.div.children[0].clientWidth;var e=this.div.children[0].clientHeight;if(!oL&&this.lastClientWidth){oL=this.lastClientWidth;e=this.lastClientHeight}this.lastClientWidth=oL;this.lastClientHeight=e}var T=0;var C=0;var oK=m8.convertLL2MC(this.point);var i=this.map.pointToOverlayPixelIn(oK,{useRound:false});if(!this.useTranslate){T=this.div.children[0]?oL*this.anchors[0]:0;C=this.div.children[0]?e*this.anchors[1]-(this.fixBottom?0:25):0}this.div.style.position="absolute";this.div.style.left=i.x-T+this.offsetX+"px";this.div.style.top=i.y-C+this.offsetY+"px";this.div.style.boxSizing="border-box";if(!this.isDraw()){return}},addEventListener:function(C,oK){if(!this.div||!this.map){return}var i=this;var T=this.map;function e(oO){var oM=new ix("onclick").inherit(oO);oM.type=oO.type;var oN=oO.srcElement||oO.target;var oL=oO.clientX||oO.pageX;var oQ=oO.clientY||oO.pageY;if(oO&&oM&&oN&&oL&&oQ){var oP=hv.Dom.getOffset(T.container);oM.pixel=new hV(oL-oP.left,oQ-oP.top);oM.latLng=T.pixelToPoint(oM.pixel)}return oM}switch(C){case"mouseover":if(this.div.style){this.div.style.cursor="pointer"}hv.on(this.div,"mouseover",function(oM){i.div.style.cursor="pointer";var oL=e(oM);i.dispatchEvent(oL);oK(oL)});break;case"mouseout":hv.on(this.div,"mouseout",function(oM){var oL=e(oM);i.dispatchEvent(oL);oK(oL)});break;case"click":if(this.div.style){this.div.style.cursor="pointer"}hv.on(this.div,"click",function(oM){var oL=e(oM);i.dispatchEvent(oL);oK(oL)});break;default:break}},setPoint:function(e,oK){if(e instanceof d9){if(!oK){this.div.innerHTML="";this.div.appendChild(this.createDom(this.properties))}this.point=iM(e,this.coordType);if(this.synUpdate){this.map.dispatchEvent(new ix("onrefresh"));return}var T=0;var C=0;if(!this.useTranslate){T=this.div.clientWidth*this.anchors[0];C=this.div.clientHeight*this.anchors[1]-(this.fixBottom?0:25)}var oL=m8.convertLL2MC(this.point);var i=this.map.pointToOverlayPixelIn(oL,{useRound:false});this.div.style.position="absolute";this.div.style.left=i.x-T+this.offsetX+"px";this.div.style.top=i.y-C+this.offsetY+"px"}},setRotation:function(oN){oN=oN+this.rotationInit;while(oN<0){oN+=360}this._rotation=oN%360;var oL=0;var C=this._rotation;if((this._rotation>90&&this._rotation<270)&&this.rotationFlip){oL=180;C-=360}else{oL=0}if(this.rotationFlip){var oP=((this.div.clientWidth||0)*this.anchors[0]||0)-(this._originOpt.offsetY||0)+(this._originOpt.offsetX||0);if(Math.abs(this._rotation-80)<=10||Math.abs(this._rotation-260)<=10){this.offsetX=oP}else{if(Math.abs(this._rotation-100)<=10||Math.abs(this._rotation-280)<=10){this.offsetX=-oP}else{this.offsetX=this._originOpt.offsetX||0}}}var i=this.div.style.transform;const oK=/translate\(([^)]+)/;const oO=i.match(oK);if(oO){const oM=oO[1].split(",");const T=oM[0].trim();const e=oM[1].trim();this.div.style.transform="translate("+T+", "+e+") rotateZ("+C+"deg) rotateX("+oL+"deg)"}else{this.div.style.transform="rotateZ("+C+"deg) rotateX("+oL+"deg)"}},setRotationOrigin:function(e){while(e<0){e+=360}this._rotationOrigin=e%360;this.updateRotation()},updateRotation:function(){if(!this.map||!this.autoFollowHeadingChanged){return}var e=(this._rotationOrigin+this.map.getHeading());this.setRotation(e)},getRotation:function(){return this._rotation},getPoint:function(){return m0(this.point,this.coordType)},setProperties:function(e){if(e instanceof Object){Object.assign(this.properties,e);this.div.innerHTML="";this.div.appendChild(this.createDom(this.properties))}},getProperties:function(){return this.properties},toString:function(){return"CustomOverlay"},_getPixPos:function(C,e){var T=m8.convertLL2MC(this.point);var i=this.map.pointToOverlayPixelIn(T,{zoom:C,center:e,fixPosition:true});return i},});function ik(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("CanvasLayer")}bw.call(this);this.options=e||{};this.paneName=this.options.paneName||"labelPane";this.zIndex=this.options.zIndex||0;this.contextType=this.options.contextType||"2d";this.enableMassClear=this.options.enableMassClear!==false;this._bindedResize=null}ik.inherits(bw,"CanvasLayer");ik.prototype.initialize=function(T){this._map=T;var i=this.canvas=document.createElement("canvas");var e=this.ctx=this.canvas.getContext(this.contextType);i.style.cssText="position:absolute;left:0;top:0;pointer-events:none;z-index:"+this.zIndex+";";this.adjustSize();this.adjustRatio(e);var oK=T.getPanes()[this.paneName];if(oK){oK.appendChild(i)}var C=this;this._bindedResize=function(){if(!C.canvas||!C._map){return}C.adjustSize();C.adjustRatio(C.ctx);C.draw()};T.addEventListener("resize",this._bindedResize);return this.canvas};ik.prototype.adjustSize=function(){var i=this._map.getSize();var e=this.canvas;e.width=i.width;e.height=i.height;e.style.width=e.width+"px";e.style.height=e.height+"px"};ik.prototype.adjustRatio=function(i){var oK=i.backingStorePixelRatio||i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1;var T=(window.devicePixelRatio||1)/oK;var e=i.canvas.width;var C=i.canvas.height;i.canvas.width=e*T;i.canvas.height=C*T;i.canvas.style.width=e+"px";i.canvas.style.height=C+"px";i.scale(T,T)};ik.prototype.draw=function(){if(!this.canvas||!this._map){return}if(this._map._renderType!=="webgl"){this.canvas.style.left=-this._map.offsetX+"px";this.canvas.style.top=-this._map.offsetY+"px"}this.dispatchEvent("draw");this.options.update&&this.options.update.apply(this,arguments)};ik.prototype.remove=function(){if(this._map&&this._bindedResize){this._map.removeEventListener("resize",this._bindedResize);this._bindedResize=null}if(this.canvas&&this.canvas.parentNode){this.canvas.parentNode.removeChild(this.canvas)}this.canvas=null;this.ctx=null;this.domElement=null;this.dispatchEvent(new ix("onremove"))};ik.prototype.getContainer=function(){return this.canvas};ik.prototype.show=function(){if(!this.canvas&&this._map){this._map.addOverlay(this)}if(this.canvas){this.canvas.style.display="block"}};ik.prototype.hide=function(){if(this.canvas){this.canvas.style.display="none"}};ik.prototype.setZIndex=function(e){this.zIndex=e;if(this.canvas){this.canvas.style.zIndex=e}};ik.prototype.getZIndex=function(){return this.zIndex};var aX={};function lD(C,i){hv.BaseClass.call(this);this.content=C;this.map=null;this._config={width:0,height:0,maxWidth:600,offset:new mU(0,0),title:"",maxContent:"",enableMaximize:false,enableAutoPan:true,enableCloseOnClick:true,margin:[10,10,40,10],collisions:[[10,10],[10,10],[10,10],[10,10]],ifMaxScene:false,onClosing:function(){return true}};this.setConfig(i);if(this._config.width<50){this._config.width=50}if(this._config.width>730){this._config.width=730}if(this._config.height!=0){if(this._config.height<50){this._config.height=50}if(this._config.height>650){this._config.height=650}}if(this._config.maxWidth!==0){if(this._config.maxWidth<50){this._config.maxWidth=50}if(this._config.maxWidth>730){this._config.maxWidth=730}}this.isWinMax=false;this.IMG_PATH=K.imgPath;this.overlay=null;var e=this;ki.load("simpleInfowindow",function(){e._draw()})}lD.inherits(hv.BaseClass,"SimpleInfoWindow");hv.extend(lD.prototype,{setWidth:function(e){e=e*1;if(!e&&e!=0||isNaN(e)||e<0){return}if(e!=0){if(e<50){e=50}if(e>730){e=730}}this._config.width=e},setHeight:function(e){e=e*1;e-=10;if(!e&&e!=0||isNaN(e)||e<0){return}if(e!=0){if(e<50){e=50}if(e>650){e=650}}this._config.height=e},setMaxWidth:function(e){e=e*1;if(!e&&e!=0||isNaN(e)||e<0){return}if(e!=0){if(e<50){e=50}if(e>730){e=730}}this._config.maxWidth=e},setTitle:function(e){this._config.title=e||""},setContent:function(e){this.content=e||""},setMaxContent:function(e){this._config.maxContent=e||""},redraw:function(){},enableAutoPan:function(){this._config.enableAutoPan=true},disableAutoPan:function(){this._config.enableAutoPan=false},enableCloseOnClick:function(){this._config.enableCloseOnClick=true},disableCloseOnClick:function(){this._config.enableCloseOnClick=false},enableMaximize:function(){this._config.enableMaximize=true},disableMaximize:function(){this._config.enableMaximize=false},show:function(){this._visible=true},hide:function(){this._visible=false},close:function(){this.hide()},dispose:function(){hv.BaseClass.prototype.decontrol.call(this)},maximize:function(){this.isWinMax=true},restore:function(){this.isWinMax=false},setConfig:function(i){if(!i){return}for(var e in i){if(typeof(this._config[e])==typeof(i[e])){this._config[e]=i[e]}}},isVisible:function(){return this.isOpen()},isOpen:function(){return false},getPoint:function(){if(this.overlay&&this.overlay.getPoint){return this.overlay.getPoint()}},getOffset:function(){return this._config.offset},dispose:function(){hv.BaseClass.prototype.decontrol.call(this)},toString:function(){return"SimpleInfoWindow"}});li.prototype.openSimpleInfoWindow=function(oK,e){if(!oK||oK.toString()!="SimpleInfoWindow"||!e||e.toString()!="Point"){return}var i=m8.convertLL2MC(e);var C=this.temp;if(!C.marker){var T=new nF(K.imgPath+"blank.gif",{width:1,height:1});C.marker=new og(i,{icon:T,width:1,height:1,offset:new mU(0,0),infoWindowOffset:new mU(0,0),clickable:false});C.marker._fromMap=1}C.marker.setPositionIn(i);this.addOverlay(C.marker);C.marker.show();C.marker.openSimpleInfoWindow(oK)};li.prototype.closeSimpleInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeSimpleInfoWindow()}};g2.prototype.openSimpleInfoWindow=function(e){if(this.map){this.map.closeSimpleInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;hv.BaseClass.call(e,e.hashCode)}};g2.prototype.closeSimpleInfoWindow=function(){if(this.map&&this.map.temp._infoWin){this.map.temp._infoWin._visible=false;this.map.temp._infoWin.decontrol();this.map.temp._infoWin=null}};function dM(C,e){mk.call(this,e);e=e||{};this._config.showRegion=e.showRegion||"inside";this._config.isBuildingMask=e.isBuildingMask&&true;this._config.isPoiMask=e.isPoiMask&&true;this._config.isMapMask=e.isMapMask&&true;this._config.path=C;this._parseFillCacheWebGL=[];this.setPoints(C,e);var i=this;ki.load("poly",function(){i._draw()})}dM.inherits(mk,"MapMask");hv.extend(dM.prototype,{setPoints:function(i){var e=mk.getGraphPoints(i).slice(0);this.hasMultipleParts=false;mk.prototype.setPoints.call(this,e)},setPathIn:function(e){this.setPoints(e)},_processSinglePointArray:function(e){var i=mk.getGraphPoints(e).slice(0);innerPoints=i.slice(0);if(innerPoints.length>1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new d9(innerPoints[0].lng,innerPoints[0].lat))}return{userPoints:i,innerPoints:innerPoints}},getPoints:function(){var e=this._userPoints;if(e.length===0){e=this.points}return e},getPathIn:function(){return this.getPoints()}});function ov(oL,C){if(!oL||oL.length===0){return}var oK=[];if(oL[0] instanceof d9){var e=this._processSinglePointArray(oL);for(var T=0;T<e.innerPoints.length;T++){oK[T]=m8.convertLL2MC(e.innerPoints[T])}}dM.call(this,oK,C)}ov.inherits(dM,"MapMaskOut");hv.extend(ov.prototype,{toString:function(){return"MapMask"}});function ks(i,T,e,C){if(!i){return}this._positionsCache={};this.fixedRotation=C?!!C:false;this._markers=[];this.symbol=(i instanceof hS)?i:null;this._relativeOffset=T===undefined?true:!!(T.indexOf("%")+1);this._offset=isNaN(parseFloat(T))?1:(this._relativeOffset?parseFloat(T)/100:parseFloat(T));this._relativeRepeat=!!(e.indexOf("%")+1);this.repeat=e!=undefined?(this._relativeRepeat?parseFloat(e)/100:parseFloat(e)):0}function hV(e,i){e=isNaN(e)?0:e;i=isNaN(i)?0:i;this.x=e;this.y=i}hV.prototype.equals=function(e){if(!e){return false}return e.x===this.x&&e.y===this.y};hV.prototype.clone=function(){return new hV(this.x,this.y)};hV.prototype.toString=function(){return"Pixel"};function mU(i,e){if(typeof i!=="number"){this.width=parseFloat(i)}else{this.width=i}if(typeof e!=="number"){this.height=parseFloat(e)}else{this.height=e}}mU.prototype.equals=function(e){return !!(e&&this.width===e.width&&this.height===e.height)};mU.prototype.toString=function(){return"Size"};var ms=[];if(window.B_HOST_TILE_BASE_URLS&&window.B_HOST_TILE_BASE_URLS.length>=4){ms=window.B_HOST_TILE_BASE_URLS}var oB={B_NORMAL_MAP:{tileUrls:fx(K.tileDomain,K.rasterTilePath),vectorTileUrls:fx(K.tileDomain,K.vectorTilePath),languageTileUrls:function(e){switch(e){case BMAP_LANGUAGE_ZH:return fx(K.tileDomain,K.vectorTilePath);default:if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){return fx([window._BMapSecurityConfig["serviceHost"]],K.enVectorTilePath)}return fx(K.enTileDomain,K.enVectorTilePath)}},tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,webgl:{minZoom:3,maxZoom:25},zoomLevelBase:18,errorUrl:K.imgPath+"bg.png",bounds:new lz(new d9(-21364736,-11708041.66),new d9(23855104,12474104.17)),imgExtend:"png"},B_SATELLITE_MAP:{tileUrls:[K.urlProtocol+"//"+(ms[0]||"apimaponline0.bdimg.com/starpic/?qt=satepc&"),K.urlProtocol+"//"+(ms[0]||"apimaponline1.bdimg.com/starpic/?qt=satepc&"),K.urlProtocol+"//"+(ms[0]||"apimaponline2.bdimg.com/starpic/?qt=satepc&"),K.urlProtocol+"//"+(ms[0]||"apimaponline3.bdimg.com/starpic/?qt=satepc&"),],tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,zoomLevelBase:18,errorUrl:K.imgPath+"bg.png",bounds:new lz(new d9(-21364736,-10616832),new d9(23855104,15859712)),imgExtend:"png"},B_STREET_MAP:{tileUrls:fx(K.tileDomain,K.rasterTilePath),tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,zoomLevelBase:18,errorUrl:K.imgPath+"bg.png",bounds:new lz(new d9(-21364736,-10616832),new d9(23855104,15859712)),imgExtend:"png"},BMAP_CUSTOM_LAYER:{tileUrls:[""],tileSize:256,baseUnits:256,zoomLevelMin:1,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,zoomLevelBase:18,errorUrl:K.imgPath+"blank.gif",bounds:new lz(new d9(-21364736,-10616832),new d9(23855104,15859712)),imgExtend:"png"},B_EARTH_MAP:{tileUrls:[""],tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,webgl:{minZoom:3,maxZoom:21},zoomLevelBase:18,errorUrl:K.imgPath+"blank.gif",bounds:new lz(new d9(-21364736,-10616832),new d9(23855104,15859712)),imgExtend:"png"},B_NONE_MAP:{tileUrls:"",tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,zoomLevelBase:18,errorUrl:K.imgPath+"bg.png",bounds:new lz(new d9(-21364736,-11708041.66),new d9(23855104,12474104.17)),imgExtend:"png"}};var gA=oB;function at(e,i,C){this._name=e;this._layers=[];if(i){this._layers=i instanceof kT?[i]:(i.slice?i.slice(0):[i])}C=C||{};this._opts={tips:C.tips||"",labelText:C.labelText||"",minZoom:C.minZoom==null?3:C.minZoom,maxZoom:C.maxZoom==null?19:C.maxZoom,tileSize:C.tileSize==null?256:C.tileSize,textColor:C.textColor||"black",errorImageUrl:C.errorImageUrl||"",bounds:C.bounds||new lz(new d9(-21364736,-16023552),new d9(23855104,19431424)),projection:C.projection||new m8()};if(typeof C.id==="string"){this.id=C.id;this.mapTypeId=C.id;this._config=gA&&gA[C.id]?gA[C.id]:null}if(typeof C.compatType==="string"){this.compatType=C.compatType}}hv.extend(at.prototype,{getName:function(){return this._name},getTips:function(){return this._opts.tips},getLabelText:function(){return this._opts.labelText},getTileLayer:function(){return this._layers[0]},getTileLayers:function(){return this._layers},getTileSize:function(){return this._opts.tileSize},getMinZoom:function(){return this._opts.minZoom},getMaxZoom:function(){return this._opts.maxZoom},getTextColor:function(){return this._opts.textColor},getProjection:function(){return this._opts.projection},getErrorImageUrl:function(){return this._opts.errorImageUrl}});function mR(oL,C,e,T){var i=gA&&gA[oL]?gA[oL]:null;T=T||{};var oK={id:oL,compatType:T.compatType||"",tips:e||"",labelText:T.labelText||"",minZoom:i&&i.minZoom!=null?i.minZoom:3,maxZoom:i&&i.maxZoom!=null?i.maxZoom:19,tileSize:i&&i.tileSize!=null?i.tileSize:256,errorImageUrl:i&&i.errorUrl?i.errorUrl:"",bounds:i&&i.bounds?i.bounds.clone?i.bounds.clone():i.bounds:undefined,projection:new m8()};return new at(C,null,oK)}at.builtin={BMAP_NORMAL_MAP:mR("B_NORMAL_MAP","鍦板浘","鏄剧ず鏅�氬湴鍥�",{compatType:"BMAP_NORMAL_MAP"}),BMAP_SATELLITE_MAP:mR("B_SATELLITE_MAP","鍗槦","鏄剧ず鍗槦褰卞儚",{compatType:"BMAP_SATELLITE_MAP"}),BMAP_HYBRID_MAP:mR("B_SATELLITE_MAP","娣峰悎","鏄剧ず甯︽湁琛楅亾鐨勫崼鏄熷奖鍍�",{compatType:"BMAP_HYBRID_MAP",labelText:"璺綉"}),BMAP_EARTH_MAP:mR("B_EARTH_MAP","鍦扮悆","鏄剧ず鍦扮悆",{compatType:"BMAP_EARTH_MAP"}),BMAP_NONE_MAP:mR("B_NONE_MAP","绌虹櫧","鏄剧ず绌虹櫧鍦板浘",{compatType:"BMAP_NONE_MAP"})};function es(oM,oN,C,e,oL){if(oL&&gA[oL]){this.mapTypeName=oL}else{this.mapTypeName=lg}if(oM&&oM instanceof Array){var oK=true;for(var T=0;T<oM.length;T++){if(oM[T] instanceof lz){continue}else{oK=false;break}}oK&&(this.bounds=oM)}if(typeof oN==="number"&&oN>=gA[this.mapTypeName].webgl.minZoom){if(gA[this.mapTypeName].webgl){if(oN>=gA[this.mapTypeName].webgl.minZoom){this.minZoom=oN}else{this.minZoom=gA[this.mapTypeName].webgl.minZoom}}else{if(oN>=gA[this.mapTypeName].minZoom){this.minZoom=oN}else{this.minZoom=gA[this.mapTypeName].minZoom}}}if(typeof C==="number"){if(gA[this.mapTypeName].webgl){if(C<=gA[this.mapTypeName].webgl.maxZoom){this.maxZoom=C}else{this.maxZoom=gA[this.mapTypeName].webgl.maxZoom}}else{if(C<=gA[this.mapTypeName].maxZoom){this.maxZoom=C}else{this.maxZoom=gA[this.mapTypeName].maxZoom}}}if(this.maxZoom<this.minZoom){this.maxZoom=null}if(e&&typeof e==="function"){this.tileUrlFunction=e}}hv.extend(es.prototype,{addBoundary:function(e){if(e instanceof lz){if(this.bounds){this.bounds.push(e)}else{this.bounds=[e]}}},setTileUrlFunction:function(e){if(e&&typeof e==="function"){this.tileUrlFunction=e}},crossPoint:function(e,T,oK){if(oK<this.minZoom||oK>this.maxZoom){return false}var oL=this.containsPoint(e,oK);if(oL){return oL}for(var C=0;C<this.bounds.length;C++){if(this.bounds[C].intersects(T)){oL=true;break}}return oL},containsPoint:function(e,T){if(!e||!(e instanceof d9)||!this.isValid()){return false}var oK=false;if(T<this.minZoom||T>this.maxZoom){return oK}for(var C=0;C<this.bounds.length;C++){if(this.bounds[C].containsPoint(e)){oK=true;break}}return oK},isValid:function(){return this.bounds&&this.minZoom&&this.maxZoom&&this.tileUrlFunction},toString:function(){return"PrivateRegionDataModel"}});function lh(oO,i,oK,C,T){this.mgr=oO;this.position=oK;this._cbks=[];this.name=oO.getTileName(C,T,oO.map.config.style);this.info=C;this._transparentPng=T.isTransparentPng();var oP=da("img");lC(oP);oP.galleryImg=false;var oN=oP.style;oN.position="absolute";oN.width=oO.tileSize+"px";oN.height=oO.tileSize+"px";oN.left=oK[0]+"px";oN.top=oK[1]+"px";this.img=oP;this.src=i;if(g3&&oK._offsetX===0){oN.opacity=0;oN.willChange="opacity"}var oM=this;this.img.onload=function(oX){if(!oM.mgr){return}var oS=oM.mgr;var oQ=oS.bufferTiles;if(oS.bufferNumber>0){oQ[oM.name]=oM;oQ.push(oM.name)}var oU=oQ.length-oS.bufferNumber;for(var oV=0;oU>0&&oV<oQ.length;oV++){var oW=oQ[oV];if(!oS.mapTiles[oW]){if(oQ[oW]){oQ[oW].mgr=null;var oT=oQ[oW].img;if(oT.parentNode){l5(oT);oT.parentNode.removeChild(oT)}oT=null;oQ[oW].img=null;oQ[oW]=null;delete oQ[oW]}oQ.splice(oV,1);oV--;oU--}}oM.loaded=true;oS.imgNumber++;if(!bx(oM.img)){if(T.tilesDiv){T.tilesDiv.appendChild(oM.img)}}var oX=new ix("onimagechange");oX.action="show";oX.tile=oM.name;oS.map.dispatchEvent(oX);if(g3&&oK._offsetX===0){var oR=new ij({fps:10,duration:300,render:function(e){if(oM.img&&oM.img.style){oM.img.style.opacity=e*1}},finish:function(){if(oM.img&&oM.img.style){delete oM.img.style.opacity;oM.img.style.willChange="auto"}}})}oM._callCbks()};this.img.onerror=function(oS){oM.error=true;oM._callCbks();if(!oM.mgr){return}var oQ=oM.mgr;var oR=gA[T.mapType];if(oR&&oR.errorUrl){oM.img.src=oR.errorUrl}if(!bx(oM.img)){if(T.tilesDiv){T.tilesDiv.appendChild(oM.img)}}};oP=null;var oL=new ix("onimagebefore");oL.tile=oM.name;oO.map.dispatchEvent(oL)}lh.prototype._addLoadCbk=function(e){this._cbks.push(e)};lh.prototype._load=function(){if(FeBrowser.ie<=6&&FeBrowser.ie>0&&this._transparentPng){this.img.src=K.imgPath+"blank.gif"}else{this.img.src=this.src}};lh.prototype._callCbks=function(){var C=this;for(var e=0;e<C._cbks.length;e++){C._cbks[e]()}C._cbks.length=0};var g3=(!hv.Browser.ie||hv.Browser.ie>8);function nh(e){this.tileLayers=[];this.map=e;this.bufferNumber=300;this.mapTiles=[];this.bufferTiles=[];this.config=gA[this.map.mapType];this.errorUrl=this.config.errorUrl;this.tileSize=this.config.tileSize;this.baseUnits=this.config.baseUnits;this.baseZoomLevel=this.config.zoomLevelBase;this.tileURLs=this.config.tileUrls;this.imgNumber=0;this.numLoading=0;this.temp={}}cv.register(function(i){if(i._renderType==="webgl"){return}var e=i.tileMgr=new nh(i);i.addEventListener("mousewheel",function(C){e.mouseWheel(C)});i.addEventListener("dblclick",function(C){e.dblClick(C)});i.addEventListener("rightdblclick",function(C){e.dblClick(C)});i.addEventListener("minuspress",function(C){e.keypress(C)});i.addEventListener("pluspress",function(C){e.keypress(C)});i.addEventListener("load",function(C){if(this.mapType===c1){return}e.loadTiles()});i.addEventListener("zoomstartcode",function(C){if(this.mapType===c1){return}e._zoom(C)});i.addEventListener("moving",function(C){if(this.mapType===c1){return}e.moveGridTiles()});i.addEventListener("resize",function(C){if(this.mapType===c1){return}e.resizeMap(C)});i.addEventListener("addtilelayer",function(C){e.addTileLayer(C)});i.addEventListener("removetilelayer",function(C){e.removeTileLayer(C)})});hv.extend(nh.prototype,{addTileLayer:function(T){var C=this;var i=T.target;C.tileLayers.push(i);if(C.map.loaded){C.moveGridTiles()}},removeTileLayer:function(oQ){var oR=this;var oO=oQ.target;var oM=oO.mapType;var oL=oR.mapTiles;var oT=oR.bufferTiles;for(var C in oT){var T=C.split("-")[1];if(T==oM){delete oT[C]}}for(var C in oL){var T=C.split("-")[1];if(T==oM){delete oL[C]}}if(oR.zoomsDiv&&oR.zoomsDiv.parentNode){oR.zoomsDiv.parentNode.removeChild(oR.zoomsDiv);oR.zoomsDiv.innerHTML=""}var oK=oR.map;if(oK.deepZoom){var oS=oK.deepZoom.preDeepZoomDiv;if(oS&&oS.parentNode){oS.parentNode.removeChild(oS)}}for(var oP=0,oN=oR.tileLayers.length;oP<oN;oP++){if(oO==oR.tileLayers[oP]){oR.tileLayers.splice(oP,1)}}oR.moveGridTiles()},hideDeepZoomDiv:function(){var i=this,C=i.map;if(C.deepZoom){var e=C.deepZoom.preDeepZoomDiv;if(e&&e.style.display!="none"){e.style.display="none"}}},getTileLayer:function(oK){var T=this;for(var C=0,e=T.tileLayers.length;C<e;C++){tilelayer=T.tileLayers[C];if(tilelayer.mapType==oK){return tilelayer}}return null},_zoom:function(C){var i=this;if(i.zoomsDiv&&i.zoomsDiv.style.display!="none"){i.zoomsDiv.style.display="none"}i.hideDeepZoomDiv();i.moveGridTiles()},resizeMap:function(i){this.loaded=false;this.moveGridTiles()},_checkTilesLoaded:function(){this.numLoading--;var e=this;if(this.numLoading==0){if(this._checkLoadedTimer){clearTimeout(this._checkLoadedTimer);this._checkLoadedTimer=null}this._checkLoadedTimer=setTimeout(function(){if(e.numLoading==0){if(!K.apiVersionIsGL()&&!e.map._firstTileLoadedFired){e.map._firstTileLoadedFired=true;e.map.dispatchEvent(new ix("onfirsttileloaded"));e.map.dispatchEvent(new ix("onfirsttilesloaded"))}e.map.dispatchEvent(new ix("ontilesloaded"))}e._checkLoadedTimer=null},80)}},getTileName:function(e,C,i){var oK=C.mapType;var T="TILE-"+oK+"-"+i+"-"+e[0]+"-"+e[1]+"-"+e[2];return T},hideTile:function(T,C){var i=T.img;if(bx(i)){if(T.loaded){this.imgNumber--}if(i.parentNode){l5(i);i.parentNode.removeChild(i)}}var oK=new ix("onimagechange");oK.tile=this.getTileName(T.info,C,this.map.config.style);oK.action="hide";delete this.mapTiles[T.name];if(!T.loaded){l5(i);T._callCbks();i=null;T.img=null;T.mgr=null}this.map.dispatchEvent(oK)},loadTiles:function(){var i=this;if(hv.Browser.ie){try{document.execCommand("BackgroundImageCache",false,true)}catch(C){}}if(this.zoomsDiv&&this.zoomsDiv.style.display!="none"){this.zoomsDiv.style.display="none"}i.hideDeepZoomDiv();i.moveGridTiles()},getCell:function(oK,T){var e=this.baseUnits*Math.pow(2,(this.baseZoomLevel-T));var C=parseInt(oK.lng/e);var i=parseInt(oK.lat/e);return[C,i,e*(C+0.5),e*(i+0.5)]},moveGridTiles:function(){var oX=this.map,o6=oX.getMapTypeId(),o4=this.tileLayers.length;var o2=oX.centerPoint;if(o6!==j9){o2=hz.calcLoopCenterPoint(o2)}var oO=oX.width;var pi=oX.getZoomUnits();var o3=pi*oO;var o8=o2.lng-o3/2;var oT=o2.lng+o3/2;var oW=hz.isAddWidth(o8,oT);for(var pa=0;pa<o4;pa++){var oK=this.tileLayers[pa];if(oK.baseLayer||o4==1){this.tilesDiv=oK.tilesDiv}var oY=gA[oK.mapType];var T=oX.zoomLevel;var pd=oX.getZoomUnits(oX.zoomLevel);var oS=oY.baseUnits*Math.pow(2,(oY.zoomLevelBase-T));var oQ=Math.floor(o2.lng/oS);var o9=Math.floor(o2.lat/oS);var oV=oY.tileSize;var oZ=[oQ,o9,(o2.lng-oQ*oS)/oS*oV,(o2.lat-o9*oS)/oS*oV];var oR=oW?oX.width/2*1.5:oX.width/2;var oU=oZ[0]-Math.ceil((oR-oZ[2])/oV);var ph=oZ[1]-Math.ceil((oX.height/2-oZ[3])/oV);var pb=oZ[0]+Math.ceil((oR+oZ[2])/oV);var o0=oZ[1]+Math.ceil((oX.height/2+oZ[3])/oV);var oP=[];for(var pf=oU;pf<pb;pf++){for(var pe=ph;pe<o0;pe++){oP.push([pf,pe]);var o5="id_"+pf+"_"+pe+"_"+T;oP[o5]=true}}if(oK.mapType!==j9){oP=hz.calcLoopTiles(oP,T)}oP.sort((function(i){return function(pk,pl){return((0.4*Math.abs(pk[0]-i[0])+0.6*Math.abs(pk[1]-i[1]))-(0.4*Math.abs(pl[0]-i[0])+0.6*Math.abs(pl[1]-i[1])))}})([oZ[0],oZ[1]]));var C=this.mapTiles;var e=-o2.lng/pd;var pj=o2.lat/pd;var o7=[e,pj];for(var o1 in C){var oM=C[o1];var pg=oM.info;if(!pg){continue}var o5="id_"+pg[0]+"_"+pg[1]+"_"+pg[2];if(!oP[o5]){this.hideTile(oM,oK)}}var oL=-oX.offsetX+oX.width/2;var oN=-oX.offsetY+oX.height/2;oK.tilesDiv.style.left=Math.round(e+oL)-o7[0]+"px";oK.tilesDiv.style.top=Math.round(pj+oN)-o7[1]+"px";this.numLoading+=oP.length;for(var pf=0,pc=oP.length;pf<pc;pf++){this.showTile([oP[pf][0],oP[pf][1],oX.zoomLevel],o7,oK,pf,oX.config.style)}}},showTile:function(oM,oL,oP,oU){this.centerPos=oL;var oN=gA[oP.mapType];var oQ=this.map.config.style;var T=this.getTileName(oM,oP,oQ);var oK=(oM[0]*oN.tileSize)+oL[0];var C=(-1-oM[1])*oN.tileSize+oL[1];var oT=[oK,C];var oO=null;if(oP.mapType!==j9){oO=hz.calcLoopParam(oM[0],oM[2]);var oS=oO.offsetX;oT[0]+=oS;oT._offsetX=oS}var oX=this;var oW=this.mapTiles[T];if(oW){oW.img.style.left=oT[0]+"px";oW.img.style.top=oT[1]+"px";if(oW.loaded){this._checkTilesLoaded()}else{oW._addLoadCbk(function(){oX._checkTilesLoaded()})}return}oW=this.bufferTiles[T];if(oW){this.imgNumber++;oP.tilesDiv.insertBefore(oW.img,oP.tilesDiv.lastChild);this.mapTiles[T]=oW;oW.img.style.left=oT[0]+"px";oW.img.style.top=oT[1]+"px";if(oW.loaded){this._checkTilesLoaded()}else{oW._addLoadCbk(function(){oX._checkTilesLoaded()})}var oV=new ix("onimagechange");oV.action="cache";oV.tile=this.getTileName(oM,oP,oQ);this.map.dispatchEvent(oV)}else{var oR=new hV(oM[0],oM[1]);if(oO){oR.x=oO.col}var i=oP.getTilesUrl(oR,oM[2]);oW=new lh(this,i,oT,oM,oP);oW._addLoadCbk(function(){oX._checkTilesLoaded()});oW._load();this.mapTiles[T]=oW;kB(this.map)}},mouseWheel:function(oN){var oM=this.map;if(!oM.config.enableWheelZoom){return}var oO=oM.zoomLevel+(oN.trend===true?1:-1);var oK=oM._getProperZoom(oO);if(oK.exceeded){var C=new ix("onzoomexceeded");C.targetZoom=oO;oM.dispatchEvent(C);return}oM.dispatchEvent(new ix("onzoomstart"));oM.lastLevel=oM.zoomLevel;oM.zoomLevel=oK.zoom;var i=oN.pixel;var T=oM.pixelToPointIn(i,{zoom:oM.lastLevel});var oL=oM.getZoomUnits(oM.zoomLevel);oM.centerPoint=new d9(T.lng+oL*(oM.width/2-i.x),T.lat-oL*(oM.height/2-i.y));this.zoom(i)},dblClick:function(C){var i=this.map;if(!i.config.enableDblclickZoom){return}if(i.mapType===c1){return}if(i.currentOperation===gp.dragging){return}if(C.type=="onrightdblclick"){i.zoomOut(C.pointMC)}else{i.zoomIn(C.pointMC)}},keypress:function(C){var i=this.map;if(i.getMapTypeId()===c1){return}C.type=="onpluspress"?i.zoomIn():i.zoomOut()}});function kT(T){this.opts=T||{};this.copyright=this.opts.copyright||{};this.transparentPng=this.opts.transparentPng||false;this.png8=this.opts.png8||false;this.height=this.opts.height||0;this.opacity=this.opts.opacity||1;this.pack=this.opts.pack||false;this.baseLayer=this.opts.baseLayer||false;this.dataType=this.opts.dataType||1;this.transform=this.opts.transform||0;this.spanLevel=this.opts.spanLevel||0;this.isFlat=!this.opts.isFlat?false:true;this.showLabel=this.opts.showLabel===false?false:true;var e=this.opts.tileTypeName||"web";this.tileType=lA.getInstance(e);this.clipTile=this.opts.clipTile||false;this._type="tilelayer";this.isTop=this.opts.isTop||false;var i=c9()?128:256;this.cacheSize=this.opts.cacheSize||i;var C=this;this.tileCache=new a1(this.cacheSize,{clearCallback:function(oK){if(oK.label){if(oK.label.textImageBitmap){oK.label.textImageBitmap.close()}if(oK.label.indoorTextImageBitmap){oK.label.indoorTextImageBitmap.close()}}if(C._removeIndoorData){C._removeIndoorData(oK)}}});this.scaler=ja()>=1.5?2:1;this.normalUdt=oe("ditu","normal").udt;this.numLoading=0;this.numTileLoading=0;this.firstTileLoad=false;this.retry=this.opts.retry||false;this.retryTime=this.opts.retryTime||600;this.useThumbData=false;this.useThumbData=this.opts.useThumbData||false;this.thumbUpsample=this.opts.thumbUpsample||false;this.preciseVertex=this.opts.preciseVertex||false;if(this.baseLayer){this.useThumbData=true}if(typeof this.opts.customLayer==="boolean"){this.customLayer=this.opts.customLayer}else{this.customLayer=true}this.tileLoadFunction=this.opts.tileLoadFunction}kT.inherits(eX,"TileLayer");kT.prototype.isTileLayer=true;hv.extend(kT.prototype,{isTransparentPng:function(){return this.transparentPng},getTilesUrl:function(oR,e){var oQ=mH(this.mapType);var C=gA[oQ];if(typeof C!=="object"){return null}var T=oR.x;var oS=oR.y;T=hz.calcLoopParam(T,e).col;var i="";if(this.opts.tileUrlTemplate){i=this.opts.tileUrlTemplate;i=i.replace(/\{X\}/,oS);i=i.replace(/\{Y\}/,T);i=i.replace(/\{Z\}/,e)}else{if(oQ===lg){var oP=this.isCanvasMap?0:1;var oL=C.tileUrls[Math.abs(oS+T)%C.tileUrls.length];if(window.offLineIPAddress){oL=window.offLineIPAddress+"tile5/"}var oK=this.map.config.style;i=oL+"?qt=vtile&x="+T+"&y="+oS+"&z="+e+(oK==="default"?"":("&styleId=1"))+"&styles=pl&udt="+this.normalUdt+"&scaler="+this.scaler+"&showtext="+oP+"&ak="+hj+"&is_has_bmap_proxy="+k1+"&from=gl";i=i.replace(/-(\d+)/gi,"M$1")}if(oQ===j9){var oM=oe("ditu","satellite");var oO=oM.ver;var oN=oM.udt;i=C.tileUrls[Math.abs(oS+T)%C.tileUrls.length]+"u=x="+T+";y="+oS+";z="+e+";v="+oO+";type=sate&fm=46&udt="+oN;i=i.replace(/-(\d+)/gi,"M$1")}}return i},initialize:function(oM){this.map=oM;if(oM._renderType==="webgl"){var oL=null;if(this.customLayer!==false){oL=this.getTilesUrl}hv.extend(this,hQ);this.labelProcessor=new na(this);this.callbackDataQueue=[];if(oL){this.getTilesUrl=oL}var C=this;oM.on("indoor_data_refresh",function(oN){if(!C.baseLayer){return}C._refreshIndoorData(oN.uid,oN.floor)});oM.on("custom_labels_ready",function(oN){if(C.mapType!==lg&&oN.model==="custom"){return}if((oN.model==="custom")||oN.model==="mvt_"+C.drawIndex){C._doWorkAfterLabelImageLoad(oN.virtualTile,oN.labelCanvas,null,oN.imgKey)}});oM.on("glmoduleloaded",function(){if(!C.baseLayer){return}C.updateAllIconsTextureCoords()});oM.on("layer_update",function(oO){if(C.dataType===2&&oM.customLoaded&&oM.areaCustomLoaded){var oN=new ix("onlayer_clear");oM.fire(oN)}});oM.on("layer_clear",function(oN){if(C.dataType===2){C.clearCache()}});if(this.ontology&&this.ontology._initEvent){this.ontology._initEvent(oM)}}if(!oM.temp.layerZIndex){oM.temp.layerZIndex=0}this.zIndex=this.zIndex||1;if(oM.getRenderType()==="dom"){this.zIndex=oM.tileMgr.tileLayers.length}else{if(this.baseLayer){this.zIndex=0}else{if(this.zIndex>0){this.adjustZIndex()}else{var e=oM._featureMgr.result.bkData;this.zIndex=e.length||1}}}if(!oM.temp.layid){oM.temp.layid=0}if(!this.opts.mapType){this.mapType="BMAP_CUSTOM_LAYER_"+oM.temp.layid;oM.temp.layid++}else{this.mapType=mH(this.opts.mapType)}var T=gA[this.mapType];if(!T){gA[this.mapType]={tileUrls:[],tileSize:256,baseUnits:256,zoomLevelMin:1,zoomLevelMax:19,minZoom:3,maxZoom:19,minDataZoom:3,maxDataZoom:19,zoomLevelBase:18,errorUrl:K.imgPath+"/blank.gif",bounds:new lz(new d9(-21364736,-10616832),new d9(23855104,15859712)),imgExtend:"png"}}if(oM._renderType!=="webgl"){var oK=cQ(oM.platform,'<div style="position:absolute;z-index:'+this.zIndex+'"></div>');oK.style.display="";oK.style.left=Math.ceil(-oM.offsetX+oM.width/2)+"px";oK.style.top=Math.ceil(-oM.offsetY+oM.height/2)+"px";this.tilesDiv=oK}this.isCanvasMap=oM.isCanvasMap();this.lastZoom=oM.getZoom();var i=this;this.addEventListener("initDrawData",function(oN){if(i.opts.boundary){i.addBoundary(i.opts.boundary)}});oM.on("destroy",function(){i.destroy()})},clearCache:function(){this.tileCache.clear();this.map._featureMgr.clearData(this.drawIndex);this.map._featureMgr.setLabelData([],this.drawIndex);this.map._featureMgr.clearLabelOverlayData(this.drawIndex);this.labelProcessor.iconCache.clear()},remove:function(){if(this.tilesDiv&&this.tilesDiv.parentNode){this.tilesDiv.innerHTML="";this.tilesDiv.parentNode.removeChild(this.tilesDiv)}delete this.tilesDiv},getCopyright:function(){return this.copyright},getMapType:function(){return this.mapType},adjustZIndex:function(){if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;while(e[this.zIndex]){this.zIndex+=1}}},_getAdjoinZIndex:function(oK){var C=this.zIndex;if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;if(oK==="up"){for(var T=this.zIndex+1;T<e.length;T++){if(e[T]){C=T+1;break}}}else{for(var T=this.zIndex-1;T>0;T--){if(e[T]){C=T;break}}}}return C},setZIndex:function(e){this.setTargetZIndex(e)},setTargetZIndex:function(e){this.removeLabel&&this.removeLabel(this.zIndex);this.zIndex=e;this.drawIndex=e;if(this.tilesDiv){this.tilesDiv.style.zIndex=e}},calcLoopParam:function(e,i){return hz.calcLoopParam(e,i)},addBoundary:function(oL){if(!oL||!this.map){return}if(typeof oL==="string"){oL=[oL]}for(var T=0;T<oL.length;T++){var C=new BMapGL.Polygon(oL[T]);if(C&&c2(C._i)){var oK=new ix("onbeforeaddoverlay",C);oK.overlay=C;oK.isLayerMask=true;this.map.dispatchEvent(oK);C._i(this.map);if(this.boundary){this.boundary.push(C)}else{this.boundary=[C]}}}this.updateBoundary()},clearBoundary:function(){this.boundary=false;this.updateBoundary()},updateBoundary:function(){if(this.boundary===undefined||!this.map){return}var i=this.map._featureMgr.result.bkData;if(i[this.zIndex]){i[this.zIndex].showRegion=this.opts.showRegion;i[this.zIndex].boundary=this.boundary;this.map.dispatchEvent(new ix("onrefresh"));if(this.boundary===false){var C=new ix("onremoveLayerMask");C.hasLayerBoundary=this.map._featureMgr.hasLayerBoundary();this.map.dispatchEvent(C)}}},destroy:function(){if(this.collisionTimer){clearTimeout(this.collisionTimer);this.collisionTimer=null}if(this._collisionTimer){clearTimeout(this._collisionTimer);this._collisionTimer=null}this.copyright=null;this.clearCache();if(this.hashCode){this.decontrol()}},setTop:function(e){this.isTop=!!e;if(this.map){this.map._featureMgr.updateLayerMeta(this.zIndex,{isTop:this.isTop});this.map.dispatchEvent(new ix("onupdate"))}},setLowText:function(e){this.isLowText=!!e;if(this.map){this.map._featureMgr.updateLayerMeta(this.zIndex,{isLowText:this.isLowText});this.map.dispatchEvent(new ix("onupdate"))}},});function q(i,e,C){if(!K.apiVersionIsGL()){this.id=arguments[0];this.bounds=arguments[1];this.content=arguments[2];this.mapType=arguments[3];return this}this.bounds=i;this.content=e;this.mapType=C}q.inherits(eX,"Copyright");var gK={get:function(e){if(!gK.singleton){gK.singleton=new iZ(e)}return gK.singleton}};function iZ(i){this._map=i;this._tileMgr=i.tileMgr;this._animationDiv=null;this._preAnimationDiv=null;this._animation=null;this._baseLayerDiv=null;this._transformStyleName=eV.ifSupportCSS3("transform",true);this._transformOriginStyleName=eV.ifSupportCSS3("transformOrigin",true);this._preZoomTimes=1;this._preRenderTick=1;this._enableCanvas2dMap=!!(i.getRenderType()==="canvas");this._isIE9=!!(hv.Browser.ie===9);var e=this;i.addEventListener("maptypechange",function(){e.hide()});i.addEventListener("load",function(){e.hide()})}hv.extend(iZ.prototype,{prepareLayer:function(){var T=this._map;var e=this._tileMgr;this._canvas2dMapMgr=T.canvas2dMapMgr;var C=this._baseLayerDiv=e.tilesDiv;if(!this._animationDiv){var i=this._preAnimationDiv;if(i){i.parentNode&&i.parentNode.removeChild(i);this._preAnimationDiv=null}this._preAnimationDiv=this._animationDiv=C.cloneNode(true);T.platform.insertBefore(this._animationDiv,T.platform.firstChild)}this.show()},prepareAniParam:function(){var T=this._animationDiv;if(!T){return}var e=T.children.length;var C;this._zoomAniInfo=[];for(var oK=e-1;oK>-1;oK--){var oL={};C=T.children[oK].style;oL.top=parseInt(C.top,10);oL.left=parseInt(C.left,10);this._zoomAniInfo[oK]=oL}},prepareLabelLayer:function(){var oK=this._map;if(this._enableCanvas2dMap&&oK.canvas2dMapMgr){if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.parentNode.removeChild(this.touchZoomLabelCanvas)}var i=oK.canvas2dMapMgr._labelCanvas;this.touchZoomLabelCanvas=i.cloneNode(false);var e=this.touchZoomLabelCanvas.getContext("2d");e.drawImage(i,0,0);oK.platform.insertBefore(this.touchZoomLabelCanvas,oK.platform.firstChild);var T=parseInt(i.style.left,10);var C=parseInt(i.style.top,10);this.touchZoomLabelCanvas.style.zIndex=9;this.touchZoomLabelCanvas.style[this._transformOriginStyleName]=(this._fixPosition.x-(oK.offsetX+T))+"px "+(this._fixPosition.y-(oK.offsetY+C))+"px";i.style.visibility="hidden"}},show:function(){if(this._animationDiv){this._animationDiv.style.visibility=""}},showLabel:function(){var i=this._map;if(this._enableCanvas2dMap&&i.canvas2dMapMgr){var e=i.canvas2dMapMgr._labelCanvas;if(e){e.style.visibility=""}if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.style.zIndex=-2;this.touchZoomLabelCanvas.style.visibility="hidden"}}},hide:function(){if(this._animationDiv){this._animationDiv.style.visibility="hidden"}if(this._preAnimationDiv){this._preAnimationDiv.style.visibility="hidden"}},hideNonAnimationLayers:function(){var T=this._map;if(T.getRenderType()==="dom"){if(T.overlayDiv){T.overlayDiv.style.visibility="hidden"}if(T.overlayDivEx){T.overlayDivEx.style.visibility="hidden"}}var oL=T.tileMgr.tileLayers;var oK;for(var C=0,e=oL.length;C<e;C++){oK=oL[C];oK.tilesDiv.style.visibility="hidden"}},showNonAnimationLayers:function(){var T=this._map;if(T.getRenderType()==="dom"){if(T.overlayDiv){T.overlayDiv.style.visibility=""}if(T.overlayDivEx){T.overlayDivEx.style.visibility=""}}var oL=T.tileMgr.tileLayers;var oK;for(var C=0,e=oL.length;C<e;C++){oK=oL[C];oK.tilesDiv.style.visibility=""}},setFixPosition:function(e){this._fixPosition=e},setZoom:function(e,oP){var oM=this._fixPosition;var oV=this._map;var oW=this._baseLayerDiv;var oN={x:oM.x-parseInt(oW.style.left,10)-oV.offsetX,y:oM.y-parseInt(oW.style.top,10)-oV.offsetY};var T=this._animationDiv;if(!T){return}var oT=T.children.length;var oR;var oU=this._transformStyleName;var oL=this._transformOriginStyleName;var oX=this;var oZ;var oO;for(var oS=oT-1;oS>-1;oS--){var oQ=this._zoomAniInfo[oS];oR=T.children[oS].style;var oK=oQ.left-oN.x;var C=oQ.top-oN.y;oQ.dx=oK*e-oK;oQ.dy=C*e-C;oQ.preDx=oK-oK;oQ.preDy=C-C;oZ=oQ.preDx+(oQ.dx-oQ.preDx);oO=oQ.preDy+(oQ.dy-oQ.preDy)+oP;oR.left=oQ.left+oZ+"px";oR.top=oQ.top+oO+"px";oR.width=oR.height=256*e+"px"}if(this._enableCanvas2dMap){var oY=!oX._isIE9?"translate3d(0px, "+oP+"px, 0) scale("+e+")":"translate(0px, "+oP+"px) scale("+e+")";this.touchZoomLabelCanvas.style[oU]=oY}},setZoomFinish:function(){this._animationDiv=null},startAnimation:function(oM){this.prepareLayer();this.hideNonAnimationLayers();var o5=this._map;if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.style.display="none"}oM=oM||{};var o3=oM.zoomCount||0;var oR=oM.fixPosition;var o1=oM.fixMCPosition;var oP=oM.pixOffset;this._zoomCount=o3;var T=o5.getZoom();var o4=T+o3;var e=o5.config.enableContinuousZoom;var oV=0.5;var oQ=5;var C=Math.pow(2,o3);var o7=this._baseLayerDiv;var oS={x:oR.x-parseInt(o7.style.left,10)-o5.offsetX,y:oR.y-parseInt(o7.style.top,10)-o5.offsetY};var oN=this._animationDiv;var oZ=oN.children.length;var o9=this._preZoomTimes;var o2=[];var o0=this._transformStyleName;var oO=this._transformOriginStyleName;for(var oY=oZ-1;oY>-1;oY--){var oW={};var oX=oN.children[oY].style;oW.top=parseInt(oX.top,10);oW.left=parseInt(oX.left,10);var oL=oW.left-oS.x;var oK=oW.top-oS.y;oW.dx=oL*C-oL;oW.dy=oK*C-oK;oW.preDx=oL*o9-oL;oW.preDy=oK*o9-oK;o2[oY]=oW}var o6=this;var oU;var o8;var oT;this._zoomAni=new ij({fps:60,duration:e?500:1,transition:function(i){i=i*oQ/(2*oV);return oQ*i-oV*i*i},render:function(pi){pi=pi*(4*oV)/(oQ*oQ);oU=o9+pi*(C-o9);var pb=T+v(oU);var pg=null;var pf=0;var pj=0;if(oM.onAnimationBeforeLooping){var pk=oM.onAnimationBeforeLooping(pi,pb);pg=pk.loopingCenter;pf=pk.yDiff;pj=pk.totalYDiff}for(var pc=o2.length-1;pc>-1;pc--){var pd=o2[pc];if(oN.children[pc]){var ph=oN.children[pc].style;o8=pd.preDx+(pd.dx-pd.preDx)*pi-oP.width*pi;oT=pd.preDy+(pd.dy-pd.preDy)*pi-oP.height*pi+pf;ph.left=pd.left+o8+"px";ph.top=pd.top+oT+"px";ph.height=ph.width=256*oU+"px"}}var pa=oP.width*pi;var pe=oP.height*pi;if(o5.isRestrict){o6._enableCanvas2dMap&&o6._canvas2dMapMgr.clearLabel()}else{o6._enableCanvas2dMap&&o6._canvas2dMapMgr.drawLabel(oU,oR,T,o4,o3,pi,pa,pe,pj,pf)}o6._preZoomTimes=oU;o6._preRenderTick=pi;oM.onAnimationLooping&&oM.onAnimationLooping(pi,pb,pg)},finish:function(){o6._preZoomTimes=1;o6._zoomAni=null;o6._animationDiv=null;oM.onAnimationFinish&&oM.onAnimationFinish();o6.showNonAnimationLayers()}});return this._zoomAni},stopAnimation:function(){if(this._zoomAni){this._zoomAni.stop();this._zoomAni=null}}});function oH(e){this._initVars(e);this._initColorCanvas();this._bindEvent(e)}hv.extend(oH.prototype,{_initVars:function(e){this._map=e._map;this._canvas2dMapMgr=e;this._labelCtx=e._labelCtx;this.ratio=this._map.config.ratio;this.sizeRatio=this.ratio>1?2:1;this.RANK1=1000000;this.RANK2=2000000;this.RANK3=3000000;this.RANK4=4000000;this.RANK5=5000000},_initColorCanvas:function(){var i=256,C=da("canvas"),e=C.style;e.width=i+"px";e.height=i+"px";C.width=i;C.height=i;this._colorCvsSize=i;this._colorCvs=C;this._colorCtx=C.getContext("2d")},getLabelImageData:function(oW){var oV=oW.textImg;var C=oW.textPos;var oT=this.ratio;var oR=this.sizeRatio/oT;var oK=this._colorCtx;var oO=this._colorCvsSize;oK.clearRect(0,0,oO,oO);var oQ=0;var e=0;var oN=0;for(var oP=0;oP<C.length;oP++){if(C[oP].width>oQ){oQ=C[oP].width;e=oP;oN=C[oP].drawX}}oQ/=oR;var oS=0;for(var oP=0,oM=C.length;oP<oM;oP++){var oU=C[oP];var oX;if(oP===e){oX=0}else{oX=oU.drawX-oN}oK.drawImage(oV,oU.srcX,oU.srcY,oU.width,oU.height,oX,oS,oU.width/oR,oU.height/oR);if(oU.width/oR>oQ){oQ=oU.width/oR}oS+=oU.height/oR+2*oT}var T=oK.getImageData(0,0,oQ,oS);var oL=oK.getImageData(0,0,oQ,oS);return[T,oL]},_bindEvent:function(i){var e=this,C=i._map;C.addEventListener("onspotmouseover",function(oM){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver||this.config.enableIconHighlight===false){return}if(oM.spots.length>0){var oL=oM.spots[0].userdata.uid;var oK=oM.spots[0].userdata.name;var T=e.findLabelByUid(oL,oK);T&&e._toHighLightColor(T)}});C.addEventListener("onspotmouseout",function(oM){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(oM.spots.length>0){var oL=oM.spots[0].userdata.uid;var oK=oM.spots[0].userdata.name;var T=e.findLabelByUid(oL,oK);T&&e._toDefaultColor(T)}});C.addEventListener("onspotclick",function(oM){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(oM.spots&&oM.spots.length>0){var oL=oM.spots[0].userdata.uid;var oK=oM.spots[0].userdata.name;var T=e.findLabelByUid(oL,oK);T&&e._changeBaseMapState(T)}else{e._recoverNormalState()}});C.on("spot_status_reset",function(){e._recoverNormalState()});C.on("spot_highlight",function(oK){var T=e.findLabelByUid(oK.uid);T&&e._changeBaseMapState(T)})},_getTextBound:function(oU){if(!oU.textPos){return null}var oS=this.ratio;var oQ=this.sizeRatio/oS;var C=oU.textPos;var oT=oU.baseDrawX;var oR=oU.baseDrawY;var oO=oT*oS+(C[0].drawX-oT)/oQ;var oM=oR*oS+(C[0].drawY-oR)/oQ;var oK=oO+C[0].width/oQ;var e=oM+C[0].height/oQ;for(var oP=0,oN=C.length;oP<oN;oP++){var oV=C[oP];var oL=oT*oS+(oV.drawX-oT)/oQ;if(oL<oO){oO=oL}var T=oR*oS+(oV.drawY-oR)/oQ;if(T<oM){oM=T}if(oL+oV.width>oK){oK=oL+oV.width}if(T+oV.height>e){e=T+oV.height}}return[oO,oM,oK,e]},_toHighLightColor:function(C){if(C._tempRank&&C._tempRank==this.RANK5){return}var oN=this._getTextBound(C);if(!oN){return}var T=Math.round(oN[0]);var i=Math.round(oN[1]);var e=this.getLabelImageData(C);var oL=e[0];var oK=e[1];var oM=this._canvas2dMapMgr.getFilterImageData(oL,this.RANK5);C._oldImgData=oK;this._labelCtx.putImageData(oM,T,i)},_toDefaultColor:function(e){if(e._tempRank&&e._tempRank==this.RANK5){return}if(e._oldImgData){var i=this.sizeRatio;var C=this._getTextBound(e);if(!C){return}this._labelCtx.putImageData(e._oldImgData,Math.round(C[0]),Math.round(C[1]));e._oldImgData=null}},_changeBaseMapState:function(T){var C=this._canvas2dMapMgr;var i=T.guid;var e=T.guidExt;var oK={guid:i,name:T.name,guidExt:e};C._labelStrategy.setStrategyInfo(oK);C._loadData()},_recoverNormalState:function(){var e=this._canvas2dMapMgr;e._labelStrategy.setStrategyInfo(null);e._loadData()},findLabelByUid:function(oL,T){var oN=this._canvas2dMapMgr,e=oN._computedLabel;for(var oK=0,C=e.length;oK<C;oK++){var oM=e[oK];if(!oN.isClickableLabel(oM)){continue}if(oL&&oM.guid===oL){return oM}if(T&&oM.name===T){return oM}}return null}});function Q(e){this._initVars(e)}hv.extend(Q.prototype,{_initVars:function(e){this._map=e._map;this._canvas2dMapMgr=e;this.ratio=this._map.config.ratio;this._strategyInfo=null;this.RANK1=1000000;this.RANK2=2000000;this.RANK3=3000000;this.RANK4=4000000;this.RANK5=5000000},setStrategyInfo:function(e){this._strategyInfo=e},preComputeLabel:function(oP,pG,pp,o1,pA,pU){var pj=[],oX=oP._centerX,oV=oP._centerY,pV=o1*pA;var pv=this.ratio;var oO=this._map.getZoom();var pe=0;if(oO===5){pe=4}if(oO===8){pe=-6}oP.sort(function(pW,i){if(pW.x*pW.y<i.x*i.y){return -1}else{return 1}});for(var pg=0,pc=oP.length;pg<pc;pg++){var pL=oP[pg],o7=pL.x,o4=pL.y,o2=pL.z;var o9=hz.calcLoopParam(o7,o2).offsetX;var pt=o7*pV,ps=(o4+1)*pV,T=(pt-oX)/o1+pG/2+o9,C=(oV-ps)/o1+pp/2;for(var pd=0,pP=pL.length;pd<pP;pd++){var oR=pL[pd],oY=undefined,oW=undefined,pN=undefined,pM=undefined;var pC=oR.baseDrawX=T+oR.baseX;var pB=oR.baseDrawY=C+oR.baseY;if(oR.type=="fixed"){var pn=oR.iconPos,o0=oR.textPos,pR=oR.textImg;if(pn){pn.drawX=T+pn.destX;pn.drawY=C+pn.destY;oY=pn.drawX;oW=pn.drawY;pN=pn.drawX+pn.width;pM=pn.drawY+pn.height}if(o0&&pR){for(var pD=0;pD<o0.length;pD++){var pQ=o0[pD];pQ.drawX=T+pQ.destX;pQ.drawY=C+pQ.destY;if(!oY){oY=pQ.drawX;oW=pQ.drawY;pN=pQ.drawX+pQ.width;pM=pQ.drawY+pQ.height}else{if(pQ.drawX<oY){oY=pQ.drawX}if(pQ.drawY<oW){oW=pQ.drawY}if(pQ.drawX+pQ.width>pN){pN=pQ.drawX+pQ.width}if(pQ.drawY+pQ.height>pM){pM=pQ.drawY+pQ.height}}}}}else{oR.tileX=T;oR.tileY=C;oY=T+oR.minXOriginal;oW=C+oR.minYOriginal;pN=T+oR.maxXOriginal;pM=C+oR.maxYOriginal}if(oY!=undefined){var pF=pC+(oY-pC)/pv;var pE=pB+(oW-pB)/pv;var ph=pC+(pN-pC)/pv;var pf=pB+(pM-pB)/pv;oR.minX=pF;oR.minY=pE;oR.maxX=ph;oR.maxY=pf;var pJ=(pF+ph)/2,pI=(pE+pf)/2,pq=oX+(pJ-pG/2)*o1,po=oV+(pp/2-pI)*o1;oR.geoX=pq;oR.geoY=po;pj.push(oR)}}}if(pU){for(var pg=0,pc=pU.length;pg<pc;pg++){var pb=pU[pg];var py=pb[0];var oS=pb[1];var pn=py.iconPos;var oM=pn.geoX;var oK=pn.geoY;var pC=(oM-oX)/o1+pG/2;var pB=(oV-oK)/o1+pp/2;var oY=pC+pn.destX;var oW=pB+pn.destY;var pN=oY+pn.width;var pM=oW+pn.height;py.textPos=py.textPos||py._textPos;var o0=py.textPos;var pH=o0[0];var o6=pC+pH.destX;var oU=pB+pH.destY;if(oU<oW){oW=oU}if(o6+pH.width>pN){pN=o6+pH.width}if(oU+pH.height>pM){pM=oU+pH.height}if(o0.length===2){var o5=o0[1];var o3=pC+o5.destX;var oT=pB+o5.destY;if(oT<oW){oW=oT}if(o3+o5.width>pN){pN=o3+o5.width}if(oT+o5.height>pM){pM=oT+o5.height}}py._tempBounds=[oY,oW,pN,pM];var pn=oS.iconPos;var oM=pn.geoX;var oK=pn.geoY;var pC=(oM-oX)/o1+pG/2;var pB=(oV-oK)/o1+pp/2;var oY=pC+pn.destX;var oW=pB+pn.destY;var pN=oY+pn.width;var pM=oW+pn.height;oS.textPos=oS.textPos||oS._textPos;var o0=oS.textPos;var pH=o0[0];var o6=pC+pH.destX;var oU=pB+pH.destY;if(o6<oY){oY=o6}if(oU<oW){oW=oU}if(oU+pH.height>pM){pM=oU+pH.height}if(o0.length===2){var o5=o0[1];var o3=pC+o5.destX;var oT=pB+o5.destY;if(o3<oY){oY=o3}if(oT<oW){oW=oT}if(oT+o5.height>pM){pM=oT+o5.height}}oS._tempBounds=[oY,oW,pN,pM]}for(var pg=0,pc=pU.length;pg<pc;pg++){var pb=pU[pg];var py=pb[0];var oS=pb[1];if(pg===0&&oS.textPos){oS._textPos=oS.textPos;delete oS.textPos}var pK=py;if(!py.textPos&&oS.textPos){pK=oS}var pO=pK._tempBounds;for(pd=pg+1;pd<pc;pd++){var pa=pU[pd];var pk=pa[0];var pT=pa[1];var oZ=0;var pS=pk._tempBounds;if(!(pO[2]<pS[0]||pO[0]>pS[2]||pO[3]<pS[1]||pO[1]>pS[3])){oZ++;if(pk.textPos){pk._textPos=pk.textPos;delete pk.textPos}}var pS=pT._tempBounds;if(!(pO[2]<pS[0]||pO[0]>pS[2]||pO[3]<pS[1]||pO[1]>pS[3])){oZ++;if(pT.textPos){pT._textPos=pT.textPos;delete pT.textPos}}if(oZ>=2){if(pK.textPos){pK._textPos=pK.textPos;delete pK.textPos}}}}for(var pg=0,pc=pU.length;pg<pc;pg++){var pb=pU[pg];var py=pb[0];var oS=pb[1];var pl=py;if(!py.textPos&&oS.textPos){pl=oS}var pn=pl.iconPos;var oM=pn.geoX;var oK=pn.geoY;var pC=pl.baseDrawX=(oM-oX)/o1+pG/2;var pB=pl.baseDrawY=(oV-oK)/o1+pp/2;pn.drawX=pC+pn.destX;pn.drawY=pB+pn.destY;var oY=pn.drawX;var oW=pn.drawY;var pN=pn.drawX+pn.width;var pM=pn.drawY+pn.height;var o0=pl.textPos;if(o0){var pH=o0[0];pH.drawX=pC+pH.destX;pH.drawY=pB+pH.destY;if(pH.drawX<oY){oY=pH.drawX}if(pH.drawY<oW){oW=pH.drawY}if(pH.drawX+pH.width>pN){pN=pH.drawX+pH.width}if(pH.drawY+pH.height>pM){pM=pH.drawY+pH.height}if(o0.length===2){var o5=o0[1];o5.drawX=pC+o5.destX;o5.drawY=pB+o5.destY;if(o5.drawX<oY){oY=o5.drawX}if(o5.drawY<oW){oW=o5.drawY}if(o5.drawX+o5.width>pN){pN=o5.drawX+o5.width}if(o5.drawY+o5.height>pM){pM=o5.drawY+o5.height}}}var pF=pC+(oY-pC)/pv;var pE=pB+(oW-pB)/pv;var ph=pC+(pN-pC)/pv;var pf=pB+(pM-pB)/pv;pl.minX=pF;pl.minY=pE;pl.maxX=ph;pl.maxY=pf;var px=(pF+ph)/2;var pw=(pE+pf)/2;var oN=oX+(px-pG/2)*o1;var oL=oV+(pp/2-pw)*o1;pl.geoX=oN;pl.geoY=oL;pj.push(pl)}}var pz=this._strategyInfo;if(pz){var pi=pz.guid;var pr=pz.name;var o8=pz.guidExt;for(var pg=0,pc=pj.length;pg<pc;pg++){var oQ=pj[pg];delete oQ._tempRank;if(!this._canvas2dMapMgr.isClickableLabel(oQ)||(o8===1&&!oQ.guidExt)){continue}if((pi&&pi===oQ.guid)||(pr&&pr===oQ.name)){oQ._tempRank=this.RANK5}}}else{for(var pg=0,pc=pj.length;pg<pc;pg++){var oQ=pj[pg];if(oQ.type=="line"||!oQ.iconPos){continue}delete oQ._tempRank}}pj.sort(function(pX,pW){var pY=pX._tempRank?pX._tempRank:pX.rank,i=pW._tempRank?pW._tempRank:pW.rank;if(pY===i){return pX.baseX-pW.baseX}return i-pY});for(var pg=0,pc=pj.length;pg<pc;pg++){var pK=pj[pg];pK.isDel=false;pK.isFadeout=false;pK._schedule=0;pK._isIgnore=false;pK.arrIntersectIndex=[];for(pd=pg+1;pd<pc;pd++){var pm=pj[pd];if(!(pK.maxX-pe<pm.minX||pK.minX>pm.maxX-pe||pK.maxY-pe<pm.minY||pK.minY>pm.maxY-pe)){pK.arrIntersectIndex.push(pd)}}}for(var pg=0,pc=pj.length;pg<pc;pg++){var oQ=pj[pg];if(oQ.isDel==false){var e=oQ.arrIntersectIndex;for(var pd=0,pP=e.length;pd<pP;pd++){var pu=pj[e[pd]];pu.isDel=true;if(pu.guidExt===1){pu.isDel=false}}}}return pj}});function am(e){this._map=e;this._initCanvas();this._initVars();this._bindEvent();this._tileType=lA.getInstance("na")}cv.register(function(i){if(i.getRenderType()==="canvas"){var e=i.config.style;if(cv["FeatureStyle"+e]){i.canvas2dMapMgr=new am(i)}else{i.loadMapStyleFiles(function(){i.canvas2dMapMgr=new am(i);i.canvas2dMapMgr._loadData()})}}});hv.extend(am.prototype,{_initCanvas:function(){var oM=this._map,oK=oM.getSize(),T=oK.width,i=oK.height,e=oM.platform,oN=da("canvas"),oL=oN.style;var C=this.ratio=oM.config.ratio;this._width=T;this._height=i;oL.cssText="position: absolute;left:0;top:0;width:"+T+"px;height:"+i+"px;z-index:100;";oN.width=T*C;oN.height=i*C;this._labelCanvas=oN;this._labelCtx=oN.getContext("2d");e.appendChild(oN)},_initVars:function(){var e=oe("ditu","normal");this._udt=e.udt;this._version=e.ver;this._labelDataUrls=gA.B_NORMAL_MAP.vectorTileUrls;this._style=cv["FeatureStyle"+this._map.config.style];this._labelCount=0;this._vectorDrawLib=new kg(this);this._cache={maxNum:500,delNum:50,arrCache:[]};this._computedLabel=null;this._spotData=null;this._labelStrategy=new Q(this);this._labelClick=new oH(this);this._biz=new gN(this);this._map.temp.isPermitSpotOver=true;this.labelStyleParam="pl";if(this._map.getMapTypeId()===j9){this.labelStyleParam="sl"}this.statRequestCount=0;this.statResponseCount=0},_resizeHandler:function(oL){var oN=this,i=oN._map,oK=i.getSize(),C=oK.width,oP=oK.height;var oM=this.ratio;var oQ=this._labelCanvas,T=oQ.style;T.width=C+"px";T.height=oP+"px";oQ.width=C*oM;oQ.height=oP*oM;oN._width=C;oN._height=oP;var oO=true;oN._loadData(oO)},_bindEvent:function(){var e=this,i=e._map;i.addEventListener("load",function(C){e.clearLabel();e._loadData()});i.addEventListener("zoomend",function(C){if(!C.notClearLabel){e.clearLabel()}e._loadData()});i.addEventListener("moveend",function(C){e._loadData()});i.addEventListener("resize",function(C){e._resizeHandler(C)});i.addEventListener("maptypechange",function(C){if(C.mapType===c1){e.hideLabelCanvas()}else{e.showLabelCanvas();if(C.mapType===lg){e.labelStyleParam="pl"}else{if(C.mapType===j9){e.labelStyleParam="sl"}}e._loadData()}});i.addEventListener("streetlayer_show",function(C){if(this.isCanvasMap()){e.showLabelCanvas()}});i.addEventListener("streetlayer_hide",function(C){if(this.isCanvasMap()){e.hideLabelCanvas()}});i.addEventListener("loadbizdata",function(T){var C=T.data;e._biz.proecessBizData(C,function(){e.updateLabel()})});i.addEventListener("unloadbizdata",function(C){e._biz.clearBizData();e.updateLabel()});e.isDrawText=false;setTimeout(function(){if(!e.isDrawText){i.dispatchEvent(new ix("onmapwhitescreen"))}},10000)},getStyle:function(){return this._style},_getZoomUnits:function(e){return Math.pow(2,18-e)},_createCacheForm:function(C,oN,oM,i){var oL=this;var e=oL._cache;var T=e.arrCache;var oO=this._getLabelId(C,oN,oM,i);var oK={id:oO,updateLabelCounter:0};T.push(oK);T[oO]=oK;return oK},_getLabelId:function(i,T,C,e){return"_"+i+"_"+T+"_"+C+"_"+e+"_"+this.labelStyleParam},_getCache:function(i,T,C,e){return this._cache.arrCache[this._getLabelId(i,T,C,e)]},_setCacheValue:function(oK,oX,oV,T,oQ){var oS=this;var e=oS._cache;var oM=e.arrCache;var oO=e.maxNum;var oL=e.delNum;var oW=this._getLabelId(oK,oX,oV,T);var oR=oM[oW];if(oQ){oR.lb=oQ}if(oM.length>oO){var C=oM.splice(0,oL);for(var oP=0,oN=C.length;oP<oN;oP++){var oT=C[oP],oU=oT.id;if(oM[oU].lb){oM[oU].lb=null}oM[oU]=null;delete oM[oU]}C=null}},_loadData:function(oV){var pe=this._map;if(!pe.isCanvasMap()){return}var oO=pe.getCenterIn();var pd=hz.calcLoopCenterPoint(oO);var oN=this._tileType;var oQ=this._width/2;var o2=this._height;var o3=pe.getZoom();var oZ=oN.getDataZoom(o3);var oS=pe.getZoomUnits(o3);var oY=oS*oQ;var pc=pd.lng-oY;var pb=pd.lng+oY;var oW=hz.isAddWidth(pc,pb);oQ=oW?oQ*1.5:oQ;var oX=oN.getTileSize(o3);var oK=oN.getMercatorSize(o3,oZ);var oR=Math.floor(pd.lng/oK);var oT=Math.floor(pd.lat/oK);var oL=[oR,oT,(pd.lng-oR*oK)/oK*oX,(pd.lat-oT*oK)/oK*oX];var o5=oL[0]-Math.ceil((oQ-oL[2])/oX);var o9=oL[1]-Math.ceil((o2/2-oL[3])/oX);var o1=oL[0]+Math.ceil((oQ+oL[2])/oX);var o6=oL[1]+Math.ceil((o2/2+oL[3])/oX);pe.temp.isPermitSpotOver=false;var e=[];for(var o8=o5;o8<o1;o8++){for(var o7=o9;o7<o6;o7++){e.push([o8,o7,oZ]);var o0="id_"+o8+"_"+o7+"_"+o3;e[o0]=true}}e._zoom=oZ;e=hz.calcLoopTiles(e,o3);e.sort((function(i){return function(pg,ph){return((0.4*Math.abs(pg[0]-i[0])+0.6*Math.abs(pg[1]-i[1]))-(0.4*Math.abs(ph[0]-i[0])+0.6*Math.abs(ph[1]-i[1])))}})([oL[0],oL[1]]));var oU=this._cache.arrCache;this._curViewLabels=[];var T="viewKey_"+Math.floor(oO.lng)+"_"+Math.floor(oO.lat)+"_"+o3;this.statRequestCount=0;this.statResponseCount=0;this._labelCount+=e.length;var oP=o3;for(var o8=0,o4=e.length;o8<o4;o8++){var oR=e[o8][0];var oT=e[o8][1];var C=e[o8][2];var oM=this._getLabelId(oR,oT,C,oP);var pa=oU[oM];if(!pa){pa=this._createCacheForm(oR,oT,C,oP)}if(typeof pa.lb==="undefined"){pa.lb=null;this._loadLabelData(oR,oT,C,oP,oX,T);this.statRequestCount++}else{if(pa.lb){this._curViewLabels.push(pa.lb);this._labelCount--}else{if(oV){this._loadLabelData(oR,oT,C,oP,oX,T)}pa.updateLabelCounter++}}}if(this._labelCount===0){this.updateLabel()}var pf=this;if(pf.errorTimer){clearTimeout(pf.errorTimer)}pf.errorTimer=setTimeout(function(){if(pf._labelCount!==0){pf._labelCount=0;pf.updateLabel()}var ph=new ix("onloaddatatimeout");var pi=0;var pg=0;var pj=0;var i=0;if(pf.statRequestCount===pf.statResponseCount){pi=1}else{pg=1}if(pg===1){i=pf.statRequestCount-pf.statResponseCount;pj=pf.statResponseCount}ph.noTimeoutCount=pi;ph.timeoutCount=pg;ph.timeoutNoLoaded=i;ph.timeoutLoaded=pj;pf._map.dispatchEvent(ph)},500)},clearLabel:function(){var e=this._width;var C=this._height;var i=this.ratio;this._labelCtx.clearRect(0,0,e*i,C*i)},updateLabel:function(){var i=this._map;var e=i.getCenterIn();var T=this._width;var oM=this._height;var oP=i.getZoom();var oO=this._tileType.getTileSize(oP);var oN=this._getZoomUnits(oP);var C=this._labelCtx;this._labelCanvas.style.left=-i.offsetX+"px";this._labelCanvas.style.top=-i.offsetY+"px";var oL=this._curViewLabels;oL._centerX=e.lng;oL._centerY=e.lat;var oK=this._biz.bizLabels;this._computedLabel=this._labelStrategy.preComputeLabel(oL,T,oM,oN,oO,oK);this._computedLabel._zoom=oP;this.clearLabel();this._vectorDrawLib.drawIconAndText(C,this._computedLabel,oP);this._addSpotData();i.temp.isPermitSpotOver=true;if(oL.length>0){this.isDrawText=true}},_loadLabelData:function(oS,oR,oQ,C,oT,e){var oL=oS.toString();var T=oR.toString();var oN="cbk_"+oL.replace("-","_")+"_"+T.replace("-","__")+"_"+Math.floor(oQ);var oX=h6+"."+oN;var oW=this._labelDataUrls;var oP=Math.abs(oS+oR)%oW.length;var o2=oW[oP];if(window.offLineIPAddress){o2=window.offLineIPAddress+"pvd/"}var i=this.labelStyleParam;var oV="?qt=vtile";var oY="";if(this._map.config.style!=="default"){oY="&styleId=1"}var oU="x={x}&y={y}&z={z}&udt={udt}&v={v}&styles={styles}"+oY+"&textonly=1&textimg=1&scaler={scaler}&fn="+encodeURIComponent(oX);var oZ=hz.calcLoopParam(oS,oQ).col;var oO=this.ratio>1?2:1;var oM=oU.replace(/{x}/,oZ).replace(/{y}/,oR).replace(/{z}/,Math.floor(oQ)).replace(/{styles}/,i).replace(/{udt}/,this._udt).replace(/{v}/,this._version).replace(/{scaler}/,oO);var oK=o2+oV+"&param="+window.encodeURIComponent(hq(oM));var o1=this;var o0=o1._map;cv[oN]=function(o3){o1._vectorDrawLib.parseLabelData(o3,oS,oR,oQ,C,oT,function(o8){var o5=o0.getCenterIn();var o9=o0.getZoom();var pb="viewKey_"+Math.floor(o5.lng)+"_"+Math.floor(o5.lat)+"_"+o9;o1._labelCount--;var pc=o1._getCache(oS,oR,oQ,C).updateLabelCounter;o1._labelCount-=pc;var o6=o1._curViewLabels;if(pb===e||(o1._labelCount<0&&o9===oQ)){o6.push(o8)}if(pb===e){o1.statResponseCount++}if(o1._labelCount<=0){var o4=(new Date()).getTime();o1.updateLabel();var o7=(new Date()).getTime();var pa=new ix("oncanvasmaploaded");pa.drawTime=o7-o4;if(o1.statResponseCount===o1.statRequestCount){pa.isAllLoadedDrawing=true}o0.dispatchEvent(pa)}o1._setCacheValue(oS,oR,oQ,C,o8);delete cv[oN]})};jW.load(oK)},drawLabel:function(C,T,oQ,i,oO,oK,e,oL,oP,oM){var oN=this;if(!oN._computedLabel){return}if(oN._computedLabel._zoom!==oQ){oN.clearLabel();return}oN._map.temp.isPermitSpotOver=false;oN.clearLabel();oN._vectorDrawLib.zoomingIconAndText(this._labelCtx,oN._computedLabel,C,T,i,oO,oK,e,oL,oP,oM)},_addSpotData:function(){this._spotData=[];var oQ=this._map.getZoom();for(var oL=0,oK=this._computedLabel.length;oL<oK;oL++){var oN=this._computedLabel[oL];if(!this.isClickableLabel(oN)||(oN.guidExt===1&&oN.startScale>oQ)){continue}var oM=[];oM[0]=(oN.minX-oN.maxX)/2;oM[1]=(oN.minY-oN.maxY)/2;oM[2]=(oN.maxX-oN.minX)/2;oM[3]=(oN.maxY-oN.minY)/2;var T=null;if(oN.iconPos){T=new d9(oN.iconPos.geoX,oN.iconPos.geoY)}var C=oN.name?oN.name.replace("\\\\","<br>"):"";if(oN.iconPos&&oN.iconPos.iconType.indexOf("ditie")>-1&&this._map.getZoom()>14){C=""}var oP={n:C,pt:new d9(oN.geoX,oN.geoY),userdata:{iconPoint:T,uid:oN.guid,name:C,type:oN.iconPos?oN.iconPos.iconType:"",iconImg:oN.iconImg,mapPoi:true,adver_log:oN.adver_log||""},bd:oM,tag:"MAP_SPOT_INFO"};this._spotData.push(oP)}var oO=new ix("onspotsdataready");oO.spots=this._spotData;this._map._spotDataOnCanvas=this._spotData;this._map.dispatchEvent(oO)},isClickableLabel:function(e){if(e.isDel||(!e.guid&&!e.name)){return false}return true},getFilterImageData:function(C,oM){if(this._map&&this._map.config.enableIconHighlight===false){return C}var oN=C.data,oL=this._labelStrategy,oM=parseInt(oM);for(var oO=0,oK=oN.length;oO<oK;oO+=4){var e=oN[oO],oP=oN[oO+1],oQ=oN[oO+2],oR=oN[oO+3];if(oR===0){continue}var T=Math.round((e+oP+oQ)/3);var oS=T-90;oS=oS<0?0:oS;if(oM===oL.RANK5){oN[oO]=51+oS*1.3;oN[oO+1]=133+oS*0.8;oN[oO+2]=255}}return C},showLabelCanvas:function(){this._labelCanvas.style.visibility=""},hideLabelCanvas:function(){this._labelCanvas.style.visibility="hidden"}});var by=5;var m4=4;var jD=3;var aa=2;var gM=1;var kR=0;var oI=3;var l6=5;var hT={3:{start:3,base:3},4:{start:4,base:5},5:{start:4,base:5},6:{start:6,base:7},7:{start:6,base:7},8:{start:8,base:9},9:{start:8,base:9},10:{start:10,base:10},11:{start:11,base:12},12:{start:11,base:12},13:{start:11,base:12},14:{start:14,base:15},15:{start:14,base:15},16:{start:16,base:17},17:{start:16,base:17},18:{start:18,base:19},19:{start:18,base:19},20:{start:18,base:19},21:{start:18,base:19}};function kg(T){this._canvas2dMapMgr=T;var i=this.ratio=T._map.config.ratio;this._featureStyle=null;this._map=T._map;var C=cw();var e="udt="+C.udt+"&v="+C.ver;this.sizeRatio=this.ratio>1?2:1;this._binaryCache={};this._iconCache={};this._initColorCanvas()}hv.extend(kg.prototype,{_initColorCanvas:function(){var i=256,C=da("canvas"),e=C.style;e.width=i+"px";e.height=i+"px";C.width=i;C.height=i;this._colorCvs=C;this._colorCtx=C.getContext("2d")},parseLabelData:function(i,oL,oK,T,e,oO,oN){if(!this._featureStyle){this._featureStyle=this._canvas2dMapMgr.getStyle()}if(!i||!i[0]){oN([]);return}var oM=this._map.getZoomUnits();var C=this;this.loadTextPng(i,oO,oL,oK,T,e,oM,oN)},loadTextPng:function(o0,oR,oP,oO,oM,i,oK,T){var oZ=this;var e=o0[5];var oY=this._map;var oV=oY.getZoom();var C=oY.getSize();var oW=C.width;var oU=C.height;var oX=oY.getCenterIn();var oN=oX.lng;var oL=oX.lat;var oT=oP*oR*oK;var oS=(oO+1)*oR*oK;if(e){var oQ=new Image();oQ.onload=function(){oZ.calcIconAndTextInfo(o0,oQ,oR,oP,oO,oM,i,oK,oT,oS,T);delete this.onload};oQ.src=e}else{setTimeout(function(){oZ.calcIconAndTextInfo(o0,null,oR,oP,oO,oM,i,oK,oT,oS,T)},1)}},calcIconAndTextInfo:function(o2,oT,oU,oS,oP,oN,T,oL,oW,oV,oK){var o1=this;var o0=o1._featureStyle;var oQ=[];oQ.x=oS;oQ.y=oP;oQ.z=oN;var oR=o1._canvas2dMapMgr,C=oS*oL*oU,oZ=(oP+1)*oL*oU,oM={tileLeft:C,tileTop:oZ,zoomUnits:oL};var e=[];if(o2[0]){for(var oX=0;oX<o2[0].length;oX++){if(o2[0][oX][0]===oI){e.push(o2[0][oX])}}}var oO=o2[2]||[];for(var oX=0;oX<e.length;oX++){this._getFixedLabelInfo(e[oX],oT,T,oL,oU,oW,oV,oQ)}var oY=Math.pow(2,T-oN);for(oX=0;oX<oO.length;oX++){this._getLineLabelInfo(oO[oX],oT,oN,T,oL,oU,oW,oV,oY,oQ)}oK(oQ)},_getFixedLabelInfo:function(oT,oX,oK,oO,oY,o1,o0,o3){var oS=oT[1];if(!oS){return}var o5=this._map.getZoom();var pd=this._map.config.style;var pe=this._featureStyle;var oP=oK;if(oP===9){oP=8}for(var pa=0;pa<oS.length;pa++){var pf=oS[pa];var e=pf[0];var T=bJ.getStyleFromCache(pd,e,"point",oP,pe);var o9=bJ.getStyleFromCache(pd,e,"pointText",oP,pe);if((!o9||o9.length===0)&&(!T||T.length===0)){if(oP===5){var oN=pf[1];if(!oN){continue}for(var o6=0;o6<oN.length;o6++){var o4=oN[o6][4];if(o4&&o4[7]==="鍖椾含"){T=bJ.getStyleFromCache(pd,e,"point",6,pe);o9=bJ.getStyleFromCache(pd,e,"pointText",6,pe);break}else{continue}}}else{continue}}var oN=pf[1];if(!oN){continue}var pb=null;var oQ=1;var C=0;var oW=0;if(T&&T[0]){T=T[0];pb=T.icon;oQ=T.zoom?T.zoom/100:1}else{T=null}for(var o6=0;o6<oN.length;o6++){var o4=oN[o6][4];if(!o4){continue}var o8=o4[2];if(!this._isVisible(o8,o5)){continue}var oR=o4[12];if(o9&&o9.length>0&&!oR){continue}var oV=Math.round(o4[0]/100);var oU=Math.round(o4[1]/100);var o7={lng:o1+oV,lat:o0-(oY*oO-oU)};var oM=oV/oO;var oL=oY-oU/oO;var oZ=o4[7]||"";var pc=o4[5];var o2={type:"fixed",name:oZ,textImg:oX,rank:o4[4],baseX:oM,baseY:oL,iconPos:null,textPos:null,guid:o4[3]||"",tracer:o8,direction:pc,startScale:3};if((pc!==m4&&oR||!oR)&&pb!==null){o2.iconPos=this._getIconPosition(pb,oQ,oM,oL,o7);if(o2.iconPos){C=o2.iconPos.width;oW=o2.iconPos.height}}if(C===0){o2.direction=m4}if(oR){o2.textPos=this._getTextDrawData(o4,oM,oL,C,oW)}if(o2.textPos||o2.iconPos){o3.push(o2)}}}},_isVisible:function(e,i){var T;if(!this._binaryCache[e]){T=e.toString(2);if(T.length<8){T=new Array(8-T.length+1).join("0")+T}this._binaryCache[e]=T}T=this._binaryCache[e];var C=hT[i].start;return T[i-C]==="1"},_getIconPosition:function(oN,oL,C,i,e){var T=this._map.config.style;var oO=cv["iconSetInfo"+T][oN];if(!oO){if(oN.charCodeAt(0)>=48&&oN.charCodeAt(0)<=57){oO=cv["iconSetInfo"+T]["_"+oN]}}if(!oO){return null}var oK=oO[0];var oM=oO[1];oK=oK*oL;oM=oM*oL;return{srcX:0,srcY:0,destX:C-oK/2,destY:i-oM/2,width:oK,height:oM,geoX:e.lng,geoY:e.lat,mcPt:e,iconType:oN}},_getTextDrawData:function(oU,oT,oS,T,oQ){var oZ=oU[5];if(typeof oZ!=="number"){oZ=0}var oO=this.ratio;var oN=oO/2;T*=oN;oQ*=oN;var oP=oU[12];var oK=oP.length;var o2=0;var o1=0;var oY=[];var oX=0;var o0=0;for(var oW=0;oW<oK;oW++){o0+=Math.round(oP[oW][3])}for(var oW=0;oW<oK;oW++){var oM=oP[oW];var oL=oM[0];var i=oM[1];var C=oM[2];var e=oM[3];var o3=2*oO;var oV=0;if(T!==0){oV=2*oO}if(T===0){oZ=m4}switch(oZ){case jD:var oR=oS-o0/2-o3*(oK-1)/2;o2=oT-C-T/2-oV;o1=oR+oX+o3*oW;break;case gM:var oR=oS-o0/2-o3*(oK-1)/2;o2=oT+T/2+oV;o1=oR+oX+o3*oW;break;case aa:var oR=oS-oQ/2-o0-o3*(oK-1)-o3;o2=oT-C/2;o1=oR+oX+o3*oW;break;case kR:var oR=oS+oQ/2+o3/2;o2=oT-C/2;o1=oR+oX+o3*oW;break;case m4:var oR=oS-e/2-o3*(oK-1)/2;o2=oT-C/2;o1=oR+oX+o3*oW;break}oX+=e;if(C>0&&e>0){oY.push({srcX:oL,srcY:i,destX:o2,destY:o1,width:C,height:e})}}if(oY.length>0){return oY}return null},_getLineLabelInfo:function(oR,T,oK,o6,pj,oY,o4,o3,o5,oX){if(oR.length!==10){return}var o8=this.ratio;var C=this.ratio;var pf=oR[7].length;var oZ=oR[1];var ph=oR[3];var pn=oR[8];var oN=oR[4];var e=2;var oL=oN.slice(0,e);for(var pk=e;pk<oN.length;pk+=e){oL[pk]=oL[pk-e]+oN[pk];oL[pk+1]=oL[pk-(e-1)]+oN[pk+1]}for(var pk=e;pk<oN.length;pk+=e){if(pk%(ph*e)===0||pk%(ph*e)===1){continue}oL[pk]=oL[pk-e]+oN[pk]/o5;oL[pk+1]=oL[pk-(e-1)]+oN[pk+1]/o5}for(var pm=0;pm<pf;pm++){var pi=oR[7][pm];if(!this._isVisible(pi,o6)){continue}var pa=oR[6][pm];var oW=pm*ph*e;oN=oL.slice(oW,oW+ph*e);var o0=[];var o9=undefined;var o7=undefined;var oV=undefined;var oU=undefined;var pn=oR[9].slice(0);if(pa){pn.reverse()}var pd;var pb;for(var pl=0;pl<ph;pl++){var oT=oR[5][ph*pm+pl];var pe=oN[pl*e]/100;var pc=oN[pl*e+1]/100;var oS=pn[pl];var oO=oS[0];var oQ=oS[1];var oM=oS[2];var oP=oS[3];var o2;var o1;var pp;var po;if(pl===0){pd=pp=pe/pj;pb=oY-pc/pj;po=pc/pj}else{pp=pe/pj;po=pc/pj}var pr=pd+(pp-pd)*C-oM/2;var pq=pb+(oY-po-pb)*C-oP/2;if(o9===undefined){o9=pd-oM/2;o7=pb-oP/2;oV=o9+oM;oU=o7+oP}else{if(pr<o9){o9=pr}if(pq<o7){o7=pq}if(pr+oM>oV){oV=pr+oM}if(pq+oP>oU){oU=pq+oP}}o0.push({angle:oT,srcX:oO,srcY:oQ,destX:pr,destY:pq,width:oM,height:oP})}var pg={type:"line",textImg:T,rank:oZ,baseX:pd,baseY:pb,arrWordPos:o0,minXOriginal:o9,minYOriginal:o7,maxXOriginal:oV,maxYOriginal:oU,text:""};oX.push(pg)}},alterColor:function(oM,e,oL){var C=this._colorCtx,i=this._canvas2dMapMgr;C.clearRect(0,0,oM.width,oM.height);C.drawImage(e,oM.srcX,oM.srcY,oM.width,oM.height,0,0,oM.width,oM.height);var oK=C.getImageData(0,0,oM.width,oM.height),T=i.getFilterImageData(oK,oL);C.putImageData(T,0,0)},drawIconAndText:function(oY,oX,e){var oP=this.ratio;var oN=this.sizeRatio/oP;var oR=2/oP;var o9=this;for(var o1=0,oZ=oX.length;o1<oZ;o1++){var oQ=oX[o1];if(oQ.isDel==false){var oK=oQ.baseDrawX;var T=oQ.baseDrawY;if(oQ.type=="fixed"){var oM=oQ.iconPos,o2=oQ.textPos,oV=oQ.textImg,o5=oQ.startScale;if(oM&&o5<=e){var C=this._iconCache[oM.iconType];if(C){if(C.img){oY.drawImage(C.img,0,0,C.img.width,C.img.height,Math.round(oK*oP+(oM.drawX-oK)/oR),Math.round(T*oP+(oM.drawY-T)/oR),oM.width/oR,oM.height/oR)}else{C.drawLabels.push(oQ)}}else{if(!C){this._iconCache[oM.iconType]={img:null,drawLabels:[oQ]};var pb=new Image();pb._iconName=oM.iconType;pb.onload=function(){var ph=o9._iconCache[this._iconName];ph.img=this;this.onload=null;for(var pd=0;pd<ph.drawLabels.length;pd++){var pf=ph.drawLabels[pd];var pe=pf.baseDrawX;var pc=pf.baseDrawY;var pg=pf.iconPos;oY.drawImage(this,0,0,this.width,this.height,Math.round(pe*oP+(pg.drawX-pe)/oR),Math.round(pc*oP+(pg.drawY-pc)/oR),pg.width/oR,pg.height/oR)}ph.drawPos=[]};pb.src=K.getIconSetPath(o9._map.config.style)+oM.iconType+".png"}}}if(o2&&oV&&o5<=e){for(var oO=0;oO<o2.length;oO++){var oW=o2[oO];if(!oQ._tempRank){oY.drawImage(oV,oW.srcX,oW.srcY,oW.width,oW.height,Math.round(oK*oP+(oW.drawX-oK)/oN),Math.round(T*oP+(oW.drawY-T)/oN),oW.width/oN,oW.height/oN)}else{this.alterColor(oW,oV,oQ._tempRank);oY.drawImage(this._colorCvs,0,0,oW.width,oW.height,Math.round(oK*oP+(oW.drawX-oK)/oN),Math.round(T*oP+(oW.drawY-T)/oN),oW.width/oN,oW.height/oN)}}}}else{var oL=oQ.arrWordPos,oV=oQ.textImg,oU=oQ.tileX,oS=oQ.tileY;for(var o0=0,oT=oL.length;o0<oT;o0++){var o3=oL[o0];var pa=Math.round(oU+o3.destX);var o8=Math.round(oS+o3.destY);var o4=o3.angle;pa=oK*oP+pa-oK;o8=T*oP+o8-T;if(o4>10&&o4<350){oY.save();var o7=Math.round(pa+o3.width/2);var o6=Math.round(o8+o3.height/2);oY.translate(o7,o6);oY.rotate(-o4/180*Math.PI);oY.drawImage(oV,o3.srcX,o3.srcY,o3.width,o3.height,-Math.round(o3.width/2),-Math.round(o3.height/2),o3.width/oN,o3.height/oN);oY.restore()}else{oY.drawImage(oV,o3.srcX,o3.srcY,o3.width,o3.height,pa,o8,o3.width/oN,o3.height/oN)}}}}}},isCollide:function(oL,oU,oT,e,oN,C,oP){for(var oK=0,T=C.length;oK<T;oK++){var oO=C[oK],oM=1/Math.pow(2,oP+1),oS=oM*oO[3]/2,oR=oM*oO[4]/2,oQ=oO[0];if(oQ!=oL){if(!(oU+e<oO[1]-oS||oU>oO[1]+oO[3]+oS||oT+oN<oO[2]-oR||oT>oO[2]+oO[4]+oR)){return true}}}return false},zoomingIconAndText:function(o9,o3,T,o7,o8,pA,pg,oR,pm,pf,o0){var pB=this.ratio;var oS=this.sizeRatio/pB;var pC=2/pB;var pM=pB/2;var pw=o7.x;var pv=o7.y;var pa=2*pB;if(o0!==0){pv+=pf}var oV=undefined,oO=undefined,oL=undefined,oQ=undefined,oZ=undefined;var pl=pA>0?true:false;if(!pl){oV=[];var pp=1-pg}for(var pI=0,pG=o3.length;pI<pG;pI++){var pD=o3[pI];if(pD.isDel==false){var pN=pD.baseDrawX;var pK=pD.baseDrawY;o9.save();o9.translate(-oR*pB,-pm*pB);if(pD.isFadeout){if(!pl&&pD._schedule<=pg&&!pD._isIgnore){o9.globalAlpha=pp;pD._schedule=pg}else{pD._isIgnore=true;continue}}if(pD.type=="fixed"){var pb=pD.iconPos,pi=pD.textPos,oM=pD.textImg,pc=pD.startScale;var C;var pt=0;if(pb){pt=pa}if(pb&&!pD.iconImg&&this._iconCache[pb.iconType]){C=this._iconCache[pb.iconType].img}if(pb&&pc<=o8&&C){oQ=pb.width;oZ=pb.height;oO=(pw+(pN-pw)*T)*pB-oQ/2/pC;oL=(pv+(pK-pv)*T)*pB-oZ/2/pC+o0;if(!pl&&this.isCollide(pI,oO,oL,oQ,oZ,oV,pA)){pD.isFadeout=true}o9.drawImage(C,pb.srcX,pb.srcY,C.width,C.height,Math.round(oO),Math.round(oL),oQ/pC,oZ/pC);!pl&&oV.push([pI,oO,oL,oQ,oZ])}if(pi&&oM&&pc<=o8){var ph;var pj;var o2=0;var pe=0;if(pb){o2=pb.width;pe=pb.height}var pu=pi.length;var oU=0;var pk=0;for(var o4=0;o4<pu;o4++){var pF=pi[o4];pk+=pF.height;if(oU<pF.width){oU=pF.width}}pk+=(o4-1)*pa;if(!pl&&this.isCollide(pI,oO,oL,oU,pk,oV,pA)){pD.isFadeout=true}var pE=0;for(var o4=0;o4<pu;o4++){var pF=pi[o4];switch(pD.direction){case jD:ph=-(o2/2/pC+pF.width+pt);pj=-pk/2+pE+pa*o4;break;case gM:ph=o2/2/pC+pt;pj=-pk/2+pE+pa*o4;break;case aa:ph=-pF.width/2;pj=-pe/2/pC-pk+pE-pa*(o4+1);break;case kR:ph=-pF.width/2;pj=pe/2/pC+pE+pa*(o4+1);break;case m4:ph=-pF.width/2;pj=-pk/2+pE+pa*o4;break}pE+=pF.height;oO=(pw+(pN-pw)*T)*pB+ph/oS;oL=(pv+(pK-pv)*T)*pB+pj/oS;+o0;oQ=pF.width;oZ=pF.height;if(!pD._tempRank){o9.drawImage(oM,pF.srcX,pF.srcY,oQ,oZ,Math.round(oO),Math.round(oL),oQ/oS,oZ/oS)}else{this.alterColor(pF,oM,pD._tempRank);o9.drawImage(this._colorCvs,0,0,oQ,oZ,Math.round(oO),Math.round(oL),oQ/oS,oZ/oS)}!pl&&oV.push([pI,oO,oL,oQ,oZ])}}}else{var o1=pD.arrWordPos,oM=pD.textImg,pL=pD.tileX,pJ=pD.tileY;var oT=o1[0];var oP=Math.round(pL+oT.destX);var oN=Math.round(pJ+oT.destY);for(var pH=0,ps=o1.length;pH<ps;pH++){var pz=o1[pH];var pP=Math.round(pL+pz.destX);var pO=Math.round(pJ+pz.destY);var o6=pz.angle;var pr=Math.round((pw+(pN-pw)*T)*pB-oT.width/2+pP-oP);var pq=Math.round((pv+(pK-pv)*T)*pB-oT.height/2+pO-oN);oO=pr;oL=pq;oQ=pz.width;oZ=pz.height;if(!pl&&this.isCollide(pI,oO,oL,oQ,oZ,oV,pA)){pD.isFadeout=true}if(o6>10&&o6<350){var py=pr+pz.width/2;var px=pq+pz.height/2;var oK=o6/180*Math.PI;var pd=Math.cos(oK);var oW=Math.sin(oK);var po=pd;var oX=pd;var pn=oW;var oY=-oW;var o5=py-py*pd-px*oW;var e=px+py*oW-px*pd;o9.save();o9.transform(po,oY,pn,oX,o5,e);o9.drawImage(oM,pz.srcX,pz.srcY,oQ,oZ,oO,oL,oQ/oS,oZ/oS);o9.restore()}else{o9.drawImage(oM,pz.srcX,pz.srcY,oQ,oZ,oO,oL,oQ/oS,oZ/oS)}!pl&&oV.push([pI,oO,oL,oQ,oZ])}}o9.restore()}}}});function gN(e){this.initVars(e)}hv.extend(gN.prototype,{initVars:function(e){this._map=e._map;this._canvas2dMapMgr=e;this.base64Prefix="data:image/png;base64,";this.bizData=null;this.objTextsPng=null;this.arrIconsPng=null;this.bizLabels=null},proecessBizData:function(oL,oP){var oN=this;this.bizData=oL;this.objTextsPng=null;this.arrIconsPng=null;var C=oL.textsPng;var oR=oL.iconsPng;if(!C||!oR){return}var oO=new Image();oO.onload=function(){oN.objTextsPng=this;oN.calcIconAndTextInfo(oP);this.onload=null};oO.src=this.base64Prefix+C;var oQ=oR.length;var e=[];for(var oK=0;oK<oQ;oK++){var oM=oR[oK];var T=new Image();(function(i){T.onload=function(){oQ--;e[i]=this;if(oQ===0){oN.arrIconsPng=e;oN.calcIconAndTextInfo(oP)}this.onload=null}})(oK);T.src=this.base64Prefix+oM}},calcIconAndTextInfo:function(oS){if(this.objTextsPng&&this.arrIconsPng){var oO=this.bizData;var oM=oO.pois;var e=[];for(var oP=0,oL=oM.length;oP<oL;oP++){var T=oM[oP];var oN=this.arrIconsPng[T.iconPng];var oK=oN.height/2;var oR={type:"fixed",name:"",textImg:this.objTextsPng,iconImg:oN,rank:T.rank,iconPos:{srcX:0,srcY:0,destX:-oN.width/2,destY:-oK/2,width:oN.width,height:oK,geoX:T.x,geoY:T.y,iconType:"vectorCustom"},textPos:this.calcTextPos(T.pos,oN),startScale:T.from<12?12:T.from,guid:T.guid,guidExt:1,adver_log:T.adver_log||""};var C={type:"fixed",textDirLeft:"left",name:"",textImg:this.objTextsPng,iconImg:oN,rank:T.rank,iconPos:{srcX:0,srcY:0,destX:-oN.width/2,destY:-oK/2,width:oN.width,height:oK,geoX:T.x,geoY:T.y,iconType:"vectorCustom"},textPos:this.calcTextPosLeft(T.pos,oN),startScale:T.from<12?12:T.from,guid:T.guid,guidExt:1,adver_log:T.adver_log||""};var oQ=[oR,C];e.push(oQ)}this.bizLabels=e;oS&&oS()}},calcTextPos:function(oM,C){var i=[];var oL=oM.length/4;var oK=C.width/2;if(oL===1){var T={srcX:oM[0],srcY:oM[1],destX:oK,destY:-oM[3]/2,width:oM[2],height:oM[3]};i.push(T)}else{var T={srcX:oM[0],srcY:oM[1],destX:oK,destY:-oM[3],width:oM[2],height:oM[3]};var e={srcX:oM[4],srcY:oM[5],destX:oK,destY:0,width:oM[6],height:oM[7]};i.push(T);i.push(e)}return i},calcTextPosLeft:function(oM,C){var i=[];var oL=oM.length/4;var oK=C.width/2;if(oL===1){var T={srcX:oM[0],srcY:oM[1],destX:-oK-oM[2],destY:-oM[3]/2,width:oM[2],height:oM[3]};i.push(T)}else{var T={srcX:oM[0],srcY:oM[1],destX:-oK-oM[2],destY:-oM[3],width:oM[2],height:oM[3]};var e={srcX:oM[4],srcY:oM[5],destX:-oK-oM[2],destY:0,width:oM[6],height:oM[7]};i.push(T);i.push(e)}return i},clearBizData:function(){this.bizData=null;this.bizLabels=null}});var nM={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};var lF={Int8:1,Uint8:1,Int16:2,Uint16:2,Uint32:4,Float32:4};function H(T,oL,C,oK){this.arrayBuffer=T;this.attributes=oL.members;this.bytesPerElement=0;if(this.attributes){for(var e=0;e<this.attributes.length;e++){this.bytesPerElement+=lF[this.attributes[e].type]*this.attributes[e].components}}else{this.bytesPerElement=T.BYTES_PER_ELEMENT*oL.components}this.length=oK||T.byteLength/this.bytesPerElement;this.type=C;this.arrayType=oL}H.prototype.bind=function(i){var e=i[this.type];if(!this.buffer){this.buffer=i.createBuffer();i.bindBuffer(e,this.buffer);i.bufferData(e,this.arrayBuffer,i.STATIC_DRAW);this.arrayBuffer=null}else{i.bindBuffer(e,this.buffer)}};H.prototype.setVertexAttribPointers=function(T,e){for(var i=0;i<this.attributes.length;i++){var oK=this.attributes[i];var C=e.attributes[oK.name];T.vertexAttribPointer(C,oK.components,T[nM[oK.type]],oK.normalize,this.bytesPerElement,oK.offset)}};H.prototype.updateVertexData=function(T,i,C){this.arrayBuffer=i;if(!this.buffer){return this.bind(T)}if(C<=this.length){var e=T[this.type];T.bindBuffer(e,this.buffer);T.bufferData(e,this.arrayBuffer,T.STATIC_DRAW)}else{this.destroy(T);this.bind(T)}this.length=C};H.prototype.destroy=function(e){if(this.buffer){e.deleteBuffer(this.buffer);this.buffer=null}};H.BufferType={VERTEX:"ARRAY_BUFFER",ELEMENT:"ELEMENT_ARRAY_BUFFER"};H.ELEMENT_ATTRIBUTE_TYPE="Uint16";H.VERTEX_ATTRIBUTE_ALIGNMENT=4;function fO(){this.boundProgram=null;this.boundVertexBuffer=null;this.boundElementBuffer=null;this.vao=null}fO.prototype.bind=function(oN,e,T,oM){var oK=oN.extVertexArrayObject;if(oK===undefined){oK=oN.extVertexArrayObject=oN.getExtension("OES_vertex_array_object")}if(oK){if(!this.vao){this.vao=oK.createVertexArrayOES()}oK.bindVertexArrayOES(this.vao)}else{}if(!this.boundProgram){var oO=oK?0:(oN.currentNumAttributes||0);var oL=e.numAttributes;var C;for(C=oO;C<oL;C++){oN.enableVertexAttribArray(C)}if(!oK){for(C=oL;C<oO;C++){oN.disableVertexAttribArray(C)}oN.currentNumAttributes=oL}T.bind(oN);T.setVertexAttribPointers(oN,e);if(oM){oM.bind(oN)}if(oK){this.boundProgram=e;this.boundVertexBuffer=T;this.boundElementBuffer=oM}}};fO.prototype.update=function(oN,T,C,oM,e,i,oL){var oK=oN.extVertexArrayObject;if(oK===undefined){oK=oN.extVertexArrayObject=oN.getExtension("OES_vertex_array_object")}if(oK){oK.bindVertexArrayOES(this.vao);if(this.boundVertexBuffer){this.boundVertexBuffer.updateVertexData(oN,C,oM);this.boundVertexBuffer.setVertexAttribPointers(oN,this.boundProgram)}if(e&&this.boundElementBuffer){this.boundElementBuffer.updateVertexData(oN,i,oL)}}else{T.updateVertexData(oN,C,oM);if(e){e.updateVertexData(oN,i,oL)}}};fO.prototype.unbind=function(i){var e=i.extVertexArrayObject;if(e){e.bindVertexArrayOES(null);this.boundProgram=null;this.boundVertexBuffer=null;this.boundElementBuffer=null}};fO.prototype.destroy=function(i){var e=i.extVertexArrayObject;if(e&&this.vao){e.deleteVertexArrayOES(this.vao);this.vao=null;this.boundProgram=null;this.boundVertexBuffer=null;this.boundElementBuffer=null}};function M(){}hv.extend(M.prototype,{centerAndZoomIn:function(C,oQ,oR){oR=oR||{};if(!this.loaded){this.firstTileLoad=false}oQ=this._getProperZoom(oQ).zoom;if(oR.noAnimation!==true&&this.loaded){var oL=this._ifUseAnimation(C,oQ);if(oL){this.flyToIn(C,oQ,oR);return}}var oN=this;if(!C&&!oQ){return}this._stopAllAnimations();if(C&&!C.equals(this.centerPoint)){this.fire(new ix("oncenter_changed"))}if(oQ&&oQ!==this.zoomLevel){this.fire(new ix("onzoom_changed"))}C=C||this.centerPoint;oQ=oQ||this.zoomLevel;oQ=this._getProperZoom(oQ).zoom;if(this.mapType===c1){if(!this._earth){this.mapType=lg;this.temp.originMapType=c1;function oO(){oN._earth=new cv.Earth(oN,{showRealSunlight:oN.config.showRealSunlight,showMilkyway:oN.config.showMilkyway,earthBackground:oN.config.earthBackground});oN._proxyEarthEvents();oN._changeEarthMapType(c1);hv.extend(oN,cv.EarthView.prototype);delete oN.temp.originMapType}ki.load("earth",function(){if(cv["FeatureStyle"+oN.config.style]){oO()}else{oN.loadMapStyleFiles(function(){oO()})}})}}this.lastLevel=this.zoomLevel||oQ;this.zoomLevel=oQ;var oM=new ix("onload");oM.pointMC=C;oM.zoom=oQ;this.centerPoint=new d9(C.lng,C.lat);this.defaultZoomLevel=this.defaultZoomLevel||this.zoomLevel;this.defaultCenter=this.defaultCenter||this.centerPoint;if(this.mapType!==c1){this.centerPoint=this.restrictCenter(this.centerPoint)}if(!this.loaded&&!(this.temp.originMapType===c1)){var i=this.config.defaultMaxBounds;var oK=new q(i,"baidu",this.mapType);if(this.mapType!==f4){var T=new kT({mapType:this.mapType,copyright:oK,dataType:this.mapType===j9?jK:lf,customLayer:this.mapType===j9,baseLayer:true,transparentPng:false,tileTypeName:this.mapType===j9?"web":"na"});T._isInnerLayer=true;this._addTileLayer(T);this.baseLayerAdded=true}if(this.mapType===f4){kU.sendMessage("TileLayer","blank")}else{if(this.mapType===j9){kU.sendMessage("TileLayer","raster","satellite")}else{kU.sendMessage("TileLayer","vector","normal")}}if(this.mapType===j9&&this.config.showVectorStreetLayer){this._addHybirdVectorMap()}else{if(this.mapType===j9&&this._isHybridShow===true){this._addHybirdMap()}}this.on("zoom_changed",function(){if(this._heading===0){return}if(this.getZoom()<7&&this.config.restrictCenter===true){oN.resetHeading()}})}this._applyHeadingTilt(oR);if(K.apiVersionIsGL()){this.loaded=true;this.dispatchEvent(oM)}else{if(!this.loaded){this.loaded=true;if(this._isDefaultView){var oP=this;setTimeout(function(){oP.dispatchEvent(oM)},0)}else{this.dispatchEvent(oM)}}}oR.callback&&oR.callback()},_ifUseAnimation:function(T,oO){var oN=this.getSize();var C={zoom:this.zoomLevel};var oQ={zoom:oO};var oP=this.pointToPixelIn(this.centerPoint);var oK=this.pointToPixelIn(T,C);var oM=this.pointToPixelIn(this.centerPoint,oQ);var oS=this.pointToPixelIn(T,oQ);var oL=Math.abs(oP.x-oK.x);var i=Math.abs(oP.y-oK.y);var e=Math.abs(oM.x-oS.x);var oR=Math.abs(oM.y-oS.y);if((oL>oN.width||i>oN.height)&&(e>oN.width||oR>oN.height)){return false}return true},_setPlatformPosition:function(oQ,oP,oS){oS=oS||{};if(oQ===0&&oP===0&&!oS.point){return}if(isNaN(oS.initMapOffsetX)){oS.initMapOffsetX=this.offsetX}if(isNaN(oS.initMapOffsetY)){oS.initMapOffsetY=this.offsetY}var oM=mn(this._heading);if(this._tilt>0){oP=oP/Math.cos(mn(this._tilt))}var oR=oQ*Math.cos(oM)+oP*Math.sin(oM);var oO=-oQ*Math.sin(oM)+oP*Math.cos(oM);oR=oR+oS.initMapOffsetX;oO=oO+oS.initMapOffsetY;if(oS.point){var i=this.restrictCenter(oS.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new ix("oncenter_changed"))}}else{var T=this.offsetX-oR;var e=this.offsetY-oO;var oN=this.centerPoint.lng;var oL=this.centerPoint.lat;var oK=new d9(oN,oL);var C=this.getZoomUnits();this.centerPoint=this.restrictCenter(new d9(oK.lng+T*C,oK.lat-e*C),C);this.fire(new ix("oncenter_changed"))}this.offsetX=oR;this.offsetY=oO;this.dispatchEvent(new ix("onmoving"))},restrictCenter:function(oT,oM){if(this.config.restrictCenter===false){return oT}oM=oM||this.getZoomUnits();var oQ=this.pixelToPointIn(new hV(this.width,0),{center:oT});var e=this.pixelToPointIn(new hV(0,this.height),{center:oT});var oS=oT.lng;var oR=oT.lat;if(!!this.config.restrictBounds&&!this.config.restrictBounds.isEmpty()){var oV=this.config.restrictBounds;var oN=oV.getSouthWest();var oW=oV.getNorthEast();var oU=m8.convertLL2MC(oN);var oK=m8.convertLL2MC(oW);oT.lng=this.calcNewLngByBounds(oS,e,oQ,oU.lng,oK.lng,oM);oT.lat=this.calcNewLatByBounds(oR,e,oQ,oU.lat,oK.lat,oM);return oT}var T=this.pixelToPointIn(new hV(0,0),{center:oT});var oO=this.pixelToPointIn(new hV(0,this.height),{center:oT});if(this.zoomLevel<5){if(T.lat>li.MAX_LAT&&oO.lat<li.MIN_LAT){var C=li.MAX_LAT-oT.lat;var i=oT.lat-li.MIN_LAT;var oP;if(C<i){oP=C/(this.height/2)}else{oP=i/(this.height/2)}var oL=18-v(oP);this.zoomLevel=oL;return oT}}if(T.lat>li.MAX_LAT){oT.lat=li.MAX_LAT-this.height/2*oM}else{if(oO.lat<li.MIN_LAT){oT.lat=li.MIN_LAT+this.height/2*oM}}return oT},calcNewZoomByRestriction:function(oQ,oP,e,oO,oK,oM,T,oL){var oT=0;var oU=0;if(typeof T==="number"&&typeof oL==="number"&&oO.lat>oL&&e.lat<T){var C=oL-oP;var i=oP-T;var oN;if(C<i){oN=C/(this.height/2)}else{oN=i/(this.height/2)}oT=18-v(oN)}if(typeof oK==="number"&&typeof oM==="number"&&oO.lng>oM&&e.lng<oK){var oS=oM-oQ;var oR=oQ-oK;var oN;if(oS<oR){oN=oS/(this.width/2)}else{oN=oR/(this.width/2)}oU=18-v(oN)}return Math.max(oT,oU)||this.zoomLevel},calcNewLatByBounds:function(i,T,C,oM,oL,e){var oK=i;if(C.lat>oL){oK=oL-this.height/2*e}else{if(T.lat<oM){oK=oM+this.height/2*e}}return oK},calcNewLngByBounds:function(oM,oL,T,oK,C,e){var i=oM;if(T.lng>C){i=C-this.width/2*e}else{if(oL.lng<oK){i=oK+this.width/2*e}}return i},zoomTo:function(C,oU,oL){var oO=gA[this.mapType];if(!oO){return}var oM=this._getProperZoom(C);C=oM.zoom;if(this.zoomLevel===C){oL&&oL.callback&&oL.callback();return}var oT=C;this.lastLevel=this.zoomLevel;oL=oL||{};if(!oL.fromMouseWheel&&oL.noAnimation===undefined){oL.noAnimation=(this.config.enableContinuousZoom===false)}if(this.zoomEventStatus==="idle"){var oV=new ix("onzoomstart");oV.isGesture=!!oL.isGesture;this.fire(oV);this.zoomEventStatus="zooming"}var oN=null;if(oL.fixPixel){oN=oL.fixPixel}else{if(oU){oN=this.pointToPixelIn(oU,{useRound:false})}}var oS=this.pixelToPointIn(oN);var T=this.centerPoint.clone();this.fixPoint=oU;this.fixPixel=oN;this.fixCenter=T;this.mousePosMCPoint=oS;if(oL.noAnimation){C=oM.zoom;this.zoomLevel=C;this.fire(new ix("onzoom_changed"));var oQ=this.getCurrentMaxTilt();if(this._tilt>oQ){this._tilt=oQ}if(oU){if(this._heading%360!==0||this._tilt>0){var oR=this._webglMapCamera.fromScreenPixelToMC(oN.x,oN.y,{center:T,zoom:this.zoomLevel});if(oR){var oX=oR.sub(oS);var e=T.sub(oX);this.centerPoint=this.restrictCenter(e)}}else{var i=this.getZoomUnits();var e=new d9(oU.lng-i*(oN.x-this.width/2),oU.lat+i*(oN.y-this.height/2));this.centerPoint=this.restrictCenter(e,i)}this.fire(new ix("oncenter_changed"))}this._checkFireZoomend();oL.callback&&oL.callback();return}this._animationInfo.zoom={current:this.zoomLevel,diff:C-this.zoomLevel,target:C};var oW=this;var oK=this._tilt;if(this.fixPoint||oK>li.MAX_DRAG_TILT_L2){oL.renderCallback=function(){var o1=oW.getCurrentMaxTilt();if(oW._tilt>o1){oW._tilt=o1}var o2=oW.fixPixel;if(!oW.fixPixel||!oW.fixPoint){return}var oY=oW.fixPixel;var o8=oW.fixPoint;var o5=oW.fixCenter;var o3=oW.mousePosMCPoint;if(oW._heading%360!==0||oW._tilt>0){var oZ=oW._webglMapCamera.fromScreenPixelToMC(oY.x,oY.y,{center:o5,zoom:oW.zoomLevel,tilt:oW._tilt});if(oZ){var o7=oZ.sub(o3);var o0=o5.sub(o7);oW.centerPoint=oW.restrictCenter(o0)}}else{var o4=oY;var o6=oW.getZoomUnits();var o0=new d9(o8.lng-o6*(o4.x-oW.width/2),o8.lat+o6*(o4.y-oW.height/2));oW.centerPoint=oW.restrictCenter(o0,o6)}oW.fire(new ix("oncenter_changed"))}}if(oL.fromMouseWheel===true){this._startInfiniteZoomAnimation(oL);oL.callback&&oL.callback();oW._checkFireZoomend();return}if(!oL.callback){oL.callback=function(){oW._checkFireZoomend()}}else{var oP=oL.callback;oL.callback=function(oY,oZ){oP(oY,oZ);oW._checkFireZoomend()}}this._startAnimation(oL)},_checkFireZoomend:function(){var e=this;if(e.fireZoomendTimer){clearTimeout(e.fireZoomendTimer)}e.fireZoomendTimer=setTimeout(function(){if(e.zoomEventStatus==="zooming"){e.fire(new ix("onzoomend"));e.zoomEventStatus="idle"}e.fireZoomendTimer=null},150)},deepZoomMedia:function(e){var i=this;if(!i.temp.isStdCtrlBusy){i.temp.isStdCtrlBusy=true;i.deepZoomTo(i.zoomLevel+e);setTimeout(function(){i.temp.isStdCtrlBusy=false},400)}},deepZoomTo:function(e){this.zoomTo(e)},flyToIn:function(C,pd,oY){oY=oY||{};var oK=this._getProperZoom(pd);pd=oK.zoom;if(this.centerPoint.equals(C)&&this.zoomLevel===pd&&typeof oY.heading!=="number"&&typeof oY.tilt!=="number"){return}var e=this.getHeading()%360;var oQ=this.getTilt();var oW=0;var o0=0;var oT=this.getBounds().containsPoint(C);if(typeof oY.heading==="number"){oW=oY.heading}else{if(oT){oW=e}}if(typeof oY.tilt==="number"){o0=oY.tilt}else{if(oT){o0=oQ}}this._heading=e;var pa=oW-e;var o6=o0-oQ;var oU=this;var oM=this.zoomLevel;var oN=1.42;var o2=this.zoomScale(pd-oM);var pf=this.getZoomUnits();var oS=this.centerPoint.div(pf);var pg=C.div(pf);var o9=this.worldSize();var o5=oN;var o4=Math.max(this.width,this.height);var o3=o4/o2;var oR=pg.sub(oS).mag();var i=o5*o5;function pc(pi){var ph=(o3*o3-o4*o4+(pi?-1:1)*i*i*oR*oR)/(2*(pi?o3:o4)*i*oR);return Math.log(Math.sqrt(ph*ph+1)-ph)}function T(ph){return(Math.exp(ph)-Math.exp(-ph))/2}function oO(ph){return(Math.exp(ph)+Math.exp(-ph))/2}function oX(ph){return T(ph)/oO(ph)}var oP=pc(0);var o7=function(ph){return(oO(oP)/oO(oP+o5*ph))};var o8=function(ph){return o4*((oO(oP)*oX(oP+o5*ph)-T(oP))/i)/oR};var oL=(pc(1)-oP)/o5;if(Math.abs(oR)<0.000001||oL===Infinity||isNaN(oL)){if(Math.abs(o4-o3)<0.000001){this._animationInfo.zoom={current:this.zoomLevel,diff:pd-this.zoomLevel};this._animationInfo.center={current:this.centerPoint,diff:C.sub(this.centerPoint)};this._animationInfo.heading={current:e,diff:oW-e};this._animationInfo.tilt={current:oQ,diff:o0-oQ};this.setLock(true);this._startAnimation({callback:function(ph){oU.setLock(false);if(oY.callback){oY.callback(ph)}},duration:oY.duration});return}var pe=o3<o4?-1:1;oL=Math.abs(Math.log(o3/o4))/o5;o8=function(){return 0};o7=function(ph){return Math.exp(pe*o5*ph)}}var pb=1.7;if(oL<0.3){pb=0.8}else{if(oL>5){pb=(oL-5)/2+pb}}var oZ=oY.duration||1000*oL/pb;if(isNaN(oZ)){var o1={};for(var oV in oY){o1[oV]=oY[oV];o1.noAnimation=true}this.centerAndZoomIn(C,pd,o1);return}this.fire(new ix("onmovestart"));this.fire(new ix("onzoomstart"));this.setLock(true);this._startAnimation({duration:oZ,renderCallback:function(ph,pi){var pj=ph*oL;var pm=o8(pj);var pl=oM+oU.scaleZoom(1/o7(pj));if(pl<oU.getMinZoom()){pl=oU.getMinZoom()}if(pl>oU.getMaxZoom()){pl=oU.getMaxZoom()}if(pl!==oU.zoomLevel){oU.zoomLevel=pl;oU.fire(new ix("onzoom_changed"))}oU.centerPoint=oS.add(pg.sub(oS).mult(pm)).mult(pf);oU.fire(new ix("oncenter_changed"));if(typeof oW==="number"){var pk=ph/0.7;if(pk>1){pk=1}oU.setHeading(e+pa*ph,{noAnimation:true})}if(typeof o0==="number"){oU.setTilt(oQ+o6*ph,{noAnimation:true})}},callback:function(ph,pi){oU.setLock(false);if(pi&&pi.stop===true){oU.fire(new ix("onmoveend"));oU.fire(new ix("onzoomend"));oY.callback&&oY.callback(ph);return}if(pd!==oU.zoomLevel){oU.zoomLevel=pd;oU.fire(new ix("onzoom_changed"))}oU.fire(new ix("onmoveend"));oU.fire(new ix("onzoomend"));oY.callback&&oY.callback(ph)}})},zoomScale:function(e){return Math.pow(2,e)},scaleZoom:function(e){return Math.log(e)/Math.LN2},panToIn:function(i,C){C=C||{};if(!i||i.equals(this.centerPoint)){C.callback&&C.callback();return}var T=this.pointToPixelIn(i);var e=Math.round(this.width/2);var oL=Math.round(this.height/2);var oK=this._ifUseAnimation(i,this.zoomLevel);if(C.noAnimation===true||oK===false){this._stopAllAnimations();this._applyHeadingTilt(C);this._panToIn(e-T.x,oL-T.y,i);C.callback&&C.callback();return}this.flyToIn(i,this.zoomLevel,C)},_applyHeadingTilt:function(e){if(!e){return}if(typeof e.heading==="number"&&e.heading!==this._heading){this._setValue("heading",e.heading)}if(typeof e.tilt==="number"&&e.tilt!==this._tilt){this._setValue("tilt",e.tilt)}},_panToIn:function(i,e,T){var C=this.temp;if(C.operating===true){return}if(C.dragAni){C.dragAni.stop(false,{readyToMove:true});C.dragAni=null}this.dispatchEvent(new ix("onmovestart"));this._setPlatformPosition(i,e,{point:T});this.dispatchEvent(new ix("onmoveend"))},_stopAllAnimations:function(e){e=e||{};if(this._ani){this._ani.stop(!!e.goToEnd,{stopCurrentAnimation:e.stopCurrentAnimation});this._ani=null}if(this._infiniteAni){this._infiniteAni.stop();this._infiniteAni=null}},panBy:function(i,e,C){i=Math.round(i)||0;e=Math.round(e)||0;C=C||{};if(!K.apiVersionIsGL()){if(C.noAnimation===undefined&&C.enableAnimation!==undefined){C.noAnimation=!C.enableAnimation}}if(Math.abs(i)<=this.width&&Math.abs(e)<=this.height&&C.noAnimation!==true){this._panBy(i,e,C)}else{this._panToIn(i,e,C.point);C.callback&&C.callback()}},_panBy:function(i,e,oK){if(this.temp.operating===true){return}oK=oK||{};this.dispatchEvent(new ix("onmovestart"));var T=this;var C=T.temp;C.pl=T.offsetX;C.pt=T.offsetY;if(C.tlPan){C.tlPan._options.onStop=null;C.tlPan.cancel()}if(C.dragAni){C.dragAni.stop(false,{readyToMove:true});C.dragAni=null}C.tlPan=new ij({fps:oK.fps||T.config.fps,duration:oK.duration||T.config.actionDuration,transition:oK.transition||jF.easeInOutQuad,render:function(oL){this.terminative=T.temp.operating;if(T.temp.operating){return}T._setPlatformPosition(i*oL,e*oL,{initMapOffsetX:C.pl,initMapOffsetY:C.pt})},finish:function(oL){T.dispatchEvent(new ix("onmoveend"));T.temp.tlPan=false;if(T.temp.stopArrow===true){T.temp.stopArrow=false;if(T.temp.arrow!==0){T._arrow()}}},onStop:function(){T.dispatchEvent(new ix("onmoveend"));T.temp.tlPan=false}})},_startAnimation:function(i){var oK=this._animationInfo;var C=this;i=i||{};if(C._ani){C._ani.stop(!!i.goToEnd,{stopCurrentAnimation:i.stopCurrentAnimation})}if(C._infiniteAni){C._infiniteAni.stop();C._infiniteAni=null}var oL=i.duration||500;var oM=i.transition||jF.ease;var e=new ix("onanimation_start");this.fire(e);if(i.unstopable){oK=this._animationInfoUnstopable}var T=new ij({duration:oL,transition:oM,render:function(oP,oO){for(var oN in oK){if(!oK.hasOwnProperty(oN)){continue}var oR=oK[oN].current;var oQ=oK[oN].diff;C._setValueTick(oN,oR,oQ,oP)}if(i.renderCallback){i.renderCallback(oP,oO)}},finish:function(oN){C.fire(new ix("onanimation_end"));if(i.unstopable){C._animationInfoUnstopable={};C._unstopableAni=null}else{C._ani=null;C._animationInfo={}}if(i.mapNeedCbk){i.mapNeedCbk()}if(i.callback){i.callback(oN)}},onStop:function(oN){oN=oN||{};C.fire(new ix("onanimation_end"));if(oN.stopCurrentAnimation){C._animationInfo={}}C._ani=null;if(i.mapNeedCbk){i.mapNeedCbk()}if(i.callback){i.callback(null,{stop:true})}}});if(i.unstopable){C._unstopableAni=T}else{C._ani=T}},_startInfiniteZoomAnimation:function(e){var i=this;if(i._ani){i._ani.stop(!!e.goToEnd,{stopCurrentAnimation:e.stopCurrentAnimation})}if(i._infiniteAni){return}this.fire(new ix("onanimation_start"));i._infiniteAni=new ij({duration:10000,transition:jF.linear,render:function(){var C=i._animationInfo.zoom;if(Math.abs(C.current-C.target)<0.001){i._setValue("zoom",C.target);i._infiniteAni&&i._infiniteAni.stop();return}C.current+=(C.target-C.current)*0.35;i._setValue("zoom",C.current);if(e.renderCallback){e.renderCallback()}},finish:function(){i._infiniteAni=null;i._animationInfo={};i.fire(new ix("onanimation_end"));if(e.callback){e.callback()}},onStop:function(){i._infiniteAni=null;i._animationInfo={};i.fire(new ix("onanimation_end"));if(e.callback){e.callback()}}})},_setValue:function(e,C){if(e==="zoom"){this._preZoomLevel=this.zoomLevel;var i=this._getProperZoom(C);C=i.zoom;if(C!==this.zoomLevel){this.zoomLevel=C;if(C<5&&!this.config.restrictBounds){this.restrictCenter(this.centerPoint)}this.fire(new ix("on"+e+"_changed"))}return}else{if(e==="center"){this.centerPoint=C}}this["_"+e]=C;this.fire(new ix("on"+e+"_changed"))},_setValueTick:function(e,oK,T,i){if(e==="center"){var C=new d9(oK.lng+T.lng*i,oK.lat+T.lat*i);this._setValue(e,C);return}if(e==="zoom"){this._setValue(e,Math.pow(oK,1-i)*Math.pow(oK+T,i));return}this._setValue(e,oK+T*i)},setHeading:function(T,i){i=i||{};if(T===this._heading){i.callback&&i.callback();return}var C=gq(this._heading,360);var e=gq(T,360);if(e===C){this._heading=e;i.callback&&i.callback();return}if(e===0&&C>180){e=360}if(i.noAnimation){this._setValue("heading",e);i.callback&&i.callback();return}if(i.unstopable){this._animationInfoUnstopable.heading={current:C,diff:e-C}}else{var oK=e-C;if(Math.abs(e-C)>180){if(oK>0){oK=oK-360}else{oK=oK+360}}this._animationInfo.heading={current:C,diff:oK}}this._startAnimation(i)},resetHeading:function(e){var C=this._heading;while(C<0){C+=360}C=C%360;if(C>180){C-=360}this._heading=C;var T={};if(e){for(var i in e){if(e.hasOwnProperty(i)){T[i]=e[i]}}}T.unstopable=true;this.setHeading(0,T)},getHeading:function(){while(this._heading>360){this._heading-=360}if(this._heading>180){this._heading-=360}return this._heading},setTilt:function(e,i){i=i||{};if(e===this._tilt){i.callback&&i.callback();return}if(e>li.MAX_TILT){e=li.MAX_TILT}if(e<li.MIN_TILT){e=li.MIN_TILT}if(i&&i.noAnimation){this._setValue("tilt",e);i.callback&&i.callback();return}this._animationInfo.tilt={current:this._tilt,diff:e-this._tilt};this._startAnimation(i)},getTilt:function(){return this._tilt},getCenterIn:function(){return this.centerPoint},getZoom:function(){return this.zoomLevel},getCameraPosition:function(C){C=C||{};var e=C.center||this.centerPoint;var T=C.zoom||this.zoomLevel;var oM=typeof C.heading==="number"?C.heading:this._heading;var i=typeof C.tilt==="number"?C.tilt:this._tilt;var oL=this._webglMapCamera.generateMVMatrix(e,T,oM,i);var oK=gc.create(Float32Array);gc.invert(oK,oL);return this._webglMapCamera.getPosition(oK)}});function cd(i){this._jobQueue=[];this._idleOnlyJobQueue=[];var e=this;this.isIdle=true;i.on("updateframe",function(T){var C=12-T.frameTime;C=C<1?1:C;e.isIdle=false;if(e.idleWorkTimer){clearInterval(e.idleWorkTimer);e.idleWorkTimer=null}e.runJobs(C)});this._idleWorkerTicker=(function(C){return function(){if(C.isIdle){C.runJobs();C.runIdleOnlyJobs()}}})(this);i.on("mapglidle",function(){e.isIdle=true;e.runJobs();e.runIdleOnlyJobs();e.idleWorkTimer=setInterval(e._idleWorkerTicker,cd.MAX_IDLE_TIME)});i.on("destroy",function(){if(e.idleWorkTimer){clearInterval(e.idleWorkTimer);e.idleWorkTimer=null}})}cd.MAX_IDLE_TIME=50;cd.MAX_FRAME_TIME=6;cd.prototype.runJobs=function(i){if(this._jobQueue.length===0){return}var T=lQ();var e=0;i=i||cd.MAX_FRAME_TIME;while(this._jobQueue.length&&e<i){var C=this._jobQueue.shift();if(C.state!=="invalid"){C.call()}e=lQ()-T}};cd.prototype.runIdleOnlyJobs=function(){if(this._idleOnlyJobQueue.length===0){return}var C=lQ();var e=0;while(this._idleOnlyJobQueue.length&&e<cd.MAX_IDLE_TIME){var i=this._idleOnlyJobQueue.shift();if(i.state!=="invalid"){i.call()}e=lQ()-C}};cd.prototype.checkIdleRunning=function(){if(this.isIdle&&!this.idleWorkTimer){this.runJobs();this.runIdleOnlyJobs();this.idleWorkTimer=setInterval(this._idleWorkerTicker,50)}};cd.prototype.addJob=function(e){this._jobQueue.push(e);this.checkIdleRunning()};cd.prototype.clearJobs=function(){this._jobQueue.length=0;this._idleOnlyJobQueue.length=0};cd.prototype.addIdleOnlyJob=function(e){this._idleOnlyJobQueue.push(e);this.checkIdleRunning()};var fV={};var i5;var i4;var i2;var gh;var gc;var nB={};(function(oM){if(!oQ){var oQ=0.000001}if(!i){var i=(typeof Float32Array!=="undefined")?Float32Array:Array}if(!oK){var oK=Math.random}var C={};var oL=Math.PI/180;C.toRadian=function(oR){return oR*oL};var oP={};oP.create=function(oS){oS=oS||i;var oR=new oS(2);oR[0]=0;oR[1]=0;return oR};oP.clone=function(oR,oT){oT=oT||i;var oS=new oT(2);oS[0]=oR[0];oS[1]=oR[1];return oS};oP.fromValues=function(oR,oU,oT){oT=oT||i;var oS=new oT(2);oS[0]=oR;oS[1]=oU;return oS};oP.copy=function(oS,oR){oS[0]=oR[0];oS[1]=oR[1];return oS};oP.set=function(oS,oR,oT){oS[0]=oR;oS[1]=oT;return oS};oP.add=function(oT,oS,oR){oT[0]=oS[0]+oR[0];oT[1]=oS[1]+oR[1];return oT};oP.subtract=function(oT,oS,oR){oT[0]=oS[0]-oR[0];oT[1]=oS[1]-oR[1];return oT};oP.sub=oP.subtract;oP.multiply=function(oT,oS,oR){oT[0]=oS[0]*oR[0];oT[1]=oS[1]*oR[1];return oT};oP.mul=oP.multiply;oP.divide=function(oT,oS,oR){oT[0]=oS[0]/oR[0];oT[1]=oS[1]/oR[1];return oT};oP.div=oP.divide;oP.min=function(oT,oS,oR){oT[0]=Math.min(oS[0],oR[0]);oT[1]=Math.min(oS[1],oR[1]);return oT};oP.max=function(oT,oS,oR){oT[0]=Math.max(oS[0],oR[0]);oT[1]=Math.max(oS[1],oR[1]);return oT};oP.scale=function(oT,oS,oR){oT[0]=oS[0]*oR;oT[1]=oS[1]*oR;return oT};oP.scaleAndAdd=function(oT,oS,oR,oU){oT[0]=oS[0]+(oR[0]*oU);oT[1]=oS[1]+(oR[1]*oU);return oT};oP.distance=function(oT,oS){var oR=oS[0]-oT[0],oU=oS[1]-oT[1];return Math.sqrt(oR*oR+oU*oU)};oP.dist=oP.distance;oP.squaredDistance=function(oT,oS){var oR=oS[0]-oT[0],oU=oS[1]-oT[1];return oR*oR+oU*oU};oP.sqrDist=oP.squaredDistance;oP.length=function(oS){var oR=oS[0],oT=oS[1];return Math.sqrt(oR*oR+oT*oT)};oP.len=oP.length;oP.squaredLength=function(oS){var oR=oS[0],oT=oS[1];return oR*oR+oT*oT};oP.sqrLen=oP.squaredLength;oP.negate=function(oS,oR){oS[0]=-oR[0];oS[1]=-oR[1];return oS};oP.normalize=function(oU,oT){var oS=oT[0],oV=oT[1];var oR=oS*oS+oV*oV;if(oR>0){oR=1/Math.sqrt(oR);oU[0]=oT[0]*oR;oU[1]=oT[1]*oR}return oU};oP.dot=function(oS,oR){return oS[0]*oR[0]+oS[1]*oR[1]};oP.cross=function(oT,oS,oR){var oU=oS[0]*oR[1]-oS[1]*oR[0];oT[0]=oT[1]=0;oT[2]=oU;return oT};oP.lerp=function(oT,oS,oR,oU){var oW=oS[0],oV=oS[1];oT[0]=oW+oU*(oR[0]-oW);oT[1]=oV+oU*(oR[1]-oV);return oT};oP.random=function(oR,oT){oT=oT||1;var oS=oK()*2*Math.PI;oR[0]=Math.cos(oS)*oT;oR[1]=Math.sin(oS)*oT;return oR};oP.transformMat2=function(oU,oT,oS){var oR=oT[0],oV=oT[1];oU[0]=oS[0]*oR+oS[2]*oV;oU[1]=oS[1]*oR+oS[3]*oV;return oU};oP.transformMat2d=function(oU,oT,oS){var oR=oT[0],oV=oT[1];oU[0]=oS[0]*oR+oS[2]*oV+oS[4];oU[1]=oS[1]*oR+oS[3]*oV+oS[5];return oU};oP.transformMat3=function(oU,oT,oS){var oR=oT[0],oV=oT[1];oU[0]=oS[0]*oR+oS[3]*oV+oS[6];oU[1]=oS[1]*oR+oS[4]*oV+oS[7];return oU};oP.transformMat4=function(oU,oT,oS){var oR=oT[0],oV=oT[1];oU[0]=oS[0]*oR+oS[4]*oV+oS[12];oU[1]=oS[1]*oR+oS[5]*oV+oS[13];return oU};oP.rotate=function(oU,oS,oR,oY){var oX=oS[0]-oR[0];var oW=oS[1]-oR[1];var oT=Math.sin(oY);var oV=Math.cos(oY);oU[0]=oX*oV-oW*oT+oR[0];oU[1]=oX*oT+oW*oV+oR[1];return oU};oP.forEach=(function(){var oR=oP.create();return function(oU,oY,oZ,oX,oW,oS){var oV,oT;if(!oY){oY=2}if(!oZ){oZ=0}if(oX){oT=Math.min((oX*oY)+oZ,oU.length)}else{oT=oU.length}for(oV=oZ;oV<oT;oV+=oY){oR[0]=oU[oV];oR[1]=oU[oV+1];oW(oR,oR,oS);oU[oV]=oR[0];oU[oV+1]=oR[1]}return oU}})();oP.str=function(oR){return"vec2("+oR[0]+", "+oR[1]+")"};oM.vec2=oP;var oO={};oO.create=function(oS){oS=oS||i;var oR=new oS(3);oR[0]=0;oR[1]=0;oR[2]=0;return oR};oO.clone=function(oR,oT){oT=oT||i;var oS=new oT(3);oS[0]=oR[0];oS[1]=oR[1];oS[2]=oR[2];return oS};oO.fromValues=function(oR,oV,oT,oU){oU=oU||i;var oS=new oU(3);oS[0]=oR;oS[1]=oV;oS[2]=oT;return oS};oO.copy=function(oS,oR){oS[0]=oR[0];oS[1]=oR[1];oS[2]=oR[2];return oS};oO.set=function(oS,oR,oU,oT){oS[0]=oR;oS[1]=oU;oS[2]=oT;return oS};oO.add=function(oT,oS,oR){oT[0]=oS[0]+oR[0];oT[1]=oS[1]+oR[1];oT[2]=oS[2]+oR[2];return oT};oO.subtract=function(oT,oS,oR){oT[0]=oS[0]-oR[0];oT[1]=oS[1]-oR[1];oT[2]=oS[2]-oR[2];return oT};oO.sub=oO.subtract;oO.multiply=function(oT,oS,oR){oT[0]=oS[0]*oR[0];oT[1]=oS[1]*oR[1];oT[2]=oS[2]*oR[2];return oT};oO.mul=oO.multiply;oO.divide=function(oT,oS,oR){oT[0]=oS[0]/oR[0];oT[1]=oS[1]/oR[1];oT[2]=oS[2]/oR[2];return oT};oO.div=oO.divide;oO.min=function(oT,oS,oR){oT[0]=Math.min(oS[0],oR[0]);oT[1]=Math.min(oS[1],oR[1]);oT[2]=Math.min(oS[2],oR[2]);return oT};oO.max=function(oT,oS,oR){oT[0]=Math.max(oS[0],oR[0]);oT[1]=Math.max(oS[1],oR[1]);oT[2]=Math.max(oS[2],oR[2]);return oT};oO.scale=function(oT,oS,oR){oT[0]=oS[0]*oR;oT[1]=oS[1]*oR;oT[2]=oS[2]*oR;return oT};oO.scaleAndAdd=function(oT,oS,oR,oU){oT[0]=oS[0]+(oR[0]*oU);oT[1]=oS[1]+(oR[1]*oU);oT[2]=oS[2]+(oR[2]*oU);return oT};oO.distance=function(oT,oS){var oR=oS[0]-oT[0],oV=oS[1]-oT[1],oU=oS[2]-oT[2];return Math.sqrt(oR*oR+oV*oV+oU*oU)};oO.dist=oO.distance;oO.squaredDistance=function(oT,oS){var oR=oS[0]-oT[0],oV=oS[1]-oT[1],oU=oS[2]-oT[2];return oR*oR+oV*oV+oU*oU};oO.sqrDist=oO.squaredDistance;oO.length=function(oS){var oR=oS[0],oU=oS[1],oT=oS[2];return Math.sqrt(oR*oR+oU*oU+oT*oT)};oO.len=oO.length;oO.squaredLength=function(oS){var oR=oS[0],oU=oS[1],oT=oS[2];return oR*oR+oU*oU+oT*oT};oO.sqrLen=oO.squaredLength;oO.negate=function(oS,oR){oS[0]=-oR[0];oS[1]=-oR[1];oS[2]=-oR[2];return oS};oO.normalize=function(oU,oT){var oS=oT[0],oW=oT[1],oV=oT[2];var oR=oS*oS+oW*oW+oV*oV;if(oR>0){oR=1/Math.sqrt(oR);oU[0]=oT[0]*oR;oU[1]=oT[1]*oR;oU[2]=oT[2]*oR}return oU};oO.dot=function(oS,oR){return oS[0]*oR[0]+oS[1]*oR[1]+oS[2]*oR[2]};oO.cross=function(oS,oX,oW){var oR=oX[0],oZ=oX[1],oY=oX[2],oV=oW[0],oU=oW[1],oT=oW[2];oS[0]=oZ*oT-oY*oU;oS[1]=oY*oV-oR*oT;oS[2]=oR*oU-oZ*oV;return oS};oO.lerp=function(oT,oS,oR,oU){var oX=oS[0],oW=oS[1],oV=oS[2];oT[0]=oX+oU*(oR[0]-oX);oT[1]=oW+oU*(oR[1]-oW);oT[2]=oV+oU*(oR[2]-oV);return oT};oO.random=function(oR,oV){oV=oV||1;var oT=oK()*2*Math.PI;var oU=(oK()*2)-1;var oS=Math.sqrt(1-oU*oU)*oV;oR[0]=Math.cos(oT)*oS;oR[1]=Math.sin(oT)*oS;oR[2]=oU*oV;return oR};oO.transformMat4=function(oU,oT,oS){var oR=oT[0],oW=oT[1],oV=oT[2];oU[0]=oS[0]*oR+oS[4]*oW+oS[8]*oV+oS[12];oU[1]=oS[1]*oR+oS[5]*oW+oS[9]*oV+oS[13];oU[2]=oS[2]*oR+oS[6]*oW+oS[10]*oV+oS[14];return oU};oO.transformMat3=function(oU,oT,oS){var oR=oT[0],oW=oT[1],oV=oT[2];oU[0]=oR*oS[0]+oW*oS[3]+oV*oS[6];oU[1]=oR*oS[1]+oW*oS[4]+oV*oS[7];oU[2]=oR*oS[2]+oW*oS[5]+oV*oS[8];return oU};oO.transformQuat=function(oX,o3,oR){var o4=o3[0],o2=o3[1],o1=o3[2],oZ=oR[0],oY=oR[1],oW=oR[2],o0=oR[3],oU=o0*o4+oY*o1-oW*o2,oT=o0*o2+oW*o4-oZ*o1,oS=o0*o1+oZ*o2-oY*o4,oV=-oZ*o4-oY*o2-oW*o1;oX[0]=oU*o0+oV*-oZ+oT*-oW-oS*-oY;oX[1]=oT*o0+oV*-oY+oS*-oZ-oU*-oW;oX[2]=oS*o0+oV*-oW+oU*-oY-oT*-oZ;return oX};oO.rotateX=function(oT,oS,oR,oW){var oV=[],oU=[];oV[0]=oS[0]-oR[0];oV[1]=oS[1]-oR[1];oV[2]=oS[2]-oR[2];oU[0]=oV[0];oU[1]=oV[1]*Math.cos(oW)-oV[2]*Math.sin(oW);oU[2]=oV[1]*Math.sin(oW)+oV[2]*Math.cos(oW);oT[0]=oU[0]+oR[0];oT[1]=oU[1]+oR[1];oT[2]=oU[2]+oR[2];return oT};oO.rotateY=function(oT,oS,oR,oW){var oV=[],oU=[];oV[0]=oS[0]-oR[0];oV[1]=oS[1]-oR[1];oV[2]=oS[2]-oR[2];oU[0]=oV[2]*Math.sin(oW)+oV[0]*Math.cos(oW);oU[1]=oV[1];oU[2]=oV[2]*Math.cos(oW)-oV[0]*Math.sin(oW);oT[0]=oU[0]+oR[0];oT[1]=oU[1]+oR[1];oT[2]=oU[2]+oR[2];return oT};oO.rotateZ=function(oT,oS,oR,oW){var oV=[],oU=[];oV[0]=oS[0]-oR[0];oV[1]=oS[1]-oR[1];oV[2]=oS[2]-oR[2];oU[0]=oV[0]*Math.cos(oW)-oV[1]*Math.sin(oW);oU[1]=oV[0]*Math.sin(oW)+oV[1]*Math.cos(oW);oU[2]=oV[2];oT[0]=oU[0]+oR[0];oT[1]=oU[1]+oR[1];oT[2]=oU[2]+oR[2];return oT};oO.forEach=(function(){var oR=oO.create();return function(oU,oY,oZ,oX,oW,oS){var oV,oT;if(!oY){oY=3}if(!oZ){oZ=0}if(oX){oT=Math.min((oX*oY)+oZ,oU.length)}else{oT=oU.length}for(oV=oZ;oV<oT;oV+=oY){oR[0]=oU[oV];oR[1]=oU[oV+1];oR[2]=oU[oV+2];oW(oR,oR,oS);oU[oV]=oR[0];oU[oV+1]=oR[1];oU[oV+2]=oR[2]}return oU}})();oO.str=function(oR){return"vec3("+oR[0]+", "+oR[1]+", "+oR[2]+")"};oM.vec3=oO;var oN={};oN.create=function(oS){oS=oS||i;var oR=new oS(4);oR[0]=0;oR[1]=0;oR[2]=0;oR[3]=0;return oR};oN.clone=function(oR,oT){oT=oT||i;var oS=new oT(4);oS[0]=oR[0];oS[1]=oR[1];oS[2]=oR[2];oS[3]=oR[3];return oS};oN.fromValues=function(oR,oW,oU,oS,oV){oV=oV||i;var oT=new oV(4);oT[0]=oR;oT[1]=oW;oT[2]=oU;oT[3]=oS;return oT};oN.copy=function(oS,oR){oS[0]=oR[0];oS[1]=oR[1];oS[2]=oR[2];oS[3]=oR[3];return oS};oN.set=function(oT,oR,oV,oU,oS){oT[0]=oR;oT[1]=oV;oT[2]=oU;oT[3]=oS;return oT};oN.add=function(oT,oS,oR){oT[0]=oS[0]+oR[0];oT[1]=oS[1]+oR[1];oT[2]=oS[2]+oR[2];oT[3]=oS[3]+oR[3];return oT};oN.subtract=function(oT,oS,oR){oT[0]=oS[0]-oR[0];oT[1]=oS[1]-oR[1];oT[2]=oS[2]-oR[2];oT[3]=oS[3]-oR[3];return oT};oN.sub=oN.subtract;oN.multiply=function(oT,oS,oR){oT[0]=oS[0]*oR[0];oT[1]=oS[1]*oR[1];oT[2]=oS[2]*oR[2];oT[3]=oS[3]*oR[3];return oT};oN.mul=oN.multiply;oN.divide=function(oT,oS,oR){oT[0]=oS[0]/oR[0];oT[1]=oS[1]/oR[1];oT[2]=oS[2]/oR[2];oT[3]=oS[3]/oR[3];return oT};oN.div=oN.divide;oN.min=function(oT,oS,oR){oT[0]=Math.min(oS[0],oR[0]);oT[1]=Math.min(oS[1],oR[1]);oT[2]=Math.min(oS[2],oR[2]);oT[3]=Math.min(oS[3],oR[3]);return oT};oN.max=function(oT,oS,oR){oT[0]=Math.max(oS[0],oR[0]);oT[1]=Math.max(oS[1],oR[1]);oT[2]=Math.max(oS[2],oR[2]);oT[3]=Math.max(oS[3],oR[3]);return oT};oN.scale=function(oT,oS,oR){oT[0]=oS[0]*oR;oT[1]=oS[1]*oR;oT[2]=oS[2]*oR;oT[3]=oS[3]*oR;return oT};oN.scaleAndAdd=function(oT,oS,oR,oU){oT[0]=oS[0]+(oR[0]*oU);oT[1]=oS[1]+(oR[1]*oU);oT[2]=oS[2]+(oR[2]*oU);oT[3]=oS[3]+(oR[3]*oU);return oT};oN.distance=function(oU,oS){var oR=oS[0]-oU[0],oW=oS[1]-oU[1],oV=oS[2]-oU[2],oT=oS[3]-oU[3];return Math.sqrt(oR*oR+oW*oW+oV*oV+oT*oT)};oN.dist=oN.distance;oN.squaredDistance=function(oU,oS){var oR=oS[0]-oU[0],oW=oS[1]-oU[1],oV=oS[2]-oU[2],oT=oS[3]-oU[3];return oR*oR+oW*oW+oV*oV+oT*oT};oN.sqrDist=oN.squaredDistance;oN.length=function(oT){var oR=oT[0],oV=oT[1],oU=oT[2],oS=oT[3];return Math.sqrt(oR*oR+oV*oV+oU*oU+oS*oS)};oN.len=oN.length;oN.squaredLength=function(oT){var oR=oT[0],oV=oT[1],oU=oT[2],oS=oT[3];return oR*oR+oV*oV+oU*oU+oS*oS};oN.sqrLen=oN.squaredLength;oN.negate=function(oS,oR){oS[0]=-oR[0];oS[1]=-oR[1];oS[2]=-oR[2];oS[3]=-oR[3];return oS};oN.normalize=function(oV,oU){var oS=oU[0],oX=oU[1],oW=oU[2],oT=oU[3];var oR=oS*oS+oX*oX+oW*oW+oT*oT;if(oR>0){oR=1/Math.sqrt(oR);oV[0]=oU[0]*oR;oV[1]=oU[1]*oR;oV[2]=oU[2]*oR;oV[3]=oU[3]*oR}return oV};oN.dot=function(oS,oR){return oS[0]*oR[0]+oS[1]*oR[1]+oS[2]*oR[2]+oS[3]*oR[3]};oN.lerp=function(oT,oS,oR,oU){var oX=oS[0],oW=oS[1],oV=oS[2],oY=oS[3];oT[0]=oX+oU*(oR[0]-oX);oT[1]=oW+oU*(oR[1]-oW);oT[2]=oV+oU*(oR[2]-oV);oT[3]=oY+oU*(oR[3]-oY);return oT};oN.random=function(oR,oS){oS=oS||1;oR[0]=oK();oR[1]=oK();oR[2]=oK();oR[3]=oK();oN.normalize(oR,oR);oN.scale(oR,oR,oS);return oR};oN.transformMat4=function(oV,oU,oS){var oR=oU[0],oX=oU[1],oW=oU[2],oT=oU[3];oV[0]=oS[0]*oR+oS[4]*oX+oS[8]*oW+oS[12]*oT;oV[1]=oS[1]*oR+oS[5]*oX+oS[9]*oW+oS[13]*oT;oV[2]=oS[2]*oR+oS[6]*oX+oS[10]*oW+oS[14]*oT;oV[3]=oS[3]*oR+oS[7]*oX+oS[11]*oW+oS[15]*oT;return oV};oN.transformQuat=function(oX,o3,oR){var o4=o3[0],o2=o3[1],o1=o3[2],oZ=oR[0],oY=oR[1],oW=oR[2],o0=oR[3],oU=o0*o4+oY*o1-oW*o2,oT=o0*o2+oW*o4-oZ*o1,oS=o0*o1+oZ*o2-oY*o4,oV=-oZ*o4-oY*o2-oW*o1;oX[0]=oU*o0+oV*-oZ+oT*-oW-oS*-oY;oX[1]=oT*o0+oV*-oY+oS*-oZ-oU*-oW;oX[2]=oS*o0+oV*-oW+oU*-oY-oT*-oZ;return oX};oN.forEach=(function(){var oR=oN.create();return function(oU,oY,oZ,oX,oW,oS){var oV,oT;if(!oY){oY=4}if(!oZ){oZ=0}if(oX){oT=Math.min((oX*oY)+oZ,oU.length)}else{oT=oU.length}for(oV=oZ;oV<oT;oV+=oY){oR[0]=oU[oV];oR[1]=oU[oV+1];oR[2]=oU[oV+2];oR[3]=oU[oV+3];oW(oR,oR,oS);oU[oV]=oR[0];oU[oV+1]=oR[1];oU[oV+2]=oR[2];oU[oV+3]=oR[3]}return oU}})();oN.str=function(oR){return"vec4("+oR[0]+", "+oR[1]+", "+oR[2]+", "+oR[3]+")"};oM.vec4=oN;var T={};T.create=function(oS){oS=oS||i;var oR=new oS(4);oR[0]=1;oR[1]=0;oR[2]=0;oR[3]=1;return oR};T.clone=function(oR,oT){oT=oT||i;var oS=new oT(4);oS[0]=oR[0];oS[1]=oR[1];oS[2]=oR[2];oS[3]=oR[3];return oS};T.copy=function(oS,oR){oS[0]=oR[0];oS[1]=oR[1];oS[2]=oR[2];oS[3]=oR[3];return oS};T.identity=function(oR){oR[0]=1;oR[1]=0;oR[2]=0;oR[3]=1;return oR};T.transpose=function(oT,oS){if(oT===oS){var oR=oS[1];oT[1]=oS[2];oT[2]=oR}else{oT[0]=oS[0];oT[1]=oS[2];oT[2]=oS[1];oT[3]=oS[3]}return oT};T.invert=function(oV,oT){var oU=oT[0],oS=oT[1],oR=oT[2],oX=oT[3],oW=oU*oX-oR*oS;if(!oW){return null}oW=1/oW;oV[0]=oX*oW;oV[1]=-oS*oW;oV[2]=-oR*oW;oV[3]=oU*oW;return oV};T.adjoint=function(oT,oR){var oS=oR[0];oT[0]=oR[3];oT[1]=-oR[1];oT[2]=-oR[2];oT[3]=oS;return oT};T.determinant=function(oR){return oR[0]*oR[3]-oR[2]*oR[1]};T.multiply=function(oV,o0,oY){var oU=o0[0],oT=o0[1],oS=o0[2],oR=o0[3];var o1=oY[0],oZ=oY[1],oX=oY[2],oW=oY[3];oV[0]=oU*o1+oS*oZ;oV[1]=oT*o1+oR*oZ;oV[2]=oU*oX+oS*oW;oV[3]=oT*oX+oR*oW;return oV};T.mul=T.multiply;T.rotate=function(oV,oY,oX){var oU=oY[0],oT=oY[1],oS=oY[2],oR=oY[3],oZ=Math.sin(oX),oW=Math.cos(oX);oV[0]=oU*oW+oS*oZ;oV[1]=oT*oW+oR*oZ;oV[2]=oU*-oZ+oS*oW;oV[3]=oT*-oZ+oR*oW;return oV};T.scale=function(oV,oW,oY){var oU=oW[0],oT=oW[1],oS=oW[2],oR=oW[3],oZ=oY[0],oX=oY[1];oV[0]=oU*oZ;oV[1]=oT*oZ;oV[2]=oS*oX;oV[3]=oR*oX;return oV};T.str=function(oR){return"mat2("+oR[0]+", "+oR[1]+", "+oR[2]+", "+oR[3]+")"};T.frob=function(oR){return(Math.sqrt(Math.pow(oR[0],2)+Math.pow(oR[1],2)+Math.pow(oR[2],2)+Math.pow(oR[3],2)))};T.LDU=function(oR,oU,oT,oS){oR[2]=oS[2]/oS[0];oT[0]=oS[0];oT[1]=oS[1];oT[3]=oS[3]-oR[2]*oT[1];return[oR,oU,oT]};oM.mat2=T;var e={};e.create=function(oS){oS=oS||i;var oR=new oS(16);oR[0]=1;oR[1]=0;oR[2]=0;oR[3]=0;oR[4]=0;oR[5]=1;oR[6]=0;oR[7]=0;oR[8]=0;oR[9]=0;oR[10]=1;oR[11]=0;oR[12]=0;oR[13]=0;oR[14]=0;oR[15]=1;return oR};e.clone=function(oR){var oS=new i(16);oS[0]=oR[0];oS[1]=oR[1];oS[2]=oR[2];oS[3]=oR[3];oS[4]=oR[4];oS[5]=oR[5];oS[6]=oR[6];oS[7]=oR[7];oS[8]=oR[8];oS[9]=oR[9];oS[10]=oR[10];oS[11]=oR[11];oS[12]=oR[12];oS[13]=oR[13];oS[14]=oR[14];oS[15]=oR[15];return oS};e.copy=function(oS,oR){oS[0]=oR[0];oS[1]=oR[1];oS[2]=oR[2];oS[3]=oR[3];oS[4]=oR[4];oS[5]=oR[5];oS[6]=oR[6];oS[7]=oR[7];oS[8]=oR[8];oS[9]=oR[9];oS[10]=oR[10];oS[11]=oR[11];oS[12]=oR[12];oS[13]=oR[13];oS[14]=oR[14];oS[15]=oR[15];return oS};e.identity=function(oR){oR[0]=1;oR[1]=0;oR[2]=0;oR[3]=0;oR[4]=0;oR[5]=1;oR[6]=0;oR[7]=0;oR[8]=0;oR[9]=0;oR[10]=1;oR[11]=0;oR[12]=0;oR[13]=0;oR[14]=0;oR[15]=1;return oR};e.transpose=function(oU,oT){if(oU===oT){var oY=oT[1],oW=oT[2],oV=oT[3],oR=oT[6],oX=oT[7],oS=oT[11];oU[1]=oT[4];oU[2]=oT[8];oU[3]=oT[12];oU[4]=oY;oU[6]=oT[9];oU[7]=oT[13];oU[8]=oW;oU[9]=oR;oU[11]=oT[14];oU[12]=oV;oU[13]=oX;oU[14]=oS}else{oU[0]=oT[0];oU[1]=oT[4];oU[2]=oT[8];oU[3]=oT[12];oU[4]=oT[1];oU[5]=oT[5];oU[6]=oT[9];oU[7]=oT[13];oU[8]=oT[2];oU[9]=oT[6];oU[10]=oT[10];oU[11]=oT[14];oU[12]=oT[3];oU[13]=oT[7];oU[14]=oT[11];oU[15]=oT[15]}return oU};e.invert=function(pa,pf){var pj=pf[0],ph=pf[1],pg=pf[2],pd=pf[3],oV=pf[4],oU=pf[5],oT=pf[6],oS=pf[7],o9=pf[8],o8=pf[9],o7=pf[10],o6=pf[11],pl=pf[12],pk=pf[13],pi=pf[14],pe=pf[15],o5=pj*oU-ph*oV,o4=pj*oT-pg*oV,o3=pj*oS-pd*oV,o2=ph*oT-pg*oU,o1=ph*oS-pd*oU,o0=pg*oS-pd*oT,oZ=o9*pk-o8*pl,oY=o9*pi-o7*pl,oX=o9*pe-o6*pl,oW=o8*pi-o7*pk,pc=o8*pe-o6*pk,pb=o7*pe-o6*pi,oR=o5*pb-o4*pc+o3*oW+o2*oX-o1*oY+o0*oZ;if(!oR){return null}oR=1/oR;pa[0]=(oU*pb-oT*pc+oS*oW)*oR;pa[1]=(pg*pc-ph*pb-pd*oW)*oR;pa[2]=(pk*o0-pi*o1+pe*o2)*oR;pa[3]=(o7*o1-o8*o0-o6*o2)*oR;pa[4]=(oT*oX-oV*pb-oS*oY)*oR;pa[5]=(pj*pb-pg*oX+pd*oY)*oR;pa[6]=(pi*o3-pl*o0-pe*o4)*oR;pa[7]=(o9*o0-o7*o3+o6*o4)*oR;pa[8]=(oV*pc-oU*oX+oS*oZ)*oR;pa[9]=(ph*oX-pj*pc-pd*oZ)*oR;pa[10]=(pl*o1-pk*o3+pe*o5)*oR;pa[11]=(o8*o3-o9*o1-o6*o5)*oR;pa[12]=(oU*oY-oV*oW-oT*oZ)*oR;pa[13]=(pj*oW-ph*oY+pg*oZ)*oR;pa[14]=(pk*o4-pl*o2-pi*o5)*oR;pa[15]=(o9*o2-o8*o4+o7*o5)*oR;return pa};e.adjoint=function(oZ,o2){var o6=o2[0],o4=o2[1],o3=o2[2],o0=o2[3],oU=o2[4],oT=o2[5],oS=o2[6],oR=o2[7],oY=o2[8],oX=o2[9],oW=o2[10],oV=o2[11],o8=o2[12],o7=o2[13],o5=o2[14],o1=o2[15];oZ[0]=(oT*(oW*o1-oV*o5)-oX*(oS*o1-oR*o5)+o7*(oS*oV-oR*oW));oZ[1]=-(o4*(oW*o1-oV*o5)-oX*(o3*o1-o0*o5)+o7*(o3*oV-o0*oW));oZ[2]=(o4*(oS*o1-oR*o5)-oT*(o3*o1-o0*o5)+o7*(o3*oR-o0*oS));oZ[3]=-(o4*(oS*oV-oR*oW)-oT*(o3*oV-o0*oW)+oX*(o3*oR-o0*oS));oZ[4]=-(oU*(oW*o1-oV*o5)-oY*(oS*o1-oR*o5)+o8*(oS*oV-oR*oW));oZ[5]=(o6*(oW*o1-oV*o5)-oY*(o3*o1-o0*o5)+o8*(o3*oV-o0*oW));oZ[6]=-(o6*(oS*o1-oR*o5)-oU*(o3*o1-o0*o5)+o8*(o3*oR-o0*oS));oZ[7]=(o6*(oS*oV-oR*oW)-oU*(o3*oV-o0*oW)+oY*(o3*oR-o0*oS));oZ[8]=(oU*(oX*o1-oV*o7)-oY*(oT*o1-oR*o7)+o8*(oT*oV-oR*oX));oZ[9]=-(o6*(oX*o1-oV*o7)-oY*(o4*o1-o0*o7)+o8*(o4*oV-o0*oX));oZ[10]=(o6*(oT*o1-oR*o7)-oU*(o4*o1-o0*o7)+o8*(o4*oR-o0*oT));oZ[11]=-(o6*(oT*oV-oR*oX)-oU*(o4*oV-o0*oX)+oY*(o4*oR-o0*oT));oZ[12]=-(oU*(oX*o5-oW*o7)-oY*(oT*o5-oS*o7)+o8*(oT*oW-oS*oX));oZ[13]=(o6*(oX*o5-oW*o7)-oY*(o4*o5-o3*o7)+o8*(o4*oW-o3*oX));oZ[14]=-(o6*(oT*o5-oS*o7)-oU*(o4*o5-o3*o7)+o8*(o4*oS-o3*oT));oZ[15]=(o6*(oT*oW-oS*oX)-oU*(o4*oW-o3*oX)+oY*(o4*oS-o3*oT));return oZ};e.determinant=function(pc){var ph=pc[0],pf=pc[1],pd=pc[2],pb=pc[3],oU=pc[4],oT=pc[5],oS=pc[6],oR=pc[7],o8=pc[8],o7=pc[9],o6=pc[10],o5=pc[11],pj=pc[12],pi=pc[13],pg=pc[14],pe=pc[15],o4=ph*oT-pf*oU,o3=ph*oS-pd*oU,o2=ph*oR-pb*oU,o1=pf*oS-pd*oT,o0=pf*oR-pb*oT,oZ=pd*oR-pb*oS,oY=o8*pi-o7*pj,oX=o8*pg-o6*pj,oW=o8*pe-o5*pj,oV=o7*pg-o6*pi,pa=o7*pe-o5*pi,o9=o6*pe-o5*pg;return o4*o9-o3*pa+o2*oV+o1*oW-o0*oX+oZ*oY};e.multiply=function(o3,o7,o4){var pb=o7[0],pa=o7[1],o8=o7[2],o5=o7[3],oX=o7[4],oV=o7[5],oT=o7[6],oR=o7[7],o2=o7[8],o1=o7[9],o0=o7[10],oZ=o7[11],pd=o7[12],pc=o7[13],o9=o7[14],o6=o7[15];var oY=o4[0],oW=o4[1],oU=o4[2],oS=o4[3];o3[0]=oY*pb+oW*oX+oU*o2+oS*pd;o3[1]=oY*pa+oW*oV+oU*o1+oS*pc;o3[2]=oY*o8+oW*oT+oU*o0+oS*o9;o3[3]=oY*o5+oW*oR+oU*oZ+oS*o6;oY=o4[4];oW=o4[5];oU=o4[6];oS=o4[7];o3[4]=oY*pb+oW*oX+oU*o2+oS*pd;o3[5]=oY*pa+oW*oV+oU*o1+oS*pc;o3[6]=oY*o8+oW*oT+oU*o0+oS*o9;o3[7]=oY*o5+oW*oR+oU*oZ+oS*o6;oY=o4[8];oW=o4[9];oU=o4[10];oS=o4[11];o3[8]=oY*pb+oW*oX+oU*o2+oS*pd;o3[9]=oY*pa+oW*oV+oU*o1+oS*pc;o3[10]=oY*o8+oW*oT+oU*o0+oS*o9;o3[11]=oY*o5+oW*oR+oU*oZ+oS*o6;oY=o4[12];oW=o4[13];oU=o4[14];oS=o4[15];o3[12]=oY*pb+oW*oX+oU*o2+oS*pd;o3[13]=oY*pa+oW*oV+oU*o1+oS*pc;o3[14]=oY*o8+oW*oT+oU*o0+oS*o9;o3[15]=oY*o5+oW*oR+oU*oZ+oS*o6;return o3};e.mul=e.multiply;e.translate=function(o3,o5,oY){var oX=oY[0],oW=oY[1],oV=oY[2],o8,o7,o6,o4,oU,oT,oS,oR,o2,o1,o0,oZ;if(o5===o3){o3[12]=o5[0]*oX+o5[4]*oW+o5[8]*oV+o5[12];o3[13]=o5[1]*oX+o5[5]*oW+o5[9]*oV+o5[13];o3[14]=o5[2]*oX+o5[6]*oW+o5[10]*oV+o5[14];o3[15]=o5[3]*oX+o5[7]*oW+o5[11]*oV+o5[15]}else{o8=o5[0];o7=o5[1];o6=o5[2];o4=o5[3];oU=o5[4];oT=o5[5];oS=o5[6];oR=o5[7];o2=o5[8];o1=o5[9];o0=o5[10];oZ=o5[11];o3[0]=o8;o3[1]=o7;o3[2]=o6;o3[3]=o4;o3[4]=oU;o3[5]=oT;o3[6]=oS;o3[7]=oR;o3[8]=o2;o3[9]=o1;o3[10]=o0;o3[11]=oZ;o3[12]=o8*oX+oU*oW+o2*oV+o5[12];o3[13]=o7*oX+oT*oW+o1*oV+o5[13];o3[14]=o6*oX+oS*oW+o0*oV+o5[14];o3[15]=o4*oX+oR*oW+oZ*oV+o5[15]}return o3};e.scale=function(oU,oS,oT){var oR=oT[0],oW=oT[1],oV=oT[2];oU[0]=oS[0]*oR;oU[1]=oS[1]*oR;oU[2]=oS[2]*oR;oU[3]=oS[3]*oR;oU[4]=oS[4]*oW;oU[5]=oS[5]*oW;oU[6]=oS[6]*oW;oU[7]=oS[7]*oW;oU[8]=oS[8]*oV;oU[9]=oS[9]*oV;oU[10]=oS[10]*oV;oU[11]=oS[11]*oV;oU[12]=oS[12];oU[13]=oS[13];oU[14]=oS[14];oU[15]=oS[15];return oU};e.rotate=function(pb,pi,pk,oR){var o1=oR[0],o0=oR[1],oZ=oR[2],pc=Math.sqrt(o1*o1+o0*o0+oZ*oZ),o6,pg,o5,pm,pl,pj,ph,oY,oX,oW,oV,pa,o9,o8,o7,o4,o3,o2,pf,pe,pd,oU,oT,oS;if(Math.abs(pc)<oQ){return null}pc=1/pc;o1*=pc;o0*=pc;oZ*=pc;o6=Math.sin(pk);pg=Math.cos(pk);o5=1-pg;pm=pi[0];pl=pi[1];pj=pi[2];ph=pi[3];oY=pi[4];oX=pi[5];oW=pi[6];oV=pi[7];pa=pi[8];o9=pi[9];o8=pi[10];o7=pi[11];o4=o1*o1*o5+pg;o3=o0*o1*o5+oZ*o6;o2=oZ*o1*o5-o0*o6;pf=o1*o0*o5-oZ*o6;pe=o0*o0*o5+pg;pd=oZ*o0*o5+o1*o6;oU=o1*oZ*o5+o0*o6;oT=o0*oZ*o5-o1*o6;oS=oZ*oZ*o5+pg;pb[0]=pm*o4+oY*o3+pa*o2;pb[1]=pl*o4+oX*o3+o9*o2;pb[2]=pj*o4+oW*o3+o8*o2;pb[3]=ph*o4+oV*o3+o7*o2;pb[4]=pm*pf+oY*pe+pa*pd;pb[5]=pl*pf+oX*pe+o9*pd;pb[6]=pj*pf+oW*pe+o8*pd;pb[7]=ph*pf+oV*pe+o7*pd;pb[8]=pm*oU+oY*oT+pa*oS;pb[9]=pl*oU+oX*oT+o9*oS;pb[10]=pj*oU+oW*oT+o8*oS;pb[11]=ph*oU+oV*oT+o7*oS;if(pi!==pb){pb[12]=pi[12];pb[13]=pi[13];pb[14]=pi[14];pb[15]=pi[15]}return pb};e.rotateX=function(oR,oY,oX){var o3=Math.sin(oX),oW=Math.cos(oX),o2=oY[4],o1=oY[5],o0=oY[6],oZ=oY[7],oV=oY[8],oU=oY[9],oT=oY[10],oS=oY[11];if(oY!==oR){oR[0]=oY[0];oR[1]=oY[1];oR[2]=oY[2];oR[3]=oY[3];oR[12]=oY[12];oR[13]=oY[13];oR[14]=oY[14];oR[15]=oY[15]}oR[4]=o2*oW+oV*o3;oR[5]=o1*oW+oU*o3;oR[6]=o0*oW+oT*o3;oR[7]=oZ*oW+oS*o3;oR[8]=oV*oW-o2*o3;oR[9]=oU*oW-o1*o3;oR[10]=oT*oW-o0*o3;oR[11]=oS*oW-oZ*o3;return oR};e.rotateY=function(oV,o2,o1){var o3=Math.sin(o1),o0=Math.cos(o1),oU=o2[0],oT=o2[1],oS=o2[2],oR=o2[3],oZ=o2[8],oY=o2[9],oX=o2[10],oW=o2[11];if(o2!==oV){oV[4]=o2[4];oV[5]=o2[5];oV[6]=o2[6];oV[7]=o2[7];oV[12]=o2[12];oV[13]=o2[13];oV[14]=o2[14];oV[15]=o2[15]}oV[0]=oU*o0-oZ*o3;oV[1]=oT*o0-oY*o3;oV[2]=oS*o0-oX*o3;oV[3]=oR*o0-oW*o3;oV[8]=oU*o3+oZ*o0;oV[9]=oT*o3+oY*o0;oV[10]=oS*o3+oX*o0;oV[11]=oR*o3+oW*o0;return oV};e.rotateZ=function(oV,oY,oX){var o3=Math.sin(oX),oW=Math.cos(oX),oU=oY[0],oT=oY[1],oS=oY[2],oR=oY[3],o2=oY[4],o1=oY[5],o0=oY[6],oZ=oY[7];if(oY!==oV){oV[8]=oY[8];oV[9]=oY[9];oV[10]=oY[10];oV[11]=oY[11];oV[12]=oY[12];oV[13]=oY[13];oV[14]=oY[14];oV[15]=oY[15]}oV[0]=oU*oW+o2*o3;oV[1]=oT*oW+o1*o3;oV[2]=oS*oW+o0*o3;oV[3]=oR*oW+oZ*o3;oV[4]=o2*oW-oU*o3;oV[5]=o1*oW-oT*o3;oV[6]=o0*oW-oS*o3;oV[7]=oZ*oW-oR*o3;return oV};e.fromRotationTranslation=function(o4,o2,o0){var oX=o2[0],oW=o2[1],oV=o2[2],oY=o2[3],o5=oX+oX,oR=oW+oW,oZ=oV+oV,oU=oX*o5,oT=oX*oR,oS=oX*oZ,o3=oW*oR,o1=oW*oZ,o8=oV*oZ,o9=oY*o5,o7=oY*oR,o6=oY*oZ;o4[0]=1-(o3+o8);o4[1]=oT+o6;o4[2]=oS-o7;o4[3]=0;o4[4]=oT-o6;o4[5]=1-(oU+o8);o4[6]=o1+o9;o4[7]=0;o4[8]=oS+o7;o4[9]=o1-o9;o4[10]=1-(oU+o3);o4[11]=0;o4[12]=o0[0];o4[13]=o0[1];o4[14]=o0[2];o4[15]=1;return o4};e.fromQuat=function(o1,oY){var oV=oY[0],oU=oY[1],oT=oY[2],oW=oY[3],o2=oV+oV,oR=oU+oU,oX=oT+oT,oS=oV*o2,o0=oU*o2,oZ=oU*oR,o8=oT*o2,o7=oT*oR,o5=oT*oX,o6=oW*o2,o4=oW*oR,o3=oW*oX;o1[0]=1-oZ-o5;o1[1]=o0+o3;o1[2]=o8-o4;o1[3]=0;o1[4]=o0-o3;o1[5]=1-oS-o5;o1[6]=o7+o6;o1[7]=0;o1[8]=o8+o4;o1[9]=o7-o6;o1[10]=1-oS-oZ;o1[11]=0;o1[12]=0;o1[13]=0;o1[14]=0;o1[15]=1;return o1};e.frustum=function(oV,oS,o0,oR,oZ,oX,oW){var oY=1/(o0-oS),oU=1/(oZ-oR),oT=1/(oX-oW);oV[0]=(oX*2)*oY;oV[1]=0;oV[2]=0;oV[3]=0;oV[4]=0;oV[5]=(oX*2)*oU;oV[6]=0;oV[7]=0;oV[8]=(o0+oS)*oY;oV[9]=(oZ+oR)*oU;oV[10]=(oW+oX)*oT;oV[11]=-1;oV[12]=0;oV[13]=0;oV[14]=(oW*oX*2)*oT;oV[15]=0;return oV};e.perspective=function(oU,oT,oS,oV,oR){var oX=1/Math.tan(oT/2),oW=1/(oV-oR);oU[0]=oX/oS;oU[1]=0;oU[2]=0;oU[3]=0;oU[4]=0;oU[5]=oX;oU[6]=0;oU[7]=0;oU[8]=0;oU[9]=0;oU[10]=(oR+oV)*oW;oU[11]=-1;oU[12]=0;oU[13]=0;oU[14]=(2*oR*oV)*oW;oU[15]=0;return oU};e.ortho=function(oU,oS,o0,oR,oY,oX,oW){var oV=1/(oS-o0),oZ=1/(oR-oY),oT=1/(oX-oW);oU[0]=-2*oV;oU[1]=0;oU[2]=0;oU[3]=0;oU[4]=0;oU[5]=-2*oZ;oU[6]=0;oU[7]=0;oU[8]=0;oU[9]=0;oU[10]=2*oT;oU[11]=0;oU[12]=(oS+o0)*oV;oU[13]=(oY+oR)*oZ;oU[14]=(oW+oX)*oT;oU[15]=1;return oU};e.lookAt=function(o5,pc,pd,oX){var pb,pa,o8,oT,oS,oR,o0,oZ,oY,o6,o9=pc[0],o7=pc[1],o4=pc[2],oW=oX[0],oV=oX[1],oU=oX[2],o3=pd[0],o2=pd[1],o1=pd[2];if(Math.abs(o9-o3)<oQ&&Math.abs(o7-o2)<oQ&&Math.abs(o4-o1)<oQ){return e.identity(o5)}o0=o9-o3;oZ=o7-o2;oY=o4-o1;o6=1/Math.sqrt(o0*o0+oZ*oZ+oY*oY);o0*=o6;oZ*=o6;oY*=o6;pb=oV*oY-oU*oZ;pa=oU*o0-oW*oY;o8=oW*oZ-oV*o0;o6=Math.sqrt(pb*pb+pa*pa+o8*o8);if(!o6){pb=0;pa=0;o8=0}else{o6=1/o6;pb*=o6;pa*=o6;o8*=o6}oT=oZ*o8-oY*pa;oS=oY*pb-o0*o8;oR=o0*pa-oZ*pb;o6=Math.sqrt(oT*oT+oS*oS+oR*oR);if(!o6){oT=0;oS=0;oR=0}else{o6=1/o6;oT*=o6;oS*=o6;oR*=o6}o5[0]=pb;o5[1]=oT;o5[2]=o0;o5[3]=0;o5[4]=pa;o5[5]=oS;o5[6]=oZ;o5[7]=0;o5[8]=o8;o5[9]=oR;o5[10]=oY;o5[11]=0;o5[12]=-(pb*o9+pa*o7+o8*o4);o5[13]=-(oT*o9+oS*o7+oR*o4);o5[14]=-(o0*o9+oZ*o7+oY*o4);o5[15]=1;return o5};e.str=function(oR){return"mat4("+oR[0]+", "+oR[1]+", "+oR[2]+", "+oR[3]+", "+oR[4]+", "+oR[5]+", "+oR[6]+", "+oR[7]+", "+oR[8]+", "+oR[9]+", "+oR[10]+", "+oR[11]+", "+oR[12]+", "+oR[13]+", "+oR[14]+", "+oR[15]+")"};e.frob=function(oR){return(Math.sqrt(Math.pow(oR[0],2)+Math.pow(oR[1],2)+Math.pow(oR[2],2)+Math.pow(oR[3],2)+Math.pow(oR[4],2)+Math.pow(oR[5],2)+Math.pow(oR[6],2)+Math.pow(oR[6],2)+Math.pow(oR[7],2)+Math.pow(oR[8],2)+Math.pow(oR[9],2)+Math.pow(oR[10],2)+Math.pow(oR[11],2)+Math.pow(oR[12],2)+Math.pow(oR[13],2)+Math.pow(oR[14],2)+Math.pow(oR[15],2)))};oM.mat4=e})(nB);i5=nB.vec2;i4=nB.vec3;i2=nB.vec4;gh=nB.mat2;gc=nB.mat4;function dE(){this.result={bkData:[],eleData:[[],[],[],[],[],[],[],[],[],[]],tileLabels:[]}}hv.extend(dE.prototype,{createLayer:function(C,i){var e=this.result.bkData;if(!e[C]){e[C]=[[],[],[]]}this.updateLayer(C,i)},removeLayer:function(i){var e=this.result.bkData;e[i]=null},updateLayer:function(C,i){var e=this.result.bkData;if(!e[C]){return}i=i||{};e[C].tileTypeName=i.tileTypeName||"na";e[C].dataType=i.dataType||2;e[C].png8=i.png8||false;e[C].pack=i.pack||false;e[C].isTop=i.isTop||false;e[C].opacity=i.opacity||1;e[C].isLowText=i.isLowText||false;e[C].clipTile=i.clipTile||false;e[C].boundary=i.boundary||false;e[C].thumbUpsample=i.thumbUpsample||false;if(i.ontology){e[C].ontology=i.ontology}},updateLayerMeta:function(oK,C){var e=this.result.bkData;if(!e[oK]){return}C=C||{};var oL=Object.keys(C);for(var T=0;T<oL.length;T++){if(C.hasOwnProperty(oL[T])){e[oK][oL[T]]=C[oL[T]]}}},hasLayerBoundary:function(){var e=this.result.bkData;var C=false;for(var T=0;T<e.length;T++){if(e[T]&&e[T].boundary){C=true;break}}return C},getResult:function(){return this.result},setData:function(oL,oK,oM){var e=this.result.bkData;var C=e[oK]?e[oK][oM]:null;if(!C){return}for(var T=0;T<C.length;T++){if(C[T].key&&C[T].key===oL.key){C[T]=oL;return}}C.push(oL)},setLabelData:function(C,i){var e=this.result.tileLabels;e[i||0]=C},getLabelData:function(i){var e=this.result.tileLabels;if(i===undefined){return e}return e[i]||[]},clearLabelData:function(i){var e=this.result.tileLabels;if(i===undefined){e=[];return}e[i]=[]},setOverlayData:function(C,e,i){if(!this.result.eleData[e]){return}if(e>=2&&e<=4){this.result.eleData[e][i||0]=C;return}else{if(e===0||e===5||e===6){C.sort(function(oK,T){return oK.overlay.zIndex-T.overlay.zIndex})}}this.result.eleData[e]=C},clearLabelOverlayData:function(e){if(e===undefined){this.result.eleData[2]=[];this.result.eleData[3]=[];this.result.eleData[4]=[]}this.result.eleData[2][e]=[];this.result.eleData[3][e]=[];this.result.eleData[4][e]=[]},clearData:function(T){var e=this.result.bkData;if(typeof T==="number"){if(e[T]){e[T][0]=[];e[T][1]=[];e[T][2]=[]}return}for(var C=0;C<e.length;C++){if(!e[C]){continue}e[C][0]=[];e[C][1]=[];e[C][2]=[]}},sortThumbData:function(i){var e=this.result.bkData;var C=e[i];if(!C){return}if(C[0]&&C[0].length>0){C[0].sort(function(oK,T){return oK.tileInfo.useZoom-T.tileInfo.useZoom})}}});var jl=(function(){var oT=new Int8Array(4);var C=new Int32Array(oT.buffer,0,1);var oO=new Float32Array(oT.buffer,0,1);function oV(o2){C[0]=o2;return oO[0]}function i(o2){oO[0]=o2;return C[0]}function oP(o2){var o4=(o2[3]<<24|o2[2]<<16|o2[1]<<8|o2[0]);var o3=oV(o4&4278190079);return o3}var oK=0;var oN=1;var oR=2;var oZ=0;var oW=1;var oU=2;var oL=9;function oS(o2,o3){var o4;if(o3%2===0){o4=[-o2[1],o2[0]]}else{o4=[o2[1],-o2[0]]}return o4}function e(o2,o3,o4){var o5=oS(o2,o3);var o6;if(o4===oN){return o5}else{if(o3===4||o3===5){o6=[o5[0]-o2[0],o5[1]-o2[1]]}else{o6=[o5[0]+o2[0],o5[1]+o2[1]]}if(o4===oK){i5.normalize(o6,o6)}return o6}}function oY(o3,o2){return Math.sqrt(Math.pow(o3[0]-o2[0],2)+Math.pow(o3[1]-o2[1],2))}function T(o6,o5,o4,o2){var o3=i5.dot(o6,o5);if(o4===oU||o4===oW){if((o2===0||o2===1)&&o3>0){return true}else{if((o2===2||o2===3)&&o3<0){return true}}}if((o2===0||o2===1)&&o3<0){return true}else{if((o2===2||o2===3)&&o3>0){return true}}return false}function oQ(o3,o8,pa){var o9=oS(o3,o8);var o5;var o7=o3;var o6=pa;var pc=[];i5.normalize(pc,[o7[0]+o6[0],o7[1]+o6[1]]);var pb=i5.dot(o9,[-pc[1],pc[0]]);if(Math.abs(pb)<0.1){pb=1}var o4=1/pb;o5=[-pc[1]*o4,pc[0]*o4];var o2=i5.dot(o3,o5);if(o2<0){i5.negate(o5,o5)}return{cos2:o2,offset:o5}}function o1(o3,o8,pa,o2){var o9=oS(o3,o8);var o7;var o6;var o5;if(o8===0||o8===1){o7=pa;o6=o3}else{o7=o3;o6=pa}if(!o7||!o6){return o9}var pc=[o7[0]+o6[0],o7[1]+o6[1]];if(pc[0]===0&&pc[1]===0){i5.normalize(pc,o6)}else{i5.normalize(pc,pc)}var pd=T(pc,o9,o2,o8);if(pd){return o9}var pb=i5.dot(o9,[-pc[1],pc[0]]);if(Math.abs(pb)<0.1){pb=1}var o4=1/pb;o5=[-pc[1]*o4,pc[0]*o4];return o5}function o0(pd,pe,o7,o6,pg,pc,o5,o8,o4,pb){var pa;var o3=0;var o2=false;pa=pc.length/oL-1;function pf(ph){if(o8 instanceof Array){ph=Math.max(0,Math.min(ph,o8.length-1));return o8[ph]}else{return o8}}oM(pe[0],pd[0],o7[0],pg,o6,4,pf(0),o4,undefined,pc,pb);pa++;o3++;oM(pe[0],pd[0],o7[0],pg,o6,5,pf(0),o4,undefined,pc,pb);pa++;o3++;for(var o9=0;o9<pd.length;o9++){oM(pe[o9],pd[o9],o7[o9],pg,o6,0,pf(o9),o4,pd[o9-1],pc,pb);oX(o5,++pa,++o3,o2);oM(pe[o9],pd[o9],o7[o9],pg,o6,1,pf(o9),o4,pd[o9-1],pc,pb);oX(o5,++pa,++o3,o2);oM(pe[o9+1],pd[o9],o7[o9+1],pg,o6,2,pf(o9+1),o4,pd[o9+1],pc,pb);oX(o5,++pa,++o3,o2);oM(pe[o9+1],pd[o9],o7[o9+1],pg,o6,3,pf(o9+1),o4,pd[o9+1],pc,pb);oX(o5,++pa,++o3,o2);if(o6===oW&&o9!==pd.length-1){oM(pe[o9+1],pd[o9],o7[o9+1],pg,o6,8,pf(o9+1),o4,pd[o9+1],pc,pb);oX(o5,++pa,++o3,o2);o2=o2?false:true}}oM(pe[pe.length-1],pd[pd.length-1],o7[pe.length-1],pg,o6,6,pf(pe.length-1),o4,undefined,pc,pb);oX(o5,++pa,++o3,o2);oM(pe[pe.length-1],pd[pd.length-1],o7[pe.length-1],pg,o6,7,pf(pe.length-1),o4,undefined,pc,pb);oX(o5,++pa,++o3,o2)}function oM(pf,o5,o9,pg,o4,pa,o7,o3,pd,pc,pb){var pe=pa%2===0?1:-1;var o8;if(pa===4||pa===5||pa===6||pa===7){o8=e(o5,pa,pg)}else{if(pa===0||pa===1||pa===2||pa===3){o8=o1(o5,pa,pd,o4)}else{if(pa===8){var o6=oQ(o5,pa,pd);o8=o6.offset;i5.normalize(o8,o8);var o2=o6.cos2;if(o2<0){pe=-pe}}}}pc[pc.length]=pf[0]*10;pc[pc.length]=pf[1]*10;pc[pc.length]=o8[0]*o3*10;pc[pc.length]=o8[1]*o3*10;pc[pc.length]=o7;pc[pc.length]=pe;pc[pc.length]=0;pc[pc.length]=pb||0;pc[pc.length]=o9}function oX(o6,o4,o2,o5){var o3;if(o2%2===0){if(o5){o6[o6.length]=o4-2;o6[o6.length]=o4-1;o6[o6.length]=o4}else{o6[o6.length]=o4-1;o6[o6.length]=o4-2;o6[o6.length]=o4}}else{if(o5){o6[o6.length]=o4-1;o6[o6.length]=o4-2;o6[o6.length]=o4}else{o6[o6.length]=o4-2;o6[o6.length]=o4-1;o6[o6.length]=o4}}}return{getVertexCount:function(o3,o2){if(o2===oW){return o3*5-2}else{return o3*4}},buildData:function(pf,o4,pg,pa,o2,o7,o3,pb,pd){var pc=[];var o9=pd?pd:0;var o6=[o9*10];for(var o8=0;o8<pf.length;o8++){if(o8>0){o9+=oY(pf[o8],pf[o8-1]);o6.push(o9*10)}if(o8!==pf.length-1){var o5=[pf[o8+1][0]-pf[o8][0],pf[o8+1][1]-pf[o8][1]];var pi=[];if(o5[0]===0&&o5[1]===0){pi=[0,0]}else{i5.normalize(pi,o5)}pc[pc.length]=[pi[0],pi[1]]}}var ph;if(o7[0] instanceof Array){for(var o8=0;o8<o7.length;o8++){var pe=oP(o7[o8]);if(!ph){ph=[pe]}else{ph.push(pe)}}}else{ph=oP(o7)}return o0(pc,pf,o6,o4,pg,pa,o2,ph,o3,pb)},toTileSolidLineVertices:function(o6,o3){var o4=new Float32Array(o6.length/oL*5);var o2=new Int16Array(o4.buffer);var o8=0;var o5=0;for(var o7=0;o7<o6.length;o7+=oL){o2[o8]=~~o6[o7];o2[o8+1]=~~o6[o7+1];o2[o8+2]=~~o6[o7+2];o2[o8+3]=~~o6[o7+3];o4[o5+2]=o6[o7+4];o2[o8+6]=o6[o7+5];o2[o8+7]=o3?o3:0;o2[o8+8]=o6[o7+7];o2[o8+9]=0;o8+=10;o5+=5}return o4}}})();var jK=1;var lf=2;var k1=false;if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){k1=true}var hQ={drawIndex:0,devicePixelRatio:ja(),zoomState:1,curViewTilesInfo:null,iconSetImg:null,LAST_CALC_ZOOM:-1,LAST_LOAD_VECTOR_ZOOM_CHANGE:false,lastCollisionTestTime:0,watermarkTileKeys:[],remove:function(){this.tileCache.clear();this._lastScreenTiles=null;this.removeLabel(this.drawIndex);if(this.tileLabels){this.tileLabels=[]}},removeLabel:function(i){if(this.dataType===2&&((this.tileType&&this.tileType.getName()==="na")||(this.ontology&&this.ontology instanceof gg))){this.map._featureMgr.clearData(i);this.map._featureMgr.clearLabelOverlayData(i);this.map._featureMgr.clearLabelData(i);var C=new ix("onspotsdataremove");C.index=i;this.map.dispatchEvent(C);if(this.ontology&&(this.ontology instanceof gg||this.ontology instanceof fl)){this.clearCache();return}var e=new ix("onlayer_update");e.name="na";this.map.fire(e)}},initDrawData:function(){this.drawIndex=this.zIndex;var e={tileTypeName:this.tileType.getName(),dataType:this.dataType,png8:this.png8,pack:this.pack,isTop:this.isTop||false,opacity:this.opacity,isLowText:this.isLowText||false,clipTile:this.clipTile,boundary:this.boundary,thumbUpsample:this.thumbUpsample||false};if(this.ontology){e.ontology=this.ontology}this.map._featureMgr.createLayer(this.drawIndex,e);this.dispatchEvent(new ix("oninitDrawData"))},destroyDrawData:function(){this.map._featureMgr.removeLayer(this.drawIndex);var i=new ix("onremoveLayerMask");i.hasLayerBoundary=this.map._featureMgr.hasLayerBoundary();this.map.dispatchEvent(i)},setZIndex:function(oN){oN=Math.abs(Math.floor(oN))||1;if(!oN||oN===this.zIndex){return}var oK=this.map._featureMgr.result.bkData;var T=this.map.tileMgr.tileLayers;var oP=this.map._normalLayerMgr.layers;function oQ(oV){var oT=null;var oU=[T,oP];for(var oR=0;oR<oU.length;oR++){for(var oS=0;oS<oU[oR].length;oS++){if(oU[oR][oS].zIndex===oV){oT=oU[oR][oS];break}}if(oT){break}}return oT}var C=[];var oM=[];var oO=this.zIndex;var i=oQ(oN);if(oK[oN]&&i){C.push(i);oM.push(oK[oN]);this.setTargetZIndex(oN);oK[oN]=oK[oO];oK[oO]=null}else{this.setTargetZIndex(oN);oK[oN]=oK[oO];oK[oO]=null;this.map.dispatchEvent(new ix("onupdate"));return}var oL=oN+1;while(oL){var e=oQ(oL);if(oK[oL]&&e){C.push(e);oM.push(oK[oL]);C.shift().setTargetZIndex(oL);oK[oL]=oM.shift();oL+=1}else{C.shift().setTargetZIndex(oL);oK[oL]=oM.shift();oL=0}}this.map.dispatchEvent(new ix("onupdate"))},setZIndexTop:function(){var e=this.map._featureMgr.result.bkData;e[e.length]=e[this.zIndex];e[this.zIndex]=null;this.setTargetZIndex(e.length-1);this.map.dispatchEvent(new ix("onrefresh"))},setUpLevel:function(){var e=this._getAdjoinZIndex("up");if(this.zIndex!==e){this.setZIndex(e)}},setDownLevel:function(){var e=this._getAdjoinZIndex("down");if(this.zIndex!==e){this.setZIndex(e)}},getTileKey:function(e,T){T=T||{};var i=typeof T.useZoom==="number"?T.useZoom:e.useZoom;var C=e.style||this.mapStyleId||"default";return this.mapType+"_"+C+"_"+e.col+"_"+e.row+"_"+e.zoom+"_"+i},getTileRenderDataKey:function(i){var C=i.col;var T=i.zoom;var e=i.baseTileSize;C=hz.calcLoopParam(C,T,e).col;return this.mapType+"_"+C+"_"+i.row+"_"+T+"_"+i.useZoom},getTileUnits:function(e){var T=this.map;var C=gA[T.getMapTypeId()];var i=C.baseUnits*Math.pow(2,C.zoomLevelBase-e);return i},getTilesUrl:function(oT,e,oW){var oK=oT.x;var oM=oT.y;var oU=oe("ditu","normal");var T=oU.ver;var oL=oU.udt;oK=hz.calcLoopParam(oK,e,oW).col;var oV=this.map._displayOptions.language;var oQ=this.map._displayOptions.isEn;var oS=this.map._displayOptions.isMultiLanguage;var oX=gA.B_NORMAL_MAP.languageTileUrls(oV);var oN=Math.abs(oK+oM)%oX.length;var oR=oX[oN];if(window.offLineIPAddress){oX=[window.offLineIPAddress+"pvd/"];oR=oX[0]}var oO="x="+oK+"&y="+oM+"&z="+Math.floor(e);var oP=this.devicePixelRatio>1?"&scaler=2":"";var i="&textimg=1";if(this.map.config.textRenderType==="canvas"){i="&textimg=0"}var oY=this.map.config.style;if(typeof oY==="string"&&oY!=="default"){oO+="&styleId="+K.mapStyleNameIdPair[oY]}oO+="&styles=pl"+i+oP+"&v="+T+"&udt="+oL+"&json=0";var C=oR+"?qt=vtile&v="+ep()+"&param="+window.encodeURIComponent(hq(oO))+"&ak="+hj+"&is_has_bmap_proxy="+k1;if(oQ){if(oS){C+="&language="+oV+"&multi_lang_version=1&single_lang=0"}else{C+="&single_lang=1"}}return C},getRasterTilesUrl:function(C,oL,T){var oK=gA[this.map.mapType];var i=this.map.config.style;var e=oK.tileUrls[Math.abs(oL+C)%oK.tileUrls.length]+"?qt=tile&x="+C+"&y="+oL+"&z="+T+((i==="default"||typeof i!=="string")?"":("&styleId="+K.mapStyleNameIdPair[i]))+"&styles=pl&udt="+this.normalUdt+"&scaler="+this.scaler+"&p=1";e=e.replace(/-(\d+)/gi,"M$1");return e},getZoomState:function(){var C=this.map;var i=C.getZoom();var e=i-this.lastZoom;if(e>0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState},releaseOutViewTileData:function(e){var oK=this.map._workerMgr.releasePendingData(e);for(var T=0,C=oK.length;T<C;T++){var oL=this.getTileKey(oK[T]);this.tileCache.removeData(oL);this._checkTilesLoaded()}},loadLayerData:function(e,T,i){this.hasZoomChange=i;this.curViewTilesInfo=e;if(this.ontology instanceof gg){this.loadTileData&&this.loadTileData(e,T);return}if(this.ontology instanceof fl){this.loadTileData&&this.loadTileData(e,T);return}this.mapStyleId=this.map.getMapStyleId();this.releaseOutViewTileData(e);var C=this.getZoomState();if(this.dataType===lf){if(T){this.getVectorLayerDataFromCache(e,C)}else{this.loadVectorLayerData(e)}}else{this.loadRasterLayerData(e,T)}},getVectorLayerDataFromCache:function(oP,o0){if(!this.map||this.map._destroyed||!this.map._customLabelMgr){return}this.map.temp.isPermitSpotOver=false;this.tileLabels=[];var o3=this.map._displayOptions;if(this.mapType===lg){var oT=this.map._customLabelMgr.virtualTiles.custom;if(oT&&oT instanceof Array){for(var oY=0;oY<oT.length;oY++){this.tileLabels.push(oT[oY].label);if(!oT[oY].label.iconReady){var oV=false;var o2=oT[oY].label.fixedLabel;for(var oX=0;oX<o2.length;oX++){var oO=o2[oX];if(!oO.iconPos){continue}else{if(!oO.iconPos.texcoord){oV=true;break}}}if(!oV){oT[oY].label.iconReady=true}else{oT[oY].label.iconReady=false;this.updateAllIconsTextureCoords(oT[oY])}}}}}this.thumbCache={};var o1=-1;for(var oY=0,oU=oP.length;oY<oU;oY++){var oZ=oP[oY];var oK=oZ.col;var oL=oZ.row;var C=oZ.zoom;var oW=this._getTileTexImgKey(oZ);var T=oZ.useZoom;o1=C;var oM=this.getTileKey(oZ);var o5=this.tileCache.getData(oM);if(o5&&o5.status==="ready"){var o6=o5;this.map._featureMgr.setData(o5,this.drawIndex,2);if(o3.poi&&o5.label){if(o5.label.status==="ready"){o5.label.tileInfo=o5.tileInfo;this.tileLabels.push(o5.label);if(o5.label.textureSources&&o5.label.textureSources[T]&&this.map._webglMapScene){var o4=this.map._webglMapScene._painter;if(!o4._labelTextureAtlasOffset[oW]){o4._addToAsyncJob(o5.label.textureSources[T])}}}else{if(o5.label.status!=="processing"){this.processLabelData(o5)}}}}else{if(this.useThumbData){if(this.thumbUpsample){this._setThumbDataUpsample(oK,oL,C,T,o0,oM,oZ)}else{this._setDumbTileData(oM,oZ);this.setThumbData(oK,oL,C,T,o0)}}else{this._setDumbTileData(oM,oZ)}}}this.tileLabels.labelZoom=o1;this.updateLabels(o0);var oQ=this.map.getZoom();var oN=Math.floor(oQ);var oS=oQ-oN;var oR=Math.floor(this.LAST_CALC_ZOOM);var e=this.LAST_CALC_ZOOM-oR;var o7=false;if(this.hasZoomChange){if(Math.abs(oQ-this.LAST_CALC_ZOOM)>=0.5){o7=true}else{if(oS<0.5&&e>=0.5){o7=true}else{if(oS>=0.5&&e<0.5){o7=true}}}if(o7){this.cacheDataCollideLabels(0)}this.LAST_CALC_ZOOM=oQ}else{if(this.tileLabels.length>0){this.cacheDataCollideLabels(hv.Browser.ie?50:30)}}},loadVectorLayerData:function(oP){this.map.temp.isPermitSpotOver=false;var oO=this;function oN(i,oS){var oV=oO.tileCache.getData(oS);if(!oV){return}if(!i||i.error){if(i.event){var oR=JSON.parse(i.event.msg||"{}");if(oR.status===403){if(c0.business===0&&c0.unauth===1){oO.watermarkTileKeys.push(oS);oO._checkTilesLoaded()}}cv.fetchDebug&&cv.fetchDebug.sendError({title:i.event.title,msg:i.event.msg,category:cv.fetchDebug.category.AJAX,level:cv.fetchDebug.levels.ERROR,url:i.event.title})}bj=true;if(oO.map.stickySpamCtrl&&c0.business===0&&c0.unauth===1){dZ(jC,{from:"vtile"});oO.map.stickySpamCtrl.update(jC)}var oU=new ix("ontileloaderror");i=i||{};oU.error=i.error||"";oU.message=i.message||"";oO.map.fire(oU);if(c0.business!==0||c0.unauth!==1){oV.status="init";oV.reloadTimer=setTimeout(function(){if(oV.retry<3){oV.retry++;oV.status="loading";oO.loadVectorTileData(i.tileInfo,oN)}else{oO.tileCache.removeData(oS);oO._checkTilesLoaded()}},4000)}if(oO.map._featureMgr){oO.map._featureMgr.clearData(oO.drawIndex)}oO.getVectorLayerDataFromCache(oO.curViewTilesInfo,oO.getZoomState());return}if(oV.reloadTimer){clearTimeout(oV.reloadTimer);oV.reloadTimer=null}var oQ=oO.map._displayOptions.language||"zh";var oT=i.tileInfo.language||"zh";if(oT!==oQ){oO.tileCache.removeData(oS);oO._checkTilesLoaded();return}oO.callbackDataQueue.push([i,oS]);if(oO.processDataTimer){return}oO.processDataTimer=setTimeout(function(){while(oO.callbackDataQueue.length>0){var oX=oO.callbackDataQueue.shift();var oY=oO.map._displayOptions.language||"zh";var oZ=oX[0].tileInfo.language||"zh";if(oZ!==oY){oO.tileCache.removeData(oS)}else{oO.vectorTileDataCbk(oX[0],oX[1])}oO._checkTilesLoaded()}if(oO.map._featureMgr){oO.map._featureMgr.clearData(oO.drawIndex)}oO.getVectorLayerDataFromCache(oO.curViewTilesInfo,oO.getZoomState());var oW=new ix("onrefresh");oW.source="webgllayer";oO.map.dispatchEvent(oW);oO.processDataTimer=null},200)}for(var oM=0,oK=oP.length;oM<oK;oM++){var C=oP[oM];var oL=this.getTileKey(C);var e=this.tileCache.getData(oL);if(!e){e={status:"init",tileInfo:C,dataType:lf,key:oL,retry:0}}if(e.status!=="ready"&&e.status!=="loading"){this.numLoading++;this.numTileLoading++;e.status="loading";this.tileCache.setData(oL,e);var T=this.getProcessedLabelZoom(C);if(T){C.processedLabelZooms=T}this.loadVectorTileData(C,oN)}}},setThumbData:function(C,oN,oL,i,oK){var oM=this.thumbParentDepth||8;var T=this.thumbChildDepth||3;var e=false;if(oK===1){e=this._findParentZoomTile(C,oN,oL,i,oM)!==false;if(!e){e=this._findChildZoomTile(C,oN,oL,i,T)!==false}}else{if(oK===-1){e=this._findChildZoomTile(C,oN,oL,i,T)!==false;if(!e){e=this._findParentZoomTile(C,oN,oL,i,oM)!==false}}}this.map._featureMgr.sortThumbData(this.drawIndex);return e},_setThumbDataUpsample:function(T,oQ,oP,e,oM,oN,i){if(oM!==1&&oM!==-1){return false}var C=this.thumbParentDepth||8;var oK=this.thumbChildDepth||3;var oO=false;var oL=false;if(oM===1){oO=this._findParentZoomTileUpsample(T,oQ,oP,e,C,oN,i)!==false;if(!oO){oL=this._findChildZoomTileUpsample(T,oQ,oP,e,oK)}}else{oL=this._findChildZoomTileUpsample(T,oQ,oP,e,oK);if(!oL){oO=this._findParentZoomTileUpsample(T,oQ,oP,e,C,oN,i)!==false}}if(!oO&&!oL){this._setDumbTileData(oN,i)}return oO},_findParentZoomTile:function(oM,oV,oU,oK,oP){var oL=gA[this.getMapType()];var C=oL.minDataZoom;var e=oM;var oS=oV;var oQ=oU;var oR=oK;for(var oO=1;oO<=oP;oO++){var T=this.tileType.getParentTile(e,oS,oQ,oR,C);if(T===null){continue}var oT=this.getTileKey(T);var oN=this.tileCache.getData(oT);if(oN&&oN.status==="ready"){if(this.thumbCache[oT]){continue}this.map._featureMgr.setData(oN,this.drawIndex,0);this.thumbCache[oT]=true;return true}e=T.col;oS=T.row;oQ=T.zoom;oR=T.useZoom}return false},_findChildZoomTile:function(C,oM,T,i,oL){var oK=gA[this.getMapType()];var e=this.thumbMaxZoom||oK.maxDataZoom;return this._findChildZoomTileRecursive(C,oM,T,i,oL,e)},_findChildZoomTileRecursive:function(T,oS,oQ,i,e,oP){if(e<=0){return false}var oO=this.tileType.getChildTiles(T,oS,oQ,i,oP,1);if(!oO){return false}var oK=true;for(var oM=0;oM<oO.length;oM++){var oR=oO[oM];var C=this.getTileKey(oR);var oN=this.tileCache.getData(C);if(oN&&oN.status==="ready"){if(!this.thumbCache[C]){this.map._featureMgr.setData(oN,this.drawIndex,1);this.thumbCache[C]=true}}else{var oL=this._findChildZoomTileRecursive(oR.col,oR.row,oR.zoom,oR.useZoom,e-1,oP);if(!oL){oK=false}}}return oK},_setDumbTileData:function(C,e){var i={tileInfo:e,dataType:lf,key:C};this.map._featureMgr.setData(i,this.drawIndex,2)},_calcThumbUV:function(oN,T,oP,e,oR,i){var oO;if(this.tileType._name==="na"){oO=this.tileType.getFactorByZooms(i,oP)}else{var oQ=oP-i;oO=Math.pow(2,oQ)}var C=1/oO;var oK=(oN-e*oO)*C;var oL=T-oR*oO;var oM=(oO-1-oL)*C;return{u0:oK,v0:oM,u1:oK+C,v1:oM+C}},_findParentZoomTileUpsample:function(oN,oX,oW,oK,oQ,oL,oS){var oM=gA[this.getMapType()];var C=oM.minDataZoom;var e=oN;var oU=oX;var oR=oW;var oT=oK;for(var oP=1;oP<=oQ;oP++){var T=this.tileType.getParentTile(e,oU,oR,oT,C);if(T===null){continue}var oV=this.getTileKey(T);var oO=this.tileCache.getData(oV);if(oO&&oO.status==="ready"){if(this.thumbCache[oL]){return true}if(this._placeUpsampleThumb(oO,T,oL,oS)){this.thumbCache[oL]=true;return true}}e=T.col;oU=T.row;oR=T.zoom;oT=T.useZoom}return false},_placeUpsampleThumb:function(oL,oM,C,oN){var i=this._calcThumbUV(oN.col,oN.row,oN.zoom,oM.col,oM.row,oM.zoom);var e=this._calcXYZTileVertex(oN,oN.tileSize||256,this.height);if(!e){return false}var T;if(e.length===30){T=[e[0],e[1],e[2],i.u0,i.v0,e[5],e[6],e[7],i.u1,i.v0,e[10],e[11],e[12],i.u1,i.v1,e[15],e[16],e[17],i.u0,i.v0,e[20],e[21],e[22],i.u1,i.v1,e[25],e[26],e[27],i.u0,i.v1]}else{T=new Float32Array(e.length);for(var oK=0;oK<e.length;oK+=5){T[oK]=e[oK];T[oK+1]=e[oK+1];T[oK+2]=e[oK+2];var oQ=e[oK+3];var oP=e[oK+4];T[oK+3]=i.u0+oQ*(i.u1-i.u0);T[oK+4]=i.v0+oP*(i.v1-i.v0)}}var oO={key:C,tileInfo:oN,textureSource:oL.textureSource,dataType:jK,renderData:{vertexAll:T},srcTile:oL};this.map._featureMgr.setData(oO,this.drawIndex,2);return true},_findChildZoomTileUpsample:function(C,oN,oK,i,oM){var oL=gA[this.getMapType()];var e=this.thumbMaxZoom||oL.maxDataZoom;var T=this._findChildZoomTileRecursiveUpsample(C,oN,oK,i,oM,e);return T},_findChildZoomTileRecursiveUpsample:function(oK,oS,oQ,C,i,oO){if(i<=0){return false}var oN=this.tileType.getChildTiles(oK,oS,oQ,C,oO,1);if(!oN){return false}var e=false;for(var oL=0;oL<oN.length;oL++){var oR=oN[oL];var T=this.getTileKey(oR);var oM=this.tileCache.getData(T);if(oM&&oM.status==="ready"){e=true;if(!this.thumbCache[T]){this.map._featureMgr.setData(oM,this.drawIndex,1);this.thumbCache[T]=true}}else{var oP=this._findChildZoomTileRecursiveUpsample(oR.col,oR.row,oR.zoom,oR.useZoom,i-1,oO);if(oP){e=true}}}return e},_fillHoldoverTiles:function(oP){if(!oP||!oP.length||!this._lastScreenTiles){return}var e=Object.keys(this._lastScreenTiles);if(!e.length){return}var oX=false;for(var oO=0;oO<oP.length;oO++){var T=oP[oO];var oL=T.col;var oW=T.row;var oV=T.zoom;var oM=false;var C=null;for(var oN=0;oN<e.length;oN++){var oU=this._lastScreenTiles[e[oN]];var oT=oU.zoom-oV;if(oT===0){if(oU.col===oL&&oU.row===oW){if(!this.thumbCache[oU.key]){this.map._featureMgr.setData(oU.tile,this.drawIndex,1);this.thumbCache[oU.key]=true;oX=true}oM=true}}else{if(oT>0){var oR=Math.pow(2,oT);if(Math.floor(oU.col/oR)===oL&&Math.floor(oU.row/oR)===oW){if(!this.thumbCache[oU.key]){this.map._featureMgr.setData(oU.tile,this.drawIndex,1);this.thumbCache[oU.key]=true;oX=true}}}else{if(oT<0){var oQ=Math.pow(2,-oT);if(Math.floor(oL/oQ)===oU.col&&Math.floor(oW/oQ)===oU.row){if(!C||oU.zoom>C.zoom){C=oU}}}}}}if(!oM&&C){var oK=this.getTileKey(T);if(!this.thumbCache[oK]&&this._placeUpsampleThumb(C.tile,C.tile.tileInfo,oK,T)){this.thumbCache[oK]=true;oX=true}}}if(oX){this.map._featureMgr.sortThumbData(this.drawIndex);var oS=this.map._featureMgr.result.bkData[this.drawIndex];if(oS&&oS[1]&&oS[1].length>1){oS[1].sort(function(oY,i){return oY.tileInfo.useZoom-i.tileInfo.useZoom})}}},_recordScreenTiles:function(){var oP=this.map._featureMgr.result.bkData[this.drawIndex];if(!oP){return}var oN={};var oK=0;for(var oQ=0;oQ<3;oQ++){var e=oP[oQ];if(!e){continue}for(var T=0;T<e.length;T++){var oM=e[T];if(!oM||!oM.tileInfo||!oM.textureSource){continue}var oL=oM.srcTile||oM;var C=oL.tileInfo;var oO=oL.key||this.getTileKey(C);if(oN[oO]){continue}oN[oO]={key:oO,col:C.col,row:C.row,zoom:C.zoom,tile:oL};oK++}}if(oK===0&&this._lastScreenTiles&&Object.keys(this._lastScreenTiles).length>0){return}this._lastScreenTiles=oN},loadVectorTileData:function(oW,oX){var oK=oW.col;var oL=oW.row;var e=oW.zoom;var oU=oW.baseTileSize;var T=this.getTilesUrl(new hV(oK,oL),e,oU);var oM=this.map.getPrivateRegions();if(!this.processData&&this.map.getPrivateStatus()&&oM){var oS=oW.useZoom;var oR=this.tileType.getMercatorSize(oS);var oQ=oK*oR;var oP=oL*oR;var oT=new d9(oQ+oR/2,oP+oR/2);var oO=new lz(new d9(oQ,oP),new d9(oQ+oR,oP+oR));var oN=ja()>=1.5?2:1;for(var oV=0;oV<oM.length;oV++){if(oM[oV] instanceof es){if(oM[oV].crossPoint(oT,oO,oS)){var oY={x:oK,y:oL,z:e,mapZoom:oS,scalerRadio:oN,textimg:this.map.config.textRenderType==="canvas"?0:1};var C=oM[oV].tileUrlFunction(T,oY);if(C&&C.url){T=C.url;C.header&&(oW.header=C.header)}break}}}}if(!T){return}var o0=this.getTileKey(oW);kB(this.map);if(!this.processData){if(!this.map||!this.map._workerMgr){return}this.map._workerMgr.loadTileData(T,oW,o0,oX);return}var oX="cbk"+o0.replace(/-/g,"_");var oZ=this;cv[oX]=function(i){var o1=(function(o2){return function(){o2.tileInfo=oW;var o8=oZ.processData(o2);if(!o8.road){return}var o5={tileInfo:oW,renderData:{base:[]},status:"ready",key:o0,mapType:oZ.mapType};var pb=[];var pe=[];for(var o7=0;o7<o8.road.length;o7++){var pa=o8.road[o7];var o9=-1;for(var o6=0;o6<pa.length;o6++){var pc=pa[o6];var pd=[];if(pb.length/7+pc[0].length/2>65536){o5.renderData.base.push({type:"line",data:[jl.toTileSolidLineVertices(pb,4000),new Uint16Array(pe)]});pb=[];pe=[]}for(var o4=0;o4<pc[0].length;o4+=2){pd[pd.length]=[pc[0][o4],pc[0][o4+1]]}var o3=pc[3];jl.buildData(pd,pc[1],pc[2],pb,pe,o3,pc[4],o7+20)}o5.renderData.base.push({type:"line",data:[jl.toTileSolidLineVertices(pb,4000),new Uint16Array(pe)]})}oZ.tileCache.setData(o0,o5);if(oZ.map._featureMgr){oZ.map._featureMgr.clearData(oZ.drawIndex)}oZ.getVectorLayerDataFromCache(oZ.curViewTilesInfo,oZ.getZoomState());oZ.map.dispatchEvent(new ix("onrefresh"))}})(i);oZ.map.jobScheduler.addJob(o1);delete cv[oX]};T+="&fn="+encodeURIComponent(h6+"."+oX);jW.load(T)},vectorTileDataCbk:function(T,oK){var oO=new ix("ontileloaded");oO.perfStat=T.perfStat||[];var e=this.map;e.fire(oO);var i=T.tileInfo;var C=i.col;var oT=i.row;var oS=i.zoom;var oR=i.baseTileSize;var oM=this.tileCache.getData(oK);if(!oM){return}if(!this.showLabel){T.label=null}oM.renderData=T;oM.tileInfo=i;var oL=hz.calcLoopParam(C,oS,oR);var oP=oL.geoOffsetX;oM.tileInfo.loopOffsetX=oP;oM.status="ready";oM.mapType=this.mapType;this.tileCache.setData(oK,oM);oM.label=T.label;T.label=null;if(T.indoorData&&e._indoorMgr){e._indoorMgr.setData(T.indoorData)}var oN="id_"+C+"_"+oT+"_"+oS;if(!this.curViewTilesInfo[oN]){e.fire(new ix("ontilenotinview"));return}var oQ=e._displayOptions;if(oQ.poi){this.processLabelData(oM)}if(T.indoorData&&e._indoorMgr&&e._indoorMgr.currentUid){this._refreshIndoorData(e._indoorMgr.currentUid,e._indoorMgr.currentFloor)}},_refreshIndoorData:function(oR,oQ){var oT=this.map._indoorMgr.getIndoorData(oR);if(this.map&&this.map.parking){this.map.parking.currentUid=oR;this.map.parking.currentFloor=oQ}var oW=oT.tileKeys;var oU=Math.floor(this.map.getZoom());for(var oO=0;oO<oW.length;oO++){var oL=oW[oO];var oN=this.tileCache.getData(oL);if(!oN||!oN.renderData){continue}var oV=oN.renderData;if(!oV){continue}oV.indoorBase=[];oV.indoorBaseContour=[];oV.indoorBorder3D=[];oV.indoorArea3D=[];oN.label.indoorLabel=[];this.labelProcessor.clearCollisionCache(oN.label);for(var oP in oV.indoorData){if(oP==="tileInfo"){continue}var e=oV.indoorData[oP];var oK=e.defaultFloor;if(oP===oR){oK=oQ;e.currentFloor=oQ}if(e.floors[oK]){if(e.floors[oK].base){for(var oM=0;oM<e.floors[oK].base.length;oM++){oV.indoorBase.push(e.floors[oK].base[oM])}}if(e.floors[oK].contour){for(var oM=0;oM<e.floors[oK].contour.length;oM++){oV.indoorBaseContour.push(e.floors[oK].contour[oM])}}if(e.floors[oK].indoorBorder3D){oV.indoorBorder3D.push(e.floors[oK].indoorBorder3D)}if(e.floors[oK].area3D){oV.indoorArea3D.push(e.floors[oK].area3D)}if(e.floors[oK].pois){oN.label.indoorLabel=oN.label.indoorLabel.concat(e.floors[oK].pois)}}}this.updateAllIconsTextureCoords(oN);var oS=this;this.labelProcessor.loadIconImages(oN,function(i){oS.updateAllIconsTextureCoords(i)},"indoor");var T=oL.split("_");var C=parseInt(T[T.length-1],10);if(C!==oU){continue}oS.map._featureMgr.setData(oN,this.drawIndex,2)}this.dataBackCollideLabels();this.map.dispatchEvent(new ix("onrefresh"))},_removeIndoorData:function(i){if(!i.indoorData){return}for(var e in i.indoorData){if(e==="tileInfo"){continue}this.map._indoorMgr.removeData(e,i.key)}},getProcessedLabelZoom:function(T){var oK=oG.baseZoomInfo[T.zoom];if(!oK){return false}var C=[];for(var oL=0;oL<oK.length;oL++){var oM=this.getTileKey(T,{useZoom:oK[oL]});var e=this.tileCache.getData(oM);if(e&&e.status==="ready"&&e.label&&e.label.status==="ready"){C.push(oK[oL])}}if(C.length){return C}else{return false}},getSameZoomDataFromCache:function(C){var T=oG.baseZoomInfo[C.zoom];for(var oK=0;oK<T.length;oK++){var oL=this.getTileKey(C,{useZoom:T[oK]});if(C.useZoom===T[oK]){continue}var e=this.tileCache.getData(oL);if(e&&e.status==="ready"&&e.label&&e.label.status==="ready"){return e}}return false},hasSameLabelData:function(T,C){for(var e=0;e<C.length;e++){if(C[e].key===T){return true}}return false},getDataByFloorName:function(C,T){for(var e=0;e<C.length;e++){if(C[e].floorName===T){return C[e]}}return null},mergeIndoorLabelData:function(oO,e){for(var oM in oO){if(oM==="tileInfo"){continue}if(e[oM]){var C=oO[oM].floors;var oP=e[oM].floors;for(var oK=0;oK<C.length;oK++){var T=C[oK];var oN=T.floorName;var oL=this.getDataByFloorName(oP,oN);if(oL){if(oL.pois){oL.pois=oL.pois.concat(T.pois);T.pois=oL.pois}else{oL.pois=T.pois}}}}}},mergeSameZoomLabelData:function(oM){var oK=oM.label;if(!oK){return}var e=oM.tileInfo;var oL=this.getSameZoomDataFromCache(e);if(!oL){return}var T=oL.label;if(!T){return}for(var C=0;C<oK.fixedLabel.length;C++){if(!this.hasSameLabelData(oK.fixedLabel[C].key,T.fixedLabel)){T.hasNewData=true;T.fixedLabel.push(oK.fixedLabel[C])}}for(var C=0;C<oK.lineLabel.length;C++){if(!this.hasSameLabelData(oK.lineLabel[C].key,T.lineLabel)){T.hasNewData=true;T.lineLabel.push(oK.lineLabel[C])}}for(var C=0;C<oK.indoorLabel.length;C++){if(!this.hasSameLabelData(oK.indoorLabel[C].key,T.indoorLabel)){T.hasNewData=true;T.indoorLabel.push(oK.indoorLabel[C])}}oM.label=T;if(oL.renderData.indoorData&&oM.renderData.indoorData){this.mergeIndoorLabelData(oM.renderData.indoorData,oL.renderData.indoorData)}},processLabelData:function(oL){if(!oL.label){return}if(oL.label.status==="processing"){return}oL.label.fixedLabel.sort(function(oN,oM){return oM.rank-oN.rank});oL.label.status="processing";var T=this;T.updateAllIconsTextureCoords(oL);this.labelProcessor.loadIconImages(oL,function(oM){T.updateAllIconsTextureCoords(oM)});if(this.map.config.textRenderType==="canvas"){var e=this.labelProcessor.drawLabelsOnCanvas(oL,function(oO,oQ){var oN=oL.tileInfo;var oP=T.map.config.mapStyleId;if(!cv["customStyleInfo_"+oP]){T.mergeSameZoomLabelData(oL)}if(oO){if(!oL.label.textureHeights){oL.label.textureHeights=[]}oL.label.textureHeights[oN.useZoom]=oO.height}if(oQ){if(!oL.label.indoorTextureHeights){oL.label.indoorTextureHeights=[]}oL.label.indoorTextureHeights[oN.useZoom]=oQ.height}var oM=T._getTileTexImgKey(oN);T._doWorkAfterLabelImageLoad(oL,oO,oQ,oM)});return}var C=oL.label.textImageBitmap||oL.label.textImgStr;var oK=oL.label.indoorTextImageBitmap||oL.label.indoorTextImgStr;this.labelProcessor.loadImgByStr(C,oK,function i(oR,oP){var oO=oL.label.textureHeight;var oS=oL.label.indoorTextureHeight;oL.label.textureHeight=undefined;oL.label.indoorTextureHeight=undefined;var oN=oL.tileInfo;T.mergeSameZoomLabelData(oL);var oQ=oL.label;oQ.textImgStr="";oQ.indoorTextImgStr&&(oQ.indoorTextImgStr="");if(!oQ.textureHeights){oQ.textureHeights=[]}oQ.textureHeights[oN.useZoom]=oO;if(!oQ.indoorTextureHeights){oQ.indoorTextureHeights=[]}oQ.indoorTextureHeights[oN.useZoom]=oS;var oM=T._getTileTexImgKey(oN);T._doWorkAfterLabelImageLoad(oL,oR,oP,oM)})},_getTileTexImgKey:function(i){var C=i.style||this.mapStyleId||"default";var e=C+"_"+i.col+"_"+i.row+"_"+i.zoom;if(this.map.config.textRenderType==="canvas"){e+="_"+i.useZoom}return e},_doWorkAfterLabelImageLoad:function(T,oM,e,oQ){var oL=this;var oO=T.label;oO.tileInfo=T.tileInfo;oO.status="ready";if(oM||e){var C=oO.tileInfo;if(oM){oM.id=oQ;if(!oO.textureSources){oO.textureSources=[]}oO.textureSources[C.useZoom]=oM}if(e){e.id=oQ+"_indoor";if(!oO.indoorTextureSources){oO.indoorTextureSources=[]}oO.indoorTextureSources[C.useZoom]=e}if(oL.map._webglMapScene){var oP=oL.map._webglMapScene._painter;if(oM){oP._addToAsyncJob(oO.textureSources[C.useZoom])}}}if(T.custom!==true){oL.tileLabels.push(oO)}else{if(!oM&&oL.tileLabels){for(var oK=0;oK<oL.tileLabels.length;oK++){var oN=oL.tileLabels[oK];this.labelProcessor.clearCollisionCache(oN)}}setTimeout(function(){oL.updateAllIconsTextureCoords(T);oL.labelProcessor.loadIconImages(T,function(i){oL.updateAllIconsTextureCoords(T)},true);oL.map.dispatchEvent(new ix("onupdate"))},200)}if(oL.collisionTimer){return}oL.collisionTimer=setTimeout(function(){oL.dataBackCollideLabels();oL.collisionTimer=null},300)},_updateIconTextureCoords:function(oN,C){if(!oN){return}var oM=this.map;for(var T=0;T<oN.length;T++){var oL=oN[T];if(!oL.iconPos){continue}if(oM._webglMapScene){var e=oM._webglMapScene._painter;var oK=C+"_"+oL.iconPos.iconType;oL.iconPos.texcoord=e._iconTextureAtlasCoords[oK]||null}}},updateAllIconsTextureCoords:function(oK){if(this.map.viewAnimationTime){return}if(oK){if(oK.label){var i=oK.tileInfo.style;this._updateIconTextureCoords(oK.label.fixedLabel,i);this._updateIconTextureCoords(oK.label.indoorLabel,i)}}else{var T=this.tileCache.getAllData();for(var C in T){var e=T[C].data;if(e.status==="ready"&&e.label){var i=e.tileInfo.style;this._updateIconTextureCoords(e.label.fixedLabel,i);this._updateIconTextureCoords(e.label.indoorLabel,i)}}}this.updateLabels();this.map.dispatchEvent(new ix("onrefresh"))},cacheDataCollideLabels:function(C){var oK=this;var i=this.map._featureMgr;function T(){if(oK&&!oK.map.tileMgr&&!oK.map.tileMgr.isExitTileLayer(oK)){return}oK.cacheLabelTimer=null;var oL;var oM=oK.map.getTilt();var oO=oK.map.getHeading()%360;if(oK.tileLabels.length===0||(oK.tileLabels.length===1&&oK.tileLabels[0].tileInfo.zoom===0)){oL=i.getLabelData(oK.drawIndex);if(oL.length>0){oL=oK.labelProcessor.collisionTest(oL,-1)}}else{if(oM||oO){if(this._collisionTimer){if(!oM){clearTimeout(this._collisionTimer)}else{if(Date.now()-oK.lastCollisionTestTime>500){oK.lastCollisionTestTime=Date.now()}else{clearTimeout(this._collisionTimer)}}}this._collisionTimer=setTimeout(function(){if(oK&&!oK.map.tileMgr&&!oK.map.tileMgr.isExitTileLayer(oK)){oK._collisionTimer=null;return}oL=oK.labelProcessor.collisionTest(oK.tileLabels);if(oL){if(oK._isInnerLayer&&oK.map.stencil&&oK.map.stencil.isPoiMask){var oP=oK.isPoiInPolygon(oL);i.setLabelData(oP,oK.drawIndex)}else{i.setLabelData(oL,oK.drawIndex)}}oK.updateLabels();oK.map.dispatchEvent(new ix("onrefresh"));oK._collisionTimer=null},60);return}else{oL=oK.labelProcessor.getCachedLabels(oK.tileLabels)}}if(oL){if(oK._isInnerLayer&&oK.map.stencil&&oK.map.stencil.isPoiMask){var oN=oK.isPoiInPolygon(oL);i.setLabelData(oN,oK.drawIndex)}else{i.setLabelData(oL,oK.drawIndex)}}oK.updateLabels();oK.map.dispatchEvent(new ix("onrefresh"))}if(!C){clearTimeout(oK.cacheLabelTimer);T()}else{if(oK.cacheLabelTimer){return}oK.cacheLabelTimer=setTimeout(function e(){T()},C)}},isPoiInPolygon:function(C){var o5=this;var oT=o5.map.stencil;var oL=o5.map._featureMgr.result.eleData[9];var oK=[];var T=false;for(var oZ=0;oZ<oL.length;oZ++){var o4=oL[oZ].overlay;var o6=oL[oZ].overlays;if(o6&&o6.length>1){T=true;for(var oW=0;oW<o6.length;oW++){var oU=o6[oW].points;oK=oK.concat([oU])}}else{var oU=o4.points;oK=oK.concat(oU)}}for(var o2=0;o2<C.length;o2++){var oN=[];var oM=[];for(var o1=0;o1<C[o2].fixedLabel.length;o1++){var oS=C[o2].fixedLabel[o1];var oY=oS.pt;if(oS.pt&&aV(oY,oK,T)){oN.push(oS)}else{oM.push(oS)}}if(oT.showRegion==="inside"){C[o2].fixedLabel=oN}else{if(oT.showRegion==="outside"){C[o2].fixedLabel=oM}}var oX=[];var oP=[];for(var oZ=0;oZ<C[o2].lineLabel.length;oZ++){var o0=C[o2].lineLabel[oZ];var e=o0.pt;if(e&&aV(e,oK,T)){oX.push(o0)}else{oP.push(o0)}}if(oT.showRegion==="inside"){C[o2].lineLabel=oX}else{if(oT.showRegion==="outside"){C[o2].lineLabel=oP}}var oV=[];var oR=[];for(var oQ=0;oQ<C[o2].indoorLabel.length;oQ++){var o3=C[o2].indoorLabel[oQ];var oO=o3.pt;if(oO&&aV(oO,oK,T)){oV.push(o3)}else{oR.push(o3)}}if(oT.showRegion==="inside"){C[o2].indoorLabel=oV}else{if(oT.showRegion==="outside"){C[o2].indoorLabel=oR}}}return C},dataBackCollideLabels:function(){var C=this;if(!C.map||C.map._destroyed){return}if(!C.map.tileMgr||!C.map.tileMgr.isExitTileLayer(C)){return}if(!C.tileLabels||(C.tileLabels&&C.tileLabels.length===0)){return}var e;C.labelProcessor.calcLabelsCollision(C.tileLabels);e=C.labelProcessor.getCachedLabels(C.tileLabels);if(e){if(C._isInnerLayer&&C.map.stencil&&C.map.stencil.isPoiMask){var i=C.isPoiInPolygon(e);C.map._featureMgr.setLabelData(i,C.drawIndex)}else{C.map._featureMgr.setLabelData(e,C.drawIndex)}}C.updateLabels();C.map.dispatchEvent(new ix("onupdate"));if(c9()){this.labelProcessor._refreshSpotData()}},updateLabels:function(oK){var oL=this.map;if(!oL._featureMgr){return}var i=oL._featureMgr;var C=i.getLabelData(this.drawIndex);if(C.length>0){var T=oL.getZoom();if(C.labelZoom-T<3){this.labelProcessor.updateLabels(C);var e=this.labelProcessor.fixDataFormat(C);i.setOverlayData(e[0],2,this.drawIndex);i.setOverlayData(e[1],3,this.drawIndex);i.setOverlayData(e[2],4,this.drawIndex)}else{i.clearLabelOverlayData(this.drawIndex)}oL.temp.isPermitSpotOver=false;this.labelProcessor.curSpotAdded=false}},loadRasterLayerData:function(oR,T){this.thumbCache={};var oS=this.getZoomState();if(T){var oQ=this.useThumbData&&this.thumbUpsample&&this.tileType.getName()==="xyz";var oO=oQ?[]:null;for(var oM=0,oK=oR.length;oM<oK;oM++){var C=oR[oM];var oL=this.getTileKey(C);var e=this.tileCache.getData(oL);if(e&&e.status==="ready"){if(C.tileTypeName==="xyz"){e.tileInfo=C}this.map._featureMgr.setData(e,this.drawIndex,2)}else{if(this.useThumbData){var oN=false;if(this.thumbUpsample){oN=this._setThumbDataUpsample(C.col,C.row,C.zoom,C.useZoom,oS,oL,C)}else{oN=this.setThumbData(C.col,C.row,C.zoom,C.useZoom,oS)}if(oO&&!oN){oO.push(C)}}}}if(oQ){this._fillHoldoverTiles(oO);this._recordScreenTiles()}return}for(var oM=0,oK=oR.length;oM<oK;oM++){var C=oR[oM];var oL=this.getTileKey(C);var e=this.tileCache.getData(oL);if(!e){this.numTileLoading++;this.tileCache.setData(oL,{});var oP=this;this.loadRasterTileData(C,function(i,oT){oP._checkLayerTilesLoaded();oP.rasterTileDataCbk(i,oT)})}}},loadRasterTileData:function(i,e){var T=i.col;var oM=i.row;var oK=i.zoom;var C=this.getTilesUrl(new hV(T,oM),oK,i);if(!C){var oL=this.getTileKey(i);this.tileCache.removeData(oL);e&&e(null,oL);return}if(C.indexOf("apimaponline")>-1){C+="&ak="+hj+"&is_has_bmap_proxy="+k1+"&from=gl"}var oL=this.getTileKey(i);this.loadTileImage(C,oL,e,i)},loadTileImage:function(oN,C,oL,e){var T=new Image();T.crossOrigin="anonymous";T.tileInfo=e;var oK;var oM=this;function oO(){if(oM.retry){oK&&clearInterval(oK);oK=null}}if(this.retry){var i=1;oK=setInterval(function(){if(i>3){oO();return}if(e.tileLoadFunction){e.tileLoadFunction(T,oN)}else{T.src=oN}i++},this.retryTime)}T.onload=function(){oO();oL&&oL(this,C)};T.onerror=function(){oO();cv.fetchDebug&&cv.fetchDebug.sendError({title:oN,msg:oN,category:cv.fetchDebug.category.RESOURCE,level:cv.fetchDebug.levels.ERROR,url:oN});oL&&oL(null,C)};if(e.tileLoadFunction){e.tileLoadFunction(T,oN)}else{T.src=oN}return T},_calcXYZTileVertex:function(oO,o7,C){var ps=oO.zoom;var oN=oO.col;var oV=oO.row;if(!oO.preciseVertex){return[0,0,C,0,0,o7,0,C,1,0,o7,o7,C,1,1,0,0,C,0,0,o7,o7,C,1,1,0,o7,C,0,1]}var pk=fA.resolutions[Math.floor(ps)];var o8=fA.gridSize;var pp=fA.origin;var o1=Math.pow(2,(18-ps));var pj=pp[0]+oN*o8[0]*pk;var o2=pp[1]-oV*o8[1]*pk;var o3=pj+o8[0]*pk;var pi=o2-o8[1]*pk;if(this.reproject){var pn=fA.toEPSG4326([pj,pi]);var pf=fA.toEPSG4326([o3,o2]);var pl=Math.max(Math.abs(pf[0]-pn[0]),Math.abs(pf[1]-pn[1]));var oM=Math.max(1,Math.min(16,Math.ceil(pl/0.5)));var pc=oM+1;var py=(o3-pj)/oM,px=(o2-pi)/oM;var oT=fA.wgs84ToBd09mc(pn[0],pn[1]);var o5=oT[0]/o1;var o4=oT[1]/o1;oO._tileLBBdPixel=[o5,o4];var oS=this.reprojectSourceCRS==="EPSG4326";var oL=oS?(pf[0]-pn[0]):0;var pr=oS?(pf[1]-pn[1]):0;var oP=pc*pc;var oR=new Float64Array(oP);var oQ=new Float64Array(oP);var oX=new Float64Array(oP);var oU=new Float64Array(oP);for(var T=0;T<=oM;T++){for(var oK=0;oK<=oM;oK++){var pe=fA.toEPSG4326([pj+py*oK,pi+px*T]);var pm=fA.wgs84ToBd09mc(pe[0],pe[1]);var pw=T*pc+oK;oR[pw]=pm[0]/o1-o5;oQ[pw]=pm[1]/o1-o4;if(oS){oX[pw]=(pe[0]-pn[0])/oL;oU[pw]=(pe[1]-pn[1])/pr}else{oX[pw]=oK/oM;oU[pw]=T/oM}}}var pv=oM*oM*30;var pu=new Float32Array(pv);var o0=0;for(var o9=0;o9<oM;o9++){for(var pa=0;pa<oM;pa++){var ph=o9*pc+pa,oY=ph+1,pg=ph+pc,oW=pg+1;pu[o0++]=oR[ph];pu[o0++]=oQ[ph];pu[o0++]=C;pu[o0++]=oX[ph];pu[o0++]=oU[ph];pu[o0++]=oR[oY];pu[o0++]=oQ[oY];pu[o0++]=C;pu[o0++]=oX[oY];pu[o0++]=oU[oY];pu[o0++]=oR[oW];pu[o0++]=oQ[oW];pu[o0++]=C;pu[o0++]=oX[oW];pu[o0++]=oU[oW];pu[o0++]=oR[ph];pu[o0++]=oQ[ph];pu[o0++]=C;pu[o0++]=oX[ph];pu[o0++]=oU[ph];pu[o0++]=oR[oW];pu[o0++]=oQ[oW];pu[o0++]=C;pu[o0++]=oX[oW];pu[o0++]=oU[oW];pu[o0++]=oR[pg];pu[o0++]=oQ[pg];pu[o0++]=C;pu[o0++]=oX[pg];pu[o0++]=oU[pg]}}return pu}var oZ=[[pj,pi],[o3,pi],[o3,o2],[pj,o2]];var pd=fA.toEPSG4326(oZ[0]);var pb=fU.transform(pd,fU.WGS84,fU.BD09LL);var oT=fU.transform(pb,fU.BD09LL,fU.BD09MC);var o5=oT[0]/o1;var o4=oT[1]/o1;oO._tileLBBdPixel=[o5,o4];var o6=[];for(var pt=0;pt<4;pt++){if(pt===0){o6.push({x:0,y:0});continue}var pe=fA.toEPSG4326(oZ[pt]);var e=fU.transform(pe,fU.WGS84,fU.BD09LL);var pm=fU.transform(e,fU.BD09LL,fU.BD09MC);var pq=pm[0]/o1;var po=pm[1]/o1;o6.push({x:pq-o5,y:po-o4})}return[o6[0].x,o6[0].y,C,0,0,o6[1].x,o6[1].y,C,1,0,o6[2].x,o6[2].y,C,1,1,o6[0].x,o6[0].y,C,0,0,o6[2].x,o6[2].y,C,1,1,o6[3].x,o6[3].y,C,0,1]},rasterTileDataCbk:function(oO,oM){if(!oO||typeof oO==="string"){this.tileCache.removeData(oM);return}var T=oO.tileInfo;var oK=T.col;var oV=T.row;var oU=T.zoom;var i=this.tileCache.getData(oM);if(!i){return}var oP="id_"+oK+"_"+oV+"_"+oU;var oT=this;i.dataType=jK;i.tileInfo=T;if(T.tileTypeName==="xyz"){var oS=T.tileSize;i.textureSource=oO;var C=this._calcXYZTileVertex(T,oS,this.height);i.renderData={vertexAll:C};oT.setRasterTileData(oM,i,oP)}else{i.textureSource=oO;var oN=hz.calcLoopParam(oK,oU);var oR=oN.geoOffsetX;oO.tileInfo.loopOffsetX=oR;if(T.combine){var oL=0.0035;if(T.dataIndex>0){var oQ=T.dataIndex/256;i.renderData={vertexAll:[0,0,this.height,0,0,T.dataIndex,0,this.height,oQ-oL,0,T.dataIndex,256,this.height,oQ-oL,1,0,0,this.height,0,0,T.dataIndex,256,this.height,oQ-oL,1,0,256,this.height,0,1]}}else{var e=-T.dataIndex;var oQ=e/256;i.renderData={vertexAll:[e,0,this.height,oQ+oL,0,256,0,this.height,1,0,256,256,this.height,1,1,e,0,this.height,oQ+oL,0,256,256,this.height,1,1,e,256,this.height,oQ+oL,1]}}}else{i.renderData={vertexAll:[0,0,this.height,0,0,256,0,this.height,1,0,256,256,this.height,1,1,0,0,this.height,0,0,256,256,this.height,1,1,0,256,this.height,0,1]}}this.setRasterTileData(oM,i,oP)}},setRasterTileData:function(oK,e,T){e.status="ready";if(this.thumbUpsample){e.key=oK}this.tileCache.setData(oK,e);if(this.tileType.getName()==="xyz"&&this.useThumbData&&this.thumbUpsample&&this._lastScreenTiles&&e.tileInfo){this._lastScreenTiles[oK]={key:oK,col:e.tileInfo.col,row:e.tileInfo.row,zoom:e.tileInfo.zoom,tile:e}}var C=false;if(this.curViewTilesInfo[T]){e.dataType=jK;e.png8=this.png8||false;this.map._featureMgr.setData(e,this.drawIndex,2);C=true;if(!this.thumbUpsample&&this.tileType.getName()==="xyz"&&this.useThumbData){this._clearThumbDataIfReady()}}if(C){var i=new ix("onrefresh");i.source="webgllayer";this.map.dispatchEvent(i)}},_clearThumbDataIfReady:function(){var e=this.map._featureMgr.result.bkData[this.drawIndex];if(!e){return}if(e[2].length>=this.curViewTilesInfo.length){e[0]=[];e[1]=[]}},_checkLayerTilesLoaded:function(){this.numTileLoading--;if(this.firstTileLoad===false){this.dispatchEvent(new ix("ontilesloadstart"));this.firstTileLoad=true}var e=this;if(this.numTileLoading===0){if(this._checkTileLoadedTimer){clearTimeout(this._checkTileLoadedTimer);this._checkTileLoadedTimer=null}this._checkTileLoadedTimer=setTimeout(function(){if(e.numTileLoading===0){e.dispatchEvent(new ix("ontilesloadend"));e.firstTileLoad=false;if(e.tileType.getName()==="xyz"&&e.useThumbData&&e.map&&e.map._featureMgr){var i=e.map._featureMgr.result.bkData[e.drawIndex];var C=i&&(i[0].length||i[1].length);var T=e.curViewTilesInfo?e.curViewTilesInfo.length:0;if(C&&i[2].length>=T){i[0]=[];i[1]=[]}e.map.dispatchEvent(new ix("onrefresh"))}}e._checkTileLoadedTimer=null},60)}},_checkTilesLoaded:function(){this._checkLayerTilesLoaded();this.numLoading--;if(this.map.firstTileLoad===false){if(K.apiVersionIsGL()){this.map.dispatchEvent(new ix("onfirsttilesloaded"));this.map.dispatchEvent(new ix("onfirsttileloaded"))}else{if(!this.map._firstTileLoadedFired){this.map._firstTileLoadedFired=true;this.map.dispatchEvent(new ix("onfirsttilesloaded"));this.map.dispatchEvent(new ix("onfirsttileloaded"))}}this.map.firstTileLoad=true}var e=this;if(this.numLoading===0){if(this._checkLoadedTimer){clearTimeout(this._checkLoadedTimer);this._checkLoadedTimer=null}this._checkLoadedTimer=setTimeout(function(){if(e.numLoading===0){e.map.dispatchEvent(new ix("ontilesloaded"));e.map.firstTileLoad=false}e._checkLoadedTimer=null},60);if(c0.business===0&&c0.unauth===1){e.shuffleTiles()}}},shuffleTiles:function(){var oM=this.watermarkTileKeys;for(var oL=oM.length-1;oL>0;oL--){var oK=Math.floor(Math.random()*(oL+1));var T=oM[oL];oM[oL]=oM[oK];oM[oK]=T}var C=Math.floor(oM.length*c0.watermark_ratio);var oN=[];for(var e=0;e<C;e++){oN.push(oM[e])}this.map._watermarkTileKeys=oN},isClickableLabel:function(e){if(e.isDel){return false}if(e.zoom>9&&!e.guid){return false}if(e.zoom<=9&&!e.name&&!e.guid){return false}return true}};var by=5;var m4=4;var jD=3;var aa=2;var gM=1;var kR=0;function aY(i){this._ratio=ja();this._iconCache={};this._map=i;this._drawingCanvasPool=[];this._drawingCanvasHeight=4096;this._drawingCanvasWidth=512;this._bufferSpan=[5,5];this._debugContainer=null;var e=this;i.addEventListener("onlanguage_change",function(){e._clearLabelTextCanvas()})}hv.extend(aY.prototype,{_loadIcons:function(C,oP,oL){var T=0;var oM=this;var oK=this._map.config.style;for(var oN in C){T++;var oO=new Image();oO.id=oN;oO.crossOrigin="anonymous";oO.onload=function(){oM._iconCache[this.id].loaded=true;T--;if(T===0){oP()}this.onload=null};oO.onerror=function(){oM._iconCache[this.id]=null;T--;if(T===0){oP()}this.onerror=null};if(!oL){var e=K.getIconSetPath(oK)+oN+".png";var i=cw();if(i&&i.udt){e+="?udt="+i.udt}}else{var e=oN}oO.src=e;this._iconCache[oN]={loaded:false,image:oO}}},_getEmptyDrawingCanvas:function(){for(var C=0;C<this._drawingCanvasPool.length;C++){if(this._drawingCanvasPool[C]._free===true){this._drawingCanvasPool[C]._free=false;this._showDebugCanvas();return this._drawingCanvasPool[C]}}var e=this._createNewDrawingCanvas();this._drawingCanvasPool.push(e);e._free=false;this._showDebugCanvas();return e},_clearLabelTextCanvas:function(){var T=this._map;var e=T._displayOptions.isEn;var C=T._displayOptions.isMultiLanguage;var i=e&&C?1024:512;if(this._drawingCanvasWidth===i){return}this._drawingCanvasWidth=i;this._drawingCanvasPool=[]},_createNewDrawingCanvas:function(){var e=da("canvas");e.width=this._drawingCanvasWidth;e.height=this._drawingCanvasHeight;e._free=true;e._id=cv.getGUID();var i=e.getContext("2d",{colorSpace:"display-p3"});i.textBaseline="bottom";i.lineJoin="round";return e},_showDebugCanvas:function(){},drawLabelsOnCanvas:function(o2,T){var oR=o2.label.fixedLabel.slice(0);var oX=o2.label.lineLabel.slice(0);var C=o2.label.indoorLabel.slice(0);if(oR.length===0&&oX.length===0&&C.length===0){T();return}var oM=function(o7,i){return o7.styleId-i.styleId};oX.sort(oM);C.sort(oM);var o0={};var o1=false;var e=this._getEmptyDrawingCanvas();var oW=e.getContext("2d",{colorSpace:"display-p3"});oW.clearRect(0,0,e.width,e.height);var o5=0;var oS=null;var oL=0;if(oR.length>0){while(oL<oR.length&&!oR[oL].styleText[0]){oL++}if(oR[oL]&&oR[oL].styleText[0]){oS=oR[oL].styleText[0].fontSize+oR[oL].styleText[0].haloSize*2}}if(oS===null&&C.length>0){oL=0;while(oL<C.length&&!C[oL].styleText[0]){oL++}if(C[oL]&&C[oL].styleText[0]){oS=C[oL].styleText[0].fontSize+C[oL].styleText[0].haloSize*2}}if(oS===null&&oX.length>0){oL=0;while(oL<oX.length&&!oX[oL].styleText[0]){oL++}if(oX[oL]&&oX[oL].styleText[0]){oS=oX[oL].styleText[0].fontSize+oX[oL].styleText[0].haloSize*2}}if(oS===null||isNaN(oS)){T();return}var oO=0;var oN=oS;oN+=this._bufferSpan[1];var oU={};var o6=0;var oV=[];for(var oZ=0;oZ<oR.length;oZ++){var oQ=oR[oZ];var oT=oQ.name;var oY=oQ.styleText;if(!oT||oY.length===0){continue}var oK=oQ.icon;if(oQ.textOnIcon&&(!this._iconCache[oK]||this._iconCache[oK].loaded===false)){oV.push(oQ);o6++;if(!oU[oK]){oU[oK]=true}continue}var o3=this._drawEachText(oW,oQ,o5,oO,oN,oS,o0);if(!o3){continue}if(o3.overHeight){o1=true;break}oO=o3.curX;oN=o3.curY;oS=o3.curLineHeight;o5=o3.styleId}if(!o1&&C.length>0){o3=this._drawEachTypeOfLabels(oW,C,o5,oO,oN,oS,o0);o5=o3.curStyleId;oO=o3.curX;oN=o3.curY;oS=o3.curLineHeight;o1=o3.overHeight||o1}if(!o1&&oX.length>0){o3=this._drawEachTypeOfLabels(oW,oX,o5,oO,oN,oS,o0);o5=o3.curStyleId;oO=o3.curX;oN=o3.curY;oS=o3.curLineHeight;o1=o3.overHeight||o1}if(!o1&&o6>0){var o4=this;this._loadIcons(oU,function(){o3=o4._drawEachTypeOfLabels(oW,oV,o5,oO,oN,oS,o0);o5=o3.curStyleId;oO=o3.curX;oN=o3.curY;oN+=o4._bufferSpan[1];oS=o3.curLineHeight;o1=o1||o3.overHeight;var i=o4._generateEachLabelCanvas(e,oN,oR,oX,C,o2);T(i[0],i[1])});return}oN+=this._bufferSpan[1];var oP=this._generateEachLabelCanvas(e,oN,oR,oX,C,o2);T(oP[0],oP[1])},drawCustomLabelsOnCanvas:function(oO,oN,C){if(oO.length===0){oN();return}var oL={};var oK=false;for(var T=0;T<oO.length;T++){var oM=null;if(oO[T].textOnIcon&&oO[T].icon){oM=oO[T].icon}if(oM&&!oL[oM]&&(!this._iconCache[oM]||this._iconCache[oM].loaded===false)){oL[oM]=true;oK=true}}var e=this;if(oK){this._loadIcons(oL,function(){e._drawCustomLabel(oO,oN,C)},true)}else{e._drawCustomLabel(oO,oN,C)}},_drawCustomLabel:function(oW,oK,C){var oM;var oL;var oN;var oV;var oY;var e;var oR;var T=0;var oU=oW.length;var oP=C?[]:null;var oQ=this;for(var oS=0;oS<oW.length;oS++){if(!oW[oS].name){continue}var oX=oT(oW[oS]);if(!oX){continue}if(oX.overHeight){if(C){oU=(oS-T);oP.push(oO(T,oU));oR=null;T=oS;oU=oW.length;oS=oS-1}else{break}}oM=oX.curX+this._bufferSpan[0];oL=oX.curY;oN=oX.curLineHeight;oY=oX.styleId}if(!oR){oZ({style:{}})}if(C){oU=oU-T;oP.push(oO(T,oU))}else{oP=oO(T,oU)}oR=null;oK(oP);function oZ(i){oM=0+oQ._bufferSpan[0];oL=((i.style.fontSize||0)+(i.style.haloSize||0)*2)+oQ._bufferSpan[1]||0;oN=oL-oQ._bufferSpan[1];oV={};oY=-1;e=oQ._getEmptyDrawingCanvas();oR=e.getContext("2d",{colorSpace:"display-p3"});oR.clearRect(0,0,e.width,e.height)}function oT(i){if(!oR){oZ(i)}if(C){i.cachedIsDel={}}var o0=oQ._drawEachText(oR,i,oY,oM,oL,oN,oV);return o0}function oO(o4,o3){var o1=oL;var o0=oQ._copyToNewCanvas(e,o1+oQ._bufferSpan[0]);for(var o2=o4;o2<oW.length&&o2<o4+o3;o2++){if(!oW[o2].name&&oW[o2].style.iconSize){oQ._addFixedLabelBounds(oW[o2]);continue}if(!oW[o2].textSize){continue}oQ._updateFixedLabelCoords(oW[o2],o1+oQ._bufferSpan[0]);oQ._addFixedLabelBounds(oW[o2])}o0.range=[o4,o3];return o0}},_drawEachTypeOfLabels:function(oT,oN,oR,T,C,oK,oP){var oL=false;for(var oM=0;oM<oN.length;oM++){var oO=oN[oM];var oS=oO.name;var e=oO.styleText;if(!oS||e.length===0){continue}var oQ=this._drawEachText(oT,oO,oR,T,C,oK,oP);if(!oQ){continue}if(oQ.overHeight){oL=true;return{overHeight:oL,curX:T,curY:C,curLineHeight:oK,curStyleId:oR}}T=oQ.curX+this._bufferSpan[0];C=oQ.curY;oK=oQ.curLineHeight;oR=oQ.styleId}return{overHeight:oL,curX:T,curY:C,curLineHeight:oK,curStyleId:oR}},_drawIndoorTextLabelOnCanvas:function(oK){var e=this._getEmptyDrawingCanvas();var oR=e.getContext("2d",{colorSpace:"display-p3"});oR.clearRect(0,0,e.width,e.height);var oZ=0;var oQ=null;var oP=0;var oN;var oW={};var oV=[];for(var oL in oK){if(oL==="tileInfo"){continue}var T=oK[oL];var oU=T.defaultFloor;var oO=T.floors;for(var oT=0;oT<oO.length;oT++){if(oT===oU){continue}var oX=oO[oT];if(!oX.pois){continue}var oM=oX.pois;for(var oS=0;oS<oM.length;oS++){if(oQ===null&&oM[oS].styleText[0]){oQ=oM[oS].styleText[0].fontSize+oM[oS].styleText[0].haloSize*2;oN=oQ}oV.push(oM[oS])}}}if(oQ===null){return null}oV.sort(function(o0,i){return i.rank-o0.rank||o0.styleId-i.styleId});var oY=this._drawEachTypeOfLabels(oR,oV,oZ,oP,oN,oQ,oW);oZ=oY.curStyleId;oP=oY.curX;oN=oY.curY;oQ=oY.curLineHeight;var C=this._copyToNewCanvas(e,oN);return C},_updateIndoorLabelsCoords:function(oQ,oR){for(var oP in oQ){if(oP==="tileInfo"){continue}var e=oQ[oP];var oL=e.defaultFloor;var oM=e.floors;for(var oN=0;oN<oM.length;oN++){if(oN===oL){continue}var C=oM[oN];if(!C.pois){continue}var oK=C.pois;for(var T=0;T<oK.length;T++){var oO=oK[T];if(oO.name&&(!oO.textSize||oO.textSize.length===0)){oK.splice(T,1);T--;continue}this._updateFixedLabelCoords(oO,oR);this._addFixedLabelBounds(oO)}}}},_generateEachLabelCanvas:function(oM,oL,oN,e,oP,C){oL=Math.min(oL,this._drawingCanvasHeight);var oO=this._copyToNewCanvas(oM,oL);var T=null;if(C.renderData.indoorData){T=this._drawIndoorTextLabelOnCanvas(C.renderData.indoorData);if(T){this._updateIndoorLabelsCoords(C.renderData.indoorData,T.height)}}for(var oK=0;oK<oN.length;oK++){if(!oN[oK].textSize){if(oN[oK].name&&oN[oK].styleText&&oN[oK].styleText.length>0){oN[oK].textPos=null;oN[oK].iconPos=null}continue}this._updateFixedLabelCoords(oN[oK],oL);this._addFixedLabelBounds(oN[oK])}for(var oK=0;oK<oP.length;oK++){if(!oP[oK].textSize){if(oP[oK].name&&oP[oK].styleText&&oP[oK].styleText.length>0){oP[oK].textPos=null;oP[oK].iconPos=null}continue}this._updateFixedLabelCoords(oP[oK],oL);this._addFixedLabelBounds(oP[oK])}for(var oK=0;oK<e.length;oK++){this._updateLineLabelCoords(e[oK],oL)}return[oO,T]},_copyToNewCanvas:function(C,i){if(i===0){return null}var T=da("canvas");T.width=C.width;T.height=i;var e=T.getContext("2d",{colorSpace:"display-p3"});e.drawImage(C,0,0,this._drawingCanvasWidth,i,0,0,this._drawingCanvasWidth,i);T._id=C._id;C._free=true;return T},_drawEachText:function(o2,oN,C,o4,o3,pd,oK){var pc=oN.name;var oS=oN.styleText?oN.styleText[0]:oN.style;if(!oS){return null}var oV=oS.fontSize||0;var ph=oS.fontWeight;var pu=oS.haloSize||0;var pz=oS.padding||[0,0];if(!oX){}if(oS.fontRgba){var pC=oS.fontRgba[3]/255;var oR=[];oR[3]=pC;for(var pB=0;pB<3;pB++){oR[pB]=oS.fontRgba[pB]}}if(oS.haloRgba){var pC=oS.haloRgba[3]/255;var oY=[];oY[3]=pC;for(var pB=0;pB<3;pB++){oY[pB]=oS.haloRgba[pB]}}var po=oR?"rgba("+oR.join(",")+")":oS.color;var oM=oY?"rgba("+oY.join(",")+")":oS.strokeColor;var pw=oN.styleId||0;if(pu>4){pu=4}var pe=[];var o0=[];var pa=0;if(oK&&!oK[pw]){oK[pw]={}}var oU=oV+pu*2+pz[0]*2;var pf=oU;if(oN.containDescendings){pf+=4}if(pu===0){pf+=2}if(oN.textOnIcon){pf=Math.max(pf,oN.iconSize[1])}if(pw!==C||pf>pd){C=pw;if(ph>=10&&ph%10===0){o2.font=ph*10+" "+oV+"px "+this._map.config.fontFamily}else{o2.font=oV+"px "+this._map.config.fontFamily}if(pf>pd){var pb=pf-pd;pd+=pb;o3+=pb}if(pu>0){o2.lineWidth=pu*2;o2.strokeStyle=oM}o2.fillStyle=po}if(oN.type==="line"){var oP=pc.split("");var o6=[];for(var py=0;py<oP.length;py++){var pr=oP[py];var o7;var pi;if(o3+pf+this._bufferSpan[1]>this._drawingCanvasHeight){for(var px=0;px<o6.length;px++){delete oK[pw][o6[px]]}return{overHeight:true,curX:o4,curY:o3,curLineHeight:pd,styleId:pw}}if(oK[pw][pr]){var oX=oK[pw][pr];o7=oX.displaySize;pi=oX.curWordPosition}else{var T=Math.ceil(o2.measureText(pr).width);o4+=this._bufferSpan[0];if(o4+T>this._drawingCanvasWidth){o4=0+this._bufferSpan[0];o3+=pf;o3+=this._bufferSpan[1];pd=pf;if(o3+pf+this._bufferSpan[1]>this._drawingCanvasHeight){for(var px=0;px<o6.length;px++){delete oK[pw][o6[px]]}return{overHeight:true,curX:o4,curY:o3,curLineHeight:pd,styleId:pw}}}var pq=o4;if(pu>0){T+=pu;pq-=Math.round(pu/2);o2.strokeText(pr,o4,o3)}o2.fillText(pr,o4,o3);var pn=[T,pf];o7=[Math.round(pn[0]/2),Math.round(pn[1]/2)];if(oN.containDescendings){pi=[pq,o3-pf+4]}else{pi=[pq,o3-pf]}oK[pw][pr]={displaySize:o7,curWordPosition:pi,totalHeight:pa};o6.push(pr);o4+=T}pe.push(o7);o0.push(pi)}pa=Math.round(pe[0][1])}else{if(oK[pw][pc]){var oX=oK[pw][pc];pe=oX.textSize;o0=oX.labelImagePosition;pa=oX.totalHeight}else{var oW=pc.split("\\");if(oW.length>1&&oN.textOnIcon){var pA=0;var pv=0;var pD=[];var o8=8;for(var py=0;py<oW.length;py++){var pc=oW[py];var oT=Math.ceil(o2.measureText(pc).width);if(oT>pA){pA=oT}pD.push(Math.round(oT/2));pv+=pf}var oQ=pA+2*o8;var pt=pv+2*o8;if(o4+oQ>this._drawingCanvasWidth){o4=0+this._bufferSpan[0];o3+=pd;o3+=this._bufferSpan[1]}var pb=pt-pd;if(pb>0){o3+=pb;pd+=pb}if(o3+this._bufferSpan[1]>this._drawingCanvasHeight){return{overHeight:true,curX:o4,curY:o3-(pb>0?pb:0),curLineHeight:pd-(pb>0?pb:0),styleId:pw}}var pm=o4;var o9=o3-pt;var e=Math.round(oQ/2);var oZ=this._iconCache[oN.icon].image;this.drawStretchedIcon(o2,oZ,[pm,o9],o8,pA,pv);for(var py=0;py<oW.length;py++){var pc=oW[py];var ps=pm+(e-pD[py]);var pp=o9+4+(py+1)*pf;o2.fillText(pc,ps,pp)}pe.push([Math.round(oQ/2),Math.round(pt/2)]);o0.push([pm,o9]);o4+=oQ;pa=Math.round(pt/2)}else{for(var py=0;py<oW.length;py++){var pc=oW[py];var oT=Math.ceil(o2.measureText(pc).width);if(oT>this._drawingCanvasWidth&&oW.length==1){oW[py]=pc.substring(0,Math.floor(pc.length/2));oW[py+1]=pc.substring(Math.floor(pc.length/2));py--;continue}var oQ=oT;var oL=0;if(oN.textOnIcon){oL=10;oQ+=oL*2;if(oN.styleId===519){oQ=oN.iconSize[0];oL=Math.round((oQ-oT)/2)}}if(o4+oQ>this._drawingCanvasWidth){var o5=o3+pf+this._bufferSpan[1];if(o5+this._bufferSpan[1]>this._drawingCanvasHeight){return{overHeight:true,curX:o4,curY:o3,curLineHeight:pd,styleId:pw}}o3=o5;o4=0+this._bufferSpan[0];pd=pf}else{if(o3+this._bufferSpan[1]>this._drawingCanvasHeight){return{overHeight:true,curX:o4,curY:o3,curLineHeight:pd,styleId:pw}}}var pm=o4;var o9=o3-pf;var pl=o4;var pk=o3;if(oN.containDescendings){pk-=4}if(oN.textOnIcon){var pg=false;var oZ=this._iconCache[oN.icon].image;var pj=oN.iconSize.concat([]);if(oU>=pj[1]){pj[1]=oU;pg=true;pf+=oL*2;var pb=pf-pd;if(pb>0){if(o3+pb+this._bufferSpan[1]>this._drawingCanvasHeight){return{overHeight:true,curX:o4,curY:o3,curLineHeight:pd,styleId:pw}}o3+=pb;pd=pf;pk+=(pb-oL);o9+=(pb-oL*2)}else{pk-=oL;o9-=oL*2}}if(oT>=pj[0]){pj[0]=oT}if(oN.styleId===519){o2.drawImage(oZ,0,0,pj[0],pj[1],pm,o9,pj[0],pj[1])}else{if(oN.noStretch){pk-=oU/2;var o1=oT+oL*2;o2.drawImage(oZ,0,0,oZ.width,oZ.height,pm,o9,o1,oU)}else{if(pg){this.drawStretchedIcon(o2,oZ,[pm,o9],oL,oT,pj[1])}else{this.draw3StretchedIcon(o2,oZ,[pm,o9],oL,oT,pj[1])}}}pl+=oL;if(oN.iconSize[1]>oU){pk-=(oN.iconSize[1]-oU)/2-1;if(oN.containDescendings){pk+=4}}}if(pu>0){if(pw===71028){pf-=2}if(pw===32){pf-=2}o2.strokeText(pc,pl,pk)}o2.fillText(pc,pl,pk);var oO=[oQ,pf];var o7=[Math.round(oO[0]/2),Math.round(oO[1]/2)];pe.push(o7);o0.push([pm,o9]);pa+=Math.round(o7[1]);o4+=oQ}}oK[pw][pc]={textSize:pe,labelImagePosition:o0,totalHeight:pa}}}oN.textSize=pe;oN.labelImagePosition=o0;oN.totalHeight=pa;return{curX:o4,curY:o3,curLineHeight:pd,styleId:pw}},drawStretchedIcon:function(e,C,T,oM,oN,i){var oL=T[0];var oK=T[1];e.drawImage(C,0,0,oM,oM,oL,oK,oM,oM);e.drawImage(C,oM,0,1,oM,oL+oM,oK,oN,oM);e.drawImage(C,C.width-oM,0,oM,oM,oL+oN+oM,oK,oM,oM);e.drawImage(C,0,oM,oM,1,oL,oK+oM,oM,i);e.drawImage(C,oM,oM,1,1,oL+oM,oK+oM,oN,i);e.drawImage(C,C.width-oM,oM,oM,1,oL+oN+oM,oK+oM,oM,i);e.drawImage(C,0,C.height-oM,oM,oM,oL,oK+i+oM,oM,oM);e.drawImage(C,oM,C.height-oM,1,oM,oL+oM,oK+i+oM,oN,oM);e.drawImage(C,C.width-oM,C.height-oM,oM,oM,oL+oN+oM,oK+i+oM,oM,oM)},draw3StretchedIcon:function(e,i,C,oL,oN,oM){var oK=C[0];var T=C[1];e.drawImage(i,0,0,oL,i.height,oK,T,oL,i.height);e.drawImage(i,oL,0,1,i.height,oK+oL,T,oN,i.height);e.drawImage(i,i.width-oL,0,oL,i.height,oK+oL+oN,T,oL,i.height)},_updateFixedLabelCoords:function(oK,oZ){if(oZ===0){return}var oU=[];var o6=[];var o7=0;var oX=oK.totalHeight;var pf=oK.textSize.length;var oL=oK.direction;if(typeof oL!=="number"){oL=0}for(var o8=0;o8<pf;o8++){var o0=oK.labelImagePosition[o8];var oY=oK.textSize[o8];var oW=o0[0];var T=o0[1];var oM=oY[0];var oR=oY[1];var oT=0;var o5=0;if(typeof oK.textMargin==="number"){o5=oK.textMargin}var oS;var e;var oO=0;var oV=0;if(!oK.iconPos){if(!oK.custom){oL=m4}}else{oO=oK.iconPos.width;oV=oK.iconPos.height}switch(oL){case jD:var C=oX/2-oR+oT*(pf-1)/2;oS=Math.round(-oO/2-oM-o5);e=Math.round(C-o7-oT*o8);break;case gM:var C=oX/2-oR+oT*(pf-1)/2;oS=Math.round(oO/2+o5);e=Math.round(C-o7-oT*o8);break;case aa:var C=oV/2+oX-oR+oT*pf;oS=Math.round(-oM/2);e=Math.round(C-o7-oT*o8);break;case kR:var C=-oV/2-oT-oR;oS=Math.round(-oM/2);e=Math.round(C-o7-oT*o8);break;case m4:var C=-oX/2-oT*(pf-1)/2;oS=Math.round(-oM/2);e=Math.round(C-o7-oT*o8);break}o7+=oR;var oQ=oS+oM;var pg=e;var oP=oQ;var pe=pg+oR;var oN=oS;var pd=pe;oU.push(oS,e,oQ,pg,oP,pe,oS,e,oP,pe,oN,pd);var pc=oW/this._drawingCanvasWidth;var o4=(oZ-T-oR*2)/oZ;var pb=(oW+oM*2)/this._drawingCanvasWidth;var o3=o4;var pa=pb;var o2=(oZ-T)/oZ;var o9=pc;var o1=o2;o6.push(pc,o4,pb,o3,pa,o2,pc,o4,pa,o2,o9,o1)}if(!oK.textPos){oK.textPos={}}oK.textPos.vertex=oU;oK.textPos.texcoord=o6},_addFixedLabelBounds:function(oP){var oL=1000;var T=1000;var C=-1000;var e=-1000;if(oP.iconPos){var oN=oP.iconPos["vertex"];for(var oO=0,oK=oN.length;oO<oK;oO+=2){var oT=oN[oO];var oR=oN[oO+1];if(oT<oL){oL=oT}if(oT>C){C=oT}if(oR<T){T=oR}if(oR>e){e=oR}}}if(oP.custom&&oP.style.iconSize&&!oP.name){var oQ=oP.style.iconSize;var oS=oP.direction;switch(oS){case m4:oL=-Math.round(oQ[0]/2);T=-Math.round(oQ[1]/2);C=Math.round(oQ[0]/2);e=Math.round(oQ[1]/2);break;case aa:oL=-Math.round(oQ[0]/2);T=0;C=Math.round(oQ[0]/2);e=oQ[1];break}}if(oP.textPos){var oM=oP.textPos["vertex"];for(var oO=0,oK=oM.length;oO<oK;oO+=2){var oT=oM[oO];var oR=oM[oO+1];if(oT<oL){oL=oT}if(oT>C){C=oT}if(oR<T){T=oR}if(oR>e){e=oR}}}oP.bds=[oL,T,C,e]},_updateLineLabelCoords:function(o1,oQ){if(oQ===0){return}var T=o1.wordsInfo;var oY=o1.wordCount;if(!o1.labelImagePosition){return}var oS=this._map._displayOptions.isEn;var oT=o1.labelImagePosition.slice(0);var o2=o1.textSize.slice(0);if(o1.reverse&&!oS){oT.reverse();o2.reverse()}var pb=1000;var o8=1000;var o9=-1000;var o7=-1000;for(var o3=0;o3<oY;o3++){var pc=oT[o3];var pa=pc[0];var oZ=pc[1];var oX=o2[o3];var oP=oX[0];var e=oX[1];var oO=pa/this._drawingCanvasWidth;var oW=(oQ-oZ-e*2)/oQ;var oM=(pa+oP*2)/this._drawingCanvasWidth;var oV=oW;var oK=oM;var oU=(oQ-oZ)/oQ;var C=oO;var oR=oU;if(oS){T[o3]={}}T[o3].size=[oP,e];T[o3].texcoord=[oO,oW,oM,oV,oK,oU,oO,oW,oK,oU,C,oR];if(oS||!T[o3].offset){continue}var o6=T[o3].offset[0];var o5=T[o3].offset[1];var o4=o6-oP/2;var oN=o5+e/2;var oL=o5-e/2;var o0=o6+oP/2;if(o4<pb){pb=o4}if(o0>o9){o9=o0}if(oL<o8){o8=oL}if(oN>o7){o7=oN}}if(!oS){o1.bds=[pb,o8,o9,o7]}}});var iV={0:"00000000",16:"00010000",32:"00100000",48:"00110000",64:"01000000",96:"01100000"};function gw(oL,oN,T){var oK=oL.bds;if(!oK){return false}var oM=oL.tracer;var C;if(oM){if(!iV[oM]){C=oM.toString(2);if(C.length<8){C=new Array(8-C.length+1).join("0")+C}iV[oM]=C}C=iV[oM];var e=oG.mapZoomStartZoomMapping[oN];var oO=oN>20?21:oN;return C[oO-e]==="1"}var i=oL.displayRange;if(T>=i[0]&&T<=i[1]){return true}return false}function na(i,e){this.map=i.map;this.layer=i;e=e||[];this.allLabels=[];this._spotData=[];this._strategyInfo=null;this.RANK1=1000000;this.RANK2=2000000;this.RANK3=3000000;this.RANK4=4000000;this.RANK5=5000000;this._ratio=ja();this._useRound=true;this._sharpenRender=false;if(this._ratio>li.HIGH_RES_MIN_RATIO){this._useRound=false;this._sharpenRender=true}this._mapIsMoving=false;this._onMapIdleCallback=e.onMapIdleCallback;this.map.temp.isPermitSpotOver=true;this.currentSelectedLabel=null;this.map._labelProcessor=this;this.iconCache=new a1((c9()||hv.Browser.ie)?64:128,{clearCallback:function(C){if(C&&C.image){var T=C.image;if(T.onload){T.onload=null}if(T.onerror){T.onerror=null}T.src="";T.remove();C.image=null}}});this.fixedLabelData=[];this.lineLabelData=[];this.highlightLabelData=[];this._iconLoadTimer=null;this._labelTextCanvas=null;if(this.map.config.textRenderType==="canvas"){this._labelTextCanvas=this.map.tileMgr.getLabelTextCanvas()}this.bind()}hv.extend(na.prototype,{bind:function(){var C=this.map;var i=this;C.addEventListener("mapstatusbusy_inner",function(T){i._mapIsMoving=true;if(i._ratio>li.HIGH_RES_MIN_RATIO){i._sharpenRender=false}else{i._useRound=false}});C.addEventListener("mapstatusidle_inner",function(T){if(i._ratio>li.HIGH_RES_MIN_RATIO){i._sharpenRender=true}else{i._useRound=true}i._mapIsMoving=false});C.addEventListener("onspotmouseover",function(oL){if(!this.temp.isPermitSpotOver||this.config.enableIconHighlight===false){return}if(oL.spots.length>0){var oK=oL.spots[0].userdata.uid;var oM=oL.spots[0].userdata.tilePosStr;var T=i.getLabelByUid(oK,oM);T&&T.formatedData&&i._toHighlightColor(T.formatedData)}});C.addEventListener("onspotmouseout",function(oL){if(!this.temp.isPermitSpotOver){return}if(oL.spots.length>0){var oK=oL.spots[0].userdata.uid;var oM=oL.spots[0].userdata.tilePosStr;var T=i.getLabelByUid(oK,oM);T&&T.formatedData&&i._toDefaultColor(T.formatedData)}});C.addEventListener("spotclick",function(oL){if(oL.spots&&oL.spots.length>0){if(oL.spots[0].userdata.zoom<10){return}var oK=oL.spots[0].userdata.uid;var oM=oL.spots[0].userdata.tilePosStr;if(i.currentSelectedLabel&&(i.currentSelectedLabel.uid!==oK||i.currentSelectedLabel.tilePosStr!==oM)){i._recoverNormalState()}var T=i.getLabelByUid(oK,oM);T&&i._changeBaseMapState(T)}else{i._recoverNormalState()}});C.on("spot_status_reset",function(){i._recoverNormalState()});C.on("spot_highlight",function(oK){var T=i.getLabelByUid(oK.uid,oK.tilePosStr);T&&T.formatedData&&i._toHighlightColor(T.formatedData)});C.addEventListener("mousemove",function(T){if(i.curSpotAdded){return}if(this.currentOperation!==gp.idle||i._mapIsMoving===true){return}i._refreshSpotData();this.temp.isPermitSpotOver=true;i.curSpotAdded=true});if(c9()){function e(){i._refreshSpotData()}C.addEventListener("mapstatusidle_inner",e)}C.on("style_loaded",function(){if(i.map.config.textRenderType==="canvas"&&!i._labelTextCanvas){i._labelTextCanvas=i.map.tileMgr.getLabelTextCanvas()}});C.on("destroy",function(){i.iconCache.clear();for(var T=0;T<i.fixedLabelData.length;T++){i.fixedLabelData[T]=null}i.fixedLabelData=[];i.lineLabelData=[];i.highlightLabelData=[];for(var T=0;T<i.allLabels.length;T++){i.allLabels[T]._mcBds=null;i.allLabels[T]=null}i.allLabels=[];for(var T=0;T<i._spotData.length;T++){i._spotData[T].pt=null;i._spotData[T].userdata.iconPoint=null;i._spotData[T]=null}i._spotData=[]})},getLabelByUid:function(oN,oO){var e=this.map._featureMgr.getResult().tileLabels[this.layer.drawIndex]||[];for(var oM=0;oM<e.length;oM++){var T=e[oM].fixedLabel;for(var oL=0;oL<T.length;oL++){if(e[oM].fixedLabel[oL].guid===oN&&e[oM].fixedLabel[oL].tilePosStr===oO){return e[oM].fixedLabel[oL]}}var oK=e[oM].indoorLabel;for(var C=0;C<oK.length;C++){if(e[oM].indoorLabel[C].guid===oN&&e[oM].indoorLabel[C].tilePosStr===oO){return e[oM].indoorLabel[C]}}}return null},getTileByLabelUid:function(oN){var e=this.map._featureMgr.getResult().tileLabels[this.layer.drawIndex]||[];for(var oM=0;oM<e.length;oM++){var T=e[oM].fixedLabel;for(var oL=0;oL<T.length;oL++){if(e[oM].fixedLabel[oL].guid===oN){return e[oM]}}var oK=e[oM].indoorLabel;for(var C=0;C<oK.length;C++){if(e[oM].indoorLabel[C].guid===oN){return e[oM]}}}return null},_toHighlightColor:function(C){if(C.tempRank&&C.tempRank===this.RANK5){return}var e=this.map._featureMgr.getResult().eleData[4][this.layer.drawIndex]||[];var oK=false;for(var T=0;T<e.length;T++){if(e[T]===C||(e[T].guid===C.guid&&e[T].tilePosStr===C.tilePosStr&&e[T].zoom===C.zoom)){oK=true;break}}if(oK){return}e.push(C);this.map._featureMgr.setOverlayData(e,4,this.layer.drawIndex);this.map.dispatchEvent(new ix("onrefresh"))},_toDefaultColor:function(C){if(C.tempRank&&C.tempRank===this.RANK5){return}var e=this.map._featureMgr.getResult().eleData[4][this.layer.drawIndex]||[];var oK=false;for(var T=0;T<e.length;T++){if(C===e[T]||(C.guid===e[T].guid&&C.tilePosStr===e[T].tilePosStr&&C.zoom===e[T].zoom)){e.splice(T,1);oK=true;break}}if(!oK){return}this.map._featureMgr.setOverlayData(e,4,this.layer.drawIndex);this.map.dispatchEvent(new ix("onrefresh"))},_changeBaseMapState:function(i){var oK=i.guid;var oO=i.formatedData.guidExt;var oP={guid:oK,tilePosStr:i.tilePosStr,guidExt:oO};this._strategyInfo=oP;this.currentSelectedLabel=i;var T=this.map._featureMgr;var e=T.getLabelData(this.layer.drawIndex);e=this.collisionTest(e);this.updateLabels(e);var oQ=this.fixDataFormat(e);T.setOverlayData(oQ[0],2,this.layer.drawIndex);T.setOverlayData(oQ[1],3,this.layer.drawIndex);T.setOverlayData(oQ[2],4,this.layer.drawIndex);var C=this.getTileByLabelUid(oK);this.currentSelectedLabel.tileInfo=C.tileInfo;var oN=this.layer.tileCache.getAllData();for(var oM in oN){var oL=oN[oM].data;if(!oL.label){continue}this.clearCollisionCache(oL.label)}this.map.dispatchEvent(new ix("onrefresh"))},_recoverNormalState:function(){this._strategyInfo=null;var oN=false;var oL=this.map._featureMgr.getLabelData(this.layer.drawIndex);if(this.currentSelectedLabel){var C=this.currentSelectedLabel.guid;this.clearCollisionCache(this.getTileByLabelUid(C));var oK=this.layer.tileCache.getAllData();for(var T in oK){if(Object.prototype.hasOwnProperty.call(oK,T)){var oM=oK[T].data;if(!oM.label){continue}this.clearCollisionCache(oM.label)}}this.currentSelectedLabel.tempRank=null;this.currentSelectedLabel=null;oN=true}oL=this.collisionTest(oL);this.updateLabels(oL);var e=this.fixDataFormat(oL);var i=this.map._featureMgr;i.setOverlayData(e[0],2,this.layer.drawIndex);i.setOverlayData(e[1],3,this.layer.drawIndex);i.setOverlayData([],4,this.layer.drawIndex);this.map.dispatchEvent(new ix("onrefresh"));if(oN){this.curSpotAdded=false;this._refreshSpotData()}},loadIconImages:function(oW,oM,C){var oV=oW.label;var oY=oW.tileInfo.style;var oK=oV.fixedLabel;if(C==="indoor"){oK=[]}var oU=oV.indoorLabel;var oT=oK.length+oU.length;var oZ=this;var oX=0;var oR=200;for(var oS=0;oS<oT;oS++){var oP;if(oS<oK.length){oP=oK[oS]}else{oP=oU[oS-oK.length]}if(!oP.iconPos){var oO=this.loadSVGSymbol(oP,oY);if(!oO){continue}else{if(oO!==true){var oN=oP.iconPos.iconType;var e=oY+"_"+oN;this.iconCache.setData(e,{loaded:false,image:oO});oP.iconPos.img=oO}}}var oN=oP.iconPos.iconType;var e=oY+"_"+oN;oX++;if(this.iconCache.getData(e)){if(this.iconCache.getData(e).loaded){oM(oW)}else{if(oP.iconPos.img){oP.iconPos.img.id=e;oP.iconPos.img.iconUrl=oN;this.iconCache.setData(e,{loaded:true,image:oP.iconPos.img});this._addToIconTexture(oP.iconPos.img);oM(oW)}else{}}continue}if(!C||C==="indoor"){var oL=K.getIconSetPath(this.map.config.style)+oN+".png";var oQ=cw();if(oQ&&oQ.udt){oL+="?udt="+oQ.udt}}else{var oL=oN}var T=new Image();T.id=e;T.iconUrl=oL;T.crossOrigin="anonymous";T.onload=function(){if(oZ.iconCache.getData(this.id)){oZ.iconCache.getData(this.id).loaded=true;oZ._addToIconTexture(this)}if(!oZ._iconLoadTimer){oZ._iconLoadTimer=setTimeout(function(){oM();oZ._iconLoadTimer=null},oR)}this.onload=null};T.onerror=function(){if(!oZ._iconLoadTimer){oZ._iconLoadTimer=setTimeout(function(){oM();oZ._iconLoadTimer=null},oR)}oZ.iconCache.removeData(this.id);this.onerror=null;cv.fetchDebug&&cv.fetchDebug.sendError({title:this.iconUrl,msg:this.iconUrl,category:cv.fetchDebug.category.RESOURCE,level:cv.fetchDebug.levels.ERROR,url:this.iconUrl})};T.src=oL;this.iconCache.setData(e,{loaded:false,image:T})}return oX},_addToIconTexture:function(oL){if(!this.map._webglMapScene){return}var oN=this.map._webglMapScene._painter;var e=oN._iconTextureAtlas.addTexture(oL);if(e===false){this.map.fire(new ix("onlayer_clear"))}if(!e){return}oN._iconTextureAtlasOffset[oL.id]=e;var oQ=0*oL.width/1024+e.width;var oK=0*oL.height/1024+e.height;var oP=oL.width/1024+e.width;var T=oK;var oO=oP;var C=oL.height/1024+e.height;var oM=oQ;var i=C;oN._iconTextureAtlasCoords[oL.id]=[oQ,oK,oP,T,oO,C,oQ,oK,oO,C,oM,i]},loadSVGSymbol:function(T,C){var i=T.symbol||{};var oM=fK.generateKey(i.path,i);if(!oM){return null}var oL=this.iconCache.getData(C+"_"+oM);if(oL&&oL.loaded){T.iconPos=this.createVertex(oL.image.width/2,oL.image.height/2,oM);return true}var oK=new fK(i.path,i);oK.add();var e=oK.render();if(!e){return null}T.iconPos=this.createVertex(oK.size.width,oK.size.height,oM);return oK.data},createVertex:function(oL,oP,C){var oK=Math.round(-oL/2);var oR=Math.round(-oP/2);var T=oK+oL;var oQ=oR;var i=T;var oO=oQ+oP;var e=oK;var oN=oO;var oM={vertex:[oK,oR,T,oQ,i,oO,oK,oR,i,oO,e,oN],texcoord:null,width:oL,height:oP,iconType:C};return oM},loadImgByStr:function(T,oK,oL){if(!T&&!oK){oL&&oL(null,null);return}if(typeof T==="object"&&typeof oK==="object"){oL(T,oK);return}var i=0;var C=null;var e=null;if(T){i++;C=new Image();C.onload=function(){i--;if(i===0){oL&&oL(this,e)}this.onload=null};C.src=T}if(oK){i++;e=new Image();e.onload=function(){i--;if(i===0){oL&&oL(C,this)}this.onload=null};e.src=oK}},collisionTest:function(pJ,oW,o4){if(this.map.viewAnimationTime){return[]}if(!pJ){return[]}if(this.layer.ontology&&this.layer.ontology.noCollision){for(var pg=0;pg<pJ.length;pg++){var p0=pJ[pg].fixedLabel;for(var pe=0;pe<p0.length;pe++){var oO=p0[pe];var p2=this.layer.ontology.getLayerVisible(oO.layerName);oO.isDel=!p2}}return pJ}var o0=this.map;var pP=o0.getHeading();pP=this.calcLoopHeading(pP);var ps=o0.height;var pk=this.allLabels;for(var pg=0;pg<pk.length;pg++){pk[pg]._mcBds=null}pk.length=0;pJ.sort(function(p3,i){var p5=p3.tileInfo;var p4=i.tileInfo;if(p5.col*p5.row<p4.col*p4.row){return -1}else{return 1}});var o1=o0.getTilt();var pQ=o0.getZoom();if(this.layer.ontology){pQ+=(this.layer.spanLevel||0)}var pc;if(o4){pc=o4}else{pc=this.getZoomStep();o4=pc}for(var pg=0,pa=pJ.length;pg<pa;pg++){var C=pJ[pg];var pl=C.tileInfo;var pd=pl.zoom;var pv=pl.loopOffsetX/Math.pow(2,18-pd);if(!pP&&!o1){if(C.unnecessaryCollisionTest&&C.unnecessaryCollisionTest[o4]){continue}}var p0=C.fixedLabel||[];for(var pe=0,pX=p0.length;pe<pX;pe++){var oO=p0[pe];oO.zoom=pd;if(oW===-1&&oO.isDel){continue}if(this.layer.ontology){var p2=this.layer.ontology.getLayerVisible(oO.layerName);if(!p2){continue}}if(!gw(oO,pl.useZoom,pQ)){oO.isDel=true;continue}this.calcCollisionBounds(oO,pc,pv,ps);pk.push(oO)}var pf=C.indoorLabel||[];for(var pb=0,po=pf.length;pb<po;pb++){var pn=pf[pb];pn.zoom=pd;if(oW===-1&&pn.isDel){continue}if(!gw(pn,pl.useZoom)){pn.isDel=true;continue}this.calcCollisionBounds(pn,pc,pv,ps);pk.push(pn)}var pW=C.lineLabel||[];if(!this.map._displayOptions.isEn){for(var pj=0,o2=pW.length;pj<o2;pj++){var pF=pW[pj];if(oW===-1&&pF.isDel){continue}if(!gw(pF,pl.useZoom)){pF.isDel=true;continue}var oP=pF.pt;var pE=o0.pointToPixelIn(oP,{zoom:pc,useRound:this._useRound});var pZ=pE.x+pv;var pY=ps-pE.y;var oL=pF.bds;var pH=oL[0];var pG=oL[1];var o7=oL[2];var o5=oL[3];var oZ=pH;var oY=pG;var pV=o7;var pU=o5;if((pP>=0&&pP<45)||(pP>=315&&pP<360)){oZ=pH;oY=pG;pV=o7;pU=o5}else{if(pP>=45&&pP<135){oZ=pG;oY=-o7;pV=o5;pU=-pH}else{if(pP>=135&&pP<225){oZ=-o7;oY=-o5;pV=-pH;pU=-pG}else{if(pP>=225&&pP<315){oZ=-o5;oY=pH;pV=-pG;pU=o7}}}}pF._tempBds=[pZ+oZ,pY+oY,pZ+pV,pY+pU];var pN=o0.pixelToPointIn(new hV(pF._tempBds[0],pE.y+oY),{zoom:pc});var pC=o0.pixelToPointIn(new hV(pF._tempBds[2],pE.y+pU),{zoom:pc});pF._mcBds=[pN,pC];pk.push(pF)}}else{for(var pj=0,o2=pW.length;pj<o2;pj++){var pK=pW[pj];if(!pK.wordsInfo.length){continue}if(!pK[pc]){pK[pc]=this.calcLineLabelEnInfos(pK,pc)}var oN="datas_"+pc;pK[oN]=[];var pu=pK[pc];var T=o0.getCenterIn();for(var pt=0;pt<pu.length;pt++){var pw=pu[pt];var pL=-1;var ph=Infinity;for(var pD=0;pD<pw.length;pD++){var o6=pw[pD];if(o6.isDel||!gw(o6,pl.useZoom)){continue}var oX=Math.sqrt(Math.pow(o6.pt.lng-T.lng,2)+Math.pow(o6.pt.lat-T.lat,2));if(oX<ph){pL=pD;ph=oX}}if(pL===-1){continue}var o6=pw[pL];var pR=Object.assign({},o6);pR.name=pK.name;pR.key=pK.key+"_"+pt+"_"+pD;pR.labelAngle=pK.labelAngle;pR.processedInZoom=pK.processedInZoom;pR.styleText=pK.styleText;pR.rank=pK.rank;pR.cachedIsDel={};pR.cachedIsDel[pc]=false;this.calcWordsInfoMCBds(o0,pc,pv,pR);pk.push(pR);pK[oN].push(pR)}}}}var pB=this._strategyInfo;if(pB){var pi=pB.guid;var o8=pB.guidExt;var pz=false;for(var o9=0,oV=pk.length;o9<oV;o9++){var oM=pk[o9];delete oM.tempRank;if(!this.layer.isClickableLabel(oM)||(o8===1&&!oM.guidExt)){continue}if(pi===oM.guid&&pB.tilePosStr===oM.tilePosStr){oM.tempRank=this.RANK5;pz=true}}if(!pz&&this.currentSelectedLabel){this.currentSelectedLabel.tempRank=this.RANK5;var pm=this.currentSelectedLabel.tileInfo;if(pm){var o3=pm.zoom;var pO=pm.loopOffsetX/Math.pow(2,18-o3);this.calcCollisionBounds(this.currentSelectedLabel,pc,pO,ps);pk.push(this.currentSelectedLabel)}}}else{for(var oK=0,oU=pk.length;oK<oU;oK++){var oR=pk[oK];if(oR.type==="line"||!oR.iconPos){continue}delete oR.tempRank}}pk.sort(function(p4,p3){var p5=p4.tempRank?p4.tempRank:p4.rank;var i=p3.tempRank?p3.tempRank:p3.rank;return i-p5||p4.startZoom-p3.startZoom||p3.pt.lng-p4.pt.lng||p3.pt.lat-p4.pt.lat});var pT=0;if(o1>0){pT=6}pQ=o0.getZoom();if(pQ>=8&&pQ<9){pQ<8.5?(pT=6):(pT=3)}if(o0._displayOptions.labelMargin>0){pT=o0._displayOptions.labelMargin}var px=2;if(pQ<6&&pQ>=5){px=-1}for(var pA=0,oT=pk.length;pA<oT;pA++){var pS=pk[pA];var pI=pS._tempBds;pS.isDel=false;pS._intersectIdx=[];for(var pq=pA+1;pq<oT;pq++){var pr=pk[pq];var p1=pr._tempBds;if(!(pI[2]+pT+px<p1[0]-pT||pI[0]-pT>p1[2]+pT+px||pI[3]+pT+px<p1[1]-pT||pI[1]-pT>p1[3]+pT+px)){pS._intersectIdx.push(pq)}}}for(var py=0,oS=pk.length;py<oS;py++){var oQ=pk[py];if(oQ.isDel===false){var e=oQ._intersectIdx;for(var pp=0,pM=e.length;pp<pM;pp++){pk[e[pp]].isDel=true;if(pk[e[pp]].cachedIsDel){pk[e[pp]].cachedIsDel[o4]=true}}}}return pJ},calcCollisionBounds:function(oP,oN,i,oO){var oL=oP.ptFix||oP.pt;var T=this.map;var oK=T.pointToPixelIn(oL,{zoom:oN,useRound:this._useRound});var C=oK.x+i;var oR=oO-oK.y;var e=oP.bds;oP._tempBds=[C+e[0],oR+e[1],C+e[2],oR+e[3]];var oM=T.pixelToPointIn(new hV(oP._tempBds[0],oK.y+e[1]),{zoom:oN});var oQ=T.pixelToPointIn(new hV(oP._tempBds[2],oK.y+e[3]),{zoom:oN});oP._mcBds=[oM,oQ]},getZoomStep:function(){var C=this.map.getZoom();var e=Math.floor(C);var i=C-e>=0.5?e+0.5:e;return i},clearCollisionCache:function(e){if(!e){return}e.cacheState=null;e.unnecessaryCollisionTest=null},getCachedLabels:function(e){e=e||[];var C=this.getZoomStep();var oL=false;for(var T=0;T<e.length;T++){var oK=e[T];if(!oK.cacheState||!oK.cacheState[C]){oL=true;break}if(oK.hasNewData){oL=true;break}}if(oL){this.calcLabelsCollision(e)}return e},calcLabelsCollision:function(C){var oK=this.getZoomStep();var oL={};var oS;var T;var oU;var oW;var oV;var oT;C=this.collisionTest(C,undefined,oK);bI.addLabelIntoAreaSpots(C);for(var oP=0;oP<C.length;oP++){oS=C[oP];T=oS.tileInfo;oW=T.col+","+T.row;oL[oW]=1}var e={};for(var oN=0;oN<C.length;oN++){oS=C[oN];if(!oS.cacheState){oS.cacheState={}}T=oS.tileInfo;oV=T.col;oT=T.row;oW=oV+","+oT;if(oS.cacheState[oK]==="stable"){e[oW]=1;if(!oS.hasNewData){continue}}for(var oO=0;oO<oS.fixedLabel.length;oO++){oU=oS.fixedLabel[oO];if(!oU.cachedIsDel){oU.cachedIsDel={}}oU.cachedIsDel[oK]=oU.isDel}for(var oR=0;oR<oS.indoorLabel.length;oR++){oU=oS.indoorLabel[oR];if(!oU.cachedIsDel){oU.cachedIsDel={}}oU.cachedIsDel[oK]=oU.isDel}for(var oQ=0;oQ<oS.lineLabel.length;oQ++){oU=oS.lineLabel[oQ];if(!oU.cachedIsDel){oU.cachedIsDel={}}oU.cachedIsDel[oK]=oU.isDel}if(oL[(oV-1)+","+(oT-1)]&&oL[(oV-1)+","+oT]&&oL[(oV-1)+","+(oT+1)]&&oL[oV+","+(oT-1)]&&oL[oV+","+(oT+1)]&&oL[(oV+1)+","+(oT-1)]&&oL[(oV+1)+","+oT]&&oL[(oV+1)+","+(oT+1)]){oS.cacheState[oK]="stable";e[oW]=1}else{if(!oS.cacheState[oK]){oS.cacheState[oK]="unstable"}}}for(var oM=0;oM<C.length;oM++){oS=C[oM];T=oS.tileInfo;oW=T.col+","+T.row;oV=+T.col;oT=+T.row;if(e[(oV-1)+","+(oT-1)]&&e[(oV-1)+","+oT]&&e[(oV-1)+","+(oT+1)]&&e[oV+","+(oT-1)]&&e[oV+","+(oT+1)]&&e[(oV+1)+","+(oT-1)]&&e[(oV+1)+","+oT]&&e[(oV+1)+","+(oT+1)]){if(!oS.unnecessaryCollisionTest){oS.unnecessaryCollisionTest={}}oS.unnecessaryCollisionTest[oK]=1}}C.hasNewData=false},updateLabels:function(oL){var C=this.map;var oT=C.getZoom();var oV=C.getHeading();oV=this.calcLoopHeading(oV);var oU=C.getTilt();var oM=this.getZoomStep();for(var oR=0,oO=oL.length;oR<oO;oR++){var oQ=oL[oR];var oK=oQ.tileInfo;var oP=oK.loopOffsetX||0;var e={zoom:oT,mcOffsetX:oP};this.updateFixedLabel(oQ.fixedLabel,oU,oV,oQ,oM,e);e={zoom:oT,mcOffsetX:0};this.updateFixedLabel(oQ.indoorLabel,oU,oV,oQ,oM,e);if(!this.map._displayOptions.isEn){this.updateLineLabel(oQ.lineLabel,oU,oV,oQ,oM)}else{for(var oN=0,oS=oQ.lineLabel.length;oN<oS;oN++){var T=oQ.lineLabel[oN];if(T["datas_"+oM]){this.updateLineLabel(T["datas_"+oM],oU,oV,oQ,oM)}}}}},updateFixedLabel:function(oP,oS,i,oV,oL,oQ){if(oP.length===1){}var e=oQ.zoom;var oK=oQ.mcOffsetX;var o0;for(var oW=0,oN=oP.length;oW<oN;oW++){var oR=oP[oW];if(!oR.cachedIsDel){continue}if(!oS&&!i&&oV.cacheState&&oV.cacheState[oL]){oR.isDel=oR.cachedIsDel[oL];if(typeof oR.isDel==="undefined"){oR.isDel=oR.cachedIsDel[oL]=true}}if(oR.startScale>e){oR.isDel=true}if(oR.isDel){continue}var oZ=oR.pt;var C=(oR.hue||0)?jp(oR.hue):0;var T=oR.iconPos;if(T&&T.texcoord){if(!T.rtVertex){T.rtVertex=[];o0=T.vertex;var oO=my(oZ.lng);var oY=my(oZ.lat);T.rtVertex=[oO[0],oY[0],oO[1],oY[1],0,o0[0],o0[1],0,0,T.texcoord[0],T.texcoord[1],C,oO[0],oY[0],oO[1],oY[1],0,o0[2],o0[3],0,0,T.texcoord[2],T.texcoord[3],C,oO[0],oY[0],oO[1],oY[1],0,o0[4],o0[5],0,0,T.texcoord[4],T.texcoord[5],C,oO[0],oY[0],oO[1],oY[1],0,o0[6],o0[7],0,0,T.texcoord[6],T.texcoord[7],C,oO[0],oY[0],oO[1],oY[1],0,o0[8],o0[9],0,0,T.texcoord[8],T.texcoord[9],C,oO[0],oY[0],oO[1],oY[1],0,o0[10],o0[11],0,0,T.texcoord[10],T.texcoord[11],C]}}if(!oR.textOnIcon){C=0}var oX=oR.textPos;if(oX){if(!oX.rtVertex){oX.rtVertex=[];o0=oX.vertex;var oM=oX.rtVertex;var oU=my(oZ.lng);var o3=my(oZ.lat);var o2=my(oK);for(var oT=0,o1=o0.length;oT<o1;oT+=12){oM.push(oU[0],o3[0],oU[1],o3[1],0,o0[oT],o0[oT+1],o2[0],o2[1],oX.texcoord[0],oX.texcoord[1],C);oM.push(oU[0],o3[0],oU[1],o3[1],0,o0[oT+2],o0[oT+3],o2[0],o2[1],oX.texcoord[2],oX.texcoord[3],C);oM.push(oU[0],o3[0],oU[1],o3[1],0,o0[oT+4],o0[oT+5],o2[0],o2[1],oX.texcoord[4],oX.texcoord[5],C);oM.push(oU[0],o3[0],oU[1],o3[1],0,o0[oT+6],o0[oT+7],o2[0],o2[1],oX.texcoord[6],oX.texcoord[7],C);oM.push(oU[0],o3[0],oU[1],o3[1],0,o0[oT+8],o0[oT+9],o2[0],o2[1],oX.texcoord[8],oX.texcoord[9],C);oM.push(oU[0],o3[0],oU[1],o3[1],0,o0[oT+10],o0[oT+11],o2[0],o2[1],oX.texcoord[10],oX.texcoord[11],C)}}}}},updateLineLabel:function(oQ,pk,pa,o5,o6){oQ=oQ||[];var o0=this.map;var oT=o0.getZoomUnits();var oM=o0._displayOptions.isEn;for(var pj=0,ph=oQ.length;pj<ph;pj++){var oP=oQ[pj];if(!oP.cachedIsDel){continue}if(!pk&&!pa&&o5.cacheState&&o5.cacheState[o6]){oP.isDel=oP.cachedIsDel[o6];if(typeof oP.isDel==="undefined"){oP.isDel=oP.cachedIsDel[o6]=true}}if(oP.isDel){continue}if(!oP.styleText||oP.styleText.length===0){continue}var oR=oP.mcInTile;var pd=oR.x;var pb=oR.y;var o4=oP.wordsInfo;var oU=oP.isReverse;var o2=oP.labelAngle;var oY=false;var pc=0;if(pa!==0){var oZ=0;if(o4&&o4.length>0&&o4[0]){oZ=o4[0].angle||0}var pg=this.calcLoopHeading(oZ-pa);if(oM&&pg>90&&pg<270){pc=180;oY=true}if(!oM&&pg>45&&pg<315){if(pg>45&&pg<=135){pc=270}else{if(pg>135&&pg<=225){pc=180}else{if(pg>225&&pg<315){pc=90}}}if(o2>225&&o2<=315&&pc<=180){oY=true}else{if((o2>=0&&o2<=45||o2>=315&&o2<360)&&pc>=180){oY=true}}}}if(oM){if(oU===oY){continue}else{oU=oY}if(oY){o4=oP.reverse_wordsInfo}}for(var pi=0,oV=o4.length;pi<oV;pi++){var pf=o4[pi];if(!pf.offset){continue}var oO=oP.wordsInfo[pi];var oX=oO.calcInfo;var o9=pf.offset[0];var o7=pf.offset[1];if(!pf.size){continue}if(oM){oO.formatedData=null}oO.texcoordArr=pf.texcoord;var e=pf.size[0];var C=pf.size[1];var oW=pf.angle;if(!oX){oX={}}if(pa!==oX.mapHeading||oT!==oX.zoomUnits){oX.mapHeading=pa;oX.zoomUnits=oT;if(oY&&!oM){var o1=o4[oV-1-pi];o9=o1.offset[0];o7=o1.offset[1];oW=o1.angle}var oK=pd+o9*oT;var T=pb+o7*oT;oX.rotationCenter={lng:oK,lat:T};oX.calcHeading=pc;oX.angle=oW;oX.offsetX=o9;oX.offsetY=o7;oO.calcInfo=oX}if(!oO.rtVertex){oO.rtVertex=[]}oO.rtVertex.length=0;var o3=oX.calcHeading+oX.angle;var oL=oX.rotationCenter;o9=oX.offsetX;o7=oX.offsetY;var oN=Math.round(o9-e/2);var pe=Math.round(o9+e/2);var o8=Math.round(o7+C/2);var oS=Math.round(o7-C/2);oO.rtVertex.push(pd,pb,pf.z,oN,oS,oL.lng,oL.lat,o3,pf.texcoord[0],pf.texcoord[1],pd,pb,pf.z,pe,oS,oL.lng,oL.lat,o3,pf.texcoord[2],pf.texcoord[3],pd,pb,pf.z,pe,o8,oL.lng,oL.lat,o3,pf.texcoord[4],pf.texcoord[5],pd,pb,pf.z,oN,oS,oL.lng,oL.lat,o3,pf.texcoord[6],pf.texcoord[7],pd,pb,pf.z,pe,o8,oL.lng,oL.lat,o3,pf.texcoord[8],pf.texcoord[9],pd,pb,pf.z,oN,o8,oL.lng,oL.lat,o3,pf.texcoord[10],pf.texcoord[11])}}},calcLineLabelEnInfos:function(e,C){var oT=e.labelsInfo||[];var oO=[];var oK=[60799];var T=oK.indexOf(e.styleId);for(var oL=0,i=oT.length;oL<i;oL++){var oS=oT[oL][0];var oQ=oT[oL][1];var oN=oT[oL][2];if((T>-1&&C<14)||C<=13){oS=oT[oL][3];oQ=oT[oL][4]}var oR=this.calcLineLabelOffsetAndAngle(e,oS,oN,oQ,C);var oP=oT[oL][5];for(var oM=0;oM<oR.length;oM++){oR[oM].tracer=oP[oM]}oO.push(oR)}return oO},calcLineLabelOffsetAndAngle:function(oS,oM,T,oO,oN){var e=[];var i=oS.wordsInfo;var oR=oS.mcInTile;var oX=oS.name;for(var oQ=0,oL=T.length;oQ<oL;oQ++){var oU=T[oQ];var oT=[oR.x+oM[oU*2],oR.y+oM[oU*2+1]];var C=[];var oV=Math.floor(i.length/2);this.calcWordsInfo(i,oV-1,0,C,oM,oU,oO,oN);C.length&&this.calcWordsInfo(i,oV,i.length-1,C,oM,oU,oO,oN);var oW=true;if(C.length!==oX.length){oW=false}var oP=[];if(oW){var oK=this.reverseArray(i);this.calcWordsInfo(oK,oV-1,0,oP,oM,oU,oO,oN);oP.length&&this.calcWordsInfo(oK,oV,i.length-1,oP,oM,oU,oO,oN);if(oP.length!==oX.length){oP=[]}}e.push({isDel:!oW?true:false,pt:new d9(oT[0],oT[1]),mcInTile:{x:oM[oU*2],y:oM[oU*2+1]},wordsInfo:oW?C:[],reverse_wordsInfo:oP.length?oP:[],bds:!oW?[]:this.calWordsInfoBds(C)})}return e},reverseArray:function(oK){var e=[];for(var T=0;T<oK.length;T++){e[T]=oK[T]}for(var T=0;T<Math.floor(e.length/2);T++){var oL=e.length-1-T;var C=e[T];e[T]=e[oL];e[oL]=C}return e},calcWordsInfo:function(e,oO,oM,C,oZ,o8,o5,o2){var i=Math.pow(2,o2-18);var T=1/i;var o0=oZ[o8*2];var oY=oZ[o8*2+1];var oQ=oO<oM?1:-1;var oR=Math.abs(oM-oO)+1;var oW=[oZ[o8*2],oZ[o8*2+1]];var oU=[oZ[(o8+oQ)*2],oZ[(o8+oQ)*2+1]];var o7=oW;var oV=0;var oT=0;var oS=0;function o4(){o8=o8+oQ;if(oQ===1&&o8>=(oZ.length/2-1)){return false}if(oQ===-1&&o8<=0){return false}oW=[oZ[o8*2],oZ[o8*2+1]];oU=[oZ[(o8+oQ)*2],oZ[(o8+oQ)*2+1]];o7=oW;return true}var o3=1;for(var o6=oO;oQ===1?o6<=oM:o6>=0;oQ===1?o6++:o6--){var o9=e[o6];var o1=o9.size[0]*T;var oX=o9.size[1]*T;while(o3===1){var pa=o5[o8+(oQ===1?0:oQ)];var pb=oW;if(C.length){var oK=C[C.length-1];pb=oK.mc;var oL=this.calculateAngleDifference(pb,o7,oU);if(oL>0&&oL<90){o3=0;break}}var oN=this.linearEquationAndNextPoint(oW,oU,o7,pb,oT,o1/2,oS);if(!oN){oS+=o1/2}else{if(oN.length===1){oT=oN[0];if(!o4()){o3=0;break}}else{oS=0;var oP=[(oN[0]-o0)*i,(oN[1]-oY)*i];o7=[oN[2],oN[3]];C.push(Object.assign({offset:oP,angle:pa,z:0,mc:[oN[0],oN[1]],},o9));oT=0;break}}}if(o3===0){break}oV++}if(oV<oR){C=[]}else{if(oQ===-1){C.reverse()}}},linearEquationAndNextPoint:function(T,C,i,e,oQ,oO,oP){var o6=T[0];var oM=T[1];var o5=C[0];var oK=C[1];var oY=i[0];var oV=i[1];var oZ=e[0];var oW=e[1];const o4=Math.sqrt(Math.pow(o5-oY,2)+Math.pow(oK-oV,2));if((o4+oQ-oP)<oO*2){return[o4+oQ]}const oU=o5-o6;const oT=oK-oM;const oN=Math.sqrt(oU*oU+oT*oT);const o2=oU/oN;const o1=oT/oN;const oS=oY+o2*(oO-oQ+oP);const oR=oV+o1*(oO-oQ+oP);const oL=oS-oZ;const o3=oR-oW;const o7=Math.sqrt(oL*oL+o3*o3);if(o7<oO/10){return false}const o0=oS+o2*oO;const oX=oR+o1*oO;return[oS,oR,o0,oX]},calculateAngleDifference:function(oO,oN,oL){const oM={x:oO[0]-oN[0],y:oO[1]-oN[1]};const T={x:oL[0]-oN[0],y:oL[1]-oN[1]};const oP=oM.x*T.x+oM.y*T.y;const C=Math.sqrt(Math.pow(oM.x,2)+Math.pow(oM.y,2));const e=Math.sqrt(Math.pow(T.x,2)+Math.pow(T.y,2));const i=oP/(C*e);const oK=Math.acos(i.toFixed(2));const oQ=oK*(180/Math.PI);return oQ},calWordsInfoBds:function(oT){var oM=1000;var oL=1000;var C=-1000;var e=-1000;for(var oP=0;oP<oT.length;oP++){var oQ=oT[oP].offset[0];var oO=oT[oP].offset[1];var oS=oT[oP].size[0];var oU=oT[oP].size[1];var oR=oQ-oS/2;var oK=oO+oU/2;var T=oO-oU/2;var oN=oQ+oS/2;if(oR<oM){oM=oR}if(oN>C){C=oN}if(T<oL){oL=T}if(oK>e){e=oK}}return[oM,oL,C,e]},calcWordsInfoMCBds:function(o0,oR,oS,oP){var i=o0.getHeading();i=this.calcLoopHeading(i);var oQ=o0.height;var oT=oP.pt;var oO=o0.pointToPixelIn(oT,{zoom:oR,useRound:this._useRound});var oV=oO.x+oS;var oU=oQ-oO.y;var T=oP.bds;var oM=T[0];var oK=T[1];var oL=T[2];var C=T[3];var oZ=oM;var oY=oK;var oX=oL;var oW=C;if((i>=0&&i<45)||(i>=315&&i<360)){oZ=oM;oY=oK;oX=oL;oW=C}else{if(i>=45&&i<135){oZ=oK;oY=-oL;oX=C;oW=-oM}else{if(i>=135&&i<225){oZ=-oL;oY=-C;oX=-oM;oW=-oK}else{if(i>=225&&i<315){oZ=-C;oY=oM;oX=-oK;oW=oL}}}}oP._tempBds=[oV+oZ,oU+oY,oV+oX,oU+oW];var oN=o0.pixelToPointIn(new hV(oP._tempBds[0],oO.y+oY),{zoom:oR});var e=o0.pixelToPointIn(new hV(oP._tempBds[2],oO.y+oW),{zoom:oR});oP._mcBds=[oN,e]},calcLoopHeading:function(e){while(e>=360){e-=360}while(e<0){e+=360}return e},fixDataFormat:function(oS){var T=this.fixedLabelData;var e=this.lineLabelData;var C=this.highlightLabelData;var o1=0;var oN=0;var oX=0;var oY;if(this.currentSelectedLabel){var oM=this.getLabelByUid(this.currentSelectedLabel.guid,this.currentSelectedLabel.tilePosStr);if(!oM||oM.isDel){T[o1]=this.currentSelectedLabel.formatedData;o1++;if(this.map.config.enableIconHighlight!==false){C[oX]=this.currentSelectedLabel.formatedData;oX++}}}for(var oW=0;oW<oS.length;oW++){var oP=oS[oW];var oO=oP.fixedLabel;var oK=oP.indoorLabel;var oV=oP.lineLabel;var oZ={highlightLabelData:C,highlightLabelDataLen:oX};oY=this.fixFixedLabelDataFormat(oO,oP,T,o1,oZ);o1=oY[0];oX=oY[1];if(this.map._displayOptions.indoor){oY=this.fixFixedLabelDataFormat(oK,oP,T,o1,oZ,true);o1=oY[0];oX=oY[1]}e[oN]={tileInfo:oP.tileInfo,lineLabels:[]};for(var oU=0;oU<oV.length;oU++){if(!this.map._displayOptions.isEn){if(oV[oU].isDel){continue}var oR=oV[oU].wordsInfo;if(oR){for(var oT=0;oT<oR.length;oT++){if(!oR[oT].rtVertex){continue}var oL=oR[oT].formatedData;if(!oL){oL={textureSource:oP.textureSources[oV[oU].processedInZoom],textureHeight:oP.textureHeights[oV[oU].processedInZoom],renderData:{vertex:oR[oT].rtVertex,textureCoord:oR[oT].texcoord}};oR[oT].formatedData=oL}e[oN].lineLabels.push(oL)}}}else{var oQ=oV[oU]["datas_"+this.getZoomStep()];if(oQ){for(var oT=0;oT<oQ.length;oT++){if(oQ[oT].isDel){continue}var oR=oQ[oT].wordsInfo;if(oR){for(var o0=0;o0<oR.length;o0++){if(!oR[o0].rtVertex){continue}var oL=oR[o0].formatedData;if(!oL){oL={textureSource:oP.textureSources[oQ[oT].processedInZoom],textureHeight:oP.textureHeights[oQ[oT].processedInZoom],renderData:{vertex:oR[o0].rtVertex,textureCoord:oR[o0].texcoordArr}};oR[o0].formatedData=oL}e[oN].lineLabels.push(oL)}}}}}}oN++}T.length=o1;e.length=oN;C.length=oX;return[e,T,C]},fixFixedLabelDataFormat:function(oN,oQ,oR,oO,C,oP){var oL=C.highlightLabelData;var e=C.highlightLabelDataLen;for(var i=0;i<oN.length;i++){if(oN[i].isDel){continue}var oM=oN[i].textPos;var oK=oN[i].iconPos;var T=null;if(oM&&oM.rtVertex){if(!oN[i].formatedData){T={guid:oN[i].guid,guidExt:oN[i].guidExt,tilePosStr:oN[i].tilePosStr,zoom:oN[i].zoom,tempRank:oN[i].tempRank,textureSource:oQ.textureSources?oQ.textureSources[oN[i].processedInZoom]:[],textureHeight:oQ.textureHeights?oQ.textureHeights[oN[i].processedInZoom]:[],renderData:{vertex:oM.rtVertex,textureCoord:oM.texcoord}};if(oP&&oN[i].onDefaultFloor===false){T.textureSource=oQ.indoorTextureSources[oN[i].processedInZoom];T.textureHeight=oQ.indoorTextureHeights[oN[i].processedInZoom]}oN[i].formatedData=T}else{T=oN[i].formatedData;T.tempRank=oN[i].tempRank}if(this.currentSelectedLabel&&T.guid===this.currentSelectedLabel.guid&&T.tilePosStr===this.currentSelectedLabel.tilePosStr&&this.map.config.enableIconHighlight!==false){oL[e]=T;e++}}if(oK&&oK.rtVertex){if(T){if(!T.iconRenderData){T.iconRenderData={vertex:oK.rtVertex,textureCoord:oK.texcoord}}}else{T={guid:oN[i].guid,guidExt:oN[i].guidExt,zoom:oN[i].zoom,tempRank:oN[i].tempRank,iconRenderData:{vertex:oK.rtVertex,textureCoord:oK.texcoord}};oN[i].formatedData=T}}oR[oO]=T;oO++}return[oO,e]},_refreshSpotData:function(){this._spotData.length=0;var oO=this.map;var oM=Math.floor(oO.getZoom());var C=this.map._featureMgr.getLabelData(this.layer.drawIndex);if(this.layer.drawIndex!==0){return}if(C){for(var oK=0,T=C.length;oK<T;oK++){this._addFixedSpotData(C[oK].fixedLabel,oM);this._addFixedSpotData(C[oK].indoorLabel,oM)}}var oP=this.currentSelectedLabel;if(oP&&!this.getTileByLabelUid(oP.guid,oP.tilePosStr)){var oL=this._getSpotDataFromLabel(this.currentSelectedLabel);if(oL){this._spotData.push(oL)}}var oN=new ix("onspotsdataready");oN.spots=this._spotData;oN.index=this.layer.drawIndex;oO._spotDataOnCanvas=this._spotData;oO.dispatchEvent(oN)},_addFixedSpotData:function(oK,T){for(var e=0;e<oK.length;e++){var C=oK[e];if(!this.layer.isClickableLabel(C)||(C.guidExt===1&&C.startScale>T)){continue}var i=oK[e].spot||this._getSpotDataFromLabel(oK[e]);if(i){this._spotData.push(i)}}},_getSpotDataFromLabel:function(C){var oL=this.map;if(!C.bds){return null}var e=C.bds.slice(0);var T=null;if(C.iconPos){T=new d9(C.pt.lng,C.pt.lat)}var i=C.name?C.name.replace("\\\\","<br>"):"";if(C.iconPos&&C.iconPos.iconType.indexOf("ditie")>-1&&oL.getZoom()>14){i=""}var oK={n:i,pt:new d9(C.pt.lng,C.pt.lat),userdata:{iconPoint:T,uid:C.guid,name:i,mapPoi:true,type:C.iconPos?C.iconPos.iconType:"",rank:C.rank,zoom:C.zoom,tilePosStr:C.tilePosStr},bd:e,tag:"MAP_SPOT_INFO"};C.spot=oK;return oK},drawLabelsOnCanvas:function(i,e){if(this._labelTextCanvas){this._labelTextCanvas.drawLabelsOnCanvas(i,e)}}});function m2(e){this._map=e;this.virtualTiles={};this.virtualTile={custom:true,label:{fixedLabel:[],indoorLabel:[],lineLabel:[],textureHeights:[],status:"ready"},tileInfo:{col:0,row:0,zoom:0,useZoom:0,loopOffsetX:0},status:"ready"};this._task={};this.init()}m2.prototype.init=function(){var C=this._map;var i=this;function e(T){i.updateLabels(T)}C.addEventListener("add_tile_labels",e);C.addEventListener("onremove_tile_labels",e);C.addEventListener("onclear_labels",e);C.addEventListener("onlayer_clear",e)};m2.prototype.updateLabels=function(oM){var oQ=this._map.tileMgr.getLabelTextCanvas();var C=this._map;var oO=this;var oN=eR();if(oM&&oM.model==="mvt"){var oS=oM.data;var oR="mvt_"+oM.index;if(!this._task[oR]){this._task[oR]=[oN]}else{this._task[oR].push(oN)}}else{var oS=C._customTileLabels;var oR="custom";if(!this._task[oR]){this._task[oR]=[oN]}else{this._task[oR].push(oN)}}var oL=JSON.parse(JSON.stringify(oS));for(var oK=0;oK<oL.length;oK++){var oP=oL[oK];oP.guid=oP.guid||oP.uid;oP.iconPos=this.getIconVertexData(oP.style,1);var T={textMargin:oP.textMargin,textOnIcon:oP.textOnIcon,iconSize:oP.iconSize,style:{color:oP.style.color,strokeColor:oP.style.strokeColor,fontSize:oP.style.fontSize,haloSize:oP.style.haloSize,}};oL[oK].styleId=oL[oK].styleId||u(T)}oL.taskId=oN;oQ.drawCustomLabelsOnCanvas(oL,function(oX){var oY=true;for(var oV=0;oV<oO._task[oR].length;oV++){if(oO._task[oR][oV]===oL.taskId){oO._task[oR].splice(0,oV+1);oY=false;break}}if(oY){return}if(!oX||!oL||oL.length===0){var e=JSON.parse(JSON.stringify(oO.virtualTile));e.label.tileInfo=e.tileInfo;var oT=null;e.label.fixedLabel=oL;oO.virtualTiles[oR]={};var oW=new ix("oncustom_labels_ready");oW.virtualTile=e;oW.labelCanvas=oT;oW.model=oR;oW.imgKey=cv.getGUID("custom_labels_");C.dispatchEvent(oW);return}else{oO.virtualTiles[oR]=[]}for(var oV=0;oV<oX.length;oV++){var e=JSON.parse(JSON.stringify(oO.virtualTile));e.label.tileInfo=e.tileInfo;var oT=oX[oV];var oU=oL.slice(oT.range[0],oT.range[0]+oT.range[1]);if(oT){e.label.textureHeights[0]=[oT.height]}e.label.fixedLabel=oU;oO.virtualTiles[oR].push(e);var oW=new ix("oncustom_labels_ready");oW.virtualTile=e;oW.labelCanvas=oT;oW.model=oR;oW.imgKey=cv.getGUID("custom_labels_");C.dispatchEvent(oW)}},true)};m2.prototype.getIconVertexData=function(oS,oL){if(!oS||!oS.icon||!oS.iconSize||oS.iconSize.length<2){return null}var oM=2;var oK=oS.iconSize[0]/oM*oL;var oP=oS.iconSize[1]/oM*oL;var T=Math.round(-oK/2);var oR=Math.round(-oP/2);var C=T+oK;var oQ=oR;var i=C;var oO=oQ+oP;var e=T;var oN=oO;return{vertex:[T,oR,C,oQ,i,oO,T,oR,i,oO,e,oN],texcoord:null,width:oK,height:oP,iconType:oS.icon}};cv.register(function(e){e._customLabelMgr=new m2(e)});function ob(i){var T=null;try{if(N(i)){T=new Worker(i);T.onerror=function(e){e.preventDefault();if(/WebAssembly\.Memory|could not allocate memory/i.test((e&&e.message)||"")){return}T=jA(i)}}else{T=jA(i)}}catch(C){T=jA(i)}return T}function jA(oL){var oO=null;try{var C;try{C=new Blob(['importScripts("'+oL+'");'],{type:"application/javascript"})}catch(oM){var oK=new (window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder)();oK.append('importScripts("'+oL+'");');C=oK.getBlob("application/javascript")}var T=window.URL||window.webkitURL;var i=T.createObjectURL(C);oO=new Worker(i)}catch(oN){}return oO}function nH(e){this.init(e)}var kk={init:function(C){var i=this;this.map=C;this.arrPendingData=[];var e=Math.max(navigator.hardwareConcurrency-2,0)||4;if((c9()||hv.Browser.ie)&&e>2){e=2}this._workerNum=e;this.arrWorker=[];this.ratio=ja();this.wordSpaceRatio=this.ratio;this.textSizeRatio=hQ.devicePixelRatio>1?2:1;if(typeof this.map.config.style==="string"){this.stringifiedCustomStyleInfo=null;this.stringifiedCustomStyleInfoZoom=[];this.stringifiedAreaStyleInfo=null}h8.canUseWebAssembly(function(T){var oN;if(T){oN=(window.location.protocol === "http:" ? "http:" : "https:") + "//" + window.location.host + "/bmap-api/res/webgl/10/worker_wasm_g0l1oe.js"}else{oN=(window.location.protocol === "http:" ? "http:" : "https:") + "//" + window.location.host + "/bmap-api/res/webgl/10/worker_asm_3u43mq.js"}i._onWorkerMessage=function oL(oR){if(oR.data&&oR.data.action==="wasm_alloc_failed"){i._fallbackToAsm();return}if(oR.data){this._cbk&&this._cbk(oR.data,this._parsingTileKey)}else{this._cbk&&this._cbk(null,this._parsingTileKey)}this._isBusy=false;this._cbk=null;this._parsingTileInfo=null;this._parsingTileKey=null;if(i.arrPendingData.length>0){var oT=i.arrPendingData.shift();var oQ=oT.cbk;i.loadTileData(oT.url,oT.tileInfo,oT.tileKey,oQ)}var oS=new ix("onrefresh");oS.source="workermgr";C.fire(oS)};for(var oM=0;oM<e;oM++){var oP=ob(oN);oP.onmessage=i._onWorkerMessage;i.arrWorker.push(oP)}if(i.arrPendingData.length>0){for(var oK=0;oK<Math.min(i.arrPendingData.length,e);oK++){var oO=i.arrPendingData.shift();i.loadTileData(oO.url,oO.tileInfo,oO.tileKey,oO.cbk)}}});C.on("onstyle_loaded",function(){for(var oK=0,T=i.arrWorker.length;oK<T;oK++){i.arrWorker[oK].isSendFS=false;i.arrWorker[oK].postMessage({action:"clearStyleCache"})}if(typeof this.config.style!=="string"){i.stringifiedCustomStyleInfo=null;i.stringifiedCustomStyleInfoZoom=[];i.stringifiedAreaStyleInfo=null}});C.on("onstylezoomupdate",function(){for(var oK=0,T=i.arrWorker.length;oK<T;oK++){i.arrWorker[oK].isSendFS=false}if(typeof this.config.style!=="string"){i.stringifiedCustomStyleInfo=null;i.stringifiedCustomStyleInfoZoom=[];i.stringifiedAreaStyleInfo=null}});C.on("destroy",function(){for(var oK=0;oK<i.arrWorker.length;oK++){if(i.arrWorker[oK]){i.arrWorker[oK].terminate()}}i.arrWorker.length=0;var T=i.arrPendingData;for(var oK=T.length-1;oK>=0;oK--){T[oK]=null}i.stringifiedIndoorStyle=null;i.stringifiedCustomStyleInfo=null;i.stringifiedCustomStyleInfoZoom=[];i.stringifiedAreaStyleInfo=null;var oL=Object.keys(i);for(var oK=0;oK<oL.length;oK++){if(oL[oK].indexOf("stringifiedFeatureStyle")>-1||oL[oK].indexOf("stringifiedIconSetInfo")>-1){delete i[oL[oK]]}}})},_fallbackToAsm:function(){var oO=this;if(oO._isAsm||oO._fallingBack){return}oO._fallingBack=true;oO._isAsm=true;window.disableWebAssembly=true;for(var oM=0;oM<oO.arrWorker.length;oM++){var oP=oO.arrWorker[oM];if(oP&&oP._isBusy&&oP._cbk&&oP._parsingUrl){oO.arrPendingData.push({url:oP._parsingUrl,tileInfo:oP._parsingTileInfo,tileKey:oP._parsingTileKey,cbk:oP._cbk})}try{oP&&oP.terminate()}catch(oN){}}oO.arrWorker=[];var oQ=(window.location.protocol === "http:" ? "http:" : "https:") + "//" + window.location.host + "/bmap-api/res/webgl/10/worker_asm_3u43mq.js";for(var oL=0;oL<oO._workerNum;oL++){var C=ob(oQ);C.onmessage=oO._onWorkerMessage;oO.arrWorker.push(C)}oO._fallingBack=false;if(oO.arrPendingData.length>0){for(var oK=0;oK<Math.min(oO.arrPendingData.length,oO._workerNum);oK++){var T=oO.arrPendingData.shift();oO.loadTileData(T.url,T.tileInfo,T.tileKey,T.cbk)}}},getIdleWorker:function(){for(var C=0,e=this.arrWorker.length;C<e;C++){var T=this.arrWorker[C];if(!T._isBusy){T._isBusy=true;return T}}return null},releasePendingData:function(C){var T=[];var oM=this.arrPendingData;for(var oL=oM.length-1;oL>=0;oL--){var oN=oM[oL];var e=oN.tileInfo;if(C.tileTypeName!==e.tileTypeName){continue}var oK="id_"+e.col+"_"+e.row+"_"+e.zoom;if(!C[oK]){oM.splice(oL,1);T.push(e)}}return T},loadTileData:function(i,T,oU,oT){var oL=this.getIdleWorker();var e=this.map._displayOptions.poi;var oN=e?this.map._displayOptions.poiText:false;var oS=this.map._displayOptions.buildingSideGradation;if(oL){oL._cbk=oT;oL._parsingTileInfo=T;oL._parsingTileKey=oU;oL._parsingUrl=i;var oR=(this.map.mapType!==lg&&this.map.config.showVectorStreetLayer);if(this.map.parking){var oK=this.map.parking._auth}var C={action:"loadTileData",url:i,tileInfo:T,tileKey:oU,isText:oN,isPoi:e,buildingSideGradation:oS,hasPoly:oR?false:true,hasLine:oR?this.map.config.showVectorLine:true,carport:oK,isEn:this.map._displayOptions.isEn,language:this.map._displayOptions.language||"zh",referrer:window.location.href};var oQ=this.map.getMapStyleId();var oV=this.map.getAreaStyleId();var oP=!!(oQ.indexOf("custom")===0);var oO=oQ;if(oP){oO="Custom"}if(oP&&cv["customStyleInfo_"+oQ]&&!cv["customStyleInfo_"+oQ]["baseFs"]){oT()}if(!oL.isSendFS){if(!this["stringifiedFeatureStyle"+oQ]&&cv["FeatureStyle"+oQ]){this["stringifiedFeatureStyle"+oQ]=JSON.stringify(cv["FeatureStyle"+oQ])}if(!this["stringifiedIconSetInfo"+oO]){this["stringifiedIconSetInfo"+oO]=JSON.stringify(cv["iconSetInfo"+oO])}if(oP&&cv["indoorStyleInfo_"+oQ]&&cv["indoorStyleInfo_"+oQ]["baseFs"]){this.stringifiedIndoorStyle=JSON.stringify(cv["indoorStyleInfo_"+oQ]["baseFs"])}else{if(!this.stringifiedIndoorStyle){this.stringifiedIndoorStyle=JSON.stringify(cv.indoorStyleDefault)}}if(oP&&cv["customStyleInfo_"+oQ]&&cv["customStyleInfo_"+oQ]["baseFs"]){if(!this.stringifiedCustomStyleInfo){this.stringifiedCustomStyleInfo=JSON.stringify(cv["customStyleInfo_"+oQ])}}if(oP&&cv["customStyleInfo_"+oV]){if(!this.stringifiedAreaStyleInfo){this.stringifiedAreaStyleInfo=JSON.stringify(cv["customStyleInfo_"+oV])}}if(this["stringifiedFeatureStyle"+oQ]){C.featureStyle=this["stringifiedFeatureStyle"+oQ]}C.iconSetInfo=this["stringifiedIconSetInfo"+oO];if(!(oP&&!this.map.config.showCustomIndoor)){C.indoorStyle=this.stringifiedIndoorStyle}if(oP&&this.stringifiedCustomStyleInfo){C.customMapStyle=this.stringifiedCustomStyleInfo}if(oP&&this.stringifiedAreaStyleInfo){C.areaMapStyle=this.stringifiedAreaStyleInfo}C.iconInfo={wordSpaceRatio:this.wordSpaceRatio,textSizeRatio:this.textSizeRatio};C.mapStyleId=oQ;C.areaStyleId=oV;oL.isSendFS=true}oL.postMessage(C)}else{var oM={url:i,tileInfo:T,tileKey:oU,cbk:oT};this.arrPendingData.push(oM)}},setWorkerConfig:function(C){var e={action:"setWorkerConfig"};for(var oK in C){if(C.hasOwnProperty(oK)){e[oK]=C[oK]}}for(var T=0;T<this.arrWorker.length;T++){this.arrWorker[T].postMessage(e)}}};hv.extend(nH.prototype,kk);function mI(i){this.tileLayers=[];this.map=i;var e=this.config=gA[this.map.mapType];this.errorUrl=e.errorUrl;this.tileSize=e.tileSize;this.baseUnits=e.baseUnits;this.baseZoomLevel=e.zoomLevelBase;this.tileURLs=e.tileUrls;this.tilesInfoCache={};this.loadDelay=10;this._labelTextCanvas=null}cv.register(function(i){if(i._renderType!=="webgl"){return}var e=i.tileMgr=new mI(i);i.addEventListener("addtilelayer",function(T){e.addWebGLLayer(T.target)});i.addEventListener("removetilelayer",function(T){e.removeWebGLLayer(T.target)});i.on("update",function C(oK){if(i.getFeatureStyleTags().length===0||!(i.customLoaded&&i.areaCustomLoaded)){return}var T=false;if(oK.changedStatus&&oK.changedStatus.onzoom_changed){T=true}e.loadLayersData({zoomChanged:T})});i.on("style_changed",function(){e.loadLayersData()});i.on("destroy",function(){for(var T=0;T<e.tileLayers.length;T++){e.tileLayers[T].remove();e.tileLayers[T].destroyDrawData();e.tileLayers[T]=null}e.tilesInfoCache={};e.tileLayers=[];e._labelTextCanvas=null;e.map=null;e.requestTime=null})});hv.extend(mI.prototype,{addWebGLLayer:function(C){this.tileLayers.push(C);C.initDrawData();if(this.tileLayers.length>1){for(var e=1;e<this.tileLayers.length;e++){if(this.tileLayers[e].isFlat){this.map.setDisplayOptions({isFlat:true});break}}}if(this.map.getFeatureStyleTags().length>0&&this.map.customLoaded&&this.map.areaCustomLoaded){this.loadLayersData()}else{if(C.baseLayer){var T=this;this.map.loadMapStyleFiles(function(){var i=new ix("onlayer_update");i.name="na";T.map.fire(i);T.loadLayersData()})}}},removeWebGLLayer:function(oL){var oM=false;for(var oK=0,T=this.tileLayers.length;oK<T;oK++){if(oL===this.tileLayers[oK]){oM=true;this.tileLayers.splice(oK,1);break}}if(oM===false){return}oL.destroyDrawData();if(this.map.getFeatureStyleTags().length>0){this.loadLayersData()}if(this.tileLayers.length===1){this.map.setDisplayOptions({isFlat:false})}else{var e=false;for(var oK=1;oK<this.tileLayers.length;oK++){if(this.tileLayers[oK].isFlat){e=true;break}}this.map.setDisplayOptions({isFlat:e})}var C=new ix("onrefresh");C.source="removewebgllayer";this.map.fire(C)},getLabelTextCanvas:function(){if(!this._labelTextCanvas){this._labelTextCanvas=new aY(this.map)}return this._labelTextCanvas},loadLayersData:function(i){if(!this.map||this.map.suspendLoad){return}var oK=this;i=i||{};var T=!!i.zoomChanged;var e=(T===true||this.map.getTilt()>50);if(!e){if(!this.syncLoadTimer){this.syncLoadTimer=setTimeout(function(){oK._loadLayersFromCache(T);oK.syncLoadTimer=null},40)}}else{this._loadLayersFromCache(T)}if(!oK.map.viewAnimationTime){this.timer&&window.clearTimeout(this.timer)}if(!this.requestTime){this.requestTime=new Date().getTime()}else{if(new Date().getTime()-this.requestTime>=1000){C()}}function C(){if(!oK.map){return}if(oK.map.viewAnimationTime){if(new Date().getTime()-oK.map.viewAnimationTime<1000){return}oK.map.viewAnimationTime=new Date().getTime()}var oM=oK.tileLayers.length;oK.tilesInfoCache={};for(var oO=0;oO<oM;oO++){var oQ=oK.tileLayers[oO];var oP=oQ.tileType;var oL=null;var oN=oK._getTilesInfoKey(oP,oQ);if(oK.tilesInfoCache[oN]){oL=oK.tilesInfoCache[oN]}else{oL=oK.calcTilesInfo(oP,oQ);oK.tilesInfoCache[oN]=oL}oL&&oQ.loadLayerData(oL,false,T)}oK.timer=null;oK.requestTime=null}this.timer=window.setTimeout(C,this.loadDelay);if((c9()||hv.Browser.ie)&&T){this.loadDelay=200}else{this.loadDelay=80}},_getTilesInfoKey:function(i,C){var e=i.getName();e+=("_"+(C.transform?C.transform.source:"default"));e+=("_"+C.spanLevel||0);return e},_loadLayersFromCache:function(oL){if(!this.map){return}this.map._featureMgr.clearData();this.map.tileLabels=[];var oO=this.tileLayers;oO.sort(function(oP,i){return oP.zIndex-i.zIndex>0});var C=oO.length;this.tilesInfoCache={};for(var oK=0;oK<C;oK++){var oN=oO[oK];var oM=oN.tileType;var e=null;var T=this._getTilesInfoKey(oM,oN);if(this.tilesInfoCache[T]){e=this.tilesInfoCache[T]}else{e=this.calcTilesInfo(oM,oN);this.tilesInfoCache[T]=e}e&&oN.loadLayerData(e,true,oL)}},calcTilesInfo:function(oW,pn){var o9=this.map;var pf=o9.getMapTypeId();var pa=gA[pf];var o4=o9.getZoom();var e=Math.floor(o4);var oM=oW.getDataZoom(o4);var pr=oW.getName();if(pr==="xyz"){oM=dA(oM,pa.minDataZoom,22)}else{oM=dA(oM,pa.minDataZoom,pa.maxDataZoom)}var pi=e;if(oW._name==="web"||oW._name==="xyz"){pi=oM}else{if(pi<3){pi=3}}var o8=oW.getTileSize(o4);var oL=oW.getBaseTileSize(o4);var o6=o9.getBoundsIn();if(!o6){return}var o0=oW.getMercatorSize(o4,oM);var oZ;var ph;var o7;var pk;var pb=o9.getCenterIn();pb=hz.calcLoopCenterPoint(pb);if(pr==="xyz"){return this.calcXYZTilesInfo(pb,o6,oM,pr,pn,o9)}var o5=Math.floor(pb.lng/o0);var oO=Math.floor(pb.lat/o0);var pd=0;var C=0;o6=hz.calcLoopMapBounds(o6,pb);if(o6.ne.lng>hz._mc180X){var oU=hz.getSpaceDistanceInPixel(oM);pd=Math.ceil(oU/oL)}if(o6.sw.lng<hz._mcM180X){var oU=hz.getSpaceDistanceInPixel(oM);C=Math.ceil(oU/oL)}if(o6.ne.lat>19505879.362428114||o6.sw.lat<-15949096.637571886){o6.ne.lat=19505879.362428114;o6.sw.lat=-15949096.637571886}var oQ=[Math.floor(o6.sw.lng/o0)-C,Math.floor(o6.sw.lat/o0)];var pp=[Math.floor(o6.ne.lng/o0)+pd,Math.floor(o6.ne.lat/o0)];oZ=oQ[0]-o9.config.extendTiles;ph=pp[0]+1+o9.config.extendTiles;o7=oQ[1]-o9.config.extendTiles;pk=pp[1]+1+o9.config.extendTiles;var oV=[];for(var oS=oZ;oS<ph;oS++){if(hz.isTileBlank(oS,oM,oL)===true){continue}for(var oX=o7;oX<pk;oX++){var pm=false;var oR=256;if(pr==="web"){var o2=this._webTileRaste180(oS,oX,oM);pm=o2.combine;oR=o2.dataIndex}var oT={col:oS,row:oX,zoom:oM,useZoom:pi,tileTypeName:pr,loopOffsetX:0,tileSize:o8,baseTileSize:oL,mercatorSize:o0,combine:pm,dataIndex:oR,tileLoadFunction:pn.tileLoadFunction,};oV.push(oT);var pe="id_"+oS+"_"+oX+"_"+oM;oV[pe]=true}}if(oM<=5){for(var po=0,pl=oV.length;po<pl;po++){var oS=oV[po].col;var oX=oV[po].row;var pg=hz.calcLoopParam(oS,oM);var oN=pg.T;var o1=oS>=0?oS-oN:oS+oN;var o3="id_"+o1+"_"+oX+"_"+oM;if(hz.isTileBlank(o1,oM,oL)===true){continue}if(!oV[o3]){var pm=false;var oR=256;if(pr==="web"){var o2=this._webTileRaste180(o1,oX,oM);pm=o2.combine;oR=o2.dataIndex}var oT={col:o1,row:oX,zoom:oM,useZoom:pi,loopOffsetX:0,tileSize:o8,baseTileSize:oL,mercatorSize:o0,combine:pm,dataIndex:oR,tileLoadFunction:pn.tileLoadFunction,};oV.push(oT);oV[o3]=true}}}if(this.map._tilt>0&&(pr!=="web"||o4>=8)){for(var po=0;po<oV.length;po++){var oP=oV[po];var pj=oP.col;var pq=oP.row;var pc=[];pc.minX=pj*o0;pc.maxX=(pj+1)*o0;pc.minY=pq*o0;pc.maxY=(pq+1)*o0;var oK=new d9(0,0);oK.lng=(pc.minX+pc.maxX)/2;oK.lat=(pc.minY+pc.maxY)/2;var oY=o9.pointToPixelIn(oK);if(oY.x>0&&oY.x<this.map.width&&oY.y>0&&oY.y<this.map.height){continue}if(pc.minX<pb.lng&&pc.maxX>pb.lng&&pc.minY<pb.lat&&pc.maxY>pb.lat){continue}if(!this.ifTileInMapBounds(pc,o6,pj,pq)){oV.splice(po,1);po--}}}oV.sort((function(i){return function(T,ps){return((0.4*Math.abs(T.col-i[0])+0.6*Math.abs(T.row-i[1]))-(0.4*Math.abs(ps.col-i[0])+0.6*Math.abs(ps.row-i[1])))}})([o5,oO]));oV.zoom=oM;oV.tileTypeName=pr;return oV},_webTileRaste180:function(C,oO,e){var i=this.map;var oL=false;var oM=256;var oK=hz.calcLoopParam(C,e);var oN={col:oK.col,row:oO,baseTileSize:256,zoom:e};var T=m8.prototype.tileToBound(oN,i.getCenter());if(Math.ceil(T.LL.sw.lng)*Math.floor(T.LL.ne.lng)<0){oL=true;oM=hz.pixelWidth(T.MC.sw.lng,e);if(oN.col<0){oM=-oM}}return{combine:oL,dataIndex:oM}},calcXYZTilesInfo:function(oU,oN,oT,oY,oM,o1){var oP=o1.width;var oZ=o1.height;var oO=Math.floor(oT);var oQ=null;if(oM.transform.target==="EPSG3857"){var T=fA.transformBDmcPoint(oU,oM.transform);var oK=fA.getRangeExtent(T,oP,oZ,oO,oM.transform);oQ=[oK.minX,oK.minY,oK.maxX,oK.maxY]}else{if(oM.transform.source==="BD09MC"){var T=[oU.lng,oU.lat];oQ=[oN.sw.lng,oN.sw.lat,oN.ne.lng,oN.ne.lat]}else{var T=fA.transformBDmcPoint(oU,oM.transform);var oL=fA.transformBDmcPoint(oN.ne,oM.transform);var oS=fA.transformBDmcPoint(oN.sw,oM.transform);oQ=fA.getLoopBox(T,[oS[0],oS[1],oL[0],oL[1]])}}if(!T||!oQ){return[]}oO=oO+oM.spanLevel;var C=fA.getTileRangeForExtentFactory(oQ,oO,oM.transform);var e=[];var o2=fA.getResolutionScale(oO,oM.transform);for(var oX=C.minX;oX<=C.maxX;oX++){for(var oV=C.minY;oV<=C.maxY;oV++){var oW={col:oX,row:oV,zoom:oO,useZoom:oO,tileTypeName:oY,loopOffsetX:0,tileSize:256*o2,transform:oM.transform,combine:false,dataIndex:0,tileLoadFunction:oM.tileLoadFunction,preciseVertex:oM.preciseVertex||false};e.push(oW);var oR="id_"+oX+"_"+oV+"_"+oO;e[oR]=true}}var o0=fA.getTileCoordForCoordAndZ(T,oO);e.sort((function(i){return function(o3,o4){return((0.4*Math.abs(o3.col-i[0])+0.6*Math.abs(o3.row-i[1]))-(0.4*Math.abs(o4.col-i[0])+0.6*Math.abs(o4.row-i[1])))}})([o0[1],o0[2]]));e.zoom=oO;e.tileTypeName=oY;return e},getCurrentViewTilesInfo:function(C,T){var i=this._getTilesInfoKey(C,T);var e=this.tilesInfoCache[i];if(!e){return this.calcTilesInfo(C,T)}return e},ifTileInMapBounds:function(e,oL,C,oK){var i=oL.normalizedBottomLeft;var oW=oL.normalizedTopRight;var oO=oL.normalizedTopLeft;var oM=oL.normalizedBottomRight;var T=false;var oV=new d9(e.minX,e.minY);var oS=new d9(e.maxX,e.maxY);var oN=new d9(oS.lng,oV.lat);var oT=new d9(oV.lng,oS.lat);var oQ=[oT,oS,oN,oV];for(var oU=0,oP=oQ.length;oU<oP;oU++){var oR=oU+1;if(oR===oP){oR=0}var oX=oU;var oY=m7(oQ[oR],oQ[oX],oO,i);if(oY){T=true;break}oY=m7(oQ[oR],oQ[oX],oM,oW);if(oY){T=true;break}oY=m7(oQ[oR],oQ[oX],oW,oO);if(oY){T=true;break}oY=m7(oQ[oR],oQ[oX],i,oM);if(oY){T=true;break}}return T},getTileLayer:function(oK){for(var T=0,e=this.tileLayers.length;T<e;T++){var C=this.tileLayers[T];if(C.mapType===oK){return C}}return null},isExitTileLayer:function(oK){for(var T=0,e=this.tileLayers.length;T<e;T++){var C=this.tileLayers[T];if(C===oK){return true}}return false},getZoomState:function(i){var e=i-this.lastZoom;if(e>0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState}});function ml(e){this.map=e;this.gl=null;this.layers=[];this.mouseEventThrottle=this.throttle(this.pick,100).bind(this);this.mousePointerThrottle=this.throttle(this.mouseStatus,300).bind(this);this.base=new d9(12069475.280738307,3929271.1724863998);this.iconCache=new a1((c9()||hv.Browser.ie)?64:128,{clearCallback:function(i){}});this._boundMouseEvent=this._layerMouseEvent.bind(this);this._boundClickEvent=this._layerClickEvent.bind(this);this._boundDBLClickEvent=this._layerDBLClickEvent.bind(this);this._boundRightClickEvent=this._layerRightClickEvent.bind(this)}cv.register(function(i){if(i._renderType!=="webgl"){return}var e=i._normalLayerMgr=new ml(i);i.toFormatCoords=function(oL,oO){var oN=[];var oM=e.base;if(oO&&oO.center){oM=m8.convertLL2MC(oO.center)}for(var oK=0;oK<oL.length;oK++){var C=m8.convertLL2MC(new d9(oL[oK][0],oL[oK][1]));var T=[C.lng-oM.lng,C.lat-oM.lat];oN.push(T)}return oN};i.indexToRgb=function(T){T++;var C=Math.floor(T/65536);T-=C*65536;var oL=Math.floor(T/256);T-=oL*256;var oK=T;return[oK,oL,C]};i.addEventListener("addnormallayer",function(C){e.addWebGLLayer(C.target)});i.addEventListener("removenormallayer",function(C){e.removeWebGLLayer(C.target)});i.addEventListener("update",function(oM){if(oM.changedStatus&&oM.changedStatus.onsize_changed){if(e.gl){e.clearFramebuffer();var oL=i.getSize();var oK=oL.width;var C=oL.height;var T=i.config.ratio;oK=Math.round(oK*T);C=Math.round(C*T);e.pickFBO=e.createFramebuffer(oK,C)}}});i.addEventListener("onmousemove",e._boundMouseEvent);i.addEventListener("onclick",e._boundClickEvent);i.addEventListener("ondblclick",e._boundDBLClickEvent);i.addEventListener("onrightclick",e._boundRightClickEvent);i.on("destroy",function(){i.removeEventListener("onmousemove",e._boundMouseEvent);i.removeEventListener("onclick",e._boundClickEvent);i.removeEventListener("ondblclick",e._boundDBLClickEvent);i.removeEventListener("onrightclick",e._boundRightClickEvent);e.removeAllLayers(true);i.indexToRgb=null;i.toFormatCoords=null;e.pickFBO=null;e.preFramebuffer=null;e.gl=null;e.iconCache.clear()});i.on("glmoduleloaded",function(){e.gl=i._webglPainter.gl;e.pickFBO=e.createFramebuffer();for(var C=0;C<e.layers.length;C++){e.layers[C].onInit(i,e.gl)}i.dispatchEvent(new ix("onupdate"))});i.addEventListener("layer_clear",function(C){e.iconCache.clear()})});hv.extend(ml.prototype,{init:function(){var e=this;this.map.toFormatCoords=function(oL){var oM=[];for(var oK=0;oK<oL.length;oK++){var C=m8.convertLL2MC(new d9(oL[oK][0],oL[oK][1]));var T=[C.lng-e.base.lng,C.lat-e.base.lat];oM.push(T)}return oM};this.map.indexToRgb=function(T){T++;var C=Math.floor(T/65536);T-=C*65536;var oL=Math.floor(T/256);T-=oL*256;var oK=T;return[oK,oL,C]};this.pickFBO=this.createFramebuffer();var i=this;this.map.addEventListener("addnormallayer",function(C){i.addWebGLLayer(C.target)});this.map.addEventListener("removenormallayer",function(C){i.removeWebGLLayer(C.target)});this.map.addEventListener("onmousemove",this._layerMouseEvent.bind(this));this.map.addEventListener("onclick",this._layerClickEvent.bind(this));this.map.addEventListener("onrightclick",this._layerRightClickEvent.bind(this));this.map.addEventListener("ondblclick",this._layerDBLClickEvent.bind(this));this.map.on("destroy",function(){i.removeAllLayers(true);i.map.indexToRgb=null;i.map.toFormatCoords=null;i.pickFBO=null;i.preFramebuffer=null})},addWebGLLayer:function(C){var T=false;for(var e=0;e<this.layers.length;e++){if(this.layers[e]===C){T=true;break}}if(!T){this.layers.push(C);if(this.gl){C.onInit(this.map,this.gl)}this.map.dispatchEvent(new ix("onupdate"))}},removeWebGLLayer:function(C){for(var e=0;e<this.layers.length;e++){if(this.layers[e]===C){this.map._featureMgr.removeLayer(C.zIndex);this.layers.splice(e,1);C.onDestroy();this.map.dispatchEvent(new ix("onupdate"));break}}},removeAllLayers:function(T){for(var C=0;C<this.layers.length;C++){var e=this.layers[C];if(e.visible){this.map._featureMgr.removeLayer(e.zIndex)}if(T){e.onKill&&e.onKill()}e.onDestroy()}this.layers=[];this.map.dispatchEvent(new ix("onupdate"))},sortLayer:function(){this.layers.sort(function(i,e){return i.zIndex-e.zIndex>0})},_layerMouseEvent:function(i){this.mouseEventThrottle(i,"onmousemove")},_layerClickEvent:function(i){this.pick(i,"onclick")},_layerDBLClickEvent:function(i){this.pick(i,"ondblclick")},_layerRightClickEvent:function(i){this.pick(i,"onrightclick")},throttle:function(C,e){var T=null;var i=Date.now();return function(){var oN=Date.now();var oM=e-(oN-i);var oL=this;var oK=arguments;if(T){clearTimeout(T)}if(oM<=0){C.apply(oL,oK);i=Date.now()}else{T=setTimeout(function(){C.apply(oL,oK)},oM)}}},pick:function(oO,oM){if(!this.layers.length){return false}var T=false;var C=false;for(var oL=this.layers.length-1;oL>=0;oL--){var oK=this.layers[oL];if(oK.doRender()&&oK.testEvent(oM)){C=true;if(oK.pick){if(oM==="onmousemove"||oK.hasEvent(oM)){var oN=oK.pick(oO.x,oO.y,oM)}else{continue}if(oN&&oN.dataIndex!==-1){if(oM==="onmousemove"){T=true}if(oK.hasEvent(oM)){oK.dispatcher(oO,oN,oM)}if(!oK.popEvent){break}}else{if(oK.hasEvent(oM)){oK.dispatcher(oO,oN,oM)}}}}}if(oM==="onmousemove"&&C){this.mousePointerThrottle(T)}this.map.dispatchEvent(new ix("onupdate"))},mouseStatus:function(e){if(e){this.map.platform.style.cursor=this.map.config.overlayMoveCursor}else{this.map.platform.style.cursor=this.map.config.defaultCursor}},saveFramebuffer:function(){var e=this.gl;this.preFramebuffer=e.getParameter(e.FRAMEBUFFER_BINDING)},bindFramebuffer:function(e){var i=this.gl;if(e){i.bindFramebuffer(i.FRAMEBUFFER,e)}else{i.bindFramebuffer(i.FRAMEBUFFER,null)}},clear:function(e){var i=this.gl;i.clearColor(0,0,0,0);if(e instanceof Array){i.clearColor(e[0],e[1],e[2],e[3])}i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT)},restoreFramebuffer:function(){var i=this.gl;if(this.map&&this.map._webglPainter){var e=this.map._webglPainter.background||[1,1,1,1];i.clearColor(e[0]/255,e[1]/255,e[2]/255,e[3]/255)}i.bindFramebuffer(i.FRAMEBUFFER,this.preFramebuffer)},clearFramebuffer:function(){if(this.pickFBO){var e=this.gl;e.deleteTexture(this.pickFBO.texture);e.deleteFramebuffer(this.pickFBO)}},createFramebuffer:function(T,i){var oN=this.gl;T=T||oN.canvas.width;i=i||oN.canvas.height;var oL=oN.createFramebuffer();var oK=oN.createTexture();oN.bindTexture(oN.TEXTURE_2D,oK);oN.texImage2D(oN.TEXTURE_2D,0,oN.RGBA,T,i,0,oN.RGBA,oN.UNSIGNED_BYTE,null);oN.texParameteri(oN.TEXTURE_2D,oN.TEXTURE_MAG_FILTER,oN.LINEAR);oN.texParameteri(oN.TEXTURE_2D,oN.TEXTURE_MIN_FILTER,oN.LINEAR);oN.texParameteri(oN.TEXTURE_2D,oN.TEXTURE_WRAP_S,oN.CLAMP_TO_EDGE);oN.texParameteri(oN.TEXTURE_2D,oN.TEXTURE_WRAP_T,oN.CLAMP_TO_EDGE);oL.texture=oK;var C=oN.createRenderbuffer();oN.bindRenderbuffer(oN.RENDERBUFFER,C);oN.renderbufferStorage(oN.RENDERBUFFER,oN.DEPTH_STENCIL,T,i);oL.depthBuffer=C;oN.bindFramebuffer(oN.FRAMEBUFFER,oL);oN.framebufferTexture2D(oN.FRAMEBUFFER,oN.COLOR_ATTACHMENT0,oN.TEXTURE_2D,oK,0);oN.framebufferRenderbuffer(oN.FRAMEBUFFER,oN.DEPTH_STENCIL_ATTACHMENT,oN.RENDERBUFFER,C);var oM=oN.checkFramebufferStatus(oN.FRAMEBUFFER);if(oN.FRAMEBUFFER_COMPLETE!==oM){console.log("Frame buffer object is incomplete: "+oM.toString());this._clearBuffer(oN);return}this._clearBuffer(oN);return oL},_clearBuffer:function(e){e.bindFramebuffer(e.FRAMEBUFFER,null);e.bindTexture(e.TEXTURE_2D,null);e.bindRenderbuffer(e.RENDERBUFFER,null)},loadIconImages:function(T,oQ){var oR=T;var oS=oR.length;var oM=this;var C=0;var oP=200;for(var oK=0;oK<oS;oK++){var oL=oR[oK];var e=oL.icon;var oO=e;if(e instanceof HTMLCanvasElement){oO=e.id;if(!this.iconCache.getData(oO)){this._addToIconTexture(e);this.iconCache.setData(oO,{loaded:true,image:e})}continue}C++;if(this.iconCache.getData(oO)){if(this.iconCache.getData(oO).loaded){oQ(T)}continue}var oN=new Image();oN.id=oO;oN.iconUrl=e;oN.crossOrigin="anonymous";oN.onload=function(){if(oM.iconCache.getData(this.id)){oM.iconCache.getData(this.id).loaded=true;oM._addToIconTexture(this)}if(!oM._iconLoadTimer){oM._iconLoadTimer=setTimeout(function(){oQ(T);oM._iconLoadTimer=null},oP)}this.onload=null};oN.onerror=function(){if(!oM._iconLoadTimer){oM._iconLoadTimer=setTimeout(function(){oQ(T);oM._iconLoadTimer=null},oP)}oM.iconCache.removeData(this.id);this.onerror=null};oN.src=e;this.iconCache.setData(oO,{loaded:false,image:oN})}oQ(T)},_addToIconTexture:function(oL){if(!this.map._webglMapScene){return}var oN=this.map._webglMapScene._painter;var e=oN._iconTextureAtlas.addTexture(oL);if(e===false){this.map.fire(new ix("onlayer_clear"));return}if(!e){return}oN._iconTextureAtlasOffset[oL.id]=e;var oQ=0*oL.width/1024+e.width;var oK=0*oL.height/1024+e.height;var oP=oL.width/1024+e.width;var T=oK;var oO=oP;var C=oL.height/1024+e.height;var oM=oQ;var i=C;oN._iconTextureAtlasCoords[oL.id]=[oQ,oK,oP,T,oO,C,oM,i]}});var k4=(function(){function oP(pg,pl,ph,pi,pn){ph=ph||2;var pj=pl&&pl.length;var pe=pj?pl[0]*ph:pg.length;var pk=o4(pg,0,pe,ph,true);var pd=pn||[];if(!pk){return pd}var pc;var pb;var pa;var o9;var po;var pm;var pp;pi=pi||0;if(pj){pk=oY(pg,pl,pk,ph)}if(pg.length>80*ph){pc=pa=pg[0];pb=o9=pg[1];for(var pf=ph;pf<pe;pf+=ph){po=pg[pf];pm=pg[pf+1];if(po<pc){pc=po}if(pm<pb){pb=pm}if(po>pa){pa=po}if(pm>o9){o9=pm}}pp=Math.max(pa-pc,o9-pb)}C(pk,pd,ph,pc,pb,pp,null,pi);return pd}function o4(pd,pf,o9,pe,pa){var pb;var pc;if(pa===(o8(pd,pf,o9,pe)>0)){for(pb=pf;pb<o9;pb+=pe){pc=oM(pb,pd[pb],pd[pb+1],pc)}}else{for(pb=o9-pe;pb>=pf;pb-=pe){pc=oM(pb,pd[pb],pd[pb+1],pc)}}if(pc&&oS(pc,pc.next)){o0(pc);pc=pc.next}return pc}function oW(pc,o9){if(!pc){return pc}if(!o9){o9=pc}var pb=pc;var pa;do{pa=false;if(!pb.steiner&&(oS(pb,pb.next)||o2(pb.prev,pb,pb.next)===0)){o0(pb);pb=o9=pb.prev;if(pb===pb.next){return null}pa=true}else{pb=pb.next}}while(pa||pb!==o9);return o9}function C(pa,pc,pf,pd,o9,pj,pi,pg){if(!pa){return}if(!pi&&pj){oR(pa,pd,o9,pj)}var ph=pa;var pb;var pe;while(pa.prev!==pa.next){pb=pa.prev;pe=pa.next;if(pj?o7(pa,pd,o9,pj):oZ(pa)){pc.push(pb.i/pf+pg);pc.push(pa.i/pf+pg);pc.push(pe.i/pf+pg);o0(pa);pa=pe.next;ph=pe.next;continue}pa=pe;if(pa===ph){if(!pi){C(oW(pa),pc,pf,pd,o9,pj,1,pg)}else{if(pi===1){pa=oV(pa,pc,pf,pg);C(pa,pc,pf,pd,o9,pj,2,pg)}else{if(pi===2){oU(pa,pc,pf,pd,o9,pj,pg)}}}break}}}function oZ(pb){var pa=pb.prev;var o9=pb;var pd=pb.next;if(o2(pa,o9,pd)>=0){return false}var pc=pb.next.next;while(pc!==pb.prev){if(oT(pa.x,pa.y,o9.x,o9.y,pd.x,pd.y,pc.x,pc.y)&&o2(pc.prev,pc,pc.next)>=0){return false}pc=pc.next}return true}function o7(pe,pf,pd,pl){var pi=pe.prev;var ph=pe;var pg=pe.next;if(o2(pi,ph,pg)>=0){return false}var pm=pi.x<ph.x?(pi.x<pg.x?pi.x:pg.x):(ph.x<pg.x?ph.x:pg.x);var pj=pi.y<ph.y?(pi.y<pg.y?pi.y:pg.y):(ph.y<pg.y?ph.y:pg.y);var pc=pi.x>ph.x?(pi.x>pg.x?pi.x:pg.x):(ph.x>pg.x?ph.x:pg.x);var pb=pi.y>ph.y?(pi.y>pg.y?pi.y:pg.y):(ph.y>pg.y?ph.y:pg.y);var pa=e(pm,pj,pf,pd,pl);var pk=e(pc,pb,pf,pd,pl);var o9=pe.nextZ;while(o9&&o9.z<=pk){if(o9!==pe.prev&&o9!==pe.next&&oT(pi.x,pi.y,ph.x,ph.y,pg.x,pg.y,o9.x,o9.y)&&o2(o9.prev,o9,o9.next)>=0){return false}o9=o9.nextZ}o9=pe.prevZ;while(o9&&o9.z>=pa){if(o9!==pe.prev&&o9!==pe.next&&oT(pi.x,pi.y,ph.x,ph.y,pg.x,pg.y,o9.x,o9.y)&&o2(o9.prev,o9,o9.next)>=0){return false}o9=o9.prevZ}return true}function oV(pf,pb,pe,pd){var pc=pf;do{var pa=pc.prev;var o9=pc.next.next;if(!oS(pa,o9)&&i(pa,pc,pc.next,o9)&&o3(pa,o9)&&o3(o9,pa)){pb.push(pa.i/pe+pd);pb.push(pc.i/pe+pd);pb.push(o9.i/pe+pd);o0(pc);o0(pc.next);pc=pf=o9}pc=pc.next}while(pc!==pf);return pc}function oU(o9,pb,pd,pc,pa,pi,pe){var ph=o9;do{var pg=ph.next.next;while(pg!==ph.prev){if(ph.i!==pg.i&&o1(ph,pg)){var pf=oQ(ph,pg);ph=oW(ph,ph.next);pf=oW(pf,pf.next);C(ph,pb,pd,pc,pa,pi,null,pe);C(pf,pb,pd,pc,pa,pi,null,pe);return}pg=pg.next}ph=ph.next}while(ph!==o9)}function oY(pb,pi,pe,pd){var pf=[];var pc;var pg;var o9;var pa;var ph;for(pc=0,pg=pi.length;pc<pg;pc++){o9=pi[pc]*pd;pa=pc<pg-1?pi[pc+1]*pd:pb.length;ph=o4(pb,o9,pa,pd,false);if(ph===ph.next){ph.steiner=true}pf.push(oN(ph))}pf.sort(oO);for(pc=0;pc<pf.length;pc++){oL(pf[pc],pe);pe=oW(pe,pe.next)}return pe}function oO(pa,o9){return pa.x-o9.x}function oL(pb,pa){pa=o5(pb,pa);if(pa){var o9=oQ(pa,pb);oW(o9,o9.next)}}function o5(o9,pd){var pa=pd;var pf=o9.x;var pe=o9.y;var pc=-Infinity;var pb;do{if(pe<=pa.y&&pe>=pa.next.y){var pi=pa.x+(pe-pa.y)*(pa.next.x-pa.x)/(pa.next.y-pa.y);if(pi<=pf&&pi>pc){pc=pi;if(pi===pf){if(pe===pa.y){return pa}if(pe===pa.next.y){return pa.next}}pb=pa.x<pa.next.x?pa:pa.next}}pa=pa.next}while(pa!==pd);if(!pb){return null}if(pf===pc){return pb.prev}var ph=pb;var pl=pb.x;var pj=pb.y;var pk=Infinity;var pg;pa=pb.next;while(pa!==ph){if(pf>=pa.x&&pa.x>=pl&&oT(pe<pj?pf:pc,pe,pl,pj,pe<pj?pc:pf,pe,pa.x,pa.y)){pg=Math.abs(pe-pa.y)/(pf-pa.x);if((pg<pk||(pg===pk&&pa.x>pb.x))&&o3(pa,o9)){pb=pa;pk=pg}}pa=pa.next}return pb}function oR(pd,o9,pc,pa){var pb=pd;do{if(pb.z===null){pb.z=e(pb.x,pb.y,o9,pc,pa)}pb.prevZ=pb.prev;pb.nextZ=pb.next;pb=pb.next}while(pb!==pd);pb.prevZ.nextZ=null;pb.prevZ=null;oK(pb)}function oK(pf){var pc;var pb;var pa;var pe;var pg;var o9;var ph;var pd;var pi=1;do{pb=pf;pf=null;pg=null;o9=0;while(pb){o9++;pa=pb;ph=0;for(pc=0;pc<pi;pc++){ph++;pa=pa.nextZ;if(!pa){break}}pd=pi;while(ph>0||(pd>0&&pa)){if(ph===0){pe=pa;pa=pa.nextZ;pd--}else{if(pd===0||!pa){pe=pb;pb=pb.nextZ;ph--}else{if(pb.z<=pa.z){pe=pb;pb=pb.nextZ;ph--}else{pe=pa;pa=pa.nextZ;pd--}}}if(pg){pg.nextZ=pe}else{pf=pe}pe.prevZ=pg;pg=pe}pb=pa}pg.nextZ=null;pi*=2}while(o9>1);return pf}function e(pa,pd,o9,pc,pb){pa=32767*(pa-o9)/pb;pd=32767*(pd-pc)/pb;pa=(pa|(pa<<8))&16711935;pa=(pa|(pa<<4))&252645135;pa=(pa|(pa<<2))&858993459;pa=(pa|(pa<<1))&1431655765;pd=(pd|(pd<<8))&16711935;pd=(pd|(pd<<4))&252645135;pd=(pd|(pd<<2))&858993459;pd=(pd|(pd<<1))&1431655765;return pa|(pd<<1)}function oN(pb){var pa=pb;var o9=pb;do{if(pa.x<o9.x){o9=pa}pa=pa.next}while(pa!==pb);return o9}function oT(pd,pc,pf,pe,o9,pg,pb,pa){return(o9-pb)*(pc-pa)-(pd-pb)*(pg-pa)>=0&&(pd-pb)*(pe-pa)-(pf-pb)*(pc-pa)>=0&&(pf-pb)*(pg-pa)-(o9-pb)*(pe-pa)>=0}function o1(pa,o9){return pa.next.i!==o9.i&&pa.prev.i!==o9.i&&!oX(pa,o9)&&o3(pa,o9)&&o3(o9,pa)&&T(pa,o9)}function o2(pb,pa,o9){return(pa.y-pb.y)*(o9.x-pa.x)-(pa.x-pb.x)*(o9.y-pa.y)}function oS(pa,o9){return pa.x===o9.x&&pa.y===o9.y}function i(pb,o9,pa,pc){if((oS(pb,o9)&&oS(pa,pc))||(oS(pb,pc)&&oS(pa,o9))){return true}return o2(pb,o9,pa)>0!==o2(pb,o9,pc)>0&&o2(pa,pc,pb)>0!==o2(pa,pc,o9)>0}function oX(pa,o9){var pb=pa;do{if(pb.i!==pa.i&&pb.next.i!==pa.i&&pb.i!==o9.i&&pb.next.i!==o9.i&&i(pb,pb.next,pa,o9)){return true}pb=pb.next}while(pb!==pa);return false}function o3(pa,o9){return o2(pa.prev,pa,pa.next)<0?o2(pa,o9,pa.next)>=0&&o2(pa,pa.prev,o9)>=0:o2(pa,o9,pa.prev)<0||o2(pa,pa.next,o9)<0}function T(pb,pa){var pe=pb;var o9=false;var pd=(pb.x+pa.x)/2;var pc=(pb.y+pa.y)/2;do{if(((pe.y>pc)!==(pe.next.y>pc))&&(pd<(pe.next.x-pe.x)*(pc-pe.y)/(pe.next.y-pe.y)+pe.x)){o9=!o9}pe=pe.next}while(pe!==pb);return o9}function oQ(pb,pa){var o9=new o6(pb.i,pb.x,pb.y);var pc=new o6(pa.i,pa.x,pa.y);var pe=pb.next;var pd=pa.prev;pb.next=pa;pa.prev=pb;o9.next=pe;pe.prev=o9;pc.next=o9;o9.prev=pc;pd.next=pc;pc.prev=pd;return pc}function oM(pa,o9,pd,pb){var pc=new o6(pa,o9,pd);if(!pb){pc.prev=pc;pc.next=pc}else{pc.next=pb.next;pc.prev=pb;pb.next.prev=pc;pb.next=pc}return pc}function o0(o9){o9.next.prev=o9.prev;o9.prev.next=o9.next;if(o9.prevZ){o9.prevZ.nextZ=o9.nextZ}if(o9.nextZ){o9.nextZ.prevZ=o9.prevZ}}function o6(pa,o9,pb){this.i=pa;this.x=o9;this.y=pb;this.prev=null;this.next=null;this.z=null;this.prevZ=null;this.nextZ=null;this.steiner=false}oP.deviation=function(pe,pj,pg,pb){var ph=pj&&pj.length;var pd=ph?pj[0]*pg:pe.length;var pa=Math.abs(o8(pe,0,pd,pg));if(ph){for(var pf=0,pi=pj.length;pf<pi;pf++){var o9=pj[pf]*pg;var pc=pf<pi-1?pj[pf+1]*pg:pe.length;pa-=Math.abs(o8(pe,o9,pc,pg))}}var pn=0;for(pf=0;pf<pb.length;pf+=3){var pm=pb[pf]*pg;var pl=pb[pf+1]*pg;var pk=pb[pf+2]*pg;pn+=Math.abs((pe[pm]-pe[pk])*(pe[pl+1]-pe[pm+1])-(pe[pm]-pe[pl])*(pe[pk+1]-pe[pm+1]))}return pa===0&&pn===0?0:Math.abs((pn-pa)/pa)};function o8(pd,pf,o9,pe){var pc=0;for(var pb=pf,pa=o9-pe;pb<o9;pb+=pe){pc+=(pd[pa]-pd[pb])*(pd[pb+1]+pd[pa+1]);pa=pb}return pc}oP.flatten=function(pd){var pe=pd[0][0].length;var o9={vertices:[],holes:[],dimensions:pe};var pb=0;for(var pc=0;pc<pd.length;pc++){for(var pa=0;pa<pd[pc].length;pa++){for(var pf=0;pf<pe;pf++){o9.vertices.push(pd[pc][pa][pf])}}if(pc>0){pb+=pd[pc-1].length;o9.holes.push(pb)}}return o9};return oP})();function eh(i,e){this.id=iW();this.workerPool=i;this.actors=[];this.currentActorIndex=0;this.ready=false;this.init(e)}eh.prototype.init=function(oL){const e=this.workerPool.acquire(this.id);for(var T=0;T<e.length;T++){const oM=e[T];const oK=new nC(oM,oL,this.id);oK.name="Worker "+T;this.actors.push(oK)}var C=this;this.broadcast("hasReady",null,function(){C.ready=true})};eh.prototype.broadcast=function(i,C,e){e=e||function(){};o(this.actors,function(oK,T){oK.send(i,C,T)},e)};eh.prototype.getActor=function(){const e=this.actors.filter(function(i){return !i.busy})[0];if(e){return e}this.currentActorIndex=(this.currentActorIndex+1)%this.actors.length;return this.actors[this.currentActorIndex]};eh.prototype.stop=function(){for(var e=0;e<this.actors.length;e++){var C=this.actors[e];C.stop()}};eh.prototype.remove=function(){for(var e=0;e<this.actors.length;e++){var C=this.actors[e];C.remove()}this.actors.length=0;this.workerPool.release(this.id)};function nC(C,i,e){this.target=C;this.parent=i;this.mapId=e;this.busy=false;this.taskQueue=[];this.callbacks={};this.init()}nC.prototype.init=function(){this.receive=this.receive.bind(this);this.target.addEventListener("message",this.receive,false)};nC.prototype.setBusy=function(e){this.busy=e;if(!e&&this.taskQueue.length){var i=this.taskQueue.shift();this.send(i.action,i.data,i.callback,i.targetMapId,i.mustQueue,i.callbackMetadata)}};nC.prototype.receive=function(T){const oK=T.data;const oN=oK.id;if(!oN){return}if(oK.targetMapId&&this.mapId!==oK.targetMapId){return}if(oK.action==="<response>"){this.setBusy(false);const oM=this.callbacks[oN];delete this.callbacks[oN];if(oM){if(oK.error){oM(lP(oK.error))}else{oM(null,lP(oK.data))}}}else{var C=this;const i=[];const e=oK.hasCallback?function(oO,oP){C.target.postMessage({id:oN,action:"<response>",sourceMapId:C.mapId,error:oO?nE(oO):null,data:nE(oP,i)},i)}:function(oO){};const oL=lP(oK.data);if(this.parent[oK.action]){this.parent[oK.action](oK.sourceMapId,oL,e)}}};nC.prototype.send=function(i,C,oM,T,oK,oN){if(i==="release"){this.releasePendingData(C,oM);return}if(this.busy){this.taskQueue.push({action:i,data:C,callback:oM,targetMapId:T,mustQueue:oK,callbackMetadata:oN});return}this.setBusy(true);var oL=Math.round((Math.random()*1000000000000000000)).toString(36).substring(0,10);const e=this.mapId+"_"+i+"_"+oL;if(oM){oM.metadata=oN;this.callbacks[e]=oM}const oO=[];this.target.postMessage({id:e,action:i,hasCallback:!!oM,targetMapId:T,mustQueue:oK,sourceMapId:this.mapId,data:nE(C,oO)},oO);return{cancel:function(){if(oM){delete this.callbacks[e]}this.target.postMessage({id:e,action:"<cancel>",targetMapId:T,sourceMapId:this.mapId})}}};nC.prototype.stop=function(){this.taskQueue.length=0;this.busy=false;this.callbacks={}};nC.prototype.remove=function(){this.taskQueue.length=0;this.busy=false;this.target.removeEventListener("message",this.receive,false)};nC.prototype.releasePendingData=function(e,oM){var C=[];var oK=this.taskQueue;for(var T=oK.length-1;T>=0;T--){var oL=oK[T]["data"];if(!oL||!oL.layerId){break}if(oL.layerId!==e.layerId){continue}if(!e["id_"+oL.x+"_"+oL.y+"_"+oL.z]){oK.splice(T,1);C.push(oL)}}oM(null,C)};var oz;function kG(){if(!oz){oz=new kO()}return oz}function kO(){this.active={}}kO.prototype.acquire=function(i){if(!this.workers){this.workers=[];var C=(window.location.protocol === "http:" ? "http:" : "https:") + "//" + window.location.host + "/bmap-api/res/webgl/10/worker_mvt_0u0jye.js";while(this.workers.length<kO.workerCount){var e=ob(C);this.workers.push(e)}}this.active[i]=true;return this.workers.slice()};kO.prototype.release=function(C){delete this.active[C];if(this.numActive()===0){for(var e=0;e<this.workers.length;e++){this.workers[e].terminate()}this.workers=null}};kO.prototype.numActive=function(){return Object.keys(this.active).length};kO.workerCount=2;function kP(e){this._map=e;this._spotsId={};this._enabled=false;this._onReady=null;this._onRemove=null}kP.prototype.enable=function(){if(this._enabled){return}var i=this._map;var e=this;e._onReady=function(T){var C=T.spots;if(e._spotsId[T.index]){i.removeSpots(e._spotsId[T.index])}e._spotsId[T.index]=i.addSpots(C)};e._onRemove=function(C){if(e._spotsId[C.index]){i.removeSpots(e._spotsId[C.index]);delete e._spotsId[C.index]}};i.addEventListener("onspotsdataready",e._onReady);i.addEventListener("onspotsdataremove",e._onRemove);e._enabled=true};kP.prototype.disable=function(){if(!this._enabled){return}var i=this._map;i.removeEventListener("onspotsdataready",this._onReady);i.removeEventListener("onspotsdataremove",this._onRemove);for(var e in this._spotsId){i.removeSpots(this._spotsId[e])}this._spotsId={};this._onReady=null;this._onRemove=null;this._enabled=false};cv.register(function(e){e._mapIcon=new kP(e);if(e.config.enableIconClick){e._mapIcon.enable()}if(e.config.enableIconInfoWindow){e.enableIconInfoWindow()}});function eW(e){this._indoorData={};this._map=e;this.currentUid=null;this.currentFloor=null;this._indoorControl=null;this.enterMethod=null;this.showMask=true;this._isMobile=c9();this._autoEnterZoom=19;if(this._isMobile){this._autoEnterZoom=17}this._init(e)}eW.prototype._init=function(i){var e=this;i.on("indoor_status_changed",function(oM){var C=oM.uid;var oK=oM.floor;if(C===null){C=e.currentUid;if(e._indoorData[C]){oK=e._indoorData[C].defaultFloor}if(e._indoorControl){e._indoorControl.hide()}e.currentUid=null;e.currentFloor=null;e.enterMethod=null}else{if(e._indoorData[C]){var oL=e._indoorData[C];oK=(typeof oK==="number")?oK:oL.defaultFloor;if(!e._indoorControl){if((i.config.showControls||i.config.indoorControl)&&i._displayOptions.indoor){e._indoorControl=new aW(i,oL)}}else{e._indoorControl.setInfo(oL);if(i.config.showControls||i.config.indoorControl){e._indoorControl.show()}}e.currentUid=C;e.currentFloor=oK}}if(!e._indoorData||!e._indoorData[C]||e._indoorData[C].currentFloor===oK){this.fire(new ix("onrefresh"));return}var T=new ix("onindoor_data_refresh");T.uid=C;T.floor=oK;T.tileKey=e._indoorData[C].tileKey;e._indoorData[C].currentFloor=oK;e.currentFloor=oK;this.fire(T);kU.sendMessage("IndoorManager")});i.on("spotclick",function(T){var C=null;if(T.curAreaSpot&&this.areaSpots[T.curAreaSpot]){C=this.areaSpots[T.curAreaSpot].userData.uid}if(C===e.currentUid){if(T.curAreaSpot){e.enterMethod="byClick"}return}if(C===null){if(e.currentUid&&e.enterMethod==="byClick"){i.showIndoor(null);e.enterMethod=null}}else{e.enterMethod="byClick";if(e.currentUid){i.showIndoor(e.currentUid,e._indoorData[e.currentUid].defaultFloor)}i.showIndoor(C,e._indoorData[C].defaultFloor)}});i.on("moveend",function(){if(this.getZoom()>=e._autoEnterZoom){e._checkIndoorByMove()}});i.on("zoomend",function(){if(this.getZoom()>=e._autoEnterZoom){e._checkIndoorByMove()}else{if(e.enterMethod!=="byClick"&&e.currentUid!==null){this.showIndoor(null)}}})};eW.prototype._checkIndoorByMove=function(){var C=this._map;var oP=C.getSize();var oU={x:oP.width/2,y:oP.height/2};var oT=Math.max(oP.width,oP.height);var oV=[];for(var oQ in this._indoorData){var e=this._indoorData[oQ].center;var T=C.pointToPixelIn(new cv.Point(e[0],e[1]));var oM=dL(oU,T);oV.push({uid:oQ,distance:oM})}if(oV.length===0){return}oV.sort(function(oW,i){return oW.distance-i.distance});var oL=oV[0];var oR=C.getCenterIn();var oK=false;for(var oO=0;oO<this._indoorData[oL.uid].contour.length;oO++){if(cR([oR.lng,oR.lat],this._indoorData[oL.uid].contour[oO])){oK=true;break}}if(oK===false&&oL.uid==="e96b44200baa3b4082288acc"){var oN=this._indoorData[oL.uid].boundsMin;var oS=this._indoorData[oL.uid].boundsMax;if(oR.lng>oN[0]&&oR.lat>oN[1]&&oR.lng<oS[0]&&oR.lat<oS[1]){oK=true}}if(oK){if(this.enterMethod!=="byClick"){if(this.currentUid!==null&&this.currentUid!==oL.uid){this._map.showIndoor(this.currentUid,this._indoorData[this.currentUid].defaultFloor)}if(this.currentUid!==oL.uid){this._map.showIndoor(oL.uid,this._indoorData[oL.uid].defaultFloor)}this.enterMethod="byMove"}}else{if(this.enterMethod!=="byClick"){this._map.showIndoor(null)}}};eW.prototype.setData=function(T){if(T===null){return}for(var C in T){if(C==="tileInfo"){continue}var oK=T[C].tileKey;if(this._indoorData[C]){if(!this._indoorData[C][oK]){this._indoorData[C].tileKeys.push(oK);this._indoorData[C][oK]=true}}else{this._indoorData[C]=T[C];this._indoorData[C].tileKeys=[T[C].tileKey];this._indoorData[C][oK]=true;for(var e=0;e<this._indoorData[C].contour.length;e++){this._map.addAreaSpot(this._indoorData[C].contour[e],{id:C+e,userData:{uid:C}})}}}if(this._map.getZoom()>=this._autoEnterZoom){this._checkIndoorByMove()}};eW.prototype.removeData=function(C,oK){if(!this._indoorData[C]){return}var T=this._indoorData[C];for(var e=0;e<T.tileKeys.length;e++){if(T.tileKeys[e]===oK){T.tileKeys.splice(e,1);break}}delete T[oK];if(T.tileKeys.length===0){delete this._indoorData[C]}};eW.prototype.getIndoorData=function(e){return this._indoorData[e]||null};eW.prototype.getData=function(){return this._indoorData};eW.prototype._toggleControl=function(e){var C=this._map;if(e){if(!this._indoorControl&&this.currentUid&&C._displayOptions.indoor){var i=this._indoorData[this.currentUid];if(i){this._indoorControl=new aW(C,i)}}else{if(this._indoorControl&&this.currentUid){this._indoorControl.show()}}}else{if(this._indoorControl){this._indoorControl.hide()}}};cv.register(function(e){e._indoorMgr=new eW(e)});var bJ=(function(){var T={};var oS={};var oO={};function oQ(oU){if(Object.prototype.toString.call(oU)==="[object Object]"){for(var oT in oU){return false}return true}else{return false}}function oP(o0,o1,o4,oX,o3){var oT=oT||null;oX=oX||oT;var oV;if(o4>21){o4=21}if(oX){oV=oR(o0,o1,o4,oX)}else{oV=C(o0,o1,o4,o3)}var oZ=oV.drawId;var oU=oV.style;var o2=oV.styleUpdate;var o5=[];if(!oZ){return o5}for(var oW=0;oW<oZ.length;oW++){var oY=o2[oZ[oW]]||oU[oZ[oW]];if(oY){switch(o1){case"polygon":oY=oK(oY,o0);break;case"line":oY=oN(oY,o0);break;case"pointText":oY=oL(oY,o0);break;case"point":oY=e(oY,o0);break;case"polygon3d":oY=oM(oY,o0);break}if(oY){oY.did=oZ[oW];o5[o5.length]=oY}}}return o5}function oR(oU,oW,oX,oT){var oV=oT[2];switch(oW){case"point":oV=oV[0];break;case"pointText":oV=oV[1];break;case"line":oV=oV[3];break;case"polygon":oV=oV[4];break;case"polygon3d":oV=oV[5];break}var oZ=oX-1;if(oW==="line"&&oX===12){oZ=oX}var o0=oT[1][oZ][0];var oY=o0[oU];if(!oY&&oX<21){if(oW==="point"||oW==="pointText"){o0=oT[1][oX][0];oY=o0[oU]}}return{drawId:oY,style:oV,styleUpdate:[]}}function C(oX,oY,o1,o0){if(!o0||!o0.baseFs){return{drawId:null,style:[],styleUpdate:[]}}var oZ;var oV=o0.baseFs;if(oQ(o0.zoomRegion)){oZ=o0.StyleBody||[]}else{oZ=o0.zoomStyleBody[o1]||[]}var oU=oV[2];switch(oY){case"point":oU=oU[0];oZ=oZ[0]||{};break;case"pointText":oU=oU[1];oZ=oZ[1]||{};break;case"line":oU=oU[3];oZ=oZ[3]||{};break;case"polygon":oU=oU[4];oZ=oZ[4]||{};break;case"polygon3d":oU=oU[5];oZ=oZ[5]||{};break}var oT=oV[1][o1-1][0];var oW=oT[oX];if(!oW&&o1<21){if(oY==="point"||oY==="pointText"){oT=oV[1][o1][0];oW=oT[oX]}}return{drawId:oW,style:oU,styleUpdate:oZ}}function oL(oU,oT){if(!oU||oU.length===0){return null}return{sid:oT,fontRgba:i(oU[0]),haloRgba:i(oU[1]),backRgba:i(oU[2]),fontSize:oU[3],haloSize:oU[4],fontWeight:oU[5],fontStyle:oU[6],density:oU[7]}}function e(oV,oT){var oU=null;if(oV[oV.length-1]&&oV[oV.length-1] instanceof Array&&oV[oV.length-1][0]==="openmap"){oU=oV[oV.length-1][1]?oV[oV.length-1][1]:null}return{sid:oT,rank:oV[0],ucflag:oV[1],icon:oV[2],iconType:oV[3],nineGG:oV[4],density:oV[5],zoom:oV[6],hue:oU>>>0}}function oN(oV,oT){var oU=null;var oW=null;if(oV[oV.length-1]&&oV[oV.length-1] instanceof Array&&oV[oV.length-1][0]==="openmap"){oU=oV[oV.length-1][1]?oV[oV.length-1][1]:null;oW=oV[oV.length-1][2]?oV[oV.length-1][2]:null}return{sid:oT,borderRgba:i(oV[0]),fillRgba:i(oV[1]),borderWidth:oV[2],fillWidth:oV[3],borderCap:oV[4],fillCap:oV[5],haveBorderLine:oV[6],haveBorderTexture:oV[7],haveFillTexture:oV[8],isUseBorderRgba:oV[9],isUseFillRgba:oV[10],borderTexture:oV[11],fillTexture:oV[12],borderTextureType:oV[13],fillTextureType:oV[14],isRealWidth:oV[15],haveArrow:oV[16],needRound:oV[17],realBorderWidth:oV[18],customTextureUrl:oW,hue:i(oU)}}function oK(oV,oT){var oU=null;var oW=null;if(oV[oV.length-1]&&oV[oV.length-1] instanceof Array&&oV[oV.length-1][0]==="openmap"){oU=oV[oV.length-1][1]?oV[oV.length-1][1]:null;oW=oV[oV.length-1][2]?oV[oV.length-1][2]:null}return{sid:oT,fillRgba:i(oV[0]),borderRgba:i(oV[1]),borderWidth:oV[2],borderTexture:oV[3],borderTextureType:oV[4],waterStyle:oV[5],haloStyle:oV[6],textureStyle:oV[7],thickRgba:i(oV[8]),fillTexture:oW,hue:i(oU)}}function oM(oU,oT){return{sid:oT,filter:oU[0],ratio:oU[1],haveBorder:oU[2],borderWidth:oU[3],borderRgba:i(oU[4]),fillTop:i(oU[5]),fillSide:i(oU[6]),polyTexture:oU[7]}}function i(oY){var oX=oY;if(oO[oX]){return oO[oX]}oY=oY>>>0;var oW=(oY)&255;var oV=(oY>>8)&255;var oT=(oY>>16)&255;var oU=(oY>>24)&255;oO[oX]=[oW,oV,oT,oU];return oO[oX]}return{getStyleFromCache:function(o0,oV,oY,oZ,oU,oX,oT){o0=o0||"default";var oW=o0+"-"+oV+"-"+oY+"-"+oZ;if(oX){oW+="-indoor"}if(oU){if(!oS[oW]){oS[oW]=oP(oV,oY,oZ,oU)}return oS[oW]}if(!T[oW]){T[oW]=oP(oV,oY,oZ,oU,oT)}return T[oW]},clearStyleFromCache:function(){T={};oS={}}}})();cv.register(function(i){var e=new lO(i)});function lO(e){e.container.appendChild(this.render());this.bind(e)}lO.prototype.render=function(){var i=document.createElement("div");i.className="click-ripple-container";var e=document.createElement("div");e.className="click-ripple";i.appendChild(e);this._div=i;this._ripple=e;return i};lO.prototype.bind=function(i){var e=this;i.addEventListener("spotclick",function(C){if(!C.spots||C.spots.length===0){return}e._div.style.left=C.pixel.x+"px";e._div.style.top=C.pixel.y+"px";hv.ac(e._ripple,"ripple-playing")});i.addEventListener("hotclick",function(C){if(!C||!C.pixel||!(C.pixel instanceof hV)){return}e._div.style.left=C.pixel.x+"px";e._div.style.top=C.pixel.y+"px";hv.ac(e._ripple,"ripple-playing")});hv.on(e._ripple,"transitionend",function(){hv.rc(e._ripple,"ripple-playing")})};function c7(e){eX.call(this);if(!e){return}this._opts={};this._map=e;this._maxLat=84.6;this._minLat=-80.6;this._maxLatMC=m8.convertLL2MC(new d1(this._maxLat,0)).lat;this._minLatMC=m8.convertLL2MC(new d1(this._minLat,0)).lat}c7.inherits(eX,"ToolbarItem");hv.extend(c7.prototype,{open:function(){if(this._isOpen==true){return true}if(this._map._toolInUse){return false}this._map._toolInUse=true;this._isOpen=true;return true},close:function(){if(!this._isOpen){return}this._map._toolInUse=false;this._isOpen=false},_checkStr:function(e){if(!e){return""}return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}});function dH(C,i){c7.call(this,C);i=i||{};this._opts=hv.extend(hv.extend(this._opts||{},{autoClear:false,tips:"娴嬭窛",followText:"鍗曞嚮纭畾璧风偣锛屽弻鍑荤粨鏉熺粯鍒�",unit:"metric",showResult:true,lineColor:"blue",lineStroke:2,opacity:1,lineStyle:"solid",cursor:K.distCursor,styleCodes:{lnCode:0,spCode:0,slCode:0,tlCode:0},enableMassClear:true}),i);if(this._opts.showResult===false){if(typeof i.tips==="undefined"){this._opts.tips="缁樺埗鎶樼嚎"}if(!i.cursor){this._opts.cursor="crosshair"}}if(this._opts.lineStroke<=0){this._opts.lineStroke=2}if(this._opts.opacity>1){this._opts.opacity=1}else{if(this._opts.opacity<0){this._opts.opacity=0}}if(this._opts.lineStyle!=="solid"&&this._opts.lineStyle!=="dashed"){this._opts.lineStyle="solid"}this._checked=false;this._drawing=null;this.followTitle=null;this._totalDis={};this._points=[];this._paths=[];this._dots=[];this._segDistance=[];this._overlays=[];this._units={metric:{name:"metric",conv:1,incon:1000,u1:"绫�",u2:"鍏噷"},us:{name:"us",conv:3.2808,incon:5279.856,u1:"鑻卞昂",u2:"鑻遍噷"}};if(!this._units[this._opts.unit]){this._opts.unit="metric"}this._dLineColor="#ff6319";this._dLineStroke=3;this._dOpacity=0.8;this._dLineStyle="solid";this._dCursor=K.distCursor;if(this._opts.showResult){this._opts.followText="鍗曞嚮纭畾璧风偣"}this._followTextM="鍗曞嚮纭畾鍦扮偣锛屽弻鍑荤粨鏉�";this._sectionMarkerTip="鍗曞嚮鍙垹闄ゆ鐐癸紝鎷栨嫿鍙皟鏁翠綅缃�";this._movingTimerId=null;if(this._opts.showResult){this.text="娴嬭窛"}else{this.text="缁樼嚎"}this._isOpen=false;var e=this;ki.load("tools",function(){e._draw()})}dH.inherits(c7,"PolylineTItem");hv.extend(dH.prototype,{setLineColor:function(e){this._opts.lineColor=e},setLineStroke:function(e){if(Math.round(e)>0){this._opts.lineStroke=Math.round(e)}},setOpacity:function(e){if(e>=0&&e<=1){this._opts.opacity=e}},setLineStyle:function(e){if(e==="solid"||e==="dashed"){this._opts.lineStyle=e}},clear:function(){for(var C=0,e=this._overlays.length;C<e;C++){if(this._overlays[C]){this._map.removeOverlay(this._overlays[C])}}this._overlays.length=0;for(var C=0,e=this._dots.length;C<e;C++){if(this._dots[C]&&this._dots[C].parentNode){this._dots[C].parentNode.removeChild(this._dots[C])}}this._dots.length=0},setCursor:function(e){if(this._opts.showResult===true){return}this._opts.cursor=e},getCursor:function(){if(this._opts.showResult===true){return this._dCursor}var e=this._opts.cursor.match(/^url\((.+)\)(,.*)?/);if(e!==null){return e[1]}else{return this._opts.cursor}},showResult:function(e){this._opts.showResult=!!e}});function cD(){var oK=3;var oR=256;var T=Math.pow(2,18-oK)*oR;var oS=2;var oQ=(oS+1)*T;var C=m8.convertLL2MC(new d9(180,0));var oO=C.lng;var oM=oQ-oO;var oP=-3;var e=oP*T;var oL=m8.convertLL2MC(new d9(-180,0));var oN=oL.lng;var i=oN-e;this._validPixels=oO/Math.pow(2,18-oK);this._mc180X=oO;this._mcM180X=oN;this._loopOffset=oM+i;this._mcTSpan=oO-oN;this._spaceDistance=oM;this._mSpaceDistance=i}cD.prototype={calcLoopParam:function(C,i,oQ){oQ=oQ||256;var oN=0;var oK=3;var oM=6;var oL=oM*Math.pow(2,(i-oK))*256/oQ;var oP=oL/2-1;var oO=-oL/2;while(C>oP){C-=oL;oN-=this._loopOffset}while(C<oO){C+=oL;oN+=this._loopOffset}var e=oN;oN=Math.round(oN/Math.pow(2,18-i));return{offsetX:oN,geoOffsetX:e,col:C,T:oL,maxCol:oP,minCol:oO}},calcLoopCenterPoint:function(i){var e=i.lng;while(e>this._mc180X){e-=this._mcTSpan}while(e<this._mcM180X){e+=this._mcTSpan}i.lng=e;return i},calcLoopMapBounds:function(C,T){var i=T||C.getCenter();var e=C.sw.lng;var oK=C.ne.lng;while(i.lng>this._mc180X){i.lng-=this._mcTSpan;e-=this._mcTSpan;oK-=this._mcTSpan}while(i.lng<this._mcM180X){i.lng+=this._mcTSpan;e+=this._mcTSpan;oK+=this._mcTSpan}C.sw.lng=e;C.ne.lng=oK;if(C.pointBottomLeft){C.pointBottomLeft=this.calcLoopCenterPoint(C.pointBottomLeft);C.pointTopLeft=this.calcLoopCenterPoint(C.pointTopLeft);C.pointTopRight=this.calcLoopCenterPoint(C.pointTopRight);C.pointBottomRight=this.calcLoopCenterPoint(C.pointBottomRight)}return C},calcLoopTiles:function(oR,e,oV,oO){oV=oV||256;var oK=oO||Math.pow(2,18-e)*oV;var oQ=Math.floor(this._mc180X/oK);var oM=Math.floor(this._mcM180X/oK);var oS=Math.floor(this._loopOffset/oK);var oT=[];for(var oN=0;oN<oR.length;oN++){var oU=oR[oN];var T=oU[0];var oW=oU[1];if(T>=oQ){var oP=T+oS;if(this.isTileBlank(oP,e,oV)===true){continue}var C="id_"+oP+"_"+oW+"_"+e;if(!oR[C]){oR[C]=true;oT.push([oP,oW,e,0])}}else{if(T<=oM){var oP=T-oS;if(this.isTileBlank(oP,e,oV)===true){continue}var C="id_"+oP+"_"+oW+"_"+e;if(!oR[C]){oR[C]=true;oT.push([oP,oW,e,0])}}}}for(var oN=0,oL=oT.length;oN<oL;oN++){oR.push(oT[oN])}for(var oN=oR.length-1;oN>=0;oN--){var T=oR[oN][0];if(this.isTileBlank(T,e,oV)){oR.splice(oN,1)}}return oR},isTileBlank:function(C,oK,e){var oL=Math.pow(2,oK-3);var i=Math.round(this._validPixels*oL);var T=6*oL*256/e;while(C>T/2-1){C-=T}while(C<-(T/2)){C+=T}if(C>0&&C*e>i){return true}if(C<0&&Math.abs((C+1)*e)>i){return true}return false},isAddWidth:function(e,i){return e<this._mcM180X||i>this._mc180X},pixelWidth:function(e,i){if(e<0){e=-e}return Math.abs(e-this._mc180X)/(Math.pow(2,18-i))},getSpaceDistanceInPixel:function(i){var e=Math.round((this._spaceDistance+this._mSpaceDistance)/Math.pow(2,18-i));return e}};var hz=new cD();function gJ(){this._id=undefined;this._type=undefined;this.grid=undefined;this.layerName=undefined;this.geojson=undefined;this._geometry=null;this._properties={};this._box=null;this._state={};this._style=null;this._visible=true;this.renderData={};return this}gJ.prototype.serialize=function(){return{id:this.getId(),type:this.getType(),grid:this.grid,layerName:this.layerName,geojson:this.geojson,renderData:this.renderData,geometry:this.getGeometry(),box:this.getBox(),properties:this.getProperties(),state:this.getState(),visible:this._visible}};gJ.prototype.deserialize=function(oK){this.setId(oK.id);this.setType(oK.type);this.grid=oK.grid;this.layerName=oK.layerName;this.geojson=oK.geojson;this.setProperties(oK.properties);this.setState(oK.state);this._visible=oK.visible||true;this.renderData=oK.renderData;this.setGeometry(oK.geometry);this.setBox(oK.box);if(this.geojson.geometry&&this.geojson.geometry["type"]==="MultiPolygon"){for(var C=0;C<this._geometry.length;C++){if(this._geometry[C][0] instanceof Array){for(var e in this.renderData){var T=this.renderData[e];if(T.fill&&T.fill[C]){T.fill[C]["hasMultipleParts"]=true}}}}}if(this.geojson.geometry&&this.geojson.geometry["type"]==="Polygon"){for(var C=0;C<this._geometry.length;C++){if(this._geometry[C] instanceof Array){for(var e in this.renderData){var T=this.renderData[e];if(T.fill&&T.fill[C]){T.fill[C]["hasMultipleParts"]=true}}}}}return this};gJ.prototype.getType=function(){return this._type};gJ.prototype.getGeometry=function(){return this._geometry};gJ.prototype.getId=function(){return this._id};gJ.prototype.getProperties=function(){return this._properties};gJ.prototype.getBox=function(){return this._box};gJ.prototype.getState=function(){if(Object.keys(this._state).length>0){return this._state}else{return null}};gJ.prototype.getStyle=function(){return this._style};gJ.prototype.getStyleFunction=function(){return this._styleFunction};gJ.prototype.setType=function(e){return this._type=e};gJ.prototype.setGeometry=function(e){this._geometry=e};gJ.prototype.setStyle=function(e){if(!e||Object.keys(e).length===0){return}for(var i in e){this.set(i,e[i],this._style)}};gJ.prototype.setState=function(e){for(var i in e){this.set(i,e[i],this._state)}};gJ.prototype.setId=function(e){this._id=e};gJ.prototype.setProperties=function(e){for(var i in e){this.set(i,e[i],this._properties)}};gJ.prototype.setBox=function(e){return this._box=e};gJ.prototype.isPointInBox=function(e){return this._pointInBox(e,this._box)};gJ.prototype.getPointGeoJSON=function(T){var oS=this.renderData;if(oS){var oM=oS.active;if(!oS[oM]||!oS[oM]["poi"]){return null}var oR=[];var oO=oS[oM]["poi"];for(var oP=0;oP<oO.length;oP++){if(oO[oP].bds&&oO[oP].bds.length===4){var oK=T.pointToPixelIn(oO[oP].pt);var oN=oK.x-oO[oP].bds[0];var oL=oK.y-oO[oP].bds[1];var C=oK.x-oO[oP].bds[2];var e=oK.y-oO[oP].bds[3];oR.push([[oN,oL],[C,oL],[C,e],[oN,e],[oN,oL]])}}if(oR.length===0){return null}else{var oQ="Polygon";if(oR.length>0){oQ="MultiPolygon"}return{type:"Feature",properties:{},geometry:{type:oQ,coordinates:[oR]}}}}};gJ.prototype._pointInBox=function(e,i){if(i[0]>e[0]||i[1]>e[1]||i[2]<e[0]||i[3]<e[1]){return false}else{return true}};gJ.prototype._pixelPnpoint=function(oK,oO,e){var oP=false;if(oO){var T=oO.active;if(!oO[T]||!oO[T]["poi"]){return oP}var oL=oO[T]["poi"];for(var oM=0;oM<oL.length;oM++){if(oL[oM].bds&&oL[oM].bds.length===4){var C=e.pointToPixelIn(oL[oM].pt);if((oK.x-C.x<oL[oM].bds[2]&&oK.x-C.x>oL[oM].bds[0])&&(C.y-oK.y<oL[oM].bds[3]&&C.y-oK.y>oL[oM].bds[1])){if(e.getTilt()>55){var oN=e.pointToOverlayPixelIn(oL[oM].pt);if(oN.outOfFrustum){continue}}oP=true;break}}}}return oP};gJ.prototype._pixelPnpoly=function(oK,oM){var e=oM.length;var C=0;var oL=false;for(var T=0;T<e;T++){C=(T===e-1)?0:C+1;if((oM[T].lat!==oM[C].lat)&&(((oK.lat>=oM[T].lat)&&(oK.lat<oM[C].lat))||((oK.lat>=oM[C].lat)&&(oK.lat<oM[T].lat)))&&(oK.lng<(oM[C].lng-oM[T].lng)*(oK.lat-oM[T].lat)/(oM[C].lat-oM[T].lat)+oM[T].lng)){oL=!oL}}return oL};gJ.prototype._getProximity=function(oT,oP){var C,T,oS,oN,oM,oR,oQ;var oW=oP.length;if(oW>1){for(var oU=1;oU<oW;oU++){var oO=oP[oU-1];var o0=oP[oU];if(!oO||!o0){continue}if(oO.lng!=o0.lng){var oZ=(o0.lat-oO.lat)/(o0.lng-oO.lng);var oX=o0.lat-oZ*o0.lng;oQ=Math.abs(oZ*oT.lng+oX-oT.lat)/Math.sqrt(oZ*oZ+1)}else{oQ=Math.abs(oT.lng-o0.lng)}var oV=Math.pow(o0.lat-oO.lat,2)+Math.pow(o0.lng-oO.lng,2);var oK=Math.pow(o0.lat-oT.lat,2)+Math.pow(o0.lng-oT.lng,2);var oY=Math.pow(oO.lat-oT.lat,2)+Math.pow(oO.lng-oT.lng,2);var oL=Math.pow(oQ,2);var e=oK-oL+oY-oL;if(e>oV){oQ=Math.sqrt(Math.min(oK,oY))}if((C==null)||(C>oQ)){T=Math.sqrt(oY-oL)/Math.sqrt(oV);oS=Math.sqrt(oK-oL)/Math.sqrt(oV);C=oQ;oR=oU}C=Math.min(C,oQ)}}return{dist:C}};gJ.prototype.isPointInGeometry=function(oO,e){var oP=false;switch(this._type){case iE.POINT:oP=this._pixelPnpoint(oO,this.renderData,e);break;case iE.LINE_STRING:var oN=this._getProximity({lng:oO[0],lat:oO[1]},this._geometry);var T=this.renderData[this.renderData.active];if(!T||!T.line||!T.line[0]||!T.line[0].width){var C=2}else{var C=this.renderData[this.renderData.active]["line"][0].width;if(this.grid===gg.GridModel.GOOGLEWEB){C=Math.max(C/2*fA.gridScaleFromBDMCTo3857,2)}else{C=Math.max(C/2,2)}}if(oN.dist<C){oP=true}break;case iE.POLYGON:if(this._geometry[0] instanceof d9){oP=this._pixelPnpoly({lng:oO[0],lat:oO[1]},this._geometry)}else{oP=this._pixelPnpoly({lng:oO[0],lat:oO[1]},this._geometry[0]);if(oP){for(var oL=1;oL<this._geometry.length;oL++){var oM=this._pixelPnpoly({lng:oO[0],lat:oO[1]},this._geometry[oL]);if(oM){oP=false;break}}}}break;case iE.MULTI_POLYGON:for(var oL=0;oL<this._geometry.length;oL++){if(this._geometry[oL][0] instanceof d9){oP=this._pixelPnpoly({lng:oO[0],lat:oO[1]},this._geometry[oL])}else{oP=this._pixelPnpoly({lng:oO[0],lat:oO[1]},this._geometry[oL][0]);if(oP){for(var oK=1;oK<this._geometry[oL].length;oK++){var oM=this._pixelPnpoly({lng:oO[0],lat:oO[1]},this._geometry[oL][oK]);if(oM){oP=false;break}}}}if(oP){break}}break;case iE.MULTI_LINE_STRING:var T=this.renderData[this.renderData.active];if(!T||!T.line||!T.line[0]||!T.line[0].width){var C=6}else{var C=this.renderData[this.renderData.active]["line"][0].width;C=Math.max(C/2*fA.gridScaleFromBDMCTo3857,6)}for(var oL=0;oL<this._geometry.length;oL++){if(this._geometry[oL][0] instanceof d9){var oN=this._getProximity({lng:oO[0],lat:oO[1]},this._geometry[oL]);if(oN.dist<C){oP=true;break}}}break;case iE.MULTI_POINT:oP=this._pixelPnpoint(oO,this.renderData,e);break;default:throw new Error("geojson绫诲瀷閿欒: "+this._type)}return oP};gJ.prototype.set=function(i,C,T){var e=T||(T={});e[i]=C};var jz=(function(){function oQ(oW){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("GeoJSONParse")}var oV=oW?oW:{};if(oV.reference){this.reference=oV.reference}else{this.reference=null}return this}oQ.prototype.readFeatureFromObject=function(oW,oZ){var oV=null;if(oW.type&&oW.type.toLowerCase()==="feature"){oV=oW}else{oV={type:"Feature",geometry:oW,properties:null,}}oZ=oZ||{};oZ.reference=(oZ.reference===undefined?this.reference:oZ.reference);if(oZ.isPoints){oZ.onlyGeometry=true}var o0=C(oV.geometry,oZ,oV.properties);var oY=e(oL(oV),oZ);if(!o0){return null}if(oZ&&oZ.onlyGeometry&&!oZ.isPoints){return{geometry:o0,type:oV.geometry["type"],bBox:oY}}if(o0 instanceof Array&&!(o0[0] instanceof d9)){for(var oX=0;oX<o0.length;oX++){if(oZ.isPoints){o0[oX]={points:o0[oX],properties:oV.properties,index:oZ.__index,brotherIndex:oX}}else{o0[oX]["properties"]=oV.properties}}}else{if(oZ.isPoints){o0={points:o0,properties:oV.properties,index:oZ.__index,brotherIndex:-1}}else{o0.properties=oV.properties}}return o0};oQ.prototype.readFeaturesFromObject=function(oY,o6,oV){var o3=oY;var oW=null;if(o3.type&&o3.type.toLowerCase()==="featurecollection"){var o0=oY;oW=[];var o2=o0.features;var oX=o6||{};for(var o1=0,o4=o2.length;o1<o4;++o1){oX.__index=o1;var o5=this.readFeatureFromObject(o2[o1],o6);if(o5 instanceof Array){for(var oZ=0;oZ<o5.length;oZ++){oV&&oV(o5[oZ]);oW.push(o5[oZ])}}else{oV&&oV(o5);oW.push(o5)}}}else{var o5=this.readFeatureFromObject(oY,o6);if(o5 instanceof Array){oW=[];for(var o1=0;o1<o5.length;o1++){oV&&oV(o5[o1]);oW.push(o5[o1])}}else{oV&&oV(o5);oW=[o5]}}return oW};function C(oV,oX,oW){if(!oV){return null}var oY;switch(oV.type){case iE.POINT:oY=oN(oV,oX,oW);break;case iE.LINE_STRING:oY=T(oV,oX,oW);break;case iE.POLYGON:oY=oO(oV,oX,oW);break;case iE.MULTI_POINT:oY=oP(oV,oX,oW);break;case iE.MULTI_LINE_STRING:oY=oS(oV,oX,oW);break;case iE.MULTI_POLYGON:oY=oT(oV,oX,oW);break;default:throw new Error("geojson绫诲瀷閿欒: "+oV.type)}return oY}function oN(oW,oZ,oX){var o0=oW.coordinates;if(oZ.reference&&oZ.reference!=="BD09LL"){o0=fU.transform(o0,oZ.reference||"WGS84",fU.BD09LL)}if(oZ&&oZ.onlyGeometry){return new d9(o0[0],o0[1])}var oY=oZ;if(oZ.markerStyle){oY=oZ.markerStyle;if(oZ.markerStyle instanceof Function){oY=oZ.markerStyle(oX)||{}}}var oV=new D(new d9(o0[0],o0[1]),oY);return oV}function oU(oZ,oW){if(!oZ){return[]}var oY=[];for(var oV=0;oV<oZ.length;oV++){var oX=oZ[oV];if(oW.reference&&oW.reference!=="BD09LL"){oX=fU.transform(oX,oW.reference||"WGS84",fU.BD09LL)}oY.push(new d9(oX[0],oX[1]))}return oY}function T(oW,oZ,oX){var o0=oW.coordinates;if(oZ&&oZ.onlyGeometry){return oU(o0,oZ)}var oY=oZ;if(oZ.polylineStyle){oY=oZ.polylineStyle;if(oZ.polylineStyle instanceof Function){oY=oZ.polylineStyle(oX)||{}}}oY.noCoordTrans=true;var oV=new cf(oU(o0,oZ),oY);return oV}function oO(oV,o0,oY){var o2=oV.coordinates;var o1=[];for(var oX=0;oX<o2.length;oX++){o1[oX]=oU(o2[oX],o0)}if(o0&&o0.onlyGeometry){return o1.length>1?[o1]:(o1[0]||[])}var oZ=o0;if(o0.polygonStyle){oZ=o0.polygonStyle;if(o0.polygonStyle instanceof Function){oZ=o0.polygonStyle(oY)||{}}}var oW=new mw(o1,oZ);return oW}function oP(oX,o3,o0){var o1=oX.coordinates;var oV=[];for(var oZ=0;oZ<o1.length;oZ++){var o2=o1[oZ];if(o3.reference&&o3.reference!=="BD09LL"){o2=fU.transform(o2,o3.reference||"WGS84",fU.BD09LL)}if(o3&&o3.onlyGeometry){oV.push(new d9(o2[0],o2[1]))}else{var oW=o3;if(o3.markerStyle){oW=o3.markerStyle;if(o3.markerStyle instanceof Function){oW=o3.markerStyle(o0)||{}}}var oY=new D(new d9(o2[0],o2[1]),oW);oV.push(oY)}}return oV}function oS(oW,o0,oY){var o2=oW.coordinates;var o1=[];for(var oX=0;oX<o2.length;oX++){if(o0&&o0.onlyGeometry){o1.push(oU(o2[oX],o0))}else{var oZ=o0;if(o0.polylineStyle){oZ=o0.polylineStyle;if(o0.polylineStyle instanceof Function){oZ=o0.polylineStyle(oY)||{}}}oZ.noCoordTrans=true;var oV=new cf(oU(o2[oX],o0),oZ);o1.push(oV)}}return o1}function oT(oY,o5,o2){var o4=oY.coordinates;var oV=[];for(var o1=0;o1<o4.length;o1++){var o6=[];for(var oZ=0,oX=o4[o1];oZ<oX.length;oZ++){var o0=oU(oX[oZ],o5);if(o5&&o5.onlyGeometry){if(oX.length===1){oV.push(o0)}else{o6.push(o0)}}else{if(oX.length===1){var oW=o5;if(o5.polygonStyle){oW=o5.polygonStyle;if(o5.polygonStyle instanceof Function){oW=o5.polygonStyle(o2)||{}}}var o3=new mw(o0,oW);oV.push(o3)}else{o6.push(o0)}}}if(oX.length!==1){if(o5&&o5.onlyGeometry){oV.push(o6)}else{var oW=o5;if(o5.polygonStyle){oW=o5.polygonStyle;if(o5.polygonStyle instanceof Function){oW=o5.polygonStyle(o2)||{}}}var o3=new mw(o6,oW);oV.push(o3)}}}return oV}function oK(oV){}function e(oZ,oW){var oY=[];for(var oV=0;oV<oZ.length;oV+=2){var oX=[oZ[oV],oZ[oV+1]];if(oW.reference&&oW.reference!=="BD09LL"){oX=fU.transform(oX,oW.reference||"WGS84",fU.BD09LL)}oY.push(oX[0]);oY.push(oX[1])}return oY}function oL(oV){var oW=[Infinity,Infinity,-Infinity,-Infinity];oM(oV,function(oX){if(oW[0]>oX[0]){oW[0]=oX[0]}if(oW[1]>oX[1]){oW[1]=oX[1]}if(oW[2]<oX[0]){oW[2]=oX[0]}if(oW[3]<oX[1]){oW[3]=oX[1]}});return oW}function oM(o4,o9){var o0,oX,oW,o3,oV,o6,o8,o7,oZ,o2,oY=(o4.type&&o4.type.toLowerCase()==="featurecollection"),o1=(o4.type&&o4.type.toLowerCase()==="feature"),o5=oY?o4.features.length:1;for(o0=0;o0<o5;o0++){oZ=(oY?o4.features[o0]["geometry"]:(o1?o4.geometry:o4));o2=oZ.type==="GeometryCollection";o8=o2?oZ.geometries.length:1;for(o3=0;o3<o8;o3++){o6=o2?oZ.geometries[o3]:oZ;o7=o6.coordinates;if(o6.type==="Point"){o9(o7)}else{if(o6.type==="LineString"||o6.type==="MultiPoint"){for(oX=0;oX<o7.length;oX++){o9(o7[oX])}}else{if(o6.type==="Polygon"||o6.type==="MultiLineString"){for(oX=0;oX<o7.length;oX++){for(oW=0;oW<o7[oX].length;oW++){o9(o7[oX][oW])}}}else{if(o6.type==="MultiPolygon"){for(oX=0;oX<o7.length;oX++){for(oW=0;oW<o7[oX].length;oW++){for(oV=0;oV<o7[oX][oW].length;oV++){o9(o7[oX][oW][oV])}}}}else{throw new Error("绫诲瀷閿欒")}}}}}}}function i(o4,o9){var o0,oX,oW,o3,oV,o6,o8,o7,oZ,o2,oY=o4.type==="FeatureCollection",o1=o4.type==="Feature",o5=oY?o4.features.length:1;for(o0=0;o0<o5;o0++){oZ=(oY?o4.features[o0]["geometry"]:(o1?o4.geometry:o4));o2=oZ.type==="GeometryCollection";o8=o2?oZ.geometries.length:1;for(o3=0;o3<o8;o3++){o6=o2?oZ.geometries[o3]:oZ;o7=o6.coordinates;if(o6.type==="Point"){o7=o9(o7)}else{if(o6.type==="LineString"||o6.type==="MultiPoint"){for(oX=0;oX<o7.length;oX++){o7[oX]=o9(o7[oX])}}else{if(o6.type==="Polygon"||o6.type==="MultiLineString"){for(oX=0;oX<o7.length;oX++){for(oW=0;oW<o7[oX].length;oW++){o7[oX][oW]=o9(o7[oX][oW])}}}else{if(o6.type==="MultiPolygon"){for(oX=0;oX<o7.length;oX++){for(oW=0;oW<o7[oX].length;oW++){for(oV=0;oV<o7[oX][oW].length;oV++){o7[oX][oW][oV]=o9(o7[oX][oW][oV])}}}}else{throw new Error("绫诲瀷閿欒")}}}}}}}function oR(oW){var oV=oW.type==="FeatureCollection";var oX=oW.type==="Feature";var oY=(oV?oW.features[0]["geometry"]:(oX?oW.geometry:oW));if(oY.type){return oY.type}else{throw new Error("绫诲瀷閿欒")}}oQ.bbox=oL;oQ.coordEachReplace=i;oQ.getType=oR;return oQ})();const eL={point:{symbolPath:{format:"string",defaultValue:""},symbolFillColor:{format:"string",defaultValue:"#000"},symbolFillOpacity:{format:"number",defaultValue:1},symbolScale:{format:"number",defaultValue:1},symbolRotation:{format:"number",defaultValue:0},symbolStrokeColor:{format:"string",defaultValue:"#000"},symbolStrokeOpacity:{format:"number",defaultValue:0},symbolStrokeWeight:{format:"number",defaultValue:0},icon:{format:"string",defaultValue:""},iconSize:{format:"array",defaultValue:[32,32]},uid:{format:"string",defaultValue:"custom-vector-0"},name:{format:"string",defaultValue:""},fontSize:{format:"number",defaultValue:22},color:{format:"string",defaultValue:"#0d20c9"},haloSize:{format:"number",defaultValue:2},strokeColor:{format:"string",defaultValue:"#fff"},textOnIcon:{format:"string",defaultValue:false},textOnIconSize:{format:"array",defaultValue:[32,32]},textOnIconUrl:{format:"string",defaultValue:""},textMargin:{format:"number",defaultValue:0},direction:{format:"number",defaultValue:0},rank:{format:"number",defaultValue:50000},visibility:{format:"boolean",defaultValue:true},nodeType:{format:"number",defaultValue:0},shapeType:{format:"number",defaultValue:0},anchor:{format:"number",defaultValue:0},size:{format:"number",defaultValue:32},scale:{format:"number",defaultValue:1},offset:{format:"object",defaultValue:[0,0]},rotation:{format:"number",defaultValue:0},opacity:{format:"number",defaultValue:1},strokeWeight:{format:"number",defaultValue:0}},polyline:{strokeLineJoin:{format:"string",defaultValue:"miter"},strokeLineCap:{format:"string",defaultValue:"round"},strokeColor:{format:"string",defaultValue:"#142655"},strokeWeight:{format:"number",defaultValue:2},strokeOpacity:{format:"number",defaultValue:1},borderColor:{format:"string",defaultValue:"rgba(27, 142, 236, 1)"},borderWeight:{format:"number",defaultValue:0},strokeTextureUrl:{format:"string",defaultValue:""},strokeTextureWidth:{format:"number",defaultValue:16},strokeTextureHeight:{format:"number",defaultValue:16},strokeStyle:{format:"string",defaultValue:"solid"},dashArray:{format:"object",defaultValue:[8,4]},shapeType:{format:"number",defaultValue:0},visibility:{format:"boolean",defaultValue:true}},polygon:{fillColor:{format:"string",defaultValue:"#142655"},fillOpacity:{format:"number",defaultValue:1},patternMapping:{format:"string",defaultValue:"0, 0, 32, 32"},patternScale:{format:"number",defaultValue:1},patternOffset:{format:"string",defaultValue:"0, 0"},strokeWeight:{format:"number",defaultValue:0},strokeLineJoin:{format:"string",defaultValue:"bevel"},strokeLineCap:{format:"string",defaultValue:"round"},strokeColor:{format:"string",defaultValue:"#dec41b"},strokeOpacity:{format:"number",defaultValue:1},strokeStyle:{format:"string",defaultValue:"solid"},dashArray:{format:"object",defaultValue:[8,4]},visibility:{format:"boolean",defaultValue:true}}};const d2=(function(i){var e={};for(var T in i){e[T]={};for(var C in i[T]){e[T][C]=i[T][C].defaultValue}}return e})(eL);const iE={POINT:"Point",LINE_STRING:"LineString",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",CIRCLE:"Circle",};function iu(e){return e&&typeof ArrayBuffer!=="undefined"&&(e instanceof ArrayBuffer||(e.constructor&&e.constructor.name==="ArrayBuffer"))}function jg(e){if(self){if(self.ImageBitmap&&e instanceof self.ImageBitmap){return true}}else{if(window&&window.ImageBitmap){if(e instanceof window.ImageBitmap){return true}}}return false}const mX={};function a9(i,T,C){var e=C||{};Object.defineProperty(i,"_classRegistryKey",{value:T,writeable:false});mX[T]={_class:i,escape:e.escape||[]}}a9(Object,"Object");a9(d9,"Point");function nE(oO,oM){if(oO===null||oO===undefined||typeof oO==="boolean"||typeof oO==="number"||typeof oO==="string"||oO instanceof Boolean||oO instanceof Number||oO instanceof String||oO instanceof Date||oO instanceof RegExp){return oO}if(iu(oO)){if(oM){oM.push(oO)}return oO}if(jg(oO)){if(oM){var oR=oM.filter(function(i){if(i===oO){return true}else{return false}});!oR&&oM.push(oO)}return oO}if(ArrayBuffer.isView(oO)){const oN=oO;if(oM){oM.push(oN.buffer)}return oN}if(oO instanceof ImageData){if(oM){var oR=oM.filter(function(i){if(i===oO.data.buffer){return true}else{return false}});!oR&&oM.push(oO.data.buffer)}return oO}if(Array.isArray(oO)){const C=[];for(var T=0;T<oO.length;T++){var oS=oO[T];C.push(nE(oS,oM))}return C}if(typeof oO==="object"){const oK=oO.constructor;const e=oK._classRegistryKey;if(!e){throw new Error("涓嶈兘琚簭鍒楀寲")}const oL=oK.serialize?oK.serialize(oO,oM):{};if(!oK.serialize){for(var oQ in oO){if(!oO.hasOwnProperty(oQ)){continue}if(mX[e]["escape"].indexOf(oQ)>=0){continue}const oP=oO[oQ];oL[oQ]=nE(oP,oM)}if(oO instanceof Error){oL.message=oO.message}}if(e!=="Object"){oL["_$name"]=e}return oL}else{if(oO instanceof Function){return null}}throw new Error("涓嶈兘琚簭鍒楀寲")}function lP(oL){if(oL===null||oL===undefined||typeof oL==="boolean"||typeof oL==="number"||typeof oL==="string"||oL instanceof Boolean||oL instanceof Number||oL instanceof String||oL instanceof Date||oL instanceof RegExp||iu(oL)||jg(oL)||ArrayBuffer.isView(oL)||oL instanceof ImageData){return oL}if(Array.isArray(oL)){var e=oL["_$name"];if(e){var T=mX[e]["_class"];if(!T){throw new Error("涓嶈兘琚弽搴忓垪鍖�")}if(T.deserialize){return T.deserialize(oL)}}const oK=[];for(var C=0;C<oL.length;C++){var oO=oL[C];oK.push(lP(oO))}return oK}if(typeof oL==="object"){var e=oL["_$name"]||"Object";var T=mX[e]["_class"];if(!T){throw new Error("涓嶈兘琚弽搴忓垪鍖�")}if(T.deserialize){return T.deserialize(oL)}const oQ=Object.create(T.prototype);const oP=Object.keys(oL);for(var C=0;C<oP.length;C++){const oN=oP[C];if(oN==="_$name"){continue}const oM=oL[oN];oQ[oN]=lP(oM)}return oQ}throw new Error("涓嶈兘琚弽搴忓垪鍖�")}function o(oN,oL,oM){if(!oN.length){return oM(null,[])}var oK=oN.length;const T=new Array(oN.length);var e=null;for(var C=0;C<oN.length;C++){oL(oN[C],function(oO,i){if(oO){e=oO}T[C]=i;if(--oK===0){oM(e,T)}},C)}}function i1(oO,oL,oN){if(!oO.length){return oN(null,[])}var oK=oO.length;const T=new Array(oO.length);var e=null;var C=0;function oM(){oL(oO[C],function(oP,i){if(oP){e=oP}T[C]=i;if(--oK===0){oN(e,T)}else{C++;oM()}},C)}oM()}var nX=(function(){var oM=true;var oO=256;var e=true;var T=oe("ditu","normalTraffic");var oL=T.udt;var C=K.urlProtocol+"//" + window.location.host + "/bmap-api/traffic/";var i=[[2,"79,210,125,1",3,2,0,[],0,0],[2,"79,210,125,1",3,2,0,[],0,0],[2,"79,210,125,1",4,2,0,[],0,0],[2,"79,210,125,1",5,2,0,[],0,0],[2,"79,210,125,1",6,2,0,[],0,0],[2,"255,208,69,1",3,2,0,[],0,0],[2,"255,208,69,1",3,2,0,[],0,0],[2,"255,208,69,1",4,2,0,[],0,0],[2,"255,208,69,1",5,2,0,[],0,0],[2,"255,208,69,1",6,2,0,[],0,0],[2,"232,14,14,1",3,2,0,[],0,0],[2,"232,14,14,1",3,2,0,[],0,0],[2,"232,14,14,1",4,2,0,[],0,0],[2,"232,14,14,1",5,2,0,[],0,0],[2,"232,14,14,1",6,2,0,[],0,0],[2,"181,0,0,1",3,2,0,[],0,0],[2,"181,0,0,1",3,2,0,[],0,0],[2,"181,0,0,1",4,2,0,[],0,0],[2,"181,0,0,1",5,2,0,[],0,0],[2,"181,0,0,1",6,2,0,[],0,0],[2,"255,255,255,1",4,0,0,[],0,0],[2,"255,255,255,1",5.5,0,0,[],0,0],[2,"255,255,255,1",7,0,0,[],0,0],[2,"255,255,255,1",8.5,0,0,[],0,0],[2,"255,255,255,1",10,0,0,[],0,0]];var oN=new kT({transparentPng:true,dataType:2,cacheSize:256,clipTile:true,isFlat:true});oN.zIndex=2;oN.autoRefresh=true;oN.refreshInterval=60000;if(!K.apiVersionIsGL()){var oK=oN.initialize;oN.initialize=function(oR){oK&&oK.call(this,oR);var oP=this;var oQ=this.remove;this.remove=function(){if(oP.reloadTimer){clearInterval(oP.reloadTimer);oP.reloadTimer=null}oQ&&oQ.call(this)};if(this.autoRefresh===true){this.reloadTimer=setInterval(function(){oP._refreshTiles()},this.refreshInterval)}};oN.setAutoRefresh=function(oQ){this.autoRefresh=!!oQ;if(this.reloadTimer){clearInterval(this.reloadTimer);this.reloadTimer=null}if(this.autoRefresh&&this.map){var oP=this;this.reloadTimer=setInterval(function(){oP._refreshTiles()},this.refreshInterval)}};oN.setRefreshInterval=function(oP){this.refreshInterval=Math.max(10000,oP);if(this.autoRefresh&&this.map){if(this.reloadTimer){clearInterval(this.reloadTimer)}var oQ=this;this.reloadTimer=setInterval(function(){oQ._refreshTiles()},this.refreshInterval)}}}oN.getTilesUrl=function(oR,oS){if(!oR||oS<7){return null}var oQ=oR.x;var oT=oR.y;var oP=C+"TrafficTileService?level="+oS+"&x="+oQ+"&y="+oT+"&time="+(+new Date());if(this.map.getRenderType()==="webgl"){oP=C+"?qt=vtraffic&z="+oS+"&x="+oQ+"&y="+oT+"&udt="+oL}return oP};oN.setColors=function(oP){for(var oS=0;oS<i.length;oS++){var oR=Math.floor(oS/5);var oQ=oP[oR];if(oQ){if(Object.prototype.toString.call(oQ)==="[object String]"){oQ=k0.parseCSSColor(oQ)}i[oS][1]=[oQ[0],oQ[1],oQ[2],oQ[3]/255].join(",")}}this._refreshTiles()};oN.setEdge=function(oP){e=!!oP;this._refreshTiles()};oN._refreshTiles=function(){if(!this.map){return}this.clearCache();var oP=this.map._webglPainter;if(oP&&oP._cache){var oQ=oP._cache;var oS=oQ.getAllData();if(oS){var oT=this.mapType+"_";for(var oR in oS){if(oR.indexOf(oT)===0){oQ.removeData(oR)}}}}this.map.dispatchEvent(new ix("onupdate"))};oN.processData=function(oS){var oW=oS.content;var oU=10;if(typeof oS.precision==="number"){oU=oS.precision*10}var o3={road:[[],[]]};if(!oW){return o3}var o1=oW.tf;if(!o1){return o3}for(var oT=0;oT<o1.length;oT++){var o2=o1[oT][1];var o0=[];var oY=0;var oX=0;var oZ=i[o1[oT][3]];for(var oR=0,oP=o2.length;oR<oP/2;oR++){oY+=o2[oR*2]/oU;oX+=o2[oR*2+1]/oU;o0.push(oY,256-oX)}var oQ=oZ[1].split(",");oQ[3]=oQ[3]*255;var oV=oZ[2]/2;if(e){o3.road[0].push([o0,1,2,[255,255,255,255],oV+2])}o3.road[1].push([o0,1,2,oQ,oV])}return o3};return oN})();function ng(e){if(e&&e.autoRefresh===false){nX.autoRefresh=false}if(e&&typeof e.refreshInterval==="number"){nX.refreshInterval=Math.max(10000,e.refreshInterval)}}ng.prototype=nX;function f2(e){g2.call(this);e=e||{};this._opts={};this._opts.districts=e.name||"";this._opts.adcode=e.adcode||"";this._opts.kind=e.kind||0;this._config={};var C=K.uiVersionIsGL()?{strokeColor:"#00f",fillColor:"#ff0"}:fq();this._config.strokeColor=e.strokeColor||C.strokeColor;this._config.strokeOpacity=typeof e.strokeOpacity==="number"?e.strokeOpacity:1;dA(this._config.strokeOpacity,0,1);this._config.fillColor=e.fillColor||C.fillColor;this._config.fillOpacity=typeof e.fillOpacity==="number"?e.fillOpacity:0.6;dA(this._config.fillOpacity,0,1);this._config.strokeWeight=e.strokeWeight||1;this._config.autoViewport=e.autoViewport||e.viewport||false;this._config.onComplete=typeof e.onComplete==="function"?e.onComplete:null;this.disOverlays=[];this.eventAndCallback={};this._layer=null;this._queryList=[];var i=this;ki.load("layer",function(){i._asyncSearch()},true)}f2.inherits(eX,"DistrictLayer");f2.prototype.isDistrictLayer=true;hv.extend(f2.prototype,{initialize:function(e){this._map=e;this.addDistrict()},addDistrict:function(){this._queryList.push({method:"addDistrict",arguments:arguments})},deleteDistrict:function(){this._queryList.push({method:"deleteDistrict",arguments:arguments})},getDistrictData:function(){this._queryList.push({method:"getDistrictData",arguments:arguments})},searchBoundary:function(){this._queryList.push({method:"searchBoundary",arguments:arguments})},addEventListener:function(e,i){this.eventAndCallback[e]=i},removeEventListener:function(C,oK){var T=this.eventAndCallback[C];if(!T||oK!==T){return}if(this._layer){this._layer.removeEventListener(C,T);for(var e=0;e<this._layer.overlayData.length;e++){this._layer.overlayData[e].removeEventListener(C,T)}}delete this.eventAndCallback[C]},removeDistrict:function(i,e){this._map=i;this.deleteDistrict(e)},toString:function(){return"DistrictLayer"}});function bk(e,i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("GeoJSONLayer")}i=i||{};this.layerName=e||"unknown";this.reference=i.reference;this.level=i.level||-99;this.visible=(i.visible===undefined?true:!!i.visible);this.minZoom=i.minZoom||3;this.maxZoom=i.maxZoom||21;this.markerStyle=i.markerStyle||{};this.polylineStyle=i.polylineStyle||{};this.polygonStyle=i.polygonStyle||{};this.overlayData=[];this._onMap=false;this.clickDistrict=5;this._queryList=[];var C=this;ki.load("layer",function(){C._asyncReplay()},true);this.setData(i.dataSource)}bk.inherits(hv.BaseClass,"GeoJSONLayer");bk.prototype.isGeoJSONLayer=true;bk.prototype.init=function(oM){if(this.map){return}this.map=oM;var oK=this;this._onZoomEvent=function(){if(oK.map.getZoom()>=oK.minZoom&&oK.map.getZoom()<=oK.maxZoom){if(!oK._onMap){oK.addDataToMap();oK._onMap=true}}else{if(oK._onMap){oK.removeDataFromMap();oK._onMap=false}}};this.map.on("zoomend",this._onZoomEvent);var oK=this;var e=false;var T={x:0,y:0};this._layerMouseEvent=function(oP){if(!oK.map||!oK._listeners||!oK.visible||!oK._onMap){return}if(!oK._listeners.onmousemove||Object.keys(oK._listeners.onmousemove).length===0){return}var oO=oK.pickOverlays(oP);var i;if(oO&&oO.length>0){i=new ix("onmousemove");i.features=oO;oK.map.platform.style.cursor=oK.map.config.overlayMoveCursor;e=true}else{if(!e||!oK._listeners.onmouseout||Object.keys(oK._listeners.onmouseout).length===0){return}oK.map.platform.style.cursor=oK.map.config.defaultCursor;i=new ix("onmouseout");i.features=null;e=false}if(i){i.pointMC=oP.pointMC;i.pixel=oP.pixel;i.latLng=oP.latlng;oK.dispatchEvent(i)}};this._layerClickEvent=function(oQ){if(!oK.map||!oK._listeners||!oK.visible){return}if((!oK._listeners.onclick&&!oK._listeners.dblclick)||(Object.keys(oK._listeners.onclick||{}).length===0&&Object.keys(oK._listeners.dblclick||{}).length===0)){return}var oO={x:oQ.clientX,y:oQ.clientY};if(Math.abs(oO.x-T.x)>oK.clickDistrict||Math.abs(oO.y-T.y)>oK.clickDistrict){return}var oP=oK.pickOverlays(oQ);var i=new ix(oQ.type);i.pointMC=oQ.pointMC;i.pixel=oQ.pixel;i.latLng=oQ.latlng;i.features=oP;oK.dispatchEvent(i)};this._layerMouseDownEvent=function(i){T={x:i.clientX,y:i.clientY}};oM.addEventListener("onmousemove",this._layerMouseEvent);oM.addEventListener("onmouseout",this._layerMouseEvent);oM.addEventListener("onmousedown",this._layerMouseDownEvent);var oL=["onclick"];for(var C=0;C<oL.length;C++){var oN=oL[C];oM.addEventListener(oN,this._layerClickEvent)}this._onZoomEvent()};bk.prototype.remove=function(){if(this.map){this.removeDataFromMap();this.map.removeEventListener("onmousemove",this._layerMouseEvent);this.map.removeEventListener("onmouseout",this._layerMouseEvent);this.map.removeEventListener("onclick",this._layerClickEvent);this.map.removeEventListener("onmousedown",this._layerMouseDownEvent);this.map.removeEventListener("onzoomend",this._onZoomEvent)}this.map=null};bk.prototype.destroy=function(){if(this.map){this.clearData();this.map.removeEventListener("onmousemove",this._layerMouseEvent);this.map.removeEventListener("onmouseout",this._layerMouseEvent);this.map.removeEventListener("onclick",this._layerClickEvent);this.map.removeEventListener("onmousedown",this._layerMouseDownEvent);this.map.removeEventListener("onzoomend",this._onZoomEvent)}this.map=null};bk.prototype.getData=function(){return this.overlayData};bk.prototype.addDataToMap=function(){if(this.visible&&this.map&&this.map.getZoom()>=this.minZoom&&this.map.getZoom()<=this.maxZoom){for(var e=0;e<this.overlayData.length;e++){this.map.addOverlay(this.overlayData[e])}}};bk.prototype.removeDataFromMap=function(){if(this.map&&this.overlayData.length>0){for(var e=0;e<this.overlayData.length;e++){this.map.removeOverlay(this.overlayData[e])}}};bk.prototype.clearData=function(){this.dataSource=null;if(this.map&&this.overlayData.length>0){this.removeDataFromMap()}this.overlayData=[]};bk.prototype.setLevel=function(e){if(e>-999&&e<9999){this.level=e;for(var C=0;C<this.overlayData.length;C++){this.overlayData[C].setZIndex(this.level)}if(this.map){this.map.fire(new BMapGL.Event("onupdate","line"))}}};bk.prototype.setClickDistrict=function(e){this.clickDistrict=e||5};bk.prototype.getLevel=function(){return this.level};bk.prototype.setVisible=function(i){var e=!!i;if(this.visible!==e){this.visible=e;if(e){this.addDataToMap()}else{this.removeDataFromMap()}}};bk.prototype.getVisible=function(){return this.visible};bk.prototype.toString=function(){return"GeoJSONLayer"};bk.prototype.setData=function(){this._queryList.push({method:"setData",arguments:arguments})};bk.prototype.addOverlay=function(){this._queryList.push({method:"addOverlay",arguments:arguments})};bk.prototype.removeOverlay=function(){this._queryList.push({method:"removeOverlay",arguments:arguments})};bk.prototype.resetStyle=function(){this._queryList.push({method:"resetStyle",arguments:arguments})};bk.prototype.pickOverlays=function(){return null};bk.prototype._asyncReplay=function(){var C=this._queryList||[];this._queryList=[];for(var e=0;e<C.length;e++){this[C[e].method].apply(this,C[e].arguments)}};function ow(oQ){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("XYZLayer")}var oQ=oQ||{};var oY=oQ.reproject===true;var oK=oQ.reprojectSourceCRS||"EPSG3857";var oO=oQ.transform||{source:"EPSG3857",target:"BD09MC"};if(!oO.source){oO.source="EPSG3857"}if(!oO.target){oO.target="BD09MC"}const oV=oQ.tileUrlTemplate||"";const T=oQ.xTemplate||function(oZ,o1,o0){return oZ};const oW=oQ.yTemplate||(oQ.tms?function(oZ,o1,o0){return Math.pow(2,o0)-o1-1}:function(oZ,o1,o0){return o1});const C=oQ.zTemplate||function(oZ,o1,o0){return o0};function oM(o9,o8,o7){var o2=fA.getTileRangeExtent([o7,o9,o8]);var o5=o2.minX,o4=o2.minY,o1=o2.maxX,oZ=o2.maxY;var o0=20037508.34;var o6=function(pa){return pa/o0*180};var o3=function(pa){return 180/Math.PI*(2*Math.atan(Math.exp(pa/o0*180*Math.PI/180))-Math.PI/2)};if(oK==="EPSG3857"){return o5+","+o4+","+o1+","+oZ}return o3(o4)+","+o6(o5)+","+o3(oZ)+","+o6(o1)}const oU=oQ.bTemplate||(oY?oM:function(oZ,o2,o1){const o0=fA.getTileRangeExtent([o1,oZ,o2]);return o0.minX+","+o0.minY+","+o0.maxX+","+o0.maxY});const oX=oQ.wTemplate||function(oZ,o1,o0){return 512};const e=oQ.hTemplate||function(oZ,o1,o0){return 512};var oP=oQ.extent||[];const i=oQ.extentCRSIsWGS84||false;var oN=oQ.minZoom||0;var oT=oQ.maxZoom||23;var oL=oQ.spanLevel||0;if(!oQ.showRegion||"insideoutside".indexOf(oQ.showRegion)===-1){oQ.showRegion="inside"}var oS=new kT({transform:oO,png8:oQ.png8||false,height:oQ.height||0,retry:oQ.retry||false,retryTime:oQ.retryTime||600,transparentPng:true,dataType:oQ.dataType||1,spanLevel:oL,tileTypeName:"xyz",cacheSize:oQ.cacheSize||256,customLayer:true,clipTile:false,isTop:oQ.isTop||false,opacity:oQ.opacity||1,isLowText:oQ.isLowText||false,boundary:oQ.boundary||false,showRegion:oQ.showRegion,useThumbData:oQ.useThumbData||false,thumbUpsample:oQ.thumbUpsample||false,tileLoadFunction:oQ.tileLoadFunction,preciseVertex:oQ.preciseVertex||false});oS.thumbMaxZoom=oT;if(typeof oQ.thumbParentDepth==="number"){oS.thumbParentDepth=oQ.thumbParentDepth}if(typeof oQ.thumbChildDepth==="number"){oS.thumbChildDepth=oQ.thumbChildDepth}if(oQ.zIndex){oS.zIndex=oQ.zIndex}oS.reproject=oY;oS.reprojectSourceCRS=oK;(oP.length===4)&&i&&(oP=fA.fromEPSG4326(oP));oS.getTilesUrl=function(o6,o0,o4){if(!o6||o0<0||o0<(oN+oL)||o0>(oT+oL)){oS.tileCache.clear();return null}if(oO.source!=="BD09MC"){o6.x=fA.getTilesLoop(o0,o6.x)}if(oP.length===4){var o5=fA.getTileRangeExtent([o0,o6.x,o6.y]);var o7=oR([o5.minX,o5.minY,o5.maxX,o5.maxY]);if(!o7){return null}}var o1="";if(oV){o1=oV;var o3=/[^\{}]*\{(.*)\}[^\}]*/;o1.match(o3);var o2=[];if(RegExp.$1){o2=RegExp.$1.split(",")}var oZ=C(o6.x,o6.y,o0);if(!oZ){return null}o1=o1.replace(/\{(.*)\}/,o2[(o6.x+o6.y)%o2.length]);o1=o1.replace(/\[x\]/gi,T(o6.x,o6.y,o0));o1=o1.replace(/\[y\]/gi,oW(o6.x,o6.y,o0));o1=o1.replace(/\[z\]/gi,oZ);o1=o1.replace(/\[b\]/gi,oU(o6.x,o6.y,o0));o1=o1.replace(/\[w\]/gi,oX(o6.x,o6.y,o0));o1=o1.replace(/\[h\]/gi,e(o6.x,o6.y,o0))}else{return null}return o1};function oR(oZ){if(oP&&oP instanceof Array&&oP.length===4){if((oP[0]<=oZ[2]&&oP[1]<=oZ[3])&&(oP[2]>=oZ[0]&&oP[3]>=oZ[1])){return true}else{return false}}return true}return oS}function cr(e){e=e||{};var i=e.url||"";var oR=e.params||{};var oM=oR.VERSION||"1.3.0";var oL=e.projection||"EPSG:3857";if(oL!=="EPSG:3857"){console.warn("[WMSLayer] 浠呮敮鎸� EPSG:3857銆備紶鍏ュ��:"+oL);oL="EPSG:3857"}if(!oR.LAYERS){console.warn("[WMSLayer] params.LAYERS 缂哄け,WMS 鏈嶅姟閫氬父蹇呭~銆�")}var oN=oM==="1.1.1"?"SRS":"CRS";var oO={SERVICE:"WMS",REQUEST:"GetMap",VERSION:oM,FORMAT:"image/png",TRANSPARENT:"true",STYLES:""};oO[oN]=oL;for(var T in oR){if(oR.hasOwnProperty(T)){oO[T]=oR[T]}}delete oO.BBOX;delete oO.WIDTH;delete oO.HEIGHT;var C=[];for(var oP in oO){if(oO.hasOwnProperty(oP)){var oK=encodeURIComponent(oO[oP]).replace(/%2C/gi,",");C.push(encodeURIComponent(oP)+"="+oK)}}C.push("BBOX=[b]","WIDTH=[w]","HEIGHT=[h]");var oQ=i.indexOf("?")===-1?"?":"&";return{tileUrlTemplate:i+oQ+C.join("&"),transform:{source:"EPSG3857",target:"BD09MC"},projection:oL,version:oM}}function ev(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("WMSLayer")}i=i||{};var C=i.tileSize||256;var e=cr({url:i.url,params:i.params,projection:i.projection});return new ow({tileUrlTemplate:e.tileUrlTemplate,transform:e.transform,wTemplate:function(){return C},hTemplate:function(){return C},minZoom:i.minZoom,maxZoom:i.maxZoom,extent:i.extent||[],extentCRSIsWGS84:i.extentCRSIsWGS84||false,opacity:i.opacity,zIndex:i.zIndex,spanLevel:i.spanLevel,useThumbData:i.useThumbData,reproject:i.reproject,reprojectSourceCRS:i.reprojectSourceCRS,png8:i.png8,height:i.height,retry:i.retry,retryTime:i.retryTime,dataType:i.dataType,cacheSize:i.cacheSize,isTop:i.isTop,boundary:i.boundary,showRegion:i.showRegion,thumbParentDepth:i.thumbParentDepth,thumbChildDepth:i.thumbChildDepth,tileLoadFunction:i.tileLoadFunction})}function f6(e){var e=e||{};var C=e.url||"";var oK=e.params||{};var oO={Service:"WMTS",Request:"GetTile",Version:"1.0.0",Format:"image/png",TileMatrixSet:"GoogleMapsCompatible"};for(var oQ in oO){if(!oK[oQ]&&!oK[oQ.toLowerCase()]){oK[oQ]=oO[oQ]}}var oL=oK.TileMatrix||oK.tilematrix||"[z]";var oP=oK.TileCol||oK.tilecol||"[x]";var oN=oK.TileRow||oK.tilerow||"[y]";delete oK.TileMatrix;delete oK.tilematrix;delete oK.TileCol;delete oK.tilecol;delete oK.TileRow;delete oK.tilerow;var oR=[];for(var oQ in oK){oR.push(oQ+"="+encodeURIComponent(oK[oQ]))}var oM=C.indexOf("?")===-1?"?":"&";var T=C+oM+oR.join("&")+"&TileMatrix="+oL+"&TileCol="+oP+"&TileRow="+oN;var i={tileUrlTemplate:T,opacity:e.opacity,minZoom:e.minZoom,maxZoom:e.maxZoom,zIndex:e.zIndex,extent:e.extent,extentCRSIsWGS84:e.extentCRSIsWGS84,transform:e.transform,xTemplate:e.xTemplate,yTemplate:e.yTemplate,zTemplate:e.zTemplate,useThumbData:e.useThumbData,spanLevel:e.spanLevel,reproject:e.reproject,reprojectSourceCRS:e.reprojectSourceCRS,png8:e.png8,height:e.height,retry:e.retry,retryTime:e.retryTime,dataType:e.dataType,cacheSize:e.cacheSize,isTop:e.isTop,boundary:e.boundary,showRegion:e.showRegion,thumbParentDepth:e.thumbParentDepth,thumbChildDepth:e.thumbChildDepth,tileLoadFunction:e.tileLoadFunction};return new ow(i)}function le(e){var C={"EPSG:3857":"EPSG3857",EPSG3857:"EPSG3857",BD09MC:"BD09MC"};var i=C[e];if(!i){if(e&&typeof console!=="undefined"&&console.warn){console.warn("[RasterTileLayer] 浠呮敮鎸� EPSG:3857 / BD09MC, 浼犲叆:"+e)}i="EPSG3857"}return i}function cW(T,i,oN,oM,e){var oL=Math.pow(2,oM)-oN-1;var C=T.replace(/\{z\}/gi,oM).replace(/\{x\}/gi,i).replace(/\{-y\}/gi,oL).replace(/\{reverseY\}/gi,oL).replace(/\{y\}/gi,oN);if(C.indexOf("{s}")!==-1||C.indexOf("{S}")!==-1){var oK=(e&&e.length)?e[Math.abs(i+oN)%e.length]:"";C=C.replace(/\{s\}/gi,oK)}return C}function eM(C){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("RasterTileLayer")}C=C||{};var oT=C.url||"";var oN=C.subdomains||[];var oL=typeof console!=="undefined"&&console.warn;if(!oT&&oL){console.warn("[RasterTileLayer] url 蹇呭~(瀛楃涓叉ā鏉挎垨 function(x, y, z))銆�")}if(typeof oT==="string"&&/\{s\}/i.test(oT)&&!oN.length&&oL){console.warn("[RasterTileLayer] url 鍚� {s} 浣嗘湭鎻愪緵 subdomains銆�")}var i=le(C.projection||"EPSG:3857");var oM={source:i,target:"BD09MC"};var T=C.bounds||[];var oO=C.boundsInWGS84||false;var oK=C.minZoom||0;var oP=C.maxZoom||23;var oR=C.spanLevel||0;var oQ=C.showRegion;if(oQ!=="inside"&&oQ!=="outside"){oQ="inside"}var e=new kT({transform:oM,height:C.height||0,retry:C.retry||false,retryTime:C.retryTime||600,transparentPng:true,dataType:1,spanLevel:oR,tileTypeName:"xyz",cacheSize:C.cacheSize||256,customLayer:true,clipTile:false,opacity:C.opacity||1,boundary:C.boundary||false,showRegion:oQ,useThumbData:C.useThumbData!==false,tileLoadFunction:C.tileLoadFunction});if(C.zIndex){e.zIndex=C.zIndex}if(T.length===4&&oO){T=fA.fromEPSG4326(T)}e.getTilesUrl=function(oU,oW){if(!oU||oW<0||oW<(oK+oR)||oW>(oP+oR)){e.tileCache.clear();return null}if(oM.source!=="BD09MC"){oU.x=fA.getTilesLoop(oW,oU.x)}if(T.length===4){var oV=fA.getTileRangeExtent([oW,oU.x,oU.y]);if(!oS([oV.minX,oV.minY,oV.maxX,oV.maxY])){return null}}if(typeof oT==="function"){return oT(oU.x,oU.y,oW)||null}if(oT){return cW(oT,oU.x,oU.y,oW,oN)}return null};function oS(oU){return(T[0]<=oU[2]&&T[1]<=oU[3]&&T[2]>=oU[0]&&T[3]>=oU[1])}return e}function fm(C){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("PixelLayer")}this.src=eR();this._queryList=[];var e=this;ki.load("layer",function(){e._asyncReplay()},true);this.tileMaskUvCache=new a1(64,{clearCallback:function(oM){}});var oL=6;if(C.pixelMap){this.opacity=typeof C.pixelMap.opacity==="number"?C.pixelMap.opacity:1;dA(this.opacity,0,1);if(this.opacity<1){C.useThumbData=false}var oK=C.pixelMap||{};this.colors=oK.colors||["#F9F871","#FFC75F","#FF9671","#FF6F91","#D65DB1","#845EC2"];this.positions=oK.positions||[0,0.2,0.4,0.6,0.8,1];this.domain=oK.domain||[0,255];this.clamp=oK.clamp||this.domain;this.noData=(oK.noData!==undefined)?oK.noData:-99999;this.fomularC=oK.fomularC||"float generateValue(vec4 pixel){return pixel.r * 255.;}";this.fomularJS=oK.fomularJS||function(oM){return oM.r};this.maskPng=oK.maskPng||null;if(this.maskPng){this.loadMaskPng(this.maskPng)}this.maskData=oK.maskData||-1;this.maskCoord=oK.maskCoord||null;this.fHashcode=u({str:this.fomularC});var i=this.canPixelMap();if(i){this.isPixelMap=true;this.setPixelMap()}oL=C.pixelMap.cacheSize||oL}var T=new ow(C);T.ontology=this;this.layer=T;this.cacheSize=oL;this.tileCache=new a1(this.cacheSize,{clearCallback:function(oM){}});this.tileImageDataCache=new a1(this.cacheSize,{clearCallback:function(oM){}})}fm.inherits(hv.BaseClass,"PixelLayer");fm.prototype.isTileLayer=true;hv.extend(fm.prototype,{canPixelMap:function(){if(this.colors&&this.positions){return true}return false},setPixelMap:function(){if(!this.isPixelMap||!this.canPixelMap()){return}var i=this.colors;var e=this.positions;this.pHashcode=u({colors:i,positions:e});this.pixelColorMap=k0.generateColorRamp(i,e)},setDomain:function(e){if(e instanceof Array&&e.length===2){this.domain=e;this.doOnceDraw()}},setClamp:function(e){if(e instanceof Array&&e.length===2){this.clamp=e;this.doOnceDraw()}},setNoData:function(e){this.noData=e;this.doOnceDraw()},setPositions:function(e){this.positions=e;this.setPixelMap();this.doOnceDraw()},setColors:function(e){this.colors=e;this.setPixelMap();this.doOnceDraw()},setFomular:function(e,i){if(e&&i){this.fomularJS=e;this.fomularC=i;this.fHashcode=u({str:this.fomularC});this.doOnceDraw()}},setOpacity:function(e){this.opacity=e;this.doOnceDraw()},setIsPixelMap:function(e){this.isPixelMap=e;this.doOnceDraw()},setMaskPng:function(e){this.maskPng=e;this.loadMaskPng(this.maskPng);this.doOnceDraw()},setMaskData:function(e){this.maskData=e;this.doOnceDraw()},setMaskCoord:function(e){this.maskCoord=e||null;this.calMaskBox();this.doOnceDraw()},setZIndex:function(e){if(this.layer&&parseInt(e)>0){this.layer.setZIndex(e)}},getZIndex:function(){if(this.layer){return this.layer.zIndex}},setUpLevel:function(){if(this.layer){var e=this.layer._getAdjoinZIndex("up");if(this.layer.zIndex!==e){this.layer.setZIndex(e)}}},setDownLevel:function(){if(this.layer){var e=this.layer._getAdjoinZIndex("down");if(this.layer.zIndex!==e){this.layer.setZIndex(e)}}},setZIndexTop:function(){if(this.layer){this.layer.setZIndexTop()}},doOnceDraw:function(){if(this.layer.map){var e=new ix("onupdate");this.layer.map.dispatchEvent(e)}},_getInLayer:function(oR){if(!this.map){return null}var oQ=Math.floor(this.map.getZoom());var T=fA.transformBDmcPoint(oR,this.layer.transform);var oN=fA.getTileCoordForXYAndZ_(T[0],T[1],oQ,false);var C=oN.join("-");var e=this.tileCache.getData(C);if(e){return e}var oK=this.layer.zIndex;var oM=this.map._featureMgr.result.bkData;var oO=oM[oK][2];var oS=null;for(var oL=0;oL<oO.length;oL++){var oN=oO[oL];var oP=oN.tileInfo.zoom+"-"+oN.tileInfo.col+"-"+oN.tileInfo.row;if(C===oP){oS=oN;break}}this.tileCache.setData(C,oS);return oS},_initEvent:function(oK){this.map=oK;var C=this;this._layerMouseEvent=function(oO){if(!C.map){return}var i;var oN=oO.pointMC;var oM=C._getInLayer(oN);if(oM){C.prox=oM;i=new ix("onmousemove");C.map.platform.style.cursor=C.map.config.overlayMoveCursor}else{C.map.platform.style.cursor=C.map.config.defaultCursor;C.prox=null}if(i){i.pointMC=oO.pointMC;i.pixel=oO.pixel;i.latLng=oO.latlng;C.dispatchEvent(i)}};this._layerClickEvent=function(oO){if(!C.map){return}var i;var oN=oO.pointMC;var oM=C.getImagePixel(oN);if(oM){i=new ix(oO.type);i.pointMC=oN;i.pixel=oO.pixel;i.latLng=oO.latlng;i.color=oM;i.value=C.getValue(i.color);C.dispatchEvent(i)}};oK.addEventListener("onmousemove",this._layerMouseEvent);var T=["onclick","dblclick"];for(var e=0;e<T.length;e++){var oL=T[e];oK.addEventListener(oL,this._layerClickEvent)}oK.addEventListener("removetilelayer",function(i){if(i.target&&i.target.ontology){if(i.target.ontology.src===C.src){oK.removeEventListener("onmousemove",C._layerMouseEvent);oK.removeEventListener("onclick",C._layerClickEvent);oK.removeEventListener("ondblclick",C._layerClickEvent);C._clearCache()}}});oK.on("destroy",function(){C._clearCache()})},_clearCache:function(){var e=this;e.prox=null;e.tileCache.clear();e.tileImageDataCache.clear();e.tileMaskUvCache.clear();e._layerMouseEvent=null;e._layerClickEvent=null;e.imageMaskObject=null;e.pHashcode=null;e.pixelColorMap=null;e.layer.ontology=null;e.layer=null},calMaskBox:function(){var C=this.maskCoord||[];if(this.hasMaskPng&&C&&C.length===2){var e=[];for(var T=0;T<C.length;T++){e[T]=fA.transformBDmcPoint(m8.convertLL2MC(C[T]),this.layer.transform)}this.maskBox=e;this.tileMaskUvCache.clear()}else{this.maskBox=null}},buildFillMaskVertex:function(oP,oN,oM){var oO=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];if(!this.maskBox){return oO}var oR=[oP,oN,oM].join("-");var e=this.tileMaskUvCache.getData(oR);if(e){return e}if(this.hasMaskPng){var oU=this.maskBox||[];var oL=[oM,oP,oN];var oQ=fA.getTileRangeExtent(oL);var oK=oU[1][0]-oU[0][0];var C=oU[1][1]-oU[0][1];var oT=(oQ.minX-oU[0][0])/oK;var oS=(oQ.minY-oU[0][1])/C;var T=(oQ.maxX-oU[0][0])/oK;var i=(oQ.maxY-oU[0][1])/C;oO=[oT,oS,T,oS,T,i,oT,oS,T,i,oT,i]}this.tileMaskUvCache.setData(oR,oO);return oO},toString:function(){return"PixelLayer"},loadMaskPng:function(){this._queryList.push({method:"loadMaskPng",arguments:arguments})},_asyncReplay:function(){var C=this._queryList||[];this._queryList=[];for(var e=0;e<C.length;e++){this[C[e].method].apply(this,C[e].arguments)}},getImagePixel:function(){return null},getValue:function(){return null}});function m9(i,e){this.id=i;this.layerName=e;this.properties=null}function gg(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("MVTLayer")}this._opt=e||{};this._layerId=eR();this._opt.defaultOrder=(this._opt.defaultOrder===undefined)?true:this._opt.defaultOrder;this.minZoom=this._opt.minZoom||3;this.maxZoom=this._opt.maxZoom||23;this.useThumb=(this._opt.useThumb===undefined)?true:this._opt.useThumb;this.gridModel=this._opt.gridModel||gg.GridModel.BAIDUWEB;this.noCollision=(this._opt.noCollision===undefined)?true:this._opt.noCollision;if(this.gridModel===gg.GridModel.BAIDUWEB){this._opt.reference="BD09MC"}else{if(!this._opt.transform){this._opt.transform={source:"BD09MC",target:"BD09MC"};this._opt.reference="BD09MC"}else{this._opt.reference=this._opt.transform.source||"GCJ02";if(this._opt.reference==="EPSG3857"){this._opt.reference="WGS84"}}}this.loadModule=false;if(this._opt.useWorker===undefined){this._opt.useWorker=true}this.upStyle=this._opt.useWorker?false:"useMain";this._stateCube={};var i=this;this._implReady=false;this._pendingTile=null;ki.load("mvtParse",function(){i._async()},true);ki.load("layer",function(){i._onImplReady()},true);i.init(this._opt)}gg.GridModel={BAIDUWEB:0,GOOGLEWEB:1};gg.LayerTypes={POINT:"point",LINE:"line",FILL:"fill"};gg.inherits(hv.BaseClass,"MVTLayer");gg.prototype.isTileLayer=true;hv.extend(gg.prototype,{_async:function(){this.loadModule=true;this.mvt=new gg.MVTParse(this._opt);this.resolveStyle(this._opt);if(this.upStyle){this.doOnceDraw()}},init:function(C){var T=c9()?64:256;C.dataType=2;C.cacheSize=Math.max(C.cacheSize||T,16);if(C.spanLevel===undefined||typeof C.spanLevel!=="number"){C.spanLevel=0}if(this.gridModel===gg.GridModel.BAIDUWEB){var i=this.createTileLayer(C);C.spanLevel=0;this.spanLevel=0}else{if(this.gridModel===gg.GridModel.GOOGLEWEB){var i=new ow(C);this.spanLevel=C.spanLevel}}var oL={type:"vector",layerId:this._layerId,g:this.gridModel,mc:this._opt.reference==="BD09MC"?true:false,};this.layerOption=Object.assign(oL,this._opt);if(C.index&&C.index>0){i.zIndex=C.index}var e=this;i.loadTileData=function(){return e._loadTile.apply(e,arguments)};i.ontology=this;this.layer=i;var oK=this;i.addEventListener("ontilesloadstart",function(){oK.dispatchEvent(new ix("ontilesloadstart"))});i.addEventListener("ontilesloadend",function(){oK.dispatchEvent(new ix("ontilesloadend"))})},createTileLayer:function(i){const T=i.tileUrlTemplate||"";const oO=i.xTemplate||function(oV,oX,oW){return oV};const oT=i.yTemplate||function(oV,oX,oW){return oX};const oM=i.zTemplate||function(oV,oX,oW){return oW};const oS=i.bTemplate||function(oV,oY,oX){const oW=m8.tileToBoundRange({col:oV,row:oY,zoom:oX,baseTileSize:256});return oW.MC.sw.lng+","+oW.MC.sw.lat+","+oW.MC.ne.lng+","+oW.MC.ne.lat};var oU=i.extent||[];const oN=i.extentCRSIsWGS84||false;var C=i.minZoom||0;var oQ=i.maxZoom||23;var oR=i.spanLevel||0;var oP=new kT({transparentPng:true,dataType:2,spanLevel:oR,tileTypeName:"web",cacheSize:i.cacheSize||256,customLayer:true,clipTile:false,boundary:false,useThumbData:i.useThumbData||false});if(oU.length===4){if(oN){oU=fA.fromEPSG4326(oU)}var oK=fA.transformPointArr([oU[0],oU[1]],"EPSG3857","BD09MC");var oL=fA.transformPointArr([oU[2],oU[3]],"EPSG3857","BD09MC");oU=[oK[0],oK[1],oL[0],oL[1]]}oP.getTilesUrl=function(o2,oW,o1){if(!o2||oW<0||oW<(C+oR)||oW>(oQ+oR)){oP.tileCache.clear();return null}if(oU.length===4){const o0=m8.tileToBoundRange({col:x,row:y,zoom:z,baseTileSize:256});var o3=e([o0.MC.getMin().lng,o0.MC.getMin().lat,o0.MC.getMax().lng,o0.MC.getMax().lat]);if(!o3){return null}}var oX="";if(T){oX=T;var oZ=/[^\{}]*\{(.*)\}[^\}]*/;oX.match(oZ);var oY=[];if(RegExp.$1){oY=RegExp.$1.split(",")}var oV=oM(o2.x,o2.y,oW);if(!oV){return null}oX=oX.replace(/\{(.*)\}/,oY[(o2.x+o2.y)%oY.length]);oX=oX.replace(/\[x\]/gi,oO(o2.x,o2.y,oW));oX=oX.replace(/\[y\]/gi,oT(o2.x,o2.y,oW));oX=oX.replace(/\[z\]/gi,oM(o2.x,o2.y,oW));oX=oX.replace(/\[b\]/gi,oS(o2.x,o2.y,oW))}else{return null}return oX};function e(oV){if(oU&&oU instanceof Array&&oU.length===4){if((oU[0]<=oV[2]&&oU[1]<=oV[3])&&(oU[2]>=oV[0]&&oU[3]>=oV[1])){return true}else{return false}}return true}return oP},compileExpress:function(i,e){var i=gg.ExpressParse.normalizePropertyExpression(i,e);return i},resolveStyle:function(oL){var T=oL||{};if(T.style){var oK={};if(!T.layers||T.layers.length===0){var oN=gg.LayerTypes.POINT;var i=gg.LayerTypes.LINE;var oM=gg.LayerTypes.FILL;if(T.style[oN]){T.style[oN].type="point"}if(T.style[i]){T.style[i].type="polyline"}if(T.style[oM]){T.style[oM].type="polygon"}}for(var C in T.style){if(T.style.hasOwnProperty(C)){var e=T.style[C];this._styleFormat(e.type,e.painter,C,oK)}}this.styleExpress=oK}},_styleFormat:function(oK,e,i,T){var oM={};var oN=eL[oK];if(!oN){return}for(var C in e){if(e.hasOwnProperty(C)){var oL=this.compileExpress(e[C],oN[C]);oM[C]=oL}}T[i]={type:oK,painter:oM}},evaluateContext:function(e,C,T){var i=e+"_"+C.getId();var oK=this._stateCube[i];if(oK){C.setState(oK)}else{C._state={}}return{properties:function(){return C&&C.getProperties()},featureState:T===true?{}:(C&&C.getState())}},evaluates:function(i,T,oK){if(!this.styleExpress||!this.styleExpress.hasOwnProperty(i)){return null}var oM=this.styleExpress[i].painter;var e={};for(var C in oM){if(oM.hasOwnProperty(C)){var oL=oM[C].evaluate(this.evaluateContext(i,T,oK));e[C]=oL}}return e},_updateState:function(C,T,e){if(C instanceof m9&&C.layerName&&C.id){var i=C.layerName+"_"+C.id;if(e){this._set(T,this._stateCube,i)}else{this._stateCube[i]=T}this._stateCube[i].rank=(this._stateCube[i].rank||0)+1}else{if(typeof C==="string"){if(e){this._set(T,this._stateCube,C)}else{this._stateCube[C]=T}this._stateCube[C].rank=(this._stateCube[C].rank||0)+1}}},updateState:function(oK,oL,e){var C=JSON.stringify(this._stateCube);if(!(oL&&typeof oL==="object"&&Object.keys(oL).length>0)){return}if(!e){this._stateCube={}}if(oK instanceof Array){for(var T=0;T<oK.length;T++){this._updateState(oK[T],oL,e)}}else{this._updateState(oK,oL,e)}var oM=JSON.stringify(this._stateCube);if(C!==oM){this.doOnceDraw()}},replaceAllState:function(e){var i=JSON.stringify(this._stateCube);this._stateCube=e;var C=JSON.stringify(this._stateCube);if(i!==C){this.doOnceDraw()}},getAllState:function(){return this._stateCube},getStateByLayerName:function(){},removeState:function(T){var e=JSON.stringify(this._stateCube);if(T instanceof Array){for(var C=0;C<T.length;C++){if(T[C] instanceof m9&&T[C].layerName){delete this._stateCube[T[C].layerName+"_"+T[C].id]}else{if(typeof T[C]==="string"){delete this._stateCube[T[C]]}}}}else{if(T instanceof m9&&T.layerName){delete this._stateCube[T.layerName+"_"+T.id]}else{if(typeof T==="string"){delete this._stateCube[T]}}}var oK=JSON.stringify(this._stateCube);if(e!==oK){this.doOnceDraw()}},clearState:function(){var e=JSON.stringify(this._stateCube);if(e!=="{}"){this._stateCube={};this.doOnceDraw()}},_set:function(i,oK,C){var T=oK[C]||(oK[C]={});for(var e in i){T[e]=i[e]}},doOnceDraw:function(){if(this.map){var e=new ix("onupdate");this.map.dispatchEvent(e)}},getLayerVisible:function(i){var C=this._opt.style;if(!C||!C[i]){return true}else{if(C[i].visible===false){return false}else{var oK=this._opt.style[i].minZoom||3;var e=this._opt.style[i].maxZoom||23;var T=this.map.getZoom();if(T<oK||T>e){return false}return true}}},_initEvent:function(oM){this.map=oM;if(!this.map.dispatcher){this.map.dispatcher=new eh(kG(),gg)}var oK=this;this.map.dispatcher.broadcast("setLayerStyle",oK.layerOption,function(oO,i){oK.upStyle=true;if(oK.loadModule){oK.doOnceDraw()}});var T=this;var e=false;this._layerMouseEvent=function(oQ){if(!T.map||!T._listeners){return}if(!T._listeners.onmousemove||Object.keys(T._listeners.onmousemove).length===0){return}var i;var oP=oQ.pointMC;var oO=T.pickFeatures(oP,oQ.pixel);if(oO&&oO.length>0){i=new ix("onmousemove");i.value=oO;T.map.platform.style.cursor=T.map.config.overlayMoveCursor;e=true}else{T.map.platform.style.cursor=T.map.config.defaultCursor;if(!e||!T._listeners.onmouseout||Object.keys(T._listeners.onmouseout).length===0){return}i=new ix("onmouseout");e=false}if(i){i.pointMC=oQ.pointMC;i.pixel=oQ.pixel;i.latLng=oQ.latlng;T.dispatchEvent(i)}};this._layerClickEvent=function(oQ){if(!T.map||!T._listeners){return}if((!T._listeners.onclick&&!T._listeners.dblclick)||(Object.keys(T._listeners.onclick).length===0&&Object.keys(T._listeners.dblclick).length===0)){return}var i;var oP=oQ.pointMC;var oO=T.pickFeatures(oP,oQ.pixel);i=new ix(oQ.type);i.pointMC=oP;i.pixel=oQ.pixel;i.latLng=oQ.latlng;i.value=oO;T.dispatchEvent(i)};oM.addEventListener("onmousemove",this._layerMouseEvent);var oL=["onclick","dblclick"];for(var C=0;C<oL.length;C++){var oN=oL[C];oM.addEventListener(oN,this._layerClickEvent)}oM.addEventListener("removetilelayer",function(i){if(i.target&&i.target.ontology){if(i.target.ontology===T){T.layer.tileCache.clear();T.stateCube={};T.upStyle=false;oM.removeEventListener("onmousemove",T._layerMouseEvent);oM.removeEventListener("onclick",T._layerClickEvent);oM.removeEventListener("ondblclick",T._layerClickEvent);if(oM.dispatcher){oM.dispatcher.broadcast("removeLayer",T.layerOption,function(oQ,oO){var oS=oM.tileMgr.tileLayers;var oP=false;for(var oR=0;oR<oS.length;oR++){if(oS[oR].ontology instanceof gg){oP=true;break}}if(!oP&&oM.dispatcher){oM.dispatcher.remove();oM.dispatcher=null}})}}}});oM.on("destroy",function(){if(T.map&&T.map.dispatcher){T.map.dispatcher.remove();T.map.dispatcher=null}T.layer.ontology=null;T.layer=null});this.addEventListener("onmousemove",function(){})},setStyle:function(e){this._opt.style=e;if(!this.map||!this.loadModule){return}this.resolveStyle(this._opt);var i=this;if(this.upStyle===true){this.map.dispatcher.stop();this.map.dispatcher.broadcast("stop",null,function(T,C){i.layerOption=Object.assign(i.layerOption,i._opt);i.map.dispatcher.broadcast("setLayerStyle",i.layerOption,function(oL,oK){i.layer.tileCache.clear();i.doOnceDraw()})})}else{i.layer.tileCache.clear();i.doOnceDraw()}},setZIndex:function(e){if(this.layer&&parseInt(e)>0){this.layer.setZIndex(e)}},getZIndex:function(){if(this.layer){return this.layer.zIndex}},setZIndexTop:function(){if(this.layer){this.layer.setZIndexTop()}},setUpLevel:function(){if(this.layer){var e=this.layer._getAdjoinZIndex("up");if(this.layer.zIndex!==e){this.layer.setZIndex(e)}}},setDownLevel:function(){if(this.layer){var e=this.layer._getAdjoinZIndex("down");if(this.layer.zIndex!==e){this.layer.setZIndex(e)}}},toString:function(){return"MVTLayer"},_loadTile:function(e){this.curViewTilesInfo=e;this._pendingTile=arguments},_onImplReady:function(){this._implReady=true;var e=this._pendingTile;this._pendingTile=null;if(e){this._loadTile.apply(this,e)}},intersectFeatures:function(){return null},pickFeatures:function(){return null}});gg._generateTexture=function(oM,oL,C){var oK=document.createElement("canvas");var e;var T;if(oL.strokeStyle==="dashed"){e=16;T=e*8}else{if(oL.strokeStyle==="dotted"){e=32;T=e*2}}oK.width=e;oK.height=T;var i=oK.getContext("2d");i.fillStyle=oL.strokeColor;i.globalAlpha=oL.strokeOpacity;var oN=oL.strokeWeight*2;if(oL.strokeStyle==="dashed"){oN=gg._drawDashArrayTexture(i,e,T,oL)}else{if(oL.strokeStyle==="dotted"){oN=gg._drawDottedTexture(i,e,T,oL.strokeWeight)}}if(window.createImageBitmap&&!oL.sync){createImageBitmap(oK,{imageOrientation:"flipY"}).then(function(oO){C(null,{totalDashLen:oN,texture:oO,textureSize:[e,T]})})}else{C(null,{totalDashLen:oN,texture:oK.toDataURL(),textureSize:[e,T]})}};gg._drawDashArrayTexture=function(oP,T,oL,C){var oN=C.dashArray;if(!oN){oP.fillRect(0,0,T,oL/2);return C.strokeWeight*4}else{var oO=0;if(oN.length%2!==0){oN=oN.concat(oN)}for(var oK=0;oK<oN.length;oK++){oO+=oN[oK]}var e=0;for(var oK=0;oK<oN.length;oK++){var oM=oN[oK]/oO*oL;if(oK%2===0){oP.fillRect(0,e,T,oM)}e+=oM}return oO}};gg._drawDottedTexture=function(i,e,C,T){i.beginPath();i.arc(e/2,e/2,e/2,0,2*Math.PI);i.fill();i.closePath();return T*2};function fl(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("BaiduVectorLayer")}this._opt=e||{};this._layerId=eR();this.minZoom=this._opt.minZoom||3;this.maxZoom=this._opt.maxZoom||23;this.showLabel=this._opt.showLabel!==false;if(this._opt.displayOptions&&this._opt.displayOptions.poi===false){this.showLabel=false}this._url=this._opt.url||"";this._visible=true;this._workerStyleMap=this._buildWorkerStyleMap(this._opt.styleMap);this._displayOptions=this._opt.displayOptions||null;this.init(this._opt);this._pendingTile=null;var i=this;ki.load("layer",function(){i._asyncReplay()},true)}fl.inherits(hv.BaseClass,"BaiduVectorLayer");fl.prototype.isTileLayer=true;hv.extend(fl.prototype,{init:function(oL){var C=c9()?64:256;var oM=Math.max(oL.cacheSize||C,16);var oK=oL.spanLevel||0;var i=new kT({transparentPng:true,dataType:2,spanLevel:oK,tileTypeName:"na",cacheSize:oM,customLayer:true,clipTile:false,boundary:false,opacity:typeof oL.opacity==="number"?oL.opacity:1,useThumbData:oL.useThumbData||false,thumbUpsample:oL.thumbUpsample||false});if(oL.zIndex){i.zIndex=oL.zIndex}i.showLabel=this.showLabel;var e=this;i.loadTileData=function(){return e._loadTile.apply(e,arguments)};i.ontology=this;this.layer=i;var T=this;i.addEventListener("ontilesloadstart",function(){T.dispatchEvent(new ix("ontilesloadstart"))});i.addEventListener("ontilesloadend",function(){T.dispatchEvent(new ix("ontilesloadend"))})},_buildWorkerStyleMap:function(oM){if(!oM){return null}function oL(oO,oP){var oQ=[0,255,0,255];if(typeof oO==="string"&&oO.charAt(0)==="#"){var oR=oO.substring(1);if(oR.length===3){oR=oR.charAt(0)+oR.charAt(0)+oR.charAt(1)+oR.charAt(1)+oR.charAt(2)+oR.charAt(2)}oQ=[parseInt(oR.substring(0,2),16),parseInt(oR.substring(2,4),16),parseInt(oR.substring(4,6),16),255]}else{if(oO instanceof Array){oQ=[oO[0]||0,oO[1]||0,oO[2]||0,oO.length>3?oO[3]:255]}}if(typeof oP==="number"){oQ[3]=Math.round(Math.max(0,Math.min(1,oP))*255)}return oQ}var e={};var T=false;for(var i in oM){if(!oM.hasOwnProperty(i)){continue}var C=oM[i]||{};var oK=typeof C.strokeWeight==="number"?C.strokeWeight:2;var oN=typeof C.borderWeight==="number"?C.borderWeight:0;e[i]={borderCap:1,borderRgba:oL(C.borderColor||[0,0,0,255]),borderTexture:"",borderTextureType:null,borderWidth:oN*2,fillCap:0,fillRgba:oL(C.strokeColor,C.strokeOpacity),fillTexture:"",fillTextureType:null,fillWidth:oK*2,haveArrow:null,haveBorderLine:oN>0?1:0,haveBorderTexture:0,haveFillTexture:0,isRealWidth:null,isUseBorderRgba:1,isUseFillRgba:1};T=true}return T?e:null},show:function(){this._visible=true;if(this.layer){this.layer.show&&this.layer.show()}},hide:function(){this._visible=false;if(this.layer){this.layer.hide&&this.layer.hide()}},setOpacity:function(e){if(this.layer){this.layer.setOpacity&&this.layer.setOpacity(e)}},getOpacity:function(){if(this.layer){return this.layer.getOpacity?this.layer.getOpacity():1}return 1},destroy:function(){if(this.layer){if(this.layer.processDataTimer){clearTimeout(this.layer.processDataTimer);this.layer.processDataTimer=null}this.layer.callbackDataQueue=[];var e=this.layer.map;if(e){e.removeTileLayer(this)}this.layer.ontology=null;this.layer.loadTileData=null;this.layer=null}},_loadTile:function(){this._pendingTile=arguments},_asyncReplay:function(){var e=this._pendingTile;this._pendingTile=null;if(e){this._loadTile.apply(this,e)}}});var ai=function(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("BaiduLayer")}var i=i||{};this.inputCRS=i.inputCRS||"EPSG3857";this.outCRS=i.outCRS||"EPSG3857";this.minZoom=i.minZoom||3;this.maxZoom=i.maxZoom||19;this.retry=i.retry||false;this.retryTime=i.retryTime||600;this.useThumbData=i.useThumbData||true;this.lastZoom=3;this.cacheSize=i.cacheSize||128;this.tileType=lA.getInstance("web");this._mapCenter={};this._featureMgr=[[],[],[]];this._gridRefs={row:{},col:{}};this.tileCache=new a1(this.cacheSize,{clearCallback:function(C){}});this._queryList=[];var e=this;ki.load("layer",function(){e._asyncReplay()},true)};ai.inherits(eX,"BaiduLayer");hv.extend(ai.prototype,{clearData:function(){this._featureMgr=[[],[],[]]},clearRefs:function(){this._gridRefs={row:{},col:{}}},destroy:function(){this.tileCache.clear();this.clearData();this.clearRefs();this._mapCenter={}},fetch:function(){this._queryList.push({method:"fetch",arguments:arguments})},_asyncReplay:function(){var C=this._queryList||[];this._queryList=[];for(var e=0;e<C.length;e++){this[C[e].method].apply(this,C[e].arguments)}}});function fw(T,C){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("CustomHtmlLayer")}bw.call(this,C);if(!c2(T)){throw new Error("createDOM鍙傛暟绫诲瀷閿欒锛岃妫�鏌ユ槸鍚︿负Function")}var e=C||{};this.config={};this.config.enableMassClear=false;this.config.minZoom=e.minZoom||3;this.config.maxZoom=e.maxZoom||21;this.config.zIndex=e.zIndex||0;this.config.nextTick=e.nextTick||false;this.config.offsetX=e.offsetX||0;this.config.offsetY=e.offsetY||0;this.config.fixBottom=e.fixBottom||false;this.config.anchors=e.anchors||[0.5,1];this.config.coordinate=e.coordinate||"BD09";this.config.enableDraggingMap=e.enableDraggingMap||false;this.config.visible=e.visible===undefined?true:!!e.visible;this.config.useTranslate=e.useTranslate||false;this.sliceRepeat=e.sliceRepeat||false;this.displayType=e.displayType||"normal";this.clusterAnimation=e.clusterAnimation||{};this.clusterWait=null;this.clusterStatus=0;this.createDOM=T;this.data=e.data||null;this.overlaysList=[];this.retainOverlays=[];this._eventList={};this._queryList=[];var i=this;ki.load("layer",function(){i._asyncReplay()},true)}fw.inherits(eX,"CustomHtmlLayer");fw.prototype.isCustomHtmlLayer=true;hv.extend(fw.prototype,{initialize:function(i){this.map=i;this.addToMap();this.initEvent(i);var e=this;this.map.on("destory",function(){e._distory()})},initEvent:function(){if(!this.overlaysList||!this.map){return}this._overlayEvent()},setStyleOptions:function(e){e=e||{};Object.assign(this.config,e);this.updateData(this.data)},addEventListener:function(e,i){if(!this._eventList[e]){this._eventList[e]=[i]}else{this._eventList[e].push(i)}this._overlayEvent()},_overlayEvent:function(){if(!this.overlaysList||!this.map){return}var oO=this.overlaysList;var e=this.overlaysList.length;var oN=Object.keys(this._eventList);for(var oM=0;oM<oN.length;oM++){var T=oN[oM];var oL=this._eventList[T];for(var oK=0;oK<oL.length;oK++){for(var C=0;C<e;C++){oO[C].addEventListener(T,oL[oK])}}}if(this.sliceRepeat&&this.retainOverlays.length>0){this.overlaysList=this.overlaysList.concat(this.retainOverlays);this.retainOverlays=[]}},show:function(){this.config.visible=true;this.updateData(this.data)},hide:function(){this.config.visible=false;this.updateData(this.data)},addToMap:function(){if(!this.overlaysList||!this.map){return}var e=this.overlaysList.length;var T=this.overlaysList;if(e>0){for(var C=0;C<e;C++){this.map.addOverlay(T[C])}}},clearData:function(){this.removeAllOverlays();this.data=null},updateData:function(e){this.removeAllOverlays();this.data=null;this.setData(e)},removeLayer:function(C){if(!(C instanceof fw)||!this.map){return}var T=C.overlaysList;for(var e=0;e<T.length;e++){this.map.removeOverlay(T[e])}this._distory(C)},removeAllOverlays:function(){if(!this.map||!this.overlaysList){return}var C=this.overlaysList;for(var e=0;e<C.length;e++){this.map.removeOverlay(C[e])}this.overlaysList=[]},removeOverlay:function(C){if(!this.map||!(this.overlaysList)||this.overlaysList.length<=0){return}var e=this.overlaysList.length;var oK=this.overlaysList;if(typeof C==="string"){for(var T=0;T<e;T++){if(oK[T].id===C){this.map.removeOverlay(oK[T]);oK.splice(T,1)}}}else{if(C instanceof bw){for(var T=0;T<e;T++){if(C===oK[T]){this.map.removeOverlay(C);this.overlaysList.splice(T,1);return}}}}},_distory:function(){var C=this.overlaysList;for(var e=0;e<C.length;e++){C[e].div=null}this.overlaysList=[];this.createDOM=null;this.config=null;this.data=null},getCustomOverlays:function(){return this.overlaysList},toString:function(){return"CustomHtmlLayer"},setData:function(){this._queryList.push({method:"setData",arguments:arguments})},_asyncReplay:function(){var C=this._queryList||[];this._queryList=[];for(var e=0;e<C.length;e++){this[C[e].method].apply(this,C[e].arguments)}}});function l2(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("ParkingSpot")}bw.call(this,i);var i=i||{};this.options={};this.options.callback=i.callback?i.callback:null;this._auth=false;this._remove=false;this.currentFloor=i.floor||1;this.currentFloorName="B1";this.currentFloorKV=[];this.currentFloorStr="";this.currentUid="";this.currentCityId=0;this.floorsCache=[];this.spotFillCache=[];this.spotFillLayer;this.spotFillData=[];this.spotOutFillLayer;this.spotOutFillData=[];this.cusInLabelUids=[];this.cusInBubbleUids=[];this.cusOutLabelUids=[];this.cusOutBubbleUids=[];this.labels=[];this.labelDatas=[];this.outLabels=[];this.outLabelDatas=[];this.bubbleDatas=[];this.jixieDatas=[];this.indoorUids;this.outdoorUids;this.indoorChange=true;this.cityChange=true;this._queryList=[];var e=this;ki.load("layer",function(){e._asyncReplay()},true)}l2.inherits(eX,"ParkingSpot");hv.extend(l2.prototype,{initialize:function(e){this.map=e;this.map.parking=this;this._verify()},removeParkingSpot:function(){if(this.spotFillLayer){this.map._removeNormalLayer(this.spotFillLayer);this.spotFillLayer=null;this.spotFillData=[]}if(this.spotOutFillLayer){this.map._removeNormalLayer(this.spotOutFillLayer);this.spotOutFillLayer=null;this.spotOutFillData=[]}if(this.cusOutLabelUids){this.map.removeLabelsFromMapTile(this.cusOutLabelUids);this.cusOutLabelUids=[]}if(this.cusOutBubbleUids){this.map.removeLabelsFromMapTile(this.cusOutBubbleUids);this.cusOutBubbleUids=[]}if(this.cusInLabelUids){this.map.removeLabelsFromMapTile(this.cusInLabelUids);this.cusInLabelUids=[]}if(this.cusInBubbleUids){this.map.removeLabelsFromMapTile(this.cusInBubbleUids);this.cusInBubbleUids=[]}this.spotFillCache=[];this.floorsCache=[];this._remove=true},hideLayer:function(e){if(e==="indoor"&&this.spotFillLayer){var i=this._parseParkingData([]);this.spotFillLayer.setData(i)}else{if(e==="outdoor"&&this.spotOutFillLayer){var i=this._parseParkingData([]);this.spotOutFillLayer.setData(i)}}},hideLabel:function(){if(this.cusInLabelUids){this.map.removeLabelsFromMapTile(this.cusInLabelUids)}if(this.cusInBubbleUids){this.map.removeLabelsFromMapTile(this.cusInBubbleUids)}},showLayer:function(e){if(e==="indoor"&&this.spotFillLayer){var i=this._parseParkingData([]);this.spotFillLayer.setData(i)}else{if(e==="outdoor"&&this.spotOutFillLayer){}}},searchParkingRoute:function(C,e,i){if(!this.auth){return}},toString:function(){return"ParkingSpot"},_verify:function(){this._queryList.push({method:"_verify",arguments:arguments})},_asyncReplay:function(){var C=this._queryList||[];this._queryList=[];for(var e=0;e<C.length;e++){this[C[e].method].apply(this,C[e].arguments)}}});function dQ(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("NormalLayer")}e=e||{};this.visible=(e.visible===undefined?true:!!e.visible);this.minZoom=e.minZoom||3;this.maxZoom=e.maxZoom||21;this.opacity=isNaN(Number(e.opacity))?1:Math.max(0,Math.min(1,Number(e.opacity)));this.zIndex=e.zIndex||1;this.enablePicked=e.enablePicked||false;this.supportMouseStyleChange=(e.mouseStyleChange===undefined?true:!!e.mouseStyleChange);this.autoSelect=e.autoSelect||false;this.popEvent=e.popEvent===undefined?true:!!e.popEvent;this.autoUpdate=false;this.pickWidth=e.pickWidth||30;this.pickHeight=e.pickHeight||30;this.center=e.referCenter||null;this.isTop=e.isTop||false;this.isLowText=e.isLowText||false;this.guid=cv.getGUID("normal_layer_")}dQ.inherits(eX,"NormalLayer");dQ.prototype.isNormalLayer=true;hv.extend(dQ.prototype,{onInit:function(T,oK){if(this.zIndex>0){this.adjustZIndex(T);T._normalLayerMgr.sortLayer()}else{var e=T._featureMgr.result.bkData;this.zIndex=e.length||1}var C={tileTypeName:this.getType?this.getType():"custom",dataType:this.toString(),ontology:this};T._featureMgr.createLayer(this.zIndex,C);this.map=T;this.gl=oK;this.onAdd(T,oK);var i=this;T.on("destroy",function(){i.onDestroy()})},adjustZIndex:function(i){if(i&&i._featureMgr){var e=i._featureMgr.result.bkData;while(e[this.zIndex]){this.zIndex+=1}}},_getAdjoinZIndex:function(oK){var C=this.zIndex;if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;if(oK==="up"){for(var T=this.zIndex+1;T<e.length;T++){if(e[T]){C=T+1;break}}}else{for(var T=this.zIndex-1;T>0;T--){if(e[T]){C=T;break}}}}return C},setTargetZIndex:function(e){this.zIndex=e;if(this.map){this.map._normalLayerMgr.sortLayer()}},setZIndex:function(oN){oN=Math.abs(Math.floor(oN))||1;if(!oN||oN===this.zIndex){return}var oK=this.map._featureMgr.result.bkData;var T=this.map.tileMgr.tileLayers;var oP=this.map._normalLayerMgr.layers;function oQ(oV){var oT=null;var oU=[T,oP];for(var oR=0;oR<oU.length;oR++){for(var oS=0;oS<oU[oR].length;oS++){if(oU[oR][oS].zIndex===oV){oT=oU[oR][oS];break}}if(oT){break}}return oT}var C=[];var oM=[];var oO=this.zIndex;var i=oQ(oN);if(oK[oN]&&i){C.push(i);oM.push(oK[oN]);this.setTargetZIndex(oN);oK[oN]=oK[oO];oK[oO]=null}else{this.setTargetZIndex(oN);oK[oN]=oK[oO];oK[oO]=null;this.doOnceDraw();return}var oL=oN+1;while(oL){var e=oQ(oL);if(oK[oL]&&e){C.push(e);oM.push(oK[oL]);C.shift().setTargetZIndex(oL);oK[oL]=oM.shift();oL+=1}else{C.shift().setTargetZIndex(oL);oK[oL]=oM.shift();oL=0}}this.doOnceDraw()},setRefCenter:function(e){if(e instanceof d9){this.center=e;this.parseData&&this.parseData(e)}},getRefCenter:function(){return this.center},setTop:function(e){this.isTop=!!e;this.doOnceDraw()},setLowText:function(e){this.isLowText=!!e;this.doOnceDraw()},setOpacity:function(e){if(isNaN(Number(e))){return}this.opacity=Math.max(0,Math.min(1,Number(e)));this.doOnceDraw()},getOpacity:function(){return this.opacity},setZIndexTop:function(){var e=this.map._featureMgr.result.bkData;e[e.length]=e[this.zIndex];e[this.zIndex]=null;this.setTargetZIndex(e.length-1);this.doOnceDraw()},setUpLevel:function(){var e=this._getAdjoinZIndex("up");if(this.zIndex!==e){this.setZIndex(e)}},setDownLevel:function(){var e=this._getAdjoinZIndex("down");if(this.zIndex!==e){this.setZIndex(e)}},onAdd:function(e,i){throw new Error("鐢ㄦ埛鏈疄鐜皁nAdd鏂规硶")},preRender:function(i,e){},rgbToIndex:function(oK){var oN=oK.length/4;var T=Math.floor(oN/2);const C=function(oP){return oK[oP]+oK[oP+1]*256+oK[oP+2]*65536-1};for(var oM=0;;oM++){var oL=T+oM;var oO=T-oM;if(oL===oO){var e=C(oL*4);if(e>-1){return e}continue}if(oL<oN){var e=C(oL*4);if(e>-1){return e}}if(oO>=0){var e=C(oO*4);if(e>-1){return e}}if(oL>=oN&&oO<0){break}}return -1},testEvent:function(e){if(this.autoSelect){return true}if(this.enablePicked&&(this.supportMouseStyleChange||(e!=="onmousemove"&&!this.supportMouseStyleChange))){return true}return false},pick:function(oN,oM,T){var C=this.gl;var oO=this.map.config.ratio;this.map._normalLayerMgr.saveFramebuffer();this.map._normalLayerMgr.bindFramebuffer(this.map._normalLayerMgr.pickFBO);this.map._normalLayerMgr.clear();this.map._webglPainter._camera._updatePolyLayerMatrix(this.center);var i=this.map._webglPainter._camera._modelViewMatrixLayer;var oL=gc.create(Float64Array);gc.multiply(oL,this.map._webglPainter.projMatrix,i);this.render(C,oL,{isPickRender:true});var e=new Uint8Array(4*this.pickWidth*this.pickHeight);C.readPixels(oN*oO-Math.floor(this.pickWidth/2),C.canvas.height-oM*oO-Math.floor(this.pickHeight/2),this.pickWidth,this.pickHeight,C.RGBA,C.UNSIGNED_BYTE,e);var oK=this.rgbToIndex(e);if(this.getPickedItem){var oP=this.getPickedItem(oK,T)}this.map._normalLayerMgr.restoreFramebuffer();return oP},render:function(C,e,i){throw new Error("鐢ㄦ埛鏈疄鐜皉ender鏂规硶")},afterRender:function(i,e){},onDestroy:function(e,i){},onHide:function(e,i){},onShow:function(e,i){},doOnceDraw:function(){if(this.map){var e=new ix("onupdate");this.map.dispatchEvent(e)}},doRender:function(){if(!this.map){return false}var e=this.map.getZoom();if(this.visible){if(e>=this.minZoom&&e<=this.maxZoom){if(!this._status){this.onShow(this.map,this.gl);this._status=1}return true}}if(this._status){this.onHide(this.map,this.gl);this._status=0}return false},getZIndex:function(){if(this.zIndex===undefined){throw new Error("鍥惧眰鏈坊鍔犲埌鍦板浘")}return this.zIndex},getVisible:function(){return this.visible},setVisible:function(e){this.visible=e;this.doOnceDraw()},getMinZoom:function(){return this.minZoom},setMinZoom:function(e){if(e<=this.maxZoom){this.minZoom=e}},getMaxZoom:function(){return this.maxZoom},setMaxZoom:function(e){if(e>=this.minZoom){this.maxZoom=e}},dispatcher:function(oK,T,C){var i=new ix(C);i.pixel=oK.pixel;i.latLng=oK.latlng;i.value=T;this.dispatchEvent(i)},hasEvent:function(e){if(this.enablePicked){if(e.substr(0,2)!=="on"){e+="on"}if(this._listeners&&this._listeners[e]&&Object.keys(this._listeners[e]).length>0){return true}return false}return false},toString:function(){return"normal"}});function jZ(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("ThreeLayer")}i=i||{};const e={alpha:false,antialias:false};this.options=Object.assign({},e,i);if(!window.THREE){throw new Error("ThreeLayer requires THREE")}this._unsetlist=[];this._added=false;this._implReady=false;this._inited=false;dQ.call(this,this.options);var C=this;ki.load("visualold",function(){C._onImplReady()},true)}jZ.inherits(dQ,"ThreeLayer");hv.extend(jZ.prototype,{triggerRepaint:function(){this.needsUpdate=true;this.animate()},triggerStop:function(){this.needsUpdate=false},animate:function(){if(this.needsUpdate){this.doOnceDraw()}else{return}var e=this;this.frameTimer=requestAnimationFrame(function(){e.animate()})},refreshMap:function(){if(this.map){this.doOnceDraw()}},convertLngLat:function(e){this.customCoords.setCenter(this.center);const i=this.customCoords.lngLatsToCoords([e]);return i[0]},add:function(e){if(!this.scene){this._unsetlist.push(e);return}this.scene.add(e);this.refreshMap()},remove:function(e){if(!this.scene){var C=this._unsetlist.indexOf(e);if(C>=0){this._unsetlist.splice(C,1)}return}this.scene.remove(e);this.refreshMap()},getScene:function(){return this.scene},getCamera:function(){return this.camera},getRender:function(){return this.renderer},getMap:function(){if(this.map){return this.map}return null},onAdd:function(i,e){this.map=i;this.gl=e;this.customCoords=i.toFormatCoords;this._added=true;this._tryInit()},_onImplReady:function(){this._implReady=true;this._tryInit()},_tryInit:function(){if(this._implReady&&this._added&&!this._inited&&this._initImpl){this._inited=true;this._initImpl(this.gl)}},preRender:function(){},afterRender:function(){},render:function(){},onDestroy:function(){},onHide:function(){},onShow:function(){},pick:function(){return null}});function f8(e){e=e||{};dQ.call(this,e);this.base_opt={idKey:"id",crs:"BD09LL",isFlat:true,drawPart:1,selectedIndex:-1,selectedColor:"rgba(20, 20, 200, 1.0)",enableChangeSelectIndexByPick:true,};this.setBaseOptions(e);this.loadModule=false;this._stateCube={};this.def=[];this.DEL_COUNT=20;this.delIndexs=[];var i=this;ki.load("visualold",function(){i._async()},true);this.select_color=this.getColorStyleForGL(this.base_opt.selectedColor);var C=new Int8Array(4);this.int32View=new Int32Array(C.buffer,0,1);this.float32View=new Float32Array(C.buffer,0,1)}f8.inherits(dQ,"FeatureLayer");hv.extend(f8.prototype,{_async:function(){this.loadModule=true;this.resolveStyle();this.parseData()},compileExpress:function(i,e){var i=gg.ExpressParse.normalizePropertyExpression(i,e);return i},resolveStyle:function(){if(!gg.ExpressParse){return}var e=this.style_opt||{};var T=eL[this.type];if(this._appendStyle){T=JSON.parse(JSON.stringify(T));Object.assign(T,this._appendStyle)}if(e&&this.type&&T){var C={};for(var i in e){var oL=T[i];if(e.hasOwnProperty(i)&&oL!==undefined){var oK=this.compileExpress(e[i],oL);C[i]=oK}}this.styleExpress=C}},_updateState:function(C,i,e){if(e){this._set(i,this._stateCube,C)}else{this._stateCube[C]=i}},_set:function(i,oK,C){var T=oK[C]||(oK[C]={});for(var e in i){T[e]=i[e]}},updateState:function(oK,oL,e){var C=JSON.stringify(this._stateCube);if(!(oL&&typeof oL==="object"&&Object.keys(oL).length>0)){return}if(!e){this._stateCube={}}if(oK instanceof Array){for(var T=0;T<oK.length;T++){this._updateState(oK[T],oL,e)}}else{this._updateState(oK,oL,e)}var oM=JSON.stringify(this._stateCube);if(C!==oM){this.parseData()}if(this.attach){this.attach.updateState(oK,oL,e)}},replaceAllState:function(e){var i=JSON.stringify(this._stateCube);this._stateCube=e;var C=JSON.stringify(this._stateCube);if(i!==C){this.parseData()}},getAllState:function(){return this._stateCube},removeState:function(T){var e=JSON.stringify(this._stateCube);if(T instanceof Array){for(var C=0;C<T.length;C++){delete this._stateCube[T[C]]}}else{delete this._stateCube[T]}var oK=JSON.stringify(this._stateCube);if(e!==oK){this.parseData()}},clearState:function(){var e=JSON.stringify(this._stateCube);if(e!=="{}"){this._stateCube={};this.parseData()}},getType:function(){return"feature"},setData:function(C,oK){if(C.length<=0){return}this.params=oK=oK||{};this.data=C;this.delIndexs=[];this._stateCube={};if(oK.changeCenter&&C&&C.features&&C.features[0]){var e=C.features[0];var oL=null;if(e.geometry&&e.geometry.type==="Point"){oL=e.geometry.coordinates}if(e.geometry&&e.geometry.type==="LineString"){var T=e.geometry.coordinates[0];if(T instanceof Array){oL=T}}if(e.geometry&&(e.geometry.type==="MultiLineString"||e.geometry.type==="Polygon")){var i=e.geometry.coordinates[0];if(i&&i[0] instanceof Array){oL=i[0]}}if(oL){if(this.base_opt.crs==="BD09LL"){this.center=new d9(oL[0],oL[1])}else{oL=fU.transform(oL,this.base_opt.crs,fU.BD09LL);this.center=new d9(oL[0],oL[1])}}}this.parseData&&this.parseData(this.center)},getData:function(){return this.data},clearData:function(){this.data=null;this.buffer=null;if(this.attach){this.attach.clearData()}this.doOnceDraw()},addDelIndex:function(C){if(this.delIndexs.length>=this.DEL_COUNT){new Error("瓒呭嚭"+this.DEL_COUNT+"涓檺鍒�")}var e=false;for(var T=0;T<this.delIndexs.length;T++){if(this.delIndexs[T]===C){e=true;break}}if(!e){this.delIndexs.push(C);this.doOnceDraw()}if(this.attach){this.attach.addDelIndex(C)}},removeDelIndex:function(e){for(var C=0;C<this.delIndexs.length;C++){if(this.delIndexs[C]===e){this.delIndexs.splice(C,1);this.doOnceDraw();break}}if(this.attach){this.attach.removeDelIndex(e)}},clearDelIndex:function(){this.delIndexs=[];this.doOnceDraw();if(this.attach){this.attach.clearDelIndex()}},setBaseOptions:function(i){i=i||{};var e=Object.assign({},this.getBaseOptions());Object.assign(this.base_opt,i);this.onOptionsChanged&&this.onOptionsChanged(this.getBaseOptions(),e);if(i.data){this.setData(i.data);delete i.data}},setStyleOptions:function(i){i=i||{};var e=Object.assign({},this.getStyleOptions());Object.assign(this.style_opt,i);this.onOptionsChanged&&this.onOptionsChanged(this.getStyleOptions(),e);if(i.data){this.setData(i.data);delete i.data}else{if(i.autoRender!==false){this.resolveStyle();this.parseData()}}},getBaseOptions:function(){var e=this.base_opt||{};switch(cv.coordType){case 2:this.base_opt.crs="GCJ02";break;case 5:this.base_opt.crs="WGS84";break;default:this.base_opt.crs="BD09LL";break}return e},getStyleOptions:function(){return this.style_opt||{}},getProperty:function(e,T,C){if(Object.prototype.toString.call(T)==="[object Function]"){return T(C)}else{var i=C[e]||T;if("properties" in C&&e in C.properties){i=C.properties[e]}return i}},getPickedItem:function(i,e){if(this.autoSelect){if(e==="onmousemove"){this.selectedIndex=i}else{this.selectedIndex=-1}}if(e==="onclick"&&this.enablePicked&&this.base_opt.enableChangeSelectIndexByPick){this.selectedIndex=i}var C=this.dataset?this.dataset.normal:[];return{dataIndex:i,dataItem:C[i]}},getColorStyleForGL:function(T,e,C){var i=k0.formatColorCssToRgbaArray(T,e,C);return i},drawLinearTexture:function(C){if(!C||!(C instanceof Array)){return null}var T=document.createElement("canvas");T.width=Math.pow(2,9);T.height=2;var e=T.getContext("2d");var oL=e.createLinearGradient(0,0,T.width,0);for(var oK=0;oK<C.length;oK++){oL.addColorStop(C[oK][0],C[oK][1])}e.fillStyle=oL;e.fillRect(0,0,T.width,T.height);return T},onDestroy:function(){this.data=null;this.params={};this._stateCube={};this.delIndexs.length=0},toString:function(){return"FeatureLayer"},parseData:function(){}});function c3(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("LineLayer")}i=i||{};this.type="polyline";var C=K.uiVersionIsGL()?"rgba(25, 25, 250, 1)":fq().strokeColor;var e=K.uiVersionIsGL()?"rgba(27, 142, 236, 1)":fq().strokeColor;this.style_opt={sequence:false,marginLength:16,traceControl:null,traceColor:[],traceDisappear:false,traceStart:true,linksLine:false,strokeColorControl:null,verticesValueControl:null,arrowColor:"rgba(255, 255, 255, 1)",strokeColor:C,strokeWeight:2,borderCovered:true,borderColor:e,borderWeight:0,borderMask:true,strokeOpacity:1,strokeLineJoin:"round",strokeLineCap:"square",strokeTextureUrl:"",strokeTextureWidth:16,strokeTextureHeight:16,strokeStyle:"solid",dashArray:[8,4],height:0,strokeDisappear:false,};this._appendStyle={height:{format:"number",defaultValue:0},};this.setStyleOptions(i.style||{});this._bufferArray=[];this._texture={};this._length={};this.linearTexture=null;i.isLinear=i.isLinear===undefined?false:i.isLinear;i.linearTexture=i.linearTexture===undefined?null:i.linearTexture;i.nodeShow=i.nodeShow===undefined?false:i.nodeShow;i.linkLine=i.linkLine===undefined?true:i.linkLine;i.nodeMask=i.nodeMask===undefined?false:i.nodeMask;i.nodeStrict=i.nodeStrict===undefined?false:i.nodeStrict;i.nodeJoin=i.nodeJoin===undefined?5:i.nodeJoin;i.nodeBreakpoint=i.nodeBreakpoint===undefined?false:i.nodeBreakpoint;i.nodeMiddleShow=i.nodeMiddleShow===undefined?false:i.nodeMiddleShow;i.nodeMinZoom=(!i.nodeMinZoom||i.nodeMinZoom<3||i.nodeMinZoom>25)?6:i.nodeMinZoom;this.arrow_color=this.getColorStyleForGL(this.style_opt.arrowColor,null,false);f8.call(this,i);if(i.nodeShow){var oK=JSON.parse(JSON.stringify(i));oK=Object.assign(oK,{enablePicked:false,autoSelect:false,coorSysMc:true});this.attachNode=new bD(oK)}if(i.nodeStrict){var T=this;ki.load("mvtParse",function(){T.parseData()},true)}}c3.Segment={START_POINT:1,END_POINT:2,BREAK_POINT:3,MIDDLE_POINT:4,1:1,2:2,3:3,4:4};c3.inherits(f8,"LineLayer");hv.extend(c3.prototype,{onAdd:function(C,T){if(this.attachNode){this.attachNode.onAdd(C,T)}if(!this.map){this.map=C;this.gl=T}if(this.base_opt.isLinear&&this.base_opt.linearTexture){var i=this.drawLinearTexture(this.base_opt.linearTexture);if(i instanceof HTMLCanvasElement||(window.ImageBitmap&&textureName instanceof window.ImageBitmap)){if(!this.linearTexture){var e=fV.utils.createTexture(T,i,{flipY:false,wrap:T.CLAMP_TO_EDGE,mipmap:true,unpackAlpha:true});this.linearTexture=e}}}if(!this.buffer){this.parseData()}},preRender:function(C,i,e){},onDestroy:function(e,i){this.lines=null;this.buffer=null;this._bufferArray=[];this._texture={};f8.prototype.onDestroy.call(this);if(this.attachNode){this.attachNode.onDestroy()}},toString:function(){return"LineLayer"},render:function(){}});function f7(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("FillLayer")}i=i||{};this.type="polygon";var e=K.uiVersionIsGL()?"#142655":fq().fillColor;this.style_opt={fillColor:e,fillOpacity:1,pattern:false,patternMask:true,patternUrl:"",patternMapping:"0, 0, 32, 32",patternScale:1,patternOffset:"0, 0",height:0};this._appendStyle={height:{format:"number",defaultValue:0},};this.setStyleOptions(i.style||{});this._bufferArray=[];this._texture=null;f8.call(this,i);i.border=i.border===undefined?true:i.border;if(i.border){var C=JSON.parse(JSON.stringify(i));C=Object.assign(C,{enablePicked:false,autoSelect:false});this.attach=new c3(C)}}f7.inherits(f8,"FillLayer");hv.extend(f7.prototype,{onAdd:function(e,i){if(this.attach){this.attach.onAdd(e,i)}if(!this.map){this.map=e;this.gl=i}if(!this.buffer){this.parseData()}},preRender:function(C,i,e){},onDestroy:function(e,i){this.fills=null;this.buffer=null;this._bufferArray=[];this._texture=null;f8.prototype.onDestroy.call(this);if(this.attach){this.attach.onDestroy()}},toString:function(){return"FillLayer"},render:function(){}});function bD(i){i=i||{};this.type="point";var e=K.uiVersionIsGL()?{color:"green",strokeColor:"red"}:{color:fq().fillColor,strokeColor:fq().strokeColor};this.style_opt={visibility:true,nodeType:bD.NodeType.SHAPE,shapeType:bD.ShapeType.TRIANGLE,anchor:bD.Anchor.CENTER,size:32,scale:1,rotation:0,offset:[0,0],color:e.color,opacity:1,strokeColor:e.strokeColor,strokeWeight:0};this.setStyleOptions(i.style||{});this._bufferArray=[];i.isFlat=i.isFlat===undefined?true:i.isFlat;f8.call(this,i);kU.sendMessage("PointShapeLayer")}bD.Anchor={CENTER:0,TOP_LEFT:1,TOP_CENTER:2,TOP_RIGHT:3,RIGHT_CENTER:4,BOTTOM_RIGHT:5,BOTTOM_CENTER:6,BOTTOM_LEFT:7,LEFT_CENTER:8,0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8};bD.NodeType={ICON:1,SHAPE:2};bD.ShapeType={CIRCLE:0,SQUARE:1,TRIANGLE:2,DIAMOND:3,CROSS:4,ARROW:5,ARROW_TAIL:6,STAR:7,WATERDROP:9,0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,9:9};bD.inherits(f8,"PointShapeLayer");bD.hasMask=function(e){if(e===bD.ShapeType.TRIANGLE||e===bD.ShapeType.ARROW){return true}else{return false}};hv.extend(bD.prototype,{onAdd:function(e,i){if(!this.map){this.map=e;this.gl=i}if(!this.buffer){this.parseData()}},preRender:function(C,i,e){},onDestroy:function(e,i){this.buffer=null;this._bufferArray=[];f8.prototype.onDestroy.call(this)},toString:function(){return"PointShapeLayer"},render:function(){}});function i3(e){e=e||{};this.type="point";this.style_opt={visibility:true,nodeType:i3.NodeType.ICON,icon:"",iconObj:null,userSizes:true,anchors:[0,0],sizes:[32,32],scale:1,rotation:0,offset:[0,0],opacity:1,width:0,height:0,};this._appendStyle={anchors:{format:"object",defaultValue:[0,0]},sizes:{format:"object",defaultValue:[32,32]},width:{format:"number",defaultValue:32},height:{format:"number",defaultValue:32},};this.setStyleOptions(e.style||{});this._bufferArray=[];e.isFlat=e.isFlat===undefined?true:e.isFlat;e.isFixed=e.isFixed===undefined?true:e.isFixed;e.refLevel=e.refLevel===undefined?18:e.refLevel;f8.call(this,e);kU.sendMessage("PointIconLayer")}i3.NodeType={ICON:1,SHAPE:2};i3.inherits(f8,"PointIconLayer");hv.extend(i3.prototype,{onAdd:function(i,C){if(!this.map){this.map=i;this.gl=C}if(!this.buffer){this.parseData()}var e=this;i.addEventListener("oniconupdate",function(T){e.updateVertex()})},preRender:function(C,i,e){},onDestroy:function(e,i){this.buffer=null;this._bufferArray=[];f8.prototype.onDestroy.call(this)},toString:function(){return"PointIconLayer"},updateVertex:function(){},render:function(){}});function ku(e){this.gl=e;this.cache={};this.currentProgram=null}ku.get=function(e,i){if(!e._visualProgramCache||e._visualProgramCache.gl!==i){e._visualProgramCache=new ku(i)}return e._visualProgramCache};ku._hash=function(T){var C=5381;for(var e=0;e<T.length;e++){C=((C<<5)+C+T.charCodeAt(e))|0}return C>>>0};ku._withLineNumbers=function(oK){var e=String(oK).split("\n");var T=String(e.length).length;for(var C=0;C<e.length;C++){var oL=String(C+1);while(oL.length<T){oL=" "+oL}e[C]=oL+" | "+e[C]}return e.join("\n")};hv.extend(ku.prototype,{acquire:function(e,T){var i=ku._hash(e+"\u0000"+T);var C=this.cache[i];if(C&&(C.vsSource!==e||C.fsSource!==T)){C=null;i=null}if(C){C.refCount++;return C}C=this._create(e,T,i);if(i!==null&&!C.error){this.cache[i]=C}return C},release:function(e){if(!e){return}e.refCount--;if(e.refCount>0){return}if(e.program){this.gl.deleteProgram(e.program);e.program=null}if(e.key!==null&&this.cache[e.key]===e){delete this.cache[e.key]}if(this.currentProgram===e){this.currentProgram=null}},use:function(e){if(!e||!e.program){return false}this.gl.useProgram(e.program);this.currentProgram=e;return true},_compileShader:function(i,T){var oK=this.gl;var C=oK.createShader(i);oK.shaderSource(C,T);oK.compileShader(C);if(!oK.getShaderParameter(C,oK.COMPILE_STATUS)){var e=oK.getShaderInfoLog(C);oK.deleteShader(C);return{error:e}}return{shader:C}},_create:function(oK,e,oO){var oL=this.gl;var oN={key:oO,vsSource:oK,fsSource:e,program:null,attributes:{},attributeInfo:{},uniforms:{},uniformInfo:{},numAttributes:0,refCount:1,error:null};var oP=this._compileShader(oL.VERTEX_SHADER,oK);var oM=this._compileShader(oL.FRAGMENT_SHADER,e);if(oP.error||oM.error){var i=oP.error?"vertexShader":"fragmentShader";var C=oP.error||oM.error;oP.shader&&oL.deleteShader(oP.shader);oM.shader&&oL.deleteShader(oM.shader);oN.error={type:"compile",message:i+" 缂栬瘧澶辫触: "+C,source:oP.error?oK:e};console.error("[BMap] VisualProgram "+oN.error.message+"\n"+ku._withLineNumbers(oN.error.source));return oN}var T=oL.createProgram();oL.attachShader(T,oP.shader);oL.attachShader(T,oM.shader);oL.linkProgram(T);oL.deleteShader(oP.shader);oL.deleteShader(oM.shader);if(!oL.getProgramParameter(T,oL.LINK_STATUS)){oN.error={type:"link",message:"閾炬帴澶辫触: "+oL.getProgramInfoLog(T),source:oK+"\n// ---- fragment ----\n"+e};oL.deleteProgram(T);console.error("[BMap] VisualProgram "+oN.error.message);return oN}oN.program=T;this._reflect(oN);return oN},_reflect:function(oR){var oL=this.gl;var oK=oR.program;var oO=oL.getProgramParameter(oK,oL.ACTIVE_ATTRIBUTES);oR.numAttributes=oO;for(var T=0;T<oO;T++){var oP=oL.getActiveAttrib(oK,T);var oN=oL.getAttribLocation(oK,oP.name);oR.attributes[oP.name]=oN;oR.attributeInfo[oP.name]={location:oN,type:oP.type,components:ku.componentsOf(oL,oP.type)}}var C=oL.getProgramParameter(oK,oL.ACTIVE_UNIFORMS);for(var oS=0;oS<C;oS++){var oM=oL.getActiveUniform(oK,oS);var e=oM.name.replace(/\[0\]$/,"");var oQ=oL.getUniformLocation(oK,oM.name);oR.uniforms[e]=oQ;oR.uniformInfo[e]={location:oQ,type:oM.type,size:oM.size,isArray:oM.name!==e||oM.size>1}}}});ku.componentsOf=function(i,e){switch(e){case i.FLOAT_VEC2:case i.INT_VEC2:case i.BOOL_VEC2:return 2;case i.FLOAT_VEC3:case i.INT_VEC3:case i.BOOL_VEC3:return 3;case i.FLOAT_VEC4:case i.INT_VEC4:case i.BOOL_VEC4:return 4;case i.FLOAT_MAT2:return 4;case i.FLOAT_MAT3:return 9;case i.FLOAT_MAT4:return 16;default:return 1}};function h7(){}hv.extend(h7,{normalize:function(oP,oN){oN=oN||"id";var oK=this._toFeatureArray(oP);var C=[];for(var T=0;T<oK.length;T++){var oL=oK[T];var oO=oL&&oL.geometry?oL.geometry:oL;if(!oO||!oO.type||!oO.coordinates){continue}var oM=oL.properties||{};var e=oL.id!==undefined?oL.id:(oM[oN]!==undefined?oM[oN]:T);C.push({type:oO.type,coordinates:oO.coordinates,properties:oM,id:e})}return C},_toFeatureArray:function(e){if(!e){return[]}if(e instanceof Array){return e}if(e.type==="FeatureCollection"){return e.features||[]}if(e.type==="Feature"){return[e]}if(e.type&&e.coordinates){return[{geometry:e,properties:{}}]}return[]},extractPoints:function(e,oL){oL=oL||"count";var oP=[];var oN=[];for(var T=0;T<e.length;T++){var oK=e[T];var oM=[];if(oK.type==="Point"){oM=[oK.coordinates]}else{if(oK.type==="MultiPoint"){oM=oK.coordinates}else{continue}}var oO=oK.properties&&oK.properties[oL]!=null?Number(oK.properties[oL]):1;if(isNaN(oO)){oO=1}for(var C=0;C<oM.length;C++){oP.push(oM[C]);oN.push(oO)}}return{points:oP,weights:oN}},toLineStrings:function(oK){var T=oK.type;var oM=oK.coordinates;if(T==="LineString"){return[oM]}if(T==="MultiLineString"){return oM}if(T==="Polygon"){return oM}if(T==="MultiPolygon"){var oL=[];for(var C=0;C<oM.length;C++){for(var e=0;e<oM[C].length;e++){oL.push(oM[C][e])}}return oL}return[]},toPolygons:function(i){var e=i.type;var C=i.coordinates;if(e==="Polygon"){return[C]}if(e==="MultiPolygon"){return C}return[]}});function kn(e){this.map=e;this.gl=null;this.layers=[];this._preFramebuffer=null;this.pickFBO=null}cv.register(function(i){if(i._renderType!=="webgl"){return}var e=i._visualMgr=new kn(i);i._addVisualLayer=function(C){e.addLayer(C)};i._removeVisualLayer=function(C){e.removeLayer(C)};i.on("glmoduleloaded",function(){e.gl=i._webglPainter.gl;e.pickFBO=e.createFramebuffer();for(var C=0;C<e.layers.length;C++){e._initLayer(e.layers[C])}i.dispatchEvent(new ix("onupdate"))});i.addEventListener("update",function(oK){if(!oK.changedStatus||!oK.changedStatus.onsize_changed||!e.gl){return}e._destroyPickFBO();var C=e.map.getSize();var T=e.map.config.ratio;e.pickFBO=e.createFramebuffer(Math.round(C.width*T),Math.round(C.height*T))});i.on("destroy",function(){e.removeAllLayers();e._destroyPickFBO();i._addVisualLayer=null;i._removeVisualLayer=null;e._preFramebuffer=null;e.gl=null;i._visualMgr=null})});hv.extend(kn.prototype,{addLayer:function(e){if(!e||!e.isWebGLLayer){console.warn("[BMap] addVisualLayer: 闇�瑕� WebGLLayer 瀹炰緥");return}if(this.layers.indexOf(e)>-1){return}e.map=this.map;this.layers.push(e);this.sortLayer();if(e.enablePicked){aD.ensure(this.map)}if(this.gl){this._initLayer(e)}this.map.dispatchEvent(new ix("onupdate"))},removeLayer:function(i){var e=this.layers.indexOf(i);if(e===-1){return}this.layers.splice(e,1);i.onDestroy&&i.onDestroy(this.map,this.gl);this.map.dispatchEvent(new ix("onupdate"))},removeAllLayers:function(){for(var e=0;e<this.layers.length;e++){this.layers[e].onDestroy&&this.layers[e].onDestroy(this.map,this.gl)}this.layers=[]},_initLayer:function(e){e._onAttached(this.map,this.gl)},sortLayer:function(){this.layers.sort(function(i,e){return i.zIndex-e.zIndex})},saveFramebuffer:function(){var e=this.gl;this._preFramebuffer=e.getParameter(e.FRAMEBUFFER_BINDING)},bindFramebuffer:function(e){var i=this.gl;i.bindFramebuffer(i.FRAMEBUFFER,e||null)},clear:function(e){var i=this.gl;if(e instanceof Array){i.clearColor(e[0],e[1],e[2],e[3])}else{i.clearColor(0,0,0,0)}i.clear(i.COLOR_BUFFER_BIT)},restoreFramebuffer:function(){var i=this.gl;if(this.map&&this.map._webglPainter){var e=this.map._webglPainter.background||[255,255,255,255];i.clearColor(e[0]/255,e[1]/255,e[2]/255,e[3]/255)}i.bindFramebuffer(i.FRAMEBUFFER,this._preFramebuffer)},createFramebuffer:function(C,e){var oL=this.gl;C=C||oL.canvas.width;e=e||oL.canvas.height;var oK=oL.createFramebuffer();var T=oL.createTexture();oL.bindTexture(oL.TEXTURE_2D,T);oL.texImage2D(oL.TEXTURE_2D,0,oL.RGBA,C,e,0,oL.RGBA,oL.UNSIGNED_BYTE,null);oL.texParameteri(oL.TEXTURE_2D,oL.TEXTURE_MAG_FILTER,oL.LINEAR);oL.texParameteri(oL.TEXTURE_2D,oL.TEXTURE_MIN_FILTER,oL.LINEAR);oL.texParameteri(oL.TEXTURE_2D,oL.TEXTURE_WRAP_S,oL.CLAMP_TO_EDGE);oL.texParameteri(oL.TEXTURE_2D,oL.TEXTURE_WRAP_T,oL.CLAMP_TO_EDGE);oK.texture=T;oL.bindFramebuffer(oL.FRAMEBUFFER,oK);oL.framebufferTexture2D(oL.FRAMEBUFFER,oL.COLOR_ATTACHMENT0,oL.TEXTURE_2D,T,0);var i=oL.checkFramebufferStatus(oL.FRAMEBUFFER);oL.bindFramebuffer(oL.FRAMEBUFFER,null);oL.bindTexture(oL.TEXTURE_2D,null);if(oL.FRAMEBUFFER_COMPLETE!==i){console.warn("[BMap] VisualManager framebuffer incomplete: "+i);return null}return oK},_destroyPickFBO:function(){if(!this.pickFBO||!this.gl){this.pickFBO=null;return}var e=this.gl;e.deleteTexture(this.pickFBO.texture);e.deleteFramebuffer(this.pickFBO);this.pickFBO=null}});function aD(e){this.map=e;this.throttle=30;this._bound=false;this._lastMoveTime=0;this._hoverTarget=null;this._hoverItem=null;this._cursorOwned=false}aD.MAX_CANDIDATES=8;aD.ensure=function(i){if(!i||i._renderType!=="webgl"){return null}if(i._visualPicker){return i._visualPicker}var e=i._visualPicker=new aD(i);e.bind();i.on("destroy",function(){e.unbind();e.map=null;i._visualPicker=null});return e};hv.extend(aD.prototype,{bind:function(){var i=this.map;if(this._bound||!i){return}var e=this;this._onMouseMove=function(T){var C=Date.now();if(C-e._lastMoveTime<e.throttle){return}e._lastMoveTime=C;e._handleMove(T)};this._onMouseOut=function(C){e._clearHover(C)};this._onClick=function(C){e._handleClick("onclick",C)};this._onDblClick=function(C){e._handleClick("ondblclick",C)};this._onRightClick=function(C){e._handleClick("onrightclick",C)};i.addEventListener("onmousemove",this._onMouseMove);i.addEventListener("onmouseout",this._onMouseOut);i.addEventListener("onclick",this._onClick);i.addEventListener("ondblclick",this._onDblClick);i.addEventListener("onrightclick",this._onRightClick);this._bound=true},unbind:function(){var e=this.map;if(!this._bound||!e){return}e.removeEventListener("onmousemove",this._onMouseMove);e.removeEventListener("onmouseout",this._onMouseOut);e.removeEventListener("onclick",this._onClick);e.removeEventListener("ondblclick",this._onDblClick);e.removeEventListener("onrightclick",this._onRightClick);this._resetCursor();this._hoverTarget=null;this._hoverItem=null;this._bound=false},_handleMove:function(oK){var T=this.pick(oK.x,oK.y);var C=this._hoverTarget;var i=this._hoverItem;if(!T){if(C){this._hoverTarget=null;this._hoverItem=null;this._dispatch(C,"onmouseout",oK,i)}this._resetCursor();return}this._hoverTarget=T.target;this._hoverItem=T.item;this._applyCursor(T.target);if(C!==T.target||i!==T.item){if(C){this._dispatch(C,"onmouseout",oK,i)}this._dispatch(T.target,"onmouseover",oK,T.item)}this._dispatch(T.target,"onmousemove",oK,T.item)},_handleClick:function(oK,oL){var C=this.pickAll(oL.x,oL.y);for(var T=0;T<C.length;T++){this._dispatch(C[T].target,oK,oL,C[T].item)}},_clearHover:function(T){var C=this._hoverTarget;var i=this._hoverItem;this._hoverTarget=null;this._hoverItem=null;this._resetCursor();if(C){this._dispatch(C,"onmouseout",T,i)}},dropTarget:function(e){if(this._hoverTarget!==e){return}this._hoverTarget=null;this._hoverItem=null;this._resetCursor()},_dispatch:function(oL,C,oK,T){if(!oL){return}if(oL.dispatchPickEvent){oL.dispatchPickEvent(C,oK,T);return}var i=new ix(C);i.pixel=oK.pixel;i.point=oK.latlng;i.value=T;i.domEvent=oK.domEvent;oL.dispatchEvent(i)},_applyCursor:function(i){var e=this.map;if(!e||!e.platform){return}if(i&&i.supportMouseStyleChange===false){this._resetCursor();return}var C=e.config.overlayMoveCursor;if(e.platform.style.cursor!==C){e.platform.style.cursor=C}this._cursorOwned=true},_resetCursor:function(){var e=this.map;if(!this._cursorOwned||!e||!e.platform){return}this._cursorOwned=false;var i=e.config.defaultCursor;if(e.platform.style.cursor!==i){e.platform.style.cursor=i}},_collectTargets:function(){var oN=this.map&&this.map._visualMgr;var T=[];if(!oN||!oN.gl||!oN.pickFBO||!oN.layers.length){return T}for(var oL=0;oL<oN.layers.length;oL++){var oK=oN.layers[oL];var e=oK.getPickTargets?oK.getPickTargets():[oK];if(!e||!e.length){continue}for(var C=0;C<e.length;C++){var oM=e[C];if(oM&&oM.pickable&&oM.pickable()&&oM.resolvePickIndex){T.push(oM)}}}return T},pick:function(i,C){var e=this.pickAll(i,C,true);return e.length?e[0]:null},pickAll:function(e,oO,oL){var T=[];var C=this._collectTargets();if(!C.length){return T}for(var oK=C.length-1;oK>=0;oK--){var oN=C[oK];var oM=this._pickTarget(oN,e,oO);if(!oM){continue}T.push({target:oN,item:oM});if(oL||!oN.pickThrough){break}}return T},_pickTarget:function(oL,oO,oM){var e=this.map;var oQ=e&&e._visualMgr;var oN=e&&e._webglPainter;if(!oQ||!oQ.gl||!oQ.pickFBO||!oN||!oN.drawVisualPickPass){return null}var T=oQ.gl;var oK=null;oQ.saveFramebuffer();oQ.bindFramebuffer(oQ.pickFBO);oQ.clear();try{if(oN.drawVisualPickPass([oL])){var oP=oL.pickTolerance==null?4:oL.pickTolerance;oK=this._readCandidates(T,oO,oM,oP)}}finally{oQ.restoreFramebuffer()}if(!oK||!oK.length){return null}for(var C=0;C<oK.length;C++){var oR=oL.resolvePickIndex(oK[C],oO,oM);if(oR){return oR}}return null},_readCandidates:function(o3,oQ,oP,oX){var e=this.map.config.ratio||1;var oL=o3.canvas.width;var oS=o3.canvas.height;var o2=Math.max(0,Math.round(oX*e));var oW=Math.round(oQ*e);var oU=oS-1-Math.round(oP*e);var o7=Math.max(0,oW-o2);var oK=Math.max(0,oU-o2);var o6=Math.min(oL-1,oW+o2);var T=Math.min(oS-1,oU+o2);var oR=o6-o7+1;var o4=T-oK+1;if(oR<=0||o4<=0){return[]}var oY=this._ensureBuffer(oR*o4*4);o3.readPixels(o7,oK,oR,o4,o3.RGBA,o3.UNSIGNED_BYTE,oY);var pb=oW-o7;var C=oU-oK;var i={};var oT=[];for(var oO=0;oO<o4;oO++){for(var oM=0;oM<oR;oM++){var o1=(oO*oR+oM)*4;var oV=oY[o1];var o5=oY[o1+1];var o8=oY[o1+2];if(!oV&&!o5&&!o8){continue}var oN=oV+o5*256+o8*65536-1;var o9=oM-pb;var o0=oO-C;var pa=o9*o9+o0*o0;var oZ=i[oN];if(oZ===undefined){i[oN]=pa;oT.push(oN)}else{if(pa<oZ){i[oN]=pa}}}}oT.sort(function(pd,pc){return i[pd]-i[pc]});return oT.length>aD.MAX_CANDIDATES?oT.slice(0,aD.MAX_CANDIDATES):oT},_ensureBuffer:function(e){if(!this._pixelBuffer||this._pixelBuffer.length<e){this._pixelBuffer=new Uint8Array(e)}return this._pixelBuffer}});function bS(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("WebGLLayer")}e=e||{};this.visible=e.visible===undefined?true:!!e.visible;this.opacity=isNaN(Number(e.opacity))?1:Math.max(0,Math.min(1,Number(e.opacity)));this.zIndex=e.zIndex||1;this.minZoom=e.minZoom||3;this.maxZoom=e.maxZoom||21;this.center=e.referCenter||null;this.renderStage=bS._normalizeStage(e.renderStage);this.guid=cv.getGUID("visual_layer_");this._added=false;this._inited=false;this._implReady=false;this._status=0;this._mvp=null;var i=this;ki.load("visual",function(){i._onImplReady()},true)}bS.inherits(eX,"WebGLLayer");bS.prototype.isWebGLLayer=true;bS.RENDER_STAGES=["basemap","tilelayer","overlay","building","poi"];bS.DEFAULT_RENDER_STAGE="tilelayer";bS._normalizeStage=function(e){if(!e){return bS.DEFAULT_RENDER_STAGE}if(bS.RENDER_STAGES.indexOf(e)===-1){console.warn("[BMap] renderStage 鍙栧�奸潪娉�: "+e+"锛屽彲閫夊�� "+bS.RENDER_STAGES.join(" / "));return bS.DEFAULT_RENDER_STAGE}return e};hv.extend(bS.prototype,{addTo:function(e){if(e&&typeof e.addLayer==="function"){e.addLayer(this)}else{console.warn("[BMap] addTo: map 鏈氨缁�")}return this},remove:function(){if(this.map&&typeof this.map.removeLayer==="function"){this.map.removeLayer(this)}return this},setVisible:function(e){this.visible=!!e;this.triggerRepaint()},getVisible:function(){return this.visible},setOpacity:function(e){if(isNaN(Number(e))){return}this.opacity=Math.max(0,Math.min(1,Number(e)));this.triggerRepaint()},getOpacity:function(){return this.opacity},setZIndex:function(e){this.zIndex=Math.abs(Math.floor(e))||1;if(this.map&&this.map._visualMgr){this.map._visualMgr.sortLayer()}this.triggerRepaint()},getZIndex:function(){return this.zIndex},setRenderStage:function(e){this.renderStage=bS._normalizeStage(e);this.triggerRepaint()},getRenderStage:function(){return this.renderStage},setRefCenter:function(e){this.center=e;this._rebuild&&this._rebuild();this.triggerRepaint()},getRefCenter:function(){return this.center},getMap:function(){return this.map||null},getMVPMatrix:function(){return this._mvp},triggerRepaint:function(){if(this.map){this.map.dispatchEvent(new ix("onupdate"));if(this.map._webglMapScene&&this.map._webglMapScene.startRenderThread){this.map._webglMapScene.startRenderThread()}}},onAdd:function(e,i){},preRender:function(i,e){},render:function(i,e){},afterRender:function(i,e){},onShow:function(e,i){},onHide:function(e,i){},onDestroy:function(e,i){},_onImplReady:function(){this._implReady=true;this._tryInit()},_onAttached:function(e,i){this.map=e;this.gl=i;this._added=true;this._tryInit()},_tryInit:function(){if(this._implReady&&this._added&&!this._inited&&this.gl){this.onAdd(this.map,this.gl);this._initGL&&this._initGL();this._inited=true;this.triggerRepaint()}},_inZoomRange:function(){if(!this.map){return false}var e=this.map.getZoom();var i=e>=this.minZoom&&e<=this.maxZoom;if(this.visible&&i){if(!this._status){this.onShow(this.map,this.gl);this._status=1}return true}if(this._status){this.onHide(this.map,this.gl);this._status=0}return false},toString:function(){return"WebGLLayer"}});function nJ(e){e=e||{};bS.call(this,e);this._style={blend:e.blend||"default"};this._data=e.data||null;this._features=null;this._buffers=[];this._idKey=e.idKey||"id";this.enablePicked=e.enablePicked===undefined?false:!!e.enablePicked;this.supportMouseStyleChange=e.mouseStyleChange===undefined?true:!!e.mouseStyleChange;this.pickTolerance=e.pickTolerance==null?4:e.pickTolerance;this.pickThrough=e.pickThrough===undefined?false:!!e.pickThrough}nJ.inherits(bS,"FeatureVisualLayer");nJ.INSTANCE_SETTERS={opacity:"setOpacity",visible:"setVisible",zIndex:"setZIndex",referCenter:"setRefCenter",renderStage:"setRenderStage",enablePicked:"setEnablePicked"};hv.extend(nJ.prototype,{setData:function(e){this._data=e;if(this._inited){this._rebuild();this.triggerRepaint()}return this},getData:function(){return this._data},clearData:function(){this._data=null;this._features=null;if(this._inited){this._destroyBuffers(this._buffers);this._buffers=[];this.triggerRepaint()}return this},_warnOnce:function(e,i){this._optWarned=this._optWarned||{};if(!this._optWarned[e]){this._optWarned[e]=true;console.warn(i)}},setOptions:function(i){i=i||{};for(var e in i){if(!i.hasOwnProperty(e)){continue}if(this._style.hasOwnProperty(e)){this._style[e]=i[e]}else{if(nJ.INSTANCE_SETTERS[e]){this[nJ.INSTANCE_SETTERS[e]](i[e])}else{if(e==="minZoom"||e==="maxZoom"){this[e]=Number(i[e])}else{this._warnOnce("unknown_"+e,"[BMap] "+this.toString()+": 鏈煡閫夐」 "+e+"锛屽凡蹇界暐")}}}}this._onOptionsChanged&&this._onOptionsChanged(i);this.triggerRepaint();return this},getOptions:function(){return this._style},_buildGeometry:function(e){},_draw:function(i,e){},setEnablePicked:function(e){this.enablePicked=!!e;if(!this.enablePicked&&this.map&&this.map._visualPicker){this.map._visualPicker.dropTarget(this)}if(this.enablePicked&&this.map){aD.ensure(this.map)}return this},getEnablePicked:function(){return this.enablePicked},pickable:function(){if(!this.enablePicked||!this.visible||!this.map||!this._inited){return false}var e=this.map.getZoom();return e>=this.minZoom&&e<=this.maxZoom&&this._hasPickData()},getPickTargets:function(){return[this]},_hasPickData:function(){return !!(this._buffers&&this._buffers.length)},resolvePickIndex:null,toString:function(){return"FeatureVisualLayer"}});function bp(e){this.layer=e;this.map=null;this.gl=null;this._gl=null;this._state=null;this._program=null;this._uniforms={};this._attributes={};this._vertices=null;this._indices=null;this._textures={};this._textureUnits=0;this._drawSpec=null;this._bound=false;this._enabledLocations=[];this._warned={}}hv.extend(bp.prototype,{toString:function(){return"CustomRenderContext"}});function L(e){e=e||{};if(!e.vertexShader||!e.fragmentShader){throw new Error("WebGLCustomLayer 闇�瑕� vertexShader 涓� fragmentShader")}bS.call(this,e);L._checkOptions(e);this._vs=e.vertexShader;this._fs=e.fragmentShader;this._unsafeGL=!!e.unsafeGL;this._onReadyCb=e.onReady;this._onRenderCb=e.onRender;this._onDestroyCb=e.onDestroy;this._onErrorCb=e.onError;this._readyStatus="pending";this._animating=!!e.animation;this._addTime=Date.now();this._spec={uniforms:hv.extend({},e.uniforms||{}),attributes:hv.extend({},e.attributes||{}),textures:hv.extend({},e.textures||{}),vertices:e.vertices||null,indices:e.indices||null,draw:e.draw||null};this._renderState=L._normalizeRenderState(e.renderState);this._ctx=new bp(this)}L.inherits(bS,"WebGLCustomLayer");L.OPTION_KEYS=["vertexShader","fragmentShader","attributes","vertices","indices","uniforms","textures","draw","renderState","animation","unsafeGL","onReady","onRender","onDestroy","onError","visible","opacity","zIndex","minZoom","maxZoom","referCenter","renderStage"];L._checkOptions=function(i){for(var e in i){if(i.hasOwnProperty(e)&&L.OPTION_KEYS.indexOf(e)===-1){console.warn('[BMap] WebGLCustomLayer: 鏈煡閫夐」 "'+e+'"锛屽凡蹇界暐銆傚彲鐢ㄩ�夐」瑙� '+L.OPTION_KEYS.join(" / "))}}};L._normalizeRenderState=function(e){e=e||{};return{depthTest:!!e.depthTest,depthWrite:!!e.depthWrite,depthFunc:e.depthFunc||null,blend:e.blend===undefined?"normal":e.blend,cullFace:e.cullFace||"none",frontFace:e.frontFace||null}};L.DEFAULT_BASE_MC=[12069475.280738307,3929271.1724863998];hv.extend(L.prototype,{_getBaseMC:function(){if(this.center){var i=m8.convertLL2MC(this.center);return[i.lng,i.lat]}var e=this.map&&this.map._normalLayerMgr;if(e&&e.base){return[e.base.lng,e.base.lat]}return L.DEFAULT_BASE_MC},projectToLayer:function(oL){if(!oL||!oL.length){return oL}var oK=this._getBaseMC();if(typeof oL[0]==="number"){var oM=m8.convertLL2MC(new d9(oL[0],oL[1]));return[oM.lng-oK[0],oM.lat-oK[1]]}var e=[];for(var C=0;C<oL.length;C++){var T=m8.convertLL2MC(new d9(oL[C][0],oL[C][1]));e.push([T.lng-oK[0],T.lat-oK[1]])}return e},unprojectFromLayer:function(oM){if(!oM||!oM.length){return oM}var oK=this._getBaseMC();if(typeof oM[0]==="number"){var oL=m8.convertMC2LL(new d9(oM[0]+oK[0],oM[1]+oK[1]));return[oL.lng,oL.lat]}var e=[];for(var C=0;C<oM.length;C++){var T=m8.convertMC2LL(new d9(oM[C][0]+oK[0],oM[C][1]+oK[1]));e.push([T.lng,T.lat])}return e},convertLngLat:function(e){return this.projectToLayer(e)},convertLngLats:function(e){return this.projectToLayer(e)},getStatus:function(){return this._readyStatus},getTime:function(){return(Date.now()-this._addTime)/1000},getContext:function(){return this._ctx},setUniforms:function(e){hv.extend(this._spec.uniforms,e);if(this._inited){this._ctx.setUniforms(e)}this.triggerRepaint();return this},setUniform:function(e,i){var C={};C[e]=i;return this.setUniforms(C)},setAttributes:function(e){hv.extend(this._spec.attributes,e);if(this._inited){this._ctx.setAttributes(e)}this.triggerRepaint();return this},setAttribute:function(i,e){var C={};C[i]=e;return this.setAttributes(C)},setVertices:function(e){this._spec.vertices=e;if(this._inited){this._ctx.setVertices(e)}this.triggerRepaint();return this},setIndices:function(e){this._spec.indices=e;if(this._inited){this._ctx.setIndices(e)}this.triggerRepaint();return this},setTextures:function(e){hv.extend(this._spec.textures,e);if(this._inited){this._ctx.setTextures(e)}this.triggerRepaint();return this},setTexture:function(e,C,i){this._spec.textures[e]=i?hv.extend({source:C},i):C;if(this._inited){this._ctx.setTexture(e,C,i)}this.triggerRepaint();return this},setDraw:function(e){this._spec.draw=e;if(this._inited){this._ctx.setDraw(e)}this.triggerRepaint();return this},setRenderState:function(e){this._renderState=L._normalizeRenderState(hv.extend(hv.extend({},this._renderState),e||{}));this.triggerRepaint();return this},getRenderState:function(){return this._renderState},setShaders:function(i,e){if(!i||!e){console.warn("[BMap] WebGLCustomLayer.setShaders 闇�瑕佷袱娈垫簮鐮�");return this}this._vs=i;this._fs=e;this._readyStatus="pending";if(this._inited&&this._reloadProgram){this._reloadProgram()}this.triggerRepaint();return this},startAnimation:function(){this._animating=true;this.triggerRepaint();return this},stopAnimation:function(){this._animating=false;return this},isAnimating:function(){return !!this._animating},_emitError:function(e){e.layer=this;if(e.type==="compile"||e.type==="link"){this._readyStatus="error"}else{console.warn("[BMap] WebGLCustomLayer: "+e.message)}if(typeof this._onErrorCb==="function"){this._onErrorCb.call(this,e)}},toString:function(){return"WebGLCustomLayer"}});function ca(e){e=e||{};if(!window.THREE){throw new Error("ThreejsLayer 闇�瑕佸叏灞� THREE锛岃鍏堝紩鍏� three.js")}bS.call(this,e);ca._checkOptions(e);this.options=hv.extend({alpha:true,antialias:false},e);this.renderer=null;this.scene=null;this.camera=null;this._unsetList=[];this._readyStatus="pending";this._animating=!!e.animation;this._addTime=Date.now()}ca.inherits(bS,"ThreejsLayer");ca.OPTION_KEYS=["alpha","antialias","animation","onInit","preRender","onRender","afterRender","onDestroy","onError","visible","opacity","zIndex","minZoom","maxZoom","referCenter","renderStage"];ca._checkOptions=function(i){for(var e in i){if(i.hasOwnProperty(e)&&ca.OPTION_KEYS.indexOf(e)===-1){console.warn('[BMap] ThreejsLayer: 鏈煡閫夐」 "'+e+'"锛屽凡蹇界暐銆傚彲鐢ㄩ�夐」瑙� '+ca.OPTION_KEYS.join(" / "))}}};hv.extend(ca.prototype,{add:function(e){if(!e){return this}if(!this.scene){this._unsetList.push(e);return this}this.scene.add(e);this.triggerRepaint();return this},removeObject:function(e){if(this.scene&&e){this.scene.remove(e);this.triggerRepaint()}else{if(e){var C=this._unsetList.indexOf(e);if(C>-1){this._unsetList.splice(C,1)}}}return this},getScene:function(){return this.scene},getCamera:function(){return this.camera},getRenderer:function(){return this.renderer},getStatus:function(){return this._readyStatus},getTime:function(){return(Date.now()-this._addTime)/1000},projectToLayer:function(oL){if(!oL||!oL.length){return oL}var oK=this._getBaseMC();if(typeof oL[0]==="number"){var oM=m8.convertLL2MC(new d9(oL[0],oL[1]));return[oM.lng-oK[0],oM.lat-oK[1]]}var e=[];for(var C=0;C<oL.length;C++){var T=m8.convertLL2MC(new d9(oL[C][0],oL[C][1]));e.push([T.lng-oK[0],T.lat-oK[1]])}return e},_getBaseMC:function(){if(this.center){var i=m8.convertLL2MC(this.center);return[i.lng,i.lat]}var e=this.map&&this.map._normalLayerMgr;if(e&&e.base){return[e.base.lng,e.base.lat]}return[12069475.280738307,3929271.1724863998]},convertLngLat:function(e){return this.projectToLayer(e)},startAnimation:function(){this._animating=true;this.triggerRepaint();return this},stopAnimation:function(){this._animating=false;return this},isAnimating:function(){return !!this._animating},_emitError:function(e){e.layer=this;this._readyStatus="error";console.error("[BMap] ThreejsLayer: "+e.message);if(typeof this.options.onError==="function"){this.options.onError.call(this,e)}},toString:function(){return"ThreejsLayer"}});function ex(e){e=e||{};if(!window.deck||!window.deck.Deck){throw new Error("DeckglLayer 闇�瑕佸叏灞� deck锛岃鍏堝紩鍏� deck.gl")}bS.call(this,e);this._props=hv.extend({},e);this._deck=null;this._readyStatus="pending";this._animating=!!e.animation;this._addTime=Date.now();this._renderFails=0;this._errorReported=false}ex.inherits(bS,"DeckglLayer");ex.WORLD_TILE_SIZE=512;ex.MAX_RENDER_FAILS=30;ex.OWN_PROPS={animation:1,onInit:1,onDestroy:1,onError:1,visible:1,opacity:1,zIndex:1,minZoom:1,maxZoom:1,referCenter:1,renderStage:1,_customRender:1};hv.extend(ex.prototype,{setProps:function(e){this._props=hv.extend(this._props||{},e||{});if(this._deck){this._deck.setProps(e)}this.triggerRepaint();return this},getDeck:function(){return this._deck},getStatus:function(){return this._readyStatus},getTime:function(){return(Date.now()-this._addTime)/1000},startAnimation:function(){this._animating=true;this.triggerRepaint();return this},stopAnimation:function(){this._animating=false;return this},isAnimating:function(){return !!this._animating},_emitError:function(e,i){e.layer=this;if(i){this._readyStatus="error"}if(!this._errorReported){this._errorReported=true;console.error("[BMap] DeckglLayer: "+e.message)}if(typeof this._props.onError==="function"){this._props.onError.call(this,e)}},toString:function(){return"DeckglLayer"}});function gZ(e){e=e||{};nJ.call(this,e);var i=K.uiVersionIsGL()?"rgba(25, 25, 250, 1)":fq().strokeColor;this._style.strokeColor=e.strokeColor||i;this._style.strokeWeight=e.strokeWeight==null?4:e.strokeWeight;this._style.strokeOpacity=e.strokeOpacity==null?1:e.strokeOpacity;this._style.strokeLineJoin=e.strokeLineJoin||"round";this._style.strokeLineCap=e.strokeLineCap||"round";this._style.strokeStyle=e.strokeStyle||"solid";this._style.dashArray=e.dashArray||[8,4];this._style.strokeTextureUrl=e.strokeTextureUrl||"";this._style.strokeTextureWidth=e.strokeTextureWidth==null?null:e.strokeTextureWidth;this._style.strokeTextureHeight=e.strokeTextureHeight==null?null:e.strokeTextureHeight;this._style.strokeTextureSpaced=!!e.strokeTextureSpaced;this._style.strokeTextureGap=e.strokeTextureGap==null?16:e.strokeTextureGap;this._style.strokeTextureColor=e.strokeTextureColor==null?"rgba(255, 255, 255, 1)":e.strokeTextureColor;this._strokeTex=null;this._items=null;this._texWarned={}}gZ.inherits(nJ,"PolylineLayer");hv.extend(gZ.prototype,{_onOptionsChanged:function(e){if(!this._inited){return}e=e||{};if(e.strokeColor!==undefined||e.strokeWeight!==undefined||e.strokeLineJoin!==undefined||e.strokeLineCap!==undefined){this._rebuild()}},clearData:function(){this._items=null;return nJ.prototype.clearData.call(this)},getItems:function(){return this._items},resolvePickIndex:function(i,e,C){return this._resolvePickIndex?this._resolvePickIndex(i,e,C):null},hitTest:function(e,i){return this._hitTest?this._hitTest(e,i):null},toString:function(){return"PolylineLayer"}});function eQ(e){e=e||{};nJ.call(this,e);var i=K.uiVersionIsGL()?"rgba(255, 71, 26, 0.9)":fq().strokeColor;this._style.strokeColor=e.strokeColor||i;this._style.strokeWeight=e.strokeWeight==null?4:e.strokeWeight;this._style.strokeOpacity=e.strokeOpacity==null?1:e.strokeOpacity;this._style.strokeLineJoin=e.strokeLineJoin||"round";this._style.strokeLineCap=e.strokeLineCap||"round";this._style.mode=e.mode||"arc";this._style.arcHeight=e.arcHeight==null?0.2:e.arcHeight;this._style.curvature=e.curvature==null?0.15:e.curvature;this._style.segments=e.segments==null?32:e.segments;this._style.animation=e.animation===undefined?true:!!e.animation;this._style.duration=e.duration==null?2:e.duration;this._style.interval=e.interval==null?0.25:e.interval;this._style.trailLength=e.trailLength==null?0.6:e.trailLength;this._style.baseOpacity=e.baseOpacity==null?0.25:e.baseOpacity;this._style.randomPhase=e.randomPhase===undefined?true:!!e.randomPhase;this._phase=0;this._rafId=null;this._lastFrameTime=0}eQ.inherits(nJ,"FlyLineLayer");eQ.MODES={arc:1,path:1};eQ.effectiveInterval=function(e){e=Number(e);if(isNaN(e)){e=0}return Math.max(0.001,Math.min(1,e))};hv.extend(eQ.prototype,{_onOptionsChanged:function(e){if(!this._inited){return}e=e||{};if(e.strokeColor!==undefined||e.strokeWeight!==undefined||e.strokeLineJoin!==undefined||e.strokeLineCap!==undefined||e.mode!==undefined||e.arcHeight!==undefined||e.curvature!==undefined||e.segments!==undefined||e.randomPhase!==undefined){this._rebuild()}if(e.animation!==undefined){if(this._style.animation){this._startFrame()}else{this._stopFrame()}}},toString:function(){return"FlyLineLayer"}});function lS(e){e=e||{};nJ.call(this,e);var i=K.uiVersionIsGL()?"rgba(25, 25, 250, 1)":fq().strokeColor;this._style.strokeColor=e.strokeColor||i;this._style.strokeWeight=e.strokeWeight==null?8:e.strokeWeight;this._style.strokeLineJoin=e.strokeLineJoin||"round";this._style.strokeLineCap=e.strokeLineCap||"round";this._style.passedColor=e.passedColor===undefined?"rgba(153, 153, 153, 1)":e.passedColor;this._style.upcomingColor=e.upcomingColor===undefined?null:e.upcomingColor;this._style.lineVisible=e.lineVisible===undefined?true:!!e.lineVisible;this._style.strokeTextureUrl=e.strokeTextureUrl||"";this._style.strokeTextureWidth=e.strokeTextureWidth==null?16:e.strokeTextureWidth;this._style.strokeTextureHeight=e.strokeTextureHeight==null?16:e.strokeTextureHeight;this._style.strokeTextureSpaced=!!e.strokeTextureSpaced;this._style.strokeTextureGap=e.strokeTextureGap==null?16:e.strokeTextureGap;this._style.strokeTextureColor=e.strokeTextureColor==null?"rgba(255, 255, 255, 1)":e.strokeTextureColor;this._style.isLinear=!!e.isLinear;this._style.linearTexture=e.linearTexture||null;this._style.duration=e.duration==null?60:e.duration;this._style.speedMode=e.speedMode==null?1:e.speedMode;this._style.timestampKey=e.timestampKey||"timestamps";this._style.autoStart=!!e.autoStart;this._style.movePoint=e.movePoint===undefined?{}:e.movePoint;this._style.autoFollow=!!e.autoFollow;this._style.followOptions=e.followOptions||null;this._trace=0;this._traceStyle={color:this._style.strokeColor,start:true,disappear:false,hideAll:false,none:false};this._traceWarned=false;this._normalizeTrace();this._distance=0;this._elapsed=0;this._process=0;this._playStatus=lS.Status.INIT;this._steps=null;this._mcPoints=null;this._speed=1;this._originDuration=this._style.duration;this._effectSpeedMode=this._style.speedMode;this._movePointObj=null;this._rafId=null;this._arrowTex=null;this._linearTex=null;this._linearWarned=false;this._lastFrameTime=0;this._elapsedIndex=0;this._elapsedTime=0;this._elapsedDistance=0;this._followOpt={position:[0,0],lookAt:0,fixedLookAt:true,rotationDuration:500,minRotation:5,idleTimeout:2000};this._normalizeFollowOptions(e.followOptions);this._followIdleAt=0;this._followIdleTimer=null;this._followHandlers=null}lS.inherits(nJ,"TrackLine");lS.Status={INIT:0,PLAY:1,PAUSE:2,STOP:3,FINISH:4};lS.StatusName=["init","play","pause","stop","finish"];hv.extend(lS.prototype,{_onOptionsChanged:function(e){if(e&&e.followOptions!==undefined){this._normalizeFollowOptions(e.followOptions)}if(e&&(e.passedColor!==undefined||e.upcomingColor!==undefined||e.lineVisible!==undefined||e.strokeColor!==undefined)){this._normalizeTrace()}if(!this._inited){return}this._onPlayOptionsChanged&&this._onPlayOptionsChanged(e);this.triggerRepaint()},_isHiddenColor:function(T){if(T===false){return true}if(typeof T!=="string"){return false}var i=T.replace(/^\s+|\s+$/g,"").toLowerCase();if(i==="none"||i==="transparent"){return true}var e=i.match(/^rgba\(([^)]+)\)$/);if(e){var C=e[1].split(",");return C.length>3&&parseFloat(C[3])===0}return false},_normalizeTrace:function(){var T=this._style;var C=this._traceStyle;var i=this._isHiddenColor(T.passedColor);var oL=this._isHiddenColor(T.upcomingColor);var e=!i&&T.passedColor!=null;var oM=!oL&&T.upcomingColor!=null;C.hideAll=!T.lineVisible||(i&&oL);C.none=!(i||oL||e||oM);C.color=T.strokeColor;C.start=true;C.disappear=false;if(i){C.disappear=true}else{if(oL){C.start=false;C.disappear=true}else{if(e){C.color=T.passedColor}else{if(oM){C.start=false;C.color=T.upcomingColor}}}}if(C.hideAll){C.none=false;C.start=true;C.disappear=true}var oK=!(i&&oL)&&(i||e)&&(oL||oM);if(oK&&!this._traceWarned){this._traceWarned=true;console.warn("[BMap] TrackLine: passedColor 涓� upcomingColor 鍙兘鏈変竴涓亸绂讳富绾胯壊 strokeColor锛屽凡鎸夈�岄殣钘忎紭鍏堜簬鏌撹壊锛屽悓绾ф椂 passedColor 浼樺厛銆嶅彇鍏朵竴锛屽彟涓�涓蹇界暐")}return C},_normalizeFollowOptions:function(i){var e=this._followOpt;if(!i){return e}if(i.position instanceof Array){e.position=[Number(i.position[0])||0,Number(i.position[1])||0]}if(i.lookAt!=null){e.lookAt=Number(i.lookAt)||0}if(i.fixedLookAt!==undefined){e.fixedLookAt=!!i.fixedLookAt}if(i.rotationDuration!=null&&Number(i.rotationDuration)>=0){e.rotationDuration=Number(i.rotationDuration)}if(i.minRotation!=null&&Number(i.minRotation)>=0){e.minRotation=Number(i.minRotation)}if(i.idleTimeout!=null&&Number(i.idleTimeout)>=0){e.idleTimeout=Number(i.idleTimeout)}return e},clearData:function(){this.stop();this._steps=null;this._mcPoints=null;this._distance=0;return nJ.prototype.clearData.call(this)},start:function(){this._start&&this._start();return this},pause:function(){this._pause&&this._pause();return this},resume:function(){this._resume&&this._resume();return this},stop:function(){this._stop&&this._stop();return this},setSpeed:function(e){this._setSpeed&&this._setSpeed(e);return this},getSpeed:function(){return this._speed},setProcess:function(e){this._setProcess&&this._setProcess(e);return this},getProcess:function(){return this._process},setElapsed:function(e){this._setElapsed&&this._setElapsed(e);return this},getElapsed:function(){return this._elapsed},getStatus:function(){return this._playStatus},getDistance:function(){return this._distance},getInfoByProcess:function(e){return this._getInfoByProcess?this._getInfoByProcess(e):null},getMovePoint:function(){return this._movePointObj},setMovePoint:function(e){this._style.movePoint=e;this._applyMovePoint&&this._applyMovePoint();return this},getSpeedMode:function(){return this._effectSpeedMode},setAutoFollow:function(e){this._style.autoFollow=!!e;this._applyAutoFollow&&this._applyAutoFollow();return this},getAutoFollow:function(){return !!this._style.autoFollow},setFollowOptions:function(e){this._normalizeFollowOptions(e);this._style.followOptions=e||this._style.followOptions;this._applyAutoFollow&&this._applyAutoFollow();return this},getFollowOptions:function(){var e=this._followOpt;return{position:[e.position[0],e.position[1]],lookAt:e.lookAt,fixedLookAt:e.fixedLookAt,rotationDuration:e.rotationDuration,minRotation:e.minRotation,idleTimeout:e.idleTimeout}},setVisible:function(e){bS.prototype.setVisible.call(this,e);this._syncMovePointVisible&&this._syncMovePointVisible()},toString:function(){return"TrackLine"}});function i8(i){i=i||{};nJ.call(this,i);var e=K.uiVersionIsGL()?"rgba(25, 25, 250, 0.6)":fq().fillColor;var C=K.uiVersionIsGL()?"rgba(250, 250, 25, 1)":fq().strokeColor;this._style.fillColor=i.fillColor||e;this._style.fillOpacity=i.fillOpacity==null?1:i.fillOpacity;this._style.strokeColor=i.strokeColor||C;this._style.strokeWeight=i.strokeWeight==null?0:i.strokeWeight;this._style.strokeOpacity=i.strokeOpacity==null?1:i.strokeOpacity;this._style.fillTextureUrl=i.fillTextureUrl||"";this._style.fillTextureSize=i.fillTextureSize==null?null:i.fillTextureSize;this._style.fillTextureAlphaOnly=!!i.fillTextureAlphaOnly;this._border=null;this._fillTex=null;this._items=null;this._texWarned={};this._syncBorder()}i8.inherits(nJ,"PolygonLayer");hv.extend(i8.prototype,{_onOptionsChanged:function(e){e=e||{};var i=this._syncBorder(e);if(!this._inited){return}if(i){this._rebuild()}else{if(e.fillColor!==undefined||e.fillOpacity!==undefined){this._restyleFill()}}},_syncBorder:function(oM){var oK=this._style;var e=typeof oK.strokeWeight==="function"||oK.strokeWeight>0;if(!e){if(this._border){this._border.onDestroy();this._border=null}return false}var oN=!this._border;if(oN){this._border=new gZ({strokeLineJoin:"miter",strokeLineCap:"butt",referCenter:this.center||null})}var oL=["strokeColor","strokeWeight","strokeOpacity"];var T=null;for(var C=0;C<oL.length;C++){if(oN||!oM||oM[oL[C]]!==undefined){T=T||{};T[oL[C]]=oK[oL[C]]}}if(T){this._border.setOptions(T)}return oN},getItems:function(){return this._items},resolvePickIndex:function(i,e,C){return this._resolvePickIndex?this._resolvePickIndex(i,e,C):null},hitTest:function(e,i){return this._hitTest?this._hitTest(e,i):null},toString:function(){return"PolygonLayer"}});function op(i){i=i||{};nJ.call(this,i);this._style.shape=i.shape==null?"circle":i.shape;this._style.size=i.size==null?20:i.size;var e=K.uiVersionIsGL()?"rgba(50, 50, 255, 1)":fq().strokeColor;this._style.fillColor=i.fillColor==null?e:i.fillColor;this._style.fillOpacity=i.fillOpacity==null?1:i.fillOpacity;this._style.strokeColor=i.strokeColor==null?"rgba(255, 255, 255, 1)":i.strokeColor;this._style.strokeWeight=i.strokeWeight==null?0:i.strokeWeight;this._style.scale=i.scale==null?1:i.scale;this._style.rotation=i.rotation==null?0:i.rotation;this._style.offset=i.offset||[0,0];this._style.anchor=i.anchor==null?"center":i.anchor;this._style.isFlat=i.isFlat===undefined?false:!!i.isFlat;this._style.icon=i.icon==null?null:i.icon;this._style.iconSize=i.iconSize==null?null:i.iconSize;this._items=null;this._iconList=null;this._iconToken=0}op.inherits(nJ,"PointLayer");op.ShapeType={circle:0,square:1,triangle:2,diamond:3,cross:4,arrow:5,arrowTail:6,star:7,waterdrop:9};op.Anchor={center:0,topLeft:1,topCenter:2,topRight:3,rightCenter:4,bottomRight:5,bottomCenter:6,bottomLeft:7,leftCenter:8};op.IconAnchor={center:[0,0],topLeft:[-1,1],topCenter:[0,1],topRight:[1,1],rightCenter:[1,0],bottomRight:[1,-1],bottomCenter:[0,-1],bottomLeft:[-1,-1],leftCenter:[-1,0]};hv.extend(op.prototype,{_isIconMode:function(){return !!this._style.icon},_onOptionsChanged:function(){if(this._inited){this._rebuild()}},setOpacity:function(e){bS.prototype.setOpacity.call(this,e);if(this._inited){this._rebuild();this.triggerRepaint()}},clearData:function(){this._items=null;this._iconList=null;return nJ.prototype.clearData.call(this)},getItems:function(){return this._items},_hasPickData:function(){return !!(this._items&&this._items.length)},resolvePickIndex:function(i,e,C){return this._resolvePickIndex?this._resolvePickIndex(i,e,C):null},hitTest:function(e,i){return this._hitTest?this._hitTest(e,i):null},toString:function(){return"PointLayer"}});function lZ(e){e=e||{};nJ.call(this,e);var i=K.uiVersionIsGL()?"rgba(0, 180, 0, 1)":fq().strokeColor;this._style.color=e.color||i;this._style.size=e.size==null?50000:e.size;this._style.height=e.height==null?100000:e.height;this._style.edgeCount=e.edgeCount==null?4:e.edgeCount;this._style.unit=e.unit||"m"}lZ.inherits(nJ,"BarLayer");hv.extend(lZ.prototype,{_onOptionsChanged:function(e){if(!this._inited){return}e=e||{};if(e.color!==undefined||e.size!==undefined||e.height!==undefined||e.edgeCount!==undefined||e.unit!==undefined){this._rebuild()}},toString:function(){return"BarLayer"}});function bB(e){e=e||{};nJ.call(this,e);this._style.text=e.text==null?null:e.text;this._style.fontSize=e.fontSize==null?14:e.fontSize;this._style.fontFamily=e.fontFamily==null?"寰蒋闆呴粦":e.fontFamily;this._style.fontWeight=e.fontWeight==null?"normal":e.fontWeight;this._style.color=e.color==null?"#333":e.color;this._style.strokeColor=e.strokeColor==null?"rgba(255, 255, 255, 1)":e.strokeColor;this._style.strokeWeight=e.strokeWeight==null?0:e.strokeWeight;this._style.padding=e.padding||[2,2];this._style.margin=e.margin||[0,0];this._style.collides=e.collides===undefined?true:!!e.collides;this._style.waitTime=e.waitTime==null?200:e.waitTime;this._style.textMaxWidth=e.textMaxWidth==null?0:e.textMaxWidth;this._style.lineHeight=e.lineHeight==null?20:e.lineHeight;this._style.textAlign=e.textAlign==null?"center":e.textAlign;this._style.offset=e.offset||[0,0];this._style.anchor=e.anchor==null?"center":e.anchor;this._style.rotation=e.rotation==null?0:e.rotation;this._style.scale=e.scale==null?1:e.scale;this._style.fillOpacity=e.fillOpacity==null?1:e.fillOpacity;this._style.isFlat=e.isFlat===undefined?false:!!e.isFlat;this._items=null;this._atlasTexture=null;this._atlasWidth=0;this._atlasHeight=0;this._visibleIndexes=null;this._baseVisible=null;this._collideTime=0;this._collideDirty=true}bB.inherits(nJ,"TextLayer");bB.Anchor={center:[0,0],topLeft:[-1,1],topCenter:[0,1],topRight:[1,1],rightCenter:[1,0],bottomRight:[1,-1],bottomCenter:[0,-1],bottomLeft:[-1,-1],leftCenter:[-1,0]};hv.extend(bB.prototype,{_onOptionsChanged:function(){this._collideDirty=true;if(this._inited){this._rebuild()}},setOpacity:function(e){bS.prototype.setOpacity.call(this,e);if(this._inited){this._rebuild();this.triggerRepaint()}},clearData:function(){this._items=null;this._visibleIndexes=null;this._collideDirty=true;return nJ.prototype.clearData.call(this)},getItems:function(){return this._items},_hasPickData:function(){return !!(this._items&&this._items.length)},resolvePickIndex:function(i,e,C){return this._resolvePickIndex?this._resolvePickIndex(i,e,C):null},hitTest:function(e,i){return this._hitTest?this._hitTest(e,i):null},toString:function(){return"TextLayer"}});function n0(i){i=i||{};nJ.call(this,i);this._style.tileSize=i.tileSize||256;this._style.clusterRadius=i.clusterRadius==null?60:i.clusterRadius;this._style.clusterMinPoints=i.clusterMinPoints==null?2:i.clusterMinPoints;this._style.clusterMinZoom=i.clusterMinZoom==null?3:i.clusterMinZoom;this._style.clusterMaxZoom=i.clusterMaxZoom==null?16:i.clusterMaxZoom;this._style.fitViewOnClick=i.fitViewOnClick===undefined?true:!!i.fitViewOnClick;this._style.fitViewMargin=i.fitViewMargin||[12,12,12,12];this._style.updateRealTime=!!i.updateRealTime;this._style.waitTime=i.waitTime==null?300:i.waitTime;this._style.clusterIcon=i.clusterIcon||null;this._style.clusterIconSize=i.clusterIconSize||null;this._style.singleStyle=i.singleStyle||null;this._bubbleColor=K.uiVersionIsGL()?null:fq().strokeColor;this._points=null;this._trees=null;this._clusterBBox=null;var C=this;this.enablePicked=i.enablePicked===undefined?true:!!i.enablePicked;var e={enablePicked:true,mouseStyleChange:this.supportMouseStyleChange,pickTolerance:this.pickTolerance};this._clusterLayer=new op(hv.extend({icon:function(oL){return C._clusterIcon(oL)},iconSize:function(oL){return C._clusterIconSize(oL)},anchor:"center",referCenter:i.referCenter||null,opacity:i.opacity,minZoom:i.minZoom,maxZoom:i.maxZoom},e));var T=K.uiVersionIsGL()?"rgba(255, 80, 80, 1)":fq().strokeColor;var oK={shape:"circle",size:14,fillColor:T,strokeColor:"rgba(255, 255, 255, 1)",strokeWeight:2,referCenter:i.referCenter||null,opacity:i.opacity,minZoom:i.minZoom,maxZoom:i.maxZoom};if(i.singleStyle){hv.extend(oK,i.singleStyle)}this._singleLayer=new op(hv.extend(oK,e))}n0.inherits(nJ,"ClusterLayer");hv.extend(n0.prototype,{_onOptionsChanged:function(){if(this._inited){this._rebuild();this.triggerRepaint()}},setVisible:function(e){bS.prototype.setVisible.call(this,e);this._clusterLayer&&(this._clusterLayer.visible=this.visible);this._singleLayer&&(this._singleLayer.visible=this.visible)},setOpacity:function(e){bS.prototype.setOpacity.call(this,e);this._clusterLayer&&this._clusterLayer.setOpacity(this.opacity);this._singleLayer&&this._singleLayer.setOpacity(this.opacity)},clearData:function(){this._points=null;this._trees=null;this._clusterBBox=null;this._clusterLayer&&this._clusterLayer.clearData();this._singleLayer&&this._singleLayer.clearData();return nJ.prototype.clearData.call(this)},getClusterLayer:function(){return this._clusterLayer},getSingleLayer:function(){return this._singleLayer},getPickTargets:function(){if(!this.enablePicked){return[]}return[this._singleLayer,this._clusterLayer]},setEnablePicked:function(e){this.enablePicked=!!e;if(!this.enablePicked&&this.map&&this.map._visualPicker){this.map._visualPicker.dropTarget(this._singleLayer);this.map._visualPicker.dropTarget(this._clusterLayer)}if(this.enablePicked&&this.map){aD.ensure(this.map)}return this},redraw:function(){this._refresh&&this._refresh()},toString:function(){return"ClusterLayer"}});function fj(e){e=e||{};nJ.call(this,e);this._style.size=e.size==null?20:e.size;this._style.unit=e.unit==="m"?"m":"px";this._style.max=isNaN(Number(e.max))?100:Number(e.max);this._style.min=isNaN(Number(e.min))?0:Number(e.min);this._style.minOpacity=isNaN(Number(e.minOpacity))?0:Number(e.minOpacity);this._style.maxOpacity=isNaN(Number(e.maxOpacity))?1:Number(e.maxOpacity);this._style.gradient=e.gradient||{0.25:"rgba(0,0,255,1)",0.55:"rgba(0,255,0,1)",0.85:"rgba(255,255,0,1)",1:"rgba(255,0,0,1)"};this._style.weightField=e.weightField||"count"}fj.inherits(nJ,"Heatmap");hv.extend(fj.prototype,{_onOptionsChanged:function(e){e=e||{};if(!this._inited){return}if(e.gradient!==undefined){this._updatePalette()}if(e.weightField!==undefined){this._rebuild()}},setGradient:function(e){return this.setOptions({gradient:e})},setRadius:function(e){this._style.size=e;this.triggerRepaint();return this},toString:function(){return"Heatmap"}});var dS=1;var j2=2;var kr=3;var m=4;var aM=5;var aC=1;var lk=2;var gC=3;var l7=4;var hw=5;var lH=6;var iY=7;var mr={};mr[aC]=2;mr[lk]=4;mr[gC]=8;mr[l7]=10;mr[hw]=16;mr[lH]=20;mr[iY]=30;var oj={};oj[dS]=bD.ShapeType.STAR;oj[j2]=bD.ShapeType.WATERDROP;oj[kr]=bD.ShapeType.CIRCLE;oj[m]=bD.ShapeType.SQUARE;oj[aM]=bD.ShapeType.DIAMOND;function ih(C,e){if(C===undefined){throw new Error("娌℃湁浼犲叆points鏁版嵁")}if(Object.prototype.toString.call(C)!=="[object Array]"){throw new Error("points鏁版嵁涓嶆槸鏁扮粍")}g2.call(this);e=e||{};this._points=C;var i=K.uiVersionIsGL()?"#fa937e":fq().fillColor;this._config={shape:e.shape||kr,size:e.size||l7,color:e.color||i,enableMassClear:true};this._layer=null;this._bindingToMap=false;this._hoverPoint=null}ih.inherits(g2,"PointCollection");hv.extend(ih.prototype,{initialize:function(e){if(this._bindingToMap){return null}this.map=e;hv.BaseClass.call(this,this.hashCode);if(!this._layer){this._createLayer()}if(!this._bindingToMap){this.map._addNormalLayer(this._layer);this._bindingToMap=true}this._updateData();return null},_createLayer:function(){var C=this._config;var i=mr[C.size]||10;var e=oj[C.shape]!==undefined?oj[C.shape]:bD.ShapeType.CIRCLE;this._layer=new bD({enablePicked:true,autoSelect:false,selectedIndex:-1,enableChangeSelectIndexByPick:false,style:{size:i,color:C.color,shapeType:e,opacity:1}});this._bindLayerEvents()},_bindLayerEvents:function(){var e=this;e._layer.addEventListener("click",function(T){var i=e._getPointByPickResult(T);if(i){var C=new ix("onclick");C.pointMC=i;e.dispatchEvent(C)}});e._layer.addEventListener("mousemove",function(oL){var C=e._getPointByPickResult(oL);if(C){if(!e._hoverPoint||e._hoverPoint.lng!==C.lng||e._hoverPoint.lat!==C.lat){if(e._hoverPoint){var i=new ix("onmouseout");i.pointMC=e._hoverPoint;e.dispatchEvent(i)}e._hoverPoint=C;var oK=new ix("onmouseover");oK.pointMC=C;e.dispatchEvent(oK)}}else{if(e._hoverPoint){var T=new ix("onmouseout");T.pointMC=e._hoverPoint;e.dispatchEvent(T);e._hoverPoint=null}}})},_getPointByPickResult:function(T){if(!T||!T.value){return null}var C=T.value.dataIndex;if(C>=0&&C<this._points.length){var i=this._points[C];if(i&&i.lng!==undefined&&i.lat!==undefined){return i}}return null},draw:function(){},setPoints:function(e){this._points=e||[];this._updateData()},_updateData:function(){if(!this._layer||!this.map){return}var e=this._toGeoJSON(this._points);if(e.features.length>0){this._layer.setData(e)}else{this._layer.clearData()}},_toGeoJSON:function(T){var C=[];for(var e=0;e<T.length;e++){var oK=T[e];if(!oK||oK.lng===undefined||oK.lat===undefined){C.push({type:"Feature",geometry:{type:"Point",coordinates:[0,0]},properties:{index:e,visibility:false}});continue}C.push({type:"Feature",geometry:{type:"Point",coordinates:[oK.lng,oK.lat]},properties:{index:e}})}return{type:"FeatureCollection",features:C}},setStyles:function(oK){if(!oK){return}if(oK.color){this._config.color=oK.color}if(oK.size){this._config.size=oK.size}if(oK.shape){this._config.shape=oK.shape}if(this._layer){var T=this._config;var C=mr[T.size]||10;var e=oj[T.shape]!==undefined?oj[T.shape]:bD.ShapeType.CIRCLE;var i=this._layer.style_opt;i.size=C;i.color=T.color;i.shapeType=e;this._layer.resolveStyle();this._layer.parseData()}},clear:function(){this._points=[];if(this._layer){this._layer.clearData()}},remove:function(){this.clear();if(this._layer&&this.map&&this._bindingToMap){this.map._removeNormalLayer(this._layer);this._bindingToMap=false}var e=new ix("onremove");this.dispatchEvent(e);this._layer=null;this.map=null;this.decontrol()},hide:function(){this._visible=false;if(this._layer){this._layer.setVisible(false)}},show:function(){this._visible=true;if(this._layer){this._layer.setVisible(true)}},isVisible:function(){return !!this._visible},toString:function(){return"PointCollection"}});window.BMAP_POINT_SHAPE_STAR=dS;window.BMAP_POINT_SHAPE_WATERDROP=j2;window.BMAP_POINT_SHAPE_CIRCLE=kr;window.BMAP_POINT_SHAPE_SQUARE=m;window.BMAP_POINT_SHAPE_RHOMBUS=aM;window.BMAP_POINT_SIZE_TINY=aC;window.BMAP_POINT_SIZE_SMALLER=lk;window.BMAP_POINT_SIZE_SMALL=gC;window.BMAP_POINT_SIZE_NORMAL=l7;window.BMAP_POINT_SIZE_BIG=hw;window.BMAP_POINT_SIZE_BIGGER=lH;window.BMAP_POINT_SIZE_HUGE=iY;function dX(e,i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("Hotspot")}if(!e){this._invalid=true;return}this._position=e;this.guid="hotspot"+(dX._guid++);i=i||{};this._text=i.text||"";this._offsets=i.offsets?i.offsets.slice(0):[5,5,5,5];this._userData=i.userData||null;this._minZoom=i.minZoom||null;this._maxZoom=i.maxZoom||null;this._syncSpotFields()}dX._guid=0;hv.extend(dX.prototype,{initialize:function(e){this._map=e;if(this._minZoom==null){this._minZoom=e.config.minZoom}if(this._maxZoom==null){this._maxZoom=e.config.maxZoom}this._syncSpotFields()},_syncSpotFields:function(){this.pt=m8.convertLL2MC(this._position);this.bd=[-this._offsets[3],-this._offsets[2],this._offsets[1],this._offsets[0]];this.lr=(this._minZoom!=null&&this._maxZoom!=null)?[this._minZoom,this._maxZoom]:null;this.userdata=this._userData},setPosition:function(e){this._position=e;this.pt=m8.convertLL2MC(e)},getPosition:function(){return this._position},setText:function(e){this._text=e},getText:function(){return this._text},setUserData:function(e){this._userData=e;this.userdata=e},getUserData:function(){return this._userData}});var kd=null;var nO=null;cv.register(function(i){if(i.config&&i.config.isOverviewMap){return}if(i.isLoaded()){X(i);if(!kd){kd=nj(i)}if(!nO){nO=cA(i)}}else{i.addEventListener("load",function(){X(this);if(!kd){kd=nj(this)}if(!nO){nO=cA(this)}})}i.cityName="涓浗";i.cCode="1";var e={};e.enableRequest=true;e.request=function(){if(e.enableRequest){e.enableRequest=false;setTimeout(function(){e._request()},500)}};e._request=function(){var T=i.getBoundsIn();if(!T){return}var oL=i.getZoom();var C=T.getSouthWest();var oK=T.getNorthEast();or.request(function(oP){if(oP.current_city["code"]>=9000&&oP.current_city["code"]<=9378){oP.current_city["name"]="鍙版咕鐪�"}if(oP.current_city["code"]>=20000&&oP.current_city["code"]<=20499){oP.current_city["name"]="鏂板姞鍧�"}if(oP.current_city["code"]>=20500&&oP.current_city["code"]<=25999){oP.current_city["name"]="娉板浗"}if(oP.current_city["code"]>=26000&&oP.current_city["code"]<=29999){oP.current_city["name"]="鏃ユ湰"}if(oP.current_city["code"]>=30000&&oP.current_city["code"]<=30999){oP.current_city["name"]="闊╁浗"}if(oP.current_city["code"]>=31000&&oP.current_city["code"]<=37000){oP.current_city["name"]="浜氬お"}if(oP.current_city["code"]>=46609&&oP.current_city["code"]<=52505){oP.current_city["name"]="娆ф床"}if(oP.current_city["code"]>=39509&&oP.current_city["code"]<=53500){oP.current_city["name"]="鍗楃編娲�"}if(oP.current_city["code"]>=54000&&oP.current_city["code"]<=70000){oP.current_city["name"]="鍖楃編娲�"}if(oP.current_city["code"]===54003&&oP.current_city["code"]>=60731&&oP.current_city["code"]<=61123){oP.current_city["name"]="缇庡浗"}if(oP.current_city["code"]===54015||oP.current_city["code"]>=57970&&oP.current_city["code"]<=60223){oP.current_city["name"]="鍔犳嬁澶�"}if(oP.current_city["code"]===54025||oP.current_city["code"]>=54338&&oP.current_city["code"]<=57374){oP.current_city["name"]="澧ㄨタ鍝�"}e.enableRequest=true;if(oP&&oP.current_city){var oO=oP.current_city["name"];var oN=oP.current_city["code"];if(oN!==i.cCode){var oM=new ix("oncitychange");oM.name=oO;oM.code=oN;i.dispatchEvent(oM)}i.cityName=oO;i.cCode=oN;if(!c9()){eO(i)}}},{qt:"cen",b:C.lng+","+C.lat+";"+oK.lng+","+oK.lat,l:oL},"","",true)};i.addEventListener("load",function(C){e.request()});i.addEventListener("moveend",function(C){e.request()});i.addEventListener("zoomend",function(C){e.request()});e.request()});function nj(C){var e={};var i=new oo(e);C.addControl(i);return i}function cA(C){var i={};var e=new nl(i);C.stickySpamCtrl=e;C.addControl(e);return e}function X(i){if(i.temp.copyadded){return}i.temp.copyadded=true;if(!i.cpyCtrl){var T=new mU(2,2);i.config.cpyCtrlOffset=T;if(c9()){T.width=72;T.height=0}var C=new i0({offset:T,printable:true});i.cpyCtrl=C}if(!c9()||i.config.showCopyrightOnMobile){eO(i);i.addEventListener("maptypechange",function(){eO(i)});i.addEventListener("onlanguage_change",function(){eO(i)})}i.addControl(C);var e=new cB();e._opts={printable:true};i.logoCtrl=e;i.addControl(e);i.addEventListener("resize",function(){if(this.getSize().width>=300&&i.getSize().height>=100){e.show();C&&C.setOffset(i.config.cpyCtrlOffset)}else{e.hide();C&&C.setOffset(new mU(4,2))}});if(i.getSize().width>=300&&i.getSize().height>=100){e.show()}else{e.hide();C.setOffset(new mU(4,2))}i.addEventListener("oncopyrightoffsetchange",function(oK){i.logoCtrl.setOffset(oK.target.logo);i.cpyCtrl.setOffset(oK.target.cpy);if(oK.target.cpy){i.config.cpyCtrlOffset=oK.target.cpy}});i.dispatchEvent(new ix("oncopyrightaddend"))}function eO(oZ){if(!oZ.cpyCtrl){var o7=new mU(2,2);if(c9()){o7.width=72;o7.height=0}var o2=new i0({offset:o7,printable:true});oZ.cpyCtrl=o2}var pg=oZ.cityName||"涓浗";var o0=oZ.getMapTypeId();var o1=["甯稿窞甯�","鍗楁槍甯�","涔岄瞾鏈ㄩ綈甯�","鏃犻敗甯�","绂忓窞甯�","娉夊窞甯�","鐝犳捣甯�","璐甸槼甯�"];var oT=["鍖椾含甯�","涓婃捣甯�","骞垮窞甯�","娣卞湷甯�","瀹佹尝甯�","鐭冲搴勫競","娌堥槼甯�","闀挎槬甯�","闈掑矝甯�","娓╁窞甯�","鍙板窞甯�","閲戝崕甯�","浣涘北甯�","涓北甯�","鏄嗘槑甯�","鍗楀畞甯�","鑻忓窞甯�","瑗垮畨甯�","娴庡崡甯�","閮戝窞甯�","鍚堣偉甯�","鍛煎拰娴╃壒甯�","鏉窞甯�","鎴愰兘甯�","姝︽眽甯�","闀挎矙甯�","澶╂触甯�","鍗椾含甯�","閲嶅簡甯�","澶ц繛甯�","涓滆帪甯�","鍘﹂棬甯�"];var oV=["棣欐腐鐗瑰埆琛屾斂鍖�"];var oO=["鍙版咕鐪�"];var o8=["鏃ユ湰"];var pe=["闊╁浗"];var o3=["娉板浗"];var o6=["浜氬お"];var oP=["鏂板姞鍧�"];var pf=["娆ф床"];var T=["鍗楃編娲�"];var pb=["鍖楃編娲�"];var C=["缇庡浗"];var o5=["澧ㄨタ鍝�"];var oM=["鍔犳嬁澶�"];for(var pc in o1){if(o1[pc]===pg){var oW=true;break}}for(var pc in oT){if(oT[pc]===pg){var oK=true;break}}for(var pc in oV){if(oV[pc]===pg){var pi=true;break}}if(oO[0]===pg){var pa=true}if(oP[0]===pg){var i=true}if(o8[0]===pg){var oS=true}if(pe[0]===pg){var oY=true}if(o3[0]===pg){var oX=true}if(o6[0]===pg){var oN=true}if(pf[0]===pg){var oU=true}if(T[0]===pg){var oR=true}if(pb[0]===pg){var e=true}if(C[0]===pg){var pd=true}if(oM[0]===pg){var o9=true}if(o5[0]===pg){var oL=true}var oQ=K.getGS(oZ.getLanguage());var ph=["&copy;&nbsp;2026 Baidu - "+oQ+"鍙� - 鐢叉祴璧勫瓧11111342 - 浜琁CP璇�030173鍙� - Data &copy; "];var o4="rgba(255, 255, 255, 0.701961)";if(oZ.getZoom()<=9){ph.push("鐧惧害鏅哄浘");ph.push(' &amp; <a target="_blank" href="http://www.openstreetmap.org/">OpenStreetMap</a>');ph.push(' &amp; <a target="_blank" href="http://corporate.navteq.com/supplier_terms.html">HERE</a>');if(o0===j9||o0===fp){ph.push(' &amp; <a target="_blank" href="http://www.eso.org/public/">ESO</a>');o4="rgba(0,0,0,.7)"}}else{if(oS||oY){ph.push('<a target="_blank" href="http://www.openstreetmap.org/">OpenStreetMap</a>')}else{if(i||oX){ph.push('<a target="_blank" href="http://corporate.navteq.com/supplier_terms.html">HERE</a>')}else{if(oN){ph.push('<a target="_blank" href="http://corporate.navteq.com/supplier_terms.html">HERE</a>');ph.push(' &amp; <a target="_blank" href="https://www.mapbox.com/">Mapbox</a>')}else{if(oU){ph.push('<a target="_blank" href="http://www.openstreetmap.org/">OpenStreetMap</a>');ph.push(' &amp; <a target="_blank" href="https://www.mapbox.com/">Mapbox</a>')}else{if(oR){ph.push('<a target="_blank" href="http://www.openstreetmap.org/">OpenStreetMap</a>');ph.push(' &amp; <a target="_blank" href="https://www.mapbox.com/">Mapbox</a>')}else{if(pd||oL||o9){ph.push('<a target="_blank" href="http://corporate.navteq.com/supplier_terms.html">HERE</a>');ph.push(' &amp; <a target="_blank" href="https://www.mapbox.com/">Mapbox</a>')}else{if(e){ph.push('<a target="_blank" href="http://www.openstreetmap.org/">OpenStreetMap</a>');ph.push(' &amp; <a target="_blank" href="https://www.mapbox.com/">Mapbox</a>')}else{ph.push("鐧惧害鏅哄浘");if(oW){ph.push(' &amp; <a target="_blank" href="http://www.palmcity.cn/palmcity/">PalmCity</a>')}if(pi){ph.push(' &amp; <a target="_blank" href="http://www.mapking.com/HongKong/eng/home/MapKing_Webmap.html">MapKing</a>')}if(pa){ph.push(' &amp; <a target="_blank" href="http://corporate.navteq.com/supplier_terms.html">HERE</a>');ph.push(' &amp; <a target="_blank" href="http://www.localking.com.tw/about/localking.aspx">妯傚LocalKing</a>')}if(o0===j9||o0===fp){o4="rgba(0,0,0,.6)"}}}}}}}}}ph.unshift('<span style="background: '+o4+';padding: 0px 1px;line-height: 16px;display: inline;height: 16px;">');ph.push("</span>");ph=ph.join("");oZ.cpyCtrl.addCopyright({id:1,content:ph})}function oo(e){this["defaultAnchor"]=BMAP_ANCHOR_TOP_RIGHT;this["defaultOffset"]=e.defaultOffset||new mU(90,6);this._cZIndex=9999;this._visible=false}oo.prototype=new jM();oo.prototype.initialize=function(oK){this._map=oK;var T=this;var e=da("div");var i=e.style;i.left=i.top="50%";i.display="none";i.padding="24px";i.overflow="visible";i.position="absolute";i.width="50%";i.maxWidth="360px";i.transform="translate(-50% , -50%)";i.zIndex="9999";i.background="#fff";i.userSelect="none";var oL=da("span",{style:"margin-top: 12px;\n    margin-bottom: -12px;\n    margin-left: calc(100% - 48px);\n    width: 56px;\n    height: 32px;\n    font-size: 14px;\n    text-align: center;\n    line-height: 32px;\n    display: block;\n    cursor: pointer;\n    background: #3894FF;\n    border: solid 1px #3f51b53b;\n    color: #fff;\n    border-radius: 3px;"});oL.innerText="纭畾";oL.addEventListener("click",function(){T.hide()});var C=da("div");var oM=C.style;oM.position="relative";oM.width="100%";oM.height="100%";oM.color="#000";oM.fontSize="14px";oM.wordBreak="break-all";e.appendChild(C);e.appendChild(oL);oK.getContainer().appendChild(e);return e};oo.prototype._setPosition=function(){};oo.prototype.update=function(e){if(!this.isVisible()){this._container.firstChild.innerText=e;this.show()}};function nl(C){jM.call(this);C=C||{};this._opts={};this._opts=hv.extend(this._opts,C);var i=lK();var oK=c0.popup_code;var e="绯荤粺浜�"+i.year+"骞�"+i.month+"鏈�"+i.day+"鏃�";this._prefixMsg="銆�"+oK+"銆�"+e;this["defaultAnchor"]=gv.TOP_RIGHT;var T=c9()?new mU(40,40):new mU(200,40);this["defaultOffset"]=C.defaultOffset||T;this._cZIndex=9999;this._visible=false}nl.inherits(jM,"StickySpam");nl.prototype.initialize=function(oK){this._map=oK;var T=this;var e=this._container=da("div");var i=e.style;i.display="none";i.padding="10px 15px";i.overflow="visible";i.maxWidth=c9()?"250px":"360px";i.background="#fff8ee";i.borderWidth="3px";i.borderStyle="solid";i.borderColor="#e29e32";i.position="relative";var C=da("div");var oL=C.style;oL.position="relative";oL.width="100%";oL.height="100%";oL.color="#e29e32";oL.fontSize="14px";oL.fontWeight="500";oL.wordBreak="break-all";oL.lineHeight="1.5";C.style.cssText+="; a { color: #1565c0; text-decoration: none; border-bottom: 1px solid rgba(21, 101, 192, 0.3); }";C.style.cssText+='; a[href^="tel:"] { color: #2e7d32; border-bottom-color: rgba(46, 125, 50, 0.3); }';e.appendChild(C);oK.getContainer().appendChild(e);return e};nl.prototype.update=function(i){if(!this.isVisible()){var e=this._convertUrlsToLinks(this._prefixMsg+i);this._container.firstChild.innerHTML=e;this.show()}};nl.prototype._convertUrlsToLinks=function(C){C=C.replace(/\n/g,"<br/>");var i=/(https?:\/\/[^\s]+)/g;C=C.replace(i,function(T){if(T.length>200){return T}if(!T.match(/^https?:\/\//)){return T}return'<a href="'+T+'" target="_blank">'+T+"</a>"});var e=/(\d{3,4}[-\s]?\d{3,4}[-\s]?\d{4}|\d{11})/g;C=C.replace(e,function(T){var oK=T.replace(/[-\s]/g,"");return'<a href="tel:'+oK+'">'+T+"</a>"});return C};window.BMAP_STATUS_SUCCESS=0;window.BMAP_STATUS_CITY_LIST=1;window.BMAP_STATUS_UNKNOWN_LOCATION=2;window.BMAP_STATUS_UNKNOWN_ROUTE=3;window.BMAP_STATUS_INVALID_KEY=4;window.BMAP_STATUS_INVALID_REQUEST=5;window.BMAP_STATUS_PERMISSION_DENIED=6;window.BMAP_STATUS_SERVICE_UNAVAILABLE=7;window.BMAP_STATUS_TIMEOUT=8;window.BMAP_ROUTE_TYPE_WALKING=2;window.BMAP_ROUTE_TYPE_DRIVING=3;window.BMAP_ROUTE_TYPE_RIDING=6;window.BMAP_ROUTE_STATUS_NORMAL=0;window.BMAP_ROUTE_STATUS_EMPTY=1;window.BMAP_ROUTE_STATUS_ADDRESS=2;var J="carport_list";var fT="carport_auth";var e6="cur";var an="cen";var W="s";var fv="con";var fh="bd";var eA="nb";var kc="bt";var bo="nav";var lL="walk";var iG="gc";var fX="rgc";var Y="dec";var l8="iploc";var jR="bse";var jb="nse";var e2="s";var gH="bsl";var iD="bda";var gB="sa";var bW="nba";var lV="drag";var mV="ext";var nZ="exts";var n6="hip";var kY="ride";var mZ="drct_riding";var on="drct";var dg="ldt";var aU="place";var h2=2;var b4=4;var iP=7;var lW=11;var dv=12;var hp=14;var ew=15;var gm=18;var a2=20;var bV=21;var S=19;var a=23;var mp=26;var a4=28;var jc=31;var hE=35;var l9=44;var b2=45;var aZ=46;var nW=47;var ji=-1;var bZ=0;var cu=1;var m5=2;var fM=3;window.BMAP_POI_TYPE_NORMAL=0;var ef=1;var l0=2;BMapGL.I=hv.I;var cK={};cK.removeHtml=function(e){e=e.replace(/<\/?[^>]*>/g,"");e=e.replace(/[ | ]* /g," ");return e};cK.parseGeoExtReg1=function(e){return e.replace(/([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*),([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*)(,)/g,"$1,$2;")};cK.parseGeoExtReg2=function(i,e){var C=new RegExp("(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){"+e+"}","ig");return i.replace(C,"$1")};var fD=0;var e4=1;var ah=2;cK.unique=function(C){var oL=false;var oK=[];var oM={};for(var T=0,e=C.length;T<e;T++){if(!oM[C[T]]){oM[C[T]]=true;oK.push(C[T])}}return oK};cK.getBestLevel=function(C,i){if(i){var e=Math.min(i.width/1100,i.height/660);C=Math.round(C+(Math.log(e)/Math.log(2)))}if(C<1){C=1}if(C>21){C=21}return C};cK.parseGeo=function(oM,oP){if(typeof oM!="string"||!oM){return}var oR=oM.split("|");var e;var oK;var C;if(oR.length==1){e=di(oM)}else{e=di(oR[2]);oK=di(oR[0]);C=di(oR[1]);if(!oP){return e}}var oN={type:e.geoType};if(oP){switch(oN.type){case ah:var oO=new d9(e.geo[0][0],e.geo[0][1]);var oQ=m8.convertMC2LL(oO);oN.point=oQ;oN.points=[oQ];break;case e4:oN.points=[];var oS=e.geo[0];for(var oL=0,T=oS.length-1;oL<T;oL+=2){var oT=new d9(oS[oL],oS[oL+1]);oT=m8.convertMC2LL(oT);oN.points.push(oT)}oK=new d9(oK.geo[0][0],oK.geo[0][1]);C=new d9(C.geo[0][0],C.geo[0][1]);oK=m8.convertMC2LL(oK);C=m8.convertMC2LL(C);oN.bounds=new lz(oK,C);break;default:break}}return oN};cK.parseGeoExt=function(o2,oT){if(!oT){oT=0}else{if(oT<0.25){oT=0}else{if(oT>0.25&&oT<1){oT=1}else{if(oT>32){oT=32}}}}var oO=o2.split("|");if(oO.length==1){var T=di(oO[0]);return{type:T.type,bound:"",points:T.geo.join(",")}}else{if(oO.length>1){var oU=o2.split(";.=");var oQ=[];var oK=[];var oV=0;var oZ=oU.length;for(var oW=0;oW<oZ;oW++){var o1=oU[oW];if(oZ>1){if(oW==0){o1=o1+";"}if(oW>0&&oW<oZ-1){o1=".="+o1+";"}if(oW==oZ-1){o1=".="+o1}}var oL=o1.split("|");var oY=di(oL[0]);var oX=di(oL[1]);oQ.push(oY.geo.join(","));oQ.push(oX.geo.join(","));var T=di(oL[2]);oV=T.type;var o0=T.geo.join(",");o0=cK.parseGeoExtReg1(o0);if(oT>0){o0=cK.parseGeoExtReg2(o0,oT)}oK.push(o0)}if(oZ<=1){oK=oK.join(";")}if(oZ==2){var C=oK[0]+";"+oK[1];var oM=C.split(";");var e=[];for(var oW=0;oW<oM.length;oW++){var oP=oM[oW].split(",")[0];var oN=oM[oW].split(",")[1];var oR=new d9(oP,oN);var oS=m8.convertMC2LL(oR);e.push(oS)}oK=e}return{type:oV,bound:oQ.join(";"),points:oK}}}};cK.getPoiPoint=function(e){var C=[];var i=null;if(e.toString()=="Point"){i=e}else{if(typeof e=="string"){C=hv.trim(e).split(",");if(C.length<2){return}C[0]=parseFloat(hv.trim(C[0]));C[1]=parseFloat(hv.trim(C[1]))}else{C=e.slice(0);if(C.length<2){return}}i=new BMap.Point(C[0],C[1])}return i};cK.parseGeoStr=function(C){var i=C.split(",");var e=new d9(i[0],i[1]);return m8.convertMC2LL(e)};cK.level={country:4,province:11,city:12,area:13};var kw=["=",".","-","*"];var e0=1<<23;function di(oP){var oO=lv(oP.charAt(0));var C=oP.substr(1);var oR=0;var e=C.length;var oS=[];var oM=[];var oN=[];while(oR<e){if(C.charAt(oR)==kw[0]){if((e-oR)<13){return 0}oN=gk(C.substr(oR,13),oS);if(oN<0){return 0}oR+=13}else{if(C.charAt(oR)==";"){oM.push(oS.slice(0));oS.length=0;++oR}else{if((e-oR)<8){return 0}oN=dG(C.substr(oR,8),oS);if(oN<0){return 0}oR+=8}}}for(var oL=0,T=oM.length;oL<T;oL++){for(var oK=0,oQ=oM[oL].length;oK<oQ;oK++){oM[oL][oK]/=100}}return{geoType:oO,geo:oM}}function lv(i){var e=-1;if(i==kw[1]){e=ah}else{if(i==kw[2]){e=e4}else{if(i==kw[3]){e=fD}}}return e}function gk(oK,C){var e=0;var oM=0;var oL=0;for(var T=0;T<6;T++){oL=fu(oK.substr(1+T,1));if(oL<0){return -1-T}e+=oL<<(6*T);oL=fu(oK.substr(7+T,1));if(oL<0){return -7-T}oM+=oL<<(6*T)}C.push(e);C.push(oM);return 0}function dG(oL,T){var C=T.length;if(C<2){return -1}var e=0;var oN=0;var oM=0;for(var oK=0;oK<4;oK++){oM=fu(oL.substr(oK,1));if(oM<0){return -1-oK}e+=oM<<(6*oK);oM=fu(oL.substr(4+oK,1));if(oM<0){return -5-oK}oN+=oM<<(6*oK)}if(e>e0){e=e0-e}if(oN>e0){oN=e0-oN}T.push(T[C-2]+e);T.push(T[C-1]+oN);return 0}function fu(i){var e=i.charCodeAt(0);if(i>="A"&&i<="Z"){return e-"A".charCodeAt(0)}else{if(i>="a"&&i<="z"){return(26+e-"a".charCodeAt(0))}else{if(i>="0"&&i<="9"){return(52+e-"0".charCodeAt(0))}else{if(i=="+"){return 62}else{if(i=="/"){return 63}}}}}return -1}cK.pathToPoints=function(oL){var T=[];if(typeof oL!=="string"){return T}else{var oK=oL.split(";");for(var C=0;C<oK.length;C++){var e=oK[C].split(",");T.push(new d9(e[0],e[1]))}}return T};cK.pointsToString=function(oK){var T="";if(typeof oK!=="object"){return oK}else{for(var C=0;C<oK.length;C++){var e=oK[C].lat+","+oK[C].lng;if(C!==oK.length-1){T=T+e+"|"}else{T=T+e}}}return T};cK.stringToPoints=function(oL){var T=[];if(typeof oL!=="string"||!oL){return T}else{var oK=oL.split("|");for(var C=0;C<oK.length;C++){var e=oK[C].split(",");T.push(new d9(e[1],e[0]))}}return T};window.BMAP_POI_TYPE_NORMAL=0;window.BMAP_POI_TYPE_BUSSTOP=1;window.BMAP_POI_TYPE_BUSLINE=2;window.BMAP_POI_TYPE_SUBSTOP=3;window.BMAP_POI_TYPE_SUBLINE=4;var ae=0;var k6=1;var iq={};window.APIPack=iq;function fb(){}fb.dictionary={start:["鍑哄彂","start"],startP:["璧风偣","start"],endP:["缁堢偣","destination"],startShort:["璧�","S"],endShort:["缁�","E"],via:["缁忚繃","via"],waypoint:["閫旂粡鐐�","waypoint"],travel:["琛岄┒","travel"],route:["璺嚎","route"],arrive:["鍒拌揪","arrive"],"goto":["鍓嶅線","go to"],walk:["姝ヨ","walking"],ride:["楠戣","riding"],ebike:["鐢靛姩杞�","e-bike"],drive:["椹捐溅","driving"],take:["涔樺潗","take"],meter:["绫�","meter"],km:["鍏噷","kilometer"],m_2:["绫�","m"],km_2:["鍏噷","km"],feet:["鑻卞昂","feet"],mile:["鑻遍噷","mile"],days:["澶�","days"],hours:["灏忔椂","hours"],minutes:["鍒嗛挓","minutes"],total:["鍏�","total"],to:["鍒�","to"],towards:["鏈�","towards"],towards2:["鍚�","towards"],item:["鏉�","item"],onTheLeft:["宸︿晶鐨�","on the left"],onTheRight:["鍙充晶鐨�","on the right"],pass:["杩�","pass"],at:["鍦�","at"],leave:["绂诲紑","leave"],from:["浠�","from"],"continue":["缁х画","continue"],goStraight:["鐩磋蛋","go straight"],takeRightTurnAhead:["鍙冲墠鏂硅浆寮�","take a right turn ahead"],takeLeftTurnAhead:["宸﹀墠鏂硅浆寮�","take a left turn ahead"],takeRightTurnBehind:["鍙冲悗鏂硅浆寮�","take a right turn onto the road behind you"],takeLeftTurnBehind:["宸﹀悗鏂硅浆寮�","take a left turn onto the road behind you"],turnAround:["鍚戝悗杞�","turn around"],turnAround_2:["璋冨ご","turn around"],turnLeft:["宸﹁浆","turn left"],turnRight:["鍙宠浆","turn right"],keepLeft:["闈犲乏","keep left"],keepRight:["闈犲彸","keep right"],turnRightAhead:["鍚戝彸鍓嶆柟杞�","turn right ahead"],turnLeftAhead:["鍚戝乏鍓嶆柟杞�","turn left ahead"],turnRightBehind:["鍚戝彸鍚庢柟杞�","turn right behind"],turnLeftBehind:["鍚戝乏鍚庢柟杞�","turn left behind"],turnLeftAndContinueStraight:["宸﹁浆绌胯繃椹矾骞剁户缁悜鍓�","turn left across the street and continue straight"],turnRightAndContinueStraight:["鍙宠浆绌胯繃椹矾骞剁户缁悜鍓�","turn right across the street and continue straight"],turnLeftAndGoBack:["宸﹁浆绌胯繃椹矾骞跺線鍥炶蛋","turn left across the street and go back"],turnRightAndGoBack:["鍙宠浆绌胯繃椹矾骞跺線鍥炶蛋","turn right across the street and go back"],dueNorth:["姝e寳鏂瑰悜","due north"],northeast:["涓滃寳鏂瑰悜","northeast"],dueEast:["姝d笢鏂瑰悜","due east"],southeast:["涓滃崡鏂瑰悜","southeast"],dueSouth:["姝e崡鏂瑰悜","due south"],southwest:["瑗垮崡鏂瑰悜","southwest"],dueWest:["姝hタ鏂瑰悜","due west"],northwest:["瑗垮寳鏂瑰悜","northwest"],baidumap:["鐧惧害鍦板浘","Baidu Map"],address:["鍦板潃","address"],phone:["鐢佃瘽","phone"],detail:["璇︽儏","detail"],view:["鏌ョ湅","view"],more:["鏇村","more"],result:["缁撴灉","result"],search:["鎼滅储","search"],city:["鍩庡競","city"],list:["鍒楄〃","list"],home:["棣栭〉","home"],previous:["涓婁竴椤�","previous"],next:["涓嬩竴椤�","next"],previousStep:["涓婁竴姝�","previous step"],nextStep:["涓嬩竴姝�","next step"],getOn:["涓婅溅","get on"],getOff:["涓嬭溅","get off"],bus:["鍏氦杞�","bus"],subway:["鍦伴搧","subway"],transport:["浜ら�氬伐鍏�","transportation"],take:["涔樺潗","take"],"public":["鍏叡","public"],stopStation:["绔�","stop"],station:["绔�","station"],number:["娆�","number"],about:["绾�","about"],"delete":["鍒犻櫎","delete"],recommend:["鎺ㄨ崘","recommend"],chooseFor:["閫変负","choose for"],delPoint:["鍒犻櫎璇ョ偣","delete this point"],dragToChangeRoute:["鎷栧姩浠ユ洿鏀硅矾绾�","Drag to change route"],departFromStart:["浠庤捣鐐瑰嚭鍙�","depart from starting point"],arriveAtEnd:["鍒拌揪鐩殑鍦�","arrive at the destination"],lastEndTime:["棣栨湯杞︽椂闂�","first and last transit times"],ownCompany:["鎵�灞炲叕鍙�","operating company"],alongSubways:["娌跨嚎鍦伴搧绔�","subway stations along the route"],alongBusStops:["娌跨嚎鍏氦绔欑偣","bus stops along the route"],noLocResult:["鎶辨瓑锛屾湭鎵惧埌鐩稿叧鍦扮偣銆�","Sorry, no relevant locations found."],selectAccuratePoint:["璇烽�夋嫨鍑嗙‘鐨勮捣鐐广�侀�旂粡鐐规垨缁堢偣銆�","Please select an accurate starting point, via-point or destination."],invalidKey:["鎶辨瓑锛屾偍鎵�鎻愪緵鐨刱ey鏃犳晥銆�","Sorry, the key you provided is invalid."],roundabout:["鐜矝","roundabout"],unknownRoad:["鏃犲睘鎬ч亾璺�","unclassified road"],mainRoad:["涓昏矾","main road"],highwayConnector:["楂橀�熻繛鎺ヨ矾","highway connector"],roadSegWithinInter:["浜ゅ弶鐐瑰唴璺","road segment within intersection"],connectingRoad:["杩炴帴閬撹矾","connecting road"],parkInnerRoad:["鍋滆溅鍦哄唴閮ㄩ亾璺�","parking lot internal road"],serviceInnerRoad:["鏈嶅姟鍖哄唴閮ㄩ亾璺�","service area internal road"],bridge:["妗�","bridge"],pedeStreet:["姝ヨ琛�","pedestrian street"],serviceRoad:["杈呰矾","service road"],ramp:["鍖濋亾","ramp"],fullyEnclosedRoad:["鍏ㄥ皝闂亾璺�","fully enclosed road "],undefinedTrafficArea:["鏈畾涔変氦閫氬尯鍩�","undefined traffic area"],poiConnectorRoad:["POI杩炴帴璺�","POI connector road"],tunnel:["闅ч亾","tunnel"],footpath:["姝ヨ閬�","footpath"],busOnlyLane:["鍏氦涓撶敤閬�","bus-only lane"],advancedLeftLane:["鎻愬墠鍙宠浆閬�","advanced right-turn lane"]};fb.LetterEnum={DEFAULT:0,UPPER_FIRST:1,UPPER_ALL:2,LOWER_ALL:3};fb.SpaceEnum={DEFAULT:0,FRONT:1,END:2,BOTH:3};fb.getIndexByLanguage=function(e){switch(e){case BMAP_LANGUAGE_ZH:return 0;case BMAP_LANGUAGE_EN:return 1;default:return 0}};fb.translate=function(oM,oO,T){if(oO!==BMAP_LANGUAGE_EN&&oO!==BMAP_LANGUAGE_ZH){oO=BMAP_LANGUAGE_ZH}var oN={language:[BMAP_LANGUAGE_EN],singleLetter:fb.LetterEnum.DEFAULT,singleSpace:fb.SpaceEnum.DEFAULT,join:" "};Object.assign(oN,T||{});var oL=oM;if(!(oM instanceof Array)){oL=[oM]}var C=false;for(var oK=0;oK<oN.language.length;oK++){if(oN.language[oK]===oO){C=true}}for(var oK=0;oK<oL.length;oK++){oL[oK]=this.translateOne(oL[oK],oO);if(C){oL[oK]=this.letterParse(oL[oK],oN.singleLetter);oL[oK]=this.spaceParse(oL[oK],oN.singleSpace)}}var e="";if(C){e=oL.join(oN.join)}else{e=oL.join("")}return this.backDoFormat(e,oO,T||{})};fb.backDoFormat=function(e,oM,T){var oL={language:[BMAP_LANGUAGE_EN],space:fb.SpaceEnum.DEFAULT,letter:fb.LetterEnum.DEFAULT};Object.assign(oL,T);var C=false;for(var oK=0;oK<oL.language.length;oK++){if(oL.language[oK]===oM){C=true}}if(!C){return e}e=this.letterParse(e,oL.letter);e=this.spaceParse(e,oL.space);return e};fb.translateOne=function(e,T){if(T!==BMAP_LANGUAGE_EN&&T!==BMAP_LANGUAGE_ZH){T=BMAP_LANGUAGE_ZH}if(typeof e==="number"||(typeof e==="string"&&e.trim()==="")){return e}const i=this.dictionary[e];if(!i){return e}const C=i[this.getIndexByLanguage(T)];if(!C){return i[0]||e}return C};fb.letterParse=function(e,i){if(!e){return e}switch(i){case fb.LetterEnum.UPPER_FIRST:e=e[0].toUpperCase()+e.slice(1);break;case fb.LetterEnum.UPPER_ALL:e=e.toUpperCase();break;case fb.LetterEnum.LOWER_ALL:e=e.toLowerCase();break;default:break}return e};fb.spaceParse=function(e,i){if(!e){return e}switch(i){case fb.SpaceEnum.FRONT:e=" "+e;break;case fb.SpaceEnum.END:e=e+" ";break;case fb.SpaceEnum.BOTH:e=[" ",e," "].join("");break;default:break}return e};function ba(T,C){eX.call(this);this._loc={};this.setLocation(T);C=C||{};C.renderOptions=C.renderOptions||{};this._userSetLanguage=false;var e=ba._getLocType(T);var i=this;if(e===bZ){this._language=T.getLanguage();T.on("language_change",function(){if(!i._userSetLanguage){i._language=T.getLanguage()}})}else{this._language=BMAP_LANGUAGE_ZH}if(C.language&&(C.language===BMAP_LANGUAGE_ZH||C.language===BMAP_LANGUAGE_EN)){this._userSetLanguage=true;this._language=C.language}this._opts={renderOptions:{panel:C.renderOptions.panel||null,map:C.renderOptions.map||null,autoViewport:C.renderOptions.autoViewport||true,viewportOptions:C.renderOptions.viewportOptions||{},selectFirstResult:C.renderOptions.selectFirstResult,highlightMode:C.renderOptions.highlightMode,enableDragging:C.renderOptions.enableDragging||false,lineLayerStyle:C.renderOptions.lineLayerStyle||{},polylineStyle:C.renderOptions.polylineStyle||{},isTop:C.renderOptions.isTop||false,},onSearchComplete:C.onSearchComplete||function(){},onMarkersSet:C.onMarkersSet||function(){},onInfoHtmlSet:C.onInfoHtmlSet||function(){},onResultsHtmlSet:C.onResultsHtmlSet||function(){},onGetBusListComplete:C.onGetBusListComplete||function(){},onGetBusLineComplete:C.onGetBusLineComplete||function(){},onBusListHtmlSet:C.onBusListHtmlSet||function(){},onBusLineHtmlSet:C.onBusLineHtmlSet||function(){},onPolylinesSet:C.onPolylinesSet||function(){},reqFrom:C.reqFrom||""};if(typeof C!="undefined"&&typeof C.renderOptions!="undefined"&&typeof C.renderOptions["autoViewport"]!="undefined"){this._opts.renderOptions.autoViewport=C.renderOptions["autoViewport"]}else{this._opts.renderOptions.autoViewport=true}this._opts.renderOptions.panel=hv.G(this._opts.renderOptions.panel)}ba._getLocType=function(e){if(!e){return ji}if(typeof e=="string"){return m5}if(e instanceof d9||e instanceof d1){return cu}if(e instanceof li){return bZ}if(typeof e=="number"){return fM}return ji};ba.inherits(eX,"BaseSearch");hv.extend(ba.prototype,{getResults:function(){if(!this._isMultiKey){return this._results}else{return this._arrResults}},enableAutoViewport:function(){this._opts.renderOptions.autoViewport=true},disableAutoViewport:function(){this._opts.renderOptions.autoViewport=false},setLocation:function(e){if(!e){return}this._loc.src=e},setSearchCompleteCallback:function(e){this._opts.onSearchComplete=e||function(){}},setMarkersSetCallback:function(e){this._opts.onMarkersSet=e||function(){}},setPolylinesSetCallback:function(e){this._opts.onPolylinesSet=e||function(){}},setInfoHtmlSetCallback:function(e){this._opts.onInfoHtmlSet=e||function(){}},setResultsHtmlSetCallback:function(e){this._opts.onResultsHtmlSet=e||function(){}},getStatus:function(){return this._status}});var ee=function(oL,T){ba.call(this,oL,T);T=T||{};T.renderOptions=T.renderOptions||{};this.setPageCapacity(T.pageCapacity);this.setPageNum(T.pageNum);var e=T.renderOptions["selectFirstResult"];if(typeof e==="undefined"){e=K.uiVersionIsGL()}if(e){this.enableFirstResultSelection()}else{this.disableFirstResultSelection()}var oM=T.resultListRenderOptions||{};if(!this._opts.resultListRenderOptions){this._opts.resultListRenderOptions={}}var C=["displayPlaceImage","displayRating","displayTag","displayPrice","displayAddress","displayShopHours","displayFeaturedTag","displayComment","displayPaging","resetScrollOnPageChange"];hv.each(C,function(oN){if(typeof oM[oN]==="undefined"){oM[oN]=true}this._opts.resultListRenderOptions[oN]=Boolean(oM[oN])}.bind(this));this._opts.cityLimit=typeof T.cityLimit==="boolean"?T.cityLimit:true;this._opts.resultListRenderOptions.displayContactInformation=Boolean(oM.displayContactInformation);this._opts.resultListRenderOptions.contactInformationCount=typeof oM.contactInformationCount==="number"?oM.contactInformationCount:2;this._overlays=[];this._arrPois=[];this._curIndex=-1;this._queryList=[];var i=this;ki.load("localSearch",function(){i&&i._check()},true);if(T.renderOptions["map"]){var oK=T.renderOptions["map"];oK.on("destroy",function(){delete i})}};ee.inherits(ba,"LocalSearch");ee.DEFAULT_PAGE_CAPACITY=10;ee.MIN_PAGE_CAPACITY=1;ee.MAX_PAGE_CAPACITY=100;ee.DEFAULT_RADIUS=2000;ee.MAX_RADIUS=100000;ee.DEFAULT_PAGE_NUM=0;hv.extend(ee.prototype,{search:function(e,i){this._queryList.push({method:"search",arguments:[e,i]});kU.sendMessage("LocalSearch","search")},searchInBounds:function(e,C,i){this._queryList.push({method:"searchInBounds",arguments:[e,C,i]});kU.sendMessage("LocalSearch","searchInBounds")},searchNearby:function(C,i,e,T){this._queryList.push({method:"searchNearby",arguments:[C,i,e,T]});kU.sendMessage("LocalSearch","searchNearby")},clearResults:function(){delete this._json;delete this._status;delete this._results;delete this._ud;this._curIndex=-1;this._setStatus();if(this._opts.renderOptions.panel){this._opts.renderOptions.panel.innerHTML=""}},clearSelected:function(){},gotoPage:function(){},enableFirstResultSelection:function(){this._opts.renderOptions.selectFirstResult=true},disableFirstResultSelection:function(){this._opts.renderOptions.selectFirstResult=false},setPageCapacity:function(e){if(typeof e=="number"&&!isNaN(e)){this._opts.pageCapacity=e<1?ee.DEFAULT_PAGE_CAPACITY:(e>ee.MAX_PAGE_CAPACITY?ee.DEFAULT_PAGE_CAPACITY:e)}else{this._opts.pageCapacity=ee.DEFAULT_PAGE_CAPACITY}},getPageCapacity:function(){return this._opts.pageCapacity},setPageNum:function(e){if(typeof e=="number"&&!isNaN(e)&&e>=0){this._opts.pageNum=e}else{this._opts.pageNum=ee.DEFAULT_PAGE_NUM}},getPageNum:function(){return this._opts.pageNum},toString:function(){return"LocalSearch"}});function b5(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("Geocoder")}this._opts={};this.setOptions(i||{});this._queryList=[];var e=this;ki.load("otherSearch",function(){e._asyncSearch()})}b5.inherits(eX,"Geocoder");hv.extend(b5.prototype,{getPoint:function(e,C,i){kU.sendMessage("Geocoder","getPoint");this._queryList.push({method:"getPoint",arguments:[e,C,i]})},getLocation:function(e,C,i){kU.sendMessage("Geocoder","getLocation");this._queryList.push({method:"getLocation",arguments:[e,C,i]})},setOptions:function(e){hv.extend(this._opts,e||{});if(this._opts.language&&(this._opts.language===BMAP_LANGUAGE_ZH||this._opts.language===BMAP_LANGUAGE_EN)){this._language=this._opts.language}else{this._language=BMAP_LANGUAGE_ZH}},toString:function(){return"Geocoder"}});function eG(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("Geolocation")}e=e||{};this.config={timeout:e.timeout||1000*10,maximumAge:e.maximumAge||0,enableHighAccuracy:e.enableHighAccuracy===undefined?true:e.enableHighAccuracy,SDKLocation:e.SDKLocation||false};this._pendingCalls=[];var i=this;ki.load("otherSearch",function(){var C=i._pendingCalls.length;for(var T=0;T<C;T++){var oK=i._pendingCalls[T];i[oK.method].apply(i,oK.arguments)}})}hv.extend(eG.prototype,{getCurrentPosition:function(e,i){this._pendingCalls.push({method:"getCurrentPosition",arguments:arguments})},getStatus:function(){return BMAP_STATUS_UNKNOWN_LOCATION},enableSDKLocation:function(){if(c9()){this.config.SDKLocation=true}},disableSDKLocation:function(){this.config.SDKLocation=false}});function hX(){if(!K.apiVersionIsGL()){console.warn("[BMap] Boundary is deprecated, use BMap.DistrictLayer instead")}if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("Boundary")}this._queryList=[];var e=this;ki.load("otherSearch",function(){e._asyncSearch()})}hX.inherits(eX,"Boundary");hv.extend(hX.prototype,{get:function(i,e){this._queryList.push({method:"get",arguments:[i,e]})},toString:function(){return"Boundary"},parsebdStr:function(i,e){this._queryList.push({method:"parsebdStr",arguments:[i,e]})}});function hO(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("LocalCity")}i=i||{};i.renderOptions=i.renderOptions||{};this._opts={renderOptions:{map:i.renderOptions.map||null}};this._queryList=[];var e=this;ki.load("otherSearch",function(){e._asyncSearch()})}hO.inherits(eX,"LocalCity");hv.extend(hO.prototype,{get:function(e){this._queryList.push({method:"get",arguments:[e]})},toString:function(){return"LocalCity"}});function kA(e,C){eX.call(this);this.markersList=[];this.destList=[];this.pointsList=[];this._opts=C;this.json=e;this.map=this._opts.renderOptions.map||null;this.sType=this._opts.sType;this.infoWindow=null;this.curPointIndex=0;this.startName="";this.endIndex=1;this.endName="";this.resCity=[0,0,0,0,0,0,0];this.locPois=[];this.curPageIndex=[1,1,1,1,1,1,1];this.totalPage=[1,1,1,1,1,1,1];this.resCount=[0,0,0,0,0,0,0];this.resType=[0,0,0,0,0,0,0];this.qInfo=[{n:"",c:0,u:0,x:0,y:0,t:-1},{n:"",c:0,u:0,x:0,y:0,t:-1},{n:"",c:0,u:0,x:0,y:0,t:-1},{n:"",c:0,u:0,x:0,y:0,t:-1},{n:"",c:0,u:0,x:0,y:0,t:-1},{n:"",c:0,u:0,x:0,y:0,t:-1},{n:"",c:0,u:0,x:0,y:0,t:-1}];this.curSelectedIndex=-1;this.tpList=[];this.tpListInMap=[];this._language=C.language===undefined?BMAP_LANGUAGE_ZH:C.language;var i=this;ki.load("route",function(){})}kA.inherits(eX,"RouteAddr");function bH(T,C){hv.BaseClass.call(this);this._content=hv.G(T);this._defaultContentDisplay=this._content.style.display;if(this._defaultContentDisplay==="none"||!this._defaultContentDisplay){this._defaultContentDisplay="block"}this._opts=C||{};if(!this._opts.renderOptions){this._opts.renderOptions={}}var i={displayCarousel:true,displayTag:true,displayRating:true,displayPrice:true,displayBangdan:true,displayTradeTag:true,displayShopHours:true,displayContactInformation:true,contactInformationCount:Infinity,displayAddress:true,displayComment:false,displayCommentTotalCount:true};for(var e in i){if(this._opts.renderOptions.hasOwnProperty(e)){continue}this._opts.renderOptions[e]=i[e]}ki.load("place",function(){this._draw()}.bind(this))}bH.inherits(hv.BaseClass,"PlaceDetail");hv.extend(bH.prototype,{render:function(e){this._data=e},rerender:function(){if(!this._data){return}this.render(this._data)},setData:function(e){this._data=e},getContent:function(){return this._content},dispose:function(){if(!this._content){return}this._content.innerHTML="";this._content.style.display="none";if(this.overlay){this.overlay.closePlaceDetail()}}});hv.extend(bH,{parsePOIDetail:function(oL,T){if(K.uiVersionIsGL()){return}if(!oL.ext||!oL.ext.detail_info){return}var C=oL.ext.detail_info;var oM={image:C.image||undefined,rating:C.overall_rating||undefined,ratingSrc:C.overall_rating_src||undefined,tag:C.tag||undefined,price:C.price||undefined,shopHours:C.shop_hours||undefined,tradeTag:C.trade_tag||undefined};if(C.bangdan_head&&C.bangdan_head.bid_head){var oK=C.bangdan_head.bid_head;oM.bangdanHead={bidHead:{name:oK.name,rankS:oK.rank_s}}}if(C.comments&&C.comments.length){oM.comments=[];hv.each(C.comments,function(oO){var oN={content:bH.parseComment(oO.content),userName:bH.parseComment(oO.user_name)};oM.comments.push(oN)}.bind(this))}var e=oL.admin_info;if(e){oM.address=e.town_name||e.area_name||e.city_name}if(C.vs_content&&C.vs_content.invisible&&C.vs_content.invisible.bigdata&&C.vs_content.invisible.bigdata.photo_album){var i=C.vs_content.invisible.bigdata.photo_album;oM.album=[];hv.each(i,function(oN){oM.album.push({url:oN.url,type:oN.type,iconUrl:oN.icon_url})})}oM.commentNum=C.comment_num;oM.comments=[];hv.each((C.comments||[]),function(oO){var oN={cnName:oO.cn_name,commentPhoto:[],overallRating:oO.overall_rating,userLogo:oO.user_logo,userName:bH.parseComment(oO.user_name),content:bH.parseComment(oO.content),date:oO.date};hv.each((oO.comment_photo||[]),function(oP){oN.commentPhoto.push({picUrl:oP.pic_url})});oM.comments.push(oN)}.bind(this));T.v4aboveExt=oM},parseComment:function(oM){var i="";try{var oL=atob(oM);var C=Uint8Array.from(oL,function(e){return e.charCodeAt(0)});var T=new TextDecoder("utf-8").decode(C);i=T}catch(oK){}return i}});g2.prototype.openPlaceDetail=function(e,i){e.overlay=this;e._openPlaceDetailOpts=i;var C=this.map;if(!C){return}if(!C.temp){C.temp={}}C.temp._placeDetail=e};g2.prototype.closePlaceDetail=function(){var e=this.map;if(!e||!e.temp||!e.temp._placeDetail){return}e.temp._placeDetail.overlay=null;e.temp._placeDetail._openPlaceDetailOpts=null};function gX(C,i){ba.call(this,C,i);this.QUERY_TYPE_BUSLIST=e2;this.RETURN_TYPE_BUSLIST=ew;this.QUERY_TYPE_BUSLINE=gH;this.RETURN_TYPE_BUSLINE=gm;this._queryList=[];var e=this;ki.load("buslineSearch",function(){e._asyncSearch()})}var im=K.staticHost+"/wolfman/static/common/images/";gX._iconOpen=K.apiIMG+"/iw_plus.gif";gX._iconClose=K.apiIMG+"/iw_minus.gif";gX._stopUrl=im+"new/bus-stop-1x_ddd4723.png";gX.inherits(ba,"BusLineSearch");hv.extend(gX.prototype,{getBusList:function(e){kU.sendMessage("BusLineSearch","getBusList");this._queryList.push({method:"getBusList",arguments:[e]})},getBusLine:function(e){this._queryList.push({method:"getBusLine",arguments:[e]})},setGetBusListCompleteCallback:function(e){this._opts.onGetBusListComplete=e||function(){}},setGetBusLineCompleteCallback:function(e){this._opts.onGetBusLineComplete=e||function(){}},setBusListHtmlSetCallback:function(e){this._opts.onBusListHtmlSet=e||function(){}},setBusLineHtmlSetCallback:function(e){this._opts.onBusLineHtmlSet=e||function(){}},setPolylinesSetCallback:function(e){this._opts.onPolylinesSet=e||function(){}}});function mW(i){ba.call(this,i);i=i||{};this._options={input:i.input||null,suggestionCount:i.suggestionCount,showSuggestion:i.showSuggestion===undefined?true:i.showSuggestion,baseDom:i.baseDom||null,types:i.types||[],onSearchComplete:i.onSearchComplete||function(){},onConfirm:i.onConfirm,onHighlight:i.onHighlight};this._loc.src=i.location||"鍏ㄥ浗";this._word="";this._show=false;this._suggestion=null;this._inputValue="";this._initialize();var e=this;ki.load("autocomplete",function(){e._asyncSearch()},true)}mW.inherits(ba,"Autocomplete");hv.extend(mW.prototype,{_initialize:function(){},show:function(){this._show=true},hide:function(){this._show=false},setTypes:function(e){this._options.types=e},setLocation:function(e){this._loc.src=e},search:function(e){kU.sendMessage("Autocomplete","search");this._word=e},setInputValue:function(e){this._inputValue=e},setSearchCompleteCallback:function(e){this._options.onSearchComplete=e}});var oa=function(i,e){ba.call(this,i,e)};hv.inherit(oa,ba,"BaseRoute");oa.STYLE_BUCKETS=["transit","walking","driving","riding","highlight","jumpLine","decorate"];oa.STYLE_BUCKET_BY_TYPE={0:"transit",1:"transit",2:"walking",3:"driving",4:"highlight",5:"highlight",6:"riding",7:"riding",8:"highlight"};hv.extend(oa.prototype,{clearResults:function(){},setPolylineStyle:function(i){var e=this._opts.renderOptions;e.polylineStyle=hv.extend(e.polylineStyle||{},i);if(this._restylePolylines){this._restylePolylines()}}});window.BMAP_TRANSIT_POLICY_RECOMMEND=0;window.BMAP_TRANSIT_POLICY_LEAST_TIME=4;window.BMAP_TRANSIT_POLICY_LEAST_TRANSFER=1;window.BMAP_TRANSIT_POLICY_LEAST_WALKING=2;window.BMAP_TRANSIT_POLICY_AVOID_SUBWAYS=3;window.BMAP_TRANSIT_POLICY_FIRST_SUBWAYS=5;window.BMAP_LINE_TYPE_BUS=0;window.BMAP_LINE_TYPE_SUBWAY=1;window.BMAP_LINE_TYPE_FERRY=2;window.BMAP_LINE_TYPE_TRAIN=3;window.BMAP_LINE_TYPE_AIRPLANE=4;window.BMAP_LINE_TYPE_COACH=5;var l1=3;var gj=4;var az=1;var lY=2;var bE=5;var ez=6;window.BMAP_TRANSIT_TYPE_IN_CITY=0;window.BMAP_TRANSIT_TYPE_CROSS_CITY=1;window.BMAP_TRANSIT_PLAN_TYPE_ROUTE=0;window.BMAP_TRANSIT_PLAN_TYPE_LINE=1;window.BMAP_TRANSIT_TYPE_POLICY_TRAIN=0;window.BMAP_TRANSIT_TYPE_POLICY_AIRPLANE=1;window.BMAP_TRANSIT_TYPE_POLICY_COACH=2;window.BMAP_INTERCITY_POLICY_LEAST_TIME=0;window.BMAP_INTERCITY_POLICY_EARLY_START=1;window.BMAP_INTERCITY_POLICY_CHEAP_PRICE=2;function hh(C,i){oa.call(this,C,i);i=i||{};this.setPolicy(i.policy);this.setIntercityPolicy(i.intercityPolicy);this.setTransitTypePolicy(i.transitTypePolicy);this.setPageCapacity(i.pageCapacity);this.QUERY_TYPE=kc;this.RETURN_TYPE=hp;this.ROUTE_TYPE=k6;this._overlays=[];this._curIndex=-1;this._opts._enableTraffic=i.enableTraffic||false;this._queryList=[];var e=this;ki.load("route",function(){e._asyncSearch()},true)}hh.MAX_PAGE_CAPACITY=100;hh.LINE_TYPE_MAPPING=[0,1,0,0,0,0,0,0,2,0,0,0,1,1,1];hh.LINE_TYPE_MAPPING_CROSS_CITY=[0,3,4,0,0,0,5];hv.inherit(hh,oa,"TransitRoute");hv.extend(hh.prototype,{setPolicy:function(e){if(e>=BMAP_TRANSIT_POLICY_RECOMMEND&&e<=BMAP_TRANSIT_POLICY_FIRST_SUBWAYS){this._opts.policy=e}else{this._opts.policy=BMAP_TRANSIT_POLICY_RECOMMEND}},setIntercityPolicy:function(e){if(e>=BMAP_INTERCITY_POLICY_LEAST_TIME&&e<=BMAP_INTERCITY_POLICY_CHEAP_PRICE){this._opts.intercityPolicy=e}else{this._opts.intercityPolicy=BMAP_INTERCITY_POLICY_LEAST_TIME}},setTransitTypePolicy:function(e){if(e>=BMAP_TRANSIT_TYPE_POLICY_TRAIN&&e<=BMAP_TRANSIT_TYPE_POLICY_COACH){this._opts.transitTypePolicy=e}else{this._opts.transitTypePolicy=BMAP_TRANSIT_TYPE_POLICY_TRAIN}},_internalSearch:function(i,e){this._queryList.push({method:"_internalSearch",arguments:[i,e]})},search:function(i,e){kU.sendMessage("TransitRoute","search");this._queryList.push({method:"search",arguments:[i,e]})},setPageCapacity:function(e){if(typeof e==="string"){e=parseInt(e,10);if(isNaN(e)){this._opts.pageCapacity=hh.MAX_PAGE_CAPACITY;return}}if(typeof e!=="number"){this._opts.pageCapacity=hh.MAX_PAGE_CAPACITY;return}if(e>=1&&e<=hh.MAX_PAGE_CAPACITY){this._opts.pageCapacity=Math.round(e)}else{this._opts.pageCapacity=hh.MAX_PAGE_CAPACITY}},toString:function(){return"TransitRoute"},_shortTitle:function(e){return e.replace(/\(.*\)/,"")}});window.BMAP_HIGHLIGHT_STEP=1;window.BMAP_HIGHLIGHT_ROUTE=2;var ek=function(e,T){oa.call(this,e,T);this._overlays=[];this._curIndex=-1;this._queryList=[];var C=this;var i=this._opts.renderOptions;if(i.highlightMode!==BMAP_HIGHLIGHT_STEP&&i.highlightMode!==BMAP_HIGHLIGHT_ROUTE){i.highlightMode=BMAP_HIGHLIGHT_STEP}this._enableDragging=this._opts.renderOptions.enableDragging?true:false;ki.load("route",function(){C._asyncSearch()},true);if(this.init_d){this.init_d()}};ek.ROAD_TYPE=["","roundabout","unknownRoad","mainRoad","highwayConnector","roadSegWithinInter","connectingRoad","parkInnerRoad","serviceInnerRoad","bridge","pedeStreet","serviceRoad","ramp","fullyEnclosedRoad","undefinedTrafficArea","poiConnectorRoad","tunnel","footpath","busOnlyLane","advancedLeftLane",];hv.inherit(ek,oa,"DWRoute");hv.extend(ek.prototype,{search:function(C,e,i){kU.sendMessage(this._className,"search");this._queryList.push({method:"search",arguments:[C,e,i]})}});var mB=function(e,oK){oa.call(this,e,oK);this._overlays=[];this._queryList=[];var T=this;this.map=oK.renderOptions.map;this._enableDragging=this._opts.renderOptions.enableDragging?true:false;this._lineLayerStyle={lineLayerColor:this._opts.renderOptions.lineLayerStyle.lineLayerColor||{color:"#0089ff",opacity:1},isTop:this._opts.renderOptions.isTop||false,showTraffic:this._opts.renderOptions.lineLayerStyle.showTraffic||false,sequence:this._opts.renderOptions.sequence||true,marginLength:this._opts.renderOptions.marginLength||32,borderColor:this._opts.renderOptions.lineLayerStyle.borderColor||"#0089ff",borderMask:this._opts.renderOptions.lineLayerStyle.borderMask||false,borderWeight:this._opts.renderOptions.lineLayerStyle.borderWeight||2,strokeWeight:this._opts.renderOptions.lineLayerStyle.strokeWeight||6,strokeLineJoin:this._opts.renderOptions.lineLayerStyle.strokeLineJoin||"round",strokeLineCap:this._opts.renderOptions.lineLayerStyle.strokeLineCap||"round",strokeTextureUrl:K.apiIMG+"/up-to.png",strokeTextureWidth:this._opts.renderOptions.lineLayerStyle.strokeTextureWidth||32,strokeTextureHeight:this._opts.renderOptions.lineLayerStyle.strokeTextureHeight||64,};if(this._opts.renderOptions.lineLayerStyle.strokeTextureUrl){this._lineLayerStyle.strokeTextureUrl=this._opts.renderOptions.lineLayerStyle.strokeTextureUrl}else{if(this._opts.renderOptions.lineLayerStyle.strokeTextureUrl===null){delete this._lineLayerStyle.strokeTextureUrl}}if(this.map){this._menu=new BMapGL.ContextMenu();var i=fb.translate("delPoint",this._language);var C=new lx(i,function(oN,oM,oL){T._deleteVia(oL.curNo-1)},60);this._menu.addItem(C);this.map.addContextMenu(this._menu,true);this.map.addEventListener("onlanguage_change",function(oL){C.setText(fb.translate("delPoint",T.map.getLanguage()))})}ki.load("route",function(){T._asyncSearch()},true);if(this.init_d){this.init_d()}};hv.inherit(mB,oa,"LineLayerRoute");hv.extend(mB.prototype,{search:function(C,e,i){kU.sendMessage(this._className,"search");this._queryList.push({method:"search",arguments:[C,e,i]})}});window.BMAP_DRIVING_POLICY_DEFAULT=0;window.BMAP_DRIVING_POLICY_DESTANCE=2;window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS=3;window.BMAP_DRIVING_POLICY_FIRST_HIGHWAYS=4;window.BMAP_DRIVING_POLICY_AVOID_CONGESTION=5;window.BMAP_DRIVING_POLICY_AVOID_PAY=6;window.BMAP_DRIVING_POLICY_HIGHWAYS_AVOID_CONGESTION=7;window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS_CONGESTION=8;window.BMAP_DRIVING_POLICY_AVOID_CONGESTION_PAY=9;window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS_CONGESTION_PAY=10;window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS_PAY=11;window.BMAP_DRIVING_POLICY_DISTANCE_PRIORITY=12;window.BMAP_DRIVING_POLICY_TIME_PRIORITY=13;window.BMAP_TRAFFICE_STATUS_NONE=0;window.BMAP_TRAFFICE_STATUS_NORMAL=1;window.BMAP_TRAFFICE_STATUS_SLOW=2;window.BMAP_TRAFFICE_STATUS_JAM=3;function dY(i,C){ek.call(this,i,C);C=C||{};var e=!K.apiVersionIsGL();this._opts._enableTraffic=(typeof C.enableTraffic==="boolean")?C.enableTraffic:e;this.setPolicy(C.policy);this.alternatives=C.alternatives?1:0;this.avoidFerry=C.avoidFerry?1:0;this.QUERY_TYPE=bo;this.RETURN_TYPE=a2;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_DRIVING;kU.sendMessage("DrivingRoute","search")}function iS(e,i){mB.call(this,e,i);i=i||{};this.setPolicy(i.policy);this.alternatives=i.alternatives?1:0;this.avoidFerry=i.avoidFerry?1:0;this.QUERY_TYPE=bo;kU.sendMessage("DrivingRoute","searchLine")}hv.inherit(iS,mB,"DrivingRouteLine");hv.inherit(dY,ek,"DrivingRoute");dY.prototype.setPolicy=function(e){if(e>=BMAP_DRIVING_POLICY_DEFAULT&&e<=BMAP_DRIVING_POLICY_TIME_PRIORITY){this._opts.policy=e}else{this._opts.policy=BMAP_DRIVING_POLICY_DEFAULT}};iS.prototype.setPolicy=function(e){if(e>=BMAP_DRIVING_POLICY_DEFAULT&&e<=BMAP_DRIVING_POLICY_TIME_PRIORITY){this._opts.policy=e}else{this._opts.policy=BMAP_DRIVING_POLICY_DEFAULT}};function h3(e,i){ek.call(this,e,i);this.QUERY_TYPE=lL;this.RETURN_TYPE=jc;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_WALKING;this._enableDragging=false}hv.inherit(h3,ek,"WalkingRoute");function eT(e,i){ek.call(this,e,i);this.QUERY_TYPE=kY;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_RIDING;this._enableDragging=false}hv.inherit(eT,ek,"RidingRoute");function cH(e,i){eT.call(this,e,i);this.QUERY_TYPE=mZ}hv.inherit(cH,eT,"EBikeRoute");function ak(e,i){mB.call(this,e,i);i=i||{};if(i.renderOptions&&i.renderOptions["lineType"]!==undefined){this._lineType=i.renderOptions["lineType"]}else{this._lineType=0}this.QUERY_TYPE=dg;this.setPolicy(i.policy)}hv.inherit(ak,mB,"TruckRoute");ak.prototype.setPolicy=function(e){if(e>=BMAP_DRIVING_POLICY_DEFAULT&&e<=BMAP_DRIVING_POLICY_AVOID_CONGESTION){this._opts.policy=e}else{this._opts.policy=BMAP_DRIVING_POLICY_DEFAULT}};window.BMAP_MODE_DRIVING="driving";window.BMAP_MODE_TRANSIT="transit";window.BMAP_MODE_WALKING="walking";window.BMAP_MODE_NAVIGATION="navigation";var bO={web:K.urlProtocol+"//" + window.location.host + "/bmap-api/direction?",android:"bdapp://map/direction?",ios:"baidumap://map/direction?"};function mx(e){this.opts=e||{}}hv.extend(mx.prototype,{routeCall:function(T,e,C){var i=this;ki.load("route",function(){i._asyncSearch(T,e,C)})}});function dB(e,oO){var C=180/Math.pow(2,oO);var T=c9()?2:1;var i=e.width;var oM=e.height;var oP=i/oM>1?oM:i;var oL=C/oP;var oK=Math.floor(oO)+T;var oN=360/(Math.pow(2,oK-2)*2*oL);while(oN>512){oK++;oN=360/(Math.pow(2,oK-2)*2*oL)}if(oK>f.TILE_MAX_ZOOM){oN=oN*Math.pow(2,oK-f.TILE_MAX_ZOOM);oK=f.TILE_MAX_ZOOM}else{if(oK<f.TILE_MIN_ZOOM){oN=oN/Math.pow(2,f.TILE_MIN_ZOOM-oK);oK=f.TILE_MIN_ZOOM}}return{imgZoom:oK,displayTileSize:Math.round(oN)}}function kx(C,e){var i=0;if(C!==0&&e!==0){i=hJ(Math.atan(C/e));i=(i+90)%90;if(C>0&&e<0){i+=90}else{if(C<0&&e<0){i+=180}else{if(C<0&&e>0){i+=270}}}}else{if(C===0){i=e<0?180:0}else{if(e===0){i=C>0?90:270}}}return Math.round(i)}function k2(){var i=navigator.userAgent.match(/android [\d._]+/gi);if(!i||!i.length){return 0}var e=i[0].match(/[\d]+/);return e?parseInt(e[0],10):0}function dh(C){if(C===false){return false}if(typeof dh._supportWebGL==="boolean"){return dh._supportWebGL}var T=false;if(!window.WebGLRenderingContext){T=false}else{if(lt()&&k2()<5){T=false}else{try{var i=document.createElement("canvas");T=!!(i.getContext("webgl")||i.getContext("experimental-webgl"))}catch(oK){T=false}}}dh._supportWebGL=T;return T}function dF(){if(typeof dF._useThumb==="boolean"){return dF._useThumb}var e=navigator.userAgent;dF._useThumb=!!(d4()||e.indexOf("Chrome")>-1||e.indexOf("SAMSUNG-GT-I9508")>-1);return dF._useThumb}function h1(oO,oM){if(!oO||!oM){return 0}var C=oO.lat;var i=oM.lat;var oS=oO.lng;var oN=oM.lng;var T=6371000;var oP=mn(C);var oL=mn(i);var e=mn(i-C);var oR=mn(oN-oS);var oQ=Math.sin(e/2)*Math.sin(e/2)+Math.cos(oP)*Math.cos(oL)*Math.sin(oR/2)*Math.sin(oR/2);var oK=2*Math.atan2(Math.sqrt(oQ),Math.sqrt(1-oQ));return T*oK}function dx(e){return e-Math.floor(e/360)*360}var hU=[K.urlProtocol+"//" + window.location.host + "/bmap-sv0/",K.urlProtocol+"//" + window.location.host + "/bmap-sv1/"];function nN(e){if(typeof e!=="number"){return K.panoTilePath}return hU[Math.abs(e)%hU.length]}function ol(e){var oL=e.split("//");if(oL.length>=2){var oK=oL[1].split("?");if(oK.length>=1){var oN=oK[0].split("/");var C=1;if(window.urlSplitBeginIndex){C=window.urlSplitBeginIndex}var oM="";for(var T=C;T<=oN.length-1;T++){if(T===oN.length-1){oM+=oN[T]}else{oM+=oN[T]+"/"}}return{host:oK[0],origin:oL[0]+"//"+oN[0],path:"/"+oM}}}return null}function eF(oK,oL){var T=(Math.random()*100000).toFixed(0);var C="_panoCbk"+T;var i=false;cv._rd=cv._rd||{};cv._rd[C]=function(oM){i=true;delete cv._rd[C];oL&&oL(oM)};var e=oK+"&callback="+h6+"._rd."+C;e+=np()(e);jW.load(e,null,function(){if(i){return}i=true;delete cv._rd[C];oL&&oL(undefined)})}function jB(T,e){var C=!!(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]);var i=K.apiHost+"/?qt="+T+"&v="+ep();if(!C){i+="&ak="+((typeof hj!=="undefined")?hj:"")}return i+(e||"")}function k3(e){return !!(e&&e.error!==undefined&&e.error===0)}function gT(e){eF(jB("pano_entry"),e)}function iA(e){if(e===undefined){return true}return k3(e)}function n3(){alert("鎮ㄩ渶瑕佺敵璇峰叏鏅湴鍥炬湇鍔′娇鐢ㄦ潈闄�")}var cg=(function(){var i=null;var e=0;return function(C){e+=C;if(i){return}i=setTimeout(function(){var T=e;e=0;i=null;eF(jB("pano_count","&consume="+T),function(oK){if(k3(oK)){return}gT(function(oL){if(!k3(oL)){n3()}})})},5000)}})();function b9(oO,i){var oN="SJvEY5h37ZDh5pHS";var C=1800;var oM=Date.parse(new Date());var T=oM/1000;var oL=(typeof hj!=="undefined")?hj:"";var e=oO+"-"+(T+C)+"-"+oM+"-"+oL+"-"+oN;var oK=md5(e);i=i||{};if(i.isCounter!==false){cg(i.counter||1)}return"auth_key="+(T+C)+"-"+oM+"-"+oL+"-"+oK}function du(i,C){var e=ol(i);if(e){return i+"&"+b9(e.path,C)}return i}function ec(){eX.call(this);this._overlayId="PanoramaOverlay_"+this.hashCode;this._pano=null;this._visible=true}ec.inherits(eX,"PanoramaOverlayBase");hv.extend(ec.prototype,{getOverlayId:function(){return this._overlayId},initialize:function(){},remove:function(){},_setOverlayProperty:function(){}});var mY=0;function f(i,e){if(!(this instanceof f)){return new f(i,e)}if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("Panorama")}eX.call(this);this._guid=f.getGUID();this._container=f._getContainer(i);var T=null;var oK=null;if(e){if(e instanceof li){oK=e}else{T=e;oK=e.map||null}}this._opts={enableScrollWheelZoom:true,visible:true,indoorExitControl:true,indoorFloorControl:false,linksControl:true,clickOnRoad:!K.apiVersionIsGL(),navigationControl:true,closeControl:true,indoorSceneSwitchControl:true,albumsControl:false,albumsControlOptions:{},copyrightControlOptions:{},forceCloseControl:false,haveBreakId:false,hideOverlays:false};this.setOptions(T);this._type="panorama";this._map=oK;this._data=null;this._tmpDataId=null;this._id=null;this._iid=null;this._lastId=null;this._position=null;this._lastPosition=null;this._distanceToLast=0;this._pov={heading:0,pitch:0};this._zoom=1;this._maxZoom=f.MAX_ZOOM;this._minZoom=f.MIN_ZOOM;this._tileMaxZoom=f.TILE_MAX_ZOOM;this._pitchLimit=null;this._links=[];this._topos=[];this._description="";this._relevants=[];this._mode=null;this._sceneType="street";this._visiblePOIType="none";this._nextPanoOptions=null;this._panoOverlays=[];this._isDraw=false;var C=this;if(oK&&oK.on){oK.on("destroy",function(){C.destroy()})}if(this._opts._lazyLoad!==true){this._load()}}f.inherits(eX,"Panorama");f.MIN_ZINDEX=1200;f.getMinZIndex=function(){return K.apiVersionIsGL()?20:f.MIN_ZINDEX};f.MAX_ZOOM=4;f.MIN_ZOOM=1;f.TILE_MAX_ZOOM=5;f.TILE_MIN_ZOOM=4;f.getGUID=function(){return"pano_"+(mY++)+"_"+(+new Date())};f._getContainer=function(e){if(!e){return null}if(typeof e!=="string"){return e}if(e.charAt(0)==="#"){return document.getElementById(e.slice(1))}return document.getElementById(e)};cv._panoRegister=cv._panoRegister||[];cv.panoRegister=function(e){if(typeof e==="function"){cv._panoRegister.push(e)}};f.GL_EVENT_PAYLOADS={ondataload:function(i){return{data:i.data&&i.data.glData?i.data.glData:i.data}},onposition_changed:function(C,i){return i.getPosition()},onpov_changed:function(T,i){var C=i.getPov();return{heading:C.heading,pitch:C.pitch}},onid_changed:function(C,i){return C.id||i.getId()},onscene_type_changed:function(C,i){return{type:i.getSceneType()}},onzoom_changed:function(i){return{noAnimation:!!i.noAnimation}},onoverlay_add:function(i){return i.overlay},onoverlay_remove:function(i){return i.overlay},onclick:function(i){return i.domEvent||i},ondblclick:function(i){return i.domEvent||i},ontouchstart:function(i){return i.domEvent||i},ontouchend:function(i){return i.domEvent||i}};hv.extend(f.prototype,{_load:function(){if(this._loadStarted){return}this._loadStarted=true;var e=this;gT(function(i){if(!iA(i)){n3();return}ki.load("panorama",function(){e._draw()},true)})},addEventListener:function(oL,oK,C){var i=oL.indexOf("on")===0?oL:"on"+oL;var T=f.GL_EVENT_PAYLOADS[i];if(!K.apiVersionIsGL()||!T||typeof oK!=="function"||this._bindingInternal){return eX.prototype.addEventListener.call(this,oL,oK,C)}var e=this;var oM=function(oN){return oK.call(this,T(oN,e))};eX.prototype.addEventListener.call(this,oL,oM,C);oK.hashCode=oM.hashCode},on:function(C,i,e){return this.addEventListener(C,i,e)},_draw:function(){},getContainer:function(){return this._container},getContainerSize:function(){if(!this._container){return new mU(0,0)}return new mU(this._container.clientWidth,this._container.clientHeight)},getId:function(){return this._id},getIid:function(){return this._iid},getPosition:function(){return this._position},getPov:function(){return this._pov},getZoom:function(){return this._zoom},getLinks:function(){if(K.apiVersionIsGL()){return this._topos||[]}return this._links},getDescription:function(){return this._description},getRelevants:function(){return this._relevants},getMode:function(){return this._mode},getSceneType:function(){return this._sceneType},getVisible:function(){return this._opts.visible},setId:function(C,i,e){this._load();if(i&&typeof i==="object"){e=i;i=null}e=e||{};this._lastId=this._id;this._lastPosition=this._position;this._id=C;this._position=null;if(i){this._sceneType=i}if(e.pov){this.setPov(e.pov)}this._nextPanoOptions=e},setPosition:function(e){if(!e){return}this._load();this._lastId=this._id;this._lastPosition=this._position;this._id=null;this._position=e},setPov:function(e){if(!e){return}var C=typeof e.heading==="number"?e.heading:this._pov.heading;var i=typeof e.pitch==="number"?e.pitch:this._pov.pitch;this._pov={heading:dx(C),pitch:i}},setZoom:function(e){if(typeof e!=="number"){return}this._zoom=Math.max(this._minZoom,Math.min(this._maxZoom,e))},setPitchLimit:function(i,e){this._pitchLimit={min:i,max:e}},setPanoramaPOIType:function(e){this._visiblePOIType=e},setMap:function(e){this._map=e},getMap:function(){return this._map},setOptions:function(C){if(!C){return}if(C.closeControl===true){this._opts.forceCloseControl=true}if(C.closeControl===false){this._opts.forceCloseControl=false}for(var i in C){if(!C.hasOwnProperty(i)){continue}var T=C[i];var e=this._opts[i];if(T&&typeof T==="object"&&!(T instanceof Array)&&e&&typeof e==="object"&&!(e instanceof Array)){this._opts[i]=hv.extend(e,T)}else{this._opts[i]=T}}},show:function(){this._load();this._opts.visible=true},hide:function(){this._opts.visible=false},enableScrollWheelZoom:function(){this._opts.enableScrollWheelZoom=true},disableScrollWheelZoom:function(){this._opts.enableScrollWheelZoom=false},addOverlay:function(e){if(!e){return}this._panoOverlays.push(e)},removeOverlay:function(e){if(!e){return}for(var C=0;C<this._panoOverlays.length;C++){if(this._panoOverlays[C]===e){this._panoOverlays.splice(C,1);break}}},clearOverlays:function(){this._panoOverlays=[]},showOverlays:function(){this._opts.hideOverlays=false},hideOverlays:function(){this._opts.hideOverlays=true},exitInter:function(){},clear:function(){},destroy:function(){},getBaiduMapUrl:function(){return K.mapHost+"/?panotype=street&pid="+(this._id||"")+"&panoid="+(this._id||"")+"&l=17&tn=B_NORMAL_MAP&sc=0&newmap=1&shareurl=1"}});window.BMAP_PANORAMA_POI_HOTEL="hotel";window.BMAP_PANORAMA_POI_CATERING="catering";window.BMAP_PANORAMA_POI_MOVIE="movie";window.BMAP_PANORAMA_POI_TRANSIT="transit";window.BMAP_PANORAMA_POI_INDOOR_SCENE="indoor_scene";window.BMAP_PANORAMA_POI_NONE="none";window.BMAP_PANORAMA_INDOOR_SCENE="inter";window.BMAP_PANORAMA_STREET_SCENE="street";function gf(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("PanoramaCoverageLayer")}kT.call(this,{transparentPng:true,dataType:1,cacheSize:32});this._opts=hv.extend(this._opts||{},e||{});this.zIndex=110}gf.inherits(kT,"PanoramaCoverageLayer");gf.UDT="20150114";hv.extend(gf.prototype,{getTilesUrl:function(T,C){var i=nN(Math.abs(T.x)+Math.abs(T.y));var e=i+"?udt="+gf.UDT+"&qt=tile&styles=pl&x="+T.x+"&y="+T.y+"&z="+C;e=e.replace(/-(\d+)/gi,"M$1");return du(e,{isCounter:false})},isTransparentPng:function(){return true}});function hk(e,C){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("PanoramaService")}this._pano=e||null;this._opts=C||{};this._queryList=[];var i=this;ki.load("panorama",function(){i._asyncSearch()},true)}hk.inherits(eX,"PanoramaService");hv.extend(hk.prototype,{getPanoramaById:function(i,e){this._queryList.push({method:"getPanoramaById",arguments:[i,e]})},getPanoramaByLocation:function(i,e,C){this._queryList.push({method:"getPanoramaByLocation",arguments:[i,e,C]})},getVisiblePOIs:function(i,e,C,T){this._queryList.push({method:"getVisiblePOIs",arguments:[i,e,C,T]})},getRecommendPanosById:function(i,e){this._queryList.push({method:"getRecommendPanosById",arguments:[i,e]})},getPanoramaVersions:function(e){this._queryList.push({method:"getPanoramaVersions",arguments:[e]})},checkPanoSupportByCityCode:function(e,i){this._queryList.push({method:"checkPanoSupportByCityCode",arguments:[e,i]})},getPanoramaByPOIId:function(e,i){this._queryList.push({method:"getPanoramaByPOIId",arguments:[e,i]})},getCopyrightProviders:function(e){this._queryList.push({method:"getCopyrightProviders",arguments:[e]})},toString:function(){return"PanoramaService"}});cv.panoRegister(function(e){new hk(e,{from:"api"})});function hR(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("PanoramaControl")}jM.call(this);e=e||{};this._opts={printable:false,offset:e.offset,anchor:e.anchor};this._isOn=false;this._timerId=null;this._panoCoverageLayer=new gf({from:"api"});this._panoService=new hk(null,{from:"api"});this.defaultAnchor=gv.TOP_RIGHT;this.defaultOffset=new mU(10,10);this.setAnchor(e.anchor);this._asyncLoadCode()}hR.inherits(jM,"PanoramaControl");hv.extend(hR.prototype,{_asyncLoadCode:function(){var e=this;ki.load("panorama",function(){if(e._asyncDraw){e._asyncDraw()}},true)},initialize:function(e){this._map=e;return this._container}});function ad(T,C){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("PanoramaLabel")}ec.call(this);var i={position:null,altitude:2,displayDistance:true};C=C||{};for(var e in C){if(C.hasOwnProperty(e)){i[e]=C[e]}}this._opts=i;this._content=T;this._position=i.position;this._altitude=i.altitude;this._displayDistance="displayDistance" in C?!!C.displayDistance:!C.hideDistance}ad.inherits(ec,"PanoramaLabel");hv.extend(ad.prototype,{setPosition:function(e){this._position=e;this._setOverlayProperty("position",e)},getPosition:function(){return this._position},setContent:function(e){this._content=e;this._setOverlayProperty("content",e)},getContent:function(){return this._content},setAltitude:function(e){this._altitude=e;this._setOverlayProperty("altitude",e)},getAltitude:function(){return this._altitude},getPov:function(){return null},show:function(){this._visible=true;this._setOverlayProperty("visible",true)},hide:function(){this._visible=false;this._setOverlayProperty("visible",false)}});function fa(e,T){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("PanoramaMarker")}ec.call(this);var C={icon:"",title:"",panoInfo:null,altitude:2};T=T||{};for(var i in T){if(T.hasOwnProperty(i)){C[i]=T[i]}}this._opts=C;this._position=e;this._icon=C.icon;this._title=C.title;this._altitude=C.altitude;this._panoInfo=C.panoInfo;this._pov={heading:0,pitch:0}}fa.inherits(ec,"PanoramaMarker");hv.extend(fa.prototype,{setPosition:function(e){this._position=e;this._setOverlayProperty("position",e)},getPosition:function(){return this._position},setTitle:function(e){this._title=e;this._setOverlayProperty("title",e)},getTitle:function(){return this._title},setIcon:function(e){this._icon=e;this._setOverlayProperty("icon",e)},getIcon:function(){return this._icon},setAltitude:function(e){this._altitude=e;this._setOverlayProperty("altitude",e)},getAltitude:function(){return this._altitude},getPanoInfo:function(){return this._panoInfo},getPov:function(){return this._pov},show:function(){this._visible=true;this._setOverlayProperty("visible",true)},hide:function(){this._visible=false;this._setOverlayProperty("visible",false)}});var hi=(function(){var oM=(window.location.protocol==="http:"?"http:":"https:")+"//" + window.location.host + "/bmap-api/res/webgl/10/";var oO=null;var oQ=null;var oS=null;var oP={BMAP_AUTHENTIC_KEY:1,BMAP_QT_VERSION:1,BMAP_DEFAULT_API_VERSION:1,BMAP_DEFAULT_UI_VERSION:1,BMAP_SECKEY:1,BMAP_HOST_TYPE:1};function C(oV){if(!oV||typeof window==="undefined"){return}for(var oT in window){if(!Object.prototype.hasOwnProperty.call(window,oT)){continue}if(oT.indexOf("BMAP_")!==0){continue}if(oP[oT]){continue}try{oV[oT]=window[oT]}catch(oU){}}}function oN(oT){if(typeof oT==="string"){var oU=oT.toLowerCase();if(oU==="gl"||oU==="webgl"){return"gl"}}return"4.0"}function oK(oT){oT=oN(oT);if(K){K.apiVersion=oT}if(typeof oQ==="function"){oQ(oT,oO)}if(oT!=="gl"&&oO){C(oO)}}function e(oT){oT=oN(oT);if(K){K.uiVersion=oT}oL(oT);if(typeof oS==="function"){oS(oT,oO)}}function T(o0){var oZ=window.document;var oX=oZ.querySelectorAll?oZ.querySelectorAll("link[data-bmapgl-ui]"):[];var oY=false;for(var oV=0;oV<oX.length;oV++){var oW=oX[oV];if(oW.getAttribute("data-bmapgl-ui")===o0){if(oY&&oW.parentNode){oW.parentNode.removeChild(oW)}else{oY=true}continue}if(oW.parentNode){oW.parentNode.removeChild(oW)}}if(!oY){var oU=oZ.createElement("link");oU.setAttribute("rel","stylesheet");oU.setAttribute("type","text/css");oU.setAttribute("data-bmapgl-ui",o0);oU.href=oM+(o0==="gl"?"bmap.css":"bmap-v4.css");var oT=oZ.head||oZ.getElementsByTagName("head")[0]||oZ.documentElement;if(oT){oT.appendChild(oU)}}}function oL(oV){var oU=typeof window!=="undefined"?window.document:null;if(!oU||!oU.createElement||K.isDev){return}var oT=function(){if(K.uiVersion&&K.uiVersion!==oV){return}T(oV)};if(oU.readyState==="loading"){oU.addEventListener("DOMContentLoaded",oT)}else{oT()}}function oR(oU,oT){oT(oO[oU]);Object.defineProperty(oO,oU,{enumerable:true,configurable:true,get:function(){return K[oU]},set:function(oV){oT(oV)}})}function i(oU,oT){oO=oU;oT=oT||{};oQ=oT.onApiVersionApplied||null;oS=oT.onUiVersionApplied||null;oR("apiVersion",oK);oR("uiVersion",e)}return{install:i,mirrorWindowGlobalsToExports:C}})();cv.MapConfig=K;cv.Map=li;cv.MapType=gA;cv.Point=d9;cv.Pixel=hV;cv.Size=mU;cv.Bounds=lz;cv.PrivateRegionDataModel=es;cv.TileLayer=kT;cv.Copyright=q;cv.Projection=cv.Project=m8;cv.XYZProjection=cv.XYZProject=fA;cv.MercatorProjection=m8;cv.Convertor=iI;cv.RenderTypeUtils=eV;cv.Overlay=bw;cv.Label=ls;cv.Marker=D;var lX=hS;var ce=function(e,i){if(typeof e==="string"||typeof e==="number"){return new fK(e,i)}lX.call(this,e,i)};ce.prototype=lX.prototype;cv.Symbol=ce;cv.SVGSymbol=fK;cv.Icon=nF;cv.Polyline=cf;cv.BezierCurve=em;cv.PolylineMultipart=gE;cv.Polygon=mw;cv.MapMask=ov;cv.Prism=cm;cv.Marker3D=gn;cv.GroundOverlay=iQ;cv.GroundPoint=fP;cv.CustomOverlay=cS;cv.CanvasLayer=ik;cv.CustomHtmlLayer=fw;cv.ParkingSpot=l2;cv.PointCollection=ih;cv.Hotspot=dX;cv.InfoWindow=f9;cv.SimpleInfoWindow=lD;cv.Circle=bz;cv.Rectangle=g6;cv.Control=jM;cv.NavigationControl=n5;cv.IndoorManager=eW;cv.NavigationControl3D=hy;cv.CopyrightControl=i0;cv.ScaleControl=oJ;cv.CityListControl=co;cv.MapTypeControl=G;cv.ZoomControl=nc;cv.LocationControl=jn;cv.GeolocationControl=jn;cv.LogoControl=cB;cv.OverviewMapControl=n9;cv.DistanceTool=dH;cv.ContextMenu=kH;cv.MenuItem=lx;cv.OperationMask=aG;cv.Animation=ij;cv.ViewAnimation=w;cv.Transitions=jF;cv.Event=ix;cv.trafficLayer=nX;cv.TrafficLayer=ng;cv.GeoJSONLayer=bk;cv.XYZLayer=ow;cv.WMTSLayer=f6;cv.WMSLayer=ev;cv.RasterTileLayer=eM;cv.PixelLayer=fm;cv.GeoJSONParse=jz;cv.NormalLayer=dQ;cv.ThreeLayer=jZ;cv.LineLayer=c3;cv.FillLayer=f7;cv.PointShapeLayer=bD;cv.PointIconLayer=i3;cv.Entity=m9;cv.MVTLayer=gg;cv.VectorTileLayer=fl;cv.BaiduLayer=ai;cv.Geolocation=eG;cv.Geocoder=b5;cv.Boundary=hX;cv.DistrictLayer=f2;cv.LocalCity=hO;cv.LocalSearch=ee;cv.Autocomplete=mW;cv.BusLineSearch=gX;cv.WalkingRoute=h3;cv.RidingRoute=eT;cv.DrivingRoute=dY;cv.DrivingRouteLine=iS;cv.TransitRoute=hh;cv.RouteSearch=mx;cv.TruckRoute=ak;cv.IconSequence=ks;cv.PlaceDetail=bH;cv.PanoramaCoverageLayer=gf;cv.PanoramaControl=hR;cv.PanoramaService=hk;cv.PanoramaLabel=ad;cv.PanoramaMarker=fa;cv.Panorama=f;hi.install(cv,{onApiVersionApplied:function(e,i){if(e!=="gl"){i.MapType=at;i.Projection=i.Project=je;i.PerspectiveProjection=k8;i.DOMLayer=fw;i.PolylineLayer=gZ;i.FlyLineLayer=eQ;i.PolygonLayer=i8;i.Heatmap=fj;i.WebGLCustomLayer=L;i.ThreejsLayer=ca;i.DeckglLayer=ex;i.PointLayer=op;i.BarLayer=lZ;i.TextLayer=bB;i.ClusterLayer=n0;i.TrackLine=lS;i.EBikeRoute=cH;i.Icons=nT;window.BMAP_POINT_DENSITY_HIGH=200;window.BMAP_POINT_DENSITY_MEDIUM=100;window.BMAP_POINT_DENSITY_LOW=50;window.BMAP_CONTEXT_MENU_ICON_ZOOMIN=K.imgPath+"menu_zoom_in.png";window.BMAP_CONTEXT_MENU_ICON_ZOOMOUT=K.imgPath+"menu_zoom_out.png";window.BMAP_PERSPECTIVE_MAP=window.BMAP_PERSPECTIVE_MAP||null}else{i.MapType=gA;i.Projection=i.Project=m8;i.BMAP_NORMAL_MAP="B_NORMAL_MAP";i.BMAP_SATELLITE_MAP="B_SATELLITE_MAP";i.BMAP_HYBRID_MAP="B_STREET_MAP";i.BMAP_EARTH_MAP="B_EARTH_MAP";i.BMAP_NONE_MAP="B_NONE_MAP"}}});function ky(e,i){for(var C in i){e[C]=i[C]}}cv.fetchDebug&&cv.fetchDebug.init();cv.slaDebug&&cv.slaDebug.init();cv.verify();cv.apiLoad();cv.frequency();cv.getSeckeyCid();})(BMapGL,"BMapGL");
\ No newline at end of file
diff --git a/public/bmap-test.html b/public/bmap-test.html
index 773d7b9..0beca7e 100644
--- a/public/bmap-test.html
+++ b/public/bmap-test.html
@@ -469,7 +469,7 @@
           lg('load 瑙﹀彂锛寃indow.BMap = ' + typeof window.BMap, window.BMap ? 'ok' : 'bad');
           if (!window.BMap) { return; }
           try {
-            var map = new window.BMap.Map('map5');
+            var map = new window.BMap.Map('map5', { enableHighResolution: false });
             map.centerAndZoom(new window.BMap.Point(87.616848, 43.825592), 14);
             map.enableScrollWheelZoom(true);
             lg('2D 鍦板浘鍒涘缓鎴愬姛', 'ok');
@@ -502,32 +502,44 @@
         s.src = '/bmap-sdk2d.js';
         s.addEventListener('load', function () {
           if (!window.BMap) { lg('BMap 鏈氨缁�', 'bad'); return; }
-          var map = new window.BMap.Map('map6');
+          var map = new window.BMap.Map('map6', { enableHighResolution: false });
           map.centerAndZoom(new window.BMap.Point(116.404, 39.915), 13); // 鍖椾含锛岀‘淇濇湁鐡︾墖
           map.enableScrollWheelZoom(true);
-          lg('鍦板浘宸插垱寤猴紙鍖椾含 z=13锛�', 'ok');
+          lg('鍦板浘宸插垱寤猴紙鍖椾含 z=13锛�');
+          lg('楂樻竻妯″紡(devicePixelRatio=' + window.devicePixelRatio + ')锛氬凡鏄惧紡鍏抽棴 enableHighResolution=false');
+          lg('  鈫� 鍏抽棴鍚庡簲璧� qt=tile 鏅�氱摝鐗囷紙楂樻竻妯″紡浼氳蛋 qt=vtile 鐭㈤噺鐡︾墖锛屽綋鍓� ak 鏃犳潈闄愶級');
 
-          setTimeout(function () {
-            var d = document.getElementById('map6');
+          // 姣忕瀹炴椂鎶ュ憡锛屼笉鐢ㄥ共绛夊浐瀹氭椂闀�
+        var tick = 0;
+        var timer = setInterval(function () {
+          tick++;
+          var d = document.getElementById('map6');
+          if (!d) { return; }
+          var imgs = d.querySelectorAll('img').length;
+          var cv = d.querySelectorAll('canvas').length;
+          lg(`[${tick}s] innerHTML=${d.innerHTML.length}  img=${imgs}  canvas=${cv}`, imgs > 0 ? 'ok' : (tick >= 8 ? 'bad' : ''));
+          if (imgs > 0 || cv > 0) {
+            clearInterval(timer);
             lg('');
-            lg('=== 瀹瑰櫒 DOM 缁撴瀯 ===');
-            lg('innerHTML 闀垮害: ' + d.innerHTML.length);
-            lg('瀛愬厓绱犳暟: ' + d.children.length);
-            lg('img 鏁�: ' + d.querySelectorAll('img').length);
-            lg('canvas 鏁�: ' + d.querySelectorAll('canvas').length);
-            lg('innerHTML 鍓� 600 瀛楃:');
-            lg(d.innerHTML.slice(0, 600));
-            lg('');
-            lg('=== 鐪熷疄缃戠粶璇锋眰锛堝惈鐡︾墖锛�===');
-            var rs = performance.getEntriesByType('resource');
-            var tile = rs.filter(function (r) { return /bmap-tile|bdimg|maponline|bmap-api/.test(r.name); });
-            lg('鐩稿叧璇锋眰鎬绘暟: ' + tile.length + '锛堥〉闈㈡�昏姹� ' + rs.length + '锛�');
-            tile.slice(0, 25).forEach(function (r) {
+            lg('鉁� 鐡︾墖宸叉覆鏌撳嚭鏉ヤ簡锛佸湴鍥惧簲璇ュ彲瑙�', 'ok');
+            lg('=== 鐡︾墖璇锋眰鏄庣粏 ===');
+            performance.getEntriesByType('resource').filter(function (r) { return /bmap-tile/.test(r.name); }).slice(0, 6).forEach(function (r) {
               var sz = r.transferSize || r.encodedBodySize || 0;
-              var st = r.responseStatus || (sz > 0 ? 200 : '?');
-              lg('  [' + st + '] ' + (Math.round(r.duration)) + 'ms ' + sz + 'B  ' + r.name.slice(0, 120), sz > 0 ? '' : 'bad');
+              lg('  [' + (r.responseStatus || '?') + '] ' + sz + 'B  ' + r.name.slice(0, 140), sz > 0 ? 'ok' : 'bad');
             });
-            if (tile.length === 0) {
+          }
+          if (tick >= 15) {
+            clearInterval(timer);
+            lg('');
+            lg('=== 15 绉掍粛鏈覆鏌擄紝鐡︾墖璇锋眰鏄庣粏 ===', 'bad');
+            var rs = performance.getEntriesByType('resource').filter(function (r) { return /bmap-tile|bmap-api/.test(r.name); });
+            lg('  鐩稿叧璇锋眰 ' + rs.length + ' 鏉�');
+            rs.slice(0, 12).forEach(function (r) {
+              var sz = r.transferSize || r.encodedBodySize || 0;
+              lg('  [' + (r.responseStatus || '?') + '] ' + sz + 'B  ' + r.name.slice(0, 140), sz > 0 ? '' : 'bad');
+            });
+          }
+        }, 1000);            if (tile.length === 0) {
               lg('  鈿� 娌℃湁浠讳綍鐡︾墖璇锋眰鍙戝嚭 鈫� SDK 鍐呴儴鐡︾墖 URL 鍙兘浠嶆寚鍚戣 IPv6 鎷︽埅鐨勫師濮嬪煙鍚�', 'bad');
             }
           }, 15000);

--
Gitblit v1.9.3