(self.webpackChunkulogger_server=self.webpackChunkulogger_server||[]).push([[521],{5487:function(t,e,i){"use strict";i.r(e),i.d(e,{Feature:function(){return Nn},Map:function(){return va},Overlay:function(){return Pl},View:function(){return _s},control:function(){return wu},geom:function(){return Eu},layer:function(){return bu},proj:function(){return Ou},source:function(){return Tu},style:function(){return Ru}});var n=function(){function t(t){this.propagationStopped,this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.propagationStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}(),r="propertychange",o=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}();function s(t,e){return t>e?1:t0){for(r=1;r0)},e.prototype.removeEventListener=function(t,e){var i=this.listeners_&&this.listeners_[t];if(i){var n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=f,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}},e}(o),C="change",S="error",w="contextmenu",E="click",b="dblclick",O="keydown",T="keypress",R="load",P="resize",I="touchmove",M="wheel";function F(t,e,i,n,r){if(n&&n!==t&&(i=i.bind(n)),r){var o=i;i=function(){t.removeEventListener(e,i),o.apply(this,arguments)}}var s={target:t,type:e,listener:i};return t.addEventListener(e,i),s}function L(t,e,i,n){return F(t,e,i,n,!0)}function A(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),_(t))}var D=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();var k=function(t){function e(){var e=t.call(this)||this;return e.revision_=0,e}return D(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(C)},e.prototype.getRevision=function(){return this.revision_},e.prototype.on=function(t,e){if(Array.isArray(t)){for(var i=t.length,n=new Array(i),r=0;r0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:xt}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var i=e.viewState.rotation;if(i!=this.rotation_){var n="rotate("+i+"rad)";if(this.autoHide_){var r=this.element.classList.contains(pt);r||0!==i?r&&0!==i&&this.element.classList.remove(pt):this.element.classList.add(pt)}this.label_.style.transform=n}this.rotation_=i}},e}(ct),bt={DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},Ot={};Ot[bt.DEGREES]=2*Math.PI*6370997/360,Ot[bt.FEET]=.3048,Ot[bt.METERS]=1,Ot[bt.USFEET]=1200/3937;var Tt=bt,Rt=function(){function t(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.canWrapX_},t.prototype.getCode=function(){return this.code_},t.prototype.getExtent=function(){return this.extent_},t.prototype.getUnits=function(){return this.units_},t.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||Ot[this.units_]},t.prototype.getWorldExtent=function(){return this.worldExtent_},t.prototype.getAxisOrientation=function(){return this.axisOrientation_},t.prototype.isGlobal=function(){return this.global_},t.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},t.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},t.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},t.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},t.prototype.setWorldExtent=function(t){this.worldExtent_=t},t.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},t.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},t}();function Pt(t,e,i){return Math.min(Math.max(t,e),i)}var It="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},Mt="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function Ft(t,e,i,n,r,o){var s=r-i,a=o-n;if(0!==s||0!==a){var l=((t-i)*s+(e-n)*a)/(s*s+a*a);l>1?(i=r,n=o):l>0&&(i+=s*l,n+=a*l)}return Lt(t,e,i,n)}function Lt(t,e,i,n){var r=i-t,o=n-e;return r*r+o*o}function At(t){return t*Math.PI/180}function Dt(t,e){var i=t%e;return i*e<0?i+e:i}function kt(t,e,i){return t+i*(e-t)}var jt=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),zt=6378137,Gt=Math.PI*zt,Wt=[-Gt,-Gt,Gt,Gt],Xt=[-180,-85,180,85],Nt=zt*Math.log(Math.tan(Math.PI/2)),Yt=function(t){function e(e){return t.call(this,{code:e,units:Tt.METERS,extent:Wt,global:!0,worldExtent:Xt,getPointResolution:function(t,e){return t/It(e[1]/zt)}})||this}return jt(e,t),e}(Rt),Kt=[new Yt("EPSG:3857"),new Yt("EPSG:102100"),new Yt("EPSG:102113"),new Yt("EPSG:900913"),new Yt("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Bt(t,e,i){var n=t.length,r=i>1?i:2,o=e;void 0===o&&(o=r>2?t.slice():new Array(n));for(var s=0;sNt?a=Nt:a<-Nt&&(a=-Nt),o[s+1]=a}return o}function Zt(t,e,i){var n=t.length,r=i>1?i:2,o=e;void 0===o&&(o=r>2?t.slice():new Array(n));for(var s=0;sr&&(l|=le),ao&&(l|=ae),l===oe&&(l=se),l}function Se(){return[1/0,1/0,-1/0,-1/0]}function we(t,e,i,n,r){return r?(r[0]=t,r[1]=e,r[2]=i,r[3]=n,r):[t,e,i,n]}function Ee(t){return we(1/0,1/0,-1/0,-1/0,t)}function be(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function Oe(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function Te(t,e){for(var i=0,n=e.length;ie[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function Ye(t){return t[2]1)for(var o=t[2]-t[0],s=t[3]-t[1],a=0;a=s)break;++d}f=this.scaleBar_?this.createScaleBar(c,u,l):u.toFixed(p<0?-p:0)+" "+l,this.renderedHTML_!=f&&(this.innerElement_.innerHTML=f,this.renderedHTML_=f),this.renderedWidth_!=c&&(this.innerElement_.style.width=c+"px",this.renderedWidth_=c),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.createScaleBar=function(t,e,i){for(var n="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),r=[],o=t/this.scaleBarSteps_,s="#ffffff",a=0;a
'+this.createMarker("relative",a)+(a%2==0||2===this.scaleBarSteps_?this.createStepText(a,t,!1,e,i):"")+""),a===this.scaleBarSteps_-1&&r.push(this.createStepText(a+1,t,!0,e,i)),s="#ffffff"===s?"#000000":"#ffffff";return'
'+(this.scaleBarText_?'
'+n+"
":"")+r.join("")+"
"},e.prototype.createMarker=function(t,e){return'
'},e.prototype.createStepText=function(t,e,i,n,r){var o=(0===t?0:Math.round(n/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+r);return'
'+o+"
"},e.prototype.getScaleForResolution=function(){var t=Je(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center),e=this.dpi_||Si,i=this.viewState_.projection.getMetersPerUnit();return parseFloat(t.toString())*i*(1e3/25.4)*e},e.prototype.render=function(t){var e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()},e}(ct),Ei=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),bi=function(t){function e(e){var i=this,n=e||{};i=t.call(this,{element:document.createElement("div"),target:n.target})||this;var r=void 0!==n.className?n.className:"ol-zoom",o=void 0!==n.delta?n.delta:1,s=void 0!==n.zoomInClassName?n.zoomInClassName:r+"-in",a=void 0!==n.zoomOutClassName?n.zoomOutClassName:r+"-out",l=void 0!==n.zoomInLabel?n.zoomInLabel:"+",h=void 0!==n.zoomOutLabel?n.zoomOutLabel:"−",u=void 0!==n.zoomInTipLabel?n.zoomInTipLabel:"Zoom in",c=void 0!==n.zoomOutTipLabel?n.zoomOutTipLabel:"Zoom out",p=document.createElement("button");p.className=s,p.setAttribute("type","button"),p.title=u,p.appendChild("string"==typeof l?document.createTextNode(l):l),p.addEventListener(E,i.handleClick_.bind(i,o),!1);var f=document.createElement("button");f.className=a,f.setAttribute("type","button"),f.title=c,f.appendChild("string"==typeof h?document.createTextNode(h):h),f.addEventListener(E,i.handleClick_.bind(i,-o),!1);var d=r+" "+"ol-unselectable "+dt,_=i.element;return _.className=d,_.appendChild(p),_.appendChild(f),i.duration_=void 0!==n.duration?n.duration:250,i}return Ei(e,t),e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var i=e.getZoom();if(void 0!==i){var n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:xt})):e.setZoom(n)}}},e}(ct),Oi="XY",Ti="XYZ",Ri="XYM",Pi="XYZM",Ii="Point",Mi="LineString",Fi="LinearRing",Li="Polygon",Ai="MultiPoint",Di="MultiLineString",ki="MultiPolygon",ji="GeometryCollection",zi="Circle";new Array(6);function Gi(t,e,i,n,r,o,s){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t[4]=o,t[5]=s,t}function Wi(t,e){var i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function Xi(t,e,i,n,r,o,s,a){var l=Math.sin(o),h=Math.cos(o);return t[0]=n*h,t[1]=r*l,t[2]=-n*l,t[3]=r*h,t[4]=s*n*h-a*n*l+e,t[5]=s*r*l+a*r*h+i,t}function Ni(t,e){var i,n=(i=e)[0]*i[3]-i[1]*i[2];fe(0!==n,32);var r=e[0],o=e[1],s=e[2],a=e[3],l=e[4],h=e[5];return t[0]=a/n,t[1]=-o/n,t[2]=-s/n,t[3]=r/n,t[4]=(s*h-a*l)/n,t[5]=-(r*h-o*l)/n,t}function Yi(t){return"matrix("+t.join(", ")+")"}function Ki(t,e,i,n,r,o){for(var s=o||[],a=0,l=e;l1)a=i;else{if(p>0){for(var f=0;fr&&(r=h),o=a,s=l}return r}function tn(t,e,i,n,r){for(var o=0,s=i.length;o0;){for(var c=h.pop(),p=h.pop(),f=0,d=t[p],_=t[p+1],g=t[c],y=t[c+1],v=p+n;vf&&(u=v,f=m)}f>r&&(l[(u-e)/n]=1,p+n0&&_>f)&&(d<0&&g0&&g>d)?(a=c,l=p):(o[s++]=a,o[s++]=l,h=a,u=l,a=c,l=p)}}return o[s++]=a,o[s++]=l,s}function hn(t,e,i,n,r,o,s,a){for(var l=0,h=i.length;lo&&(h-a)*(o-l)-(r-a)*(u-l)>0&&s++:u<=o&&(h-a)*(o-l)-(r-a)*(u-l)<0&&s--,a=h,l=u}return 0!==s}function Cn(t,e,i,n,r,o){if(0===i.length)return!1;if(!xn(t,e,i[0],n,r,o))return!1;for(var s=1,a=i.length;sC&&Cn(t,e,i,n,u=(c+p)/2,_)&&(x=u,C=S),c=p}return isNaN(x)&&(x=r[o]),a?(a.push(x,_,C),a):[x,_,C]}function wn(t,e,i,n,r){for(var o,s=[t[e],t[e+1]],a=[];e+n=r[0]&&o[2]<=r[2]||(o[1]>=r[1]&&o[3]<=r[3]||wn(t,e,i,n,(function(t,e){return function(t,e,i){var n=!1,r=Ce(t,e),o=Ce(t,i);if(r===se||o===se)n=!0;else{var s=t[0],a=t[1],l=t[2],h=t[3],u=e[0],c=e[1],p=i[0],f=i[1],d=(f-c)/(p-u),_=void 0,g=void 0;o&ae&&!(r&ae)&&(n=(_=p-(f-h)/d)>=s&&_<=l),n||!(o&le)||r&le||(n=(g=f-(p-l)*d)>=a&&g<=h),n||!(o&he)||r&he||(n=(_=p-(f-a)/d)>=s&&_<=l),n||!(o&ue)||r&ue||(n=(g=f-(p-s)*d)>=a&&g<=h)}return n}(r,t,e)})))))}function bn(t,e,i,n,r){if(!function(t,e,i,n,r){return!!(En(t,e,i,n,r)||xn(t,e,i,n,r[0],r[1])||xn(t,e,i,n,r[0],r[3])||xn(t,e,i,n,r[2],r[1])||xn(t,e,i,n,r[2],r[3]))}(t,e,i[0],n,r))return!1;if(1===i.length)return!0;for(var o=1,s=i.length;o0}function Rn(t,e,i,n,r){for(var o=void 0!==r&&r,s=0,a=i.length;s>1)],e))<0?a=n+1:(l=n,h=!r);return h?a:~a}(d,v);m<0?(h=(v-d[-m-2])/(d[-m-1]-d[-m-2]),l=e+(-m-2)*n):l=e+m*n}var x=a>1?a:2,C=o||new Array(x);for(_=0;_>1;r=1024){var r=0;for(var o in t)0==(3&r++)&&(delete t[o],--e)}n=function(t){var e,i,n,r,o;ir.exec(t)&&(t=rr(t));if(er.exec(t)){var s=t.length-1,a=void 0;a=s<=4?1:2;var l=4===s||8===s;e=parseInt(t.substr(1+0*a,a),16),i=parseInt(t.substr(1+1*a,a),16),n=parseInt(t.substr(1+2*a,a),16),r=l?parseInt(t.substr(1+3*a,a),16):255,1==a&&(e=(e<<4)+e,i=(i<<4)+i,n=(n<<4)+n,l&&(r=(r<<4)+r)),o=[e,i,n,r/255]}else 0==t.indexOf("rgba(")?ar(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),ar(o)):fe(!1,14);return o}(i),t[i]=n,++e}return n}}();function sr(t){return Array.isArray(t)?t:or(t)}function ar(t){return t[0]=Pt(t[0]+.5|0,0,255),t[1]=Pt(t[1]+.5|0,0,255),t[2]=Pt(t[2]+.5|0,0,255),t[3]=Pt(t[3],0,1),t}function lr(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var i=t[1];i!=(0|i)&&(i=i+.5|0);var n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:t[3])+")"}var hr=function(){function t(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return t.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var e in this.cache_){var i=this.cache_[e];0!=(3&t++)||i.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,i){var n=ur(t,e,i);return n in this.cache_?this.cache_[n]:null},t.prototype.set=function(t,e,i,n){var r=ur(t,e,i);this.cache_[r]=n,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}();function ur(t,e,i){return e+":"+t+":"+(i?nr(i):"null")}var cr=new hr,pr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),fr=function(t){function e(e,i,n,r){var o=t.call(this)||this;return o.extent=e,o.pixelRatio_=n,o.resolution=i,o.state=r,o}return pr(e,t),e.prototype.changed=function(){this.dispatchEvent(C)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return j()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){j()},e}(x),dr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();!function(t){function e(e,i,n,r,o,s){var a=t.call(this,e,i,n,Hn)||this;return a.src_=r,a.image_=new Image,null!==o&&(a.image_.crossOrigin=o),a.unlisten_=null,a.state=Hn,a.imageLoadFunction_=s,a}dr(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=Qn,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=je(this.extent)/this.image_.height),this.state=Jn,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=Hn&&this.state!=Qn||(this.state=qn,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=_r(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}(fr);function _r(t,e,i){var n=t;if(n.src&&it){var r=n.decode(),o=!0;return r.then((function(){o&&e()})).catch((function(t){o&&("EncodingError"===t.name&&"Invalid image type."===t.message?e():i())})),function(){o=!1}}var s=[L(n,R,e),L(n,S,i)];return function(){s.forEach(A)}}var gr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),yr=null,vr=function(t){function e(e,i,n,r,o,s){var a=t.call(this)||this;return a.hitDetectionImage_=null,a.image_=e||new Image,null!==r&&(a.image_.crossOrigin=r),a.canvas_={},a.color_=s,a.unlisten_=null,a.imageState_=o,a.size_=n,a.src_=i,a.tainted_,a}return gr(e,t),e.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===Jn){yr||(yr=rt(1,1)),yr.drawImage(this.image_,0,0);try{yr.getImageData(0,0,1,1),this.tainted_=!1}catch(t){yr=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(C)},e.prototype.handleImageError_=function(){this.imageState_=Qn,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=Jn,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},e.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],e=this.size_[1],i=rt(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(this.imageState_==Hn){this.imageState_=qn;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=_r(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]){var e=document.createElement("canvas");this.canvas_[t]=e,e.width=Math.ceil(this.image_.width*t),e.height=Math.ceil(this.image_.height*t);var i=e.getContext("2d");if(i.scale(t,t),i.drawImage(this.image_,0,0),i.globalCompositeOperation="multiply","multiply"===i.globalCompositeOperation||this.isTainted_())i.fillStyle=nr(this.color_),i.fillRect(0,0,e.width,e.height),i.globalCompositeOperation="destination-in",i.drawImage(this.image_,0,0);else{for(var n=i.getImageData(0,0,e.width,e.height),r=n.data,o=this.color_[0]/255,s=this.color_[1]/255,a=this.color_[2]/255,l=this.color_[3],h=0,u=r.length;h0,6);var c=void 0!==n.src?Hn:Jn;return i.color_=void 0!==n.color?sr(n.color):null,i.iconImage_=function(t,e,i,n,r,o){var s=cr.get(e,n,o);return s||(s=new vr(t,e,i,n,r,o),cr.set(e,n,o,s)),s}(l,u,h,i.crossOrigin_,c,i.color_),i.offset_=void 0!==n.offset?n.offset:[0,0],i.offsetOrigin_=void 0!==n.offsetOrigin?n.offsetOrigin:Vn,i.origin_=null,i.size_=void 0!==n.size?n.size:null,i}return mr(e,t),e.prototype.clone=function(){var t=this.getScale();return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},e.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var t=this.anchor_,e=this.getSize();if(this.anchorXUnits_==Yn||this.anchorYUnits_==Yn){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==Yn&&(t[0]*=e[0]),this.anchorYUnits_==Yn&&(t[1]*=e[1])}if(this.anchorOrigin_!=Vn){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=Un&&this.anchorOrigin_!=Zn||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=Bn&&this.anchorOrigin_!=Zn||(t[1]=-t[1]+e[1])}return this.normalizedAnchor_=t,this.normalizedAnchor_},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getHitDetectionImageSize=function(){return this.getImageSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_,e=this.getDisplacement();if(this.offsetOrigin_!=Vn){var i=this.getSize(),n=this.iconImage_.getSize();if(!i||!n)return null;t=t.slice(),this.offsetOrigin_!=Un&&this.offsetOrigin_!=Zn||(t[0]=n[0]-i[0]-t[0]),this.offsetOrigin_!=Bn&&this.offsetOrigin_!=Zn||(t[1]=n[1]-i[1]-t[1])}return t[0]+=e[0],t[1]+=e[1],this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(C,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(C,t)},e}(tr),Cr="opacity",Sr="visible",wr="extent",Er="zIndex",br="maxResolution",Or="minResolution",Tr="maxZoom",Rr="minZoom",Pr="source",Ir=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Mr=function(t){function e(e){var i=t.call(this)||this,n=d({},e);return n[Cr]=void 0!==e.opacity?e.opacity:1,fe("number"==typeof n[Cr],64),n[Sr]=void 0===e.visible||e.visible,n[Er]=e.zIndex,n[br]=void 0!==e.maxResolution?e.maxResolution:1/0,n[Or]=void 0!==e.minResolution?e.minResolution:0,n[Rr]=void 0!==e.minZoom?e.minZoom:-1/0,n[Tr]=void 0!==e.maxZoom?e.maxZoom:1/0,i.className_=void 0!==n.className?e.className:"ol-layer",delete n.className,i.setProperties(n),i.state_=null,i}return Ir(e,t),e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=Pt(Math.round(100*this.getOpacity())/100,0,1),e.sourceState=this.getSourceState(),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i?i:!1===e.managed?1/0:0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e},e.prototype.getLayersArray=function(t){return j()},e.prototype.getLayerStatesArray=function(t){return j()},e.prototype.getExtent=function(){return this.get(wr)},e.prototype.getMaxResolution=function(){return this.get(br)},e.prototype.getMinResolution=function(){return this.get(Or)},e.prototype.getMinZoom=function(){return this.get(Rr)},e.prototype.getMaxZoom=function(){return this.get(Tr)},e.prototype.getOpacity=function(){return this.get(Cr)},e.prototype.getSourceState=function(){return j()},e.prototype.getVisible=function(){return this.get(Sr)},e.prototype.getZIndex=function(){return this.get(Er)},e.prototype.setExtent=function(t){this.set(wr,t)},e.prototype.setMaxResolution=function(t){this.set(br,t)},e.prototype.setMinResolution=function(t){this.set(Or,t)},e.prototype.setMaxZoom=function(t){this.set(Tr,t)},e.prototype.setMinZoom=function(t){this.set(Rr,t)},e.prototype.setOpacity=function(t){fe("number"==typeof t,64),this.set(Cr,t)},e.prototype.setVisible=function(t){this.set(Sr,t)},e.prototype.setZIndex=function(t){this.set(Er,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(Z),Fr="prerender",Lr="postrender",Ar="precompose",Dr="postcompose",kr="rendercomplete",jr="undefined",zr="ready",Gr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Wr(t,e){if(!t.visible)return!1;var i=e.resolution;if(i=t.maxResolution)return!1;var n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}var Xr=function(t){function e(e){var i=this,n=d({},e);delete n.source,(i=t.call(this,n)||this).mapPrecomposeKey_=null,i.mapRenderKey_=null,i.sourceChangeKey_=null,i.renderer_=null,e.render&&(i.render=e.render),e.map&&i.setMap(e.map),i.addEventListener(B(Pr),i.handleSourcePropertyChange_);var r=e.source?e.source:null;return i.setSource(r),i}return Gr(e,t),e.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},e.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},e.prototype.getSource=function(){return this.get(Pr)||null},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():jr},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(A(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=F(t,C,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_.getFeatures(t)},e.prototype.render=function(t,e){var i=this.getRenderer();if(i.prepareFrame(t))return i.renderFrame(t,e)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(A(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(A(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=F(t,Ar,(function(t){var e=t.frameState.layerStatesArray,i=this.getLayerState(!1);fe(!e.some((function(t){return t.layer===i.layer})),67),e.push(i)}),this),this.mapRenderKey_=F(this,C,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(Pr,t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.setSource(null),t.prototype.disposeInternal.call(this)},e}(Mr);function Nr(t,e){for(var i=!0,n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function Yr(t,e){var i=Math.cos(e),n=Math.sin(e),r=t[0]*i-t[1]*n,o=t[1]*i+t[0]*n;return t[0]=r,t[1]=o,t}function Kr(t,e){if(e.canWrapX()){var i=Xe(e.getExtent()),n=function(t,e,i){var n=e.getExtent(),r=0;if(e.canWrapX()&&(t[0]n[2])){var o=i||Xe(n);r=Math.floor((t[0]-n[0])/o)}return r}(t,e,i);n&&(t[0]-=n*i)}return t}var Br=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Zr(t,e){cr.expire()}var Vr=function(t){function e(e){var i=t.call(this)||this;return i.map_=e,i}return Br(e,t),e.prototype.dispatchRenderEvent=function(t,e){j()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;Xi(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Ni(n,i)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r,o,s,a){var l,h=e.viewState;function u(t,e,i,n){return r.call(o,e,t?i:null,n)}var c=h.projection,p=Kr(t.slice(),c),f=[[0,0]];if(c.canWrapX()&&n){var d=Xe(c.getExtent());f.push([-d,0],[d,0])}for(var _=e.layerStatesArray,g=_.length,y=[],v=[],m=0;m=0;--x){var C=_[x],S=C.layer;if(S.hasRenderer()&&Wr(C,h)&&s.call(a,S)){var w=S.getRenderer(),E=S.getSource();if(w&&E){var b=E.getWrapX()?p:t,O=u.bind(null,C.managed);v[0]=b[0]+f[m][0],v[1]=b[1]+f[m][1],l=w.forEachFeatureAtCoordinate(v,e,i,O,y)}if(l)return l}}if(0!==y.length){var T=1/y.length;return y.forEach((function(t,e){return t.distanceSq+=e*T})),y.sort((function(t,e){return t.distanceSq-e.distanceSq})),y.some((function(t){return l=t.callback(t.feature,t.layer,t.geometry)})),l}},e.prototype.forEachLayerAtPixel=function(t,e,i,n,r){return j()},e.prototype.hasFeatureAtCoordinate=function(t,e,i,n,r,o){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,n,c,this,r,o)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){j()},e.prototype.scheduleExpireIconCache=function(t){cr.canExpireCache()&&t.postRenderFunctions.push(Zr)},e}(o),Ur=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Hr=function(t){function e(e,i,n,r){var o=t.call(this,e)||this;return o.inversePixelTransform=i,o.frameState=n,o.context=r,o}return Ur(e,t),e}(n),qr="10px sans-serif",Jr="#000",Qr="round",$r=[],to="round",eo="#000",io="center",no="middle",ro=[0,0,0,0],oo=new Z;(new x).setSize=function(){console.warn("labelCache is deprecated.")};var so,ao,lo=null,ho={},uo=function(){var t,e,i="32px ",n=["monospace","serif"],r=n.length,o="wmytzilWMYTZIL@#/&?$%10";function s(t,s,a){for(var l=!0,h=0;h=0;--o)n[o].renderDeclutter(t);!function(t,e){for(var i=t.childNodes,n=0;;++n){var r=i[n],o=e[n];if(!r&&!o)break;r!==o&&(r?o?t.insertBefore(o,r):(t.removeChild(r),--n):t.appendChild(o))}}(this.element_,this.children_),this.dispatchRenderEvent(Dr,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},e.prototype.forEachLayerAtPixel=function(t,e,i,n,r){for(var o=e.viewState,s=e.layerStatesArray,a=s.length-1;a>=0;--a){var l=s[a],h=l.layer;if(h.hasRenderer()&&Wr(l,o)&&r(h)){var u=h.getRenderer().getDataAtPixel(t,e,i);if(u){var c=n(h,u);if(c)return c}}}},e}(Vr),Co="add",So="remove",wo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Eo="length",bo=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.element=i,r.index=n,r}return wo(e,t),e}(n),Oo=function(t){function e(e,i){var n=t.call(this)||this,r=i||{};if(n.unique_=!!r.unique,n.array_=e||[],n.unique_)for(var o=0,s=n.array_.length;o0;)this.pop()},e.prototype.extend=function(t){for(var e=0,i=t.length;ethis.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(A(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(I,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(A(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(A),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(x),Go="layergroup",Wo="size",Xo="target",No="view",Yo=1/0,Ko=function(){function t(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return t.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,_(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var n=this.keyFunction_(i);return delete this.queuedElements_[n],i},t.prototype.enqueue=function(t){fe(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=Yo&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},t.prototype.getCount=function(){return this.elements_.length},t.prototype.getLeftChildIndex_=function(t){return 2*t+1},t.prototype.getRightChildIndex_=function(t){return 2*t+2},t.prototype.getParentIndex_=function(t){return t-1>>1},t.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},t.prototype.isEmpty=function(){return 0===this.elements_.length},t.prototype.isKeyQueued=function(t){return t in this.queuedElements_},t.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},t.prototype.siftUp_=function(t){for(var e=this.elements_,i=this.priorities_,n=e.length,r=e[t],o=i[t],s=t;t>1;){var a=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),h=lt;){var s=this.getParentIndex_(e);if(!(n[s]>o))break;i[e]=i[s],n[e]=n[s],e=s}i[e]=r,n[e]=o},t.prototype.reprioritize=function(){var t,e,i,n=this.priorityFunction_,r=this.elements_,o=this.priorities_,s=0,a=r.length;for(e=0;e0;)n=(i=this.dequeue()[0]).getKey(),i.getState()!==Bo||n in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[n]=!0,++this.tilesLoading_,++r,i.load())},e}(Ko);var Qo=0,$o=1,ts="center",es="resolution",is="rotation",ns=256;function rs(t,e,i){return function(n,r,o,s,a){if(n){var l=e?0:o[0]*r,h=e?0:o[1]*r,u=a?a[0]:0,c=a?a[1]:0,p=t[0]+l/2+u,f=t[2]-l/2+u,d=t[1]+h/2+c,_=t[3]-h/2+c;p>f&&(f=p=(f+p)/2),d>_&&(_=d=(_+d)/2);var g=Pt(n[0],p,f),y=Pt(n[1],d,_),v=30*r;return s&&i&&(g+=-v*Math.log(1+Math.max(0,p-n[0])/v)+v*Math.log(1+Math.max(0,n[0]-f)/v),y+=-v*Math.log(1+Math.max(0,d-n[1])/v)+v*Math.log(1+Math.max(0,n[1]-_)/v)),[g,y]}}}function os(t){return t}function ss(t,e,i,n){var r=Xe(e)/i[0],o=je(e)/i[1];return n?Math.min(t,Math.max(r,o)):Math.min(t,Math.min(r,o))}function as(t,e,i){var n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(n=Math.max(n,i),n/=Math.log(1+50*Math.max(0,i/t-1))/50+1),Pt(n,i/2,2*e)}function ls(t,e,i,n,r){return function(o,s,a,l){if(void 0!==o){var h=n?ss(t,n,a,r):t;return(void 0===i||i)&&l?as(o,h,e):Pt(o,e,h)}}}function hs(t){return void 0!==t?0:void 0}function us(t){return void 0!==t?t:void 0}var cs=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function ps(t,e){setTimeout((function(){t(e)}),0)}function fs(t){return!(t.sourceCenter&&t.targetCenter&&!Nr(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}function ds(t,e,i,n,r){var o=Math.cos(-r),s=Math.sin(-r),a=t[0]*o-t[1]*s,l=t[1]*o+t[0]*s;return[(a+=(e[0]/2-i[0])*n)*o-(l+=(i[1]-e[1]/2)*n)*(s=-s),l*o+a*s]}var _s=function(t){function e(e){var i=t.call(this)||this,n=d({},e);return i.hints_=[0,0],i.animations_=[],i.updateAnimationKey_,i.projection_=$e(n.projection,"EPSG:3857"),i.viewportSize_=[100,100],i.targetCenter_=null,i.targetResolution_,i.targetRotation_,i.cancelAnchor_=void 0,n.center&&(n.center=ci(n.center,i.projection_)),n.extent&&(n.extent=fi(n.extent,i.projection_)),i.applyOptions_(n),i}return cs(e,t),e.prototype.applyOptions_=function(t){var e=function(t){var e,i,n,r=28,o=2,s=void 0!==t.minZoom?t.minZoom:0,l=void 0!==t.maxZoom?t.maxZoom:r,h=void 0!==t.zoomFactor?t.zoomFactor:o,u=void 0!==t.multiWorld&&t.multiWorld,c=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,p=void 0!==t.showFullExtent&&t.showFullExtent,f=$e(t.projection,"EPSG:3857"),d=f.getExtent(),_=t.constrainOnlyCenter,g=t.extent;u||g||!f.isGlobal()||(_=!1,g=d);if(void 0!==t.resolutions){var y=t.resolutions;i=y[s],n=void 0!==y[l]?y[l]:y[y.length-1],e=t.constrainResolution?function(t,e,i,n){return function(r,o,s,l){if(void 0!==r){var h=t[0],u=t[t.length-1],c=i?ss(h,i,s,n):h;if(l)return void 0===e||e?as(r,c,u):Pt(r,u,c);var p=Math.min(c,r),f=Math.floor(a(t,p,o));return t[f]>c&&f1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i),!this.isDef()){var n=arguments[i-1];return n.center&&this.setCenterInternal(n.center),void 0!==n.zoom&&this.setZoom(n.zoom),void 0!==n.rotation&&this.setRotation(n.rotation),void(e&&ps(e,!0))}for(var r=Date.now(),o=this.targetCenter_.slice(),s=this.targetResolution_,a=this.targetRotation_,l=[],h=0;h0},e.prototype.getInteracting=function(){return this.hints_[$o]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(Qo,-this.hints_[Qo]);for(var e=0,i=this.animations_.length;e=0;--i){for(var n=this.animations_[i],r=!0,o=0,s=n.length;o0?l/a.duration:1;h>=1?(a.complete=!0,h=1):r=!1;var u=a.easing(h);if(a.sourceCenter){var c=a.sourceCenter[0],p=a.sourceCenter[1],f=c+u*(a.targetCenter[0]-c),d=p+u*(a.targetCenter[1]-p);this.targetCenter_=[f,d]}if(a.sourceResolution&&a.targetResolution){var _=1===u?a.targetResolution:a.sourceResolution+u*(a.targetResolution-a.sourceResolution);if(a.anchor){var g=this.getViewportSize_(this.getRotation()),y=this.constraints_.resolution(_,0,g,!0);this.targetCenter_=this.calculateCenterZoom(y,a.anchor)}this.targetResolution_=_,this.applyTargetState_(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var v=1===u?Dt(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+u*(a.targetRotation-a.sourceRotation);if(a.anchor){var m=this.constraints_.rotation(v,!0);this.targetCenter_=this.calculateCenterRotate(m,a.anchor)}this.targetRotation_=v}if(this.applyTargetState_(!0),e=!0,!a.complete)break}}if(r){this.animations_[i]=null,this.setHint(Qo,-1);var x=n[0].callback;x&&ps(x,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,e){var i,n,r,o=this.getCenterInternal();return void 0!==o&&(Yr(i=[o[0]-e[0],o[1]-e[1]],t-this.getRotation()),r=e,(n=i)[0]+=+r[0],n[1]+=+r[1]),i},e.prototype.calculateCenterZoom=function(t,e){var i,n=this.getCenterInternal(),r=this.getResolution();void 0!==n&&void 0!==r&&(i=[e[0]-t*(e[0]-n[0])/r,e[1]-t*(e[1]-n[1])/r]);return i},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t?ui(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(ts)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.options_.constrainResolution},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){return pi(this.calculateExtentInternal(t),this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSize_(),i=this.getCenterInternal();fe(i,1);var n=this.getResolution();fe(void 0!==n,2);var r=this.getRotation();return fe(void 0!==r,3),ke(i,n,r,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(es)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(fi(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var i=e||this.getViewportSize_(),n=Xe(t)/i[0],r=je(t)/i[1];return Math.max(n,r)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(i/n)/Math.log(e);return function(t){return i/Math.pow(e,t*r)}},e.prototype.getRotation=function(){return this.get(is)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(i/n)/e;return function(t){return Math.log(i/t)/e/r}},e.prototype.getViewportSizeMinusPadding_=function(t){var e=this.getViewportSize_(t),i=this.padding;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e},e.prototype.getState=function(){var t=this.getProjection(),e=this.getResolution(),i=this.getRotation(),n=this.getCenterInternal(),r=this.padding;if(r){var o=this.getViewportSizeMinusPadding_();n=ds(n,this.getViewportSize_(),[o[0]/2+r[3],o[1]/2+r[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,rotation:i,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,i,n=this.minZoom_||0;if(this.resolutions_){var r=a(this.resolutions_,t,1);n=r,e=this.resolutions_[r],i=r==this.resolutions_.length-1?2:e/this.resolutions_[r+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=Pt(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,Pt(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var i;if(fe(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))fe(!Ye(t),25),i=Ln(n=fi(t,this.getProjection()));else if(t.getType()===zi){var n;(i=Ln(n=fi(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),Ae(n))}else{var r=hi();i=r?t.clone().transform(r,this.getProjection()):t}this.fitInternal(i,e)},e.prototype.fitInternal=function(t,e){var i=e||{},n=i.size;n||(n=this.getViewportSizeMinusPadding_());var r,o=void 0!==i.padding?i.padding:[0,0,0,0],s=void 0!==i.nearest&&i.nearest;r=void 0!==i.minResolution?i.minResolution:void 0!==i.maxZoom?this.getResolutionForZoom(i.maxZoom):0;for(var a=t.getFlatCoordinates(),l=this.getRotation(),h=Math.cos(-l),u=Math.sin(-l),c=1/0,p=1/0,d=-1/0,_=-1/0,g=t.getStride(),y=0,v=a.length;y=0;a--){var l=s[a];if(l.getMap()===this&&l.getActive()&&this.getTargetElement())if(!l.handleEvent(t)||t.propagationStopped)break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var i=this.maxTilesLoading_,n=i;if(t){var r=t.viewHints;if(r[Qo]||r[$o]){var o=!it&&Date.now()-t.time>8;i=o?0:8,n=o?0:2}}e.getTilesLoading()0&&t[1]>0}(i)&&n&&n.isDef()){var s=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=n.getState();o={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:ke(a.center,a.resolution,a.rotation,i),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:i,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:a,viewHints:s,wantedTiles:{}}}if(this.frameState_=o,this.renderer_.renderFrame(o),o){if(o.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,o.postRenderFunctions),r)(!this.previousExtent_||!Ye(this.previousExtent_)&&!be(o.extent,this.previousExtent_))&&(this.dispatchEvent(new Mo(U,this,r)),this.previousExtent_=Ee(this.previousExtent_));this.previousExtent_&&!o.viewHints[Qo]&&!o.viewHints[$o]&&!be(o.extent,this.previousExtent_)&&(this.dispatchEvent(new Mo(H,this,o)),ge(o.extent,this.previousExtent_))}this.dispatchEvent(new Mo(V,this,o)),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((function(){e.postRenderTimeoutHandle_=void 0,e.handlePostRender()}),0))},e.prototype.setLayerGroup=function(t){this.set(Go,t)},e.prototype.setSize=function(t){this.set(Wo,t)},e.prototype.setTarget=function(t){this.set(Xo,t)},e.prototype.setView=function(t){this.set(No,t)},e.prototype.updateSize=function(){var t=this.getTargetElement();if(t){var e=getComputedStyle(t);this.setSize([t.offsetWidth-parseFloat(e.borderLeftWidth)-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)-parseFloat(e.borderRightWidth),t.offsetHeight-parseFloat(e.borderTopWidth)-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom)-parseFloat(e.borderBottomWidth)])}else this.setSize(void 0);this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var e=void 0,i=getComputedStyle(this.viewport_);i.width&&i.height&&(e=[parseInt(i.width,10),parseInt(i.height,10)]),t.setViewportSize(e)}},e}(Z),vs=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ms=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this).ulElement_=document.createElement("ul"),i.collapsed_=void 0===n.collapsed||n.collapsed,i.userCollapsed_=i.collapsed_,i.overrideCollapsible_=void 0!==n.collapsible,i.collapsible_=void 0===n.collapsible||n.collapsible,i.collapsible_||(i.collapsed_=!1);var r=void 0!==n.className?n.className:"ol-attribution",o=void 0!==n.tipLabel?n.tipLabel:"Attributions",s=void 0!==n.expandClassName?n.expandClassName:r+"-expand",a=void 0!==n.collapseLabel?n.collapseLabel:"»",l=void 0!==n.collapseClassName?n.collapseClassName:r+"-collpase";"string"==typeof a?(i.collapseLabel_=document.createElement("span"),i.collapseLabel_.textContent=a,i.collapseLabel_.className=l):i.collapseLabel_=a;var h=void 0!==n.label?n.label:"i";"string"==typeof h?(i.label_=document.createElement("span"),i.label_.textContent=h,i.label_.className=s):i.label_=h;var u=i.collapsible_&&!i.collapsed_?i.collapseLabel_:i.label_,c=document.createElement("button");c.setAttribute("type","button"),c.title=o,c.appendChild(u),c.addEventListener(E,i.handleClick_.bind(i),!1);var p=r+" "+"ol-unselectable "+dt+(i.collapsed_&&i.collapsible_?" ol-collapsed":"")+(i.collapsible_?"":" ol-uncollapsible"),f=i.element;return f.className=p,f.appendChild(i.ulElement_),f.appendChild(c),i.renderedAttributions_=[],i.renderedVisible_=!0,i}return vs(e,t),e.prototype.collectSourceAttributions_=function(t){for(var e={},i=[],n=!0,r=t.layerStatesArray,o=0,s=r.length;o0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!u(e,this.renderedAttributions_)){ht(this.ulElement_);for(var n=0,r=e.length;n0}}else if(t.type==Ao.POINTERDOWN){var n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==Ao.POINTERMOVE&&this.handleMoveEvent(t);return!e},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){if(function(t){var e=t.type;return e===Ao.POINTERDOWN||e===Ao.POINTERDRAG||e===Ao.POINTERUP}(t)){var e=t.originalEvent,i=e.pointerId.toString();t.type==Ao.POINTERUP?delete this.trackedPointers_[i]:(t.type==Ao.POINTERDOWN||i in this.trackedPointers_)&&(this.trackedPointers_[i]=e),this.targetPointers=g(this.trackedPointers_)}},e}(ws);function Ps(t){var e=arguments;return function(t){for(var i=!0,n=0,r=e.length;n0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},e}(Rs),Xs=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ns=function(t){function e(e){var i=this,n=e||{};return(i=t.call(this,{stopDown:p})||this).condition_=n.condition?n.condition:Is,i.lastAngle_=void 0,i.duration_=void 0!==n.duration?n.duration:250,i}return Xs(e,t),e.prototype.handleDragEvent=function(t){if(js(t)){var e=t.map,i=e.getView();if(i.getConstraints().rotation!==hs){var n=e.getSize(),r=t.pixel,o=Math.atan2(n[1]/2-r[1],r[0]-n[0]/2);if(void 0!==this.lastAngle_){var s=o-this.lastAngle_;i.adjustRotationInternal(-s)}this.lastAngle_=o}}},e.prototype.handleUpEvent=function(t){return!js(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!!js(t)&&(!(!Ls(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))},e}(Rs),Ys=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ks=function(t){function e(e){var i=t.call(this)||this;return i.geometry_=null,i.element_=document.createElement("div"),i.element_.style.position="absolute",i.element_.style.pointerEvents="auto",i.element_.className="ol-box "+e,i.map_=null,i.startPixel_=null,i.endPixel_=null,i}return Ys(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,i="px",n=this.element_.style;n.left=Math.min(t[0],e[0])+i,n.top=Math.min(t[1],e[1])+i,n.width=Math.abs(e[0]-t[0])+i,n.height=Math.abs(e[1]-t[1])+i},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new Fn([i])},e.prototype.getGeometry=function(){return this.geometry_},e}(o),Bs=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Zs="boxstart",Vs="boxdrag",Us="boxend",Hs="boxcancel",qs=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.coordinate=i,r.mapBrowserEvent=n,r}return Bs(e,t),e}(n),Js=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.box_=new Ks(n.className||"ol-dragbox"),i.minArea_=void 0!==n.minArea?n.minArea:64,n.onBoxEnd&&(i.onBoxEnd=n.onBoxEnd),i.startPixel_=null,i.condition_=n.condition?n.condition:Ls,i.boxEndCondition_=n.boxEndCondition?n.boxEndCondition:i.defaultBoxEndCondition,i}return Bs(e,t),e.prototype.defaultBoxEndCondition=function(t,e,i){var n=i[0]-e[0],r=i[1]-e[1];return n*n+r*r>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new qs(Vs,t.coordinate,t))},e.prototype.handleUpEvent=function(t){this.box_.setMap(null);var e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new qs(e?Us:Hs,t.coordinate,t)),!1},e.prototype.handleDownEvent=function(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new qs(Zs,t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(Rs),Qs=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),$s=function(t){function e(e){var i=this,n=e||{},r=n.condition?n.condition:Ds;return(i=t.call(this,{condition:r,className:n.className||"ol-dragzoom",minArea:n.minArea})||this).duration_=void 0!==n.duration?n.duration:200,i.out_=void 0!==n.out&&n.out,i}return Qs(e,t),e.prototype.onBoxEnd=function(t){var e=this.getMap(),i=e.getView(),n=e.getSize(),r=this.getGeometry().getExtent();if(this.out_){var o=i.calculateExtentInternal(n),s=function(t,e){return Te(Ee(e),t)}([e.getPixelFromCoordinateInternal(Fe(r)),e.getPixelFromCoordinateInternal(We(r))]);!function(t,e){var i=(t[2]-t[0])/2*(e-1),n=(t[3]-t[1])/2*(e-1);t[0]-=i,t[2]+=i,t[1]-=n,t[3]+=n}(o,1/i.getResolutionForExtentInternal(s,n)),r=o}var a=i.getConstrainedResolution(i.getResolutionForExtentInternal(r,n)),l=i.getConstrainedCenter(Ae(r),a);i.animateInternal({resolution:a,center:l,duration:this.duration_,easing:xt})},e}(Js),ta=37,ea=38,ia=39,na=40,ra=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),oa=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.defaultCondition_=function(t){return As(t)&&ks(t)},i.condition_=void 0!==n.condition?n.condition:i.defaultCondition_,i.duration_=void 0!==n.duration?n.duration:100,i.pixelDelta_=void 0!==n.pixelDelta?n.pixelDelta:128,i}return ra(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==O){var i=t.originalEvent,n=i.keyCode;if(this.condition_(t)&&(n==na||n==ta||n==ia||n==ea)){var r=t.map.getView(),o=r.getResolution()*this.pixelDelta_,s=0,a=0;n==na?a=-o:n==ta?s=-o:n==ia?s=o:a=o;var l=[s,a];Yr(l,r.getRotation()),function(t,e,i){var n=t.getCenterInternal();if(n){var r=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:St,center:t.getConstrainedCenter(r)})}}(r,l,this.duration_),i.preventDefault(),e=!0}}return!e},e}(ws),sa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),aa=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.condition_=n.condition?n.condition:ks,i.delta_=n.delta?n.delta:1,i.duration_=void 0!==n.duration?n.duration:100,i}return sa(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==O||t.type==T){var i=t.originalEvent,n=i.charCode;if(this.condition_(t)&&(n=="+".charCodeAt(0)||n=="-".charCodeAt(0))){var r=t.map,o=n=="+".charCodeAt(0)?this.delta_:-this.delta_;Ss(r.getView(),o,void 0,this.duration_),i.preventDefault(),e=!0}}return!e},e}(ws),la=function(){function t(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}return t.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},t.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},t.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]0&&this.points_[i+2]>t;)i-=3;var n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;var r=this.points_[e]-this.points_[i],o=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(o,r),this.initialVelocity_=Math.sqrt(r*r+o*o)/n,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}(),ha=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ua="trackpad",ca="wheel",pa=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,n)||this).totalDelta_=0,i.lastDelta_=0,i.maxDelta_=void 0!==n.maxDelta?n.maxDelta:1,i.duration_=void 0!==n.duration?n.duration:250,i.timeout_=void 0!==n.timeout?n.timeout:80,i.useAnchor_=void 0===n.useAnchor||n.useAnchor,i.constrainResolution_=void 0!==n.constrainResolution&&n.constrainResolution;var r=n.condition?n.condition:Fs;return i.condition_=n.onFocusOnly?Ps(Ms,r):r,i.lastAnchor_=null,i.startTime_=void 0,i.timeoutId_,i.mode_=void 0,i.trackpadEventGap_=400,i.trackpadTimeoutId_,i.deltaPerZoom_=300,i}return ha(e,t),e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0,this.getMap().getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;if(t.type!==M)return!0;var e,i=t.map,n=t.originalEvent;if(n.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==M&&(e=n.deltaY,J&&n.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=tt),n.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var r=Date.now();void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?ua:ca);var o=i.getView();if(this.mode_===ua&&!o.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=r,!1;this.totalDelta_+=e;var s=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),s),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var i=-Pt(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),Ss(e,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(ws),fa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),da=function(t){function e(e){var i=this,n=e||{},r=n;return r.stopDown||(r.stopDown=p),(i=t.call(this,r)||this).anchor_=null,i.lastAngle_=void 0,i.rotating_=!1,i.rotationDelta_=0,i.threshold_=void 0!==n.threshold?n.threshold:.3,i.duration_=void 0!==n.duration?n.duration:250,i}return fa(e,t),e.prototype.handleDragEvent=function(t){var e=0,i=this.targetPointers[0],n=this.targetPointers[1],r=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){var o=r-this.lastAngle_;this.rotationDelta_+=o,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=o}this.lastAngle_=r;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==hs){var l=s.getViewport().getBoundingClientRect(),h=Ts(this.targetPointers);h[0]-=l.left,h[1]-=l.top,this.anchor_=s.getCoordinateFromPixelInternal(h),this.rotating_&&(s.render(),a.adjustRotationInternal(e,this.anchor_))}},e.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(Rs),_a=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ga=function(t){function e(e){var i=this,n=e||{},r=n;return r.stopDown||(r.stopDown=p),(i=t.call(this,r)||this).anchor_=null,i.duration_=void 0!==n.duration?n.duration:400,i.lastDistance_=void 0,i.lastScaleDelta_=1,i}return _a(e,t),e.prototype.handleDragEvent=function(t){var e=1,i=this.targetPointers[0],n=this.targetPointers[1],r=i.clientX-n.clientX,o=i.clientY-n.clientY,s=Math.sqrt(r*r+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/s),this.lastDistance_=s;var a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e);var h=a.getViewport().getBoundingClientRect(),u=Ts(this.targetPointers);u[0]-=h.left,u[1]-=h.top,this.anchor_=a.getCoordinateFromPixelInternal(u),a.render(),l.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),!1}return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(Rs);var ya=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),va=function(t){function e(e){return(e=d({},e)).controls||(e.controls=function(t){var e=t||{},i=new Oo;return(void 0===e.zoom||e.zoom)&&i.push(new bi(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&i.push(new Et(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&i.push(new ms(e.attributionOptions)),i}()),e.interactions||(e.interactions=function(t){var e=t||{},i=new Oo,n=new la(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&i.push(new Ns),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&i.push(new bs({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&i.push(new Ws({onFocusOnly:e.onFocusOnly,kinetic:n})),(void 0===e.pinchRotate||e.pinchRotate)&&i.push(new da),(void 0===e.pinchZoom||e.pinchZoom)&&i.push(new ga({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(i.push(new oa),i.push(new aa({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&i.push(new pa({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&i.push(new $s({duration:e.zoomDuration})),i}({onFocusOnly:!0})),t.call(this,e)||this}return ya(e,t),e.prototype.createRenderer=function(){return new xo(this)},e}(ys),ma=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),xa=function(t){function e(e,i,n){var r=t.call(this)||this,o=n||{};return r.tileCoord=e,r.state=i,r.interimTile=null,r.hifi=!0,r.key="",r.transition_=void 0===o.transition?250:o.transition,r.transitionStarts_={},r}return ma(e,t),e.prototype.changed=function(){this.dispatchEvent(C)},e.prototype.release=function(){},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==Vo)return this.transition_=0,t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(t.getState()==Vo){t.interimTile=null;break}t.getState()==Zo?e=t:t.getState()==Bo?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){if(this.state!==Uo&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){j()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;var n=e-i+1e3/60;return n>=this.transition_?1:mt(n/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(x),Ca=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();var Sa,wa=function(t){function e(e,i,n,r,o,s){var a=t.call(this,e,i,s)||this;return a.crossOrigin_=r,a.src_=n,a.key=n,a.image_=new Image,null!==r&&(a.image_.crossOrigin=r),a.unlisten_=null,a.tileLoadFunction_=o,a}return Ca(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){var t;this.state=Uo,this.unlistenImage_(),this.image_=((t=rt(1,1)).fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=Vo:this.state=Ho,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==Uo&&(this.state=Bo,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==Bo&&(this.state=Zo,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=_r(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(xa),Ea=function(){function t(t,e,i,n,r,o){this.sourceProj_=t,this.targetProj_=e;var s={},a=ii(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return s[e]||(s[e]=a(t)),s[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&Xe(n)==Xe(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Xe(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Xe(this.targetProj_.getExtent()):null;var l=Ge(i),h=We(i),u=Le(i),c=Fe(i),p=this.transformInv_(l),f=this.transformInv_(h),d=this.transformInv_(u),_=this.transformInv_(c),g=10+(o?Math.max(0,Math.ceil(Mt(Me(i)/(o*o*256*256)))):0);if(this.addQuad_(l,h,u,c,p,f,d,_,g),this.wrapsXInSource_){var y=1/0;this.triangles_.forEach((function(t,e,i){y=Math.min(y,t.source[0][0],t.source[1][0],t.source[2][0])})),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-y>this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-y>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-y>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-y>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var i=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-i.5&&u<1,f=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_)f=Xe(de([t,e,i,n]))/this.targetWorldWidth_>.25||f;!p&&this.sourceProj_.isGlobal()&&u&&(f=u>.25||f)}if(!(!f&&this.maxSourceExtent_&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3]))||Ne(h,this.maxSourceExtent_)){var d=0;if(!(f||isFinite(r[0])&&isFinite(r[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1])))if(l>0)f=!0;else if(1!=(d=(isFinite(r[0])&&isFinite(r[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(s[0])&&isFinite(s[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1))&&2!=d&&4!=d&&8!=d)return;if(l>0){if(!f){var _=[(t[0]+i[0])/2,(t[1]+i[1])/2],g=this.transformInv_(_),y=void 0;if(p)y=(Dt(r[0],c)+Dt(s[0],c))/2-Dt(g[0],c);else y=(r[0]+s[0])/2-g[0];var v=(r[1]+s[1])/2-g[1];f=y*y+v*v>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){var m=[(e[0]+i[0])/2,(e[1]+i[1])/2],x=this.transformInv_(m),C=[(n[0]+t[0])/2,(n[1]+t[1])/2],S=this.transformInv_(C);this.addQuad_(t,e,m,C,r,o,x,S,l-1),this.addQuad_(C,m,i,n,S,x,s,a,l-1)}else{var w=[(t[0]+e[0])/2,(t[1]+e[1])/2],E=this.transformInv_(w),b=[(i[0]+n[0])/2,(i[1]+n[1])/2],O=this.transformInv_(b);this.addQuad_(t,w,b,n,r,E,O,a,l-1),this.addQuad_(w,e,i,b,E,o,s,O,l-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&d)&&this.addTriangle_(t,i,n,r,s,a),0==(14&d)&&this.addTriangle_(t,i,e,r,s,o),d&&(0==(13&d)&&this.addTriangle_(e,n,t,o,a,r),0==(7&d)&&this.addTriangle_(e,n,i,o,a,s))}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(e,i,n){var r=e.source;Oe(t,r[0]),Oe(t,r[1]),Oe(t,r[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}(),ba={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1};function Oa(t,e,i,n,r){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(n,r),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(i,r)),t.restore()}function Ta(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function Ra(t,e,i,n){var r=ni(i,e,t),o=Je(e,n,i),s=e.getMetersPerUnit();void 0!==s&&(o*=s);var a=t.getMetersPerUnit();void 0!==a&&(o/=a);var l=t.getExtent();if(!l||ve(l,r)){var h=Je(t,o,r)/o;isFinite(h)&&h>0&&(o/=h)}return o}function Pa(t,e,i,n,r,o,s,a,l,h,u,c){var p=rt(Math.round(i*t),Math.round(i*e));if(d(p,c),0===l.length)return p.canvas;function f(t){return Math.round(t*i)/i}p.scale(i,i),p.globalCompositeOperation="lighter";var _=[1/0,1/0,-1/0,-1/0];l.forEach((function(t,e,i){var n,r;n=_,(r=t.extent)[0]n[2]&&(n[2]=r[2]),r[1]n[3]&&(n[3]=r[3])}));var g=Xe(_),y=je(_),v=rt(Math.round(i*g/n),Math.round(i*y/n));d(v,c);var m=i/n;l.forEach((function(t,e,i){var n=t.extent[0]-_[0],r=-(t.extent[3]-_[3]),o=Xe(t.extent),s=je(t.extent);t.image.width>0&&t.image.height>0&&v.drawImage(t.image,h,h,t.image.width-2*h,t.image.height-2*h,n*m,r*m,o*m,s*m)}));var x=Ge(s);return a.getTriangles().forEach((function(t,e,r){var s=t.source,a=t.target,l=s[0][0],h=s[0][1],u=s[1][0],d=s[1][1],g=s[2][0],y=s[2][1],m=f((a[0][0]-x[0])/o),C=f(-(a[0][1]-x[1])/o),S=f((a[1][0]-x[0])/o),w=f(-(a[1][1]-x[1])/o),E=f((a[2][0]-x[0])/o),b=f(-(a[2][1]-x[1])/o),O=l,T=h;l=0,h=0;var R=function(t){for(var e=t.length,i=0;ir&&(r=s,n=o)}if(0===r)return null;var a=t[n];t[n]=t[i],t[i]=a;for(var l=i+1;l=0;p--){c[p]=t[p][e]/t[p][p];for(var f=p-1;f>=0;f--)t[f][e]-=t[f][p]*c[p]}return c}([[u-=O,d-=T,0,0,S-m],[g-=O,y-=T,0,0,E-m],[0,0,u,d,w-C],[0,0,g,y,b-C]]);if(R){if(p.save(),p.beginPath(),function(){if(void 0===Sa){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Oa(t,4,5,4,0),Oa(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;Sa=Ta(e,0)||Ta(e,4)||Ta(e,8)}return Sa}()||c===ba){p.moveTo(S,w);for(var P=m-S,I=C-w,M=0;M<4;M++)p.lineTo(S+f((M+1)*P/4),w+f(M*I/3)),3!=M&&p.lineTo(S+f((M+1)*P/4),w+f((M+1)*I/3));p.lineTo(E,b)}else p.moveTo(S,w),p.lineTo(m,C),p.lineTo(E,b);p.clip(),p.transform(R[0],R[2],R[1],R[3],m,C),p.translate(_[0]-O,_[3]-T),p.scale(n/i,-n/i),p.drawImage(v.canvas,0,0),p.restore()}})),u&&(p.save(),p.globalCompositeOperation="source-over",p.strokeStyle="black",p.lineWidth=1,a.getTriangles().forEach((function(t,e,i){var n=t.target,r=(n[0][0]-x[0])/o,s=-(n[0][1]-x[1])/o,a=(n[1][0]-x[0])/o,l=-(n[1][1]-x[1])/o,h=(n[2][0]-x[0])/o,u=-(n[2][1]-x[1])/o;p.beginPath(),p.moveTo(a,l),p.lineTo(r,s),p.lineTo(h,u),p.closePath(),p.stroke()})),p.restore()),p.canvas}var Ia=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ma=function(t){function e(e,i,n,r,o,s,a,l,h,u,c,p){var f=t.call(this,o,Bo)||this;f.renderEdges_=void 0!==c&&c,f.contextOptions_=p,f.pixelRatio_=a,f.gutter_=l,f.canvas_=null,f.sourceTileGrid_=i,f.targetTileGrid_=r,f.wrappedTileCoord_=s||o,f.sourceTiles_=[],f.sourcesListenerKeys_=null,f.sourceZ_=0;var d=r.getTileCoordExtent(f.wrappedTileCoord_),_=f.targetTileGrid_.getExtent(),g=f.sourceTileGrid_.getExtent(),y=_?ze(d,_):d;if(0===Me(y))return f.state=Ho,f;var v=e.getExtent();v&&(g=g?ze(g,v):v);var m=r.getResolution(f.wrappedTileCoord_[0]),x=function(t,e,i,n){var r=Ae(i),o=Ra(t,e,r,n);return(!isFinite(o)||o<=0)&&Ie(i,(function(i){return o=Ra(t,e,i,n),isFinite(o)&&o>0})),o}(e,n,y,m);if(!isFinite(x)||x<=0)return f.state=Ho,f;var C=void 0!==u?u:.5;if(f.triangulation_=new Ea(e,n,y,g,x*C,m),0===f.triangulation_.getTriangles().length)return f.state=Ho,f;f.sourceZ_=i.getZForResolution(x);var S=f.triangulation_.calculateSourceExtent();if(g&&(e.canWrapX()?(S[1]=Pt(S[1],g[1],g[3]),S[3]=Pt(S[3],g[1],g[3])):S=ze(S,g)),Me(S)){for(var w=i.getTileRangeForExtentAndZ(S,f.sourceZ_),E=w.minX;E<=w.maxX;E++)for(var b=w.minY;b<=w.maxY;b++){var O=h(f.sourceZ_,E,b,a);O&&f.sourceTiles_.push(O)}0===f.sourceTiles_.length&&(f.state=Ho)}else f.state=Ho;return f}return Ia(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,i,n){e&&e.getState()==Vo&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=Uo;else{var e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],r="number"==typeof i?i:i[1],o=this.targetTileGrid_.getResolution(e),s=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Pa(n,r,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),o,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.contextOptions_),this.state=Vo}this.changed()},e.prototype.load=function(){if(this.state==Bo){this.state=Zo,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,i,n){var r=e.getState();if(r==Bo||r==Zo){t++;var o=F(e,C,(function(i){var n=e.getState();n!=Vo&&n!=Uo&&n!=Ho||(A(o),0===--t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(o)}}.bind(this)),this.sourceTiles_.forEach((function(t,e,i){t.getState()==Bo&&t.load()})),0===t&&setTimeout(this.reproject_.bind(this),0)}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(A),this.sourcesListenerKeys_=null},e}(xa),Fa=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var i=this.entries_[t];return fe(void 0!==i,15),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_},t.prototype.remove=function(t){var e=this.entries_[t];return fe(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){fe(!(t in this.entries_),16);var i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}();function La(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function Aa(t,e,i){return t+"/"+e+"/"+i}function Da(t){return Aa(t[0],t[1],t[2])}var ka=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ja=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ka(e,t),e.prototype.expireCache=function(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=function(t){return t.split("/").map(Number)}(this.peekFirstKey())[0];this.forEach(function(e){e.tileCoord[0]!==t&&(this.remove(Da(e.tileCoord)),e.release())}.bind(this))}},e}(Fa),za="tileloadstart",Ga="tileloadend",Wa="tileloaderror",Xa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Na(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}var Ya=function(t){function e(e){var i=t.call(this)||this;return i.projection_=qe(e.projection),i.attributions_=Na(e.attributions),i.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,i.loading=!1,i.state_=void 0!==e.state?e.state:zr,i.wrapX_=void 0!==e.wrapX&&e.wrapX,i}return Xa(e,t),e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolutions=function(){return j()},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getContextOptions=function(){},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=Na(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(Z),Ka=function(){function t(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function Ba(t,e,i,n,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=i,r.maxY=n,r):new Ka(t,e,i,n)}var Za=Ka,Va=[0,0,0],Ua=function(){function t(t){var e,i,n,r;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,fe((e=this.resolutions_,i=!0,n=function(t,e){return e-t}||s,e.every((function(t,r){if(0===r)return!0;var o=n(e[r-1],t);return!(o>0||i&&0===o)}))),17),!t.origins)for(var o=0,a=this.resolutions_.length-1;o=this.minZoom;){if(e(a,2===this.zoomFactor_?Ba(r=Math.floor(r/2),r,o=Math.floor(o/2),o,i):this.getTileRangeForExtentAndZ(s,a,i)))return!0;--a}return!1},t.prototype.getExtent=function(){return this.extent_},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},t.prototype.getResolution=function(t){return this.resolutions_[t]},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getTileCoordChildTileRange=function(t,e,i){if(t[0]0?n:Math.max(s/a[0],o/a[1]),h=r+1,u=new Array(h),c=0;ci||i>e.getMaxZoom())return!1;var o=e.getFullTileRange(i);return!o||o.containsXY(n,r)}(t,n)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var i=this.getTileCacheForProjection(e);t>i.highWaterMark&&(i.highWaterMark=t)},e.prototype.useTile=function(t,e,i,n){},e}(Ya),tl=function(t){function e(e,i){var n=t.call(this,e)||this;return n.tile=i,n}return Qa(e,t),e}(n),el=$a;function il(t,e){var i=/\{z\}/g,n=/\{x\}/g,r=/\{y\}/g,o=/\{-y\}/g;return function(s,a,l){return s?t.replace(i,s[0].toString()).replace(n,s[1].toString()).replace(r,s[2].toString()).replace(o,(function(){var t=s[0],i=e.getFullTileRange(t);return fe(i,55),(i.getHeight()-s[2]-1).toString()})):void 0}}function nl(t,e){for(var i=t.length,n=new Array(i),r=0;rOpenStreetMap contributors.'];var r=void 0!==n.crossOrigin?n.crossOrigin:"anonymous",o=void 0!==n.url?n.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:i,attributionsCollapsible:!1,cacheSize:n.cacheSize,crossOrigin:r,imageSmoothing:n.imageSmoothing,maxZoom:void 0!==n.maxZoom?n.maxZoom:19,opaque:void 0===n.opaque||n.opaque,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,transition:n.transition,url:o,wrapX:n.wrapX})||this}return cl(e,t),e}(ul),fl="bottom-left",dl="bottom-center",_l="bottom-right",gl="center-left",yl="center-center",vl="center-right",ml="top-left",xl="top-center",Cl="top-right";function Sl(t){return(Sl="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)}var wl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),El="element",bl="map",Ol="offset",Tl="position",Rl="positioning",Pl=function(t){function e(e){var i=t.call(this)||this;i.options=e,i.id=e.id,i.insertFirst=void 0===e.insertFirst||e.insertFirst,i.stopEvent=void 0===e.stopEvent||e.stopEvent,i.element=document.createElement("div"),i.element.className=void 0!==e.className?e.className:"ol-overlay-container ol-selectable",i.element.style.position="absolute",i.element.style.pointerEvents="auto";var n=e.autoPan;return n&&"object"!==Sl(n)&&(n={animation:e.autoPanAnimation,margin:e.autoPanMargin}),i.autoPan=n||!1,i.rendered={transform_:"",visible:!0},i.mapPostrenderListenerKey=null,i.addEventListener(B(El),i.handleElementChanged),i.addEventListener(B(bl),i.handleMapChanged),i.addEventListener(B(Ol),i.handleOffsetChanged),i.addEventListener(B(Tl),i.handlePositionChanged),i.addEventListener(B(Rl),i.handlePositioningChanged),void 0!==e.element&&i.setElement(e.element),i.setOffset(void 0!==e.offset?e.offset:[0,0]),i.setPositioning(void 0!==e.positioning?e.positioning:ml),void 0!==e.position&&i.setPosition(e.position),i}return wl(e,t),e.prototype.getElement=function(){return this.get(El)},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get(bl)},e.prototype.getOffset=function(){return this.get(Ol)},e.prototype.getPosition=function(){return this.get(Tl)},e.prototype.getPositioning=function(){return this.get(Rl)},e.prototype.handleElementChanged=function(){ht(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(lt(this.element),A(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=F(t,V,this.render,this),this.updatePixelPosition();var e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}},e.prototype.render=function(){this.updatePixelPosition()},e.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},e.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},e.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},e.prototype.setElement=function(t){this.set(El,t)},e.prototype.setMap=function(t){this.set(bl,t)},e.prototype.setOffset=function(t){this.set(Ol,t)},e.prototype.setPosition=function(t){this.set(Tl,t)},e.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},e.prototype.panIntoView=function(t){var e=this.getMap();if(e&&e.getTargetElement()&&this.get(Tl)){var i=this.getRect(e.getTargetElement(),e.getSize()),n=this.getElement(),r=this.getRect(n,[ot(n),st(n)]),o=t||{},s=void 0===o.margin?20:o.margin;if(!me(i,r)){var a=r[0]-i[0],l=i[2]-r[2],h=r[1]-i[1],u=i[3]-r[3],c=[0,0];if(a<0?c[0]=a-s:l<0&&(c[0]=Math.abs(l)+s),h<0?c[1]=h-s:u<0&&(c[1]=Math.abs(u)+s),0!==c[0]||0!==c[1]){var p=e.getView().getCenterInternal(),f=e.getPixelFromCoordinateInternal(p);if(!f)return;var d=[f[0]+c[0],f[1]+c[1]],_=o.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(d),duration:_.duration,easing:_.easing})}}}},e.prototype.getRect=function(t,e){var i=t.getBoundingClientRect(),n=i.left+window.pageXOffset,r=i.top+window.pageYOffset;return[n,r,n+e[0],r+e[1]]},e.prototype.setPositioning=function(t){this.set(Rl,t)},e.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},e.prototype.updatePixelPosition=function(){var t=this.getMap(),e=this.getPosition();if(t&&t.isRendered()&&e){var i=t.getPixelFromCoordinate(e),n=t.getSize();this.updateRenderedPosition(i,n)}else this.setVisible(!1)},e.prototype.updateRenderedPosition=function(t,e){var i=this.element.style,n=this.getOffset(),r=this.getPositioning();this.setVisible(!0);var o=Math.round(t[0]+n[0])+"px",s=Math.round(t[1]+n[1])+"px",a="0%",l="0%";r==_l||r==vl||r==Cl?a="-100%":r!=dl&&r!=yl&&r!=xl||(a="-50%"),r==fl||r==dl||r==_l?l="-100%":r!=gl&&r!=yl&&r!=vl||(l="-50%");var h="translate("+a+", "+l+") translate("+o+", "+s+")";this.rendered.transform_!=h&&(this.rendered.transform_=h,i.transform=h,i.msTransform=h)},e.prototype.getOptions=function(){return this.options},e}(Z),Il=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t.prototype.getColor=function(){return this.color_},t.prototype.getLineCap=function(){return this.lineCap_},t.prototype.getLineDash=function(){return this.lineDash_},t.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t.prototype.getLineJoin=function(){return this.lineJoin_},t.prototype.getMiterLimit=function(){return this.miterLimit_},t.prototype.getWidth=function(){return this.width_},t.prototype.setColor=function(t){this.color_=t},t.prototype.setLineCap=function(t){this.lineCap_=t},t.prototype.setLineDash=function(t){this.lineDash_=t},t.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t},t.prototype.setLineJoin=function(t){this.lineJoin_=t},t.prototype.setMiterLimit=function(t){this.miterLimit_=t},t.prototype.setWidth=function(t){this.width_=t},t}();function Ml(t){return Array.isArray(t)?lr(t):t}var Fl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ll=function(t){function e(e){var i=this,n=void 0!==e.rotateWithView&&e.rotateWithView;return(i=t.call(this,{opacity:1,rotateWithView:n,rotation:void 0!==e.rotation?e.rotation:0,scale:void 0!==e.scale?e.scale:1,displacement:void 0!==e.displacement?e.displacement:[0,0]})||this).canvas_={},i.hitDetectionCanvas_=null,i.fill_=void 0!==e.fill?e.fill:null,i.origin_=[0,0],i.points_=e.points,i.radius_=void 0!==e.radius?e.radius:e.radius1,i.radius2_=e.radius2,i.angle_=void 0!==e.angle?e.angle:0,i.stroke_=void 0!==e.stroke?e.stroke:null,i.anchor_=null,i.size_=null,i.imageSize_=null,i.hitDetectionImageSize_=null,i.render(),i}return Fl(e,t),e.prototype.clone=function(){var t=this.getScale(),i=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice()});return i.setOpacity(this.getOpacity()),i},e.prototype.getAnchor=function(){return this.anchor_},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionCanvas_){var t=this.createRenderOptions();this.createHitDetectionCanvas_(t)}return this.hitDetectionCanvas_},e.prototype.getImage=function(t){if(!this.canvas_[t||1]){var e=this.createRenderOptions(),i=rt(e.size*t||1,e.size*t||1);this.draw_(e,i,0,0,t||1),this.canvas_[t||1]=i.canvas}return this.canvas_[t||1]},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.imageSize_},e.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_},e.prototype.getImageState=function(){return Jn},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.createRenderOptions=function(){var t,e=Qr,i=to,n=0,r=null,o=0,s=0;return this.stroke_&&(null===(t=this.stroke_.getColor())&&(t=eo),t=Ml(t),void 0===(s=this.stroke_.getWidth())&&(s=1),r=this.stroke_.getLineDash(),o=this.stroke_.getLineDashOffset(),void 0===(i=this.stroke_.getLineJoin())&&(i=to),void 0===(e=this.stroke_.getLineCap())&&(e=Qr),void 0===(n=this.stroke_.getMiterLimit())&&(n=10)),{strokeStyle:t,strokeWidth:s,size:2*(this.radius_+s)+1,lineCap:e,lineDash:r,lineDashOffset:o,lineJoin:i,miterLimit:n}},e.prototype.render=function(){var t=this.createRenderOptions(),e=rt(t.size,t.size);this.draw_(t,e,0,0,1),this.canvas_={},this.canvas_[1]=e.canvas;var i=e.canvas.width,n=i,r=this.getDisplacement();this.hitDetectionImageSize_=[t.size,t.size],this.createHitDetectionCanvas_(t),this.anchor_=[i/2-r[0],i/2+r[1]],this.size_=[i,i],this.imageSize_=[n,n]},e.prototype.draw_=function(t,e,i,n,r){var o,s,a;e.setTransform(r,0,0,r,0,0),e.translate(i,n),e.beginPath();var l=this.points_;if(l===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var h=void 0!==this.radius2_?this.radius2_:this.radius_;for(h!==this.radius_&&(l*=2),o=0;o<=l;o++)s=2*o*Math.PI/l-Math.PI/2+this.angle_,a=o%2==0?this.radius_:h,e.lineTo(t.size/2+a*Math.cos(s),t.size/2+a*Math.sin(s))}if(this.fill_){var u=this.fill_.getColor();null===u&&(u=Jr),e.fillStyle=Ml(u),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,e.setLineDash&&t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke()),e.closePath()},e.prototype.createHitDetectionCanvas_=function(t){if(this.hitDetectionCanvas_=this.getImage(1),this.fill_){var e=this.fill_.getColor(),i=0;if("string"==typeof e&&(e=sr(e)),null===e?i=1:Array.isArray(e)&&(i=4===e.length?e[3]:1),0===i){var n=rt(t.size,t.size);this.hitDetectionCanvas_=n.canvas,this.drawHitDetectionCanvas_(t,n,0,0)}}},e.prototype.drawHitDetectionCanvas_=function(t,e,i,n){e.translate(i,n),e.beginPath();var r=this.points_;if(r===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var o=void 0!==this.radius2_?this.radius2_:this.radius_;o!==this.radius_&&(r*=2);var s=void 0,a=void 0,l=void 0;for(s=0;s<=r;s++)l=2*s*Math.PI/r-Math.PI/2+this.angle_,a=s%2==0?this.radius_:o,e.lineTo(t.size/2+a*Math.cos(l),t.size/2+a*Math.sin(l))}e.fillStyle=Jr,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.stroke()),e.closePath()},e}(tr),Al=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Dl=function(t){function e(e){var i=e||{};return t.call(this,{points:1/0,fill:i.fill,radius:i.radius,stroke:i.stroke,scale:void 0!==i.scale?i.scale:1,rotation:void 0!==i.rotation?i.rotation:0,rotateWithView:void 0!==i.rotateWithView&&i.rotateWithView,displacement:void 0!==i.displacement?i.displacement:[0,0]})||this}return Al(e,t),e.prototype.clone=function(){var t=this.getScale(),i=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()});return i.setOpacity(this.getOpacity()),i},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(Ll),kl=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0})},t.prototype.getColor=function(){return this.color_},t.prototype.setColor=function(t){this.color_=t},t}();function jl(t){return(jl="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)}var zl=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=Xl,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex}return t.prototype.clone=function(){var e=this.getGeometry();return e&&"object"===jl(e)&&(e=e.clone()),new t({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t.prototype.getRenderer=function(){return this.renderer_},t.prototype.setRenderer=function(t){this.renderer_=t},t.prototype.getGeometry=function(){return this.geometry_},t.prototype.getGeometryFunction=function(){return this.geometryFunction_},t.prototype.getFill=function(){return this.fill_},t.prototype.setFill=function(t){this.fill_=t},t.prototype.getImage=function(){return this.image_},t.prototype.setImage=function(t){this.image_=t},t.prototype.getStroke=function(){return this.stroke_},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.getText=function(){return this.text_},t.prototype.setText=function(t){this.text_=t},t.prototype.getZIndex=function(){return this.zIndex_},t.prototype.setGeometry=function(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=Xl,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}();var Gl=null;function Wl(t,e){if(!Gl){var i=new kl({color:"rgba(255,255,255,0.4)"}),n=new Il({color:"#3399CC",width:1.25});Gl=[new zl({image:new Dl({fill:i,stroke:n,radius:5}),fill:i,stroke:n})]}return Gl}function Xl(t){return t.getGeometry()}var Nl=zl,Yl="preload",Kl="useInterimTilesOnError",Bl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Zl=function(t){function e(e){var i=this,n=e||{},r=d({},n);return delete r.preload,delete r.useInterimTilesOnError,(i=t.call(this,r)||this).setPreload(void 0!==n.preload?n.preload:0),i.setUseInterimTilesOnError(void 0===n.useInterimTilesOnError||n.useInterimTilesOnError),i}return Bl(e,t),e.prototype.getPreload=function(){return this.get(Yl)},e.prototype.setPreload=function(t){this.set(Yl,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Kl)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Kl,t)},e}(Xr),Vl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ul=function(t){function e(e){var i=t.call(this)||this;return i.boundHandleImageChange_=i.handleImageChange_.bind(i),i.layer_=e,i.declutterExecutorGroup=null,i}return Vl(e,t),e.prototype.getFeatures=function(t){return j()},e.prototype.prepareFrame=function(t){return j()},e.prototype.renderFrame=function(t,e){return j()},e.prototype.loadedTileCallback=function(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i},e.prototype.createLoadedTileFinder=function(t,e,i){return function(n,r){var o=this.loadedTileCallback.bind(this,i,n);return t.forEachLoadedTile(e,n,r,o)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r){},e.prototype.getDataAtPixel=function(t,e,i){return j()},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){t.target.getState()===Jn&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return e!=Jn&&e!=Qn&&t.addEventListener(C,this.boundHandleImageChange_),e==Hn&&(t.load(),e=t.getState()),e==Jn},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==zr&&t.changed()},e}(k),Hl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ql=function(t){function e(e){var i=t.call(this,e)||this;return i.container=null,i.renderedResolution,i.tempTransform=[1,0,0,1,0,0],i.pixelTransform=[1,0,0,1,0,0],i.inversePixelTransform=[1,0,0,1,0,0],i.context=null,i.containerReused=!1,i}return Hl(e,t),e.prototype.useContainer=function(t,e,i){var n,r,o=this.getLayer().getClassName();t&&""===t.style.opacity&&t.className===o&&((a=t.firstElementChild)instanceof HTMLCanvasElement&&(r=a.getContext("2d")));if(!r||0!==r.canvas.width&&r.canvas.style.transform!==e?this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1):(this.container=t,this.context=r,this.containerReused=!0),!this.container){(n=document.createElement("div")).className=o;var s=n.style;s.position="absolute",s.width="100%",s.height="100%";var a=(r=rt()).canvas;n.appendChild(a),(s=a.style).position="absolute",s.left="0",s.transformOrigin="top left",this.container=n,this.context=r}},e.prototype.clip=function(t,e,i){var n=e.pixelRatio,r=e.size[0]*n/2,o=e.size[1]*n/2,s=e.viewState.rotation,a=Ge(i),l=We(i),h=Le(i),u=Fe(i);Wi(e.coordinateToPixelTransform,a),Wi(e.coordinateToPixelTransform,l),Wi(e.coordinateToPixelTransform,h),Wi(e.coordinateToPixelTransform,u),t.save(),go(t,-s,r,o),t.beginPath(),t.moveTo(a[0]*n,a[1]*n),t.lineTo(l[0]*n,l[1]*n),t.lineTo(h[0]*n,h[1]*n),t.lineTo(u[0]*n,u[1]*n),t.clip(),go(t,s,r,o)},e.prototype.clipUnrotated=function(t,e,i){var n=Ge(i),r=We(i),o=Le(i),s=Fe(i);Wi(e.coordinateToPixelTransform,n),Wi(e.coordinateToPixelTransform,r),Wi(e.coordinateToPixelTransform,o),Wi(e.coordinateToPixelTransform,s);var a=this.inversePixelTransform;Wi(a,n),Wi(a,r),Wi(a,o),Wi(a,s),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,i){var n=this.getLayer();if(n.hasListener(t)){var r=new Hr(t,this.inversePixelTransform,i,e);n.dispatchEvent(r)}},e.prototype.preRender=function(t,e){this.dispatchRenderEvent_(Fr,t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_(Lr,t,e)},e.prototype.getRenderTransform=function(t,e,i,n,r,o,s){var a=r/2,l=o/2,h=n/e,u=-h,c=-t[0]+s,p=-t[1];return Xi(this.tempTransform,a,l,h,u,-i,c,p)},e.prototype.getDataAtPixel=function(t,e,i){var n,r=Wi(this.inversePixelTransform,t.slice()),o=this.context,s=this.getLayer().getExtent();if(s&&!ve(s,Wi(e.pixelToCoordinateTransform,t.slice())))return null;try{var a=Math.round(r[0]),l=Math.round(r[1]),h=document.createElement("canvas"),u=h.getContext("2d");h.width=1,h.height=1,u.clearRect(0,0,1,1),u.drawImage(o.canvas,a,l,1,1,0,0,1,1),n=u.getImageData(0,0,1,1).data}catch(t){return"SecurityError"===t.name?new Uint8Array:n}return 0===n[3]?null:n},e}(Ul),Jl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ql=function(t){function e(e){var i=t.call(this,e)||this;return i.extentChanged=!0,i.renderedExtent_=null,i.renderedPixelRatio,i.renderedProjection=null,i.renderedRevision,i.renderedTiles=[],i.newTiles_=!1,i.tmpExtent=[1/0,1/0,-1/0,-1/0],i.tmpTileRange_=new Za(0,0,0,0),i}return Jl(e,t),e.prototype.isDrawableTile=function(t){var e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return i==Vo||i==Ho||i==Uo&&!n},e.prototype.getTile=function(t,e,i,n){var r=n.pixelRatio,o=n.viewState.projection,s=this.getLayer(),a=s.getSource().getTile(t,e,i,r,o);return a.getState()==Uo&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.newTiles_=!0):a.setState(Vo)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},e.prototype.loadedTileCallback=function(e,i,n){return!!this.isDrawableTile(n)&&t.prototype.loadedTileCallback.call(this,e,i,n)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var i=t.layerStatesArray[t.layerIndex],n=t.viewState,r=n.projection,o=n.resolution,a=n.center,l=n.rotation,h=t.pixelRatio,u=this.getLayer(),c=u.getSource(),p=c.getRevision(),f=c.getTileGridForProjection(r),_=f.getZForResolution(o,c.zDirection),g=f.getResolution(_),y=t.extent,v=i.extent&&fi(i.extent,r);v&&(y=ze(y,fi(i.extent,r)));var m=c.getTilePixelRatio(h),x=Math.round(t.size[0]*m),C=Math.round(t.size[1]*m);if(l){var S=Math.round(Math.sqrt(x*x+C*C));x=S,C=S}var w=g*x/2/m,E=g*C/2/m,b=[a[0]-w,a[1]-E,a[0]+w,a[1]+E],O=f.getTileRangeForExtentAndZ(y,_),T={};T[_]={};var R=this.createLoadedTileFinder(c,r,T),P=this.tmpExtent,I=this.tmpTileRange_;this.newTiles_=!1;for(var M=O.minX;M<=O.maxX;++M)for(var F=O.minY;F<=O.maxY;++F){var L=this.getTile(_,M,F,t);if(this.isDrawableTile(L)){var A=G(this);if(L.getState()==Vo){T[_][L.tileCoord.toString()]=L;var D=L.inTransition(A);this.newTiles_||!D&&-1!==this.renderedTiles.indexOf(L)||(this.newTiles_=!0)}if(1===L.getAlpha(A,t.time))continue}var k=f.getTileCoordChildTileRange(L.tileCoord,I,P),j=!1;k&&(j=R(_+1,k)),j||f.forEachTileCoordParentTileRange(L.tileCoord,R,I,P)}var z=g/o;Xi(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/m,1/m,l,-x/2,-C/2);var W=function(t){return et?Yi(t):(vo||(vo=rt(1,1).canvas),vo.style.transform=Yi(t),vo.style.transform)}(this.pixelTransform);this.useContainer(e,W,i.opacity);var X=this.context,N=X.canvas;Ni(this.inversePixelTransform,this.pixelTransform),Xi(this.tempTransform,x/2,C/2,z,z,0,-x/2,-C/2),N.width!=x||N.height!=C?(N.width=x,N.height=C):this.containerReused||X.clearRect(0,0,x,C),v&&this.clipUnrotated(X,t,v),d(X,c.getContextOptions()),this.preRender(X,t),this.renderedTiles.length=0;var Y,K,B,Z=Object.keys(T).map(Number);Z.sort(s),1!==i.opacity||this.containerReused&&!c.getOpaque(t.viewState.projection)?(Y=[],K=[]):Z=Z.reverse();for(var V=Z.length-1;V>=0;--V){var U=Z[V],H=c.getTilePixelSize(U,h,r),q=f.getResolution(U)/g,J=H[0]*q*z,Q=H[1]*q*z,$=f.getTileCoordForCoordAndZ(Ge(b),U),tt=f.getTileCoordExtent($),it=Wi(this.tempTransform,[m*(tt[0]-b[0])/g,m*(b[3]-tt[3])/g]),nt=m*c.getGutterForProjection(r),ot=T[U];for(var st in ot){var at=(L=ot[st]).tileCoord,lt=it[0]-($[1]-at[1])*J,ht=Math.round(lt+J),ut=it[1]-($[2]-at[2])*Q,ct=Math.round(ut+Q),pt=ht-(M=Math.round(lt)),ft=ct-(F=Math.round(ut)),dt=_===U;if(!(D=dt&&1!==L.getAlpha(G(this),t.time)))if(Y){X.save(),B=[M,F,M+pt,F,M+pt,F+ft,M,F+ft];for(var _t=0,gt=Y.length;_t=200&&a.status<300){var n=e.getType(),l=void 0;n==dh||n==_h?l=a.responseText:n==gh?(l=a.responseXML)||(l=(new DOMParser).parseFromString(a.responseText,"application/xml")):n==fh&&(l=a.response),l?o(e.readFeatures(l,{extent:i,featureProjection:r}),e.readProjection(l)):s()}else s()},a.onerror=s,a.send()}(t,e,i,n,r,(function(t,e){void 0!==o&&o(t),a.addFeatures(t)}),s||f)}}var mh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),xh=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.feature=i,r.features=n,r}return mh(e,t),e}(n),Ch=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,{attributions:n.attributions,projection:void 0,state:zr,wrapX:void 0===n.wrapX||n.wrapX})||this).loader_=f,i.format_=n.format,i.overlaps_=void 0===n.overlaps||n.overlaps,i.url_=n.url,void 0!==n.loader?i.loader_=n.loader:void 0!==i.url_&&(fe(i.format_,7),i.loader_=vh(i.url_,i.format_)),i.strategy_=void 0!==n.strategy?n.strategy:ph;var r,o,s=void 0===n.useSpatialIndex||n.useSpatialIndex;return i.featuresRtree_=s?new rh:null,i.loadedExtentsRtree_=new rh,i.nullGeometryFeatures_={},i.idIndex_={},i.uidIndex_={},i.featureChangeKeys_={},i.featuresCollection_=null,Array.isArray(n.features)?o=n.features:n.features&&(o=(r=n.features).getArray()),s||void 0!==r||(r=new Oo(o)),void 0!==o&&i.addFeaturesInternal(o),void 0!==r&&i.bindFeaturesCollection_(r),i}return mh(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=G(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var i=t.getGeometry();if(i){var n=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(n,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new xh(oh,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[F(e,C,this.handleFeatureChange_,this),F(e,r,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var i=!0,n=e.getId();return void 0!==n&&(n.toString()in this.idIndex_?i=!1:this.idIndex_[n.toString()]=e),i&&(fe(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),i},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],i=[],n=[],r=0,o=t.length;ru&&this.instructions.push([Ih.CUSTOM,u,r,t,i,un])):l==Ii&&(n=t.getFlatCoordinates(),this.coordinates.push(n[0],n[1]),r=this.coordinates.length,this.instructions.push([Ih.CUSTOM,u,r,t,i]));this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[Ih.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Ih.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var i,n,r=e.length,o=-1;for(t=0;tthis.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,i=[Ih.SET_FILL_STYLE,e];return"string"!=typeof e&&i.push(!0),i},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[Ih.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e){var i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)},e.prototype.updateStrokeStyle=function(t,e){var i=t.strokeStyle,n=t.lineCap,r=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||r!=t.currentLineDash&&!u(t.currentLineDash,r)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=r,t.currentLineDashOffset=o,t.currentLineJoin=s,t.currentLineWidth=a,t.currentMiterLimit=l)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var e=[Ih.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=ge(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;_e(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(Mh),Ah=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Dh=function(t){function e(e,i,n,r){var o=t.call(this,e,i,n,r)||this;return o.hitDetectionImage_=null,o.image_=null,o.imagePixelRatio_=void 0,o.anchorX_=void 0,o.anchorY_=void 0,o.height_=void 0,o.opacity_=void 0,o.originX_=void 0,o.originY_=void 0,o.rotateWithView_=void 0,o.rotation_=void 0,o.scale_=void 0,o.width_=void 0,o.declutterImageWithText_=void 0,o}return Ah(e,t),e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),r=this.coordinates.length,o=this.appendFlatPointCoordinates(i,n);this.instructions.push([Ih.DRAW_IMAGE,r,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterImageWithText_]),this.hitDetectionInstructions.push([Ih.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),r=this.coordinates.length,o=this.appendFlatPointCoordinates(i,n);this.instructions.push([Ih.DRAW_IMAGE,r,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterImageWithText_]),this.hitDetectionInstructions.push([Ih.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,t.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,e){var i=t.getAnchor(),n=t.getSize(),r=t.getHitDetectionImage(),o=t.getImage(this.pixelRatio),s=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=r,this.image_=o,this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=n[0],this.declutterImageWithText_=e},e}(Lh),kh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),jh=function(t){function e(e,i,n,r){return t.call(this,e,i,n,r)||this}return kh(e,t),e.prototype.drawFlatCoordinates_=function(t,e,i,n){var r=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,i,n,!1,!1),s=[Ih.MOVE_TO_LINE_TO,r,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),i},e.prototype.drawLineString=function(t,e){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Ih.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],Rh);var o=t.getFlatCoordinates(),s=t.getStride();this.drawFlatCoordinates_(o,0,o.length,s),this.hitDetectionInstructions.push(Th),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Ih.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],Rh);for(var o=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),l=0,h=0,u=o.length;ht&&(y>g&&(g=y,d=v,_=o),y=0,v=o-r)),s=a,u=p,c=f),l=m,h=x}return(y+=a)>g?[v,o]:[d,_]}var Nh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Yh={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},Kh={Circle:Gh,Default:Lh,Image:Dh,LineString:jh,Polygon:Gh,Text:function(t){function e(e,i,n,r){var o=t.call(this,e,i,n,r)||this;return o.labels_=null,o.text_="",o.textOffsetX_=0,o.textOffsetY_=0,o.textRotateWithView_=void 0,o.textRotation_=0,o.textFillState_=null,o.fillStates={},o.textStrokeState_=null,o.strokeStates={},o.textState_={},o.textStates={},o.textKey_="",o.fillKey_="",o.strokeKey_="",o.declutterImageWithText_=void 0,o}return Nh(e,t),e.prototype.finish=function(){var e=t.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},e.prototype.drawText=function(t,e){var i=this.textFillState_,n=this.textStrokeState_,r=this.textState_;if(""!==this.text_&&r&&(i||n)){var o=this.coordinates,s=o.length,a=t.getType(),l=null,h=t.getStride();if(r.placement!==Wh||a!=Mi&&a!=Di&&a!=Li&&a!=ki){var u=r.overflow?null:[];switch(a){case Ii:case Ai:l=t.getFlatCoordinates();break;case Mi:l=t.getFlatMidpoint();break;case zi:l=t.getCenter();break;case Di:l=t.getFlatMidpoints(),h=2;break;case Li:l=t.getFlatInteriorPoint(),r.overflow||u.push(l[2]/this.resolution),h=3;break;case ki:var c=t.getFlatInteriorPoints();l=[];for(C=0,S=c.length;CR[2]}else b=x>O;var P,I=Math.PI,M=[],F=S+n===e;if(g=0,y=w,p=t[e=S],f=t[e+1],F){v();var L=Math.atan2(f-_,p-d);b&&(L+=L>0?-I:I);var A=(O+x)/2,D=(T+C)/2;return M[0]=[A,D,(E-o)/2,L,r],M}for(var k=0,j=r.length;k0?-I:I),void 0!==P){var G=z-P;if(G+=G>I?-2*I:G<-I?2*I:0,Math.abs(G)>s)return null}P=z;for(var W=k,X=0;kt?t-l:r,x=o+h>e?e-h:o,C=f[3]+m*c[0]+f[1],S=f[0]+x*c[1]+f[2],w=y-f[3],E=v-f[0];return(d||0!==u)&&(tu[0]=w,nu[0]=w,tu[1]=E,eu[1]=E,eu[0]=w+C,iu[0]=eu[0],iu[1]=E+S,nu[1]=iu[1]),0!==u?(Wi(g=Xi([1,0,0,1,0,0],i,n,1,1,u,-i,-n),tu),Wi(g,eu),Wi(g,iu),Wi(g,nu),we(Math.min(tu[0],eu[0],iu[0],nu[0]),Math.min(tu[1],eu[1],iu[1],nu[1]),Math.max(tu[0],eu[0],iu[0],nu[0]),Math.max(tu[1],eu[1],iu[1],nu[1]),$h)):we(Math.min(w,w+C),Math.min(E,E+S),Math.max(w,w+C),Math.max(E,E+S),$h),p&&(y=Math.round(y),v=Math.round(v)),{drawImageX:y,drawImageY:v,drawImageW:m,drawImageH:x,originX:l,originY:h,declutterBox:{minX:$h[0],minY:$h[1],maxX:$h[2],maxY:$h[3],value:_},canvasTransform:g,scale:c}},t.prototype.replayImageOrLabel_=function(t,e,i,n,r,o,s){var a=!(!o&&!s),l=n.declutterBox,h=t.canvas,u=s?s[2]*n.scale[0]/2:0;return l.minX-u<=h.width/e&&l.maxX+u>=0&&l.minY-u<=h.height/e&&l.maxY+u>=0&&(a&&this.replayTextBackground_(t,tu,eu,iu,nu,o,s),yo(t,n.canvasTransform,r,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0},t.prototype.fill_=function(t){if(this.alignFill_){var e=Wi(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},t.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},t.prototype.drawLabelWithPointPlacement_=function(t,e,i,n){var r=this.textStates[e],o=this.createLabel(t,e,n,i),s=this.strokeStates[i],a=this.pixelRatio,l=su(t,r.textAlign||io),h=Yh[r.textBaseline||no],u=s&&s.lineWidth?s.lineWidth:0;return{label:o,anchorX:l*(o.width/a-2*r.scale[0])+2*(.5-l)*u,anchorY:h*o.height/a+2*(.5-h)*u}},t.prototype.execute_=function(t,e,i,n,r,o,s,a){var l,h,c;this.pixelCoordinates_&&u(i,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=Ki(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),h=this.renderedTransform_,c=i,h[0]=c[0],h[1]=c[1],h[2]=c[2],h[3]=c[3],h[4]=c[4],h[5]=c[5]);for(var p,f,d,_,g,y,v,m,x,C,S,w,E,b,O,T,R=0,P=n.length,I=0,M=0,F=0,L=null,A=null,D=this.coordinateCache_,k=this.viewRotation_,j=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,z={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:k},G=this.instructions!=n||this.overlaps?0:200;RG&&(this.fill_(t),M=0),F>G&&(t.stroke(),F=0),M||F||(t.beginPath(),_=NaN,g=NaN),++R;break;case Ih.CIRCLE:var X=l[I=W[1]],N=l[I+1],Y=l[I+2]-X,K=l[I+3]-N,B=Math.sqrt(Y*Y+K*K);t.moveTo(X+B,N),t.arc(X,N,B,0,2*Math.PI,!0),++R;break;case Ih.CLOSE_PATH:t.closePath(),++R;break;case Ih.CUSTOM:I=W[1],p=W[2];var Z=W[3],V=W[4],U=6==W.length?W[5]:void 0;z.geometry=Z,z.feature=E,R in D||(D[R]=[]);var H=D[R];U?U(l,I,p,2,H):(H[0]=l[I],H[1]=l[I+1],H.length=2),V(H,z),++R;break;case Ih.DRAW_IMAGE:I=W[1],p=W[2],m=W[3],f=W[4],d=W[5];var q=W[6],J=W[7],Q=W[8],$=W[9],tt=W[10],et=W[11],it=W[12],nt=W[13],rt=W[14];if(!m&&W.length>=19){x=W[18],C=W[19],S=W[20],w=W[21];var ot=this.drawLabelWithPointPlacement_(x,C,S,w);m=ot.label,W[3]=m;var st=W[22];f=(ot.anchorX-st)*this.pixelRatio,W[4]=f;var at=W[23];d=(ot.anchorY-at)*this.pixelRatio,W[5]=d,q=m.height,W[6]=q,nt=m.width,W[13]=nt}var lt=void 0;W.length>24&&(lt=W[24]);var ht=void 0,ut=void 0,ct=void 0;W.length>16?(ht=W[15],ut=W[16],ct=W[17]):(ht=ro,ut=!1,ct=!1),tt&&j?et+=k:tt||j||(et-=k);for(var pt=0;Ii)break;var a=n[s];a||(a=[],n[s]=a),a.push(4*((t+r)*e+(t+o))+3),r>0&&a.push(4*((t-r)*e+(t+o))+3),o>0&&(a.push(4*((t+r)*e+(t-o))+3),r>0&&a.push(4*((t-r)*e+(t-o))+3))}for(var l=[],h=(r=0,n.length);r0){if(!o||p!==Uh&&p!==Jh||-1!==o.indexOf(t)){var h=(f[s]-3)/4,u=n-h%a,d=n-(h/a|0),_=r(t,e,u*u+d*d);if(_)return _}c.clearRect(0,0,a,a);break}}var _,g,y,v,m,x=Object.keys(this.executorsByZIndex_).map(Number);for(x.sort(s),_=x.length-1;_>=0;--_){var C=x[_].toString();for(y=this.executorsByZIndex_[C],g=lu.length-1;g>=0;--g)if(void 0!==(v=y[p=lu[g]])&&(m=v.executeHitDetection(c,l,i,d,u)))return m}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var i=e[0],n=e[1],r=e[2],o=e[3],s=[i,n,i,o,r,o,r,n];return Ki(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return y(this.executorsByZIndex_)},t.prototype.execute=function(t,e,i,n,r,o,a){var l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(s),this.maxExtent_&&(t.save(),this.clip(t,i));var h,u,c,p,f,d,_=o||lu;for(a&&l.reverse(),h=0,u=l.length;h0&&(s.width=0),this.container;var h=Math.round(t.size[0]*i),u=Math.round(t.size[1]*i);s.width!=h||s.height!=u?(s.width=h,s.height=u,s.style.transform!==r&&(s.style.transform=r)):this.containerReused||o.clearRect(0,0,h,u),this.preRender(o,t);var c=t.viewState,p=c.projection,f=!1;if(n.extent&&this.clipping){var d=fi(n.extent,p);(f=!me(d,t.extent)&&Ne(d,t.extent))&&this.clipUnrotated(o,t,d)}this.renderWorlds(a,t),f&&o.restore(),this.postRender(o,t);var _=n.opacity,g=this.container;return _!==parseFloat(g.style.opacity)&&(g.style.opacity=1===_?"":String(_)),this.renderedRotation_!==c.rotation&&(this.renderedRotation_=c.rotation,this.hitDetectionImageData_=null),this.container},e.prototype.getFeatures=function(t){return new Promise(function(e){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var i=[this.context.canvas.width,this.context.canvas.height];Wi(this.pixelTransform,i);var n=this.renderedCenter_,r=this.renderedResolution_,o=this.renderedRotation_,a=this.renderedProjection_,l=this.renderedExtent_,h=this.getLayer(),u=[],c=i[0]/2,p=i[1]/2;u.push(this.getRenderTransform(n,r,o,.5,c,p,0).slice());var f=h.getSource(),d=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!me(d,l)){for(var _=l[0],g=Xe(d),y=0,v=void 0;_d[2];)v=g*++y,u.push(this.getRenderTransform(n,r,o,.5,c,p,v).slice()),_-=g}this.hitDetectionImageData_=function(t,e,i,n,r,o,a){var l=rt(t[0]/2,t[1]/2);l.imageSmoothingEnabled=!1;for(var h=l.canvas,u=new fu(l,.5,r,null,a),c=i.length,p=Math.floor(16777215/c),f={},d=1;d<=c;++d){var _=i[d-1],g=_.getStyleFunction()||n;if(n){var y=g(_,o);if(y){Array.isArray(y)||(y=[y]);for(var v="#"+("000000"+(d*p).toString(16)).slice(-6),m=0,x=y.length;m=i[2])){var r=Xe(i),o=Math.floor((n[0]-i[0])/r)*r;t[0]-=o,t[2]-=o}return t}(y[0],h);C[0]v[0]&&C[2]>v[2]&&y.push([C[0]-m,C[1],C[2]-m,C[3]])}if(!this.dirty_&&this.renderedResolution_==u&&this.renderedRevision_==p&&this.renderedRenderOrder_==d&&me(this.renderedExtent_,g))return this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var S,w=new Bh(gu(u,c),g,u,c);this.getLayer().getDeclutter()&&(S=new Bh(gu(u,c),g,u,c));var E,b=hi();if(b){for(var O=0,T=y.length;O180)&&(i[0]=Dt(n+180,360)-180),i}},Tu={OSM:pl,Vector:Ch,XYZ:ul},Ru={Icon:xr,Stroke:Il,Style:Nl}},7072:function(t,e,i){var n,r,o;function s(t){return(s="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)}o=function(){"use strict";function t(t,n,r,o,s){!function t(i,n,r,o,s){for(;o>r;){if(o-r>600){var a=o-r+1,l=n-r+1,h=Math.log(a),u=.5*Math.exp(2*h/3),c=.5*Math.sqrt(h*u*(a-u)/a)*(l-a/2<0?-1:1);t(i,n,Math.max(r,Math.floor(n-l*u/a+c)),Math.min(o,Math.floor(n+(a-l)*u/a+c)),s)}var p=i[n],f=r,d=o;for(e(i,r,n),s(i[o],p)>0&&e(i,r,o);f0;)d--}0===s(i[r],p)?e(i,r,d):e(i,++d,o),d<=n&&(r=d+1),n<=d&&(o=d-1)}}(t,n,r||0,o||t.length-1,s||i)}function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return te?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(e,i,n,r,o){for(var s=[i,n];s.length;)if(!((n=s.pop())-(i=s.pop())<=r)){var a=i+Math.ceil((n-i)/r/2)*r;t(e,a,i,n,o),s.push(i,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,i=[];if(!f(t,e))return i;for(var n=this.toBBox,r=[];e;){for(var o=0;o=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},n.prototype._split=function(t,e){var i=t[e],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var s=this._chooseSplitIndex(i,r,n),a=d(i.children.splice(s,i.children.length-s));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},n.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,i){for(var n,r,o,a,l,h,c,p=1/0,f=1/0,d=e;d<=i-e;d++){var _=s(t,0,d,this.toBBox),g=s(t,d,i,this.toBBox),y=(r=_,o=g,a=Math.max(r.minX,o.minX),l=Math.max(r.minY,o.minY),h=Math.min(r.maxX,o.maxX),c=Math.min(r.maxY,o.maxY),Math.max(0,h-a)*Math.max(0,c-l)),v=u(_)+u(g);y=e;f--){var d=t.children[f];a(l,t.leaf?r(d):d),h+=c(l)}return h},n.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)a(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},n},"object"==s(e)?t.exports=o():void 0===(r="function"==typeof(n=o)?n.call(e,i,e,t):n)||(t.exports=r)}}]); //# sourceMappingURL=521.bundle.js.map