(self.webpackChunkulogger_server=self.webpackChunkulogger_server||[]).push([[521],{4392:function(t,e,n){"use strict";n.r(e),n.d(e,{Feature:function(){return Qi},Map:function(){return Oa},Overlay:function(){return zl},View:function(){return ws},control:function(){return Au},extent:function(){return Du},geom:function(){return ku},layer:function(){return ju},proj:function(){return Gu},source:function(){return zu},style:function(){return Wu}});var i=function(){function t(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.defaultPrevented=!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?r-1:r:t[r-1]-e0)},e.prototype.removeEventListener=function(t,e){var n=this.listeners_&&this.listeners_[t];if(n){var i=n.indexOf(e);-1!==i&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[i]=f,++this.pendingRemovals_[t]):(n.splice(i,1),0===n.length&&delete this.listeners_[t]))}},e}(o),C="change",w="error",S="contextmenu",E="click",b="dblclick",T="keydown",O="keypress",R="load",I="resize",P="touchmove",M="wheel";function L(t,e,n,i,r){if(i&&i!==t&&(n=n.bind(i)),r){var o=n;n=function(){t.removeEventListener(e,n),o.apply(this,arguments)}}var s={target:t,type:e,listener:n};return t.addEventListener(e,n),s}function F(t,e,n,i){return L(t,e,n,i,!0)}function A(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),g(t))}var D=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),k=function(t){function e(){var e=t.call(this)||this;return e.on=e.onInternal,e.once=e.onceInternal,e.un=e.unInternal,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.onInternal=function(t,e){if(Array.isArray(t)){for(var n=t.length,i=new Array(n),r=0;r=0||q.match(/cpu (os|iphone os) 15_4 like mac os x/)),-1!==q.indexOf("webkit")&&-1==q.indexOf("edge")),$=-1!==q.indexOf("macintosh"),tt="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,et="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,nt="undefined"!=typeof Image&&Image.prototype.decode,it=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}();function rt(t,e,n,i){var r;return r=n&&n.length?n.shift():et?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(r.width=t),e&&(r.height=e),r.getContext("2d",i)}function ot(t){var e=t.offsetWidth,n=getComputedStyle(t);return e+=parseInt(n.marginLeft,10)+parseInt(n.marginRight,10)}function st(t){var e=t.offsetHeight,n=getComputedStyle(t);return e+=parseInt(n.marginTop,10)+parseInt(n.marginBottom,10)}function at(t,e){var n=e.parentNode;n&&n.replaceChild(t,e)}function lt(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function ht(t){for(;t.lastChild;)t.removeChild(t.lastChild)}var ut=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ct=function(t){function e(e){var n=t.call(this)||this,i=e.element;return!i||e.target||i.style.pointerEvents||(i.style.pointerEvents="auto"),n.element=i||null,n.target_=null,n.map_=null,n.listenerKeys=[],e.render&&(n.render=e.render),e.target&&n.setTarget(e.target),n}return ut(e,t),e.prototype.disposeInternal=function(){lt(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&<(this.element);for(var e=0,n=this.listenerKeys.length;e0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:Ct}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var n=e.viewState.rotation;if(n!=this.rotation_){var i="rotate("+n+"rad)";if(this.autoHide_){var r=this.element.classList.contains(pt);r||0!==n?r&&0!==n&&this.element.classList.remove(pt):this.element.classList.add(pt)}this.label_.style.transform=i}this.rotation_=n}},e}(ct),Tt={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"};var Ot={};Ot[Tt.RADIANS]=6370997/(2*Math.PI),Ot[Tt.DEGREES]=2*Math.PI*6370997/360,Ot[Tt.FEET]=.3048,Ot[Tt.METERS]=1,Ot[Tt.USFEET]=1200/3937;var Rt=Tt,It=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,n){return Math.min(Math.max(t,e),n)}var Mt="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},Lt="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function Ft(t,e,n,i,r,o){var s=r-n,a=o-i;if(0!==s||0!==a){var l=((t-n)*s+(e-i)*a)/(s*s+a*a);l>1?(n=r,i=o):l>0&&(n+=s*l,i+=a*l)}return At(t,e,n,i)}function At(t,e,n,i){var r=n-t,o=i-e;return r*r+o*o}function Dt(t){return t*Math.PI/180}function kt(t,e){var n=t%e;return n*e<0?n+e:n}function jt(t,e,n){return t+n*(e-t)}function Gt(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}function zt(t,e){return Math.floor(Gt(t,e))}function Wt(t,e){return Math.ceil(Gt(t,e))}var Nt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Xt=6378137,Yt=Math.PI*Xt,Bt=[-Yt,-Yt,Yt,Yt],Kt=[-180,-85,180,85],Zt=Xt*Math.log(Math.tan(Math.PI/2)),Vt=function(t){function e(e){return t.call(this,{code:e,units:Rt.METERS,extent:Bt,global:!0,worldExtent:Kt,getPointResolution:function(t,e){return t/Mt(e[1]/Xt)}})||this}return Nt(e,t),e}(It),Ut=[new Vt("EPSG:3857"),new Vt("EPSG:102100"),new Vt("EPSG:102113"),new Vt("EPSG:900913"),new Vt("http://www.opengis.net/def/crs/EPSG/0/3857"),new Vt("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Ht(t,e,n){var i=t.length,r=n>1?n:2,o=e;void 0===o&&(o=r>2?t.slice():new Array(i));for(var s=0;sZt?a=Zt:a<-Zt&&(a=-Zt),o[s+1]=a}return o}function qt(t,e,n){var i=t.length,r=n>1?n:2,o=e;void 0===o&&(o=r>2?t.slice():new Array(i));for(var s=0;sr&&(l|=pe),ao&&(l|=ce),l===he&&(l=ue),l}function Te(){return[1/0,1/0,-1/0,-1/0]}function Oe(t,e,n,i,r){return r?(r[0]=t,r[1]=e,r[2]=n,r[3]=i,r):[t,e,n,i]}function Re(t){return Oe(1/0,1/0,-1/0,-1/0,t)}function Ie(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function Pe(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function Me(t,e,n,i,r){for(;ne[0]?i[0]=t[0]:i[0]=e[0],t[1]>e[1]?i[1]=t[1]:i[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function Ze(t){return t[2]1)for(var o=t[2]-t[0],s=t[3]-t[1],a=0;a=0;--i)if(t[i]!=e[i]){n=!1;break}return n}function He(t,e){var n=Math.cos(e),i=Math.sin(e),r=t[0]*n-t[1]*i,o=t[1]*n+t[0]*i;return t[0]=r,t[1]=o,t}function qe(t,e){if(e.canWrapX()){var n=Be(e.getExtent()),i=function(t,e,n){var i=e.getExtent(),r=0;if(e.canWrapX()&&(t[0]i[2])){var o=n||Be(i);r=Math.floor((t[0]-i[0])/o)}return r}(t,e,n);i&&(t[0]-=i*n)}return t}var Je=6371008.8;function Qe(t,e,n){var i=n||Je,r=Dt(t[1]),o=Dt(e[1]),s=(o-r)/2,a=Dt(e[0]-t[0])/2,l=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(r)*Math.cos(o);return 2*i*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}var $e=!0;function tn(t){$e=!(void 0===t||t)}function en(t,e,n){var i;if(void 0!==e){for(var r=0,o=t.length;r=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&($e=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function Cn(t,e){return yn?fn(t,e,yn):t}function wn(t,e){return yn?fn(t,yn,e):t}function Sn(t,e){if(!yn)return t;var n=on(e).getUnits(),i=yn.getUnits();return n&&i?t*Ot[n]/Ot[i]:t}an(Ut),an(ee),dn=Ut,gn=Ht,_n=qt,ee.forEach((function(t){dn.forEach((function(e){re(t,e,gn),re(e,t,_n)}))}));var En,bn=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Tn="units",On="degrees",Rn="imperial",In="nautical",Pn="metric",Mn="us",Ln=[1,2,5],Fn=25.4/.28,An=function(t){function e(e){var n=this,i=e||{},r=void 0!==i.className?i.className:i.bar?"ol-scale-bar":"ol-scale-line";return(n=t.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this).on,n.once,n.un,n.innerElement_=document.createElement("div"),n.innerElement_.className=r+"-inner",n.element.className=r+" "+ft,n.element.appendChild(n.innerElement_),n.viewState_=null,n.minWidth_=void 0!==i.minWidth?i.minWidth:64,n.renderedVisible_=!1,n.renderedWidth_=void 0,n.renderedHTML_="",n.addChangeListener(Tn,n.handleUnitsChanged_),n.setUnits(i.units||Pn),n.scaleBar_=i.bar||!1,n.scaleBarSteps_=i.steps||4,n.scaleBarText_=i.text||!1,n.dpi_=i.dpi||void 0,n}return bn(e,t),e.prototype.getUnits=function(){return this.get(Tn)},e.prototype.handleUnitsChanged_=function(){this.updateElement_()},e.prototype.setUnits=function(t){this.set(Tn,t)},e.prototype.setDpi=function(t){this.dpi_=t},e.prototype.updateElement_=function(){var t=this.viewState_;if(t){var e=t.center,n=t.projection,i=this.getUnits(),r=i==On?Rt.DEGREES:Rt.METERS,o=sn(n,t.resolution,e,r),s=this.minWidth_*(this.dpi_||Fn)/Fn,a=s*o,l="";if(i==On){var h=Ot[Rt.DEGREES];(a*=h)=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,n){for(var i="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,n):"")+""),a===this.scaleBarSteps_-1&&r.push(this.createStepText(a+1,t,!0,e,n)),s="#ffffff"===s?"#000000":"#ffffff";return'
'+(this.scaleBarText_?'
'+i+"
":"")+r.join("")+"
"},e.prototype.createMarker=function(t,e){return'
'},e.prototype.createStepText=function(t,e,n,i,r){var o=(0===t?0:Math.round(i/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+r);return'
'+o+"
"},e.prototype.getScaleForResolution=function(){var t=sn(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,Rt.METERS),e=this.dpi_||Fn;return parseFloat(t.toString())*(1e3/25.4)*e},e.prototype.render=function(t){var e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()},e}(ct),Dn=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),kn=function(t){function e(e){var n=this,i=e||{};n=t.call(this,{element:document.createElement("div"),target:i.target})||this;var r=void 0!==i.className?i.className:"ol-zoom",o=void 0!==i.delta?i.delta:1,s=void 0!==i.zoomInClassName?i.zoomInClassName:r+"-in",a=void 0!==i.zoomOutClassName?i.zoomOutClassName:r+"-out",l=void 0!==i.zoomInLabel?i.zoomInLabel:"+",h=void 0!==i.zoomOutLabel?i.zoomOutLabel:"–",u=void 0!==i.zoomInTipLabel?i.zoomInTipLabel:"Zoom in",c=void 0!==i.zoomOutTipLabel?i.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,n.handleClick_.bind(n,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,n.handleClick_.bind(n,-o),!1);var d=r+" "+"ol-unselectable "+dt,g=n.element;return g.className=d,g.appendChild(p),g.appendChild(f),n.duration_=void 0!==i.duration?i.duration:250,n}return Dn(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 n=e.getZoom();if(void 0!==n){var i=e.getConstrainedZoom(n+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:i,duration:this.duration_,easing:Ct})):e.setZoom(i)}}},e}(ct),jn="XY",Gn="XYZ",zn="XYM",Wn="XYZM",Nn="Point",Xn="LineString",Yn="LinearRing",Bn="Polygon",Kn="MultiPoint",Zn="MultiLineString",Vn="MultiPolygon",Un="GeometryCollection",Hn="Circle";new Array(6);function qn(t,e,n,i,r,o,s){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t[4]=o,t[5]=s,t}function Jn(t,e){var n=e[0],i=e[1];return e[0]=t[0]*n+t[2]*i+t[4],e[1]=t[1]*n+t[3]*i+t[5],e}function Qn(t,e,n,i,r,o,s,a){var l=Math.sin(o),h=Math.cos(o);return t[0]=i*h,t[1]=r*l,t[2]=-i*l,t[3]=r*h,t[4]=s*i*h-a*i*l+e,t[5]=s*r*l+a*r*h+n,t}function $n(t,e){var n,i=(n=e)[0]*n[3]-n[1]*n[2];ye(0!==i,32);var r=e[0],o=e[1],s=e[2],a=e[3],l=e[4],h=e[5];return t[0]=a/i,t[1]=-o/i,t[2]=-s/i,t[3]=r/i,t[4]=(s*h-a*l)/i,t[5]=-(r*h-o*l)/i,t}function ti(t){var e="matrix("+t.join(", ")+")";if(et)return e;var n=En||(En=document.createElement("div"));return n.style.transform=e,n.style.transform}function ei(t,e,n,i,r,o){for(var s=o||[],a=0,l=e;l1)a=n;else{if(p>0){for(var f=0;fr&&(r=h),o=a,s=l}return r}function ci(t,e,n,i,r){for(var o=0,s=n.length;o0;){for(var c=h.pop(),p=h.pop(),f=0,d=t[p],g=t[p+1],_=t[c],y=t[c+1],v=p+i;vf&&(u=v,f=m)}f>r&&(l[(u-e)/i]=1,p+i0&&g>f)&&(d<0&&_0&&_>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 mi(t,e,n,i,r,o,s,a){for(var l=0,h=n.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 Mi(t,e,n,i,r,o){if(0===n.length)return!1;if(!Pi(t,e,n[0],i,r,o))return!1;for(var s=1,a=n.length;sC&&Mi(t,e,n,i,u=(c+p)/2,g)&&(x=u,C=w),c=p}return isNaN(x)&&(x=r[o]),a?(a.push(x,g,C),a):[x,g,C]}function Fi(t,e,n,i,r){var o;for(e+=i;e=r[0]&&o[2]<=r[2]||(o[1]>=r[1]&&o[3]<=r[3]||Fi(t,e,n,i,(function(t,e){return function(t,e,n){var i=!1,r=be(t,e),o=be(t,n);if(r===ue||o===ue)i=!0;else{var s=t[0],a=t[1],l=t[2],h=t[3],u=e[0],c=e[1],p=n[0],f=n[1],d=(f-c)/(p-u),g=void 0,_=void 0;o&ce&&!(r&ce)&&(i=(g=p-(f-h)/d)>=s&&g<=l),i||!(o&pe)||r&pe||(i=(_=f-(p-l)*d)>=a&&_<=h),i||!(o&fe)||r&fe||(i=(g=p-(f-a)/d)>=s&&g<=l),i||!(o&de)||r&de||(i=(_=f-(p-s)*d)>=a&&_<=h)}return i}(r,t,e)})))))}function Di(t,e,n,i,r){if(!function(t,e,n,i,r){return!!(Ai(t,e,n,i,r)||Pi(t,e,n,i,r[0],r[1])||Pi(t,e,n,i,r[0],r[3])||Pi(t,e,n,i,r[2],r[1])||Pi(t,e,n,i,r[2],r[3]))}(t,e,n[0],i,r))return!1;if(1===n.length)return!0;for(var o=1,s=n.length;o0}function Gi(t,e,n,i,r){for(var o=void 0!==r&&r,s=0,a=n.length;s>1)],e))<0?a=i+1:(l=i,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)*i):l=e+m*i}var x=a>1?a:2,C=o||new Array(x);for(g=0;g>1;r0&&t[1]>0}function ur(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}var cr=function(){function t(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=ur(t.scale),this.displacement_=t.displacement}return t.prototype.clone=function(){var e=this.getScale();return new t({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},t.prototype.getOpacity=function(){return this.opacity_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getDisplacement=function(){return this.displacement_},t.prototype.getAnchor=function(){return G()},t.prototype.getImage=function(t){return G()},t.prototype.getHitDetectionImage=function(){return G()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return G()},t.prototype.getImageSize=function(){return G()},t.prototype.getOrigin=function(){return G()},t.prototype.getSize=function(){return G()},t.prototype.setDisplacement=function(t){this.displacement_=t},t.prototype.setOpacity=function(t){this.opacity_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=ur(t)},t.prototype.listenImageChange=function(t){G()},t.prototype.load=function(){G()},t.prototype.unlistenImageChange=function(t){G()},t}(),pr=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,fr=/^([a-z]*)$|^hsla?\(.*\)$/i;function dr(t){return"string"==typeof t?t:mr(t)}function gr(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var n=getComputedStyle(e).color;return document.body.removeChild(e),n}return""}var _r=function(){var t={},e=0;return function(n){var i;if(t.hasOwnProperty(n))i=t[n];else{if(e>=1024){var r=0;for(var o in t)0==(3&r++)&&(delete t[o],--e)}i=function(t){var e,n,i,r,o;fr.exec(t)&&(t=gr(t));if(pr.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),n=parseInt(t.substr(1+1*a,a),16),i=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,n=(n<<4)+n,i=(i<<4)+i,l&&(r=(r<<4)+r)),o=[e,n,i,r/255]}else 0==t.indexOf("rgba(")?vr(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),vr(o)):ye(!1,14);return o}(n),t[n]=i,++e}return i}}();function yr(t){return Array.isArray(t)?t:_r(t)}function vr(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 mr(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var n=t[1];n!=(0|n)&&(n=n+.5|0);var i=t[2];return i!=(0|i)&&(i=i+.5|0),"rgba("+e+","+n+","+i+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}var xr=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 n=this.cache_[e];0!=(3&t++)||n.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,n){var i=Cr(t,e,n);return i in this.cache_?this.cache_[i]:null},t.prototype.set=function(t,e,n,i){var r=Cr(t,e,n);this.cache_[r]=i,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}();function Cr(t,e,n){return e+":"+t+":"+(n?dr(n):"null")}var wr=new xr,Sr=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Er=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.extent=e,o.pixelRatio_=i,o.resolution=n,o.state=r,o}return Sr(e,t),e.prototype.changed=function(){this.dispatchEvent(C)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return G()},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(){G()},e}(x),br=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();!function(t){function e(e,n,i,r,o,s){var a=t.call(this,e,n,i,or)||this;return a.src_=r,a.image_=new Image,null!==o&&(a.image_.crossOrigin=o),a.unlisten_=null,a.state=or,a.imageLoadFunction_=s,a}br(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=lr,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=We(this.extent)/this.image_.height),this.state=ar,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=or&&this.state!=lr||(this.state=sr,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=Tr(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=We(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}(Er);function Tr(t,e,n){var i=t,r=!0,o=!1,s=!1,a=[F(i,R,(function(){s=!0,o||e()}))];return i.src&&nt?(o=!0,i.decode().then((function(){r&&e()})).catch((function(t){r&&(s?e():n())}))):a.push(F(i,w,n)),function(){r=!1,a.forEach(A)}}var Or=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Rr=null,Ir=function(t){function e(e,n,i,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_=i,a.src_=n,a.tainted_,a}return Or(e,t),e.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===ar){Rr||(Rr=rt(1,1)),Rr.drawImage(this.image_,0,0);try{Rr.getImageData(0,0,1,1),this.tainted_=!1}catch(t){Rr=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(C)},e.prototype.handleImageError_=function(){this.imageState_=lr,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=ar,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],n=rt(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.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_==or){this.imageState_=sr;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=Tr(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]&&this.imageState_===ar){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 n=e.getContext("2d");if(n.scale(t,t),n.drawImage(this.image_,0,0),n.globalCompositeOperation="multiply","multiply"===n.globalCompositeOperation||this.isTainted_())n.fillStyle=dr(this.color_),n.fillRect(0,0,e.width/t,e.height/t),n.globalCompositeOperation="destination-in",n.drawImage(this.image_,0,0);else{for(var i=n.getImageData(0,0,e.width,e.height),r=i.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 u=void 0!==i.src?or:ar;return n.color_=void 0!==i.color?yr(i.color):null,n.iconImage_=function(t,e,n,i,r,o){var s=wr.get(e,i,o);return s||(s=new Ir(t,e,n,i,r,o),wr.set(e,i,o,s)),s}(l,h,void 0!==n.imgSize_?n.imgSize_:null,n.crossOrigin_,u,n.color_),n.offset_=void 0!==i.offset?i.offset:[0,0],n.offsetOrigin_=void 0!==i.offsetOrigin?i.offsetOrigin:ir,n.origin_=null,n.size_=void 0!==i.size?i.size:null,n}return Pr(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_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc()})},e.prototype.getAnchor=function(){var t=this.normalizedAnchor_;if(!t){t=this.anchor_;var e=this.getSize();if(this.anchorXUnits_==$i||this.anchorYUnits_==$i){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==$i&&(t[0]*=e[0]),this.anchorYUnits_==$i&&(t[1]*=e[1])}if(this.anchorOrigin_!=ir){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=rr&&this.anchorOrigin_!=nr||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=er&&this.anchorOrigin_!=nr||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}var n=this.getDisplacement();return[t[0]-n[0],t[1]+n[1]]},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.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_;if(this.offsetOrigin_!=ir){var e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),this.offsetOrigin_!=rr&&this.offsetOrigin_!=nr||(t[0]=n[0]-e[0]-t[0]),this.offsetOrigin_!=er&&this.offsetOrigin_!=nr||(t[1]=n[1]-e[1]-t[1])}return 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}(cr),Lr="opacity",Fr="visible",Ar="extent",Dr="zIndex",kr="maxResolution",jr="minResolution",Gr="maxZoom",zr="minZoom",Wr="source",Nr="map";function Xr(t){return(Xr="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 Yr=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Br=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un,n.background_=e.background;var i=d({},e);return"object"===Xr(e.properties)&&(delete i.properties,d(i,e.properties)),i[Lr]=void 0!==e.opacity?e.opacity:1,ye("number"==typeof i[Lr],64),i[Fr]=void 0===e.visible||e.visible,i[Dr]=e.zIndex,i[kr]=void 0!==e.maxResolution?e.maxResolution:1/0,i[jr]=void 0!==e.minResolution?e.minResolution:0,i[zr]=void 0!==e.minZoom?e.minZoom:-1/0,i[Gr]=void 0!==e.maxZoom?e.maxZoom:1/0,n.className_=void 0!==i.className?i.className:"ol-layer",delete i.className,n.setProperties(i),n.state_=null,n}return Yr(e,t),e.prototype.getBackground=function(){return this.background_},e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},n=this.getZIndex();return e.opacity=Pt(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==n||e.managed?n:1/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 G()},e.prototype.getLayerStatesArray=function(t){return G()},e.prototype.getExtent=function(){return this.get(Ar)},e.prototype.getMaxResolution=function(){return this.get(kr)},e.prototype.getMinResolution=function(){return this.get(jr)},e.prototype.getMinZoom=function(){return this.get(zr)},e.prototype.getMaxZoom=function(){return this.get(Gr)},e.prototype.getOpacity=function(){return this.get(Lr)},e.prototype.getSourceState=function(){return G()},e.prototype.getVisible=function(){return this.get(Fr)},e.prototype.getZIndex=function(){return this.get(Dr)},e.prototype.setBackground=function(t){this.background_=t,this.changed()},e.prototype.setExtent=function(t){this.set(Ar,t)},e.prototype.setMaxResolution=function(t){this.set(kr,t)},e.prototype.setMinResolution=function(t){this.set(jr,t)},e.prototype.setMaxZoom=function(t){this.set(Gr,t)},e.prototype.setMinZoom=function(t){this.set(zr,t)},e.prototype.setOpacity=function(t){ye("number"==typeof t,64),this.set(Lr,t)},e.prototype.setVisible=function(t){this.set(Fr,t)},e.prototype.setZIndex=function(t){this.set(Dr,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(B),Kr="prerender",Zr="postrender",Vr="precompose",Ur="postcompose",Hr="rendercomplete",qr="undefined",Jr="ready",Qr=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function $r(t,e){if(!t.visible)return!1;var n=e.resolution;if(n=t.maxResolution)return!1;var i=e.zoom;return i>t.minZoom&&i<=t.maxZoom}var to=function(t){function e(e){var n=this,i=d({},e);delete i.source,(n=t.call(this,i)||this).on,n.once,n.un,n.mapPrecomposeKey_=null,n.mapRenderKey_=null,n.sourceChangeKey_=null,n.renderer_=null,n.rendered=!1,e.render&&(n.render=e.render),e.map&&n.setMap(e.map),n.addChangeListener(Wr,n.handleSourcePropertyChange_);var r=e.source?e.source:null;return n.setSource(r),n}return Qr(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(Wr)||null},e.prototype.getRenderSource=function(){return this.getSource()},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():qr},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_=L(t,C,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise((function(t){return t([])}))},e.prototype.getData=function(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null},e.prototype.render=function(t,e){var n=this.getRenderer();if(n.prepareFrame(t))return this.rendered=!0,n.renderFrame(t,e)},e.prototype.unrender=function(){this.rendered=!1},e.prototype.setMapInternal=function(t){t||this.unrender(),this.set(Nr,t)},e.prototype.getMapInternal=function(){return this.get(Nr)},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_=L(t,Vr,(function(t){var e=t.frameState.layerStatesArray,n=this.getLayerState(!1);ye(!e.some((function(t){return t.layer===n.layer})),67),e.push(n)}),this),this.mapRenderKey_=L(this,C,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(Wr,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.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),t.prototype.disposeInternal.call(this)},e}(Br),eo=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function no(t,e){wr.expire()}var io=function(t){function e(e){var n=t.call(this)||this;return n.map_=e,n}return eo(e,t),e.prototype.dispatchRenderEvent=function(t,e){G()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,n=t.coordinateToPixelTransform,i=t.pixelToCoordinateTransform;Qn(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),$n(i,n)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,r,o,s,a){var l,h=e.viewState;function u(t,e,n,i){return r.call(o,e,t?n:null,i)}var c=h.projection,p=qe(t.slice(),c),f=[[0,0]];if(c.canWrapX()&&i){var d=Be(c.getExtent());f.push([-d,0],[d,0])}for(var g=e.layerStatesArray,_=g.length,y=[],v=[],m=0;m=0;--x){var C=g[x],w=C.layer;if(w.hasRenderer()&&$r(C,h)&&s.call(a,w)){var S=w.getRenderer(),E=w.getSource();if(S&&E){var b=E.getWrapX()?p:t,T=u.bind(null,C.managed);v[0]=b[0]+f[m][0],v[1]=b[1]+f[m][1],l=S.forEachFeatureAtCoordinate(v,e,n,T,y)}if(l)return l}}if(0!==y.length){var O=1/y.length;return y.forEach((function(t,e){return t.distanceSq+=e*O})),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,n,i,r){return G()},e.prototype.hasFeatureAtCoordinate=function(t,e,n,i,r,o){return void 0!==this.forEachFeatureAtCoordinate(t,e,n,i,c,this,r,o)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){G()},e.prototype.scheduleExpireIconCache=function(t){wr.canExpireCache()&&t.postRenderFunctions.push(no)},e}(o),ro=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),oo=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.inversePixelTransform=n,o.frameState=i,o.context=r,o}return ro(e,t),e}(i),so="10px sans-serif",ao="#000",lo="round",ho=[],uo="round",co="#000",po="center",fo="middle",go=[0,0,0,0],_o=new B;(new x).setSize=function(){console.warn("labelCache is deprecated.")};var yo,vo,mo=null,xo={},Co=function(){var t,e,n="32px ",i=["monospace","serif"],r=i.length,o="wmytzilWMYTZIL@#/&?$%10";function s(t,s,a){for(var l=!0,h=0;h=0;--o)i[o].renderDeclutter(t);!function(t,e){for(var n=t.childNodes,i=0;;++i){var r=n[i],o=e[i];if(!r&&!o)break;r!==o&&(r?o?t.insertBefore(o,r):(t.removeChild(r),--i):t.appendChild(o))}}(this.element_,this.children_),this.dispatchRenderEvent(Ur,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,n,i,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()&&$r(l,o)&&r(h)){var u=h.getRenderer().getDataAtPixel(t,e,n);if(u){var c=i(h,u);if(c)return c}}}},e}(io),Io="add",Po="remove",Mo=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Lo="length",Fo=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.element=n,r.index=i,r}return Mo(e,t),e}(i),Ao=function(t){function e(e,n){var i=t.call(this)||this;i.on,i.once,i.un;var r=n||{};if(i.unique_=!!r.unique,i.array_=e||[],i.unique_)for(var o=0,s=i.array_.length;o0;)this.pop()},e.prototype.extend=function(t){for(var e=0,n=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(P,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),Uo="layergroup",Ho="size",qo="target",Jo="view",Qo=1/0,$o=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,g(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,n=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var i=this.keyFunction_(n);return delete this.queuedElements_[i],n},t.prototype.enqueue=function(t){ye(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=Qo&&(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_,n=this.priorities_,i=e.length,r=e[t],o=n[t],s=t;t>1;){var a=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),h=lt;){var s=this.getParentIndex_(e);if(!(i[s]>o))break;n[e]=n[s],i[e]=i[s],e=s}n[e]=r,i[e]=o},t.prototype.reprioritize=function(){var t,e,n,i=this.priorityFunction_,r=this.elements_,o=this.priorities_,s=0,a=r.length;for(e=0;e0;)i=(n=this.dequeue()[0]).getKey(),n.getState()!==ts||i in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[i]=!0,++this.tilesLoading_,++r,n.load())},e}($o);var as=0,ls=1,hs={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},us=256;function cs(t,e,n){return function(i,r,o,s,a){if(i){if(!r&&!e)return i;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,g=t[3]-h/2+c;p>f&&(f=p=(f+p)/2),d>g&&(g=d=(g+d)/2);var _=Pt(i[0],p,f),y=Pt(i[1],d,g);if(s&&n&&r){var v=30*r;_+=-v*Math.log(1+Math.max(0,p-i[0])/v)+v*Math.log(1+Math.max(0,i[0]-f)/v),y+=-v*Math.log(1+Math.max(0,d-i[1])/v)+v*Math.log(1+Math.max(0,i[1]-g)/v)}return[_,y]}}}function ps(t){return t}function fs(t,e,n,i){var r=Be(e)/n[0],o=We(e)/n[1];return i?Math.min(t,Math.max(r,o)):Math.min(t,Math.min(r,o))}function ds(t,e,n){var i=Math.min(t,e);return i*=Math.log(1+50*Math.max(0,t/e-1))/50+1,n&&(i=Math.max(i,n),i/=Math.log(1+50*Math.max(0,n/t-1))/50+1),Pt(i,n/2,2*e)}function gs(t,e,n,i,r){return function(o,s,a,l){if(void 0!==o){var h=i?fs(t,i,a,r):t;return(void 0===n||n)&&l?ds(o,h,e):Pt(o,e,h)}}}function _s(t){return void 0!==t?0:void 0}function ys(t){return void 0!==t?t:void 0}var vs=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function ms(t,e){setTimeout((function(){t(e)}),0)}function xs(t){return!(t.sourceCenter&&t.targetCenter&&!Ue(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}function Cs(t,e,n,i,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-n[0])*i)*o-(l+=(n[1]-e[1]/2)*i)*(s=-s),l*o+a*s]}var ws=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=d({},e);return n.hints_=[0,0],n.animations_=[],n.updateAnimationKey_,n.projection_=ln(i.projection,"EPSG:3857"),n.viewportSize_=[100,100],n.targetCenter_=null,n.targetResolution_,n.targetRotation_,n.nextCenter_=null,n.nextResolution_,n.nextRotation_,n.cancelAnchor_=void 0,i.projection&&tn(),i.center&&(i.center=xn(i.center,n.projection_)),i.extent&&(i.extent=wn(i.extent,n.projection_)),n.applyOptions_(i),n}return vs(e,t),e.prototype.applyOptions_=function(t){var e=d({},t);for(var n in hs)delete e[n];this.setProperties(e,!0);var i=function(t){var e,n,i,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=ln(t.projection,"EPSG:3857"),d=f.getExtent(),g=t.constrainOnlyCenter,_=t.extent;u||_||!f.isGlobal()||(g=!1,_=d);if(void 0!==t.resolutions){var y=t.resolutions;n=y[s],i=void 0!==y[l]?y[l]:y[y.length-1],e=t.constrainResolution?function(t,e,n,i){return function(r,o,s,l){if(void 0!==r){var h=t[0],u=t[t.length-1],c=n?fs(h,n,s,i):h;if(l)return void 0===e||e?ds(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[n-1]&&(e=arguments[n-1],--n);for(var i=0;i0},e.prototype.getInteracting=function(){return this.hints_[ls]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(as,-this.hints_[as]);for(var e=0,n=this.animations_.length;e=0;--n){for(var i=this.animations_[n],r=!0,o=0,s=i.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=a.targetCenter[0],d=a.targetCenter[1];this.nextCenter_=a.targetCenter;var g=c+u*(f-c),_=p+u*(d-p);this.targetCenter_=[g,_]}if(a.sourceResolution&&a.targetResolution){var y=1===u?a.targetResolution:a.sourceResolution+u*(a.targetResolution-a.sourceResolution);if(a.anchor){var v=this.getViewportSize_(this.getRotation()),m=this.constraints_.resolution(y,0,v,!0);this.targetCenter_=this.calculateCenterZoom(m,a.anchor)}this.nextResolution_=a.targetResolution,this.targetResolution_=y,this.applyTargetState_(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var x=1===u?kt(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+u*(a.targetRotation-a.sourceRotation);if(a.anchor){var C=this.constraints_.rotation(x,!0);this.targetCenter_=this.calculateCenterRotate(C,a.anchor)}this.nextRotation_=a.targetRotation,this.targetRotation_=x}if(this.applyTargetState_(!0),e=!0,!a.complete)break}}if(r){this.animations_[n]=null,this.setHint(as,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var w=i[0].callback;w&&ms(w,!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 n,i,r,o=this.getCenterInternal();return void 0!==o&&(He(n=[o[0]-e[0],o[1]-e[1]],t-this.getRotation()),r=e,(i=n)[0]+=+r[0],i[1]+=+r[1]),n},e.prototype.calculateCenterZoom=function(t,e){var n,i=this.getCenterInternal(),r=this.getResolution();void 0!==i&&void 0!==r&&(n=[e[0]-t*(e[0]-i[0])/r,e[1]-t*(e[1]-i[1])/r]);return n},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var n=e[0],i=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(i*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(i*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?mn(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(hs.CENTER)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.get("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 Cn(this.calculateExtentInternal(t),this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSizeMinusPadding_(),n=this.getCenterInternal();ye(n,1);var i=this.getResolution();ye(void 0!==i,2);var r=this.getRotation();return ye(void 0!==r,3),ze(n,i,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(hs.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(wn(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var n=e||this.getViewportSizeMinusPadding_(),i=Be(t)/n[0],r=We(t)/n[1];return Math.max(i,r)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,r=Math.log(n/i)/Math.log(e);return function(t){return n/Math.pow(e,t*r)}},e.prototype.getRotation=function(){return this.get(hs.ROTATION)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,r=Math.log(n/i)/e;return function(t){return Math.log(n/t)/e/r}},e.prototype.getViewportSizeMinusPadding_=function(t){var e=this.getViewportSize_(t),n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e},e.prototype.getState=function(){var t=this.getProjection(),e=this.getResolution(),n=this.getRotation(),i=this.getCenterInternal(),r=this.padding_;if(r){var o=this.getViewportSizeMinusPadding_();i=Cs(i,this.getViewportSize_(),[o[0]/2+r[3],o[1]/2+r[0]],e,n)}return{center:i.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,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,n,i=this.minZoom_||0;if(this.resolutions_){var r=a(this.resolutions_,t,1);i=r,e=this.resolutions_[r],n=r==this.resolutions_.length-1?2:e/this.resolutions_[r+1]}else e=this.maxResolution_,n=this.zoomFactor_;return i+Math.log(e/t)/Math.log(n)},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),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,Pt(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var n;if(ye(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))ye(!Ze(t),25),n=Yi(i=wn(t,this.getProjection()));else if(t.getType()===Hn){var i;(n=Yi(i=wn(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),je(i))}else{var r=vn();n=r?t.clone().transform(r,this.getProjection()):t}this.fitInternal(n,e)},e.prototype.rotatedExtentForGeometry=function(t){for(var e=this.getRotation(),n=Math.cos(e),i=Math.sin(-e),r=t.getFlatCoordinates(),o=t.getStride(),s=1/0,a=1/0,l=-1/0,h=-1/0,u=0,c=r.length;u=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 n=this.maxTilesLoading_,i=n;if(t){var r=t.viewHints;if(r[as]||r[ls]){var o=Date.now()-t.time>8;n=o?0:8,i=o?0:2}}e.getTilesLoading()0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!u(e,this.renderedAttributions_)){ht(this.ulElement_);for(var i=0,r=e.length;i0}}else if(t.type==Yo.POINTERDOWN){var i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==Yo.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===Yo.POINTERDOWN||e===Yo.POINTERDRAG||e===Yo.POINTERUP}(t)){var e=t.originalEvent,n=e.pointerId.toString();t.type==Yo.POINTERUP?delete this.trackedPointers_[n]:(t.type==Yo.POINTERDOWN||n in this.trackedPointers_)&&(this.trackedPointers_[n]=e),this.targetPointers=_(this.trackedPointers_)}},e}(Ls);function Gs(t){var e=arguments;return function(t){for(var n=!0,i=0,r=e.length;i0&&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}(js),qs=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Js=function(t){function e(e){var n=this,i=e||{};return(n=t.call(this,{stopDown:p})||this).condition_=i.condition?i.condition:zs,n.lastAngle_=void 0,n.duration_=void 0!==i.duration?i.duration:250,n}return qs(e,t),e.prototype.handleDragEvent=function(t){if(Zs(t)){var e=t.map,n=e.getView();if(n.getConstraints().rotation!==_s){var i=e.getSize(),r=t.pixel,o=Math.atan2(i[1]/2-r[1],r[0]-i[0]/2);if(void 0!==this.lastAngle_){var s=o-this.lastAngle_;n.adjustRotationInternal(-s)}this.lastAngle_=o}}},e.prototype.handleUpEvent=function(t){return!Zs(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!!Zs(t)&&(!(!Xs(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))},e}(js),Qs=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$s=function(t){function e(e){var n=t.call(this)||this;return n.geometry_=null,n.element_=document.createElement("div"),n.element_.style.position="absolute",n.element_.style.pointerEvents="auto",n.element_.className="ol-box "+e,n.map_=null,n.startPixel_=null,n.endPixel_=null,n}return Qs(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,n="px",i=this.element_.style;i.left=Math.min(t[0],e[0])+n,i.top=Math.min(t[1],e[1])+n,i.width=Math.abs(e[0]-t[0])+n,i.height=Math.abs(e[1]-t[1])+n},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_,n=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);n[4]=n[0].slice(),this.geometry_?this.geometry_.setCoordinates([n]):this.geometry_=new Xi([n])},e.prototype.getGeometry=function(){return this.geometry_},e}(o),ta=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ea="boxstart",na="boxdrag",ia="boxend",ra="boxcancel",oa=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.coordinate=n,r.mapBrowserEvent=i,r}return ta(e,t),e}(i),sa=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=e||{};return n.box_=new $s(i.className||"ol-dragbox"),n.minArea_=void 0!==i.minArea?i.minArea:64,i.onBoxEnd&&(n.onBoxEnd=i.onBoxEnd),n.startPixel_=null,n.condition_=i.condition?i.condition:Xs,n.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:n.defaultBoxEndCondition,n}return ta(e,t),e.prototype.defaultBoxEndCondition=function(t,e,n){var i=n[0]-e[0],r=n[1]-e[1];return i*i+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 oa(na,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 oa(e?ia:ra,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 oa(ea,t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(js),aa=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),la=function(t){function e(e){var n=this,i=e||{},r=i.condition?i.condition:Bs;return(n=t.call(this,{condition:r,className:i.className||"ol-dragzoom",minArea:i.minArea})||this).duration_=void 0!==i.duration?i.duration:200,n.out_=void 0!==i.out&&i.out,n}return aa(e,t),e.prototype.onBoxEnd=function(t){var e=this.getMap().getView(),n=this.getGeometry();if(this.out_){var i=e.rotatedExtentForGeometry(n),r=e.getResolutionForExtentInternal(i),o=e.getResolution()/r;(n=n.clone()).scale(o*o)}e.fitInternal(n,{duration:this.duration_,easing:Ct})},e}(sa),ha=37,ua=38,ca=39,pa=40,fa=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),da=function(t){function e(e){var n=t.call(this)||this,i=e||{};return n.defaultCondition_=function(t){return Ys(t)&&Ks(t)},n.condition_=void 0!==i.condition?i.condition:n.defaultCondition_,n.duration_=void 0!==i.duration?i.duration:100,n.pixelDelta_=void 0!==i.pixelDelta?i.pixelDelta:128,n}return fa(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==T){var n=t.originalEvent,i=n.keyCode;if(this.condition_(t)&&(i==pa||i==ha||i==ca||i==ua)){var r=t.map.getView(),o=r.getResolution()*this.pixelDelta_,s=0,a=0;i==pa?a=-o:i==ha?s=-o:i==ca?s=o:a=o;var l=[s,a];He(l,r.getRotation()),function(t,e,n){var i=t.getCenterInternal();if(i){var r=[i[0]+e[0],i[1]+e[1]];t.animateInternal({duration:void 0!==n?n:250,easing:St,center:t.getConstrainedCenter(r)})}}(r,l,this.duration_),n.preventDefault(),e=!0}}return!e},e}(Ls),ga=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),_a=function(t){function e(e){var n=t.call(this)||this,i=e||{};return n.condition_=i.condition?i.condition:Ks,n.delta_=i.delta?i.delta:1,n.duration_=void 0!==i.duration?i.duration:100,n}return ga(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==T||t.type==O){var n=t.originalEvent,i=n.charCode;if(this.condition_(t)&&(i=="+".charCodeAt(0)||i=="-".charCodeAt(0))){var r=t.map,o=i=="+".charCodeAt(0)?this.delta_:-this.delta_;Ms(r.getView(),o,void 0,this.duration_),n.preventDefault(),e=!0}}return!e},e}(Ls),ya=function(){function t(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,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_[n+2]>t;)n-=3;var i=this.points_[e+2]-this.points_[n+2];if(i<1e3/60)return!1;var r=this.points_[e]-this.points_[n],o=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(o,r),this.initialVelocity_=Math.sqrt(r*r+o*o)/i,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}(),va=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ma="trackpad",xa="wheel",Ca=function(t){function e(e){var n=this,i=e||{};(n=t.call(this,i)||this).totalDelta_=0,n.lastDelta_=0,n.maxDelta_=void 0!==i.maxDelta?i.maxDelta:1,n.duration_=void 0!==i.duration?i.duration:250,n.timeout_=void 0!==i.timeout?i.timeout:80,n.useAnchor_=void 0===i.useAnchor||i.useAnchor,n.constrainResolution_=void 0!==i.constrainResolution&&i.constrainResolution;var r=i.condition?i.condition:Ns;return n.condition_=i.onFocusOnly?Gs(Ws,r):r,n.lastAnchor_=null,n.startTime_=void 0,n.timeoutId_,n.mode_=void 0,n.trackpadEventGap_=400,n.trackpadTimeoutId_,n.deltaPerZoom_=300,n}return va(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,n=t.map,i=t.originalEvent;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==M&&(e=i.deltaY,J&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=tt),i.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?ma:xa);var o=n.getView();if(this.mode_===ma&&!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,n),s),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var n=-Pt(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),Ms(e,n,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}(Ls),wa=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Sa=function(t){function e(e){var n=this,i=e||{},r=i;return r.stopDown||(r.stopDown=p),(n=t.call(this,r)||this).anchor_=null,n.lastAngle_=void 0,n.rotating_=!1,n.rotationDelta_=0,n.threshold_=void 0!==i.threshold?i.threshold:.3,n.duration_=void 0!==i.duration?i.duration:250,n}return wa(e,t),e.prototype.handleDragEvent=function(t){var e=0,n=this.targetPointers[0],i=this.targetPointers[1],r=Math.atan2(i.clientY-n.clientY,i.clientX-n.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!==_s){var l=s.getViewport().getBoundingClientRect(),h=ks(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}(js),Ea=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ba=function(t){function e(e){var n=this,i=e||{},r=i;return r.stopDown||(r.stopDown=p),(n=t.call(this,r)||this).anchor_=null,n.duration_=void 0!==i.duration?i.duration:400,n.lastDistance_=void 0,n.lastScaleDelta_=1,n}return Ea(e,t),e.prototype.handleDragEvent=function(t){var e=1,n=this.targetPointers[0],i=this.targetPointers[1],r=n.clientX-i.clientX,o=n.clientY-i.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=ks(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(),n=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,n),!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}(js);var Ta=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Oa=function(t){function e(e){return(e=d({},e)).controls||(e.controls=function(t){var e=t||{},n=new Ao;return(void 0===e.zoom||e.zoom)&&n.push(new kn(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&n.push(new bt(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&n.push(new Rs(e.attributionOptions)),n}()),e.interactions||(e.interactions=function(t){var e=t||{},n=new Ao,i=new ya(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&n.push(new Js),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&n.push(new As({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&n.push(new Hs({onFocusOnly:e.onFocusOnly,kinetic:i})),(void 0===e.pinchRotate||e.pinchRotate)&&n.push(new Sa),(void 0===e.pinchZoom||e.pinchZoom)&&n.push(new ba({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(n.push(new da),n.push(new _a({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&n.push(new Ca({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&n.push(new la({duration:e.zoomDuration})),n}({onFocusOnly:!0})),t.call(this,e)||this}return Ta(e,t),e.prototype.createRenderer=function(){return new Ro(this)},e}(Ts),Ra=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ia=function(t){function e(e,n,i){var r=t.call(this)||this,o=i||{};return r.tileCoord=e,r.state=n,r.interimTile=null,r.key="",r.transition_=void 0===o.transition?250:o.transition,r.transitionStarts_={},r.interpolate=!!o.interpolate,r}return Ra(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()==ns)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()==ns){t.interimTile=null;break}t.getState()==es?e=t:t.getState()==ts?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!==is&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){G()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var n=this.transitionStarts_[t];if(n){if(-1===n)return 1}else n=e,this.transitionStarts_[t]=n;var i=e-n+1e3/60;return i>=this.transition_?1:xt(i/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),Pa=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();var Ma,La=function(t){function e(e,n,i,r,o,s){var a=t.call(this,e,n,s)||this;return a.crossOrigin_=r,a.src_=i,a.key=i,a.image_=new Image,null!==r&&(a.image_.crossOrigin=r),a.unlisten_=null,a.tileLoadFunction_=o,a}return Pa(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(t){this.image_=t,this.state=ns,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){var t;this.state=is,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=ns:this.state=rs,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==is&&(this.state=ts,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==ts&&(this.state=es,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=Tr(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(Ia),Fa=function(){function t(t,e,n,i,r,o){this.sourceProj_=t,this.targetProj_=e;var s={},a=cn(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_=i,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!i&&!!this.sourceProj_.getExtent()&&Be(i)==Be(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Be(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Be(this.targetProj_.getExtent()):null;var l=Xe(n),h=Ye(n),u=ke(n),c=De(n),p=this.transformInv_(l),f=this.transformInv_(h),d=this.transformInv_(u),g=this.transformInv_(c),_=10+(o?Math.max(0,Math.ceil(Lt(Ae(n)/(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,n){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 n=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-n.5&&u<1,f=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_)f=Be(ve([t,e,n,i]))/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]))||Ke(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 g=[(t[0]+n[0])/2,(t[1]+n[1])/2],_=this.transformInv_(g),y=void 0;if(p)y=(kt(r[0],c)+kt(s[0],c))/2-kt(_[0],c);else y=(r[0]+s[0])/2-_[0];var v=(r[1]+s[1])/2-_[1];f=y*y+v*v>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){var m=[(e[0]+n[0])/2,(e[1]+n[1])/2],x=this.transformInv_(m),C=[(i[0]+t[0])/2,(i[1]+t[1])/2],w=this.transformInv_(C);this.addQuad_(t,e,m,C,r,o,x,w,l-1),this.addQuad_(C,m,n,i,w,x,s,a,l-1)}else{var S=[(t[0]+e[0])/2,(t[1]+e[1])/2],E=this.transformInv_(S),b=[(n[0]+i[0])/2,(n[1]+i[1])/2],T=this.transformInv_(b);this.addQuad_(t,S,b,i,r,E,T,a,l-1),this.addQuad_(S,e,n,b,E,o,s,T,l-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&d)&&this.addTriangle_(t,n,i,r,s,a),0==(14&d)&&this.addTriangle_(t,n,e,r,s,o),d&&(0==(13&d)&&this.addTriangle_(e,i,t,o,a,r),0==(7&d)&&this.addTriangle_(e,i,n,o,a,s))}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(e,n,i){var r=e.source;Pe(t,r[0]),Pe(t,r[1]),Pe(t,r[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}(),Aa={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},Da={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0};function ka(t,e,n,i,r){t.beginPath(),t.moveTo(0,0),t.lineTo(e,n),t.lineTo(i,r),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,i)+1,Math.max(n,r)),t.restore()}function ja(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function Ga(t,e,n,i){var r=pn(n,e,t),o=sn(e,i,n),s=e.getMetersPerUnit();void 0!==s&&(o*=s);var a=t.getMetersPerUnit();void 0!==a&&(o/=a);var l=t.getExtent();if(!l||we(l,r)){var h=sn(t,o,r)/o;isFinite(h)&&h>0&&(o/=h)}return o}function za(t,e,n,i,r,o,s,a,l,h,u,c){var p=rt(Math.round(n*t),Math.round(n*e));if(c||d(p,Aa),0===l.length)return p.canvas;function f(t){return Math.round(t*n)/n}p.scale(n,n),p.globalCompositeOperation="lighter";var g=[1/0,1/0,-1/0,-1/0];l.forEach((function(t,e,n){var i,r;i=g,(r=t.extent)[0]i[2]&&(i[2]=r[2]),r[1]i[3]&&(i[3]=r[3])}));var _=Be(g),y=We(g),v=rt(Math.round(n*_/i),Math.round(n*y/i));c||d(v,Aa);var m=n/i;l.forEach((function(t,e,n){var i=t.extent[0]-g[0],r=-(t.extent[3]-g[3]),o=Be(t.extent),s=We(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,i*m,r*m,o*m,s*m)}));var x=Xe(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],_=s[2][0],y=s[2][1],m=f((a[0][0]-x[0])/o),C=f(-(a[0][1]-x[1])/o),w=f((a[1][0]-x[0])/o),S=f(-(a[1][1]-x[1])/o),E=f((a[2][0]-x[0])/o),b=f(-(a[2][1]-x[1])/o),T=l,O=h;l=0,h=0;var R=function(t){for(var e=t.length,n=0;nr&&(r=s,i=o)}if(0===r)return null;var a=t[i];t[i]=t[n],t[n]=a;for(var l=n+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-=T,d-=O,0,0,w-m],[_-=T,y-=O,0,0,E-m],[0,0,u,d,S-C],[0,0,_,y,b-C]]);if(R){if(p.save(),p.beginPath(),function(){if(void 0===Ma){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",ka(t,4,5,4,0),ka(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;Ma=ja(e,0)||ja(e,4)||ja(e,8)}return Ma}()||!c){p.moveTo(w,S);for(var I=m-w,P=C-S,M=0;M<4;M++)p.lineTo(w+f((M+1)*I/4),S+f(M*P/3)),3!=M&&p.lineTo(w+f((M+1)*I/4),S+f((M+1)*P/3));p.lineTo(E,b)}else p.moveTo(w,S),p.lineTo(m,C),p.lineTo(E,b);p.clip(),p.transform(R[0],R[2],R[1],R[3],m,C),p.translate(g[0]-T,g[3]-O),p.scale(i/n,-i/n),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,n){var i=t.target,r=(i[0][0]-x[0])/o,s=-(i[0][1]-x[1])/o,a=(i[1][0]-x[0])/o,l=-(i[1][1]-x[1])/o,h=(i[2][0]-x[0])/o,u=-(i[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 Wa=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Na=function(t){function e(e,n,i,r,o,s,a,l,h,u,c,p){var f=t.call(this,o,ts,{interpolate:!!p})||this;f.renderEdges_=void 0!==c&&c,f.pixelRatio_=a,f.gutter_=l,f.canvas_=null,f.sourceTileGrid_=n,f.targetTileGrid_=r,f.wrappedTileCoord_=s||o,f.sourceTiles_=[],f.sourcesListenerKeys_=null,f.sourceZ_=0;var d=r.getTileCoordExtent(f.wrappedTileCoord_),g=f.targetTileGrid_.getExtent(),_=f.sourceTileGrid_.getExtent(),y=g?Ne(d,g):d;if(0===Ae(y))return f.state=rs,f;var v=e.getExtent();v&&(_=_?Ne(_,v):v);var m=r.getResolution(f.wrappedTileCoord_[0]),x=function(t,e,n,i){var r=je(n),o=Ga(t,e,r,i);return(!isFinite(o)||o<=0)&&Fe(n,(function(n){return o=Ga(t,e,n,i),isFinite(o)&&o>0})),o}(e,i,y,m);if(!isFinite(x)||x<=0)return f.state=rs,f;var C=void 0!==u?u:.5;if(f.triangulation_=new Fa(e,i,y,_,x*C,m),0===f.triangulation_.getTriangles().length)return f.state=rs,f;f.sourceZ_=n.getZForResolution(x);var w=f.triangulation_.calculateSourceExtent();if(_&&(e.canWrapX()?(w[1]=Pt(w[1],_[1],_[3]),w[3]=Pt(w[3],_[1],_[3])):w=Ne(w,_)),Ae(w)){for(var S=n.getTileRangeForExtentAndZ(w,f.sourceZ_),E=S.minX;E<=S.maxX;E++)for(var b=S.minY;b<=S.maxY;b++){var T=h(f.sourceZ_,E,b,a);T&&f.sourceTiles_.push(T)}0===f.sourceTiles_.length&&(f.state=rs)}else f.state=rs;return f}return Wa(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,n,i){e&&e.getState()==ns&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=is;else{var e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),i="number"==typeof n?n:n[0],r="number"==typeof n?n:n[1],o=this.targetTileGrid_.getResolution(e),s=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=za(i,r,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),o,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=ns}this.changed()},e.prototype.load=function(){if(this.state==ts){this.state=es,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,n,i){var r=e.getState();if(r==ts||r==es){t++;var o=L(e,C,(function(n){var i=e.getState();i!=ns&&i!=is&&i!=rs||(A(o),0===--t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(o)}}.bind(this)),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t,e,n){t.getState()==ts&&t.load()}))}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(A),this.sourcesListenerKeys_=null},e}(Ia),Xa=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.expireCache=function(t){for(;this.canExpireCache();)this.pop()},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 n=this.entries_[t];return ye(void 0!==n,15),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_},t.prototype.remove=function(t){var e=this.entries_[t];return ye(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_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=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){ye(!(t in this.entries_),16);var n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}();function Ya(t,e,n,i){return void 0!==i?(i[0]=t,i[1]=e,i[2]=n,i):[t,e,n]}function Ba(t,e,n){return t+"/"+e+"/"+n}function Ka(t){return Ba(t[0],t[1],t[2])}var Za=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Va=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Za(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(Ka(e.tileCoord)),e.release())}.bind(this))}},e}(Xa),Ua="tileloadstart",Ha="tileloadend",qa="tileloaderror",Ja=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function Qa(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}var $a=function(t){function e(e){var n=t.call(this)||this;n.projection=on(e.projection),n.attributions_=Qa(e.attributions),n.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,n.loading=!1,n.state_=void 0!==e.state?e.state:Jr,n.wrapX_=void 0!==e.wrapX&&e.wrapX,n.interpolate_=!!e.interpolate,n.viewResolver=null,n.viewRejector=null;var i=n;return n.viewPromise_=new Promise((function(t,e){i.viewResolver=t,i.viewRejector=e})),n}return Ja(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 G()},e.prototype.getView=function(){return this.viewPromise_},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getInterpolate=function(){return this.interpolate_},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=Qa(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(B),tl=function(){function t(t,e,n,i){this.minX=t,this.maxX=e,this.minY=n,this.maxY=i}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 el(t,e,n,i,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=n,r.maxY=i,r):new tl(t,e,n,i)}var nl=tl,il=[0,0,0],rl=function(){function t(t){var e,n,i,r;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,ye((e=this.resolutions_,n=!0,i=function(t,e){return e-t}||s,e.every((function(t,r){if(0===r)return!0;var o=i(e[r-1],t);return!(o>0||n&&0===o)}))),17),!t.origins)for(var o=0,a=this.resolutions_.length-1;o=this.minZoom;){if(e(a,2===this.zoomFactor_?el(r=Math.floor(r/2),r,o=Math.floor(o/2),o,n):this.getTileRangeForExtentAndZ(s,a,n)))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,n){if(t[0]this.maxZoom||e0?i:Math.max(s/a[0],o/a[1]),h=r+1,u=new Array(h),c=0;cn||n>e.getMaxZoom())return!1;var o=e.getFullTileRange(n);return!o||o.containsXY(i,r)}(t,i)?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 n=this.getTileCacheForProjection(e);t>n.highWaterMark&&(n.highWaterMark=t)},e.prototype.useTile=function(t,e,n,i){},e}($a),ul=function(t){function e(e,n){var i=t.call(this,e)||this;return i.tile=n,i}return ll(e,t),e}(i),cl=hl;function pl(t,e){var n=/\{z\}/g,i=/\{x\}/g,r=/\{y\}/g,o=/\{-y\}/g;return function(s,a,l){return s?t.replace(n,s[0].toString()).replace(i,s[1].toString()).replace(r,s[2].toString()).replace(o,(function(){var t=s[0],n=e.getFullTileRange(t);return ye(n,55),(n.getHeight()-s[2]-1).toString()})):void 0}}function fl(t,e){for(var n=t.length,i=new Array(n),r=0;rOpenStreetMap contributors.'];var o=void 0!==i.crossOrigin?i.crossOrigin:"anonymous",s=void 0!==i.url?i.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:n,attributionsCollapsible:!1,cacheSize:i.cacheSize,crossOrigin:o,interpolate:r,maxZoom:void 0!==i.maxZoom?i.maxZoom:19,opaque:void 0===i.opaque||i.opaque,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileLoadFunction:i.tileLoadFunction,transition:i.transition,url:s,wrapX:i.wrapX,zDirection:i.zDirection})||this}return Cl(e,t),e}(xl),Sl="bottom-left",El="bottom-center",bl="bottom-right",Tl="center-left",Ol="center-center",Rl="center-right",Il="top-left",Pl="top-center",Ml="top-right";function Ll(t){return(Ll="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 Fl=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Al="element",Dl="map",kl="offset",jl="position",Gl="positioning",zl=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un,n.options=e,n.id=e.id,n.insertFirst=void 0===e.insertFirst||e.insertFirst,n.stopEvent=void 0===e.stopEvent||e.stopEvent,n.element=document.createElement("div"),n.element.className=void 0!==e.className?e.className:"ol-overlay-container ol-selectable",n.element.style.position="absolute",n.element.style.pointerEvents="auto";var i=e.autoPan;return i&&"object"!==Ll(i)&&(i={animation:e.autoPanAnimation,margin:e.autoPanMargin}),n.autoPan=i||!1,n.rendered={transform_:"",visible:!0},n.mapPostrenderListenerKey=null,n.addChangeListener(Al,n.handleElementChanged),n.addChangeListener(Dl,n.handleMapChanged),n.addChangeListener(kl,n.handleOffsetChanged),n.addChangeListener(jl,n.handlePositionChanged),n.addChangeListener(Gl,n.handlePositioningChanged),void 0!==e.element&&n.setElement(e.element),n.setOffset(void 0!==e.offset?e.offset:[0,0]),n.setPositioning(void 0!==e.positioning?e.positioning:Il),void 0!==e.position&&n.setPosition(e.position),n}return Fl(e,t),e.prototype.getElement=function(){return this.get(Al)},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get(Dl)||null},e.prototype.getOffset=function(){return this.get(kl)},e.prototype.getPosition=function(){return this.get(jl)},e.prototype.getPositioning=function(){return this.get(Gl)},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=L(t,K,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(Al,t)},e.prototype.setMap=function(t){this.set(Dl,t)},e.prototype.setOffset=function(t){this.set(kl,t)},e.prototype.setPosition=function(t){this.set(jl,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(jl)){var n=this.getRect(e.getTargetElement(),e.getSize()),i=this.getElement(),r=this.getRect(i,[ot(i),st(i)]),o=t||{},s=void 0===o.margin?20:o.margin;if(!Se(n,r)){var a=r[0]-n[0],l=n[2]-r[2],h=r[1]-n[1],u=n[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]],g=o.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(d),duration:g.duration,easing:g.easing})}}}},e.prototype.getRect=function(t,e){var n=t.getBoundingClientRect(),i=n.left+window.pageXOffset,r=n.top+window.pageYOffset;return[i,r,i+e[0],r+e[1]]},e.prototype.setPositioning=function(t){this.set(Gl,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 n=t.getPixelFromCoordinate(e),i=t.getSize();this.updateRenderedPosition(n,i)}else this.setVisible(!1)},e.prototype.updateRenderedPosition=function(t,e){var n=this.element.style,i=this.getOffset(),r=this.getPositioning();this.setVisible(!0);var o=Math.round(t[0]+i[0])+"px",s=Math.round(t[1]+i[1])+"px",a="0%",l="0%";r==bl||r==Rl||r==Ml?a="-100%":r!=El&&r!=Ol&&r!=Pl||(a="-50%"),r==Sl||r==El||r==bl?l="-100%":r!=Tl&&r!=Ol&&r!=Rl||(l="-50%");var h="translate(".concat(a,", ").concat(l,") translate(").concat(o,", ").concat(s,")");this.rendered.transform_!=h&&(this.rendered.transform_=h,n.transform=h,n.msTransform=h)},e.prototype.getOptions=function(){return this.options},e}(B),Wl=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 Nl(t){return Array.isArray(t)?mr(t):t}var Xl=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Yl=function(t){function e(e){var n=this,i=void 0!==e.rotateWithView&&e.rotateWithView;return(n=t.call(this,{opacity:1,rotateWithView:i,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_=void 0,n.hitDetectionCanvas_=null,n.fill_=void 0!==e.fill?e.fill:null,n.origin_=[0,0],n.points_=e.points,n.radius_=void 0!==e.radius?e.radius:e.radius1,n.radius2_=e.radius2,n.angle_=void 0!==e.angle?e.angle:0,n.stroke_=void 0!==e.stroke?e.stroke:null,n.size_=null,n.renderOptions_=null,n.render(),n}return Xl(e,t),e.prototype.clone=function(){var t=this.getScale(),n=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 n.setOpacity(this.getOpacity()),n},e.prototype.getAnchor=function(){var t=this.size_;if(!t)return null;var e=this.getDisplacement();return[t[0]/2-e[0],t[1]/2+e[1]]},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_},e.prototype.getImage=function(t){var e=this.canvas_[t];if(!e){var n=this.renderOptions_,i=rt(n.size*t,n.size*t);this.draw_(n,i,t),e=i.canvas,this.canvas_[t]=e}return e},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.size_},e.prototype.getImageState=function(){return ar},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.calculateLineJoinSize_=function(t,e,n){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;var i=this.radius_,r=void 0===this.radius2_?i:this.radius2_;if(i0&&(this.newTiles_=!0):a.setState(ns)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},e.prototype.getData=function(t){var e=this.frameState;if(!e)return null;var n=this.getLayer(),i=Jn(e.pixelToCoordinateTransform,t.slice()),r=n.getExtent();if(r&&!we(r,i))return null;for(var o=e.pixelRatio,s=e.viewState.projection,a=e.viewState,l=n.getRenderSource(),h=l.getTileGridForProjection(a.projection),u=l.getTilePixelRatio(e.pixelRatio),c=h.getZForResolution(a.resolution);c>=h.getMinZoom();--c){var p=h.getTileCoordForCoordAndZ(i,c),f=l.getTile(c,p[1],p[2],o,s);if(!(f instanceof La||f instanceof Na))return null;if(f.getState()===ns){var d=h.getOrigin(c),g=ur(h.getTileSize(c)),_=h.getResolution(c),y=Math.floor(u*((i[0]-d[0])/_-p[1]*g[0])),v=Math.floor(u*((d[1]-i[1])/_-p[2]*g[1]));return this.getImageData(f.getImage(),y,v)}}return null},e.prototype.loadedTileCallback=function(e,n,i){return!!this.isDrawableTile(i)&&t.prototype.loadedTileCallback.call(this,e,n,i)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var n=t.layerStatesArray[t.layerIndex],i=t.viewState,r=i.projection,o=i.resolution,a=i.center,l=i.rotation,h=t.pixelRatio,u=this.getLayer(),c=u.getSource(),p=c.getRevision(),f=c.getTileGridForProjection(r),g=f.getZForResolution(o,c.zDirection),_=f.getResolution(g),y=t.extent,v=n.extent&&wn(n.extent,r);v&&(y=Ne(y,wn(n.extent,r)));var m=c.getTilePixelRatio(h),x=Math.round(t.size[0]*m),C=Math.round(t.size[1]*m);if(l){var w=Math.round(Math.sqrt(x*x+C*C));x=w,C=w}var S=_*x/2/m,E=_*C/2/m,b=[a[0]-S,a[1]-E,a[0]+S,a[1]+E],T=f.getTileRangeForExtentAndZ(y,g),O={};O[g]={};var R=this.createLoadedTileFinder(c,r,O),I=this.tmpExtent,P=this.tmpTileRange_;this.newTiles_=!1;for(var M=T.minX;M<=T.maxX;++M)for(var L=T.minY;L<=T.maxY;++L){var F=this.getTile(g,M,L,t);if(this.isDrawableTile(F)){var A=W(this);if(F.getState()==ns){O[g][F.tileCoord.toString()]=F;var D=F.inTransition(A);this.newTiles_||!D&&-1!==this.renderedTiles.indexOf(F)||(this.newTiles_=!0)}if(1===F.getAlpha(A,t.time))continue}var k=f.getTileCoordChildTileRange(F.tileCoord,P,I),j=!1;k&&(j=R(g+1,k)),j||f.forEachTileCoordParentTileRange(F.tileCoord,R,P,I)}var G=_/o;Qn(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/m,1/m,l,-x/2,-C/2);var z=ti(this.pixelTransform);this.useContainer(e,z,n.opacity,this.getBackground(t));var N=this.context,X=N.canvas;$n(this.inversePixelTransform,this.pixelTransform),Qn(this.tempTransform,x/2,C/2,G,G,0,-x/2,-C/2),X.width!=x||X.height!=C?(X.width=x,X.height=C):this.containerReused||N.clearRect(0,0,x,C),v&&this.clipUnrotated(N,t,v),c.getInterpolate()||d(N,Aa),this.preRender(N,t),this.renderedTiles.length=0;var Y,B,K,Z=Object.keys(O).map(Number);Z.sort(s),1!==n.opacity||this.containerReused&&!c.getOpaque(t.viewState.projection)?(Y=[],B=[]):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)/_,J=H[0]*q*G,Q=H[1]*q*G,$=f.getTileCoordForCoordAndZ(Xe(b),U),tt=f.getTileCoordExtent($),et=Jn(this.tempTransform,[m*(tt[0]-b[0])/_,m*(b[3]-tt[3])/_]),nt=m*c.getGutterForProjection(r),it=O[U];for(var rt in it){var ot=(F=it[rt]).tileCoord,st=$[1]-ot[1],at=Math.round(et[0]-(st-1)*J),lt=$[2]-ot[2],ht=Math.round(et[1]-(lt-1)*Q),ut=at-(M=Math.round(et[0]-st*J)),ct=ht-(L=Math.round(et[1]-lt*Q)),pt=g===U,ft=!1;if(!(D=pt&&1!==F.getAlpha(W(this),t.time)))if(Y){K=[M,L,M+ut,L,M+ut,L+ct,M,L+ct];for(var dt=0,gt=Y.length;dt=200&&a.status<300){var i=e.getType(),l=void 0;i==Sh||i==Eh?l=a.responseText:i==bh?(l=a.responseXML)||(l=(new DOMParser).parseFromString(a.responseText,"application/xml")):i==wh&&(l=a.response),l?o(e.readFeatures(l,{extent:n,featureProjection:r}),e.readProjection(l)):s()}else s()},a.onerror=s,a.send()}(t,e,n,i,r,(function(t,e){a.addFeatures(t),void 0!==o&&o(t)}),s||f)}}var Rh=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ih=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.feature=n,r.features=i,r}return Rh(e,t),e}(i),Ph=function(t){function e(e){var n=this,i=e||{};(n=t.call(this,{attributions:i.attributions,interpolate:!0,projection:void 0,state:Jr,wrapX:void 0===i.wrapX||i.wrapX})||this).on,n.once,n.un,n.loader_=f,n.format_=i.format,n.overlaps_=void 0===i.overlaps||i.overlaps,n.url_=i.url,void 0!==i.loader?n.loader_=i.loader:void 0!==n.url_&&(ye(n.format_,7),n.loader_=Oh(n.url_,n.format_)),n.strategy_=void 0!==i.strategy?i.strategy:Ch;var r,o,s=void 0===i.useSpatialIndex||i.useSpatialIndex;return n.featuresRtree_=s?new fh:null,n.loadedExtentsRtree_=new fh,n.loadingExtentsCount_=0,n.nullGeometryFeatures_={},n.idIndex_={},n.uidIndex_={},n.featureChangeKeys_={},n.featuresCollection_=null,Array.isArray(i.features)?o=i.features:i.features&&(o=(r=i.features).getArray()),s||void 0!==r||(r=new Ao(o)),void 0!==o&&n.addFeaturesInternal(o),void 0!==r&&n.bindFeaturesCollection_(r),n}return Rh(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=W(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var n=t.getGeometry();if(n){var i=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(i,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Ih(dh,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[L(e,C,this.handleFeatureChange_,this),L(e,r,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var n=!0,i=e.getId();return void 0!==i&&(i.toString()in this.idIndex_?n=!1:this.idIndex_[i.toString()]=e),n&&(ye(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),n},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],n=[],i=[],r=0,o=t.length;r0},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),t.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var e,n=this.loadedExtentsRtree_;n.forEachInExtent(t,(function(n){if(Ie(n.extent,t))return e=n,!0})),e&&n.remove(e)},e.prototype.removeFeature=function(t){if(t){var e=W(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}},e.prototype.removeFeatureInternal=function(t){var e=W(t),n=this.featureChangeKeys_[e];if(n){n.forEach(A),delete this.featureChangeKeys_[e];var i=t.getId();return void 0!==i&&delete this.idIndex_[i.toString()],delete this.uidIndex_[e],this.dispatchEvent(new Ih(yh,t)),t}},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var n in this.idIndex_)if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){ye(this.format_,7),this.url_=t,this.setLoader(Oh(t,this.format_))},e}($a),Mh=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Lh="renderOrder",Fh=function(t){function e(e){var n=this,i=e||{},r=d({},i);return delete r.style,delete r.renderBuffer,delete r.updateWhileAnimating,delete r.updateWhileInteracting,(n=t.call(this,r)||this).declutter_=void 0!==i.declutter&&i.declutter,n.renderBuffer_=void 0!==i.renderBuffer?i.renderBuffer:100,n.style_=null,n.styleFunction_=void 0,n.setStyle(i.style),n.updateWhileAnimating_=void 0!==i.updateWhileAnimating&&i.updateWhileAnimating,n.updateWhileInteracting_=void 0!==i.updateWhileInteracting&&i.updateWhileInteracting,n}return Mh(e,t),e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(Lh)},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new ph(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(Lh,t)},e.prototype.setStyle=function(t){this.style_=void 0!==t?t:ql,this.styleFunction_=null===t?void 0:function(t){var e;if("function"==typeof t)e=t;else{var n;Array.isArray(t)?n=t:(ye("function"==typeof t.getZIndex,41),n=[t]),e=function(){return n}}return e}(this.style_),this.changed()},e}(to),Ah={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},Dh=[Ah.FILL],kh=[Ah.STROKE],jh=[Ah.BEGIN_PATH],Gh=[Ah.CLOSE_PATH],zh=Ah,Wh=function(){function t(){}return t.prototype.drawCustom=function(t,e,n,i){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,e){},t.prototype.drawFeature=function(t,e){},t.prototype.drawGeometryCollection=function(t,e){},t.prototype.drawLineString=function(t,e){},t.prototype.drawMultiLineString=function(t,e){},t.prototype.drawMultiPoint=function(t,e){},t.prototype.drawMultiPolygon=function(t,e){},t.prototype.drawPoint=function(t,e){},t.prototype.drawPolygon=function(t,e){},t.prototype.drawText=function(t,e){},t.prototype.setFillStrokeStyle=function(t,e){},t.prototype.setImageStyle=function(t,e){},t.prototype.setTextStyle=function(t,e){},t}(),Nh=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Xh=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.tolerance=e,o.maxExtent=n,o.pixelRatio=r,o.maxLineWidth=0,o.resolution=i,o.beginGeometryInstruction1_=null,o.beginGeometryInstruction2_=null,o.bufferedMaxExtent_=null,o.instructions=[],o.coordinates=[],o.tmpCoordinate_=[],o.hitDetectionInstructions=[],o.state={},o}return Nh(e,t),e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))},e.prototype.appendFlatPointCoordinates=function(t,e){for(var n=this.getBufferedMaxExtent(),i=this.tmpCoordinate_,r=this.coordinates,o=r.length,s=0,a=t.length;sc&&(this.instructions.push([zh.CUSTOM,c,o,t,n,xi]),this.hitDetectionInstructions.push([zh.CUSTOM,c,o,t,i||n,xi]));break;case Nn:r=t.getFlatCoordinates(),this.coordinates.push(r[0],r[1]),o=this.coordinates.length,this.instructions.push([zh.CUSTOM,c,o,t,n]),this.hitDetectionInstructions.push([zh.CUSTOM,c,o,t,i||n])}this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[zh.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[zh.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 n,i,r=e.length,o=-1;for(t=0;tthis.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,n=[zh.SET_FILL_STYLE,e];return"string"!=typeof e&&n.push(!0),n},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[zh.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 n=t.fillStyle;"string"==typeof n&&t.currentFillStyle==n||(void 0!==n&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)},e.prototype.updateStrokeStyle=function(t,e){var n=t.strokeStyle,i=t.lineCap,r=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=i||r!=t.currentLineDash&&!u(t.currentLineDash,r)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==n&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=i,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=[zh.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=xe(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;me(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(Wh),Yh=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Bh=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i,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 Yh(e,t),e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var n=t.getFlatCoordinates(),i=t.getStride(),r=this.coordinates.length,o=this.appendFlatPointCoordinates(n,i);this.instructions.push([zh.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([zh.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 n=t.getFlatCoordinates(),i=t.getStride(),r=this.coordinates.length,o=this.appendFlatPointCoordinates(n,i);this.instructions.push([zh.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([zh.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 n=t.getAnchor(),i=t.getSize(),r=t.getHitDetectionImage(),o=t.getImage(this.pixelRatio),s=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=r,this.image_=o,this.height_=i[1],this.opacity_=t.getOpacity(),this.originX_=s[0]*this.imagePixelRatio_,this.originY_=s[1]*this.imagePixelRatio_,this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=i[0],this.declutterImageWithText_=e},e}(Xh),Kh=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Zh=function(t){function e(e,n,i,r){return t.call(this,e,n,i,r)||this}return Kh(e,t),e.prototype.drawFlatCoordinates_=function(t,e,n,i){var r=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,n,i,!1,!1),s=[zh.MOVE_TO_LINE_TO,r,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),n},e.prototype.drawLineString=function(t,e){var n=this.state,i=n.strokeStyle,r=n.lineWidth;if(void 0!==i&&void 0!==r){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([zh.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ho,0],jh);var o=t.getFlatCoordinates(),s=t.getStride();this.drawFlatCoordinates_(o,0,o.length,s),this.hitDetectionInstructions.push(kh),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var n=this.state,i=n.strokeStyle,r=n.lineWidth;if(void 0!==i&&void 0!==r){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([zh.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],jh);for(var o=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),l=0,h=0,u=o.length;ht&&(y>_&&(_=y,d=v,g=o),y=0,v=o-r)),s=a,u=p,c=f),l=m,h=x}return(y+=a)>_?[v,o]:[d,g]}var Jh=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Qh={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},$h={Circle:Uh,Default:Xh,Image:Bh,LineString:Zh,Polygon:Uh,Text:function(t){function e(e,n,i,r){var o=t.call(this,e,n,i,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 Jh(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 n=this.textFillState_,i=this.textStrokeState_,r=this.textState_;if(""!==this.text_&&r&&(n||i)){var o=this.coordinates,s=o.length,a=t.getType(),l=null,h=t.getStride();if(r.placement!==Hh||a!=Xn&&a!=Zn&&a!=Bn&&a!=Vn){var u=r.overflow?null:[];switch(a){case Nn:case Kn:l=t.getFlatCoordinates();break;case Xn:l=t.getFlatMidpoint();break;case Hn:l=t.getCenter();break;case Zn:l=t.getFlatMidpoints(),h=2;break;case Bn:l=t.getFlatInteriorPoint(),r.overflow||u.push(l[2]/this.resolution),h=3;break;case Vn:var c=t.getFlatInteriorPoints();l=[];for(w=0,S=c.length;wR[2]}else b=x>T;var I,P=Math.PI,M=[],L=w+i===e;if(_=0,y=S,p=t[e=w],f=t[e+1],L){v(),I=Math.atan2(f-g,p-d),b&&(I+=I>0?-P:P);var F=(T+x)/2,A=(O+C)/2;return M[0]=[F,A,(E-o)/2,I,r],M}for(var D=0,k=r.length;D0?-P:P),void 0!==I){var G=j-I;if(G+=G>P?-2*P:G<-P?2*P:0,Math.abs(G)>s)return null}I=j;for(var z=D,W=0;D0&&t.push("\n",""),t.push(e,""),t}var yu=function(){function t(t,e,n,i){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=i.instructions,this.coordinates=i.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=i.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=i.fillStates||{},this.strokeStates=i.strokeStates||{},this.textStates=i.textStates||{},this.widths_={},this.labels_={}}return t.prototype.createLabel=function(t,e,n,i){var r=t+e+n+i;if(this.labels_[r])return this.labels_[r];var o=i?this.strokeStates[i]:null,s=n?this.fillStates[n]:null,a=this.textStates[e],l=this.pixelRatio,h=[a.scale[0]*l,a.scale[1]*l],u=Array.isArray(t),c=gu(u?t[0]:t,a.textAlign||po),p=i&&o.lineWidth?o.lineWidth:0,f=u?t:t.split("\n").reduce(_u,[]),d=function(t,e){for(var n=[],i=[],r=[],o=0,s=0,a=0,l=0,h=0,u=e.length;h<=u;h+=2){var c=e[h];if("\n"!==c&&h!==u){var p=e[h+1]||t.font,f=Eo(p,c);n.push(f),s+=f;var d=wo(p);i.push(d),l=Math.max(l,d)}else o=Math.max(o,s),r.push(s),s=0,a+=l}return{width:o,height:a,widths:n,heights:i,lineWidths:r}}(a,f),g=d.width,_=d.height,y=d.widths,v=d.heights,m=d.lineWidths,x=g+p,C=[],w=(x+2)*h[0],S=(_+p)*h[1],E={width:w<0?Math.floor(w):Math.ceil(w),height:S<0?Math.floor(S):Math.ceil(S),contextInstructions:C};(1==h[0]&&1==h[1]||C.push("scale",h),i)&&(C.push("strokeStyle",o.strokeStyle),C.push("lineWidth",p),C.push("lineCap",o.lineCap),C.push("lineJoin",o.lineJoin),C.push("miterLimit",o.miterLimit),(et?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(C.push("setLineDash",[o.lineDash]),C.push("lineDashOffset",o.lineDashOffset)));n&&C.push("fillStyle",s.fillStyle),C.push("textBaseline","middle"),C.push("textAlign","center");for(var b,T=.5-c,O=c*x+T*p,R=[],I=[],P=0,M=0,L=0,F=0,A=0,D=f.length;At?t-l:r,x=o+h>e?e-h:o,C=f[3]+m*c[0]+f[1],w=f[0]+x*c[1]+f[2],S=y-f[3],E=v-f[0];return(d||0!==u)&&(hu[0]=S,pu[0]=S,hu[1]=E,uu[1]=E,uu[0]=S+C,cu[0]=uu[0],cu[1]=E+w,pu[1]=cu[1]),0!==u?(Jn(_=Qn([1,0,0,1,0,0],n,i,1,1,u,-n,-i),hu),Jn(_,uu),Jn(_,cu),Jn(_,pu),Oe(Math.min(hu[0],uu[0],cu[0],pu[0]),Math.min(hu[1],uu[1],cu[1],pu[1]),Math.max(hu[0],uu[0],cu[0],pu[0]),Math.max(hu[1],uu[1],cu[1],pu[1]),lu)):Oe(Math.min(S,S+C),Math.min(E,E+w),Math.max(S,S+C),Math.max(E,E+w),lu),p&&(y=Math.round(y),v=Math.round(v)),{drawImageX:y,drawImageY:v,drawImageW:m,drawImageH:x,originX:l,originY:h,declutterBox:{minX:lu[0],minY:lu[1],maxX:lu[2],maxY:lu[3],value:g},canvasTransform:_,scale:c}},t.prototype.replayImageOrLabel_=function(t,e,n,i,r,o,s){var a=!(!o&&!s),l=i.declutterBox,h=t.canvas,u=s?s[2]*i.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,hu,uu,cu,pu,o,s),To(t,i.canvasTransform,r,n,i.originX,i.originY,i.drawImageW,i.drawImageH,i.drawImageX,i.drawImageY,i.scale)),!0},t.prototype.fill_=function(t){if(this.alignFill_){var e=Jn(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(e[0]%n,e[1]%n),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,n,i){var r=this.textStates[e],o=this.createLabel(t,e,i,n),s=this.strokeStates[n],a=this.pixelRatio,l=gu(Array.isArray(t)?t[0]:t,r.textAlign||po),h=Qh[r.textBaseline||fo],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,n,i,r,o,s,a){var l,h,c;this.pixelCoordinates_&&u(n,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=ei(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),h=this.renderedTransform_,c=n,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,w,S,E,b,T,O,R=0,I=i.length,P=0,M=0,L=0,F=null,A=null,D=this.coordinateCache_,k=this.viewRotation_,j=Math.round(1e12*Math.atan2(-n[1],n[0]))/1e12,G={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:k},z=this.instructions!=i||this.overlaps?0:200;Rz&&(this.fill_(t),M=0),L>z&&(t.stroke(),L=0),M||L||(t.beginPath(),g=NaN,_=NaN),++R;break;case zh.CIRCLE:var N=l[P=W[1]],X=l[P+1],Y=l[P+2]-N,B=l[P+3]-X,K=Math.sqrt(Y*Y+B*B);t.moveTo(N+K,X),t.arc(N,X,K,0,2*Math.PI,!0),++R;break;case zh.CLOSE_PATH:t.closePath(),++R;break;case zh.CUSTOM:P=W[1],p=W[2];var Z=W[3],V=W[4],U=6==W.length?W[5]:void 0;G.geometry=Z,G.feature=E,R in D||(D[R]=[]);var H=D[R];U?U(l,P,p,2,H):(H[0]=l[P],H[1]=l[P+1],H.length=2),V(H,G),++R;break;case zh.DRAW_IMAGE:P=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],nt=W[12],it=W[13],rt=W[14];if(!m&&W.length>=19){x=W[18],C=W[19],w=W[20],S=W[21];var ot=this.drawLabelWithPointPlacement_(x,C,w,S);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,it=m.width,W[13]=it}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=go,ut=!1,ct=!1),tt&&j?et+=k:tt||j||(et-=k);for(var pt=0;Pn)break;var a=i[s];a||(a=[],i[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,i.length);r0){if(!o||p!==iu&&p!==su||-1!==o.indexOf(t)){var h=(f[s]-3)/4,u=i-h%a,d=i-(h/a|0),g=r(t,e,u*u+d*d);if(g)return g}c.clearRect(0,0,a,a);break}}var g,_,y,v,m,x=Object.keys(this.executorsByZIndex_).map(Number);for(x.sort(s),g=x.length-1;g>=0;--g){var C=x[g].toString();for(y=this.executorsByZIndex_[C],_=vu.length-1;_>=0;--_)if(void 0!==(v=y[p=vu[_]])&&(m=v.executeHitDetection(c,l,n,d,u)))return m}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var n=e[0],i=e[1],r=e[2],o=e[3],s=[n,i,n,o,r,o,r,i];return ei(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return y(this.executorsByZIndex_)},t.prototype.execute=function(t,e,n,i,r,o,a){var l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(s),this.maxExtent_&&(t.save(),this.clip(t,n));var h,u,c,p,f,d,g=o||vu;for(a&&l.reverse(),h=0,u=l.length;hd[2];)v=_*++y,u.push(this.getRenderTransform(i,r,o,Eu,c,p,v).slice()),g-=_}this.hitDetectionImageData_=function(t,e,n,i,r,o,a){var l=rt(t[0]*Eu,t[1]*Eu);l.imageSmoothingEnabled=!1;for(var h=l.canvas,u=new Su(l,Eu,r,null,a),c=n.length,p=Math.floor(16777215/c),f={},d=1;d<=c;++d){var g=n[d-1],_=g.getStyleFunction()||i;if(i){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=n[2])){var r=Be(n),o=Math.floor((i[0]-n[0])/r)*r;t[0]-=o,t[2]-=o}return t}(m[0],h);S[0]x[0]&&S[2]>x[2]&&m.push([S[0]-C,S[1],S[2]-C,S[3]])}if(!this.dirty_&&this.renderedResolution_==c&&this.renderedRevision_==f&&this.renderedRenderOrder_==g&&Se(this.wrappedRenderedExtent_,y))return u(this.renderedExtent_,v)||(this.hitDetectionImageData_=null,this.renderedExtent_=v),this.renderedCenter_=_,this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var E,b=new tu(Ou(c,p),y,c,p);this.getLayer().getDeclutter()&&(E=new tu(Ou(c,p),y,c,p));var T,O=vn();if(O){for(var R=0,I=m.length;R180)&&(n[0]=kt(i+180,360)-180),n}},zu={OSM:wl,Vector:Ph,XYZ:xl},Wu={Icon:Mr,Stroke:Wl,Style:Ql}},7072:function(t,e,n){var i,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,i,r,o,s){!function t(n,i,r,o,s){for(;o>r;){if(o-r>600){var a=o-r+1,l=i-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(n,i,Math.max(r,Math.floor(i-l*u/a+c)),Math.min(o,Math.floor(i+(a-l)*u/a+c)),s)}var p=n[i],f=r,d=o;for(e(n,r,i),s(n[o],p)>0&&e(n,r,o);f0;)d--}0===s(n[r],p)?e(n,r,d):e(n,++d,o),d<=i&&(r=d+1),i<=d&&(o=d-1)}}(t,i,r||0,o||t.length-1,s||n)}function e(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function n(t,e){return te?1:0}var i=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,n){if(!n)return e.indexOf(t);for(var i=0;i=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 g(e,n,i,r,o){for(var s=[n,i];s.length;)if(!((i=s.pop())-(n=s.pop())<=r)){var a=n+Math.ceil((i-n)/r/2)*r;t(e,a,n,i,o),s.push(n,a,a,i)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var i=this.toBBox,r=[];e;){for(var o=0;o=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(i,r,e)},i.prototype._split=function(t,e){var n=t[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var s=this._chooseSplitIndex(n,r,i),a=d(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},i.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)},i.prototype._chooseSplitIndex=function(t,e,n){for(var i,r,o,a,l,h,c,p=1/0,f=1/0,d=e;d<=n-e;d++){var g=s(t,0,d,this.toBBox),_=s(t,d,n,this.toBBox),y=(r=g,o=_,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(g)+u(_);y=e;f--){var d=t.children[f];a(l,t.leaf?r(d):d),h+=c(l)}return h},i.prototype._adjustParentBBoxes=function(t,e,n){for(var i=n;i>=0;i--)a(e[i],t)},i.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},i},"object"==s(e)?t.exports=o():void 0===(r="function"==typeof(i=o)?i.call(e,n,e,t):i)||(t.exports=r)}}]); //# sourceMappingURL=521.bundle.js.map