var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); window.TILE_VERSION={"ditu":{"normal":{"version":"088","updateDate":"20220708"},"satellite":{"version":"009","updateDate":"20220708"},"normalTraffic":{"version":"081","updateDate":"20220708"},"satelliteTraffic":{"version":"083","updateDate":"20220708"},"mapJS":{"version":"104","updateDate":"20220708"},"satelliteStreet":{"version":"083","updateDate":"20220708"},"earthVector":{"version":"001","updateDate":"20220708"}},"webapp":{"high_normal":{"version":"001","updateDate":"20220708"},"lower_normal":{"version":"002","updateDate":"20220708"}},"api_for_mobile":{"vector":{"version":"002","updateDate":"20220708"},"vectorIcon":{"version":"002","updateDate":"20220708"}}};window.MSV={"mapstyle":{"version":"001","updateDate":"20220706"}};window.BMAP_AUTHENTIC_KEY="9wBqaFhhzGDcRsTi24BN8NsNxGUpeFEc"; !(function(t){"use strict";function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function n(t,e){return t(e={exports:{}},e.exports),e.exports}Object.values||(Object.values=function(t){if(t!==Object(t))throw new TypeError("Object.values called on a non-object");var e,n=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.push(t[e]);return n}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=0;n<(arguments.length<=1?0:arguments.length-1);n++){var r=n+1<1||arguments.length<=n+1?void 0:arguments[n+1];if(null!=r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},writable:!0,configurable:!0});var r=n((function(t){function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})),i=e(r),o=e(n((function(t){function e(t,e){for(var n=0;n=0;i--)n>(e=t[i])&&(n=e),r1&&void 0!==arguments[1]?arguments[1]:{},n=document.createElement(t);for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.setAttribute(r,e[r]);return n},getCurrentStyle:function(t){return window.getComputedStyle(t,null)}},w=function(t,e,n){var r,o,a,s="",u=[],h="jsonp"+Math.ceil(1e5*Math.random()),c=t.indexOf("?")>0?"&":"?";for(var l in n=Object.assign({},{jsonpCallback:"jsonp",timeout:5e4,jsonp:"callback"},n),e)({}).hasOwnProperty.call(e,l)&&(s="object"===i(e[l])?l+"="+JSON.stringify(e[l]):l+"="+e[l],u.push(s));function f(){o.parentNode&&o.parentNode.removeChild(o),r&&clearTimeout(r),window[h]=null}return t+=c+u.join("&"),a=document.getElementsByTagName("script")[0]||document.head,t=t+"&"+n.jsonp+"="+h,(o=document.createElement("script")).src=t,o.type="text/javascript",a.parentNode.appendChild(o,a),new Promise((function(t,e){window[h]=function(e){if(e&&"string"==typeof e)try{e=JSON.parse(e)}catch(t){e={},console.error("[ERROR] Parse Error.")}t(e),f()},o.onerror=function(t){f(),e({errno:-2,errmsg:"[ERROR] Load Error: ".concat(t),data:{}})},n.timeout&&(r=setTimeout((function(){f(),e({errno:-3,errmsg:"[ERROR] Time out.",data:{}})}),n.timeout))}))},T=function(){function t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._size=0,this._cache=void 0,this.keyList=[],this._options=void 0,this._size=t,this._cache=new window.Map;var n={clearCallback:null};this._options=Object.assign({},n,e)}var e=t.prototype;return e.setData=function(t,e){0!==this._size&&(this._cache.size>=this._size&&this._removeOld(),this._cache.has(t)||this.keyList.push(t),this._cache.set(t,e))},e.getData=function(t){return this._cache.get(t)},e._removeOld=function(){for(var t=Math.round(.6*this._size),e=0;e=0;n--)(e=t.vpoints[n]).topoDir=e.dir,t.topoArray.push(e);return t.topoArray},this.getRoadWidth=function(){return void 0===t.roadWidth&&(t.currentRoad||(t.currentRoad=t.getCurrentRoad()),t.currentRoad?t.roadWidth=t.currentRoad.roadWidth:t.roadWidth=0),t.roadWidth}};function C(t){var e={};return e.panoId=t.PID,e.panoType=t.Type,e.rid=t.RID,e.dir=t.DIR,e.roadName=t.RoadName,e.order=t.Order,e.panoX=t.X/100,e.panoY=t.Y/100,void 0!==t.CPointX&&void 0!==t.CPointY&&(e.cPoint={x:t.CPointX/100,y:t.CPointY/100}),e}function S(t){if(!t)return console.error("Get none from server"),null;var e=t.result;if(e&&0!==e.error)return console.error("Get error from server"),null;var n=t.content;if(void 0===n||0===n.length||void 0===n[0])return console.error("Get empty data from server"),null;var r=n[0],i=new R,o=r.Roll,a={};if(i.panoId=r.ID,r.Inters instanceof Array){var s=r.Inters[0];void 0!==s&&(i.iid=s.IID)}if(i.panoType=r.Type,i.panoX=(r.X||0)/100,i.panoY=(r.Y||0)/100,i.panoZ=(r.Z||0)/100,i.heading=void 0!==r.MoveDir?r.MoveDir:0,i.northDir=r.NorthDir,i.fixHeading=void 0!==r.Heading?r.Heading:270-r.NorthDir,i.fixPitch=r.Pitch,i.fixRoll=90o?0:o,i.deviceHeight=r.DeviceHeight,i.date=r.Date||i.date,i.time=r.Time,i.provider=void 0!==r.Provider?r.Provider:i.provider,i.admission=r.Admission||i.admission,i.timeLine=r.TimeLine||[],i.roadName=r.Rname,r.Roads){var u=r.Roads;i.roads=u.map((function(t){return a[t.ID]=t.Name,function(t){var e=new A;if(e.rid=t.ID,e.roadName=t.Name,e.roadWidth=void 0!==t.Width?t.Width/100:0,e.isCurrentRoad=t.IsCurrent||0,t.Panos)for(var n=t.Panos,r=0,i=n.length;r=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),h=r.call(a,"finallyLoc");if(u&&h){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),R(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;R(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:S(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}})),B=O;function k(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}const U={};function N(t,{precision:e=U.precision||4}={}){return t=function(t){return Math.round(t/U.EPSILON)*U.EPSILON}(t),"".concat(parseFloat(t.toPrecision(e)))}function F(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function j(t,e,n){const r=U.EPSILON;n&&(U.EPSILON=n);try{if(t===e)return!0;if(F(t)&&F(e)){if(t.length!==e.length)return!1;for(let n=0;n0?", ":"")+N(this[n],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}equals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e=0&&t=0&&t0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},cross:function(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},lerp:function(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t},random:function(t,e){e=e||1;var n=2*X()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},transformMat2:function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},transformMat2d:function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t},transformMat3:function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},transformMat4:ot,rotate:function(t,e,n,r){var i=e[0]-n[0],o=e[1]-n[1],a=Math.sin(r),s=Math.cos(r);return t[0]=i*s-o*a+n[0],t[1]=i*a+o*s+n[1],t},angle:function(t,e){var n=t[0],r=t[1],i=e[0],o=e[1],a=Math.sqrt(n*n+r*r)*Math.sqrt(i*i+o*o),s=a&&(n*i+r*o)/a;return Math.acos(Math.min(Math.max(s,-1),1))},zero:function(t){return t[0]=0,t[1]=0,t},str:function(t){return"vec2("+t[0]+", "+t[1]+")"},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]},equals:function(t,e){var n=t[0],r=t[1],i=e[0],o=e[1];return Math.abs(n-i)<=q*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-o)<=q*Math.max(1,Math.abs(r),Math.abs(o))},len:st,sub:ut,mul:ht,div:ct,dist:lt,sqrDist:ft,sqrLen:dt,forEach:pt});function mt(t,e,n){const r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o||1;return t[0]=(n[0]*r+n[4]*i+n[8]*o)/a,t[1]=(n[1]*r+n[5]*i+n[9]*o)/a,t[2]=(n[2]*r+n[6]*i+n[10]*o)/a,t}function gt(){var t=new Y(3);return Y!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function yt(t){var e=new Y(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function _t(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function xt(t,e,n){var r=new Y(3);return r[0]=t,r[1]=e,r[2]=n,r}function bt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Mt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Et(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function wt(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function Tt(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function At(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Rt(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot(n,r,i)}function Ct(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function St(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function Pt(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function Dt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function It(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t}function Lt(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function Ot(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function Bt(t,e,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=e[0],u=e[1],h=e[2],c=i*h-o*u,l=o*s-r*h,f=r*u-i*s,d=i*f-o*l,p=o*c-r*f,v=r*l-i*c,m=2*a;return c*=m,l*=m,f*=m,d*=2,p*=2,v*=2,t[0]=s+c+d,t[1]=u+l+p,t[2]=h+f+v,t}function kt(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function Ut(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function Nt(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function Ft(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2],u=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(o*o+a*a+s*s),h=u&&Dt(t,e)/u;return Math.acos(Math.min(Math.max(h,-1),1))}function jt(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2];return Math.abs(n-o)<=q*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=q*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=q*Math.max(1,Math.abs(i),Math.abs(s))}var zt=Et,Vt=wt,Gt=Tt,Ht=Rt,Wt=Ct,Zt=_t,qt=St,Yt=function(){var t=gt();return function(e,n,r,i,o,a){var s,u;for(n||(n=3),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s0?(m=2*Math.sqrt(v+1),t[3]=.25*m,t[0]=(l-d)/m,t[1]=(f-u)/m,t[2]=(s-h)/m):a>c&&a>p?(m=2*Math.sqrt(1+a-c-p),t[3]=(l-d)/m,t[0]=.25*m,t[1]=(s+h)/m,t[2]=(f+u)/m):c>p?(m=2*Math.sqrt(1+c-a-p),t[3]=(f-u)/m,t[0]=(s+h)/m,t[1]=.25*m,t[2]=(l+d)/m):(m=2*Math.sqrt(1+p-a-c),t[3]=(s-h)/m,t[0]=(f+u)/m,t[1]=(l+d)/m,t[2]=.25*m),t}function Te(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3],u=i+i,h=o+o,c=a+a,l=i*u,f=i*h,d=i*c,p=o*h,v=o*c,m=a*c,g=s*u,y=s*h,_=s*c,x=r[0],b=r[1],M=r[2];return t[0]=(1-(p+m))*x,t[1]=(f+_)*x,t[2]=(d-y)*x,t[3]=0,t[4]=(f-_)*b,t[5]=(1-(l+m))*b,t[6]=(v+g)*b,t[7]=0,t[8]=(d+y)*M,t[9]=(v-g)*M,t[10]=(1-(l+p))*M,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function Ae(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,h=n*a,c=r*a,l=r*s,f=i*a,d=i*s,p=i*u,v=o*a,m=o*s,g=o*u;return t[0]=1-l-p,t[1]=c+g,t[2]=f-m,t[3]=0,t[4]=c-g,t[5]=1-h-p,t[6]=d+v,t[7]=0,t[8]=f+m,t[9]=d-v,t[10]=1-h-l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Re(t,e,n,r,i,o,a){var s=1/(n-e),u=1/(i-r),h=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*h,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*h,t[15]=0,t}function Ce(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}function Se(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),h=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*h,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*h,t[15]=1,t}function Pe(t,e,n,r){var i,o,a,s,u,h,c,l,f,d,p=e[0],v=e[1],m=e[2],g=r[0],y=r[1],_=r[2],x=n[0],b=n[1],M=n[2];return Math.abs(p-x)0&&(c*=d=1/Math.sqrt(d),l*=d,f*=d);var p=u*f-h*l,v=h*c-s*f,m=s*l-u*c;return(d=p*p+v*v+m*m)>0&&(p*=d=1/Math.sqrt(d),v*=d,m*=d),t[0]=p,t[1]=v,t[2]=m,t[3]=0,t[4]=l*m-f*v,t[5]=f*p-c*m,t[6]=c*v-l*p,t[7]=0,t[8]=c,t[9]=l,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function Ie(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var Le=ve,Oe=Ie,Be=Object.freeze({__proto__:null,create:ue,clone:he,copy:ce,fromValues:function(t,e,n,r,i,o,a,s,u,h,c,l,f,d,p,v){var m=new Y(16);return m[0]=t,m[1]=e,m[2]=n,m[3]=r,m[4]=i,m[5]=o,m[6]=a,m[7]=s,m[8]=u,m[9]=h,m[10]=c,m[11]=l,m[12]=f,m[13]=d,m[14]=p,m[15]=v,m},set:function(t,e,n,r,i,o,a,s,u,h,c,l,f,d,p,v,m){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=h,t[9]=c,t[10]=l,t[11]=f,t[12]=d,t[13]=p,t[14]=v,t[15]=m,t},identity:le,transpose:fe,invert:de,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=e[9],f=e[10],d=e[11],p=e[12],v=e[13],m=e[14],g=e[15];return t[0]=s*(f*g-d*m)-l*(u*g-h*m)+v*(u*d-h*f),t[1]=-(r*(f*g-d*m)-l*(i*g-o*m)+v*(i*d-o*f)),t[2]=r*(u*g-h*m)-s*(i*g-o*m)+v*(i*h-o*u),t[3]=-(r*(u*d-h*f)-s*(i*d-o*f)+l*(i*h-o*u)),t[4]=-(a*(f*g-d*m)-c*(u*g-h*m)+p*(u*d-h*f)),t[5]=n*(f*g-d*m)-c*(i*g-o*m)+p*(i*d-o*f),t[6]=-(n*(u*g-h*m)-a*(i*g-o*m)+p*(i*h-o*u)),t[7]=n*(u*d-h*f)-a*(i*d-o*f)+c*(i*h-o*u),t[8]=a*(l*g-d*v)-c*(s*g-h*v)+p*(s*d-h*l),t[9]=-(n*(l*g-d*v)-c*(r*g-o*v)+p*(r*d-o*l)),t[10]=n*(s*g-h*v)-a*(r*g-o*v)+p*(r*h-o*s),t[11]=-(n*(s*d-h*l)-a*(r*d-o*l)+c*(r*h-o*s)),t[12]=-(a*(l*m-f*v)-c*(s*m-u*v)+p*(s*f-u*l)),t[13]=n*(l*m-f*v)-c*(r*m-i*v)+p*(r*f-i*l),t[14]=-(n*(s*m-u*v)-a*(r*m-i*v)+p*(r*u-i*s)),t[15]=n*(s*f-u*l)-a*(r*f-i*l)+c*(r*u-i*s),t},determinant:pe,multiply:ve,translate:me,scale:ge,rotate:ye,rotateX:_e,rotateY:xe,rotateZ:be,fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotation:function(t,e,n){var r,i,o,a=n[0],s=n[1],u=n[2],h=Math.hypot(a,s,u);return h0?(n[0]=2*(s*a+c*r+u*o-h*i)/l,n[1]=2*(u*a+c*i+h*r-s*o)/l,n[2]=2*(h*a+c*o+s*i-u*r)/l):(n[0]=2*(s*a+c*r+u*o-h*i),n[1]=2*(u*a+c*i+h*r-s*o),n[2]=2*(h*a+c*o+s*i-u*r)),Me(t,e,n),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},getScaling:Ee,getRotation:we,fromRotationTranslationScale:Te,fromRotationTranslationScaleOrigin:function(t,e,n,r,i){var o=e[0],a=e[1],s=e[2],u=e[3],h=o+o,c=a+a,l=s+s,f=o*h,d=o*c,p=o*l,v=a*c,m=a*l,g=s*l,y=u*h,_=u*c,x=u*l,b=r[0],M=r[1],E=r[2],w=i[0],T=i[1],A=i[2],R=(1-(v+g))*b,C=(d+x)*b,S=(p-_)*b,P=(d-x)*M,D=(1-(f+g))*M,I=(m+y)*M,L=(p+_)*E,O=(m-y)*E,B=(1-(f+v))*E;return t[0]=R,t[1]=C,t[2]=S,t[3]=0,t[4]=P,t[5]=D,t[6]=I,t[7]=0,t[8]=L,t[9]=O,t[10]=B,t[11]=0,t[12]=n[0]+w-(R*w+P*T+L*A),t[13]=n[1]+T-(C*w+D*T+O*A),t[14]=n[2]+A-(S*w+I*T+B*A),t[15]=1,t},fromQuat:Ae,frustum:Re,perspective:Ce,perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),h=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=h,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*h*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},ortho:Se,lookAt:Pe,targetTo:De,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:Ie,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],h=t[7],c=t[8],l=t[9],f=t[10],d=t[11],p=t[12],v=t[13],m=t[14],g=t[15],y=e[0],_=e[1],x=e[2],b=e[3],M=e[4],E=e[5],w=e[6],T=e[7],A=e[8],R=e[9],C=e[10],S=e[11],P=e[12],D=e[13],I=e[14],L=e[15];return Math.abs(n-y)<=q*Math.max(1,Math.abs(n),Math.abs(y))&&Math.abs(r-_)<=q*Math.max(1,Math.abs(r),Math.abs(_))&&Math.abs(i-x)<=q*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(o-b)<=q*Math.max(1,Math.abs(o),Math.abs(b))&&Math.abs(a-M)<=q*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(s-E)<=q*Math.max(1,Math.abs(s),Math.abs(E))&&Math.abs(u-w)<=q*Math.max(1,Math.abs(u),Math.abs(w))&&Math.abs(h-T)<=q*Math.max(1,Math.abs(h),Math.abs(T))&&Math.abs(c-A)<=q*Math.max(1,Math.abs(c),Math.abs(A))&&Math.abs(l-R)<=q*Math.max(1,Math.abs(l),Math.abs(R))&&Math.abs(f-C)<=q*Math.max(1,Math.abs(f),Math.abs(C))&&Math.abs(d-S)<=q*Math.max(1,Math.abs(d),Math.abs(S))&&Math.abs(p-P)<=q*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(v-D)<=q*Math.max(1,Math.abs(v),Math.abs(D))&&Math.abs(m-I)<=q*Math.max(1,Math.abs(m),Math.abs(I))&&Math.abs(g-L)<=q*Math.max(1,Math.abs(g),Math.abs(L))},mul:Le,sub:Oe});function ke(){var t=new Y(4);return Y!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Ue(t){var e=new Y(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function Ne(t,e,n,r){var i=new Y(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function Fe(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function je(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function ze(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function Ve(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}function Ge(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}function He(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}function We(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function Ze(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.hypot(n,r,i,o)}function qe(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return n*n+r*r+i*i+o*o}function Ye(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.hypot(e,n,r,i)}function Xe(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}function Ke(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t}function Qe(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function Je(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t[3]=s+r*(n[3]-s),t}function $e(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function tn(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function en(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=e[0],s=e[1],u=e[2],h=e[3];return Math.abs(n-a)<=q*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=q*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-u)<=q*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(o-h)<=q*Math.max(1,Math.abs(o),Math.abs(h))}var nn=Ve,rn=Ge,on=He,an=Ze,sn=qe,un=Ye,hn=Xe,cn=function(){var t=ke();return function(e,n,r,i,o,a){var s,u;for(n||(n=4),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s=1);do{s=(i=2*X()-1)*i+(o=2*X()-1)*o}while(s>=1);var u=Math.sqrt((1-a)/s);return t[0]=e*n,t[1]=e*r,t[2]=e*i*u,t[3]=e*o*u,t},transformMat4:$e,transformQuat:function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2],h=n[3],c=h*r+s*o-u*i,l=h*i+u*r-a*o,f=h*o+a*i-s*r,d=-a*r-s*i-u*o;return t[0]=c*h+d*-a+l*-u-f*-s,t[1]=l*h+d*-s+f*-a-c*-u,t[2]=f*h+d*-u+c*-s-l*-a,t[3]=e[3],t},zero:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},exactEquals:tn,equals:en,sub:nn,mul:rn,div:on,dist:an,sqrDist:sn,len:un,sqrLen:hn,forEach:cn});const fn=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),dn=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),pn=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),vn={};class mn extends ee{static get IDENTITY(){return vn.IDENTITY=vn.IDENTITY||Object.freeze(new mn(fn)),vn.IDENTITY}static get ZERO(){return vn.ZERO=vn.ZERO||Object.freeze(new mn(dn)),vn.ZERO}get INDICES(){return pn}get ELEMENTS(){return 16}get RANK(){return 4}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}set(t,e,n,r,i,o,a,s,u,h,c,l,f,d,p,v){return this[0]=t,this[1]=e,this[2]=n,this[3]=r,this[4]=i,this[5]=o,this[6]=a,this[7]=s,this[8]=u,this[9]=h,this[10]=c,this[11]=l,this[12]=f,this[13]=d,this[14]=p,this[15]=v,this.check()}setRowMajor(t,e,n,r,i,o,a,s,u,h,c,l,f,d,p,v){return this[0]=t,this[1]=i,this[2]=u,this[3]=f,this[4]=e,this[5]=o,this[6]=h,this[7]=d,this[8]=n,this[9]=a,this[10]=c,this[11]=p,this[12]=r,this[13]=s,this[14]=l,this[15]=v,this.check()}toRowMajor(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}identity(){return this.copy(fn)}fromQuaternion(t){return Ae(this,t),this.check()}frustum({left:t,right:e,bottom:n,top:r,near:i,far:o}){return o===1/0?mn._computeInfinitePerspectiveOffCenter(this,t,e,n,r,i):Re(this,t,e,n,r,i,o),this.check()}static _computeInfinitePerspectiveOffCenter(t,e,n,r,i,o){const a=2*o/(n-e),s=2*o/(i-r),u=(n+e)/(n-e),h=(i+r)/(i-r),c=-2*o;return t[0]=a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=u,t[9]=h,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=c,t[15]=0,t}lookAt(t,e,n){return 1===arguments.length&&({eye:t,center:e,up:n}=t),Pe(this,t,e=e||[0,0,0],n=n||[0,1,0]),this.check()}ortho({left:t,right:e,bottom:n,top:r,near:i=.1,far:o=500}){return Se(this,t,e,n,r,i,o),this.check()}orthographic({fovy:t=45*Math.PI/180,aspect:e=1,focalDistance:n=1,near:r=.1,far:i=500}){if(t>2*Math.PI)throw Error("radians");const o=t/2,a=n*Math.tan(o),s=a*e;return(new mn).ortho({left:-s,right:s,bottom:-a,top:a,near:r,far:i})}perspective({fovy:t,fov:e=45*Math.PI/180,aspect:n=1,near:r=.1,far:i=500}={}){if((t=t||e)>2*Math.PI)throw Error("radians");return Ce(this,t,n,r,i),this.check()}determinant(){return pe(this)}getScale(t=[-0,-0,-0]){return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}getTranslation(t=[-0,-0,-0]){return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}getRotation(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=null){const n=this.getScale(e||[-0,-0,-0]),r=1/n[0],i=1/n[1],o=1/n[2];return t[0]=this[0]*r,t[1]=this[1]*i,t[2]=this[2]*o,t[3]=0,t[4]=this[4]*r,t[5]=this[5]*i,t[6]=this[6]*o,t[7]=0,t[8]=this[8]*r,t[9]=this[9]*i,t[10]=this[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}getRotationMatrix3(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=null){const n=this.getScale(e||[-0,-0,-0]),r=1/n[0],i=1/n[1],o=1/n[2];return t[0]=this[0]*r,t[1]=this[1]*i,t[2]=this[2]*o,t[3]=this[4]*r,t[4]=this[5]*i,t[5]=this[6]*o,t[6]=this[8]*r,t[7]=this[9]*i,t[8]=this[10]*o,t}transpose(){return fe(this,this),this.check()}invert(){return de(this,this),this.check()}multiplyLeft(t){return ve(this,t,this),this.check()}multiplyRight(t){return ve(this,this,t),this.check()}rotateX(t){return _e(this,this,t),this.check()}rotateY(t){return xe(this,this,t),this.check()}rotateZ(t){return be(this,this,t),this.check()}rotateXYZ([t,e,n]){return this.rotateX(t).rotateY(e).rotateZ(n)}rotateAxis(t,e){return ye(this,this,t,e),this.check()}scale(t){return Array.isArray(t)?ge(this,this,t):ge(this,this,[t,t,t]),this.check()}translate(t){return me(this,this,t),this.check()}transform(t,e){return 4===t.length?(G(e=$e(e||[-0,-0,-0,-0],t,this),4),e):this.transformAsPoint(t,e)}transformAsPoint(t,e){const{length:n}=t;switch(n){case 2:e=ot(e||[-0,-0],t,this);break;case 3:e=Lt(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return G(e,t.length),e}transformAsVector(t,e){switch(t.length){case 2:e=function(t,e,n){const r=e[0],i=e[1],o=n[3]*r+n[7]*i||1;return t[0]=(n[0]*r+n[4]*i)/o,t[1]=(n[1]*r+n[5]*i)/o,t}(e||[-0,-0],t,this);break;case 3:e=mt(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return G(e,t.length),e}makeRotationX(t){return this.identity().rotateX(t)}makeTranslation(t,e,n){return this.identity().translate([t,e,n])}transformPoint(t,e){return W("Matrix4.transformPoint","3.0"),this.transformAsPoint(t,e)}transformVector(t,e){return W("Matrix4.transformVector","3.0"),this.transformAsPoint(t,e)}transformDirection(t,e){return W("Matrix4.transformDirection","3.0"),this.transformAsVector(t,e)}}function gn(){var t=new Y(4);return Y!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function yn(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function _n(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function xn(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],u=n[1],h=n[2],c=n[3];return t[0]=r*c+a*s+i*h-o*u,t[1]=i*c+a*u+o*s-r*h,t[2]=o*c+a*h+r*u-i*s,t[3]=a*c-r*s-i*u-o*h,t}function bn(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),s=Math.exp(o),u=a>0?s*Math.sin(a)/a:0;return t[0]=n*u,t[1]=r*u,t[2]=i*u,t[3]=s*Math.cos(a),t}function Mn(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),s=a>0?Math.atan2(a,o)/a:0;return t[0]=n*s,t[1]=r*s,t[2]=i*s,t[3]=.5*Math.log(n*n+r*r+i*i+o*o),t}function En(t,e,n,r){var i,o,a,s,u,h=e[0],c=e[1],l=e[2],f=e[3],d=n[0],p=n[1],v=n[2],m=n[3];return(o=h*d+c*p+l*v+f*m)<0&&(o=-o,d=-d,p=-p,v=-v,m=-m),1-o>q?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-r)*i)/a,u=Math.sin(r*i)/a):(s=1-r,u=r),t[0]=s*h+u*d,t[1]=s*c+u*p,t[2]=s*l+u*v,t[3]=s*f+u*m,t}function wn(t,e){var n,r=e[0]+e[4]+e[8];if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var o=(i+1)%3,a=(i+2)%3;n=Math.sqrt(e[3*i+i]-e[3*o+o]-e[3*a+a]+1),t[i]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+i]+e[3*i+o])*n,t[a]=(e[3*a+i]+e[3*i+a])*n}return t}function Tn(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var o=Math.sin(e),a=Math.cos(e),s=Math.sin(n),u=Math.cos(n),h=Math.sin(r),c=Math.cos(r);return t[0]=o*u*c-a*s*h,t[1]=a*s*c+o*u*h,t[2]=a*u*h-o*s*c,t[3]=a*u*c+o*s*h,t}var An,Rn,Cn,Sn,Pn,Dn,In=Ue,Ln=Ne,On=Fe,Bn=je,kn=ze,Un=xn,Nn=We,Fn=Qe,jn=Je,zn=Ye,Vn=zn,Gn=Xe,Hn=Gn,Wn=Ke,Zn=tn,qn=en,Yn=(An=gt(),Rn=xt(1,0,0),Cn=xt(0,1,0),function(t,e,n){var r=Dt(e,n);return r<-.999999?(It(An,Rn,e),Zt(An)<1e-6&&It(An,Cn,e),Pt(An,An),_n(t,An,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(It(An,e,n),t[0]=An[0],t[1]=An[1],t[2]=An[2],t[3]=1+r,Wn(t,t))}),Xn=(Sn=gn(),Pn=gn(),function(t,e,n,r,i,o){return En(Sn,e,i,o),En(Pn,n,r,o),En(t,Sn,Pn,2*o*(1-o)),t}),Kn=(Dn=ne(),function(t,e,n,r){return Dn[0]=n[0],Dn[3]=n[1],Dn[6]=n[2],Dn[1]=r[0],Dn[4]=r[1],Dn[7]=r[2],Dn[2]=-e[0],Dn[5]=-e[1],Dn[8]=-e[2],Wn(t,wn(t,Dn))}),Qn=Object.freeze({__proto__:null,create:gn,identity:yn,setAxisAngle:_n,getAxisAngle:function(t,e){var n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>q?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n},getAngle:function(t,e){var n=Fn(t,e);return Math.acos(2*n*n-1)},multiply:xn,rotateX:function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u+a*s,t[1]=i*u+o*s,t[2]=o*u-i*s,t[3]=a*u-r*s,t},rotateY:function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u-o*s,t[1]=i*u+a*s,t[2]=o*u+r*s,t[3]=a*u-i*s,t},rotateZ:function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u+i*s,t[1]=i*u-r*s,t[2]=o*u+a*s,t[3]=a*u-o*s,t},calculateW:function(t,e){var n=e[0],r=e[1],i=e[2];return t[0]=n,t[1]=r,t[2]=i,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),t},exp:bn,ln:Mn,pow:function(t,e,n){return Mn(t,e),Nn(t,t,n),bn(t,t),t},slerp:En,random:function(t){var e=X(),n=X(),r=X(),i=Math.sqrt(1-e),o=Math.sqrt(e);return t[0]=i*Math.sin(2*Math.PI*n),t[1]=i*Math.cos(2*Math.PI*n),t[2]=o*Math.sin(2*Math.PI*r),t[3]=o*Math.cos(2*Math.PI*r),t},invert:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-r*s,t[2]=-i*s,t[3]=o*s,t},conjugate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},fromMat3:wn,fromEuler:Tn,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},clone:In,fromValues:Ln,copy:On,set:Bn,add:kn,mul:Un,scale:Nn,dot:Fn,lerp:jn,length:zn,len:Vn,squaredLength:Gn,sqrLen:Hn,normalize:Wn,exactEquals:Zn,equals:qn,rotationTo:Yn,sqlerp:Xn,setAxes:Kn});function Jn(t){return Jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jn(t)}var $n=function(t){return"[object String]"===Object.prototype.toString.call(t)},tr=function(t){var e="[object Function]"===Object.prototype.toString.call(t),n="[object AsyncFunction]"===Object.prototype.toString.call(t);return e||n},er=365611;function nr(t,e){this.type=t,this.returnValue=!0,this.target=e||null,this.currentTarget=null}var rr=function(){function t(){this.__listeners=void 0}var e=t.prototype;return e.on=function(){for(var t=arguments.length,e=new Array(t),n=0;nl?(t[0]=-Math.PI/2,t[1]=2*Math.atan2(i,o),t[2]=0):(t[0]=Math.asin(-2*(n*i-r*o)),t[1]=Math.atan2(2*(n*r+i*o),s-u-h+a),t[2]=Math.atan2(2*(r*i+n*o),-s-u+h+a)),t}var or=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.DefaultOrder;this.isEuler=!0,this._x=void 0,this._y=void 0,this._z=void 0,this._order=void 0,this._onChangeCallback=void 0,this._x=e,this._y=n,this._z=r,this._order=i,this._onChangeCallback=function(){}}var e=t.prototype;return e.set=function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return this._x=t,this._y=e,this._z=n,r&&this._onChangeCallback(),this},e.clone=function(){return new t(this._x,this._y,this._z,this._order)},e.copy=function(t){return t.isEuler?(this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this):this},e.equals=function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},e.toVector3=function(){return xt(this._x,this._y,this._z)},e.onChange=function(t){"function"==typeof t&&(this._onChangeCallback=t)},o(t,[{key:"x",get:function(){return this._x},set:function(t){this._x=t,this._onChangeCallback()}},{key:"y",get:function(){return this._y},set:function(t){this._y=t,this._onChangeCallback()}},{key:"z",get:function(){return this._z},set:function(t){this._z=t,this._onChangeCallback()}},{key:"order",get:function(){return this._order},set:function(t){this._order=t,this._onChangeCallback()}}]),t}();function ar(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}or.DefaultOrder="XYZ";var sr=function(t){return 180*t/Math.PI},ur=function(t){function e(){var n;return(n=t.call(this)||this).isObject3D=!0,n.uuid=ar(),n.name="",n.parent=null,n.children=[],n.visible=!0,n.position=gt(),n.rotation=new or,n.scale=xt(1,1,1),n.quaternion=gn(),n.up=yt(e.DefaultUp),n.modelMatrix=ue(),n.worldMatrix=ue(),n.modelMatrixNeedUpdate=!1,n.worldMatrixNeedsUpdate=!1,n.rotation.onChange((function(){n.modelMatrixNeedUpdate=!0})),n}c(e,t);var n=e.prototype;return n.rotateX=function(t){this.rotation.x=t},n.rotateY=function(t){this.rotation.y=t},n.rotateZ=function(t){this.rotation.z=t},n.translate=function(t,e,n){var r=xt(t,e,n);return this.position=Mt(this.position,this.position,r),this.modelMatrixNeedUpdate=!0,this},n.setPosition=function(t,e,n){var r=xt(t,e,n);return jt(this.position,r)||(this.position=r,this.modelMatrixNeedUpdate=!0),this},n.lookAt=function(t,e,n){var r=this.up,i=this.position,o=xt(t,e,n),a=De(ue(),i,o,r),s=we(gn(),a),u=ir(gt(),s);this.rotation.set(sr(u[0]),sr(u[1]),sr(u[2]))},n.setVisible=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.visible!==t&&(this.visible=t,e))for(var n=0,r=this.children.length;n0&&void 0!==arguments[0]&&arguments[0];!0!==this.modelMatrixNeedUpdate&&!0!==t||this.updateMatrix(),!0===this.worldMatrixNeedsUpdate&&(this.parent?ve(this.worldMatrix,this.parent.worldMatrix,this.modelMatrix):ce(this.worldMatrix,this.modelMatrix),this.worldMatrixNeedsUpdate=!1,t=!0);for(var e=0,n=this.children.length;e ".concat(t)),this;if(t instanceof Array){for(var e=0,n=t.length;e0&&this.children.forEach((function(e){e.traverse(t)}))},n.clone=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=new e;if(n.up=yt(this.up),n.scale=yt(this.scale),n.position=yt(this.position),n.rotation=this.rotation.clone(),n.quaternion=In(this.quaternion),n.modelMatrix=he(this.modelMatrix),n.worldMatrix=he(this.worldMatrix),n.visible=this.visible,this.children.length&&t)for(var r=0,i=this.children.length;ri&&(i=l),f>o&&(o=f),d>a&&(a=d)}var p=xt(e,n,r),v=xt(i,o,a);return this.set(p,v),this},e.getCenter=function(){return this.isInvalid()?gt():xt((this.max[0]+this.min[0])/2,(this.max[1]+this.min[1])/2,(this.max[2]+this.min[2])/2)},e.isInvalid=function(){return this.max[0]3&&void 0!==arguments[3]&&arguments[3];if(this.isBufferAttribute=!0,this.name="",this.type=void 0,this.array=void 0,this.itemSize=void 0,this.count=void 0,this.normalized=void 0,this.usage=void 0,this.needUpdate=void 0,Array.isArray(e))throw new TypeError("BufferAttribute: array should be a Typed Array.");if(this.name="BufferAttribute",this.array=e,this.itemSize=n,this.count=void 0!==e?e.length/n:0,this.normalized=!0===i,this.usage=35044,this.needUpdate=!0,void 0===r){var o=this.array;this.type=t.FLOAT,o instanceof Int8Array?this.type=t.BYTE:o instanceof Uint8Array?this.type=t.UNSIGNED_BYTE:o instanceof Int16Array?this.type=t.SHORT:o instanceof Uint16Array?this.type=t.UNSIGNED_SHORT:o instanceof Int32Array?this.type=t.INT:o instanceof Uint32Array&&(this.type=t.UNSIGNED_INT)}else this.type=r}t.isBufferAttribute=function(e){var n=!1;return e&&e instanceof t&&(n=!0),n};var e=t.prototype;return e.setUsage=function(t){return this.usage=t,this},e.setArray=function(t){return this.array.set(t),this},t}();cr.BYTE=5120,cr.UNSIGNED_BYTE=5121,cr.SHORT=5122,cr.UNSIGNED_SHORT=5123,cr.INT=5124,cr.UNSIGNED_INT=5125,cr.FLOAT=5126;var lr=function(t){function e(e,n,r,i){var o;return(o=t.call(this,new Uint8Array(e),n,r,i)||this).name="Uint8BufferAttribute",o}return c(e,t),e}(cr),fr=function(t){function e(e,n,r,i){var o;return(o=t.call(this,new Uint16Array(e),n,r,i)||this).name="Uint16BufferAttribute",o}return c(e,t),e}(cr),dr=function(t){function e(e,n,r,i){var o;return(o=t.call(this,new Uint32Array(e),n,r,i)||this).name="Uint32BufferAttribute",o}return c(e,t),e}(cr),pr=function(t){function e(e,n,r,i){var o;return(o=t.call(this,new Float32Array(e),n,r,i)||this).name="Float32ArrayAttribute",o}return c(e,t),e}(cr),vr=function(t){function e(e,n,r,i){var o;if(Array.isArray(e)){var a=function(t){for(var e,n=Number.MAX_VALUE,r=-Number.MAX_VALUE,i=t.length-1;i>=0;i--)n>(e=t[i])&&(n=e),r65535?Uint32Array:Uint16Array)(e)}else o=e;return t.call(this,o,n,r,i)||this}return c(e,t),e}(cr),mr=0,gr=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i0&&void 0!==arguments[0]&&arguments[0];!0===this.autoUpdate&&t.prototype.updateWorldMatrix.call(this,e)},n.clone=function(n){return void 0===n&&(n=new e),t.prototype.clone.call(this,n),n.autoUpdate=this.autoUpdate,n},e}(ur),Er=function(t){function e(){var e;return(e=t.call(this)||this).type="Geometry",e.vertices=[],e.verticesBufferData=new Float32Array,e.indicesBufferData=new Uint16Array,e.uvtsBufferData=new Float32Array,e.groupsNeedUpdate=!1,e}return c(e,t),e}(rr),wr=new Jt,Tr=new Jt,Ar=new Jt,Rr=new Jt,Cr=new Jt,Sr=function(){function t(t,e){this.origin=void 0,this.direction=void 0,this.origin=t||new Jt,this.direction=e||new Jt(0,0,-1)}var e=t.prototype;return e.set=function(t,e){return this.origin.copy(t),this.direction.copy(e),this},e.setFromCamera=function(t,e){var n=new Jt(e.position[0],e.position[1],e.position[2]),r=(new mn).fromArray(e.projectionMatrix),i=e.worldMatrix,o=new te(t[0],t[1],.5,1).transform(r).transform(i),a=o.x,s=o.y,u=o.z,h=new Jt(a,s,u).sub(n).normalize();this.set(n,h)},e.getPointByLen=function(t,e){var n=void 0!==e?e:new Jt;return n.copy(this.direction),n.scale(t),n.add(this.origin),n},e.intersectTriangle_Old=function(t,e,n){var r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,a=wr.copy(e).subtract(t),s=Tr.copy(n).subtract(t),u=Ar.copy(a).cross(s),h=Rr.copy(this.origin).subtract(t),c=this.direction.dot(u);if(0c))return null;r=-1,c=-c}s.copy((new Jt).copy(h).cross(s));var l=r*this.direction.dot(s);if(0>l)return null;var f=r*this.direction.dot((new Jt).copy(h).cross(a));if(0>f)return null;if(l+f>c)return null;var d=-r*h.dot(u);return 0>d?null:this.getPointByLen(d/c,o)},e.intersectTriangle=function(t,e,n){var r=arguments.length>4?arguments[4]:void 0,i=1e-6,o=wr.subVectors(e,t),a=Tr.subVectors(n,t),s=Ar.copy(this.direction).cross(a),u=o.dot(s);if(u>-i&&u1)return null;var f=Cr.copy(c).cross(o),d=h*this.direction.dot(f);if(d<0||l+d>1)return null;var p=a.dot(f)*h;return p>i?{distance:p,point:this.getPointByLen(p,r)}:null},e.intersectSphere=function(t,e,n){var r=(new Jt).subtract(t,this.origin),i=r.dot(this.direction),o=r.dot(r)-i*i,a=e*e;if(o>a)return null;var s=Math.sqrt(a-o),u=i-s,h=i+s;return 0>u&&0>h?null:0>u?this.getPointByLen(h,n):this.getPointByLen(u,n)},t}();function Pr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Dr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dr(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Dr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=r.maxTextures?r.usedTextureUnits=0:r.usedTextureUnits+=1,t},this.resetUsedTextureUnits=function(){r.usedTextureUnits=0},this.setTexture=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t instanceof Or)r.setCubeTexture(t,e);else{var n=r.gl;n.activeTexture(n.TEXTURE0+e),t.needsUpdate?(t.init(n),r.uploadTexture(n,t)):n.bindTexture(n.TEXTURE_2D,t.glTexture)}},this.setTextureForRenderTarget=function(t){var e=r.gl;t.glTexture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,t.glTexture),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),r.setTextureParameter(e);var n=e.RGBA,i=e.RGBA,o=e.UNSIGNED_BYTE;e.texImage2D(e.TEXTURE_2D,0,n,t.width,t.height,0,i,o,null)},this.uploadTexture=function(t,e){e.init(t),t.bindTexture(t.TEXTURE_2D,e.glTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.premultiplyAlpha),r.setTextureParameter(t),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e.image),e.needsUpdate=!1},this.setTextureParameter=function(t){t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR)},this.gl=t,this.maxTextureSize=n,this.maxTextures=e}return t.prototype.setCubeTexture=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=t.image;if(6!==n.length)throw new Error("[setCubeTexture] CubeTexture need six images, but get\n ".concat(n.length,"\n "));var r=this.gl;if(t.needsUpdate){t.init(r),r.activeTexture(r.TEXTURE0+e),r.bindTexture(r.TEXTURE_CUBE_MAP,t.glTexture),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,t.flipY),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE);for(var i=0;i<6;i++){var o=n[i];r.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,o)}t.needsUpdate=!1}else r.bindTexture(r.TEXTURE_CUBE_MAP,t.glTexture)},t}(),kr=n((function(t){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{};return(e=t.call(this)||this).map=null,e.color=[1,0,0,1],e.type="BasicMaterial",e.opacity=1,e.depthTest=!0,e.vertexShader=$r,e.fragmentShader=ti,e.uniforms={uSampler:{type:"t",value:null},uColor:{type:"4f",value:[1,0,0,1]},uOpacity:{type:"1f",value:e.opacity}},e.setValues(n),e}c(e,t);var n=e.prototype;return n.setOpacity=function(t){this.uniforms.uOpacity.value=t,this.opacity=t},n.setColor=function(t){!Array.isArray(t)||t.length<4||(this.uniforms.uColor.value=t,this.color=t)},n.setMap=function(t){var e=this;t&&(t instanceof Promise?t.then((function(t){e.uniforms.uSampler.value=t instanceof Lr==!0?t:new Lr(t)})).catch((function(t){return console.error(t)})):!0===t.isTexture&&(this.uniforms.uSampler.value=t),this.map=t)},o(e,[{key:"defines",get:function(){var t=new Jr;return t.useColor=!!this.color,t.useUV=!!this.map,t.getDefines()}}]),e}(Kr),ni=function(t){var e=this;this.gl=void 0,this.newAttributes=new Uint8Array(16),this.enabledAttributes=new Uint8Array(16),this.currentDepthTest=!1,this.currentDepthWrite=!0,this.currentColorWrite=!0,this.currentDoubleSided=!1,this.currentFlipSided=!1,this.initAttributes=function(){for(var t=0,n=e.newAttributes.length;t0&&o.precision>0,u=i&&a&&i.precision>0&&a.precision>0;return"highp"!==t||s?"mediump"!==t||u||(t="lowp",console.warn("[WebGLCapability] mediump is not supported, using lowp by default.")):u?(t="mediump",console.warn("[WebGLCapability] highp is not supported, using mediump by default.")):(t="lowp",console.warn("[WebGLCapability] highp and mediump is not supported, using lowp by default.")),t},this.gl=t,this.maxTextures=this.getMaxTextures(),this.maxVertexShaderTextureUnits=this.getMaxVertexShaderTextureUnits(),this.maxFragmentShaderTextureUnits=this.getMaxFragmentShaderTextureUnits(),this.maxTextureSize=this.getMaxTextureSize(),this.maxVerticesOneDraw=this.getMaxVerticesOneDraw()},ii=0,oi=function(t,e,n){var r=t.createShader(n);if(!r)throw new Error("Something went wrong while compile the shader.");return t.shaderSource(r,e),t.compileShader(r),t.getShaderParameter(r,t.COMPILE_STATUS)||console.error("Error compiling shader: ".concat(t.getShaderInfoLog(r))),r},ai=function(){function t(t,e,n){this.usedTimes=void 0,this.id=void 0,this.code=void 0,this.program=void 0,this.attributes=void 0,this.uniforms=void 0,this.gl=void 0,this.parameters=void 0,this.precision=void 0,this.gl=t,this.parameters=e,this.precision=n.precision||"highp",this.usedTimes=1,this.id=ii++;var r=e.defines,i=void 0===r?"":r,o=e.vertexShader,a=e.fragmentShader;this.code=i+o+a,this.program=this.createProgram(t,e,this.precision),this.attributes=this.fetchAttributes(t,this.program),this.uniforms=function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i={},o=r.length;if(!o)return i;for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:"highp",r=e.vertexShader,i=e.fragmentShader,o=e.defines,a=void 0===o?"":o,s=["precision ".concat(n," float;"),"uniform mat4 modelMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat4 mvpMatrix;","attribute vec3 position;","attribute vec2 uv;",""].join("\n"),u=t.createProgram(),h=["precision ".concat(n," float;"),""].join("\n"),c=oi(t,s+a+r,t.VERTEX_SHADER),l=oi(t,h+a+i,t.FRAGMENT_SHADER);if(!u)throw new Error("Something went wrong while createProgram.");return t.attachShader(u,c),t.attachShader(u,l),t.linkProgram(u),u},e.fetchAttributes=function(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i0&&void 0!==arguments[0]?arguments[0]:{};this.state=void 0,this.domElement=void 0,this.capability=void 0,this.textureOperation=void 0,this._gl=void 0,this.parameters=void 0,this.programs=void 0,this.viewportInfo=void 0,this.autoDisposeProgram=!0,this.currentCacheState=void 0,this.setSize=function(e,n){var r=t.parameters,i=r.canvas,o=r.pixelRatio;i.style.width="".concat(e,"px"),i.style.height="".concat(n,"px"),i.width=e*o,i.height=n*o,t.setViewport(0,0,e,n)},this.setViewport=function(e,n,r,i){var o=t.parameters.pixelRatio,a=t.viewportInfo;a.x=e*o,a.y=n*o,a.width=r*o,a.height=i*o,t._gl.viewport.apply(t._gl,Object.values(a))},this.setClearColor=function(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;!0===t.parameters.premultipliedAlpha&&(e*=i,n*=i,r*=i),t._gl.clearColor(e,n,r,i)},this.getContext=function(){return t._gl},this.forceContextLoss=function(){try{var e=t._gl.getExtension("WEBGL_lose_context");e&&e.loseContext()}catch(t){console.error("[WebGLRenderer] WEBGL_lose_context error: ",t)}},this.initScene=function(e){!0===e.visible&&e.traverse((function(e){!0===e.visible&&e instanceof br&&t.initMesh(e)}))},this.initMesh=function(e){!0===e.visible&&(!0!==e.__webglInit&&(e.__webglInit=!0,e.addEventListener("removed",t.onObjectRemoved)),e.geometry&&t.checkAndUpdateGeometry(e.geometry),e.children&&e.children.length>0&&e.children.forEach((function(e){t.initMesh(e)})))},this.checkAndUpdateGeometry=function(e){!0!==e.__webglInit&&(e.__webglInit=!0,e.addEventListener("removed",t.onGeometryRemove),e.groupsNeedUpdate=!0),!0===e.groupsNeedUpdate&&("BufferGeometry"===e.type?t.updateBufferGeometry(e):t.updateGeometryBuffer(e,t._gl.STATIC_DRAW),e.groupsNeedUpdate=!1)},this.updateGeometryBuffer=function(e,n){var r=e.verticesBufferData,i=e.uvtsBufferData,o=e.indicesBufferData,a=e.borderVerticesBufferData,s=t._gl;03&&void 0!==arguments[3])||arguments[3],o=t._gl;t.textureOperation.resetUsedTextureUnits(),t.checkAndUpdateMaterial(r.material);var a=n.program,s=a.getUniforms();return a.id!==t.currentCacheState.programId&&(o.useProgram(a.program),t.currentCacheState.programId=a.id),!1!==i&&Zr(o,n.uniformsList,t.textureOperation),t.updateMVPMatrix(s,e,r),a},this.checkAndUpdateMaterial=function(e){void 0!==e&&(!0!==e.__webglInit&&(e.__webglInit=!0,e.addEventListener("removed",t.onMaterialRomove),e.needsUpdate=!0),!0===e.needsUpdate&&(t.updateMaterial(e),e.needsUpdate=!1))},this.updateMaterial=function(e){e.program&&t.removeMaterial(e);for(var n=null,r=t.programs.length,i=e.defines,o=(void 0===i?"":i)+e.vertexShader+e.fragmentShader,a=r-1;a>=0;a--){var s=t.programs[a];if(s.code===o){(n=s).usedTimes++;break}}if(null===n){var u={uniforms:e.uniforms,defines:e.defines||"",vertexShader:e.vertexShader,fragmentShader:e.fragmentShader};n=new ai(t._gl,u,{precision:t.parameters.precision}),t.programs.push(n)}e.program=n,e.uniformsList=[];var h=0,c=n.uniforms,l=e.uniforms;for(var f in l)if(Object.prototype.hasOwnProperty.call(l,f)){var d=c[f];d&&(e.uniformsList[h]=[l[f],d],h++)}},this.updateMVPMatrix=function(e,n,r){if(void 0!==e.mvpMatrix){var i=he(n.projectionMatrix);ve(i,i,n.viewMatrix),ve(i,i,r.worldMatrix),t._gl.uniformMatrix4fv(e.mvpMatrix,!1,i),t._gl.uniformMatrix4fv(e.modelMatrix,!1,r.worldMatrix),t._gl.uniformMatrix4fv(e.viewMatrix,!1,n.viewMatrix),t._gl.uniformMatrix4fv(e.projectionMatrix,!1,n.projectionMatrix)}t.currentCacheState.camera=n},this.renderGeometryWithProgram=function(e,n,r){var i=t._gl,o=t.currentCacheState.curRenderTarget;if(e.uniforms.showDebugLine&&i.uniform1i(e.uniforms.showDebugLine,0),"BufferGeometry"===n.type?i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,n.indexesBuffer):i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,n.glIndicesBuffer),null!==o&&void 0!==o.glFrameBuffer){var a=i.checkFramebufferStatus(i.FRAMEBUFFER);if(i.FRAMEBUFFER_COMPLETE!==a)return t.removeRenderTarget(o),void(t.currentCacheState.curRenderTarget=null)}n.indexes&&n.indexes.count>0?i.drawElements(i.TRIANGLES,n.indexes.count,i.UNSIGNED_SHORT,0):i.drawArrays(i.TRIANGLES,0,n.attributes.position.count)},this.onObjectRemoved=function(e){e.target.traverse((function(e){e.removeEventListener("removed",t.onObjectRemoved),t.removeObject(e)}))},this.onGeometryRemove=function(e){var n=e.target;n.removeEventListener("removed",t.onGeometryRemove),t.removeGeometry(n)},this.onMaterialRomove=function(e){var n=e.target;n.removeEventListener("removed",t.onMaterialRomove),t.removeMaterial(n)},this.onRenderTargetRemove=function(e){var n=e.target;n.removeEventListener("removed",t.onRenderTargetRemove),t.removeRenderTarget(n)},this.removeObject=function(t){t.geometry&&delete t.geometry.__webglInit,delete t.__webglInit},this.removeGeometry=function(e){delete e.__webglInit,t.deleteBuffers(e),t.currentCacheState.geometryProgramId=null},this.deleteBuffers=function(e){["glVerticesBuffer","glUvtsBuffer","glIndicesBuffer","glBorderVerticesBuffer"].forEach((function(n){t._gl.deleteBuffer(e[n]),void 0!==e[n]&&0=0;i--){var o=r[i];if(o.program===n){o.usedTimes--,0===o.usedTimes&&!1!==t.autoDisposeProgram&&(r.splice(i,1),t._gl.deleteProgram(n));break}}}},this.removeRenderTarget=function(e){t._gl.deleteRenderbuffer(e.glDepthBuffer),e.glDepthBuffer=null,t._gl.deleteTexture(e.glTexture),e.glTexture=null,t._gl.deleteFramebuffer(e.glFrameBuffer),e.glFrameBuffer=null},this.parameters=Object.assign({},si,e),e&&!e.canvas&&(this.parameters.canvas=document.createElement("canvas")),this.initGL(),this.programs=[],this.viewportInfo={x:0,y:0,width:this.parameters.canvas.width,height:this.parameters.canvas.height},this.parameters.width&&this.parameters.height&&this.setSize(this.parameters.width,this.parameters.height),this.domElement=this.parameters.canvas,this.state=new ni(this._gl),this.state.setDefaultGLState.apply(this.state,Object.values(this.viewportInfo)),this.currentCacheState={programId:null,geometryProgramId:null,materialId:null,camera:null,curRenderTarget:null},this.capability=new ri(this._gl);var n=this.capability.maxTextures,r=this.capability.maxTextureSize;this.textureOperation=new Br(this._gl,n,r)}var e=t.prototype;return e.clearBuffer=function(){var t=this._gl;t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)},e.initGL=function(){var t=this,e=this.parameters,n=e.canvas,r=e.context,i=e.alpha,o=e.depth,a=e.stencil,s=e.antialias,u=e.premultipliedAlpha,h=e.preserveDrawingBuffer;try{var c={alpha:i,depth:o,stencil:a,antialias:s,premultipliedAlpha:u,preserveDrawingBuffer:h},l=r||n.getContext("webgl",c)||n.getContext("experimental-webgl",c)||n.getContext("moz-webgl",c)||n.getContext("webkit-3d",c);if(!l)throw null!==n.getContext?"Error creating WebGL context with your provided attributes.":"Error creating WebGL context.";this._gl=l,n.addEventListener("webglcontextlost",(function(e){e.preventDefault(),void 0!==t.state&&(t.resetGLState(),t.state.setDefaultGLState.apply(t.state,Object.values(t.viewportInfo)))}),!1)}catch(t){console.error("[WebGLRenderer] Create webgl error: ",t)}},e.resetGLState=function(){this.currentCacheState={programId:null,geometryProgramId:null,materialId:null,camera:null,curRenderTarget:null},this.state.reset()},e.setRenderTarget=function(t){var e=this._gl;void 0!==t&&null===t.glFrameBuffer&&(t.addEventListener("removed",this.onRenderTargetRemove),t.glFrameBuffer=e.createFramebuffer(),e.bindFramebuffer(e.FRAMEBUFFER,t.glFrameBuffer),this.textureOperation.setTextureForRenderTarget(t),t.glDepthBuffer=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,t.glDepthBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,t.width,t.height),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t.glTexture,0),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t.glDepthBuffer),e.bindTexture(e.TEXTURE_2D,null),e.bindRenderbuffer(e.RENDERBUFFER,null),e.bindFramebuffer(e.FRAMEBUFFER,null))},e.render=function(t,e,n){if(e.isCamera){var r=this._gl;if(t.updateWorldMatrix(),e.updateWorldMatrix(),e.updateProjectionMatrix(),this.currentCacheState.camera=null,void 0!==n)this.setRenderTarget(n),this.currentCacheState.curRenderTarget=n,r.bindFramebuffer(r.FRAMEBUFFER,n.glFrameBuffer),r.viewport(0,0,n.width,n.height);else{var i=this.viewportInfo,o=i.width,a=i.height;this.currentCacheState.curRenderTarget=null,r.bindFramebuffer(r.FRAMEBUFFER,null),r.viewport(0,0,o,a)}this.initScene(t),this.renderScene(t,e)}else console.error("[WebGLRenderer] Camera is not leagal.")},e.updateBufferGeometry=function(t){var e=this._gl,n=t.getIndexes(),r=t.getAttribute();for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var o=i+"Buffer",a=r[i],s=a.array,u=a.usage;t[o]=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,t[o]),e.bufferData(e.ARRAY_BUFFER,s,u)}n&&(t.indexesBuffer=e.createBuffer(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.indexesBuffer),e.bufferData(e.ELEMENT_ARRAY_BUFFER,n.array,n.usage))},e.updateVerticesAttribute2=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this._gl,i=!1,o="".concat(e.id,"_").concat(t.id);if(o!==this.currentCacheState.geometryProgramId){this.currentCacheState.geometryProgramId=o,this.state.initAttributes(),i=!0;var a=e.getAttribute();for(var s in a)if(Object.prototype.hasOwnProperty.call(a,s)){var u=s+"Buffer",h=a[s],c=h.itemSize,l=h.type,f=h.normalized;0<=t.attributes[s]&&(!0!==n&&(r.bindBuffer(r.ARRAY_BUFFER,e[u]),r.vertexAttribPointer(t.attributes[s],c,l,f,0,0)),this.state.enableAttribute(t.attributes[s]))}}return this.state.disableUnusedAttributes(),i},e.updateVerticesAttribute=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this._gl,i=!1,o="".concat(e.id,"_").concat(t.id);if(o!==this.currentCacheState.geometryProgramId){this.currentCacheState.geometryProgramId=o,this.state.initAttributes(),i=!0;var a=t.getAttributes();0<=a.position&&(!0!==n&&(r.bindBuffer(r.ARRAY_BUFFER,e.glVerticesBuffer),r.vertexAttribPointer(a.position,3,r.FLOAT,!1,0,0)),this.state.enableAttribute(a.position)),0<=a.uv&&void 0!==e.glUvtsBuffer&&(r.bindBuffer(r.ARRAY_BUFFER,e.glUvtsBuffer),r.vertexAttribPointer(a.uv,2,r.FLOAT,!1,0,0),this.state.enableAttribute(a.uv))}return this.state.disableUnusedAttributes(),i},t}(),hi=function(t){function e(e,n,r,i,o,a){var s;switch((s=t.call(this)||this).addIntoBuffer=function(t,e,n){t[n]=e[0],t[n+1]=e[1],t[n+2]=e[2]},s.get3DVertex=function(t,e){var n;switch(e){case"x":n=xt(0,t[0],t[1]);break;case"y":n=xt(t[0],0,t[1]);break;default:n=xt(t[0],t[1],0)}return n},s.zeroAxis=void 0!==o?o:"z",s.zeroAxis){case"x":s.normal=xt(-1,0,0);break;case"y":default:s.normal=xt(0,-1,0);break;case"z":s.normal=xt(0,0,-1)}a=void 0!==a?a:{},s.showBorder=!(!1===a.showBorder),s.borderWidth=void 0!==a.borderWidth?a.borderWidth:1,s.borderColor=void 0!==a.borderColor?a.borderColor:[0,0,0,1];var u,h,c,l=.5*e,f=.5*n,d=r||1,p=i||1,v=e/d,m=n/p,g=(d+1)*(p+1);s.verticesBufferData=new Float32Array(3*g),s.uvtsBufferData=new Float32Array(2*g),s.indicesBufferData=new(g>65535?Uint32Array:Uint16Array)(d*p*6);for(var y=0,_=0,x=0;x<=p;x++){u=x*m-f;for(var b=0;b<=d;b++)c=Q(b*v-l,u),h=s.get3DVertex(c,s.zeroAxis),s.vertices.push(h),s.addIntoBuffer(s.verticesBufferData,h,y),s.uvtsBufferData[_]=b/d,s.uvtsBufferData[_+1]=1-x/p,y+=3,_+=2}for(var M,E,w,T,A=0,R=0;R0;I-=d+1)s.addIntoBuffer(s.borderVerticesBufferData,s.vertices[I],S),S+=3;for(var L=d-1;L>0;L--)s.addIntoBuffer(s.borderVerticesBufferData,s.vertices[L],S),S+=3;return s}return c(e,t),e}(Er),ci="z",li=function(t){function e(n,r,i,o){var a,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};a=t.call(this)||this;var u=e.buildPlane(n,r,i,o,s),h=u.uvs,c=u.indices,l=u.normals,f=u.vertices;return a.name="PlaneBufferGeometry",a.setAttribute("position",new pr(f,3)),a.setAttribute("normals",new pr(l,3)),a.setAttribute("uv",new pr(h,2)),a.setIndexes(c),a}return c(e,t),e.buildPlane=function(t,n,r,i){for(var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=o.normalAxis,s=void 0===a?ci:a,u=o.useBack,h=void 0!==u&&u,c=o.normalDest,l=void 0===c?0:c,f=.5*t,d=.5*n,p=r||1,v=i||1,m=t/p,g=n/v,y=e.getNormal(s,h),_=[],x=[],b=[],M=[],E=0;E<=v;E++)for(var w=E*g-d,T=0;T<=p;T++){var A=T*m-f,R=e.get3DVertex([A,w],s,l);b.push.apply(b,zr(R)),_.push(T/p,1-E/v),M.push.apply(M,zr(y))}for(var C=0;C1&&void 0!==arguments[1]&&arguments[1],r=n?-1:1;switch(t){case"x":e=[r,0,0];break;case ci:e=[0,0,r];break;default:e=[0,r,0]}return e},e}(gr);li.get3DVertex=function(t,e){var n,r=Wr(t,2),i=r[0],o=r[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;switch(e){case"x":n=[a,i,o];break;case"y":n=[i,a,o];break;default:n=[i,o,a]}return n};var fi=function(t){function e(e,n,r,i,o,a){var s;(s=t.call(this)||this).name="BoxGeometry";var u=s.initBox(e,n,r,i,o,a),h=u.uvs,c=u.normals,l=u.vertices,f=u.indices;return s.setAttribute("position",new pr(l,3)),s.setAttribute("normals",new pr(c,3)),s.setAttribute("uv",new pr(h,2)),s.setIndexes(f),s}return c(e,t),e.prototype.initBox=function(t,e,n,r,i,o){var a=[],s=li.buildPlane,u=s(n,e,o,i,{normalAxis:"x",normalDest:t/2}),h=s(n,e,o,i,{normalAxis:"x",useBack:!0,normalDest:-t/2}),c=s(t,n,r,o,{normalAxis:"y",normalDest:e/2}),l=s(t,n,r,o,{normalAxis:"y",useBack:!0,normalDest:-e/2}),f=s(t,e,r,i,{normalAxis:"z",normalDest:n/2}),d=s(t,e,r,i,{normalAxis:"z",useBack:!0,normalDest:-n/2});a.push(u,h,c,l,f,d);for(var p=0,v=[],m=[],g=[],y=[],_=function(t){var e=a[t],n=e.uvs,r=e.vertices,i=e.normals,o=e.indices,s=p;v=v.concat(n),m=m.concat(r),g=g.concat(i),y=y.concat(o.map((function(t){return s+t}))),p+=r.length/3},x=0;x<6;x++)_(x);return{uvs:v,vertices:m,normals:g,indices:y}},e}(gr),di=function(t){function e(e,n){var r;return(r=t.call(this)||this).width=void 0,r.height=void 0,r.glFrameBuffer=null,r.glDepthBuffer=null,r.flipY=!1,r.premultiplyAlpha=!1,r.glTexture=null,r.width=e,r.height=n,r}return c(e,t),e}(rr);function pi(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return vi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vi(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function vi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0){var o=i.split("/");e.push(o)}}for(var a=e[0],s=1,u=e.length-1;s=0?n-1:n+e/3)},e.parseUVIndex=function(t,e){var n=parseInt(t,10);return 2*(n>=0?n-1:n+e/2)},t}();function gi(t){return new Promise((function(e,n){var r=new Image;r.src=t,r.crossOrigin="Anonymous",r.onload=function(){e(r)},r.onerror=function(t){n(t)}}))}function yi(t){if(6!==t.length)throw new Error("[loadCubeTexture] param urls need len six. [px, nx, py, ny, pz, nz]");return new Promise((function(e,n){for(var r=0,i=new Or,o=i.image,a=function(a){gi(t[a]).then((function(t){r++,o[a]=t,6===r&&(i.needsUpdate=!0,e(i))})).catch((function(t){console.error(t),n(t)}))},s=0;s<6;s++)a(s)}))}var _i=function(t){function e(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e3;return(e=t.call(this)||this).isCamera=!0,e.viewMatrix=ue(),e.projectionMatrix=ue(),e.projectionMatrixNeedUpdate=!1,e._far=void 0,e._near=void 0,e._far=r,e._near=n,e}return c(e,t),e.prototype.updateWorldMatrix=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t.prototype.updateWorldMatrix.call(this,e),de(this.viewMatrix,this.worldMatrix)},o(e,[{key:"near",get:function(){return this._near},set:function(t){this._near=t,this.projectionMatrixNeedUpdate=!0}},{key:"far",get:function(){return this._far},set:function(t){this._far=t,this.projectionMatrixNeedUpdate=!0}}]),e}(ur),xi=function(t){function e(e,n,r,i,o,a){var s;return(s=t.call(this,o,a)||this)._left=void 0,s._right=void 0,s._top=void 0,s._bottom=void 0,s._top=r,s._left=e,s._right=n,s._bottom=i,s.updateProjectionMatrix(!0),s}c(e,t);var n=e.prototype;return n.updateProjectionMatrix=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!0===t||!0===this.projectionMatrixNeedUpdate){var e=(this.right-this.left)/2,n=(this.top-this.bottom)/2,r=(this.right+this.left)/2,i=(this.top+this.bottom)/2,o=r-e,a=r+e,s=i+n,u=i-n;le(this.projectionMatrix),Se(this.projectionMatrix,o,a,s,u,this.near,this.far),this.projectionMatrixNeedUpdate=!1}},n.clone=function(n){return void 0===n&&(n=new e(0,0,0,0,0,0)),t.prototype.clone.call(this,n),n.left=this.left,n.right=this.right,n.top=this.top,n.bottom=this.bottom,n.near=this.near,n.far=this.far,n.updateProjectionMatrix(),n.updateWorldMatrix(),n},o(e,[{key:"top",get:function(){return this._top},set:function(t){t!==this._top&&(this._top=t,this.projectionMatrixNeedUpdate=!0)}},{key:"left",get:function(){return this._left},set:function(t){t!==this._left&&(this._left=t,this.projectionMatrixNeedUpdate=!0)}},{key:"right",get:function(){return this._right},set:function(t){t!==this._right&&(this._right=t,this.projectionMatrixNeedUpdate=!0)}},{key:"bottom",get:function(){return this._bottom},set:function(t){t!==this._bottom&&(this._bottom=t,this.projectionMatrixNeedUpdate=!0)}}]),e}(_i),bi=function(t){function e(e,n,r,i){var o;return(o=t.call(this,r,i)||this).type="PerspectiveCamera",o._fov=void 0,o._aspect=void 0,o._fov=e,o._aspect=n,o.updateProjectionMatrix(!0),o}c(e,t);var n=e.prototype;return n.updateProjectionMatrix=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!0!==t&&!0!==this.projectionMatrixNeedUpdate||(le(this.projectionMatrix),Ce(this.projectionMatrix,this.fov*Math.PI/180,this.aspect,this.near,this.far),this.projectionMatrixNeedUpdate=!1)},n.clone=function(n){return void 0===n&&(n=new e(0,0,0,0)),t.prototype.clone.call(this,n),n.fov=this.fov,n.aspect=this.aspect,n.near=this.near,n.far=this.far,n.updateProjectionMatrix(),n.updateWorldMatrix(),n},o(e,[{key:"fov",get:function(){return this._fov},set:function(t){t!==this._fov&&(this._fov=t,this.projectionMatrixNeedUpdate=!0)}},{key:"aspect",get:function(){return this._aspect},set:function(t){t!==this._aspect&&(this._aspect=t,this.projectionMatrixNeedUpdate=!0)}}]),e}(_i),Mi=Object.freeze({__proto__:null,Mesh:br,Scene:Mr,Geometry:Er,Object3D:ur,Raycaster:Ir,Texture:Lr,CubeTexture:Or,TextureOperation:Br,Material:Kr,BasicMaterial:ei,BufferGeometry:gr,WebGLRenderer:ui,PlaneGeometry:hi,BoxGeometry:fi,WebGLRenderTarget:di,PlaneBufferGeometry:li,Box3:hr,OBJLoader:mi,loadImage:gi,loadTexture:function(t,e,n){return gi(t).then((function(t){var n=new Lr(t);return e&&e(n),n})).catch((function(t){n&&n(t)}))},loadCubeTexture:yi,Vec2:vt,Vec3:Xt,Vec4:ln,Mat3:se,Mat4:Be,Quat:Qn,quatToEuler:ir,BufferAttribute:cr,Uint8BufferAttribute:lr,Uint16BufferAttribute:fr,Uint32BufferAttribute:dr,Float32ArrayAttribute:pr,UintBufferAttribute:vr,OrthographicCamera:xi,PerspectiveCamera:bi}),Ei=function(){function t(t){this.pano=void 0,this.panoData=void 0,this._meshs=new br,this.pano=t}return o(t,[{key:"camera",get:function(){return this.pano.camera}},{key:"meshs",get:function(){return this._meshs},set:function(t){this._meshs=t}}]),t}(),wi=["varying vec3 v_normal;","void main(void){"," gl_Position = mvpMatrix * vec4(position, 1.0);"," v_normal = normalize(position.xyz);","}"].join("\n"),Ti=["uniform samplerCube uSampler;","uniform float uOpacity;","varying vec3 v_normal;","void main(void){"," vec4 textureColor = textureCube(uSampler, normalize(v_normal));"," gl_FragColor = vec4(textureColor.rgb, textureColor.a * uOpacity);","}"].join("\n"),Ai=function(t){function e(e){var n;return(n=t.call(this,e)||this).initMesh(),n}c(e,t);var n=e.prototype;return n.initMesh=function(){var t=new fi(8,8,8,1,1,1),e=new Kr;e.vertexShader=wi,e.fragmentShader=Ti,e.uniforms={vColor:{type:"4f",value:[1,0,0,1]},uSampler:{type:"t",value:null},uOpacity:{type:"1f",value:1}};var n=new br(t,e);n.visible=!1,n.setScale(-1,1,1),this.meshs=n},n.setData=function(t){var e=this;if(!t.image||6!==t.image.length)throw new Error("天空盒模型需要6张纹理,但只获取到 ".concat(t.image?t.image.length:0,"张"));this.panoData=t;var n=this.meshs;yi(t.image).then((function(t){n.material.uniforms.uSampler.value=t,n.visible=!0,e.pano.emit({type:d.REFRESH,log:"[Refresh Log] 立方贴图加载完成, 渲染一帧"})})).catch((function(t){return console.error(t)}))},n.update=function(){},n.draw=function(){},e}(Ei),Ri=function(t){return t},Ci=function(t){return t*t},Si=function(t){return-t*(t-2)},Pi=Ci,Di=Si,Ii=Object.freeze({__proto__:null,linear:Ri,reverse:function(t){return 1-t},easeInQuad:Ci,easeInCubic:function(t){return Math.pow(t,3)},easeOutQuad:Si,easeOutCubic:function(t){return Math.pow(t-1,3)+1},easeInOutQuad:function(t){return t<.5?t*t*2:-2*(t-2)*t-1},easeInOutCubic:function(t){return t<.5?4*Math.pow(t,3):4*Math.pow(t-1,3)+1},easeInOutSine:function(t){return(1-Math.cos(Math.PI*t))/2},easeIn:Pi,easeOut:Di}),Li=function(){},Oi=function(){function t(t,e,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ri;this.from=void 0,this.to=void 0,this.duration=void 0,this.easingFn=void 0,this._isPlaying=!1,this._autoTimer=null,this._startTime=null,this._onUpdateCallback=Li,this._onEndCallback=Li,this.start=function(){return r._isPlaying||(r._isPlaying=!0,r._startTime=r.getNow()),r},this.stop=function(){return r._isPlaying=!1,r},this.startAndAutoUpdate=function(){if(r._isPlaying)return r;r.start(),r._autoTimer=null;return function t(){r.update(),r._autoTimer=requestAnimationFrame(t)}(),r},this.onEnd=function(t){return"function"==typeof t?r._onEndCallback=t:console.warn("[Warning] onUpdate required a funtion"),r},this.onUpdate=function(t){return"function"==typeof t?r._onUpdateCallback=t:console.warn("[Warning] onUpdate required a funtion"),r},this.update=function(){if(!r._isPlaying)return!1;var t=r.from,e=r.to,n=r.getNow(),i=r.easingFn,o=r._startTime;if(o>n)return!1;var a=(n-o)/r.duration,s=t+(e-t)*i(a=0===r.duration||a>1?1:a);return r._onUpdateCallback(s),1===a&&r.handleEnd(),!0},this.from=t,this.to=e,this.duration=n,this.easingFn=i}var e=t.prototype;return e.getNow=function(){return Date.now()},e.handleEnd=function(){this._isPlaying=!1,this._autoTimer=null,this._onEndCallback()},t}(),Bi=function(t,e,n){var r=.5*e,i=.5*n;return Q((t[0]-r)/r,(i-t[1])/i)},ki=function(t,e,n){var r=.5*e,i=.5*n;return Q((t[0]+1)*r,(1-t[1])*i)},Ui=function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:100,o=ke(),a=Bi(t,n,r),s=Ne(a[0],a[1],i,1),u=ue(),h=e.worldMatrix;return de(u,e.projectionMatrix),$e(o,s,u),$e(o,o,h),o},Ni=function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=Ne(e[0],e[1],e[2],1);if($e(o,o,t.viewMatrix),0=0&&a<=n&&s>=0&&s<=r&&(u=!0),u},ji=Object.freeze({__proto__:null,viewportToNormalizeProjection:Bi,normalizeProjectionToViewport:ki,viewportToWorld:Ui,worldToViewport:Ni,isCoordsInView:Fi}),zi=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;this.getVertexs=function(){return e.vertexs},this.getFacesVertex=function(){return e.facesVertex},this.generateTextureCoord=function(n,r,i){var o=e.facesVertex[Math.round(e.facesVertex.length/2)];if(o){for(var a=[],s=Math.pow(2,5-i),u=r%s,h=n%s,c=t.H_SEGS/e.cols,l=1/c,f=1/((t.V_SEGS-1)/e.rows),d=0;d0?s<0&&(u=360-u):u=s>0?180-u:180+u,u%=360,r=a>e._x3?7:a>e._x2?6:a>e._x1?5:a>0?4:a>-e._x1?3:a>-e._x2?2:a>-e._x3?1:0;var h=Math.floor(u/22.5),c=t.H_SEGS;return[h,r,h+r*(c/(c/e.cols))]},this.viewportToSphereCoord=function(t,n,r,i){var o=e.radius,a=Ui(t,i,n,r),s=Wr(a,3),u=s[0],h=s[1],c=s[2],l=o/Math.sqrt(u*u+h*h+c*c);return[u*l,h*l,c*l]},this.getFaceVertex=function(n,r){var i=t.H_SEGS/e.cols,o=r+n*(t.H_SEGS/i);return e.facesVertex[o]},this.radius=n,this.rows=t.DEFAULT_COLS/2,this.cols=t.DEFAULT_COLS,this.vertexs=null,this.facesVertex=[],this.facesVertexIndice=[],this.init()}var e=t.prototype;return e.init=function(){var t=this.getSphereVertexInfo();this.facesVertexIndice=this.getSphereFacesIndices(),this.vertexs=t.vertexs,this.facesVertex=t.facesVertex,this.calcConst()},e.calcConst=function(){var t=360/this.cols;this._x1=Math.cos(g(3*t))*this.radius,this._x2=Math.cos(g(2*t))*this.radius,this._x3=Math.cos(g(1*t))*this.radius},e.getSphereVertexInfo=function(){for(var e,n=[],r=[],i=this.radius,o=t.H_SEGS,a=t.V_SEGS,s=360/o,u=180/(a-1),h=o/this.cols,c=o/h,l=0,f=0,d=[],p=0;p0&&p%h==0){var b=f+(l-1)*c;r[b].push(_,v,x),y>0&&y%h==0&&r[b-1]&&r[b-1].push(_,v,x),y===o-1&&r[b].push(d[0],d[1],d[2])}0===f&&0===y&&(d=[_,v,x]),y>0&&y%h==0&&r[e-1]&&r[e-1].push(_,v,x),l2&&void 0!==arguments[2]?arguments[2]:"";this.imageInstancePool=void 0,this.tileImagesCache=void 0,this.textureInfo=void 0,this.pano=void 0,this.udtVersion=void 0,this.cdnList=void 0,this.calcTileKey=function(t,e,n,r){return"".concat(t,"_").concat(e,"_").concat(n,"_").concat(r)},this.loadImage=function(t,e,n,i){var o=r.calcTileKey(t,e,n,i),a=r.getTilesUrl(t,{x:e,y:n},i),s=r.tileImagesCache.getData(o);return new Promise((function(t,e){s?t(s._loaded?s:null):((s=r.imageInstancePool.getImageInstance()).crossOrigin="anonymous",s._loaded=!1,s.onload=function(){s._loaded=!0,t(s)},s.onerror=function(t){console.error("Tile ".concat(o," load error => "),t),e(t)},s.src=a,r.tileImagesCache.setData(o,s))}))},this.loadTexture=function(t,e,n,i){var o=r.calcTileKey(t,e,n,i),a=r.textureInfo.getData(o);return new Promise((function(s,u){a&&a.loaded?s(a):r.loadImage(t,e,n,i).then((function(t){if(!t)return null;var e=new Lr(t);1!==i&&r.textureInfo.setData(o,e),s(e)})).catch((function(t){console.error("[TextureManager] loadTexture fail => ".concat(t)),u(null)}))}))},this.loadTopoTexture=function(t){var e=0,n=new Image;return new Promise((function(r){n.onload=function(){var t=new Lr(n);t.flipY=!1,r(t)},n.onerror=function(){2>e?(e++,n.src="".concat(t,"&random=").concat((new Date).getTime())):r(null)},n.crossOrigin="anonymous",n.src=t}))},this.clear=function(){r.textureInfo.clear()},this.pano=e,this.udtVersion=i,this.cdnList=n||e.opts.tileBaseUrls,this.imageInstancePool=new Vi,this.tileImagesCache=new T(t.MAX_TILE_CACHED,{clearCallback:function(t){r.imageInstancePool.freeImage(t)}}),this.textureInfo=new T(t.MAX_TILE_CACHED,{clearCallback:function(t){t.destory()}})}var e=t.prototype;return e.getRandomCDN=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.length;return t[Math.floor(Math.random()*e)]},e.getTilesUrl=function(e,n,r){return this.getRandomCDN(this.cdnList)+t.TILE_URL_TEMPLATE.replace("{udt}",this.udtVersion).replace("{sid}",e).replace("{x}","".concat(n.x)).replace("{y}","".concat(n.y)).replace("{zoom}","".concat(r))},t}();Gi.MAX_TILE_CACHED=160,Gi.TILE_URL_TEMPLATE="?qt=pdata&sid={sid}&pos={y}_{x}&z={zoom}&udt={udt}&from=H5";var Hi=["attribute vec2 uvBack;","varying mediump vec2 vTextureCoordBack;","varying mediump vec2 vTextureCoord;","void main(void) {"," gl_Position = mvpMatrix * vec4(position, 1.0);"," vTextureCoordBack = uvBack;"," vTextureCoord = uv;","}"].join("\n"),Wi=["precision mediump float;","varying vec2 vTextureCoordBack;","varying vec2 vTextureCoord;","uniform sampler2D uSamplerBack;","uniform sampler2D uSampler;","uniform bool uDrawThumb;","uniform bool uDrawBack;","uniform float uAlpha;","void main(void) {"," if (uDrawThumb) {"," gl_FragColor = texture2D(uSamplerBack, vTextureCoordBack);"," return;"," }"," if (uAlpha == 1.0) {"," gl_FragColor = texture2D(uSampler, vTextureCoord);"," return;"," }"," if (uDrawBack) {"," gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha + texture2D(uSamplerBack, vTextureCoordBack) * (1.0 - uAlpha);"," } else {"," vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));"," gl_FragColor = vec4(textureColor.rgb, textureColor.a * uAlpha);"," }","}"].join("\n"),Zi=["varying highp vec2 vTextureCoord;","void main(void) {"," gl_Position = mvpMatrix * vec4(position, 1.0);"," vTextureCoord = uv;","}"].join("\n"),qi=["precision mediump float;","uniform sampler2D uSampler;","varying highp vec2 vTextureCoord;","void main(void) {"," gl_FragColor = texture2D(uSampler, vTextureCoord);","}"].join("\n"),Yi=["varying highp vec2 vTextureCoord;","void main(void) {"," gl_Position = mvpMatrix * vec4(position, 1.0);"," vTextureCoord = uv;","}"].join("\n"),Xi=["uniform sampler2D uSampler;","uniform float uOpacity;","varying vec2 vTextureCoord;","void main(void){"," vec4 textureColor = texture2D(uSampler, vTextureCoord);"," gl_FragColor = vec4(textureColor.rgb, textureColor.a * uOpacity);","}"].join("\n"),Ki=["varying highp vec3 vTextureCoord;","void main(void){"," gl_Position = mvpMatrix * vec4(position, 1.0);"," vTextureCoord = vec3(uv, 1.0) * length(position);","}"].join("\n"),Qi=["uniform sampler2D uSampler;","uniform float uOpacity;","varying vec3 vTextureCoord;","uniform bool showDebugLine;","uniform vec4 vColor;","void main(void){"," if (!showDebugLine) {"," vec4 textureColor = texture2DProj(uSampler, vTextureCoord);"," gl_FragColor = vec4(textureColor.rgb, textureColor.a * uOpacity);"," } else {"," gl_FragColor = vec4(vColor.rgb, vColor.a);"," }","}"].join("\n"),Ji=function(){function t(e,n,r,i){this.nodes=void 0,this.level=void 0,this.key=void 0,this.nodes=[],this.level=e,this.key="".concat(r,"_").concat(i),e0},e.getNodeKeysByLevel=function(t){if(to&&(p=o);for(var b=d;b<=p;b++)for(var M=v;M<=m;M++){var E=b<0?b+i:b;n.checkAndLoadTile(t,E,M,n._imgZoom),l.push([M,E])}}n.hitTile=l,l.forEach((function(t){var e=Wr(t,2),r=e[0],i=e[1],o="".concat(r,"_").concat(i,"_").concat(n._imgZoom);if(void 0===n.tileInfoCache[o]){var a=new Ji(n._imgZoom,5,r,i).getNodeKeysByLevel(5);n.tileInfoCache[o]=a}}))}},n.draw=function(){var t=n.meshs;if(!n.faceRange||!n.curThumbTexture)return!1;t.children=[];for(var e=function(e,r){var i=n.curThumbTexture,o=n.textureManager.calcTileKey(n.panoData.panoId,e,r,n._imgZoom),a=n.textureManager.textureInfo.getData(o),s=!1,u=null;if(a?!(u=a).finished&&u.aniInfo&&u.aniInfo&&u.aniInfo.update():i&&(s=!0,u=i),u){var h="".concat(r,"_").concat(e,"_").concat(n._imgZoom),c=n.meshCache[h];if(!c){if(!(c=n.createTileMesh(r,e)))return;n.meshCache[h]=c}if(!c.material)return;var l=c.material.uniforms;l.uSamplerBack.value=i,s?l.uDrawThumb.value=!0:(l.uDrawThumb.value=!1,l.uSampler.value=u,l.uAlpha.value=u.alpha),t.add(c)}},r=0;rS&&(w=Math.min.apply(Math,zr(b.filter((function(t){return t>S}))))),R.max-R.min>S&&(T=Math.max.apply(Math,zr(E.filter((function(t){return tT&&(w-=C);var P=this.getImgIndexByFaceColRow(w,_),D=Wr(P,2),I=D[0],L=D[1],O=this.getImgIndexByFaceColRow(T,x),B=Wr(O,2);return[[w,T,_,x],[I,B[0],L,B[1]]]},n.updateRangeInfo=function(){var t=this.getTileBoundary(),e=Wr(t,2),n=e[0],r=e[1];this.imgRange=r,this.faceRange=n},n.getImgIndexByFaceColRow=function(t,e,n){n=n||this._imgZoom;var r=Math.pow(2,5-n),i=Math.floor(t/r),o=Math.floor(e/r);return[i,o=this.imgColsRows[n].rows-o-1,i+o*zi.DEFAULT_COLS/r]},n.normalizeNum=function(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t;r .5) {\n damp_factor = (1.0 - progress) * 2.0;\n }\n\n float cut_factor = clamp(wave_width * damp_factor - abs(current_radius - len), 0.0, 1.0);\n float waves_factor = waves * len / radius;\n uv_offset = (p / len) * cos((waves_factor - progress * speed) * 3.14) * amp * cut_factor;\n\n uv += uv_offset;\n\n vec4 t_image = texture2D(uSampler, fract(tc + uv));\n\n // gl_FragColor = t_image;\n gl_FragColor = vec4(t_image.rgb, t_image.a * uOpacity);\n }\n",t.uniforms={uSampler:{type:"t",value:this.snapshot},uCenter:{type:"2f",value:[.5,.5]},uOpacity:{type:"1f",value:1},progress:{type:"1f",value:0},speed:{type:"1f",value:4},waves:{type:"1f",value:14},band:{type:"1f",value:.3},amp:{type:"1f",value:.3},aspect:{type:"1f",value:n/r},radius:{type:"1f",value:1}},this.material=t,t},t}(),uo=function(){function t(t,e,n,r){var i=this;this.startAni=function(){i.animation.start()},this.update=function(){i.animation.update()},this.pano=t,this.distance=n,this.refinedDir=e,this.camera=this.pano.camera,this.cameraBase=this.pano.camera.clone(),this.handleEnd=r,this.initAni()}return t.prototype.initAni=function(){var t=this,e=this.distance,n=this.refinedDir,r=Math.cos(g(n)),i=Math.sin(g(n));this.animation=new Oi(0,1,400,Ii.easeOutQuad).onUpdate((function(n){var o=e*n,a=r*o,s=i*o;t.camera.setPosition(a,0,s),t.pano.dispatchEvent({debug:!0,type:d.REFRESH,log:"[Refresh Log] 前进动画, 渲染一帧"})})).onEnd((function(){t.handleEnd&&t.handleEnd()}))},t}(),ho=function(t,e,n,r){this.x=t||0,this.y=e||0,this.width=n||0,this.height=r||0},co=function(t,e){var n=this;this.angleDegreeDelta=function(t,e){var n=Math.abs(t-e);return n>180?360-n:n},this.getRoad=function(t,e,n,r,i){for(var o,a=[],s=[[-t/2,-e,-10],[-t/2,-e,-20],[t/2,-e,-10],[t/2,-e,-20]],u=s.length,h=0;h.7&&(i=r-.7),r<.3&&(i=.3-r),n.x=n.x+n.width*i,n},this.fixInnerRectSize=function(t,e,n){var r,i,o,a,s=t;s.width/n>.12&&(a=(o=.12*n)*(s.width/s.height),r=s.x+(s.width-o)*(e.x-s.x)/s.width,i=s.y+(s.height-a)*(e.y-s.y)/s.height,s=new ho(r,i,o,a));var u=s.width/s.height;return a=s.height,u>1.2&&(a=s.height*u/1.2),u<.9&&(a=s.height*u/.9),i=s.y+s.height-a,s.height=a,s.y=i,s},this.panoData=t.panoData,this.camera=t.camera,this.projectionMatrix=this.camera.projectionMatrix,this.fov=g(this.camera.fov),this.traverseDir=e,this.cameraHeading=t.getPov().heading||0,this.isMovingForward=this.angleDegreeDelta(this.cameraHeading,this.traverseDir)<=90,this.roadWith=Math.min(1.5*this.panoData.getRoadWidth(),10),this.deviceHeight=this.panoData.deviceHeight||2.2,this.panoWidth=t._container.clientWidth,this.panoHeight=t._container.clientHeight;var r=this.angleDegreeDelta(this.cameraHeading,this.traverseDir)>45;this.snapshotRatio=r?1:1.8,this.projectionRoadInfos=this.getRoad(this.roadWith,this.deviceHeight,this.projectionMatrix,this.panoWidth,this.panoHeight),this.vanishPoint=this.calculateVanishPoint(this.projectionRoadInfos,this.snapshotRatio,this.panoWidth,this.panoHeight),this.innerRect=this.getInnerRect(this.vanishPoint,this.projectionRoadInfos,this.panoWidth,this.panoHeight,this.snapshotRatio),this.outerRect=this.getOuterRect(this.panoWidth,this.panoHeight,this.snapshotRatio),this.focusLength=.5*this.panoHeight/Math.tan(.75*this.fov),this.vanishPointDeltaX=this.vanishPoint.x-this.outerRect.x-.5*this.outerRect.width,this.vanishPointDeltaY=this.vanishPoint.y-this.outerRect.y-.5*this.outerRect.height},lo={FAR:[10,10,0],LEFT:[0,10,30],RIGHT:[0,10,30],TOP:[10,0,30],BOTTOM:[10,0,30]},fo={FAR:["innerTopLeftVertex","innerBottomRightVertex"],LEFT:["outerTopLeftVertex","innerBottomLeftVertex"],RIGHT:["innerTopRightVertex","outerBottomRightVertex"],TOP:["outerTopLeftVertex","innerTopRightVertex"],BOTTOM:["innerBottomLeftVertex","outerBottomRightVertex"]},po=Object.keys(lo),vo=function(t){function e(e,n){var r;if((r=t.call(this)||this).createSkeleton=function(t){var e=t.vanishPoint,n=t.innerRect,r=t.outerRect,i=t.focusLength,o=r.y+r.height-n.y-n.height,a=e.y-n.y,s=e.x-n.x,u=n.x+n.width-e.x,h=r.y+r.height-e.y,c=o*i/(h-o),l=u*(i+c)/i,f=-(s*(i+c)/i),d=h+a*(i+c)/i-h,p=-h,v=c/5;return{innerTopLeftVertex:{x:f,y:d,z:-c},innerBottomLeftVertex:{x:f,y:p,z:-c},innerTopRightVertex:{x:l,y:d,z:-c},innerBottomRightVertex:{x:l,y:p,z:-c},outerTopLeftVertex:{x:f,y:d,z:v},outerTopRightVertex:{x:l,y:d,z:v},outerBottomLeftVertex:{x:f,y:p,z:v},outerBottomRightVertex:{x:l,y:p,z:v}}},r.modelSkeleton=function(t,e){var n=[],i=[];return po.forEach((function(o){var a=Wr(fo[o],2),s=a[0],u=a[1],h=n.length/3;n=n.concat(r.calculatePlaneVertex(t[s],t[u],o,e)),i=i.concat(r.calculateIndices(o,h))})),[n,i]},r.calculatePlaneVertex=function(t,e,n,i){for(var o,a=[],s=Wr(lo[n],3),u=s[0],h=s[1],c=s[2],l=r.linerInterpolate(t.x,e.x,u),f=r.linerInterpolate(t.y,e.y,h),d=r.linerInterpolate(t.z,e.z,c),p=0;p<=u;p++)for(var v=0;v<=h;v++)for(var m=0;m<=c;m++)$e(o=Ne(l[p],f[v],d[m],1),o,i),o[0]=o[0]/o[3],o[1]=o[1]/o[3],o[2]=o[2]/o[3],a.push(o[0],o[1],o[2]);return a},r.calculateIndices=function(t,e){var n=[],r=lo[t];r=r.filter((function(t){return t>0}));for(var i=Wr(r,2),o=i[0],a=i[1],s=0,u=0,h=0,c=0,l=0;l0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.x=t,this.y=e}return t.prototype.equals=function(t){return t&&t.x===this.x&&t.y===this.y},t}(),_o=function(){function t(t,e){var n=this;this.setData=function(t,e){n.panoData=t,n.nextPanoData=e},this.sceneChangeHandler=function(){if(n.panoData&&n.nextPanoData)return new Promise((function(t){var e=n.isStreet(n.panoData.panoType),r=n.isStreet(n.nextPanoData.panoType),i=n.snapshotFn(),o=n.pano.animationType;if(o&&["waterwave","fade"].indexOf(o)>-1)switch(o){case"waterwave":n.prepareWaterWave(i),t();break;case"fade":n.prepareFade(i),t()}else r&&e?(n.setDir(),n.prepareTraverse(i).then((function(e){n.prepareFade(e),t()}))):(n.prepareFade(i),t())}))},this.setSnapshot=function(t){n.snapshot=t},this.pano=t,this.snapshotFn=e,this.panoData=null,this.nextPanoData=null,this.changeAni=null,this.animateDir=0}var e=t.prototype;return e.draw=function(){if(this.changeAni){var t=this.changeAni,e=t.scene,n=t.camera;this.changeAni.update(),this.pano.renderer.render(e,n)}},e.setDir=function(){if(this.panoData&&this.nextPanoData){var t=this.nextPanoData.panoId,e=this.panoData.getTopos().filter((function(e){return e&&e.panoId===t}));if(e.length){var n=e[0].topoDir;this.animateDir=n}else this.animateDir=this.pano.getPov().heading||0}},e.prepareJump=function(){var t=this,e=this.calcJumpDistance();return new Promise((function(n){t.changeAni=new uo(t.pano,t.animateDir,e,(function(){t.changeAni=null,n()})),t.changeAni.startAni(),t.pano.dispatchEvent({debug:!0,log:"穿梭动画,渲染一帧",type:d.REFRESH})}))},e.prepareTraverse=function(t){var e=this,n=this.calcJumpDistance();return new Promise((function(r){e.changeAni=new go(e.pano,n,t,e.animateDir,(function(){var t=e.snapshotFn(e.changeAni.scene,e.changeAni.camera);r(t),e.changeAni=null})),e.changeAni.start(),e.pano.dispatchEvent({debug:!0,log:"穿梭动画,渲染一帧",type:d.REFRESH})}))},e.prepareFade=function(t){var e=this;this.changeAni=new ao(this.pano,t,(function(){e.changeAni=null,e.pano.emit(d.SCENE_CHANGE_END)}))},e.prepareWaterWave=function(t){var e=this;this.changeAni=new so(this.pano,t,(function(){e.changeAni=null,e.pano.emit(d.SCENE_CHANGE_END)}))},e.calcJumpDistance=function(){var t,e,n=300,r=(t=new yo(this.panoData.panoX,this.panoData.panoY),e=new yo(this.nextPanoData.panoX,this.nextPanoData.panoY),t&&e?Math.round(Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))):0);"number"==typeof r&&(n*=Math.pow(r,1/4));return n},e.isStreet=function(t){return t===p.TYPE_STREET},t}(),xo=function(){function t(t,e){var n=e.fov,r=void 0===n?145:n,i=e.cameraY,o=void 0===i?3e3:i,a=e.handleEnd;this._pano=void 0,this.originFov=void 0,this.originRotateX=void 0,this.originRotateY=void 0,this.targetFov=void 0,this.targetCameraY=void 0,this.handleEnd=void 0,this.animate=void 0,this._pano=t,this.originFov=this.camera.fov,this.originRotateX=this.camera.rotation.x,this.originRotateY=this.camera.rotation.y,this.targetFov=r,this.targetCameraY=o,this.handleEnd=a,this.init()}var e=t.prototype;return e.start=function(){this._pano.dispatchEvent({type:d.REFRESH,debug:!0,log:"开场动画动画起始,渲染一帧"}),this.animate.start()},e.update=function(){this.animate.update()},e.init=function(){var t=this,e=this.camera;this.handleCameraChange(0),this.animate=new Oi(0,1,p.FISHEYE_DURATION,Ii.easeInOutQuad).onUpdate((function(e){t.handleCameraChange(e),t._pano.dispatchEvent({type:d.REFRESH,debug:!0,log:"开场动画动画,渲染一帧"})})).onEnd((function(){e.fov=t.originFov,e.rotateX(t.originRotateX),e.rotateY(t.originRotateY),e.setPosition(0,0,0),e.updateWorldMatrix(),e.updateProjectionMatrix(),t._pano.dispatchEvent({type:d.REFRESH,debug:!0,log:"开场动画动画结束,渲染一帧"}),t.handleEnd()}))},e.handleCameraChange=function(t){var e=this.camera,n=this.targetCameraY,r=this.targetFov-(this.targetFov-this.originFov)*t,i=(this.originRotateX- -90)*t-90,o=this.originRotateY*t;e.fov=r,e.rotateX(i),e.rotateY(o),e.setPosition(0,n-n*t,0),e.updateWorldMatrix(),e.updateProjectionMatrix()},o(t,[{key:"camera",get:function(){return this._pano.camera}}]),t}();function bo(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Mo(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mo(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Mo(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=u&&t<=h&&n>=c&&n<=l){i=!1,a.handleClick();break}}}catch(t){o.e(t)}finally{o.f()}return i},this.pano=t}var e=t.prototype;return e.handleAdd=function(t){t&&t.id&&(this.overlays.some((function(e){return e.id===t.id}))||(this.overlays.push(t),this.isReady&&t.init(this.pano)))},e.handleRemove=function(t){for(var e=0;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function To(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:100;e.renderThreadId&&(clearTimeout(e.renderThreadId),e.renderThreadId=null),e.renderThreadId=window.setTimeout((function(){e.isRAFRuning=!1,e.renderThreadId=null}),t),e.isRAFRuning||(e.isRAFRuning=!0,e.renderFrame())},this.resize=function(){var t=e.pano.getContainer();e.renderer.setSize(t.clientWidth,t.clientHeight)};var n=window.devicePixelRatio||1,r=t.getContainer();this.pano=t,this.renderer=new ui({premultipliedAlpha:!1,preserveDrawingBuffer:t.opts.enableCapture||!1,antialias:!(n>1),pixelRatio:n,width:r.clientWidth,height:r.clientHeight}),this.renderer.setSize(r.clientWidth,r.clientHeight),t.getPanes().tileLayer.appendChild(this.renderer.domElement),this.gl=this.renderer.getContext(),this.camera=new bi(75,r.clientWidth/r.clientHeight,.01,67e3),this.scene=new Mr,t.gl=this.gl,t.canvas=this.renderer.domElement,t.scene=this.scene,t.camera=this.camera,t.cameraNoFix=this.cameraNoFix,t.renderer=this.renderer,t.renders=[],this.sceneChange=new _o(t,this.getSnapshot),this.initModule()}var e=t.prototype;return e.initModule=function(){var t=this.pano;this.sphereRender=new $i(t),this.linkGLRender=new oo(t),this.overlayManager=new Eo(t),this.skyboxRender=new Ai(t),this.pano.renders.push(this.sphereRender,this.linkGLRender,this.overlayManager,this.skyboxRender)},e.reset=function(){this.scene.remove(this.sphereRender.meshs),this.scene.remove(this.linkGLRender.meshs)},e.getModule=function(t){var e,n=null,r=wo(this.pano.renders);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(i.name===t){n=i;break}}}catch(t){r.e(t)}finally{r.f()}return n},e.renderFrame=function(){!1!==this.isRAFRuning?(this.openingAni&&this.openingAni.update(),this.sphereRender.draw(),this.renderer.render(this.scene,this.camera),this.overlayManager.draw(),this.sceneChange.draw(),this.requestId=requestAnimationFrame(this.renderFrame.bind(this))):this.requestId&&(cancelAnimationFrame(this.requestId),this.requestId=null)},e.startFishEyeAni=function(){var t=this;this.pano.fisheye&&(this.openingAni=new xo(this.pano,{handleEnd:function(){t.openingAni=null,t.pano.fisheye=!1}}),setTimeout((function(){t.openingAni.start(),t.startRenderThread()}),p.FISHEYE_DELAY))},e.updateProjectionMatrix=function(t,e){var n=this.pano.getFov(e),r=this.pano.getContainerSize(),i=r.width/r.height;t.fov=n,t.aspect=i,t.updateProjectionMatrix()},e.updateCameraHeadingAndPitch=function(t){var e=this.pano.getPov(),n=e.heading,r=e.pitch,i=this.panoData,o=i.fixHeading,a=void 0===o?0:o,s=i.fixPitch,u=void 0===s?0:s,h=i.fixRoll,c=void 0===h?0:h;t.rotateX(r-u),t.rotateY(-n+a),t.rotateZ(c),t.updateWorldMatrix()},e.safeCall=function(t,e,n){var r=this.getModule(t);if(r&&r[e])return r[e].apply(r,n||[]);throw new Error("[safeCall] get module error => ".concat(t))},o(t,[{key:"isCanUpdate",get:function(){var t=this.sceneChange.changeAni,e=this.openingAni;return this.panoData&&!(t||e)}}]),t}(),Ro=function(){function t(t){var e=this;this.updateAnglePerPixel=function(){e._anglePerPixel=e._pano.calcAnglePerPixel()},this.destroy=function(){e.bindEvent(!1)},this._pano=t,this._displayZoom=t.getZoom(),this._anglePerPixel=t.calcAnglePerPixel(),this.lock=!1,this.clickTimer=null,this.dragAni=null,this.state={initPos:null,initHeading:0,initPitch:0,lastDiffPos:null,moveDiffPos:null,isTouchDown:!1,isTouchMove:!1,startTime:0,lastMoveTime:0}}var e=t.prototype;return e.init=function(){this._initialized||(this._initialized=!0,this.isMobile=navigator.userAgent.toLowerCase().match(/ipod|ipad|iphone|android/),this.isMobile?(this.EVENTS={START:"touchstart",MOVING:"touchmove",END:"touchend",OUT:"touchcancel",WHEEL:"gesturechange",DOMMouseScroll:"DOMMouseScroll"},this.getPagePosition=function(t){var e=t.touches.length>0?t.touches[0]:t.changedTouches[0];return{x:e.pageX,y:e.pageY}}):(this.EVENTS={START:"mousedown",MOVING:"mousemove",END:"mouseup",OUT:"mouseout",WHEEL:"mousewheel"},this.getPagePosition=function(t){return{x:t.pageX,y:t.pageY}}),this.bindEvent())},e.bindEvent=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=document.body,n=this.EVENTS,r=n.START,i=n.MOVING,o=n.END,a=this._pano._svContainer,s=t?"addEventListener":"removeEventListener";a[s](r,this.handleDown.bind(this)),a[s](i,this.handleMove.bind(this)),e[s](o,this.handleUp.bind(this))},e.handleDown=function(t){this.dragAni&&this.dragAni.stop();var e=this.state,n=this.getPagePosition(t),r=this._pano.getPov();e.initPos=n,e.isTouchDown=!0,e.initHeading=r.heading,e.initPitch=r.pitch,e.startTime=x(),this._pano.dispatchEvent(d.TOUCH_START,t)},e.handleMove=function(t){if(this.state.isTouchDown){this.state.isTouchMove=!0;var e=this.calcDiffPos(this.state.initPos,this.getPagePosition(t));this.setPov(e),this.state.moveDiffPos=e,this.state.lastDiffPos=e,this.state.lastMoveTime=x(),t.preventDefault(),t.stopPropagation()}},e.handleUp=function(t){var e=this;if(this.state.isTouchDown){var n=!0,r=this.getPagePosition(t);if(t.pos=r,this.state.isTouchDown=!1,this._pano.dispatchEvent(d.TOUCH_END,t),this._pano.renders.length)for(var i=0;i10||Math.abs(s)>10)){var u=this.calcDiffPos(this.state.initPos,this.getPagePosition(t)),h=2*Math.sqrt(Math.pow(u.x,2)+Math.pow(u.y,2))/(.008*(r-n.startTime)),c=[u.x>0?1:-1,u.y>0?1:-1],l=Math.abs(u.x),f=Math.abs(u.y),p=Math.atan2(f,l),v=Math.cos(p)*h,m=Math.sin(p)*h;-1===c[0]&&(v=-v),-1===c[1]&&(m=-m),this.dragAni&&this.dragAni.stop();var g=this._pano.getPov(),y=g.heading,_=g.pitch;n.initHeading=y,n.initPitch=_;this.dragAni=new Oi(0,1,400,(function(t){return.3125*t-.15625*t*t})).onUpdate((function(t){var n=(t*=6.4)*v,r=t*m;e.setPov({x:n,y:r})})).onEnd((function(){e.dragAni=null,e._pano.dispatchEvent({type:d.POV_CHANGED_END})})).startAndAutoUpdate()}else this._pano.dispatchEvent({type:d.POV_CHANGED_END})},e.calcDiffPos=function(t,e){return t&&e?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}},t}();function Co(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return So(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return So(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function So(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n180?(u+=360,c=r.heading-u):c<-180&&(u-=360,c=r.heading-u),new Oi(0,1,400,Ii["ease-out"]).onUpdate((function(t){a({heading:u+t*c,pitch:h+t*l})})).onEnd((function(){})).startAndAutoUpdate()}else a(r)}else e.handlePovChange(r)})),e.on(d.ZOOM_CHANGED,(function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.panoGLRender.isCanUpdate){var r=t.preZoom,i=e.getZoom();if(r!==i){var o=n.noAnimation||!1;if(t.zoomChangeAni&&(t.zoomChangeAni.stop(),t.zoomChangeAni=null),o)return t.op.updateAnglePerPixel(),t.panoGLRender.updateProjectionMatrix(e.camera),t.panoGLRender.update(),void(t.preZoom=i);var a=400;t.zoomChangeAni=new Oi(r,i,a,Ii.easeOutCubic).onUpdate((function(n){t.panoGLRender.updateProjectionMatrix(e.camera,n),t.panoGLRender.update(n)})).onEnd((function(){t.zoomChangeAni=null,t.preZoom=i})).startAndAutoUpdate()}}})),e.on(d.DOUBLE_CLICK,(function(){t.panoGLRender.isCanUpdate&&(v.isMobile&&(3===e.getZoom()?e.setZoom(2):e.setZoom(3)))})),e.on(d.REFRESH,(function(e){var n=e.duration||200;t.panoGLRender.startRenderThread(n),t.debug&&e.log&&e.debug&&console.warn(e.log)})),e.on(d.SET_ID,(function(e){!t.panoServiceLock&&e.id&&(t.panoServiceLock=!0,t.panoService.getPanoById(e.id))})),e.on(d.SET_POSITION,(function(e){!t.panoServiceLock&&e.point&&(t.panoServiceLock=!0,t.panoService.getPanoByLocation(e.point))})),e.on(d.SIZE_CHANGED,(function(){t.op.updateAnglePerPixel(),t.panoGLRender.resize(),t.panoGLRender.updateProjectionMatrix(e.camera),t.panoGLRender.update()})),e.on(d.THUMB_LOADED,(function(){t.panoGLRender.onThumbLoaded(),t.panoGLRender.update()})),e.on(d.OVERLAY_ADD,(function(e){t.panoGLRender.overlayManager.handleAdd(e)})),e.on(d.OVERLAY_REMOVE,(function(e){t.panoGLRender.overlayManager.handleRemove(e)})),e.on(d.OVERLAYS_CLEAR,(function(){t.panoGLRender.overlayManager.destroy()})),e.on(d.LINK_VISIBLE_CHANGE,(function(e){"boolean"==typeof e.value&&(t.panoGLRender.safeCall("PanoLinkRender","setVisible",[e.value]),t.pano.dispatchEvent(d.REFRESH))})),e.on(d.DESTROY,(function(){t.op.destroy(),t.resizeOb&&t.resizeOb.disconnect(),t.checkSizeTimer&&clearInterval(t.checkSizeTimer),t.panoGLRender.renderer.forceContextLoss(),e.canvas.removeEventListener("webglcontextlost",t.onWebGLContextLost,!1)}));var n=v.isFirefox?"DOMMouseScroll":"mousewheel",r=new Date;e._svContainer.addEventListener(n,(function(t){if(e.opts.enableScrollWheelZoom&&e.opts.visible){var n=new Date;if(n-r<400)return;r=n;var i=-t.detail/3||t.wheelDelta/120,o=e.getZoom()+i;e.setZoom(o),t.preventDefault()}}))},e.getImgZoom=function(){return this.pano.calcDisplayZoom().imgZoom},e.handleContextStatus=function(){this.pano.canvas.addEventListener("webglcontextlost",this.onWebGLContextLost,!1)},e.onWebGLContextLost=function(t){t.preventDefault(),setTimeout((function(){window.location.reload()}),200)},t}();function Do(t,e,n){t.addEventListener(e,n,!1)}var Io=function(t){function e(e,n){var r;(r=t.call(this)||this).panoData=null,r.opts=void 0,r.useAnimation=!1,r.backupUseAnimation=r.useAnimation,r.animationType="",r.fisheye=!1,r.canvas=void 0,r.camera=void 0,r.renderer=void 0,r.gl=void 0,r.scene=void 0,r.cameraNoFix=void 0,r.renders=void 0,r.closeBtn=null,r.navigator=null,r._container=void 0,r._pov={heading:0,pitch:0},r._id=null,r._position=null,r._zoom=2,r._displayZoomResultsCache={},r._svContainer=void 0,r._eventManager=void 0,r._panes=void 0,r.addCloseButton=function(t){var e=r.closeBtn=document.createElement("div");e.className="pano_close",e.style.cssText=["position:absolute","right:10px","top:10px","padding: 5px 8px;","cursor:pointer","border-radius: 4px","font-size: 14px","background-color: rgba(0,0,0,.55)","z-index: 99","color: #fff"].join(";"),e.innerText="关闭",e.title="退出全景",e.onclick=function(){r.hide(),t&&t()},r._svContainer.appendChild(e)},r.getContainer=function(){return r._container},r.getContainerSize=function(){var t=r._container;return new l(t.clientWidth,t.clientHeight)},r.getPanes=function(){return r._panes},r.show=function(){r.opts.visible=!0,E.show(r._svContainer)},r.hide=function(){r.opts.visible=!1,E.hide(r._svContainer)},r.getZoom=function(){return r._zoom},r.setZoom=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t!==r._zoom&&(t>p.MAX_ZOOM&&(t=p.MAX_ZOOM),ts&&(o=s),o512;)c++,l=360/(2*Math.pow(2,c-2)*h);if(c>a){var f=c-a;l*=Math.pow(2,f),c=a}c1&&void 0!==arguments[1]?arguments[1]:{};r.useAnimation=e.animation||!1,r.fisheye=e.fisheye||!1,r.animationType=e.animationType||"",r.dispatchEvent(d.SET_ID,{id:t})},r.setPosition=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r.useAnimation=e.animation||!1,r.fisheye=e.fisheye||!1,r.animationType=e.animationType||"",r.dispatchEvent(d.SET_POSITION,{point:t})};var o={minImageZoom:p.TILE_MIN_ZOOM,maxImageZoom:p.TILE_MAX_ZOOM,minPitch:p.MIN_PITCH,maxPitch:p.MAX_PITCH,radius:p.RADIUS,tileBaseUrls:p.TILE_BASE_URLS,linksControl:!0,navigationControl:!0,enableScrollWheelZoom:!0,enableCapture:!1,visible:!0};r.opts=Object.assign({},o,n);var s="string"==typeof e?document.querySelector(e):e;if(!s)throw new Error("全景引擎宿主容器不存在");return r._container=s,r._init(),r}c(e,t);var n=e.prototype;return n.getPosition=function(){return this.position},n.setOptions=function(t){var e;for(e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var n=!0;if("object"!==i(t[e])&&(n=t[e]!==this.opts[e]),this.opts[e]=t[e],!n)continue;switch(e){case"linksControl":this.dispatchEvent(d.LINK_VISIBLE_CHANGE,{value:t[e]});break;case"navigationControl":var r=!!t[e],o=this.navigator;r?o.show():o.hide()}}},n.capture=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.canvas){var e=this.canvas,n=t.quality||.8,r=t.type||"image/jpeg",i=e.toDataURL(r,n);return i}},n.addOverlay=function(t){this.dispatchEvent(d.OVERLAY_ADD,t)},n.removeOverlay=function(t){this.dispatchEvent(d.OVERLAY_REMOVE,t)},n.clearOverlays=function(){this.dispatchEvent(d.OVERLAYS_CLEAR)},n.destroy=function(){this.dispatchEvent(d.DESTROY)},n._init=function(){this._createDoms(),this.navigator=function(t){function e(t){this._initialize(t)}return m(e.prototype,{_initialize:function(t){this._pano=t,this.imgPath=t.opts.imgPath||"//web.archive.org/web/20220712112455/http://api0.map.bdimg.com/images/",this._zoomInEnabled=!0,this._zoomOutEnabled=!0,this._render(),this._bind()},_render:function(){this._container=E.create("div");var t=this._container.style;t.position="absolute",t.left="10px",t.top="10px",t.zIndex=99;var e=this._container;e.innerHTML=this._generateHtml(),v.isPc?(this._panBtnContainer=e.children[2],this._panBtns=[this._panBtnContainer.children[0],this._panBtnContainer.children[1],this._panBtnContainer.children[2],this._panBtnContainer.children[3]],this._svgDirGroup=e.children[1].childNodes[0],this._zoomContainer=e.children[3]):v.isMobile&&(this._zoomContainer=e.children[0]),this._btnZoomIn=this._zoomContainer.children[0],this._btnZoomOut=this._zoomContainer.children[1],v.isMobile&&(this._zoomContainer.style.left=this._zoomContainer.style.top="0",this._zoomContainer.style.width="36px",this._zoomContainer.style.height="78px",this._btnZoomIn.style.width=this._btnZoomOut.style.width="33px",this._btnZoomIn.style.height=this._btnZoomOut.style.height="36px",this._btnZoomOut.style.top="37.5px"),this._pano.getZoom()>=p.MAX_ZOOM&&this._setZoomBtnEnabled("zoomIn",!1),this._pano.getZoom()<=p.MIN_ZOOM&&this._setZoomBtnEnabled("zoomOut",!1),this._pano._svContainer.appendChild(e)},_generateHtml:function(){var t=[];return v.isPc&&(t.push(this._generatePanHtml()),t.push(this._generateDirHtml()),t.push(this._generatePanBtnHtml())),t.push(this._generateZoomContainerHtml()),t.join("")},_generateDirHtml:function(){return''},_generatePanHtml:function(){return'
'},_generatePanBtnHtml:function(){return'
'},_generateZoomContainerHtml:function(){var t="background-image:url('"+this.imgPath+"st-navictrl.png');background-repeat:no-repeat;background-position:-74px 0;";return v.isMobile&&(t="background-image:url('"+this.imgPath+"st-navictrl-hd.png');background-repeat:no-repeat;background-position:0 0;background-size:180px 78px;"),'
'},_bind:function(){var t=this._pano,e=this;if(v.isPc){Do(this._panBtns[0],"click",(function(){var e=t.getPov();t.setPov({heading:e.heading,pitch:e.pitch+30},{animation:!0})})),Do(this._panBtns[1],"click",(function(){var e=t.getPov();t.setPov({heading:e.heading-45,pitch:e.pitch},{animation:!0})})),Do(this._panBtns[2],"click",(function(){var e=t.getPov();t.setPov({heading:e.heading+45,pitch:e.pitch},{animation:!0})})),Do(this._panBtns[3],"click",(function(){var e=t.getPov();t.setPov({heading:e.heading,pitch:e.pitch-30},{animation:!0})}));for(var n=0;n=p.MAX_ZOOM?e._setZoomBtnEnabled("zoomIn",!1):t.getZoom()<=p.MIN_ZOOM?e._setZoomBtnEnabled("zoomOut",!1):(e._setZoomBtnEnabled("zoomIn",!0),e._setZoomBtnEnabled("zoomOut",!0))}))},_redrawZoomBtn:function(t,e){t&&(v.isMobile&&(e=(e+74)/24*36),this._zoomContainer.style.backgroundPosition=e+"px 0")},show:function(){this._container.style.display=""},hide:function(){this._container.style.display="none"},_calcAngle:function(t){var e=(t=window.event||t).pageX||t.clientX,n=t.pageY||t.clientY,r=this._pano.getContainer().getBoundingClientRect();e=e-r.left-50,n=-(n-r.top-50);var i=Math.atan2(n,e)/Math.PI*180;return i<90?90-i:450-i},_setZoomBtnEnabled:function(t,e){if("zoomIn"===t)if(e){this._zoomInEnabled=!0,this._btnZoomIn.style.cursor="pointer";var n=-74;v.isMobile&&(n=0),this._zoomContainer.style.backgroundPosition=n+"px 0"}else{this._zoomInEnabled=!1,this._btnZoomIn.style.cursor="";var r=-170;v.isMobile&&(r=-144),this._zoomContainer.style.backgroundPosition=r+"px 0"}if("zoomOut"===t)if(e){this._zoomOutEnabled=!0,this._btnZoomOut.style.cursor="pointer";var i=-74;v.isMobile&&(i=0),this._zoomContainer.style.backgroundPosition=i+"px 0"}else{this._zoomOutEnabled=!1,this._btnZoomOut.style.cursor="";var o=-146;v.isMobile&&(o=-108),this._zoomContainer.style.backgroundPosition=o+"px 0"}}}),new e(t)}(this),this._eventManager=new Po(this)},n._createDoms=function(){var t=this._container,e=E.create("div"),n=e.style;n.overflow="hidden",n.position="absolute",n.zIndex="20",n.top=n.left="0px",n.height=n.width="100%",n.backgroundColor="#e5e3df",n.display="none",n.cursor="grab",e.addEventListener("mousedown",(function(){return n.cursor="grabbing"})),e.addEventListener("mouseup",(function(){return n.cursor="grab"})),this._svContainer=e,this._panes={tileLayer:this._createContainer("1"),maskLayer:this._createContainer("2"),linksLayer:this._createContainer("3"),overlayLayer:this._createContainer("4"),effectLayer:this._createContainer("5")},e.appendChild(this._panes.tileLayer),e.appendChild(this._panes.linksLayer),e.appendChild(this._panes.overlayLayer),e.appendChild(this._panes.effectLayer),b()||(e.appendChild(this._panes.maskLayer),this._panes.maskLayer.style.width="".concat(t.clientWidth,"px"),this._panes.maskLayer.style.height="".concat(t.clientHeight,"px"),this._panes.maskLayer.style.overflow="hidden"),t.appendChild(e),"absolute"!==E.getCurrentStyle(t).position&&(t.style.position="relative")},n._createContainer=function(t){var e=E.create("div"),n=e.style;return n.position="absolute",n.top=n.left="0",n.zIndex=t||"0",e},n.calcMobileFovy=function(t){var e=this.getContainerSize(),n=e.width,r=e.height,i=240/Math.pow(2,t),o=n/2/Math.tan(g(i/2)),a=Math.atan2(r/2,o);return 2*y(a)},n.calcPCFovy=function(t){return 90-15*(t-1)},o(e,[{key:"imageZoom",get:function(){return this.calcDisplayZoom().imgZoom}},{key:"panoId",get:function(){return this.panoData?this.panoData.panoId:""}},{key:"panoNorthDir",get:function(){return this.panoData?this.panoData.northDir:0}},{key:"position",get:function(){return this.panoData&&"number"==typeof this.panoData.panoX&&"number"==typeof this.panoData.panoY?new f(this.panoData.panoX,this.panoData.panoY):null}}]),e}(rr),Lo={dom:null,anchor:null,width:null,height:null,altitude:2,sphereZ:null,useUV:!1},Oo=function(t){function e(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(n=t.call(this)||this).visible=!0,n.worldCoord=void 0,n.pov=void 0,n.id=n.genId(),n._pano=void 0,n.lastPanoPosition=null,n.initialized=!1,n.position=void 0,n.options=void 0,n.position=e,n.options=Object.assign({},Lo,r),n.pov=null,n}c(e,t);var n=e.prototype;return n.getPov=function(){return this.pov},n.genId=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:4;return Number("".concat(Math.random().toString().substr(3,t)).concat(Date.now())).toString(36)},n.init=function(t){t&&!this.initialized&&(this._pano=t,this.lastPanoPosition=this._pano.position,this.worldCoord=this.options.useUV?this.calcCoordsByUV():this.calcCoordsByMC(),this.worldCoord&&(this.initialized=!0,this.add(),this.draw()))},n.calcCoordsByMC=function(){var t=this._pano.position;if(t&&this.position){var e,n=this.position,r=n.lng-t.lng,i=n.lat-t.lat,o=Math.atan2(r,i);o<0&&(o+=2*Math.PI),o=Math.round(y(o));var a=500,s=this.options,u=s.sphereZ,h=s.altitude;null===u?e=25*h:(e=u||0,a=Math.sqrt(Math.pow(r,2)+Math.pow(i,2)+Math.pow(e,2)));var c=y(Math.asin(e/a));c=c>90?90:c<-90?-90:c;var l=_(o+this._pano.panoNorthDir),f=this.radius,d=Math.cos(g(c))*f;d=Math.round(100*d)/100;var p=Math.cos(g(l))*d,v=Math.sin(g(c))*f,m=Math.sin(g(l))*d;return this.pov={heading:o,pitch:c},xt(p,v,m)}},n.calcCoordsByUV=function(){if(this.position){var t=this.radius,e=this.position,n=Wr(e,2),r=n[0],i=n[1],o=2*r*Math.PI,a=(i-.5)*Math.PI,s=Math.cos(a)*Math.cos(o)*t,u=Math.sin(a)*t,h=Math.cos(a)*Math.sin(o)*t;return this.pov={heading:_(y(o)-this._pano.panoNorthDir),pitch:y(a)},xt(s,u,h)}},n.add=function(){var t=this.options,e=t.width,n=t.height;if(this.dom){var r=this._pano,i=this.dom;i.style.position="absolute",r.getPanes().overlayLayer.appendChild(i),"number"!=typeof e&&(this.options.width=i.clientWidth),"number"!=typeof n&&(this.options.height=i.clientHeight),r.dispatchEvent({type:"onoverlaydomadded",overlay:this})}},n.remove=function(){var t=this.dom;t&&t.parentNode&&t.parentNode.removeChild(t)},n.povToPointGL=function(){if(!this.worldCoord)return null;var t=this._pano,e=t.camera,n=t.getContainerSize(),r=n.width,i=n.height;return Ni(e,this.worldCoord,r,i)},n.draw=function(){if(this.initialized&&this.visible&&this._pano&&this._pano.panoData&&this.dom){var t=this.lastPanoPosition,e=this._pano.position;t.lng===e.lng&&t.lat===e.lat||(this.lastPanoPosition=e,this.worldCoord=this.options.useUV?this.calcCoordsByUV():this.calcCoordsByMC());var n=this.dom,r=this.povToPointGL();if(n.style.visibility="hidden",r){var i=this.calcAnchor(),o="".concat(r[0]-i.width,"px"),a="".concat(r[1]-i.height,"px");if(isNaN(r[0])||isNaN(r[1]))return;n.style.visibility="visible",n.style.webkitTransform="translate(".concat(o,", ").concat(a,")"),n.style.transform="translate(".concat(o,", ").concat(a,")")}}},n.handleClick=function(){this.dispatchEvent("click")},n.calcAnchor=function(){var t=this.options,e=t.anchor,n=t.width,r=void 0===n?0:n,i=t.height;return e||new l(r/2,(void 0===i?0:i)/2)},n.show=function(){this.visible=!0,this.dom&&(this.dom.style.display="")},n.hide=function(){this.visible=!1,this.dom&&(this.dom.style.display="none")},o(e,[{key:"radius",get:function(){return this._pano?this._pano.opts.radius:0}},{key:"dom",get:function(){return this.options.dom}}]),e}(rr),Bo=function(t){function e(e,n){var r=n.position,i=n.altitude,o=void 0===i?2:i,a=n.costomStyle,s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.createElement("div"),r={backgroundColor:"rgba(29, 29, 29, 0.8)",fontSize:"14px",padding:"7px 14px",height:"19px",color:"#fff",whiteSpace:"nowrap",borderRadius:"4px"};return m(n.style,r,e),n.innerText=t,n}(e,void 0===a?{}:a);return t.call(this,r,{dom:s,altitude:o})||this}return c(e,t),e}(Oo);t.Converters=ji,t.Engines=Mi,t.EventType=d,t.PanoLabel=Bo,t.PanoOverlay=Oo,t.PanoramaService=function(){var t=this;this.getPanoById=function(e,n){var r=function(){},i="";P?(i="".concat(D.SERVICE_URL,"/si?qt=sdata&sid=").concat(e),r=fetch(i).then((function(t){return t.json()}))):(i="".concat(D.SERVICE_URL,"?qt=sdata&sid=").concat(e),r=t.request(i)),r.then((function(t){n&&n(t)})).catch((function(t){n&&n(null)}))},this.getPanoByLocation=function(e,n,r){var i=function(){},o="";P?(o="".concat(D.SERVICE_URL,"/qsi?qt=qsdata&x=").concat(e.lng,"&y=").concat(e.lat).concat(n?"&r="+n:"","&action=1&coord_type=").concat(window.BMAPGL_84?"wgs84ll":""),i=fetch(o).then((function(t){return t.json()}))):(o="".concat(D.SERVICE_URL,"?qt=qsdata&x=").concat(e.lng,"&y=").concat(e.lat).concat(n?"&r="+n:"","&action=1"),i=t.request(o)),i.then((function(t){r&&r(t)})).catch((function(t){r&&r(null)}))},this.request=function(t){return w(t,{},{jsonp:"fn"})}},t.Point=f,t.getPanoControl=function(t,e){var n,r,i,o=(e=e||{}).imgPath||"//web.archive.org/web/20220712112455/http://api.map.baidu.com/images/";function a(e){e.call(this),this.defaultAnchor=t.ControlAnchor.TOP_RIGHT,this.defaultOffset=new t.Size(10,10),this._isOn=!1}return n=a,r=t.Control,(i=Object.create(r.prototype)).constructor=n,n.prototype=i,m(a.prototype,{initialize:function(t){return this._map=t,this._render(),this._bind(),this._container},_render:function(){var t=this,n=E.create("div");n.innerHTML='全景',n.title="进入全景",m(n.style,{width:"49px",height:"51px",color:"#565656",background:'url("'.concat(o,'st-control.png")'),position:"absolute",cursor:"pointer",fontFamily:"arial,sans-serif",fontSize:"13px",textAlign:"center",boxShadow:"0px 0px 3px rgba(0, 0, 0, 0.3)",MozBoxShadow:"0px 0px 3px rgba(0, 0, 0, 0.3)",WebkitBoxShadow:"0px 0px 3px rgba(0, 0, 0, 0.3)"}),this._container=n;var r=this._map.getContainer();r.appendChild(n);var i={visible:!1};e.imgPath&&(i.imgPath=[e.imgPath]),e.tileBaseUrl&&(i.tileBaseUrls=[e.tileBaseUrl]),this._pano=new Io(r,i),this._pano.addCloseButton((function(){t.isMapEnableWheelZoom&&t._map.enableScrollWheelZoom()}));var a=this._scout=E.create("div");m(a.style,{position:"absolute",width:"24px",height:"41px",cursor:"pointer",backgroundImage:'url("'.concat(o,'st-scout.png")'),backgroundRepeat:"no-repeat",backgroundPosition:"-24px 0",overflow:"hidden",display:"none",zIndex:11}),r.appendChild(a);var s=this._infoWindow=E.create("div");m(s.style,{position:"absolute",width:"112px",height:"119px",backgroundImage:'url("'.concat(o,'st-infowindow.gif")'),backgroundRepeat:"no-repeat",backgroundPosition:"0 0",display:"none",cursor:"pointer",zIndex:12});var u=this._thumb=E.create("img");s.appendChild(u),u.src=o+"st-noresult.png",m(u.style,{width:"100px",height:"75px",left:"6px",top:"6px",position:"absolute"});var h=this._stDescription=E.create("div");m(h.style,{position:"absolute",top:"85px",fontFamily:"arial,sans-serif",fontSize:"13px",paddingLeft:"6px"}),s.appendChild(h),r.appendChild(s)},_updateView:function(){var t=this._container.style;this._isOn||this._isOver?(t.backgroundPosition="-49px 0",t.color="#fff"):(t.backgroundPosition="0 0",t.color="#565656")},_bind:function(){var n=this;this._pano.on("dataload",(function(t){var r=t.data;r?(n._currentSvId=r.panoId,e.tileBaseUrl?n._thumb.src="".concat(e.tileBaseUrl,"?&sid=").concat(r.panoId,"&pos=0_0&z=0"):n._thumb.src="//web.archive.org/web/20220712112455/http://mapsv0.bdimg.com/scape/?qt=pdata&sid=".concat(r.panoId,"&pos=0_0&z=0&from=H5"),n._stDescription.innerHTML=r.roadName):(n._currentSvId=null,n._thumb.src=o+"st-noresult.png",n._stDescription.innerHTML="")}));var r=this;v.isPc&&(this._container.addEventListener("mouseover",(function(){r._isOver=!0,r._updateView()})),this._container.addEventListener("mouseout",(function(){r._isOver=!1,r._updateView()}))),this._container.addEventListener("click",(function(){r._isOn?r._close():r._open()})),this._map.getContainer().addEventListener("mousemove",(function(e){if(r._isOn){var n=(e=window.event||e).pageX||e.clientX,i=e.pageY||e.clientY,a=function(t){for(var e={left:0,top:0};t&&t.offsetParent;)e.left+=t.offsetLeft,e.top+=t.offsetTop,t=t.offsetParent;return e}(r._map.container),s=new yo(n-a.left,i-a.top),u=r._map.pixelToPoint(s);if(""!==r._scout.style.display&&v.isPc&&(r._scout.style.display="",r._infoWindow.style.display=""),r._scout.style.left=s.x-12+"px",r._scout.style.top=s.y-41-2+"px",r._prePixel=r._curPixel,r._curPixel=s,r._prePixel){var h=s.x-r._prePixel.x;h>0?r._scout.style.backgroundPosition="-48px 0":h<0&&(r._scout.style.backgroundPosition="0 0")}r._curPixel.y<170?r._infoStatus=2:r._infoStatus=1,r._curPixel.x<66&&(r._infoStatus=3),r._curPixel.x>r._map.getSize().width-56-10&&(r._infoStatus=4);var c=1===r._infoStatus||2===r._infoStatus?112:126,l=1===r._infoStatus||2===r._infoStatus?119:105;1!==r._infoStatus&&2!==r._infoStatus||(r._infoWindow.style.left=r._curPixel.x-Math.round(c/2)+"px",1===r._infoStatus?(r._infoWindow.style.top=r._curPixel.y-l-42+"px",r._infoWindow.style.backgroundPosition="0 0",r._thumb.style.top="6px",r._thumb.style.bottom="",r._stDescription.style.top="85px",r._stDescription.style.bottom=""):(r._infoWindow.style.top=r._curPixel.y+2+"px",r._infoWindow.style.backgroundPosition="-112px 0",r._thumb.style.top="",r._thumb.style.bottom="6px",r._stDescription.style.top="",r._stDescription.style.bottom="85px"),r._infoWindow.style.width="112px",r._infoWindow.style.height="119px",r._thumb.style.left="6px",r._stDescription.style.left="0"),3!==r._infoStatus&&4!==r._infoStatus||(r._infoWindow.style.top=r._curPixel.y-Math.round(l/2)-20+"px",3===r._infoStatus?(r._infoWindow.style.left=r._curPixel.x+12+"px",r._infoWindow.style.backgroundPosition="0 -119px",r._thumb.style.left="20px",r._stDescription.style.left="14px"):(r._infoWindow.style.left=r._curPixel.x-12-c+"px",r._infoWindow.style.backgroundPosition="-126px -119px",r._thumb.style.left="6px",r._stDescription.style.left="0"),r._infoWindow.style.width="126px",r._infoWindow.style.height="105px"),r._infoWindow.style.backgroundImage='url("'.concat(o,'st-infowindow.gif")'),r._timerId&&(clearTimeout(r._timerId),r._timerId=null),r._timerId=setTimeout((function(){r._currentPoint=u,r._scout.style.backgroundPosition="-24px 0";var e=r._map.lnglatToMercator(u.lng,u.lat);r._pano.setPosition(new t.Point(e[0],e[1]))}),200)}})),this._map.addEventListener("click",(function(t){r._isOn&&v.isMobile&&(r._pano.setPosition(t.point),r._pano.show(),r._close()),r._isOn&&r._currentSvId&&(r._pano.setId(r._currentSvId),r._pano.show(),r._map.config.enableWheelZoom&&(r._map.disableScrollWheelZoom(),r.isMapEnableWheelZoom=!0),r._close())}))},_open:function(){this._isOn||(this._isOn=!0,this._map.addTileLayer(this._panoCoverageLayer),v.isPc&&(this._preDefaultCursor=this._map.getDefaultCursor(),this._preDraggingCursor=this._map.getDraggingCursor(),this._map.setDefaultCursor("pointer"),this._map.setDraggingCursor("pointer"))),this._updateView()},_close:function(){this._isOn&&(this._map.removeTileLayer(this._panoCoverageLayer),v.isPc&&(this._scout.style.display="none",this._infoWindow.style.display="none",this._map.setDefaultCursor(this._preDefaultCursor),this._map.setDraggingCursor(this._preDraggingCursor)),this._isOn=!1),this._updateView()}}),new a(t.Control)},t.getStreetViewCoverageLayer=function(t){var e=new t.TileLayer({transparentPng:!0,dataType:1,cacheSize:32});return e.zIndex=110,e.getTilesUrl=window.PANORAMA_URL?function(t,e){var n=window.PANORAMA_URL+"/tile",r=t.x,i=t.y;return window.BMAPGL_84&&(i=Math.pow(2,e)-i-1),"".concat(n,"?customid=panorama&x=").concat(r,"&y=").concat(i,"&z=").concat(e,"&type=WGS84")}:function(t,e){var n=["//web.archive.org/web/20220712112455/http://mapsv0.bdimg.com/tile/","//web.archive.org/web/20220712112455/http://mapsv1.bdimg.com/tile/"],r=(Math.abs(t.x)+Math.abs(t.y))%n.length;return"".concat(n[r],"?udt=").concat("20150114","&qt=tile&styles=").concat("pl","&x=").concat(t.x,"&y=").concat(t.y,"&z=").concat(e).replace(/-(\d+)/gi,"M$1")},e},t.init=function(t,e){return new Io(t,e)},Object.defineProperty(t,"__esModule",{value:!0})})(Pano={}); window.BMapGL=window.BMapGL||{};(function(bo,eV){var es=es||{version:"20150702",emptyFn:function(){}};(function(){es._log=[];var i=0;var T={};es.BaseClass=function(i8){T[(this.hashCode=(i8||es.BaseClass.guid()))]=this};es.BaseClass.guid=function(){return"mz_"+(i++).toString(36)};es.BaseClass.create=function(){var i8=new es.BaseClass();i8.decontrol();return i8};var e=es.instance=es.I=function(i8){return T[i8]};es.BaseClass.prototype.dispose=function(){if(this.hashCode){delete T[this.hashCode]}for(var i8 in this){if(typeof this[i8]!="function"){delete this[i8]}}};es.BaseClass.prototype.getHashCode=function(){if(!this.hashCode){T[(this.hashCode=es.BaseClass.guid())]=this}return this.hashCode};es.BaseClass.prototype.decontrol=function(){delete T[this.hashCode]};es.BaseClass.prototype.toString=function(){return"[object "+(this._className||"Object")+"]"};es.BaseClass.prototype._wlog=function(i9,ja){var i8=es._log;if(i8.length>100){i8.reverse().length=50;i8.reverse()}i8[i8.length]="["+i9+"]["+(this._className||"Object")+" "+this.hashCode+"] "+ja}})();Function.prototype.inherits=function(i8,T){var e,i9,jb=this.prototype,ja=function(){};ja.prototype=i8.prototype;i9=this.prototype=new ja();if(typeof(T)=="string"){i9._className=T}for(e in jb){i9[e]=jb[e]}this.prototype.constructor=jb.constructor;jb=ja=null;return i9};es.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};es.BaseClass.prototype.on=es.BaseClass.prototype.addEventListener=function(T,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(T.indexOf("on")!==0){T="on"+T}if(typeof e[T]!=="object"){e[T]={}}var i8=i.hashCode||es.BaseClass.guid();i.hashCode=i8;if(e[T][i8]){this._wlog("warning","repeat key:"+i8)}e[T][i8]=i};es.BaseClass.prototype.off=es.BaseClass.prototype.removeEventListener=function(T,i){if(typeof i=="function"){i=i.hashCode}else{if(typeof i!=="string"&&typeof i!=="undefined"){return}}if(!this._listeners){this._listeners={}}if(T.indexOf("on")!=0){T="on"+T}var e=this._listeners;if(!e[T]){return}if(i===undefined){e[T]={};return}if(e[T][i]){delete e[T][i]}};es.BaseClass.prototype.fire=es.BaseClass.prototype.dispatchEvent=function(i8){if(!this._listeners){this._listeners={}}var T,e=this._listeners,i9=i8.type;i8.target=i8.srcElement=i8.target||i8.srcElement||this;i8.currentTarget=this;if(typeof this[i9]=="function"){this[i9](i8)}if(typeof e[i9]=="object"){for(T in e[i9]){if(typeof e[i9][T]=="function"){e[i9][T].call(this,i8)}}}return i8.returnValue};es.BaseEvent.prototype.inherit=function(T){var i=this;this.domEvent=T=window.event||T;i.clientX=T.clientX||T.pageX;i.clientY=T.clientY||T.pageY;i.offsetX=T.offsetX||T.layerX;i.offsetY=T.offsetY||T.layerY;i.screenX=T.screenX;i.screenY=T.screenY;i.ctrlKey=T.ctrlKey||T.metaKey;i.shiftKey=T.shiftKey;i.altKey=T.altKey;return i};es.Browser=(function(){var T=navigator.userAgent;var i9=0;var e=0;var ja=0;var i=0;var je=0;var jc=0;var jd=0;var jb=0;var i8=0;var jf=0;if(typeof window.opera==="object"&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(T)){ja=parseFloat(RegExp.$2)}else{if(/OPR(\/(\d+)(\..?)?)/.test(T)){ja=parseInt(RegExp.$2,10)}else{if(/Edge\/((\d+)\.\d+)/.test(T)){i9=parseInt(RegExp.$2,10)}else{if(/MSIE (\d+(\.\d+)?)/.test(T)){e=parseFloat(RegExp.$1)}else{if(T.indexOf("Trident")>-1&&/rv:(\d+(\.\d+)?)/.test(T)){e=parseInt(RegExp.$1,10)}else{if(/Firefox(\s|\/)(\d+(\.\d+)?)/.test(T)){je=parseFloat(RegExp.$2)}else{if(navigator.vendor==="Netscape"&&/Netscape(\s|\/)(\d+(\.\d+)?)/.test(T)){jd=parseFloat(RegExp.$2)}else{if(T.indexOf("Safari")>-1&&/Version\/(\d+(\.\d+)?)/.test(T)){i=parseFloat(RegExp.$1)}}}}}}}}if(T.indexOf("Trident")>-1&&/Trident\/(\d+(\.\d+)?)/.test(T)){jb=parseInt(RegExp.$1,10)}else{if(!e&&!i9&&T.indexOf("Gecko")>-1&&T.indexOf("KHTML")===-1&&/rv\:(\d+(\.\d+)?)/.test(T)){i8=parseFloat(RegExp.$1)}else{if(!i9&&/chrome\/(\d+(\.\d+)?)/i.test(T)){jc=parseFloat(RegExp.$1)}else{if(!i9&&/AppleWebKit\/(\d+(\.\d+)?)/.test(T)){jf=parseInt(RegExp.$1,10)}}}}var jg={edge:i9,ie:e,firefox:je,netscape:jd,opera:ja,safari:i,chrome:jc,gecko:i8,trident:jb,webkit:jf};return jg})();window.FeBrowser=es.Browser;es.Dom={};es.Dom.createDom=function(i,e){if(es.isIE&&e&&e.name){i="<"+i+' name="'+es.String.escapeHTML(e.name)+'">'}var T=document.createElement(i);if(e){es.Dom.setProperties(T,e)}return T};es.Dom.getOffset=function(i8){var jb=es.Dom.getOwnerDocument(i8);var ja=es.isGecko>0&&jb.getBoxObjectFor&&es.Dom.getStyle(i8,"position")=="absolute"&&(i8.style.top===""||i8.style.left==="");var jc={left:0,top:0};var i=(es.isIE&&!es.isStrict)?jb.body:jb.documentElement;if(i8==i){return jc}var T=null;var i9;if(i8.getBoundingClientRect){i9=i8.getBoundingClientRect();jc.left=i9.left+Math.max(jb.documentElement.scrollLeft,jb.body.scrollLeft);jc.top=i9.top+Math.max(jb.documentElement.scrollTop,jb.body.scrollTop);jc.left-=jb.documentElement.clientLeft;jc.top-=jb.documentElement.clientTop;if(es.isIE&&!es.isStrict){jc.left-=2;jc.top-=2}}else{if(jb.getBoxObjectFor&&!ja){i9=jb.getBoxObjectFor(i8);var e=jb.getBoxObjectFor(i);jc.left=i9.screenX-e.screenX;jc.top=i9.screenY-e.screenY}else{T=i8;do{jc.left+=T.offsetLeft;jc.top+=T.offsetTop;if(es.isWebkit>0&&es.Dom.getStyle(T,"position")=="fixed"){jc.left+=jb.body.scrollLeft;jc.top+=jb.body.scrollTop;break}T=T.offsetParent}while(T&&T!=i8);if(es.isOpera>0||(es.isWebkit>0&&es.Dom.getStyle(i8,"position")=="absolute")){jc.top-=jb.body.offsetTop}T=i8.offsetParent;while(T&&T!=jb.body){jc.left-=T.scrollLeft;if(!es.isOpera||T.tagName!="TR"){jc.top-=T.scrollTop}T=T.offsetParent}}}return jc};es.Dom.getOwnerDocument=function(e){return e.nodeType==9?e:e.ownerDocument||e.document};es.Dom.setProperties=function(i,e){es.each(e,function(i8,T){es.Dom._setProperty(i,T,i8)})};es.Dom._setProperty=function(i,e,T){if(e=="style"){i.style.cssText=T}else{if(e=="class"){i.className=T}else{if(e=="for"){i.htmlFor=T}else{if(e in es.Dom._DIRECT_ATTRIBUTE_MAP){i.setAttribute(es.Dom._DIRECT_ATTRIBUTE_MAP[e],T)}else{i[e]=T}}}}};es.Dom._DIRECT_ATTRIBUTE_MAP={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder"};es.G=function(){for(var T=[],i8=arguments.length-1;i8>-1;i8--){var i9=arguments[i8];T[i8]=null;if(typeof i9=="object"&&i9&&i9.dom){T[i8]=i9.dom}else{if((typeof i9=="object"&&i9&&i9.tagName)||i9==window||i9==document){T[i8]=i9}else{if(typeof i9=="string"&&(i9=document.getElementById(i9))){T[i8]=i9}}}}return T.length<2?T[0]:T};es.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(" ")}};es.addClassName=es.ac;es.each=function(ja,e){if(typeof e!="function"){return ja}if(ja){if(ja.length===undefined){for(var T in ja){e.call(ja[T],ja[T],T)}}else{for(var i8=0,i9=ja.length;i80&&!window.opera){/MSIE (\d+(\.\d+)?)/.test(navigator.userAgent);es.isIE=parseFloat(RegExp.$1)}})();es.rc=function(e,i){if(!(e=this.G(e))){return}i=this.trim(i);var T=e.className.replace(new RegExp("(^| +)"+i.replace(/(\W)/g,"\\$1")+"( +|$)","g"),"$2");if(e.className!=T){e.className=T}};es.removeClassName=es.rc;es.show=function(){this.each(arguments,function(e){if(e=es.G(e)){e.style.display=""}})};es.trim=function(e){return e.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")};es.getElementsByClassName=function(e,i){if(e.getElementsByClassName){return e.getElementsByClassName(i)}else{return(function T(jf,jd){if(jd==null){jd=document}var jc=[],jb=jd.getElementsByTagName("*"),i8=jb.length,je=new RegExp("(^|\\s)"+jf+"(\\s|$)"),ja,i9;for(ja=0,i9=0;ja-1};es.insertHTML=function(i8,e,T){i8=es.G(i8);if(i8===null){return i8}var i,i9;if(i8.insertAdjacentHTML){i8.insertAdjacentHTML(e,T)}else{i=i8.ownerDocument.createRange();e=e.toUpperCase();if(e=="AFTERBEGIN"||e=="BEFOREEND"){i.selectNodeContents(i8);i.collapse(e=="AFTERBEGIN")}else{i9=e=="BEFOREBEGIN";i[i9?"setStartBefore":"setEndAfter"](i8);i.collapse(i9)}i.insertNode(i.createContextualFragment(T))}return i8};if(typeof HTMLElement!="undefined"&&HTMLElement.prototype.__lookupGetter__&&!HTMLElement.prototype.__lookupGetter__("children")&&!window.opera){try{HTMLElement.prototype.__defineGetter__("children",function(){for(var T=[],i8=0,ja,i9=0,e=this.childNodes.length;i9-1};es.isEmptyObject=function(T){if(Object.prototype.toString.call(T)==="[object Object]"){for(var e in T){return false}return true}else{return false}};var bF=window.location.protocol==="http:"?"http:":"https:";var dZ={fontFamily:'Arial,Helvetica,"PingFang SC","Hiragino Sans GB",STHeiti,sans-serif',mapStyleNameIdPair:{"default":0,"grayed-out":1},mapHost:bF+"//web.archive.org/web/20220712112455/http://map.baidu.com",apiHost:bF+"//web.archive.org/web/20220712112455/http://api.map.baidu.com",apiIMG:bF+"//web.archive.org/web/20220712112455/http://api.map.baidu.com/images",staticHost:bF+"//web.archive.org/web/20220712112455/http://webmap0.bdimg.com",imgPath:bF+"//web.archive.org/web/20220712112455/http://webmap0.bdimg.com/image/api/",tileDomain:[bF+"//web.archive.org/web/20220712112455/http://maponline0.bdimg.com",bF+"//web.archive.org/web/20220712112455/http://maponline1.bdimg.com",bF+"//web.archive.org/web/20220712112455/http://maponline2.bdimg.com",bF+"//web.archive.org/web/20220712112455/http://maponline3.bdimg.com"],panoTilePath:"//web.archive.org/web/20220712112455/http://mapsv1.bdimg.com/scape/",optDomain:"https://web.archive.org/web/20220712112455/http://10.120.25.45:8017",rasterTilePath:"/tile/",vectorTilePath:"/pvd/",originTilePath:[bF+"//web.archive.org/web/20220712112455/http://pcor.baidu.com"],stylePath:"//web.archive.org/web/20220712112455/http://maponline0.bdimg.com/sty/",getIconSetPath:function(e){var i="map_icons2x/";if(typeof e==="string"&&this.mapStyleNameIdPair[e]>0){i="map_icons2x_"+(this.mapStyleNameIdPair[e]-1)+"/"}return bF+this.stylePath+i},getMapStyleFiles:function(T){var i9=true;if(typeof T==="string"&&T!=="default"){i9=false}var ja=i9?"":"_"+(this.mapStyleNameIdPair[T]-1);var i=bp();var i8="udt="+i.udt+"&v="+i.ver;var e=bF+this.stylePath;return[e+"icons_2x"+ja+".js?"+i8,e+"fs"+ja+".js?"+i8,e+"indoor_fs.js?"+i8]},tvc:{ditu:{normal:{version:"088",updateDate:"20210726"},satellite:{version:"009",updateDate:"20210726"},normalTraffic:{version:"081",updateDate:"20210726"},satelliteTraffic:{version:"083",updateDate:"20210726"},mapJS:{version:"104",updateDate:"20210726"},satelliteStreet:{version:"083",updateDate:"20210726"},panoClick:{version:"1033",updateDate:"20180108"},panoUdt:{version:"20180108",updateDate:"20180108"},panoSwfAPI:{version:"20150123",updateDate:"20150123"},panoSwfPlace:{version:"20141112",updateDate:"20141112"},earthVector:{version:"001",updateDate:"20210726"}}},msv:{mapstyle:{updateDate:"20210726",version:"001"}}};dZ.imgResources={blankGIF:dZ.staticHost+"/res/litemapapi/v1d1/images/blank.gif?20170501",markerPng:dZ.staticHost+"/res/litemapapi/v1d1/images/marker.png?20170501",locPng:dZ.staticHost+"/res/litemapapi/v1d1/images/loc.png?20180918",locNewPng:dZ.staticHost+"/res/litemapapi/v1d1/images/loc_new.png?20190314",zoomPng:dZ.staticHost+"/res/litemapapi/v1d1/images/zoombtn.png?20180918",mapLogoPng:dZ.staticHost+"/res/litemapapi/v1d1/images/logo-2x.png?20190226"};var w=dZ;var ih="ruler.cur";if(es.Browser.ie||es.Browser.edge){es.extend(w,{distCursor:"url("+w.imgPath+ih+"),crosshair",defaultCursor:"url("+w.imgPath+"openhand.cur),default",draggingCursor:"url("+w.imgPath+"closedhand.cur),move"})}else{if(es.Browser.firefox){es.extend(w,{distCursor:"url("+w.imgPath+ih+"),crosshair",defaultCursor:"-moz-grab",draggingCursor:"-moz-grabbing"})}else{if(es.Browser.chrome||es.Browser.safari){es.extend(w,{distCursor:"url("+w.imgPath+ih+") 2 6,crosshair",defaultCursor:"url("+w.imgPath+"openhand.cur) 8 8,default",draggingCursor:"url("+w.imgPath+"closedhand.cur) 8 8,move"});if(es.Platform.macintosh){w.defaultCursor="-webkit-grab";w.draggingCursor="-webkit-grabbing"}}else{es.extend(w,{distCursor:"url("+w.imgPath+ih+"),crosshair",defaultCursor:"url("+w.imgPath+"openhand.cur),default",draggingCursor:"url("+w.imgPath+"closedhand.cur),move"})}}}bo=bo||{};bo.version="gl";bo._register=[];bo.register=function(e){this._register[this._register.length]=e};bo.guid=1;bo.getGUID=function(e){return(e||"")+bo.guid++};var ei=window.BMAP_AUTHENTIC_KEY||"";function M(e,i,i8){var T=new Date();T.setTime(T.getTime()+i8*24*60*60*1000);document.cookie=e+"="+escape(i)+";expires="+T.toGMTString()}function aU(e,i){if(navigator.cookieEnabled){return M(e,i,30)}if(localStorage){return localStorage.setItem(e,i)}if(sessionStorage){return sessionStorage.setItem(e,i)}}bo.getSeckeyCid=function(){var i=+new Date();var e=bF+"//web.archive.org/web/20220712112455/http://dlswbr.baidu.com/heicha/mw/abclite-2063-s.js?_t="+i;f5.load(e,hQ)};function hQ(){if(window.___abvk){aU("SECKEY_ABVK",window.___abvk)}}window.__abbaidu_2063_cb=function(i){var e=JSON.parse(i);aU("BMAP_SECKEY",e.data)};bo.bmapVerifyCbk=function(i9){if(i9&&i9.error!==0){bo=null;BMapGL=null;var ja="百度未授权使用地图API,可能是因为您提供的密钥不是有效的百度地图开放平台密钥,或此密钥未对本应用的百度地图JavaScriptAPI授权。您可以访问如下网址了解如何获取有效的密钥:https://lbs.baidu.com/apiconsole/key#。";switch(i9.error){case 101:ja="您所使用的密钥ak有问题,不支持jsapi服务,可以访问该网址了解如何获取有效密钥:http://lbsyun.baidu.com/apiconsole/key#。";break;case 102:ja="MCODE参数不存在,mobile类型MCODE参数必需,详情查看:http://lbsyun.baidu.com/apiconsole/key#。";break;case 200:ja="APP不存在,AK有误请检查再重试,详情查看:http://lbsyun.baidu.com/apiconsole/key#。";break;case 201:ja="APP被您禁用啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 202:ja="APP被管理员删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 203:ja="APP类型错误,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 210:ja="APP IP校验失败,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 220:ja="APP Referer校验失败。请检查该ak设置的白名单与访问所有的域名是否一致。详情查看:http://lbsyun.baidu.com/apiconsole/key#";break;case 230:ja="APP Mcode码校验失败,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 240:ja="APP服务被禁用了,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 250:ja="该用户不存在... 请登录 https://lbs.baidu.com 的控制台,注册成为开发者申请ak吧。";break;case 251:ja="该用户被自己删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情。";break;case 252:ja="该用户被管理员删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 了解如何获取有效密钥,或请联系我们了解详情。";break;case 260:ja="您所使用的密钥AK不包含该服务呢,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看服务选择情况,或请联系我们了解详情。";break;case 261:ja="您所使用的密钥AK的该服务被禁用啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看服务选择情况,或请联系我们了解详情。";break;case 401:ja="您所使用的AK并发超限了,请登录 http://lbsyun.baidu.com/cashier/quota#/home 了解详情。";break;case 302:ja="您所使用的AK天配额超限了,请登录 http://lbsyun.baidu.com/cashier/quota#/home 了解详情。";break}alert(ja);var T=document.getElementsByClassName("bmap-container");if(T){for(var i8=0;i8i){this._removeOld()}if(!e[T]){e.push(i8)}e[T]=i8;i8._key_=T};hi.prototype.getHitRate=function(){return Math.round(this._totalHitTimes/this._totalGetTimes*1000)/1000};hi.prototype.getData=function(i){var e=this._cache[i];if(e){this._totalHitTimes++}this._totalGetTimes++;return e};hi.prototype.removeData=function(i9){if(this._options.clearCallback){this._options.clearCallback(this._cache[i9])}var T=this._cache;var ja=T[i9];for(var i8=0,e=T.length;i8=0;i9--){var i8=this._cache[i9]._key_;if(!ja[i8]){T.splice(i9,1);if(this._options.clearCallback){this._options.clearCallback(T[i8])}delete T[i8]}}};hi.prototype.getDataCount=function(){return this._cache.length};function hV(){}es.extend(hV.prototype,{centerAndZoomIn:function(jd,T,je){var jb=this;if(!jd&&!T){return}jd=jd||this.centerPoint;T=T||this.zoomLevel;T=this._getProperZoom(T).zoom;if(this.mapType===BMAP_EARTH_MAP){if(!this._earth){this.mapType=BMAPGL_NORMAL_MAP;this.temp.originMapType=BMAP_EARTH_MAP;function jc(){jb._earth=new bo.Earth(jb,{showRealSunlight:jb.config.showRealSunlight,showMilkyway:jb.config.showMilkyway,earthBackground:jb.config.earthBackground});jb._proxyEarthEvents();jb._changeEarthMapType(BMAP_EARTH_MAP);es.extend(jb,bo.EarthView.prototype);if(!jb._navigationCtrl&&jb.config.showControls){jb._navigationCtrl=new bo.NavigationControl3D(jb)}delete jb.temp.originMapType}gi.load("earth",function(){if(bo["FeatureStyle"+jb.config.style]){jc()}else{jb.loadMapStyleFiles(function(){jc()})}})}}this.lastLevel=this.zoomLevel||T;this.zoomLevel=T;var i9=new e7("onload");i9.point=jd;i9.zoom=T;this.centerPoint=this.restrictCenter(new cd(jd.lng,jd.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===BMAP_EARTH_MAP)){var i=this.config.defaultMaxBounds;var ja=new h(i,"baidu",this.mapType);var i8=new gI({mapType:this.mapType,copyright:ja,customLayer:false,baseLayer:true,tileTypeName:"web"});i8._isInnerLayer=true;this.addTileLayer(i8);if(this.mapType===BMAP_SATELLITE_MAP&&this._isHybridShow===true){this._addHybirdMap()}}this.dispatchEvent(i9);this.loaded=true;je=je||{};je.callback&&je.callback()},_setPlatformPosition:function(je,jd,jh){jh=jh||{};if(je===0&&jd===0&&!jh.point){return}if(isNaN(jh.initMapOffsetX)){jh.initMapOffsetX=this.offsetX}if(isNaN(jh.initMapOffsetY)){jh.initMapOffsetY=this.offsetY}var jf=je+jh.initMapOffsetX;var jc=jd+jh.initMapOffsetY;if(jh.point){var i=this.restrictCenter(jh.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new e7("oncenter_changed"))}}else{var i8=this.offsetX-jf;var e=this.offsetY-jc;var T=this.getZoomUnits();var jb=this.centerPoint.lng;var ja=this.centerPoint.lat;var i9=new cd(jb,ja);this.centerPoint=this.restrictCenter(new cd(i9.lng+i8*T,i9.lat-e*T),T);this.fire(new e7("oncenter_changed"));if(this.zoomLevel<10){jf=this.offsetX-(this.centerPoint.lng-i9.lng)/T;jc=this.offsetY+(this.centerPoint.lat-i9.lat)/T}}this.offsetX=jf;this.offsetY=jc;var jg=this.platform.style;jg.left=jf+"px";jg.top=jc+"px";this.maskLayer.style.left=-jf+"px";this.maskLayer.style.top=-jc+"px";if(jh.dispatchEvent!==false){this.dispatchEvent(new e7("onmoving"))}},zoomTo:function(e,jb,jf){jf=jf||{};jf.zoomCenter=jb;if(jf.noAnimation!==true){this.deepZoomTo(e,jf);return}if(typeof e!=="number"){return}var i9=dO[this.mapType];if(!i9){return}var T=e;e=this._getProperZoom(e).zoom;if(e===this.zoomLevel){var jc=new e7("onzoomexceeded");jc.targetZoom=T;this.dispatchEvent(jc);jf.callback&&jf.callback();return}this.lastLevel=this.zoomLevel;if(jb){this.temp._cPoint=jb;this.temp._cPixel=this.pointToPixelIn(jb)}else{if(this.getInfoWindow()){var je=this.getInfoWindow().getPoint();this.temp._cPixel=this.pointToPixelIn(je);this.temp._cPoint=je}}if(this.config.zoomCenter){jb=this.config.zoomCenter;this.temp._cPoint=jb;this.temp._cPixel=this.pointToPixelIn(jb)}if(jb||this.temp.infoWin&&this.temp.infoWin.isOpen()){var i=this.temp._cPoint;var jd=this.temp._cPixel;var i8=this.getZoomUnits(e);var ja=new cd(i.lng+i8*(this.width/2-jd.x),i.lat-i8*(this.height/2-jd.y));this.centerPoint=this.restrictCenter(ja,i8,e);if(this.centerPoint.zoom){e=this.centerPoint.zoom}}if(jf.fireEvent!==false){this.dispatchEvent(new e7("onzoomstart"))}if(e!==this.zoomLevel){this.zoomLevel=e;this.dispatchEvent(new e7("onzooming"));this.dispatchEvent(new e7("onzoomstartcode"))}if(jf.fireEvent!==false){this.dispatchEvent(new e7("onzoomend"))}if(jf.callback){jf.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(jc,i8){i8=i8||{};var ja=jc-this.zoomLevel;var i9=this._getProperZoom(jc);if(i9.exceeded){var e=new e7("onzoomexceeded");e.targetZoom=jc;this.dispatchEvent(e);return}var i;if(i8.zoomCenter){i=this.pointToPixelIn(i8.zoomCenter)}else{if(this.getInfoWindow()){i=this.pointToPixelIn(this.getInfoWindow().getPoint(),{zoom:this.lastLevel})}else{var i=new eL(this.width/2,this.height/2)}}this.lastLevel=this.zoomLevel;var jb=this.deepZoom||new ax(this);var T=ja>0?1:-1;jb.zoomMap(i,ja,T,null,i8)},flyToIn:function(jd,e){if(e===this.zoomLevel){this.panToIn(jd);return}var ja=this._getProperZoom(e);if(ja.exceeded){var je=new e7("onzoomexceeded");je.targetZoom=e;this.dispatchEvent(je);return}var jc=e-this.zoomLevel;var T=new eL(this.width/2,this.height/2);var i=this.pointToPixelIn(jd);var jb=new h3(i.x-T.x,i.y-T.y);this.lastLevel=this.zoomLevel;if(Math.abs(jc)>=4||Math.abs(jb.width)>this.width||Math.abs(jb.height)>this.height){this.centerAndZoomIn(jd,e);return}var i9=this.deepZoom||new ax(this);var i8=jc>0?1:-1;i9.zoomMap(i,jc,i8,jb)},panToIn:function(i,T){T=T||{};if(!i||i.equals(this.centerPoint)){T.callback&&T.callback();return}var i8=this.pointToPixelIn(i);var e=Math.round(this.width/2);var i9=Math.round(this.height/2);if(Math.abs(e-i8.x)>this.width||Math.abs(i9-i8.y)>this.height||T.noAnimation===true){this._panToIn(e-i8.x,i9-i8.y,i);T.callback&&T.callback()}else{this._panBy(e-i8.x,i9-i8.y,T)}},_panToIn:function(i,e,i8){var T=this.temp;if(T.operating===true){return}if(T.dragAni){T.dragAni.stop();T.dragAni=null;this.dispatchEvent(new e7("onmoveend"))}this.dispatchEvent(new e7("onmovestart"));this._setPlatformPosition(i,e,{point:i8});this.dispatchEvent(new e7("onmoveend"))},panBy:function(i,e,T){T=T||{};i=Math.round(i)||0;e=Math.round(e)||0;if(Math.abs(i)<=this.width&&Math.abs(e)<=this.height&&T.noAnimation!==true){this._panBy(i,e,T)}else{this._panToIn(i,e);T.callback&&T.callback()}},_panBy:function(i,e,i9){if(this.temp.operating===true){return}i9=i9||{};this.dispatchEvent(new e7("onmovestart"));var i8=this;var T=i8.temp;T.pl=i8.offsetX;T.pt=i8.offsetY;if(T.tlPan){T.tlPan.cancel()}if(T.dragAni){T.dragAni.stop();T.dragAni=null;this.dispatchEvent(new e7("onmoveend"))}T.tlPan=new e0({fps:i9.fps||i8.config.fps,duration:i9.duration||i8.config.actionDuration,transition:i9.transition||fT.easeInOutQuad,render:function(ja){this.terminative=i8.temp.operating;if(i8.temp.operating){return}i8._setPlatformPosition(Math.ceil(i*ja),Math.ceil(e*ja),{initMapOffsetX:T.pl,initMapOffsetY:T.pt})},finish:function(ja){i8.dispatchEvent(new e7("onmoveend"));i8.temp.tlPan=false;if(i8.temp.stopArrow===true){i8.temp.stopArrow=false;if(i8.temp.arrow!==0){i8._arrow()}}i9.callback&&i9.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(jg,i,e){this.isRestrict=false;i=i||this.getZoomUnits();e=e||this.zoomLevel;var je=this.pixelToPointIn(new eL(this.width,0),{center:jg,zoom:e});var jc=this.pixelToPointIn(new eL(0,this.height),{center:jg,zoom:e});var jh=jg.lng;var jm=jg.lat;if(this.config.restrictBounds!==null&&!this.config.restrictBounds.isEmpty()){var jl=this.config.restrictBounds;var i8=jl.getSouthWest();var jj=jl.getNorthEast();var jf=ia.convertLL2MC(i8);var ja=ia.convertLL2MC(jj);jg.lng=this.calcNewLngByBounds(jh,jc,je,jf.lng,ja.lng,i);jg.lat=this.calcNewLatByBounds(jm,jc,je,jf.lat,ja.lat,i);return jg}var jd=this.pixelToPointIn(new eL(0,0),{center:jg,zoom:e});var i9=this.pixelToPointIn(new eL(0,this.height),{center:jg,zoom:e});if(this.zoomLevel<5){if(jd.lat>gV.MAX_LAT&&i9.latgV.MAX_LAT){this.isRestrict=true;jg.lat=gV.MAX_LAT-this.height/2*i}else{if(i9.lat=gV.HIGH_RES_MIN_RATIO?2:1,enableEarth:cH.ifEnableEarth(),defaultMaxBounds:new ha(new cd(-21364736,-10616832),new cd(23855104,15859712)),showControls:false,showRealSunlight:true,showMilkyway:true,earthBackground:null,showStreetLayer:true,minZoom:null,maxZoom:null,style:"default",backgroundColor:null,enableIconClick:false,autoSafeArea:false,ak:null,webgl2:false,restrictCenter:true,restrictBounds:null,smaa:true,preserveDrawingBuffer:false,privateOn:false,privateRegions:null};for(var T in i){if(i.hasOwnProperty(T)){this.config[T]=i[T];if(T==="fixCenterWhenResize"){this.config.enableResizeOnCenter=i[T]}}}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={poi:true,poiText:true,poiIcon:true,overlay:true,layer:true,building:true,indoor:true,street:true,skyColors:["rgba(226, 237, 248, 0)","rgba(186, 211, 252, 1)"],isFlat:false,labelMargin:0};if(i.displayOptions){for(var e in i.displayOptions){if(i.displayOptions.hasOwnProperty(e)){this._displayOptions[e]=i.displayOptions[e]}}}if(this.config.restrictCenter===false){this._enableTiltZoom=0;this._enableHeadingZoom=0}},getMinZoom:function(){var T;if(dO[this.mapType][this._renderType]){T=dO[this.mapType][this._renderType].minZoom}else{T=dO[this.mapType].minZoom}if(this.config.minZoom!==null&&this.config.minZoom>=T){T=this.config.minZoom}if(this.mapType==="B_EARTH_MAP"){return T}var i=this.getSize();var e=this.worldSize(T);while(ee){i8=true;T=e}if(this._renderType!=="webgl"){T=Math.round(T)}return{zoom:T,exceeded:i8}},getContainer:function(){return this.container},getZoomUnits:function(T){if(this.mapType===BMAP_EARTH_MAP){return Math.pow(2,18-this._earth.getImageZoom())}var e=dO[this.mapType];if(typeof e!=="object"){return null}var i=T||this.zoomLevel;return Math.pow(2,(e.zoomLevelBase-i))},pointToPixelIn:function(jj,jl){if(!jj){return}jl=jl||{};if(this.mapType===BMAP_EARTH_MAP){var ja;if(!jj._llPt){ja=ia.convertMC2LL(jj);jj._llPt=ja}ja=jj._llPt;var jf=null;var i9=null;if(typeof jl.zoom==="number"){var ji=this._earth;var jk=ji._getEarthZoomByImgZoom(jl.zoom);if(jk<=3){jf=ji._generateTmpPMatrix(jk)}i9=ji._generateTmpMVMatrix(ji.getCenter(),jk)}var jb=this._earth.fromLatLngToPixel(ja,{useRound:false,isCalcOnBack:true,matrixInfo:{modelViewMatrix:i9,projectionMatrix:jf}});return jb}if((this._heading%360===0&&this._tilt===0)||!this._webglMapCamera){var jh=this.getZoomUnits(jl.zoom);var jd=jl.center||this.centerPoint;var i8=this.width/2;var jc=this.height/2;var jg;if(jj.lng*jd.lng<0){var i=Math.abs(jj.lng-jd.lng);var e=(ev._mc180X*2-i)/jh;if(jd.lng<0){jg=i8-e}else{jg=i8+e}}else{jg=(jj.lng-jd.lng)/jh+i8}var je=(jd.lat-jj.lat)/jh+jc;if(jl.useRound!==false){jg=Math.round(jg);je=Math.round(je)}return new eL(jg,je)}var T=this._webglMapCamera.fromMCToScreenPixel(jj.lng,jj.lat,jl);if(jl.useRound===false){return T}T.x=Math.round(T.x);T.y=Math.round(T.y);return T},pixelToPointIn:function(e,jf){if(!e){return}jf=jf||{};if(this.mapType===BMAP_EARTH_MAP){if(typeof jf.zoom==="number"){var jd=this._earth;var ja=null;var T=null;var je=jd._getEarthZoomByImgZoom(jf.zoom);if(je<=3){ja=jd._generateTmpPMatrix(je)}T=jd._generateTmpMVMatrix(jd.getCenter(),je)}var i=this._earth.fromPixelToLatLng(e,{matrixInfo:{modelViewMatrix:T,projectionMatrix:ja}});if(i===null){return null}return ia.convertLL2MC(i)}if((this._heading%360!==0||this._tilt>0)&&this._webglMapCamera){return this._webglMapCamera.fromScreenPixelToMC(e.x,e.y,jf)}var jb=jf.center||this.centerPoint;var jc=this.getZoomUnits(jf.zoom);var i9=jb.lng+jc*(e.x-this.width/2);var i8=jb.lat-jc*(e.y-this.height/2);return new cd(i9,i8)},pointToOverlayPixelIn:function(e,i8){i8=i8||{};var T=this.pointToPixelIn(e,{zoom:i8.zoom,center:i8.center,forLabel:true,frustumTest:true,useRound:i8.useRound});if(!T){return}if(i8.fixPosition&&this.mapType!=="B_EARTH_MAP"){var i9=this.getSize();var i=this.worldSize(i8.zoom);if(T.x>i9.width){while(T.x>i9.width){T.x-=i}}else{if(T.x<0){while(T.x<0){T.x+=i}}}}if(this._renderType==="webgl"){return T}T.x-=this.offsetX;T.y-=this.offsetY;return T},overlayPixelToPointIn:function(i,e){if(!i){return}var T=i.clone();if(this._renderType!=="webgl"){T.x+=this.offsetX;T.y+=this.offsetY}return this.pixelToPointIn(T,e)},getProjection:function(){return new ia()},lnglatToMercator:function(e,i8){var i=new cd(e,i8);var T=ia.convertLL2MC(i);return[T.lng,T.lat]},mercatorToLnglat:function(i,e){if(isNaN(i)||isNaN(e)){return[]}i=parseFloat(i);e=parseFloat(e);var i8=new cd(i,e);var T=ia.convertMC2LL(i8);return[T.lng,T.lat]},getBoundsIn:function(){var jl=arguments[0];if(this.mapType===BMAP_EARTH_MAP&&this._earth){var jf=this._earth.getCustomBounds();if(!jf){return this.config.defaultMaxBounds}var je=jf.getSouthWest();var e=jf.getNorthEast();if(je.lng>e.lng){e.lng=180}var jC=ia.convertLL2MC(je);var js=ia.convertLL2MC(e);var ji=this.config.defaultMaxBounds;var jr=Math.max(jC.lng,ji.sw.lng);var jq=Math.max(jC.lat,ji.sw.lat);var jk=Math.min(js.lng,ji.ne.lng);var jj=Math.min(js.lat,ji.ne.lat);var jn=new ha(new cd(jr,jq),new cd(jk,jj));jn.pointBottomLeft=new cd(jr,jq);jn.pointBottomRight=new cd(jk,jq);jn.pointTopLeft=new cd(jr,jj);jn.pointTopRight=new cd(jk,jj);jn.setMinMax();jn.makeNormalizedPoint(this._earth.getHeading());return jn}jl=jl||{};var i9=jl.margins||[0,0,0,0];var jx=this.pixelToPointIn({x:i9[3],y:this.height-i9[2]},jl);var jB=this.pixelToPointIn({x:this.width-i9[1],y:i9[0]},jl);var jp=typeof jl.heading==="number"?jl.heading:(this._heading%360);var T=typeof jl.tilt==="number"?jl.tilt:this._tilt;var jh=this._webglMapCamera;if((jp===0&&T===0)||!jh){this._bounds.setSouthWest(jx);this._bounds.setNorthEast(jB);this._bounds.pointBottomLeft=jx;this._bounds.pointBottomRight=new cd(jB.lng,jx.lat);this._bounds.pointTopRight=jB;this._bounds.pointTopLeft=new cd(jx.lng,jB.lat);this._bounds.setMinMax();this._bounds.makeNormalizedPoint(jp);return this._bounds}var jo=this.pixelToPointIn({x:i9[3],y:i9[0]},jl);var i8=jh.getPosition();var jD=Math.sqrt(Math.pow(jo.lng-i8[0],2)+Math.pow(jo.lat-i8[1],2));var jy=this.getZoomUnits();var jF=jD/jy;var jv=jh._frustumSideLen;var jd=jh._fovy;if(jF>jv||(90-T)jb){jb=ju[jz].lng}if(ju[jz].latjg){jg=ju[jz].lat}}this._bounds.setSouthWest(new cd(jA,jG));this._bounds.setNorthEast(new cd(jb,jg));this._bounds.pointTopLeft=jo;this._bounds.pointTopRight=jB;this._bounds.pointBottomRight=jm;this._bounds.pointBottomLeft=jx;this._bounds.makeNormalizedPoint(jp);this._bounds.setMinMax();return this._bounds},isLoaded:function(){return !!this.loaded},_getBestLevel:function(i,jh){var ja=0;if(this._renderType==="webgl"&&!bJ()){ja=100}var jb=jh.margins||[10,10,10,10];var i8=jh.zoomFactor||0;var jc=jb[1]+jb[3];var i9=jb[0]+jb[2];var e=this.getMinZoom();var jg=this.getMaxZoom();var jf=i.toSpan();var je=jf.width/(this.width-jc-ja);var jd=jf.height/(this.height-i9-ja);var T=18-m(Math.max(je,jd));if(Tjg){T=jg}T+=i8;if(this._renderType!=="webgl"){T=Math.floor(T)}return T},getViewportIn:function(jh,i9){if(this.mapType===BMAP_EARTH_MAP){jh=jh||[];var jb=[];for(var ji=0;ji=0;jg--){jc.extend(ja[jg])}if(jc.isEmpty()){return jd}}var jm=jc.getCenter();var e=this._getBestLevel(jc,i9);if(i9.margins){var T=i9.margins;var jl=(T[1]-T[3])/2;var je=(T[0]-T[2])/2;var jk=this.getZoomUnits(e);jm.lng=jm.lng+jk*jl;jm.lat=jm.lat+jk*je}return{center:jm,zoom:e}},setViewportIn:function(i8,i9){if(this.mapType===BMAP_EARTH_MAP){var jd;if(i8&&i8.center){var T=ia.convertMC2LL(i8.center);var jb=this._earth._getEarthZoomByImgZoom(i8.zoom,T);jd={center:T,zoom:jb}}else{jd=[];for(var ja=0;jagV.MAX_DRAG_TILT_L2){i.setTilt(gV.MAX_DRAG_TILT_L2,{callback:function(){i._changeEarthMapType(e)}})}else{i._changeEarthMapType(e)}},_changeEarthMapType:function(T){var i8=this;var jb=i8.tileMgr.tileLayers;if(this._mapTypeChangAni){this._mapTypeChangAni.stop()}var ja;if(this._earth){ja=this._earth.getEarthCanvas()}if(!this._earth){this.maskLayer.style.opacity=1;this.maskLayer.style.zIndex=999;this.maskLayer.style.background="#000"}this._mapTypeChangAni=new e0({duration:400,render:function(e){if(!i8._earth){return}ja.style.opacity=e},finish:function(){for(var e=jb.length-1,jc=e;jc>=0;jc--){var je=jb[jc].tilesDiv;if(je){je.style.visibility="hidden"}if(jb[jc]._isInnerLayer&&i8._renderType!=="webgl"){i8.removeTileLayer(jb[jc])}}i8._mapTypeChangAni=null;i8._mapTypeChanging=false;function jd(){var ji=i8.getZoom()-2;var jj=i8.getCenterIn();var jg=ia.convertMC2LL(jj);i8._earth=new bo.Earth(i8,{center:jg,zoom:ji,showRealSunlight:i8.config.showRealSunlight,showMilkyway:i8.config.showMilkyway,earthBackground:i8.config.earthBackground});i8._proxyEarthEvents();var jf=i8.mapType;i8.mapType=T;var jh=new e7("onmaptypechange");jh.zoomLevel=this.zoomLevel;jh.mapType=T;jh.exMapType=jf;i8.dispatchEvent(jh);i8._setMapTypeStatus(T);es.extend(i8,bo.EarthView.prototype);if(!i8._navigationCtrl&&i8.config.showControls){i8._navigationCtrl=new eu(i8)}}if(!i8._earth){if(bo["FeatureStyle"+i8.config.style]){jd()}else{i8.loadMapStyleFiles(function(){jd()})}}if(parseInt(i8.maskLayer.style.opacity,10)===1){setTimeout(function(){i8.maskLayer.style.zIndex=9;i8.maskLayer.style.opacity=0},1000)}}});if(!this._earth){return}var i=this.mapType;this.mapType=T;var i9=new e7("onmaptypechange");i9.zoomLevel=this.zoomLevel;i9.mapType=T;i9.exMapType=i;this.dispatchEvent(i9);i8._setMapTypeStatus(T);es.extend(i8,bo.EarthView.prototype)},getMapStyleId:function(){if(typeof this.config.style==="string"){return this.config.style}return this.config.mapStyleId||"custom"},_setMapTypeStatus:function(T){var jc=arguments[1];if(T===BMAP_EARTH_MAP){var ja=this._earth.getEarthCanvas();if(ja){ja.style.display=""}var jd={noAnimation:true};this._earth.setCenter(ia.convertMC2LL(this.centerPoint),jd);this._earth.setImageZoom(this.zoomLevel,jd);this._earth.setTilt(this.getTilt(),jd);this._earth.setHeading(this.getHeading(),jd)}else{if(this.preMapType===BMAP_EARTH_MAP&&this._earth){var jb=this._earth;var i8=jb.getMapZoom();var i9=jb._imageRawZoom||i8;var i=i9-i8;var e=jb.getCenter();if(this._renderType==="webgl"){this._tilt=jb.getTilt();if(this.zoomLevel>7){this._heading=jb.getHeading();jc&&jc(e,i8);return}if(jb.getHeading()!==0){jb.setTilt(this.getTilt());jb.setHeading(this.getHeading(),{callback:function(){jc&&jc(e,i8)}})}else{jc&&jc(e,i8)}return}if(i<0.1&&jb.getTilt()===0&&jb.getHeading()===0){jc&&jc(e,i8);return}jb.setTilt(0);jb.setHeading(0);jb.setZoom(jb.getZoom()-i,{callback:function(){jc&&jc(e,i8)}})}}},_proxyEarthEvents:function(){var i9=this;var ja=this._earth;ja.on("tilesload",function(i){i9.fire(i)});ja.on("centerandzoom",function(i){i9.dispatchEvent(new e7("onmoveend"));i9.dispatchEvent(new e7("onzoomend"))});function i8(i){i9.fire(i)}var e=["zoomstart","zoomend","tilesload","sunlighttime_change","sunlighttime_clear","centerandzoom","animation_start","animation_stop","movestart","moveend","moving","dragstart","dragend","dragging"];for(var T=0;T=3?e:3},setCenterIn:function(e,i){this.panToIn(e,i)},getRenderType:function(){return this._renderType},getSolarInfo:function(i8){i8=i8||this._initDate;var T=eZ(i8);var e=ia.convertLL2MC(new cd(T[0],T[1]));var jg=e.latLng;var jb=bo.Projection.convertMC2LL(this.centerPoint);var jd=i8.getUTCHours();var jf=jd+24*jb.lng/360;var je=jf-12;var jc=je*60*0.25;var ja=Math.asin(Math.sin(hH(jb.lat))*Math.sin(hH(jg.lat))+Math.cos(hH(jb.lat))*Math.cos(hH(jg.lat))*Math.cos(hH(jc)));var i9=Math.asin(Math.sin(hH(jc))*Math.cos(hH(jg.lat))/Math.cos(ja));var i="north";if(jb.lat=19){return gV.MAX_DRAG_TILT}else{if(e<=18){if(e=this._enableTiltZoom-2){return(1-(this._enableTiltZoom-e)/2)*gV.MAX_DRAG_TILT_L2}return 0}return gV.MAX_DRAG_TILT_L2}else{return(gV.MAX_DRAG_TILT-gV.MAX_DRAG_TILT_L2)*(e-18)+gV.MAX_DRAG_TILT_L2}}},worldSize:function(i){var e=i||this.zoomLevel;return gV.WORLD_SIZE_MC/this.getZoomUnits(e)},setTrafficOn:function(e){if(e&&Number(e)>1){iB.setZIndex(Number(e))}this.addTileLayer(iB)},setTrafficOff:function(){this.removeTileLayer(iB)},showOverlayContainer:function(){this.setDisplayOptions({overlay:true})},hideOverlayContainer:function(){this.setDisplayOptions({overlay:false})},addLabelsToMapTile:function(T){for(var e=0;e"-1"){f5.load(jb)}else{bo["customStyleInfo_"+jj].xhr=hh.post(jb,jg,window["styleCbk_"+jj])}})}else{if(jb.indexOf("jsonp")>"-1"){f5.load(jb)}else{bo["customStyleInfo_"+jj].xhr=hh.post(jb,jg,window["styleCbk_"+jj])}}})}},getFeatureStyleTags:function(){var e=[];var i9=Object.keys(bo);for(var i8=0;i8-1&&bo[T]){e.push(T)}}return e},setCopyrightOffset:function(i8,i){var T=new e7("oncopyrightoffsetchange",{logo:i8,cpy:i});this.dispatchEvent(T)},_setTextRenderType:function(e){if(e){this.config.textRenderType=e;return}if(this.config.textRenderType!==null){return}if(bJ()){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.fire(new e7("ondestroy"))},centerAndZoom:function(e,jb,T){if(Object.prototype.toString.call(jb)!=="[object Undefined]"){jb=parseInt(jb,10)}if(typeof e==="string"){var i8=this;var ja=new a6();ja.getPoint(e,function(jc){e=jc;var jd=ia.convertLL2MC(e);i8.centerAndZoomIn(jd,jb,T)})}else{if(this.config.coordType===BMAP_COORD_GCJ02){var i9=hA(e,3);var i=ia.convertLL2MC(i9)}else{var i=ia.convertLL2MC(e)}this.centerAndZoomIn(i,jb,T)}},pointToPixel:function(e,T){var i=ia.convertLL2MC(e);var i8={};es.extend(i8,T);if(i8&&i8.center){i8.center=ia.convertLL2MC(i8.center)}return this.pointToPixelIn(i,i8)},pixelToPoint:function(T,i){var i8={};es.extend(i8,i);if(i8&&i8.center){i8.center=ia.convertLL2MC(i8.center)}var e=this.pixelToPointIn(T,i8);return ia.convertMC2LL(e)},pointToOverlayPixel:function(e,T){var i=ia.convertLL2MC(e);var i8={};es.extend(i8,T);if(i8&&i8.center){i8.center=ia.convertLL2MC(i8.center)}return this.pointToOverlayPixelIn(i,i8)},overlayPixelToPoint:function(T,i){var i8={};es.extend(i8,i);if(i8&&i8.center){i8.center=ia.convertLL2MC(i8.center)}var e=this.overlayPixelToPointIn(T,i8);return ia.convertMC2LL(e)},setViewport:function(T,i8){var e;if(T&&T.center){e={};es.extend(e,T);e.center=ia.convertLL2MC(e.center)}else{e=[];for(var i9=0;i92){jj.push(ja.join("|"))}}return jj.join(",")},getFrontZoom:function(i,e){var T=i.stylers["level"];if(T===undefined){return"main"}else{return parseInt(T,10)}},isZoomConfig:function(e){var i=e.stylers["level"];if(i===undefined){return false}else{return true}},isOnlyZoomStyler:function(e){var i={};es.extend(i,e.stylers);delete i.curZoomRegionId;delete i.curZoomRegion;delete i.level;if(es.isEmptyObject(i)){return true}else{return false}},isSelectZoom:function(i,e){var T=i.stylers["level"];if(T===undefined){return true}else{if(T===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 i8=e.stylers["level"];var T={};es.extend(T,i);if(i8===undefined){return T}else{T[parseInt(i8,10)]=true;return T}},onStyleDataBack:function(i9,e,i,i8,jb,T){if(i9.status!==0){return}if(i9.data.style.length===3){if(!T.baseFs){T.baseFs=i9.data.style}bo.StyleBody=i9.data.style[2]}else{bo.StyleBody=i9.data.style}var ja=T.baseFs;bo["FeatureStyle"+i]=ja;this.updateFrontFeatureStyle(T)},updateFrontFeatureStyle:function(T){if(T.zoomFrontStyle.main["bmapRoadarrowVisibility"]){for(var e=this.map.getMinZoom();e<=this.map.getMaxZoom();e++){if(!T.zoomFrontStyle[e]["bmapRoadarrowVisibility"]){T.zoomFrontStyle[e]["bmapRoadarrowVisibility"]=T.zoomFrontStyle.main["bmapRoadarrowVisibility"]}}}}};var aN={map:null,labelCache:{},calcDrawMc:function(T,i,e){var i8=[];switch(i){case"fill":i8=this.calcFill(T,e);break;case"line":break;case"building3d":i8=this.calcBuilding3d(T,e);break}return i8},calcFill:function(i9,T){var ja=[];for(var i8=0;i80){jc=i9.verticesLength[T-1]}end=i9.verticesLength[T];var ja=[];var i8="";if(i9.vertex){ja=i9.vertex;i8="building3d"}else{if(i9.data[0]){ja=i9.data[0];i8=i9.type}else{continue}}var jb=this.calcDrawMc(ja.slice(jc,end),i8,e);this.map.addAreaSpot(jb,{userData:{styleId:i9.styleIds[T],type:"mapstyle"}})}},addLabelIntoAreaSpots:function(e){if(t.environment!=="customEditor"){return}for(var i9=0;i9jb){return jb}while(jcT){jc=i9}else{jb=i9}i9=(jb-jc)*0.5+jc}return i9};b4.prototype.solve=function(e,i){return this.sampleCurveY(this.solveCurveX(e,i))};var fT={};function e0(T){var e={duration:1000,fps:30,delay:0,transition:fT.linear,dropLastAnimation:false};if(T){for(var i8 in T){e[i8]=T[i8]}}if(T.beginTime){this._beginTime=T.beginTime}this._callbacks=[];this._options=e;if(e.delay){var i9=this;setTimeout(function(){i9._doStart()},e.delay)}else{this._doStart()}this._pauseTime=0}e0.INFINITE="INFINITE";e0.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(T){i._loop(T)})}else{this._beginTime=new Date().getTime();if(this._options.duration===e0.INFINITE){this._endTime=null}else{this._endTime=this._beginTime+this._options.duration}this._loop()}};e0.prototype._loop=function(i8){var jb=this;i8=i8||new Date().getTime();i8=i8-this._pauseTime;if(!this._beginTime){this._beginTime=i8}if(!this._endTime&&typeof this._options.duration==="number"){this._endTime=this._beginTime+this._options.duration}if(jb._endTime!==null&&i8>=jb._endTime){if(jb._options.dropLastAnimation===false){jb._options.render(jb._options.transition(1),1,i8)}if(typeof jb._options.finish==="function"){jb._options.finish(i8,this)}for(var ja=0,e=jb._callbacks.length;ja=i9.percentage&&i80){i.unselectable="on";i.selectstart=function(){return false};i.onmousedown=function(T){T.preventDefault();return false}}else{var e=i0(i);e.MozUserSelect="none";e.WebkitUserSelect="none";i.addEventListener("mousedown",function(T){T.preventDefault()},false)}}function aI(e){return e&&e.parentNode&&e.parentNode.nodeType!==11}function bA(i,e){i.insertAdjacentHTML("beforeEnd",e);return i.lastChild}function fb(T,i){var i8=document.createElement("div");i8.innerHTML=i;var e=i8.childNodes[0];return T.parentNode.insertBefore(e,T)}function ad(i){i=i||window.event;i.stopPropagation?i.stopPropagation():i.cancelBubble=true}function b(i){i=i||window.event;i.preventDefault?i.preventDefault():i.returnValue=false;return false}function gC(i){ad(i);return b(i)}function f9(){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 hu(i9){if(!i9){return}i9.onload=i9.onerror=null;var T=i9.attributes,i8,e,ja;if(T){e=T.length;for(i8=0;i8>4);je=((jd&15)<<4)|(jb>>2);jc=((jb&3)<<6)|ja;T=T+String.fromCharCode(jg);if(jb!==64){T=T+String.fromCharCode(je)}if(ja!==64){T=T+String.fromCharCode(jc)}jg=je=jc="";jf=jd=jb=ja=""}while(i8-1||e.indexOf("iPad")>-1){return true}return false}function g4(){var e=navigator.userAgent;if(e.indexOf("Android")>-1){return true}return false}function hH(e){return e*Math.PI/180}function eD(e){return e/Math.PI*180}function bs(e,i9){var i8=Math.pow(10,i9);if(typeof e==="number"){return Math.round(e*i8)/i8}for(var T=0;Te){T=e}}return T}function dJ(e,i){while(e<0){e+=i}return e%i}function g0(i,e){return(i>=0&&e>=0)||(i<0&&e<0)}function G(i){if(i._gl){return i._gl}var e={alpha:true,antialias:false,failIfMajorPerformanceCaveat:false,preserveDrawingBuffer:false,stencil:false};var T=i.getContext("webgl",e)||i.getContext("experimental-webgl",e);i._gl=T;return T}function hF(i8,T){for(var e=0;ei8||T.lati){return false}return true}function h9(jc,jb,ja,i8){var i9=P(ja,i8,jc);var T=P(ja,i8,jb);var i=P(jc,jb,ja);var e=P(jc,jb,i8);if(i9*T<0&&i*e<0){return true}else{if(i9===0&&h1(ja,i8,jc)){return true}else{if(T===0&&h1(ja,i8,jb)){return true}else{if(i===0&&h1(jc,jb,ja)){return true}else{if(e===0&&h1(jc,jb,i8)){return true}else{return false}}}}}}function gO(T,i){var e=i.parentNode;if(e.lastChild===i){e.appendChild(T)}else{e.insertBefore(T,i.nextSibling)}}function dp(je,jf){if(jf===0){return je}var jd=0;var jb=0;if(!je){throw"异常"}if(je.length===0){return[]}for(var i9=1,T=je.length-1;i9jd){jb=i9;jd=jc}}var e=[];if(jd>=jf){var jh=je.slice(0,jb);var jg=je.slice(jb,je.length);var ja=dp(jh,jf);var i8=dp(jg,jf);for(var i9=0,T=ja.length;i9=0){i8=Math.floor(T/65536)*65536;i=i8;e=T-i8}else{i8=Math.floor(-T/65536)*65536;i=-i8;e=T+i8}return[i,e]}function ch(e){if(e.lng>=0&&e.lat>=0){return new cd(e.lng-10000000,e.lat-6000000)}if(e.lng>=0&&e.lat<0){return new cd(e.lng-10000000,e.lat+6000000)}if(e.lng<0&&e.lat>=0){return new cd(e.lng+10000000,e.lat-6000000)}if(e.lng<0&&e.lat<0){return new cd(e.lng+10000000,e.lat+6000000)}}var hl=null;if(window.performance&&window.performance.now){hl=function(){return performance.now()}}else{if(Date.now){hl=function(){return Date.now()}}else{hl=function(){return(new Date).getTime()}}}function gZ(i8,e,i){var T="mouseWheel";if(es.Platform.macintosh){if(!isNaN(i8)&&(i8<10||i8!==120)&&(e%1===0&&e<5)){T="padScroll"}if(es.Browser.firefox&&(e%1===0&&e<5&&i===0)){T="padScroll"}}if(es.Browser.safari&&i8===12){T="mouseWheel"}return T}function bB(jh,jc){var jg=jh[0];var jf=jh[1];var i8=false;for(var jb=0,ja=jc.length-2;jbjf)!==(T>jf))&&(jg<(jd-je)*(jf-i9)/(T-i9)+je);if(e){i8=!i8}ja=jb}return i8}function am(i9,jb){var e=jb.length;var T=0;var ja=false;for(var i8=0;i8=jb[i8].lat)&&(i9.lat=jb[T].lat)&&(i9.lati){T=Math.pow(T-i+1,i8)+i-1}else{if(Tthis.ll.lng&&e.lngthis.ll.lat&&e.latgy){return ar}return eX};gG.prototype.normalize=function(i,i8,e,T){if(i>e){this.ll.lng=e;this.ru.lng=i}else{this.ll.lng=i;this.ru.lng=e}if(i8>T){this.ll.lat=T;this.ru.lat=i8}else{this.ll.lat=i8;this.ru.lat=T}};function d0(i,i8,e,T){this.sp={lng:i,lat:i8};this.ep={lng:e,lat:T};this.mbr=new gG(i,i8,e,T)}function hm(i8,e,ja,i9){for(var T=0;T=e[T]&&i8.lng<=e[T+1]&&i8.lat>=ja[T]&&i8.lat<=ja[T+1]){return true}}return false}function fE(jd){var i=jd.lng;var jc=jd.lat;var i8=Math.sqrt(i*i+jc*jc);var ja=Math.atan2(jc,i);var T=i8+fO(jc);var i9=ja+fN(i);var e=T*Math.cos(i9);var jb=T*Math.sin(i9);return{lng:e+gR,lat:jb+gQ}}function aQ(jd){var i=jd.lng-gR;var jc=jd.lat-gQ;var i8=Math.sqrt(i*i+jc*jc);var ja=Math.atan2(jc,i);var T=i8-fO(jc);var i9=ja-fN(i);var e=T*Math.cos(i9);var jb=T*Math.sin(i9);return{lng:e,lat:jb}}function fO(e){return Math.sin(e*e6*hY)*f8}function fN(e){return Math.cos(e*e6*hY)*f7}function al(T,i,e){return((i.lng-T.lng)*(e.lat-T.lat)-(e.lng-T.lng)*(i.lat-T.lat))}function gW(i,e){return Math.abs(i-e)<=gy}function fU(i8,T){var i=i8.lat*hY;var jd=i8.lng*hY;var e=T.lat*hY;var jc=T.lng*hY;var ja=Math.cos(i)*Math.cos(e);var i9=Math.cos(jd)*Math.cos(jc);var jf=Math.sin(i)*Math.sin(e);var je=Math.sin(jd)*Math.sin(jc);var jg=ja*i9+ja*je+jf;if(jg<-1){jg=-1}else{if(jg>1){jg=1}}var jb=Math.acos(jg)*hK;return jb}function g(jc,jb){var i=jc.lat*hY;var e=jb.lat*hY;var i8=jc.lng*hY;var T=jb.lng*hY;var ja=i-e;var i9=i8-T;var jd=Math.sin(ja/2)*Math.sin(ja/2)+Math.cos(i)*Math.cos(e)*Math.sin(i9/2)*Math.sin(i9/2);return 2*Math.asin(Math.sqrt(jd))*hK}function fS(jd,T){var jf=bq(jd,T);var je=180;var jc=90;var jb=-180;var i9=-90;var ja=T.sp;var i8=T.ep;je=ja.lng=je&&jf.lng<=i9&&jf.lat>=jc){return fU(jd,jf)}else{var i=g(jd,T.sp);var e=g(jd,T.ep);return ii8.lat){if(al({lng:cE[e],lat:cC[e]},{lng:cE[(e+1)%Y],lat:cC[(e+1)%Y]},i8)>0){++T}}}else{if(cC[(e+1)%Y]<=i8.lat){if(al({lng:cE[e],lat:cC[e]},{lng:cE[(e+1)%Y],lat:cC[(e+1)%Y]},i8)<0){--T}}}}return T===0?eX:he}function iQ(i8){var jb={};if(i8.lnger[2]+0.4||i8.lat>er[3]+0.4){jb.lng=i8.lng;jb.lat=i8.lat;return jb}else{if(hm(i8,ea,d9,hD)){jb=fE(i8);return jb}}var e=0;var je=dg;var T=0;var jc=new gG();var jd=1;if(by(i8)===eX){for(var ja=0;jas[2]+0.4||i.lat>s[3]+0.4){T.lng=i.lng;T.lat=i.lat;return T}else{if(hm(i,bR,bQ,hD)){T=aQ(i);return T}}var e=iQ(i);if(i.lng===e.lng&&i.lat===e.lng){T.lng=i.lng;T.lat=i.lat;return T}return decryptPt1(i,iQ)}function hA(i,e){if(e===3&&i instanceof cd){var T=iQ(i);return new cd(T.lng,T.lat)}else{return i}}function ec(i,e){if(e===3&&i instanceof cd){var T=et(i);return new cd(T.lng,T.lat)}else{if(e===5&&i instanceof cd){return new cd(i.lng,i.lat)}else{return i}}}function l(ja){var jb=JSON.stringify(ja);var i9=0,T,i8,e;if(jb.length===0){return i9}for(T=0,e=jb.length;Ti-kc?kc:kd},e.offset=function(i,kc){return kb(i=new Date(+i),null==kc?1:Math.floor(kc)),i},e.range=function(kd,i,kc){var ke=[];if(kd=e.ceil(kd),kc=null==kc?1:Math.floor(kc),!(i>kd&&kc>0)){return ke}do{ke.push(new Date(+kd))}while(kb(kd,kc),ka(kd),i>kd);return ke},e.filter=function(i){return j3(function(kc){for(;ka(kc),!i(kc);){kc.setTime(kc-1)}},function(kc,kd){for(;--kd>=0;){for(;kb(kc,1),!i(kc);){}}})},T&&(e.count=function(i,kc){return jN.setTime(+i),jR.setTime(+kc),ka(jN),ka(jR),Math.floor(T(jN,jR))},e.every=function(i){return i=Math.floor(i),isFinite(i)&&i>0?i>1?e.filter(j9?function(kc){return j9(kc)%i===0}:function(kc){return e.count(0,kc)%i===0}):e:null}),e}function jS(e){return j3(function(i){i.setDate(i.getDate()-(i.getDay()+7-e)%7),i.setHours(0,0,0,0)},function(i,T){i.setDate(i.getDate()+7*T)},function(i,T){return(T-i-(T.getTimezoneOffset()-i.getTimezoneOffset())*jM)/j0})}function jK(e){return j3(function(i){i.setUTCDate(i.getUTCDate()-(i.getUTCDay()+7-e)%7),i.setUTCHours(0,0,0,0)},function(i,T){i.setUTCDate(i.getUTCDate()+7*T)},function(i,T){return(T-i)/j0})}var jN=new Date,jR=new Date,jY=j3(function(){},function(i,T){i.setTime(+i+T)},function(i,T){return T-i});jY.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?j3(function(i){i.setTime(Math.floor(i/e)*e)},function(i,T){i.setTime(+i+T*e)},function(i,T){return(T-i)/e}):jY:null};var j7=jY.range,j5=1000,jM=60000,j2=3600000,jU=86400000,j0=604800000,je=j3(function(e){e.setTime(Math.floor(e/j5)*j5)},function(i,T){i.setTime(+i+T*j5)},function(i,T){return(T-i)/j5},function(e){return e.getUTCSeconds()}),j4=je.range,jT=j3(function(e){e.setTime(Math.floor(e/jM)*jM)},function(i,T){i.setTime(+i+T*jM)},function(i,T){return(T-i)/jM},function(e){return e.getMinutes()}),jm=jT.range,jG=j3(function(i){var T=i.getTimezoneOffset()*jM%j2;0>T&&(T+=j2),i.setTime(Math.floor((+i-T)/j2)*j2+T)},function(i,T){i.setTime(+i+T*j2)},function(i,T){return(T-i)/j2},function(e){return e.getHours()}),jZ=jG.range,jw=j3(function(e){e.setHours(0,0,0,0)},function(i,T){i.setDate(i.getDate()+T)},function(i,T){return(T-i-(T.getTimezoneOffset()-i.getTimezoneOffset())*jM)/jU},function(e){return e.getDate()-1}),jd=jw.range,jt=jS(0),jv=jS(1),i9=jS(2),jr=jS(3),jg=jS(4),jJ=jS(5),jQ=jS(6),jb=jt.range,jI=jv.range,jk=i9.range,jF=jr.range,jV=jg.range,jH=jJ.range,j6=jQ.range,jX=j3(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(i,T){i.setMonth(i.getMonth()+T)},function(i,T){return T.getMonth()-i.getMonth()+12*(T.getFullYear()-i.getFullYear())},function(e){return e.getMonth()}),j8=jX.range,jq=j3(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(i,T){i.setFullYear(i.getFullYear()+T)},function(i,T){return T.getFullYear()-i.getFullYear()},function(e){return e.getFullYear()});jq.every=function(e){return isFinite(e=Math.floor(e))&&e>0?j3(function(i){i.setFullYear(Math.floor(i.getFullYear()/e)*e),i.setMonth(0,1),i.setHours(0,0,0,0)},function(i,T){i.setFullYear(i.getFullYear()+T*e)}):null};var jj=jq.range,jO=j3(function(e){e.setUTCSeconds(0,0)},function(i,T){i.setTime(+i+T*jM)},function(i,T){return(T-i)/jM},function(e){return e.getUTCMinutes()}),jy=jO.range,jx=j3(function(e){e.setUTCMinutes(0,0,0)},function(i,T){i.setTime(+i+T*j2)},function(i,T){return(T-i)/j2},function(e){return e.getUTCHours()}),ju=jx.range,js=j3(function(e){e.setUTCHours(0,0,0,0)},function(i,T){i.setUTCDate(i.getUTCDate()+T)},function(i,T){return(T-i)/jU},function(e){return e.getUTCDate()-1}),jp=js.range,jo=jK(0),jn=jK(1),jl=jK(2),ji=jK(3),jh=jK(4),jc=jK(5),ja=jK(6),i8=jo.range,jE=jn.range,j1=jl.range,jP=ji.range,jW=jh.range,jD=jc.range,jC=ja.range,jB=j3(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(i,T){i.setUTCMonth(i.getUTCMonth()+T)},function(i,T){return T.getUTCMonth()-i.getUTCMonth()+12*(T.getUTCFullYear()-i.getUTCFullYear())},function(e){return e.getUTCMonth()}),jA=jB.range,jf=j3(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(i,T){i.setUTCFullYear(i.getUTCFullYear()+T)},function(i,T){return T.getUTCFullYear()-i.getUTCFullYear()},function(e){return e.getUTCFullYear()});jf.every=function(e){return isFinite(e=Math.floor(e))&&e>0?j3(function(i){i.setUTCFullYear(Math.floor(i.getUTCFullYear()/e)*e),i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0)},function(i,T){i.setUTCFullYear(i.getUTCFullYear()+T*e)}):null};var jz=jf.range;jL.timeInterval=j3,jL.timeMillisecond=jY,jL.timeMilliseconds=j7,jL.utcMillisecond=jY,jL.utcMilliseconds=j7,jL.timeSecond=je,jL.timeSeconds=j4,jL.utcSecond=je,jL.utcSeconds=j4,jL.timeMinute=jT,jL.timeMinutes=jm,jL.timeHour=jG,jL.timeHours=jZ,jL.timeDay=jw,jL.timeDays=jd,jL.timeWeek=jt,jL.timeWeeks=jb,jL.timeSunday=jt,jL.timeSundays=jb,jL.timeMonday=jv,jL.timeMondays=jI,jL.timeTuesday=i9,jL.timeTuesdays=jk,jL.timeWednesday=jr,jL.timeWednesdays=jF,jL.timeThursday=jg,jL.timeThursdays=jV,jL.timeFriday=jJ,jL.timeFridays=jH,jL.timeSaturday=jQ,jL.timeSaturdays=j6,jL.timeMonth=jX,jL.timeMonths=j8,jL.timeYear=jq,jL.timeYears=jj,jL.utcMinute=jO,jL.utcMinutes=jy,jL.utcHour=jx,jL.utcHours=ju,jL.utcDay=js,jL.utcDays=jp,jL.utcWeek=jo,jL.utcWeeks=i8,jL.utcSunday=jo,jL.utcSundays=i8,jL.utcMonday=jn,jL.utcMondays=jE,jL.utcTuesday=jl,jL.utcTuesdays=j1,jL.utcWednesday=ji,jL.utcWednesdays=jP,jL.utcThursday=jh,jL.utcThursdays=jW,jL.utcFriday=jc,jL.utcFridays=jD,jL.utcSaturday=ja,jL.utcSaturdays=jC,jL.utcMonth=jB,jL.utcMonths=jA,jL.utcYear=jf,jL.utcYears=jz,Object.defineProperty(jL,"__esModule",{value:!0})});function eC(e){this._elemType=e;this._objCollection={}}eC.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=bK(this._elemType);e=bo.getGUID("obj_pool_");this._objCollection[e]=i;return i};eC.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}};eC.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 hh={get:function(i,i9,e,T){var i8=new XMLHttpRequest();i8.open("GET",i,true);i8.timeout=10000;i8.ontimeout=function(){T&&T()};i8.onreadystatechange=function(ja){if(this.readyState===4){if(this.status===200){i9&&i9(i8.responseText)}else{e&&e()}}};i8.send()},post:function(i,ja,i9,e,T){var i8=new XMLHttpRequest();i8.open("POST",i,true);i8.setRequestHeader("Content-type","application/x-www-form-urlencoded");i8.timeout=10000;i8.ontimeout=function(){T&&T()};i8.onreadystatechange=function(jb){if(this.readyState===4){if(this.status===200){i9&&i9(i8.responseText,ja)}else{e&&e()}}};i8.send(ja);return i8}};var f5=(function(e){function i(ja,T,i9){var i8=bK("script",{src:ja,type:"text/javascript",charset:"utf-8"});if(i8.addEventListener){i8.addEventListener("load",function(jc){var jb=jc.target;jb.parentNode.removeChild(jb);T&&T()},false);i8.addEventListener("error",function(jc){if(jc){var jb=jc.target;jb&&jb.parentNode&&jb.parentNode.removeChild(jb)}i9&&i9(null)},false)}else{if(i8.attachEvent){i8.attachEvent("onreadystatechange",function(jc){var jb=window.event.srcElement;if(jb&&(jb.readyState==="loaded"||jb.readyState==="complete")){jb.parentNode.removeChild(jb)}T&&T()})}}e.getElementsByTagName("head")[0].appendChild(i8)}return{load:function(jb,T,i8){if(typeof jb==="string"){i(jb,T,i8)}else{if(jb.length>0){var ja=jb.length;for(var i9=0;i9-1){return{col:i8,row:je,zoom:jd,useZoom:T}}else{var jb=i3.mapZoomBaseIndex[jd];var ja=i3.baseScaleZoom[jb+1];if(!ja){return null}var jc=this.getFactorByZooms(ja,jd);var e=i3.baseZoomInfo[ja];return{col:Math.floor(i8/jc),row:Math.floor(je/jc),zoom:ja,useZoom:e[e.length-1]}}return null}if(jd-1-1){return[{col:i9,row:jb,zoom:e,useZoom:T}]}else{var jm=0;var jj=e;while(jmji){return null}var jh=Math.pow(2,jo);var i=i9*jh;var jg=jb*jh;var jd=e+jo;var jf=[];for(var jl=0;jl<2;jl++){var ja=i+jl;for(var jk=0;jk<2;jk++){var jc=jg+jk;jf.push({col:ja,row:jc,zoom:jd,useZoom:jd})}}return jf},getFactorByZooms:function(i,i8){var T=i3.mapZoomBaseIndex[i];var i9=i3.mapZoomBaseIndex[i8];var e=i3.baseScaleZoomMercatorSize[T];var ja=i3.baseScaleZoomMercatorSize[i9];return e/ja}};var cH={};var V=["swiftshader","microsoft basic render driver"];var gB=["intel","nvidia","amd","apple","geforce"];function fW(e){e=e.toLowerCase();if(V.indexOf(e)>=0){return true}if(e.indexOf("mobile")>=0){return true}return false}function ce(T){T=T.toLowerCase();for(var e=0;e=0){return true}}return false}function i2(e){if(!e){return false}if(fW(e)){return false}if(ce(e)){return true}return false}cH.ifEnableEarth=function(i){var e=cH.ifEnableEarth;if(!i&&typeof e._enable==="boolean"){return e._enable}if(cH.ifSupportWebGL()){e._enable=true;return true}e._enable=false;return false};cH.ifEnableWebGLMap=function(i){var e=cH.ifEnableWebGLMap;if(!i&&typeof e._enable==="boolean"){return e._enable}if(cH.ifSupportWebGL()){if(aA.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};cH.params={};cH.ifSupportWebGL=function(){var i=cH.ifSupportWebGL;if(typeof i._supportWebGL==="boolean"){return i._supportWebGL}if(!window.WebGLRenderingContext){i._supportWebGL=false;return false}var T=document.createElement("canvas");T.width=300;T.height=150;var i9=null;var jf={alpha:true,antialias:false,failIfMajorPerformanceCaveat:true,preserveDrawingBuffer:false,stencil:false};try{i9=T.getContext("webgl",jf)||T.getContext("experimental-webgl",jf)}catch(jb){i._supportWebGL=false}if(i9===null){i._supportWebGL=false}else{i._supportWebGL=true;var jd=i9.getExtension("WEBGL_debug_renderer_info");var jc="";if(jd){jc=i9.getParameter(jd.UNMASKED_RENDERER_WEBGL);if(i2(jc)===true){i._supportWebGL=true}var je=i9.getParameter(jd.UNMASKED_VENDOR_WEBGL);i._renderer=jc;i._vendor=je}if(!jd&&es.Browser.firefox){i._supportWebGL=true}if(!jd&&es.Platform.macintosh){i._supportWebGL=true}if(i9.drawingBufferWidth!==T.width||i9.drawingBufferHeight!==T.height){i._supportWebGL=false}if(i9.getParameter(i9.MAX_VERTEX_TEXTURE_IMAGE_UNITS)<4){i._supportWebGL=false}var i8=i9.getParameter(i9.MAX_TEXTURE_SIZE);cH.params.maxTextureSize=i8;if(i8<4096){i._supportWebGL=false}var ja=i9.getParameter(i9.MAX_TEXTURE_IMAGE_UNITS);if(ja<8){i._supportWebGL=false}if(!i9.getShaderPrecisionFormat||i9.getShaderPrecisionFormat(i9.FRAGMENT_SHADER,i9.HIGH_FLOAT).precision<23){i._supportWebGL=false}}return i._supportWebGL};cH.ifSupportCanvas2d=function(){var i9=cH.ifSupportCanvas2d;if(typeof i9.supportCanvas2d==="boolean"){return i9.supportCanvas2d}var T=document.createElement("canvas");var i=null;try{i=T.getContext("2d")}catch(i8){i9.supportCanvas2d=false}if(i===null){i9.supportCanvas2d=false}else{i9.supportCanvas2d=true}return i9.supportCanvas2d};cH.ifCanvas2dInBlackList=function(){return true};cH.ifEnableCanvas2dMap=function(){return false;var i=navigator.userAgent;var e=0;var i8=0;var i9=0;if(/macintosh/ig.test(i)){var T=0;if(/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(i)&&!/chrome/i.test(i)){T=parseInt((RegExp["\x241"]||RegExp["\x242"]),10)}if(T>0){return false}return true}if(/windows nt (\d+\.\d)/ig.test(i)){i8=parseFloat(RegExp.$1);if(i8>=6.1){if(/chrome\/(\d+\.\d)/i.test(i)){e=parseFloat(RegExp.$1);if(e>=31){return true}}if(/MSIE (\d+(\.\d+)?)/.test(i)){i9=parseFloat(RegExp.$1);if(i9>=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};cH.ifSupportCSS3=function(jc,i){var jb=document.createElement("div");var ja="Webkit Moz O ms".split(" ");var e=ja.length;var T="";var i8=jb.style;if(jc in i8){T=jc}jc=jc.replace(/^[a-z]/,function(jd){return jd.toUpperCase()});while(e--){var i9=ja[e]+jc;if(i9 in i8){T=i9;break}}if(i){return T}else{return T.length>0?true:false}};cH.isModernBrowser=cH.ifSupportCanvas2d()&&cH.ifSupportCSS3("transform");function at(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 T in e){this._options[T]=e[T]}this._getDataTimes=0;this._hitTimes=0}at.prototype.setData=function(i8,ja){var i=this._cache;var T=this._size;if(T===0){return}var e=this._curSize;if(e===T){this._removeOld()}var i9;if(!i[i8]){i9={key:i8,data:ja,older:null,newwer:null};i[i8]=i9;if(this._least===null){this._least=i9}if(this._most===null){this._most=i9}this._curSize++}else{i9=i[i8];i9.data=ja;if(this._most===i9){return}i9.older&&(i9.older.newer=i9.newer);i9.newer&&(i9.newer.older=i9.older);if(this._least===i9){this._least=i9.newer}}if(this._most&&this._most!==i9){this._most.newer=i9;i9.older=this._most;this._most=i9;i9.newer=null}};at.prototype.getData=function(e){var i=this._cache[e];this._getDataTimes++;if(i){this._hitTimes++;var T=i.data;if(this._most===i){return T}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 T}return null};at.prototype.getAllData=function(){return this._cache};at.prototype.getHitRate=function(){return this._hitTimes/this._getDataTimes};at.prototype.removeData=function(i){var e=this._cache;var T=e[i];if(!T){return}if(this._options.clearCallback){this._options.clearCallback(T.data,T.key)}T.older&&(T.older.newer=T.newer);T.newer&&(T.newer.older=T.older);if(this._least===T){this._least=T.newer}if(this._most===T){this._most=T.older}delete e[i];this._curSize--};at.prototype._removeOld=function(){var e=this._cache;var i8=Math.round(this._size*0.6);var T=0;while(this._least&&T=72.004&&T<=137.8347&&i>=0.8293&&i<=55.8271}function jO(jT,jS){var jW,i,jY,T=(jY=300+(jW=jT-105)+2*(i=jS-35)+0.1*jW*jW+0.1*jW*i+0.1*jD(jC(jW)),jY+=2*(20*jx(6*jW*jQ)+20*jx(2*jW*jQ))/3,(jY+=2*(20*jx(jW*jQ)+40*jx(jW/3*jQ))/3)+2*(150*jx(jW/12*jQ)+300*jx(jW/30*jQ))/3),jR=function(j1,j0){var jZ=2*j1-100+3*j0+0.2*j0*j0+0.1*j1*j0+0.2*jD(jC(j1));return jZ+=2*(20*jx(6*j1*jQ)+20*jx(2*j1*jQ))/3,jZ+=2*(20*jx(j0*jQ)+40*jx(j0/3*jQ))/3,jZ+2*(160*jx(j0/12*jQ)+320*jx(j0*jQ/30))/3}(jT-105,jS-35),jV=jS/180*jQ,jU=jx(jV),jX=jD(jU=1-jw*jU*jU);return[T=180*T/(jI/jX*jz(jV)*jQ),jR=180*jR/(jI*(1-jw)/(jU*jX)*jQ)]}function jF(jR){var i=jR[0],T=jR[1];if(!jL(i,T)){return[i,T]}var jS=jO(i,T);return[i+jS[0],T+jS[1]]}function jy(jT){var jX=jT[0],T=jT[1];if(!jL(jX,T)){return[jX,T]}for(var jR=[jX,T],jV=jR[0],jS=jR[1],jW=jF([jV,jS]),jU=jW[0]-jX,jY=jW[1]-T;jC(jU)>0.000001||jC(jY)>0.000001;){jU=(jW=jF([jV-=jU,jS-=jY]))[0]-jX,jY=jW[1]-T}return[jV,jS]}var jJ=Math.sin,jK=Math.cos,jg=Math.atan2,jN=Math.sqrt,jv=3000*Math.PI/180;function jB(jR){var i=jR[0]-0.0065,T=jR[1]-0.006,jT=jN(i*i+T*T)-0.00002*jJ(T*jv),jS=jg(T,i)-0.000003*jK(i*jv);return[jT*jK(jS),jT*jJ(jS)]}function jk(jR){var i=jR[0],T=jR[1],jT=jN(i*i+T*T)+0.00002*jJ(T*jv),jS=jg(T,i)+0.000003*jK(i*jv);return[jT*jK(jS)+0.0065,jT*jJ(jS)+0.006]}var js=180/Math.PI,jb=Math.PI/180,jd=6378137,jP=20037508.342789244;function jp(i){return[i[0]*js/jd,(0.5*Math.PI-2*Math.atan(Math.exp(-i[1]/jd)))*js]}function jE(jR){var i=Math.abs(jR[0])<=180?jR[0]:jR[0]-360*(jR[0]<0?-1:1),T=[jd*i*jb,jd*Math.log(Math.tan(0.25*Math.PI+0.5*jR[1]*jb))];return T[0]>jP&&(T[0]=jP),T[0]<-jP&&(T[0]=-jP),T[1]>jP&&(T[1]=jP),T[1]<-jP&&(T[1]=-jP),T}var jo,jn,jm,ju,jj,i8,jt=Math.abs,jG=[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],ji=[75,60,45,30,15,0],ja=[[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]],jH=[[-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 jh(jS,T,jR){var jU=jt(T)/jR[9],jT=jR[0]+jR[1]*jt(jS),i=jR[2]+jR[3]*jU+jR[4]*Math.pow(jU,2)+jR[5]*Math.pow(jU,3)+jR[6]*Math.pow(jU,4)+jR[7]*Math.pow(jU,5)+jR[8]*Math.pow(jU,6);return[jT*=jS<0?-1:1,i*=T<0?-1:1]}function jA(jR){for(var i=jR[0],T=jR[1],jT=[],jS=0;jSji[jS]){jT=jH[jS];break}}return jh(i,T,jT)}function jf(jR){for(var i=jR[0],T=jR[1],jT=[],jS=0;jS=jG[jS]){jT=ja[jS];break}}return jh(i,T,jT)}function je(T,i){if(!T){throw new Error(i)}}function jq(i){return !!i&&"[object Array]"===Object.prototype.toString.call(i)}function jl(i){return !isNaN(Number(i))&&null!==i&&!jq(i)}function jc(){for(var jR=[],i=0;i=2,"Invalid input coordinate: "+jV),je(jl(jV[0])&&jl(jV[1]),"Invalid input coordinate: "+jV),jV=jV.map(Number),jS=!0);var jR=jW;return jS?jR(jV):(i9(jV,(function(jY){var i;i=jR(jY),jY[0]=i[0],jY[1]=i[1]})),jV)}})}));var gM={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)"]},parseHexToRgbaArray:function(ja){var jb=ja.replace("#","");if(jb.length===3){jb+="f"}else{if(jb.length===6){jb+="ff"}}var e=[];var i9=jb.length;var i8=i9===8?2:1;for(var T=0;T=0&&i9<60){jb=jc;ja=T;e=0}else{if(i9>=60&&i9<120){jb=T;ja=jc;e=0}else{if(i9>=120&&i9<180){jb=0;ja=jc;e=T}else{if(i9>=180&&i9<240){jb=0;ja=T;e=jc}else{if(i9>=240&&i9<300){jb=T;ja=0;e=jc}else{if(i9>=300&&i9<360){jb=jc;ja=0;e=T}}}}}}jb=(jb+i)*255>255?255:(jb+i)*255;ja=(ja+i)*255>255?255:(ja+i)*255;e=(e+i)*255>255?255:(e+i)*255;return[Math.round(jb),Math.round(ja),Math.round(e)]},formatColorCssToRgbaArray:function(ja,T,i8){i8=(typeof i8!=="boolean")?true:i8;if(typeof ja!=="string"){return i8?[0,0,0,1]:[0,0,0,255]}var i=(ja||"Black").trim().toLowerCase();var e=[];var i9=gM.ColorRefTable[i];if(i9!==undefined){i=i9[0]}e=gM.parseCSSColor(i);if(T!==undefined&&!isNaN(Number(T))){T=Number(T);e[3]=gM.fitTo(T,0,1)}else{e[3]=Number((e[3]/255).toFixed(2))}if(!i8){e[3]=Math.floor(e[3]*255)}return e},fitTo:function(T,i,e){if(Te){T=e}}return T},generateColorRamp:function(e,je,jf,i8,jk){jf=jf||[];i8=i8||"#ccc";jk=jk||1;const T=document.createElement("canvas");const jl=T.getContext("2d");T.width=256;T.height=jk;const ja=je[0];const jh=je[je.length-1];if(e.length===je.length){const ji=jl.createLinearGradient(0,0,256,1);for(var jd=0;jd>16)+(js>>16)+(jr>>16);return(jq<<16)|(jr&65535)}function jj(jp,jq){return(jp<>>(32-jq))}function je(ju,jr,jq,jp,jt,js){return jk(jj(jk(jk(jr,ju),jk(jp,js)),jt),jq)}function e(jr,jq,jv,ju,jp,jt,js){return je((jq&jv)|(~jq&ju),jr,jq,jp,jt,js)}function jb(jr,jq,jv,ju,jp,jt,js){return je((jq&ju)|(jv&~ju),jr,jq,jp,jt,js)}function jh(jr,jq,jv,ju,jp,jt,js){return je(jq^jv^ju,jr,jq,jp,jt,js)}function jn(jr,jq,jv,ju,jp,jt,js){return je(jv^(jq|~ju),jr,jq,jp,jt,js)}function T(jz,ju){jz[ju>>5]|=128<<(ju%32);jz[((ju+64)>>>9<<4)+14]=ju;var jr;var jt;var js;var jq;var jp;var jy=1732584193;var jx=-271733879;var jw=-1732584194;var jv=271733878;for(jr=0;jr>5]>>>(jr%32))&255)}return jp}function jd(jq){var js;var jp=[];jp[(jq.length>>2)-1]=undefined;for(js=0;js>5]|=(jq.charCodeAt(js/8)&255)<<(js%32)}return jp}function jc(jp){return ji(T(jd(jp),jp.length*8))}function jo(jr,ju){var jq;var jt=jd(jr);var jp=[];var js=[];var jv;jp[15]=js[15]=undefined;if(jt.length>16){jt=T(jt,jr.length*8)}for(jq=0;jq<16;jq+=1){jp[jq]=jt[jq]^909522486;js[jq]=jt[jq]^1549556828}jv=T(jp.concat(jd(ju)),512+ju.length*8);return ji(T(js.concat(jv),512+128))}function jm(js){var jr="0123456789abcdef";var jq="";var jp;var jt;for(jt=0;jt>>4)&15)+jr.charAt(jp&15)}return jq}function jf(jp){return unescape(encodeURIComponent(jp))}function i8(jp){return jc(jf(jp))}function jg(jp){return jm(i8(jp))}function i(jp,jq){return jo(jf(jp),jf(jq))}function jl(jp,jq){return jm(i(jp,jq))}function i9(jq,jr,jp){if(!jr){if(!jp){return jg(jq)}return i8(jq)}if(!jp){return jl(jr,jq)}return i(jr,jq)}if(typeof define==="function"&&define.amd){define(function(){return i9})}else{if(typeof module==="object"&&module.exports){module.exports=i9}else{ja.md5=i9}}})(this);var co={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,T){this.hosts+=i?i:"";ak&&ak(this.config,e);this.sender=true;if(T){this.sender=false}this.hosts=this.urlScope(this.hosts);this.sendError=this.notifyError();var i8=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};this.config.jsError&&this.handleJavaScriptError(i8);this.config.resourceError&&this.handleResourceError(i8);this.config.ajaxError&&this.handleAjaxError(i8)},handleJavaScriptError:function(T){var e=this;var i=T.onerror;T.onerror=function(jc,jb,i8,ja,i9){if(e.isFetch(e.category.JS)&&e.hostExit(jb)){if(i9&&i9.stack){e.sendError({title:jc,msg:i9.stack,category:e.category.JS,level:e.levels.ERROR})}else{if(typeof jc==="string"){e.sendError({title:jc,msg:JSON.stringify({resourceUrl:jb,rowNum:i8,colNum:ja}),category:"js",level:e.levels.ERROR})}}}if(i&&bG(i)){i&&i.apply(T,arguments)}}},handleResourceError:function(i){var e=this;i.addEventListener("error",function(ja){if(ja){var jb=ja.target||ja.srcElement;var i9=jb instanceof HTMLScriptElement||jb instanceof HTMLLinkElement||jb instanceof HTMLImageElement;if(!i9){if(!i.onerror){var T=ja.filename||null;if(!e.isFetch(e.category.JS)||!e.hostExit(T)){return}if(ja.error&&ja.error.stack){e.sendError({title:ja.message,msg:ja.error.stack,category:e.category.JS,level:e.levels.ERROR})}else{if(typeof ja.message==="string"){e.sendError({title:ja.message,msg:JSON.stringify({resourceUrl:T,rowNum:ja.lineno,colNum:ja.cowno}),category:e.category.JS,level:e.levels.ERROR})}}}return}var i8=jb.src||jb.href;if(e.isFetch(e.category.RESOURCE)&&e.hostExit(i8)){e.sendError({title:jb.nodeName,msg:i8,category:e.category.RESOURCE,level:e.levels.ERROR})}}},true)},handleAjaxError:function(ja){var e=this;var i9=ja.location.protocol;if(i9==="file:"){return}if(!ja.XMLHttpRequest){return}var i=ja.XMLHttpRequest;var T=i.prototype.send;var i8=function(jc){if(jc&&jc.currentTarget&&jc.currentTarget.status!==200){var jb=jc.target.responseURL;if(e.isFetch(e.category.AJAX)&&e.hostExit(jb)){e.sendError({title:jb,msg:JSON.stringify({response:jc.target.response,responseURL:jb,status:jc.target.status,statusText:jc.target.statusText}),category:e.category.AJAX,level:e.levels.ERROR})}}};i.prototype.send=function(){if(this["addEventListener"]){this["addEventListener"]("error",i8);this["addEventListener"]("load",i8);this["addEventListener"]("abort",i8)}else{var jb=this["onreadystatechange"];this["onreadystatechange"]=function(jc){if(this.readyState===4){i8(jc)}jb&&jb.apply(this,arguments)}}return T.apply(this,arguments)}},notifyError:function(T){var i=T||1000;this._idleWorkerTicker=(function(i8){return function(){i8.runJob()}})(this);var e=this;return function(i9){if(i9.url){if(!e.isFetch(i9.category)){return}var i8=i9.url||"";if(!e.hostExit(i8)){return}delete i9.url}if(!navigator.onLine){return}e.collections.push(i9);e.checkJob(i)}},runJob:function(){if(this.collections.length===0){clearInterval(this.idleWork);this.idleWork=null;return}var i9=this.collections.slice(0,2);var T=ik(JSON.stringify({dataset:i9}));var i8=new Date().getTime();var i=dZ.apiIMG+"/blank.gif?product=jsapi&v=gl&l="+T+"&ak="+ei+"&t="+i8;if(this.sender){try{var jb=document.createElement("div");jb.style="width:0;height:0;visibility: hidden;opacity: 0;z-index:-999;background-image: url("+i+");";document.querySelector("BODY").appendChild(jb);setTimeout(function(){document.querySelector("BODY").removeChild(jb)})}catch(ja){}}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(i8){var T={};var ja=Object.keys(w);if(w&&ja.length>0){for(var i9 in w){if(w[i9]&&(typeof w[i9]!=="function")){T[i9]=w[i9]}}}try{var jc=JSON.stringify(T);if(jc.length>2){return i8+"|"+jc}else{return i8}}catch(jb){return i8}},hostExit:function(i){try{if(i&&i.indexOf("//")===0){i=window.location.protocol+i}var T=new URL(i);if(!T||!T.host){return false}var i9=T.host+T.pathname;if(this.ignoreUrl.indexOf(i9)===-1&&this.hosts.indexOf(T.host)>-1){return true}return false}catch(i8){return false}},isFetch:function(e){return this.config[e+"Error"]||false}};bo.fetchDebug=co;var iT={request:function(jh,jk,jd,je,ji){var jc=new Date()["getTime"]();var i9=(Math.random()*100000)["toFixed"](0);bo._rd["_cbk"+i9]=function(jp){if(jp.result&&jp.result["error"]&&jp.result["error"]===202){alert("该AK因为恶意行为已经被管理员封禁!");return}jd=jd||{};jh&&jh(jp,jd);delete bo._rd["_cbk"+i9]};je=je||"";var jj;var jf;if(jd&&jd.useEncodeURI){jj=il(jk,encodeURI);jf=il(jk)}else{jj=il(jk,encodeURIComponent);jf=il(jk)}var jo=this;var T=w.apiHost+"/"+je+"?"+jj+"&ie=utf-8&oue=1&fromproduct=jsapi";var e=w.apiHost+"/"+je+"?"+jf+"&ie=utf-8&oue=1&fromproduct=jsapi";if(!ji){T+="&res=api";e+="&res=api"}T+="&callback="+eV+"._rd._cbk"+i9;e+="&callback="+eV+"._rd._cbk"+i9;var i=window.___abvk?window.___abvk:this.getSeckeyCidItem("SECKEY_ABVK");var jb=this.getSeckeyCidItem("BMAP_SECKEY");var jl=encodeURIComponent(i+","+jb);var ja=i+","+jb;T+="&ak="+ei+"&v=gl&seckey="+jl+"&timeStamp="+jc;e+="&ak="+ei+"&v=gl&seckey="+ja+"&timeStamp="+jc;var jn="F5L2O6R6AD8990O";var jm="H0A9P8P7Y6ABQO0";var i8=e.substr(e.indexOf("?")+1);var jg=md5(md5(i8+jn)+jm);T+="&sign="+jg.substring(jg.length-12);f5.load(T)},getSeckeyCidItem:function(i){if(navigator.cookieEnabled){var T=new RegExp("(^| )"+i+"=([^;]*)(;|$)");var e=document.cookie.match(T);if(e){return unescape(e[2])}return -1}if(localStorage){return localStorage.getItem(i)?localStorage.getItem(i):-1}if(sessionStorage){return sessionStorage.getItem(i)?localStorage.getItem(i):-1}}};window.srqtimer=null;window.firstTime=true;window.srqcount=0;bo._rd={};var cS={request:function(jb,e){if(e){var ja=(Math.random()*100000).toFixed(0);BMapGL._rd["_cbk"+ja]=function(jd){e&&e(jd);delete BMapGL._rd["_cbk"+ja]};jb+="&callback=BMapGL._rd._cbk"+ja}function i9(je){var jd;var jf=new RegExp("(^| )"+je+"=([^;]*)(;|$)");if(jd=document.cookie.match(jf)){return unescape(jd[2])}else{return -1}}var T=window.___abvk?window.___abvk:this.getSeckeyCidItem("SECKEY_ABVK");var jc=this.getSeckeyCidItem("BMAP_SECKEY");var i=encodeURIComponent(T+","+jc);jb+="&seckey="+i;var i8=bK("script",{src:jb,type:"text/javascript",charset:"utf-8"});if(i8.addEventListener){i8.addEventListener("load",function(je){var jd=je.target;jd.parentNode.removeChild(jd)},false);i8.addEventListener("error",function(jd){e&&e([,,,,,])},false)}else{if(i8.attachEvent){i8.attachEvent("onreadystatechange",function(je){var jd=window.event.srcElement;if(jd&&(jd.readyState=="loaded"||jd.readyState=="complete")){jd.parentNode.removeChild(jd)}})}}document.getElementsByTagName("head")[0].appendChild(i8);i8=null},getSeckeyCidItem:function(i){if(navigator.cookieEnabled){var T=new RegExp("(^| )"+i+"=([^;]*)(;|$)");var e=document.cookie.match(T);if(e){return unescape(e[2])}return -1}if(localStorage){return localStorage.getItem(i)?localStorage.getItem(i):-1}if(sessionStorage){return sessionStorage.getItem(i)?localStorage.getItem(i):-1}}};function f0(){this._map=null;this._container;this._type="control";this.blockInfoWindow=true;this._visible=true}f0.inherits(cJ,"Control");es.extend(f0.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&&bG(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){es.ac(i,"BMap_noprint")}es.on(i,"contextmenu",gC)}},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=bA(this._opts.container,'
')}else{var i='
';if(e&&e.config.autoSafeArea&&b9()){this._safeAreaContainer=bA(this._map.container,i);this._safeAreaContainer.style.position="absolute";this._safeAreaContainer.style.bottom="env(safe-area-inset-bottom)";this._container=bA(this._safeAreaContainer,i)}else{this._container=bA(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(i8){if(this.anchorFixed||typeof i8!=="number"||isNaN(i8)||i8BMAP_ANCHOR_BOTTOM_RIGHT){i8=this.defaultAnchor}this._opts.offset=this._opts.offset||this.defaultOffset;var T=this._opts.anchor;this._opts.anchor=i8;if(!this._container){return}var ja=this._container;var e=this._opts.offset.width;var i9=this._opts.offset.height;ja.style.left=ja.style.top=ja.style.right=ja.style.bottom="auto";switch(i8){case BMAP_ANCHOR_TOP_LEFT:ja.style.top=i9+"px";ja.style.left=e+"px";break;case BMAP_ANCHOR_TOP_RIGHT:ja.style.top=i9+"px";ja.style.right=e+"px";break;case BMAP_ANCHOR_BOTTOM_LEFT:ja.style.bottom=i9+"px";ja.style.left=e+"px";break;case BMAP_ANCHOR_BOTTOM_RIGHT:ja.style.bottom=i9+"px";ja.style.right=e+"px";break;default:break}var i=["TL","TR","BL","BR"];es.rc(this._container,"anchor"+i[T]);es.ac(this._container,"anchor"+i[i8])},getAnchor:function(){return this._opts.anchor},setOffset:function(e){if(!e){return}this._opts=this._opts||{};this._opts.offset=new h3(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 e7("onshow"))},hide:function(){if(this._visible===false){return}this._visible=false;if(this._container){this._container.style.display="none"}this.dispatchEvent(new e7("onhide"))},isPrintable:function(){return !!this._opts.printable},isVisible:function(){if(!this._container&&!this._map){return false}return !!this._visible},_asyncLoadCode:function(){var e=this;gi.load("control",function(){if(e._asyncDraw){e._asyncDraw()}})}});var dL={TOP_LEFT:0,TOP_RIGHT:1,BOTTOM_LEFT:2,BOTTOM_RIGHT:3};bo.ControlAnchor=dL;window.BMAP_ANCHOR_TOP_LEFT=0;window.BMAP_ANCHOR_TOP_RIGHT=1;window.BMAP_ANCHOR_BOTTOM_LEFT=2;window.BMAP_ANCHOR_BOTTOM_RIGHT=3;function ft(e){f0.call(this);e=e||{};this._opts={printable:false};es.extend(this._opts,e);this._copyrightCollection=[];this.defaultAnchor=BMAP_ANCHOR_BOTTOM_LEFT;this.defaultOffset=new h3(5,2);this.setAnchor(e.anchor);this._canShow=true;this.sateMapStyle=false;this.blockInfoWindow=false;this._asyncLoadCode()}ft.inherits(f0,"CopyrightControl");es.extend(ft.prototype,{initialize:function(e){this._map=e;return this._container},addCopyright:function(i8){var e={minZoom:0,bounds:null,content:"",mapType:""};for(var T in i8){e[T]=i8[T]}if(this._map){var jb=e.minZoom;if(jb===-1||jbthis._map.getMaxZoom()){e.minZoom=this._map.getMinZoom()}if(e.mapType!==""&&!dO[e.mapType]){e.mapType=BMAPGL_NORMAL_MAP}}var i9=this.getCopyright(i8.id);if(i9){for(var ja in e){i9[ja]=e[ja]}}else{this._copyrightCollection.push(e)}},getCopyright:function(i8){for(var T=0,e=this._copyrightCollection.length;T=BMAP_NAVIGATION_CONTROL_LARGE&&e<=BMAP_NAVIGATION_CONTROL_ANIM){this._opts.type=e}else{this._opts.type=BMAP_NAVIGATION_CONTROL_LARGE}},getType:function(){return this._opts.type}});function u(i){f0.call(this);i=i||{};this._opts={printable:false};this.defaultAnchor=BMAP_ANCHOR_TOP_RIGHT;this.defaultOffset=new h3(10,10);this.setAnchor(i.anchor);this._opts=es.extend(es.extend(this._opts,{offset:this.defaultOffset,enableSwitch:true}),i);var e=this;gi.load("control",function(){e._asyncDraw()})}u.inherits(f0,"MapTypeControl");es.extend(u.prototype,{initialize:function(e){this._map=e;return this._container},showStreetLayer:function(e){this._map.showStreetLayer(e)}});function id(e){f0.call(this);e=e||{};this._opts={};this._opts=es.extend(this._opts,e);this._zoomInDisabled=false;this._zoomOutDisabled=false;this._zoomInTapped=false;this._zoomOutTapped=false;this.defaultAnchor=dL.BOTTOM_RIGHT;this.defaultOffset=new h3(15,20);this.setAnchor(e.anchor);this._asyncLoadCode()}id.inherits(f0,"ZoomControl");es.extend(id.prototype,{initialize:function(e){this._map=e;return this._container}});function fJ(e){f0.call(this);e=e||{};this._opts={autoZoom:true,autoViewport:true};this._opts=es.extend(this._opts,e);this.defaultAnchor=dL.BOTTOM_LEFT;this.defaultOffset=new h3(10,50);this.watchPosition=this._opts.watchPosition||false;this.useCompass=this._opts.useCompass||false;this.locMarker=null;this.locLevel=16;this.setAnchor(this._opts.anchor);this.onLocationStart=e.onLocationStart||null;this._asyncLoadCode()}fJ.inherits(f0,"LocationControl");es.extend(fJ.prototype,{initialize:function(e){this._map=e;return this._container},startLocation:function(){this._startLocationCalled=true},stopLocationTrace:function(){},setOptions:function(e){e=e||{};es.extend(this._opts,e)}});function br(e){f0.call(this);e=e||{};this._opts={};this._opts=es.extend(this._opts,e);this.defaultAnchor=dL.BOTTOM_LEFT;this.defaultOffset=new h3(5,15);if(bJ()){this.defaultOffset=new h3(10,10)}this.setAnchor(e.anchor)}br.inherits(f0,"LogoControl");es.extend(br.prototype,{initialize:function(i){this._map=i;var e=this._container=document.createElement("div");e.innerHTML='';i.getContainer().appendChild(e);return e}});function an(e,i){this._map=e;this._indoorInfo=i;this._visible=true;this._adjustVisible=true;this._isMobile=bJ();this._sizeConfig={FLOOR_BTN_HEIGHT:this._isMobile?35:26,SWITCH_ARROW_HEIGHT:this._isMobile?20:15};this._init()}an.prototype._init=function(){this._render();this._bindDom();this._bind();this._adjustDisplayHeight();var e=new e7("onindoor_bar_show");e.uid=this._indoorInfo.uid;this._map.dispatchEvent(e)};an.prototype._render=function(){if(!this._indoorInfo){return}var jc=this._isMobile;var e=this._div=bK("div");es.ac(e,"floor-select-container");jc&&es.ac(e,"mobile");jc&&es.ac(e,"all-border-radius");var i=this._btnTop=bK("button");es.ac(i,"floor-switch-top");es.ac(i,"top-border-radius");var ja=bK("div");es.ac(ja,"floor-switch-top-icon");i.appendChild(ja);var i9=this._btnBottom=bK("button");var T=bK("div");es.ac(T,"floor-switch-bottom-icon");i9.appendChild(T);es.ac(i9,"floor-switch-bottom");es.ac(i9,"bottom-border-radius");var i8=this._floorsContainer=bK("div");es.ac(i8,"floors-container");i8.appendChild(this._createFloorsDom());this._div.appendChild(i);this._div.appendChild(i8);this._div.appendChild(i9);var jd=0;if(this._btnTop.style.display===""){jd=2*this._sizeConfig.SWITCH_ARROW_HEIGHT}this._div.style.height=parseInt(this._floorsContainer.style.height,10)+jd+"px";this._map.getContainer().appendChild(this._div);if(!jc){var jb=this;setTimeout(function(){jb._div.style.right="20px"},20)}};an.prototype._createFloorsDom=function(){if(!this._indoorInfo){return}var T=this._ol=bK("ol");var ja=this._indoorInfo.currentFloor;for(var i9=this._indoorInfo.floors.length-1;i9>=0;i9--){var jb=this._indoorInfo.floors[i9].floorName;var e=bK("li");var i8=bK("button");es.ac(i8,"btn-select-floor");if(i9===ja){es.ac(i8,"selected")}i8.setAttribute("data-floor",i9);i8.innerHTML=jb;e.appendChild(i8);T.appendChild(e)}return T};an.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()};an.prototype._bindDom=function(){var e=this;es.on(this._floorsContainer,"click",function(i8){var T=i8.target||i8.srcElement;if(T.tagName.toLowerCase()==="button"){e._map.showIndoor(e._indoorInfo.uid,parseInt(T.getAttribute("data-floor"),10));var i=new e7("onindoor_bar_click");i.uid=e._indoorInfo.uid;e._map.dispatchEvent(i)}});es.on(this._floorsContainer,"mouseover",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){es.ac(i,"hover")}});es.on(this._floorsContainer,"mouseout",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){es.rc(i,"hover")}});es.on(this._floorsContainer,"touchstart",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){es.ac(i,"onmousedown")}});es.on(this._floorsContainer,"touchend",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){es.rc(i,"onmousedown")}});es.on(this._btnTop,"mouseover",function(i){if(this._disable){return}es.ac(this,"hover")});es.on(this._btnTop,"mouseout",function(i){es.rc(this,"hover")});es.on(this._btnBottom,"mouseover",function(i){if(this._disable){return}es.ac(this,"hover")});es.on(this._btnBottom,"mouseout",function(i){es.rc(this,"hover")});es.on(this._btnTop,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}es.ac(this,"onmousedown")});es.on(this._btnTop,"touchend",function(i){es.rc(this,"onmousedown")});es.on(this._btnBottom,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}es.ac(this,"onmousedown")});es.on(this._btnBottom,"touchend",function(i){es.rc(this,"onmousedown")});es.on(this._btnTop,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)+26)});es.on(this._btnBottom,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)-26)});es.on(this._div,"mousemove",ad);es.on(this._div,"wheel",gC);es.on(this._div,"mousewheel",gC);this._map.addEventListener("resize",function(){e._adjustDisplayHeight()})};an.prototype._adjustDisplayHeight=function(){if(!this._indoorInfo){return}var ja=this._map.getSize().height;var jb=this._sizeConfig.FLOOR_BTN_HEIGHT;var jc=ja-291-100;if(this._isMobile){jc=ja-12-108-this._map.config.bottomOffset}var e=this._indoorInfo.floors.length;var T=e*jb;var i8=e;var je=0;var jf=this._floorsContainer.children[0];if(T>jc){this._showArrow=true;es.rc(jf.children[0].children[0],"top-border-radius");es.rc(jf.children[e-1].children[0],"bottom-border-radius")}else{this._showArrow=false;es.ac(jf.children[0].children[0],"top-border-radius");es.ac(jf.children[e-1].children[0],"bottom-border-radius")}while(T>jc){if(i8===0){break}i8--;je=2*this._sizeConfig.SWITCH_ARROW_HEIGHT;T=i8*jb+je}this._currentDisplayHeight=T;if(i8<3){this._setAdjustVisbile(false)}else{this._setAdjustVisbile(true)}this._floorsContainer.style.height=i8*jb+"px";var i9=this._indoorInfo.currentFloor;var i=e-i9;var jd=i9-1;this._div.style.height=parseInt(this._floorsContainer.style.height,10)+je+"px";var jg=-(e-(i9+Math.round(i8/2)))*jb;this._setBarSliderTop(jg);if(i8=i*T){i8=e-i*T;es.ac(this._btnBottom,"disable");es.rc(this._btnBottom,"hover");this._btnBottom._disable=true}else{es.rc(this._btnBottom,"disable");this._btnBottom._disable=false}if(i8>=0){i8=0;es.ac(this._btnTop,"disable");es.rc(this._btnTop,"hover");this._btnTop._disable=true}else{es.rc(this._btnTop,"disable");this._btnTop._disable=false}this._ol.style.top=i8+"px"};an.prototype._setAdjustVisbile=function(e){if(this._adjustVisible===e){return}this._adjustVisible=e;if(e&&this._visible){this._div.style.right="20px"}else{this._div.style.right="-30px"}};an.prototype._bind=function(){var i=this._map;var e=this;i.on("indoor_status_changed",function(jc){if(e._visible===false){return}var T=e._ol;var ja=jc.uid;if(!ja){return}var jb=jc.floor;for(var i9=0;i9=gV.HIGH_RES_MIN_RATIO?2:1;this._imgPath=w.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()}es.extend(hL.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 i=this._div=bK("div");var e=i.style;e.position="absolute";e.zIndex=5;e.top="0";e.left="0";e.width="52px";e.height="54px";e.background="url("+this._imgPath+") no-repeat";e.backgroundSize="266px auto";this._rotateCCW=this._createButton();this._rotateCCW.title="逆时针转动";e=this._rotateCCW.style;e.left="2px";e.top="5px";e.zIndex="1";e.width="15px";e.height="42px";e.backgroundPosition="-75px -5px";this._rotateCW=this._createButton();this._rotateCW.title="顺时针转动";e=this._rotateCW.style;e.right="2px";e.top="5px";e.zIndex="1";e.width="15px";e.height="42px";e.backgroundPosition="-75px -5px";e.WebkitTransform=e.transform="scaleX(-1)";this._compass=this._createButton();this._compass.title="恢复正北方向";e=this._compass.style;e.left="19px";e.top="4px";e.width="14px";e.height="44px";e.backgroundPosition="-56px -4px";e.WebkitTransform=e.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=bK("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(){hF(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 e7("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 e7("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 T=false;if(e._target.getTilt()!==0){T=true;e._target.setTilt(0,e._setHeadingOptions)}if(e._target.getHeading()%360!==0){T=true;e._target.resetHeading(e._setHeadingOptions)}if(!T){e._target.setLock(false)}i.fire(new e7("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(T){e._updateUI()});i.addEventListener("animation_start",function(T){e._isOperating=true});i.addEventListener("animation_end",function(T){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 cv(T,i){this._map=T;this._target=T;var i8=T.temp.originMapType||T.mapType;if(i8==="B_EARTH_MAP"&&T._earth){this._target=T._earth}this._outContainer=i||T.getContainer();this._imgRatio=fz()>=gV.HIGH_RES_MIN_RATIO?2:1;this._imgPath=w.imgPath+"gl-navi-control-pc4"+(this._imgRatio===2?"-2x.png":".png");this._enabled=true;var e=this;this._setTiltOptions={callback:function(){e._target.setLock(false)}};this._init()}es.extend(cv.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 e=this._div=bK("button");e.title="倾斜";var i=e.style;i.position="absolute";i.zIndex=5;i.outline="none";i.border="none";i.cursor="pointer";i.width="26px";i.height="26px";i.top="56px";i.right="13px";i.background="url("+this._imgPath+") no-repeat #fff";i.backgroundSize="266px auto";i.backgroundPosition="-110px 1px";i.boxShadow="1px 2px 1px rgba(0, 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(i8){if(!e._enabled){return}if(e._target.getLock()){return}var i=e._target.getTilt();var T;if(i===e._map.getCurrentMaxTilt()){T="out"}else{if(i===0){T="in"}else{T=e._preTrend?e._preTrend:"in"}}e._curTrend=T;e._clickTimer=setTimeout(function(){e._map.fire(new e7("ontiltmsdown"));e._tiltAni=new e0({duration:9999999,render:function(i9){i=e._target.getTilt();if(T==="in"&&i0){e._target.setTilt(i-1,{noAnimation:true})}}},finish:function(){e._tiltAni=null}});e._clickTimer=null},200);i8.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(i8){if(!e._enabled){return}if(!e._clickTimer){return}if(e._target.getLock()){return}clearTimeout(e._clickTimer);e._map.fire(new e7("ontiltclick"));var i=e._target.getTilt();e._target.setLock(true);i8.stopPropagation();var T=e._map.getCurrentMaxTilt();if(e._curTrend==="in"){e._target.setTilt(T,e._setTiltOptions)}else{if(e._curTrend==="out"){e._target.setTilt(0,e._setTiltOptions)}else{if(i0){i=78}if(this._mouseOver){e=52}if(this._enabled===false){i8=26;e=0;i=0}var i9="-"+(110+i+i8+e)+"px 1px";this._div&&(this._div.style.backgroundPosition=i9);if(this._enabled){if(T>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 gz(i){cJ.call(this);this._opts={container:null,cursor:"default"};this._opts=es.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;gi.load("menu",function(){e._draw()})}gz.inherits(cJ,"ContextMenu");es.extend(gz.prototype,{initialize:function(e){this._map=e},remove:function(){this._map=null},addItem:function(i9,e){if(!i9||i9._type!="menuitem"||i9._text==""||i9._width<=0){return}for(var i8=0,T=this._items.length;i8this._items.length-1){e=-1}i9._insertIndex=e;if(e===-1){this._items.push(i9);this._rItems.push(i9)}else{this._items.splice(e,0,i9);this._rItems.splice(e,0,i9)}},removeItem:function(i8){if(!i8||i8._type!="menuitem"){return}for(var T=0,e=this._items.length;Tthis._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(T){if(!this._dividers[T]){return}for(var i8=0,e=this._items.length;i8T){this._items[i8]._dIndex--}}this._dividers.splice(T,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 g8(T,i8,i){if(!T||!i8||typeof i8!="function"){return}cJ.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=T+"";this._callback=i8;this._map=null;this._type="menuitem";this._contextmenu=null;this._container=null;this._enabled=true;var e=this;gi.load("menu",function(){e._draw()})}g8.inherits(cJ,"MenuItem");es.extend(g8.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}});function ha(e,i){this.setSouthWest(e);this.setNorthEast(i)}es.extend(ha.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.lngthis.sw.lat&&e.ne.latMath.max(this.sw.lng,this.ne.lng)||Math.max(T.sw.lat,T.ne.lat)Math.max(this.sw.lat,this.ne.lat)){return null}var i9=Math.max(this.sw.lng,T.sw.lng);var i=Math.min(this.ne.lng,T.ne.lng);var i8=Math.max(this.sw.lat,T.sw.lat);var e=Math.min(this.ne.lat,T.ne.lat);return new ha(new cd(i9,i8),new cd(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 T=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.lngT){this.sw.lat=T}if(this.ne.lat=0&&e<90||e>=270&&e<360){if(this.normalizedTopRight.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 cd(0,0)}var T;var i9;T=new cd(Math.abs(e.lng),Math.abs(e.lat));for(var i8=0;i8=this.MCBAND[i8]){i9=this.MC2LL[i8];break}}var ja=this.convertor(e,i9);return new b8(ja.lat,ja.lng)},convertLL2MC:function(jb){if(!jb){return new cd(0,0)}var jd=jb.lat;var i8=jb.lng;i8=this.getLoop(jb.lng,-180,180);jd=bV(jd,-85,85);var ja;for(var i9=0;i9=this.LLBAND[i9]){ja=this.LL2MC[i9];break}}if(!ja){for(i9=0;i9e){T-=e-i}while(Ti-1){e=e-i}while(e<0){e=e+i}return e},getLoopBox:function(e,i8){var i=this.HALF_SIZE*2;if(e[0]>0&&i8[2]<0){i8[2]=i8[2]+i}else{if(e[0]<0&&i8[0]>0){i8[0]=i8[0]-i}}return i8},createOrUpdateTileCoord:function(T,e,i8,i){if(i!==undefined){i[0]=T;i[1]=e;i[2]=i8;return i}else{return[T,e,i8]}},createOrUpdateTileRange:function(e,i8,i9,T,i){if(i!==undefined){i.minX=e;i.maxX=i8;i.minY=i9;i.maxY=T;return i}else{return{minX:e,maxX:i8,minY:i9,maxY:T}}},fromEPSG4326:function(T,jd,jb){var i9=T.length;var ja=jb>1?jb:2;var e=jd;if(e===undefined){if(ja>2){e=T.slice()}else{e=new Array(i9)}}for(var i8=0;i8this.MAX_SAFE_Y){jc=this.MAX_SAFE_Y}else{if(jc<-this.MAX_SAFE_Y){jc=-this.MAX_SAFE_Y}}e[i8+1]=jc}return e},toEPSG4326:function(T,jc,jb){var i9=T.length;var ja=jb>1?jb:2;var e=jc;if(e===undefined){if(ja>2){e=T.slice()}else{e=new Array(i9)}}for(var i8=0;i890){i=90}}while(e<-180){e+=360}while(e>180){e-=360}e=e||0;i=i||0;cd.call(this,e,i)}b8.inherits(cd,"LatLng");es.extend(b8.prototype,{equals:function(e){return(this.lat===e.lat&&this.lng===e.lng)},clone:function(){return new b8(this.lat,this.lng)},add:function(e){return new b8(this.lng+e.lng,this.lat+e.lat)},sub:function(e){return new b8(this.lat-e.lat,this.lng-e.lng)},mult:function(e){return new b8(this.lng*e,this.lat*e)},div:function(e){return new b8(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 T=Math.abs(e-i);if(T>180){T=360-T}return T},toString:function(){return"LatLng"}});function ck(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 b8(e.lat,e.lng);this._ne=new b8(i.lat,i.lng);this._swLng=e.lng;this._swLat=e.lat;this._neLng=i.lng;this._neLat=i.lat}}es.extend(ck.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._neLngthis._swLat&&e._neLatMath.max(this._swLng,this._neLng)||Math.max(T._swLat,T._neLat)Math.max(this._swLat,this._neLat)){return false}var i9=Math.max(this._swLng,T._swLng);var i=Math.min(this._neLng,T._neLng);var i8=Math.max(this._swLat,T._swLat);var e=Math.min(this._neLat,T._neLat);this._sw=new b8(i8,i9);this._ne=new b8(e,i);this._swLng=i9;this._swLat=i8;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 T=e.lat;if(!this._sw){this._sw=new b8(0,0)}if(!this._ne){this._ne=new b8(0,0)}if(!this._swLng||this._swLng>i){this._sw.lng=this._swLng=i}if(!this._neLng||this._neLngT){this._sw.lat=this._swLat=T}if(!this._neLat||this._neLate.lat){this._swLat=e.lat}if(this._swLng>e.lng){this._swLng=e.lng}if(this._neLat10){T&&T({status:25});return}var e=w.apiHost+"/geoconv/v1/?coords=";es.each(i,function(ja){e+=ja.lng+","+ja.lat+";"});e=e.replace(/;$/gi,"");e=e+"&from="+i9+"&to="+i8+"&v=gl&type=webgl&ak="+ei;cS.request(e,function(jb){if(jb.status===0){var ja=[];es.each(jb.result,function(jc){ja.push(new cd(jc.x,jc.y))});delete jb.result;jb.points=ja}T&&T(jb)})}});var dI={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 ae={_map:null,_html:"
",_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=bA(this._map.container,this._html);es.on(e,"mouseup",function(T){if(T.button==2){gC(T)}});es.on(e,"contextmenu",gC);e.style.display="none"},getDrawPoint:function(i8,jb,i9){i8=window.event||i8;var i=i8.offsetX||i8.layerX||0;var ja=parseInt(i8.offsetY)||parseInt(i8.layerY)||0;var T=i8.target||i8.srcElement;if(T!=ae.getDom(this._map)&&jb==true){while(T&&T!=this._map.container){if(!(T.clientWidth==0&&T.clientHeight==0&&T.offsetParent&&T.offsetParent.nodeName.toLowerCase()=="td")){i+=T.offsetLeft;ja+=T.offsetTop}T=T.offsetParent}}if(T!=ae.getDom(this._map)&&T!=this._map.container){return}if(typeof i==="undefined"||typeof ja==="undefined"){return}if(isNaN(i)||isNaN(ja)){return}if(i9){i=i+i9.x;ja=ja+i9.y}return this._map.pixelToPointIn(new eL(i,ja))},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 aH(){this._type="overlay"}aH.inherits(es.BaseClass,"Overlay");aH.getZIndex=function(i,e){i=i*1;if(!i){return 0}if(e){i=ia.convertMC2LL(new cd(0,i)).lat}return(i*-100000)<<1};es.extend(aH.prototype,{_i:function(e){this._map=e;if(!this.domElement&&bG(this.initialize)){this.domElement=this.initialize(e);if(this.domElement){this.domElement.style.WebkitUserSelect="none"}}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 e7("onremove"))},hide:function(){this._visible=false;es.hide(this.domElement)},show:function(){this._visible=true;es.show(this.domElement)},getMap:function(){return this._map},dispose:function(){es.BaseClass.prototype.decontrol.call(this)}});function d6(){es.BaseClass.call(this);aH.call(this);this._visible=true;this._visibleInternal=true;this.infoWindow=null;this._dblclickTime=0}d6.inherits(aH,"OverlayInternal");es.extend(d6.prototype,{initialize:function(e){this.map=e;es.BaseClass.call(this,this.hashCode);return null},draw:function(){},remove:function(){this.decontrol();aH.prototype.remove.call(this)},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(T,i8){if(!T){return this.point}else{var e=i8?i8.width:0;var i9=i8?i8.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+i9}else{i.x=i.x+e;i.y=i.y+i9}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}});function aF(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()}aF.prototype._init=function(){if(this.map._renderType!=="webgl"){this._createOverlayContainers()}else{this._createWebGLOverlayContainers()}this._bind()};aF.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)}};aF.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)};aF.prototype._createOverlayDiv=function(e,i8){var T=bK("div");var i=T.style;i.position="absolute";i.top=i.left=i.width=i.height="0";i.zIndex=i8;e.appendChild(T);return T};aF.prototype._bind=function(){var i9=this.map;var i8=this;function i(jb){i8.draw(jb)}if(i9._renderType!=="webgl"){i9.addEventListener("load",i);i9.addEventListener("moveend",i);i9.addEventListener("resize",i);i9.addEventListener("zoomend",i);i9.addEventListener("zooming_inner",i)}else{i9.on("update",i)}i9.addEventListener("zoomend",function(jb){if(this.mapType==="B_EARTH_MAP"){if(this._earth.getZoom()0;jb--){if(i8._customOverlays[jb].enableMassClear!==false){this.removeOverlay(i8._customOverlays[jb]);i8._customOverlays.splice(jb,1)}}});i9.addEventListener("infowindowopen",function(jc){var jb=this.infoWindow;if(jb){es.hide(jb.popDom);es.hide(jb.shadowDom)}});function T(){if(this.getMapType()==="B_EARTH_MAP"||this._renderType==="webgl"){if(i8._zoomingOrMoving===false){this._panes.markerMouseTarget.style.display="none";i8._zoomingOrMoving=true}}}function e(jd){if(this.getMapType()==="B_EARTH_MAP"||this._renderType==="webgl"){if(i8._zoomingOrMoving===true){this._panes.markerMouseTarget.style.display="";i8._zoomingOrMoving=false;for(var jc=0;jc1){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 ha();this.points=[];this.greatCirclePoints=[];this._parseCache=[];this._holesCache=[];this._parseCacheGL=[];this._parseCacheGLRaw=[];this._areaCacheGL=[];this._strokeStyleInfoForGL=[[]];this._fillStyleInfoForGL="";this.vertexMarkers=[];this._temp={}}hG.JOININDEX={miter:0,round:1,bevel:2};hG.CAPINDEX={round:0,butt:1,square:2};hG.inherits(d6,"Graph");hG.getGraphPoints=function(i){var e=[];if(!i||i.length===0){return e}if(typeof i==="string"){var T=i.split(";");es.each(T,function(i9){var i8=i9.split(",");e.push(new cd(i8[0],i8[1]))})}if(i.constructor===Array&&i.length>0){e=i}return e};hG.parseTolerance={0:[0.09,0.005,0.0001,0.00001],1:[9000,500,20,1]};es.extend(hG.prototype,{initialize:function(e){this.map=e;return null},draw:function(){},setPoints:function(e){this._clearCache();this.points=hG.getGraphPoints(e).slice(0);this._calcBounds()},setPathIn:function(e){this.setPoints(e)},_calcBounds:function(){if(!this.points){return}var e=this;e._bounds=new ha();if(!this.hasMultipleParts){es.each(this.points,function(i){e._bounds.extend(i)})}else{es.each(this.points,function(i){es.each(i,function(T){e._bounds.extend(T)})})}},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 cd(e.lng,e.lat);this._calcBounds()},setPositionAt:function(i,e){if(!e||!this.points[i]){return}var T=ia.convertLL2MC(e);this.setPointAt(i,T)},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 ha(ia.convertMC2LL(e.getSouthWest()),ia.convertMC2LL(e.getNorthEast()));i.setMinMax();return i},remove:function(){if(this.map){this.map.removeEventListener("onmousemove",this._graphMouseEvent);this.map.removeEventListener("onclick",this._graphClickEvent)}d6.prototype.remove.call(this);this._clearCache();var e=new e7("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;gi.load("poly",function(){e.addVertexs()},true)},disableEditing:function(){this._config.enableEditing=false;var e=this;gi.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 T=0;if(this.points.length<=1){this._length=0;return T}for(var e=0;e0){ja=this.greatCirclePoints}var i9=e.config.coordType===2?1:e.config.coordType;var jb=this.getParseTolerance(e.getZoom(),i9);if(!this.hasMultipleParts){var je=dp(ja,jb)}else{var je=[];for(var T=0;T1&&this.srcSetObject["2x"]){return this.srcSetObject["2x"]}return this.imageUrl};ir.prototype.setPrintImageUrl=function(e){if(!e){return}this.printImageUrl=e};ir.prototype.setSize=function(e){if(!e){return}this.size=new h3(e.width,e.height);this._renderData=null};ir.prototype.setOffset=function(e){if(!e){return}this.anchor=this.offset=new h3(e.width,e.height);this._renderData=null};ir.prototype.setAnchor=function(e){this.setOffset(e)};ir.prototype.setImageOffset=function(e){if(!e){return}this.imageOffset=new h3(e.width,e.height);this._renderData=null};ir.prototype.setInfoWindowOffset=function(e){if(!e){return}this.infoWindowOffset=new h3(e.width,e.height)};ir.prototype.setImageSize=function(e){if(!e){return}this.imageSize=new h3(e.width,e.height)};ir.prototype.setImageSrcset=function(T){var e="";if(!T){return}for(var i in T){if(T.hasOwnProperty(i)){this.srcSetObject[i]=T[i];e=T[i]+" "+i+","}}this.srcSet=e};ir.prototype.toString=function(){return"Icon"};ir.prototype.generateRenderData=function(ja){var T=this.offset;var e=this.size;var jc=this.imageOffset;var jb=[];jb.push(-T.width,T.height-e.height,0);jb.push(e.width-T.width,T.height-e.height,0);jb.push(e.width-T.width,T.height,0);jb.push(-T.width,T.height-e.height,0);jb.push(e.width-T.width,T.height,0);jb.push(-T.width,T.height,0);if(ja!==0){for(var i9=0;i9730){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=w.imgPath;this.overlay=null;var e=this;gi.load("infowindow",function(){e._draw()})}dz.inherits(es.BaseClass,"InfoWindow");es.extend(dz.prototype,{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(){es.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},getPointIn:function(){if(this.overlay&&this.overlay.getPoint){return this.overlay.getPoint()}},getTitle:function(){return this._config.title||""},getPosition:function(){return this.latLng},getPoint:function(){var e=this.getPointIn();if(this.map.config.coordType===BMAP_COORD_GCJ02){var i=ia.convertMC2LL(e);return ec(i)}return ia.convertMC2LL(e)},getOffset:function(){return this._config.offset},dispose:function(){es.BaseClass.prototype.decontrol.call(this)},toString:function(){return"InfoWindow"}});gV.prototype.openInfoWindow=function(T,e){T.latLng=new b8(e.lat,e.lng);var i=ia.convertLL2MC(e);this.openInfoWindowIn(T,i)};gV.prototype.closeInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeInfoWindow()}};gV.prototype.openInfoWindowIn=function(i8,e){if(!i8||i8.toString()!=="InfoWindow"||!e||e.toString()!=="Point"){return}var i=this.temp;if(!i.marker){var T=new ir(w.imgPath+"blank.gif",{width:1,height:1});i.marker=new iO(e,{icon:T,width:1,height:1,offset:new h3(0,0),infoWindowOffset:new h3(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openInfoWindow(i8)};d6.prototype.openInfoWindow=function(e){if(this.map){this.map.closeInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;es.BaseClass.call(e,e.hashCode)}};d6.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 a4(T,i){d6.call(this);this.content=T;this.map=null;this.domElement=null;this._config={width:0,offset:new h3(0,0),styles:{backgroundColor:"#fff",border:"1px solid #f00",padding:"1px",whiteSpace:"nowrap",fontSize:"12px",zIndex:"80",MozUserSelect:"none"},point:null,enableMassClear:true};i=i||{};this.setConfig(i);if(this._config.width<0){this._config.width=0}this.point=this._config.point;var e=this;gi.load("marker",function(){e._draw()})}a4.inherits(d6,"Label");es.extend(a4.prototype,{setPoint:function(e){if(e&&e.toString()==="Point"&&!this.getMarker()){if(this.coordType===BMAP_COORD_GCJ02){var i=hA(e,3);this.point=this._config.point=new cd(i.lng,i.lat)}else{this.point=this._config.point=new cd(e.lng,e.lat)}}},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 h3(e.width,e.height)},getOffset:function(){return this._config.offset},setStyle:function(e){e=e||{};this._config.styles=es.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},getPositionIn:function(){return this.getPoint()},});function g3(T,i){var i8={};for(var e in i){if(i.hasOwnProperty(e)){if(e==="position"){i8.point=ia.convertLL2MC(i[e]);this.latLng=new b8(i[e]["lat"],i[e]["lng"])}else{i8[e]=i[e]}}}a4.call(this,T,i8)}g3.inherits(a4,"LabelOut");es.extend(g3.prototype,{toString:function(){return"Label"},setPosition:function(e){this.latLng=new b8(e.lat,e.lng);var i=ia.convertLL2MC(e);this.setPoint(i)},getPosition:function(){return this.latLng}});window.BMAP_ANIMATION_DROP=1;window.BMAP_ANIMATION_BOUNCE=2;function iO(e,i){d6.call(this);i=i||{};this.point=e;this._rotation=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 h3(0,0),opacity:1,icon:null,title:"",infoWindow:null,label:null,baseZIndex:0,clickable:true,zIndexFixed:false,isTop:false,enableMassClear:true,enableDragging:false,raiseOnDrag:false,restrictDraggingArea:false,startAnimation:"",enableCollisionDetection:false,rank:0,enableDraggingMap:false};this.setConfig(i);if(!i.icon){this._config.icon=new ir(w.imgPath+"marker_red.png",new h3(23,25),{offset:new h3(10,25),infoWindowOffset:new h3(10,0)})}this._isDragging=false;var T=this;gi.load("marker",function(){T._draw()})}iO.TOP_ZINDEX=aH.getZIndex(-90)+1000000;iO.DRAG_ZINDEX=iO.TOP_ZINDEX+1000000;iO._injectMethond=function(e){es.extend(iO.prototype,e)};iO.inherits(d6,"Marker");es.extend(iO.prototype,{toString:function(){return"Marker"},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 a4)){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){if(this.map.config.coordType===BMAP_COORD_GCJ02){var i=hA(e,3);this.point=this._config.point=new cd(i.lng,i.lat);this.latLng=ia.convertMC2LL(i)}else{this.point=this._config.point=new cd(e.lng,e.lat);this.latLng=ia.convertMC2LL(e)}}},setPositionIn:function(e){this.setPoint(e)},getPositionIn:function(){return this.getPoint()},setTop:function(i,e){this._config.isTop=!!i;if(i){this._addi=e||0}},setTitle:function(e){this._config.title=e||""},getTitle:function(){return this._config.title},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},getRotation:function(){return this._rotation}});function r(e,T){this.latLng=new b8(e.lat,e.lng);var i=ia.convertLL2MC(e);iO.call(this,i,T)}r.inherits(iO,"MarkerOut");es.extend(r.prototype,{toString:function(){return"Marker"},setPosition:function(e){this.latLng=new b8(e.lat,e.lng);var i=ia.convertLL2MC(e);this.setPositionIn(i)},getPosition:function(){return this.latLng},});window.BMAP_SHAPE_CIRCLE=1;window.BMAP_SHAPE_RECT=2;function dK(i,e,T){d6.call(this,e,T);this.domElement=null;this.point=i;T=T||{};this._config={};this._config.height=e||0;this._config.size=typeof T.size==="number"?T.size:50;this._config.fillOpacity=typeof T.fillOpacity==="number"?T.fillOpacity:0.8;this._config.shape=typeof T.shape==="number"?T.shape:1;bV(this._config.fillOpacity,0,1);if(T.fillColor===""){this._config.fillColor=""}else{this._config.fillColor=T.fillColor?T.fillColor:"#f00"}this._config.icon=T.icon instanceof ir?T.icon:"";this._config.enableMassClear=T.enableMassClear||true;var i8=this;gi.load("marker",function(){i8._draw()})}dK.inherits(d6,"Marker3D");es.extend(dK.prototype,{setPoint:function(e){if(this.map.config.coordType===BMAP_COORD_GCJ02){var T=hA(e,3);this.point=this._config.point=new cd(T.lng,T.lat);this.latLng=ia.convertMC2LL(T)}else{this.point=this._config.point=new cd(e.lng,e.lat);this.latLng=ia.convertMC2LL(e)}var i=new e7("onstatus_change");i.overlay=this;i.action="setPoint";this.fire(i)},setPositionIn:function(e){this.setPoint(e)},getPositionIn:function(){return this.getPoint()},setDomAttribute:function(i,T){var e=new e7("onlineupdate");e.overlay=this;this.dispatchEvent(e)}});function dH(i,e,i8){this.latLng=new b8(i.lat,i.lng);var T=ia.convertLL2MC(i);dK.call(this,T,e,i8)}dH.inherits(dK,"Marker3d");es.extend(dH.prototype,{toString:function(){return"Marker3D"},setHeight:function(e){this._config.height=Number(e);this.draw();var i=new e7("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 i8=i.getCurrentImageUrl()!==e;this._config.icon=i;this.textureCoord=this.textureCoordGLMap=null;this.draw();var T=new e7("onstatus_change");T.overlay=this;T.action="setIcon";T.imageUrlChanged=i8;this.fire(T)}},getIcon:function(){return this._config.icon},setPosition:function(e){this.latLng=new b8(e.lat,e.lng);var i=ia.convertLL2MC(e);this.setPositionIn(i)},getPosition:function(){var e=this.getPositionIn();return ia.convertMC2LL(e)}});function fh(T,e){hG.call(this,e);this._normalizedBounds=new ha();this.setPoints(T);var i=this;gi.load("poly",function(){i._draw()})}fh.inherits(hG,"Polyline");es.extend(fh.prototype,{getBoundsIn:function(e){if(!e){this._bounds.setMinMax();return this._bounds}this._normalizedBounds.setMinMax();return this._normalizedBounds},setPoints:function(T){this._clearCache();this.points=hG.getGraphPoints(T).slice(0);if(this._config.geodesic===true){this.greatCirclePoints.length=0;for(var e=0;e0){es.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{es.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<-gV.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>gV.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-gV.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=gV.WORLD_SIZE_MC_HALF}},calcGreatCirclePoints:function(i8,T){var ja=i8.latLng;var i9=T.latLng;if(ja.equals(i9)){return}var e=ia.getDistance(hH(ja.lng),hH(ja.lat),hH(i9.lng),hH(i9.lat));if(e<250000){return}var je=Math.round(e/150000);var ji=this.calcAngularDistance(ja,i9);this.greatCirclePoints.push(i8);var jh=ja.lng;var jg=i8;for(var jb=0;jb30037726){if(jf.lng30037726){if(T.lng0){es.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{es.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<-gV.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>gV.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-gV.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=gV.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(i8,ja){var T=[];for(var e=0;e0){es.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{es.each(e.points,function(i){es.each(i,function(T){e._bounds.extend(T)})})}e._normalizedBounds.setSouthWest(e._bounds.getSouthWest());e._normalizedBounds.setNorthEast(e._bounds.getNorthEast());if(e._normalizedBounds.sw.lng<-gV.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>gV.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-gV.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=gV.WORLD_SIZE_MC_HALF}}});function gw(T,e){hG.call(this,e);e=e||{};if(typeof e.fillOpacity==="number"){this._config.fillOpacity=e.fillOpacity}else{this._config.fillOpacity=0.6}bV(this._config.fillOpacity,0,1);if(e.fillColor===""){this._config.fillColor=""}else{this._config.fillColor=e.fillColor?e.fillColor:"#fff"}this._parseFillCacheWebGL=[];this.setPoints(T,e);var i=this;gi.load("poly",function(){i._draw()})}gw.inherits(hG,"Polygon");es.extend(gw.prototype,{setPoints:function(ja){var i8=[];if(typeof ja==="string"||ja.length===1||ja[0] instanceof cd||ja[0] instanceof b8||this instanceof gd||ja.length===0){if(ja.length===1){ja=ja[0]}var e=this._processSinglePointArray(ja);this._userPoints=e.userPoints;i8=e.innerPoints;this.hasMultipleParts=false}else{this._userPoints=[];for(var i9=0;i91&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new cd(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 cd(e.lng,e.lat);this.points[i]=new cd(e.lng,e.lat);if(i===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new cd(e.lng,e.lat)}this._calcBounds()},setPositionAt:function(i,e){if(!this._userPoints[i]){return}var T=ia.convertLL2MC(e);this.setPointAt(i,T)},getPoints:function(){var e=this._userPoints;if(e.length===0){e=this.points}return e},getPathIn:function(){return this.getPoints()}});function hM(jd,ja){if(!jd||jd.length===0){return}var jc=[];if(typeof jd==="string"||jd[0] instanceof cd||jd[0] instanceof b8){var e=this._processSinglePointArray(jd);for(var jb=0;jb1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new cd(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 cd(e.lng,e.lat);this.points[i]=new cd(e.lng,e.lat);if(i===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new cd(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 e7("onlineupdate");i.overlay=this;this.dispatchEvent(i)},getAltitude:function(){return this._config.altitude}});function bi(jc,ja,jd){if(!jc||jc.length===0){return}this.userPath=jc;var e=[];if(typeof jc==="string"||jc[0] instanceof cd||jc[0] instanceof b8){var je=this._processSinglePointArray(jc);for(var i9=0;i9this.imageObject.width||T<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(T){var e=document.createElement("canvas");e.width=T.width;e.height=T.height;var i=e.getContext("2d");i.drawImage(T,0,0,T.width,T.height);this.imageObject={width:T.width,height:T.height,data:i.getImageData(0,0,T.width,T.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(T){var e=document.createElement("canvas");e.width=T.width;e.height=T.height;var i=e.getContext("2d");i.drawImage(T,0,0,T.width,T.height);this.imageMaskObject={width:T.width,height:T.height,data:i.getImageData(0,0,T.width,T.height)};i=null;e=null},getImageMaskPixel:function(e){if(!this.imageMaskObject){return true}var i8=this._toOverlayPixelsGL([e]);var jd=this.maskOverlayPixels;var ja=jd[1][0]-jd[0][0];var i9=jd[1][1]-jd[0][1];var T=Math.floor((i8[0][0]-jd[0][0])/ja*this.imageMaskObject.width);var i=Math.floor((-i8[0][1]+jd[1][1])/i9*this.imageMaskObject.height);var jc=Math.floor((i*this.imageMaskObject.width+T)*4);if(T>this.imageMaskObject.width||T<0){return null}if(i>this.imageMaskObject.height||i<0){return null}var jb=this.imageMaskObject.data.data;if(jc+3>jb.length){return false}if(jb[jc+3]>0){if(this._config.maskData>-1&&this._config.maskData!==jb[jc]){return false}return true}return false},doOnceDraw:function(){var e=new e7("onlineupdate");e.overlay=this;this.dispatchEvent(e)}});function fm(i9,T){if(!i9){return}T=T||{};var jb=[new cd(i9.sw.lng,i9.ne.lat),new cd(i9.ne.lng,i9.ne.lat),new cd(i9.ne.lng,i9.sw.lat),new cd(i9.sw.lng,i9.sw.lat)];var e=hG.getGraphPoints(jb).slice(0);var ja=[];for(var i8=0;i8730){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=w.imgPath;this.overlay=null;var e=this;gi.load("simpleInfowindow",function(){e._draw()})}hd.inherits(es.BaseClass,"SimpleInfoWindow");es.extend(hd.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(){es.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(){es.BaseClass.prototype.decontrol.call(this)},toString:function(){return"SimpleInfoWindow"}});gV.prototype.openSimpleInfoWindow=function(i8,e){if(!i8||i8.toString()!="SimpleInfoWindow"||!e||e.toString()!="Point"){return}var i=this.temp;if(!i.marker){var T=new ir(w.imgPath+"blank.gif",{width:1,height:1});i.marker=new iO(e,{icon:T,width:1,height:1,offset:new h3(0,0),infoWindowOffset:new h3(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openSimpleInfoWindow(i8)};gV.prototype.closeSimpleInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeSimpleInfoWindow()}};d6.prototype.openSimpleInfoWindow=function(e){if(this.map){this.map.closeSimpleInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;es.BaseClass.call(e,e.hashCode)}};d6.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 b2(T,e){hG.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=T;this._parseFillCacheWebGL=[];this.setPoints(T,e);var i=this;gi.load("poly",function(){i._draw()})}b2.inherits(hG,"MapMask");es.extend(b2.prototype,{setPoints:function(i){var e=hG.getGraphPoints(i).slice(0);this.hasMultipleParts=false;hG.prototype.setPoints.call(this,e)},setPathIn:function(e){this.setPoints(e)},_processSinglePointArray:function(e){var i=hG.getGraphPoints(e).slice(0);innerPoints=i.slice(0);if(innerPoints.length>1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new cd(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 iW(ja,T){if(!ja||ja.length===0){return}var i9=[];if(ja[0] instanceof cd){var e=this._processSinglePointArray(ja);for(var i8=0;i8=dO[this.mapTypeName].webgl.minZoom){if(dO[this.mapTypeName].webgl){if(jc>=dO[this.mapTypeName].webgl.minZoom){this.minZoom=jc}else{this.minZoom=dO[this.mapTypeName].webgl.minZoom}}else{if(jc>=dO[this.mapTypeName].minZoom){this.minZoom=jc}else{this.minZoom=dO[this.mapTypeName].minZoom}}}if(typeof T==="number"){if(dO[this.mapTypeName].webgl){if(T<=dO[this.mapTypeName].webgl.maxZoom){this.maxZoom=T}else{this.maxZoom=dO[this.mapTypeName].webgl.maxZoom}}else{if(T<=dO[this.mapTypeName].maxZoom){this.maxZoom=T}else{this.maxZoom=dO[this.mapTypeName].maxZoom}}}if(this.maxZoomthis.maxZoom){return false}var ja=this.containsPoint(e,i9);if(ja){return ja}for(var T=0;Tthis.maxZoom){return i9}for(var T=0;T0){jf[jb.name]=jb;jf.push(jb.name)}var jj=jf.length-jh.bufferNumber;for(var jk=0;jj>0&&jk0&&this._transparentPng){this.img.src=w.imgPath+"blank.gif"}else{this.img.src=this.src}};gU.prototype._callCbks=function(){var T=this;for(var e=0;e8);function ij(e){this.tileLayers=[];this.map=e;this.bufferNumber=300;this.mapTiles=[];this.bufferTiles=[];this.config=dO[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={}}bo.register(function(i){if(i._renderType==="webgl"){return}var e=i.tileMgr=new ij(i);i.addEventListener("mousewheel",function(T){e.mouseWheel(T)});i.addEventListener("dblclick",function(T){e.dblClick(T)});i.addEventListener("rightdblclick",function(T){e.dblClick(T)});i.addEventListener("minuspress",function(T){e.keypress(T)});i.addEventListener("pluspress",function(T){e.keypress(T)});i.addEventListener("load",function(T){if(this.mapType===BMAP_EARTH_MAP){return}e.loadTiles()});i.addEventListener("zoomstartcode",function(T){if(this.mapType===BMAP_EARTH_MAP){return}e._zoom(T)});i.addEventListener("moving",function(T){if(this.mapType===BMAP_EARTH_MAP){return}e.moveGridTiles()});i.addEventListener("resize",function(T){if(this.mapType===BMAP_EARTH_MAP){return}e.resizeMap(T)});i.addEventListener("addtilelayer",function(T){e.addTileLayer(T)});i.addEventListener("removetilelayer",function(T){e.removeTileLayer(T)})});es.extend(ij.prototype,{addTileLayer:function(i8){var T=this;var i=i8.target;T.tileLayers.push(i);if(T.map.loaded){T.moveGridTiles()}},removeTileLayer:function(jf){var jg=this;var jd=jf.target;var jb=jd.mapType;var ja=jg.mapTiles;var ji=jg.bufferTiles;for(var T in ji){var i8=T.split("-")[1];if(i8==jb){delete ji[T]}}for(var T in ja){var i8=T.split("-")[1];if(i8==jb){delete ja[T]}}if(jg.zoomsDiv&&jg.zoomsDiv.parentNode){jg.zoomsDiv.parentNode.removeChild(jg.zoomsDiv);jg.zoomsDiv.innerHTML=""}var i9=jg.map;if(i9.deepZoom){var jh=i9.deepZoom.preDeepZoomDiv;if(jh&&jh.parentNode){jh.parentNode.removeChild(jh)}}for(var je=0,jc=jg.tileLayers.length;je=1.5?2:1;this.normalUdt=iN("ditu","normal").udt;this.numLoading=0;this.useThumbData=false;this.useThumbData=this.opts.useThumbData||false;if(this.baseLayer){this.useThumbData=true}if(typeof this.opts.customLayer==="boolean"){this.customLayer=this.opts.customLayer}else{this.customLayer=true}}gI.inherits(cJ,"TileLayer");es.extend(gI.prototype,{isTransparentPng:function(){return this.transparentPng},getTilesUrl:function(jf,e){var T=dO[this.mapType];if(typeof T!=="object"){return null}var i8=jf.x;var jg=jf.y;if(this.mapType!==BMAP_SATELLITE_MAP){var jg=ev.calcLoopParam(jg,e).col}var i="";if(this.opts.tileUrlTemplate){i=this.opts.tileUrlTemplate;i=i.replace(/\{X\}/,jg);i=i.replace(/\{Y\}/,i8);i=i.replace(/\{Z\}/,e)}else{if(this.mapType===BMAPGL_NORMAL_MAP){var je=this.isCanvasMap?0:1;var ja=T.tileUrls[Math.abs(jg+i8)%T.tileUrls.length];if(window.offLineIPAddress){ja=window.offLineIPAddress+"tile5/"}var i9=this.map.config.style;i=ja+"?qt=vtile&x="+i8+"&y="+jg+"&z="+e+(i9==="default"?"":("&styleId=1"))+"&styles=pl&udt="+this.normalUdt+"&scaler="+this.scaler+"&showtext="+je;i=i.replace(/-(\d+)/gi,"M$1")}if(this.mapType===BMAP_SATELLITE_MAP){var jb=iN("ditu","satellite");var jd=jb.ver;var jc=jb.udt;i=T.tileUrls[Math.abs(jg+i8)%T.tileUrls.length]+"u=x="+i8+";y="+jg+";z="+e+";v="+jd+";type=sate&fm=46&udt="+jc;i=i.replace(/-(\d+)/gi,"M$1")}}return i},initialize:function(ja){this.map=ja;if(ja._renderType==="webgl"){var i9=null;if(this.customLayer!==false){i9=this.getTilesUrl}es.extend(this,eH);this.labelProcessor=new ic(this);this.callbackDataQueue=[];if(i9){this.getTilesUrl=i9}var i=this;ja.on("indoor_data_refresh",function(jb){if(!i.baseLayer){return}i._refreshIndoorData(jb.uid,jb.floor)});ja.on("custom_labels_ready",function(jb){if(!i.baseLayer){return}i._doWorkAfterLabelImageLoad(jb.virtualTile,jb.labelCanvas,null,jb.imgKey)});ja.on("glmoduleloaded",function(){if(!i.baseLayer){return}i.updateAllIconsTextureCoords()});ja.on("layer_update",function(jc){if(jc.name===i.tileType.getName()&&ja.customLoaded){i.tileCache.clear();ja._featureMgr.clearData(i.drawIndex);ja._featureMgr.setLabelData([]);ja._featureMgr.clearLabelOverlayData();i.labelProcessor.iconCache={};var jb=new e7("onlayer_clear");ja.fire(jb)}});if(this.ontology&&this.ontology._initEvent){this.ontology._initEvent(ja)}}if(!ja.temp.layerZIndex){ja.temp.layerZIndex=0}this.zIndex=this.zIndex||0;if(this.baseLayer){this.zIndex=0}this.adjustZIndex();if(!ja.temp.layid){ja.temp.layid=0}if(!this.opts.mapType){this.mapType="BMAP_CUSTOM_LAYER_"+ja.temp.layid;ja.temp.layid++}else{this.mapType=this.opts.mapType}var T=dO[this.mapType];if(!T){dO[this.mapType]={tileUrls:[],tileSize:256,baseUnits:256,zoomLevelMin:1,zoomLevelMax:19,minZoom:3,maxZoom:19,minDataZoom:3,maxDataZoom:19,zoomLevelBase:18,errorUrl:w.imgPath+"/blank.gif",bounds:new ha(new cd(-21364736,-10616832),new cd(23855104,15859712)),imgExtend:"png"}}if(ja._renderType!=="webgl"){var i8=bA(ja.platform,'
');i8.style.display="";i8.style.left=Math.ceil(-ja.offsetX+ja.width/2)+"px";i8.style.top=Math.ceil(-ja.offsetY+ja.height/2)+"px";this.tilesDiv=i8}this.isCanvasMap=ja.isCanvasMap();this.lastZoom=ja.getZoom();var e=this;this.addEventListener("initDrawData",function(jb){if(e.opts.boundary){e.addBoundary(e.opts.boundary)}})},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}}},setZIndex:function(e){this.setTargetZIndex(e)},setTargetZIndex:function(e){this.zIndex=e;this.drawIndex=e;if(this.tilesDiv){this.tilesDiv.style.zIndex=e}},calcLoopParam:function(e,i){return ev.calcLoopParam(e,i)},addBoundary:function(ja){if(!ja||!this.map){return}if(typeof ja==="string"){ja=[ja]}for(var i8=0;i8-1;i9--){var ja={};T=i8.children[i9].style;ja.top=parseInt(T.top,10);ja.left=parseInt(T.left,10);this._zoomAniInfo[i9]=ja}},prepareLabelLayer:function(){var i9=this._map;if(this._enableCanvas2dMap&&i9.canvas2dMapMgr){if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.parentNode.removeChild(this.touchZoomLabelCanvas)}var i=i9.canvas2dMapMgr._labelCanvas;this.touchZoomLabelCanvas=i.cloneNode(false);var e=this.touchZoomLabelCanvas.getContext("2d");e.drawImage(i,0,0);i9.platform.insertBefore(this.touchZoomLabelCanvas,i9.platform.firstChild);var i8=parseInt(i.style.left,10);var T=parseInt(i.style.top,10);this.touchZoomLabelCanvas.style.zIndex=9;this.touchZoomLabelCanvas.style[this._transformOriginStyleName]=(this._fixPosition.x-(i9.offsetX+i8))+"px "+(this._fixPosition.y-(i9.offsetY+T))+"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 i8=this._map;if(i8.getRenderType()==="dom"){if(i8.overlayDiv){i8.overlayDiv.style.visibility="hidden"}if(i8.overlayDivEx){i8.overlayDivEx.style.visibility="hidden"}}var ja=i8.tileMgr.tileLayers;var i9;for(var T=0,e=ja.length;T-1;jh--){var jf=this._zoomAniInfo[jh];jg=i8.children[jh].style;var i9=jf.left-jc.x;var T=jf.top-jc.y;jf.dx=i9*e-i9;jf.dy=T*e-T;jf.preDx=i9-i9;jf.preDy=T-T;jo=jf.preDx+(jf.dx-jf.preDx);jd=jf.preDy+(jf.dy-jf.preDy)+je;jg.left=jf.left+jo+"px";jg.top=jf.top+jd+"px";jg.width=jg.height=256*e+"px"}if(this._enableCanvas2dMap){var jn=!jm._isIE9?"translate3d(0px, "+je+"px, 0) scale("+e+")":"translate(0px, "+je+"px) scale("+e+")";this.touchZoomLabelCanvas.style[jj]=jn}},setZoomFinish:function(){this._animationDiv=null},startAnimation:function(jb){this.prepareLayer();this.hideNonAnimationLayers();var ju=this._map;if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.style.display="none"}jb=jb||{};var js=jb.zoomCount||0;var jg=jb.fixPosition;var jq=jb.fixMCPosition;var je=jb.pixOffset;this._zoomCount=js;var i8=ju.getZoom();var jt=i8+js;var e=ju.config.enableContinuousZoom;var jk=0.5;var jf=5;var T=Math.pow(2,js);var jw=this._baseLayerDiv;var jh={x:jg.x-parseInt(jw.style.left,10)-ju.offsetX,y:jg.y-parseInt(jw.style.top,10)-ju.offsetY};var jc=this._animationDiv;var jo=jc.children.length;var jy=this._preZoomTimes;var jr=[];var jp=this._transformStyleName;var jd=this._transformOriginStyleName;for(var jn=jo-1;jn>-1;jn--){var jl={};var jm=jc.children[jn].style;jl.top=parseInt(jm.top,10);jl.left=parseInt(jm.left,10);var ja=jl.left-jh.x;var i9=jl.top-jh.y;jl.dx=ja*T-ja;jl.dy=i9*T-i9;jl.preDx=ja*jy-ja;jl.preDy=i9*jy-i9;jr[jn]=jl}var jv=this;var jj;var jx;var ji;this._zoomAni=new e0({fps:60,duration:e?500:1,transition:function(i){i=i*jf/(2*jk);return jf*i-jk*i*i},render:function(jH){jH=jH*(4*jk)/(jf*jf);jj=jy+jH*(T-jy);var jA=i8+m(jj);var jF=null;var jE=0;var jI=0;if(jb.onAnimationBeforeLooping){var jJ=jb.onAnimationBeforeLooping(jH,jA);jF=jJ.loopingCenter;jE=jJ.yDiff;jI=jJ.totalYDiff}for(var jB=jr.length-1;jB>-1;jB--){var jC=jr[jB];if(jc.children[jB]){var jG=jc.children[jB].style;jx=jC.preDx+(jC.dx-jC.preDx)*jH-je.width*jH;ji=jC.preDy+(jC.dy-jC.preDy)*jH-je.height*jH+jE;jG.left=jC.left+jx+"px";jG.top=jC.top+ji+"px";jG.height=jG.width=256*jj+"px"}}var jz=je.width*jH;var jD=je.height*jH;if(ju.isRestrict){jv._enableCanvas2dMap&&jv._canvas2dMapMgr.clearLabel()}else{jv._enableCanvas2dMap&&jv._canvas2dMapMgr.drawLabel(jj,jg,i8,jt,js,jH,jz,jD,jI,jE)}jv._preZoomTimes=jj;jv._preRenderTick=jH;jb.onAnimationLooping&&jb.onAnimationLooping(jH,jA,jF)},finish:function(){jv._preZoomTimes=1;jv._zoomAni=null;jv._animationDiv=null;jb.onAnimationFinish&&jb.onAnimationFinish();jv.showNonAnimationLayers()}});return this._zoomAni},stopAnimation:function(){if(this._zoomAni){this._zoomAni.stop();this._zoomAni=null}}});function i5(e){this._initVars(e);this._initColorCanvas();this._bindEvent(e)}es.extend(i5.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,T=bK("canvas"),e=T.style;e.width=i+"px";e.height=i+"px";T.width=i;T.height=i;this._colorCvsSize=i;this._colorCvs=T;this._colorCtx=T.getContext("2d")},getLabelImageData:function(jl){var jk=jl.textImg;var T=jl.textPos;var ji=this.ratio;var jg=this.sizeRatio/ji;var i9=this._colorCtx;var jd=this._colorCvsSize;i9.clearRect(0,0,jd,jd);var jf=0;var e=0;var jc=0;for(var je=0;jejf){jf=T[je].width;e=je;jc=T[je].drawX}}jf/=jg;var jh=0;for(var je=0,jb=T.length;jejf){jf=jj.width/jg}jh+=jj.height/jg+2*ji}var i8=i9.getImageData(0,0,jf,jh);var ja=i9.getImageData(0,0,jf,jh);return[i8,ja]},_bindEvent:function(i){var e=this,T=i._map;T.addEventListener("onspotmouseover",function(jb){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(jb.spots.length>0){var ja=jb.spots[0].userdata.uid;var i9=jb.spots[0].userdata.name;var i8=e.findLabelByUid(ja,i9);i8&&e._toHighLightColor(i8)}});T.addEventListener("onspotmouseout",function(jb){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(jb.spots.length>0){var ja=jb.spots[0].userdata.uid;var i9=jb.spots[0].userdata.name;var i8=e.findLabelByUid(ja,i9);i8&&e._toDefaultColor(i8)}});T.addEventListener("onspotclick",function(jb){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(jb.spots&&jb.spots.length>0){var ja=jb.spots[0].userdata.uid;var i9=jb.spots[0].userdata.name;var i8=e.findLabelByUid(ja,i9);i8&&e._changeBaseMapState(i8)}else{e._recoverNormalState()}});T.on("spot_status_reset",function(){e._recoverNormalState()});T.on("spot_highlight",function(i9){var i8=e.findLabelByUid(i9.uid);i8&&e._changeBaseMapState(i8)})},_getTextBound:function(jj){if(!jj.textPos){return null}var jh=this.ratio;var jf=this.sizeRatio/jh;var T=jj.textPos;var ji=jj.baseDrawX;var jg=jj.baseDrawY;var jd=ji*jh+(T[0].drawX-ji)/jf;var jb=jg*jh+(T[0].drawY-jg)/jf;var i9=jd+T[0].width/jf;var e=jb+T[0].height/jf;for(var je=0,jc=T.length;jei9){i9=ja+jk.width}if(i8+jk.height>e){e=i8+jk.height}}return[jd,jb,i9,e]},_toHighLightColor:function(T){if(T._tempRank&&T._tempRank==this.RANK5){return}var jc=this._getTextBound(T);if(!jc){return}var i8=Math.round(jc[0]);var i=Math.round(jc[1]);var e=this.getLabelImageData(T);var ja=e[0];var i9=e[1];var jb=this._canvas2dMapMgr.getFilterImageData(ja,this.RANK5);T._oldImgData=i9;this._labelCtx.putImageData(jb,i8,i)},_toDefaultColor:function(e){if(e._tempRank&&e._tempRank==this.RANK5){return}if(e._oldImgData){var i=this.sizeRatio;var T=this._getTextBound(e);if(!T){return}this._labelCtx.putImageData(e._oldImgData,Math.round(T[0]),Math.round(T[1]));e._oldImgData=null}},_changeBaseMapState:function(i8){var T=this._canvas2dMapMgr;var i=i8.guid;var e=i8.guidExt;var i9={guid:i,name:i8.name,guidExt:e};T._labelStrategy.setStrategyInfo(i9);T._loadData()},_recoverNormalState:function(){var e=this._canvas2dMapMgr;e._labelStrategy.setStrategyInfo(null);e._loadData()},findLabelByUid:function(ja,i8){var jc=this._canvas2dMapMgr,e=jc._computedLabel;for(var i9=0,T=e.length;i9kc){kc=kf.drawX+kf.width}if(kf.drawY+kf.height>kb){kb=kf.drawY+kf.height}}}}}else{jg.tileX=i8;jg.tileY=T;jn=i8+jg.minXOriginal;jl=T+jg.minYOriginal;kc=i8+jg.maxXOriginal;kb=T+jg.maxYOriginal}if(jn!=undefined){var j4=j1+(jn-j1)/jU;var j3=j0+(jl-j0)/jU;var jG=j1+(kc-j1)/jU;var jE=j0+(kb-j0)/jU;jg.minX=j4;jg.minY=j3;jg.maxX=jG;jg.maxY=jE;var j8=(j4+jG)/2,j7=(j3+jE)/2,jP=jm+(j8-j5/2)*jq,jN=jk+(jO/2-j7)*jq;jg.geoX=jP;jg.geoY=jN;jI.push(jg)}}}if(kj){for(var jF=0,jB=kj.length;jFkc){kc=jv+j6.width}if(jj+j6.height>kb){kb=jj+j6.height}if(jp.length===2){var ju=jp[1];var js=j1+ju.destX;var ji=j0+ju.destY;if(jikc){kc=js+ju.width}if(ji+ju.height>kb){kb=ji+ju.height}}jX._tempBounds=[jn,jl,kc,kb];var jM=jh.iconPos;var jb=jM.geoX;var i9=jM.geoY;var j1=(jb-jm)/jq+j5/2;var j0=(jk-i9)/jq+jO/2;var jn=j1+jM.destX;var jl=j0+jM.destY;var kc=jn+jM.width;var kb=jl+jM.height;jh.textPos=jh.textPos||jh._textPos;var jp=jh.textPos;var j6=jp[0];var jv=j1+j6.destX;var jj=j0+j6.destY;if(jvkb){kb=jj+j6.height}if(jp.length===2){var ju=jp[1];var js=j1+ju.destX;var ji=j0+ju.destY;if(jskb){kb=ji+ju.height}}jh._tempBounds=[jn,jl,kc,kb]}for(var jF=0,jB=kj.length;jFkh[2]||kd[3]kh[3])){jo++;if(jJ.textPos){jJ._textPos=jJ.textPos;delete jJ.textPos}}var kh=ki._tempBounds;if(!(kd[2]kh[2]||kd[3]kh[3])){jo++;if(ki.textPos){ki._textPos=ki.textPos;delete ki.textPos}}if(jo>=2){if(j9.textPos){j9._textPos=j9.textPos;delete j9.textPos}}}}for(var jF=0,jB=kj.length;jFkc){kc=j6.drawX+j6.width}if(j6.drawY+j6.height>kb){kb=j6.drawY+j6.height}if(jp.length===2){var ju=jp[1];ju.drawX=j1+ju.destX;ju.drawY=j0+ju.destY;if(ju.drawXkc){kc=ju.drawX+ju.width}if(ju.drawY+ju.height>kb){kb=ju.drawY+ju.height}}}var j4=j1+(jn-j1)/jU;var j3=j0+(jl-j0)/jU;var jG=j1+(kc-j1)/jU;var jE=j0+(kb-j0)/jU;jK.minX=j4;jK.minY=j3;jK.maxX=jG;jK.maxY=jE;var jW=(j4+jG)/2;var jV=(j3+jE)/2;var jc=jm+(jW-j5/2)*jq;var ja=jk+(jO/2-jV)*jq;jK.geoX=jc;jK.geoY=ja;jI.push(jK)}}var jY=this._strategyInfo;if(jY){var jH=jY.guid;var jQ=jY.name;var jx=jY.guidExt;for(var jF=0,jB=jI.length;jFjL.maxX-jD||j9.maxY-jDjL.maxY-jD)){j9.arrIntersectIndex.push(jC)}}}for(var jF=0,jB=jI.length;jFjd){var T=jb.splice(0,ja);for(var je=0,jc=T.length;je0){this.isDrawText=true}},_loadLabelData:function(jh,jg,jf,T,ji,e){var ja=jh.toString();var i8=jg.toString();var jc="cbk_"+ja.replace("-","_")+"_"+i8.replace("-","__")+"_"+Math.floor(jf);var jm=eV+"."+jc;var jl=this._labelDataUrls;var je=Math.abs(jh+jg)%jl.length;var jr=jl[je];if(window.offLineIPAddress){jr=window.offLineIPAddress+"pvd/"}var i=this.labelStyleParam;var jk="?qt=vtile";var jn="";if(this._map.config.style!=="default"){jn="&styleId=1"}var jj="x={x}&y={y}&z={z}&udt={udt}&v={v}&styles={styles}"+jn+"&textonly=1&textimg=1&scaler={scaler}&fn="+encodeURIComponent(jm);var jo=ev.calcLoopParam(jh,jf).col;var jd=this.ratio>1?2:1;var jb=jj.replace(/{x}/,jo).replace(/{y}/,jg).replace(/{z}/,Math.floor(jf)).replace(/{styles}/,i).replace(/{udt}/,this._udt).replace(/{v}/,this._version).replace(/{scaler}/,jd);var i9=jr+jk+"¶m="+window.encodeURIComponent(eo(jb));var jq=this;var jp=jq._map;bo[jc]=function(js){jq._vectorDrawLib.parseLabelData(js,jh,jg,jf,T,ji,function(jx){var ju=jp.getCenterIn();var jy=jp.getZoom();var jA="viewKey_"+Math.floor(ju.lng)+"_"+Math.floor(ju.lat)+"_"+jy;jq._labelCount--;var jB=jq._getCache(jh,jg,jf,T).updateLabelCounter;jq._labelCount-=jB;var jv=jq._curViewLabels;if(jA===e||(jq._labelCount<0&&jy===jf)){jv.push(jx)}if(jA===e){jq.statResponseCount++}if(jq._labelCount<=0){var jt=(new Date()).getTime();jq.updateLabel();var jw=(new Date()).getTime();var jz=new e7("oncanvasmaploaded");jz.drawTime=jw-jt;if(jq.statResponseCount===jq.statRequestCount){jz.isAllLoadedDrawing=true}jp.dispatchEvent(jz)}jq._setCacheValue(jh,jg,jf,T,jx);delete bo[jc]})};f5.load(i9)},drawLabel:function(T,i8,jf,i,jd,i9,e,ja,je,jb){var jc=this;if(!jc._computedLabel){return}if(jc._computedLabel._zoom!==jf){jc.clearLabel();return}jc._map.temp.isPermitSpotOver=false;jc.clearLabel();jc._vectorDrawLib.zoomingIconAndText(this._labelCtx,jc._computedLabel,T,i8,i,jd,i9,e,ja,je,jb)},_addSpotData:function(){this._spotData=[];var jf=this._map.getZoom();for(var ja=0,i9=this._computedLabel.length;jajf)){continue}var jb=[];jb[0]=(jc.minX-jc.maxX)/2;jb[1]=(jc.minY-jc.maxY)/2;jb[2]=(jc.maxX-jc.minX)/2;jb[3]=(jc.maxY-jc.minY)/2;var i8=null;if(jc.iconPos){i8=new cd(jc.iconPos.geoX,jc.iconPos.geoY)}var T=jc.name?jc.name.replace("\\\\","
"):"";if(jc.iconPos&&jc.iconPos.iconType.indexOf("ditie")>-1&&this._map.getZoom()>14){T=""}var je={n:T,pt:new cd(jc.geoX,jc.geoY),userdata:{iconPoint:i8,uid:jc.guid,name:T,type:jc.iconPos?jc.iconPos.iconType:"",iconImg:jc.iconImg,mapPoi:true,adver_log:jc.adver_log||""},bd:jb,tag:"MAP_SPOT_INFO"};this._spotData.push(je)}var jd=new e7("onspotsdataready");jd.spots=this._spotData;this._map._spotDataOnCanvas=this._spotData;this._map.dispatchEvent(jd)},isClickableLabel:function(e){if(e.isDel||(!e.guid&&!e.name)){return false}return true},getFilterImageData:function(T,jb){var jc=T.data,ja=this._labelStrategy,jb=parseInt(jb);for(var jd=0,i9=jc.length;jd0&&!jg){continue}var jk=Math.round(jt[0]/100);var jj=Math.round(jt[1]/100);var jw={lng:jq+jk,lat:jp-(jn*jd-jj)};var jb=jk/jd;var ja=jn-jj/jd;var jo=jt[7]||"";var jB=jt[5];var jr={type:"fixed",name:jo,textImg:jm,rank:jt[4],baseX:jb,baseY:ja,iconPos:null,textPos:null,guid:jt[3]||"",tracer:jx,direction:jB,startScale:3};if((jB!==h7&&jg||!jg)&&jA!==null){jr.iconPos=this._getIconPosition(jA,jf,jb,ja,jw);if(jr.iconPos){T=jr.iconPos.width;jl=jr.iconPos.height}}if(T===0){jr.direction=h7}if(jg){jr.textPos=this._getTextDrawData(jt,jb,ja,T,jl)}if(jr.textPos||jr.iconPos){js.push(jr)}}}},_isVisible:function(e,i){var i8;if(!this._binaryCache[e]){i8=e.toString(2);if(i8.length<8){i8=new Array(8-i8.length+1).join("0")+i8}this._binaryCache[e]=i8}i8=this._binaryCache[e];var T=eK[i].start;return i8[i-T]==="1"},_getIconPosition:function(jc,ja,T,i,e){var i8=this._map.config.style;var jd=bo["iconSetInfo"+i8][jc];if(!jd){if(jc.charCodeAt(0)>=48&&jc.charCodeAt(0)<=57){jd=bo["iconSetInfo"+i8]["_"+jc]}}if(!jd){return null}var i9=jd[0];var jb=jd[1];i9=i9*ja;jb=jb*ja;return{srcX:0,srcY:0,destX:T-i9/2,destY:i-jb/2,width:i9,height:jb,geoX:e.lng,geoY:e.lat,mcPt:e,iconType:jc}},_getTextDrawData:function(jj,ji,jh,i8,jf){var jo=jj[5];if(typeof jo!=="number"){jo=0}var jd=this.ratio;var jc=jd/2;i8*=jc;jf*=jc;var je=jj[12];var i9=je.length;var jr=0;var jq=0;var jn=[];var jm=0;var jp=0;for(var jl=0;jl0&&e>0){jn.push({srcX:ja,srcY:i,destX:jr,destY:jq,width:T,height:e})}}if(jn.length>0){return jn}return null},_getLineLabelInfo:function(jg,i8,i9,jv,jI,jn,jt,js,ju,jm){if(jg.length!==10){return}var jx=this.ratio;var T=this.ratio;var jE=jg[7].length;var jo=jg[1];var jG=jg[3];var jM=jg[8];var jc=jg[4];var e=2;var ja=jc.slice(0,e);for(var jJ=e;jJjk){jk=jQ+jb}if(jP+je>jj){jj=jP+je}}jp.push({angle:ji,srcX:jd,srcY:jf,destX:jQ,destY:jP,width:jb,height:je})}var jF={type:"line",textImg:i8,rank:jo,baseX:jC,baseY:jA,arrWordPos:jp,minXOriginal:jy,minYOriginal:jw,maxXOriginal:jk,maxYOriginal:jj,text:""};jm.push(jF)}},alterColor:function(jb,e,ja){var T=this._colorCtx,i=this._canvas2dMapMgr;T.clearRect(0,0,jb.width,jb.height);T.drawImage(e,jb.srcX,jb.srcY,jb.width,jb.height,0,0,jb.width,jb.height);var i9=T.getImageData(0,0,jb.width,jb.height),i8=i.getFilterImageData(i9,ja);T.putImageData(i8,0,0)},drawIconAndText:function(jn,jm,e){var je=this.ratio;var jc=this.sizeRatio/je;var jg=2/je;var jy=this;for(var jq=0,jo=jm.length;jq10&&jt<350){jn.save();var jw=Math.round(jz+js.width/2);var jv=Math.round(jx+js.height/2);jn.translate(jw,jv);jn.rotate(-jt/180*Math.PI);jn.drawImage(jk,js.srcX,js.srcY,js.width,js.height,-Math.round(js.width/2),-Math.round(js.height/2),js.width/jc,js.height/jc);jn.restore()}else{jn.drawImage(jk,js.srcX,js.srcY,js.width,js.height,jz,jx,js.width/jc,js.height/jc)}}}}}},isCollide:function(ja,jj,ji,e,jc,T,je){for(var i9=0,i8=T.length;i9jd[1]+jd[3]+jh||ji+jcjd[2]+jd[4]+jg)){return true}}}return false},zoomingIconAndText:function(jy,js,i8,jw,jx,jZ,jF,jg,jL,jE,jp){var j0=this.ratio;var jh=this.sizeRatio/j0;var j1=2/j0;var kb=j0/2;var jV=jw.x;var jU=jw.y;var jz=2*j0;if(jp!==0){jU+=jE}var jk=undefined,jd=undefined,ja=undefined,jf=undefined,jo=undefined;var jK=jZ>0?true:false;if(!jK){jk=[];var jO=1-jF}for(var j7=0,j5=js.length;j710&&jv<350){var jX=jQ+jY.width/2;var jW=jP+jY.height/2;var i9=jv/180*Math.PI;var jC=Math.cos(i9);var jl=Math.sin(i9);var jN=jC;var jm=jC;var jM=jl;var jn=-jl;var ju=jX-jX*jC-jW*jl;var e=jW+jX*jl-jW*jC;jy.save();jy.transform(jN,jn,jM,jm,ju,e);jy.drawImage(jb,jY.srcX,jY.srcY,jf,jo,jd,ja,jf/jh,jo/jh);jy.restore()}else{jy.drawImage(jb,jY.srcX,jY.srcY,jf,jo,jd,ja,jf/jh,jo/jh)}!jK&&jk.push([j7,jd,ja,jf,jo])}}jy.restore()}}}});function dV(e){this.initVars(e)}es.extend(dV.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(ja,je){var jc=this;this.bizData=ja;this.objTextsPng=null;this.arrIconsPng=null;var T=ja.textsPng;var jg=ja.iconsPng;if(!T||!jg){return}var jd=new Image();jd.onload=function(){jc.objTextsPng=this;jc.calcIconAndTextInfo(je);this.onload=null};jd.src=this.base64Prefix+T;var jf=jg.length;var e=[];for(var i9=0;i9jc.width||i>jc.height)&&(e>jc.width||jg>jc.height)){return false}return true},_setPlatformPosition:function(jf,je,jh){jh=jh||{};if(jf===0&&je===0&&!jh.point){return}if(isNaN(jh.initMapOffsetX)){jh.initMapOffsetX=this.offsetX}if(isNaN(jh.initMapOffsetY)){jh.initMapOffsetY=this.offsetY}var jb=hH(this._heading);if(this._tilt>0){je=je/Math.cos(hH(this._tilt))}var jg=jf*Math.cos(jb)+je*Math.sin(jb);var jd=-jf*Math.sin(jb)+je*Math.cos(jb);jg=jg+jh.initMapOffsetX;jd=jd+jh.initMapOffsetY;if(jh.point){var i=this.restrictCenter(jh.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new e7("oncenter_changed"))}}else{var i8=this.offsetX-jg;var e=this.offsetY-jd;var jc=this.centerPoint.lng;var ja=this.centerPoint.lat;var i9=new cd(jc,ja);var T=this.getZoomUnits();this.centerPoint=this.restrictCenter(new cd(i9.lng+i8*T,i9.lat-e*T),T);this.fire(new e7("oncenter_changed"))}this.offsetX=jg;this.offsetY=jd;this.dispatchEvent(new e7("onmoving"))},restrictCenter:function(jg,e){if(this.config.restrictCenter===false){return jg}e=e||this.getZoomUnits();var je=this.pixelToPointIn(new eL(this.width,0),{center:jg});var jb=this.pixelToPointIn(new eL(0,this.height),{center:jg});var jh=jg.lng;var jm=jg.lat;if(this.config.restrictBounds!==null&&!this.config.restrictBounds.isEmpty()){var jl=this.config.restrictBounds;var T=jl.getSouthWest();var jj=jl.getNorthEast();var jf=ia.convertLL2MC(T);var i9=ia.convertLL2MC(jj);var jc=this.calcNewZoomByRestriction(jh,jm,jb,je,jf.lng,i9.lng,jf.lat,i9.lat);if(jc>this.zoomLevel){this.zoomLevel=jc;return jg}jg.lng=this.calcNewLngByBounds(jh,jb,je,jf.lng,i9.lng,e);jg.lat=this.calcNewLatByBounds(jm,jb,je,jf.lat,i9.lat,e);return jg}var jd=this.pixelToPointIn(new eL(0,0),{center:jg});var i8=this.pixelToPointIn(new eL(0,this.height),{center:jg});if(this.zoomLevel<5){if(jd.lat>gV.MAX_LAT&&i8.latgV.MAX_LAT){jg.lat=gV.MAX_LAT-this.height/2*e}else{if(i8.latja&&e.latjb&&e.lngja){i9=ja-this.height/2*e}else{if(i8.latT){i=T-this.width/2*e}else{if(ja.lngi9){this._tilt=i9}if(jj){if(this._heading%360!==0||this._tilt>0){var i=this._webglMapCamera.fromScreenPixelToMC(T.x,T.y,{center:jc,zoom:this.zoomLevel});if(i){var jg=i.sub(jb);var i8=jc.sub(jg);this.centerPoint=this.restrictCenter(i8)}}else{var jd=this.getZoomUnits();var i8=new cd(jj.lng-jd*(T.x-this.width/2),jj.lat+jd*(T.y-this.height/2));this.centerPoint=this.restrictCenter(i8,jd)}this.fire(new e7("oncenter_changed"))}this._checkFireZoomend();jk.callback&&jk.callback();return}this._animationInfo.zoom={current:this.zoomLevel,diff:e-this.zoomLevel,target:e};var jh=this;jh._checkFireZoomend();var ji=this._tilt;if(this.fixPoint||ji>gV.MAX_DRAG_TILT_L2){jk.renderCallback=function(){var jo=jh.getCurrentMaxTilt();if(jh._tilt>jo){jh._tilt=jo}var jp=jh.fixPixel;if(!jh.fixPixel||!jh.fixPoint){return}var jl=jh.fixPixel;var jv=jh.fixPoint;var js=jh.fixCenter;var jq=jh.mousePosMCPoint;if(jh._heading%360!==0||jh._tilt>0){var jm=jh._webglMapCamera.fromScreenPixelToMC(jl.x,jl.y,{center:js,zoom:jh.zoomLevel,tilt:jh._tilt});if(jm){var ju=jm.sub(jq);var jn=js.sub(ju);jh.centerPoint=jh.restrictCenter(jn)}}else{var jr=jl;var jt=jh.getZoomUnits();var jn=new cd(jv.lng-jt*(jr.x-jh.width/2),jv.lat+jt*(jr.y-jh.height/2));jh.centerPoint=jh.restrictCenter(jn,jt)}jh.fire(new e7("oncenter_changed"))}}if(jk.fromMouseWheel===true){this._startInfiniteZoomAnimation(jk);jk.callback&&jk.callback();return}this._startAnimation(jk)},_checkFireZoomend:function(){var e=this;if(e.fireZoomendTimer){clearTimeout(e.fireZoomendTimer)}e.fireZoomendTimer=setTimeout(function(){if(e.zoomEventStatus==="zooming"){e.fire(new e7("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(T,jC,jn){jn=jn||{};var i9=this._getProperZoom(jC);jC=i9.zoom;if(this.centerPoint.equals(T)&&this.zoomLevel===jC&&typeof jn.heading!=="number"&&typeof jn.tilt!=="number"){return}var e=this.getHeading()%360;var jf=this.getTilt();var jl=0;var jp=0;var ji=this.getBounds().containsPoint(T);if(typeof jn.heading==="number"){jl=jn.heading}else{if(ji){jl=e}}if(typeof jn.tilt==="number"){jp=jn.tilt}else{if(ji){jp=jf}}this._heading=e;var jz=jl-e;var jv=jp-jf;var jj=this;var jb=this.zoomLevel;var jc=1.42;var jr=this.zoomScale(jC-jb);var jE=this.getZoomUnits();var jh=this.centerPoint.div(jE);var jF=T.div(jE);var jy=this.worldSize();var ju=jc;var jt=Math.max(this.width,this.height);var js=jt/jr;var jg=jF.sub(jh).mag();var i=ju*ju;function jB(jH){var jG=(js*js-jt*jt+(jH?-1:1)*i*i*jg*jg)/(2*(jH?js:jt)*i*jg);return Math.log(Math.sqrt(jG*jG+1)-jG)}function i8(jG){return(Math.exp(jG)-Math.exp(-jG))/2}function jd(jG){return(Math.exp(jG)+Math.exp(-jG))/2}function jm(jG){return i8(jG)/jd(jG)}var je=jB(0);var jw=function(jG){return(jd(je)/jd(je+ju*jG))};var jx=function(jG){return jt*((jd(je)*jm(je+ju*jG)-i8(je))/i)/jg};var ja=(jB(1)-je)/ju;if(Math.abs(jg)<0.000001||ja===Infinity||isNaN(ja)){if(Math.abs(jt-js)<0.000001){this._animationInfo.zoom={current:this.zoomLevel,diff:jC-this.zoomLevel};this._animationInfo.center={current:this.centerPoint,diff:T.sub(this.centerPoint)};this._animationInfo.heading={current:e,diff:jl-e};this._animationInfo.tilt={current:jf,diff:jp-jf};this.setLock(true);this._startAnimation({callback:function(jG){jj.setLock(false);if(jn.callback){jn.callback(jG)}},duration:jn.duration});return}var jD=js5){jA=(ja-5)/2+jA}}var jo=jn.duration||1000*ja/jA;if(isNaN(jo)){var jq={};for(var jk in jn){jq[jk]=jn[jk];jq.noAnimation=true}this.centerAndZoomIn(T,jC,jq);return}this.fire(new e7("onmovestart"));this.fire(new e7("onzoomstart"));this.setLock(true);this._startAnimation({duration:jo,renderCallback:function(jG,jH){var jI=jG*ja;var jL=jx(jI);var jK=jb+jj.scaleZoom(1/jw(jI));if(jKjj.getMaxZoom()){jK=jj.getMaxZoom()}if(jK!==jj.zoomLevel){jj.zoomLevel=jK;jj.fire(new e7("onzoom_changed"))}jj.centerPoint=jh.add(jF.sub(jh).mult(jL)).mult(jE);jj.fire(new e7("oncenter_changed"));if(typeof jl==="number"){var jJ=jG/0.7;if(jJ>1){jJ=1}jj.setHeading(e+jz*jG,{noAnimation:true})}if(typeof jp==="number"){jj.setTilt(jf+jv*jG,{noAnimation:true})}},callback:function(jG,jH){jj.setLock(false);if(jH&&jH.stop===true){jj.fire(new e7("onmoveend"));jj.fire(new e7("onzoomend"));jn.callback&&jn.callback(jG);return}if(jC!==jj.zoomLevel){jj.zoomLevel=jC;jj.fire(new e7("onzoom_changed"))}jj.fire(new e7("onmoveend"));jj.fire(new e7("onzoomend"));jn.callback&&jn.callback(jG)}})},zoomScale:function(e){return Math.pow(2,e)},scaleZoom:function(e){return Math.log(e)/Math.LN2},panToIn:function(i,T){T=T||{};if(!i||i.equals(this.centerPoint)){T.callback&&T.callback();return}var i8=this.pointToPixelIn(i);var e=Math.round(this.width/2);var ja=Math.round(this.height/2);var i9=this._ifUseAnimation(i,this.zoomLevel);if(T.noAnimation===true||i9===false){this._stopAllAnimations();this._panToIn(e-i8.x,ja-i8.y,i);T.callback&&T.callback();return}this.flyToIn(i,this.zoomLevel,T)},_panToIn:function(i,e,i8){var T=this.temp;if(T.operating===true){return}if(T.dragAni){T.dragAni.stop(false,{readyToMove:true});T.dragAni=null}this.dispatchEvent(new e7("onmovestart"));this._setPlatformPosition(i,e,{point:i8});this.dispatchEvent(new e7("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,T){i=Math.round(i)||0;e=Math.round(e)||0;T=T||{};if(Math.abs(i)<=this.width&&Math.abs(e)<=this.height&&T.noAnimation!==true){this._panBy(i,e,T)}else{this._panToIn(i,e,T.point);T.callback&&T.callback()}},_panBy:function(i,e,i9){if(this.temp.operating===true){return}i9=i9||{};this.dispatchEvent(new e7("onmovestart"));var i8=this;var T=i8.temp;T.pl=i8.offsetX;T.pt=i8.offsetY;if(T.tlPan){T.tlPan.cancel()}if(T.dragAni){T.dragAni.stop(false,{readyToMove:true});T.dragAni=null}T.tlPan=new e0({fps:i9.fps||i8.config.fps,duration:i9.duration||i8.config.actionDuration,transition:i9.transition||fT.easeInOutQuad,render:function(ja){this.terminative=i8.temp.operating;if(i8.temp.operating){return}i8._setPlatformPosition(i*ja,e*ja,{initMapOffsetX:T.pl,initMapOffsetY:T.pt})},finish:function(ja){i8.dispatchEvent(new e7("onmoveend"));i8.temp.tlPan=false;if(i8.temp.stopArrow===true){i8.temp.stopArrow=false;if(i8.temp.arrow!==0){i8._arrow()}}}})},_startAnimation:function(i){var i9=this._animationInfo;var T=this;i=i||{};if(T._ani){T._ani.stop(!!i.goToEnd,{stopCurrentAnimation:i.stopCurrentAnimation})}if(T._infiniteAni){T._infiniteAni.stop();T._infiniteAni=null}var ja=i.duration||500;var jb=i.transition||fT.ease;var e=new e7("onanimation_start");this.fire(e);if(i.unstopable){i9=this._animationInfoUnstopable}var i8=new e0({duration:ja,transition:jb,render:function(je,jd){for(var jc in i9){if(!i9.hasOwnProperty(jc)){continue}var jg=i9[jc].current;var jf=i9[jc].diff;T._setValueTick(jc,jg,jf,je)}if(i.renderCallback){i.renderCallback(je,jd)}},finish:function(jc){T.fire(new e7("onanimation_end"));if(i.unstopable){T._animationInfoUnstopable={};T._unstopableAni=null}else{T._ani=null;T._animationInfo={}}if(i.mapNeedCbk){i.mapNeedCbk()}if(i.callback){i.callback(jc)}},onStop:function(jc){jc=jc||{};T.fire(new e7("onanimation_end"));if(jc.stopCurrentAnimation){T._animationInfo={}}T._ani=null;if(i.mapNeedCbk){i.mapNeedCbk()}if(i.callback){i.callback(null,{stop:true})}}});if(i.unstopable){T._unstopableAni=i8}else{T._ani=i8}},_startInfiniteZoomAnimation:function(e){var i=this;if(i._ani){i._ani.stop(!!e.goToEnd,{stopCurrentAnimation:e.stopCurrentAnimation})}if(i._infiniteAni){return}this.fire(new e7("onanimation_start"));i._infiniteAni=new e0({duration:10000,transition:fT.linear,render:function(){var T=i._animationInfo.zoom;if(Math.abs(T.current-T.target)<0.001){i._setValue("zoom",T.target);i._infiniteAni.stop();return}T.current+=(T.target-T.current)*0.35;i._setValue("zoom",T.current);if(e.renderCallback){e.renderCallback()}},finish:function(){i._infiniteAni=null;i._animationInfo={};i.fire(new e7("onanimation_end"));if(e.callback){e.callback()}},onStop:function(){i._infiniteAni=null;i._animationInfo={};i.fire(new e7("onanimation_end"));if(e.callback){e.callback()}}})},_setValue:function(e,T){if(e==="zoom"){this._preZoomLevel=this.zoomLevel;var i=this._getProperZoom(T);T=i.zoom;if(T!==this.zoomLevel){this.zoomLevel=T;if(T<5){this.restrictCenter(this.centerPoint)}this.fire(new e7("on"+e+"_changed"))}return}else{if(e==="center"){this.centerPoint=T}}this["_"+e]=T;this.fire(new e7("on"+e+"_changed"))},_setValueTick:function(e,i9,i8,i){if(e==="center"){var T=new cd(i9.lng+i8.lng*i,i9.lat+i8.lat*i);this._setValue(e,T);return}if(e==="zoom"){this._setValue(e,Math.pow(i9,1-i)*Math.pow(i9+i8,i));return}this._setValue(e,i9+i8*i)},setHeading:function(i8,i){i=i||{};if(i8===this._heading){i.callback&&i.callback();return}var T=dJ(this._heading,360);var e=dJ(i8,360);if(e===T){this._heading=i8;i.callback&&i.callback();return}if(i.noAnimation){this._setValue("heading",i8);i.callback&&i.callback();return}if(i.unstopable){this._animationInfoUnstopable.heading={current:this._heading,diff:i8-this._heading}}else{this._animationInfo.heading={current:this._heading,diff:i8-this._heading}}this._startAnimation(i)},resetHeading:function(e){var i=this._heading;while(i<0){i+=360}i=i%360;if(i>180){i-=360}this._heading=i;e=e||{};e.unstopable=true;this.setHeading(0,e)},getHeading:function(){return this._heading},setTilt:function(e,i){i=i||{};if(e===this._tilt){i.callback&&i.callback();return}if(e>gV.MAX_TILT){e=gV.MAX_TILT}if(e0){jg=1/Math.sqrt(jg);jj[0]=ji[0]*jg;jj[1]=ji[1]*jg}return jj};je.dot=function(jh,jg){return jh[0]*jg[0]+jh[1]*jg[1]};je.cross=function(ji,jh,jg){var jj=jh[0]*jg[1]-jh[1]*jg[0];ji[0]=ji[1]=0;ji[2]=jj;return ji};je.lerp=function(ji,jh,jg,jj){var jl=jh[0],jk=jh[1];ji[0]=jl+jj*(jg[0]-jl);ji[1]=jk+jj*(jg[1]-jk);return ji};je.random=function(jg,ji){ji=ji||1;var jh=i9()*2*Math.PI;jg[0]=Math.cos(jh)*ji;jg[1]=Math.sin(jh)*ji;return jg};je.transformMat2=function(jj,ji,jh){var jg=ji[0],jk=ji[1];jj[0]=jh[0]*jg+jh[2]*jk;jj[1]=jh[1]*jg+jh[3]*jk;return jj};je.transformMat2d=function(jj,ji,jh){var jg=ji[0],jk=ji[1];jj[0]=jh[0]*jg+jh[2]*jk+jh[4];jj[1]=jh[1]*jg+jh[3]*jk+jh[5];return jj};je.transformMat3=function(jj,ji,jh){var jg=ji[0],jk=ji[1];jj[0]=jh[0]*jg+jh[3]*jk+jh[6];jj[1]=jh[1]*jg+jh[4]*jk+jh[7];return jj};je.transformMat4=function(jj,ji,jh){var jg=ji[0],jk=ji[1];jj[0]=jh[0]*jg+jh[4]*jk+jh[12];jj[1]=jh[1]*jg+jh[5]*jk+jh[13];return jj};je.rotate=function(jj,jh,jg,jn){var jm=jh[0]-jg[0];var jl=jh[1]-jg[1];var ji=Math.sin(jn);var jk=Math.cos(jn);jj[0]=jm*jk-jl*ji+jg[0];jj[1]=jm*ji+jl*jk+jg[1];return jj};je.forEach=(function(){var jg=je.create();return function(jj,jn,jo,jm,jl,jh){var jk,ji;if(!jn){jn=2}if(!jo){jo=0}if(jm){ji=Math.min((jm*jn)+jo,jj.length)}else{ji=jj.length}for(jk=jo;jk0){jg=1/Math.sqrt(jg);jj[0]=ji[0]*jg;jj[1]=ji[1]*jg;jj[2]=ji[2]*jg}return jj};jd.dot=function(jh,jg){return jh[0]*jg[0]+jh[1]*jg[1]+jh[2]*jg[2]};jd.cross=function(jh,jm,jl){var jg=jm[0],jo=jm[1],jn=jm[2],jk=jl[0],jj=jl[1],ji=jl[2];jh[0]=jo*ji-jn*jj;jh[1]=jn*jk-jg*ji;jh[2]=jg*jj-jo*jk;return jh};jd.lerp=function(ji,jh,jg,jj){var jm=jh[0],jl=jh[1],jk=jh[2];ji[0]=jm+jj*(jg[0]-jm);ji[1]=jl+jj*(jg[1]-jl);ji[2]=jk+jj*(jg[2]-jk);return ji};jd.random=function(jg,jk){jk=jk||1;var ji=i9()*2*Math.PI;var jj=(i9()*2)-1;var jh=Math.sqrt(1-jj*jj)*jk;jg[0]=Math.cos(ji)*jh;jg[1]=Math.sin(ji)*jh;jg[2]=jj*jk;return jg};jd.transformMat4=function(jj,ji,jh){var jg=ji[0],jl=ji[1],jk=ji[2];jj[0]=jh[0]*jg+jh[4]*jl+jh[8]*jk+jh[12];jj[1]=jh[1]*jg+jh[5]*jl+jh[9]*jk+jh[13];jj[2]=jh[2]*jg+jh[6]*jl+jh[10]*jk+jh[14];return jj};jd.transformMat3=function(jj,ji,jh){var jg=ji[0],jl=ji[1],jk=ji[2];jj[0]=jg*jh[0]+jl*jh[3]+jk*jh[6];jj[1]=jg*jh[1]+jl*jh[4]+jk*jh[7];jj[2]=jg*jh[2]+jl*jh[5]+jk*jh[8];return jj};jd.transformQuat=function(jm,js,jg){var jt=js[0],jr=js[1],jq=js[2],jo=jg[0],jn=jg[1],jl=jg[2],jp=jg[3],jj=jp*jt+jn*jq-jl*jr,ji=jp*jr+jl*jt-jo*jq,jh=jp*jq+jo*jr-jn*jt,jk=-jo*jt-jn*jr-jl*jq;jm[0]=jj*jp+jk*-jo+ji*-jl-jh*-jn;jm[1]=ji*jp+jk*-jn+jh*-jo-jj*-jl;jm[2]=jh*jp+jk*-jl+jj*-jn-ji*-jo;return jm};jd.rotateX=function(ji,jh,jg,jl){var jk=[],jj=[];jk[0]=jh[0]-jg[0];jk[1]=jh[1]-jg[1];jk[2]=jh[2]-jg[2];jj[0]=jk[0];jj[1]=jk[1]*Math.cos(jl)-jk[2]*Math.sin(jl);jj[2]=jk[1]*Math.sin(jl)+jk[2]*Math.cos(jl);ji[0]=jj[0]+jg[0];ji[1]=jj[1]+jg[1];ji[2]=jj[2]+jg[2];return ji};jd.rotateY=function(ji,jh,jg,jl){var jk=[],jj=[];jk[0]=jh[0]-jg[0];jk[1]=jh[1]-jg[1];jk[2]=jh[2]-jg[2];jj[0]=jk[2]*Math.sin(jl)+jk[0]*Math.cos(jl);jj[1]=jk[1];jj[2]=jk[2]*Math.cos(jl)-jk[0]*Math.sin(jl);ji[0]=jj[0]+jg[0];ji[1]=jj[1]+jg[1];ji[2]=jj[2]+jg[2];return ji};jd.rotateZ=function(ji,jh,jg,jl){var jk=[],jj=[];jk[0]=jh[0]-jg[0];jk[1]=jh[1]-jg[1];jk[2]=jh[2]-jg[2];jj[0]=jk[0]*Math.cos(jl)-jk[1]*Math.sin(jl);jj[1]=jk[0]*Math.sin(jl)+jk[1]*Math.cos(jl);jj[2]=jk[2];ji[0]=jj[0]+jg[0];ji[1]=jj[1]+jg[1];ji[2]=jj[2]+jg[2];return ji};jd.forEach=(function(){var jg=jd.create();return function(jj,jn,jo,jm,jl,jh){var jk,ji;if(!jn){jn=3}if(!jo){jo=0}if(jm){ji=Math.min((jm*jn)+jo,jj.length)}else{ji=jj.length}for(jk=jo;jk0){jg=1/Math.sqrt(jg);jk[0]=jj[0]*jg;jk[1]=jj[1]*jg;jk[2]=jj[2]*jg;jk[3]=jj[3]*jg}return jk};jc.dot=function(jh,jg){return jh[0]*jg[0]+jh[1]*jg[1]+jh[2]*jg[2]+jh[3]*jg[3]};jc.lerp=function(ji,jh,jg,jj){var jm=jh[0],jl=jh[1],jk=jh[2],jn=jh[3];ji[0]=jm+jj*(jg[0]-jm);ji[1]=jl+jj*(jg[1]-jl);ji[2]=jk+jj*(jg[2]-jk);ji[3]=jn+jj*(jg[3]-jn);return ji};jc.random=function(jg,jh){jh=jh||1;jg[0]=i9();jg[1]=i9();jg[2]=i9();jg[3]=i9();jc.normalize(jg,jg);jc.scale(jg,jg,jh);return jg};jc.transformMat4=function(jk,jj,jh){var jg=jj[0],jm=jj[1],jl=jj[2],ji=jj[3];jk[0]=jh[0]*jg+jh[4]*jm+jh[8]*jl+jh[12]*ji;jk[1]=jh[1]*jg+jh[5]*jm+jh[9]*jl+jh[13]*ji;jk[2]=jh[2]*jg+jh[6]*jm+jh[10]*jl+jh[14]*ji;jk[3]=jh[3]*jg+jh[7]*jm+jh[11]*jl+jh[15]*ji;return jk};jc.transformQuat=function(jm,js,jg){var jt=js[0],jr=js[1],jq=js[2],jo=jg[0],jn=jg[1],jl=jg[2],jp=jg[3],jj=jp*jt+jn*jq-jl*jr,ji=jp*jr+jl*jt-jo*jq,jh=jp*jq+jo*jr-jn*jt,jk=-jo*jt-jn*jr-jl*jq;jm[0]=jj*jp+jk*-jo+ji*-jl-jh*-jn;jm[1]=ji*jp+jk*-jn+jh*-jo-jj*-jl;jm[2]=jh*jp+jk*-jl+jj*-jn-ji*-jo;return jm};jc.forEach=(function(){var jg=jc.create();return function(jj,jn,jo,jm,jl,jh){var jk,ji;if(!jn){jn=4}if(!jo){jo=0}if(jm){ji=Math.min((jm*jn)+jo,jj.length)}else{ji=jj.length}for(jk=jo;jk0){T[0].sort(function(i9,i8){return i9.tileInfo.useZoom-i8.tileInfo.useZoom})}}});var fH=(function(){var ji=new Int8Array(4);var T=new Int32Array(ji.buffer,0,1);var jd=new Float32Array(ji.buffer,0,1);function jk(jr){T[0]=jr;return jd[0]}function i(jr){jd[0]=jr;return T[0]}function je(jr){var jt=(jr[3]<<24|jr[2]<<16|jr[1]<<8|jr[0]);var js=jk(jt&4278190079);return js}var i9=0;var jc=1;var jg=2;var jo=0;var jl=1;var jj=2;var ja=9;function jh(jr,js){var jt;if(js%2===0){jt=[-jr[1],jr[0]]}else{jt=[jr[1],-jr[0]]}return jt}function e(jr,js,jt){var ju=jh(jr,js);var jv;if(jt===jc){return ju}else{if(js===4||js===5){jv=[ju[0]-jr[0],ju[1]-jr[1]]}else{jv=[ju[0]+jr[0],ju[1]+jr[1]]}if(jt===i9){vec2.normalize(jv,jv)}return jv}}function jn(js,jr){return Math.sqrt(Math.pow(js[0]-jr[0],2)+Math.pow(js[1]-jr[1],2))}function i8(jv,ju,jt,jr){var js=vec2.dot(jv,ju);if(jt===jj||jt===jl){if((jr===0||jr===1)&&js>0){return true}else{if((jr===2||jr===3)&&js<0){return true}}}if((jr===0||jr===1)&&js<0){return true}else{if((jr===2||jr===3)&&js>0){return true}}return false}function jf(js,jx,jz){var jy=jh(js,jx);var ju;var jw=js;var jv=jz;var jB=[];vec2.normalize(jB,[jw[0]+jv[0],jw[1]+jv[1]]);var jA=vec2.dot(jy,[-jB[1],jB[0]]);if(Math.abs(jA)<0.1){jA=1}var jt=1/jA;ju=[-jB[1]*jt,jB[0]*jt];var jr=vec2.dot(js,ju);if(jr<0){vec2.negate(ju,ju)}return{cos2:jr,offset:ju}}function jq(js,jx,jz,jr){var jy=jh(js,jx);var jw;var jv;var ju;if(jx===0||jx===1){jw=jz;jv=js}else{jw=js;jv=jz}if(!jw||!jv){return jy}var jB=[jw[0]+jv[0],jw[1]+jv[1]];if(jB[0]===0&&jB[1]===0){vec2.normalize(jB,jv)}else{vec2.normalize(jB,jB)}var jC=i8(jB,jy,jr,jx);if(jC){return jy}var jA=vec2.dot(jy,[-jB[1],jB[0]]);if(Math.abs(jA)<0.1){jA=1}var jt=1/jA;ju=[-jB[1]*jt,jB[0]*jt];return ju}function jp(jC,jD,jw,jv,jE,jB,ju,jx,jt,jA){var jz;var js=0;var jr=false;jz=jB.length/ja-1;jb(jD[0],jC[0],jw[0],jE,jv,4,jx,jt,undefined,jB,jA);jz++;js++;jb(jD[0],jC[0],jw[0],jE,jv,5,jx,jt,undefined,jB,jA);jz++;js++;for(var jy=0;jy0){jy+=jn(jC[jx],jC[jx-1]);jv.push(jy*10)}if(jx!==jC.length-1){var ju=[jC[jx+1][0]-jC[jx][0],jC[jx+1][1]-jC[jx][1]];var jE=[];if(ju[0]===0&&ju[1]===0){jE=[0,0]}else{vec2.normalize(jE,ju)}jB[jB.length]=[jE[0],jE[1]]}}return jp(jB,jC,jv,jt,jD,jz,jr,je(jw),js,jA)},toTileSolidLineVertices:function(jv,js){var jt=new Float32Array(jv.length/ja*5);var jr=new Int16Array(jt.buffer);var jx=0;var ju=0;for(var jw=0;jw0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState},releaseOutViewTileData:function(e){var i9=this.map._workerMgr.releasePendingData(e);for(var i8=0,T=i9.length;i8=0.5){js=true}else{if(jg<0.5&&e>=0.5){js=true}else{if(jg>=0.5&&e<0.5){js=true}}}if(js){this.cacheDataCollideLabels(0)}this.LAST_CALC_ZOOM=je}else{if(this.tileLabels.length>0){this.cacheDataCollideLabels(es.Browser.ie?50:30)}}},loadVectorLayerData:function(je){this.map.temp.isPermitSpotOver=false;var jd=this;function jc(i,jf){var jh=jd.tileCache.getData(jf);if(!jh){return}if(!i||i.error){i.event&&bo.fetchDebug&&bo.fetchDebug.sendError({title:i.event.title,msg:i.event.msg,category:bo.fetchDebug.category.AJAX,level:bo.fetchDebug.levels.ERROR,url:i.event.title});var jg=new e7("ontileloaderror");i=i||{};jg.error=i.error||"";jg.message=i.message||"";jd.map.fire(jg);jh.status="init";jh.reloadTimer=setTimeout(function(){if(jh.retry<3){jh.retry++;jh.status="loading";jd.loadVectorTileData(i.tileInfo,jc)}else{jd.tileCache.removeData(jf)}},4000);jd.map._featureMgr.clearData(jd.drawIndex);jd._checkTilesLoaded();jd.getVectorLayerDataFromCache(jd.curViewTilesInfo,jd.getZoomState());return}if(jh.reloadTimer){clearTimeout(jh.reloadTimer);jh.reloadTimer=null}jd.callbackDataQueue.push([i,jf]);if(jd.processDataTimer){return}jd.processDataTimer=setTimeout(function(){while(jd.callbackDataQueue.length>0){var jj=jd.callbackDataQueue.shift();jd.vectorTileDataCbk(jj[0],jj[1]);jd._checkTilesLoaded()}jd.map._featureMgr.clearData(jd.drawIndex);jd.getVectorLayerDataFromCache(jd.curViewTilesInfo,jd.getZoomState());var ji=new e7("onrefresh");ji.source="webgllayer";jd.map.dispatchEvent(ji);jd.processDataTimer=null},200)}for(var jb=0,i9=je.length;jb65536){jt.renderData.base.push({type:"line",data:[fH.toTileSolidLineVertices(jz,4000),new Uint16Array(jC)]});jz=[];jC=[]}for(var js=0;js0){ja=i9.labelProcessor.collisionTest(ja,-1)}}else{if(jb||jd){if(this._collisionTimer){if(!jb){clearTimeout(this._collisionTimer)}else{if(Date.now()-i9.lastCollisionTestTime>500){i9.lastCollisionTestTime=Date.now()}else{clearTimeout(this._collisionTimer)}}}this._collisionTimer=setTimeout(function(){ja=i9.labelProcessor.collisionTest(i9.tileLabels);if(ja){if(i9.map.stencil&&i9.map.stencil.isPoiMask){var je=i9.isPoiInPolygon(ja);i.setLabelData(je)}else{i.setLabelData(ja)}}i9.updateLabels();i9.map.dispatchEvent(new e7("onrefresh"));i9._collisionTimer=null},60);return}else{ja=i9.labelProcessor.getCachedLabels(i9.tileLabels)}}if(ja){if(i9.map.stencil&&i9.map.stencil.isPoiMask){var jc=i9.isPoiInPolygon(ja);i.setLabelData(jc)}else{i.setLabelData(ja)}}i9.updateLabels();i9.map.dispatchEvent(new e7("onrefresh"))}if(!T){clearTimeout(i9.cacheLabelTimer);i8()}else{if(i9.cacheLabelTimer){return}i9.cacheLabelTimer=setTimeout(function e(){i8()},T)}},isPoiInPolygon:function(T){var jr=this;var jh=jr.map.stencil;var i9=jr.map._featureMgr.result.eleData[9];var i8=[];for(var jm=0;jm0){var i8=ja.getZoom();if(T.labelZoom-i8<3){this.labelProcessor.updateLabels(T);var e=this.labelProcessor.fixDataFormat(T);i.setOverlayData(e[0],2);i.setOverlayData(e[1],3);i.setOverlayData(e[2],4)}else{i.clearLabelOverlayData()}ja.temp.isPermitSpotOver=false;this.labelProcessor.curSpotAdded=false}},loadRasterLayerData:function(jd,i8){this.thumbCache={};var je=this.getZoomState();if(i8){for(var jb=0,i9=jd.length;jb9&&!e.guid){return false}if(e.zoom<=9&&!e.name&&!e.guid){return false}return true}};var aJ=5;var h7=4;var fR=3;var H=2;var dU=1;var gH=0;function ap(e){this._ratio=fz();this._iconCache={};this._map=e;this._drawingCanvasPool=[];this._drawingCanvasHeight=4096}es.extend(ap.prototype,{_loadIcons:function(i,jc){var ja=0;var i9=this;var T=this._map.config.style;for(var jb in i){ja++;var e=new Image();e.id=jb;e.crossOrigin="anonymous";e.onload=function(){i9._iconCache[this.id].loaded=true;ja--;if(ja===0){jc()}this.onload=null};e.onerror=function(){i9._iconCache[this.id]=null;ja--;if(ja===0){jc()}this.onerror=null};var i8=w.getIconSetPath(T)+jb+".png";e.src=i8;this._iconCache[jb]={loaded:false,image:e}}},_getEmptyDrawingCanvas:function(){for(var T=0;T0){while(ja0){ja=0;while(ja0){ja=0;while(ja0){var js=this;this._loadIcons(jj,function(){jr=js._drawEachTypeOfLabels(jl,jk,jt,jd,jc,jh,jp);jt=jr.curStyleId;jd=jr.curX;jc=jr.curY;jh=jr.curLineHeight;var i=js._generateEachLabelCanvas(e,jc,jg,jm,T,jq);i8(i[0],i[1])});return}var je=this._generateEachLabelCanvas(e,jc,jg,jm,T,jq);i8(je[0],je[1])},drawCustomLabelsOnCanvas:function(jb,jh){if(jb.length===0){jh();return}var T=0;var e=(jb[0].style.fontSize+(jb[0].style.haloSize||0)*2)||0;var i8=e;var jd=this._getEmptyDrawingCanvas();var ji=jd.getContext("2d");ji.clearRect(0,0,jd.width,jd.height);var je={};var jg=-1;for(var i9=0;i9this._drawingCanvasHeight){return{curX:i8,curY:T,curLineHeight:i9,curStyleId:jf}}}return{curX:i8,curY:T,curLineHeight:i9,curStyleId:jf}},_drawIndoorTextLabelOnCanvas:function(i9){var e=this._getEmptyDrawingCanvas();var jg=e.getContext("2d");jg.clearRect(0,0,e.width,e.height);var jo=0;var jf=null;var je=0;var jc;var jl={};var jk=[];for(var ja in i9){if(ja==="tileInfo"){continue}var i8=i9[ja];var jj=i8.defaultFloor;var jd=i8.floors;for(var ji=0;ji4){jQ=4}var jA=[];var jp=[];var jw=0;if(i9&&!i9[jS]){i9[jS]={}}var jj=jk+jQ*2;var jB=jj;if(jc.containDescendings){jB+=4}if(jQ===0){jB+=2}if(jc.textOnIcon){jB=Math.max(jB,jc.iconSize[1])}if(jS!==T||jB>jz){T=jS;if(jD>=10&&jD%10===0){jq.font=jD*10+" "+jk+"px sans-serif"}else{jq.font=jk+"px sans-serif"}if(jB>jz){var jx=jB-jz;jz+=jx;jr+=jx}if(jQ>0){jq.lineWidth=jQ*2;jq.strokeStyle=jb}jq.fillStyle=jK}if(jc.type==="line"){var je=jy.split("");for(var jT=0;jT512){js=0;jr+=jB;jz=jB}if(jr>this._drawingCanvasHeight){return{curX:js,curY:jr,curLineHeight:jz,styleId:jS}}var jN=js;if(jQ>0){i8+=jQ;jN-=Math.round(jQ/2);jq.strokeText(jM,js,jr)}jq.fillText(jM,js,jr);var jJ=[i8,jB];jt=[Math.round(jJ[0]/2),Math.round(jJ[1]/2)];jE=[jN,jr-jB];i9[jS][jM]={displaySize:jt,curWordPosition:jE,totalHeight:jw};js+=i8+2}jA.push(jt);jp.push(jE)}jw=Math.round(jA[0][1])}else{if(i9[jS][jy]){var jl=i9[jS][jy];jA=jl.textSize;jp=jl.labelImagePosition;jw=jl.totalHeight}else{var jm=jy.split("\\");if(jm.length>1&&jc.textOnIcon){var jU=0;var jR=0;var jX=[];var ju=8;for(var jT=0;jTjU){jU=ji}jX.push(Math.round(ji/2));jR+=jB}var jf=jU+2*ju;var jP=jR+2*ju;if(js+jf>512){js=0;jr+=jz}jr+=jR-jB+2*ju;var jI=js;var jv=jr-jP;var e=Math.round(jf/2);var jo=this._iconCache[jc.icon].image;this.drawStretchedIcon(jq,jo,[jI,jv],ju,jU,jR);for(var jT=0;jT512){js=0;jr+=jB;jz=jB}if(jr>this._drawingCanvasHeight){return{curX:js,curY:jr,curLineHeight:jz,styleId:jS}}var jI=js;var jv=jr-jB;var jH=js;var jG=jr;if(jc.containDescendings){jG-=4}if(jc.textOnIcon){var jC=false;var jo=this._iconCache[jc.icon].image;var jF=jc.iconSize.concat([]);if(jj>jF[1]){jF[1]=jj;jC=true}if(ji>jF[0]){jF[0]=ji;jC=true}if(jc.styleId===519){jq.drawImage(jo,0,0,jF[0],jF[1],jI,jv,jF[0],jF[1])}else{if(jC){this.drawStretchedIcon(jq,jo,[jI,jv],ja,ji,jF[1])}else{this.draw3StretchedIcon(jq,jo,[jI,jv],ja,ji,jF[1])}}jH+=ja;if(jc.iconSize[1]>jj){jG-=(jc.iconSize[1]-jj)/2-1}jf+=1}if(jQ>0){jf+=jQ;jI-=Math.round(jQ/2);jv+=Math.round(jQ/2);if(jS===71028){jB-=2}if(jS===32){jB-=2}jq.strokeText(jy,jH,jG)}jq.fillText(jy,jH,jG);var jd=[jf,jB];var jt=[Math.round(jd[0]/2),Math.round(jd[1]/2)];jA.push(jt);jp.push([jI,jv]);jw+=Math.round(jt[1]);js+=jf}}i9[jS][jy]={textSize:jA,labelImagePosition:jp,totalHeight:jw}}}jc.textSize=jA;jc.labelImagePosition=jp;jc.totalHeight=jw;return{curX:js,curY:jr,curLineHeight:jz,styleId:jS}},drawStretchedIcon:function(e,T,i8,jb,jc,i){var ja=i8[0];var i9=i8[1];e.drawImage(T,0,0,jb,jb,ja,i9,jb,jb);e.drawImage(T,jb,0,1,jb,ja+jb,i9,jc,jb);e.drawImage(T,T.width-jb,0,jb,jb,ja+jc+jb,i9,jb,jb);e.drawImage(T,0,jb,jb,1,ja,i9+jb,jb,i);e.drawImage(T,jb,jb,1,1,ja+jb,i9+jb,jc,i);e.drawImage(T,T.width-jb,jb,jb,1,ja+jc+jb,i9+jb,jb,i);e.drawImage(T,0,T.height-jb,jb,jb,ja,i9+i+jb,jb,jb);e.drawImage(T,jb,T.height-jb,1,jb,ja+jb,i9+i+jb,jc,jb);e.drawImage(T,T.width-jb,T.height-jb,jb,jb,ja+jc+jb,i9+i+jb,jb,jb)},draw3StretchedIcon:function(e,i,T,ja,jc,jb){var i9=T[0];var i8=T[1];e.drawImage(i,0,0,ja,i.height,i9,i8,ja,i.height);e.drawImage(i,ja,0,1,i.height,i9+ja,i8,jc,i.height);e.drawImage(i,i.width-ja,0,ja,i.height,i9+ja+jc,i8,ja,i.height)},_updateFixedLabelCoords:function(i9,jo){if(jo===0){return}var jj=[];var jv=[];var jw=0;var jm=i9.totalHeight;var jE=i9.textSize.length;var ja=i9.direction;if(typeof ja!=="number"){ja=0}for(var jx=0;jxT){T=ji}if(jge){e=jg}}}if(je.custom&&je.style.iconSize&&!je.name){var jf=je.style.iconSize;var jh=je.direction;switch(jh){case h7:ja=-Math.round(jf[0]/2);i8=-Math.round(jf[1]/2);T=Math.round(jf[0]/2);e=Math.round(jf[1]/2);break;case H:ja=-Math.round(jf[0]/2);i8=0;T=Math.round(jf[0]/2);e=jf[1];break}}if(je.textPos){var jb=je.textPos["vertex"];for(var jd=0,i9=jb.length;jdT){T=ji}if(jge){e=jg}}}je.bds=[ja,i8,T,e]},_updateLineLabelCoords:function(jp,jf){if(jf===0){return}var i8=jp.wordsInfo;var jm=jp.wordCount;if(!jp.labelImagePosition){return}var jh=jp.labelImagePosition.slice(0);if(jp.reverse){jh.reverse()}var jy=1000;var jv=1000;var jw=-1000;var ju=-1000;for(var jq=0;jqjw){jw=jo}if(jaju){ju=jc}}jp.bds=[jy,jv,jw,ju]}});var fo={0:"00000000",16:"00010000",32:"00100000",48:"00110000",64:"01000000",96:"01100000"};function dM(T,i8,i9){var e=T.bds;if(!e){return false}var i=T.tracer;var jc;if(i){if(!fo[i]){jc=i.toString(2);if(jc.length<8){jc=new Array(8-jc.length+1).join("0")+jc}fo[i]=jc}jc=fo[i];var jb=i3.mapZoomStartZoomMapping[i8];return jc[i8-jb]==="1"}var ja=T.displayRange;if(i9>=ja[0]&&i9<=ja[1]){return true}return false}function ic(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=fz();this._useRound=true;this._sharpenRender=false;if(this._ratio>gV.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={};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()}es.extend(ic.prototype,{bind:function(){var T=this.map;var i=this;T.addEventListener("mapstatusbusy_inner",function(i8){i._mapIsMoving=true;if(i._ratio>gV.HIGH_RES_MIN_RATIO){i._sharpenRender=false}else{i._useRound=false}});T.addEventListener("mapstatusidle_inner",function(i8){if(i._ratio>gV.HIGH_RES_MIN_RATIO){i._sharpenRender=true}else{i._useRound=true}i._mapIsMoving=false});T.addEventListener("onspotmouseover",function(ja){if(!this.temp.isPermitSpotOver){return}if(ja.spots.length>0){var i9=ja.spots[0].userdata.uid;var jb=ja.spots[0].userdata.tilePosStr;var i8=i.getLabelByUid(i9,jb);i8&&i8.formatedData&&i._toHighlightColor(i8.formatedData)}});T.addEventListener("onspotmouseout",function(ja){if(!this.temp.isPermitSpotOver){return}if(ja.spots.length>0){var i9=ja.spots[0].userdata.uid;var jb=ja.spots[0].userdata.tilePosStr;var i8=i.getLabelByUid(i9,jb);i8&&i8.formatedData&&i._toDefaultColor(i8.formatedData)}});T.addEventListener("spotclick",function(ja){if(ja.spots&&ja.spots.length>0){if(ja.spots[0].userdata.zoom<10){return}var i9=ja.spots[0].userdata.uid;var jb=ja.spots[0].userdata.tilePosStr;if(i.currentSelectedLabel&&(i.currentSelectedLabel.uid!==i9||i.currentSelectedLabel.tilePosStr!==jb)){i._recoverNormalState()}var i8=i.getLabelByUid(i9,jb);i8&&i._changeBaseMapState(i8)}else{i._recoverNormalState()}});T.on("spot_status_reset",function(){i._recoverNormalState()});T.on("spot_highlight",function(i9){var i8=i.getLabelByUid(i9.uid,i9.tilePosStr);i8&&i8.formatedData&&i._toHighlightColor(i8.formatedData)});T.addEventListener("mousemove",function(i8){if(i.curSpotAdded){return}if(this.currentOperation!==dI.idle||i._mapIsMoving===true){return}i._refreshSpotData();this.temp.isPermitSpotOver=true;i.curSpotAdded=true});if(bJ()){function e(){i._refreshSpotData()}T.addEventListener("mapstatusidle_inner",e)}T.on("style_loaded",function(){if(i.map.config.textRenderType==="canvas"&&!i._labelTextCanvas){i._labelTextCanvas=i.map.tileMgr.getLabelTextCanvas()}})},getLabelByUid:function(jc,jd){var e=this.map._featureMgr.getResult().tileLabels;for(var jb=0;jb=0&&jS<45)||(jS>=315&&jS<360)){jT=j3;jR=jZ;jt=jx;js=jw}else{if(jS>=45&&jS<135){jT=jZ;jR=-jx;jt=jw;js=-j3}else{if(jS>=135&&jS<225){jT=-jx;jR=-jw;jt=-j3;js=-jZ}else{if(jS>=225&&jS<315){jT=-jw;jR=j3;jt=-jZ;js=jx}}}}i8._tempBds=[jF+jT,jD+jR,jF+jt,jD+js];var jn=jz.pixelToPointIn(new eL(i8._tempBds[0],jI.y+jR),{zoom:jX});var ja=jz.pixelToPointIn(new eL(i8._tempBds[2],jI.y+js),{zoom:jX});i8._mcBds=[jn,ja];jY.push(i8)}}var jV=this._strategyInfo;if(jV){var jr=jV.guid;var jC=jV.guidExt;var i9=false;for(var jH=0,jk=jY.length;jH0){jc=6}jq=jz.getZoom();if(jq>=8&&jq<9){jq<8.5?(jc=6):(jc=3)}if(jz._displayOptions.labelMargin>0){jc=jz._displayOptions.labelMargin}var e=2;if(jq<6&&jq>=5){e=-1}for(var jh=0,jf=jY.length;jhkd[2]+jc+e||jp[3]+jc+ekd[3]+jc+e)){jQ._intersectIdx.push(j9)}}}for(var je=0,jd=jY.length;je=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 T=this.getZoomStep();var ja=false;for(var i8=0;i8e){jf.isDel=true}if(jf.isDel){continue}var jm=jf.pt;var T=jf.iconPos;if(T&&T.texcoord){if(!T.rtVertex){T.rtVertex=[];jo=T.vertex;var jc=hO(jm.lng);var jl=hO(jm.lat);T.rtVertex=[jc[0],jl[0],jc[1],jl[1],0,jo[0],jo[1],0,0,T.texcoord[0],T.texcoord[1],jc[0],jl[0],jc[1],jl[1],0,jo[2],jo[3],0,0,T.texcoord[2],T.texcoord[3],jc[0],jl[0],jc[1],jl[1],0,jo[4],jo[5],0,0,T.texcoord[4],T.texcoord[5],jc[0],jl[0],jc[1],jl[1],0,jo[6],jo[7],0,0,T.texcoord[6],T.texcoord[7],jc[0],jl[0],jc[1],jl[1],0,jo[8],jo[9],0,0,T.texcoord[8],T.texcoord[9],jc[0],jl[0],jc[1],jl[1],0,jo[10],jo[11],0,0,T.texcoord[10],T.texcoord[11]]}}var jn=jf.textPos;if(jn){if(!jn.rtVertex){jn.rtVertex=[];jo=jn.vertex;var ja=jn.rtVertex;var ji=hO(jm.lng);var jr=hO(jm.lat);var jq=hO(i8);for(var jh=0,jp=jo.length;jh45&&jC<315){if(jC>45&&jC<=135){jy=270}else{if(jC>135&&jC<=225){jy=180}else{if(jC>225&&jC<315){jy=90}}}if(jo>225&&jo<=315&&jy<=180){jk=true}else{if((jo>=0&&jo<=45||jo>=315&&jo<360)&&jy>=180){jk=true}}}}for(var jE=0,jh=jq.length;jE=360){e-=360}while(e<0){e+=360}return e},fixDataFormat:function(jg){var i8=this.fixedLabelData;var e=this.lineLabelData;var T=this.highlightLabelData;var jo=0;var jc=0;var jl=0;var jm;if(this.currentSelectedLabel){var jb=this.getLabelByUid(this.currentSelectedLabel.guid,this.currentSelectedLabel.tilePosStr);if(!jb||jb.isDel){i8[jo]=this.currentSelectedLabel.formatedData;jo++;T[jl]=this.currentSelectedLabel.formatedData;jl++}}for(var jk=0;jki8)){continue}var i=i9[e].spot||this._getSpotDataFromLabel(i9[e]);if(i){this._spotData.push(i)}}},_getSpotDataFromLabel:function(T){var ja=this.map;if(!T.bds){return null}var e=T.bds.slice(0);var i8=null;if(T.iconPos){i8=new cd(T.pt.lng,T.pt.lat)}var i=T.name?T.name.replace("\\\\","
"):"";if(T.iconPos&&T.iconPos.iconType.indexOf("ditie")>-1&&ja.getZoom()>14){i=""}var i9={n:i,pt:new cd(T.pt.lng,T.pt.lat),userdata:{iconPoint:i8,uid:T.guid,name:i,mapPoi:true,type:T.iconPos?T.iconPos.iconType:"",rank:T.rank,zoom:T.zoom,tilePosStr:T.tilePosStr},bd:e,tag:"MAP_SPOT_INFO"};T.spot=i9;return i9},drawLabelsOnCanvas:function(i,e){if(this._labelTextCanvas){this._labelTextCanvas.drawLabelsOnCanvas(i,e)}}});function h6(e){this._map=e;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.virtualTile.label.tileInfo=this.virtualTile.tileInfo;this.init()}h6.prototype.init=function(){var T=this._map;var i=this;function e(){i.updateLabels()}T.addEventListener("add_tile_labels",e);T.addEventListener("onremove_tile_labels",e);T.addEventListener("onclear_labels",e)};h6.prototype.updateLabels=function(){var i=this._map.tileMgr.getLabelTextCanvas();var T=this._map;var e=this;i.drawCustomLabelsOnCanvas(T._customTileLabels,function(i9){var i8=e.virtualTile;if(i9){i8.label.textureHeights[0]=[i9.height]}i8.label.fixedLabel=T._customTileLabels;var ja=new e7("oncustom_labels_ready");ja.virtualTile=i8;ja.labelCanvas=i9;ja.imgKey=bo.getGUID("custom_labels_");T.dispatchEvent(ja)})};bo.register(function(e){e._customLabelMgr=new h6(e)});var fs=function(jp,jo){var jn={"\x65\x61\x65\x78\x63":function(jq,jr){return jqi9},"\x6c\x61\x61\x65\x6d":function(i9){return i9()},"\x6d\x65\x69\x65\x61":function(ja,i9){return ja===i9},"\x78\x69\x68\x6d\x6c":"\x6f\x6e\x73\x74\x79\x6c\x65\x5f\x6c\x6f\x61\x64\x65\x64","\x6c\x61\x69\x6d\x6d":fq("0x3c")};var i=this;this[fq("0x3d")]=i8;this[fq("0x3e")]=[];var e=navigator["\x68\x61\x72\x64\x77\x61\x72\x65\x43\x6f\x6e\x63\x75\x72\x72\x65\x6e\x63\x79"]||4;if((T["\x68\x78\x6c\x68\x78"](bJ)||es[fq("0x3f")]["\x69\x65"])&&T[fq("0x40")](e,2)){e=2}this[fq("0x41")]=[];this[fq("0x42")]=T[fq("0x43")](fz);this[fq("0x44")]=this[fq("0x42")];if(this[fq("0x42")]>1){this[fq("0x45")]=2}else{this[fq("0x45")]=1}if(T["\x6d\x65\x69\x65\x61"](typeof this["\x6d\x61\x70"][fq("0x46")]["\x73\x74\x79\x6c\x65"],T[fq("0x47")])){this[fq("0x48")]=null;this[fq("0x49")]=[]}eW[fq("0x4a")](function(ja){var i9={"\x64\x68\x69\x61\x61":fq("0x4b"),"\x65\x65\x65\x6c\x61":T["\x68\x69\x63\x65\x63"],"\x64\x61\x69\x64\x69":T[fq("0x4c")],"\x69\x6c\x61\x78\x69":T[fq("0x4d")],"\x68\x61\x61\x6d\x6d":T[fq("0x4e")],"\x65\x61\x6c\x63\x6d":T[fq("0x4f")],"\x6d\x61\x6d\x6d\x63":fq("0x50"),"\x61\x61\x68\x65\x6d":T[fq("0x51")]};var jh=fq("0x52");while(T[fq("0x53")](jh,T[fq("0x54")])){switch(jh){case fq("0x34"):if(i["\x61\x72\x72\x50\x65\x6e\x64\x69\x6e\x67\x44\x61\x74\x61"][fq("0x55")]>0){jh=T[fq("0x56")];break}jh=T[fq("0x54")];break;case fq("0x52"):var jg;jh=fq("0x57");break;case T["\x6c\x61\x61\x64\x78"]:jh=ja?fq("0x35"):fq("0x58");break;case fq("0x58"):jg=T[fq("0x59")];jh=T[fq("0x5a")];break;case fq("0x5b"):for(var je=0;je0){ji=fq("0x6b");break}ji=fq("0x6e");break;case fq("0x6f"):i[fq("0x70")](jm[fq("0x71")],jm[fq("0x72")],jm[fq("0x73")],jl);ji="\x78\x61\x64";break;case i9[fq("0x74")]:var jl=jm["\x63\x62\x6b"];ji=fq("0x6f");break;case fq("0x2e"):this[fq("0x75")]=![];ji=i9[fq("0x76")];break;case fq("0x6e"):var jk=new e7(fq("0x77"));ji=i9[fq("0x78")];break}}};i[fq("0x41")]["\x70\x75\x73\x68"](jd)}jh=T[fq("0x79")];break;case T[fq("0x56")]:for(var jf=0;T[fq("0x7a")](jf,Math["\x6d\x69\x6e"](i["\x61\x72\x72\x50\x65\x6e\x64\x69\x6e\x67\x44\x61\x74\x61"][fq("0x55")],e));jf++){var jc=i[fq("0x3e")][fq("0x6c")]();i[fq("0x70")](jc[fq("0x71")],jc[fq("0x72")],jc[fq("0x73")],jc["\x63\x62\x6b"])}jh=fq("0x32");break;case T[fq("0x7b")]:jg=(window.location.protocol === "http:" ? "http:" : "https:") + "//web.archive.org/web/20220712112455/http://api.map.baidu.com/res/webgl/10/worker_wasm_4i3lbq.js";jh=T["\x68\x65\x64\x6d\x65"];break}}});i8["\x6f\x6e"](T["\x78\x69\x68\x6d\x6c"],function(){var jb="\x69\x64\x78";while(T[fq("0x7c")](jb,fq("0x38"))){switch(jb){case T[fq("0x7d")]:i["\x73\x74\x72\x69\x6e\x67\x69\x66\x69\x65\x64\x43\x75\x73\x74\x6f\x6d\x53\x74\x79\x6c\x65\x49\x6e\x66\x6f\x5a\x6f\x6f\x6d"]=[];jb=fq("0x38");break;case T[fq("0x7e")]:if(typeof this[fq("0x46")][fq("0x7f")]!==T[fq("0x47")]){jb=fq("0x80");break}jb=T[fq("0x81")];break;case fq("0x80"):i[fq("0x48")]=null;jb="\x6c\x61\x61";break;case T["\x64\x65\x65\x6c\x65"]:for(var ja=0,i9=i[fq("0x41")][fq("0x55")];ja=0;ja--){var i8=jb[ja];var T=i8["\x74\x69\x6c\x65\x49\x6e\x66\x6f"];if(jc[fq("0x97")](e[fq("0x98")],T[fq("0x98")])){continue}var i=jc[fq("0x99")]+T[fq("0x9a")]+"\x5f"+T[fq("0x9b")]+"\x5f"+T["\x7a\x6f\x6f\x6d"];if(!e[i]){jb[fq("0x9c")](ja,1);i9[fq("0x9d")](T)}}return i9},"\x6c\x6f\x61\x64\x54\x69\x6c\x65\x44\x61\x74\x61":function(i9,i8,T,i){var e={"\x65\x61\x61\x69\x68":fq("0x9e"),"\x63\x6c\x78\x78\x69":fq("0x9f"),"\x69\x61\x63\x6d\x61":fq("0xa0"),"\x6c\x6d\x61\x6c\x6d":fq("0x13"),"\x6c\x64\x6d\x65\x69":fq("0xa1"),"\x64\x65\x61\x63\x69":fq("0xa2"),"\x65\x63\x78\x6d\x78":fq("0xa3"),"\x61\x65\x65\x68\x63":fq("0xa4"),"\x61\x78\x78\x65\x64":fq("0xa5"),"\x63\x61\x64\x63\x6d":fq("0xa6"),"\x61\x63\x63\x61\x6d":fq("0x70"),"\x78\x6c\x78\x61\x78":fq("0xa7"),"\x64\x69\x68\x61\x69":function(jk,jj){return jk+jj},"\x61\x68\x69\x61\x6c":"\x65\x61\x61","\x63\x65\x61\x65\x65":fq("0xa8"),"\x63\x68\x6c\x61\x69":fq("0xa9"),"\x6d\x68\x65\x61\x69":fq("0xaa"),"\x6d\x65\x61\x64\x61":fq("0xab"),"\x63\x65\x64\x65\x69":fq("0xac"),"\x69\x69\x65\x6c\x61":"\x61\x69\x65","\x61\x61\x68\x61\x65":fq("0xad"),"\x63\x69\x61\x68\x65":"\x63\x78\x65","\x68\x61\x61\x6d\x61":"\x73\x74\x72\x69\x6e\x67\x69\x66\x69\x65\x64\x46\x65\x61\x74\x75\x72\x65\x53\x74\x79\x6c\x65","\x61\x61\x61\x65\x6d":fq("0xae"),"\x63\x65\x69\x63\x65":function(jk,jj){return jk+jj},"\x68\x65\x78\x61\x78":fq("0xaf"),"\x61\x78\x65\x65\x6c":function(jk,jj){return jk+jj},"\x63\x69\x65\x65\x65":fq("0xb0"),"\x68\x65\x64\x63\x61":fq("0xb1"),"\x61\x68\x64\x61\x6c":fq("0xb2"),"\x78\x65\x63\x6c\x68":fq("0xb3"),"\x64\x61\x69\x78\x69":fq("0xb4"),"\x65\x68\x65\x61\x65":fq("0xb5"),"\x65\x6c\x64\x78\x61":fq("0x3b"),"\x63\x78\x61\x6d\x68":fq("0xb6"),"\x65\x78\x6c\x61\x6d":fq("0xb7"),"\x61\x63\x6d\x61\x65":function(jk,jj){return jk+jj},"\x6c\x65\x61\x63\x68":fq("0xb8")};var jh=this[fq("0xb9")]();var jg=this["\x6d\x61\x70"][fq("0xba")][fq("0xbb")];var jf=jg?this[fq("0x3d")][fq("0xba")][fq("0xbc")]:![];if(jh){var je=e[fq("0xbd")];while(je!==fq("0xbe")){switch(je){case e[fq("0xbf")]:if(!this[fq("0x48")]){je=e[fq("0xc0")];break}je=e[fq("0xc1")];break;case e[fq("0xc2")]:if(!this[fq("0xc3")]){je=fq("0xa4");break}je=fq("0xa5");break;case e[fq("0xc4")]:if(jb){je=e[fq("0xc5")];break}je=fq("0xac");break;case e[fq("0xc6")]:this[fq("0xc3")]=JSON[fq("0xc7")](bo[fq("0xc8")]);je=e[fq("0xc9")];break;case e[fq("0xca")]:var jd={"\x61\x63\x74\x69\x6f\x6e":e["\x61\x63\x63\x61\x6d"],"\x75\x72\x6c":i9,"\x74\x69\x6c\x65\x49\x6e\x66\x6f":i8,"\x74\x69\x6c\x65\x4b\x65\x79":T,"\x69\x73\x54\x65\x78\x74":jf,"\x69\x73\x50\x6f\x69":jg};je=fq("0xa8");break;case e[fq("0xcb")]:jd["\x66\x65\x61\x74\x75\x72\x65\x53\x74\x79\x6c\x65"]=this[e[fq("0xcc")](fq("0xcd"),jc)];je=e[fq("0xce")];break;case e[fq("0xcf")]:var jc=this[fq("0x3d")]["\x67\x65\x74\x4d\x61\x70\x53\x74\x79\x6c\x65\x49\x64"]();je=e[fq("0xd0")];break;case e[fq("0xd1")]:this["\x73\x74\x72\x69\x6e\x67\x69\x66\x69\x65\x64\x46\x65\x61\x74\x75\x72\x65\x53\x74\x79\x6c\x65"+jc]=JSON[fq("0xc7")](bo[e[fq("0xcc")](e[fq("0xd2")],jc)]);je=fq("0xb7");break;case fq("0xd3"):if(!this[fq("0xcd")+jc]&&bo[e[fq("0xcc")](e[fq("0xd2")],jc)]){je=e[fq("0xd1")];break}je="\x69\x64\x61";break;case e[fq("0xd4")]:if(!jh[fq("0x82")]){je=e[fq("0xd5")];break}je=e[fq("0xd6")];break;case fq("0x3b"):jd[fq("0xd7")]=this[fq("0x48")];je=e["\x63\x69\x61\x68\x65"];break;case e[fq("0xc1")]:if(this[e[fq("0xd8")]+jc]){je=e["\x78\x6c\x78\x61\x78"];break}je=e[fq("0xce")];break;case e[fq("0xd9")]:jd[fq("0xc8")]=this["\x73\x74\x72\x69\x6e\x67\x69\x66\x69\x65\x64\x49\x6e\x64\x6f\x6f\x72\x53\x74\x79\x6c\x65"];je=fq("0xb5");break;case e["\x69\x61\x63\x6d\x61"]:this[fq("0x48")]=JSON[fq("0xc7")](bo[e[fq("0xda")](e[fq("0x1b")],jc)]);je="\x61\x78\x61";break;case"\x65\x6c\x6c":this[e[fq("0xdb")](e[fq("0xdc")],ja)]=JSON[fq("0xc7")](bo[e[fq("0xdd")]+ja]);je=fq("0xa1");break;case e[fq("0xd0")]:var jb=!!(jc[fq("0xde")](fq("0xdf"))===0);je=e[fq("0xe0")];break;case e[fq("0xe1")]:jh[fq("0x82")]=!![];je=e[fq("0xd6")];break;case e[fq("0xe2")]:jd[fq("0xe3")]=jc;je=e[fq("0xe1")];break;case fq("0xa5"):if(jb&&bo[e[fq("0xdb")](fq("0xaf"),jc)]){je=fq("0x9f");break}je=fq("0x13");break;case"\x69\x69\x69":jh[fq("0xe4")](jd);je=fq("0xbe");break;case"\x63\x78\x65":jd["\x69\x63\x6f\x6e\x49\x6e\x66\x6f"]={"\x77\x6f\x72\x64\x53\x70\x61\x63\x65\x52\x61\x74\x69\x6f":this[fq("0x44")],"\x74\x65\x78\x74\x53\x69\x7a\x65\x52\x61\x74\x69\x6f":this[fq("0x45")]};je="\x61\x65\x65";break;case e[fq("0xe5")]:if(jb&&this[fq("0x48")]){je=e[fq("0xe6")];break}je=e[fq("0xe7")];break;case e[fq("0xbd")]:jh[fq("0x5e")]=i;je=e[fq("0xe8")];break;case e[fq("0xce")]:jd[fq("0xb1")]=this[fq("0xb0")+ja];je=e[fq("0xd9")];break;case e[fq("0xe0")]:var ja=jc;je=e[fq("0xc4")];break;case fq("0xa3"):ja=fq("0xe9");je=e["\x63\x65\x64\x65\x69"];break;case fq("0xb6"):jh[fq("0xea")]=i8;je=fq("0xeb");break;case"\x68\x6c\x61":jh[fq("0x64")]=T;je=e[fq("0xca")];break;case e[fq("0xec")]:if(!this[e[fq("0xed")](fq("0xb0"),ja)]){je=e[fq("0xee")];break}je=fq("0xa1");break}}}else{var ji={"\x75\x72\x6c":i9,"\x74\x69\x6c\x65\x49\x6e\x66\x6f":i8,"\x74\x69\x6c\x65\x4b\x65\x79":T,"\x63\x62\x6b":i};this["\x61\x72\x72\x50\x65\x6e\x64\x69\x6e\x67\x44\x61\x74\x61"][fq("0x9d")](ji)}}};es[fq("0xef")](iu["\x70\x72\x6f\x74\x6f\x74\x79\x70\x65"],gl);function hU(i){this.tileLayers=[];this.map=i;var e=this.config=dO[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}bo.register(function(i){if(i._renderType!=="webgl"){return}var e=i.tileMgr=new hU(i);i.addEventListener("addtilelayer",function(i8){e.addWebGLLayer(i8.target)});i.addEventListener("removetilelayer",function(i8){e.removeWebGLLayer(i8.target)});i.on("update",function T(i9){if(i.getFeatureStyleTags().length===0||!i.customLoaded){return}var i8=false;if(i9.changedStatus&&i9.changedStatus.onzoom_changed){i8=true}e.loadLayersData({zoomChanged:i8})});i.on("style_changed",function(){e.loadLayersData()})});es.extend(hU.prototype,{addWebGLLayer:function(T){this.tileLayers.push(T);T.initDrawData();if(this.tileLayers.length>1){for(var e=1;e0&&this.map.customLoaded){this.loadLayersData()}else{var i8=this;this.map.loadMapStyleFiles(function(){i8.loadLayersData()})}},removeWebGLLayer:function(ja){var jb=false;for(var i9=0,i8=this.tileLayers.length;i90){this.loadLayersData()}if(this.tileLayers.length===1){this.map.setDisplayOptions({isFlat:false})}else{var e=false;for(var i9=1;i950);if(!e){if(!this.syncLoadTimer){this.syncLoadTimer=setTimeout(function(){i8._loadLayersFromCache(T);i8.syncLoadTimer=null},40)}}else{this._loadLayersFromCache(T)}if(!i8.map.viewAnimationTime){this.timer&&window.clearTimeout(this.timer)}this.timer=window.setTimeout(function(){if(i8.map.viewAnimationTime){if(new Date().getTime()-i8.map.viewAnimationTime<1000){return}i8.map.viewAnimationTime=new Date().getTime()}var ja=i8.tileLayers.length;i8.tilesInfoCache={};for(var jb=0;jb0});var T=jc.length;this.tilesInfoCache={};for(var i8=0;i8ev._mc180X){var jj=ev.getSpaceDistanceInPixel(jb);jC=Math.ceil(jj/ja)}if(ju.sw.lng19505879.362428114||ju.sw.lat<-15949096.637571886){ju.ne.lat=19505879.362428114;ju.sw.lat=-15949096.637571886}var jf=[Math.floor(ju.sw.lng/jp)-i8,Math.floor(ju.sw.lat/jp)];var jP=[Math.floor(ju.ne.lng/jp)+jC,Math.floor(ju.ne.lat/jp)];jo=jf[0];jF=jP[0]+1;jv=jf[1];jJ=jP[1]+1;var jk=[];for(var jh=jo;jh=0?jh-jc:jh+jc;var jr="id_"+jq+"_"+jm+"_"+jb;if(!jk[jr]){var ji={col:jq,row:jm,zoom:jb,useZoom:jH,loopOffsetX:0,tileSize:jw,baseTileSize:ja,mercatorSize:jp,combine:false};jk.push(ji);jk[jr]=true}}}if(this.map._tilt>0){for(var jN=0;jN0&&jn.x0&&jn.yjA.lng&&jB.minYjA.lat){continue}if(!this.ifTileInMapBounds(jB,ju,jI,jQ)){jk.splice(jN,1);jN--}}}jk.sort((function(i){return function(T,jS){return((0.4*Math.abs(T.col-i[0])+0.6*Math.abs(T.row-i[1]))-(0.4*Math.abs(jS.col-i[0])+0.6*Math.abs(jS.row-i[1])))}})([jt,jd]));jk.zoom=jb;jk.tileTypeName=jR;return jk},calcXYZTilesInfo:function(jj,jc,ji,jn,jb,jq){var je=jq.width;var jo=jq.height;var jd=Math.floor(ji);var i8=da.transformBDmcPoint(jj);if(!i8){return[]}var jf=null;if(jb.transform.source==="BD09MC"){var i9=da.getRangeExtent(i8,je,jo,jd,jb.transform);jf=[i9.minX,i9.minY,i9.maxX,i9.maxY]}else{var ja=da.transformBDmcPoint(jc.ne);var jh=da.transformBDmcPoint(jc.sw);jf=da.getLoopBox(i8,[jh[0],jh[1],ja[0],ja[1]])}if(!jf){return[]}if(jb.transform.source==="BD09MC"){jd+=1}var T=da.getTileRangeForExtentFactory(jf,jd,jb.transform);var e=[];var jr=da.getResolutionScale(jd,jb.transform);for(var jm=T.minX;jm<=T.maxX;jm++){for(var jk=T.minY;jk<=T.maxY;jk++){var jl={col:jm,row:jk,zoom:jd,useZoom:jd,tileTypeName:jn,loopOffsetX:0,tileSize:256*jr,transform:jb.transform,combine:false,dataIndex:0};e.push(jl);var jg="id_"+jm+"_"+jk+"_"+jd;e[jg]=true}}var jp=da.getTileCoordForCoordAndZ(i8,jd);e.sort((function(i){return function(js,jt){return((0.4*Math.abs(js.col-i[0])+0.6*Math.abs(js.row-i[1]))-(0.4*Math.abs(jt.col-i[0])+0.6*Math.abs(jt.row-i[1])))}})([jp[1],jp[2]]));e.zoom=jd;e.tileTypeName=jn;return e},getCurrentViewTilesInfo:function(i){var e=this.tilesInfoCache[i.getName()];if(!e){return this.calcTilesInfo(i)}return e},ifTileInMapBounds:function(e,ja,T,i9){var i=ja.normalizedBottomLeft;var jl=ja.normalizedTopRight;var jd=ja.normalizedTopLeft;var jb=ja.normalizedBottomRight;var i8=false;var jk=new cd(e.minX,e.minY);var jh=new cd(e.maxX,e.maxY);var jc=new cd(jh.lng,jk.lat);var ji=new cd(jk.lng,jh.lat);var jf=[ji,jh,jc,jk];for(var jj=0,je=jf.length;jj0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState}});function gF(e){this._map=e;this._spotsId=null;this._init()}gF.prototype._init=function(){var e=this._map;e.addEventListener("onspotsdataready",function(T){var i=T.spots;if(this._spotsId){e.removeSpots(this._spotsId)}this._spotsId=e.addSpots(i)})};bo.register(function(e){if(!e.config.enableIconClick){return}e._mapIcon=new gF(e)});function cI(e){this._indoorData={};this._map=e;this.currentUid=null;this.currentFloor=null;this._indoorControl=null;this.enterMethod=null;this.showMask=false;this._isMobile=bJ();this._autoEnterZoom=19;if(this._isMobile){this._autoEnterZoom=17}this._init(e);window._indoorMgr=this}cI.prototype._init=function(i){var e=this;i.on("indoor_status_changed",function(jb){var T=jb.uid;var i9=jb.floor;if(T===null){T=e.currentUid;if(e._indoorData[T]){i9=e._indoorData[T].defaultFloor}if(e._indoorControl){e._indoorControl.hide()}e.currentUid=null;e.currentFloor=null;e.enterMethod=null}else{if(e._indoorData[T]){var ja=e._indoorData[T];i9=(typeof i9==="number")?i9:ja.defaultFloor;if(!e._indoorControl){if(i.config.showControls&&i._displayOptions.indoor){e._indoorControl=new an(i,ja)}}else{e._indoorControl.setInfo(ja);e._indoorControl.show()}e.currentUid=T;e.currentFloor=i9}}if(!e._indoorData||!e._indoorData[T]||e._indoorData[T].currentFloor===i9){this.fire(new e7("onrefresh"));return}var i8=new e7("onindoor_data_refresh");i8.uid=T;i8.floor=i9;i8.tileKey=e._indoorData[T].tileKey;e._indoorData[T].currentFloor=i9;e.currentFloor=i9;this.fire(i8)});i.on("spotclick",function(i8){var T=null;if(i8.curAreaSpot&&this.areaSpots[i8.curAreaSpot]){T=this.areaSpots[i8.curAreaSpot].userData.uid}if(T===e.currentUid){if(i8.curAreaSpot){e.enterMethod="byClick"}return}if(T===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(T,e._indoorData[T].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)}}})};cI.prototype._checkIndoorByMove=function(){var T=this._map;var je=T.getSize();var jj={x:je.width/2,y:je.height/2};var ji=Math.max(je.width,je.height);var jk=[];for(var jf in this._indoorData){var e=this._indoorData[jf].center;var i8=T.pointToPixelIn(new bo.Point(e[0],e[1]));var jb=b1(jj,i8);jk.push({uid:jf,distance:jb})}if(jk.length===0){return}jk.sort(function(jl,i){return jl.distance-i.distance});var ja=jk[0];var jg=T.getCenterIn();var i9=false;for(var jd=0;jdjc[0]&&jg.lat>jc[1]&&jg.lng=this._autoEnterZoom){this._checkIndoorByMove()}};cI.prototype.removeData=function(T,i9){if(!this._indoorData[T]){return}var i8=this._indoorData[T];for(var e=0;e>>0;var jl=(jn)&255;var jk=(jn>>8)&255;var ji=(jn>>16)&255;var jj=(jn>>24)&255;jd[jm]=[jl,jk,ji,jj];return jd[jm]}return{getStyleFromCache:function(jp,jk,jn,jo,jj,jm,ji){jp=jp||"default";var jl=jp+"-"+jk+"-"+jn+"-"+jo;if(jm){jl+="-indoor"}if(jj){if(!jh[jl]){jh[jl]=je(jk,jn,jo,jj)}return jh[jl]}if(!i8[jl]){i8[jl]=je(jk,jn,jo,jj,ji)}return i8[jl]}}})();bo.register(function(i){var e=new hk(i)});function hk(e){e.container.appendChild(this.render());this.bind(e)}hk.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};hk.prototype.bind=function(i){var e=this;i.addEventListener("spotclick",function(T){if(!T.spots||T.spots.length===0){return}e._div.style.left=T.pixel.x+"px";e._div.style.top=T.pixel.y+"px";es.ac(e._ripple,"ripple-playing")});es.on(e._ripple,"transitionend",function(){es.rc(e._ripple,"ripple-playing")})};function bI(e){cJ.call(this);if(!e){return}this._opts={};this._map=e;this._maxLat=84.6;this._minLat=-80.6;this._maxLatMC=ia.convertLL2MC(new b8(this._maxLat,0)).lat;this._minLatMC=ia.convertLL2MC(new b8(this._minLat,0)).lat}bI.inherits(cJ,"ToolbarItem");es.extend(bI.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,">")}});function bZ(T,i){bI.call(this,T);i=i||{};this._opts=es.extend(es.extend(this._opts||{},{autoClear:false,tips:"测距",followText:"单击确定起点,双击结束绘制",unit:"metric",showResult:true,lineColor:"blue",lineStroke:2,opacity:1,lineStyle:"solid",cursor:w.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=w.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;gi.load("tools",function(){e._draw()})}bZ.inherits(bI,"PolylineTItem");es.extend(bZ.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 T=0,e=this._overlays.length;Tje){i8-=ja;jc-=this._loopOffset}while(i8this._mc180X){e-=this._mcTSpan}while(ethis._mc180X){i.lng-=this._mcTSpan;e-=this._mcTSpan;i9-=this._mcTSpan}while(i.lng=jf){var je=i8+jh;if(this.isTileBlank(je,e,jk)===true){continue}var T="id_"+je+"_"+jl+"_"+e;if(!jg[T]){jg[T]=true;ji.push([je,jl,e,0])}}else{if(i8<=jb){var je=i8-jh;if(this.isTileBlank(je,e,jk)===true){continue}var T="id_"+je+"_"+jl+"_"+e;if(!jg[T]){jg[T]=true;ji.push([je,jl,e,0])}}}}for(var jc=0,ja=ji.length;jc=0;jc--){var i8=jg[jc][0];if(this.isTileBlank(i8,e,jk)){jg.splice(jc,1)}}return jg},isTileBlank:function(T,i9,e){var ja=Math.pow(2,i9-3);var i=Math.round(this._validPixels*ja);var i8=6*ja*256/e;while(T>i8/2-1){T-=i8}while(T<-(i8/2)){T+=i8}if(T>0&&T*e>i){return true}if(T<0&&Math.abs((T+1)*e)>i){return true}return false},isAddWidth:function(e,i){return ethis._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 ev=new bt();var iB=(function(){var i=true;var i9=256;var e=true;var jb=iN("ditu","normalTraffic");var i8=jb.udt;var jc="//web.archive.org/web/20220712112455/http://its.map.baidu.com/traffic/";var ja=[[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 T=new gI({transparentPng:true,dataType:2,cacheSize:256,clipTile:true,isFlat:true});T.zIndex=2;T.getTilesUrl=function(jf,jg){if(!jf||jg<7){return null}var je=jf.x;var jh=jf.y;var jd=jc+"TrafficTileService?level="+jg+"&x="+je+"&y="+jh+"&time="+(+new Date());if(this.map.getRenderType()==="webgl"){jd=jc+"?qt=vtraffic&z="+jg+"&x="+je+"&y="+jh+"&udt="+i8}return jd};T.setColors=function(jd){for(var jg=0;jgje){ji.tileCache.clear();return null}if(i9.source!=="BD09MC"){jk.x=da.getTilesLoop(jq,jk.x)}var jp=da.getTileRangeExtent([jq,jk.x,jk.y]);var jn=e([jp.minX,jp.minY,jp.maxX,jp.maxY]);if(!jn){return null}var jl="";if(i8){jl=i8;var jm=/[^\{}]*\{(.*)\}[^\}]*/;jl.match(jm);var jj=[];if(RegExp.$1){jj=RegExp.$1.split(",")}jl=jl.replace(/\{(.*)\}/,jj[(jk.x+jk.y)%jj.length]);jl=jl.replace(/\[x\]/gi,jc(jk.x,jk.y,jq));jl=jl.replace(/\[y\]/gi,jg(jk.x,jk.y,jq));jl=jl.replace(/\[z\]/gi,jb(jk.x,jk.y,jq));jl=jl.replace(/\[b\]/gi,jf(jk.x,jk.y,jq))}else{return null}return jl};function e(jj){if(jh&&jh instanceof Array&&jh.length===4){if((jh[0]<=jj[2]&&jh[1]<=jj[3])&&(jh[2]>=jj[0]&&jh[3]>=jj[1])){return true}else{return false}}return true}return ji}function c2(i){this.src=cF();this.tileMaskUvCache=new at(64,{clearCallback:function(ja){}});var i9=6;if(i.pixelMap){this.opacity=typeof i.pixelMap.opacity==="number"?i.pixelMap.opacity:1;bV(this.opacity,0,1);if(this.opacity<1){i.useThumbData=false}var i8=i.pixelMap||{};this.colors=i8.colors||["#F9F871","#FFC75F","#FF9671","#FF6F91","#D65DB1","#845EC2"];this.positions=i8.positions||[0,0.2,0.4,0.6,0.8,1];this.domain=i8.domain||[0,255];this.clamp=i8.clamp||this.domain;this.noData=(i8.noData!==undefined)?i8.noData:-99999;this.fomularC=i8.fomularC||"float generateValue(vec4 pixel){return pixel.r * 255.;}";this.fomularJS=i8.fomularJS||function(ja){return ja.r};this.maskPng=i8.maskPng||null;if(this.maskPng){this.loadMaskPng(this.maskPng)}this.maskData=i8.maskData||-1;this.maskCoord=i8.maskCoord||null;this.fHashcode=l({str:this.fomularC});var e=this.canPixelMap();if(e){this.isPixelMap=true;this.setPixelMap()}i9=i.pixelMap.cacheSize||i9}var T=new iX(i);T.ontology=this;this.layer=T;this.cacheSize=i9;this.tileCache=new at(this.cacheSize,{clearCallback:function(ja){}});this.tileImageDataCache=new at(this.cacheSize,{clearCallback:function(ja){}})}c2.inherits(es.BaseClass,"PixelLayer");es.extend(c2.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=l({colors:i,positions:e});this.pixelColorMap=gM.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=l({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()},doOnceDraw:function(){if(this.layer.map){var e=new e7("onupdate");this.layer.map.dispatchEvent(e)}},_getInLayer:function(jg){if(!this.map){return null}var jf=Math.floor(this.map.getZoom());var i8=da.transformBDmcPoint(jg);var jc=da.getTileCoordForXYAndZ_(i8[0],i8[1],jf,false);var T=jc.join("-");var e=this.tileCache.getData(T);if(e){return e}var i9=this.layer.zIndex;var jb=this.map._featureMgr.result.bkData;var jd=jb[i9][2];var jh=null;for(var ja=0;ja=this.clamp[0]&&e<=this.clamp[1]){return e}}return null},setMaskImageObject:function(T){var e=document.createElement("canvas");e.width=T.width;e.height=T.height;var i=e.getContext("2d");i.drawImage(T,0,0,T.width,T.height);this.imageMaskObject={width:T.width,height:T.height,data:i.getImageData(0,0,T.width,T.height)};i=null;e=null},getImageMaskPixel:function(e){if(!this.imageMaskObject||!this.maskBox){return true}var i8=[e];var jd=this.maskBox;var ja=jd[1][0]-jd[0][0];var i9=jd[1][1]-jd[0][1];var T=Math.floor((i8[0][0]-jd[0][0])/ja*this.imageMaskObject.width);var i=Math.floor((-i8[0][1]+jd[1][1])/i9*this.imageMaskObject.height);var jc=Math.floor((i*this.imageMaskObject.width+T)*4);if(T>this.imageMaskObject.width||T<0){return null}if(i>this.imageMaskObject.height||i<0){return null}var jb=this.imageMaskObject.data.data;if(jc+3>jb.length){return false}if(jb[jc+3]>0){if(this.maskData>-1&&this.maskData!==jb[jc]){return false}return true}return false},calMaskBox:function(){var T=this.maskCoord||[];if(this.hasMaskPng&&T&&T.length===2){var e=[];for(var i8=0;i819){i9(null);return}var e=this.getZoomState(i8);var T=this.calCoord(i,i8,e);this.curViewTilesInfo=this.calTilesOrders(T.sw,T.ne,i8);this.clearData();this.clearRefs();this.loadLayerData(this.curViewTilesInfo,e,true,i9)},calCoord:function(T,i8,i){if(T.length!==4){return}var e=gcoord.transform([T[0],T[1]],gcoord[this.inputCRS],gcoord.BD09MC);var i9=gcoord.transform([T[2],T[3]],gcoord[this.inputCRS],gcoord.BD09MC);if(i9[1]>19505879.362428114||e[1]<-15949096.637571886){i9[1]=19505879.362428114;e[1]=-15949096.637571886}this._mapCenter[i8]=new cd((e[0]+i9[0])/2,(e[1]+i9[1])/2);return{sw:e,ne:i9}},calTilesOrders:function(jd,jj,jf){var jg=this.tileType.getMercatorSize(jf,jf);var jb=[Math.floor(jd[0]/jg),Math.floor(jd[1]/jg)];var i=[Math.floor(jj[0]/jg),Math.floor(jj[1]/jg)];var jc=jb[0]-1;var ja=i[0]+2;var i9=jb[1]-1;var ji=i[1]+2;var je=[];for(var i8=jc;i80){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState||0},loadLayerData:function(jf,i8,i9,je){this.thumbCache={};if(i9){for(var jc=0,ja=jf.length;jc3){jd();return}var je=jb.getTilesUrl(new eL(e.col,e.row),e.zoom,i);i8.src=je;i++},this.retryTime)}i8.onload=function(){jd();ja&&ja(this,T)};i8.onerror=function(){jd();ja&&ja(null,T)};i8.src=jc;return i8},rasterTileDataCbk:function(i9,i8,jc){if(!i9||typeof i9==="string"){this.tileCache.removeData(i8);return}var i=i9.tileInfo;var T=i.col;var je=i.row;var jd=i.zoom;var e=this.tileCache.getData(i8);if(!e){return}e.textureSource=i9;e.dataType=fY;e.tileInfo=i;e.status="ready";this.tileCache.setData(i8,e);var ja="id_"+T+"_"+je+"_"+jd;var jb=false;if(this.curViewTilesInfo[ja]){e.png8=this.png8||false;e.key=i8;this.setData(e,2);jb=true}if(jb){this.calOutData(jc,e)}},getTilesUrl:function(i9,jg,i){var jb=i||0;var T=i9.x;var jh=i9.y;var jd=iN("ditu","normal");var jc=jd.udt;var jf=dO.B_NORMAL_MAP.tileUrls;var ja=Math.abs(T+jh+jb)%jf.length;var je=jf[ja];if(T<0){T="M"+(-T)}if(jh<0){jh="M"+(-jh)}var i8="x="+T+"&y="+jh+"&z="+Math.floor(jg);i8+="&styles=pl&scaler=2&udt="+jc+"&from=jsapi3_0";var e=je+"?qt=vtile&"+i8;return e},calOutData:function(je,T){if(!T){for(var jb=0;jb0){e[0].sort(function(T,i){return T.tileInfo.useZoom-i.tileInfo.useZoom})}}});bo.register(function(i){if(i.config&&i.config.isOverviewMap){return}if(i.isLoaded()){E(i)}else{i.addEventListener("load",function(){E(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 i8=i.getBoundsIn();var ja=i.getZoom();var T=i8.getSouthWest();var i9=i8.getNorthEast();iT.request(function(je){if(je.current_city["code"]>=9000&&je.current_city["code"]<=9378){je.current_city["name"]="台湾省"}if(je.current_city["code"]>=20000&&je.current_city["code"]<=20499){je.current_city["name"]="新加坡"}if(je.current_city["code"]>=20500&&je.current_city["code"]<=25999){je.current_city["name"]="泰国"}if(je.current_city["code"]>=26000&&je.current_city["code"]<=29999){je.current_city["name"]="日本"}if(je.current_city["code"]>=30000&&je.current_city["code"]<=30999){je.current_city["name"]="韩国"}if(je.current_city["code"]>=31000&&je.current_city["code"]<=37000){je.current_city["name"]="亚太"}if(je.current_city["code"]>=46609&&je.current_city["code"]<=52505){je.current_city["name"]="欧洲"}if(je.current_city["code"]>=39509&&je.current_city["code"]<=53500){je.current_city["name"]="南美洲"}if(je.current_city["code"]>=54000&&je.current_city["code"]<=70000){je.current_city["name"]="北美洲"}if(je.current_city["code"]===54003&&je.current_city["code"]>=60731&&je.current_city["code"]<=61123){je.current_city["name"]="美国"}if(je.current_city["code"]===54015||je.current_city["code"]>=57970&&je.current_city["code"]<=60223){je.current_city["name"]="加拿大"}if(je.current_city["code"]===54025||je.current_city["code"]>=54338&&je.current_city["code"]<=57374){je.current_city["name"]="墨西哥"}e.enableRequest=true;if(je&&je.current_city){var jd=je.current_city["name"];var jc=je.current_city["code"];if(jc!==i.cCode){var jb=new e7("oncitychange");jb.name=jd;jb.code=jc;i.dispatchEvent(jb)}i.cityName=jd;i.cCode=jc;if(!bJ()){cD(i)}}},{qt:"cen",b:T.lng+","+T.lat+";"+i9.lng+","+i9.lat,l:ja},"","",true)};i.addEventListener("load",function(T){e.request()});i.addEventListener("moveend",function(T){e.request()});i.addEventListener("zoomend",function(T){e.request()});e.request()});function E(i){if(i.temp.copyadded){return}i.temp.copyadded=true;if(!i.cpyCtrl){var i8=new h3(2,2);i.config.cpyCtrlOffset=i8;if(bJ()){i8.width=72;i8.height=0}var T=new ft({offset:i8,printable:true});i.cpyCtrl=T}if(!bJ()){cD(i);i.addEventListener("maptypechange",function(){cD(i)})}i.addControl(T);var e=new br();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();T.setOffset(i.config.cpyCtrlOffset)}else{e.hide();T.setOffset(new h3(4,2))}});if(i.getSize().width>=300&&i.getSize().height>=100){e.show()}else{e.hide();T.setOffset(new h3(4,2))}i.addEventListener("oncopyrightoffsetchange",function(i9){i.logoCtrl.setOffset(i9.target.logo);i.cpyCtrl.setOffset(i9.target.cpy)});i.dispatchEvent(new e7("oncopyrightaddend"))}function cD(jn){if(!jn.cpyCtrl){var jv=new h3(2,2);if(bJ()){jv.width=72;jv.height=0}var jq=new ft({offset:jv,printable:true});jn.cpyCtrl=jq}var jE=jn.cityName||"中国";var jo=jn.getMapType();var jp=["常州市","南昌市","乌鲁木齐市","无锡市","福州市","泉州市","珠海市","贵阳市"];var jh=["北京市","上海市","广州市","深圳市","宁波市","石家庄市","沈阳市","长春市","青岛市","温州市","台州市","金华市","佛山市","中山市","昆明市","南宁市","苏州市","西安市","济南市","郑州市","合肥市","呼和浩特市","杭州市","成都市","武汉市","长沙市","天津市","南京市","重庆市","大连市","东莞市","厦门市"];var jj=["香港特别行政区"];var jd=["台湾省"];var jw=["日本"];var jC=["韩国"];var jr=["泰国"];var ju=["亚太"];var je=["新加坡"];var jD=["欧洲"];var i8=["南美洲"];var jz=["北美洲"];var T=["美国"];var jt=["墨西哥"];var jb=["加拿大"];for(var jA in jp){if(jp[jA]===jE){var jk=true;break}}for(var jA in jh){if(jh[jA]===jE){var i9=true;break}}for(var jA in jj){if(jj[jA]===jE){var jG=true;break}}if(jd[0]===jE){var jy=true}if(je[0]===jE){var i=true}if(jw[0]===jE){var jg=true}if(jC[0]===jE){var jm=true}if(jr[0]===jE){var jl=true}if(ju[0]===jE){var jc=true}if(jD[0]===jE){var ji=true}if(i8[0]===jE){var jf=true}if(jz[0]===jE){var e=true}if(T[0]===jE){var jB=true}if(jb[0]===jE){var jx=true}if(jt[0]===jE){var ja=true}var jF=["© 2022 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "];var js="rgba(255, 255, 255, 0.701961)";if(jn.getZoom()<=9){jF=["© 2022 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(jy){jF=["© 2022 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(jg||jm){jF=["© 2022 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(i||jl){jF=["© 2022 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(jc){jF=["© 2022 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(ji){jF=["© 2022 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(jf){jF=["© 2022 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(e){jF=["© 2022 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}}}}}}}}if(jn.getZoom()<=9){jF.push("长地万方");jF.push(' & OpenStreetMap');jF.push(' & HERE');if(jo===BMAP_SATELLITE_MAP||jo===BMAP_HYBRID_MAP){jF.push(' & ESO');js="rgba(0,0,0,.7)"}}else{if(jg||jm){jF.push('OpenStreetMap')}else{if(i||jl){jF.push('HERE')}else{if(jc){jF.push('HERE');jF.push(' & Mapbox')}else{if(ji){jF.push('OpenStreetMap');jF.push(' & Mapbox')}else{if(jf){jF.push('OpenStreetMap');jF.push(' & Mapbox')}else{if(jB||ja||jx){jF.push('HERE');jF.push(' & Mapbox')}else{if(e){jF.push('OpenStreetMap');jF.push(' & Mapbox')}else{jF.push("长地万方");if(jk){jF.push(' & PalmCity')}if(jG){jF.push(' & MapKing')}if(jy){jF.push(' & HERE');jF.push(' & 樂客LocalKing')}if(jo===BMAP_SATELLITE_MAP||jo===BMAP_HYBRID_MAP){js="rgba(0,0,0,.7)"}}}}}}}}}jF.unshift('');jF.push("");jF=jF.join("");jn.cpyCtrl.addCopyright({id:1,content:jF})}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 cQ="cur";var U="cen";var D="s";var c7="con";var cZ="bd";var cu="nb";var gf="bt";var aE="nav";var hj="walk";var fe="gc";var dt="rgc";var F="dec";var hw="iploc";var f1="bse";var fA="nse";var cN="bl";var dS="bsl";var fc="bda";var dP="sa";var aZ="nba";var ho="drag";var h4="ext";var iC="exts";var iF="hip";var gK="ride";var iR="drct";var eR=2;var a5=4;var fl=7;var hp=11;var bS=12;var en=14;var cr=15;var dG=18;var au=20;var aY=21;var C=19;var a=23;var hI=26;var av=28;var fB=31;var eA=35;var hx=44;var a3=45;var aq=46;var iA=47;var fF=-1;var a1=0;var bn=1;var h8=2;var dj=3;window.BMAP_POI_TYPE_NORMAL=0;var cg=1;var hr=2;BMapGL.I=es.I;var bx={};bx.removeHtml=function(e){e=e.replace(/<\/?[^>]*>/g,"");e=e.replace(/[ | ]* /g," ");return e};bx.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;")};bx.parseGeoExtReg2=function(i,e){var T=new RegExp("(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){"+e+"}","ig");return i.replace(T,"$1")};var dd=0;var cP=1;var N=2;bx.unique=function(T){var ja=false;var i9=[];var jb={};for(var i8=0,e=T.length;i821){T=21}return T};bx.parseGeo=function(jb,je){if(typeof jb!="string"||!jb){return}var jg=jb.split("|");var e;var i9;var T;if(jg.length==1){e=bN(jb)}else{e=bN(jg[2]);i9=bN(jg[0]);T=bN(jg[1]);if(!je){return e}}var jc={type:e.geoType};if(je){switch(jc.type){case N:var jd=new cd(e.geo[0][0],e.geo[0][1]);var jf=ia.convertMC2LL(jd);jc.point=jf;jc.points=[jf];break;case cP:jc.points=[];var jh=e.geo[0];for(var ja=0,i8=jh.length-1;ja0.25&&ji<1){ji=1}else{if(ji>32){ji=32}}}}var jd=jr.split("|");if(jd.length==1){var i8=bN(jd[0]);return{type:i8.type,bound:"",points:i8.geo.join(",")}}else{if(jd.length>1){var jj=jr.split(";.=");var jf=[];var i9=[];var jk=0;var jo=jj.length;for(var jl=0;jl1){if(jl==0){jq=jq+";"}if(jl>0&&jl0){jp=bx.parseGeoExtReg2(jp,ji)}i9.push(jp)}if(jo<=1){i9=i9.join(";")}if(jo==2){var T=i9[0]+";"+i9[1];var jb=T.split(";");var e=[];for(var jl=0;jlcK){e=cK-e}if(jc>cK){jc=cK-jc}i8.push(i8[T-2]+e);i8.push(i8[T-1]+jc);return 0}function c6(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}bx.pathToPoints=function(ja){var i8=[];if(typeof ja!=="string"){return i8}else{var i9=ja.split(";");for(var T=0;Tcf.MAX_PAGE_CAPACITY?cf.DEFAULT_PAGE_CAPACITY:e)}else{this._opts.pageCapacity=cf.DEFAULT_PAGE_CAPACITY}},getPageCapacity:function(){return this._opts.pageCapacity},toString:function(){return"LocalSearch"}});function a6(i){this._opts={};es.extend(this._opts,i);this._queryList=[];var e=this;gi.load("otherSearch",function(){e._asyncSearch()})}a6.inherits(cJ,"Geocoder");es.extend(a6.prototype,{getPoint:function(e,T,i){this._queryList.push({method:"getPoint",arguments:[e,T,i]})},getLocation:function(e,T,i){this._queryList.push({method:"getLocation",arguments:[e,T,i]})},toString:function(){return"Geocoder"}});function cz(e){e=e||{};this.config={timeout:e.timeout||1000*10,maximumAge:e.maximumAge||0,enableHighAccuracy:e.enableHighAccuracy||true,SDKLocation:e.SDKLocation||false};this._pendingCalls=[];var i=this;gi.load("otherSearch",function(){var T=i._pendingCalls.length;for(var i8=0;i8=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){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=eh.MAX_PAGE_CAPACITY;return}}if(typeof e!=="number"){this._opts.pageCapacity=eh.MAX_PAGE_CAPACITY;return}if(e>=1&&e<=eh.MAX_PAGE_CAPACITY){this._opts.pageCapacity=Math.round(e)}else{this._opts.pageCapacity=eh.MAX_PAGE_CAPACITY}},toString:function(){return"TransitRoute"},_shortTitle:function(e){return e.replace(/\(.*\)/,"")}});window.BMAP_HIGHLIGHT_STEP=1;window.BMAP_HIGHLIGHT_ROUTE=2;var ci=function(e,i8){iI.call(this,e,i8);this._overlays=[];this._curIndex=-1;this._queryList=[];var T=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;gi.load("route",function(){T._asyncSearch()},true);if(this.init_d){this.init_d()}};ci.ROAD_TYPE=["","环岛","无属性道路","主路","高速连接路","交叉点内路段","连接道路","停车场内部道路","服务区内部道路","桥","步行街","辅路","匝道","全封闭道路","未定义交通区域","POI连接路","隧道","步行道","公交专用道","提前右转道"];es.inherit(ci,iI,"DWRoute");es.extend(ci.prototype,{search:function(T,e,i){this._queryList.push({method:"search",arguments:[T,e,i]})}});window.BMAP_DRIVING_POLICY_DEFAULT=0;window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS=3;window.BMAP_DRIVING_POLICY_FIRST_HIGHWAYS=4;window.BMAP_DRIVING_POLICY_AVOID_CONGESTION=5;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 b7(e,i){ci.call(this,e,i);i=i||{};this._opts._enableTraffic=i.enableTraffic||false;this.setPolicy(i.policy);this.QUERY_TYPE=aE;this.RETURN_TYPE=au;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_DRIVING}es.inherit(b7,ci,"DrivingRoute");b7.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}};function eS(e,i){ci.call(this,e,i);this.QUERY_TYPE=hj;this.RETURN_TYPE=fB;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_WALKING;this._enableDragging=false}es.inherit(eS,ci,"WalkingRoute");function cG(e,i){ci.call(this,e,i);this.QUERY_TYPE=gK;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_RIDING;this._enableDragging=false}es.inherit(cG,ci,"RidingRoute");window.BMAP_MODE_DRIVING="driving";window.BMAP_MODE_TRANSIT="transit";window.BMAP_MODE_WALKING="walking";window.BMAP_MODE_NAVIGATION="navigation";var aS={web:"//web.archive.org/web/20220712112455/http://api.map.baidu.com/direction?",android:"bdapp://map/direction?",ios:"baidumap://map/direction?"};function hN(e){this.opts=e||{}}es.extend(hN.prototype,{routeCall:function(i8,e,T){var i=this;gi.load("route",function(){i._asyncSearch(i8,e,T)})}});function dD(){return Pano.getStreetViewCoverageLayer(bo)}function ej(){Pano.PanoramaService.call(this)}es.inherit(ej,Pano.PanoramaService,"PanoramaService");es.extend(ej.prototype,{getPanoramaById:function(T,i){var e=this;this.getPanoById(T,function(i8){i&&i(e._makeData(i8))})},getPanoramaByLocation:function(e,T){e=ia.convertLL2MC(e);var i=this;this.getPanoByLocation(e,50,function(i8){T&&T(i._makeData(i8))})},_makeData:function(T){if(!T){return null}var i={};var e=T.content[0];i.description=e.Rname||e.Info||"";i.id=e.ID;i.pointX=e.X/100;i.pointY=e.Y/100;i.position=ia.convertMC2LL(new cd(i.pointX,i.pointY));return i}});function eJ(){if(window.PANORAMA_URL){return Pano.getPanoControl(bo,{imgPath:w.imgPath,tileBaseUrl:w.panoTilePath,})}return Pano.getPanoControl(bo)}function J(T,e){if(!e){return}this.content=T;if(e.position&&!Array.isArray(e.position)){e.position=ia.convertLL2MC(e.position);this.position=e.position;this.hideDistance=!!e.hideDistance}else{this.hideDistance=true}var i=this._createDom();Pano.PanoOverlay.call(this,e.position,{dom:i,altitude:e.altitude,})}es.inherit(J,Pano.PanoOverlay,"PanoramaLabel");es.extend(J.prototype,{init:function(e){var i=this;this._pano=e;this.updatedDistance();Pano.PanoOverlay.prototype.init.call(this,e);this._pano.on("dataload",function(T){i.updatedDistance()})},_createDom:function(){var i8=this.content;var jb=document.createElement("div");var i=jb.style;i.position="absolute";i.backgroundColor="rgba(29, 29, 29, 0.8)";i.padding="7px 0";i.height="19px";i.font="16px arial";i.color="white";i.whiteSpace="nowrap";i.borderRadius="4px";var e=document.createElement("div");e.style["float"]="left";e.style["lineHeight"]="19px";jb.appendChild(e);var T=document.createElement("span");T.style.margin="0 14px";T.innerText=i8;e.appendChild(T);if(!this.hideDistance){var ja=document.createElement("span");ja.style.color="color:rgba(255,255,255,0.3)";ja.innerText="|";e.appendChild(ja);var i9=document.createElement("span");i9.style.margin="0 8px";i9.style.color="#60c7fa";i9.style.fontSize="12px";i9.innerText="0米";e.appendChild(i9);this._distanceDom=i9}this._dom=jb;this._titleDom=T;return jb},updatedDistance:function(){if(this.hideDistance){return}var T=0;if(this._pano){var i=this._pano.position;var e=this.position;if(i&&!i.equals(e)){T=ia.getDistanceByMC(i,e)}}if(T>100){T=T/1000;T=T<100?T.toFixed(2):T.toFixed(0);T+="公里"}else{T=T<100?T.toFixed(2):T.toFixed(0);T+="米"}this._distanceDom.innerText=T},});function c(i){if(typeof i==="string"&&/^(?!#)(\w)*/.test(i)){i="#"+i}var i8={};if(window.PANORAMA_URL){i8.imgPath=w.imgPath;i8.tileBaseUrls=[w.panoTilePath]}var e=Pano.init(i,i8);var T=e.setPosition;e.setPosition=function(ja){var jb=ia.convertLL2MC(ja);T.call(e,jb)};var i9=e.addEventListener;e.addEventListener=function(ja,jb){if(ja==="position_changed"){i9.call(e,ja,function(jc){var jd=ia.convertMC2LL(jc);jb(jd)})}else{i9.call(e,ja,jb)}};return e}bo.Map=gV;bo.MapType=dO;bo.Point=cd;bo.Pixel=eL;bo.Size=h3;bo.Bounds=ha;bo.PrivateRegionDataModel=cp;bo.TileLayer=gI;bo.Copyright=h;bo.Projection=bo.Project=ia;bo.XYZProjection=bo.XYZProject=da;bo.Convertor=fg;bo.RenderTypeUtils=cH;bo.Overlay=aH;bo.Label=g3;bo.Marker=r;bo.Icon=ir;bo.Polyline=bc;bo.BezierCurve=cl;bo.PolylineMultipart=dQ;bo.Polygon=hM;bo.MapMask=iW;bo.Prism=bi;bo.Marker3D=dH;bo.GroundOverlay=fm;bo.InfoWindow=dz;bo.SimpleInfoWindow=hd;bo.Circle=aK;bo.Control=f0;bo.NavigationControl=iE;bo.NavigationControl3D=eu;bo.CopyrightControl=ft;bo.ScaleControl=i7;bo.CityListControl=bj;bo.MapTypeControl=u;bo.ZoomControl=id;bo.LocationControl=fJ;bo.LogoControl=br;bo.DistanceTool=bZ;bo.ContextMenu=gz;bo.MenuItem=g8;bo.OperationMask=ae;bo.Animation=e0;bo.ViewAnimation=n;bo.Transitions=fT;bo.Event=e7;bo.trafficLayer=iB;bo.TrafficLayer=ii;bo.XYZLayer=iX;bo.PixelLayer=c2;bo.BaiduLayer=O;bo.Geolocation=cz;bo.Geocoder=a6;bo.Boundary=eN;bo.DistrictLayer=dw;bo.LocalCity=eG;bo.LocalSearch=cf;bo.Autocomplete=h5;bo.BusLineSearch=d2;bo.WalkingRoute=eS;bo.RidingRoute=cG;bo.DrivingRoute=b7;bo.TransitRoute=eh;bo.RouteSearch=hN;bo.PanoramaCoverageLayer=dD;bo.PanoramaControl=eJ;bo.PanoramaService=ej;bo.PanoramaLabel=J;bo.Panorama=c;function gr(e,i){for(var T in i){e[T]=i[T]}}bo.fetchDebug&&bo.fetchDebug.init();bo.verify();bo.apiLoad();bo.frequency();bo.getSeckeyCid();window._layer=1;es.extend(dw.prototype,{_asyncSearch:function(){for(var T=0,e=this._queryList.length;T0){var jn=i8.geo.length;for(io=0;io0){var jf=T.length-1;var jm=[];var je=false;var jl=0;var jj=0;for(var jo=0;jojj){var jq=jl;jl=jj;jj=jq}var jd=jm;var jb=jm.splice(jl+1);var i9=jb.splice(jj-jl);jd=jd.concat(i9);jk.boundaries.push(jd.join(";"));jk.boundaries.push(jb.join(";"));je=false;continue}if(jm.length!==0){jk.boundaries.push(jm.join(";"))}}}}}}return jk},deleteDistrict:function(i8){var T=i8.disOverlays;for(var e=0;e0){for(var T=0;T