2 lines
281 KiB
JavaScript
2 lines
281 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{374:function(t,e,i){var n,r,o;function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}o=function(){"use strict";function t(t,n,r,o,s){!function t(i,n,r,o,s){for(;o>r;){if(o-r>600){var a=o-r+1,l=n-r+1,h=Math.log(a),u=.5*Math.exp(2*h/3),c=.5*Math.sqrt(h*u*(a-u)/a)*(l-a/2<0?-1:1),p=Math.max(r,Math.floor(n-l*u/a+c)),f=Math.min(o,Math.floor(n+(a-l)*u/a+c));t(i,n,p,f,s)}var d=i[n],_=r,g=o;for(e(i,r,n),s(i[o],d)>0&&e(i,r,o);_<g;){for(e(i,_,g),_++,g--;s(i[_],d)<0;)_++;for(;s(i[g],d)>0;)g--}0===s(i[r],d)?e(i,r,g):(g++,e(i,g,o)),g<=n&&(r=g+1),n<=g&&(o=g-1)}}(t,n,r||0,o||t.length-1,s||i)}function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,i,n,r){r||(r=d(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o=e;o<i;o++){var s=t.children[o];a(r,t.leaf?n(s):s)}return r}function a(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function h(t,e){return t.minY-e.minY}function u(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function c(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(e,i,n,r,o){for(var s=[i,n];s.length;)if(!((n=s.pop())-(i=s.pop())<=r)){var a=i+Math.ceil((n-i)/r/2)*r;t(e,a,i,n,o),s.push(i,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,i=[];if(!f(t,e))return i;for(var n=this.toBBox,r=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?n(s):s;f(t,a)&&(e.leaf?i.push(s):p(t,a)?this._all(s,i):r.push(s))}e=r.pop()}return i},n.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var i=[];e;){for(var n=0;n<e.children.length;n++){var r=e.children[n],o=e.leaf?this.toBBox(r):r;if(f(t,o)){if(e.leaf||p(t,o))return!0;i.push(r)}}e=i.pop()}return!1},n.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var i=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var n=this.data;this.data=i,i=n}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=d([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var i,n,o,s=this.data,a=this.toBBox(t),l=[],h=[];s||l.length;){if(s||(s=l.pop(),n=l[l.length-1],i=h.pop(),o=!0),s.leaf){var u=r(t,s.children,e);if(-1!==u)return s.children.splice(u,1),l.push(s),this._condense(l),this}o||s.leaf||!p(s,a)?n?(i++,s=n.children[i],o=!1):s=null:(l.push(s),h.push(i),i=0,n=s,s=s.children[0])}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},n.prototype._build=function(t,e,i,n){var r,s=i-e+1,a=this._maxEntries;if(s<=a)return o(r=d(t.slice(e,i+1)),this.toBBox),r;n||(n=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,n-1))),(r=d([])).leaf=!1,r.height=n;var l=Math.ceil(s/a),h=l*Math.ceil(Math.sqrt(a));_(t,e,i,h,this.compareMinX);for(var u=e;u<=i;u+=h){var c=Math.min(u+h-1,i);_(t,u,c,l,this.compareMinY);for(var p=u;p<=c;p+=l){var f=Math.min(p+l-1,c);r.children.push(this._build(t,p,f,n-1))}}return o(r,this.toBBox),r},n.prototype._chooseSubtree=function(t,e,i,n){for(;n.push(e),!e.leaf&&n.length-1!==i;){for(var r=1/0,o=1/0,s=void 0,a=0;a<e.children.length;a++){var l=e.children[a],h=u(l),c=(p=t,f=l,(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math.min(f.minY,p.minY))-h);c<o?(o=c,r=h<r?h:r,s=l):c===o&&h<r&&(r=h,s=l)}e=s||e.children[0]}var p,f;return e},n.prototype._insert=function(t,e,i){var n=i?t:this.toBBox(t),r=[],o=this._chooseSubtree(n,this.data,e,r);for(o.children.push(t),a(o,n);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},n.prototype._split=function(t,e){var i=t[e],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var s=this._chooseSplitIndex(i,r,n),a=d(i.children.splice(s,i.children.length-s));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},n.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,i){for(var n,r,o,a,l,h,c,p=1/0,f=1/0,d=e;d<=i-e;d++){var _=s(t,0,d,this.toBBox),g=s(t,d,i,this.toBBox),y=(r=_,o=g,a=void 0,l=void 0,h=void 0,c=void 0,a=Math.max(r.minX,o.minX),l=Math.max(r.minY,o.minY),h=Math.min(r.maxX,o.maxX),c=Math.min(r.maxY,o.maxY),Math.max(0,h-a)*Math.max(0,c-l)),v=u(_)+u(g);y<p?(p=y,n=d,f=v<f?v:f):y===p&&v<f&&(f=v,n=d)}return n||i-e},n.prototype._chooseSplitAxis=function(t,e,i){var n=t.leaf?this.compareMinX:l,r=t.leaf?this.compareMinY:h;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,r)&&t.children.sort(n)},n.prototype._allDistMargin=function(t,e,i,n){t.children.sort(n);for(var r=this.toBBox,o=s(t,0,e,r),l=s(t,i-e,i,r),h=c(o)+c(l),u=e;u<i-e;u++){var p=t.children[u];a(o,t.leaf?r(p):p),h+=c(o)}for(var f=i-e-1;f>=e;f--){var d=t.children[f];a(l,t.leaf?r(d):d),h+=c(l)}return h},n.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)a(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},n},"object"===s(e)&&void 0!==t?t.exports=o():void 0===(r="function"==typeof(n=o)?n.call(e,i,e,t):n)||(t.exports=r)},387:function(t,e){var i=null,n=null;function r(t,e,i){t.addEventListener(e,(function(t){var r=new MouseEvent(i,t);r.pointerId=1,r.isPrimary=!0,r.pointerType="mouse",r.width=1,r.height=1,r.tiltX=0,r.tiltY=0,"buttons"in t&&0!==t.buttons?r.pressure=.5:r.pressure=0;var o=t.target;null!==n&&(o=n,"mouseup"===e&&(n=null)),o.dispatchEvent(r),r.defaultPrevented&&t.preventDefault()}))}function o(t,e,n){t.addEventListener(e,(function(t){for(var r=t.changedTouches,o=r.length,s=0;s<o;s++){var a=new CustomEvent(n,{bubbles:!0,cancelable:!0});a.ctrlKey=t.ctrlKey,a.shiftKey=t.shiftKey,a.altKey=t.altKey,a.metaKey=t.metaKey;var l=r.item(s);a.clientX=l.clientX,a.clientY=l.clientY,a.screenX=l.screenX,a.screenY=l.screenY,a.pageX=l.pageX,a.pageY=l.pageY;var h=l.target.getBoundingClientRect();a.offsetX=l.clientX-h.left,a.offsetY=l.clientY-h.top,a.pointerId=1+l.identifier,a.button=0,a.buttons=1,a.movementX=0,a.movementY=0,a.region=null,a.relatedTarget=null,a.x=a.clientX,a.y=a.clientY,a.pointerType="touch",a.width=1,a.height=1,a.tiltX=0,a.tiltY=0,a.pressure=1,"touchstart"===e&&null===i&&(i=l.identifier),a.isPrimary=l.identifier===i,"touchend"===e&&a.isPrimary&&(i=null),t.target.dispatchEvent(a),a.defaultPrevented&&t.preventDefault()}}))}"PointerEvent"in window||(Element.prototype.setPointerCapture=Element.prototype.setCapture,Element.prototype.releasePointerCapture=Element.prototype.releaseCapture,"TouchEvent"in window||(r(document,"mousedown","pointerdown"),r(document,"mousemove","pointermove"),r(document,"mouseup","pointerup")),o(document,"touchstart","pointerdown"),o(document,"touchmove","pointermove"),o(document,"touchend","pointerup"))},390:function(t,e,i){"use strict";function n(t,e){return t>e?1:t<e?-1:0}function r(t,e,i){var n=t.length;if(t[0]<=e)return 0;if(e<=t[n-1])return n-1;var r=void 0;if(i>0){for(r=1;r<n;++r)if(t[r]<e)return r-1}else if(i<0){for(r=1;r<n;++r)if(t[r]<=e)return r}else for(r=1;r<n;++r){if(t[r]==e)return r;if(t[r]<e)return t[r-1]-e<e-t[r]?r-1:r}return n-1}function o(t,e,i){for(;e<i;){var n=t[e];t[e]=t[i],t[i]=n,++e,--i}}function s(t,e){for(var i=Array.isArray(e)?e:[e],n=i.length,r=0;r<n;r++)t[t.length]=i[r]}function a(t,e){var i=t.length;if(i!==e.length)return!1;for(var n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function l(){return!0}function h(){return!1}function u(){}i.r(e),i.d(e,"Feature",(function(){return Ln})),i.d(e,"Map",(function(){return ma})),i.d(e,"Overlay",(function(){return Rl})),i.d(e,"View",(function(){return lo})),i.d(e,"control",(function(){return iu})),i.d(e,"geom",(function(){return nu})),i.d(e,"layer",(function(){return ru})),i.d(e,"proj",(function(){return ou})),i.d(e,"source",(function(){return su})),i.d(e,"style",(function(){return au}));var c="postrender",p="movestart",f="moveend";function d(){return function(){throw new Error("Unimplemented abstract method.")}()}var _=0;function g(t){return t.ol_uid||(t.ol_uid=String(++_))}var y="propertychange",v="function"==typeof Object.assign?Object.assign:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(t),n=1,r=arguments.length;n<r;++n){var o=arguments[n];if(null!=o)for(var s in o)o.hasOwnProperty(s)&&(i[s]=o[s])}return i};function m(t){for(var e in t)delete t[e]}var x="function"==typeof Object.values?Object.values:function(t){var e=[];for(var i in t)e.push(t[i]);return e};function S(t){var e;for(e in t)return!1;return!e}function C(t,e,i,n,r){if(n&&n!==t&&(i=i.bind(n)),r){var o=i;i=function(){t.removeEventListener(e,i),o.apply(this,arguments)}}var s={target:t,type:e,listener:i};return t.addEventListener(e,i),s}function w(t,e,i,n){return C(t,e,i,n,!0)}function E(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),m(t))}var b=function(){function t(){this.disposed_=!1}return t.prototype.dispose=function(){this.disposed_||(this.disposed_=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}();var T,R=function(){function t(t){this.propagationStopped,this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.propagationStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}(),I=(T=function(t,e){return(T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}T(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),O=function(t){function e(e){var i=t.call(this)||this;return i.eventTarget_=e,i.pendingRemovals_={},i.dispatching_={},i.listeners_={},i}return I(e,t),e.prototype.addEventListener=function(t,e){if(t&&e){var i=this.listeners_[t];i||(i=[],this.listeners_[t]=i),-1===i.indexOf(e)&&i.push(e)}},e.prototype.dispatchEvent=function(t){var e="string"==typeof t?new R(t):t,i=e.type;e.target||(e.target=this.eventTarget_||this);var n,r=this.listeners_[i];if(r){i in this.dispatching_||(this.dispatching_[i]=0,this.pendingRemovals_[i]=0),++this.dispatching_[i];for(var o=0,s=r.length;o<s;++o)if(!1===(n="handleEvent"in r[o]?r[o].handleEvent(e):r[o].call(this,e))||e.propagationStopped){n=!1;break}if(--this.dispatching_[i],0===this.dispatching_[i]){var a=this.pendingRemovals_[i];for(delete this.pendingRemovals_[i];a--;)this.removeEventListener(i,u);delete this.dispatching_[i]}return n}},e.prototype.disposeInternal=function(){m(this.listeners_)},e.prototype.getListeners=function(t){return this.listeners_[t]},e.prototype.hasListener=function(t){return t?t in this.listeners_:Object.keys(this.listeners_).length>0},e.prototype.removeEventListener=function(t,e){var i=this.listeners_[t];if(i){var n=i.indexOf(e);-1!==n&&(t in this.pendingRemovals_?(i[n]=u,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}},e}(b),P="change",M="error",L="contextmenu",F="click",A="dblclick",D="keydown",k="keypress",j="load",G="resize",z="touchmove",W="wheel",X=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();var K=function(t){function e(){var e=t.call(this)||this;return e.revision_=0,e}return X(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(P)},e.prototype.getRevision=function(){return this.revision_},e.prototype.on=function(t,e){if(Array.isArray(t)){for(var i=t.length,n=new Array(i),r=0;r<i;++r)n[r]=C(this,t[r],e);return n}return C(this,t,e)},e.prototype.once=function(t,e){if(Array.isArray(t)){for(var i=t.length,n=new Array(i),r=0;r<i;++r)n[r]=w(this,t[r],e);return n}return w(this,t,e)},e.prototype.un=function(t,e){if(Array.isArray(t))for(var i=0,n=t.length;i<n;++i)this.removeEventListener(t[i],e);else this.removeEventListener(t,e)},e}(O),Y=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),N=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.key=i,r.oldValue=n,r}return Y(e,t),e}(R),Z=function(t){function e(e){var i=t.call(this)||this;return g(i),i.values_={},void 0!==e&&i.setProperties(e),i}return Y(e,t),e.prototype.get=function(t){var e;return this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e},e.prototype.getKeys=function(){return Object.keys(this.values_)},e.prototype.getProperties=function(){return v({},this.values_)},e.prototype.notify=function(t,e){var i;i=V(t),this.dispatchEvent(new N(i,t,e)),i=y,this.dispatchEvent(new N(i,t,e))},e.prototype.set=function(t,e,i){if(i)this.values_[t]=e;else{var n=this.values_[t];this.values_[t]=e,n!==e&&this.notify(t,n)}},e.prototype.setProperties=function(t,e){for(var i in t)this.set(i,t[i],e)},e.prototype.unset=function(t,e){if(t in this.values_){var i=this.values_[t];delete this.values_[t],e||this.notify(t,i)}},e}(K),B={};function V(t){return B.hasOwnProperty(t)?B[t]:B[t]="change:"+t}var U=Z,H="undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"",q=-1!==H.indexOf("firefox"),J=(-1!==H.indexOf("safari")&&H.indexOf("chrom"),-1!==H.indexOf("webkit")&&-1==H.indexOf("edge")),Q=-1!==H.indexOf("macintosh"),$="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,tt="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,et="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 nt(t,e,i){var n=i&&i.length?i.shift():tt?new OffscreenCanvas(t||300,e||300):document.createElement("canvas");return t&&(n.width=t),e&&(n.height=e),n.getContext("2d")}function rt(t){var e=t.offsetWidth,i=getComputedStyle(t);return e+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10)}function ot(t){var e=t.offsetHeight,i=getComputedStyle(t);return e+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10)}function st(t,e){var i=e.parentNode;i&&i.replaceChild(t,e)}function at(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function lt(t){for(;t.lastChild;)t.removeChild(t.lastChild)}var ht=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ut=function(t){function e(e){var i=t.call(this)||this;return i.element=e.element?e.element:null,i.target_=null,i.map_=null,i.listenerKeys=[],i.render_=e.render?e.render:u,e.target&&i.setTarget(e.target),i}return ht(e,t),e.prototype.disposeInternal=function(){at(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&at(this.element);for(var e=0,i=this.listenerKeys.length;e<i;++e)E(this.listenerKeys[e]);(this.listenerKeys.length=0,this.map_=t,this.map_)&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==u&&this.listenerKeys.push(C(t,c,this.render,this)),t.render())},e.prototype.render=function(t){this.render_.call(this,t)},e.prototype.setTarget=function(t){this.target_="string"==typeof t?document.getElementById(t):t},e}(U),ct=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),pt=["style","variant","weight","size","lineHeight","family"],ft=function(t){var e=t.match(ct);if(!e)return null;for(var i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},n=0,r=pt.length;n<r;++n){var o=e[n+1];void 0!==o&&(i[pt[n]]=o)}return i.families=i.family.split(/,\s?/),i};function dt(t){return Math.pow(t,3)}function _t(t){return 1-dt(1-t)}function gt(t){return 3*t*t-2*t*t*t}function yt(t){return t}var vt=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function mt(t){var e=t.frameState;if(e){var i=e.viewState.rotation;if(i!=this.rotation_){var n="rotate("+i+"rad)";if(this.autoHide_){var r=this.element.classList.contains("ol-hidden");r||0!==i?r&&0!==i&&this.element.classList.remove("ol-hidden"):this.element.classList.add("ol-hidden")}this.label_.style.transform=n}this.rotation_=i}}var xt=function(t){function e(e){var i=this,n=e||{};i=t.call(this,{element:document.createElement("div"),render:n.render||mt,target:n.target})||this;var r=void 0!==n.className?n.className:"ol-rotate",o=void 0!==n.label?n.label:"⇧";i.label_=null,"string"==typeof o?(i.label_=document.createElement("span"),i.label_.className="ol-compass",i.label_.textContent=o):(i.label_=o,i.label_.classList.add("ol-compass"));var s=n.tipLabel?n.tipLabel:"Reset rotation",a=document.createElement("button");a.className=r+"-reset",a.setAttribute("type","button"),a.title=s,a.appendChild(i.label_),a.addEventListener(F,i.handleClick_.bind(i),!1);var l=r+" ol-unselectable ol-control",h=i.element;return h.className=l,h.appendChild(a),i.callResetNorth_=n.resetNorth?n.resetNorth:void 0,i.duration_=void 0!==n.duration?n.duration:250,i.autoHide_=void 0===n.autoHide||n.autoHide,i.rotation_=void 0,i.autoHide_&&i.element.classList.add("ol-hidden"),i}return vt(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap().getView();if(t){var e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:_t}):t.setRotation(0))}},e}(ut),St=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ct=function(t){function e(e){var i=this,n="Assertion failed. See https://openlayers.org/en/"+("v"+"6.3.0".split("-")[0])+"/doc/errors/#"+e+" for details.";return(i=t.call(this,n)||this).code=e,i.name="AssertionError",i.message=n,i}return St(e,t),e}(Error);function wt(t,e){if(!t)throw new Ct(e)}function Et(t,e,i){return Math.min(Math.max(t,e),i)}var bt="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2};function Tt(t,e,i,n,r,o){var s=r-i,a=o-n;if(0!==s||0!==a){var l=((t-i)*s+(e-n)*a)/(s*s+a*a);l>1?(i=r,n=o):l>0&&(i+=s*l,n+=a*l)}return Rt(t,e,i,n)}function Rt(t,e,i,n){var r=i-t,o=n-e;return r*r+o*o}function It(t){return t*Math.PI/180}function Ot(t,e){var i=t%e;return i*e<0?i+e:i}function Pt(t,e,i){return t+i*(e-t)}var Mt="Point",Lt="LineString",Ft="LinearRing",At="Polygon",Dt="MultiPoint",kt="MultiLineString",jt="MultiPolygon",Gt="GeometryCollection",zt="Circle";function Wt(t,e,i){var n=i||6371008.8,r=It(t[1]),o=It(e[1]),s=(o-r)/2,a=It(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*n*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}var Xt="bottom-left",Kt="bottom-right",Yt="top-left",Nt="top-right",Zt=0,Bt=1,Vt=2,Ut=4,Ht=8,qt=16;function Jt(t){for(var e=oe(),i=0,n=t.length;i<n;++i)ue(e,t[i]);return e}function Qt(t,e,i){return i?(i[0]=t[0]-e,i[1]=t[1]-e,i[2]=t[2]+e,i[3]=t[3]+e,i):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function $t(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function te(t,e,i){var n,r;return(n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*n+(r=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0)*r}function ee(t,e){return ne(t,e[0],e[1])}function ie(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function ne(t,e,i){return t[0]<=e&&e<=t[2]&&t[1]<=i&&i<=t[3]}function re(t,e){var i=t[0],n=t[1],r=t[2],o=t[3],s=e[0],a=e[1],l=Zt;return s<i?l|=qt:s>r&&(l|=Ut),a<n?l|=Ht:a>o&&(l|=Vt),l===Zt&&(l=Bt),l}function oe(){return[1/0,1/0,-1/0,-1/0]}function se(t,e,i,n,r){return r?(r[0]=t,r[1]=e,r[2]=i,r[3]=n,r):[t,e,i,n]}function ae(t){return se(1/0,1/0,-1/0,-1/0,t)}function le(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function he(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function ue(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function ce(t,e){for(var i=0,n=e.length;i<n;++i)ue(t,e[i]);return t}function pe(t,e,i,n,r){for(;i<n;i+=r)fe(t,e[i],e[i+1]);return t}function fe(t,e,i){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],i)}function de(t){var e=0;return Te(t)||(e=Ee(t)*xe(t)),e}function _e(t){return[t[0],t[1]]}function ge(t){return[t[2],t[1]]}function ye(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function ve(t,e){var i;return e===Xt?i=_e(t):e===Kt?i=ge(t):e===Yt?i=Ce(t):e===Nt?i=we(t):wt(!1,13),i}function me(t,e,i,n,r){var o=e*n[0]/2,s=e*n[1]/2,a=Math.cos(i),l=Math.sin(i),h=o*a,u=o*l,c=s*a,p=s*l,f=t[0],d=t[1],_=f-h+p,g=f-h-p,y=f+h-p,v=f+h+p,m=d-u-c,x=d-u+c,S=d+u+c,C=d+u-c;return se(Math.min(_,g,y,v),Math.min(m,x,S,C),Math.max(_,g,y,v),Math.max(m,x,S,C),r)}function xe(t){return t[3]-t[1]}function Se(t,e,i){var n=i||[1/0,1/0,-1/0,-1/0];return be(t,e)?(t[0]>e[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]<e[2]?n[2]=t[2]:n[2]=e[2],t[3]<e[3]?n[3]=t[3]:n[3]=e[3]):ae(n),n}function Ce(t){return[t[0],t[3]]}function we(t){return[t[2],t[3]]}function Ee(t){return t[2]-t[0]}function be(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function Te(t){return t[2]<t[0]||t[3]<t[1]}function Re(t,e,i,n){var r=[];if(n>1)for(var o=t[2]-t[0],s=t[3]-t[1],a=0;a<n;++a)r.push(t[0]+o*a/n,t[1],t[2],t[1]+s*a/n,t[2]-o*a/n,t[3],t[0],t[3]-s*a/n);else r=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(r,r,2);for(var l=[],h=[],u=(a=0,r.length);a<u;a+=2)l.push(r[a]),h.push(r[a+1]);return function(t,e,i){return se(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),i)}(l,h,i)}var Ie={DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},Oe={};Oe[Ie.DEGREES]=2*Math.PI*6370997/360,Oe[Ie.FEET]=.3048,Oe[Ie.METERS]=1,Oe[Ie.USFEET]=1200/3937;var Pe=Ie,Me=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_||Oe[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}(),Le=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Fe=6378137*Math.PI,Ae=[-Fe,-Fe,Fe,Fe],De=[-180,-85,180,85],ke=function(t){function e(e){return t.call(this,{code:e,units:Pe.METERS,extent:Ae,global:!0,worldExtent:De,getPointResolution:function(t,e){return t/bt(e[1]/6378137)}})||this}return Le(e,t),e}(Me),je=[new ke("EPSG:3857"),new ke("EPSG:102100"),new ke("EPSG:102113"),new ke("EPSG:900913"),new ke("urn:ogc:def:crs:EPSG:6.18:3:3857"),new ke("urn:ogc:def:crs:EPSG::3857"),new ke("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Ge(t,e,i){var n=t.length,r=i>1?i:2,o=e;void 0===o&&(o=r>2?t.slice():new Array(n));for(var s=Fe,a=0;a<n;a+=r){o[a]=s*t[a]/180;var l=6378137*Math.log(Math.tan(Math.PI*(+t[a+1]+90)/360));l>s?l=s:l<-s&&(l=-s),o[a+1]=l}return o}function ze(t,e,i){var n=t.length,r=i>1?i:2,o=e;void 0===o&&(o=r>2?t.slice():new Array(n));for(var s=0;s<n;s+=r)o[s]=180*t[s]/Fe,o[s+1]=360*Math.atan(Math.exp(t[s+1]/6378137))/Math.PI-90;return o}var We=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Xe=[-180,-90,180,90],Ke=6378137*Math.PI/180,Ye=function(t){function e(e,i){return t.call(this,{code:e,units:Pe.DEGREES,extent:Xe,axisOrientation:i,global:!0,metersPerUnit:Ke,worldExtent:Xe})||this}return We(e,t),e}(Me),Ne=[new Ye("CRS:84"),new Ye("EPSG:4326","neu"),new Ye("urn:ogc:def:crs:EPSG::4326","neu"),new Ye("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new Ye("urn:ogc:def:crs:OGC:1.3:CRS84"),new Ye("urn:ogc:def:crs:OGC:2:84"),new Ye("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Ye("urn:x-ogc:def:crs:EPSG:4326","neu")],Ze={};function Be(t,e,i){var n=t.getCode(),r=e.getCode();n in Ze||(Ze[n]={}),Ze[n][r]=i}var Ve={};function Ue(t,e,i){var n;if(void 0!==e){for(var r=0,o=t.length;r<o;++r)e[r]=t[r];n=e}else n=t.slice();return n}function He(t,e,i){if(void 0!==e&&t!==e){for(var n=0,r=t.length;n<r;++n)e[n]=t[n];t=e}return t}function qe(t){!function(t,e){Ve[t]=e}(t.getCode(),t),Be(t,t,Ue)}function Je(t){return"string"==typeof t?Ve[t]||null:t||null}function Qe(t,e,i,n){var r,o=(t=Je(t)).getPointResolutionFunc();if(o)r=o(e,i),n&&n!==t.getUnits()&&(s=t.getMetersPerUnit())&&(r=r*s/Oe[n]);else if(t.getUnits()==Pe.DEGREES&&!n||n==Pe.DEGREES)r=e;else{var s,a=ii(t,Je("EPSG:4326")),l=[i[0]-e/2,i[1],i[0]+e/2,i[1],i[0],i[1]-e/2,i[0],i[1]+e/2];r=(Wt((l=a(l,l,2)).slice(0,2),l.slice(2,4))+Wt(l.slice(4,6),l.slice(6,8)))/2,void 0!==(s=n?Oe[n]:t.getMetersPerUnit())&&(r/=s)}return r}function $e(t){!function(t){t.forEach(qe)}(t),t.forEach((function(e){t.forEach((function(t){e!==t&&Be(e,t,Ue)}))}))}function ti(t,e){return t?"string"==typeof t?Je(t):t:Je(e)}function ei(t,e){if(t===e)return!0;var i=t.getUnits()===e.getUnits();return t.getCode()===e.getCode()?i:ii(t,e)===Ue&&i}function ii(t,e){var i=function(t,e){var i;return t in Ze&&e in Ze[t]&&(i=Ze[t][e]),i}(t.getCode(),e.getCode());return i||(i=He),i}function ni(t,e){return ii(Je(t),Je(e))}function ri(t,e,i){return ni(e,i)(t,void 0,t.length)}function oi(t,e,i,n){return Re(t,ni(e,i),void 0,n)}var si,ai,li,hi=null;function ui(){return hi}function ci(t,e){return hi?ri(t,e,hi):t}function pi(t,e){return hi?ri(t,hi,e):t}function fi(t,e){return hi?oi(t,e,hi):t}function di(t,e){return hi?oi(t,hi,e):t}$e(je),$e(Ne),si=je,ai=Ge,li=ze,Ne.forEach((function(t){si.forEach((function(e){Be(t,e,ai),Be(e,t,li)}))}));var _i=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),gi="degrees",yi="imperial",vi="nautical",mi="metric",xi="us",Si=[1,2,5];function Ci(t){var e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()}var wi=function(t){function e(e){var i=this,n=e||{},r=void 0!==n.className?n.className:n.bar?"ol-scale-bar":"ol-scale-line";return(i=t.call(this,{element:document.createElement("div"),render:n.render||Ci,target:n.target})||this).innerElement_=document.createElement("div"),i.innerElement_.className=r+"-inner",i.element.className=r+" ol-unselectable",i.element.appendChild(i.innerElement_),i.viewState_=null,i.minWidth_=void 0!==n.minWidth?n.minWidth:64,i.renderedVisible_=!1,i.renderedWidth_=void 0,i.renderedHTML_="",i.addEventListener(V("units"),i.handleUnitsChanged_),i.setUnits(n.units||mi),i.scaleBar_=n.bar||!1,i.scaleBarSteps_=n.steps||4,i.scaleBarText_=n.text||!1,i}return _i(e,t),e.prototype.getUnits=function(){return this.get("units")},e.prototype.handleUnitsChanged_=function(){this.updateElement_()},e.prototype.setUnits=function(t){this.set("units",t)},e.prototype.updateElement_=function(){var t=this.viewState_;if(t){var e=t.center,i=t.projection,n=this.getUnits(),r=n==gi?Pe.DEGREES:Pe.METERS,o=Qe(i,t.resolution,e,r),s=this.minWidth_*o,a="";if(n==gi){var l=Oe[Pe.DEGREES];(s*=l)<l/60?(a="″",o*=3600):s<l?(a="′",o*=60):a="°"}else n==yi?s<.9144?(a="in",o/=.0254):s<1609.344?(a="ft",o/=.3048):(a="mi",o/=1609.344):n==vi?(o/=1852,a="nm"):n==mi?s<.001?(a="μm",o*=1e6):s<1?(a="mm",o*=1e3):s<1e3?a="m":(a="km",o/=1e3):n==xi?s<.9144?(a="in",o*=39.37):s<1609.344?(a="ft",o/=.30480061):(a="mi",o/=1609.3472):wt(!1,33);for(var h,u,c,p,f=3*Math.floor(Math.log(this.minWidth_*o)/Math.log(10));;){c=Math.floor(f/3);var d=Math.pow(10,c);if(h=Si[(f%3+3)%3]*d,u=Math.round(h/o),isNaN(u))return this.element.style.display="none",void(this.renderedVisible_=!1);if(u>=this.minWidth_)break;++f}p=this.scaleBar_?this.createScaleBar(u,h,a):h.toFixed(c<0?-c:0)+" "+a,this.renderedHTML_!=p&&(this.innerElement_.innerHTML=p,this.renderedHTML_=p),this.renderedWidth_!=u&&(this.innerElement_.style.width=u+"px",this.renderedWidth_=u),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.createScaleBar=function(t,e,i){for(var n="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),r=[],o=t/this.scaleBarSteps_,s="#ffffff",a=0;a<this.scaleBarSteps_;a++)0===a&&r.push(this.createMarker("absolute",a)),r.push('<div><div class="ol-scale-singlebar" style="width: '+o+"px;background-color: "+s+';"></div>'+this.createMarker("relative",a)+(a%2==0||2===this.scaleBarSteps_?this.createStepText(a,t,!1,e,i):"")+"</div>"),a===this.scaleBarSteps_-1&&r.push(this.createStepText(a+1,t,!0,e,i)),s="#ffffff"===s?"#000000":"#ffffff";return'<div style="display: flex;">'+(this.scaleBarText_?'<div class="ol-scale-text" style="width: '+t+'px;">'+n+"</div>":"")+r.join("")+"</div>"},e.prototype.createMarker=function(t,e){return'<div class="ol-scale-step-marker" style="position: '+t+";top: "+("absolute"===t?3:-10)+'px;"></div>'},e.prototype.createStepText=function(t,e,i,n,r){var o=(0===t?0:Math.round(n/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+r);return'<div class="ol-scale-step-text" style="margin-left: '+(0===t?-3:e/this.scaleBarSteps_*-1)+"px;text-align: "+(0===t?"left":"center")+"; min-width: "+(0===t?0:e/this.scaleBarSteps_*2)+"px;left: "+(i?e+"px":"unset")+';">'+o+"</div>"},e.prototype.getScaleForResolution=function(){var t=this.getMap().getView().getResolution(),e=this.viewState_.projection.getMetersPerUnit();return parseFloat(t.toString())*e*39.37*(25.4/.28)},e}(ut),Ei=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),bi=function(t){function e(e){var i=this,n=e||{};i=t.call(this,{element:document.createElement("div"),target:n.target})||this;var r=void 0!==n.className?n.className:"ol-zoom",o=void 0!==n.delta?n.delta:1,s=void 0!==n.zoomInLabel?n.zoomInLabel:"+",a=void 0!==n.zoomOutLabel?n.zoomOutLabel:"−",l=void 0!==n.zoomInTipLabel?n.zoomInTipLabel:"Zoom in",h=void 0!==n.zoomOutTipLabel?n.zoomOutTipLabel:"Zoom out",u=document.createElement("button");u.className=r+"-in",u.setAttribute("type","button"),u.title=l,u.appendChild("string"==typeof s?document.createTextNode(s):s),u.addEventListener(F,i.handleClick_.bind(i,o),!1);var c=document.createElement("button");c.className=r+"-out",c.setAttribute("type","button"),c.title=h,c.appendChild("string"==typeof a?document.createTextNode(a):a),c.addEventListener(F,i.handleClick_.bind(i,-o),!1);var p=r+" ol-unselectable ol-control",f=i.element;return f.className=p,f.appendChild(u),f.appendChild(c),i.duration_=void 0!==n.duration?n.duration:250,i}return Ei(e,t),e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var i=e.getZoom();if(void 0!==i){var n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:_t})):e.setZoom(n)}}},e}(ut),Ti="XY",Ri="XYZ",Ii="XYM",Oi="XYZM";function Pi(t,e,i,n,r,o){for(var s=o||[],a=0,l=e;l<i;l+=n){var h=t[l],u=t[l+1];s[a++]=r[0]*h+r[2]*u+r[4],s[a++]=r[1]*h+r[3]*u+r[5]}return o&&s.length!=a&&(s.length=a),s}new Array(6);function Mi(t,e,i,n,r,o,s){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t[4]=o,t[5]=s,t}function Li(t,e){var i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function Fi(t,e,i,n,r,o,s,a){var l=Math.sin(o),h=Math.cos(o);return t[0]=n*h,t[1]=r*l,t[2]=-n*l,t[3]=r*h,t[4]=s*n*h-a*n*l+e,t[5]=s*r*l+a*r*h+i,t}function Ai(t,e){var i,n=(i=e)[0]*i[3]-i[1]*i[2];wt(0!==n,32);var r=e[0],o=e[1],s=e[2],a=e[3],l=e[4],h=e[5];return t[0]=a/n,t[1]=-o/n,t[2]=-s/n,t[3]=r/n,t[4]=(s*h-a*l)/n,t[5]=-(r*h-o*l)/n,t}function Di(t){return"matrix("+t.join(", ")+")"}var ki=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ji=[1,0,0,1,0,0],Gi=function(t){function e(){var e,i,n,r,o,s=t.call(this)||this;return s.extent_=[1/0,1/0,-1/0,-1/0],s.extentRevision_=-1,s.simplifiedGeometryMaxMinSquaredTolerance=0,s.simplifiedGeometryRevision=0,s.simplifyTransformedInternal=(e=function(t,e,i){if(!i)return this.getSimplifiedGeometry(e);var n=this.clone();return n.applyTransform(i),n.getSimplifiedGeometry(e)},o=!1,function(){var t=Array.prototype.slice.call(arguments);return o&&this===r&&a(t,n)||(o=!0,r=this,n=t,i=e.apply(this,arguments)),i}),s}return ki(e,t),e.prototype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)},e.prototype.clone=function(){return d()},e.prototype.closestPointXY=function(t,e,i,n){return d()},e.prototype.containsXY=function(t,e){var i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e},e.prototype.getClosestPoint=function(t,e){var i=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],i,1/0),i},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return d()},e.prototype.getExtent=function(t){return this.extentRevision_!=this.getRevision()&&(this.extent_=this.computeExtent(this.extent_),this.extentRevision_=this.getRevision()),function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}(this.extent_,t)},e.prototype.rotate=function(t,e){d()},e.prototype.scale=function(t,e,i){d()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return d()},e.prototype.getType=function(){return d()},e.prototype.applyTransform=function(t){d()},e.prototype.intersectsExtent=function(t){return d()},e.prototype.translate=function(t,e){d()},e.prototype.transform=function(t,e){var i=Je(t),n=i.getUnits()==Pe.TILE_PIXELS?function(t,n,r){var o=i.getExtent(),s=i.getWorldExtent(),a=xe(s)/xe(o);return Fi(ji,s[0],s[3],a,-a,0,0,0),Pi(t,0,t.length,r,ji,n),ni(i,e)(t,n,r)}:ni(i,e);return this.applyTransform(n),this},e}(U),zi=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Wi(t){var e;return t==Ti?e=2:t==Ri||t==Ii?e=3:t==Oi&&(e=4),e}var Xi=function(t){function e(){var e=t.call(this)||this;return e.layout=Ti,e.stride=2,e.flatCoordinates=null,e}return zi(e,t),e.prototype.computeExtent=function(t){return e=this.flatCoordinates,i=0,n=this.flatCoordinates.length,r=this.stride,pe(ae(t),e,i,n,r);var e,i,n,r},e.prototype.getCoordinates=function(){return d()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getStride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,e){this.stride=Wi(t),this.layout=t,this.flatCoordinates=e},e.prototype.setCoordinates=function(t,e){d()},e.prototype.setLayout=function(t,e,i){var n;if(t)n=Wi(t);else{for(var r=0;r<i;++r){if(0===e.length)return this.layout=Ti,void(this.stride=2);e=e[0]}t=function(t){var e;2==t?e=Ti:3==t?e=Ri:4==t&&(e=Oi);return(e)}(n=e.length)}this.layout=t,this.stride=n},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,e){var i=this.getFlatCoordinates();if(i){var n=this.getStride();!function(t,e,i,n,r,o,s){for(var a=s||[],l=Math.cos(r),h=Math.sin(r),u=o[0],c=o[1],p=0,f=e;f<i;f+=n){var d=t[f]-u,_=t[f+1]-c;a[p++]=u+d*l-_*h,a[p++]=c+d*h+_*l;for(var g=f+2;g<f+n;++g)a[p++]=t[g]}s&&a.length!=p&&(a.length=p)}(i,0,i.length,n,t,e,i),this.changed()}},e.prototype.scale=function(t,e,i){var n=e;void 0===n&&(n=t);var r=i;r||(r=ye(this.getExtent()));var o=this.getFlatCoordinates();if(o){var s=this.getStride();!function(t,e,i,n,r,o,s,a){for(var l=a||[],h=s[0],u=s[1],c=0,p=e;p<i;p+=n){var f=t[p]-h,d=t[p+1]-u;l[c++]=h+r*f,l[c++]=u+o*d;for(var _=p+2;_<p+n;++_)l[c++]=t[_]}a&&l.length!=c&&(l.length=c)}(o,0,o.length,s,t,n,r,o),this.changed()}},e.prototype.translate=function(t,e){var i=this.getFlatCoordinates();if(i){var n=this.getStride();!function(t,e,i,n,r,o,s){for(var a=s||[],l=0,h=e;h<i;h+=n){a[l++]=t[h]+r,a[l++]=t[h+1]+o;for(var u=h+2;u<h+n;++u)a[l++]=t[u]}s&&a.length!=l&&(a.length=l)}(i,0,i.length,n,t,e,i),this.changed()}},e}(Gi);function Ki(t,e,i,n){for(var r=0,o=t[i-n],s=t[i-n+1];e<i;e+=n){var a=t[e],l=t[e+1];r+=s*a-o*l,o=a,s=l}return r/2}function Yi(t,e,i,n){for(var r=0,o=0,s=i.length;o<s;++o){var a=i[o];r+=Ki(t,e,a,n),e=a}return r}function Ni(t,e,i,n,r,o,s){var a,l=t[e],h=t[e+1],u=t[i]-l,c=t[i+1]-h;if(0===u&&0===c)a=e;else{var p=((r-l)*u+(o-h)*c)/(u*u+c*c);if(p>1)a=i;else{if(p>0){for(var f=0;f<n;++f)s[f]=Pt(t[e+f],t[i+f],p);return void(s.length=n)}a=e}}for(f=0;f<n;++f)s[f]=t[a+f];s.length=n}function Zi(t,e,i,n,r){var o=t[e],s=t[e+1];for(e+=n;e<i;e+=n){var a=t[e],l=t[e+1],h=Rt(o,s,a,l);h>r&&(r=h),o=a,s=l}return r}function Bi(t,e,i,n,r){for(var o=0,s=i.length;o<s;++o){var a=i[o];r=Zi(t,e,a,n,r),e=a}return r}function Vi(t,e,i,n,r,o,s,a,l,h,u){if(e==i)return h;var c,p;if(0===r){if((p=Rt(s,a,t[e],t[e+1]))<h){for(c=0;c<n;++c)l[c]=t[e+c];return l.length=n,p}return h}for(var f=u||[NaN,NaN],d=e+n;d<i;)if(Ni(t,d-n,d,n,s,a,f),(p=Rt(s,a,f[0],f[1]))<h){for(h=p,c=0;c<n;++c)l[c]=f[c];l.length=n,d+=n}else d+=n*Math.max((Math.sqrt(p)-Math.sqrt(h))/r|0,1);if(o&&(Ni(t,i-n,e,n,s,a,f),(p=Rt(s,a,f[0],f[1]))<h)){for(h=p,c=0;c<n;++c)l[c]=f[c];l.length=n}return h}function Ui(t,e,i,n,r,o,s,a,l,h,u){for(var c=u||[NaN,NaN],p=0,f=i.length;p<f;++p){var d=i[p];h=Vi(t,e,d,n,r,o,s,a,l,h,c),e=d}return h}function Hi(t,e,i,n){for(var r=0,o=i.length;r<o;++r)for(var s=i[r],a=0;a<n;++a)t[e++]=s[a];return e}function qi(t,e,i,n,r){for(var o=r||[],s=0,a=0,l=i.length;a<l;++a){var h=Hi(t,e,i[a],n);o[s++]=h,e=h}return o.length=s,o}function Ji(t,e,i,n,r){for(var o=void 0!==r?r:[],s=0,a=e;a<i;a+=n)o[s++]=t.slice(a,a+n);return o.length=s,o}function Qi(t,e,i,n,r){for(var o=void 0!==r?r:[],s=0,a=0,l=i.length;a<l;++a){var h=i[a];o[s++]=Ji(t,e,h,n,o[s]),e=h}return o.length=s,o}function $i(t,e,i,n,r){for(var o=void 0!==r?r:[],s=0,a=0,l=i.length;a<l;++a){var h=i[a];o[s++]=Qi(t,e,h,n,o[s]),e=h[h.length-1]}return o.length=s,o}function tn(t,e,i,n,r,o,s){var a=(i-e)/n;if(a<3){for(;e<i;e+=n)o[s++]=t[e],o[s++]=t[e+1];return s}var l=new Array(a);l[0]=1,l[a-1]=1;for(var h=[e,i-n],u=0;h.length>0;){for(var c=h.pop(),p=h.pop(),f=0,d=t[p],_=t[p+1],g=t[c],y=t[c+1],v=p+n;v<c;v+=n){var m=Tt(t[v],t[v+1],d,_,g,y);m>f&&(u=v,f=m)}f>r&&(l[(u-e)/n]=1,p+n<u&&h.push(p,u),u+n<c&&h.push(u,c))}for(v=0;v<a;++v)l[v]&&(o[s++]=t[e+v*n],o[s++]=t[e+v*n+1]);return s}function en(t,e){return e*Math.round(t/e)}function nn(t,e,i,n,r,o,s){if(e==i)return s;var a,l,h=en(t[e],r),u=en(t[e+1],r);e+=n,o[s++]=h,o[s++]=u;do{if(a=en(t[e],r),l=en(t[e+1],r),(e+=n)==i)return o[s++]=a,o[s++]=l,s}while(a==h&&l==u);for(;e<i;){var c=en(t[e],r),p=en(t[e+1],r);if(e+=n,c!=a||p!=l){var f=a-h,d=l-u,_=c-h,g=p-u;f*g==d*_&&(f<0&&_<f||f==_||f>0&&_>f)&&(d<0&&g<d||d==g||d>0&&g>d)?(a=c,l=p):(o[s++]=a,o[s++]=l,h=a,u=l,a=c,l=p)}}return o[s++]=a,o[s++]=l,s}function rn(t,e,i,n,r,o,s,a){for(var l=0,h=i.length;l<h;++l){var u=i[l];s=nn(t,e,u,n,r,o,s),a.push(s),e=u}return s}var on=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),sn=function(t){function e(e,i){var n=t.call(this)||this;return n.maxDelta_=-1,n.maxDeltaRevision_=-1,void 0===i||Array.isArray(e[0])?n.setCoordinates(e,i):n.setFlatCoordinates(i,e),n}return on(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,i,n){return n<te(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Zi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Vi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))},e.prototype.getArea=function(){return Ki(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return Ji(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new e(i,Ti)},e.prototype.getType=function(){return Ft},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Hi(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Xi),an=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ln=function(t){function e(e,i){var n=t.call(this)||this;return n.setCoordinates(e,i),n}return an(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,i,n){var r=this.flatCoordinates,o=Rt(t,e,r[0],r[1]);if(o<n){for(var s=this.stride,a=0;a<s;++a)i[a]=r[a];return i.length=s,o}return n},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return e=this.flatCoordinates,i=t,n=e[0],r=e[1],se(n,r,n,r,i);var e,i,n,r},e.prototype.getType=function(){return Mt},e.prototype.intersectsExtent=function(t){return ne(t,this.flatCoordinates[0],this.flatCoordinates[1])},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=function(t,e,i,n){for(var r=0,o=i.length;r<o;++r)t[e++]=i[r];return e}(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Xi);function hn(t,e,i,n,r){return!function(t,e){var i;return(i=e(_e(t)))?i:(i=e(ge(t)))?i:(i=e(we(t)))?i:(i=e(Ce(t)))||!1}(r,(function(r){return!un(t,e,i,n,r[0],r[1])}))}function un(t,e,i,n,r,o){for(var s=0,a=t[i-n],l=t[i-n+1];e<i;e+=n){var h=t[e],u=t[e+1];l<=o?u>o&&(h-a)*(o-l)-(r-a)*(u-l)>0&&s++:u<=o&&(h-a)*(o-l)-(r-a)*(u-l)<0&&s--,a=h,l=u}return 0!==s}function cn(t,e,i,n,r,o){if(0===i.length)return!1;if(!un(t,e,i[0],n,r,o))return!1;for(var s=1,a=i.length;s<a;++s)if(un(t,i[s-1],i[s],n,r,o))return!1;return!0}function pn(t,e,i,r,o,s,a){for(var l,h,u,c,p,f,d,_=o[s+1],g=[],y=0,v=i.length;y<v;++y){var m=i[y];for(c=t[m-r],f=t[m-r+1],l=e;l<m;l+=r)p=t[l],d=t[l+1],(_<=f&&d<=_||f<=_&&_<=d)&&(u=(_-f)/(d-f)*(p-c)+c,g.push(u)),c=p,f=d}var x=NaN,S=-1/0;for(g.sort(n),c=g[0],l=1,h=g.length;l<h;++l){p=g[l];var C=Math.abs(p-c);C>S&&cn(t,e,i,r,u=(c+p)/2,_)&&(x=u,S=C),c=p}return isNaN(x)&&(x=o[s]),a?(a.push(x,_,S),a):[x,_,S]}function fn(t,e,i,n,r){for(var o,s=[t[e],t[e+1]],a=[];e+n<i;e+=n){if(a[0]=t[e+n],a[1]=t[e+n+1],o=r(s,a))return o;s[0]=a[0],s[1]=a[1]}return!1}function dn(t,e,i,n,r){var o=pe([1/0,1/0,-1/0,-1/0],t,e,i,n);return!!be(r,o)&&(!!ie(r,o)||(o[0]>=r[0]&&o[2]<=r[2]||(o[1]>=r[1]&&o[3]<=r[3]||fn(t,e,i,n,(function(t,e){return function(t,e,i){var n=!1,r=re(t,e),o=re(t,i);if(r===Bt||o===Bt)n=!0;else{var s=t[0],a=t[1],l=t[2],h=t[3],u=e[0],c=e[1],p=i[0],f=i[1],d=(f-c)/(p-u),_=void 0,g=void 0;o&Vt&&!(r&Vt)&&(n=(_=p-(f-h)/d)>=s&&_<=l),n||!(o&Ut)||r&Ut||(n=(g=f-(p-l)*d)>=a&&g<=h),n||!(o&Ht)||r&Ht||(n=(_=p-(f-a)/d)>=s&&_<=l),n||!(o&qt)||r&qt||(n=(g=f-(p-s)*d)>=a&&g<=h)}return n}(r,t,e)})))))}function _n(t,e,i,n,r){if(!function(t,e,i,n,r){return!!dn(t,e,i,n,r)||(!!un(t,e,i,n,r[0],r[1])||(!!un(t,e,i,n,r[0],r[3])||(!!un(t,e,i,n,r[2],r[1])||!!un(t,e,i,n,r[2],r[3]))))}(t,e,i[0],n,r))return!1;if(1===i.length)return!0;for(var o=1,s=i.length;o<s;++o)if(hn(t,i[o-1],i[o],n,r)&&!dn(t,i[o-1],i[o],n,r))return!1;return!0}function gn(t,e,i,n){for(;e<i-n;){for(var r=0;r<n;++r){var o=t[e+r];t[e+r]=t[i-n+r],t[i-n+r]=o}e+=n,i-=n}}function yn(t,e,i,n){for(var r=0,o=t[i-n],s=t[i-n+1];e<i;e+=n){var a=t[e],l=t[e+1];r+=(a-o)*(l+s),o=a,s=l}return r>0}function vn(t,e,i,n,r){for(var o=void 0!==r&&r,s=0,a=i.length;s<a;++s){var l=i[s],h=yn(t,e,l,n);if(0===s){if(o&&h||!o&&!h)return!1}else if(o&&!h||!o&&h)return!1;e=l}return!0}function mn(t,e,i,n,r){for(var o=void 0!==r&&r,s=0,a=i.length;s<a;++s){var l=i[s],h=yn(t,e,l,n);(0===s?o&&h||!o&&!h:o&&!h||!o&&h)&&gn(t,e,l,n),e=l}return e}var xn=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Sn=function(t){function e(e,i,n){var r=t.call(this)||this;return r.ends_=[],r.flatInteriorPointRevision_=-1,r.flatInteriorPoint_=null,r.maxDelta_=-1,r.maxDeltaRevision_=-1,r.orientedRevision_=-1,r.orientedFlatCoordinates_=null,void 0!==i&&n?(r.setFlatCoordinates(i,e),r.ends_=n):r.setCoordinates(e,i),r}return xn(e,t),e.prototype.appendLinearRing=function(t){this.flatCoordinates?s(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice())},e.prototype.closestPointXY=function(t,e,i,n){return n<te(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Bi(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Ui(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))},e.prototype.containsXY=function(t,e){return cn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return Yi(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?mn(e=this.getOrientedFlatCoordinates().slice(),0,this.ends_,this.stride,t):e=this.flatCoordinates,Qi(e,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=ye(this.getExtent());this.flatInteriorPoint_=pn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new ln(this.getFlatInteriorPoint(),Ii)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new sn(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[],r=0,o=0,s=i.length;o<s;++o){var a=i[o],l=new sn(e.slice(r,a),t);n.push(l),r=a}return n},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;vn(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=mn(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[],n=[];return i.length=rn(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),i,0,n),new e(i,Ti,n)},e.prototype.getType=function(){return At},e.prototype.intersectsExtent=function(t){return _n(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=qi(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},e}(Xi),Cn=Sn;function wn(t){var e=t[0],i=t[1],n=t[2],r=t[3],o=[e,i,e,r,n,r,n,i,e,i];return new Sn(o,Ti,[o.length])}var En=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),bn=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,{element:document.createElement("div"),target:n.target})||this).extent=n.extent?n.extent:null;var r=void 0!==n.className?n.className:"ol-zoom-extent",o=void 0!==n.label?n.label:"E",s=void 0!==n.tipLabel?n.tipLabel:"Fit to extent",a=document.createElement("button");a.setAttribute("type","button"),a.title=s,a.appendChild("string"==typeof o?document.createTextNode(o):o),a.addEventListener(F,i.handleClick_.bind(i),!1);var l=r+" ol-unselectable ol-control",h=i.element;return h.className=l,h.appendChild(a),i}return En(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),this.handleZoomToExtent()},e.prototype.handleZoomToExtent=function(){var t=this.getMap().getView(),e=this.extent?this.extent:t.getProjection().getExtent();t.fitInternal(wn(e))},e}(ut);function Tn(t,e,i,r,o,s){var a=NaN,l=NaN,h=(i-e)/r;if(1===h)a=t[e],l=t[e+1];else if(2==h)a=(1-o)*t[e]+o*t[e+r],l=(1-o)*t[e+1]+o*t[e+r+1];else if(0!==h){for(var u=t[e],c=t[e+1],p=0,f=[0],d=e+r;d<i;d+=r){var _=t[d],g=t[d+1];p+=Math.sqrt((_-u)*(_-u)+(g-c)*(g-c)),f.push(p),u=_,c=g}var y=o*p,v=function(t,e,i){for(var r,o,s=i||n,a=0,l=t.length,h=!1;a<l;)(o=+s(t[r=a+(l-a>>1)],e))<0?a=r+1:(l=r,h=!o);return h?a:~a}(f,y);if(v<0){var m=(y-f[-v-2])/(f[-v-1]-f[-v-2]),x=e+(-v-2)*r;a=Pt(t[x],t[x+r],m),l=Pt(t[x+1],t[x+r+1],m)}else a=t[e+v*r],l=t[e+v*r+1]}return s?(s[0]=a,s[1]=l,s):[a,l]}function Rn(t,e,i,n,r,o){if(i==e)return null;var s;if(r<t[e+n-1])return o?((s=t.slice(e,e+n))[n-1]=r,s):null;if(t[i-1]<r)return o?((s=t.slice(i-n,i))[n-1]=r,s):null;if(r==t[e+n-1])return t.slice(e,e+n);for(var a=e/n,l=i/n;a<l;){var h=a+l>>1;r<t[(h+1)*n-1]?l=h:a=h+1}var u=t[a*n-1];if(r==u)return t.slice((a-1)*n,(a-1)*n+n);var c=(r-u)/(t[(a+1)*n-1]-u);s=[];for(var p=0;p<n-1;++p)s.push(Pt(t[(a-1)*n+p],t[a*n+p],c));return s.push(r),s}function In(t,e,i,n){for(var r=t[e],o=t[e+1],s=0,a=e+n;a<i;a+=n){var l=t[a],h=t[a+1];s+=Math.sqrt((l-r)*(l-r)+(h-o)*(h-o)),r=l,o=h}return s}var On=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Pn=function(t){function e(e,i){var n=t.call(this)||this;return n.flatMidpoint_=null,n.flatMidpointRevision_=-1,n.maxDelta_=-1,n.maxDeltaRevision_=-1,void 0===i||Array.isArray(e[0])?n.setCoordinates(e,i):n.setFlatCoordinates(i,e),n}return On(e,t),e.prototype.appendCoordinate=function(t){this.flatCoordinates?s(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,i,n){return n<te(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Zi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Vi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,n))},e.prototype.forEachSegment=function(t){return fn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,e){if(this.layout!=Ii&&this.layout!=Oi)return null;var i=void 0!==e&&e;return Rn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i)},e.prototype.getCoordinates=function(){return Ji(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,e){return Tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e)},e.prototype.getLength=function(){return In(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new e(i,Ti)},e.prototype.getType=function(){return Lt},e.prototype.intersectsExtent=function(t){return dn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Hi(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Xi),Mn=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();var Ln=function(t){function e(e){var i=t.call(this)||this;if(i.id_=void 0,i.geometryName_="geometry",i.style_=null,i.styleFunction_=void 0,i.geometryChangeKey_=null,i.addEventListener(V(i.geometryName_),i.handleGeometryChanged_),e)if("function"==typeof e.getSimplifiedGeometry){var n=e;i.setGeometry(n)}else{var r=e;i.setProperties(r)}return i}return Mn(e,t),e.prototype.clone=function(){var t=new e(this.getProperties());t.setGeometryName(this.getGeometryName());var i=this.getGeometry();i&&t.setGeometry(i.clone());var n=this.getStyle();return n&&t.setStyle(n),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(E(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=C(t,P,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;var e;Array.isArray(t)?e=t:(wt("function"==typeof t.getZIndex,41),e=[t]);return function(){return e}}(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeEventListener(V(this.geometryName_),this.handleGeometryChanged_),this.geometryName_=t,this.addEventListener(V(this.geometryName_),this.handleGeometryChanged_),this.handleGeometryChanged_()},e}(U),Fn=0,An=1,Dn=2,kn=3,jn=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Gn=/^([a-z]*)$|^hsla?\(.*\)$/i;function zn(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var i=getComputedStyle(e).color;return document.body.removeChild(e),i}return""}var Wn,Xn,Kn=(Wn={},Xn=0,function(t){var e;if(Wn.hasOwnProperty(t))e=Wn[t];else{if(Xn>=1024){var i=0;for(var n in Wn)0==(3&i++)&&(delete Wn[n],--Xn)}e=function(t){var e,i,n,r,o;if(Gn.exec(t)&&(t=zn(t)),jn.exec(t)){var s=t.length-1,a=void 0;a=s<=4?1:2;var l=4===s||8===s;e=parseInt(t.substr(1+0*a,a),16),i=parseInt(t.substr(1+1*a,a),16),n=parseInt(t.substr(1+2*a,a),16),r=l?parseInt(t.substr(1+3*a,a),16):255,1==a&&(e=(e<<4)+e,i=(i<<4)+i,n=(n<<4)+n,l&&(r=(r<<4)+r)),o=[e,i,n,r/255]}else 0==t.indexOf("rgba(")?Nn(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),Nn(o)):wt(!1,14);return o}(t),Wn[t]=e,++Xn}return e});function Yn(t){return Array.isArray(t)?t:Kn(t)}function Nn(t){return t[0]=Et(t[0]+.5|0,0,255),t[1]=Et(t[1]+.5|0,0,255),t[2]=Et(t[2]+.5|0,0,255),t[3]=Et(t[3],0,1),t}function Zn(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var i=t[1];i!=(0|i)&&(i=i+.5|0);var n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:t[3])+")"}var Bn="fraction",Vn="pixels",Un=function(){function t(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return t.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var e in this.cache_){var i=this.cache_[e];0!=(3&t++)||i.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,i){var n=Hn(t,e,i);return n in this.cache_?this.cache_[n]:null},t.prototype.set=function(t,e,i,n){var r=Hn(t,e,i);this.cache_[r]=n,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}();function Hn(t,e,i){return e+":"+t+":"+(i?function(t){return"string"==typeof t?t:Zn(t)}(i):"null")}var qn=new Un,Jn=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Qn=function(t){function e(e,i,n,r){var o=t.call(this)||this;return o.extent=e,o.pixelRatio_=n,o.resolution=i,o.state=r,o}return Jn(e,t),e.prototype.changed=function(){this.dispatchEvent(P)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return d()},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(){d()},e}(O),$n=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function tr(t,e,i){var n=t;if(n.src&&et){var r=n.decode(),o=!0;return r.then((function(){o&&e()})).catch((function(t){o&&("EncodingError"===t.name&&"Invalid image type."===t.message?e():i())})),function(){o=!1}}var s=[w(n,j,e),w(n,M,i)];return function(){s.forEach(E)}}!function(t){function e(e,i,n,r,o,s){var a=t.call(this,e,i,n,Fn)||this;return a.src_=r,a.image_=new Image,null!==o&&(a.image_.crossOrigin=o),a.unlisten_=null,a.state=Fn,a.imageLoadFunction_=s,a}$n(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=kn,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=xe(this.extent)/this.image_.height),this.state=Dn,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=Fn&&this.state!=kn||(this.state=An,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},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}(Qn);var er=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ir=function(t){function e(e,i,n,r,o,s){var a=t.call(this)||this;return a.hitDetectionImage_=null,a.image_=e||new Image,null!==r&&(a.image_.crossOrigin=r),a.canvas_=s?document.createElement("canvas"):null,a.color_=s,a.unlisten_=null,a.imageState_=o,a.size_=n,a.src_=i,a.tainted_,a}return er(e,t),e.prototype.isTainted_=function(t){if(void 0===this.tainted_&&this.imageState_===Dn){t||(t=nt(1,1)).drawImage(this.image_,0,0);try{t.getImageData(0,0,1,1),this.tainted_=!1}catch(t){this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(P)},e.prototype.handleImageError_=function(){this.imageState_=kn,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=Dn,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.replaceColor_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.canvas_?this.canvas_:this.image_},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(t){if(!this.hitDetectionImage_)if(this.isTainted_()){var e=this.size_[0],i=this.size_[1],n=nt(e,i);n.fillRect(0,0,e,i),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_==Fn){this.imageState_=An;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(){if(this.color_){this.canvas_.width=this.image_.width,this.canvas_.height=this.image_.height;var t=this.canvas_.getContext("2d");if(t.drawImage(this.image_,0,0),this.isTainted_(t)){var e=this.color_;return t.globalCompositeOperation="multiply",t.fillStyle="rgb("+e[0]+","+e[1]+","+e[2]+")",t.fillRect(0,0,this.image_.width,this.image_.height),t.globalCompositeOperation="destination-in",void t.drawImage(this.image_,0,0)}for(var i=t.getImageData(0,0,this.image_.width,this.image_.height),n=i.data,r=this.color_[0]/255,o=this.color_[1]/255,s=this.color_[2]/255,a=0,l=n.length;a<l;a+=4)n[a]*=r,n[a+1]*=o,n[a+2]*=s;t.putImageData(i,0,0)}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(O);var nr="bottom-left",rr="bottom-right",or="top-left",sr="top-right",ar=function(){function t(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.displacement_=t.displacement}return t.prototype.clone=function(){return new t({opacity:this.getOpacity(),scale:this.getScale(),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.getDisplacement=function(){return this.displacement_},t.prototype.getAnchor=function(){return d()},t.prototype.getImage=function(t){return d()},t.prototype.getHitDetectionImage=function(t){return d()},t.prototype.getImageState=function(){return d()},t.prototype.getImageSize=function(){return d()},t.prototype.getHitDetectionImageSize=function(){return d()},t.prototype.getOrigin=function(){return d()},t.prototype.getSize=function(){return d()},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},t.prototype.listenImageChange=function(t){d()},t.prototype.load=function(){d()},t.prototype.unlistenImageChange=function(t){d()},t}(),lr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),hr=function(t){function e(e){var i=this,n=e||{},r=void 0!==n.opacity?n.opacity:1,o=void 0!==n.rotation?n.rotation:0,s=void 0!==n.scale?n.scale:1,a=void 0!==n.rotateWithView&&n.rotateWithView;(i=t.call(this,{opacity:r,rotation:o,scale:s,displacement:void 0!==n.displacement?n.displacement:[0,0],rotateWithView:a})||this).anchor_=void 0!==n.anchor?n.anchor:[.5,.5],i.normalizedAnchor_=null,i.anchorOrigin_=void 0!==n.anchorOrigin?n.anchorOrigin:or,i.anchorXUnits_=void 0!==n.anchorXUnits?n.anchorXUnits:Bn,i.anchorYUnits_=void 0!==n.anchorYUnits?n.anchorYUnits:Bn,i.crossOrigin_=void 0!==n.crossOrigin?n.crossOrigin:null;var l=void 0!==n.img?n.img:null,h=void 0!==n.imgSize?n.imgSize:null,u=n.src;wt(!(void 0!==u&&l),4),wt(!l||l&&h,5),void 0!==u&&0!==u.length||!l||(u=l.src||g(l)),wt(void 0!==u&&u.length>0,6);var c=void 0!==n.src?Fn:Dn;return i.color_=void 0!==n.color?Yn(n.color):null,i.iconImage_=function(t,e,i,n,r,o){var s=qn.get(e,n,o);return s||(s=new ir(t,e,i,n,r,o),qn.set(e,n,o,s)),s}(l,u,h,i.crossOrigin_,c,i.color_),i.offset_=void 0!==n.offset?n.offset:[0,0],i.offsetOrigin_=void 0!==n.offsetOrigin?n.offsetOrigin:or,i.origin_=null,i.size_=void 0!==n.size?n.size:null,i}return lr(e,t),e.prototype.clone=function(){return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:this.getScale(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},e.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var t=this.anchor_,e=this.getSize();if(this.anchorXUnits_==Bn||this.anchorYUnits_==Bn){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==Bn&&(t[0]*=e[0]),this.anchorYUnits_==Bn&&(t[1]*=e[1])}if(this.anchorOrigin_!=or){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=sr&&this.anchorOrigin_!=rr||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=nr&&this.anchorOrigin_!=rr||(t[1]=-t[1]+e[1])}return this.normalizedAnchor_=t,this.normalizedAnchor_},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getHitDetectionImageSize=function(){return this.getImageSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(t){return this.iconImage_.getHitDetectionImage(t)},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_,e=this.getDisplacement();if(this.offsetOrigin_!=or){var i=this.getSize(),n=this.iconImage_.getSize();if(!i||!n)return null;t=t.slice(),this.offsetOrigin_!=sr&&this.offsetOrigin_!=rr||(t[0]=n[0]-i[0]-t[0]),this.offsetOrigin_!=nr&&this.offsetOrigin_!=rr||(t[1]=n[1]-i[1]-t[1])}return t[0]+=e[0],t[1]+=e[1],this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(P,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(P,t)},e}(ar),ur="add",cr="remove",pr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),fr="length",dr=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.element=i,r.index=n,r}return pr(e,t),e}(R),_r=function(t){function e(e,i){var n=t.call(this)||this,r=i||{};if(n.unique_=!!r.unique,n.array_=e||[],n.unique_)for(var o=0,s=n.array_.length;o<s;++o)n.assertUnique_(n.array_[o],o);return n.updateLength_(),n}return pr(e,t),e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var e=0,i=t.length;e<i;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,i=0,n=e.length;i<n;++i)t(e[i],i,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(fr)},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new dr(ur,e,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},e.prototype.remove=function(t){for(var e=this.array_,i=0,n=e.length;i<n;++i)if(e[i]===t)return this.removeAt(i)},e.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new dr(cr,e,t)),e},e.prototype.setAt=function(t,e){var i=this.getLength();if(t<i){this.unique_&&this.assertUnique_(e,t);var n=this.array_[t];this.array_[t]=e,this.dispatchEvent(new dr(cr,n,t)),this.dispatchEvent(new dr(ur,e,t))}else{for(var r=i;r<t;++r)this.insertAt(r,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set(fr,this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var i=0,n=this.array_.length;i<n;++i)if(this.array_[i]===t&&i!==e)throw new Ct(58)},e}(U),gr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),yr=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.map=i,r.frameState=void 0!==n?n:null,r}return gr(e,t),e}(R),vr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),mr=function(t){function e(e,i,n,r,o){var s=t.call(this,e,i,o)||this;return s.originalEvent=n,s.pixel_=null,s.coordinate_=null,s.dragging=void 0!==r&&r,s}return vr(e,t),Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!0,configurable:!0}),e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),this.originalEvent.stopPropagation()},e}(yr),xr=(i(387),{SINGLECLICK:"singleclick",CLICK:F,DBLCLICK:A,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}),Sr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Cr=function(t){function e(e,i,n,r,o){var s=t.call(this,e,i,n,r,o)||this;return s.pointerEvent=n,s}return Sr(e,t),e}(mr),wr="pointermove",Er="pointerdown",br=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Tr=function(t){function e(e,i){var n=t.call(this,e)||this;n.map_=e,n.clickTimeoutId_,n.dragging_=!1,n.dragListenerKeys_=[],n.moveTolerance_=i?i*$:$,n.down_=null;var r=n.map_.getViewport();return n.activePointers_=0,n.trackedTouches_={},n.element_=r,n.pointerdownListenerKey_=C(r,Er,n.handlePointerDown_,n),n.originalPointerMoveEvent_,n.relayedListenerKey_=C(r,wr,n.relayEvent_,n),n.boundHandleTouchMove_=n.handleTouchMove_.bind(n),n.element_.addEventListener(z,n.boundHandleTouchMove_,!!it&&{passive:!1}),n}return br(e,t),e.prototype.emulateClick_=function(t){var e=new Cr(xr.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new Cr(xr.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new Cr(xr.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t;e.type==xr.POINTERUP||e.type==xr.POINTERCANCEL?delete this.trackedTouches_[e.pointerId]:e.type==xr.POINTERDOWN&&(this.trackedTouches_[e.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new Cr(xr.POINTERUP,this.map_,t);this.dispatchEvent(e),e.propagationStopped||this.dragging_||!this.isMouseActionButton_(t)||this.emulateClick_(this.down_),0===this.activePointers_&&(this.dragListenerKeys_.forEach(E),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},e.prototype.isMouseActionButton_=function(t){return 0===t.button},e.prototype.handlePointerDown_=function(t){this.updateActivePointers_(t);var e=new Cr(xr.POINTERDOWN,this.map_,t);this.dispatchEvent(e),this.down_=t,0===this.dragListenerKeys_.length&&this.dragListenerKeys_.push(C(document,xr.POINTERMOVE,this.handlePointerMove_,this),C(document,xr.POINTERUP,this.handlePointerUp_,this),C(this.element_,xr.POINTERCANCEL,this.handlePointerUp_,this))},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var e=new Cr(xr.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(e)}},e.prototype.relayEvent_=function(t){this.originalPointerMoveEvent_=t;var e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new Cr(t.type,this.map_,t,e))},e.prototype.handleTouchMove_=function(t){this.originalPointerMoveEvent_&&!this.originalPointerMoveEvent_.defaultPrevented||t.preventDefault()},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(E(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(z,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(E(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(E),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(O),Rr="layergroup",Ir="size",Or="target",Pr="view",Mr="prerender",Lr="postrender",Fr="precompose",Ar="postcompose",Dr="rendercomplete",kr=0,jr=1,Gr=2,zr=3,Wr=4,Xr=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,m(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var n=this.keyFunction_(i);return delete this.queuedElements_[n],i},t.prototype.enqueue=function(t){wt(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=1/0&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},t.prototype.getCount=function(){return this.elements_.length},t.prototype.getLeftChildIndex_=function(t){return 2*t+1},t.prototype.getRightChildIndex_=function(t){return 2*t+2},t.prototype.getParentIndex_=function(t){return t-1>>1},t.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},t.prototype.isEmpty=function(){return 0===this.elements_.length},t.prototype.isKeyQueued=function(t){return t in this.queuedElements_},t.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},t.prototype.siftUp_=function(t){for(var e=this.elements_,i=this.priorities_,n=e.length,r=e[t],o=i[t],s=t;t<n>>1;){var a=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),h=l<n&&i[l]<i[a]?l:a;e[t]=e[h],i[t]=i[h],t=h}e[t]=r,i[t]=o,this.siftDown_(s,t)},t.prototype.siftDown_=function(t,e){for(var i=this.elements_,n=this.priorities_,r=i[e],o=n[e];e>t;){var s=this.getParentIndex_(e);if(!(n[s]>o))break;i[e]=i[s],n[e]=n[s],e=s}i[e]=r,n[e]=o},t.prototype.reprioritize=function(){var t,e,i,n=this.priorityFunction_,r=this.elements_,o=this.priorities_,s=0,a=r.length;for(e=0;e<a;++e)(i=n(t=r[e]))==1/0?delete this.queuedElements_[this.keyFunction_(t)]:(o[s]=i,r[s++]=t);r.length=s,o.length=s,this.heapify_()},t}(),Kr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Yr=function(t){function e(e,i){var n=t.call(this,(function(t){return e.apply(null,t)}),(function(t){return t[0].getKey()}))||this;return n.boundHandleTileChange_=n.handleTileChange.bind(n),n.tileChangeCallback_=i,n.tilesLoading_=0,n.tilesLoadingKeys_={},n}return Kr(e,t),e.prototype.enqueue=function(e){var i=t.prototype.enqueue.call(this,e);i&&e[0].addEventListener(P,this.boundHandleTileChange_);return i},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,i=e.getState();if(e.hifi&&i===Gr||i===zr||i===Wr){e.removeEventListener(P,this.boundHandleTileChange_);var n=e.getKey();n in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[n],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,e){for(var i,n,r=0;this.tilesLoading_<t&&r<e&&this.getCount()>0;)n=(i=this.dequeue()[0]).getKey(),i.getState()!==kr||n in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[n]=!0,++this.tilesLoading_,++r,i.load())},e}(Xr);function Nr(t,e,i){return function(n,r,o,s){if(n){var a=e?0:o[0]*r,l=e?0:o[1]*r,h=t[0]+a/2,u=t[2]-a/2,c=t[1]+l/2,p=t[3]-l/2;h>u&&(u=h=(u+h)/2),c>p&&(p=c=(p+c)/2);var f=Et(n[0],h,u),d=Et(n[1],c,p),_=30*r;return s&&i&&(f+=-_*Math.log(1+Math.max(0,h-n[0])/_)+_*Math.log(1+Math.max(0,n[0]-u)/_),d+=-_*Math.log(1+Math.max(0,c-n[1])/_)+_*Math.log(1+Math.max(0,n[1]-p)/_)),[f,d]}}}function Zr(t){return t}function Br(t,e,i,n){var r=Ee(e)/i[0],o=xe(e)/i[1];return n?Math.min(t,Math.max(r,o)):Math.min(t,Math.min(r,o))}function Vr(t,e,i){var n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(n=Math.max(n,i),n/=Math.log(1+50*Math.max(0,i/t-1))/50+1),Et(n,i/2,2*e)}function Ur(t,e,i,n,r){return function(o,s,a,l){if(void 0!==o){var h=n?Br(t,n,a,r):t;return(void 0===i||i)&&l?Vr(o,h,e):Et(o,e,h)}}}function Hr(t){return void 0!==t?0:void 0}function qr(t){return void 0!==t?t:void 0}var Jr=0,Qr=1,$r="center",to="resolution",eo="rotation";function io(t,e){for(var i=!0,n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function no(t,e){var i=Math.cos(e),n=Math.sin(e),r=t[0]*i-t[1]*n,o=t[1]*i+t[0]*n;return t[0]=r,t[1]=o,t}function ro(t,e){var i=e.getExtent();if(e.canWrapX()&&(t[0]<i[0]||t[0]>=i[2])){var n=Ee(i),r=Math.floor((t[0]-i[0])/n);t[0]-=r*n}return t}var oo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function so(t,e){setTimeout((function(){t(e)}),0)}function ao(t){return!(t.sourceCenter&&t.targetCenter&&!io(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}var lo=function(t){function e(e){var i=t.call(this)||this,n=v({},e);return i.hints_=[0,0],i.animations_=[],i.updateAnimationKey_,i.projection_=ti(n.projection,"EPSG:3857"),i.viewportSize_=[100,100],i.targetCenter_=null,i.targetResolution_,i.targetRotation_,i.cancelAnchor_=void 0,n.center&&(n.center=pi(n.center,i.projection_)),n.extent&&(n.extent=di(n.extent,i.projection_)),i.applyOptions_(n),i}return oo(e,t),e.prototype.applyOptions_=function(t){var e=function(t){var e,i,n,o=void 0!==t.minZoom?t.minZoom:0,s=void 0!==t.maxZoom?t.maxZoom:28,a=void 0!==t.zoomFactor?t.zoomFactor:2,l=void 0!==t.multiWorld&&t.multiWorld,h=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,u=void 0!==t.showFullExtent&&t.showFullExtent,c=ti(t.projection,"EPSG:3857"),p=c.getExtent(),f=t.constrainOnlyCenter,d=t.extent;l||d||!c.isGlobal()||(f=!1,d=p);if(void 0!==t.resolutions){var _=t.resolutions;i=_[o],n=void 0!==_[s]?_[s]:_[_.length-1],e=t.constrainResolution?function(t,e,i,n){return function(o,s,a,l){if(void 0!==o){var h=t[0],u=t[t.length-1],c=i?Br(h,i,a,n):h;if(l)return void 0===e||e?Vr(o,c,u):Et(o,u,c);var p=Math.min(c,o),f=Math.floor(r(t,p,s));return t[f]>c&&f<t.length-1?t[f+1]:t[f]}}}(_,h,!f&&d,u):Ur(i,n,h,!f&&d,u)}else{var g=(p?Math.max(Ee(p),xe(p)):360*Oe[Pe.DEGREES]/c.getMetersPerUnit())/256/Math.pow(2,0),y=g/Math.pow(2,28);void 0!==(i=t.maxResolution)?o=0:i=g/Math.pow(a,o),void 0===(n=t.minResolution)&&(n=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(a,s):g/Math.pow(a,s):y),s=o+Math.floor(Math.log(i/n)/Math.log(a)),n=i/Math.pow(a,s-o),e=t.constrainResolution?function(t,e,i,n,r,o){return function(s,a,l,h){if(void 0!==s){var u=r?Br(e,r,l,o):e,c=void 0!==i?i:0;if(h)return void 0===n||n?Vr(s,u,c):Et(s,c,u);var p=Math.ceil(Math.log(e/u)/Math.log(t)-1e-9),f=-a*(.5-1e-9)+.5,d=Math.min(u,s),_=Math.floor(Math.log(e/d)/Math.log(t)+f),g=Math.max(p,_);return Et(e/Math.pow(t,g),c,u)}}}(a,i,n,h,!f&&d,u):Ur(i,n,h,!f&&d,u)}return{constraint:e,maxResolution:i,minResolution:n,minZoom:o,zoomFactor:a}}(t);this.maxResolution_=e.maxResolution,this.minResolution_=e.minResolution,this.zoomFactor_=e.zoomFactor,this.resolutions_=t.resolutions,this.minZoom_=e.minZoom;var i=function(t){if(void 0!==t.extent){var e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return Nr(t.extent,t.constrainOnlyCenter,e)}var i=ti(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&i.isGlobal()){var n=i.getExtent().slice();return n[0]=-1/0,n[2]=1/0,Nr(n,!1,!1)}return Zr}(t),n=e.constraint,o=function(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?(o=r||It(5),function(t,e){return e?t:void 0!==t?Math.abs(t)<=o?0:t:void 0}):!1===e?qr:"number"==typeof e?(i=e,n=2*Math.PI/i,function(t,e){return e?t:void 0!==t?t=Math.floor(t/n+.5)*n:void 0}):qr}return Hr;var i,n;var r,o}(t);this.constraints_={center:i,resolution:n,rotation:o},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom),this.setProperties({}),this.options_=t},e.prototype.getUpdatedOptions_=function(t){var e=v({},this.options_);return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),v({},e,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var e=new Array(arguments.length),i=0;i<e.length;++i){var n=arguments[i];n.center&&((n=v({},n)).center=pi(n.center,this.getProjection())),n.anchor&&((n=v({},n)).anchor=pi(n.anchor,this.getProjection())),e[i]=n}this.animateInternal.apply(this,e)},e.prototype.animateInternal=function(t){var e,i=arguments.length;if(i>1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i),!this.isDef()){var n=arguments[i-1];return n.center&&this.setCenterInternal(n.center),void 0!==n.zoom&&this.setZoom(n.zoom),void 0!==n.rotation&&this.setRotation(n.rotation),void(e&&so(e,!0))}for(var r=Date.now(),o=this.targetCenter_.slice(),s=this.targetResolution_,a=this.targetRotation_,l=[],h=0;h<i;++h){var u=arguments[h],c={start:r,complete:!1,anchor:u.anchor,duration:void 0!==u.duration?u.duration:1e3,easing:u.easing||gt,callback:e};if(u.center&&(c.sourceCenter=o,c.targetCenter=u.center.slice(),o=c.targetCenter),void 0!==u.zoom?(c.sourceResolution=s,c.targetResolution=this.getResolutionForZoom(u.zoom),s=c.targetResolution):u.resolution&&(c.sourceResolution=s,c.targetResolution=u.resolution,s=c.targetResolution),void 0!==u.rotation){c.sourceRotation=a;var p=Ot(u.rotation-a+Math.PI,2*Math.PI)-Math.PI;c.targetRotation=a+p,a=c.targetRotation}ao(c)?c.complete=!0:r+=c.duration,l.push(c)}this.animations_.push(l),this.setHint(Jr,1),this.updateAnimations_()},e.prototype.getAnimating=function(){return this.hints_[Jr]>0},e.prototype.getInteracting=function(){return this.hints_[Qr]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(Jr,-this.hints_[Jr]);for(var e=0,i=this.animations_.length;e<i;++e){var n=this.animations_[e];if(n[0].callback&&so(n[0].callback,!1),!t)for(var r=0,o=n.length;r<o;++r){var s=n[r];if(!s.complete){t=s.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t},e.prototype.updateAnimations_=function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var t=Date.now(),e=!1,i=this.animations_.length-1;i>=0;--i){for(var n=this.animations_[i],r=!0,o=0,s=n.length;o<s;++o){var a=n[o];if(!a.complete){var l=t-a.start,h=a.duration>0?l/a.duration:1;h>=1?(a.complete=!0,h=1):r=!1;var u=a.easing(h);if(a.sourceCenter){var c=a.sourceCenter[0],p=a.sourceCenter[1],f=c+u*(a.targetCenter[0]-c),d=p+u*(a.targetCenter[1]-p);this.targetCenter_=[f,d]}if(a.sourceResolution&&a.targetResolution){var _=1===u?a.targetResolution:a.sourceResolution+u*(a.targetResolution-a.sourceResolution);if(a.anchor){var g=this.getViewportSize_(this.getRotation()),y=this.constraints_.resolution(_,0,g,!0);this.targetCenter_=this.calculateCenterZoom(y,a.anchor)}this.targetResolution_=_,this.applyTargetState_(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var v=1===u?Ot(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+u*(a.targetRotation-a.sourceRotation);if(a.anchor){var m=this.constraints_.rotation(v,!0);this.targetCenter_=this.calculateCenterRotate(m,a.anchor)}this.targetRotation_=v}if(this.applyTargetState_(!0),e=!0,!a.complete)break}}if(r){this.animations_[i]=null,this.setHint(Jr,-1);var x=n[0].callback;x&&so(x,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,e){var i,n,r,o=this.getCenterInternal();return void 0!==o&&(no(i=[o[0]-e[0],o[1]-e[1]],t-this.getRotation()),r=e,(n=i)[0]+=+r[0],n[1]+=+r[1]),i},e.prototype.calculateCenterZoom=function(t,e){var i,n=this.getCenterInternal(),r=this.getResolution();void 0!==n&&void 0!==r&&(i=[e[0]-t*(e[0]-n[0])/r,e[1]-t*(e[1]-n[1])/r]);return i},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t?ci(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get($r)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.options_.constrainResolution},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){return fi(this.calculateExtentInternal(t),this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSize_(),i=this.getCenterInternal();wt(i,1);var n=this.getResolution();wt(void 0!==n,2);var r=this.getRotation();return wt(void 0!==r,3),me(i,n,r,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(to)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(di(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var i=e||this.getViewportSize_(),n=Ee(t)/i[0],r=xe(t)/i[1];return Math.max(n,r)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(i/n)/Math.log(e);return function(t){return i/Math.pow(e,t*r)}},e.prototype.getRotation=function(){return this.get(eo)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(i/n)/e;return function(t){return Math.log(i/t)/e/r}},e.prototype.getState=function(){var t=this.getCenterInternal(),e=this.getProjection(),i=this.getResolution(),n=this.getRotation();return{center:t.slice(0),projection:void 0!==e?e:null,resolution:i,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,i,n=this.minZoom_||0;if(this.resolutions_){var o=r(this.resolutions_,t,1);n=o,e=this.resolutions_[o],i=o==this.resolutions_.length-1?2:e/this.resolutions_[o+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=Et(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,Et(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var i,n=v({size:this.getViewportSize_()},e||{});if(wt(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))wt(!Te(t),25),i=wn(r=di(t,this.getProjection()));else if(t.getType()===zt){var r;(i=wn(r=di(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),ye(r))}else{var o=ui();i=o?t.clone().transform(o,this.getProjection()):t}this.fitInternal(i,n)},e.prototype.fitInternal=function(t,e){var i=e||{},n=i.size;n||(n=this.getViewportSize_());var r,o=void 0!==i.padding?i.padding:[0,0,0,0],s=void 0!==i.nearest&&i.nearest;r=void 0!==i.minResolution?i.minResolution:void 0!==i.maxZoom?this.getResolutionForZoom(i.maxZoom):0;for(var a=t.getFlatCoordinates(),l=this.getRotation(),h=Math.cos(-l),c=Math.sin(-l),p=1/0,f=1/0,d=-1/0,_=-1/0,g=t.getStride(),y=0,v=a.length;y<v;y+=g){var m=a[y]*h-a[y+1]*c,x=a[y]*c+a[y+1]*h;p=Math.min(p,m),f=Math.min(f,x),d=Math.max(d,m),_=Math.max(_,x)}var S=this.getResolutionForExtentInternal([p,f,d,_],[n[0]-o[1]-o[3],n[1]-o[0]-o[2]]);S=isNaN(S)?r:Math.max(S,r),S=this.getConstrainedResolution(S,s?0:1),c=-c;var C=(p+d)/2,w=(f+_)/2,E=[(C+=(o[1]-o[3])/2*S)*h-(w+=(o[0]-o[2])/2*S)*c,w*h+C*c],b=i.callback?i.callback:u;void 0!==i.duration?this.animateInternal({resolution:S,center:this.getConstrainedCenter(E,S),duration:i.duration,easing:i.easing},b):(this.targetResolution_=S,this.targetCenter_=E,this.applyTargetState_(!1,!0),so(b,!0))},e.prototype.centerOn=function(t,e,i){this.centerOnInternal(pi(t,this.getProjection()),e,i)},e.prototype.centerOnInternal=function(t,e,i){var n=this.getRotation(),r=Math.cos(-n),o=Math.sin(-n),s=t[0]*r-t[1]*o,a=t[1]*r+t[0]*o,l=this.getResolution(),h=(s+=(e[0]/2-i[0])*l)*r-(a+=(i[1]-e[1]/2)*l)*(o=-o),u=a*r+s*o;this.setCenterInternal([h,u])},e.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},e.prototype.adjustCenter=function(t){var e=ci(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustCenterInternal=function(t){var e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustResolution=function(t,e){var i=e&&pi(e,this.getProjection());this.adjustResolutionInternal(t,i)},e.prototype.adjustResolutionInternal=function(t,e){var i=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),r=this.constraints_.resolution(this.targetResolution_*t,0,n,i);e&&(this.targetCenter_=this.calculateCenterZoom(r,e)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)},e.prototype.adjustRotation=function(t,e){e&&(e=pi(e,this.getProjection())),this.adjustRotationInternal(t,e)},e.prototype.adjustRotationInternal=function(t,e){var i=this.getAnimating()||this.getInteracting(),n=this.constraints_.rotation(this.targetRotation_+t,i);e&&(this.targetCenter_=this.calculateCenterRotate(n,e)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal(pi(t,this.getProjection()))},e.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,e){var i=this.getAnimating()||this.getInteracting()||e,n=this.constraints_.rotation(this.targetRotation_,i),r=this.getViewportSize_(n),o=this.constraints_.resolution(this.targetResolution_,0,r,i),s=this.constraints_.center(this.targetCenter_,o,r,i);this.get(eo)!==n&&this.set(eo,n),this.get(to)!==o&&this.set(to,o),this.get($r)&&io(this.get($r),s)||this.set($r,s),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,e,i){var n=void 0!==t?t:200,r=e||0,o=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(o),a=this.constraints_.resolution(this.targetResolution_,r,s),l=this.constraints_.center(this.targetCenter_,a,s);if(0===n&&!this.cancelAnchor_)return this.targetResolution_=a,this.targetRotation_=o,this.targetCenter_=l,void this.applyTargetState_();var h=i||(0===n?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,this.getResolution()===a&&this.getRotation()===o&&this.getCenterInternal()&&io(this.getCenterInternal(),l)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:l,resolution:a,duration:n,easing:_t,anchor:h}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(Qr,1)},e.prototype.endInteraction=function(t,e,i){var n=i&&pi(i,this.getProjection());this.endInteractionInternal(t,e,n)},e.prototype.endInteractionInternal=function(t,e,i){this.setHint(Qr,-1),this.resolveConstraints(t,e,i)},e.prototype.getConstrainedCenter=function(t,e){var i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),i)},e.prototype.getConstrainedZoom=function(t,e){var i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,e))},e.prototype.getConstrainedResolution=function(t,e){var i=e||0,n=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,i,n)},e}(U),ho="opacity",uo="visible",co="extent",po="zIndex",fo="maxResolution",_o="minResolution",go="maxZoom",yo="minZoom",vo="source",mo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),xo=function(t){function e(e){var i=t.call(this)||this,n=v({},e);return n[ho]=void 0!==e.opacity?e.opacity:1,wt("number"==typeof n[ho],64),n[uo]=void 0===e.visible||e.visible,n[po]=e.zIndex,n[fo]=void 0!==e.maxResolution?e.maxResolution:1/0,n[_o]=void 0!==e.minResolution?e.minResolution:0,n[yo]=void 0!==e.minZoom?e.minZoom:-1/0,n[go]=void 0!==e.maxZoom?e.maxZoom:1/0,i.className_=void 0!==n.className?e.className:"ol-layer",delete n.className,i.setProperties(n),i.state_=null,i}return mo(e,t),e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=Et(Math.round(100*this.getOpacity())/100,0,1),e.sourceState=this.getSourceState(),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i?i:!1===e.managed?1/0:0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e},e.prototype.getLayersArray=function(t){return d()},e.prototype.getLayerStatesArray=function(t){return d()},e.prototype.getExtent=function(){return this.get(co)},e.prototype.getMaxResolution=function(){return this.get(fo)},e.prototype.getMinResolution=function(){return this.get(_o)},e.prototype.getMinZoom=function(){return this.get(yo)},e.prototype.getMaxZoom=function(){return this.get(go)},e.prototype.getOpacity=function(){return this.get(ho)},e.prototype.getSourceState=function(){return d()},e.prototype.getVisible=function(){return this.get(uo)},e.prototype.getZIndex=function(){return this.get(po)},e.prototype.setExtent=function(t){this.set(co,t)},e.prototype.setMaxResolution=function(t){this.set(fo,t)},e.prototype.setMinResolution=function(t){this.set(_o,t)},e.prototype.setMaxZoom=function(t){this.set(go,t)},e.prototype.setMinZoom=function(t){this.set(yo,t)},e.prototype.setOpacity=function(t){wt("number"==typeof t,64),this.set(ho,t)},e.prototype.setVisible=function(t){this.set(uo,t)},e.prototype.setZIndex=function(t){this.set(po,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(U),So="undefined",Co="ready",wo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Eo="layers",bo=function(t){function e(e){var i=this,n=e||{},r=v({},n);delete r.layers;var o=n.layers;return(i=t.call(this,r)||this).layersListenerKeys_=[],i.listenerKeys_={},i.addEventListener(V(Eo),i.handleLayersChanged_),o?Array.isArray(o)?o=new _r(o.slice(),{unique:!0}):wt("function"==typeof o.getArray,43):o=new _r(void 0,{unique:!0}),i.setLayers(o),i}return wo(e,t),e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(E),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push(C(t,ur,this.handleLayersAdd_,this),C(t,cr,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(E);m(this.listenerKeys_);for(var i=t.getArray(),n=0,r=i.length;n<r;n++){var o=i[n];this.listenerKeys_[g(o)]=[C(o,y,this.handleLayerChange_,this),C(o,P,this.handleLayerChange_,this)]}this.changed()},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.listenerKeys_[g(e)]=[C(e,y,this.handleLayerChange_,this),C(e,P,this.handleLayerChange_,this)],this.changed()},e.prototype.handleLayersRemove_=function(t){var e=g(t.element);this.listenerKeys_[e].forEach(E),delete this.listenerKeys_[e],this.changed()},e.prototype.getLayers=function(){return this.get(Eo)},e.prototype.setLayers=function(t){this.set(Eo,t)},e.prototype.getLayersArray=function(t){var e=void 0!==t?t:[];return this.getLayers().forEach((function(t){t.getLayersArray(e)})),e},e.prototype.getLayerStatesArray=function(t){var e=void 0!==t?t:[],i=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));for(var n=this.getLayerState(),r=i,o=e.length;r<o;r++){var s=e[r];s.opacity*=n.opacity,s.visible=s.visible&&n.visible,s.maxResolution=Math.min(s.maxResolution,n.maxResolution),s.minResolution=Math.max(s.minResolution,n.minResolution),s.minZoom=Math.max(s.minZoom,n.minZoom),s.maxZoom=Math.min(s.maxZoom,n.maxZoom),void 0!==n.extent&&(void 0!==s.extent?s.extent=Se(s.extent,n.extent):s.extent=n.extent)}return e},e.prototype.getSourceState=function(){return Co},e}(xo);function To(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}var Ro=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();var Io=function(t){function e(e){var i=t.call(this)||this,n=function(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var i,n,r,o={},s=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new bo({layers:t.layers});o[Rr]=s,o[Or]=t.target,o[Pr]=void 0!==t.view?t.view:new lo,void 0!==t.controls&&(Array.isArray(t.controls)?i=new _r(t.controls.slice()):(wt("function"==typeof t.controls.getArray,47),i=t.controls));void 0!==t.interactions&&(Array.isArray(t.interactions)?n=new _r(t.interactions.slice()):(wt("function"==typeof t.interactions.getArray,48),n=t.interactions));void 0!==t.overlays?Array.isArray(t.overlays)?r=new _r(t.overlays.slice()):(wt("function"==typeof t.overlays.getArray,49),r=t.overlays):r=new _r;return{controls:i,interactions:n,keyboardEventTarget:e,overlays:r,values:o}}(e);i.boundHandleBrowserEvent_=i.handleBrowserEvent.bind(i),i.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,i.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:$,i.postRenderTimeoutHandle_,i.animationDelayKey_,i.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(i),i.coordinateToPixelTransform_=[1,0,0,1,0,0],i.pixelToCoordinateTransform_=[1,0,0,1,0,0],i.frameIndex_=0,i.frameState_=null,i.previousExtent_=null,i.viewPropertyListenerKey_=null,i.viewChangeListenerKey_=null,i.layerGroupPropertyListenerKeys_=null,i.viewport_=document.createElement("div"),i.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),i.viewport_.style.position="relative",i.viewport_.style.overflow="hidden",i.viewport_.style.width="100%",i.viewport_.style.height="100%",i.overlayContainer_=document.createElement("div"),i.overlayContainer_.style.position="absolute",i.overlayContainer_.style.zIndex="0",i.overlayContainer_.style.width="100%",i.overlayContainer_.style.height="100%",i.overlayContainer_.className="ol-overlaycontainer",i.viewport_.appendChild(i.overlayContainer_),i.overlayContainerStopEvent_=document.createElement("div"),i.overlayContainerStopEvent_.style.position="absolute",i.overlayContainerStopEvent_.style.zIndex="0",i.overlayContainerStopEvent_.style.width="100%",i.overlayContainerStopEvent_.style.height="100%",i.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",i.viewport_.appendChild(i.overlayContainerStopEvent_),i.mapBrowserEventHandler_=new Tr(i,e.moveTolerance);var r=i.handleMapBrowserEvent.bind(i);for(var o in xr)i.mapBrowserEventHandler_.addEventListener(xr[o],r);i.keyboardEventTarget_=n.keyboardEventTarget,i.keyHandlerKeys_=null;var s=i.handleBrowserEvent.bind(i);return i.viewport_.addEventListener(L,s,!1),i.viewport_.addEventListener(W,s,!!it&&{passive:!1}),i.controls=n.controls||new _r,i.interactions=n.interactions||new _r,i.overlays_=n.overlays,i.overlayIdIndex_={},i.renderer_=null,i.handleResize_,i.postRenderFunctions_=[],i.tileQueue_=new Yr(i.getTilePriority.bind(i),i.handleTileChange_.bind(i)),i.addEventListener(V(Rr),i.handleLayerGroupChanged_),i.addEventListener(V(Pr),i.handleViewChanged_),i.addEventListener(V(Ir),i.handleSizeChanged_),i.addEventListener(V(Or),i.handleTargetChanged_),i.setProperties(n.values),i.controls.forEach(function(t){t.setMap(this)}.bind(i)),i.controls.addEventListener(ur,function(t){t.element.setMap(this)}.bind(i)),i.controls.addEventListener(cr,function(t){t.element.setMap(null)}.bind(i)),i.interactions.forEach(function(t){t.setMap(this)}.bind(i)),i.interactions.addEventListener(ur,function(t){t.element.setMap(this)}.bind(i)),i.interactions.addEventListener(cr,function(t){t.element.setMap(null)}.bind(i)),i.overlays_.forEach(i.addOverlayInternal_.bind(i)),i.overlays_.addEventListener(ur,function(t){this.addOverlayInternal_(t.element)}.bind(i)),i.overlays_.addEventListener(cr,function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)}.bind(i)),i}return Ro(e,t),e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.mapBrowserEventHandler_.dispose(),this.viewport_.removeEventListener(L,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(W,this.boundHandleBrowserEvent_),void 0!==this.handleResize_&&(removeEventListener(G,this.handleResize_,!1),this.handleResize_=void 0),this.setTarget(null),t.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,e,i){if(this.frameState_){var n=this.getCoordinateFromPixelInternal(t),r=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance*this.frameState_.pixelRatio:0,o=void 0!==i.layerFilter?i.layerFilter:l,s=!1!==i.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,r,s,e,null,o,null)}},e.prototype.getFeaturesAtPixel=function(t,e){var i=[];return this.forEachFeatureAtPixel(t,(function(t){i.push(t)}),e),i},e.prototype.forEachLayerAtPixel=function(t,e,i){if(this.frameState_){var n=i||{},r=void 0!==n.hitTolerance?n.hitTolerance*this.frameState_.pixelRatio:0,o=n.layerFilter||l;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,r,e,o)}},e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_)return!1;var i=this.getCoordinateFromPixelInternal(t),n=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:l,r=void 0!==e.hitTolerance?e.hitTolerance*this.frameState_.pixelRatio:0,o=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,r,o,n,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var e=this.viewport_.getBoundingClientRect(),i="changedTouches"in t?t.changedTouches[0]:t;return[i.clientX-e.left,i.clientY-e.top]},e.prototype.getTarget=function(){return this.get(Or)},e.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){return ci(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var e=this.frameState_;return e?Li(e.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get(Rr)},e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},e.prototype.getLoading=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,i=t.length;e<i;++e){var n=t[e].layer.getSource();if(n&&n.loading)return!0}return!1},e.prototype.getPixelFromCoordinate=function(t){var e=pi(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)},e.prototype.getPixelFromCoordinateInternal=function(t){var e=this.frameState_;return e?Li(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(Ir)},e.prototype.getView=function(){return this.get(Pr)},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getTilePriority=function(t,e,i,n){return function(t,e,i,n,r){if(!(t&&i in t.wantedTiles))return 1/0;if(!t.wantedTiles[i][e.getKey()])return 1/0;var o=t.viewState.center,s=n[0]-o[0],a=n[1]-o[1];return 65536*Math.log(r)+Math.sqrt(s*s+a*a)/r}(this.frameState_,t,e,i,n)},e.prototype.handleBrowserEvent=function(t,e){var i=e||t.type,n=new mr(i,this,t);this.handleMapBrowserEvent(n)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var e=t.originalEvent.target;if(t.dragging||!this.overlayContainerStopEvent_.contains(e)&&(document.body.contains(e)||this.viewport_.getRootNode&&this.viewport_.getRootNode().contains(e))){t.frameState=this.frameState_;var i=this.getInteractions().getArray();if(!1!==this.dispatchEvent(t))for(var n=i.length-1;n>=0;n--){var r=i[n];if(r.getActive())if(!r.handleEvent(t))break}}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var i=this.maxTilesLoading_,n=i;if(t){var r=t.viewHints;if(r[Jr]||r[Qr]){var o=!et&&Date.now()-t.time>8;i=o?0:8,n=o?0:2}}e.getTilesLoading()<i&&(e.reprioritize(),e.loadMoreTiles(i,n))}!t||!this.hasListener(Dr)||t.animate||this.tileQueue_.getTilesLoading()||this.getLoading()||this.renderer_.dispatchRenderEvent(Dr,t);for(var s=this.postRenderFunctions_,a=0,l=s.length;a<l;++a)s[a](this,t);s.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(){var t;if(this.getTarget()&&(t=this.getTargetElement()),this.keyHandlerKeys_){for(var e=0,i=this.keyHandlerKeys_.length;e<i;++e)E(this.keyHandlerKeys_[e]);this.keyHandlerKeys_=null}if(t){t.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer());var n=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.keyHandlerKeys_=[C(n,D,this.handleBrowserEvent,this),C(n,k,this.handleBrowserEvent,this)],this.handleResize_||(this.handleResize_=this.updateSize.bind(this),window.addEventListener(G,this.handleResize_,!1))}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0),at(this.viewport_),void 0!==this.handleResize_&&(removeEventListener(G,this.handleResize_,!1),this.handleResize_=void 0);this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&(E(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(E(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=C(t,y,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=C(t,P,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(E),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.layerGroupPropertyListenerKeys_=[C(t,y,this.render,this),C(t,P,this.render,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,i=t.length;e<i;++e){var n=t[e].layer;n.hasRenderer()&&n.getRenderer().handleFontsChanged()}},e.prototype.render=function(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){return this.getLayerGroup().getLayers().remove(t)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var e=this.getSize(),i=this.getView(),n=this.frameState_,r=null;if(void 0!==e&&function(t){return t[0]>0&&t[1]>0}(e)&&i&&i.isDef()){var o=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),s=i.getState();r={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterItems:n?n.declutterItems:[],extent:me(s.center,s.resolution,s.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:s,viewHints:o,wantedTiles:{}}}if(this.frameState_=r,this.renderer_.renderFrame(r),r){if(r.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,r.postRenderFunctions),n)(!this.previousExtent_||!Te(this.previousExtent_)&&!le(r.extent,this.previousExtent_))&&(this.dispatchEvent(new yr(p,this,n)),this.previousExtent_=ae(this.previousExtent_));this.previousExtent_&&!r.viewHints[Jr]&&!r.viewHints[Qr]&&!le(r.extent,this.previousExtent_)&&(this.dispatchEvent(new yr(f,this,r)),$t(r.extent,this.previousExtent_))}this.dispatchEvent(new yr(c,this,r)),this.postRenderTimeoutHandle_=setTimeout(this.handlePostRender.bind(this),0)},e.prototype.setLayerGroup=function(t){this.set(Rr,t)},e.prototype.setSize=function(t){this.set(Ir,t)},e.prototype.setTarget=function(t){this.set(Or,t)},e.prototype.setView=function(t){this.set(Pr,t)},e.prototype.updateSize=function(){var t=this.getTargetElement();if(t){var e=getComputedStyle(t);this.setSize([t.offsetWidth-parseFloat(e.borderLeftWidth)-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)-parseFloat(e.borderRightWidth),t.offsetHeight-parseFloat(e.borderTopWidth)-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom)-parseFloat(e.borderBottomWidth)])}else this.setSize(void 0);this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var e=void 0,i=getComputedStyle(this.viewport_);i.width&&i.height&&(e=[parseInt(i.width,10),parseInt(i.height,10)]),t.setViewportSize(e)}},e}(U),Oo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Po(t,e){if(!t.visible)return!1;var i=e.resolution;if(i<t.minResolution||i>=t.maxResolution)return!1;var n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}var Mo=function(t){function e(e){var i=this,n=v({},e);delete n.source,(i=t.call(this,n)||this).mapPrecomposeKey_=null,i.mapRenderKey_=null,i.sourceChangeKey_=null,i.renderer_=null,e.render&&(i.render=e.render),e.map&&i.setMap(e.map),i.addEventListener(V(vo),i.handleSourcePropertyChange_);var r=e.source?e.source:null;return i.setSource(r),i}return Oo(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(vo)||null},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():So},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(E(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=C(t,P,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_.getFeatures(t)},e.prototype.render=function(t,e){var i=this.getRenderer();if(i.prepareFrame(t))return i.renderFrame(t,e)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(E(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(E(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=C(t,Fr,(function(t){var e=t.frameState.layerStatesArray,i=this.getLayerState(!1);wt(!e.some((function(t){return t.layer===i.layer})),67),e.push(i)}),this),this.mapRenderKey_=C(this,P,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(vo,t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.setSource(null),t.prototype.disposeInternal.call(this)},e}(xo),Lo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Fo(t){this.updateElement_(t.frameState)}var Ao=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,{element:document.createElement("div"),render:n.render||Fo,target:n.target})||this).ulElement_=document.createElement("ul"),i.collapsed_=void 0===n.collapsed||n.collapsed,i.overrideCollapsible_=void 0!==n.collapsible,i.collapsible_=void 0===n.collapsible||n.collapsible,i.collapsible_||(i.collapsed_=!1);var r=void 0!==n.className?n.className:"ol-attribution",o=void 0!==n.tipLabel?n.tipLabel:"Attributions",s=void 0!==n.collapseLabel?n.collapseLabel:"»";"string"==typeof s?(i.collapseLabel_=document.createElement("span"),i.collapseLabel_.textContent=s):i.collapseLabel_=s;var a=void 0!==n.label?n.label:"i";"string"==typeof a?(i.label_=document.createElement("span"),i.label_.textContent=a):i.label_=a;var l=i.collapsible_&&!i.collapsed_?i.collapseLabel_:i.label_,h=document.createElement("button");h.setAttribute("type","button"),h.title=o,h.appendChild(l),h.addEventListener(F,i.handleClick_.bind(i),!1);var u=r+" ol-unselectable ol-control"+(i.collapsed_&&i.collapsible_?" ol-collapsed":"")+(i.collapsible_?"":" ol-uncollapsible"),c=i.element;return c.className=u,c.appendChild(i.ulElement_),c.appendChild(h),i.renderedAttributions_=[],i.renderedVisible_=!0,i}return Lo(e,t),e.prototype.collectSourceAttributions_=function(t){for(var e={},i=[],n=t.layerStatesArray,r=0,o=n.length;r<o;++r){var s=n[r];if(Po(s,t.viewState)){var a=s.layer.getSource();if(a){var l=a.getAttributions();if(l){var h=l(t);if(h)if(this.overrideCollapsible_||!1!==a.getAttributionsCollapsible()||this.setCollapsible(!1),Array.isArray(h))for(var u=0,c=h.length;u<c;++u)h[u]in e||(i.push(h[u]),e[h[u]]=!0);else h in e||(i.push(h),e[h]=!0)}}}}return i},e.prototype.updateElement_=function(t){if(t){var e=this.collectSourceAttributions_(t),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!a(e,this.renderedAttributions_)){lt(this.ulElement_);for(var n=0,r=e.length;n<r;++n){var o=document.createElement("li");o.innerHTML=e[n],this.ulElement_.appendChild(o)}this.renderedAttributions_=e}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_()},e.prototype.handleToggle_=function(){this.element.classList.toggle("ol-collapsed"),this.collapsed_?st(this.collapseLabel_,this.label_):st(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e}(ut);var Do=function(){function t(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}return t.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},t.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},t.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;for(var i=e-3;i>0&&this.points_[i+2]>t;)i-=3;var n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;var r=this.points_[e]-this.points_[i],o=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(o,r),this.initialVelocity_=Math.sqrt(r*r+o*o)/n,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}(),ko="active",jo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Go(t,e,i,n){var r=t.getZoom();if(void 0!==r){var o=t.getConstrainedZoom(r+e),s=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:s,anchor:i,duration:void 0!==n?n:250,easing:_t})}}var zo=function(t){function e(e){var i=t.call(this)||this;return e.handleEvent&&(i.handleEvent=e.handleEvent),i.map_=null,i.setActive(!0),i}return jo(e,t),e.prototype.getActive=function(){return this.get(ko)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(ko,t)},e.prototype.setMap=function(t){this.map_=t},e}(U),Wo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Xo(t){var e=!1;if(t.type==xr.DBLCLICK){var i=t.originalEvent,n=t.map,r=t.coordinate,o=i.shiftKey?-this.delta_:this.delta_;Go(n.getView(),o,r,this.duration_),t.preventDefault(),e=!0}return!e}var Ko=function(t){function e(e){var i=t.call(this,{handleEvent:Xo})||this,n=e||{};return i.delta_=n.delta?n.delta:1,i.duration_=void 0!==n.duration?n.duration:250,i}return Wo(e,t),e}(zo),Yo=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},No=function(t){return t.target.getTargetElement()===document.activeElement},Zo=l,Bo=function(t){var e=t.originalEvent;return 0==e.button&&!(J&&Q&&e.ctrlKey)},Vo=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},Uo=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Ho=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},qo=function(t){var e=t.pointerEvent;return wt(void 0!==e,56),"mouse"==e.pointerType},Jo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Qo(t){for(var e=t.length,i=0,n=0,r=0;r<e;r++)i+=t[r].clientX,n+=t[r].clientY;return[i/e,n/e]}var $o=function(t){function e(e){var i=this,n=e||{};return i=t.call(this,n)||this,n.handleDownEvent&&(i.handleDownEvent=n.handleDownEvent),n.handleDragEvent&&(i.handleDragEvent=n.handleDragEvent),n.handleMoveEvent&&(i.handleMoveEvent=n.handleMoveEvent),n.handleUpEvent&&(i.handleUpEvent=n.handleUpEvent),n.stopDown&&(i.stopDown=n.stopDown),i.handlingDownUpSequence=!1,i.trackedPointers_={},i.targetPointers=[],i}return Jo(e,t),e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.pointerEvent)return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==xr.POINTERDRAG)this.handleDragEvent(t);else if(t.type==xr.POINTERUP){var i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==xr.POINTERDOWN){var n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==xr.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===xr.POINTERDOWN||e===xr.POINTERDRAG||e===xr.POINTERUP}(t)){var e=t.pointerEvent,i=e.pointerId.toString();t.type==xr.POINTERUP?delete this.trackedPointers_[i]:t.type==xr.POINTERDOWN?this.trackedPointers_[i]=e:i in this.trackedPointers_&&(this.trackedPointers_[i]=e),this.targetPointers=x(this.trackedPointers_)}},e}(zo),ts=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function es(t){return Vo(t)&&function(t){var e=t.pointerEvent;return wt(void 0!==e,56),e.isPrimary&&0===e.button}(t)}var is=function(t){function e(e){var i=t.call(this,{stopDown:h})||this,n=e||{};return i.kinetic_=n.kinetic,i.lastCentroid=null,i.lastPointersCount_,i.panning_=!1,i.condition_=n.condition?n.condition:es,i.noKinetic_=!1,i}return ts(e,t),e.prototype.conditionInternal_=function(t){var e=!0;return t.map.getTargetElement().hasAttribute("tabindex")&&(e=No(t)),e&&this.condition_(t)},e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e,i,n=this.targetPointers,r=Qo(n);if(n.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(r[0],r[1]),this.lastCentroid){var o=[this.lastCentroid[0]-r[0],r[1]-this.lastCentroid[1]],s=t.map.getView();e=o,i=s.getResolution(),e[0]*=i,e[1]*=i,no(o,s.getRotation()),s.adjustCenterInternal(o)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=r,this.lastPointersCount_=n.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var n=this.kinetic_.getDistance(),r=this.kinetic_.getAngle(),o=i.getCenterInternal(),s=e.getPixelFromCoordinateInternal(o),a=e.getCoordinateFromPixelInternal([s[0]-n*Math.cos(r),s[1]-n*Math.sin(r)]);i.animateInternal({center:i.getConstrainedCenter(a),duration:500,easing:_t})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.conditionInternal_(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}($o),ns=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),rs=function(t){function e(e){var i=this,n=e||{};return(i=t.call(this,{stopDown:h})||this).condition_=n.condition?n.condition:Yo,i.lastAngle_=void 0,i.duration_=void 0!==n.duration?n.duration:250,i}return ns(e,t),e.prototype.handleDragEvent=function(t){if(qo(t)){var e=t.map,i=e.getView();if(i.getConstraints().rotation!==Hr){var n=e.getSize(),r=t.pixel,o=Math.atan2(n[1]/2-r[1],r[0]-n[0]/2);if(void 0!==this.lastAngle_){var s=o-this.lastAngle_;i.adjustRotationInternal(-s)}this.lastAngle_=o}}},e.prototype.handleUpEvent=function(t){return!qo(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!!qo(t)&&(!(!Bo(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))},e}($o),os=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ss=function(t){function e(e){var i=t.call(this)||this;return i.geometry_=null,i.element_=document.createElement("div"),i.element_.style.position="absolute",i.element_.className="ol-box "+e,i.map_=null,i.startPixel_=null,i.endPixel_=null,i}return os(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,i=this.element_.style;i.left=Math.min(t[0],e[0])+"px",i.top=Math.min(t[1],e[1])+"px",i.width=Math.abs(e[0]-t[0])+"px",i.height=Math.abs(e[1]-t[1])+"px"},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new Cn([i])},e.prototype.getGeometry=function(){return this.geometry_},e}(b),as=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ls="boxstart",hs="boxdrag",us="boxend",cs=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.coordinate=i,r.mapBrowserEvent=n,r}return as(e,t),e}(R),ps=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.box_=new ss(n.className||"ol-dragbox"),i.minArea_=void 0!==n.minArea?n.minArea:64,i.onBoxEnd_=n.onBoxEnd?n.onBoxEnd:u,i.startPixel_=null,i.condition_=n.condition?n.condition:Bo,i.boxEndCondition_=n.boxEndCondition?n.boxEndCondition:i.defaultBoxEndCondition,i}return as(e,t),e.prototype.defaultBoxEndCondition=function(t,e,i){var n=i[0]-e[0],r=i[1]-e[1];return n*n+r*r>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new cs(hs,t.coordinate,t))},e.prototype.handleUpEvent=function(t){return this.box_.setMap(null),this.boxEndCondition_(t,this.startPixel_,t.pixel)&&(this.onBoxEnd_(t),this.dispatchEvent(new cs(us,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 cs(ls,t.coordinate,t)),!0)},e}($o),fs=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function ds(){var t,e,i=this.getMap(),n=i.getView(),r=i.getSize(),o=this.getGeometry().getExtent();if(this.out_){var s=n.calculateExtentInternal(r),a=(t=[i.getPixelFromCoordinateInternal(_e(o)),i.getPixelFromCoordinateInternal(we(o))],ce(ae(e),t));!function(t,e){var i=(t[2]-t[0])/2*(e-1),n=(t[3]-t[1])/2*(e-1);t[0]-=i,t[2]+=i,t[1]-=n,t[3]+=n}(s,1/n.getResolutionForExtentInternal(a,r)),o=s}var l=n.getConstrainedResolution(n.getResolutionForExtentInternal(o,r)),h=n.getConstrainedCenter(ye(o),l);n.animateInternal({resolution:l,center:h,duration:this.duration_,easing:_t})}var _s=function(t){function e(e){var i=this,n=e||{},r=n.condition?n.condition:Uo;return(i=t.call(this,{condition:r,className:n.className||"ol-dragzoom",minArea:n.minArea,onBoxEnd:ds})||this).duration_=void 0!==n.duration?n.duration:200,i.out_=void 0!==n.out&&n.out,i}return fs(e,t),e}(ps),gs=37,ys=38,vs=39,ms=40,xs=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Ss(t){var e=!1;if(t.type==D){var i=t.originalEvent.keyCode;if(this.condition_(t)&&(i==ms||i==gs||i==vs||i==ys)){var n=t.map.getView(),r=n.getResolution()*this.pixelDelta_,o=0,s=0;i==ms?s=-r:i==gs?o=-r:i==vs?o=r:s=r;var a=[o,s];no(a,n.getRotation()),function(t,e,i){var n=t.getCenterInternal();if(n){var r=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:yt,center:t.getConstrainedCenter(r)})}}(n,a,this.duration_),t.preventDefault(),e=!0}}return!e}var Cs=function(t){function e(e){var i=t.call(this,{handleEvent:Ss})||this,n=e||{};return i.defaultCondition_=function(t){return Vo(t)&&Ho(t)},i.condition_=void 0!==n.condition?n.condition:i.defaultCondition_,i.duration_=void 0!==n.duration?n.duration:100,i.pixelDelta_=void 0!==n.pixelDelta?n.pixelDelta:128,i}return xs(e,t),e}(zo),ws=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Es(t){var e=!1;if(t.type==D||t.type==k){var i=t.originalEvent.charCode;if(this.condition_(t)&&(i=="+".charCodeAt(0)||i=="-".charCodeAt(0))){var n=t.map,r=i=="+".charCodeAt(0)?this.delta_:-this.delta_;Go(n.getView(),r,void 0,this.duration_),t.preventDefault(),e=!0}}return!e}var bs=function(t){function e(e){var i=t.call(this,{handleEvent:Es})||this,n=e||{};return i.condition_=n.condition?n.condition:Ho,i.delta_=n.delta?n.delta:1,i.duration_=void 0!==n.duration?n.duration:100,i}return ws(e,t),e}(zo),Ts=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Rs="trackpad",Is="wheel",Os=function(t){function e(e){var i=this,n=e||{};return(i=t.call(this,n)||this).totalDelta_=0,i.lastDelta_=0,i.maxDelta_=void 0!==n.maxDelta?n.maxDelta:1,i.duration_=void 0!==n.duration?n.duration:250,i.timeout_=void 0!==n.timeout?n.timeout:80,i.useAnchor_=void 0===n.useAnchor||n.useAnchor,i.condition_=n.condition?n.condition:Zo,i.lastAnchor_=null,i.startTime_=void 0,i.timeoutId_,i.mode_=void 0,i.trackpadEventGap_=400,i.trackpadTimeoutId_,i.deltaPerZoom_=300,i}return Ts(e,t),e.prototype.conditionInternal_=function(t){var e=!0;return t.map.getTargetElement().hasAttribute("tabindex")&&(e=No(t)),e&&this.condition_(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.conditionInternal_(t))return!0;if(t.type!==W)return!0;t.preventDefault();var e,i=t.map,n=t.originalEvent;if(this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==W&&(e=n.deltaY,q&&n.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=$),n.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var r=Date.now();void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?Rs:Is);var o=i.getView();if(this.mode_===Rs&&!o.getConstrainResolution())return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=r,!1;this.totalDelta_+=e;var s=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),s),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var i=-Et(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;e.getConstrainResolution()&&(i=i?i>0?1:-1:0),Go(e,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(zo),Ps=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ms=function(t){function e(e){var i=this,n=e||{},r=n;return r.stopDown||(r.stopDown=h),(i=t.call(this,r)||this).anchor_=null,i.lastAngle_=void 0,i.rotating_=!1,i.rotationDelta_=0,i.threshold_=void 0!==n.threshold?n.threshold:.3,i.duration_=void 0!==n.duration?n.duration:250,i}return Ps(e,t),e.prototype.handleDragEvent=function(t){var e=0,i=this.targetPointers[0],n=this.targetPointers[1],r=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){var o=r-this.lastAngle_;this.rotationDelta_+=o,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=o}this.lastAngle_=r;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==Hr){var l=s.getViewport().getBoundingClientRect(),h=Qo(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}($o),Ls=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Fs=function(t){function e(e){var i=this,n=e||{},r=n;return r.stopDown||(r.stopDown=h),(i=t.call(this,r)||this).anchor_=null,i.duration_=void 0!==n.duration?n.duration:400,i.lastDistance_=void 0,i.lastScaleDelta_=1,i}return Ls(e,t),e.prototype.handleDragEvent=function(t){var e=1,i=this.targetPointers[0],n=this.targetPointers[1],r=i.clientX-n.clientX,o=i.clientY-n.clientY,s=Math.sqrt(r*r+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/s),this.lastDistance_=s;var a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e);var h=a.getViewport().getBoundingClientRect(),u=Qo(this.targetPointers);u[0]-=h.left,u[1]-=h.top,this.anchor_=a.getCoordinateFromPixelInternal(u),a.render(),l.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),!1}return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}($o);var As=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ds=function(t){function e(e,i,n,r){var o=t.call(this,e)||this;return o.inversePixelTransform=i,o.frameState=n,o.context=r,o}return As(e,t),e}(R);function ks(t){return Array.isArray(t)?Zn(t):t}var js=function(){function t(){}return t.prototype.drawCustom=function(t,e,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}(),Gs=[],zs=[0,0,0,0],Ws=new U;(new O).setSize=function(){console.warn("labelCache is deprecated.")};var Xs,Ks,Ys,Ns=null,Zs={},Bs=function(){var t,e,i=["monospace","serif"],n=i.length,r="wmytzilWMYTZIL@#/&?$%10";function o(t,o,s){for(var a=!0,l=0;l<n;++l){var h=i[l];if(e=Hs(t+" "+o+" 32px "+h,r),s!=h){var u=Hs(t+" "+o+" 32px "+s+","+h,r);a=a&&u!=e}}return!!a}function s(){for(var e=!0,i=Ws.getKeys(),n=0,r=i.length;n<r;++n){var s=i[n];Ws.get(s)<100&&(o.apply(this,s.split("\n"))?(m(Zs),Ns=null,Xs=void 0,Ws.set(s,100)):(Ws.set(s,Ws.get(s)+1,!0),e=!1))}e&&(clearInterval(t),t=void 0)}return function(e){var i=ft(e);if(i)for(var n=i.families,r=0,a=n.length;r<a;++r){var l=n[r],h=i.style+"\n"+i.weight+"\n"+l;void 0===Ws.get(h)&&(Ws.set(h,100,!0),o(i.style,i.weight,l)||(Ws.set(h,0,!0),void 0===t&&(t=setInterval(s,32))))}}}(),Vs=(Ys=Zs,function(t){var e=Ys[t];if(null==e)if(tt){var i=ft(t),n=Us(t,"Žg"),r=isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight);Zs[t]=r*(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent)}else Ks||((Ks=document.createElement("div")).innerHTML="M",Ks.style.margin="0 !important",Ks.style.padding="0 !important",Ks.style.position="absolute !important",Ks.style.left="-99999px !important"),Ks.style.font=t,document.body.appendChild(Ks),e=Ks.offsetHeight,Ys[t]=e,document.body.removeChild(Ks);return e});function Us(t,e){return Ns||(Ns=nt(1,1)),t!=Xs&&(Ns.font=t,Xs=Ns.font),Ns.measureText(e)}function Hs(t,e){return Us(t,e).width}function qs(t,e,i){if(e in i)return i[e];var n=Hs(t,e);return i[e]=n,n}function Js(t,e,i,n){0!==e&&(t.translate(i,n),t.rotate(e),t.translate(-i,-n))}function Qs(t,e,i,n,r,o,s,a,l,h,u){t.save(),1!==i&&(t.globalAlpha*=i),e&&t.setTransform.apply(t,e),n.contextInstructions?(t.translate(l,h),t.scale(u,u),function(t,e){for(var i=t.contextInstructions,n=0,r=i.length;n<r;n+=2)Array.isArray(i[n+1])?e[i[n]].apply(e,i[n+1]):e[i[n]]=i[n+1]}(n,t)):t.drawImage(n,r,o,s,a,l,h,s*u,a*u),t.restore()}var $s=null;var ta=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ea=function(t){function e(e,i,n,r,o,s,a){var l=t.call(this)||this;return l.context_=e,l.pixelRatio_=i,l.extent_=n,l.transform_=r,l.viewRotation_=o,l.squaredTolerance_=s,l.userTransform_=a,l.contextFillState_=null,l.contextStrokeState_=null,l.contextTextState_=null,l.fillState_=null,l.strokeState_=null,l.image_=null,l.imageAnchorX_=0,l.imageAnchorY_=0,l.imageHeight_=0,l.imageOpacity_=0,l.imageOriginX_=0,l.imageOriginY_=0,l.imageRotateWithView_=!1,l.imageRotation_=0,l.imageScale_=0,l.imageWidth_=0,l.text_="",l.textOffsetX_=0,l.textOffsetY_=0,l.textRotateWithView_=!1,l.textRotation_=0,l.textScale_=0,l.textFillState_=null,l.textStrokeState_=null,l.textState_=null,l.pixelCoordinates_=[],l.tmpLocalTransform_=[1,0,0,1,0,0],l}return ta(e,t),e.prototype.drawImages_=function(t,e,i,n){if(this.image_){var r=Pi(t,e,i,2,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.tmpLocalTransform_,a=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=a*this.imageOpacity_);var l=this.imageRotation_;this.imageRotateWithView_&&(l+=this.viewRotation_);for(var h=0,u=r.length;h<u;h+=2){var c=r[h]-this.imageAnchorX_,p=r[h+1]-this.imageAnchorY_;if(0!==l||1!=this.imageScale_){var f=c+this.imageAnchorX_,d=p+this.imageAnchorY_;Fi(s,f,d,this.imageScale_,this.imageScale_,l,-f,-d),o.setTransform.apply(o,s)}o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,c,p,this.imageWidth_,this.imageHeight_)}0===l&&1==this.imageScale_||o.setTransform(1,0,0,1,0,0),1!=this.imageOpacity_&&(o.globalAlpha=a)}},e.prototype.drawText_=function(t,e,i,n){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var r=Pi(t,e,i,n,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.textRotation_;for(this.textRotateWithView_&&(s+=this.viewRotation_);e<i;e+=n){var a=r[e]+this.textOffsetX_,l=r[e+1]+this.textOffsetY_;if(0!==s||1!=this.textScale_){var h=Fi(this.tmpLocalTransform_,a,l,this.textScale_,this.textScale_,s,-a,-l);o.setTransform.apply(o,h)}this.textStrokeState_&&o.strokeText(this.text_,a,l),this.textFillState_&&o.fillText(this.text_,a,l)}0===s&&1==this.textScale_||o.setTransform(1,0,0,1,0,0)}},e.prototype.moveToLineTo_=function(t,e,i,n,r){var o=this.context_,s=Pi(t,e,i,n,this.transform_,this.pixelCoordinates_);o.moveTo(s[0],s[1]);var a=s.length;r&&(a-=2);for(var l=2;l<a;l+=2)o.lineTo(s[l],s[l+1]);return r&&o.closePath(),i},e.prototype.drawRings_=function(t,e,i,n){for(var r=0,o=i.length;r<o;++r)e=this.moveToLineTo_(t,e,i[r],n,!0);return e},e.prototype.drawCircle=function(t){if(be(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=function(t,e,i){var n=t.getFlatCoordinates();if(n){var r=t.getStride();return Pi(n,0,n.length,r,e,i)}return null}(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],n=e[3]-e[1],r=Math.sqrt(i*i+n*n),o=this.context_;o.beginPath(),o.arc(e[0],e[1],r,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.setTransform=function(t){this.transform_=t},e.prototype.drawGeometry=function(t){switch(t.getType()){case Mt:this.drawPoint(t);break;case Lt:this.drawLineString(t);break;case At:this.drawPolygon(t);break;case Dt:this.drawMultiPoint(t);break;case kt:this.drawMultiLineString(t);break;case jt:this.drawMultiPolygon(t);break;case Gt:this.drawGeometryCollection(t);break;case zt:this.drawCircle(t)}},e.prototype.drawFeature=function(t,e){var i=e.getGeometryFunction()(t);i&&be(this.extent_,i.getExtent())&&(this.setStyle(e),this.drawGeometry(i))},e.prototype.drawGeometryCollection=function(t){for(var e=t.getGeometriesArray(),i=0,n=e.length;i<n;++i)this.drawGeometry(e[i])},e.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)},e.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)},e.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),be(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){var n=t.getFlatMidpoint();this.drawText_(n,0,2,2)}}},e.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getExtent();if(be(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var i=this.context_,n=t.getFlatCoordinates(),r=0,o=t.getEnds(),s=t.getStride();i.beginPath();for(var a=0,l=o.length;a<l;++a)r=this.moveToLineTo_(n,r,o[a],s,!1);i.stroke()}if(""!==this.text_){var h=t.getFlatMidpoints();this.drawText_(h,0,h.length,2)}}},e.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),be(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var i=t.getFlatInteriorPoint();this.drawText_(i,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),be(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_,i=t.getOrientedFlatCoordinates(),n=0,r=t.getEndss(),o=t.getStride();e.beginPath();for(var s=0,a=r.length;s<a;++s){var l=r[s];n=this.drawRings_(i,n,l,o)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var h=t.getFlatInteriorPoints();this.drawText_(h,0,h.length,2)}}},e.prototype.setContextFillState_=function(t){var e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},e.prototype.setContextStrokeState_=function(t){var e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,e.lineCap=t.lineCap),e.setLineDash&&(a(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset)),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},e.prototype.setContextTextState_=function(t){var e=this.context_,i=this.contextTextState_,n=t.textAlign?t.textAlign:"center";i?(i.font!=t.font&&(i.font=t.font,e.font=t.font),i.textAlign!=n&&(i.textAlign=n,e.textAlign=n),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=n,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:n,textBaseline:t.textBaseline})},e.prototype.setFillStrokeStyle=function(t,e){if(t){var i=t.getColor();this.fillState_={fillStyle:ks(i||"#000")}}else this.fillState_=null;if(e){var n=e.getColor(),r=e.getLineCap(),o=e.getLineDash(),s=e.getLineDashOffset(),a=e.getLineJoin(),l=e.getWidth(),h=e.getMiterLimit();this.strokeState_={lineCap:void 0!==r?r:"round",lineDash:o||Gs,lineDashOffset:s||0,lineJoin:void 0!==a?a:"round",lineWidth:this.pixelRatio_*(void 0!==l?l:1),miterLimit:void 0!==h?h:10,strokeStyle:ks(n||"#000")}}else this.strokeState_=null},e.prototype.setImageStyle=function(t){if(t){var e=t.getAnchor(),i=t.getImage(1),n=t.getOrigin(),r=t.getSize();this.imageAnchorX_=e[0],this.imageAnchorY_=e[1],this.imageHeight_=r[1],this.image_=i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=n[0],this.imageOriginY_=n[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=t.getScale()*this.pixelRatio_,this.imageWidth_=r[0]}else this.image_=null},e.prototype.setTextStyle=function(t){if(t){var e=t.getFill();if(e){var i=e.getColor();this.textFillState_={fillStyle:ks(i||"#000")}}else this.textFillState_=null;var n=t.getStroke();if(n){var r=n.getColor(),o=n.getLineCap(),s=n.getLineDash(),a=n.getLineDashOffset(),l=n.getLineJoin(),h=n.getWidth(),u=n.getMiterLimit();this.textStrokeState_={lineCap:void 0!==o?o:"round",lineDash:s||Gs,lineDashOffset:a||0,lineJoin:void 0!==l?l:"round",lineWidth:void 0!==h?h:1,miterLimit:void 0!==u?u:10,strokeStyle:ks(r||"#000")}}else this.textStrokeState_=null;var c=t.getFont(),p=t.getOffsetX(),f=t.getOffsetY(),d=t.getRotateWithView(),_=t.getRotation(),g=t.getScale(),y=t.getText(),v=t.getTextAlign(),m=t.getTextBaseline();this.textState_={font:void 0!==c?c:"10px sans-serif",textAlign:void 0!==v?v:"center",textBaseline:void 0!==m?m:"middle"},this.text_=void 0!==y?y:"",this.textOffsetX_=void 0!==p?this.pixelRatio_*p:0,this.textOffsetY_=void 0!==f?this.pixelRatio_*f:0,this.textRotateWithView_=void 0!==d&&d,this.textRotation_=void 0!==_?_:0,this.textScale_=this.pixelRatio_*(void 0!==g?g:1)}else this.text_=""},e}(js),ia="Circle",na="Default",ra="Image",oa="LineString",sa="Polygon",aa="Text",la={Point:function(t,e,i,n){var r=i.getImage();if(r){if(r.getImageState()!=Dn)return;var o=t.getBuilder(i.getZIndex(),ra);o.setImageStyle(r,t.addDeclutter(!1)),o.drawPoint(e,n)}var s=i.getText();if(s){var a=t.getBuilder(i.getZIndex(),aa);a.setTextStyle(s,t.addDeclutter(!!r)),a.drawText(e,n)}},LineString:function(t,e,i,n){var r=i.getStroke();if(r){var o=t.getBuilder(i.getZIndex(),oa);o.setFillStrokeStyle(null,r),o.drawLineString(e,n)}var s=i.getText();if(s){var a=t.getBuilder(i.getZIndex(),aa);a.setTextStyle(s,t.addDeclutter(!1)),a.drawText(e,n)}},Polygon:function(t,e,i,n){var r=i.getFill(),o=i.getStroke();if(r||o){var s=t.getBuilder(i.getZIndex(),sa);s.setFillStrokeStyle(r,o),s.drawPolygon(e,n)}var a=i.getText();if(a){var l=t.getBuilder(i.getZIndex(),aa);l.setTextStyle(a,t.addDeclutter(!1)),l.drawText(e,n)}},MultiPoint:function(t,e,i,n){var r=i.getImage();if(r){if(r.getImageState()!=Dn)return;var o=t.getBuilder(i.getZIndex(),ra);o.setImageStyle(r,t.addDeclutter(!1)),o.drawMultiPoint(e,n)}var s=i.getText();if(s){var a=t.getBuilder(i.getZIndex(),aa);a.setTextStyle(s,t.addDeclutter(!!r)),a.drawText(e,n)}},MultiLineString:function(t,e,i,n){var r=i.getStroke();if(r){var o=t.getBuilder(i.getZIndex(),oa);o.setFillStrokeStyle(null,r),o.drawMultiLineString(e,n)}var s=i.getText();if(s){var a=t.getBuilder(i.getZIndex(),aa);a.setTextStyle(s,t.addDeclutter(!1)),a.drawText(e,n)}},MultiPolygon:function(t,e,i,n){var r=i.getFill(),o=i.getStroke();if(o||r){var s=t.getBuilder(i.getZIndex(),sa);s.setFillStrokeStyle(r,o),s.drawMultiPolygon(e,n)}var a=i.getText();if(a){var l=t.getBuilder(i.getZIndex(),aa);l.setTextStyle(a,t.addDeclutter(!1)),l.drawText(e,n)}},GeometryCollection:function(t,e,i,n){var r,o,s=e.getGeometriesArray();for(r=0,o=s.length;r<o;++r){(0,la[s[r].getType()])(t,s[r],i,n)}},Circle:function(t,e,i,n){var r=i.getFill(),o=i.getStroke();if(r||o){var s=t.getBuilder(i.getZIndex(),ia);s.setFillStrokeStyle(r,o),s.drawCircle(e,n)}var a=i.getText();if(a){var l=t.getBuilder(i.getZIndex(),aa);l.setTextStyle(a,t.addDeclutter(!1)),l.drawText(e,n)}}};function ha(t,e){return parseInt(g(t),10)-parseInt(g(e),10)}function ua(t,e){var i=ca(t,e);return i*i}function ca(t,e){return.5*t/e}function pa(t,e,i,n,r,o){var s=!1,a=i.getImage();if(a){var l=a.getImageState();l==Dn||l==kn?a.unlistenImageChange(r):(l==Fn&&a.load(),l=a.getImageState(),a.listenImageChange(r),s=!0)}return function(t,e,i,n,r){var o=i.getGeometryFunction()(e);if(!o)return;var s=o.simplifyTransformed(n,r);if(i.getRenderer())!function t(e,i,n,r){if(i.getType()==Gt){for(var o=i.getGeometries(),s=0,a=o.length;s<a;++s)t(e,o[s],n,r);return}e.getBuilder(n.getZIndex(),na).drawCustom(i,r,n.getRenderer())}(t,s,i,e);else{(0,la[s.getType()])(t,s,i,e)}}(t,e,i,n,o),s}var fa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function da(t,e){qn.expire()}var _a=function(t){function e(e){var i=t.call(this)||this;return i.map_=e,i.declutterTree_=null,i}return fa(e,t),e.prototype.dispatchRenderEvent=function(t,e){d()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;Fi(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Ai(n,i)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r,o,s,a){var l,h=e.viewState;function u(t,e,i){return r.call(o,e,t?i:null)}var c=h.projection,p=ro(t.slice(),c),f=[[0,0]];if(c.canWrapX()&&n){var d=Ee(c.getExtent());f.push([-d,0],[d,0])}var _,g=e.layerStatesArray,y=g.length;this.declutterTree_&&(_=this.declutterTree_.all().map((function(t){return t.value})));for(var v=[],m=0;m<f.length;m++)for(var x=y-1;x>=0;--x){var S=g[x],C=S.layer;if(C.hasRenderer()&&Po(S,h)&&s.call(a,C)){var w=C.getRenderer(),E=C.getSource();if(w&&E){var b=E.getWrapX()?p:t,T=u.bind(null,S.managed);v[0]=b[0]+f[m][0],v[1]=b[1]+f[m][1],l=w.forEachFeatureAtCoordinate(v,e,i,T,_)}if(l)return l}}},e.prototype.forEachLayerAtPixel=function(t,e,i,n,r){return d()},e.prototype.hasFeatureAtCoordinate=function(t,e,i,n,r,o){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,n,l,this,r,o)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){this.declutterTree_=function(t,e){e&&e.clear();for(var i=t.declutterItems,n=i.length-1;n>=0;--n)for(var r=i[n],o=r.items,s=0,a=o.length;s<a;s+=3)e=o[s].renderDeclutter(o[s+1],o[s+2],r.opacity,e);return i.length=0,e}(t,this.declutterTree_)},e.prototype.scheduleExpireIconCache=function(t){qn.canExpireCache()&&t.postRenderFunctions.push(da)},e}(b),ga=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ya=function(t){function e(e){var i=t.call(this,e)||this;i.fontChangeListenerKey_=C(Ws,y,e.redrawText.bind(e)),i.element_=document.createElement("div");var n=i.element_.style;n.position="absolute",n.width="100%",n.height="100%",n.zIndex="0",i.element_.className="ol-unselectable ol-layers";var r=e.getViewport();return r.insertBefore(i.element_,r.firstChild||null),i.children_=[],i.renderedVisible_=!0,i}return ga(e,t),e.prototype.dispatchRenderEvent=function(t,e){var i=this.getMap();if(i.hasListener(t)){var n=new Ds(t,void 0,e);i.dispatchEvent(n)}},e.prototype.disposeInternal=function(){E(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),t.prototype.disposeInternal.call(this)},e.prototype.renderFrame=function(e){if(e){this.calculateMatrices2D(e),this.dispatchRenderEvent(Fr,e);var i=e.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),n=e.viewState;this.children_.length=0;for(var r=null,o=0,s=i.length;o<s;++o){var a=i[o];if(e.layerIndex=o,Po(a,n)&&(a.sourceState==Co||a.sourceState==So)){var l=a.layer.render(e,r);l&&l!==r&&(this.children_.push(l),r=l)}}t.prototype.renderFrame.call(this,e),function(t,e){for(var i=t.childNodes,n=0;;++n){var r=i[n],o=e[n];if(!r&&!o)break;r!==o&&(r?o?t.insertBefore(o,r):(t.removeChild(r),--n):t.appendChild(o))}}(this.element_,this.children_),this.dispatchRenderEvent(Ar,e),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(e)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},e.prototype.forEachLayerAtPixel=function(t,e,i,n,r){for(var o=e.viewState,s=e.layerStatesArray,a=s.length-1;a>=0;--a){var l=s[a],h=l.layer;if(h.hasRenderer()&&Po(l,o)&&r(h)){var u=h.getRenderer().getDataAtPixel(t,e,i);if(u){var c=n(h,u);if(c)return c}}}},e}(_a),va=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ma=function(t){function e(e){return(e=v({},e)).controls||(e.controls=function(t){var e=t||{},i=new _r;return(void 0===e.zoom||e.zoom)&&i.push(new bi(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&i.push(new xt(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&i.push(new Ao(e.attributionOptions)),i}()),e.interactions||(e.interactions=function(t){var e=t||{},i=new _r,n=new Do(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&i.push(new rs),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&i.push(new Ko({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&i.push(new is({condition:e.onFocusOnly?No:void 0,kinetic:n})),(void 0===e.pinchRotate||e.pinchRotate)&&i.push(new Ms),(void 0===e.pinchZoom||e.pinchZoom)&&i.push(new Fs({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(i.push(new Cs),i.push(new bs({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&i.push(new Os({condition:e.onFocusOnly?No:void 0,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&i.push(new _s({duration:e.zoomDuration})),i}()),t.call(this,e)||this}return va(e,t),e.prototype.createRenderer=function(){return new ya(this)},e}(Io),xa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Sa=function(t){function e(e,i,n){var r=t.call(this)||this,o=n||{};return r.tileCoord=e,r.state=i,r.interimTile=null,r.hifi=!0,r.key="",r.transition_=void 0===o.transition?250:o.transition,r.transitionStarts_={},r}return xa(e,t),e.prototype.changed=function(){this.dispatchEvent(P)},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()==Gr)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()==Gr){t.interimTile=null;break}t.getState()==jr?e=t:t.getState()==kr?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!==zr&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){d()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;var n=e-i+1e3/60;return n>=this.transition_?1:dt(n/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(O),Ca=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();var wa=function(t){function e(e,i,n,r,o,s){var a=t.call(this,e,i,s)||this;return a.crossOrigin_=r,a.src_=n,a.image_=new Image,null!==r&&(a.image_.crossOrigin=r),a.unlisten_=null,a.tileLoadFunction_=o,a}return Ca(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.getKey=function(){return this.src_},e.prototype.handleImageError_=function(){var t;this.state=zr,this.unlistenImage_(),this.image_=((t=nt(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=Gr:this.state=Wr,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==zr&&(this.state=kr,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==kr&&(this.state=jr,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}(Sa),Ea=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.getCount()>this.highWaterMark},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var i=this.entries_[t];return wt(void 0!==i,15),i===this.newest_?i.value_:(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i,i.value_)},t.prototype.remove=function(t){var e=this.entries_[t];return wt(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){wt(!(t in this.entries_),16);var i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}();function ba(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function Ta(t,e,i){return t+"/"+e+"/"+i}function Ra(t){return Ta(t[0],t[1],t[2])}var Ia=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Oa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ia(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(Ra(e.tileCoord)),e.release())}.bind(this))}},e}(Ea);function Pa(t,e,i,n){var r=i-t,o=n-e,s=Math.sqrt(r*r+o*o);return[Math.round(i+r/s),Math.round(n+o/s)]}function Ma(t,e,i,n,r,o,s,a,l,h,u){var c=nt(Math.round(i*t),Math.round(i*e));if(0===l.length)return c.canvas;c.scale(i,i);var p=[1/0,1/0,-1/0,-1/0];l.forEach((function(t,e,i){he(p,t.extent)}));var f=Ee(p),d=xe(p),_=nt(Math.round(i*f/n),Math.round(i*d/n)),g=i/n;l.forEach((function(t,e,i){var n=t.extent[0]-p[0],r=-(t.extent[3]-p[3]),o=Ee(t.extent),s=xe(t.extent);_.drawImage(t.image,h,h,t.image.width-2*h,t.image.height-2*h,n*g,r*g,o*g,s*g)}));var y=Ce(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],f=s[1][1],d=s[2][0],g=s[2][1],v=(a[0][0]-y[0])/o,m=-(a[0][1]-y[1])/o,x=(a[1][0]-y[0])/o,S=-(a[1][1]-y[1])/o,C=(a[2][0]-y[0])/o,w=-(a[2][1]-y[1])/o,E=l,b=h;l=0,h=0;var T=function(t){for(var e=t.length,i=0;i<e;i++){for(var n=i,r=Math.abs(t[i][i]),o=i+1;o<e;o++){var s=Math.abs(t[o][i]);s>r&&(r=s,n=o)}if(0===r)return null;var a=t[n];t[n]=t[i],t[i]=a;for(var l=i+1;l<e;l++)for(var h=-t[l][i]/t[i][i],u=i;u<e+1;u++)i==u?t[l][u]=0:t[l][u]+=h*t[i][u]}for(var c=new Array(e),p=e-1;p>=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-=E,f-=b,0,0,x-v],[d-=E,g-=b,0,0,C-v],[0,0,u,f,S-m],[0,0,d,g,w-m]]);if(T){c.save(),c.beginPath();var R=(v+x+C)/3,I=(m+S+w)/3,O=Pa(R,I,v,m),P=Pa(R,I,x,S),M=Pa(R,I,C,w);c.moveTo(P[0],P[1]),c.lineTo(O[0],O[1]),c.lineTo(M[0],M[1]),c.clip(),c.transform(T[0],T[2],T[1],T[3],v,m),c.translate(p[0]-E,p[3]-b),c.scale(n/i,-n/i),c.drawImage(_.canvas,0,0),c.restore()}})),u&&(c.save(),c.strokeStyle="black",c.lineWidth=1,a.getTriangles().forEach((function(t,e,i){var n=t.target,r=(n[0][0]-y[0])/o,s=-(n[0][1]-y[1])/o,a=(n[1][0]-y[0])/o,l=-(n[1][1]-y[1])/o,h=(n[2][0]-y[0])/o,u=-(n[2][1]-y[1])/o;c.beginPath(),c.moveTo(a,l),c.lineTo(r,s),c.lineTo(h,u),c.closePath(),c.stroke()})),c.restore()),c.canvas}var La=function(){function t(t,e,i,n,r,o){this.sourceProj_=t,this.targetProj_=e;var s={},a=ni(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return s[e]||(s[e]=a(t)),s[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&Ee(n)==Ee(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Ee(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Ee(this.targetProj_.getExtent()):null;var l=Ce(i),h=we(i),u=ge(i),c=_e(i),p=this.transformInv_(l),f=this.transformInv_(h),d=this.transformInv_(u),_=this.transformInv_(c),g=10+(o?Math.max(0,Math.ceil(Math.log2(de(i)/(o*o*256*256)))):0);if(this.addQuad_(l,h,u,c,p,f,d,_,g),this.wrapsXInSource_){var y=1/0;this.triangles_.forEach((function(t,e,i){y=Math.min(y,t.source[0][0],t.source[1][0],t.source[2][0])})),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-y>this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-y>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-y>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-y>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var i=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-i<this.sourceWorldWidth_/2&&(t.source=e)}}.bind(this))}s={}}return t.prototype.addTriangle_=function(t,e,i,n,r,o){this.triangles_.push({source:[n,r,o],target:[t,e,i]})},t.prototype.addQuad_=function(t,e,i,n,r,o,s,a,l){var h=Jt([r,o,s,a]),u=this.sourceWorldWidth_?Ee(h)/this.sourceWorldWidth_:null,c=this.sourceWorldWidth_,p=this.sourceProj_.canWrapX()&&u>.5&&u<1,f=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_)f=Ee(Jt([t,e,i,n]))/this.targetWorldWidth_>.25||f;!p&&this.sourceProj_.isGlobal()&&u&&(f=u>.25||f)}if(f||!this.maxSourceExtent_||be(h,this.maxSourceExtent_)){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))return;f=!0}if(l>0){if(!f){var d=[(t[0]+i[0])/2,(t[1]+i[1])/2],_=this.transformInv_(d),g=void 0;if(p)g=(Ot(r[0],c)+Ot(s[0],c))/2-Ot(_[0],c);else g=(r[0]+s[0])/2-_[0];var y=(r[1]+s[1])/2-_[1];f=g*g+y*y>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){var v=[(e[0]+i[0])/2,(e[1]+i[1])/2],m=this.transformInv_(v),x=[(n[0]+t[0])/2,(n[1]+t[1])/2],S=this.transformInv_(x);this.addQuad_(t,e,v,x,r,o,m,S,l-1),this.addQuad_(x,v,i,n,S,m,s,a,l-1)}else{var C=[(t[0]+e[0])/2,(t[1]+e[1])/2],w=this.transformInv_(C),E=[(i[0]+n[0])/2,(i[1]+n[1])/2],b=this.transformInv_(E);this.addQuad_(t,C,E,n,r,w,b,a,l-1),this.addQuad_(C,e,i,E,w,o,s,b,l-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}this.addTriangle_(t,i,n,r,s,a),this.addTriangle_(t,e,i,r,o,s)}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(e,i,n){var r=e.source;ue(t,r[0]),ue(t,r[1]),ue(t,r[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}(),Fa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Aa=function(t){function e(e,i,n,r,o,s,a,l,h,u,c){var p=t.call(this,o,kr)||this;p.renderEdges_=void 0!==c&&c,p.pixelRatio_=a,p.gutter_=l,p.canvas_=null,p.sourceTileGrid_=i,p.targetTileGrid_=r,p.wrappedTileCoord_=s||o,p.sourceTiles_=[],p.sourcesListenerKeys_=null,p.sourceZ_=0;var f=r.getTileCoordExtent(p.wrappedTileCoord_),d=p.targetTileGrid_.getExtent(),_=p.sourceTileGrid_.getExtent(),g=d?Se(f,d):f;if(0===de(g))return p.state=Wr,p;var y=e.getExtent();y&&(_=_?Se(_,y):y);var v=r.getResolution(p.wrappedTileCoord_[0]),m=function(t,e,i,n){var r=ri(i,e,t),o=Qe(e,n,i),s=e.getMetersPerUnit();void 0!==s&&(o*=s);var a=t.getMetersPerUnit();void 0!==a&&(o/=a);var l=t.getExtent();if(!l||ee(l,r)){var h=Qe(t,o,r)/o;isFinite(h)&&h>0&&(o/=h)}return o}(e,n,ye(g),v);if(!isFinite(m)||m<=0)return p.state=Wr,p;var x=void 0!==u?u:.5;if(p.triangulation_=new La(e,n,g,_,m*x,v),0===p.triangulation_.getTriangles().length)return p.state=Wr,p;p.sourceZ_=i.getZForResolution(m);var S=p.triangulation_.calculateSourceExtent();if(_&&(e.canWrapX()?(S[1]=Et(S[1],_[1],_[3]),S[3]=Et(S[3],_[1],_[3])):S=Se(S,_)),de(S)){for(var C=i.getTileRangeForExtentAndZ(S,p.sourceZ_),w=C.minX;w<=C.maxX;w++)for(var E=C.minY;E<=C.maxY;E++){var b=h(p.sourceZ_,w,E,a);b&&p.sourceTiles_.push(b)}0===p.sourceTiles_.length&&(p.state=Wr)}else p.state=Wr;return p}return Fa(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,i,n){e&&e.getState()==Gr&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=zr;else{var e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],r="number"==typeof i?i:i[1],o=this.targetTileGrid_.getResolution(e),s=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Ma(n,r,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),o,a,this.triangulation_,t,this.gutter_,this.renderEdges_),this.state=Gr}this.changed()},e.prototype.load=function(){if(this.state==kr){this.state=jr,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,i,n){var r=e.getState();if(r==kr||r==jr){t++;var o=C(e,P,(function(i){var n=e.getState();n!=Gr&&n!=zr&&n!=Wr||(E(o),0===--t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(o)}}.bind(this)),this.sourceTiles_.forEach((function(t,e,i){t.getState()==kr&&t.load()})),0===t&&setTimeout(this.reproject_.bind(this),0)}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(E),this.sourcesListenerKeys_=null},e}(Sa);function Da(t,e){var i=/\{z\}/g,n=/\{x\}/g,r=/\{y\}/g,o=/\{-y\}/g;return function(s,a,l){return s?t.replace(i,s[0].toString()).replace(n,s[1].toString()).replace(r,s[2].toString()).replace(o,(function(){var t=s[0],i=e.getFullTileRange(t);return wt(i,55),(i.getHeight()-s[2]-1).toString()})):void 0}}function ka(t,e){for(var i=t.length,n=new Array(i),r=0;r<i;++r)n[r]=Da(t[r],e);return function(t){if(1===t.length)return t[0];return(function(e,i,n){if(e){var r=Ot(function(t){return(t[1]<<t[0])+t[2]}(e),t.length);return t[r](e,i,n)}})}(n)}function ja(t,e,i){}var Ga=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function za(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}var Wa=function(t){function e(e){var i=t.call(this)||this;return i.projection_=Je(e.projection),i.attributions_=za(e.attributions),i.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,i.loading=!1,i.state_=void 0!==e.state?e.state:Co,i.wrapX_=void 0!==e.wrapX&&e.wrapX,i}return Ga(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 d()},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=za(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(U),Xa=function(){function t(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.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 Ka(t,e,i,n,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=i,r.maxY=n,r):new Xa(t,e,i,n)}var Ya=Xa,Na=[0,0,0],Za=function(){function t(t){var e,i,r,o;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,wt((e=this.resolutions_,i=!0,r=function(t,e){return e-t}||n,e.every((function(t,n){if(0===n)return!0;var o=r(e[n-1],t);return!(o>0||i&&0===o)}))),17),!t.origins)for(var s=0,a=this.resolutions_.length-1;s<a;++s)if(o){if(this.resolutions_[s]/this.resolutions_[s+1]!==o){o=void 0;break}}else o=this.resolutions_[s]/this.resolutions_[s+1];this.zoomFactor_=o,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==t.origin?t.origin:null,this.origins_=null,void 0!==t.origins&&(this.origins_=t.origins,wt(this.origins_.length==this.resolutions_.length,20));var l=t.extent;void 0===l||this.origin_||this.origins_||(this.origin_=Ce(l)),wt(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,wt(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:256,wt(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==l?l:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map((function(t,e){return new Ya(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1))}),this):l&&this.calculateTileRanges_(l)}return t.prototype.forEachTileCoord=function(t,e,i){for(var n=this.getTileRangeForExtentAndZ(t,e),r=n.minX,o=n.maxX;r<=o;++r)for(var s=n.minY,a=n.maxY;s<=a;++s)i([e,r,s])},t.prototype.forEachTileCoordParentTileRange=function(t,e,i,n){var r,o,s=null,a=t[0]-1;for(2===this.zoomFactor_?(r=t[1],o=t[2]):s=this.getTileCoordExtent(t,n);a>=this.minZoom;){if(e(a,2===this.zoomFactor_?Ka(r=Math.floor(r/2),r,o=Math.floor(o/2),o,i):this.getTileRangeForExtentAndZ(s,a,i)))return!0;--a}return!1},t.prototype.getExtent=function(){return this.extent_},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},t.prototype.getResolution=function(t){return this.resolutions_[t]},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getTileCoordChildTileRange=function(t,e,i){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){var n=2*t[1],r=2*t[2];return Ka(n,n+1,r,r+1,e)}var o=this.getTileCoordExtent(t,i);return this.getTileRangeForExtentAndZ(o,t[0]+1,e)}return null},t.prototype.getTileRangeExtent=function(t,e,i){var n=this.getOrigin(t),r=this.getResolution(t),o=To(this.getTileSize(t),this.tmpSize_),s=n[0]+e.minX*o[0]*r,a=n[0]+(e.maxX+1)*o[0]*r;return se(s,n[1]+e.minY*o[1]*r,a,n[1]+(e.maxY+1)*o[1]*r,i)},t.prototype.getTileRangeForExtentAndZ=function(t,e,i){var n=Na;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,n);var r=n[1],o=n[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,n),Ka(r,n[1],o,n[2],i)},t.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),i=this.getResolution(t[0]),n=To(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*n[0]*i,e[1]-(t[2]+.5)*n[1]*i]},t.prototype.getTileCoordExtent=function(t,e){var i=this.getOrigin(t[0]),n=this.getResolution(t[0]),r=To(this.getTileSize(t[0]),this.tmpSize_),o=i[0]+t[1]*r[0]*n,s=i[1]-(t[2]+1)*r[1]*n;return se(o,s,o+r[0]*n,s+r[1]*n,e)},t.prototype.getTileCoordForCoordAndResolution=function(t,e,i){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,i)},t.prototype.getTileCoordForXYAndResolution_=function(t,e,i,n,r){var o=this.getZForResolution(i),s=i/this.getResolution(o),a=this.getOrigin(o),l=To(this.getTileSize(o),this.tmpSize_),h=n?.5:0,u=n?.5:0,c=Math.floor((t-a[0])/i+h),p=Math.floor((a[1]-e)/i+u),f=s*c/l[0],d=s*p/l[1];return n?(f=Math.ceil(f)-1,d=Math.ceil(d)-1):(f=Math.floor(f),d=Math.floor(d)),ba(o,f,d,r)},t.prototype.getTileCoordForXYAndZ_=function(t,e,i,n,r){var o=this.getOrigin(i),s=this.getResolution(i),a=To(this.getTileSize(i),this.tmpSize_),l=n?.5:0,h=n?.5:0,u=Math.floor((t-o[0])/s+l),c=Math.floor((o[1]-e)/s+h),p=u/a[0],f=c/a[1];return n?(p=Math.ceil(p)-1,f=Math.ceil(f)-1):(p=Math.floor(p),f=Math.floor(f)),ba(i,p,f,r)},t.prototype.getTileCoordForCoordAndZ=function(t,e,i){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,i)},t.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},t.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},t.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:null},t.prototype.getZForResolution=function(t,e){return Et(r(this.resolutions_,t,e||0),this.minZoom,this.maxZoom)},t.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,i=new Array(e),n=this.minZoom;n<e;++n)i[n]=this.getTileRangeForExtentAndZ(t,n);this.fullTileRanges_=i},t}();function Ba(t){var e=t.getDefaultTileGrid();return e||(e=function(t,e,i,n){return function(t,e,i,n){var r=void 0!==n?n:Yt,o=Va(t,e,i);return new Za({extent:t,origin:ve(t,r),resolutions:o,tileSize:i})}(Ua(t),e,i,n)}(t),t.setDefaultTileGrid(e)),e}function Va(t,e,i,n){for(var r=void 0!==e?e:42,o=xe(t),s=Ee(t),a=To(void 0!==i?i:256),l=n>0?n:Math.max(s/a[0],o/a[1]),h=r+1,u=new Array(h),c=0;c<h;++c)u[c]=l/Math.pow(2,c);return u}function Ua(t){var e=(t=Je(t)).getExtent();if(!e){var i=180*Oe[Pe.DEGREES]/t.getMetersPerUnit();e=se(-i,-i,i,i)}return e}var Ha=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),qa=function(t){function e(e){var i=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX})||this;i.opaque_=void 0!==e.opaque&&e.opaque,i.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,i.tileGrid=void 0!==e.tileGrid?e.tileGrid:null;var n=[256,256],r=e.tileGrid;r&&To(r.getTileSize(r.getMinZoom()),n);var o="undefined"!=typeof screen,s=o?screen.availWidth||screen.width:1920,a=o?screen.availHeight||screen.height:1080,l=4*Math.ceil(s/n[0])*Math.ceil(a/n[1]);return i.tileCache=new Oa(Math.max(l,e.cacheSize||0)),i.tmpSize=[0,0],i.key_=e.key||"",i.tileOptions={transition:e.transition},i.zDirection=e.zDirection?e.zDirection:0,i}return Ha(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var i=this.getTileCacheForProjection(t);i&&i.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,i,n){var r=this.getTileCacheForProjection(t);if(!r)return!1;for(var o,s,a,l=!0,h=i.minX;h<=i.maxX;++h)for(var u=i.minY;u<=i.maxY;++u)s=Ta(e,h,u),a=!1,r.containsKey(s)&&(a=(o=r.get(s)).getState()===Gr)&&(a=!1!==n(o)),a||(l=!1);return l},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},e.prototype.getTile=function(t,e,i,n,r){return d()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:Ba(t)},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();return e&&!ei(e,t)?null:this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,i){var n,r,o,s=this.getTileGridForProjection(i),a=this.getTilePixelRatio(e),l=To(s.getTileSize(t),this.tmpSize);return 1==a?l:(n=l,r=a,void 0===(o=this.tmpSize)&&(o=[0,0]),o[0]=n[0]*r+.5|0,o[1]=n[1]*r+.5|0,o)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var i=void 0!==e?e:this.getProjection(),n=this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(t=function(t,e,i){var n=e[0],r=t.getTileCoordCenter(e),o=Ua(i);if(ee(o,r))return e;var s=Ee(o),a=Math.ceil((o[0]-r[0])/s);return r[0]+=s*a,t.getTileCoordForCoordAndZ(r,n)}(n,t,i)),function(t,e){var i=t[0],n=t[1],r=t[2];if(e.getMinZoom()>i||i>e.getMaxZoom())return!1;var o,s=e.getExtent();return!(o=s?e.getTileRangeForExtentAndZ(s,i):e.getFullTileRange(i))||o.containsXY(n,r)}(t,n)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.useTile=function(t,e,i,n){},e}(Wa),Ja=function(t){function e(e,i){var n=t.call(this,e)||this;return n.tile=i,n}return Ha(e,t),e}(R),Qa=qa,$a="tileloadstart",tl="tileloadend",el="tileloaderror",il=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),nl=function(t){function e(e){var i=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this;return i.generateTileUrlFunction_=!e.tileUrlFunction,i.tileLoadFunction=e.tileLoadFunction,i.tileUrlFunction=e.tileUrlFunction?e.tileUrlFunction.bind(i):ja,i.urls=null,e.urls?i.setUrls(e.urls):e.url&&i.setUrl(e.url),i.tileLoadingKeys_={},i}return il(e,t),e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,i=t.target,n=g(i),r=i.getState();r==jr?(this.tileLoadingKeys_[n]=!0,e=$a):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],e=r==zr?el:r==Gr?tl:void 0),null!=e&&this.dispatchEvent(new Ja(e,i))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=function(t){var e=[],i=/\{([a-z])-([a-z])\}/.exec(t);if(i){var n=i[1].charCodeAt(0),r=i[2].charCodeAt(0),o=void 0;for(o=n;o<=r;++o)e.push(t.replace(i[0],String.fromCharCode(o)));return e}if(i=/\{(\d+)-(\d+)\}/.exec(t)){for(var s=parseInt(i[2],10),a=parseInt(i[1],10);a<=s;a++)e.push(t.replace(i[0],a.toString()));return e}return e.push(t),e}(t);this.urls=e,this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(ka(t,this.tileGrid),e):this.setKey(e)},e.prototype.useTile=function(t,e,i){var n=Ta(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)},e}(Qa),rl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function ol(t,e){t.getImage().src=e}var sl=function(t){function e(e){var i=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:ol,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this;return i.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,i.tileClass=void 0!==e.tileClass?e.tileClass:wa,i.tileCacheForProjection={},i.tileGridForProjection={},i.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,i.renderReprojectionEdges_=!1,i}return rl(e,t),e.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},e.prototype.expireCache=function(t,e){var i=this.getTileCacheForProjection(t);for(var n in this.tileCache.expireCache(this.tileCache==i?e:{}),this.tileCacheForProjection){var r=this.tileCacheForProjection[n];r.expireCache(r==i?e:{})}},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!ei(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getOpaque=function(e){return!(this.getProjection()&&e&&!ei(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(t){var e=this.getProjection();if(!this.tileGrid||e&&!ei(e,t)){var i=g(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=Ba(t)),this.tileGridForProjection[i]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();if(!e||ei(e,t))return this.tileCache;var i=g(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new Oa(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},e.prototype.createTile_=function(t,e,i,n,r,o){var s=[t,e,i],a=this.getTileCoordForTileUrlFunction(s,r),l=a?this.tileUrlFunction(a,n,r):void 0,h=new this.tileClass(s,void 0!==l?kr:Wr,void 0!==l?l:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return h.key=o,h.addEventListener(P,this.handleTileChange.bind(this)),h},e.prototype.getTile=function(t,e,i,n,r){var o=this.getProjection();if(o&&r&&!ei(o,r)){var s=this.getTileCacheForProjection(r),a=[t,e,i],l=void 0,h=Ra(a);s.containsKey(h)&&(l=s.get(h));var u=this.getKey();if(l&&l.key==u)return l;var c=this.getTileGridForProjection(o),p=this.getTileGridForProjection(r),f=this.getTileCoordForTileUrlFunction(a,r),d=new Aa(o,c,r,p,a,f,this.getTilePixelRatio(n),this.getGutter(),function(t,e,i,n){return this.getTileInternal(t,e,i,n,o)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_);return d.key=u,l?(d.interimTile=l,d.refreshInterimChain(),s.replace(h,d)):s.set(h,d),d}return this.getTileInternal(t,e,i,n,o||r)},e.prototype.getTileInternal=function(t,e,i,n,r){var o=null,s=Ta(t,e,i),a=this.getKey();if(this.tileCache.containsKey(s)){if((o=this.tileCache.get(s)).key!=a){var l=o;o=this.createTile_(t,e,i,n,r,a),l.getState()==kr?o.interimTile=l.interimTile:o.interimTile=l,o.refreshInterimChain(),this.tileCache.replace(s,o)}}else o=this.createTile_(t,e,i,n,r,a),this.tileCache.set(s,o);return o},e.prototype.setRenderReprojectionEdges=function(t){if(this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){var i=Je(t);if(i){var n=g(i);n in this.tileGridForProjection||(this.tileGridForProjection[n]=e)}},e}(nl),al=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ll=function(t){function e(e){var i=e||{},n=void 0!==i.projection?i.projection:"EPSG:3857",r=void 0!==i.tileGrid?i.tileGrid:function(t){var e=t||{},i=e.extent||Je("EPSG:3857").getExtent(),n={extent:i,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:Va(i,e.maxZoom,e.tileSize,e.maxResolution)};return new Za(n)}({extent:Ua(n),maxResolution:i.maxResolution,maxZoom:i.maxZoom,minZoom:i.minZoom,tileSize:i.tileSize});return t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,opaque:i.opaque,projection:n,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileGrid:r,tileLoadFunction:i.tileLoadFunction,tilePixelRatio:i.tilePixelRatio,tileUrlFunction:i.tileUrlFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection})||this}return al(e,t),e}(sl),hl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ul=function(t){function e(e){var i,n=e||{};i=void 0!==n.attributions?n.attributions:['© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.'];var r=void 0!==n.crossOrigin?n.crossOrigin:"anonymous",o=void 0!==n.url?n.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:i,cacheSize:n.cacheSize,crossOrigin:r,opaque:void 0===n.opaque||n.opaque,maxZoom:void 0!==n.maxZoom?n.maxZoom:19,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,url:o,wrapX:n.wrapX,attributionsCollapsible:!1})||this}return hl(e,t),e}(ll),cl="bottom-left",pl="bottom-center",fl="bottom-right",dl="center-left",_l="center-center",gl="center-right",yl="top-left",vl="top-center",ml="top-right";function xl(t){return(xl="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 Sl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Cl="element",wl="map",El="offset",bl="position",Tl="positioning",Rl=function(t){function e(e){var i=t.call(this)||this;i.options=e,i.id=e.id,i.insertFirst=void 0===e.insertFirst||e.insertFirst,i.stopEvent=void 0===e.stopEvent||e.stopEvent,i.element=document.createElement("div"),i.element.className=void 0!==e.className?e.className:"ol-overlay-container ol-selectable",i.element.style.position="absolute";var n=e.autoPan;return n&&"object"!==xl(n)&&(n={animation:e.autoPanAnimation,margin:e.autoPanMargin}),i.autoPan=n||!1,i.rendered={transform_:"",visible:!0},i.mapPostrenderListenerKey=null,i.addEventListener(V(Cl),i.handleElementChanged),i.addEventListener(V(wl),i.handleMapChanged),i.addEventListener(V(El),i.handleOffsetChanged),i.addEventListener(V(bl),i.handlePositionChanged),i.addEventListener(V(Tl),i.handlePositioningChanged),void 0!==e.element&&i.setElement(e.element),i.setOffset(void 0!==e.offset?e.offset:[0,0]),i.setPositioning(void 0!==e.positioning?e.positioning:yl),void 0!==e.position&&i.setPosition(e.position),i}return Sl(e,t),e.prototype.getElement=function(){return this.get(Cl)},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get(wl)},e.prototype.getOffset=function(){return this.get(El)},e.prototype.getPosition=function(){return this.get(bl)},e.prototype.getPositioning=function(){return this.get(Tl)},e.prototype.handleElementChanged=function(){lt(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(at(this.element),E(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=C(t,c,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(Cl,t)},e.prototype.setMap=function(t){this.set(wl,t)},e.prototype.setOffset=function(t){this.set(El,t)},e.prototype.setPosition=function(t){this.set(bl,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(bl)){var i=this.getRect(e.getTargetElement(),e.getSize()),n=this.getElement(),r=this.getRect(n,[rt(n),ot(n)]),o=void 0===t.margin?20:t.margin;if(!ie(i,r)){var s=r[0]-i[0],a=i[2]-r[2],l=r[1]-i[1],h=i[3]-r[3],u=[0,0];if(s<0?u[0]=s-o:a<0&&(u[0]=Math.abs(a)+o),l<0?u[1]=l-o:h<0&&(u[1]=Math.abs(h)+o),0!==u[0]||0!==u[1]){var c=e.getView().getCenterInternal(),p=e.getPixelFromCoordinateInternal(c),f=[p[0]+u[0],p[1]+u[1]],d=t.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(f),duration:d.duration,easing:d.easing})}}}},e.prototype.getRect=function(t,e){var i=t.getBoundingClientRect(),n=i.left+window.pageXOffset,r=i.top+window.pageYOffset;return[n,r,n+e[0],r+e[1]]},e.prototype.setPositioning=function(t){this.set(Tl,t)},e.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},e.prototype.updatePixelPosition=function(){var t=this.getMap(),e=this.getPosition();if(t&&t.isRendered()&&e){var i=t.getPixelFromCoordinate(e),n=t.getSize();this.updateRenderedPosition(i,n)}else this.setVisible(!1)},e.prototype.updateRenderedPosition=function(t,e){var i=this.element.style,n=this.getOffset(),r=this.getPositioning();this.setVisible(!0);var o=Math.round(t[0]+n[0])+"px",s=Math.round(t[1]+n[1])+"px",a="0%",l="0%";r==fl||r==gl||r==ml?a="-100%":r!=pl&&r!=_l&&r!=vl||(a="-50%"),r==cl||r==pl||r==fl?l="-100%":r!=dl&&r!=_l&&r!=gl||(l="-50%");var h="translate("+a+", "+l+") translate("+o+", "+s+")";this.rendered.transform_!=h&&(this.rendered.transform_=h,i.transform=h,i.msTransform=h)},e.prototype.getOptions=function(){return this.options},e}(U),Il=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t.prototype.getColor=function(){return this.color_},t.prototype.getLineCap=function(){return this.lineCap_},t.prototype.getLineDash=function(){return this.lineDash_},t.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t.prototype.getLineJoin=function(){return this.lineJoin_},t.prototype.getMiterLimit=function(){return this.miterLimit_},t.prototype.getWidth=function(){return this.width_},t.prototype.setColor=function(t){this.color_=t},t.prototype.setLineCap=function(t){this.lineCap_=t},t.prototype.setLineDash=function(t){this.lineDash_=t},t.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t},t.prototype.setLineJoin=function(t){this.lineJoin_=t},t.prototype.setMiterLimit=function(t){this.miterLimit_=t},t.prototype.setWidth=function(t){this.width_=t},t}(),Ol=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Pl=function(t){function e(e){var i=this,n=void 0!==e.rotateWithView&&e.rotateWithView;return(i=t.call(this,{opacity:1,rotateWithView:n,rotation:void 0!==e.rotation?e.rotation:0,scale:1,displacement:void 0!==e.displacement?e.displacement:[0,0]})||this).canvas_=null,i.hitDetectionCanvas_=null,i.fill_=void 0!==e.fill?e.fill:null,i.origin_=[0,0],i.points_=e.points,i.radius_=void 0!==e.radius?e.radius:e.radius1,i.radius2_=e.radius2,i.angle_=void 0!==e.angle?e.angle:0,i.stroke_=void 0!==e.stroke?e.stroke:null,i.anchor_=null,i.size_=null,i.imageSize_=null,i.hitDetectionImageSize_=null,i.render(),i}return Ol(e,t),e.prototype.clone=function(){var t=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(),displacement:this.getDisplacement().slice()});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t},e.prototype.getAnchor=function(){return this.anchor_},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(t){return this.hitDetectionCanvas_},e.prototype.getImage=function(t){return this.canvas_},e.prototype.getImageSize=function(){return this.imageSize_},e.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_},e.prototype.getImageState=function(){return Dn},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.render=function(){var t,e="round",i="round",n=0,r=null,o=0,s=0;this.stroke_&&(null===(t=this.stroke_.getColor())&&(t="#000"),t=ks(t),void 0===(s=this.stroke_.getWidth())&&(s=1),r=this.stroke_.getLineDash(),o=this.stroke_.getLineDashOffset(),void 0===(i=this.stroke_.getLineJoin())&&(i="round"),void 0===(e=this.stroke_.getLineCap())&&(e="round"),void 0===(n=this.stroke_.getMiterLimit())&&(n=10));var a=2*(this.radius_+s)+1,l={strokeStyle:t,strokeWidth:s,size:a,lineCap:e,lineDash:r,lineDashOffset:o,lineJoin:i,miterLimit:n},h=nt(a,a);this.canvas_=h.canvas;var u=a=this.canvas_.width,c=this.getDisplacement();this.draw_(l,h,0,0),this.createHitDetectionCanvas_(l),this.anchor_=[a/2-c[0],a/2+c[1]],this.size_=[a,a],this.imageSize_=[u,u]},e.prototype.draw_=function(t,e,i,n){var r,o,s;e.setTransform(1,0,0,1,0,0),e.translate(i,n),e.beginPath();var a=this.points_;if(a===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var l=void 0!==this.radius2_?this.radius2_:this.radius_;for(l!==this.radius_&&(a*=2),r=0;r<=a;r++)o=2*r*Math.PI/a-Math.PI/2+this.angle_,s=r%2==0?this.radius_:l,e.lineTo(t.size/2+s*Math.cos(o),t.size/2+s*Math.sin(o))}if(this.fill_){var h=this.fill_.getColor();null===h&&(h="#000"),e.fillStyle=ks(h),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,e.setLineDash&&t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke()),e.closePath()},e.prototype.createHitDetectionCanvas_=function(t){if(this.hitDetectionImageSize_=[t.size,t.size],this.hitDetectionCanvas_=this.canvas_,this.fill_){var e=this.fill_.getColor(),i=0;if("string"==typeof e&&(e=Yn(e)),null===e?i=1:Array.isArray(e)&&(i=4===e.length?e[3]:1),0===i){var n=nt(t.size,t.size);this.hitDetectionCanvas_=n.canvas,this.drawHitDetectionCanvas_(t,n,0,0)}}},e.prototype.drawHitDetectionCanvas_=function(t,e,i,n){e.setTransform(1,0,0,1,0,0),e.translate(i,n),e.beginPath();var r=this.points_;if(r===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var o=void 0!==this.radius2_?this.radius2_:this.radius_;o!==this.radius_&&(r*=2);var s=void 0,a=void 0,l=void 0;for(s=0;s<=r;s++)l=2*s*Math.PI/r-Math.PI/2+this.angle_,a=s%2==0?this.radius_:o,e.lineTo(t.size/2+a*Math.cos(l),t.size/2+a*Math.sin(l))}e.fillStyle="#000",e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.stroke()),e.closePath()},e}(ar),Ml=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ll=function(t){function e(e){var i=e||{};return t.call(this,{points:1/0,fill:i.fill,radius:i.radius,stroke:i.stroke,displacement:void 0!==i.displacement?i.displacement:[0,0]})||this}return Ml(e,t),e.prototype.clone=function(){var t=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),displacement:this.getDisplacement().slice()});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(Pl),Fl=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0})},t.prototype.getColor=function(){return this.color_},t.prototype.setColor=function(t){this.color_=t},t}();function Al(t){return(Al="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 Dl=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=Gl,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex}return t.prototype.clone=function(){var e=this.getGeometry();return e&&"object"===Al(e)&&(e=e.clone()),new t({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t.prototype.getRenderer=function(){return this.renderer_},t.prototype.setRenderer=function(t){this.renderer_=t},t.prototype.getGeometry=function(){return this.geometry_},t.prototype.getGeometryFunction=function(){return this.geometryFunction_},t.prototype.getFill=function(){return this.fill_},t.prototype.setFill=function(t){this.fill_=t},t.prototype.getImage=function(){return this.image_},t.prototype.setImage=function(t){this.image_=t},t.prototype.getStroke=function(){return this.stroke_},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.getText=function(){return this.text_},t.prototype.setText=function(t){this.text_=t},t.prototype.getZIndex=function(){return this.zIndex_},t.prototype.setGeometry=function(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=Gl,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}();var kl=null;function jl(t,e){if(!kl){var i=new Fl({color:"rgba(255,255,255,0.4)"}),n=new Il({color:"#3399CC",width:1.25});kl=[new Dl({image:new Ll({fill:i,stroke:n,radius:5}),fill:i,stroke:n})]}return kl}function Gl(t){return t.getGeometry()}var zl=Dl,Wl="preload",Xl="useInterimTilesOnError",Kl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Yl=function(t){function e(e){var i=this,n=e||{},r=v({},n);return delete r.preload,delete r.useInterimTilesOnError,(i=t.call(this,r)||this).setPreload(void 0!==n.preload?n.preload:0),i.setUseInterimTilesOnError(void 0===n.useInterimTilesOnError||n.useInterimTilesOnError),i}return Kl(e,t),e.prototype.getPreload=function(){return this.get(Wl)},e.prototype.setPreload=function(t){this.set(Wl,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Xl)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Xl,t)},e}(Mo),Nl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Zl=function(t){function e(e){var i=t.call(this)||this;return i.boundHandleImageChange_=i.handleImageChange_.bind(i),i.layer_=e,i}return Nl(e,t),e.prototype.getFeatures=function(t){return d()},e.prototype.prepareFrame=function(t){return d()},e.prototype.renderFrame=function(t,e){return d()},e.prototype.loadedTileCallback=function(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i},e.prototype.createLoadedTileFinder=function(t,e,i){return function(n,r){var o=this.loadedTileCallback.bind(this,i,n);return t.forEachLoadedTile(e,n,r,o)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r){},e.prototype.getDataAtPixel=function(t,e,i){return d()},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){t.target.getState()===Dn&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return e!=Dn&&e!=kn&&t.addEventListener(P,this.boundHandleImageChange_),e==Fn&&(t.load(),e=t.getState()),e==Dn},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==Co&&t.changed()},e}(K),Bl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Vl=function(t){function e(e){var i=t.call(this,e)||this;return i.container=null,i.renderedResolution,i.tempTransform_=[1,0,0,1,0,0],i.pixelTransform=[1,0,0,1,0,0],i.inversePixelTransform=[1,0,0,1,0,0],i.context=null,i.containerReused=!1,i}return Bl(e,t),e.prototype.useContainer=function(t,e,i){var n,r,o=this.getLayer().getClassName();t&&""===t.style.opacity&&t.className===o&&((a=t.firstElementChild)instanceof HTMLCanvasElement&&(r=a.getContext("2d")));if(r&&r.canvas.style.transform===e?(this.container=t,this.context=r,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){(n=document.createElement("div")).className=o;var s=n.style;s.position="absolute",s.width="100%",s.height="100%";var a=(r=nt()).canvas;n.appendChild(a),(s=a.style).position="absolute",s.left="0",s.transformOrigin="top left",this.container=n,this.context=r}},e.prototype.clip=function(t,e,i){var n=e.pixelRatio,r=e.size[0]*n/2,o=e.size[1]*n/2,s=e.viewState.rotation,a=Ce(i),l=we(i),h=ge(i),u=_e(i);Li(e.coordinateToPixelTransform,a),Li(e.coordinateToPixelTransform,l),Li(e.coordinateToPixelTransform,h),Li(e.coordinateToPixelTransform,u),t.save(),Js(t,-s,r,o),t.beginPath(),t.moveTo(a[0]*n,a[1]*n),t.lineTo(l[0]*n,l[1]*n),t.lineTo(h[0]*n,h[1]*n),t.lineTo(u[0]*n,u[1]*n),t.clip(),Js(t,s,r,o)},e.prototype.clipUnrotated=function(t,e,i){var n=Ce(i),r=we(i),o=ge(i),s=_e(i);Li(e.coordinateToPixelTransform,n),Li(e.coordinateToPixelTransform,r),Li(e.coordinateToPixelTransform,o),Li(e.coordinateToPixelTransform,s);var a=this.inversePixelTransform;Li(a,n),Li(a,r),Li(a,o),Li(a,s),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,i){var n=this.getLayer();if(n.hasListener(t)){var r=new Ds(t,this.inversePixelTransform,i,e);n.dispatchEvent(r)}},e.prototype.preRender=function(t,e){this.dispatchRenderEvent_(Mr,t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_(Lr,t,e)},e.prototype.getRenderTransform=function(t,e,i,n,r,o,s){var a=r/2,l=o/2,h=n/e,u=-h,c=-t[0]+s,p=-t[1];return Fi(this.tempTransform_,a,l,h,u,-i,c,p)},e.prototype.getDataAtPixel=function(t,e,i){var n,r=Li(this.inversePixelTransform,t.slice()),o=this.context;try{n=o.getImageData(Math.round(r[0]),Math.round(r[1]),1,1).data}catch(t){return"SecurityError"===t.name?new Uint8Array:n}return 0===n[3]?null:n},e}(Zl),Ul=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Hl=function(t){function e(e){var i=t.call(this,e)||this;return i.extentChanged=!0,i.renderedExtent_=null,i.renderedPixelRatio,i.renderedProjection=null,i.renderedRevision,i.renderedTiles=[],i.newTiles_=!1,i.tmpExtent=[1/0,1/0,-1/0,-1/0],i.tmpTileRange_=new Ya(0,0,0,0),i}return Ul(e,t),e.prototype.isDrawableTile=function(t){var e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return i==Gr||i==Wr||i==zr&&!n},e.prototype.getTile=function(t,e,i,n){var r=n.pixelRatio,o=n.viewState.projection,s=this.getLayer(),a=s.getSource().getTile(t,e,i,r,o);return a.getState()==zr&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.newTiles_=!0):a.setState(Gr)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},e.prototype.loadedTileCallback=function(e,i,n){return!!this.isDrawableTile(n)&&t.prototype.loadedTileCallback.call(this,e,i,n)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var i=t.layerStatesArray[t.layerIndex],r=t.viewState,o=r.projection,s=r.resolution,a=r.center,l=r.rotation,h=t.pixelRatio,u=this.getLayer(),c=u.getSource(),p=c.getRevision(),f=c.getTileGridForProjection(o),d=f.getZForResolution(s,c.zDirection),_=f.getResolution(d),y=t.extent,v=i.extent&&di(i.extent,o);v&&(y=Se(y,di(i.extent,o)));var m=c.getTilePixelRatio(h),x=Math.round(t.size[0]*m),S=Math.round(t.size[1]*m);if(l){var C=Math.round(Math.sqrt(x*x+S*S));x=C,S=C}var w=_*x/2/m,E=_*S/2/m,b=[a[0]-w,a[1]-E,a[0]+w,a[1]+E],T=f.getTileRangeForExtentAndZ(y,d),R={};R[d]={};var I=this.createLoadedTileFinder(c,o,R),O=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(d,M,L,t);if(this.isDrawableTile(F)){var A=g(this);if(F.getState()==Gr){R[d][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,O),j=!1;k&&(j=I(d+1,k)),j||f.forEachTileCoordParentTileRange(F.tileCoord,I,P,O)}var G=_/s;Fi(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/m,1/m,l,-x/2,-S/2);var z,W=(z=this.pixelTransform,tt?Di(z):($s||($s=nt(1,1).canvas),$s.style.transform=Di(z),$s.style.transform));this.useContainer(e,W,i.opacity);var X=this.context,K=X.canvas;Ai(this.inversePixelTransform,this.pixelTransform),Fi(this.tempTransform_,x/2,S/2,G,G,0,-x/2,-S/2),K.width!=x||K.height!=S?(K.width=x,K.height=S):this.containerReused||X.clearRect(0,0,x,S),v&&this.clipUnrotated(X,t,v),this.preRender(X,t),this.renderedTiles.length=0;var Y,N,Z,B=Object.keys(R).map(Number);B.sort(n),1!==i.opacity||this.containerReused&&!c.getOpaque(t.viewState.projection)?(Y=[],N=[]):B=B.reverse();for(var V=B.length-1;V>=0;--V){var U=B[V],H=c.getTilePixelSize(U,h,o),q=f.getResolution(U)/_,J=H[0]*q*G,Q=H[1]*q*G,$=f.getTileCoordForCoordAndZ(Ce(b),U),et=f.getTileCoordExtent($),it=Li(this.tempTransform_,[m*(et[0]-b[0])/_,m*(b[3]-et[3])/_]),rt=m*c.getGutterForProjection(o),ot=R[U];for(var st in ot){var at=(F=ot[st]).tileCoord,lt=it[0]-($[1]-at[1])*J,ht=Math.round(lt+J),ut=it[1]-($[2]-at[2])*Q,ct=Math.round(ut+Q),pt=ht-(M=Math.round(lt)),ft=ct-(L=Math.round(ut)),dt=d===U;if(!(D=dt&&1!==F.getAlpha(g(this),t.time)))if(Y){X.save(),Z=[M,L,M+pt,L,M+pt,L+ft,M,L+ft];for(var _t=0,gt=Y.length;_t<gt;++_t)if(d!==U&&U<N[_t]){var yt=Y[_t];X.beginPath(),X.moveTo(Z[0],Z[1]),X.lineTo(Z[2],Z[3]),X.lineTo(Z[4],Z[5]),X.lineTo(Z[6],Z[7]),X.moveTo(yt[6],yt[7]),X.lineTo(yt[4],yt[5]),X.lineTo(yt[2],yt[3]),X.lineTo(yt[0],yt[1]),X.clip()}Y.push(Z),N.push(U)}else X.clearRect(M,L,pt,ft);this.drawTileImage(F,t,M,L,pt,ft,rt,dt,i.opacity),Y&&!D&&X.restore(),this.renderedTiles.push(F),this.updateUsedTiles(t.usedTiles,c,F)}}return this.renderedRevision=p,this.renderedResolution=_,this.extentChanged=!this.renderedExtent_||!le(this.renderedExtent_,b),this.renderedExtent_=b,this.renderedPixelRatio=h,this.renderedProjection=o,this.manageTilePyramid(t,c,f,h,o,y,d,u.getPreload()),this.scheduleExpireCache(t,c),this.postRender(X,t),i.extent&&X.restore(),W!==K.style.transform&&(K.style.transform=W),this.container},e.prototype.drawTileImage=function(t,e,i,n,r,o,s,a,l){var h=this.getTileImage(t);if(h){var u=g(this),c=a?t.getAlpha(u,e.time):1,p=l*c,f=p!==this.context.globalAlpha;f&&(this.context.save(),this.context.globalAlpha=p),this.context.drawImage(h,s,s,h.width-2*s,h.height-2*s,i,n,r,o),f&&this.context.restore(),1!==c?e.animate=!0:a&&t.endTransition(u)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getTileImage=function(t){return t.getImage()},e.prototype.scheduleExpireCache=function(t,e){if(e.canExpireCache()){var i=function(t,e,i){var n=g(t);n in i.usedTiles&&t.expireCache(i.viewState.projection,i.usedTiles[n])}.bind(null,e);t.postRenderFunctions.push(i)}},e.prototype.updateUsedTiles=function(t,e,i){var n=g(e);n in t||(t[n]={}),t[n][i.getKey()]=!0},e.prototype.manageTilePyramid=function(t,e,i,n,r,o,s,a,l){var h=g(e);h in t.wantedTiles||(t.wantedTiles[h]={});var u,c,p,f,d,_,y=t.wantedTiles[h],v=t.tileQueue;for(_=i.getMinZoom();_<=s;++_)for(c=i.getTileRangeForExtentAndZ(o,_,c),p=i.getResolution(_),f=c.minX;f<=c.maxX;++f)for(d=c.minY;d<=c.maxY;++d)s-_<=a?((u=e.getTile(_,f,d,n,r)).getState()==kr&&(y[u.getKey()]=!0,v.isKeyQueued(u.getKey())||v.enqueue([u,h,i.getTileCoordCenter(u.tileCoord),p])),void 0!==l&&l(u)):e.useTile(_,f,d,r)},e}(Vl);Hl.prototype.getLayer;var ql=Hl,Jl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ql=function(t){function e(e){return t.call(this,e)||this}return Jl(e,t),e.prototype.createRenderer=function(){return new ql(this)},e}(Yl),$l="arraybuffer",th="json",eh="text",ih="xml",nh=!1;function rh(t,e){return function(t,e,i,n){return function(r,o,s){var a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(r,o,s):t,!0),e.getType()==$l&&(a.responseType="arraybuffer"),a.withCredentials=nh,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var o=e.getType(),l=void 0;o==th||o==eh?l=a.responseText:o==ih?(l=a.responseXML)||(l=(new DOMParser).parseFromString(a.responseText,"application/xml")):o==$l&&(l=a.response),l?i.call(this,e.readFeatures(l,{extent:r,featureProjection:s}),e.readProjection(l)):n.call(this)}else n.call(this)}.bind(this),a.onerror=function(){n.call(this)}.bind(this),a.send()}}(t,e,(function(t,e){"function"==typeof this.addFeatures&&this.addFeatures(t)}),u)}function oh(t,e){return[[-1/0,-1/0,1/0,1/0]]}var sh="addfeature",ah="changefeature",lh="clear",hh="removefeature",uh=i(374),ch=i.n(uh),ph=function(){function t(t){this.rbush_=new ch.a(t),this.items_={}}return t.prototype.insert=function(t,e){var i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[g(e)]=i},t.prototype.load=function(t,e){for(var i=new Array(e.length),n=0,r=e.length;n<r;n++){var o=t[n],s=e[n],a={minX:o[0],minY:o[1],maxX:o[2],maxY:o[3],value:s};i[n]=a,this.items_[g(s)]=a}this.rbush_.load(i)},t.prototype.remove=function(t){var e=g(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)},t.prototype.update=function(t,e){var i=this.items_[g(e)];le([i.minX,i.minY,i.maxX,i.maxY],t)||(this.remove(e),this.insert(t,e))},t.prototype.getAll=function(){return this.rbush_.all().map((function(t){return t.value}))},t.prototype.getInExtent=function(t){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map((function(t){return t.value}))},t.prototype.forEach=function(t){return this.forEach_(this.getAll(),t)},t.prototype.forEachInExtent=function(t,e){return this.forEach_(this.getInExtent(t),e)},t.prototype.forEach_=function(t,e){for(var i,n=0,r=t.length;n<r;n++)if(i=e(t[n]))return i;return i},t.prototype.isEmpty=function(){return S(this.items_)},t.prototype.clear=function(){this.rbush_.clear(),this.items_={}},t.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return se(e.minX,e.minY,e.maxX,e.maxY,t)},t.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_[e]},t}(),fh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),dh=function(t){function e(e,i){var n=t.call(this,e)||this;return n.feature=i,n}return fh(e,t),e}(R),_h=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,{attributions:n.attributions,projection:void 0,state:Co,wrapX:void 0===n.wrapX||n.wrapX})||this).loader_=u,i.format_=n.format,i.overlaps_=void 0===n.overlaps||n.overlaps,i.url_=n.url,void 0!==n.loader?i.loader_=n.loader:void 0!==i.url_&&(wt(i.format_,7),i.loader_=rh(i.url_,i.format_)),i.strategy_=void 0!==n.strategy?n.strategy:oh;var r,o,s=void 0===n.useSpatialIndex||n.useSpatialIndex;return i.featuresRtree_=s?new ph:null,i.loadedExtentsRtree_=new ph,i.nullGeometryFeatures_={},i.idIndex_={},i.uidIndex_={},i.featureChangeKeys_={},i.featuresCollection_=null,Array.isArray(n.features)?o=n.features:n.features&&(o=(r=n.features).getArray()),s||void 0!==r||(r=new _r(o)),void 0!==o&&i.addFeaturesInternal(o),void 0!==r&&i.bindFeaturesCollection_(r),i}return fh(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=g(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var i=t.getGeometry();if(i){var n=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(n,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new dh(sh,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[C(e,P,this.handleFeatureChange_,this),C(e,y,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var i=!0,n=e.getId();return void 0!==n&&(n.toString()in this.idIndex_?i=!1:this.idIndex_[n.toString()]=e),i&&(wt(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),i},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],i=[],n=[],r=0,o=t.length;r<o;r++){var s=g(l=t[r]);this.addToIndex_(s,l)&&i.push(l)}r=0;for(var a=i.length;r<a;r++){var l;s=g(l=i[r]);this.setupChangeEvents_(s,l);var h=l.getGeometry();if(h){var u=h.getExtent();e.push(u),n.push(l)}else this.nullGeometryFeatures_[s]=l}this.featuresRtree_&&this.featuresRtree_.load(e,n);r=0;for(var c=i.length;r<c;r++)this.dispatchEvent(new dh(sh,i[r]))},e.prototype.bindFeaturesCollection_=function(t){var e=!1;this.addEventListener(sh,(function(i){e||(e=!0,t.push(i.feature),e=!1)})),this.addEventListener(hh,(function(i){e||(e=!0,t.remove(i.feature),e=!1)})),t.addEventListener(ur,function(t){e||(e=!0,this.addFeature(t.element),e=!1)}.bind(this)),t.addEventListener(cr,function(t){e||(e=!0,this.removeFeature(t.element),e=!1)}.bind(this)),this.featuresCollection_=t},e.prototype.clear=function(t){if(t){for(var e in this.featureChangeKeys_){this.featureChangeKeys_[e].forEach(E)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_)for(var i in this.featuresRtree_.forEach(this.removeFeatureInternal.bind(this)),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[i]);this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var n=new dh(lh);this.dispatchEvent(n),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,e){var i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,(function(i){return i.getGeometry().intersectsCoordinate(t)?e(i):void 0}))},e.prototype.forEachFeatureInExtent=function(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)},e.prototype.forEachFeatureIntersectingExtent=function(t,e){return this.forEachFeatureInExtent(t,(function(i){if(i.getGeometry().intersectsExtent(t)){var n=e(i);if(n)return n}}))},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray():this.featuresRtree_&&(t=this.featuresRtree_.getAll(),S(this.nullGeometryFeatures_)||s(t,x(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e},e.prototype.getFeaturesInExtent=function(t){return this.featuresRtree_?this.featuresRtree_.getInExtent(t):this.featuresCollection_?this.featuresCollection_.getArray():[]},e.prototype.getClosestFeatureToCoordinate=function(t,e){var i=t[0],n=t[1],r=null,o=[NaN,NaN],s=1/0,a=[-1/0,-1/0,1/0,1/0],h=e||l;return this.featuresRtree_.forEachInExtent(a,(function(t){if(h(t)){var e=t.getGeometry(),l=s;if((s=e.closestPointXY(i,n,o,s))<l){r=t;var u=Math.sqrt(s);a[0]=i-u,a[1]=n-u,a[2]=i+u,a[3]=n+u}}})),r},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var e=this.idIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getFeatureByUid=function(t){var e=this.uidIndex_[t];return void 0!==e?e:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var e=t.target,i=g(e),n=e.getGeometry();if(n){var r=n.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(r,e)):this.featuresRtree_&&this.featuresRtree_.update(r,e)}else i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);var o=e.getId();if(void 0!==o){var s=o.toString();this.idIndex_[s]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[s]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[i]=e;this.changed(),this.dispatchEvent(new dh(ah,e))},e.prototype.hasFeature=function(t){var e=t.getId();return void 0!==e?e in this.idIndex_:g(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_.isEmpty()&&S(this.nullGeometryFeatures_)},e.prototype.loadFeatures=function(t,e,i){var n=this.loadedExtentsRtree_,r=this.strategy_(t,e);this.loading=!1;for(var o=function(t,o){var a=r[t];n.forEachInExtent(a,(function(t){return ie(t.extent,a)}))||(s.loader_.call(s,a,e,i),n.insert(a,{extent:a.slice()}),s.loading=s.loader_!==u)},s=this,a=0,l=r.length;a<l;++a)o(a)},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),t.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var e,i=this.loadedExtentsRtree_;i.forEachInExtent(t,(function(i){if(le(i.extent,t))return e=i,!0})),e&&i.remove(e)},e.prototype.removeFeature=function(t){var e=g(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=g(t);this.featureChangeKeys_[e].forEach(E),delete this.featureChangeKeys_[e];var i=t.getId();void 0!==i&&delete this.idIndex_[i.toString()],delete this.uidIndex_[e],this.dispatchEvent(new dh(hh,t))},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var i in this.idIndex_)if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){wt(this.format_,7),this.setLoader(rh(t,this.format_))},e}(Wa),gh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),yh="renderOrder",vh=function(t){function e(e){var i=this,n=e||{},r=v({},n);return delete r.style,delete r.renderBuffer,delete r.updateWhileAnimating,delete r.updateWhileInteracting,(i=t.call(this,r)||this).declutter_=void 0!==n.declutter&&n.declutter,i.renderBuffer_=void 0!==n.renderBuffer?n.renderBuffer:100,i.style_=null,i.styleFunction_=void 0,i.setStyle(n.style),i.updateWhileAnimating_=void 0!==n.updateWhileAnimating&&n.updateWhileAnimating,i.updateWhileInteracting_=void 0!==n.updateWhileInteracting&&n.updateWhileInteracting,i}return gh(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(yh)},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.setRenderOrder=function(t){this.set(yh,t)},e.prototype.setStyle=function(t){this.style_=void 0!==t?t:jl,this.styleFunction_=null===t?void 0:function(t){var e;if("function"==typeof t)e=t;else{var i;if(Array.isArray(t))i=t;else wt("function"==typeof t.getZIndex,41),i=[t];e=function(){return i}}return e}(this.style_),this.changed()},e}(Mo),mh={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},xh=[mh.FILL],Sh=[mh.STROKE],Ch=[mh.BEGIN_PATH],wh=[mh.CLOSE_PATH],Eh=mh,bh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Th=function(t){function e(e,i,n,r){var o=t.call(this)||this;return o.tolerance=e,o.maxExtent=i,o.pixelRatio=r,o.maxLineWidth=0,o.resolution=n,o.beginGeometryInstruction1_=null,o.beginGeometryInstruction2_=null,o.bufferedMaxExtent_=null,o.instructions=[],o.coordinates=[],o.tmpCoordinate_=[],o.hitDetectionInstructions=[],o.state={},o}return bh(e,t),e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))},e.prototype.appendFlatCoordinates=function(t,e,i,n,r,o){var s=this.coordinates.length,a=this.getBufferedMaxExtent();o&&(e+=n);var l,h,u,c=t[e],p=t[e+1],f=this.tmpCoordinate_,d=!0;for(l=e+n;l<i;l+=n)f[0]=t[l],f[1]=t[l+1],(u=re(a,f))!==h?(d&&(this.coordinates[s++]=c,this.coordinates[s++]=p),this.coordinates[s++]=f[0],this.coordinates[s++]=f[1],d=!1):u===Bt?(this.coordinates[s++]=f[0],this.coordinates[s++]=f[1],d=!1):d=!0,c=f[0],p=f[1],h=u;return(r&&d||l===e+n)&&(this.coordinates[s++]=c,this.coordinates[s++]=p),s},e.prototype.drawCustomCoordinates_=function(t,e,i,n,r){for(var o=0,s=i.length;o<s;++o){var a=i[o],l=this.appendFlatCoordinates(t,e,a,n,!1,!1);r.push(l),e=a}return e},e.prototype.drawCustom=function(t,e,i){this.beginGeometry(t,e);var n,r,o,s,a,l=t.getType(),h=t.getStride(),u=this.coordinates.length;if(l==jt){n=(t=t).getOrientedFlatCoordinates(),s=[];var c=t.getEndss();a=0;for(var p=0,f=c.length;p<f;++p){var d=[];a=this.drawCustomCoordinates_(n,a,c[p],h,d),s.push(d)}this.instructions.push([Eh.CUSTOM,u,s,t,i,$i])}else l==At||l==kt?(o=[],n=l==At?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),a=this.drawCustomCoordinates_(n,0,t.getEnds(),h,o),this.instructions.push([Eh.CUSTOM,u,o,t,i,Qi])):l==Lt||l==Dt?(n=t.getFlatCoordinates(),r=this.appendFlatCoordinates(n,0,n.length,h,!1,!1),this.instructions.push([Eh.CUSTOM,u,r,t,i,Ji])):l==Mt&&(n=t.getFlatCoordinates(),this.coordinates.push(n[0],n[1]),r=this.coordinates.length,this.instructions.push([Eh.CUSTOM,u,r,t,i]));this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){var i=t.getExtent();this.beginGeometryInstruction1_=[Eh.BEGIN_GEOMETRY,e,0,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Eh.BEGIN_GEOMETRY,e,0,i],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var i,n,r=e.length,s=-1;for(t=0;t<r;++t)(n=(i=e[t])[0])==Eh.END_GEOMETRY?s=t:n==Eh.BEGIN_GEOMETRY&&(i[2]=t,o(this.hitDetectionInstructions,s,t),s=-1)},e.prototype.setFillStrokeStyle=function(t,e){var i=this.state;if(t){var n=t.getColor();i.fillStyle=ks(n||"#000")}else i.fillStyle=void 0;if(e){var r=e.getColor();i.strokeStyle=ks(r||"#000");var o=e.getLineCap();i.lineCap=void 0!==o?o:"round";var s=e.getLineDash();i.lineDash=s?s.slice():Gs;var a=e.getLineDashOffset();i.lineDashOffset=a||0;var l=e.getLineJoin();i.lineJoin=void 0!==l?l:"round";var h=e.getWidth();i.lineWidth=void 0!==h?h:1;var u=e.getMiterLimit();i.miterLimit=void 0!==u?u:10,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,i=[Eh.SET_FILL_STYLE,e];return"string"!=typeof e&&i.push(!0),i},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[Eh.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e){var i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)},e.prototype.updateStrokeStyle=function(t,e){var i=t.strokeStyle,n=t.lineCap,r=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,l=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||r!=t.currentLineDash&&!a(t.currentLineDash,r)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=l||t.currentMiterLimit!=h)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=r,t.currentLineDashOffset=o,t.currentLineJoin=s,t.currentLineWidth=l,t.currentMiterLimit=h)},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=[Eh.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=$t(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;Qt(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(js),Rh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ih=function(t){function e(e,i,n,r){var o=t.call(this,e,i,n,r)||this;return o.declutterGroups_=null,o.hitDetectionImage_=null,o.image_=null,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}return Rh(e,t),e.prototype.drawCoordinates_=function(t,e,i,n){return this.appendFlatCoordinates(t,e,i,n,!1,!1)},e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),r=this.coordinates.length,o=this.drawCoordinates_(i,0,i.length,n);this.instructions.push([Eh.DRAW_IMAGE,r,o,this.image_,this.anchorX_,this.anchorY_,this.declutterGroups_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.width_]),this.hitDetectionInstructions.push([Eh.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroups_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),r=this.coordinates.length,o=this.drawCoordinates_(i,0,i.length,n);this.instructions.push([Eh.DRAW_IMAGE,r,o,this.image_,this.anchorX_,this.anchorY_,this.declutterGroups_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.width_]),this.hitDetectionInstructions.push([Eh.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroups_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_]),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.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,t.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,e){var i=t.getAnchor(),n=t.getSize(),r=t.getHitDetectionImage(1),o=t.getImage(1),s=t.getOrigin();this.anchorX_=i[0],this.anchorY_=i[1],this.declutterGroups_=e,this.hitDetectionImage_=r,this.image_=o,this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScale(),this.width_=n[0]},e}(Th),Oh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ph=function(t){function e(e,i,n,r){return t.call(this,e,i,n,r)||this}return Oh(e,t),e.prototype.drawFlatCoordinates_=function(t,e,i,n){var r=this.coordinates.length,o=this.appendFlatCoordinates(t,e,i,n,!1,!1),s=[Eh.MOVE_TO_LINE_TO,r,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),i},e.prototype.drawLineString=function(t,e){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Eh.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],Ch);var o=t.getFlatCoordinates(),s=t.getStride();this.drawFlatCoordinates_(o,0,o.length,s),this.hitDetectionInstructions.push(Sh),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Eh.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],Ch);for(var o=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),l=0,h=0,u=o.length;h<u;++h)l=this.drawFlatCoordinates_(s,l,o[h],a);this.hitDetectionInstructions.push(Sh),this.endGeometry(e)}},e.prototype.finish=function(){var e=this.state;return null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push(Sh),this.reverseHitDetectionInstructions(),this.state=null,t.prototype.finish.call(this)},e.prototype.applyStroke=function(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(Sh),e.lastStroke=this.coordinates.length),e.lastStroke=0,t.prototype.applyStroke.call(this,e),this.instructions.push(Ch)},e}(Th),Mh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Lh=function(t){function e(e,i,n,r){return t.call(this,e,i,n,r)||this}return Mh(e,t),e.prototype.drawFlatCoordinatess_=function(t,e,i,n){var r=this.state,o=void 0!==r.fillStyle,s=void 0!==r.strokeStyle,a=i.length;this.instructions.push(Ch),this.hitDetectionInstructions.push(Ch);for(var l=0;l<a;++l){var h=i[l],u=this.coordinates.length,c=this.appendFlatCoordinates(t,e,h,n,!0,!s),p=[Eh.MOVE_TO_LINE_TO,u,c];this.instructions.push(p),this.hitDetectionInstructions.push(p),s&&(this.instructions.push(wh),this.hitDetectionInstructions.push(wh)),e=h}return o&&(this.instructions.push(xh),this.hitDetectionInstructions.push(xh)),s&&(this.instructions.push(Sh),this.hitDetectionInstructions.push(Sh)),e},e.prototype.drawCircle=function(t,e){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([Eh.SET_FILL_STYLE,"#000"]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([Eh.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o=t.getFlatCoordinates(),s=t.getStride(),a=this.coordinates.length;this.appendFlatCoordinates(o,0,o.length,s,!1,!1);var l=[Eh.CIRCLE,a];this.instructions.push(Ch,l),this.hitDetectionInstructions.push(Ch,l),void 0!==i.fillStyle&&(this.instructions.push(xh),this.hitDetectionInstructions.push(xh)),void 0!==i.strokeStyle&&(this.instructions.push(Sh),this.hitDetectionInstructions.push(Sh)),this.endGeometry(e)}},e.prototype.drawPolygon=function(t,e){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([Eh.SET_FILL_STYLE,"#000"]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([Eh.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o=t.getEnds(),s=t.getOrientedFlatCoordinates(),a=t.getStride();this.drawFlatCoordinatess_(s,0,o,a),this.endGeometry(e)}},e.prototype.drawMultiPolygon=function(t,e){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([Eh.SET_FILL_STYLE,"#000"]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([Eh.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);for(var o=t.getEndss(),s=t.getOrientedFlatCoordinates(),a=t.getStride(),l=0,h=0,u=o.length;h<u;++h)l=this.drawFlatCoordinatess_(s,l,o[h],a);this.endGeometry(e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e)for(var i=this.coordinates,n=0,r=i.length;n<r;++n)i[n]=en(i[n],e);return t.prototype.finish.call(this)},e.prototype.setFillStrokeStyles_=function(){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},e}(Th);function Fh(t,e,i,n,r){var o,s,a,l,h,u,c,p,f,d=i,_=i,g=0,y=0,v=i;for(o=i;o<n;o+=r){var m=e[o],x=e[o+1];void 0!==l&&(p=m-l,f=x-h,a=Math.sqrt(p*p+f*f),void 0!==u&&(y+=s,Math.acos((u*p+c*f)/(s*a))>t&&(y>g&&(g=y,d=v,_=o),y=0,v=o-r)),s=a,u=p,c=f),l=m,h=x}return(y+=a)>g?[v,o]:[d,_]}var Ah="line",Dh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),kh={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},jh={Circle:Lh,Default:Th,Image:Ih,LineString:Ph,Polygon:Lh,Text:function(t){function e(e,i,n,r){var o=t.call(this,e,i,n,r)||this;return o.declutterGroups_,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}return Dh(e,t),e.prototype.finish=function(){var e=t.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},e.prototype.drawText=function(t,e){var i=this.textFillState_,n=this.textStrokeState_,r=this.textState_;if(""!==this.text_&&r&&(i||n)){var o,s,a=this.coordinates.length,l=t.getType(),h=null,u=2,c=2;if(r.placement===Ah){if(!be(this.getBufferedMaxExtent(),t.getExtent()))return;var p=void 0;if(h=t.getFlatCoordinates(),c=t.getStride(),l==Lt)p=[h.length];else if(l==kt)p=t.getEnds();else if(l==At)p=t.getEnds().slice(0,1);else if(l==jt){var f=t.getEndss();for(p=[],o=0,s=f.length;o<s;++o)p.push(f[o][0])}this.beginGeometry(t,e);for(var d=r.textAlign,_=0,g=void 0,y=0,v=p.length;y<v;++y){if(null==d){var m=Fh(r.maxAngle,h,_,p[y],c);_=m[0],g=m[1]}else g=p[y];for(o=_;o<g;o+=c)this.coordinates.push(h[o],h[o+1]);u=this.coordinates.length,_=p[y];var x=this.declutterGroups_?0===y?this.declutterGroups_[0]:[].concat(this.declutterGroups_[0]):null;this.drawChars_(a,u,x),a=u}this.endGeometry(e)}else{var S=null;switch(r.overflow||(S=[]),l){case Mt:case Dt:u=(h=t.getFlatCoordinates()).length;break;case Lt:h=t.getFlatMidpoint();break;case zt:h=t.getCenter();break;case kt:u=(h=t.getFlatMidpoints()).length;break;case At:h=t.getFlatInteriorPoint(),r.overflow||S.push(h[2]/this.resolution),c=3;break;case jt:var C=t.getFlatInteriorPoints();for(h=[],o=0,s=C.length;o<s;o+=3)r.overflow||S.push(C[o+2]/this.resolution),h.push(C[o],C[o+1]);if(0==(u=h.length))return}u=this.appendFlatCoordinates(h,0,u,c,!1,!1),this.saveTextStates_(),(r.backgroundFill||r.backgroundStroke)&&(this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke),r.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),r.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);var w=this.pixelRatio;this.instructions.push([Eh.DRAW_IMAGE,a,u,null,NaN,NaN,this.declutterGroups_,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,1,NaN,r.padding==zs?zs:r.padding.map((function(t){return t*w})),!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,S]),this.hitDetectionInstructions.push([Eh.DRAW_IMAGE,a,u,null,NaN,NaN,this.declutterGroups_,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,1/this.pixelRatio,NaN,r.padding,!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,S]),this.endGeometry(e)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,n=this.strokeKey_;t&&(n in this.strokeStates||(this.strokeStates[n]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||"center",textBaseline:e.textBaseline||"middle",scale:e.scale});var o=this.fillKey_;i&&(o in this.fillStates||(this.fillStates[o]={fillStyle:i.fillStyle}))},e.prototype.drawChars_=function(t,e,i){var n=this.textStrokeState_,r=this.textState_,o=this.strokeKey_,s=this.textKey_,a=this.fillKey_;this.saveTextStates_();var l=this.pixelRatio,h=kh[r.textBaseline],u=this.textOffsetY_*l,c=this.text_,p=r.scale,f=n?n.lineWidth*p/2:0;this.instructions.push([Eh.DRAW_CHARS,t,e,h,i,r.overflow,a,r.maxAngle,l,u,o,f*l,c,s,1]),this.hitDetectionInstructions.push([Eh.DRAW_CHARS,t,e,h,i,r.overflow,a,r.maxAngle,1,u,o,f,c,s,1/l])},e.prototype.setTextStyle=function(t,e){var i,n,r;if(t){this.declutterGroups_=e;var o=t.getFill();o?((n=this.textFillState_)||(n={},this.textFillState_=n),n.fillStyle=ks(o.getColor()||"#000")):(n=null,this.textFillState_=n);var s=t.getStroke();if(s){(r=this.textStrokeState_)||(r={},this.textStrokeState_=r);var a=s.getLineDash(),l=s.getLineDashOffset(),h=s.getWidth(),u=s.getMiterLimit();r.lineCap=s.getLineCap()||"round",r.lineDash=a?a.slice():Gs,r.lineDashOffset=void 0===l?0:l,r.lineJoin=s.getLineJoin()||"round",r.lineWidth=void 0===h?1:h,r.miterLimit=void 0===u?10:u,r.strokeStyle=ks(s.getColor()||"#000")}else r=null,this.textStrokeState_=r;i=this.textState_;var c=t.getFont()||"10px sans-serif";Bs(c);var p=t.getScale();i.overflow=t.getOverflow(),i.font=c,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.textBaseline=t.getTextBaseline()||"middle",i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||zs,i.scale=void 0===p?1:p;var f=t.getOffsetX(),d=t.getOffsetY(),_=t.getRotateWithView(),y=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===f?0:f,this.textOffsetY_=void 0===d?0:d,this.textRotateWithView_=void 0!==_&&_,this.textRotation_=void 0===y?0:y,this.strokeKey_=r?("string"==typeof r.strokeStyle?r.strokeStyle:g(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.textBaseline||"?"),this.fillKey_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+g(n.fillStyle):""}else this.text_=""},e}(Th)},Gh=function(){function t(t,e,i,n,r){this.declutter_=r,this.declutterGroups_=null,this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=n,this.resolution_=i,this.buildersByZIndex_={}}return t.prototype.addDeclutter=function(t){var e=null;return this.declutter_&&(t?(e=this.declutterGroups_)[0][4]++:(e=[[1/0,1/0,-1/0,-1/0]],this.declutterGroups_=e,e[0].push(1))),e},t.prototype.finish=function(){var t={};for(var e in this.buildersByZIndex_){t[e]=t[e]||{};var i=this.buildersByZIndex_[e];for(var n in i){var r=i[n].finish();t[e][n]=r}}return t},t.prototype.getBuilder=function(t,e){var i=void 0!==t?t.toString():"0",n=this.buildersByZIndex_[i];void 0===n&&(n={},this.buildersByZIndex_[i]=n);var r=n[e];void 0===r&&(r=new(0,jh[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),n[e]=r);return r},t}();function zh(t,e,i,n,r,o,s,a,l,h,u){for(var c,p,f=[],d=t[e]>t[i-n],_=r.length,g=t[e],y=t[e+1],v=t[e+=n],m=t[e+1],x=0,S=Math.sqrt(Math.pow(v-g,2)+Math.pow(m-y,2)),C=!1,w=0;w<_;++w){for(var E=r[c=d?_-w-1:w],b=a*l(h,E,u),T=o+b/2;e<i-n&&x+S<T;)g=v,y=m,v=t[e+=n],m=t[e+1],x+=S,S=Math.sqrt(Math.pow(v-g,2)+Math.pow(m-y,2));var R=T-x,I=Math.atan2(m-y,v-g);if(d&&(I+=I>0?-Math.PI:Math.PI),void 0!==p){var O=I-p;if(C=C||0!==O,O+=O>Math.PI?-2*Math.PI:O<-Math.PI?2*Math.PI:0,Math.abs(O)>s)return null}p=I;var P=R/S,M=Pt(g,v,P),L=Pt(y,m,P);f[c]=[M,L,b/2,I,E],o+=b}return C?f:[[f[0][0],f[0][1],f[0][2],f[0][3],r]]}var Wh=[1/0,1/0,-1/0,-1/0],Xh=[1,0,0,1,0,0],Kh=[],Yh=[],Nh=[],Zh=[],Bh=function(){function t(t,e,i,n){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.declutterItems=[],this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={}}return t.prototype.createLabel=function(t,e,i,n){var r=t+e+i+n;if(this.labels_[r])return this.labels_[r];var o=n?this.strokeStates[n]:null,s=i?this.fillStates[i]:null,a=this.textStates[e],l=this.pixelRatio,h=a.scale*l,u=kh[a.textAlign||"center"],c=n&&o.lineWidth?o.lineWidth:0,p=t.split("\n"),f=p.length,d=[],_=function(t,e,i){for(var n=e.length,r=0,o=0;o<n;++o){var s=Hs(t,e[o]);r=Math.max(r,s),i.push(s)}return r}(a.font,p,d),g=Vs(a.font),y=g*f,v=_+c,m=[],x={width:Math.ceil((v+2)*h),height:Math.ceil((y+c)*h),contextInstructions:m};(1!=h&&m.push("scale",[h,h]),m.push("font",a.font),n)&&(m.push("strokeStyle",o.strokeStyle),m.push("lineWidth",c),m.push("lineCap",o.lineCap),m.push("lineJoin",o.lineJoin),m.push("miterLimit",o.miterLimit),(tt?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(m.push("setLineDash",[o.lineDash]),m.push("lineDashOffset",o.lineDashOffset)));i&&m.push("fillStyle",s.fillStyle),m.push("textBaseline","middle"),m.push("textAlign","center");var S,C=.5-u,w=u*v+C*c;if(n)for(S=0;S<f;++S)m.push("strokeText",[p[S],w+C*d[S],.5*(c+g)+S*g]);if(i)for(S=0;S<f;++S)m.push("fillText",[p[S],w+C*d[S],.5*(c+g)+S*g]);return this.labels_[r]=x,x},t.prototype.replayTextBackground_=function(t,e,i,n,r,o,s){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,n),t.lineTo.apply(t,r),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],this.fill_(t)),s&&(this.setStrokeStyle_(t,s),t.stroke())},t.prototype.replayImageOrLabel_=function(t,e,i,n,r,o,s,a,l,h,u,c,p,f,d,_,g,y){var v=g||y;e-=r*=p,i-=o*=p;var m=d+h>n.width?n.width-h:d,x=a+u>n.height?n.height-u:a,S=_[3]+m*p+_[1],C=_[0]+x*p+_[2],w=e-_[3],E=i-_[0];(v||0!==c)&&(Kh[0]=w,Zh[0]=w,Kh[1]=E,Yh[1]=E,Yh[0]=w+S,Nh[0]=Yh[0],Nh[1]=E+C,Zh[1]=Nh[1]);var b=null;if(0!==c){var T=e+r,R=i+o;b=Fi(Xh,T,R,1,1,c,-T,-R),Li(Xh,Kh),Li(Xh,Yh),Li(Xh,Nh),Li(Xh,Zh),se(Math.min(Kh[0],Yh[0],Nh[0],Zh[0]),Math.min(Kh[1],Yh[1],Nh[1],Zh[1]),Math.max(Kh[0],Yh[0],Nh[0],Zh[0]),Math.max(Kh[1],Yh[1],Nh[1],Zh[1]),Wh)}else se(w,E,w+S,E+C,Wh);var I=t.canvas,O=y?y[2]*p/2:0,P=Wh[0]-O<=I.width&&Wh[2]+O>=0&&Wh[1]-O<=I.height&&Wh[3]+O>=0;if(f&&(e=Math.round(e),i=Math.round(i)),s){if(!P&&1==s[4])return;he(s,Wh);var M=P?[t,b?b.slice(0):null,l,n,h,u,m,x,e,i,p]:null;M&&(v&&M.push(g,y,Kh.slice(0),Yh.slice(0),Nh.slice(0),Zh.slice(0)),s.push(M))}else P&&(v&&this.replayTextBackground_(t,Kh,Yh,Nh,Zh,g,y),Qs(t,b,l,n,h,u,m,x,e,i,p))},t.prototype.fill_=function(t){if(this.alignFill_){var e=Li(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},t.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},t.prototype.renderDeclutter=function(t,e,i,n){if(t&&t.length>5){var r=t[4];if(1==r||r==t.length-5){var o={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};if(n||(n=new ch.a(9)),!n.collides(o)){n.insert(o);for(var s=5,a=t.length;s<a;++s){var l=t[s],h=l[0],u=h.globalAlpha;u!==i&&(h.globalAlpha=i),l.length>11&&this.replayTextBackground_(l[0],l[13],l[14],l[15],l[16],l[11],l[12]),Qs.apply(void 0,l),u!==i&&(h.globalAlpha=u)}}t.length=5,ae(t)}}return n},t.prototype.drawLabelWithPointPlacement_=function(t,e,i,n){var r=this.textStates[e],o=this.createLabel(t,e,n,i),s=this.strokeStates[i],a=this.pixelRatio,l=kh[r.textAlign||"center"],h=kh[r.textBaseline||"middle"],u=s&&s.lineWidth?s.lineWidth:0;return{label:o,anchorX:l*(o.width/a-2*r.scale)+2*(.5-l)*u,anchorY:h*o.height/a+2*(.5-h)*u}},t.prototype.execute_=function(t,e,i,n,r,o){var s,l,h;this.declutterItems.length=0,this.pixelCoordinates_&&a(e,this.renderedTransform_)?s=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),s=Pi(this.coordinates,0,this.coordinates.length,2,e,this.pixelCoordinates_),l=this.renderedTransform_,h=e,l[0]=h[0],l[1]=h[1],l[2]=h[2],l[3]=h[3],l[4]=h[4],l[5]=h[5]);for(var u,c,p,f,d,_,g,y,v,m,x,S,C,w,E,b,T,R=0,I=i.length,O=0,P=0,M=0,L=null,F=null,A=this.coordinateCache_,D=this.viewRotation_,k=Math.round(1e12*Math.atan2(-e[1],e[0]))/1e12,j={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:D},G=this.instructions!=i||this.overlaps?0:200;R<I;){var z=i[R];switch(z[0]){case Eh.BEGIN_GEOMETRY:(E=z[1]).getGeometry()?void 0===o||be(o,z[3])?++R:R=z[2]+1:R=z[2];break;case Eh.BEGIN_PATH:P>G&&(this.fill_(t),P=0),M>G&&(t.stroke(),M=0),P||M||(t.beginPath(),f=NaN,d=NaN),++R;break;case Eh.CIRCLE:var W=s[O=z[1]],X=s[O+1],K=s[O+2]-W,Y=s[O+3]-X,N=Math.sqrt(K*K+Y*Y);t.moveTo(W+N,X),t.arc(W,X,N,0,2*Math.PI,!0),++R;break;case Eh.CLOSE_PATH:t.closePath(),++R;break;case Eh.CUSTOM:O=z[1],u=z[2];var Z=z[3],B=z[4],V=6==z.length?z[5]:void 0;j.geometry=Z,j.feature=E,R in A||(A[R]=[]);var U=A[R];V?V(s,O,u,2,U):(U[0]=s[O],U[1]=s[O+1],U.length=2),B(U,j),++R;break;case Eh.DRAW_IMAGE:O=z[1],u=z[2],m=z[3],c=z[4],p=z[5],v=r?null:z[6];var H=z[7],q=z[8],J=z[9],Q=z[10],$=z[11],tt=z[12],et=z[13],it=z[14];if(!m&&z.length>=19){x=z[18],S=z[19],C=z[20],w=z[21];var nt=this.drawLabelWithPointPlacement_(x,S,C,w);m=nt.label,z[3]=m;var rt=z[22];c=(nt.anchorX-rt)*this.pixelRatio,z[4]=c;var ot=z[23];p=(nt.anchorY-ot)*this.pixelRatio,z[5]=p,H=m.height,z[7]=H,it=m.width,z[14]=it}var st=void 0;z.length>24&&(st=z[24]);var at=void 0,lt=void 0,ht=void 0;z.length>16?(at=z[15],lt=z[16],ht=z[17]):(at=zs,lt=!1,ht=!1),$&&k?tt+=D:$||k||(tt-=D);for(var ut=0,ct=0;O<u;O+=2)if(!(st&&st[ut++]<it/this.pixelRatio)){if(v){var pt=Math.floor(ct);v.length<pt+1&&((y=[1/0,1/0,-1/0,-1/0]).push(v[0][4]),v.push(y)),y=v[pt]}this.replayImageOrLabel_(t,s[O],s[O+1],m,c,p,y,H,q,J,Q,tt,et,n,it,at,lt?L:null,ht?F:null),y&&(ct===Math.floor(ct)&&this.declutterItems.push(this,y,E),ct+=1/y[4])}++R;break;case Eh.DRAW_CHARS:var ft=z[1],dt=z[2],_t=z[3];y=r?null:z[4];var gt=z[5];w=z[6];var yt=z[7],vt=z[8],mt=z[9];C=z[10];var xt=z[11];x=z[12],S=z[13];var St=z[14],Ct=this.textStates[S],wt=Ct.font,Et=Ct.scale*vt,bt=void 0;wt in this.widths_?bt=this.widths_[wt]:(bt={},this.widths_[wt]=bt);var Tt=In(s,ft,dt,2),Rt=Et*qs(wt,x,bt);if(gt||Rt<=Tt){var It=this.textStates[S].textAlign,Ot=zh(s,ft,dt,2,x,(Tt-Rt)*kh[It],yt,Et,qs,wt,bt);if(Ot){var Pt=void 0,Mt=void 0,Lt=void 0,Ft=void 0,At=void 0;if(C)for(Pt=0,Mt=Ot.length;Pt<Mt;++Pt)Lt=(At=Ot[Pt])[4],Ft=this.createLabel(Lt,S,"",C),c=At[2]+xt,p=_t*Ft.height+2*(.5-_t)*xt-mt,this.replayImageOrLabel_(t,At[0],At[1],Ft,c,p,y,Ft.height,1,0,0,At[3],St,!1,Ft.width,zs,null,null);if(w)for(Pt=0,Mt=Ot.length;Pt<Mt;++Pt)Lt=(At=Ot[Pt])[4],Ft=this.createLabel(Lt,S,w,""),c=At[2],p=_t*Ft.height-mt,this.replayImageOrLabel_(t,At[0],At[1],Ft,c,p,y,Ft.height,1,0,0,At[3],St,!1,Ft.width,zs,null,null)}}this.declutterItems.push(this,y,E),++R;break;case Eh.END_GEOMETRY:if(void 0!==r){var Dt=r(E=z[1]);if(Dt)return Dt}++R;break;case Eh.FILL:G?P++:this.fill_(t),++R;break;case Eh.MOVE_TO_LINE_TO:for(O=z[1],u=z[2],b=s[O],g=(T=s[O+1])+.5|0,(_=b+.5|0)===f&&g===d||(t.moveTo(b,T),f=_,d=g),O+=2;O<u;O+=2)_=(b=s[O])+.5|0,g=(T=s[O+1])+.5|0,O!=u-2&&_===f&&g===d||(t.lineTo(b,T),f=_,d=g);++R;break;case Eh.SET_FILL_STYLE:L=z,this.alignFill_=z[2],P&&(this.fill_(t),P=0,M&&(t.stroke(),M=0)),t.fillStyle=z[1],++R;break;case Eh.SET_STROKE_STYLE:F=z,M&&(t.stroke(),M=0),this.setStrokeStyle_(t,z),++R;break;case Eh.STROKE:G?M++:t.stroke(),++R;break;default:++R}}P&&this.fill_(t),M&&t.stroke()},t.prototype.execute=function(t,e,i,n){this.viewRotation_=i,this.execute_(t,e,this.instructions,n,void 0,void 0)},t.prototype.executeHitDetection=function(t,e,i,n,r){return this.viewRotation_=i,this.execute_(t,e,this.hitDetectionInstructions,!0,n,r)},t}(),Vh=[sa,ia,oa,ra,aa,na],Uh=function(){function t(t,e,i,n,r,o){this.maxExtent_=t,this.overlaps_=n,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.createExecutors_(r)}return t.prototype.clip=function(t,e){var i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()},t.prototype.createExecutors_=function(t){for(var e in t){var i=this.executorsByZIndex_[e];void 0===i&&(i={},this.executorsByZIndex_[e]=i);var n=t[e];for(var r in n){var o=n[r];i[r]=new Bh(this.resolution_,this.pixelRatio_,this.overlaps_,o)}}},t.prototype.hasExecutors=function(t){for(var e in this.executorsByZIndex_)for(var i=this.executorsByZIndex_[e],n=0,r=t.length;n<r;++n)if(t[n]in i)return!0;return!1},t.prototype.forEachFeatureAtCoordinate=function(t,e,i,r,o,s){var a=2*(r=Math.round(r))+1,l=Fi(this.hitDetectionTransform_,r+.5,r+.5,1/e,-1/e,-i,-t[0],-t[1]);this.hitDetectionContext_||(this.hitDetectionContext_=nt(a,a));var h,u=this.hitDetectionContext_;u.canvas.width!==a||u.canvas.height!==a?(u.canvas.width=a,u.canvas.height=a):u.clearRect(0,0,a,a),void 0!==this.renderBuffer_&&(ue(h=[1/0,1/0,-1/0,-1/0],t),Qt(h,e*(this.renderBuffer_+r),h));var c,p=function(t){if(void 0!==Hh[t])return Hh[t];for(var e=2*t+1,i=new Array(e),n=0;n<e;n++)i[n]=new Array(e);var r=t,o=0,s=0;for(;r>=o;)qh(i,t+r,t+o),qh(i,t+o,t+r),qh(i,t-o,t+r),qh(i,t-r,t+o),qh(i,t-r,t-o),qh(i,t-o,t-r),qh(i,t+o,t-r),qh(i,t+r,t-o),o++,2*((s+=1+2*o)-r)+1>0&&(s+=1-2*(r-=1));return Hh[t]=i,i}(r);function f(t){for(var e=u.getImageData(0,0,a,a).data,i=0;i<a;i++)for(var n=0;n<a;n++)if(p[i][n]&&e[4*(n*a+i)+3]>0){var r=void 0;return(!s||c!=ra&&c!=aa||-1!==s.indexOf(t))&&(r=o(t)),r||void u.clearRect(0,0,a,a)}}var d,_,g,y,v,m=Object.keys(this.executorsByZIndex_).map(Number);for(m.sort(n),d=m.length-1;d>=0;--d){var x=m[d].toString();for(g=this.executorsByZIndex_[x],_=Vh.length-1;_>=0;--_)if(void 0!==(y=g[c=Vh[_]])&&(v=y.executeHitDetection(u,l,i,f,h)))return v}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var i=e[0],n=e[1],r=e[2],o=e[3],s=[i,n,i,o,r,o,r,n];return Pi(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return S(this.executorsByZIndex_)},t.prototype.execute=function(t,e,i,r,o,s){var a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(n),this.maxExtent_&&(t.save(),this.clip(t,e));var l,h,u,c,p,f,d=o||Vh;for(l=0,h=a.length;l<h;++l){var _=a[l].toString();for(p=this.executorsByZIndex_[_],u=0,c=d.length;u<c;++u){var g=d[u];if(void 0!==(f=p[g]))if(!s||g!=ra&&g!=aa)f.execute(t,e,i,r);else{var y=s[_];y?y.push(f,e.slice(0)):s[_]=[f,e.slice(0)]}}}this.maxExtent_&&t.restore()},t}(),Hh={0:[[!0]]};function qh(t,e,i){var n,r=Math.floor(t.length/2);if(e>=r)for(n=r;n<e;n++)t[n][i]=!0;else if(e<r)for(n=e+1;n<r;n++)t[n][i]=!0}var Jh=Uh;var Qh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),$h=function(t){function e(e){var i=t.call(this,e)||this;return i.boundHandleStyleImageChange_=i.handleStyleImageChange_.bind(i),i.animatingOrInteracting_,i.dirty_=!1,i.hitDetectionImageData_=null,i.renderedFeatures_=null,i.renderedRevision_=-1,i.renderedResolution_=NaN,i.renderedExtent_=[1/0,1/0,-1/0,-1/0],i.renderedRotation_,i.renderedCenter_=null,i.renderedProjection_=null,i.renderedRenderOrder_=null,i.replayGroup_=null,i.replayGroupChanged=!0,i}return Qh(e,t),e.prototype.useContainer=function(e,i,n){n<1&&(e=null),t.prototype.useContainer.call(this,e,i,n)},e.prototype.renderFrame=function(t,e){var i=t.pixelRatio,r=t.layerStatesArray[t.layerIndex];!function(t,e,i){Mi(t,e,0,0,i,0,0)}(this.pixelTransform,1/i,1/i),Ai(this.inversePixelTransform,this.pixelTransform);var o=Di(this.pixelTransform);this.useContainer(e,o,r.opacity);var s=this.context,a=s.canvas,l=this.replayGroup_;if(!l||l.isEmpty())return!this.containerReused&&a.width>0&&(a.width=0),this.container;var h=Math.round(t.size[0]*i),u=Math.round(t.size[1]*i);a.width!=h||a.height!=u?(a.width=h,a.height=u,a.style.transform!==o&&(a.style.transform=o)):this.containerReused||s.clearRect(0,0,h,u),this.preRender(s,t);var c=t.extent,p=t.viewState,f=p.center,d=p.resolution,_=p.projection,g=p.rotation,y=_.getExtent(),v=this.getLayer().getSource(),m=!1;if(r.extent){var x=di(r.extent,_);(m=!ie(x,t.extent)&&be(x,t.extent))&&this.clip(s,t,x)}var S=t.viewHints,C=!(S[Jr]||S[Qr]),w=this.getRenderTransform(f,d,g,i,h,u,0),E=this.getLayer().getDeclutter()?{}:null;if(l.execute(s,w,g,C,void 0,E),v.getWrapX()&&_.canWrapX()&&!ie(y,c)){for(var b=c[0],T=Ee(y),R=0,I=void 0;b<y[0];){I=T*--R;var O=this.getRenderTransform(f,d,g,i,h,u,I);l.execute(s,O,g,C,void 0,E),b+=T}for(R=0,b=c[2];b>y[2];){I=T*++R;var P=this.getRenderTransform(f,d,g,i,h,u,I);l.execute(s,P,g,C,void 0,E),b-=T}}if(E){var M=t.viewHints;!function(t,e,i,r,o,s){for(var a=Object.keys(t).map(Number).sort(n),l=0,h=a.length;l<h;++l)for(var u=t[a[l].toString()],c=void 0,p=0,f=u.length;p<f;){var d=u[p++];d!==c&&(c=d,s.push({items:d.declutterItems,opacity:r}));var _=u[p++];d.execute(e,_,i,o)}}(E,s,g,1,!(M[Jr]||M[Qr]),t.declutterItems)}m&&s.restore(),this.postRender(s,t);var L=r.opacity,F=this.container;return L!==parseFloat(F.style.opacity)&&(F.style.opacity=1===L?"":L),this.container},e.prototype.getFeatures=function(t){return new Promise(function(e,i){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var r=[this.context.canvas.width,this.context.canvas.height];Li(this.pixelTransform,r);var o=this.renderedCenter_,s=this.renderedResolution_,a=this.renderedRotation_,l=this.renderedProjection_,h=this.renderedExtent_,u=this.getLayer(),c=[],p=r[0]/2,f=r[1]/2;c.push(this.getRenderTransform(o,s,a,.5,p,f,0).slice());var d=u.getSource(),_=l.getExtent();if(d.getWrapX()&&l.canWrapX()&&!ie(_,h)){for(var g=h[0],y=Ee(_),v=0,m=void 0;g<_[0];)m=y*--v,c.push(this.getRenderTransform(o,s,a,.5,p,f,m).slice()),g+=y;for(v=0,g=h[2];g>_[2];)m=y*++v,c.push(this.getRenderTransform(o,s,a,.5,p,f,m).slice()),g-=y}this.hitDetectionImageData_=function(t,e,i,r,o,s,a){var l=nt(t[0]/2,t[1]/2);l.imageSmoothingEnabled=!1;for(var h=l.canvas,u=new ea(l,.5,o,null,a),c=i.length,p=Math.floor(16777215/c),f={},d=1;d<=c;++d){var _=i[d-1],g=_.getStyleFunction()||r;if(r){var y=g(_,s);if(y){Array.isArray(y)||(y=[y]);for(var v="#"+("000000"+(d*p).toString(16)).slice(-6),m=0,x=y.length;m<x;++m){var S=y[m],C=S.clone(),w=C.getFill();w&&w.setColor(v);var E=C.getStroke();E&&E.setColor(v),C.setText(void 0);var b=S.getImage();if(b){var T=b.getImageSize();if(!T)continue;var R=document.createElement("canvas");R.width=T[0],R.height=T[1];var I=R.getContext("2d",{alpha:!1});I.fillStyle=v;var O=I.canvas;I.fillRect(0,0,O.width,O.height),nt(T?T[0]:O.width,T?T[1]:O.height).drawImage(O,0,0),C.setImage(new hr({img:O,imgSize:T,anchor:b.getAnchor(),anchorXUnits:Vn,anchorYUnits:Vn,offset:b.getOrigin(),size:b.getSize(),opacity:b.getOpacity(),scale:b.getScale(),rotation:b.getRotation(),rotateWithView:b.getRotateWithView()}))}var P=Number(C.getZIndex());(A=f[P])||(A={},f[P]=A,A[At]=[],A[zt]=[],A[Lt]=[],A[Mt]=[]);var M=C.getGeometryFunction()(_);M&&be(o,M.getExtent())&&A[M.getType().replace("Multi","")].push(M,C)}}}}for(var L=Object.keys(f).map(Number).sort(n),F=(d=0,L.length);d<F;++d){var A=f[L[d]];for(var D in A){var k=A[D];for(m=0,x=k.length;m<x;m+=2){u.setStyle(k[m+1]);for(var j=0,G=e.length;j<G;++j)u.setTransform(e[j]),u.drawGeometry(k[m])}}}return document.body.appendChild(l.canvas),l.getImageData(0,0,h.width,h.height)}(r,c,this.renderedFeatures_,u.getStyleFunction(),h,s,a)}e(function(t,e,i){var n=[];if(i){var r=4*(Math.round(t[0]/2)+Math.round(t[1]/2)*i.width),o=i.data[r],s=i.data[r+1],a=i.data[r+2]+256*(s+256*o),l=Math.floor(16777215/e.length);a&&a%l==0&&n.push(e[a/l-1])}return n}(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r){if(this.replayGroup_){var o=e.viewState.resolution,s=e.viewState.rotation,a=this.getLayer(),l={};return this.replayGroup_.forEachFeatureAtCoordinate(t,o,s,i,(function(t){var e=g(t);if(!(e in l))return l[e]=!0,n(t,a)}),a.getDeclutter()?r:null)}},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t){var e=this.getLayer(),i=e.getSource();if(!i)return!1;var n=t.viewHints[Jr],r=t.viewHints[Qr],o=e.getUpdateWhileAnimating(),s=e.getUpdateWhileInteracting();if(!this.dirty_&&!o&&n||!s&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var a=t.extent,l=t.viewState,h=l.projection,u=l.resolution,c=t.pixelRatio,p=e.getRevision(),f=e.getRenderBuffer(),d=e.getRenderOrder();void 0===d&&(d=ha);var _=l.center.slice(),g=Qt(a,f*u),y=[g.slice()],v=h.getExtent();if(i.getWrapX()&&h.canWrapX()&&!ie(v,t.extent)){var m=Ee(v),x=Math.max(Ee(g)/2,m);g[0]=v[0]-x,g[2]=v[2]+x,ro(_,h);var S=function(t,e){var i=e.getExtent(),n=ye(t);if(e.canWrapX()&&(n[0]<i[0]||n[0]>=i[2])){var r=Ee(i),o=Math.floor((n[0]-i[0])/r)*r;t[0]-=o,t[2]-=o}return t}(y[0],h);S[0]<v[0]&&S[2]<v[2]?y.push([S[0]+m,S[1],S[2]+m,S[3]]):S[0]>v[0]&&S[2]>v[2]&&y.push([S[0]-m,S[1],S[2]-m,S[3]])}if(!this.dirty_&&this.renderedResolution_==u&&this.renderedRevision_==p&&this.renderedRenderOrder_==d&&ie(this.renderedExtent_,g))return this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var C,w=new Gh(ca(u,c),g,u,c,e.getDeclutter()),E=ui();if(E){for(var b=0,T=y.length;b<T;++b)i.loadFeatures(fi(y[b],h),u,E);C=ii(E,h)}else for(b=0,T=y.length;b<T;++b)i.loadFeatures(y[b],u,h);var R=ua(u,c),I=function(t){var i,n=t.getStyleFunction()||e.getStyleFunction();if(n&&(i=n(t,u)),i){var r=this.renderFeature(t,R,i,w,C);this.dirty_=this.dirty_||r}}.bind(this),O=fi(g,h),P=i.getFeaturesInExtent(O);d&&P.sort(d);for(b=0,T=P.length;b<T;++b)I(P[b]);this.renderedFeatures_=P;var M=w.finish(),L=new Jh(g,u,c,i.getOverlaps(),M,e.getRenderBuffer());return this.renderedResolution_=u,this.renderedRevision_=p,this.renderedRenderOrder_=d,this.renderedExtent_=g,this.renderedRotation_=l.rotation,this.renderedCenter_=_,this.renderedProjection_=h,this.replayGroup_=L,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,e,i,n,r){if(!i)return!1;var o=!1;if(Array.isArray(i))for(var s=0,a=i.length;s<a;++s)o=pa(n,t,i[s],e,this.boundHandleStyleImageChange_,r)||o;else o=pa(n,t,i,e,this.boundHandleStyleImageChange_,r);return o},e}(Vl),tu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),eu=function(t){function e(e){return t.call(this,e)||this}return tu(e,t),e.prototype.createRenderer=function(){return new $h(this)},e}(vh),iu={Control:ut,Rotate:xt,ScaleLine:wi,Zoom:bi,ZoomToExtent:bn},nu={LineString:Pn,Point:ln},ru={TileLayer:Ql,VectorLayer:eu},ou={fromLonLat:function(t,e){return ri(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")},toLonLat:function(t,e){var i=ri(t,void 0!==e?e:"EPSG:3857","EPSG:4326"),n=i[0];return(n<-180||n>180)&&(i[0]=Ot(n+180,360)-180),i}},su={OSM:ul,Vector:_h,XYZ:ll},au={Icon:hr,Stroke:Il,Style:zl}}}]);
|
||
//# sourceMappingURL=1.bundle.js.map
|