webpackJsonp([2],{"/bpg":function(t,e){},"6gaN":function(t,e,i){var n;n=function(){"use strict";function t(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function e(t,e){return t<e?-1:t>e?1:0}return function(i,n,o,r,s){!function e(i,n,o,r,s){for(;r>o;){if(r-o>600){var a=r-o+1,h=n-o+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(h-a/2<0?-1:1),p=Math.max(o,Math.floor(n-h*u/a+c)),d=Math.min(r,Math.floor(n+(a-h)*u/a+c));e(i,n,p,d,s)}var f=i[n],_=o,g=r;for(t(i,o,n),s(i[r],f)>0&&t(i,o,r);_<g;){for(t(i,_,g),_++,g--;s(i[_],f)<0;)_++;for(;s(i[g],f)>0;)g--}0===s(i[o],f)?t(i,o,g):t(i,++g,r),g<=n&&(o=g+1),n<=g&&(r=g-1)}}(i,n,o||0,r||i.length-1,s||e)}},t.exports=n()},"7J5b":function(t,e,i){t.exports=i.p+"static/img/camera_device.bce85d9.png"},"9QFF":function(t,e,i){t.exports=i.p+"static/img/ip_device.4ca9888.png"},ACGT:function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=93)}({0:function(t,e){t.exports=function(t,e,i,n,o,r){var s,a=t=t||{},h=typeof t.default;"object"!==h&&"function"!==h||(s=t,a=t.default);var l,u="function"==typeof a?a.options:a;if(e&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId=o),r?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},u._ssrRegister=l):n&&(l=n),l){var c=u.functional,p=c?u.render:u.beforeCreate;c?(u._injectStyles=l,u.render=function(t,e){return l.call(e),p(t,e)}):u.beforeCreate=p?[].concat(p,l):[l]}return{esModule:s,exports:a,options:u}}},1:function(t,e){t.exports=i("fPll")},22:function(t,e){t.exports=i("aMwW")},34:function(t,e,i){"use strict";e.__esModule=!0,e.default={inject:["rootMenu"],computed:{indexPath:function(){for(var t=[this.index],e=this.$parent;"ElMenu"!==e.$options.componentName;)e.index&&t.unshift(e.index),e=e.$parent;return t},parentMenu:function(){for(var t=this.$parent;t&&-1===["ElMenu","ElSubmenu"].indexOf(t.$options.componentName);)t=t.$parent;return t},paddingStyle:function(){if("vertical"!==this.rootMenu.mode)return{};var t=20,e=this.$parent;if(this.rootMenu.collapse)t=20;else for(;e&&"ElMenu"!==e.$options.componentName;)"ElSubmenu"===e.$options.componentName&&(t+=20),e=e.$parent;return{paddingLeft:t+"px"}}}}},93:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i(94),r=(n=o)&&n.__esModule?n:{default:n};r.default.install=function(t){t.component(r.default.name,r.default)},e.default=r.default},94:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(95),o=i.n(n),r=i(96),s=i(0)(o.a,r.a,!1,null,null,null);e.default=s.exports},95:function(t,e,i){"use strict";e.__esModule=!0;var n=s(i(34)),o=s(i(22)),r=s(i(1));function s(t){return t&&t.__esModule?t:{default:t}}e.default={name:"ElMenuItem",componentName:"ElMenuItem",mixins:[n.default,r.default],components:{ElTooltip:o.default},props:{index:{type:String,required:!0},route:[String,Object],disabled:Boolean},computed:{active:function(){return this.index===this.rootMenu.activeIndex},hoverBackground:function(){return this.rootMenu.hoverBackground},backgroundColor:function(){return this.rootMenu.backgroundColor||""},activeTextColor:function(){return this.rootMenu.activeTextColor||""},textColor:function(){return this.rootMenu.textColor||""},mode:function(){return this.rootMenu.mode},itemStyle:function(){var t={color:this.active?this.activeTextColor:this.textColor};return"horizontal"!==this.mode||this.isNested||(t.borderBottomColor=this.active?this.rootMenu.activeTextColor?this.activeTextColor:"":"transparent"),t},isNested:function(){return this.parentMenu!==this.rootMenu}},methods:{onMouseEnter:function(){("horizontal"!==this.mode||this.rootMenu.backgroundColor)&&(this.$el.style.backgroundColor=this.hoverBackground)},onMouseLeave:function(){("horizontal"!==this.mode||this.rootMenu.backgroundColor)&&(this.$el.style.backgroundColor=this.backgroundColor)},handleClick:function(){this.disabled||(this.dispatch("ElMenu","item-click",this),this.$emit("click",this))}},mounted:function(){this.parentMenu.addItem(this),this.rootMenu.addItem(this)},beforeDestroy:function(){this.parentMenu.removeItem(this),this.rootMenu.removeItem(this)}}},96:function(t,e,i){"use strict";var n={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("li",{staticClass:"el-menu-item",class:{"is-active":t.active,"is-disabled":t.disabled},style:[t.paddingStyle,t.itemStyle,{backgroundColor:t.backgroundColor}],attrs:{role:"menuitem",tabindex:"-1"},on:{click:t.handleClick,mouseenter:t.onMouseEnter,focus:t.onMouseEnter,blur:t.onMouseLeave,mouseleave:t.onMouseLeave}},["ElMenu"===t.parentMenu.$options.componentName&&t.rootMenu.collapse&&t.$slots.title?i("el-tooltip",{attrs:{effect:"dark",placement:"right"}},[i("div",{attrs:{slot:"content"},slot:"content"},[t._t("title")],2),i("div",{staticStyle:{position:"absolute",left:"0",top:"0",height:"100%",width:"100%",display:"inline-block","box-sizing":"border-box",padding:"0 20px"}},[t._t("default")],2)]):[t._t("default"),t._t("title")]],2)},staticRenderFns:[]};e.a=n}})},LtPi:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});i("GXEp"),i("+BTi");var n=i("mtrD"),o=i.n(n),r=(i("bwiK"),i("SExR")),s=i.n(r),a=(i("wJKS"),i("orbS")),h=i.n(a);function l(){return function(){throw new Error("Unimplemented abstract method.")}()}var u=0;function c(t){return t.ol_uid||(t.ol_uid=String(++u))}var p="5.3.0",d=function(t){function e(e){var i="Assertion failed. See https://openlayers.org/en/"+("latest"===p?p:"v"+p.split("-")[0])+"/doc/errors/#"+e+" for details.";t.call(this,i),this.code=e,this.name="AssertionError",this.message=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),f={ADD:"add",REMOVE:"remove"},_="propertychange",g="function"==typeof Object.assign?Object.assign:function(t,e){var i=arguments;if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),o=1,r=arguments.length;o<r;++o){var s=i[o];if(void 0!==s&&null!==s)for(var a in s)s.hasOwnProperty(a)&&(n[a]=s[a])}return n};function v(t){for(var e in t)delete t[e]}function y(t){var e=[];for(var i in t)e.push(t[i]);return e}function m(t){var e;for(e in t)return!1;return!e}function E(t,e,i,n){for(var o,r=0,s=t.length;r<s;++r)if((o=t[r]).listener===e&&o.bindTo===i)return n&&(o.deleteIndex=r),o}function x(t,e){var i=T(t);return i?i[e]:void 0}function T(t,e){var i=t.ol_lm;return!i&&e&&(i=t.ol_lm={}),i}function S(t,e){var i=x(t,e);if(i){for(var n=0,o=i.length;n<o;++n)t.removeEventListener(e,i[n].boundListener),v(i[n]);i.length=0;var r=T(t);r&&(delete r[e],0===Object.keys(r).length&&function(t){delete t.ol_lm}(t))}}function C(t,e,i,n,o){var r=T(t,!0),s=r[e];s||(s=r[e]=[]);var a=E(s,i,n,!1);return a?o||(a.callOnce=!1):(a={bindTo:n,callOnce:!!o,listener:i,target:t,type:e},t.addEventListener(e,function(t){var e=function(e){var i=t.listener,n=t.bindTo||t.target;return t.callOnce&&w(t),i.call(n,e)};return t.boundListener=e,e}(a)),s.push(a)),a}function b(t,e,i,n){return C(t,e,i,n,!0)}function R(t,e,i,n){var o=x(t,e);if(o){var r=E(o,i,n,!0);r&&w(r)}}function w(t){if(t&&t.target){t.target.removeEventListener(t.type,t.boundListener);var e=x(t.target,t.type);if(e){var i="deleteIndex"in t?t.deleteIndex:e.indexOf(t);-1!==i&&e.splice(i,1),0===e.length&&S(t.target,t.type)}v(t)}}var M=function(){this.disposed_=!1};M.prototype.dispose=function(){this.disposed_||(this.disposed_=!0,this.disposeInternal())},M.prototype.disposeInternal=function(){};var O=M;function I(){return!0}function L(){return!1}function P(){}var k=function(t){this.propagationStopped,this.type=t,this.target=null};function A(t){t.stopPropagation()}k.prototype.preventDefault=function(){this.propagationStopped=!0},k.prototype.stopPropagation=function(){this.propagationStopped=!0};var D=k,F=function(t){function e(){t.call(this),this.pendingRemovals_={},this.dispatching_={},this.listeners_={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addEventListener=function(t,e){var i=this.listeners_[t];i||(i=this.listeners_[t]=[]),-1===i.indexOf(e)&&i.push(e)},e.prototype.dispatchEvent=function(t){var e="string"==typeof t?new D(t):t,i=e.type;e.target=this;var n,o=this.listeners_[i];if(o){i in this.dispatching_||(this.dispatching_[i]=0,this.pendingRemovals_[i]=0),++this.dispatching_[i];for(var r=0,s=o.length;r<s;++r)if(!1===o[r].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,P);delete this.dispatching_[i]}return n}},e.prototype.disposeInternal=function(){!function(t){var e=T(t);if(e)for(var i in e)S(t,i)}(this)},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);t in this.pendingRemovals_?(i[n]=P,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t])}},e}(O),N={CHANGE:"change",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",ERROR:"error",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",MOUSEDOWN:"mousedown",MOUSEMOVE:"mousemove",MOUSEOUT:"mouseout",MOUSEUP:"mouseup",MOUSEWHEEL:"mousewheel",MSPOINTERDOWN:"MSPointerDown",RESIZE:"resize",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",WHEEL:"wheel"};var G=function(t){function e(){t.call(this),this.revision_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.changed=function(){++this.revision_,this.dispatchEvent(N.CHANGE)},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),o=0;o<i;++o)n[o]=C(this,t[o],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),o=0;o<i;++o)n[o]=b(this,t[o],e);return n}return b(this,t,e)},e.prototype.un=function(t,e){if(Array.isArray(t))for(var i=0,n=t.length;i<n;++i)R(this,t[i],e);else R(this,t,e)},e}(F),j=function(t){function e(e,i,n){t.call(this,e),this.key=i,this.oldValue=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(D),Y={};function W(t){return Y.hasOwnProperty(t)?Y[t]:Y[t]="change:"+t}var X=function(t){function e(e){t.call(this),c(this),this.values_={},void 0!==e&&this.setProperties(e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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 g({},this.values_)},e.prototype.notify=function(t,e){var i;i=W(t),this.dispatchEvent(new j(i,t,e)),i=_,this.dispatchEvent(new j(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}(G),z="length",K=function(t){function e(e,i){t.call(this,e),this.element=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(D),B=function(t){function e(e,i){t.call(this);var n=i||{};if(this.unique_=!!n.unique,this.array_=e||[],this.unique_)for(var o=0,r=this.array_.length;o<r;++o)this.assertUnique_(this.array_[o],o);this.updateLength_()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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(z)},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new K(f.ADD,e))},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 K(f.REMOVE,e)),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 K(f.REMOVE,n)),this.dispatchEvent(new K(f.ADD,e))}else{for(var o=i;o<t;++o)this.insertAt(o,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set(z,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 d(58)},e}(X),U=function(t){function e(e,i,n){t.call(this,e),this.map=i,this.frameState=void 0!==n?n:null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(D),V=function(t){function e(e,i,n,o,r){t.call(this,e,i,r),this.originalEvent=n,this.pixel=i.getEventPixel(n),this.coordinate=i.getCoordinateFromPixel(this.pixel),this.dragging=void 0!==o&&o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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}(U),H=["experimental-webgl","webgl","webkit-3d","moz-webgl"];if("undefined"!=typeof window&&"WebGLRenderingContext"in window)try{var Z=function(t,e){for(var i=H.length,n=0;n<i;++n)try{var o=t.getContext(H[n],e);if(o)return o}catch(t){}return null}(document.createElement("canvas"),{failIfMajorPerformanceCaveat:!0});Z&&(!0,Z.getParameter(Z.MAX_TEXTURE_SIZE),Z.getSupportedExtensions())}catch(t){}var $="undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"",q=-1!==$.indexOf("firefox"),J=-1!==$.indexOf("safari")&&-1==$.indexOf("chrom"),Q=-1!==$.indexOf("webkit")&&-1==$.indexOf("edge"),tt=-1!==$.indexOf("macintosh"),et=window.devicePixelRatio||1,it=function(){var t=!1;try{t=!!document.createElement("canvas").getContext("2d").setLineDash}catch(t){}return t}(),nt=(navigator,"ontouchstart"in window),ot="PointerEvent"in window,rt=!!navigator.msPointerEnabled,st={SINGLECLICK:"singleclick",CLICK:N.CLICK,DBLCLICK:N.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},at=function(t){function e(e,i,n,o,r){t.call(this,e,i,n.originalEvent,o,r),this.pointerEvent=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(V),ht={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},lt=function(t,e){this.dispatcher=t,this.mapping_=e};lt.prototype.getEvents=function(){return Object.keys(this.mapping_)},lt.prototype.getHandlerForEvent=function(t){return this.mapping_[t]};var ut=lt,ct=1,pt="mouse";function dt(t){if(!this.isEventSimulatedFromTouch_(t)){ct.toString()in this.pointerMap&&this.cancel(t);var e=yt(t,this.dispatcher);this.pointerMap[ct.toString()]=t,this.dispatcher.down(e,t)}}function ft(t){if(!this.isEventSimulatedFromTouch_(t)){var e=yt(t,this.dispatcher);this.dispatcher.move(e,t)}}function _t(t){if(!this.isEventSimulatedFromTouch_(t)){var e=this.pointerMap[ct.toString()];if(e&&e.button===t.button){var i=yt(t,this.dispatcher);this.dispatcher.up(i,t),this.cleanupMouse()}}}function gt(t){if(!this.isEventSimulatedFromTouch_(t)){var e=yt(t,this.dispatcher);this.dispatcher.enterOver(e,t)}}function vt(t){if(!this.isEventSimulatedFromTouch_(t)){var e=yt(t,this.dispatcher);this.dispatcher.leaveOut(e,t)}}function yt(t,e){var i=e.cloneEvent(t,t),n=i.preventDefault;return i.preventDefault=function(){t.preventDefault(),n()},i.pointerId=ct,i.isPrimary=!0,i.pointerType=pt,i}var mt=function(t){function e(e){var i={mousedown:dt,mousemove:ft,mouseup:_t,mouseover:gt,mouseout:vt};t.call(this,e,i),this.pointerMap=e.pointerMap,this.lastTouches=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isEventSimulatedFromTouch_=function(t){for(var e=this.lastTouches,i=t.clientX,n=t.clientY,o=0,r=e.length,s=void 0;o<r&&(s=e[o]);o++){var a=Math.abs(i-s[0]),h=Math.abs(n-s[1]);if(a<=25&&h<=25)return!0}return!1},e.prototype.cancel=function(t){var e=yt(t,this.dispatcher);this.dispatcher.cancel(e,t),this.cleanupMouse()},e.prototype.cleanupMouse=function(){delete this.pointerMap[ct.toString()]},e}(ut),Et=["","unavailable","touch","pen","mouse"];function xt(t){this.pointerMap[t.pointerId.toString()]=t;var e=this.prepareEvent_(t);this.dispatcher.down(e,t)}function Tt(t){var e=this.prepareEvent_(t);this.dispatcher.move(e,t)}function St(t){var e=this.prepareEvent_(t);this.dispatcher.up(e,t),this.cleanup(t.pointerId)}function Ct(t){var e=this.prepareEvent_(t);this.dispatcher.leaveOut(e,t)}function bt(t){var e=this.prepareEvent_(t);this.dispatcher.enterOver(e,t)}function Rt(t){var e=this.prepareEvent_(t);this.dispatcher.cancel(e,t),this.cleanup(t.pointerId)}function wt(t){var e=this.dispatcher.makeEvent("lostpointercapture",t,t);this.dispatcher.dispatchEvent(e)}function Mt(t){var e=this.dispatcher.makeEvent("gotpointercapture",t,t);this.dispatcher.dispatchEvent(e)}var Ot=function(t){function e(e){var i={MSPointerDown:xt,MSPointerMove:Tt,MSPointerUp:St,MSPointerOut:Ct,MSPointerOver:bt,MSPointerCancel:Rt,MSGotPointerCapture:Mt,MSLostPointerCapture:wt};t.call(this,e,i),this.pointerMap=e.pointerMap}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvent_=function(t){var e=t;return"number"==typeof t.pointerType&&((e=this.dispatcher.cloneEvent(t,t)).pointerType=Et[t.pointerType]),e},e.prototype.cleanup=function(t){delete this.pointerMap[t.toString()]},e}(ut);function It(t){this.dispatcher.fireNativeEvent(t)}function Lt(t){this.dispatcher.fireNativeEvent(t)}function Pt(t){this.dispatcher.fireNativeEvent(t)}function kt(t){this.dispatcher.fireNativeEvent(t)}function At(t){this.dispatcher.fireNativeEvent(t)}function Dt(t){this.dispatcher.fireNativeEvent(t)}function Ft(t){this.dispatcher.fireNativeEvent(t)}function Nt(t){this.dispatcher.fireNativeEvent(t)}var Gt=function(t){function e(e){var i={pointerdown:It,pointermove:Lt,pointerup:Pt,pointerout:kt,pointerover:At,pointercancel:Dt,gotpointercapture:Nt,lostpointercapture:Ft};t.call(this,e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ut),jt=!1,Yt=function(t){function e(e,i,n){t.call(this,e),this.originalEvent=i;var o=n||{};this.buttons=function(t){var e;if(t.buttons||jt)e=t.buttons;else switch(t.which){case 1:e=1;break;case 2:e=4;break;case 3:e=2;break;default:e=0}return e}(o),this.pressure=function(t,e){var i=0;i=t.pressure?t.pressure:e?.5:0;return i}(o,this.buttons),this.bubbles="bubbles"in o&&o.bubbles,this.cancelable="cancelable"in o&&o.cancelable,this.view="view"in o?o.view:null,this.detail="detail"in o?o.detail:null,this.screenX="screenX"in o?o.screenX:0,this.screenY="screenY"in o?o.screenY:0,this.clientX="clientX"in o?o.clientX:0,this.clientY="clientY"in o?o.clientY:0,this.ctrlKey="ctrlKey"in o&&o.ctrlKey,this.altKey="altKey"in o&&o.altKey,this.shiftKey="shiftKey"in o&&o.shiftKey,this.metaKey="metaKey"in o&&o.metaKey,this.button="button"in o?o.button:0,this.relatedTarget="relatedTarget"in o?o.relatedTarget:null,this.pointerId="pointerId"in o?o.pointerId:0,this.width="width"in o?o.width:0,this.height="height"in o?o.height:0,this.tiltX="tiltX"in o?o.tiltX:0,this.tiltY="tiltY"in o?o.tiltY:0,this.pointerType="pointerType"in o?o.pointerType:"",this.hwTimestamp="hwTimestamp"in o?o.hwTimestamp:0,this.isPrimary="isPrimary"in o&&o.isPrimary,i.preventDefault&&(this.preventDefault=function(){i.preventDefault()})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(D);!function(){try{var t=new MouseEvent("click",{buttons:1});jt=1===t.buttons}catch(t){}}();var Wt=Yt;function Xt(t,e){return t>e?1:t<e?-1:0}function zt(t,e){return t.indexOf(e)>=0}function Kt(t,e,i){var n,o=t.length;if(t[0]<=e)return 0;if(e<=t[o-1])return o-1;if(i>0){for(n=1;n<o;++n)if(t[n]<e)return n-1}else if(i<0){for(n=1;n<o;++n)if(t[n]<=e)return n}else for(n=1;n<o;++n){if(t[n]==e)return n;if(t[n]<e)return t[n-1]-e<e-t[n]?n-1:n}return o-1}function Bt(t,e,i){for(;e<i;){var n=t[e];t[e]=t[i],t[i]=n,++e,--i}}function Ut(t,e){for(var i=Array.isArray(e)?e:[e],n=i.length,o=0;o<n;o++)t[t.length]=i[o]}function Vt(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 Ht(t){this.vacuumTouches_(t),this.setPrimaryTouch_(t.changedTouches[0]),this.dedupSynthMouse_(t),this.clickCount_++,this.processTouches_(t,this.overDown_)}function Zt(t){this.processTouches_(t,this.moveOverOut_)}function $t(t){this.dedupSynthMouse_(t),this.processTouches_(t,this.upOut_)}function qt(t){this.processTouches_(t,this.cancelOut_)}var Jt=function(t){function e(e,i){var n={touchstart:Ht,touchmove:Zt,touchend:$t,touchcancel:qt};t.call(this,e,n),this.pointerMap=e.pointerMap,this.mouseSource=i,this.firstTouchId_=void 0,this.clickCount_=0,this.resetId_,this.dedupTimeout_=2500}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isPrimaryTouch_=function(t){return this.firstTouchId_===t.identifier},e.prototype.setPrimaryTouch_=function(t){var e=Object.keys(this.pointerMap).length;(0===e||1===e&&ct.toString()in this.pointerMap)&&(this.firstTouchId_=t.identifier,this.cancelResetClickCount_())},e.prototype.removePrimaryPointer_=function(t){t.isPrimary&&(this.firstTouchId_=void 0,this.resetClickCount_())},e.prototype.resetClickCount_=function(){this.resetId_=setTimeout(this.resetClickCountHandler_.bind(this),200)},e.prototype.resetClickCountHandler_=function(){this.clickCount_=0,this.resetId_=void 0},e.prototype.cancelResetClickCount_=function(){void 0!==this.resetId_&&clearTimeout(this.resetId_)},e.prototype.touchToPointer_=function(t,e){var i=this.dispatcher.cloneEvent(t,e);return i.pointerId=e.identifier+2,i.bubbles=!0,i.cancelable=!0,i.detail=this.clickCount_,i.button=0,i.buttons=1,i.width=e.radiusX||0,i.height=e.radiusY||0,i.pressure=e.force||.5,i.isPrimary=this.isPrimaryTouch_(e),i.pointerType="touch",i.clientX=e.clientX,i.clientY=e.clientY,i.screenX=e.screenX,i.screenY=e.screenY,i},e.prototype.processTouches_=function(t,e){var i=Array.prototype.slice.call(t.changedTouches),n=i.length;function o(){t.preventDefault()}for(var r=0;r<n;++r){var s=this.touchToPointer_(t,i[r]);s.preventDefault=o,e.call(this,t,s)}},e.prototype.findTouch_=function(t,e){for(var i=t.length,n=0;n<i;n++){if(t[n].identifier===e)return!0}return!1},e.prototype.vacuumTouches_=function(t){var e=t.touches,i=Object.keys(this.pointerMap),n=i.length;if(n>=e.length){for(var o=[],r=0;r<n;++r){var s=Number(i[r]),a=this.pointerMap[s];s==ct||this.findTouch_(e,s-2)||o.push(a.out)}for(var h=0;h<o.length;++h)this.cancelOut_(t,o[h])}},e.prototype.overDown_=function(t,e){this.pointerMap[e.pointerId]={target:e.target,out:e,outTarget:e.target},this.dispatcher.over(e,t),this.dispatcher.enter(e,t),this.dispatcher.down(e,t)},e.prototype.moveOverOut_=function(t,e){var i=e,n=this.pointerMap[i.pointerId];if(n){var o=n.out,r=n.outTarget;this.dispatcher.move(i,t),o&&r!==i.target&&(o.relatedTarget=i.target,i.relatedTarget=r,o.target=r,i.target?(this.dispatcher.leaveOut(o,t),this.dispatcher.enterOver(i,t)):(i.target=r,i.relatedTarget=null,this.cancelOut_(t,i))),n.out=i,n.outTarget=i.target}},e.prototype.upOut_=function(t,e){this.dispatcher.up(e,t),this.dispatcher.out(e,t),this.dispatcher.leave(e,t),this.cleanUpPointer_(e)},e.prototype.cancelOut_=function(t,e){this.dispatcher.cancel(e,t),this.dispatcher.out(e,t),this.dispatcher.leave(e,t),this.cleanUpPointer_(e)},e.prototype.cleanUpPointer_=function(t){delete this.pointerMap[t.pointerId],this.removePrimaryPointer_(t)},e.prototype.dedupSynthMouse_=function(t){var e=this.mouseSource.lastTouches,i=t.changedTouches[0];if(this.isPrimaryTouch_(i)){var n=[i.clientX,i.clientY];e.push(n),setTimeout(function(){var t,i,o;i=n,o=(t=e).indexOf(i),o>-1&&t.splice(o,1)},this.dedupTimeout_)}},e}(ut),Qt=[["bubbles",!1],["cancelable",!1],["view",null],["detail",null],["screenX",0],["screenY",0],["clientX",0],["clientY",0],["ctrlKey",!1],["altKey",!1],["shiftKey",!1],["metaKey",!1],["button",0],["relatedTarget",null],["buttons",0],["pointerId",0],["width",0],["height",0],["pressure",0],["tiltX",0],["tiltY",0],["pointerType",""],["hwTimestamp",0],["isPrimary",!1],["type",""],["target",null],["currentTarget",null],["which",0]],te=function(t){function e(e){t.call(this),this.element_=e,this.pointerMap={},this.eventMap_={},this.eventSourceList_=[],this.registerSources()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.registerSources=function(){if(ot)this.registerSource("native",new Gt(this));else if(rt)this.registerSource("ms",new Ot(this));else{var t=new mt(this);this.registerSource("mouse",t),nt&&this.registerSource("touch",new Jt(this,t))}this.register_()},e.prototype.registerSource=function(t,e){var i=e,n=i.getEvents();n&&(n.forEach(function(t){var e=i.getHandlerForEvent(t);e&&(this.eventMap_[t]=e.bind(i))}.bind(this)),this.eventSourceList_.push(i))},e.prototype.register_=function(){for(var t=this.eventSourceList_.length,e=0;e<t;e++){var i=this.eventSourceList_[e];this.addEvents_(i.getEvents())}},e.prototype.unregister_=function(){for(var t=this.eventSourceList_.length,e=0;e<t;e++){var i=this.eventSourceList_[e];this.removeEvents_(i.getEvents())}},e.prototype.eventHandler_=function(t){var e=t.type,i=this.eventMap_[e];i&&i(t)},e.prototype.addEvents_=function(t){t.forEach(function(t){C(this.element_,t,this.eventHandler_,this)}.bind(this))},e.prototype.removeEvents_=function(t){t.forEach(function(t){R(this.element_,t,this.eventHandler_,this)}.bind(this))},e.prototype.cloneEvent=function(t,e){for(var i={},n=0,o=Qt.length;n<o;n++){var r=Qt[n][0];i[r]=t[r]||e[r]||Qt[n][1]}return i},e.prototype.down=function(t,e){this.fireEvent(ht.POINTERDOWN,t,e)},e.prototype.move=function(t,e){this.fireEvent(ht.POINTERMOVE,t,e)},e.prototype.up=function(t,e){this.fireEvent(ht.POINTERUP,t,e)},e.prototype.enter=function(t,e){t.bubbles=!1,this.fireEvent(ht.POINTERENTER,t,e)},e.prototype.leave=function(t,e){t.bubbles=!1,this.fireEvent(ht.POINTERLEAVE,t,e)},e.prototype.over=function(t,e){t.bubbles=!0,this.fireEvent(ht.POINTEROVER,t,e)},e.prototype.out=function(t,e){t.bubbles=!0,this.fireEvent(ht.POINTEROUT,t,e)},e.prototype.cancel=function(t,e){this.fireEvent(ht.POINTERCANCEL,t,e)},e.prototype.leaveOut=function(t,e){this.out(t,e),this.contains_(t.target,t.relatedTarget)||this.leave(t,e)},e.prototype.enterOver=function(t,e){this.over(t,e),this.contains_(t.target,t.relatedTarget)||this.enter(t,e)},e.prototype.contains_=function(t,e){return!(!t||!e)&&t.contains(e)},e.prototype.makeEvent=function(t,e,i){return new Wt(t,i,e)},e.prototype.fireEvent=function(t,e,i){var n=this.makeEvent(t,e,i);this.dispatchEvent(n)},e.prototype.fireNativeEvent=function(t){var e=this.makeEvent(t.type,t,t);this.dispatchEvent(e)},e.prototype.wrapMouseEvent=function(t,e){return this.makeEvent(t,yt(e,this),e)},e.prototype.disposeInternal=function(){this.unregister_(),t.prototype.disposeInternal.call(this)},e}(F),ee=function(t){function e(e,i){t.call(this),this.map_=e,this.clickTimeoutId_,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=i?i*et:et,this.down_=null;var n=this.map_.getViewport();this.activePointers_=0,this.trackedTouches_={},this.pointerEventHandler_=new te(n),this.documentPointerEventHandler_=null,this.pointerdownListenerKey_=C(this.pointerEventHandler_,ht.POINTERDOWN,this.handlePointerDown_,this),this.relayedListenerKey_=C(this.pointerEventHandler_,ht.POINTERMOVE,this.relayEvent_,this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.emulateClick_=function(t){var e=new at(st.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new at(st.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new at(st.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t;e.type==st.POINTERUP||e.type==st.POINTERCANCEL?delete this.trackedTouches_[e.pointerId]:e.type==st.POINTERDOWN&&(this.trackedTouches_[e.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new at(st.POINTERUP,this.map_,t);this.dispatchEvent(e),e.propagationStopped||this.dragging_||!this.isMouseActionButton_(t)||this.emulateClick_(this.down_),0===this.activePointers_&&(this.dragListenerKeys_.forEach(w),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null,this.documentPointerEventHandler_.dispose(),this.documentPointerEventHandler_=null)},e.prototype.isMouseActionButton_=function(t){return 0===t.button},e.prototype.handlePointerDown_=function(t){this.updateActivePointers_(t);var e=new at(st.POINTERDOWN,this.map_,t);this.dispatchEvent(e),this.down_=t,0===this.dragListenerKeys_.length&&(this.documentPointerEventHandler_=new te(document),this.dragListenerKeys_.push(C(this.documentPointerEventHandler_,st.POINTERMOVE,this.handlePointerMove_,this),C(this.documentPointerEventHandler_,st.POINTERUP,this.handlePointerUp_,this),C(this.pointerEventHandler_,st.POINTERCANCEL,this.handlePointerUp_,this)))},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var e=new at(st.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(e)}t.preventDefault()},e.prototype.relayEvent_=function(t){var e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new at(t.type,this.map_,t,e))},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_&&(w(this.relayedListenerKey_),this.relayedListenerKey_=null),this.pointerdownListenerKey_&&(w(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(w),this.dragListenerKeys_.length=0,this.documentPointerEventHandler_&&(this.documentPointerEventHandler_.dispose(),this.documentPointerEventHandler_=null),this.pointerEventHandler_&&(this.pointerEventHandler_.dispose(),this.pointerEventHandler_=null),t.prototype.disposeInternal.call(this)},e}(F),ie="postrender",ne="movestart",oe="moveend",re={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},se="postcompose",ae="precompose",he="render",le="rendercomplete",ue={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4,ABORT:5};function ce(t,e){if(!t)throw new d(e)}var pe=function(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}};pe.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,v(this.queuedElements_)},pe.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},pe.prototype.enqueue=function(t){ce(!(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)},pe.prototype.getCount=function(){return this.elements_.length},pe.prototype.getLeftChildIndex_=function(t){return 2*t+1},pe.prototype.getRightChildIndex_=function(t){return 2*t+2},pe.prototype.getParentIndex_=function(t){return t-1>>1},pe.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},pe.prototype.isEmpty=function(){return 0===this.elements_.length},pe.prototype.isKeyQueued=function(t){return t in this.queuedElements_},pe.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},pe.prototype.siftUp_=function(t){for(var e=this.elements_,i=this.priorities_,n=e.length,o=e[t],r=i[t],s=t;t<n>>1;){var a=this.getLeftChildIndex_(t),h=this.getRightChildIndex_(t),l=h<n&&i[h]<i[a]?h:a;e[t]=e[l],i[t]=i[l],t=l}e[t]=o,i[t]=r,this.siftDown_(s,t)},pe.prototype.siftDown_=function(t,e){for(var i=this.elements_,n=this.priorities_,o=i[e],r=n[e];e>t;){var s=this.getParentIndex_(e);if(!(n[s]>r))break;i[e]=i[s],n[e]=n[s],e=s}i[e]=o,n[e]=r},pe.prototype.reprioritize=function(){var t,e,i,n=this.priorityFunction_,o=this.elements_,r=this.priorities_,s=0,a=o.length;for(e=0;e<a;++e)(i=n(t=o[e]))==1/0?delete this.queuedElements_[this.keyFunction_(t)]:(r[s]=i,o[s++]=t);o.length=s,r.length=s,this.heapify_()};var de=function(t){function e(e,i){t.call(this,function(t){return e.apply(null,t)},function(t){return t[0].getKey()}),this.tileChangeCallback_=i,this.tilesLoading_=0,this.tilesLoadingKeys_={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.enqueue=function(e){var i=t.prototype.enqueue.call(this,e);i&&C(e[0],N.CHANGE,this.handleTileChange,this);return i},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,i=e.getState();if(i===ue.LOADED||i===ue.ERROR||i===ue.EMPTY||i===ue.ABORT){R(e,N.CHANGE,this.handleTileChange,this);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,o,r=0,s=!1;this.tilesLoading_<t&&r<e&&this.getCount()>0;)o=(n=this.dequeue()[0]).getKey(),(i=n.getState())===ue.ABORT?s=!0:i!==ue.IDLE||o in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[o]=!0,++this.tilesLoading_,++r,n.load());0===r&&s&&this.tileChangeCallback_()},e}(pe),fe=42,_e=256;function ge(t,e,i){return Math.min(Math.max(t,e),i)}var ve="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2};function ye(t,e,i,n,o,r){var s=o-i,a=r-n;if(0!==s||0!==a){var h=((t-i)*s+(e-n)*a)/(s*s+a*a);h>1?(i=o,n=r):h>0&&(i+=s*h,n+=a*h)}return me(t,e,i,n)}function me(t,e,i,n){var o=i-t,r=n-e;return o*o+r*r}function Ee(t){return t*Math.PI/180}function xe(t,e){var i=t%e;return i*e<0?i+e:i}function Te(t,e,i){return t+i*(e-t)}function Se(t){return t}function Ce(t,e){return void 0!==t?0:void 0}function be(t,e){return void 0!==t?t+e:void 0}var Re=0,we=1,Me="center",Oe="resolution",Ie="rotation";function Le(t,e){return t[0]+=e[0],t[1]+=e[1],t}function Pe(t,e){for(var i=!0,n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function ke(t,e){var i=Math.cos(e),n=Math.sin(e),o=t[0]*i-t[1]*n,r=t[1]*i+t[0]*n;return t[0]=o,t[1]=r,t}function Ae(t,e){return t[0]*=e,t[1]*=e,t}function De(t){return Math.pow(t,3)}function Fe(t){return 1-De(1-t)}function Ne(t){return 3*t*t-2*t*t*t}function Ge(t){return t}var je={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},Ye={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function We(t){for(var e=Ze(),i=0,n=t.length;i<n;++i)ii(e,t[i]);return e}function Xe(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 ze(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function Ke(t,e,i){var n,o;return(n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*n+(o=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0)*o}function Be(t,e){return Ve(t,e[0],e[1])}function Ue(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function Ve(t,e,i){return t[0]<=e&&e<=t[2]&&t[1]<=i&&i<=t[3]}function He(t,e){var i=t[0],n=t[1],o=t[2],r=t[3],s=e[0],a=e[1],h=Ye.UNKNOWN;return s<i?h|=Ye.LEFT:s>o&&(h|=Ye.RIGHT),a<n?h|=Ye.BELOW:a>r&&(h|=Ye.ABOVE),h===Ye.UNKNOWN&&(h=Ye.INTERSECTING),h}function Ze(){return[1/0,1/0,-1/0,-1/0]}function $e(t,e,i,n,o){return o?(o[0]=t,o[1]=e,o[2]=i,o[3]=n,o):[t,e,i,n]}function qe(t){return $e(1/0,1/0,-1/0,-1/0,t)}function Je(t,e){var i=t[0],n=t[1];return $e(i,n,i,n,e)}function Qe(t,e,i,n,o){return oi(qe(o),t,e,i,n)}function ti(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function ei(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 ii(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 ni(t,e){for(var i=0,n=e.length;i<n;++i)ii(t,e[i]);return t}function oi(t,e,i,n,o){for(;i<n;i+=o)ri(t,e[i],e[i+1]);return t}function ri(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 si(t,e,i){var n;return(n=e.call(i,hi(t)))?n:(n=e.call(i,li(t)))?n:(n=e.call(i,_i(t)))?n:(n=e.call(i,fi(t)))||!1}function ai(t){var e=0;return yi(t)||(e=gi(t)*pi(t)),e}function hi(t){return[t[0],t[1]]}function li(t){return[t[2],t[1]]}function ui(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function ci(t,e,i,n,o){var r=e*n[0]/2,s=e*n[1]/2,a=Math.cos(i),h=Math.sin(i),l=r*a,u=r*h,c=s*a,p=s*h,d=t[0],f=t[1],_=d-l+p,g=d-l-p,v=d+l-p,y=d+l+p,m=f-u-c,E=f-u+c,x=f+u+c,T=f+u-c;return $e(Math.min(_,g,v,y),Math.min(m,E,x,T),Math.max(_,g,v,y),Math.max(m,E,x,T),o)}function pi(t){return t[3]-t[1]}function di(t,e,i){var n=i||[1/0,1/0,-1/0,-1/0];return vi(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]):qe(n),n}function fi(t){return[t[0],t[3]]}function _i(t){return[t[2],t[3]]}function gi(t){return t[2]-t[0]}function vi(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function yi(t){return t[2]<t[0]||t[3]<t[1]}function mi(t,e,i){var n=[t[0],t[1],t[0],t[3],t[2],t[1],t[2],t[3]];return e(n,n,2),function(t,e,i){return $e(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),i)}([n[0],n[2],n[4],n[6]],[n[1],n[3],n[5],n[7]],i)}var Ei={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"},xi={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"};function Ti(t,e,i,n,o,r){for(var s=r||[],a=0,h=e;h<i;h+=n){var l=t[h],u=t[h+1];s[a++]=o[0]*l+o[2]*u+o[4],s[a++]=o[1]*l+o[3]*u+o[5]}return r&&s.length!=a&&(s.length=a),s}var Si=6371008.8;function Ci(t,e,i){var n=i||Si,o=Ee(t[1]),r=Ee(e[1]),s=(r-o)/2,a=Ee(e[0]-t[0])/2,h=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(o)*Math.cos(r);return 2*n*Math.atan2(Math.sqrt(h),Math.sqrt(1-h))}var bi={DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},Ri={};Ri[bi.DEGREES]=2*Math.PI*6370997/360,Ri[bi.FEET]=.3048,Ri[bi.METERS]=1,Ri[bi.USFEET]=1200/3937;var wi=bi,Mi=function(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};Mi.prototype.canWrapX=function(){return this.canWrapX_},Mi.prototype.getCode=function(){return this.code_},Mi.prototype.getExtent=function(){return this.extent_},Mi.prototype.getUnits=function(){return this.units_},Mi.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||Ri[this.units_]},Mi.prototype.getWorldExtent=function(){return this.worldExtent_},Mi.prototype.getAxisOrientation=function(){return this.axisOrientation_},Mi.prototype.isGlobal=function(){return this.global_},Mi.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},Mi.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},Mi.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},Mi.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},Mi.prototype.setWorldExtent=function(t){this.worldExtent_=t},Mi.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},Mi.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_};var Oi=Mi,Ii=6378137,Li=Math.PI*Ii,Pi=[-Li,-Li,Li,Li],ki=[-180,-85,180,85],Ai=function(t){function e(e){t.call(this,{code:e,units:wi.METERS,extent:Pi,global:!0,worldExtent:ki,getPointResolution:function(t,e){return t/ve(e[1]/Ii)}})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Oi),Di=[new Ai("EPSG:3857"),new Ai("EPSG:102100"),new Ai("EPSG:102113"),new Ai("EPSG:900913"),new Ai("urn:ogc:def:crs:EPSG:6.18:3:3857"),new Ai("urn:ogc:def:crs:EPSG::3857"),new Ai("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Fi(t,e,i){var n=t.length,o=i>1?i:2,r=e;void 0===r&&(r=o>2?t.slice():new Array(n));for(var s=Li,a=0;a<n;a+=o){r[a]=s*t[a]/180;var h=Ii*Math.log(Math.tan(Math.PI*(t[a+1]+90)/360));h>s?h=s:h<-s&&(h=-s),r[a+1]=h}return r}function Ni(t,e,i){var n=t.length,o=i>1?i:2,r=e;void 0===r&&(r=o>2?t.slice():new Array(n));for(var s=0;s<n;s+=o)r[s]=180*t[s]/Li,r[s+1]=360*Math.atan(Math.exp(t[s+1]/Ii))/Math.PI-90;return r}var Gi=[-180,-90,180,90],ji=6378137*Math.PI/180,Yi=function(t){function e(e,i){t.call(this,{code:e,units:wi.DEGREES,extent:Gi,axisOrientation:i,global:!0,metersPerUnit:ji,worldExtent:Gi})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Oi),Wi=[new Yi("CRS:84"),new Yi("EPSG:4326","neu"),new Yi("urn:ogc:def:crs:EPSG::4326","neu"),new Yi("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new Yi("urn:ogc:def:crs:OGC:1.3:CRS84"),new Yi("urn:ogc:def:crs:OGC:2:84"),new Yi("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Yi("urn:x-ogc:def:crs:EPSG:4326","neu")],Xi={};var zi,Ki,Bi,Ui={};function Vi(t,e,i){var n=t.getCode(),o=e.getCode();n in Ui||(Ui[n]={}),Ui[n][o]=i}function Hi(t,e,i){var n;if(void 0!==e){for(var o=0,r=t.length;o<r;++o)e[o]=t[o];n=e}else n=t.slice();return n}function Zi(t,e,i){if(void 0!==e&&t!==e){for(var n=0,o=t.length;n<o;++n)e[n]=t[n];t=e}return t}function $i(t){!function(t,e){Xi[t]=e}(t.getCode(),t),Vi(t,t,Hi)}function qi(t){return"string"==typeof t?Xi[t]||null:t||null}function Ji(t,e,i,n){var o,r=(t=qi(t)).getPointResolutionFunc();if(r)o=r(e,i);else if(t.getUnits()==wi.DEGREES&&!n||n==wi.DEGREES)o=e;else{var s=nn(t,qi("EPSG:4326")),a=[i[0]-e/2,i[1],i[0]+e/2,i[1],i[0],i[1]-e/2,i[0],i[1]+e/2];o=(Ci((a=s(a,a,2)).slice(0,2),a.slice(2,4))+Ci(a.slice(4,6),a.slice(6,8)))/2;var h=n?Ri[n]:t.getMetersPerUnit();void 0!==h&&(o/=h)}return o}function Qi(t){!function(t){t.forEach($i)}(t),t.forEach(function(e){t.forEach(function(t){e!==t&&Vi(e,t,Hi)})})}function tn(t,e){return t?"string"==typeof t?qi(t):t:qi(e)}function en(t,e){if(t===e)return!0;var i=t.getUnits()===e.getUnits();return t.getCode()===e.getCode()?i:nn(t,e)===Hi&&i}function nn(t,e){var i=function(t,e){var i;return t in Ui&&e in Ui[t]&&(i=Ui[t][e]),i}(t.getCode(),e.getCode());return i||(i=Zi),i}function on(t,e){return nn(qi(t),qi(e))}function rn(t,e,i){return on(e,i)(t,void 0,t.length)}Qi(Di),Qi(Wi),zi=Di,Ki=Fi,Bi=Ni,Wi.forEach(function(t){zi.forEach(function(e){Vi(t,e,Ki),Vi(e,t,Bi)})});var sn=new Array(6);function an(t){return ln(t,1,0,0,1,0,0)}function hn(t,e){var i=t[0],n=t[1],o=t[2],r=t[3],s=t[4],a=t[5],h=e[0],l=e[1],u=e[2],c=e[3],p=e[4],d=e[5];return t[0]=i*h+o*l,t[1]=n*h+r*l,t[2]=i*u+o*c,t[3]=n*u+r*c,t[4]=i*p+o*d+s,t[5]=n*p+r*d+a,t}function ln(t,e,i,n,o,r,s){return t[0]=e,t[1]=i,t[2]=n,t[3]=o,t[4]=r,t[5]=s,t}function un(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function cn(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 pn(t,e,i){return hn(t,ln(sn,e,0,0,i,0,0))}function dn(t,e,i){return hn(t,ln(sn,1,0,0,1,e,i))}function fn(t,e,i,n,o,r,s,a){var h=Math.sin(r),l=Math.cos(r);return t[0]=n*l,t[1]=o*h,t[2]=-n*h,t[3]=o*l,t[4]=s*n*l-a*n*h+e,t[5]=s*o*h+a*o*l+i,t}var _n=[1,0,0,1,0,0];function gn(t){var e;return t==xi.XY?e=2:t==xi.XYZ||t==xi.XYM?e=3:t==xi.XYZM&&(e=4),e}var vn=function(t){function e(){t.call(this),this.layout=xi.XY,this.stride=2,this.flatCoordinates=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeExtent=function(t){return Qe(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return l()},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()&&(v(this.simplifiedGeometryCache),this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=t.toString();if(this.simplifiedGeometryCache.hasOwnProperty(e))return this.simplifiedGeometryCache[e];var i=this.getSimplifiedGeometryInternal(t);return i.getFlatCoordinates().length<this.flatCoordinates.length?(this.simplifiedGeometryCache[e]=i,i):(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=gn(t),this.layout=t,this.flatCoordinates=e},e.prototype.setCoordinates=function(t,e){l()},e.prototype.setLayout=function(t,e,i){var n;if(t)n=gn(t);else{for(var o=0;o<i;++o){if(0===e.length)return this.layout=xi.XY,void(this.stride=2);e=e[0]}t=function(t){var e;2==t?e=xi.XY:3==t?e=xi.XYZ:4==t&&(e=xi.XYZM);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,o,r,s){for(var a=s||[],h=Math.cos(o),l=Math.sin(o),u=r[0],c=r[1],p=0,d=e;d<i;d+=n){var f=t[d]-u,_=t[d+1]-c;a[p++]=u+f*h-_*l,a[p++]=c+f*l+_*h;for(var g=d+2;g<d+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 o=i;o||(o=ui(this.getExtent()));var r=this.getFlatCoordinates();if(r){var s=this.getStride();!function(t,e,i,n,o,r,s,a){for(var h=a||[],l=s[0],u=s[1],c=0,p=e;p<i;p+=n){var d=t[p]-l,f=t[p+1]-u;h[c++]=l+o*d,h[c++]=u+r*f;for(var _=p+2;_<p+n;++_)h[c++]=t[_]}a&&h.length!=c&&(h.length=c)}(r,0,r.length,s,t,n,o,r),this.changed()}},e.prototype.translate=function(t,e){var i=this.getFlatCoordinates();if(i){var n=this.getStride();!function(t,e,i,n,o,r,s){for(var a=s||[],h=0,l=e;l<i;l+=n){a[h++]=t[l]+o,a[h++]=t[l+1]+r;for(var u=l+2;u<l+n;++u)a[h++]=t[u]}s&&a.length!=h&&(a.length=h)}(i,0,i.length,n,t,e,i),this.changed()}},e}(function(t){function e(){t.call(this),this.extent_=[1/0,1/0,-1/0,-1/0],this.extentRevision_=-1,this.simplifiedGeometryCache={},this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return l()},e.prototype.closestPointXY=function(t,e,i,n){return l()},e.prototype.containsXY=function(t,e){return!1},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 l()},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){l()},e.prototype.scale=function(t,e,i){l()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return l()},e.prototype.getType=function(){return l()},e.prototype.applyTransform=function(t){l()},e.prototype.intersectsExtent=function(t){return l()},e.prototype.translate=function(t,e){l()},e.prototype.transform=function(t,e){var i=qi(t),n=i.getUnits()==wi.TILE_PIXELS?function(t,n,o){var r=i.getExtent(),s=i.getWorldExtent(),a=pi(s)/pi(r);return fn(_n,s[0],s[3],a,-a,0,0,0),Ti(t,0,t.length,o,_n,n),on(i,e)(t,n,o)}:on(i,e);return this.applyTransform(n),this},e}(X));function yn(t,e,i,n){for(var o=0,r=t[i-n],s=t[i-n+1];e<i;e+=n){var a=t[e],h=t[e+1];o+=s*a-r*h,r=a,s=h}return o/2}function mn(t,e,i,n){for(var o=0,r=0,s=i.length;r<s;++r){var a=i[r];o+=yn(t,e,a,n),e=a}return o}function En(t,e,i,n,o,r,s){var a,h=t[e],l=t[e+1],u=t[i]-h,c=t[i+1]-l;if(0===u&&0===c)a=e;else{var p=((o-h)*u+(r-l)*c)/(u*u+c*c);if(p>1)a=i;else{if(p>0){for(var d=0;d<n;++d)s[d]=Te(t[e+d],t[i+d],p);return void(s.length=n)}a=e}}for(var f=0;f<n;++f)s[f]=t[a+f];s.length=n}function xn(t,e,i,n,o){var r=t[e],s=t[e+1];for(e+=n;e<i;e+=n){var a=t[e],h=t[e+1],l=me(r,s,a,h);l>o&&(o=l),r=a,s=h}return o}function Tn(t,e,i,n,o){for(var r=0,s=i.length;r<s;++r){var a=i[r];o=xn(t,e,a,n,o),e=a}return o}function Sn(t,e,i,n,o,r,s,a,h,l,u){if(e==i)return l;var c,p;if(0===o){if((p=me(s,a,t[e],t[e+1]))<l){for(c=0;c<n;++c)h[c]=t[e+c];return h.length=n,p}return l}for(var d=u||[NaN,NaN],f=e+n;f<i;)if(En(t,f-n,f,n,s,a,d),(p=me(s,a,d[0],d[1]))<l){for(l=p,c=0;c<n;++c)h[c]=d[c];h.length=n,f+=n}else f+=n*Math.max((Math.sqrt(p)-Math.sqrt(l))/o|0,1);if(r&&(En(t,i-n,e,n,s,a,d),(p=me(s,a,d[0],d[1]))<l)){for(l=p,c=0;c<n;++c)h[c]=d[c];h.length=n}return l}function Cn(t,e,i,n,o,r,s,a,h,l,u){for(var c=u||[NaN,NaN],p=0,d=i.length;p<d;++p){var f=i[p];l=Sn(t,e,f,n,o,r,s,a,h,l,c),e=f}return l}function bn(t,e,i,n){for(var o=0,r=i.length;o<r;++o)t[e++]=i[o];return e}function Rn(t,e,i,n){for(var o=0,r=i.length;o<r;++o)for(var s=i[o],a=0;a<n;++a)t[e++]=s[a];return e}function wn(t,e,i,n,o){for(var r=o||[],s=0,a=0,h=i.length;a<h;++a){var l=Rn(t,e,i[a],n);r[s++]=l,e=l}return r.length=s,r}function Mn(t,e,i,n,o){for(var r=void 0!==o?o:[],s=0,a=e;a<i;a+=n)r[s++]=t.slice(a,a+n);return r.length=s,r}function On(t,e,i,n,o){for(var r=void 0!==o?o:[],s=0,a=0,h=i.length;a<h;++a){var l=i[a];r[s++]=Mn(t,e,l,n,r[s]),e=l}return r.length=s,r}function In(t,e,i,n,o){for(var r=void 0!==o?o:[],s=0,a=0,h=i.length;a<h;++a){var l=i[a];r[s++]=On(t,e,l,n,r[s]),e=l[l.length-1]}return r.length=s,r}function Ln(t,e,i,n,o,r,s){var a=(i-e)/n;if(a<3){for(;e<i;e+=n)r[s++]=t[e],r[s++]=t[e+1];return s}var h=new Array(a);h[0]=1,h[a-1]=1;for(var l=[e,i-n],u=0;l.length>0;){for(var c=l.pop(),p=l.pop(),d=0,f=t[p],_=t[p+1],g=t[c],v=t[c+1],y=p+n;y<c;y+=n){var m=ye(t[y],t[y+1],f,_,g,v);m>d&&(u=y,d=m)}d>o&&(h[(u-e)/n]=1,p+n<u&&l.push(p,u),u+n<c&&l.push(u,c))}for(var E=0;E<a;++E)h[E]&&(r[s++]=t[e+E*n],r[s++]=t[e+E*n+1]);return s}function Pn(t,e){return e*Math.round(t/e)}function kn(t,e,i,n,o,r,s){if(e==i)return s;var a,h,l=Pn(t[e],o),u=Pn(t[e+1],o);e+=n,r[s++]=l,r[s++]=u;do{if(a=Pn(t[e],o),h=Pn(t[e+1],o),(e+=n)==i)return r[s++]=a,r[s++]=h,s}while(a==l&&h==u);for(;e<i;){var c=Pn(t[e],o),p=Pn(t[e+1],o);if(e+=n,c!=a||p!=h){var d=a-l,f=h-u,_=c-l,g=p-u;d*g==f*_&&(d<0&&_<d||d==_||d>0&&_>d)&&(f<0&&g<f||f==g||f>0&&g>f)?(a=c,h=p):(r[s++]=a,r[s++]=h,l=a,u=h,a=c,h=p)}}return r[s++]=a,r[s++]=h,s}function An(t,e,i,n,o,r,s,a){for(var h=0,l=i.length;h<l;++h){var u=i[h];s=kn(t,e,u,n,o,r,s),a.push(s),e=u}return s}var Dn=function(t){function e(e,i){t.call(this),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===i||Array.isArray(e[0])?this.setCoordinates(e,i):this.setFlatCoordinates(i,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,i,n){return n<Ke(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(xn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Sn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))},e.prototype.getArea=function(){return yn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return Mn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=Ln(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new e(i,xi.XY)},e.prototype.getType=function(){return Ei.LINEAR_RING},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=Rn(this.flatCoordinates,0,t,this.stride),this.changed()},e}(vn),Fn=function(t){function e(e,i){t.call(this),this.setCoordinates(e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,i,n){var o=this.flatCoordinates,r=me(t,e,o[0],o[1]);if(r<n){for(var s=this.stride,a=0;a<s;++a)i[a]=o[a];return i.length=s,r}return n},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return Je(this.flatCoordinates,t)},e.prototype.getType=function(){return Ei.POINT},e.prototype.intersectsExtent=function(t){return Ve(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=bn(this.flatCoordinates,0,t,this.stride),this.changed()},e}(vn);function Nn(t,e,i,n,o){return!si(o,function(o){return!Gn(t,e,i,n,o[0],o[1])})}function Gn(t,e,i,n,o,r){for(var s=0,a=t[i-n],h=t[i-n+1];e<i;e+=n){var l=t[e],u=t[e+1];h<=r?u>r&&(l-a)*(r-h)-(o-a)*(u-h)>0&&s++:u<=r&&(l-a)*(r-h)-(o-a)*(u-h)<0&&s--,a=l,h=u}return 0!==s}function jn(t,e,i,n,o,r){if(0===i.length)return!1;if(!Gn(t,e,i[0],n,o,r))return!1;for(var s=1,a=i.length;s<a;++s)if(Gn(t,i[s-1],i[s],n,o,r))return!1;return!0}function Yn(t,e,i,n,o,r,s){for(var a,h,l,u,c,p,d,f=o[r+1],_=[],g=0,v=i.length;g<v;++g){var y=i[g];for(u=t[y-n],p=t[y-n+1],a=e;a<y;a+=n)c=t[a],d=t[a+1],(f<=p&&d<=f||p<=f&&f<=d)&&(l=(f-p)/(d-p)*(c-u)+u,_.push(l)),u=c,p=d}var m=NaN,E=-1/0;for(_.sort(Xt),u=_[0],a=1,h=_.length;a<h;++a){c=_[a];var x=Math.abs(c-u);x>E&&jn(t,e,i,n,l=(u+c)/2,f)&&(m=l,E=x),u=c}return isNaN(m)&&(m=o[r]),s?(s.push(m,f,E),s):[m,f,E]}function Wn(t,e,i,n,o,r){for(var s,a=[t[e],t[e+1]],h=[];e+n<i;e+=n){if(h[0]=t[e+n],h[1]=t[e+n+1],s=o.call(r,a,h))return s;a[0]=h[0],a[1]=h[1]}return!1}function Xn(t,e,i,n,o){var r=oi([1/0,1/0,-1/0,-1/0],t,e,i,n);return!!vi(o,r)&&(!!Ue(o,r)||(r[0]>=o[0]&&r[2]<=o[2]||(r[1]>=o[1]&&r[3]<=o[3]||Wn(t,e,i,n,function(t,e){return function(t,e,i){var n=!1,o=He(t,e),r=He(t,i);if(o===Ye.INTERSECTING||r===Ye.INTERSECTING)n=!0;else{var s,a,h=t[0],l=t[1],u=t[2],c=t[3],p=e[0],d=e[1],f=i[0],_=i[1],g=(_-d)/(f-p);r&Ye.ABOVE&&!(o&Ye.ABOVE)&&(n=(s=f-(_-c)/g)>=h&&s<=u),n||!(r&Ye.RIGHT)||o&Ye.RIGHT||(n=(a=_-(f-u)*g)>=l&&a<=c),n||!(r&Ye.BELOW)||o&Ye.BELOW||(n=(s=f-(_-l)/g)>=h&&s<=u),n||!(r&Ye.LEFT)||o&Ye.LEFT||(n=(a=_-(f-h)*g)>=l&&a<=c)}return n}(o,t,e)}))))}function zn(t,e,i,n,o){if(!function(t,e,i,n,o){return!!(Xn(t,e,i,n,o)||Gn(t,e,i,n,o[0],o[1])||Gn(t,e,i,n,o[0],o[3])||Gn(t,e,i,n,o[2],o[1])||Gn(t,e,i,n,o[2],o[3]))}(t,e,i[0],n,o))return!1;if(1===i.length)return!0;for(var r=1,s=i.length;r<s;++r)if(Nn(t,i[r-1],i[r],n,o)&&!Xn(t,i[r-1],i[r],n,o))return!1;return!0}function Kn(t,e,i,n){for(;e<i-n;){for(var o=0;o<n;++o){var r=t[e+o];t[e+o]=t[i-n+o],t[i-n+o]=r}e+=n,i-=n}}function Bn(t,e,i,n){for(var o=0,r=t[i-n],s=t[i-n+1];e<i;e+=n){var a=t[e],h=t[e+1];o+=(a-r)*(h+s),r=a,s=h}return o>0}function Un(t,e,i,n,o){for(var r=void 0!==o&&o,s=0,a=i.length;s<a;++s){var h=i[s],l=Bn(t,e,h,n);if(0===s){if(r&&l||!r&&!l)return!1}else if(r&&!l||!r&&l)return!1;e=h}return!0}function Vn(t,e,i,n,o){for(var r=void 0!==o&&o,s=0,a=i.length;s<a;++s){var h=i[s],l=Bn(t,e,h,n);(0===s?r&&l||!r&&!l:r&&!l||!r&&l)&&Kn(t,e,h,n),e=h}return e}var Hn=function(t){function e(e,i,n){t.call(this),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==i&&n?(this.setFlatCoordinates(i,e),this.ends_=n):this.setCoordinates(e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.appendLinearRing=function(t){this.flatCoordinates?Ut(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<Ke(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Tn(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Cn(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))},e.prototype.containsXY=function(t,e){return jn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return mn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?Vn(e=this.getOrientedFlatCoordinates().slice(),0,this.ends_,this.stride,t):e=this.flatCoordinates,On(e,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=ui(this.getExtent());this.flatInteriorPoint_=Yn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new Fn(this.getFlatInteriorPoint(),xi.XYM)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new Dn(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=[],o=0,r=0,s=i.length;r<s;++r){var a=i[r],h=new Dn(e.slice(o,a),t);n.push(h),o=a}return n},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;Un(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Vn(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=An(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),i,0,n),new e(i,xi.XY,n)},e.prototype.getType=function(){return Ei.POLYGON},e.prototype.intersectsExtent=function(t){return zn(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=wn(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},e}(vn),Zn=Hn;function $n(t){var e=t[0],i=t[1],n=t[2],o=t[3],r=[e,i,e,o,n,o,n,i,e,i];return new Hn(r,xi.XY,[r.length])}var qn=0;function Jn(t,e){setTimeout(function(){t(e)},0)}function Qn(t){return!(t.sourceCenter&&t.targetCenter&&!Pe(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}var to=function(t){function e(e){t.call(this);var i=g({},e);this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.updateAnimations_=this.updateAnimations_.bind(this),this.projection_=tn(i.projection,"EPSG:3857"),this.applyOptions_(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.applyOptions_=function(t){var e={};e[Me]=void 0!==t.center?t.center:null;var i=function(t){var e,i,n,o=void 0!==t.minZoom?t.minZoom:qn,r=void 0!==t.maxZoom?t.maxZoom:28,s=void 0!==t.zoomFactor?t.zoomFactor:2;if(void 0!==t.resolutions){var a=t.resolutions;i=a[o],n=void 0!==a[r]?a[r]:a[a.length-1],e=function(t){return function(e,i,n){if(void 0!==e){var o=Kt(t,e,n);o=ge(o+i,0,t.length-1);var r=Math.floor(o);if(o!=r&&r<t.length-1){var s=t[r]/t[r+1];return t[r]/Math.pow(s,o-r)}return t[r]}}}(a)}else{var h=tn(t.projection,"EPSG:3857"),l=h.getExtent(),u=l?Math.max(gi(l),pi(l)):360*Ri[wi.DEGREES]/h.getMetersPerUnit(),c=u/_e/Math.pow(2,qn),p=c/Math.pow(2,28-qn);void 0!==(i=t.maxResolution)?o=0:i=c/Math.pow(s,o),void 0===(n=t.minResolution)&&(n=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(s,r):c/Math.pow(s,r):p),r=o+Math.floor(Math.log(i/n)/Math.log(s)),n=i/Math.pow(s,r-o),e=function(t,e,i){return function(n,o,r){if(void 0!==n){var s=-r/2+.5,a=Math.floor(Math.log(e/n)/Math.log(t)+s),h=Math.max(a+o,0);return void 0!==i&&(h=Math.min(h,i)),e/Math.pow(t,h)}}}(s,i,r-o)}return{constraint:e,maxResolution:i,minResolution:n,minZoom:o,zoomFactor:s}}(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.minZoom_=i.minZoom;var n=function(t){return void 0!==t.extent?(e=t.extent,function(t){return t?[ge(t[0],e[0],e[2]),ge(t[1],e[1],e[3])]:void 0}):Se;var e}(t),o=i.constraint,r=function(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?(r=o||Ee(5),function(t,e){return void 0!==t?Math.abs(t+e)<=r?0:t+e:void 0}):!1===e?be:"number"==typeof e?(i=e,n=2*Math.PI/i,function(t,e){return void 0!==t?t=Math.floor((t+e)/n+.5)*n:void 0}):be}return Ce;var i,n;var o,r}(t);this.constraints_={center:n,resolution:o,rotation:r},void 0!==t.resolution?e[Oe]=t.resolution:void 0!==t.zoom&&(e[Oe]=this.constrainResolution(this.maxResolution_,t.zoom-this.minZoom_),this.resolutions_&&(e[Oe]=ge(Number(this.getResolution()||e[Oe]),this.minResolution_,this.maxResolution_))),e[Ie]=void 0!==t.rotation?t.rotation:0,this.setProperties(e),this.options_=t},e.prototype.getUpdatedOptions_=function(t){var e=g({},this.options_);return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenter(),e.rotation=this.getRotation(),g({},e,t)},e.prototype.animate=function(t){var e,i=arguments,n=arguments.length;if(n>1&&"function"==typeof arguments[n-1]&&(e=arguments[n-1],--n),!this.isDef()){var o=arguments[n-1];return o.center&&this.setCenter(o.center),void 0!==o.zoom&&this.setZoom(o.zoom),void 0!==o.rotation&&this.setRotation(o.rotation),void(e&&Jn(e,!0))}for(var r=Date.now(),s=this.getCenter().slice(),a=this.getResolution(),h=this.getRotation(),l=[],u=0;u<n;++u){var c=i[u],p={start:r,complete:!1,anchor:c.anchor,duration:void 0!==c.duration?c.duration:1e3,easing:c.easing||Ne};if(c.center&&(p.sourceCenter=s,p.targetCenter=c.center,s=p.targetCenter),void 0!==c.zoom?(p.sourceResolution=a,p.targetResolution=this.constrainResolution(this.maxResolution_,c.zoom-this.minZoom_,0),a=p.targetResolution):c.resolution&&(p.sourceResolution=a,p.targetResolution=c.resolution,a=p.targetResolution),void 0!==c.rotation){p.sourceRotation=h;var d=xe(c.rotation-h+Math.PI,2*Math.PI)-Math.PI;p.targetRotation=h+d,h=p.targetRotation}p.callback=e,Qn(p)?p.complete=!0:r+=p.duration,l.push(p)}this.animations_.push(l),this.setHint(Re,1),this.updateAnimations_()},e.prototype.getAnimating=function(){return this.hints_[Re]>0},e.prototype.getInteracting=function(){return this.hints_[we]>0},e.prototype.cancelAnimations=function(){this.setHint(Re,-this.hints_[Re]);for(var t=0,e=this.animations_.length;t<e;++t){var i=this.animations_[t];i[0].callback&&Jn(i[0].callback,!1)}this.animations_.length=0},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],o=!0,r=0,s=n.length;r<s;++r){var a=n[r];if(!a.complete){var h=t-a.start,l=a.duration>0?h/a.duration:1;l>=1?(a.complete=!0,l=1):o=!1;var u=a.easing(l);if(a.sourceCenter){var c=a.sourceCenter[0],p=a.sourceCenter[1],d=c+u*(a.targetCenter[0]-c),f=p+u*(a.targetCenter[1]-p);this.set(Me,[d,f])}if(a.sourceResolution&&a.targetResolution){var _=1===u?a.targetResolution:a.sourceResolution+u*(a.targetResolution-a.sourceResolution);a.anchor&&this.set(Me,this.calculateCenterZoom(_,a.anchor)),this.set(Oe,_)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var g=1===u?xe(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+u*(a.targetRotation-a.sourceRotation);a.anchor&&this.set(Me,this.calculateCenterRotate(g,a.anchor)),this.set(Ie,g)}if(e=!0,!a.complete)break}}if(o){this.animations_[i]=null,this.setHint(Re,-1);var v=n[0].callback;v&&Jn(v,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_))}},e.prototype.calculateCenterRotate=function(t,e){var i,n=this.getCenter();return void 0!==n&&(ke(i=[n[0]-e[0],n[1]-e[1]],t-this.getRotation()),Le(i,e)),i},e.prototype.calculateCenterZoom=function(t,e){var i,n=this.getCenter(),o=this.getResolution();void 0!==n&&void 0!==o&&(i=[e[0]-t*(e[0]-n[0])/o,e[1]-t*(e[1]-n[1])/o]);return i},e.prototype.getSizeFromViewport_=function(){var t=[100,100],e='.ol-viewport[data-view="'+c(this)+'"]',i=document.querySelector(e);if(i){var n=getComputedStyle(i);t[0]=parseInt(n.width,10),t[1]=parseInt(n.height,10)}return t},e.prototype.constrainCenter=function(t){return this.constraints_.center(t)},e.prototype.constrainResolution=function(t,e,i){var n=e||0,o=i||0;return this.constraints_.resolution(t,n,o)},e.prototype.constrainRotation=function(t,e){var i=e||0;return this.constraints_.rotation(t,i)},e.prototype.getCenter=function(){return this.get(Me)},e.prototype.getConstraints=function(){return this.constraints_},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){var e=t||this.getSizeFromViewport_(),i=this.getCenter();ce(i,1);var n=this.getResolution();ce(void 0!==n,2);var o=this.getRotation();return ce(void 0!==o,3),ci(i,n,o,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.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(Oe)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){var i=e||this.getSizeFromViewport_(),n=gi(t)/i[0],o=pi(t)/i[1];return Math.max(n,o)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,i=this.maxResolution_,n=this.minResolution_,o=Math.log(i/n)/Math.log(e);return function(t){return i/Math.pow(e,t*o)}},e.prototype.getRotation=function(){return this.get(Ie)},e.prototype.getValueForResolutionFunction=function(t){var e=t||2,i=this.maxResolution_,n=this.minResolution_,o=Math.log(i/n)/Math.log(e);return function(t){return Math.log(i/t)/Math.log(e)/o}},e.prototype.getState=function(t){var e=this.getCenter(),i=this.getProjection(),n=this.getResolution(),o=n/t,r=this.getRotation();return{center:[Math.round(e[0]/o)*o,Math.round(e[1]/o)*o],projection:void 0!==i?i:null,resolution:n,rotation:r,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=Kt(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){return this.constrainResolution(this.maxResolution_,t-this.minZoom_,0)},e.prototype.fit=function(t,e){var i,n=e||{},o=n.size;o||(o=this.getSizeFromViewport_()),ce(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t)?(ce(!yi(t),25),i=$n(t)):t.getType()===Ei.CIRCLE?(i=$n(t=t.getExtent())).rotate(this.getRotation(),ui(t)):i=t;var r,s=void 0!==n.padding?n.padding:[0,0,0,0],a=void 0===n.constrainResolution||n.constrainResolution,h=void 0!==n.nearest&&n.nearest;r=void 0!==n.minResolution?n.minResolution:void 0!==n.maxZoom?this.constrainResolution(this.maxResolution_,n.maxZoom-this.minZoom_,0):0;for(var l=i.getFlatCoordinates(),u=this.getRotation(),c=Math.cos(-u),p=Math.sin(-u),d=1/0,f=1/0,_=-1/0,g=-1/0,v=i.getStride(),y=0,m=l.length;y<m;y+=v){var E=l[y]*c-l[y+1]*p,x=l[y]*p+l[y+1]*c;d=Math.min(d,E),f=Math.min(f,x),_=Math.max(_,E),g=Math.max(g,x)}var T=this.getResolutionForExtent([d,f,_,g],[o[0]-s[1]-s[3],o[1]-s[0]-s[2]]);if(T=isNaN(T)?r:Math.max(T,r),a){var S=this.constrainResolution(T,0,0);!h&&S<T&&(S=this.constrainResolution(S,-1,0)),T=S}p=-p;var C=(d+_)/2,b=(f+g)/2,R=[(C+=(s[1]-s[3])/2*T)*c-(b+=(s[0]-s[2])/2*T)*p,b*c+C*p],w=n.callback?n.callback:P;void 0!==n.duration?this.animate({resolution:T,center:R,duration:n.duration,easing:n.easing},w):(this.setResolution(T),this.setCenter(R),Jn(w,!0))},e.prototype.centerOn=function(t,e,i){var n=this.getRotation(),o=Math.cos(-n),r=Math.sin(-n),s=t[0]*o-t[1]*r,a=t[1]*o+t[0]*r,h=this.getResolution(),l=(s+=(e[0]/2-i[0])*h)*o-(a+=(i[1]-e[1]/2)*h)*(r=-r),u=a*o+s*r;this.setCenter([l,u])},e.prototype.isDef=function(){return!!this.getCenter()&&void 0!==this.getResolution()},e.prototype.rotate=function(t,e){if(void 0!==e){var i=this.calculateCenterRotate(t,e);this.setCenter(i)}this.setRotation(t)},e.prototype.setCenter=function(t){this.set(Me,t),this.getAnimating()&&this.cancelAnimations()},e.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.set(Oe,t),this.getAnimating()&&this.cancelAnimations()},e.prototype.setRotation=function(t){this.set(Ie,t),this.getAnimating()&&this.cancelAnimations()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e}(X);function eo(t,e){var i=document.createElement("canvas");return t&&(i.width=t),e&&(i.height=e),i.getContext("2d")}function io(t,e){var i=e.parentNode;i&&i.replaceChild(t,e)}function no(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}var oo={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",SOURCE:"source"},ro=function(t){function e(e){t.call(this);var i=g({},e);i[oo.OPACITY]=void 0!==e.opacity?e.opacity:1,i[oo.VISIBLE]=void 0===e.visible||e.visible,i[oo.Z_INDEX]=e.zIndex,i[oo.MAX_RESOLUTION]=void 0!==e.maxResolution?e.maxResolution:1/0,i[oo.MIN_RESOLUTION]=void 0!==e.minResolution?e.minResolution:0,this.setProperties(i),this.state_=null,this.type}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getType=function(){return this.type},e.prototype.getLayerState=function(){var t=this.state_||{layer:this,managed:!0};return t.opacity=ge(this.getOpacity(),0,1),t.sourceState=this.getSourceState(),t.visible=this.getVisible(),t.extent=this.getExtent(),t.zIndex=this.getZIndex()||0,t.maxResolution=this.getMaxResolution(),t.minResolution=Math.max(this.getMinResolution(),0),this.state_=t,t},e.prototype.getLayersArray=function(t){return l()},e.prototype.getLayerStatesArray=function(t){return l()},e.prototype.getExtent=function(){return this.get(oo.EXTENT)},e.prototype.getMaxResolution=function(){return this.get(oo.MAX_RESOLUTION)},e.prototype.getMinResolution=function(){return this.get(oo.MIN_RESOLUTION)},e.prototype.getOpacity=function(){return this.get(oo.OPACITY)},e.prototype.getSourceState=function(){return l()},e.prototype.getVisible=function(){return this.get(oo.VISIBLE)},e.prototype.getZIndex=function(){return this.get(oo.Z_INDEX)},e.prototype.setExtent=function(t){this.set(oo.EXTENT,t)},e.prototype.setMaxResolution=function(t){this.set(oo.MAX_RESOLUTION,t)},e.prototype.setMinResolution=function(t){this.set(oo.MIN_RESOLUTION,t)},e.prototype.setOpacity=function(t){this.set(oo.OPACITY,t)},e.prototype.setVisible=function(t){this.set(oo.VISIBLE,t)},e.prototype.setZIndex=function(t){this.set(oo.Z_INDEX,t)},e}(X),so={UNDEFINED:"undefined",LOADING:"loading",READY:"ready",ERROR:"error"},ao={LAYERS:"layers"},ho=function(t){function e(e){var i=e||{},n=g({},i);delete n.layers;var o=i.layers;t.call(this,n),this.layersListenerKeys_=[],this.listenerKeys_={},C(this,W(ao.LAYERS),this.handleLayersChanged_,this),o?Array.isArray(o)?o=new B(o.slice(),{unique:!0}):ce("function"==typeof o.getArray,43):o=new B(void 0,{unique:!0}),this.setLayers(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(w),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push(C(t,f.ADD,this.handleLayersAdd_,this),C(t,f.REMOVE,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(w);v(this.listenerKeys_);for(var i=t.getArray(),n=0,o=i.length;n<o;n++){var r=i[n];this.listenerKeys_[c(r)]=[C(r,_,this.handleLayerChange_,this),C(r,N.CHANGE,this.handleLayerChange_,this)]}this.changed()},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.listenerKeys_[c(e)]=[C(e,_,this.handleLayerChange_,this),C(e,N.CHANGE,this.handleLayerChange_,this)],this.changed()},e.prototype.handleLayersRemove_=function(t){var e=c(t.element);this.listenerKeys_[e].forEach(w),delete this.listenerKeys_[e],this.changed()},e.prototype.getLayers=function(){return this.get(ao.LAYERS)},e.prototype.setLayers=function(t){this.set(ao.LAYERS,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(),o=i,r=e.length;o<r;o++){var s=e[o];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),void 0!==n.extent&&(void 0!==s.extent?s.extent=di(s.extent,n.extent):s.extent=n.extent)}return e},e.prototype.getSourceState=function(){return so.READY},e}(ro);function lo(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]+2*e,i[1]=t[1]+2*e,i}function uo(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]*e+.5|0,i[1]=t[1]*e+.5|0,i}function co(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:e[0]=e[1]=t,e)}var po=function(t){function e(e){t.call(this);var i=function(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var i,n,o,r={},s=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new ho({layers:t.layers});r[re.LAYERGROUP]=s,r[re.TARGET]=t.target,r[re.VIEW]=void 0!==t.view?t.view:new to,void 0!==t.controls&&(Array.isArray(t.controls)?i=new B(t.controls.slice()):(ce("function"==typeof t.controls.getArray,47),i=t.controls));void 0!==t.interactions&&(Array.isArray(t.interactions)?n=new B(t.interactions.slice()):(ce("function"==typeof t.interactions.getArray,48),n=t.interactions));void 0!==t.overlays?Array.isArray(t.overlays)?o=new B(t.overlays.slice()):(ce("function"==typeof t.overlays.getArray,49),o=t.overlays):o=new B;return{controls:i,interactions:n,keyboardEventTarget:e,overlays:o,values:r}}(e);this.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,this.loadTilesWhileAnimating_=void 0!==e.loadTilesWhileAnimating&&e.loadTilesWhileAnimating,this.loadTilesWhileInteracting_=void 0!==e.loadTilesWhileInteracting&&e.loadTilesWhileInteracting,this.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:et,this.animationDelayKey_,this.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_.call(this,Date.now())}.bind(this),this.coordinateToPixelTransform_=[1,0,0,1,0,0],this.pixelToCoordinateTransform_=[1,0,0,1,0,0],this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+(nt?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.viewport_.style.msTouchAction="none",this.viewport_.style.touchAction="none",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent";for(var n=[N.CLICK,N.DBLCLICK,N.MOUSEDOWN,N.TOUCHSTART,N.MSPOINTERDOWN,st.POINTERDOWN,N.MOUSEWHEEL,N.WHEEL],o=0,r=n.length;o<r;++o)C(this.overlayContainerStopEvent_,n[o],A);for(var s in this.viewport_.appendChild(this.overlayContainerStopEvent_),this.mapBrowserEventHandler_=new ee(this,e.moveTolerance),st)C(this.mapBrowserEventHandler_,st[s],this.handleMapBrowserEvent,this);this.keyboardEventTarget_=i.keyboardEventTarget,this.keyHandlerKeys_=null,C(this.viewport_,N.CONTEXTMENU,this.handleBrowserEvent,this),C(this.viewport_,N.WHEEL,this.handleBrowserEvent,this),C(this.viewport_,N.MOUSEWHEEL,this.handleBrowserEvent,this),this.controls=i.controls||new B,this.interactions=i.interactions||new B,this.overlays_=i.overlays,this.overlayIdIndex_={},this.renderer_=this.createRenderer(),this.handleResize_,this.focus_=null,this.postRenderFunctions_=[],this.tileQueue_=new de(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.skippedFeatureUids_={},C(this,W(re.LAYERGROUP),this.handleLayerGroupChanged_,this),C(this,W(re.VIEW),this.handleViewChanged_,this),C(this,W(re.SIZE),this.handleSizeChanged_,this),C(this,W(re.TARGET),this.handleTargetChanged_,this),this.setProperties(i.values),this.controls.forEach(function(t){t.setMap(this)}.bind(this)),C(this.controls,f.ADD,function(t){t.element.setMap(this)},this),C(this.controls,f.REMOVE,function(t){t.element.setMap(null)},this),this.interactions.forEach(function(t){t.setMap(this)}.bind(this)),C(this.interactions,f.ADD,function(t){t.element.setMap(this)},this),C(this.interactions,f.REMOVE,function(t){t.element.setMap(null)},this),this.overlays_.forEach(this.addOverlayInternal_.bind(this)),C(this.overlays_,f.ADD,function(t){this.addOverlayInternal_(t.element)},this),C(this.overlays_,f.REMOVE,function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)},this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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(),R(this.viewport_,N.CONTEXTMENU,this.handleBrowserEvent,this),R(this.viewport_,N.WHEEL,this.handleBrowserEvent,this),R(this.viewport_,N.MOUSEWHEEL,this.handleBrowserEvent,this),void 0!==this.handleResize_&&(removeEventListener(N.RESIZE,this.handleResize_,!1),this.handleResize_=void 0),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0),this.setTarget(null),t.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,e,i){if(this.frameState_){var n=this.getCoordinateFromPixel(t),o=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance*this.frameState_.pixelRatio:0,r=void 0!==i.layerFilter?i.layerFilter:I;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,o,e,null,r,null)}},e.prototype.getFeaturesAtPixel=function(t,e){var i=null;return this.forEachFeatureAtPixel(t,function(t){i||(i=[]),i.push(t)},e),i},e.prototype.forEachLayerAtPixel=function(t,e,i){if(this.frameState_){var n=i||{},o=void 0!==n.hitTolerance?i.hitTolerance*this.frameState_.pixelRatio:0,r=n.layerFilter||I;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,o,e,null,r,null)}},e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_)return!1;var i=this.getCoordinateFromPixel(t),n=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:I,o=void 0!==e.hitTolerance?e.hitTolerance*this.frameState_.pixelRatio:0;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,o,n,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(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(re.TARGET)},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){var e=this.frameState_;return e?cn(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(re.LAYERGROUP)},e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},e.prototype.getPixelFromCoordinate=function(t){var e=this.frameState_;return e?cn(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(re.SIZE)},e.prototype.getView=function(){return this.get(re.VIEW)},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){var o=this.frameState_;if(!(o&&e in o.wantedTiles))return 1/0;if(!o.wantedTiles[e][t.getKey()])return 1/0;var r=i[0]-o.focus[0],s=i[1]-o.focus[1];return 65536*Math.log(n)+Math.sqrt(r*r+s*s)/n},e.prototype.handleBrowserEvent=function(t,e){var i=e||t.type,n=new V(i,this,t);this.handleMapBrowserEvent(n)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){this.focus_=t.coordinate,t.frameState=this.frameState_;var e=this.getInteractions().getArray();if(!1!==this.dispatchEvent(t))for(var i=e.length-1;i>=0;i--){var n=e[i];if(n.getActive())if(!n.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 o=t.viewHints;o[Re]&&(i=this.loadTilesWhileAnimating_?8:0,n=2),o[we]&&(i=this.loadTilesWhileInteracting_?8:0,n=2)}e.getTilesLoading()<i&&(e.reprioritize(),e.loadMoreTiles(i,n))}!t||!this.hasListener(le)||t.animate||this.tileQueue_.getTilesLoading()||function t(e){for(var i=0,n=e.length;i<n;++i){var o=e[i];if("function"==typeof o.getLayers)return t(o.getLayers().getArray());var r=o.getSource();if(r&&r.loading)return!0}return!1}(this.getLayers().getArray())||this.renderer_.dispatchRenderEvent(le,t);for(var r=this.postRenderFunctions_,s=0,a=r.length;s<a;++s)r[s](this,t);r.length=0},e.prototype.handleSizeChanged_=function(){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)w(this.keyHandlerKeys_[e]);this.keyHandlerKeys_=null}if(t){t.appendChild(this.viewport_);var n=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.keyHandlerKeys_=[C(n,N.KEYDOWN,this.handleBrowserEvent,this),C(n,N.KEYPRESS,this.handleBrowserEvent,this)],this.handleResize_||(this.handleResize_=this.updateSize.bind(this),addEventListener(N.RESIZE,this.handleResize_,!1))}else this.renderer_.removeLayerRenderers(),no(this.viewport_),void 0!==this.handleResize_&&(removeEventListener(N.RESIZE,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_&&(w(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(w(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.viewport_.setAttribute("data-view",c(t)),this.viewPropertyListenerKey_=C(t,_,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=C(t,N.CHANGE,this.handleViewPropertyChanged_,this)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(w),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.layerGroupPropertyListenerKeys_=[C(t,_,this.render,this),C(t,N.CHANGE,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.render=function(){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,i=this.getSize(),n=this.getView(),o=[1/0,1/0,-1/0,-1/0],r=this.frameState_,s=null;if(void 0!==i&&function(t){return t[0]>0&&t[1]>0}(i)&&n&&n.isDef()){for(var a=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),h=this.getLayerGroup().getLayerStatesArray(),l={},u=0,p=h.length;u<p;++u)l[c(h[u].layer)]=h[u];e=n.getState(this.pixelRatio_),s={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,extent:o,focus:this.focus_?this.focus_:e.center,index:this.frameIndex_++,layerStates:l,layerStatesArray:h,pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:i,skippedFeatureUids:this.skippedFeatureUids_,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:e,viewHints:a,wantedTiles:{}}}if(s&&(s.extent=ci(e.center,e.resolution,e.rotation,s.size,o)),this.frameState_=s,this.renderer_.renderFrame(s),s){if(s.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,s.postRenderFunctions),r)(!this.previousExtent_||!yi(this.previousExtent_)&&!ti(s.extent,this.previousExtent_))&&(this.dispatchEvent(new U(ne,this,r)),this.previousExtent_=qe(this.previousExtent_));this.previousExtent_&&!s.viewHints[Re]&&!s.viewHints[we]&&!ti(s.extent,this.previousExtent_)&&(this.dispatchEvent(new U(oe,this,s)),ze(s.extent,this.previousExtent_))}this.dispatchEvent(new U(ie,this,s)),setTimeout(this.handlePostRender.bind(this),0)},e.prototype.setLayerGroup=function(t){this.set(re.LAYERGROUP,t)},e.prototype.setSize=function(t){this.set(re.SIZE,t)},e.prototype.setTarget=function(t){this.set(re.TARGET,t)},e.prototype.setView=function(t){this.set(re.VIEW,t)},e.prototype.skipFeature=function(t){this.skippedFeatureUids_[c(t)]=!0,this.render()},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)},e.prototype.unskipFeature=function(t){delete this.skippedFeatureUids_[c(t)],this.render()},e}(X);var fo,_o,go=function(t){function e(e){t.call(this),this.element=e.element?e.element:null,this.target_=null,this.map_=null,this.listenerKeys=[],this.render=e.render?e.render:P,e.target&&this.setTarget(e.target)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){no(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&no(this.element);for(var e=0,i=this.listenerKeys.length;e<i;++e)w(this.listenerKeys[e]);(this.listenerKeys.length=0,this.map_=t,this.map_)&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==P&&this.listenerKeys.push(C(t,ie,this.render,this)),t.render())},e.prototype.setTarget=function(t){this.target_="string"==typeof t?document.getElementById(t):t},e}(X),vo="ol-hidden",yo="ol-unselectable",mo="ol-control",Eo="ol-collapsed",xo=(_o={},function(t){if(fo||(fo=document.createElement("div").style),!(t in _o)){fo.font=t;var e=fo.fontFamily;if(fo.font="",!e)return null;_o[t]=e.split(/,\s?/)}return _o[t]});function To(t,e){return t.visible&&e>=t.minResolution&&e<t.maxResolution}var So=function(t){function e(e){var i=g({},e);delete i.source,t.call(this,i),this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,e.map&&this.setMap(e.map),C(this,W(oo.SOURCE),this.handleSourcePropertyChange_,this);var n=e.source?e.source:null;this.setSource(n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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(oo.SOURCE)||null},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():so.UNDEFINED},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(w(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=C(t,N.CHANGE,this.handleSourceChange_,this)),this.changed()},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(w(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(w(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=C(t,ae,function(t){var e=t,i=this.getLayerState();i.managed=!1,void 0===this.getZIndex()&&(i.zIndex=1/0),e.frameState.layerStatesArray.push(i),e.frameState.layerStates[c(this)]=i},this),this.mapRenderKey_=C(this,N.CHANGE,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(oo.SOURCE,t)},e}(ro);function Co(t){this.updateElement_(t.frameState)}var bo=function(t){function e(e){var i=e||{};t.call(this,{element:document.createElement("div"),render:i.render||Co,target:i.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===i.collapsed||i.collapsed,this.overrideCollapsible_=void 0!==i.collapsible,this.collapsible_=void 0===i.collapsible||i.collapsible,this.collapsible_||(this.collapsed_=!1);var n=void 0!==i.className?i.className:"ol-attribution",o=void 0!==i.tipLabel?i.tipLabel:"Attributions",r=void 0!==i.collapseLabel?i.collapseLabel:"»";"string"==typeof r?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=r):this.collapseLabel_=r;var s=void 0!==i.label?i.label:"i";"string"==typeof s?(this.label_=document.createElement("span"),this.label_.textContent=s):this.label_=s;var a=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,h=document.createElement("button");h.setAttribute("type","button"),h.title=o,h.appendChild(a),C(h,N.CLICK,this.handleClick_,this);var l=n+" "+yo+" "+mo+(this.collapsed_&&this.collapsible_?" "+Eo:"")+(this.collapsible_?"":" ol-uncollapsible"),u=this.element;u.className=l,u.appendChild(this.ulElement_),u.appendChild(h),this.renderedAttributions_=[],this.renderedVisible_=!0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.collectSourceAttributions_=function(t){for(var e={},i=[],n=t.layerStatesArray,o=t.viewState.resolution,r=0,s=n.length;r<s;++r){var a=n[r];if(To(a,o)){var h=a.layer.getSource();if(h){var l=h.getAttributions();if(l){var u=l(t);if(u)if(this.overrideCollapsible_||!1!==h.getAttributionsCollapsible()||this.setCollapsible(!1),Array.isArray(u))for(var c=0,p=u.length;c<p;++c)u[c]in e||(i.push(u[c]),e[u[c]]=!0);else u in e||(i.push(u),e[u]=!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),!Vt(e,this.renderedAttributions_)){!function(t){for(;t.lastChild;)t.removeChild(t.lastChild)}(this.ulElement_);for(var n=0,o=e.length;n<o;++n){var r=document.createElement("li");r.innerHTML=e[n],this.ulElement_.appendChild(r)}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(Eo),this.collapsed_?io(this.collapseLabel_,this.label_):io(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}(go);function Ro(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 o=this.element.classList.contains(vo);o||0!==i?o&&0!==i&&this.element.classList.remove(vo):this.element.classList.add(vo)}this.label_.style.msTransform=n,this.label_.style.webkitTransform=n,this.label_.style.transform=n}this.rotation_=i}}var wo=function(t){function e(e){var i=e||{};t.call(this,{element:document.createElement("div"),render:i.render||Ro,target:i.target});var n=void 0!==i.className?i.className:"ol-rotate",o=void 0!==i.label?i.label:"⇧";this.label_=null,"string"==typeof o?(this.label_=document.createElement("span"),this.label_.className="ol-compass",this.label_.textContent=o):(this.label_=o,this.label_.classList.add("ol-compass"));var r=i.tipLabel?i.tipLabel:"Reset rotation",s=document.createElement("button");s.className=n+"-reset",s.setAttribute("type","button"),s.title=r,s.appendChild(this.label_),C(s,N.CLICK,this.handleClick_,this);var a=n+" "+yo+" "+mo,h=this.element;h.className=a,h.appendChild(s),this.callResetNorth_=i.resetNorth?i.resetNorth:void 0,this.duration_=void 0!==i.duration?i.duration:250,this.autoHide_=void 0===i.autoHide||i.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(vo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap().getView();t&&void 0!==t.getRotation()&&(this.duration_>0?t.animate({rotation:0,duration:this.duration_,easing:Fe}):t.setRotation(0))},e}(go),Mo=function(t){function e(e){var i=e||{};t.call(this,{element:document.createElement("div"),target:i.target});var n=void 0!==i.className?i.className:"ol-zoom",o=void 0!==i.delta?i.delta:1,r=void 0!==i.zoomInLabel?i.zoomInLabel:"+",s=void 0!==i.zoomOutLabel?i.zoomOutLabel:"−",a=void 0!==i.zoomInTipLabel?i.zoomInTipLabel:"Zoom in",h=void 0!==i.zoomOutTipLabel?i.zoomOutTipLabel:"Zoom out",l=document.createElement("button");l.className=n+"-in",l.setAttribute("type","button"),l.title=a,l.appendChild("string"==typeof r?document.createTextNode(r):r),C(l,N.CLICK,this.handleClick_.bind(this,o));var u=document.createElement("button");u.className=n+"-out",u.setAttribute("type","button"),u.title=h,u.appendChild("string"==typeof s?document.createTextNode(s):s),C(u,N.CLICK,this.handleClick_.bind(this,-o));var c=n+" "+yo+" "+mo,p=this.element;p.className=c,p.appendChild(l),p.appendChild(u),this.duration_=void 0!==i.duration?i.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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.getResolution();if(i){var n=e.constrainResolution(i,t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({resolution:n,duration:this.duration_,easing:Fe})):e.setResolution(n)}}},e}(go);var Oo=function(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0};Oo.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},Oo.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},Oo.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 o=this.points_[e]-this.points_[i],r=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(r,o),this.initialVelocity_=Math.sqrt(o*o+r*r)/n,this.initialVelocity_>this.minVelocity_},Oo.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},Oo.prototype.getAngle=function(){return this.angle_};var Io=Oo,Lo={ACTIVE:"active"};function Po(t,e,i,n){ko(t,e=t.constrainRotation(e,0),i,n)}function ko(t,e,i,n){if(void 0!==e){var o=t.getRotation(),r=t.getCenter();void 0!==o&&r&&n>0?t.animate({rotation:e,anchor:i,duration:n,easing:Fe}):t.rotate(e,i)}}function Ao(t,e,i,n,o){Fo(t,e=t.constrainResolution(e,0,o),i,n)}function Do(t,e,i,n){var o=t.getResolution(),r=t.constrainResolution(o,e,0);if(void 0!==r){var s=t.getResolutions();r=ge(r,t.getMinResolution()||s[s.length-1],t.getMaxResolution()||s[0])}if(i&&void 0!==r&&r!==o){var a=t.getCenter(),h=t.calculateCenterZoom(r,i);h=t.constrainCenter(h),i=[(r*a[0]-o*h[0])/(r-o),(r*a[1]-o*h[1])/(r-o)]}Fo(t,r,i,n)}function Fo(t,e,i,n){if(e){var o=t.getResolution(),r=t.getCenter();if(void 0!==o&&r&&e!==o&&n)t.animate({resolution:e,anchor:i,duration:n,easing:Fe});else{if(i){var s=t.calculateCenterZoom(e,i);t.setCenter(s)}t.setResolution(e)}}}var No=function(t){function e(e){t.call(this),e.handleEvent&&(this.handleEvent=e.handleEvent),this.map_=null,this.setActive(!0)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getActive=function(){return this.get(Lo.ACTIVE)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(Lo.ACTIVE,t)},e.prototype.setMap=function(t){this.map_=t},e}(X);function Go(t){var e=!1;if(t.type==st.DBLCLICK){var i=t.originalEvent,n=t.map,o=t.coordinate,r=i.shiftKey?-this.delta_:this.delta_;Do(n.getView(),r,o,this.duration_),t.preventDefault(),e=!0}return!e}var jo=function(t){function e(e){t.call(this,{handleEvent:Go});var i=e||{};this.delta_=i.delta?i.delta:1,this.duration_=void 0!==i.duration?i.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(No),Yo=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Wo=function(t){return t.target.getTargetElement()===document.activeElement},Xo=I,zo=function(t){var e=t.originalEvent;return 0==e.button&&!(Q&&tt&&e.ctrlKey)},Ko=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},Bo=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Uo=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},Vo=function(t){var e=t.pointerEvent;return ce(void 0!==e,56),"mouse"==e.pointerType};function Ho(t){for(var e=t.length,i=0,n=0,o=0;o<e;o++)i+=t[o].clientX,n+=t[o].clientY;return[i/e,n/e]}var Zo=function(t){function e(e){var i=e||{};t.call(this,i),i.handleDownEvent&&(this.handleDownEvent=i.handleDownEvent),i.handleDragEvent&&(this.handleDragEvent=i.handleDragEvent),i.handleMoveEvent&&(this.handleMoveEvent=i.handleMoveEvent),i.handleUpEvent&&(this.handleUpEvent=i.handleUpEvent),i.stopDown&&(this.stopDown=i.stopDown),this.handlingDownUpSequence=!1,this.trackedPointers_={},this.targetPointers=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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==st.POINTERDRAG)this.handleDragEvent(t);else if(t.type==st.POINTERUP){var i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==st.POINTERDOWN){var n=this.handleDownEvent(t);n&&t.preventDefault(),this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==st.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===st.POINTERDOWN||e===st.POINTERDRAG||e===st.POINTERUP}(t)){var e=t.pointerEvent,i=e.pointerId.toString();t.type==st.POINTERUP?delete this.trackedPointers_[i]:t.type==st.POINTERDOWN?this.trackedPointers_[i]=e:i in this.trackedPointers_&&(this.trackedPointers_[i]=e),this.targetPointers=y(this.trackedPointers_)}},e}(No),$o=function(t){function e(e){t.call(this,{stopDown:L});var i=e||{};this.kinetic_=i.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1,this.condition_=i.condition?i.condition:Ko,this.noKinetic_=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().setHint(we,1));var e=this.targetPointers,i=Ho(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(i[0],i[1]),this.lastCentroid){var n=this.lastCentroid[0]-i[0],o=i[1]-this.lastCentroid[1],r=t.map.getView(),s=[n,o];Ae(s,r.getResolution()),ke(s,r.getRotation()),Le(s,r.getCenter()),s=r.constrainCenter(s),r.setCenter(s)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=i,this.lastPointersCount_=e.length},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(),o=this.kinetic_.getAngle(),r=i.getCenter(),s=e.getPixelFromCoordinate(r),a=e.getCoordinateFromPixel([s[0]-n*Math.cos(o),s[1]-n*Math.sin(o)]);i.animate({center:i.constrainCenter(a),duration:500,easing:Fe})}return this.panning_&&(this.panning_=!1,i.setHint(we,-1)),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.setCenter(t.frameState.viewState.center),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},e}(Zo),qo=function(t){function e(e){var i=e||{};t.call(this,{stopDown:L}),this.condition_=i.condition?i.condition:Yo,this.lastAngle_=void 0,this.duration_=void 0!==i.duration?i.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleDragEvent=function(t){if(Vo(t)){var e=t.map,i=e.getView();if(i.getConstraints().rotation!==Ce){var n=e.getSize(),o=t.pixel,r=Math.atan2(n[1]/2-o[1],o[0]-n[0]/2);if(void 0!==this.lastAngle_){var s=r-this.lastAngle_;ko(i,i.getRotation()-s)}this.lastAngle_=r}}},e.prototype.handleUpEvent=function(t){if(!Vo(t))return!0;var e=t.map.getView();return e.setHint(we,-1),Po(e,e.getRotation(),void 0,this.duration_),!1},e.prototype.handleDownEvent=function(t){return!!Vo(t)&&(!(!zo(t)||!this.condition_(t))&&(t.map.getView().setHint(we,1),this.lastAngle_=void 0,!0))},e}(Zo),Jo=function(t){function e(e){t.call(this),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.className="ol-box "+e,this.map_=null,this.startPixel_=null,this.endPixel_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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=e.top=e.width=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_.getCoordinateFromPixel,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new Zn([i])},e.prototype.getGeometry=function(){return this.geometry_},e}(O),Qo="boxstart",tr="boxdrag",er="boxend",ir=function(t){function e(e,i,n){t.call(this,e),this.coordinate=i,this.mapBrowserEvent=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(D);function nr(){var t,e,i=this.getMap(),n=i.getView(),o=i.getSize(),r=this.getGeometry().getExtent();if(this.out_){var s=n.calculateExtent(o),a=(t=[i.getPixelFromCoordinate(hi(r)),i.getPixelFromCoordinate(_i(r))],ni(qe(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.getResolutionForExtent(a,o)),r=s}var h=n.constrainResolution(n.getResolutionForExtent(r,o)),l=ui(r);l=n.constrainCenter(l),n.animate({resolution:h,center:l,duration:this.duration_,easing:Fe})}var or=function(t){function e(e){var i=e||{},n=i.condition?i.condition:Bo;t.call(this,{condition:n,className:i.className||"ol-dragzoom",onBoxEnd:nr}),this.duration_=void 0!==i.duration?i.duration:200,this.out_=void 0!==i.out&&i.out}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(function(t){function e(e){t.call(this);var i=e||{};this.box_=new Jo(i.className||"ol-dragbox"),this.minArea_=void 0!==i.minArea?i.minArea:64,this.onBoxEnd_=i.onBoxEnd?i.onBoxEnd:P,this.startPixel_=null,this.condition_=i.condition?i.condition:Xo,this.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:this.defaultBoxEndCondition}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.defaultBoxEndCondition=function(t,e,i){var n=i[0]-e[0],o=i[1]-e[1];return n*n+o*o>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){Vo(t)&&(this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new ir(tr,t.coordinate,t)))},e.prototype.handleUpEvent=function(t){return!Vo(t)||(this.box_.setMap(null),this.boxEndCondition_(t,this.startPixel_,t.pixel)&&(this.onBoxEnd_(t),this.dispatchEvent(new ir(er,t.coordinate,t))),!1)},e.prototype.handleDownEvent=function(t){return!!Vo(t)&&(!(!zo(t)||!this.condition_(t))&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new ir(Qo,t.coordinate,t)),!0))},e}(Zo)),rr={LEFT:37,UP:38,RIGHT:39,DOWN:40};function sr(t){var e=!1;if(t.type==N.KEYDOWN){var i=t.originalEvent.keyCode;if(this.condition_(t)&&(i==rr.DOWN||i==rr.LEFT||i==rr.RIGHT||i==rr.UP)){var n=t.map.getView(),o=n.getResolution()*this.pixelDelta_,r=0,s=0;i==rr.DOWN?s=-o:i==rr.LEFT?r=-o:i==rr.RIGHT?r=o:s=o;var a=[r,s];ke(a,n.getRotation()),function(t,e,i){var n=t.getCenter();if(n){var o=t.constrainCenter([n[0]+e[0],n[1]+e[1]]);i?t.animate({duration:i,easing:Ge,center:o}):t.setCenter(o)}}(n,a,this.duration_),t.preventDefault(),e=!0}}return!e}var ar=function(t){function e(e){t.call(this,{handleEvent:sr});var i=e||{};this.defaultCondition_=function(t){return Ko(t)&&Uo(t)},this.condition_=void 0!==i.condition?i.condition:this.defaultCondition_,this.duration_=void 0!==i.duration?i.duration:100,this.pixelDelta_=void 0!==i.pixelDelta?i.pixelDelta:128}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(No);function hr(t){var e=!1;if(t.type==N.KEYDOWN||t.type==N.KEYPRESS){var i=t.originalEvent.charCode;if(this.condition_(t)&&(i=="+".charCodeAt(0)||i=="-".charCodeAt(0))){var n=t.map,o=i=="+".charCodeAt(0)?this.delta_:-this.delta_;Do(n.getView(),o,void 0,this.duration_),t.preventDefault(),e=!0}}return!e}var lr=function(t){function e(e){t.call(this,{handleEvent:hr});var i=e||{};this.condition_=i.condition?i.condition:Uo,this.delta_=i.delta?i.delta:1,this.duration_=void 0!==i.duration?i.duration:100}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(No),ur="trackpad",cr="wheel",pr=function(t){function e(e){var i=e||{};t.call(this,i),this.delta_=0,this.duration_=void 0!==i.duration?i.duration:250,this.timeout_=void 0!==i.timeout?i.timeout:80,this.useAnchor_=void 0===i.useAnchor||i.useAnchor,this.constrainResolution_=i.constrainResolution||!1,this.condition_=i.condition?i.condition:Xo,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.trackpadDeltaPerZoom_=300,this.trackpadZoomBuffer_=1.5}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.decrementInteractingHint_=function(){this.trackpadTimeoutId_=void 0,this.getMap().getView().setHint(we,-1)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;var e=t.type;if(e!==N.WHEEL&&e!==N.MOUSEWHEEL)return!0;t.preventDefault();var i,n=t.map,o=t.originalEvent;if(this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==N.WHEEL?(i=o.deltaY,q&&o.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(i/=et),o.deltaMode===WheelEvent.DOM_DELTA_LINE&&(i*=40)):t.type==N.MOUSEWHEEL&&(i=-o.wheelDeltaY,J&&(i/=3)),0===i)return!1;var r=Date.now();if(void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(i)<4?ur:cr),this.mode_===ur){var s=n.getView();this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):s.setHint(we,1),this.trackpadTimeoutId_=setTimeout(this.decrementInteractingHint_.bind(this),this.trackpadEventGap_);var a=s.getResolution()*Math.pow(2,i/this.trackpadDeltaPerZoom_),h=s.getMinResolution(),l=s.getMaxResolution(),u=0;if(a<h?(a=Math.max(a,h/this.trackpadZoomBuffer_),u=1):a>l&&(a=Math.min(a,l*this.trackpadZoomBuffer_),u=-1),this.lastAnchor_){var c=s.calculateCenterZoom(a,this.lastAnchor_);s.setCenter(s.constrainCenter(c))}return s.setResolution(a),0===u&&this.constrainResolution_&&s.animate({resolution:s.constrainResolution(a,i>0?-1:1),easing:Fe,anchor:this.lastAnchor_,duration:this.duration_}),u>0?s.animate({resolution:h,easing:Fe,anchor:this.lastAnchor_,duration:500}):u<0&&s.animate({resolution:l,easing:Fe,anchor:this.lastAnchor_,duration:500}),this.startTime_=r,!1}this.delta_+=i;var p=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),p),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();Do(e,-ge(this.delta_,-1,1),this.lastAnchor_,this.duration_),this.mode_=void 0,this.delta_=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}(No),dr=function(t){function e(e){var i=e||{},n=i;n.stopDown||(n.stopDown=L),t.call(this,n),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==i.threshold?i.threshold:.3,this.duration_=void 0!==i.duration?i.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleDragEvent=function(t){var e=0,i=this.targetPointers[0],n=this.targetPointers[1],o=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){var r=o-this.lastAngle_;this.rotationDelta_+=r,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=r}this.lastAngle_=o;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==Ce){var h=s.getViewport().getBoundingClientRect(),l=Ho(this.targetPointers);if(l[0]-=h.left,l[1]-=h.top,this.anchor_=s.getCoordinateFromPixel(l),this.rotating_){var u=a.getRotation();s.render(),ko(a,u+e,this.anchor_)}}},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView();if(e.setHint(we,-1),this.rotating_)Po(e,e.getRotation(),this.anchor_,this.duration_);return!1}return!0},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().setHint(we,1),!0}return!1},e}(Zo),fr=function(t){function e(e){var i=e||{},n=i;n.stopDown||(n.stopDown=L),t.call(this,n),this.constrainResolution_=i.constrainResolution||!1,this.anchor_=null,this.duration_=void 0!==i.duration?i.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleDragEvent=function(t){var e=1,i=this.targetPointers[0],n=this.targetPointers[1],o=i.clientX-n.clientX,r=i.clientY-n.clientY,s=Math.sqrt(o*o+r*r);void 0!==this.lastDistance_&&(e=this.lastDistance_/s),this.lastDistance_=s;var a=t.map,h=a.getView(),l=h.getResolution(),u=h.getMaxResolution(),c=h.getMinResolution(),p=l*e;p>u?(e=u/l,p=u):p<c&&(e=c/l,p=c),1!=e&&(this.lastScaleDelta_=e);var d=a.getViewport().getBoundingClientRect(),f=Ho(this.targetPointers);f[0]-=d.left,f[1]-=d.top,this.anchor_=a.getCoordinateFromPixel(f),a.render(),Fo(h,p,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView();e.setHint(we,-1);var i=e.getResolution();if(this.constrainResolution_||i<e.getMinResolution()||i>e.getMaxResolution()){var n=this.lastScaleDelta_-1;Ao(e,i,this.anchor_,this.duration_,n)}return!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().setHint(we,1),!0}return!1},e}(Zo);var _r=function(t){function e(e,i,n){if(t.call(this),void 0!==n&&void 0===i)this.setFlatCoordinates(n,e);else{var o=i||0;this.setCenterAndRadius(e,o,n)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),void 0,this.layout)},e.prototype.closestPointXY=function(t,e,i,n){var o=this.flatCoordinates,r=t-o[0],s=e-o[1],a=r*r+s*s;if(a<n){if(0===a)for(var h=0;h<this.stride;++h)i[h]=o[h];else{var l=this.getRadius()/Math.sqrt(a);i[0]=o[0]+l*r,i[1]=o[1]+l*s;for(var u=2;u<this.stride;++u)i[u]=o[u]}return i.length=this.stride,a}return n},e.prototype.containsXY=function(t,e){var i=this.flatCoordinates,n=t-i[0],o=e-i[1];return n*n+o*o<=this.getRadiusSquared_()},e.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.computeExtent=function(t){var e=this.flatCoordinates,i=e[this.stride]-e[0];return $e(e[0]-i,e[1]-i,e[0]+i,e[1]+i,t)},e.prototype.getRadius=function(){return Math.sqrt(this.getRadiusSquared_())},e.prototype.getRadiusSquared_=function(){var t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e},e.prototype.getType=function(){return Ei.CIRCLE},e.prototype.intersectsExtent=function(t){if(vi(t,this.getExtent())){var e=this.getCenter();return t[0]<=e[0]&&t[2]>=e[0]||(t[1]<=e[1]&&t[3]>=e[1]||si(t,this.intersectsCoordinate,this))}return!1},e.prototype.setCenter=function(t){var e=this.stride,i=this.flatCoordinates[e]-this.flatCoordinates[0],n=t.slice();n[e]=n[0]+i;for(var o=1;o<e;++o)n[e+o]=t[o];this.setFlatCoordinates(this.layout,n),this.changed()},e.prototype.setCenterAndRadius=function(t,e,i){this.setLayout(i,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var n=this.flatCoordinates,o=bn(n,0,t,this.stride);n[o++]=n[0]+e;for(var r=1,s=this.stride;r<s;++r)n[o++]=n[r];n.length=o,this.changed()},e.prototype.getCoordinates=function(){return null},e.prototype.setCoordinates=function(t,e){},e.prototype.setRadius=function(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()},e}(vn);_r.prototype.transform;function gr(t,e,i,n){for(var o=t[e],r=t[e+1],s=0,a=e+n;a<i;a+=n){var h=t[a],l=t[a+1];s+=Math.sqrt((h-o)*(h-o)+(l-r)*(l-r)),o=h,r=l}return s}var vr={IMAGE:"IMAGE",TILE:"TILE",VECTOR_TILE:"VECTOR_TILE",VECTOR:"VECTOR"},yr={IMAGE:"image",VECTOR:"vector"},mr=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Er=/^([a-z]*)$/i;function xr(t){return"string"==typeof t?t:Sr(t)}!function(){var t={},e=0}();function Tr(t){return t[0]=ge(t[0]+.5|0,0,255),t[1]=ge(t[1]+.5|0,0,255),t[2]=ge(t[2]+.5|0,0,255),t[3]=ge(t[3],0,1),t}function Sr(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])+")"}function Cr(t){return Array.isArray(t)?Sr(t):t}var br={IDLE:0,LOADING:1,LOADED:2,ERROR:3},Rr=function(t){function e(e){t.call(this),this.highWaterMark=void 0!==e?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.canExpireCache=function(){return this.getCount()>this.highWaterMark},e.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null,this.dispatchEvent(N.CLEAR)},e.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},e.prototype.forEach=function(t,e){for(var i=this.oldest_;i;)t.call(e,i.value_,i.key_,this),i=i.newer},e.prototype.get=function(t){var e=this.entries_[t];return ce(void 0!==e,15),e===this.newest_?e.value_:(e===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(e.newer.older=e.older,e.older.newer=e.newer),e.newer=null,e.older=this.newest_,this.newest_.newer=e,this.newest_=e,e.value_)},e.prototype.remove=function(t){var e=this.entries_[t];return ce(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_},e.prototype.getCount=function(){return this.count_},e.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},e.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},e.prototype.peekLast=function(){return this.oldest_.value_},e.prototype.peekLastKey=function(){return this.oldest_.key_},e.prototype.peekFirstKey=function(){return this.newest_.key_},e.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_},e.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},e.prototype.set=function(t,e){ce(!(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_},e.prototype.setSize=function(t){this.highWaterMark=t},e.prototype.prune=function(){for(;this.canExpireCache();)this.pop()},e}(F),wr=[0,0,0,1],Mr=[],Or=[0,0,0,1],Ir=[0,0,0,0],Lr=new Rr,Pr={},kr=null,Ar={},Dr=function(){var t,e,i=60,n=Pr,o="32px ",r=["monospace","serif"],s=r.length,a="wmytzilWMYTZIL@#/&?$%10";function h(t){for(var i=Fr(),n=100;n<=700;n+=300){for(var h=n+" ",l=!0,u=0;u<s;++u){var c=r[u];if(i.font=h+o+c,e=i.measureText(a).width,t!=c){i.font=h+o+t+","+c;var p=i.measureText(a).width;l=l&&p!=e}}if(l)return!0}return!1}function l(){var e=!0;for(var o in n)n[o]<i&&(h(o)?(n[o]=i,v(Ar),kr=null,Lr.clear()):(++n[o],e=!1));e&&(clearInterval(t),t=void 0)}return function(e){var o=xo(e);if(o)for(var r=0,s=o.length;r<s;++r){var a=o[r];a in n||(n[a]=i,h(a)||(n[a]=0,void 0===t&&(t=setInterval(l,32))))}}}();function Fr(){return kr||(kr=eo(1,1)),kr}var Nr,Gr,jr=(Gr=Ar,function(t){var e=Gr[t];return void 0==e&&(Nr||((Nr=document.createElement("span")).textContent="M",Nr.style.margin=Nr.style.padding="0 !important",Nr.style.position="absolute !important",Nr.style.left="-99999px !important"),Nr.style.font=t,document.body.appendChild(Nr),e=Gr[t]=Nr.offsetHeight,document.body.removeChild(Nr)),e});function Yr(t,e){var i=Fr();return t!=i.font&&(i.font=t),i.measureText(e).width}function Wr(t,e,i,n){0!==e&&(t.translate(i,n),t.rotate(e),t.translate(-i,-n))}var Xr=[1,0,0,1,0,0];function zr(t,e,i,n,o,r,s,a,h,l,u){var c;1!=i&&(c=t.globalAlpha,t.globalAlpha=c*i),e&&t.setTransform.apply(t,e),t.drawImage(n,o,r,s,a,h,l,s*u,a*u),c&&(t.globalAlpha=c),e&&t.setTransform.apply(t,Xr)}var Kr=function(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale};Kr.prototype.clone=function(){return new Kr({opacity:this.getOpacity(),scale:this.getScale(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},Kr.prototype.getOpacity=function(){return this.opacity_},Kr.prototype.getRotateWithView=function(){return this.rotateWithView_},Kr.prototype.getRotation=function(){return this.rotation_},Kr.prototype.getScale=function(){return this.scale_},Kr.prototype.getSnapToPixel=function(){return!1},Kr.prototype.getAnchor=function(){return l()},Kr.prototype.getImage=function(t){return l()},Kr.prototype.getHitDetectionImage=function(t){return l()},Kr.prototype.getImageState=function(){return l()},Kr.prototype.getImageSize=function(){return l()},Kr.prototype.getHitDetectionImageSize=function(){return l()},Kr.prototype.getOrigin=function(){return l()},Kr.prototype.getSize=function(){return l()},Kr.prototype.setOpacity=function(t){this.opacity_=t},Kr.prototype.setRotateWithView=function(t){this.rotateWithView_=t},Kr.prototype.setRotation=function(t){this.rotation_=t},Kr.prototype.setScale=function(t){this.scale_=t},Kr.prototype.setSnapToPixel=function(t){},Kr.prototype.listenImageChange=function(t,e){return l()},Kr.prototype.load=function(){l()},Kr.prototype.unlistenImageChange=function(t,e){l()};var Br=function(t){function e(e){var i=e||{};t.call(this,{points:1/0,fill:i.fill,radius:i.radius,stroke:i.stroke,atlasManager:i.atlasManager})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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(),atlasManager:this.atlasManager_});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t},e.prototype.setRadius=function(t){this.radius_=t,this.render_(this.atlasManager_)},e}(function(t){function e(e){var i=void 0!==e.rotateWithView&&e.rotateWithView;t.call(this,{opacity:1,rotateWithView:i,rotation:void 0!==e.rotation?e.rotation:0,scale:1}),this.checksums_=null,this.canvas_=null,this.hitDetectionCanvas_=null,this.fill_=void 0!==e.fill?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius_=void 0!==e.radius?e.radius:e.radius1,this.radius2_=e.radius2,this.angle_=void 0!==e.angle?e.angle:0,this.stroke_=void 0!==e.stroke?e.stroke:null,this.anchor_=null,this.size_=null,this.imageSize_=null,this.hitDetectionImageSize_=null,this.atlasManager_=e.atlasManager,this.render_(this.atlasManager_)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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(),atlasManager:this.atlasManager_});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 br.LOADED},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){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t,e){},e.prototype.render_=function(t){var e,i,n="",o="",r=0,s=null,a=0,h=0;this.stroke_&&(null===(i=this.stroke_.getColor())&&(i=Or),i=Cr(i),void 0===(h=this.stroke_.getWidth())&&(h=1),s=this.stroke_.getLineDash(),a=this.stroke_.getLineDashOffset(),it||(s=null,a=0),void 0===(o=this.stroke_.getLineJoin())&&(o="round"),void 0===(n=this.stroke_.getLineCap())&&(n="round"),void 0===(r=this.stroke_.getMiterLimit())&&(r=10));var l=2*(this.radius_+h)+1,u={strokeStyle:i,strokeWidth:h,size:l,lineCap:n,lineDash:s,lineDashOffset:a,lineJoin:o,miterLimit:r};if(void 0===t){var c=eo(l,l);this.canvas_=c.canvas,e=l=this.canvas_.width,this.draw_(u,c,0,0),this.createHitDetectionCanvas_(u)}else{l=Math.round(l);var p,d=!this.fill_;d&&(p=this.drawHitDetectionCanvas_.bind(this,u));var f=this.getChecksum(),_=t.add(f,l,l,this.draw_.bind(this,u),p);this.canvas_=_.image,this.origin_=[_.offsetX,_.offsetY],e=_.image.width,d?(this.hitDetectionCanvas_=_.hitImage,this.hitDetectionImageSize_=[_.hitImage.width,_.hitImage.height]):(this.hitDetectionCanvas_=this.canvas_,this.hitDetectionImageSize_=[e,e])}this.anchor_=[l/2,l/2],this.size_=[l,l],this.imageSize_=[e,e]},e.prototype.draw_=function(t,e,i,n){var o,r,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 h=void 0!==this.radius2_?this.radius2_:this.radius_;for(h!==this.radius_&&(a*=2),o=0;o<=a;o++)r=2*o*Math.PI/a-Math.PI/2+this.angle_,s=o%2==0?this.radius_:h,e.lineTo(t.size/2+s*Math.cos(r),t.size/2+s*Math.sin(r))}if(this.fill_){var l=this.fill_.getColor();null===l&&(l=wr),e.fillStyle=Cr(l),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,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.fill_)this.hitDetectionCanvas_=this.canvas_;else{var e=eo(t.size,t.size);this.hitDetectionCanvas_=e.canvas,this.drawHitDetectionCanvas_(t,e,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 o=this.points_;if(o===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var r,s,a,h=void 0!==this.radius2_?this.radius2_:this.radius_;for(h!==this.radius_&&(o*=2),r=0;r<=o;r++)a=2*r*Math.PI/o-Math.PI/2+this.angle_,s=r%2==0?this.radius_:h,e.lineTo(t.size/2+s*Math.cos(a),t.size/2+s*Math.sin(a))}e.fillStyle=xr(wr),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.prototype.getChecksum=function(){var t=this.stroke_?this.stroke_.getChecksum():"-",e=this.fill_?this.fill_.getChecksum():"-";if(!this.checksums_||t!=this.checksums_[1]||e!=this.checksums_[2]||this.radius_!=this.checksums_[3]||this.radius2_!=this.checksums_[4]||this.angle_!=this.checksums_[5]||this.points_!=this.checksums_[6]){var i="r"+t+e+(void 0!==this.radius_?this.radius_.toString():"-")+(void 0!==this.radius2_?this.radius2_.toString():"-")+(void 0!==this.angle_?this.angle_.toString():"-")+(void 0!==this.points_?this.points_.toString():"-");this.checksums_=[i,t,e,this.radius_,this.radius2_,this.angle_,this.points_]}return this.checksums_[0]},e}(Kr)),Ur=function(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.checksum_=void 0};Ur.prototype.clone=function(){var t=this.getColor();return new Ur({color:Array.isArray(t)?t.slice():t||void 0})},Ur.prototype.getColor=function(){return this.color_},Ur.prototype.setColor=function(t){this.color_=t,this.checksum_=void 0},Ur.prototype.getChecksum=function(){if(void 0===this.checksum_){var t=this.color_;t?Array.isArray(t)||"string"==typeof t?this.checksum_="f"+xr(t):this.checksum_=c(this.color_):this.checksum_="f-"}return this.checksum_};var Vr=Ur,Hr=function(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,this.checksum_=void 0};Hr.prototype.clone=function(){var t=this.getColor();return new Hr({color:Array.isArray(t)?t.slice():t||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()})},Hr.prototype.getColor=function(){return this.color_},Hr.prototype.getLineCap=function(){return this.lineCap_},Hr.prototype.getLineDash=function(){return this.lineDash_},Hr.prototype.getLineDashOffset=function(){return this.lineDashOffset_},Hr.prototype.getLineJoin=function(){return this.lineJoin_},Hr.prototype.getMiterLimit=function(){return this.miterLimit_},Hr.prototype.getWidth=function(){return this.width_},Hr.prototype.setColor=function(t){this.color_=t,this.checksum_=void 0},Hr.prototype.setLineCap=function(t){this.lineCap_=t,this.checksum_=void 0},Hr.prototype.setLineDash=function(t){this.lineDash_=t,this.checksum_=void 0},Hr.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t,this.checksum_=void 0},Hr.prototype.setLineJoin=function(t){this.lineJoin_=t,this.checksum_=void 0},Hr.prototype.setMiterLimit=function(t){this.miterLimit_=t,this.checksum_=void 0},Hr.prototype.setWidth=function(t){this.width_=t,this.checksum_=void 0},Hr.prototype.getChecksum=function(){return void 0===this.checksum_&&(this.checksum_="s",this.color_?"string"==typeof this.color_?this.checksum_+=this.color_:this.checksum_+=c(this.color_):this.checksum_+="-",this.checksum_+=","+(void 0!==this.lineCap_?this.lineCap_.toString():"-")+","+(this.lineDash_?this.lineDash_.toString():"-")+","+(void 0!==this.lineDashOffset_?this.lineDashOffset_:"-")+","+(void 0!==this.lineJoin_?this.lineJoin_:"-")+","+(void 0!==this.miterLimit_?this.miterLimit_.toString():"-")+","+(void 0!==this.width_?this.width_.toString():"-")),this.checksum_};var Zr=Hr,$r=function(t){var e=t||{};this.geometry_=null,this.geometryFunction_=Qr,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};$r.prototype.clone=function(){var t=this.getGeometry();return t&&"object"==typeof t&&(t=t.clone()),new $r({geometry:t,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()})},$r.prototype.getRenderer=function(){return this.renderer_},$r.prototype.setRenderer=function(t){this.renderer_=t},$r.prototype.getGeometry=function(){return this.geometry_},$r.prototype.getGeometryFunction=function(){return this.geometryFunction_},$r.prototype.getFill=function(){return this.fill_},$r.prototype.setFill=function(t){this.fill_=t},$r.prototype.getImage=function(){return this.image_},$r.prototype.setImage=function(t){this.image_=t},$r.prototype.getStroke=function(){return this.stroke_},$r.prototype.setStroke=function(t){this.stroke_=t},$r.prototype.getText=function(){return this.text_},$r.prototype.setText=function(t){this.text_=t},$r.prototype.getZIndex=function(){return this.zIndex_},$r.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_=Qr,this.geometry_=t},$r.prototype.setZIndex=function(t){this.zIndex_=t};var qr=null;function Jr(t,e){if(!qr){var i=new Vr({color:"rgba(255,255,255,0.4)"}),n=new Zr({color:"#3399CC",width:1.25});qr=[new $r({image:new Br({fill:i,stroke:n,radius:5}),fill:i,stroke:n})]}return qr}function Qr(t){return t.getGeometry()}var ts="renderOrder",es=function(t){function e(e){var i=e||{},n=g({},i);delete n.style,delete n.renderBuffer,delete n.updateWhileAnimating,delete n.updateWhileInteracting,t.call(this,n),this.declutter_=void 0!==i.declutter&&i.declutter,this.renderBuffer_=void 0!==i.renderBuffer?i.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(i.style),this.updateWhileAnimating_=void 0!==i.updateWhileAnimating&&i.updateWhileAnimating,this.updateWhileInteracting_=void 0!==i.updateWhileInteracting&&i.updateWhileInteracting,this.renderMode_=i.renderMode||yr.VECTOR,this.type=vr.VECTOR}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.setDeclutter=function(t){this.declutter_=t},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(ts)},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(ts,t)},e.prototype.setStyle=function(t){this.style_=void 0!==t?t:Jr,this.styleFunction_=null===t?void 0:function(t){var e;if("function"==typeof t)e=t;else{var i;Array.isArray(t)?i=t:(ce("function"==typeof t.getZIndex,41),i=[t]),e=function(){return i}}return e}(this.style_),this.changed()},e.prototype.getRenderMode=function(){return this.renderMode_},e}(So);es.prototype.getSource;function is(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}var ns=function(t){function e(e){t.call(this),this.projection_=qi(e.projection),this.attributions_=is(e.attributions),this.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,this.loading=!1,this.state_=void 0!==e.state?e.state:so.READY,this.wrapX_=void 0!==e.wrapX&&e.wrapX}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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 l()},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_=is(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(X),os=i("Q22Q"),rs=i.n(os),ss=function(t){this.rbush_=rs()(t,void 0),this.items_={}};ss.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_[c(e)]=i},ss.prototype.load=function(t,e){for(var i=new Array(e.length),n=0,o=e.length;n<o;n++){var r=t[n],s=e[n],a={minX:r[0],minY:r[1],maxX:r[2],maxY:r[3],value:s};i[n]=a,this.items_[c(s)]=a}this.rbush_.load(i)},ss.prototype.remove=function(t){var e=c(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)},ss.prototype.update=function(t,e){var i=this.items_[c(e)];ti([i.minX,i.minY,i.maxX,i.maxY],t)||(this.remove(e),this.insert(t,e))},ss.prototype.getAll=function(){return this.rbush_.all().map(function(t){return t.value})},ss.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})},ss.prototype.forEach=function(t,e){return this.forEach_(this.getAll(),t,e)},ss.prototype.forEachInExtent=function(t,e,i){return this.forEach_(this.getInExtent(t),e,i)},ss.prototype.forEach_=function(t,e,i){for(var n,o=0,r=t.length;o<r;o++)if(n=e.call(i,t[o]))return n;return n},ss.prototype.isEmpty=function(){return m(this.items_)},ss.prototype.clear=function(){this.rbush_.clear(),this.items_={}},ss.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return $e(e.minX,e.minY,e.maxX,e.maxY,t)},ss.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_[e]};var as=.5,hs=function(t){function e(e,i,n,o,r){var s=void 0!==r?br.IDLE:br.LOADED;t.call(this,e,i,n,s),this.loader_=void 0!==r?r:null,this.canvas_=o,this.error_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getError=function(){return this.error_},e.prototype.handleLoad_=function(t){t?(this.error_=t,this.state=br.ERROR):this.state=br.LOADED,this.changed()},e.prototype.load=function(){this.state==br.IDLE&&(this.state=br.LOADING,this.changed(),this.loader_(this.handleLoad_.bind(this)))},e.prototype.getImage=function(){return this.canvas_},e}(function(t){function e(e,i,n,o){t.call(this),this.extent=e,this.pixelRatio_=n,this.resolution=i,this.state=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.changed=function(){this.dispatchEvent(N.CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return l()},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(){l()},e}(F)),ls=function(t){function e(e,i,n,o,r){t.call(this,e),this.vectorContext=i,this.frameState=n,this.context=o,this.glContext=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(D),us=function(){};us.prototype.drawCustom=function(t,e,i){},us.prototype.drawGeometry=function(t){},us.prototype.setStyle=function(t){},us.prototype.drawCircle=function(t,e){},us.prototype.drawFeature=function(t,e){},us.prototype.drawGeometryCollection=function(t,e){},us.prototype.drawLineString=function(t,e){},us.prototype.drawMultiLineString=function(t,e){},us.prototype.drawMultiPoint=function(t,e){},us.prototype.drawMultiPolygon=function(t,e){},us.prototype.drawPoint=function(t,e){},us.prototype.drawPolygon=function(t,e){},us.prototype.drawText=function(t,e){},us.prototype.setFillStrokeStyle=function(t,e){},us.prototype.setImageStyle=function(t,e){},us.prototype.setTextStyle=function(t,e){};var cs=us,ps=function(t){function e(e,i,n,o,r){t.call(this),this.context_=e,this.pixelRatio_=i,this.extent_=n,this.transform_=o,this.viewRotation_=r,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=0,this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=0,this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=[1,0,0,1,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawImages_=function(t,e,i,n){if(this.image_){var o=Ti(t,e,i,2,this.transform_,this.pixelCoordinates_),r=this.context_,s=this.tmpLocalTransform_,a=r.globalAlpha;1!=this.imageOpacity_&&(r.globalAlpha=a*this.imageOpacity_);var h=this.imageRotation_;this.imageRotateWithView_&&(h+=this.viewRotation_);for(var l=0,u=o.length;l<u;l+=2){var c=o[l]-this.imageAnchorX_,p=o[l+1]-this.imageAnchorY_;if(0!==h||1!=this.imageScale_){var d=c+this.imageAnchorX_,f=p+this.imageAnchorY_;fn(s,d,f,this.imageScale_,this.imageScale_,h,-d,-f),r.setTransform.apply(r,s)}r.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,c,p,this.imageWidth_,this.imageHeight_)}0===h&&1==this.imageScale_||r.setTransform(1,0,0,1,0,0),1!=this.imageOpacity_&&(r.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 o=Ti(t,e,i,n,this.transform_,this.pixelCoordinates_),r=this.context_,s=this.textRotation_;for(this.textRotateWithView_&&(s+=this.viewRotation_);e<i;e+=n){var a=o[e]+this.textOffsetX_,h=o[e+1]+this.textOffsetY_;if(0!==s||1!=this.textScale_){var l=fn(this.tmpLocalTransform_,a,h,this.textScale_,this.textScale_,s,-a,-h);r.setTransform.apply(r,l)}this.textStrokeState_&&r.strokeText(this.text_,a,h),this.textFillState_&&r.fillText(this.text_,a,h)}0===s&&1==this.textScale_||r.setTransform(1,0,0,1,0,0)}},e.prototype.moveToLineTo_=function(t,e,i,n,o){var r=this.context_,s=Ti(t,e,i,n,this.transform_,this.pixelCoordinates_);r.moveTo(s[0],s[1]);var a=s.length;o&&(a-=2);for(var h=2;h<a;h+=2)r.lineTo(s[h],s[h+1]);return o&&r.closePath(),i},e.prototype.drawRings_=function(t,e,i,n){for(var o=0,r=i.length;o<r;++o)e=this.moveToLineTo_(t,e,i[o],n,!0);return e},e.prototype.drawCircle=function(t){if(vi(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 o=t.getStride();return Ti(n,0,n.length,o,e,i)}return null}(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],n=e[3]-e[1],o=Math.sqrt(i*i+n*n),r=this.context_;r.beginPath(),r.arc(e[0],e[1],o,0,2*Math.PI),this.fillState_&&r.fill(),this.strokeState_&&r.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.drawGeometry=function(t){switch(t.getType()){case Ei.POINT:this.drawPoint(t);break;case Ei.LINE_STRING:this.drawLineString(t);break;case Ei.POLYGON:this.drawPolygon(t);break;case Ei.MULTI_POINT:this.drawMultiPoint(t);break;case Ei.MULTI_LINE_STRING:this.drawMultiLineString(t);break;case Ei.MULTI_POLYGON:this.drawMultiPolygon(t);break;case Ei.GEOMETRY_COLLECTION:this.drawGeometryCollection(t);break;case Ei.CIRCLE:this.drawCircle(t)}},e.prototype.drawFeature=function(t,e){var i=e.getGeometryFunction()(t);i&&vi(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){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){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(vi(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){var e=t.getExtent();if(vi(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var i=this.context_,n=t.getFlatCoordinates(),o=0,r=t.getEnds(),s=t.getStride();i.beginPath();for(var a=0,h=r.length;a<h;++a)o=this.moveToLineTo_(n,o,r[a],s,!1);i.stroke()}if(""!==this.text_){var l=t.getFlatMidpoints();this.drawText_(l,0,l.length,2)}}},e.prototype.drawPolygon=function(t){if(vi(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(vi(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,o=t.getEndss(),r=t.getStride();e.beginPath();for(var s=0,a=o.length;s<a;++s){var h=o[s];n=this.drawRings_(i,n,h,r)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var l=t.getFlatInteriorPoints();this.drawText_(l,0,l.length,2)}}},e.prototype.setContextFillState_=function(t){var e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.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=e.lineCap=t.lineCap),it&&(Vt(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=e.lineDashOffset=t.lineDashOffset)),i.lineJoin!=t.lineJoin&&(i.lineJoin=e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,it&&(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=e.font=t.font),i.textAlign!=n&&(i.textAlign=e.textAlign=n),i.textBaseline!=t.textBaseline&&(i.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:Cr(i||wr)}}else this.fillState_=null;if(e){var n=e.getColor(),o=e.getLineCap(),r=e.getLineDash(),s=e.getLineDashOffset(),a=e.getLineJoin(),h=e.getWidth(),l=e.getMiterLimit();this.strokeState_={lineCap:void 0!==o?o:"round",lineDash:r||Mr,lineDashOffset:s||0,lineJoin:void 0!==a?a:"round",lineWidth:this.pixelRatio_*(void 0!==h?h:1),miterLimit:void 0!==l?l:10,strokeStyle:Cr(n||Or)}}else this.strokeState_=null},e.prototype.setImageStyle=function(t){if(t){var e=t.getAnchor(),i=t.getImage(1),n=t.getOrigin(),o=t.getSize();this.imageAnchorX_=e[0],this.imageAnchorY_=e[1],this.imageHeight_=o[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_=o[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:Cr(i||wr)}}else this.textFillState_=null;var n=t.getStroke();if(n){var o=n.getColor(),r=n.getLineCap(),s=n.getLineDash(),a=n.getLineDashOffset(),h=n.getLineJoin(),l=n.getWidth(),u=n.getMiterLimit();this.textStrokeState_={lineCap:void 0!==r?r:"round",lineDash:s||Mr,lineDashOffset:a||0,lineJoin:void 0!==h?h:"round",lineWidth:void 0!==l?l:1,miterLimit:void 0!==u?u:10,strokeStyle:Cr(o||Or)}}else this.textStrokeState_=null;var c=t.getFont(),p=t.getOffsetX(),d=t.getOffsetY(),f=t.getRotateWithView(),_=t.getRotation(),g=t.getScale(),v=t.getText(),y=t.getTextAlign(),m=t.getTextBaseline();this.textState_={font:void 0!==c?c:"10px sans-serif",textAlign:void 0!==y?y:"center",textBaseline:void 0!==m?m:"middle"},this.text_=void 0!==v?v:"",this.textOffsetX_=void 0!==p?this.pixelRatio_*p:0,this.textOffsetY_=void 0!==d?this.pixelRatio_*d:0,this.textRotateWithView_=void 0!==f&&f,this.textRotation_=void 0!==_?_:0,this.textScale_=this.pixelRatio_*(void 0!==g?g:1)}else this.text_=""},e}(cs),ds=function(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32};function fs(t,e,i){return e+":"+t+":"+(i?xr(i):"null")}ds.prototype.clear=function(){this.cache_={},this.cacheSize_=0},ds.prototype.expire=function(){if(this.cacheSize_>this.maxCacheSize_){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_)}}},ds.prototype.get=function(t,e,i){var n=fs(t,e,i);return n in this.cache_?this.cache_[n]:null},ds.prototype.set=function(t,e,i,n){var o=fs(t,e,i);this.cache_[o]=n,++this.cacheSize_},ds.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()};var _s=new ds;function gs(t,e){_s.expire()}function vs(t,e){return t.zIndex-e.zIndex}var ys=[],ms=function(t){function e(e){t.call(this,e);var i=e.getViewport();this.context_=eo(),this.canvas_=this.context_.canvas,this.canvas_.style.width="100%",this.canvas_.style.height="100%",this.canvas_.style.display="block",this.canvas_.className=yo,i.insertBefore(this.canvas_,i.childNodes[0]||null),this.renderedVisible_=!0,this.transform_=[1,0,0,1,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.dispatchRenderEvent=function(t,e){var i=this.getMap(),n=this.context_;if(i.hasListener(t)){var o=e.extent,r=e.pixelRatio,s=e.viewState.rotation,a=this.getTransform(e),h=new ps(n,r,o,a,s),l=new ls(t,h,e,n,null);i.dispatchEvent(l)}},e.prototype.getTransform=function(t){var e=t.viewState,i=this.canvas_.width/2,n=this.canvas_.height/2,o=t.pixelRatio/e.resolution,r=-o,s=-e.rotation,a=-e.center[0],h=-e.center[1];return fn(this.transform_,i,n,o,r,s,a,h)},e.prototype.renderFrame=function(t){if(t){var e=this.context_,i=t.pixelRatio,n=Math.round(t.size[0]*i),o=Math.round(t.size[1]*i);this.canvas_.width!=n||this.canvas_.height!=o?(this.canvas_.width=n,this.canvas_.height=o):e.clearRect(0,0,n,o);var r=t.viewState.rotation;this.calculateMatrices2D(t),this.dispatchRenderEvent(ae,t);var s=t.layerStatesArray;!function(t,e){var i,n=t.length,o=Array(t.length);for(i=0;i<n;i++)o[i]={index:i,value:t[i]};for(o.sort(function(t,i){return e(t.value,i.value)||t.index-i.index}),i=0;i<t.length;i++)t[i]=o[i].value}(s,vs),r&&(e.save(),Wr(e,r,n/2,o/2));var a,h,l=t.viewState.resolution;for(a=0,h=s.length;a<h;++a){var u=s[a],c=u.layer,p=this.getLayerRenderer(c);To(u,l)&&u.sourceState==so.READY&&(p.prepareFrame(t,u)&&p.composeFrame(t,u,e))}r&&e.restore(),this.dispatchRenderEvent(se,t),this.renderedVisible_||(this.canvas_.style.display="",this.renderedVisible_=!0),this.scheduleRemoveUnusedLayerRenderers(t),this.scheduleExpireIconCache(t)}else this.renderedVisible_&&(this.canvas_.style.display="none",this.renderedVisible_=!1)},e.prototype.forEachLayerAtPixel=function(t,e,i,n,o,r,s){var a,h,l=e.viewState.resolution,u=e.layerStatesArray,c=u.length,p=cn(e.pixelToCoordinateTransform,t.slice());for(h=c-1;h>=0;--h){var d=u[h],f=d.layer;if(To(d,l)&&r.call(s,f))if(a=this.getLayerRenderer(f).forEachLayerAtCoordinate(p,e,i,n,o))return a}},e.prototype.registerLayerRenderers=function(e){t.prototype.registerLayerRenderers.call(this,e);for(var i=0,n=e.length;i<n;++i){var o=e[i];zt(ys,o)||ys.push(o)}},e}(function(t){function e(e){t.call(this),this.map_=e,this.layerRenderers_={},this.layerRendererListeners_={},this.layerRendererConstructors_=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.dispatchRenderEvent=function(t,e){l()},e.prototype.registerLayerRenderers=function(t){this.layerRendererConstructors_.push.apply(this.layerRendererConstructors_,t)},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;fn(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),function(t){var e,i=(e=t)[0]*e[3]-e[1]*e[2];ce(0!==i,32);var n=t[0],o=t[1],r=t[2],s=t[3],a=t[4],h=t[5];t[0]=s/i,t[1]=-o/i,t[2]=-r/i,t[3]=n/i,t[4]=(r*h-s*a)/i,t[5]=-(n*h-o*a)/i}(un(n,i))},e.prototype.removeLayerRenderers=function(){for(var t in this.layerRenderers_)this.removeLayerRendererByKey_(t).dispose()},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,o,r,s){var a,h=e.viewState,l=h.resolution;function u(t,i){var r=e.layerStates[c(i)].managed;if(!(c(t)in e.skippedFeatureUids)||r)return n.call(o,t,r?i:null)}var p=h.projection,d=t;if(p.canWrapX()){var f=p.getExtent(),_=gi(f),g=t[0];if(g<f[0]||g>f[2])d=[g+_*Math.ceil((f[0]-g)/_),t[1]]}var v,y=e.layerStatesArray;for(v=y.length-1;v>=0;--v){var m=y[v],E=m.layer;if(To(m,l)&&r.call(s,E)){var x=this.getLayerRenderer(E),T=E.getSource();if(T&&(a=x.forEachFeatureAtCoordinate(T.getWrapX()?d:t,e,i,u)),a)return a}}},e.prototype.forEachLayerAtPixel=function(t,e,i,n,o,r,s){return l()},e.prototype.hasFeatureAtCoordinate=function(t,e,i,n,o){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,I,this,n,o)},e.prototype.getLayerRenderer=function(t){var e=c(t);if(e in this.layerRenderers_)return this.layerRenderers_[e];for(var i,n=0,o=this.layerRendererConstructors_.length;n<o;++n){var r=this.layerRendererConstructors_[n];if(r.handles(t)){i=r.create(this,t);break}}if(!i)throw new Error("Unable to create renderer for layer: "+t.getType());return this.layerRenderers_[e]=i,this.layerRendererListeners_[e]=C(i,N.CHANGE,this.handleLayerRendererChange_,this),i},e.prototype.getLayerRendererByKey=function(t){return this.layerRenderers_[t]},e.prototype.getLayerRenderers=function(){return this.layerRenderers_},e.prototype.getMap=function(){return this.map_},e.prototype.handleLayerRendererChange_=function(){this.map_.render()},e.prototype.removeLayerRendererByKey_=function(t){var e=this.layerRenderers_[t];return delete this.layerRenderers_[t],w(this.layerRendererListeners_[t]),delete this.layerRendererListeners_[t],e},e.prototype.removeUnusedLayerRenderers_=function(t,e){for(var i in this.layerRenderers_)e&&i in e.layerStates||this.removeLayerRendererByKey_(i).dispose()},e.prototype.renderFrame=function(t){l()},e.prototype.scheduleExpireIconCache=function(t){t.postRenderFunctions.push(gs)},e.prototype.scheduleRemoveUnusedLayerRenderers=function(t){for(var e in this.layerRenderers_)if(!(e in t.layerStates))return void t.postRenderFunctions.push(this.removeUnusedLayerRenderers_.bind(this))},e}(O)),Es=function(t){function e(e){t.call(this,e),this.renderedResolution,this.transform_=[1,0,0,1,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clip=function(t,e,i){var n=e.pixelRatio,o=e.size[0]*n,r=e.size[1]*n,s=e.viewState.rotation,a=fi(i),h=_i(i),l=li(i),u=hi(i);cn(e.coordinateToPixelTransform,a),cn(e.coordinateToPixelTransform,h),cn(e.coordinateToPixelTransform,l),cn(e.coordinateToPixelTransform,u),t.save(),Wr(t,-s,o/2,r/2),t.beginPath(),t.moveTo(a[0]*n,a[1]*n),t.lineTo(h[0]*n,h[1]*n),t.lineTo(l[0]*n,l[1]*n),t.lineTo(u[0]*n,u[1]*n),t.clip(),Wr(t,s,o/2,r/2)},e.prototype.dispatchComposeEvent_=function(t,e,i,n){var o=this.getLayer();if(o.hasListener(t)){var r=i.size[0]*i.pixelRatio,s=i.size[1]*i.pixelRatio,a=i.viewState.rotation;Wr(e,-a,r/2,s/2);var h=void 0!==n?n:this.getTransform(i,0),l=new ps(e,i.pixelRatio,i.extent,h,i.viewState.rotation),u=new ls(t,l,i,e,null);o.dispatchEvent(u),Wr(e,a,r/2,s/2)}},e.prototype.forEachLayerAtCoordinate=function(t,e,i,n,o){return this.forEachFeatureAtCoordinate(t,e,i,I)?n.call(o,this.getLayer(),null):void 0},e.prototype.postCompose=function(t,e,i,n){this.dispatchComposeEvent_(se,t,e,n)},e.prototype.preCompose=function(t,e,i){this.dispatchComposeEvent_(ae,t,e,i)},e.prototype.dispatchRenderEvent=function(t,e,i){this.dispatchComposeEvent_(he,t,e,i)},e.prototype.getTransform=function(t,e){var i=t.viewState,n=t.pixelRatio,o=n*t.size[0]/2,r=n*t.size[1]/2,s=n/i.resolution,a=-s,h=-i.rotation,l=-i.center[0]+e,u=-i.center[1];return fn(this.transform_,o,r,s,a,h,l,u)},e.prototype.composeFrame=function(t,e,i){l()},e.prototype.prepareFrame=function(t,e){return l()},e}(function(t){function e(e){t.call(this),this.layer_=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createLoadedTileFinder=function(t,e,i){return function(n,o){return t.forEachLoadedTile(e,n,o,function(t){i[n]||(i[n]={}),i[n][t.tileCoord.toString()]=t})}},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n){},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleImageChange_=function(t){t.target.getState()===br.LOADED&&this.renderIfReadyAndVisible()},e.prototype.hasFeatureAtCoordinate=function(t,e){return!1},e.prototype.loadImage=function(t){var e=t.getState();return e!=br.LOADED&&e!=br.ERROR&&C(t,N.CHANGE,this.handleImageChange_,this),e==br.IDLE&&(t.load(),e=t.getState()),e==br.LOADED},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==so.READY&&this.changed()},e.prototype.scheduleExpireCache=function(t,e){if(e.canExpireCache()){var i=function(t,e,i){var n=c(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,n){var o=c(e),r=i.toString();o in t?r in t[o]?t[o][r].extend(n):t[o][r]=n:(t[o]={},t[o][r]=n)},e.prototype.manageTilePyramid=function(t,e,i,n,o,r,s,a,h,l){var u=c(e);u in t.wantedTiles||(t.wantedTiles[u]={});var p,d,f,_,g,v,y=t.wantedTiles[u],m=t.tileQueue;for(v=i.getMinZoom();v<=s;++v)for(d=i.getTileRangeForExtentAndZ(r,v,d),f=i.getResolution(v),_=d.minX;_<=d.maxX;++_)for(g=d.minY;g<=d.maxY;++g)s-v<=a?((p=e.getTile(v,_,g,n,o)).getState()==ue.IDLE&&(y[p.getKey()]=!0,m.isKeyQueued(p.getKey())||m.enqueue([p,u,i.getTileCoordCenter(p.tileCoord),f])),void 0!==h&&h.call(l,p)):e.useTile(v,_,g,o)},e}(G)),xs=function(t){function e(e){t.call(this,e),this.coordinateToCanvasPixelTransform=[1,0,0,1,0,0],this.hitCanvasContext_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.composeFrame=function(t,e,i){this.preCompose(i,t);var n=this.getImage();if(n){var o=e.extent,r=void 0!==o&&!Ue(o,t.extent)&&vi(o,t.extent);r&&this.clip(i,t,o);var s=this.getImageTransform(),a=i.globalAlpha;i.globalAlpha=e.opacity;var h=s[4],l=s[5],u=n.width*s[0],c=n.height*s[3];u>=.5&&c>=.5&&i.drawImage(n,0,0,+n.width,+n.height,Math.round(h),Math.round(l),Math.round(u),Math.round(c)),i.globalAlpha=a,r&&i.restore()}this.postCompose(i,t,e)},e.prototype.getImage=function(){return l()},e.prototype.getImageTransform=function(){return l()},e.prototype.forEachLayerAtCoordinate=function(t,e,i,n,o){if(this.getImage()){var r=cn(this.coordinateToCanvasPixelTransform,t.slice());Ae(r,e.viewState.resolution/this.renderedResolution),this.hitCanvasContext_||(this.hitCanvasContext_=eo(1,1)),this.hitCanvasContext_.clearRect(0,0,1,1),this.hitCanvasContext_.drawImage(this.getImage(),r[0],r[1],1,1,0,0,1,1);var s=this.hitCanvasContext_.getImageData(0,0,1,1).data;return s[3]>0?n.call(o,this.getLayer(),s):void 0}},e}(Es),Ts=function(t){function e(i){if(t.call(this,i),this.image_=null,this.imageTransform_=[1,0,0,1,0,0],this.skippedFeatures_=[],this.vectorRenderer_=null,i.getType()===vr.VECTOR)for(var n=0,o=ys.length;n<o;++n){var r=ys[n];if(r!==e&&r.handles(i)){this.vectorRenderer_=new r(i);break}}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.vectorRenderer_&&this.vectorRenderer_.dispose(),t.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.image_?this.image_.getImage():null},e.prototype.getImageTransform=function(){return this.imageTransform_},e.prototype.prepareFrame=function(t,e){var i,n=t.pixelRatio,o=t.size,r=t.viewState,s=r.center,a=r.resolution,h=this.getLayer().getSource(),l=t.viewHints,u=this.vectorRenderer_,c=t.extent;if(u||void 0===e.extent||(c=di(c,e.extent)),!l[Re]&&!l[we]&&!yi(c)){var p=r.projection,d=this.skippedFeatures_;if(u){var f=u.context,_=g({},t,{size:[gi(c)/a,pi(c)/a],viewState:g({},t.viewState,{rotation:0})}),v=Object.keys(_.skippedFeatureUids).sort();i=new hs(c,a,n,f.canvas,function(t){!u.prepareFrame(_,e)||!u.replayGroupChanged&&Vt(d,v)||(f.canvas.width=_.size[0]*n,f.canvas.height=_.size[1]*n,u.compose(f,_,e),d=v,t())})}else i=h.getImage(c,a,n,p);i&&this.loadImage(i)&&(this.image_=i,this.skippedFeatures_=d)}if(this.image_){var y=(i=this.image_).getExtent(),m=i.getResolution(),E=i.getPixelRatio(),x=n*m/(a*E),T=fn(this.imageTransform_,n*o[0]/2,n*o[1]/2,x,x,0,E*(y[0]-s[0])/m,E*(s[1]-y[3])/m);fn(this.coordinateToCanvasPixelTransform,n*o[0]/2-T[4],n*o[1]/2-T[5],n/a,-n/a,0,-s[0],-s[1]),this.renderedResolution=m*n/E}return!!this.image_},e.prototype.forEachFeatureAtCoordinate=function(e,i,n,o){return this.vectorRenderer_?this.vectorRenderer_.forEachFeatureAtCoordinate(e,i,n,o):t.prototype.forEachFeatureAtCoordinate.call(this,e,i,n,o)},e}(xs);Ts.handles=function(t){return t.getType()===vr.IMAGE||t.getType()===vr.VECTOR&&t.getRenderMode()===yr.IMAGE},Ts.create=function(t,e){return new Ts(e)};var Ss=Ts,Cs=function(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n};function bs(t,e,i,n,o){return void 0!==o?(o.minX=t,o.maxX=e,o.minY=i,o.maxY=n,o):new Cs(t,e,i,n)}Cs.prototype.contains=function(t){return this.containsXY(t[1],t[2])},Cs.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},Cs.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},Cs.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},Cs.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)},Cs.prototype.getHeight=function(){return this.maxY-this.minY+1},Cs.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},Cs.prototype.getWidth=function(){return this.maxX-this.minX+1},Cs.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY};var Rs=Cs,ws=function(t){function e(e,i){t.call(this,e),this.context=i?null:eo(),this.oversampling_,this.renderedExtent_=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=[1/0,1/0,-1/0,-1/0],this.tmpTileRange_=new Rs(0,0,0,0),this.imageTransform_=[1,0,0,1,0,0],this.zDirection=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isDrawableTile_=function(t){var e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return i==ue.LOADED||i==ue.EMPTY||i==ue.ERROR&&!n},e.prototype.getTile=function(t,e,i,n,o){var r=this.getLayer(),s=r.getSource().getTile(t,e,i,n,o);return s.getState()==ue.ERROR&&(r.getUseInterimTilesOnError()?r.getPreload()>0&&(this.newTiles_=!0):s.setState(ue.LOADED)),this.isDrawableTile_(s)||(s=s.getInterimTile()),s},e.prototype.prepareFrame=function(t,e){var i=t.pixelRatio,n=t.size,o=t.viewState,r=o.projection,s=o.resolution,a=o.center,h=this.getLayer(),l=h.getSource(),u=l.getRevision(),p=l.getTileGridForProjection(r),d=p.getZForResolution(s,this.zDirection),f=p.getResolution(d),_=Math.round(s/f)||1,g=t.extent;if(void 0!==e.extent&&(g=di(g,e.extent)),yi(g))return!1;var v=p.getTileRangeForExtentAndZ(g,d),y=p.getTileRangeExtent(d,v),m=l.getTilePixelRatio(i),E={};E[d]={};var x,T,S,C=this.createLoadedTileFinder(l,r,E),b=t.viewHints,R=b[Re]||b[we],w=this.tmpExtent,M=this.tmpTileRange_;for(this.newTiles_=!1,T=v.minX;T<=v.maxX;++T)for(S=v.minY;S<=v.maxY;++S)if(!(Date.now()-t.time>16&&R)){if(x=this.getTile(d,T,S,i,r),this.isDrawableTile_(x)){var O=c(this);if(x.getState()==ue.LOADED){E[d][x.tileCoord.toString()]=x;var I=x.inTransition(O);this.newTiles_||!I&&-1!==this.renderedTiles.indexOf(x)||(this.newTiles_=!0)}if(1===x.getAlpha(O,t.time))continue}var L=p.getTileCoordChildTileRange(x.tileCoord,M,w),P=!1;L&&(P=C(d+1,L)),P||p.forEachTileCoordParentTileRange(x.tileCoord,C,null,M,w)}var k=f*i/m*_;if(!(this.renderedResolution&&Date.now()-t.time>16&&R)&&(this.newTiles_||!this.renderedExtent_||!Ue(this.renderedExtent_,g)||this.renderedRevision!=u||_!=this.oversampling_||!R&&k!=this.renderedResolution)){var A=this.context;if(A){var D=l.getTilePixelSize(d,i,r),F=Math.round(v.getWidth()*D[0]/_),N=Math.round(v.getHeight()*D[1]/_),G=A.canvas;G.width!=F||G.height!=N?(this.oversampling_=_,G.width=F,G.height=N):(this.renderedExtent_&&!ti(y,this.renderedExtent_)&&A.clearRect(0,0,F,N),_=this.oversampling_)}this.renderedTiles.length=0;var j,Y,W,X,z,K,B,U,V,H,Z=Object.keys(E).map(Number);for(Z.sort(function(t,e){return t===d?1:e===d?-1:t>e?1:t<e?-1:0}),X=0,z=Z.length;X<z;++X)for(var $ in W=Z[X],Y=l.getTilePixelSize(W,i,r),j=p.getResolution(W)/f,B=m*l.getGutterForProjection(r),U=E[W])x=U[$],T=((K=p.getTileCoordExtent(x.getTileCoord(),w))[0]-y[0])/f*m/_,S=(y[3]-K[3])/f*m/_,V=Y[0]*j/_,H=Y[1]*j/_,this.drawTileImage(x,t,e,T,S,V,H,B,d===W),this.renderedTiles.push(x);this.renderedRevision=u,this.renderedResolution=f*i/m*_,this.renderedExtent_=y}var q=this.renderedResolution/s,J=fn(this.imageTransform_,i*n[0]/2,i*n[1]/2,q,q,0,(this.renderedExtent_[0]-a[0])/this.renderedResolution*i,(a[1]-this.renderedExtent_[3])/this.renderedResolution*i);return fn(this.coordinateToCanvasPixelTransform,i*n[0]/2-J[4],i*n[1]/2-J[5],i/s,-i/s,0,-a[0],-a[1]),this.updateUsedTiles(t.usedTiles,l,d,v),this.manageTilePyramid(t,l,p,i,r,g,d,h.getPreload()),this.scheduleExpireCache(t,l),this.renderedTiles.length>0},e.prototype.drawTileImage=function(t,e,i,n,o,r,s,a,h){var l=this.getTileImage(t);if(l){var u=c(this),p=h?t.getAlpha(u,e.time):1,d=this.getLayer().getSource();1!==p||d.getOpaque(e.viewState.projection)||this.context.clearRect(n,o,r,s);var f=p!==this.context.globalAlpha;f&&(this.context.save(),this.context.globalAlpha=p),this.context.drawImage(l,a,a,l.width-2*a,l.height-2*a,n,o,r,s),f&&this.context.restore(),1!==p?e.animate=!0:h&&t.endTransition(u)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getImageTransform=function(){return this.imageTransform_},e.prototype.getTileImage=function(t){return t.getImage()},e}(xs);ws.handles=function(t){return t.getType()===vr.TILE},ws.create=function(t,e){return new ws(e)},ws.prototype.getLayer;var Ms=ws,Os=function(){};Os.prototype.getReplay=function(t,e){return l()},Os.prototype.isEmpty=function(){return l()},Os.prototype.addDeclutter=function(t){return l()};var Is=Os,Ls={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"};function Ps(t,e,i,n,o,r,s,a){for(var h,l,u,c=[],p=t[e]>t[i-n],d=o.length,f=t[e],_=t[e+1],g=t[e+=n],v=t[e+1],y=0,m=Math.sqrt(Math.pow(g-f,2)+Math.pow(v-_,2)),E="",x=0,T=0;T<d;++T){l=p?d-T-1:T;var S=o.charAt(l),C=r(E=p?S+E:E+S)-x;x+=C;for(var b=s+C/2;e<i-n&&y+m<b;)f=g,_=v,g=t[e+=n],v=t[e+1],y+=m,m=Math.sqrt(Math.pow(g-f,2)+Math.pow(v-_,2));var R=b-y,w=Math.atan2(v-_,g-f);if(p&&(w+=w>0?-Math.PI:Math.PI),void 0!==u){var M=w-u;if(M+=M>Math.PI?-2*Math.PI:M<-Math.PI?2*Math.PI:0,Math.abs(M)>a)return null}var O=R/m,I=Te(f,g,O),L=Te(_,v,O);u==w?(p&&(h[0]=I,h[1]=L,h[2]=C/2),h[4]=E):(x=C,h=[I,L,C/2,w,E=S],p?c.unshift(h):c.push(h),u=w),s+=C}return c}var ks={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},As=[ks.FILL],Ds=[ks.STROKE],Fs=[ks.BEGIN_PATH],Ns=[ks.CLOSE_PATH],Gs=ks,js=[Ls.POLYGON,Ls.CIRCLE,Ls.LINE_STRING,Ls.IMAGE,Ls.TEXT,Ls.DEFAULT],Ys={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},Ws=[1/0,1/0,-1/0,-1/0],Xs=[1,0,0,1,0,0],zs=function(t){function e(e,i,n,o,r,s){t.call(this),this.declutterTree=s,this.tolerance=e,this.maxExtent=i,this.overlaps=r,this.pixelRatio=o,this.maxLineWidth=0,this.resolution=n,this.alignFill_,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=[],this.pixelCoordinates_=null,this.state={},this.viewRotation_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.replayTextBackground_=function(t,e,i,n,o,r,s){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,n),t.lineTo.apply(t,o),t.lineTo.apply(t,e),r&&(this.alignFill_=r[2],this.fill_(t)),s&&(this.setStrokeStyle_(t,s),t.stroke())},e.prototype.replayImage_=function(t,e,i,n,o,r,s,a,h,l,u,c,p,d,f,_,g,v){var y=g||v;e-=o*=p,i-=r*=p;var m,E,x,T,S=f+l>n.width?n.width-l:f,C=a+u>n.height?n.height-u:a,b=_[3]+S*p+_[1],R=_[0]+C*p+_[2],w=e-_[3],M=i-_[0];(y||0!==c)&&(m=[w,M],E=[w+b,M],x=[w+b,M+R],T=[w,M+R]);var O=null;if(0!==c){var I=e+o,L=i+r;O=fn(Xs,I,L,1,1,c,-I,-L),qe(Ws),ii(Ws,cn(Xs,m)),ii(Ws,cn(Xs,E)),ii(Ws,cn(Xs,x)),ii(Ws,cn(Xs,T))}else $e(w,M,w+b,M+R,Ws);var P=t.canvas,k=v?v[2]*p/2:0,A=Ws[0]-k<=P.width&&Ws[2]+k>=0&&Ws[1]-k<=P.height&&Ws[3]+k>=0;if(d&&(e=Math.round(e),i=Math.round(i)),s){if(!A&&1==s[4])return;ei(s,Ws);var D=A?[t,O?O.slice(0):null,h,n,l,u,S,C,e,i,p]:null;D&&y&&D.push(g,v,m,E,x,T),s.push(D)}else A&&(y&&this.replayTextBackground_(t,m,E,x,T,g,v),zr(t,O,h,n,l,u,S,C,e,i,p))},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,o,r){var s=this.coordinates.length,a=this.getBufferedMaxExtent();r&&(e+=n);var h,l,u,c=[t[e],t[e+1]],p=[NaN,NaN],d=!0;for(h=e+n;h<i;h+=n)p[0]=t[h],p[1]=t[h+1],(u=He(a,p))!==l?(d&&(this.coordinates[s++]=c[0],this.coordinates[s++]=c[1]),this.coordinates[s++]=p[0],this.coordinates[s++]=p[1],d=!1):u===Ye.INTERSECTING?(this.coordinates[s++]=p[0],this.coordinates[s++]=p[1],d=!1):d=!0,c[0]=p[0],c[1]=p[1],l=u;return(o&&d||h===e+n)&&(this.coordinates[s++]=c[0],this.coordinates[s++]=c[1]),s},e.prototype.drawCustomCoordinates_=function(t,e,i,n,o){for(var r=0,s=i.length;r<s;++r){var a=i[r],h=this.appendFlatCoordinates(t,e,a,n,!1,!1);o.push(h),e=a}return e},e.prototype.drawCustom=function(t,e,i){this.beginGeometry(t,e);var n,o,r,s,a,h=t.getType(),l=t.getStride(),u=this.coordinates.length;if(h==Ei.MULTI_POLYGON){n=(t=t).getOrientedFlatCoordinates(),s=[];var c=t.getEndss();a=0;for(var p=0,d=c.length;p<d;++p){var f=[];a=this.drawCustomCoordinates_(n,a,c[p],l,f),s.push(f)}this.instructions.push([Gs.CUSTOM,u,s,t,i,In])}else h==Ei.POLYGON||h==Ei.MULTI_LINE_STRING?(r=[],n=h==Ei.POLYGON?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),a=this.drawCustomCoordinates_(n,0,t.getEnds(),l,r),this.instructions.push([Gs.CUSTOM,u,r,t,i,On])):h==Ei.LINE_STRING||h==Ei.MULTI_POINT?(n=t.getFlatCoordinates(),o=this.appendFlatCoordinates(n,0,n.length,l,!1,!1),this.instructions.push([Gs.CUSTOM,u,o,t,i,Mn])):h==Ei.POINT&&(n=t.getFlatCoordinates(),this.coordinates.push(n[0],n[1]),o=this.coordinates.length,this.instructions.push([Gs.CUSTOM,u,o,t,i]));this.endGeometry(t,e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[Gs.BEGIN_GEOMETRY,e,0],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Gs.BEGIN_GEOMETRY,e,0],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){},e.prototype.fill_=function(t){if(this.alignFill_){var e=cn(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.setTransform.apply(t,Xr)},e.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],it&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},e.prototype.renderDeclutter_=function(t,e){if(t&&t.length>5){var i=t[4];if(1==i||i==t.length-5){var n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};if(!this.declutterTree.collides(n)){this.declutterTree.insert(n);for(var o=5,r=t.length;o<r;++o){var s=t[o];s&&(s.length>11&&this.replayTextBackground_(s[0],s[13],s[14],s[15],s[16],s[11],s[12]),zr.apply(void 0,s))}}t.length=5,qe(t)}}},e.prototype.replay_=function(t,e,i,n,o,r,s){var a;this.pixelCoordinates_&&Vt(e,this.renderedTransform_)?a=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),a=Ti(this.coordinates,0,this.coordinates.length,2,e,this.pixelCoordinates_),un(this.renderedTransform_,e));for(var h,l,u,p,d,f,_,g,v,y,E,x,T=!m(i),S=0,C=n.length,b=0,R=0,w=0,M=null,O=null,I=this.coordinateCache_,L=this.viewRotation_,P={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:L},k=this.instructions!=n||this.overlaps?0:200;S<C;){var A=n[S];switch(A[0]){case Gs.BEGIN_GEOMETRY:y=A[1],T&&i[c(y)]||!y.getGeometry()?S=A[2]:void 0===s||vi(s,y.getGeometry().getExtent())?++S:S=A[2]+1;break;case Gs.BEGIN_PATH:R>k&&(this.fill_(t),R=0),w>k&&(t.stroke(),w=0),R||w||(t.beginPath(),p=d=NaN),++S;break;case Gs.CIRCLE:var D=a[b=A[1]],F=a[b+1],N=a[b+2]-D,G=a[b+3]-F,j=Math.sqrt(N*N+G*G);t.moveTo(D+j,F),t.arc(D,F,j,0,2*Math.PI,!0),++S;break;case Gs.CLOSE_PATH:t.closePath(),++S;break;case Gs.CUSTOM:b=A[1],h=A[2];var Y=A[3],W=A[4],X=6==A.length?A[5]:void 0;P.geometry=Y,P.feature=y,S in I||(I[S]=[]);var z=I[S];X?X(a,b,h,2,z):(z[0]=a[b],z[1]=a[b+1],z.length=2),W(z,P),++S;break;case Gs.DRAW_IMAGE:b=A[1],h=A[2],v=A[3],l=A[4],u=A[5],g=r?null:A[6];var K=A[7],B=A[8],U=A[9],V=A[10],H=A[11],Z=A[12],$=A[13],q=A[14],J=void 0,Q=void 0,tt=void 0;for(A.length>16?(J=A[15],Q=A[16],tt=A[17]):(J=Ir,Q=tt=!1),H&&(Z+=L);b<h;b+=2)this.replayImage_(t,a[b],a[b+1],v,l,u,g,K,B,U,V,Z,$,o,q,J,Q?M:null,tt?O:null);this.renderDeclutter_(g,y),++S;break;case Gs.DRAW_CHARS:var et=A[1],it=A[2],nt=A[3];g=r?null:A[4];var ot=A[5],rt=A[6],st=A[7],at=A[8],ht=A[9],lt=A[10],ut=A[11],ct=A[12],pt=A[13],dt=A[14],ft=gr(a,et,it,2),_t=at(ct);if(ot||_t<=ft){var gt=this.textStates[pt].textAlign,vt=Ps(a,et,it,2,ct,at,(ft-_t)*Ys[gt],st);if(vt){var yt=void 0,mt=void 0,Et=void 0,xt=void 0,Tt=void 0;if(lt)for(yt=0,mt=vt.length;yt<mt;++yt)Et=(Tt=vt[yt])[4],xt=this.getImage(Et,pt,"",lt),l=Tt[2]+ut,u=nt*xt.height+2*(.5-nt)*ut-ht,this.replayImage_(t,Tt[0],Tt[1],xt,l,u,g,xt.height,1,0,0,Tt[3],dt,!1,xt.width,Ir,null,null);if(rt)for(yt=0,mt=vt.length;yt<mt;++yt)Et=(Tt=vt[yt])[4],xt=this.getImage(Et,pt,rt,""),l=Tt[2],u=nt*xt.height-ht,this.replayImage_(t,Tt[0],Tt[1],xt,l,u,g,xt.height,1,0,0,Tt[3],dt,!1,xt.width,Ir,null,null)}}this.renderDeclutter_(g,y),++S;break;case Gs.END_GEOMETRY:if(void 0!==r){var St=r(y=A[1]);if(St)return St}++S;break;case Gs.FILL:k?R++:this.fill_(t),++S;break;case Gs.MOVE_TO_LINE_TO:for(b=A[1],h=A[2],E=a[b],_=(x=a[b+1])+.5|0,(f=E+.5|0)===p&&_===d||(t.moveTo(E,x),p=f,d=_),b+=2;b<h;b+=2)f=(E=a[b])+.5|0,_=(x=a[b+1])+.5|0,b!=h-2&&f===p&&_===d||(t.lineTo(E,x),p=f,d=_);++S;break;case Gs.SET_FILL_STYLE:M=A,this.alignFill_=A[2],R&&(this.fill_(t),R=0,w&&(t.stroke(),w=0)),t.fillStyle=A[1],++S;break;case Gs.SET_STROKE_STYLE:O=A,w&&(t.stroke(),w=0),this.setStrokeStyle_(t,A),++S;break;case Gs.STROKE:k?w++:t.stroke(),++S;break;default:++S}}R&&this.fill_(t),w&&t.stroke()},e.prototype.replay=function(t,e,i,n,o){this.viewRotation_=i,this.replay_(t,e,n,this.instructions,o,void 0,void 0)},e.prototype.replayHitDetection=function(t,e,i,n,o,r){return this.viewRotation_=i,this.replay_(t,e,n,this.hitDetectionInstructions,!0,o,r)},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var i,n,o=e.length,r=-1;for(t=0;t<o;++t)(n=(i=e[t])[0])==Gs.END_GEOMETRY?r=t:n==Gs.BEGIN_GEOMETRY&&(i[2]=t,Bt(this.hitDetectionInstructions,r,t),r=-1)},e.prototype.setFillStrokeStyle=function(t,e){var i=this.state;if(t){var n=t.getColor();i.fillStyle=Cr(n||wr)}else i.fillStyle=void 0;if(e){var o=e.getColor();i.strokeStyle=Cr(o||Or);var r=e.getLineCap();i.lineCap=void 0!==r?r:"round";var s=e.getLineDash();i.lineDash=s?s.slice():Mr;var a=e.getLineDashOffset();i.lineDashOffset=a||0;var h=e.getLineJoin();i.lineJoin=void 0!==h?h:"round";var l=e.getWidth();i.lineWidth=void 0!==l?l: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,e){var i=t.fillStyle,n=[Gs.SET_FILL_STYLE,i];return"string"!=typeof i&&n.push(!0),n},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[Gs.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,i){var n=t.fillStyle;"string"==typeof n&&t.currentFillStyle==n||(void 0!==n&&this.instructions.push(e.call(this,t,i)),t.currentFillStyle=n)},e.prototype.updateStrokeStyle=function(t,e){var i=t.strokeStyle,n=t.lineCap,o=t.lineDash,r=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||o!=t.currentLineDash&&!Vt(t.currentLineDash,o)||t.currentLineDashOffset!=r||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=h)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=o,t.currentLineDashOffset=r,t.currentLineJoin=s,t.currentLineWidth=a,t.currentMiterLimit=h)},e.prototype.endGeometry=function(t,e){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var i=[Gs.END_GEOMETRY,e];this.instructions.push(i),this.hitDetectionInstructions.push(i)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=ze(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;Xe(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(cs),Ks=function(t){function e(e,i,n,o,r,s){t.call(this,e,i,n,o,r,s),this.declutterGroup_=null,this.hitDetectionImage_=null,this.image_=null,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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(),o=this.coordinates.length,r=this.drawCoordinates_(i,0,i.length,n);this.instructions.push([Gs.DRAW_IMAGE,o,r,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.width_]),this.hitDetectionInstructions.push([Gs.DRAW_IMAGE,o,r,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_]),this.endGeometry(t,e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),o=this.coordinates.length,r=this.drawCoordinates_(i,0,i.length,n);this.instructions.push([Gs.DRAW_IMAGE,o,r,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.width_]),this.hitDetectionInstructions.push([Gs.DRAW_IMAGE,o,r,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_]),this.endGeometry(t,e)}},e.prototype.finish=function(){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},e.prototype.setImageStyle=function(t,e){var i=t.getAnchor(),n=t.getSize(),o=t.getHitDetectionImage(1),r=t.getImage(1),s=t.getOrigin();this.anchorX_=i[0],this.anchorY_=i[1],this.declutterGroup_=e,this.hitDetectionImage_=o,this.image_=r,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}(zs),Bs=function(t){function e(e,i,n,o,r,s){t.call(this,e,i,n,o,r,s)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawFlatCoordinates_=function(t,e,i,n){var o=this.coordinates.length,r=this.appendFlatCoordinates(t,e,i,n,!1,!1),s=[Gs.MOVE_TO_LINE_TO,o,r];return this.instructions.push(s),this.hitDetectionInstructions.push(s),i},e.prototype.drawLineString=function(t,e){var i=this.state,n=i.strokeStyle,o=i.lineWidth;if(void 0!==n&&void 0!==o){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Gs.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],Fs);var r=t.getFlatCoordinates(),s=t.getStride();this.drawFlatCoordinates_(r,0,r.length,s),this.hitDetectionInstructions.push(Ds),this.endGeometry(t,e)}},e.prototype.drawMultiLineString=function(t,e){var i=this.state,n=i.strokeStyle,o=i.lineWidth;if(void 0!==n&&void 0!==o){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Gs.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],Fs);for(var r=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),h=0,l=0,u=r.length;l<u;++l)h=this.drawFlatCoordinates_(s,h,r[l],a);this.hitDetectionInstructions.push(Ds),this.endGeometry(t,e)}},e.prototype.finish=function(){var t=this.state;void 0!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&this.instructions.push(Ds),this.reverseHitDetectionInstructions(),this.state=null},e.prototype.applyStroke=function(e){void 0!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(Ds),e.lastStroke=this.coordinates.length),e.lastStroke=0,t.prototype.applyStroke.call(this,e),this.instructions.push(Fs)},e}(zs),Us=function(t){function e(e,i,n,o,r,s){t.call(this,e,i,n,o,r,s)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawFlatCoordinatess_=function(t,e,i,n){var o=this.state,r=void 0!==o.fillStyle,s=void 0!=o.strokeStyle,a=i.length;this.instructions.push(Fs),this.hitDetectionInstructions.push(Fs);for(var h=0;h<a;++h){var l=i[h],u=this.coordinates.length,c=this.appendFlatCoordinates(t,e,l,n,!0,!s),p=[Gs.MOVE_TO_LINE_TO,u,c];this.instructions.push(p),this.hitDetectionInstructions.push(p),s&&(this.instructions.push(Ns),this.hitDetectionInstructions.push(Ns)),e=l}return r&&(this.instructions.push(As),this.hitDetectionInstructions.push(As)),s&&(this.instructions.push(Ds),this.hitDetectionInstructions.push(Ds)),e},e.prototype.drawCircle=function(t,e){var i=this.state,n=i.fillStyle,o=i.strokeStyle;if(void 0!==n||void 0!==o){this.setFillStrokeStyles_(t),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([Gs.SET_FILL_STYLE,xr(wr)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([Gs.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var r=t.getFlatCoordinates(),s=t.getStride(),a=this.coordinates.length;this.appendFlatCoordinates(r,0,r.length,s,!1,!1);var h=[Gs.CIRCLE,a];this.instructions.push(Fs,h),this.hitDetectionInstructions.push(Fs,h),this.hitDetectionInstructions.push(As),void 0!==i.fillStyle&&this.instructions.push(As),void 0!==i.strokeStyle&&(this.instructions.push(Ds),this.hitDetectionInstructions.push(Ds)),this.endGeometry(t,e)}},e.prototype.drawPolygon=function(t,e){var i=this.state,n=i.fillStyle,o=i.strokeStyle;if(void 0!==n||void 0!==o){this.setFillStrokeStyles_(t),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([Gs.SET_FILL_STYLE,xr(wr)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([Gs.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var r=t.getEnds(),s=t.getOrientedFlatCoordinates(),a=t.getStride();this.drawFlatCoordinatess_(s,0,r,a),this.endGeometry(t,e)}},e.prototype.drawMultiPolygon=function(t,e){var i=this.state,n=i.fillStyle,o=i.strokeStyle;if(void 0!==n||void 0!==o){this.setFillStrokeStyles_(t),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([Gs.SET_FILL_STYLE,xr(wr)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([Gs.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);for(var r=t.getEndss(),s=t.getOrientedFlatCoordinates(),a=t.getStride(),h=0,l=0,u=r.length;l<u;++l)h=this.drawFlatCoordinatess_(s,h,r[l],a);this.endGeometry(t,e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var t=this.tolerance;if(0!==t)for(var e=this.coordinates,i=0,n=e.length;i<n;++i)e[i]=Pn(e[i],t)},e.prototype.setFillStrokeStyles_=function(t){var e=this.state;void 0!==e.fillStyle&&this.updateFillStyle(e,this.createFill,t),void 0!==e.strokeStyle&&this.updateStrokeStyle(e,this.applyStroke)},e}(zs);function Vs(t,e,i,n,o){var r,s,a,h,l,u,c,p,d,f=i,_=i,g=0,v=0,y=i;for(r=i;r<n;r+=o){var m=e[r],E=e[r+1];void 0!==h&&(p=m-h,d=E-l,a=Math.sqrt(p*p+d*d),void 0!==u&&(v+=s,Math.acos((u*p+c*d)/(s*a))>t&&(v>g&&(g=v,f=y,_=r),v=0,y=r-o)),s=a,u=p,c=d),h=m,l=E}return(v+=a)>g?[y,r]:[f,_]}var Hs="line";var Zs={Circle:Us,Default:zs,Image:Ks,LineString:Bs,Polygon:Us,Text:function(t){function e(e,i,n,o,r,s){t.call(this,e,i,n,o,r,s),this.declutterGroup_,this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.widths_={},Lr.prune()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawText=function(t,e){var i=this.textFillState_,n=this.textStrokeState_,o=this.textState_;if(""!==this.text_&&o&&(i||n)){var r,s,a=this.coordinates.length,h=t.getType(),l=null,u=2,c=2;if(o.placement===Hs){if(!vi(this.getBufferedMaxExtent(),t.getExtent()))return;var p;if(l=t.getFlatCoordinates(),c=t.getStride(),h==Ei.LINE_STRING)p=[l.length];else if(h==Ei.MULTI_LINE_STRING)p=t.getEnds();else if(h==Ei.POLYGON)p=t.getEnds().slice(0,1);else if(h==Ei.MULTI_POLYGON){var d=t.getEndss();for(p=[],r=0,s=d.length;r<s;++r)p.push(d[r][0])}this.beginGeometry(t,e);for(var f,_=o.textAlign,g=0,v=0,y=p.length;v<y;++v){if(void 0==_){var m=Vs(o.maxAngle,l,g,p[v],c);g=m[0],f=m[1]}else f=p[v];for(r=g;r<f;r+=c)this.coordinates.push(l[r],l[r+1]);u=this.coordinates.length,g=p[v],this.drawChars_(a,u,this.declutterGroup_),a=u}this.endGeometry(t,e)}else{var E=this.getImage(this.text_,this.textKey_,this.fillKey_,this.strokeKey_),x=E.width/this.pixelRatio;switch(h){case Ei.POINT:case Ei.MULTI_POINT:u=(l=t.getFlatCoordinates()).length;break;case Ei.LINE_STRING:l=t.getFlatMidpoint();break;case Ei.CIRCLE:l=t.getCenter();break;case Ei.MULTI_LINE_STRING:u=(l=t.getFlatMidpoints()).length;break;case Ei.POLYGON:if(l=t.getFlatInteriorPoint(),!o.overflow&&l[2]/this.resolution<x)return;c=3;break;case Ei.MULTI_POLYGON:var T=t.getFlatInteriorPoints();for(l=[],r=0,s=T.length;r<s;r+=3)(o.overflow||T[r+2]/this.resolution>=x)&&l.push(T[r],T[r+1]);if(0==(u=l.length))return}u=this.appendFlatCoordinates(l,0,u,c,!1,!1),(o.backgroundFill||o.backgroundStroke)&&(this.setFillStrokeStyle(o.backgroundFill,o.backgroundStroke),o.backgroundFill&&(this.updateFillStyle(this.state,this.createFill,t),this.hitDetectionInstructions.push(this.createFill(this.state,t))),o.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e),this.drawTextImage_(E,a,u),this.endGeometry(t,e)}}},e.prototype.getImage=function(t,e,i,n){var o,r=n+e+t+i+this.pixelRatio;if(!Lr.containsKey(r)){var s=n?this.strokeStates[n]||this.textStrokeState_:null,a=i?this.fillStates[i]||this.textFillState_:null,h=this.textStates[e]||this.textState_,l=this.pixelRatio,u=h.scale*l,c=Ys[h.textAlign||"center"],p=n&&s.lineWidth?s.lineWidth:0,d=t.split("\n"),f=d.length,_=[],g=function(t,e,i){for(var n=e.length,o=0,r=0;r<n;++r){var s=Yr(t,e[r]);o=Math.max(o,s),i.push(s)}return o}(h.font,d,_),v=jr(h.font),y=v*f,m=g+p,E=eo(Math.ceil(m*u),Math.ceil((y+p)*u));o=E.canvas,Lr.set(r,o),1!=u&&E.scale(u,u),E.font=h.font,n&&(E.strokeStyle=s.strokeStyle,E.lineWidth=p,E.lineCap=s.lineCap,E.lineJoin=s.lineJoin,E.miterLimit=s.miterLimit,it&&s.lineDash.length&&(E.setLineDash(s.lineDash),E.lineDashOffset=s.lineDashOffset)),i&&(E.fillStyle=a.fillStyle),E.textBaseline="middle",E.textAlign="center";var x,T=.5-c,S=c*o.width/u+T*p;if(n)for(x=0;x<f;++x)E.strokeText(d[x],S+T*_[x],.5*(p+v)+x*v);if(i)for(x=0;x<f;++x)E.fillText(d[x],S+T*_[x],.5*(p+v)+x*v)}return Lr.get(r)},e.prototype.drawTextImage_=function(t,e,i){var n=this.textState_,o=this.textStrokeState_,r=this.pixelRatio,s=Ys[n.textAlign||"center"],a=Ys[n.textBaseline],h=o&&o.lineWidth?o.lineWidth:0,l=s*t.width/r+2*(.5-s)*h,u=a*t.height/r+2*(.5-a)*h;this.instructions.push([Gs.DRAW_IMAGE,e,i,t,(l-this.textOffsetX_)*r,(u-this.textOffsetY_)*r,this.declutterGroup_,t.height,1,0,0,this.textRotateWithView_,this.textRotation_,1,t.width,n.padding==Ir?Ir:n.padding.map(function(t){return t*r}),!!n.backgroundFill,!!n.backgroundStroke]),this.hitDetectionInstructions.push([Gs.DRAW_IMAGE,e,i,t,(l-this.textOffsetX_)*r,(u-this.textOffsetY_)*r,this.declutterGroup_,t.height,1,0,0,this.textRotateWithView_,this.textRotation_,1/r,t.width,n.padding,!!n.backgroundFill,!!n.backgroundStroke])},e.prototype.drawChars_=function(t,e,i){var n=this.textStrokeState_,o=this.textState_,r=this.textFillState_,s=this.strokeKey_;n&&(s in this.strokeStates||(this.strokeStates[s]={strokeStyle:n.strokeStyle,lineCap:n.lineCap,lineDashOffset:n.lineDashOffset,lineWidth:n.lineWidth,lineJoin:n.lineJoin,miterLimit:n.miterLimit,lineDash:n.lineDash}));var a=this.textKey_;this.textKey_ in this.textStates||(this.textStates[this.textKey_]={font:o.font,textAlign:o.textAlign||"center",scale:o.scale});var h=this.fillKey_;r&&(h in this.fillStates||(this.fillStates[h]={fillStyle:r.fillStyle}));var l=this.pixelRatio,u=Ys[o.textBaseline],c=this.textOffsetY_*l,p=this.text_,d=o.font,f=o.scale,_=n?n.lineWidth*f/2:0,g=this.widths_[d];g||(this.widths_[d]=g={}),this.instructions.push([Gs.DRAW_CHARS,t,e,u,i,o.overflow,h,o.maxAngle,function(t){var e=g[t];return e||(e=g[t]=Yr(d,t)),e*f*l},c,s,_*l,p,a,1]),this.hitDetectionInstructions.push([Gs.DRAW_CHARS,t,e,u,i,o.overflow,h,o.maxAngle,function(t){var e=g[t];return e||(e=g[t]=Yr(d,t)),e*f},c,s,_,p,a,1/l])},e.prototype.setTextStyle=function(t,e){var i,n,o;if(t){this.declutterGroup_=e;var r=t.getFill();r?((n=this.textFillState_)||(n=this.textFillState_={}),n.fillStyle=Cr(r.getColor()||wr)):n=this.textFillState_=null;var s=t.getStroke();if(s){(o=this.textStrokeState_)||(o=this.textStrokeState_={});var a=s.getLineDash(),h=s.getLineDashOffset(),l=s.getWidth(),u=s.getMiterLimit();o.lineCap=s.getLineCap()||"round",o.lineDash=a?a.slice():Mr,o.lineDashOffset=void 0===h?0:h,o.lineJoin=s.getLineJoin()||"round",o.lineWidth=void 0===l?1:l,o.miterLimit=void 0===u?10:u,o.strokeStyle=Cr(s.getColor()||Or)}else o=this.textStrokeState_=null;i=this.textState_;var p=t.getFont()||"10px sans-serif";Dr(p);var d=t.getScale();i.overflow=t.getOverflow(),i.font=p,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()||Ir,i.scale=void 0===d?1:d;var f=t.getOffsetX(),_=t.getOffsetY(),g=t.getRotateWithView(),v=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===f?0:f,this.textOffsetY_=void 0===_?0:_,this.textRotateWithView_=void 0!==g&&g,this.textRotation_=void 0===v?0:v,this.strokeKey_=o?("string"==typeof o.strokeStyle?o.strokeStyle:c(o.strokeStyle))+o.lineCap+o.lineDashOffset+"|"+o.lineWidth+o.lineJoin+o.miterLimit+"["+o.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?"),this.fillKey_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+c(n.fillStyle):""}else this.text_=""},e}(zs)},$s=function(t){function e(e,i,n,o,r,s,a){t.call(this),this.declutterTree_=s,this.declutterGroup_=null,this.tolerance_=e,this.maxExtent_=i,this.overlaps_=r,this.pixelRatio_=o,this.resolution_=n,this.renderBuffer_=a,this.replaysByZIndex_={},this.hitDetectionContext_=eo(1,1),this.hitDetectionTransform_=[1,0,0,1,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addDeclutter=function(t){var e=null;return this.declutterTree_&&(t?(e=this.declutterGroup_)[4]++:(e=this.declutterGroup_=[1/0,1/0,-1/0,-1/0]).push(1)),e},e.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()},e.prototype.hasReplays=function(t){for(var e in this.replaysByZIndex_)for(var i=this.replaysByZIndex_[e],n=0,o=t.length;n<o;++n)if(t[n]in i)return!0;return!1},e.prototype.finish=function(){for(var t in this.replaysByZIndex_){var e=this.replaysByZIndex_[t];for(var i in e)e[i].finish()}},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,o,r,s){var a,h=2*(n=Math.round(n))+1,l=fn(this.hitDetectionTransform_,n+.5,n+.5,1/e,-1/e,-i,-t[0],-t[1]),u=this.hitDetectionContext_;u.canvas.width!==h||u.canvas.height!==h?(u.canvas.width=h,u.canvas.height=h):u.clearRect(0,0,h,h),void 0!==this.renderBuffer_&&(ii(a=[1/0,1/0,-1/0,-1/0],t),Xe(a,e*(this.renderBuffer_+n),a));var c,p,d=function(t){if(void 0!==qs[t])return qs[t];for(var e=2*t+1,i=new Array(e),n=0;n<e;n++)i[n]=new Array(e);var o=t,r=0,s=0;for(;o>=r;)Js(i,t+o,t+r),Js(i,t+r,t+o),Js(i,t-r,t+o),Js(i,t-o,t+r),Js(i,t-o,t-r),Js(i,t-r,t-o),Js(i,t+r,t-o),Js(i,t+o,t-r),2*((s+=1+2*++r)-o)+1>0&&(s+=1-2*(o-=1));return qs[t]=i,i}(n);function f(t){for(var e=u.getImageData(0,0,h,h).data,i=0;i<h;i++)for(var n=0;n<h;n++)if(d[i][n]&&e[4*(n*h+i)+3]>0){var o=void 0;return(!c||p!=Ls.IMAGE&&p!=Ls.TEXT||-1!==c.indexOf(t))&&(o=r(t)),o||void u.clearRect(0,0,h,h)}}this.declutterTree_&&(c=this.declutterTree_.all().map(function(t){return t.value}));var _,g,v,y,m,E=Object.keys(this.replaysByZIndex_).map(Number);for(E.sort(Xt),_=E.length-1;_>=0;--_){var x=E[_].toString();for(v=this.replaysByZIndex_[x],g=js.length-1;g>=0;--g)if(void 0!==(y=v[p=js[g]]))if(!s||p!=Ls.IMAGE&&p!=Ls.TEXT){if(m=y.replayHitDetection(u,l,i,o,f,a))return m}else{var T=s[x];T?T.push(y,l.slice(0)):s[x]=[y,l.slice(0)]}}},e.prototype.getClipCoords=function(t){var e=this.maxExtent_,i=e[0],n=e[1],o=e[2],r=e[3],s=[i,n,i,r,o,r,o,n];return Ti(s,0,8,2,t,s),s},e.prototype.getReplay=function(t,e){var i=void 0!==t?t.toString():"0",n=this.replaysByZIndex_[i];void 0===n&&(n={},this.replaysByZIndex_[i]=n);var o=n[e];void 0===o&&(o=new(0,Zs[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_,this.overlaps_,this.declutterTree_),n[e]=o);return o},e.prototype.getReplays=function(){return this.replaysByZIndex_},e.prototype.isEmpty=function(){return m(this.replaysByZIndex_)},e.prototype.replay=function(t,e,i,n,o,r,s){var a=Object.keys(this.replaysByZIndex_).map(Number);a.sort(Xt),t.save(),this.clip(t,e);var h,l,u,c,p,d,f=r||js;for(h=0,l=a.length;h<l;++h){var _=a[h].toString();for(p=this.replaysByZIndex_[_],u=0,c=f.length;u<c;++u){var g=f[u];if(d=p[g],void 0!==d)if(!s||g!=Ls.IMAGE&&g!=Ls.TEXT)d.replay(t,e,i,n,o);else{var v=s[_];v?v.push(d,e.slice(0)):s[_]=[d,e.slice(0)]}}}t.restore()},e}(Is),qs={0:[[!0]]};function Js(t,e,i){var n,o=Math.floor(t.length/2);if(e>=o)for(n=o;n<e;n++)t[n][i]=!0;else if(e<o)for(n=e+1;n<o;n++)t[n][i]=!0}var Qs=$s,ta=.5,ea={Point:function(t,e,i,n){var o=i.getImage();if(o){if(o.getImageState()!=br.LOADED)return;var r=t.getReplay(i.getZIndex(),Ls.IMAGE);r.setImageStyle(o,t.addDeclutter(!1)),r.drawPoint(e,n)}var s=i.getText();if(s){var a=t.getReplay(i.getZIndex(),Ls.TEXT);a.setTextStyle(s,t.addDeclutter(!!o)),a.drawText(e,n)}},LineString:function(t,e,i,n){var o=i.getStroke();if(o){var r=t.getReplay(i.getZIndex(),Ls.LINE_STRING);r.setFillStrokeStyle(null,o),r.drawLineString(e,n)}var s=i.getText();if(s){var a=t.getReplay(i.getZIndex(),Ls.TEXT);a.setTextStyle(s,t.addDeclutter(!1)),a.drawText(e,n)}},Polygon:function(t,e,i,n){var o=i.getFill(),r=i.getStroke();if(o||r){var s=t.getReplay(i.getZIndex(),Ls.POLYGON);s.setFillStrokeStyle(o,r),s.drawPolygon(e,n)}var a=i.getText();if(a){var h=t.getReplay(i.getZIndex(),Ls.TEXT);h.setTextStyle(a,t.addDeclutter(!1)),h.drawText(e,n)}},MultiPoint:function(t,e,i,n){var o=i.getImage();if(o){if(o.getImageState()!=br.LOADED)return;var r=t.getReplay(i.getZIndex(),Ls.IMAGE);r.setImageStyle(o,t.addDeclutter(!1)),r.drawMultiPoint(e,n)}var s=i.getText();if(s){var a=t.getReplay(i.getZIndex(),Ls.TEXT);a.setTextStyle(s,t.addDeclutter(!!o)),a.drawText(e,n)}},MultiLineString:function(t,e,i,n){var o=i.getStroke();if(o){var r=t.getReplay(i.getZIndex(),Ls.LINE_STRING);r.setFillStrokeStyle(null,o),r.drawMultiLineString(e,n)}var s=i.getText();if(s){var a=t.getReplay(i.getZIndex(),Ls.TEXT);a.setTextStyle(s,t.addDeclutter(!1)),a.drawText(e,n)}},MultiPolygon:function(t,e,i,n){var o=i.getFill(),r=i.getStroke();if(r||o){var s=t.getReplay(i.getZIndex(),Ls.POLYGON);s.setFillStrokeStyle(o,r),s.drawMultiPolygon(e,n)}var a=i.getText();if(a){var h=t.getReplay(i.getZIndex(),Ls.TEXT);h.setTextStyle(a,t.addDeclutter(!1)),h.drawText(e,n)}},GeometryCollection:function(t,e,i,n){var o,r,s=e.getGeometriesArray();for(o=0,r=s.length;o<r;++o){var a=ea[s[o].getType()];a(t,s[o],i,n)}},Circle:function(t,e,i,n){var o=i.getFill(),r=i.getStroke();if(o||r){var s=t.getReplay(i.getZIndex(),Ls.CIRCLE);s.setFillStrokeStyle(o,r),s.drawCircle(e,n)}var a=i.getText();if(a){var h=t.getReplay(i.getZIndex(),Ls.TEXT);h.setTextStyle(a,t.addDeclutter(!1)),h.drawText(e,n)}}};function ia(t,e){return parseInt(c(t),10)-parseInt(c(e),10)}function na(t,e){var i=oa(t,e);return i*i}function oa(t,e){return ta*t/e}function ra(t,e,i,n,o,r){var s=!1,a=i.getImage();if(a){var h=a.getImageState();h==br.LOADED||h==br.ERROR?a.unlistenImageChange(o,r):(h==br.IDLE&&a.load(),h=a.getImageState(),a.listenImageChange(o,r),s=!0)}return function(t,e,i,n){var o=i.getGeometryFunction()(e);if(!o)return;var r=o.getSimplifiedGeometry(n);if(i.getRenderer())!function t(e,i,n,o){if(i.getType()==Ei.GEOMETRY_COLLECTION){for(var r=i.getGeometries(),s=0,a=r.length;s<a;++s)t(e,r[s],n,o);return}var h=e.getReplay(n.getZIndex(),Ls.DEFAULT);h.drawCustom(i,o,n.getRenderer())}(t,r,i,e);else{var s=ea[r.getType()];s(t,r,i,e)}}(t,e,i,n),s}var sa=function(t){function e(e){t.call(this,e),this.declutterTree_=e.getDeclutter()?rs()(9,void 0):null,this.dirty_=!1,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=[1/0,1/0,-1/0,-1/0],this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.context=eo(),C(Lr,N.CLEAR,this.handleFontsChanged_,this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){R(Lr,N.CLEAR,this.handleFontsChanged_,this),t.prototype.disposeInternal.call(this)},e.prototype.compose=function(t,e,i){var n=e.extent,o=e.pixelRatio,r=i.managed?e.skippedFeatureUids:{},s=e.viewState,a=s.projection,h=s.rotation,l=a.getExtent(),u=this.getLayer().getSource(),c=this.getTransform(e,0),p=i.extent,d=void 0!==p;d&&this.clip(t,e,p);var f=this.replayGroup_;if(f&&!f.isEmpty()){this.declutterTree_&&this.declutterTree_.clear();var _,g=this.getLayer(),v=0,y=0,m=1!==i.opacity,E=g.hasListener(he);if(m||E){var x=t.canvas.width,T=t.canvas.height;if(h){var S=Math.round(Math.sqrt(x*x+T*T));v=(S-x)/2,y=(S-T)/2,x=T=S}this.context.canvas.width=x,this.context.canvas.height=T,_=this.context}else _=t;var C=_.globalAlpha;m||(_.globalAlpha=i.opacity),_!=t&&_.translate(v,y);var b=e.viewHints,R=!(b[Re]||b[we]),w=e.size[0]*o,M=e.size[1]*o;if(Wr(_,-h,w/2,M/2),f.replay(_,c,h,r,R),u.getWrapX()&&a.canWrapX()&&!Ue(l,n)){for(var O,I=n[0],L=gi(l),P=0;I<l[0];)O=L*--P,c=this.getTransform(e,O),f.replay(_,c,h,r,R),I+=L;for(P=0,I=n[2];I>l[2];)O=L*++P,c=this.getTransform(e,O),f.replay(_,c,h,r,R),I-=L}if(Wr(_,h,w/2,M/2),E&&this.dispatchRenderEvent(_,e,c),_!=t){if(m){var k=t.globalAlpha;t.globalAlpha=i.opacity,t.drawImage(_.canvas,-v,-y),t.globalAlpha=k}else t.drawImage(_.canvas,-v,-y);_.translate(-v,-y)}m||(_.globalAlpha=C)}d&&t.restore()},e.prototype.composeFrame=function(t,e,i){var n=this.getTransform(t,0);this.preCompose(i,t,n),this.compose(i,t,e),this.postCompose(i,t,e,n)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,o){if(this.replayGroup_){var r=e.viewState.resolution,s=e.viewState.rotation,a=this.getLayer(),h={};return this.replayGroup_.forEachFeatureAtCoordinate(t,r,s,i,{},function(t){var e=c(t);if(!(e in h))return h[e]=!0,n.call(o,t,a)},null)}},e.prototype.handleFontsChanged_=function(t){var e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t,e){var i=this.getLayer(),n=i.getSource(),o=t.viewHints[Re],r=t.viewHints[we],s=i.getUpdateWhileAnimating(),a=i.getUpdateWhileInteracting();if(!this.dirty_&&!s&&o||!a&&r)return!0;var h=t.extent,l=t.viewState,u=l.projection,c=l.resolution,p=t.pixelRatio,d=i.getRevision(),f=i.getRenderBuffer(),_=i.getRenderOrder();void 0===_&&(_=ia);var g=Xe(h,f*c),v=l.projection.getExtent();if(n.getWrapX()&&l.projection.canWrapX()&&!Ue(v,t.extent)){var y=gi(v),m=Math.max(gi(g)/2,y);g[0]=v[0]-m,g[2]=v[2]+m}if(!this.dirty_&&this.renderedResolution_==c&&this.renderedRevision_==d&&this.renderedRenderOrder_==_&&Ue(this.renderedExtent_,g))return this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var E=new Qs(oa(c,p),g,c,p,n.getOverlaps(),this.declutterTree_,i.getRenderBuffer());n.loadFeatures(g,c,u);var x=function(t){var e,n=t.getStyleFunction()||i.getStyleFunction();if(n&&(e=n(t,c)),e){var o=this.renderFeature(t,c,p,e,E);this.dirty_=this.dirty_||o}}.bind(this);if(_){var T=[];n.forEachFeatureInExtent(g,function(t){T.push(t)}),T.sort(_);for(var S=0,C=T.length;S<C;++S)x(T[S])}else n.forEachFeatureInExtent(g,x);return E.finish(),this.renderedResolution_=c,this.renderedRevision_=d,this.renderedRenderOrder_=_,this.renderedExtent_=g,this.replayGroup_=E,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,e,i,n,o){if(!n)return!1;var r=!1;if(Array.isArray(n))for(var s=0,a=n.length;s<a;++s)r=ra(o,t,n[s],na(e,i),this.handleStyleImageChange_,this)||r;else r=ra(o,t,n,na(e,i),this.handleStyleImageChange_,this);return r},e}(Es);sa.handles=function(t){return t.getType()===vr.VECTOR},sa.create=function(t,e){return new sa(e)};var aa=sa,ha={IMAGE:"image",HYBRID:"hybrid",VECTOR:"vector"},la={image:[Ls.POLYGON,Ls.CIRCLE,Ls.LINE_STRING,Ls.IMAGE,Ls.TEXT],hybrid:[Ls.POLYGON,Ls.LINE_STRING]},ua={image:[Ls.DEFAULT],hybrid:[Ls.IMAGE,Ls.TEXT,Ls.DEFAULT],vector:js},ca=function(t){function e(e){t.call(this,e,!0),this.declutterTree_=e.getDeclutter()?rs()(9,void 0):null,this.dirty_=!1,this.renderedLayerRevision_,this.tmpTransform_=[1,0,0,1,0,0];var i=e.getRenderMode();this.zDirection=i===ha.VECTOR?1:0,i!==ha.VECTOR&&(this.context=eo()),C(Lr,N.CLEAR,this.handleFontsChanged_,this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){R(Lr,N.CLEAR,this.handleFontsChanged_,this),t.prototype.disposeInternal.call(this)},e.prototype.getTile=function(e,i,n,o,r){var s=t.prototype.getTile.call(this,e,i,n,o,r);return s.getState()===ue.LOADED&&(this.createReplayGroup_(s,o,r),this.context&&this.renderTileImage_(s,o,r)),s},e.prototype.getTileImage=function(t){var e=this.getLayer();return t.getImage(e)},e.prototype.prepareFrame=function(e,i){var n=this.getLayer().getRevision();return this.renderedLayerRevision_!=n&&(this.renderedTiles.length=0),this.renderedLayerRevision_=n,t.prototype.prepareFrame.call(this,e,i)},e.prototype.createReplayGroup_=function(t,e,i){var n=this,o=this.getLayer(),r=o.getRevision(),s=o.getRenderOrder()||null,a=t.getReplayState(o);if(a.dirty||a.renderedRevision!=r||a.renderedRenderOrder!=s){for(var h=o.getSource(),l=h.getTileGrid(),u=h.getTileGridForProjection(i).getResolution(t.tileCoord[0]),c=t.extent,p=function(r,p){var d=t.getTile(t.tileKeys[r]);if(d.getState()==ue.LOADED){var f=d.tileCoord,_=l.getTileCoordExtent(f),g=di(c,_),v=ti(_,g)?null:Xe(g,o.getRenderBuffer()*u,n.tmpExtent),y=d.getProjection(),m=!1;en(i,y)||(m=!0,d.setProjection(i)),a.dirty=!1;var E=new Qs(0,g,u,e,h.getOverlaps(),n.declutterTree_,o.getRenderBuffer()),x=na(u,e),T=function(t){var e,i=t.getStyleFunction()||o.getStyleFunction();if(i&&(e=i(t,u)),e){var n=this.renderFeature(t,x,e,E);this.dirty_=this.dirty_||n,a.dirty=a.dirty||n}},S=d.getFeatures();s&&s!==a.renderedRenderOrder&&S.sort(s);for(var C=0,b=S.length;C<b;++C){var R=S[C];m&&(y.getUnits()==wi.TILE_PIXELS&&(y.setWorldExtent(_),y.setExtent(d.getExtent())),R.getGeometry().transform(y,i)),v&&!vi(v,R.getGeometry().getExtent())||T.call(n,R)}E.finish(),d.setReplayGroup(o,t.tileCoord.toString(),E)}},d=0,f=t.tileKeys.length;d<f;++d)p(d);a.renderedRevision=r,a.renderedRenderOrder=s}},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,o){var r=e.viewState.resolution,s=e.viewState.rotation;i=void 0==i?0:i;var a,h,l,u,p=this.getLayer(),d={},f=this.renderedTiles;for(l=0,u=f.length;l<u;++l){var _=f[l];if(Be(a=Xe(_.extent,i*r,a),t))for(var g=0,v=_.tileKeys.length;g<v;++g){var y=_.getTile(_.tileKeys[g]);if(y.getState()==ue.LOADED){var m=y.getReplayGroup(p,_.tileCoord.toString());h=h||m.forEachFeatureAtCoordinate(t,r,s,i,{},function(t){var e=c(t);if(!(e in d))return d[e]=!0,n.call(o,t,p)},null)}}}return h},e.prototype.getReplayTransform_=function(t,e){var i=this.getLayer().getSource().getTileGrid(),n=t.tileCoord,o=i.getResolution(n[0]),r=e.viewState,s=e.pixelRatio,a=r.resolution/s,h=i.getTileCoordExtent(n,this.tmpExtent),l=r.center,u=fi(h),c=e.size,p=Math.round(s*c[0]/2),d=Math.round(s*c[1]/2);return fn(this.tmpTransform_,p,d,o/a,o/a,r.rotation,(u[0]-l[0])/o,(l[1]-u[1])/o)},e.prototype.handleFontsChanged_=function(t){var e=this.getLayer();e.getVisible()&&void 0!==this.renderedLayerRevision_&&e.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.postCompose=function(e,i,n){var o=this.getLayer(),r=o.getRenderMode();if(r!=ha.IMAGE){var s,a,h=o.getDeclutter()?{}:null,l=o.getSource(),u=ua[r],c=i.pixelRatio,p=i.viewState.rotation,d=i.size;p&&Wr(e,-p,s=Math.round(c*d[0]/2),a=Math.round(c*d[1]/2)),h&&this.declutterTree_.clear();for(var f=i.viewHints,_=!(f[Re]||f[we]),g=this.renderedTiles,v=l.getTileGridForProjection(i.viewState.projection),y=[],m=[],E=g.length-1;E>=0;--E){var x=g[E];if(x.getState()!=ue.ABORT)for(var T=x.tileCoord,S=v.getTileCoordExtent(T,this.tmpExtent)[0]-x.extent[0],C=void 0,b=0,R=x.tileKeys.length;b<R;++b){var w=x.getTile(x.tileKeys[b]);if(w.getState()==ue.LOADED){var M=w.getReplayGroup(o,T.toString());if(M&&M.hasReplays(u)){C||(C=this.getTransform(i,S));var O=w.tileCoord[0],I=M.getClipCoords(C);e.save(),e.globalAlpha=n.opacity;for(var L=0,P=y.length;L<P;++L){var k=y[L];O<m[L]&&(e.beginPath(),e.moveTo(I[0],I[1]),e.lineTo(I[2],I[3]),e.lineTo(I[4],I[5]),e.lineTo(I[6],I[7]),e.moveTo(k[6],k[7]),e.lineTo(k[4],k[5]),e.lineTo(k[2],k[3]),e.lineTo(k[0],k[1]),e.clip())}M.replay(e,C,p,{},_,u,h),e.restore(),y.push(I),m.push(O)}}}}h&&function(t,e,i,n){for(var o=Object.keys(t).map(Number).sort(Xt),r={},s=0,a=o.length;s<a;++s)for(var h=t[o[s].toString()],l=0,u=h.length;l<u;){var c=h[l++],p=h[l++];c.replay(e,p,i,r,n)}}(h,e,p,_),p&&Wr(e,p,s,a)}t.prototype.postCompose.call(this,e,i,n)},e.prototype.renderFeature=function(t,e,i,n){if(!i)return!1;var o=!1;if(Array.isArray(i))for(var r=0,s=i.length;r<s;++r)o=ra(n,t,i[r],e,this.handleStyleImageChange_,this)||o;else o=ra(n,t,i,e,this.handleStyleImageChange_,this);return o},e.prototype.renderTileImage_=function(t,e,i){var n=this.getLayer(),o=t.getReplayState(n),r=n.getRevision(),s=la[n.getRenderMode()];if(s&&o.renderedTileRevision!==r){o.renderedTileRevision=r;var a=t.wrappedTileCoord,h=a[0],l=n.getSource(),u=l.getTileGridForProjection(i),c=u.getResolution(h),p=t.getContext(n),d=l.getTilePixelSize(h,e,i);p.canvas.width=d[0],p.canvas.height=d[1];for(var f=u.getTileCoordExtent(a,this.tmpExtent),_=0,g=t.tileKeys.length;_<g;++_){var v=t.getTile(t.tileKeys[_]);if(v.getState()==ue.LOADED){var y=e/c,m=an(this.tmpTransform_);pn(m,y,-y),dn(m,-f[0],-f[3]),v.getReplayGroup(n,t.tileCoord.toString()).replay(p,m,0,{},!0,s)}}}},e}(Ms);ca.handles=function(t){return t.getType()===vr.VECTOR_TILE},ca.create=function(t,e){return new ca(e)};var pa=ca,da=function(t){function e(e){(e=g({},e)).controls||(e.controls=function(t){var e=t||{},i=new B;return(void 0===e.zoom||e.zoom)&&i.push(new Mo(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&i.push(new wo(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&i.push(new bo(e.attributionOptions)),i}()),e.interactions||(e.interactions=function(t){var e=t||{},i=new B,n=new Io(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&i.push(new qo),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&i.push(new jo({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&i.push(new $o({condition:e.onFocusOnly?Wo:void 0,kinetic:n})),(void 0===e.pinchRotate||e.pinchRotate)&&i.push(new dr),(void 0===e.pinchZoom||e.pinchZoom)&&i.push(new fr({constrainResolution:e.constrainResolution,duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(i.push(new ar),i.push(new lr({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&i.push(new pr({condition:e.onFocusOnly?Wo:void 0,constrainResolution:e.constrainResolution,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&i.push(new or({duration:e.zoomDuration})),i}()),t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createRenderer=function(){var t=new ms(this);return t.registerLayerRenderers([Ss,Ms,aa,pa]),t},e}(po),fa="preload",_a="useInterimTilesOnError",ga=function(t){function e(e){var i=e||{},n=g({},i);delete n.preload,delete n.useInterimTilesOnError,t.call(this,n),this.setPreload(void 0!==i.preload?i.preload:0),this.setUseInterimTilesOnError(void 0===i.useInterimTilesOnError||i.useInterimTilesOnError),this.type=vr.TILE}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getPreload=function(){return this.get(fa)},e.prototype.setPreload=function(t){this.set(fa,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(_a)},e.prototype.setUseInterimTilesOnError=function(t){this.set(_a,t)},e}(So);ga.prototype.getSource;var va=ga,ya="1.3.0";function ma(t,e,i,n){var o=rn(i,e,t),r=Ji(e,n,i),s=e.getMetersPerUnit();void 0!==s&&(r*=s);var a=t.getMetersPerUnit();void 0!==a&&(r/=a);var h=t.getExtent();if(!h||Be(h,o)){var l=Ji(t,r,o)/r;isFinite(l)&&l>0&&(r/=l)}return r}function Ea(t,e,i,n){var o=i-t,r=n-e,s=Math.sqrt(o*o+r*r);return[Math.round(i+o/s),Math.round(n+r/s)]}function xa(t,e,i,n,o,r,s,a,h,l,u){var c=eo(Math.round(i*t),Math.round(i*e));if(0===h.length)return c.canvas;c.scale(i,i);var p=[1/0,1/0,-1/0,-1/0];h.forEach(function(t,e,i){ei(p,t.extent)});var d=gi(p),f=pi(p),_=eo(Math.round(i*d/n),Math.round(i*f/n)),g=i/n;h.forEach(function(t,e,i){var n=t.extent[0]-p[0],o=-(t.extent[3]-p[3]),r=gi(t.extent),s=pi(t.extent);_.drawImage(t.image,l,l,t.image.width-2*l,t.image.height-2*l,n*g,o*g,r*g,s*g)});var v=fi(s);return a.getTriangles().forEach(function(t,e,o){var s=t.source,a=t.target,h=s[0][0],l=s[0][1],u=s[1][0],d=s[1][1],f=s[2][0],g=s[2][1],y=(a[0][0]-v[0])/r,m=-(a[0][1]-v[1])/r,E=(a[1][0]-v[0])/r,x=-(a[1][1]-v[1])/r,T=(a[2][0]-v[0])/r,S=-(a[2][1]-v[1])/r,C=h,b=l;h=0,l=0;var R=function(t){for(var e=t.length,i=0;i<e;i++){for(var n=i,o=Math.abs(t[i][i]),r=i+1;r<e;r++){var s=Math.abs(t[r][i]);s>o&&(o=s,n=r)}if(0===o)return null;var a=t[n];t[n]=t[i],t[i]=a;for(var h=i+1;h<e;h++)for(var l=-t[h][i]/t[i][i],u=i;u<e+1;u++)i==u?t[h][u]=0:t[h][u]+=l*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 d=p-1;d>=0;d--)t[d][e]-=t[d][p]*c[p]}return c}([[u-=C,d-=b,0,0,E-y],[f-=C,g-=b,0,0,T-y],[0,0,u,d,x-m],[0,0,f,g,S-m]]);if(R){c.save(),c.beginPath();var w=(y+E+T)/3,M=(m+x+S)/3,O=Ea(w,M,y,m),I=Ea(w,M,E,x),L=Ea(w,M,T,S);c.moveTo(I[0],I[1]),c.lineTo(O[0],O[1]),c.lineTo(L[0],L[1]),c.clip(),c.transform(R[0],R[2],R[1],R[3],y,m),c.translate(p[0]-C,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,o=(n[0][0]-v[0])/r,s=-(n[0][1]-v[1])/r,a=(n[1][0]-v[0])/r,h=-(n[1][1]-v[1])/r,l=(n[2][0]-v[0])/r,u=-(n[2][1]-v[1])/r;c.beginPath(),c.moveTo(a,h),c.lineTo(o,s),c.lineTo(l,u),c.closePath(),c.stroke()}),c.restore()),c.canvas}var Ta=function(t){function e(e,i,n){t.call(this);var o=n||{};this.tileCoord=e,this.state=i,this.interimTile=null,this.key="",this.transition_=void 0===o.transition?250:o.transition,this.transitionStarts_={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.changed=function(){this.dispatchEvent(N.CHANGE)},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()==ue.LOADED)return 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()==ue.LOADED){t.interimTile=null;break}t.getState()==ue.LOADING?e=t:t.getState()==ue.IDLE?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){this.state=t,this.changed()},e.prototype.load=function(){},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:De(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}(F);function Sa(){var t=eo(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}var Ca=function(t){function e(e,i,n,o,r,s){t.call(this,e,i,s),this.crossOrigin_=o,this.src_=n,this.image_=new Image,null!==o&&(this.image_.crossOrigin=o),this.imageListenerKeys_=null,this.tileLoadFunction_=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.state==ue.LOADING&&(this.unlistenImage_(),this.image_=Sa()),this.interimTile&&this.interimTile.dispose(),this.state=ue.ABORT,this.changed(),t.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.image_},e.prototype.getKey=function(){return this.src_},e.prototype.handleImageError_=function(){this.state=ue.ERROR,this.unlistenImage_(),this.image_=Sa(),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=ue.LOADED:this.state=ue.EMPTY,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==ue.ERROR&&(this.state=ue.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==ue.IDLE&&(this.state=ue.LOADING,this.changed(),this.imageListenerKeys_=[b(this.image_,N.ERROR,this.handleImageError_,this),b(this.image_,N.LOAD,this.handleImageLoad_,this)],this.tileLoadFunction_(this,this.src_))},e.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(w),this.imageListenerKeys_=null},e}(Ta);function ba(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function Ra(t,e,i){return t+"/"+e+"/"+i}function wa(t){return Ra(t[0],t[1],t[2])}function Ma(t){return(t[1]<<t[0])+t[2]}var Oa=function(t){function e(e){t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.expireCache=function(t){for(;this.canExpireCache();){var e=this.peekLast(),i=e.tileCoord[0].toString();if(i in t&&t[i].contains(e.tileCoord))break;this.pop().dispose()}},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(wa(e.tileCoord)),e.dispose())},this)}},e}(Rr),Ia=function(t,e,i,n,o){this.sourceProj_=t,this.targetProj_=e;var r={},s=on(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return r[e]||(r[e]=s(t)),r[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=o*o,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&gi(n)==gi(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?gi(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?gi(this.targetProj_.getExtent()):null;var a=fi(i),h=_i(i),l=li(i),u=hi(i),c=this.transformInv_(a),p=this.transformInv_(h),d=this.transformInv_(l),f=this.transformInv_(u);if(this.addQuad_(a,h,l,u,c,p,d,f,10),this.wrapsXInSource_){var _=1/0;this.triangles_.forEach(function(t,e,i){_=Math.min(_,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])-_>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]-_>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-_>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-_>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))}r={}};Ia.prototype.addTriangle_=function(t,e,i,n,o,r){this.triangles_.push({source:[n,o,r],target:[t,e,i]})},Ia.prototype.addQuad_=function(t,e,i,n,o,r,s,a,h){var l=We([o,r,s,a]),u=this.sourceWorldWidth_?gi(l)/this.sourceWorldWidth_:null,c=this.sourceWorldWidth_,p=this.sourceProj_.canWrapX()&&u>.5&&u<1,d=!1;if(h>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_)d=gi(We([t,e,i,n]))/this.targetWorldWidth_>.25||d;!p&&this.sourceProj_.isGlobal()&&u&&(d=u>.25||d)}if(d||!this.maxSourceExtent_||vi(l,this.maxSourceExtent_)){if(!(d||isFinite(o[0])&&isFinite(o[1])&&isFinite(r[0])&&isFinite(r[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1]))){if(!(h>0))return;d=!0}if(h>0){if(!d){var f,_=[(t[0]+i[0])/2,(t[1]+i[1])/2],g=this.transformInv_(_);if(p)f=(xe(o[0],c)+xe(s[0],c))/2-xe(g[0],c);else f=(o[0]+s[0])/2-g[0];var v=(o[1]+s[1])/2-g[1];d=f*f+v*v>this.errorThresholdSquared_}if(d){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){var y=[(e[0]+i[0])/2,(e[1]+i[1])/2],m=this.transformInv_(y),E=[(n[0]+t[0])/2,(n[1]+t[1])/2],x=this.transformInv_(E);this.addQuad_(t,e,y,E,o,r,m,x,h-1),this.addQuad_(E,y,i,n,x,m,s,a,h-1)}else{var T=[(t[0]+e[0])/2,(t[1]+e[1])/2],S=this.transformInv_(T),C=[(i[0]+n[0])/2,(i[1]+n[1])/2],b=this.transformInv_(C);this.addQuad_(t,T,C,n,o,S,b,a,h-1),this.addQuad_(T,e,i,C,S,r,s,b,h-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}this.addTriangle_(t,i,n,o,s,a),this.addTriangle_(t,e,i,o,r,s)}},Ia.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach(function(e,i,n){var o=e.source;ii(t,o[0]),ii(t,o[1]),ii(t,o[2])}),t},Ia.prototype.getTriangles=function(){return this.triangles_};var La=Ia,Pa=function(t){function e(e,i,n,o,r,s,a,h,l,u,c){t.call(this,r,ue.IDLE),this.renderEdges_=void 0!==c&&c,this.pixelRatio_=a,this.gutter_=h,this.canvas_=null,this.sourceTileGrid_=i,this.targetTileGrid_=o,this.wrappedTileCoord_=s||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;var p=o.getTileCoordExtent(this.wrappedTileCoord_),d=this.targetTileGrid_.getExtent(),f=this.sourceTileGrid_.getExtent(),_=d?di(p,d):p;if(0!==ai(_)){var g=e.getExtent();g&&(f=f?di(f,g):g);var v=o.getResolution(this.wrappedTileCoord_[0]),y=ma(e,n,ui(_),v);if(!isFinite(y)||y<=0)this.state=ue.EMPTY;else{var m=void 0!==u?u:as;if(this.triangulation_=new La(e,n,_,f,y*m),0!==this.triangulation_.getTriangles().length){this.sourceZ_=i.getZForResolution(y);var E=this.triangulation_.calculateSourceExtent();if(f&&(e.canWrapX()?(E[1]=ge(E[1],f[1],f[3]),E[3]=ge(E[3],f[1],f[3])):E=di(E,f)),ai(E)){for(var x=i.getTileRangeForExtentAndZ(E,this.sourceZ_),T=x.minX;T<=x.maxX;T++)for(var S=x.minY;S<=x.maxY;S++){var C=l(this.sourceZ_,T,S,a);C&&this.sourceTiles_.push(C)}0===this.sourceTiles_.length&&(this.state=ue.EMPTY)}else this.state=ue.EMPTY}else this.state=ue.EMPTY}}else this.state=ue.EMPTY}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.state==ue.LOADING&&this.unlistenSources_(),t.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,i,n){e&&e.getState()==ue.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=ue.ERROR;else{var e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],o="number"==typeof i?i:i[1],r=this.targetTileGrid_.getResolution(e),s=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=xa(n,o,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),r,a,this.triangulation_,t,this.gutter_,this.renderEdges_),this.state=ue.LOADED}this.changed()},e.prototype.load=function(){if(this.state==ue.IDLE){this.state=ue.LOADING,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,i,n){var o=e.getState();if(o==ue.IDLE||o==ue.LOADING){t++;var r=C(e,N.CHANGE,function(i){var n=e.getState();n!=ue.LOADED&&n!=ue.ERROR&&n!=ue.EMPTY||(w(r),0===--t&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(r)}}.bind(this)),this.sourceTiles_.forEach(function(t,e,i){t.getState()==ue.IDLE&&t.load()}),0===t&&setTimeout(this.reproject_.bind(this),0)}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(w),this.sourcesListenerKeys_=null},e}(Ta);function ka(t,e){var i=/\{z\}/g,n=/\{x\}/g,o=/\{y\}/g,r=/\{-y\}/g;return function(s,a,h){return s?t.replace(i,s[0].toString()).replace(n,s[1].toString()).replace(o,function(){return(-s[2]-1).toString()}).replace(r,function(){var t=s[0],i=e.getFullTileRange(t);return ce(i,55),(i.getHeight()+s[2]).toString()}):void 0}}function Aa(t,e){for(var i=t.length,n=new Array(i),o=0;o<i;++o)n[o]=ka(t[o],e);return function(t){if(1===t.length)return t[0];return function(e,i,n){if(e){var o=Ma(e),r=xe(o,t.length);return t[r](e,i,n)}}}(n)}function Da(t,e,i){}var Fa=[0,0,0],Na=function(t){var e,i,n,o;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,ce((e=this.resolutions_,i=!0,n=function(t,e){return e-t}||Xt,e.every(function(t,o){if(0===o)return!0;var r=n(e[o-1],t);return!(r>0||i&&0===r)})),17),!t.origins)for(var r=0,s=this.resolutions_.length-1;r<s;++r)if(o){if(this.resolutions_[r]/this.resolutions_[r+1]!==o){o=void 0;break}}else o=this.resolutions_[r]/this.resolutions_[r+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,ce(this.origins_.length==this.resolutions_.length,20));var a=t.extent;void 0===a||this.origin_||this.origins_||(this.origin_=fi(a)),ce(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,ce(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:_e,ce(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==a?a:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map(function(t,e){return new Rs(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1))},this):a&&this.calculateTileRanges_(a)};Na.prototype.forEachTileCoord=function(t,e,i){for(var n=this.getTileRangeForExtentAndZ(t,e),o=n.minX,r=n.maxX;o<=r;++o)for(var s=n.minY,a=n.maxY;s<=a;++s)i([e,o,s])},Na.prototype.forEachTileCoordParentTileRange=function(t,e,i,n,o){var r,s,a,h=null,l=t[0]-1;for(2===this.zoomFactor_?(s=t[1],a=t[2]):h=this.getTileCoordExtent(t,o);l>=this.minZoom;){if(r=2===this.zoomFactor_?bs(s=Math.floor(s/2),s,a=Math.floor(a/2),a,n):this.getTileRangeForExtentAndZ(h,l,n),e.call(i,l,r))return!0;--l}return!1},Na.prototype.getExtent=function(){return this.extent_},Na.prototype.getMaxZoom=function(){return this.maxZoom},Na.prototype.getMinZoom=function(){return this.minZoom},Na.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},Na.prototype.getResolution=function(t){return this.resolutions_[t]},Na.prototype.getResolutions=function(){return this.resolutions_},Na.prototype.getTileCoordChildTileRange=function(t,e,i){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){var n=2*t[1],o=2*t[2];return bs(n,n+1,o,o+1,e)}var r=this.getTileCoordExtent(t,i);return this.getTileRangeForExtentAndZ(r,t[0]+1,e)}return null},Na.prototype.getTileRangeExtent=function(t,e,i){var n=this.getOrigin(t),o=this.getResolution(t),r=co(this.getTileSize(t),this.tmpSize_),s=n[0]+e.minX*r[0]*o,a=n[0]+(e.maxX+1)*r[0]*o;return $e(s,n[1]+e.minY*r[1]*o,a,n[1]+(e.maxY+1)*r[1]*o,i)},Na.prototype.getTileRangeForExtentAndZ=function(t,e,i){var n=Fa;this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,n);var o=n[1],r=n[2];return this.getTileCoordForXYAndZ_(t[2],t[3],e,!0,n),bs(o,n[1],r,n[2],i)},Na.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),i=this.getResolution(t[0]),n=co(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*n[0]*i,e[1]+(t[2]+.5)*n[1]*i]},Na.prototype.getTileCoordExtent=function(t,e){var i=this.getOrigin(t[0]),n=this.getResolution(t[0]),o=co(this.getTileSize(t[0]),this.tmpSize_),r=i[0]+t[1]*o[0]*n,s=i[1]+t[2]*o[1]*n;return $e(r,s,r+o[0]*n,s+o[1]*n,e)},Na.prototype.getTileCoordForCoordAndResolution=function(t,e,i){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,i)},Na.prototype.getTileCoordForXYAndResolution_=function(t,e,i,n,o){var r=this.getZForResolution(i),s=i/this.getResolution(r),a=this.getOrigin(r),h=co(this.getTileSize(r),this.tmpSize_),l=n?.5:0,u=n?0:.5,c=Math.floor((t-a[0])/i+l),p=Math.floor((e-a[1])/i+u),d=s*c/h[0],f=s*p/h[1];return n?(d=Math.ceil(d)-1,f=Math.ceil(f)-1):(d=Math.floor(d),f=Math.floor(f)),ba(r,d,f,o)},Na.prototype.getTileCoordForXYAndZ_=function(t,e,i,n,o){var r=this.getOrigin(i),s=this.getResolution(i),a=co(this.getTileSize(i),this.tmpSize_),h=n?.5:0,l=n?0:.5,u=Math.floor((t-r[0])/s+h),c=Math.floor((e-r[1])/s+l),p=u/a[0],d=c/a[1];return n?(p=Math.ceil(p)-1,d=Math.ceil(d)-1):(p=Math.floor(p),d=Math.floor(d)),ba(i,p,d,o)},Na.prototype.getTileCoordForCoordAndZ=function(t,e,i){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,i)},Na.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},Na.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},Na.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:null},Na.prototype.getZForResolution=function(t,e){return ge(Kt(this.resolutions_,t,e||0),this.minZoom,this.maxZoom)},Na.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};var Ga=Na;function ja(t){var e=t.getDefaultTileGrid();return e||(e=function(t,e,i,n){return function(t,e,i,n){var o=void 0!==n?n:je.TOP_LEFT,r=Ya(t,e,i);return new Ga({extent:t,origin:function(t,e){var i;return e===je.BOTTOM_LEFT?i=hi(t):e===je.BOTTOM_RIGHT?i=li(t):e===je.TOP_LEFT?i=fi(t):e===je.TOP_RIGHT?i=_i(t):ce(!1,13),i}(t,o),resolutions:r,tileSize:i})}(Wa(t),e,i,n)}(t),t.setDefaultTileGrid(e)),e}function Ya(t,e,i){for(var n=void 0!==e?e:fe,o=pi(t),r=gi(t),s=co(void 0!==i?i:_e),a=Math.max(r/s[0],o/s[1]),h=n+1,l=new Array(h),u=0;u<h;++u)l[u]=a/Math.pow(2,u);return l}function Wa(t){var e=(t=qi(t)).getExtent();if(!e){var i=180*Ri[wi.DEGREES]/t.getMetersPerUnit();e=$e(-i,-i,i,i)}return e}var Xa=function(t){function e(e){t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX}),this.opaque_=void 0!==e.opaque&&e.opaque,this.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,this.tileGrid=void 0!==e.tileGrid?e.tileGrid:null,this.tileCache=new Oa(e.cacheSize),this.tmpSize=[0,0],this.key_=e.key||"",this.tileOptions={transition:e.transition}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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 o=this.getTileCacheForProjection(t);if(!o)return!1;for(var r,s,a,h=!0,l=i.minX;l<=i.maxX;++l)for(var u=i.minY;u<=i.maxY;++u)s=Ra(e,l,u),a=!1,o.containsKey(s)&&(a=(r=o.get(s)).getState()===ue.LOADED)&&(a=!1!==n(r)),a||(h=!1);return h},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,o){return l()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:ja(t)},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();return e&&!en(e,t)?null:this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,i){var n=this.getTileGridForProjection(i),o=this.getTilePixelRatio(e),r=co(n.getTileSize(t),this.tmpSize);return 1==o?r:uo(r,o,this.tmpSize)},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],o=t.getTileCoordCenter(e),r=Wa(i);if(Be(r,o))return e;var s=gi(r),a=Math.ceil((r[0]-o[0])/s);return o[0]+=s*a,t.getTileCoordForCoordAndZ(o,n)}(n,t,i)),function(t,e){var i=t[0],n=t[1],o=t[2];if(e.getMinZoom()>i||i>e.getMaxZoom())return!1;var r,s=e.getExtent();return!(r=s?e.getTileRangeForExtentAndZ(s,i):e.getFullTileRange(i))||r.containsXY(n,o)}(t,n)?t:null},e.prototype.refresh=function(){this.tileCache.clear(),this.changed()},e.prototype.useTile=function(t,e,i,n){},e}(ns),za=function(t){function e(e,i){t.call(this,e),this.tile=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(D),Ka="tileloadstart",Ba="tileloadend",Ua="tileloaderror";function Va(t,e){t.getImage().src=e}var Ha="carmentaserver",Za="geoserver",$a="mapserver",qa="qgis";function Ja(t,e,i){var n=this.getTileGrid();if(n||(n=this.getTileGridForProjection(i)),!(n.getResolutions().length<=t[0])){1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);var o=n.getResolution(t[0]),r=n.getTileCoordExtent(t,this.tmpExtent_),s=co(n.getTileSize(t[0]),this.tmpSize),a=this.gutter_;0!==a&&(s=lo(s,a,this.tmpSize),r=Xe(r,o*a,r)),1!=e&&(s=uo(s,e,this.tmpSize));var h={SERVICE:"WMS",VERSION:ya,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return g(h,this.params_),this.getRequestUrl_(t,s,r,e,i,h)}}var Qa=function(t){function e(e){var i=e||{},n=i.params||{},o=!("TRANSPARENT"in n)||n.TRANSPARENT;t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,opaque:!o,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileClass:i.tileClass,tileGrid:i.tileGrid,tileLoadFunction:i.tileLoadFunction,tileUrlFunction:Ja,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition}),this.gutter_=void 0!==i.gutter?i.gutter:0,this.params_=n,this.v13_=!0,this.serverType_=i.serverType,this.hidpi_=void 0===i.hidpi||i.hidpi,this.tmpExtent_=[1/0,1/0,-1/0,-1/0],this.updateV13_(),this.setKey(this.getKeyForParams_())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getGetFeatureInfoUrl=function(t,e,i,n){var o=qi(i),r=this.getProjection(),s=this.getTileGrid();s||(s=this.getTileGridForProjection(o));var a=s.getTileCoordForCoordAndResolution(t,e);if(!(s.getResolutions().length<=a[0])){var h=s.getResolution(a[0]),l=s.getTileCoordExtent(a,this.tmpExtent_),u=co(s.getTileSize(a[0]),this.tmpSize),c=this.gutter_;0!==c&&(u=lo(u,c,this.tmpSize),l=Xe(l,h*c,l)),r&&r!==o&&(h=ma(r,o,t,h),l=mi(l,on(o,r)),t=rn(t,o,r));var p={SERVICE:"WMS",VERSION:ya,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};g(p,this.params_,n);var d=Math.floor((t[0]-l[0])/h),f=Math.floor((l[3]-t[1])/h);return p[this.v13_?"I":"X"]=d,p[this.v13_?"J":"Y"]=f,this.getRequestUrl_(a,u,l,1,r||o,p)}},e.prototype.getGutter=function(){return this.gutter_},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,e,i,n,o,r){var s=this.urls;if(s){if(r.WIDTH=e[0],r.HEIGHT=e[1],r[this.v13_?"CRS":"SRS"]=o.getCode(),"STYLES"in this.params_||(r.STYLES=""),1!=n)switch(this.serverType_){case Za:var a=90*n+.5|0;"FORMAT_OPTIONS"in r?r.FORMAT_OPTIONS+=";dpi:"+a:r.FORMAT_OPTIONS="dpi:"+a;break;case $a:r.MAP_RESOLUTION=90*n;break;case Ha:case qa:r.DPI=90*n;break;default:ce(!1,52)}var h,l,u=o.getAxisOrientation(),c=i;if(this.v13_&&"ne"==u.substr(0,2))h=i[0],c[0]=i[1],c[1]=h,h=i[2],c[2]=i[3],c[3]=h;if(r.BBOX=c.join(","),1==s.length)l=s[0];else l=s[xe(Ma(t),s.length)];return function(t,e){var i=[];Object.keys(e).forEach(function(t){null!==e[t]&&void 0!==e[t]&&i.push(t+"="+encodeURIComponent(e[t]))});var n=i.join("&");return(t=-1===(t=t.replace(/[?&]$/,"")).indexOf("?")?t+"?":t+"&")+n}(l,r)}},e.prototype.getTilePixelRatio=function(t){return this.hidpi_&&void 0!==this.serverType_?t:1},e.prototype.getKeyForParams_=function(){var t=0,e=[];for(var i in this.params_)e[t++]=i+"-"+this.params_[i];return e.join("/")},e.prototype.updateParams=function(t){g(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},e.prototype.updateV13_=function(){var t=this.params_.VERSION||ya;this.v13_=function(t,e){for(var i=(""+t).split("."),n=(""+e).split("."),o=0;o<Math.max(i.length,n.length);o++){var r=parseInt(i[o]||"0",10),s=parseInt(n[o]||"0",10);if(r>s)return 1;if(s>r)return-1}return 0}(t,"1.3")>=0},e}(function(t){function e(e){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:Va,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible}),this.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,this.tileClass=void 0!==e.tileClass?e.tileClass:Ca,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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 o=this.tileCacheForProjection[n];o.expireCache(o==i?e:{})}},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!en(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getOpaque=function(e){return!(this.getProjection()&&e&&!en(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(t){var e=this.getProjection();if(!this.tileGrid||e&&!en(e,t)){var i=c(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=ja(t)),this.tileGridForProjection[i]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();if(!e||en(e,t))return this.tileCache;var i=c(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,o,r){var s=[t,e,i],a=this.getTileCoordForTileUrlFunction(s,o),h=a?this.tileUrlFunction(a,n,o):void 0,l=new this.tileClass(s,void 0!==h?ue.IDLE:ue.EMPTY,void 0!==h?h:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return l.key=r,C(l,N.CHANGE,this.handleTileChange,this),l},e.prototype.getTile=function(t,e,i,n,o){var r=this.getProjection();if(r&&o&&!en(r,o)){var s,a=this.getTileCacheForProjection(o),h=[t,e,i],l=wa(h);a.containsKey(l)&&(s=a.get(l));var u=this.getKey();if(s&&s.key==u)return s;var c=this.getTileGridForProjection(r),p=this.getTileGridForProjection(o),d=this.getTileCoordForTileUrlFunction(h,o),f=new Pa(r,c,o,p,h,d,this.getTilePixelRatio(n),this.getGutter(),function(t,e,i,n){return this.getTileInternal(t,e,i,n,r)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_);return f.key=u,s?(f.interimTile=s,f.refreshInterimChain(),a.replace(l,f)):a.set(l,f),f}return this.getTileInternal(t,e,i,n,r||o)},e.prototype.getTileInternal=function(t,e,i,n,o){var r=null,s=Ra(t,e,i),a=this.getKey();if(this.tileCache.containsKey(s)){if((r=this.tileCache.get(s)).key!=a){var h=r;r=this.createTile_(t,e,i,n,o,a),h.getState()==ue.IDLE?r.interimTile=h.interimTile:r.interimTile=h,r.refreshInterimChain(),this.tileCache.replace(s,r)}}else r=this.createTile_(t,e,i,n,o,a),this.tileCache.set(s,r);return r},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=qi(t);if(i){var n=c(i);n in this.tileGridForProjection||(this.tileGridForProjection[n]=e)}},e}(function(t){function e(e){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}),this.generateTileUrlFunction_=!e.tileUrlFunction,this.tileLoadFunction=e.tileLoadFunction,this.tileUrlFunction=e.tileUrlFunction?e.tileUrlFunction.bind(this):Da,this.urls=null,e.urls?this.setUrls(e.urls):e.url&&this.setUrl(e.url),e.tileUrlFunction&&this.setTileUrlFunction(e.tileUrlFunction,this.key_),this.tileLoadingKeys_={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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=c(i),o=i.getState();o==ue.LOADING?(this.tileLoadingKeys_[n]=!0,e=Ka):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],e=o==ue.ERROR?Ua:o==ue.LOADED||o==ue.ABORT?Ba:void 0),void 0!=e&&this.dispatchEvent(new za(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=this.urls=function(t){var e=[],i=/\{([a-z])-([a-z])\}/.exec(t);if(i){var n,o=i[1].charCodeAt(0),r=i[2].charCodeAt(0);for(n=o;n<=r;++n)e.push(t.replace(i[0],String.fromCharCode(n)));return e}if(i=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.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(Aa(t,this.tileGrid),e):this.setKey(e)},e.prototype.useTile=function(t,e,i){var n=Ra(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)},e}(Xa))),th=(i("/bpg"),i("ACGT")),eh=i.n(th),ih=(i("Mf0D"),i("exT9")),nh={name:"NavMenu",props:["navMenus"],components:{elSubmenu:i.n(ih).a,elMenuItem:eh.a},data:function(){return{}},methods:{}},oh=i("XyMi");var rh=function(t){i("ush1")},sh=Object(oh.a)(nh,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t._l(t.navMenus,function(e){return[!e.childs&&e.entity?i("el-menu-item",{key:e.entity.id,attrs:{data:e,index:e.entity.name}},[i("i",{class:e.entity.icon}),t._v(" "),i("span",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(e.entity.alias))])]):t._e(),t._v(" "),e.childs&&e.entity?i("el-submenu",{key:e.entity.id,attrs:{data:e,index:e.entity.name}},[i("template",{slot:"title"},[i("i",{class:e.entity.icon}),t._v(" "),i("span",[t._v(t._s(e.entity.alias))])]),t._v(" "),i("NavMenu",{attrs:{navMenus:e.childs}})],2):t._e()]})],2)},[],!1,rh,"data-v-0adca65d",null).exports,ah=(i("jKJX"),{metaInfo:{title:"地图管理"},components:{elTag:h.a,elMenu:s.a,NavMenu:sh,elButton:o.a},data:function(){return{deviceState:{abNormalCount:0,normalCount:6,caremaState:{count:2,abNormal:0,normal:2},ipState:{count:2,abNormal:1,normal:1},padState:{count:2,abNormal:0,normal:2}},zoomLevel:0,centerLon:0,centerLat:0,baseLayers:[],businessLayers:{},projection:"",currentZoomLevel:0,menuData:[{entity:{id:1,name:"area1",icon:"el-icon-message",alias:"教学楼"},childs:[{entity:{id:3,name:"area2",icon:"el-icon-loading",alias:"一层"}},{entity:{id:4,name:"area3",icon:"el-icon-bell",alias:"二层"}},{entity:{id:5,name:"area4",icon:"el-icon-bell",alias:"三层"}},{entity:{id:6,name:"area5",icon:"el-icon-bell",alias:"四层"}},{entity:{id:7,name:"area6",icon:"el-icon-bell",alias:"五层"}}]}]}},methods:{mapInit:function(){var t=[];if(this.baseLayers.length>0){var e=!0,i=!1,n=void 0;try{for(var o,r=this.baseLayers[Symbol.iterator]();!(e=(o=r.next()).done);e=!0){var s=o.value;t.push(new va({visible:!0,source:new Qa({url:s,params:{LAYERS:"basic:shpGroup",TILED:!0},serverType:"geoserver"})}))}}catch(t){i=!0,n=t}finally{try{!e&&r.return&&r.return()}finally{if(i)throw n}}var a=new da({layers:t,target:"olMap",view:new to({projection:this.projection,center:[this.centerLon,this.centerLat],zoom:this.zoomLevel})});console.info(a)}},handleOpen:function(t,e){console.log(t,e)},handleClose:function(t,e){console.log(t,e)}},created:function(){this.zoomLevel=11,this.centerLon=54e4,this.centerLat=3222260,this.projection="EPSG:900913",this.baseLayers.push("http://192.168.1.203:2080/geoserver/wms")},mounted:function(){this.mapInit()}});var hh=function(t){i("d5BH")},lh=Object(oh.a)(ah,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"overflow-hidden"},[n("div",{staticClass:"map",staticStyle:{position:"relative"},attrs:{id:"olMap"}},[n("div",{attrs:{id:"stateDiv"}},[n("div",{staticClass:"detailStateDiv"},[n("table",{attrs:{cellpadding:"5",cellspacing:"3"}},[n("tr",[n("td",[n("img",{staticClass:"deviceImg",attrs:{src:i("7J5b")}}),t._v(t._s(t.deviceState.caremaState.count)),n("span",[t._v("|")]),n("span",[n("label",{staticClass:"abnormal"},[t._v(t._s(t.deviceState.caremaState.abNormal))]),n("label",[t._v(t._s(t.deviceState.caremaState.normal))])])]),t._v(" "),n("td",[n("img",{staticClass:"deviceImg",attrs:{src:i("9QFF")}}),t._v(t._s(t.deviceState.ipState.count)),n("span",[t._v("|")]),n("span",[n("label",{staticClass:"abnormal"},[t._v(t._s(t.deviceState.ipState.abNormal))]),n("label",[t._v(t._s(t.deviceState.ipState.normal))])])]),t._v(" "),n("td",[n("img",{staticClass:"deviceImg",attrs:{src:i("oju6")}}),t._v(t._s(t.deviceState.padState.count)),n("span",[t._v("|")]),n("span",[n("label",{staticClass:"abnormal"},[t._v(t._s(t.deviceState.padState.abNormal))]),n("label",[t._v(t._s(t.deviceState.padState.normal))])])])])])]),t._v(" "),n("div",{staticClass:"statistStateDiv"},[n("el-tag",{attrs:{type:"danger"}},[t._v("异常("+t._s(t.deviceState.abNormalCount)+")")]),t._v(" "),n("el-tag",{attrs:{type:"success"}},[t._v("正常("+t._s(t.deviceState.normalCount)+")")])],1)]),t._v(" "),n("div",{staticClass:"areaDiv"},[[n("el-menu",{attrs:{"default-active":"systemManage","background-color":"#545c64","text-color":"#fff","active-text-color":"#ffd04b"},on:{open:t.handleOpen,close:t.handleClose}},[n("NavMenu",{attrs:{navMenus:t.menuData}})],1)]],2),t._v(" "),n("div",{staticClass:"areaManage"},[n("el-button",{staticStyle:{"background-color":"#545c64",color:"#fff",border:"0"}},[t._v("管理")])],1)])])},[],!1,hh,null,null);e.default=lh.exports},Mf0D:function(t,e){},NMof:function(t,e,i){"use strict";var n,o;"function"==typeof Symbol&&Symbol.iterator;void 0===(o="function"==typeof(n=function(){var t=window,e={placement:"bottom",gpuAcceleration:!0,offset:0,boundariesElement:"viewport",boundariesPadding:5,preventOverflowOrder:["left","right","top","bottom"],flipBehavior:"flip",arrowElement:"[x-arrow]",arrowOffset:0,modifiers:["shift","offset","preventOverflow","keepTogether","arrow","flip","applyStyle"],modifiersIgnored:[],forceAbsolute:!1};function i(t,i,n){this._reference=t.jquery?t[0]:t,this.state={};var o=void 0===i||null===i,r=i&&"[object Object]"===Object.prototype.toString.call(i);return this._popper=o||r?this.parse(r?i:{}):i.jquery?i[0]:i,this._options=Object.assign({},e,n),this._options.modifiers=this._options.modifiers.map(function(t){if(-1===this._options.modifiersIgnored.indexOf(t))return"applyStyle"===t&&this._popper.setAttribute("x-placement",this._options.placement),this.modifiers[t]||t}.bind(this)),this.state.position=this._getPosition(this._popper,this._reference),u(this._popper,{position:this.state.position,top:0}),this.update(),this._setupEventListeners(),this}function n(e){var i=e.style.display,n=e.style.visibility;e.style.display="block",e.style.visibility="hidden";e.offsetWidth;var o=t.getComputedStyle(e),r=parseFloat(o.marginTop)+parseFloat(o.marginBottom),s=parseFloat(o.marginLeft)+parseFloat(o.marginRight),a={width:e.offsetWidth+s,height:e.offsetHeight+r};return e.style.display=i,e.style.visibility=n,a}function o(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function r(t){var e=Object.assign({},t);return e.right=e.left+e.width,e.bottom=e.top+e.height,e}function s(t,e){var i,n=0;for(i in t){if(t[i]===e)return n;n++}return null}function a(e,i){return t.getComputedStyle(e,null)[i]}function h(e){var i=e.offsetParent;return i!==t.document.body&&i?i:t.document.documentElement}function l(e){var i=e.parentNode;return i?i===t.document?t.document.body.scrollTop||t.document.body.scrollLeft?t.document.body:t.document.documentElement:-1!==["scroll","auto"].indexOf(a(i,"overflow"))||-1!==["scroll","auto"].indexOf(a(i,"overflow-x"))||-1!==["scroll","auto"].indexOf(a(i,"overflow-y"))?i:l(e.parentNode):e}function u(t,e){Object.keys(e).forEach(function(i){var n,o="";-1!==["width","height","top","right","bottom","left"].indexOf(i)&&(""!==(n=e[i])&&!isNaN(parseFloat(n))&&isFinite(n))&&(o="px"),t.style[i]=e[i]+o})}function c(t){var e={width:t.offsetWidth,height:t.offsetHeight,left:t.offsetLeft,top:t.offsetTop};return e.right=e.left+e.width,e.bottom=e.top+e.height,e}function p(t){var e=t.getBoundingClientRect(),i=-1!=navigator.userAgent.indexOf("MSIE")&&"HTML"===t.tagName?-t.scrollTop:e.top;return{left:e.left,top:i,right:e.right,bottom:e.bottom,width:e.right-e.left,height:e.bottom-i}}function d(e){for(var i=["","ms","webkit","moz","o"],n=0;n<i.length;n++){var o=i[n]?i[n]+e.charAt(0).toUpperCase()+e.slice(1):e;if(void 0!==t.document.body.style[o])return o}return null}return i.prototype.destroy=function(){return this._popper.removeAttribute("x-placement"),this._popper.style.left="",this._popper.style.position="",this._popper.style.top="",this._popper.style[d("transform")]="",this._removeEventListeners(),this._options.removeOnDestroy&&this._popper.remove(),this},i.prototype.update=function(){var t={instance:this,styles:{}};t.placement=this._options.placement,t._originalPlacement=this._options.placement,t.offsets=this._getOffsets(this._popper,this._reference,t.placement),t.boundaries=this._getBoundaries(t,this._options.boundariesPadding,this._options.boundariesElement),t=this.runModifiers(t,this._options.modifiers),"function"==typeof this.state.updateCallback&&this.state.updateCallback(t)},i.prototype.onCreate=function(t){return t(this),this},i.prototype.onUpdate=function(t){return this.state.updateCallback=t,this},i.prototype.parse=function(e){var i={tagName:"div",classNames:["popper"],attributes:[],parent:t.document.body,content:"",contentType:"text",arrowTagName:"div",arrowClassNames:["popper__arrow"],arrowAttributes:["x-arrow"]};e=Object.assign({},i,e);var n=t.document,o=n.createElement(e.tagName);if(a(o,e.classNames),h(o,e.attributes),"node"===e.contentType?o.appendChild(e.content.jquery?e.content[0]:e.content):"html"===e.contentType?o.innerHTML=e.content:o.textContent=e.content,e.arrowTagName){var r=n.createElement(e.arrowTagName);a(r,e.arrowClassNames),h(r,e.arrowAttributes),o.appendChild(r)}var s=e.parent.jquery?e.parent[0]:e.parent;if("string"==typeof s){if((s=n.querySelectorAll(e.parent)).length>1&&console.warn("WARNING: the given `parent` query("+e.parent+") matched more than one element, the first one will be used"),0===s.length)throw"ERROR: the given `parent` doesn't exists!";s=s[0]}return s.length>1&&s instanceof Element==!1&&(console.warn("WARNING: you have passed as parent a list of elements, the first one will be used"),s=s[0]),s.appendChild(o),o;function a(t,e){e.forEach(function(e){t.classList.add(e)})}function h(t,e){e.forEach(function(e){t.setAttribute(e.split(":")[0],e.split(":")[1]||"")})}},i.prototype._getPosition=function(e,i){h(i);return this._options.forceAbsolute?"absolute":function e(i){if(i===t.document.body)return!1;if("fixed"===a(i,"position"))return!0;return i.parentNode?e(i.parentNode):i}(i)?"fixed":"absolute"},i.prototype._getOffsets=function(t,e,i){i=i.split("-")[0];var o={};o.position=this.state.position;var r="fixed"===o.position,s=function(t,e,i){var n=p(t),o=p(e);if(i){var r=l(e);o.top+=r.scrollTop,o.bottom+=r.scrollTop,o.left+=r.scrollLeft,o.right+=r.scrollLeft}return{top:n.top-o.top,left:n.left-o.left,bottom:n.top-o.top+n.height,right:n.left-o.left+n.width,width:n.width,height:n.height}}(e,h(t),r),a=n(t);return-1!==["right","left"].indexOf(i)?(o.top=s.top+s.height/2-a.height/2,o.left="left"===i?s.left-a.width:s.right):(o.left=s.left+s.width/2-a.width/2,o.top="top"===i?s.top-a.height:s.bottom),o.width=a.width,o.height=a.height,{popper:o,reference:s}},i.prototype._setupEventListeners=function(){if(this.state.updateBound=this.update.bind(this),t.addEventListener("resize",this.state.updateBound),"window"!==this._options.boundariesElement){var e=l(this._reference);e!==t.document.body&&e!==t.document.documentElement||(e=t),e.addEventListener("scroll",this.state.updateBound),this.state.scrollTarget=e}},i.prototype._removeEventListeners=function(){t.removeEventListener("resize",this.state.updateBound),"window"!==this._options.boundariesElement&&this.state.scrollTarget&&(this.state.scrollTarget.removeEventListener("scroll",this.state.updateBound),this.state.scrollTarget=null),this.state.updateBound=null},i.prototype._getBoundaries=function(e,i,n){var o,r,s={};if("window"===n){var a=t.document.body,u=t.document.documentElement;o=Math.max(a.scrollHeight,a.offsetHeight,u.clientHeight,u.scrollHeight,u.offsetHeight),s={top:0,right:Math.max(a.scrollWidth,a.offsetWidth,u.clientWidth,u.scrollWidth,u.offsetWidth),bottom:o,left:0}}else if("viewport"===n){var p=h(this._popper),d=l(this._popper),f=c(p),_="fixed"===e.offsets.popper.position?0:(r=d)==document.body?Math.max(document.documentElement.scrollTop,document.body.scrollTop):r.scrollTop,g="fixed"===e.offsets.popper.position?0:function(t){return t==document.body?Math.max(document.documentElement.scrollLeft,document.body.scrollLeft):t.scrollLeft}(d);s={top:0-(f.top-_),right:t.document.documentElement.clientWidth-(f.left-g),bottom:t.document.documentElement.clientHeight-(f.top-_),left:0-(f.left-g)}}else s=h(this._popper)===n?{top:0,left:0,right:n.clientWidth,bottom:n.clientHeight}:c(n);return s.left+=i,s.right-=i,s.top=s.top+i,s.bottom=s.bottom-i,s},i.prototype.runModifiers=function(t,e,i){var n=e.slice();return void 0!==i&&(n=this._options.modifiers.slice(0,s(this._options.modifiers,i))),n.forEach(function(e){var i;(i=e)&&"[object Function]"==={}.toString.call(i)&&(t=e.call(this,t))}.bind(this)),t},i.prototype.isModifierRequired=function(t,e){var i=s(this._options.modifiers,t);return!!this._options.modifiers.slice(0,i).filter(function(t){return t===e}).length},i.prototype.modifiers={},i.prototype.modifiers.applyStyle=function(t){var e,i={position:t.offsets.popper.position},n=Math.round(t.offsets.popper.left),o=Math.round(t.offsets.popper.top);return this._options.gpuAcceleration&&(e=d("transform"))?(i[e]="translate3d("+n+"px, "+o+"px, 0)",i.top=0,i.left=0):(i.left=n,i.top=o),Object.assign(i,t.styles),u(this._popper,i),this._popper.setAttribute("x-placement",t.placement),this.isModifierRequired(this.modifiers.applyStyle,this.modifiers.arrow)&&t.offsets.arrow&&u(t.arrowElement,t.offsets.arrow),t},i.prototype.modifiers.shift=function(t){var e=t.placement,i=e.split("-")[0],n=e.split("-")[1];if(n){var o=t.offsets.reference,s=r(t.offsets.popper),a={y:{start:{top:o.top},end:{top:o.top+o.height-s.height}},x:{start:{left:o.left},end:{left:o.left+o.width-s.width}}},h=-1!==["bottom","top"].indexOf(i)?"x":"y";t.offsets.popper=Object.assign(s,a[h][n])}return t},i.prototype.modifiers.preventOverflow=function(t){var e=this._options.preventOverflowOrder,i=r(t.offsets.popper),n={left:function(){var e=i.left;return i.left<t.boundaries.left&&(e=Math.max(i.left,t.boundaries.left)),{left:e}},right:function(){var e=i.left;return i.right>t.boundaries.right&&(e=Math.min(i.left,t.boundaries.right-i.width)),{left:e}},top:function(){var e=i.top;return i.top<t.boundaries.top&&(e=Math.max(i.top,t.boundaries.top)),{top:e}},bottom:function(){var e=i.top;return i.bottom>t.boundaries.bottom&&(e=Math.min(i.top,t.boundaries.bottom-i.height)),{top:e}}};return e.forEach(function(e){t.offsets.popper=Object.assign(i,n[e]())}),t},i.prototype.modifiers.keepTogether=function(t){var e=r(t.offsets.popper),i=t.offsets.reference,n=Math.floor;return e.right<n(i.left)&&(t.offsets.popper.left=n(i.left)-e.width),e.left>n(i.right)&&(t.offsets.popper.left=n(i.right)),e.bottom<n(i.top)&&(t.offsets.popper.top=n(i.top)-e.height),e.top>n(i.bottom)&&(t.offsets.popper.top=n(i.bottom)),t},i.prototype.modifiers.flip=function(t){if(!this.isModifierRequired(this.modifiers.flip,this.modifiers.preventOverflow))return console.warn("WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!"),t;if(t.flipped&&t.placement===t._originalPlacement)return t;var e=t.placement.split("-")[0],i=o(e),n=t.placement.split("-")[1]||"",s=[];return(s="flip"===this._options.flipBehavior?[e,i]:this._options.flipBehavior).forEach(function(a,h){if(e===a&&s.length!==h+1){e=t.placement.split("-")[0],i=o(e);var l=r(t.offsets.popper),u=-1!==["right","bottom"].indexOf(e);(u&&Math.floor(t.offsets.reference[e])>Math.floor(l[i])||!u&&Math.floor(t.offsets.reference[e])<Math.floor(l[i]))&&(t.flipped=!0,t.placement=s[h+1],n&&(t.placement+="-"+n),t.offsets.popper=this._getOffsets(this._popper,this._reference,t.placement).popper,t=this.runModifiers(t,this._options.modifiers,this._flip))}}.bind(this)),t},i.prototype.modifiers.offset=function(t){var e=this._options.offset,i=t.offsets.popper;return-1!==t.placement.indexOf("left")?i.top-=e:-1!==t.placement.indexOf("right")?i.top+=e:-1!==t.placement.indexOf("top")?i.left-=e:-1!==t.placement.indexOf("bottom")&&(i.left+=e),t},i.prototype.modifiers.arrow=function(t){var e=this._options.arrowElement,i=this._options.arrowOffset;if("string"==typeof e&&(e=this._popper.querySelector(e)),!e)return t;if(!this._popper.contains(e))return console.warn("WARNING: `arrowElement` must be child of its popper element!"),t;if(!this.isModifierRequired(this.modifiers.arrow,this.modifiers.keepTogether))return console.warn("WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!"),t;var o={},s=t.placement.split("-")[0],a=r(t.offsets.popper),h=t.offsets.reference,l=-1!==["left","right"].indexOf(s),u=l?"height":"width",c=l?"top":"left",p=l?"left":"top",d=l?"bottom":"right",f=n(e)[u];h[d]-f<a[c]&&(t.offsets.popper[c]-=a[c]-(h[d]-f)),h[c]+f>a[d]&&(t.offsets.popper[c]+=h[c]+f-a[d]);var _=h[c]+(i||h[u]/2-f/2)-a[c];return _=Math.max(Math.min(a[u]-f-8,_),8),o[c]=_,o[p]="",t.offsets.arrow=o,t.arrowElement=e,t},Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert first argument to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(void 0!==n&&null!==n){n=Object(n);for(var o=Object.keys(n),r=0,s=o.length;r<s;r++){var a=o[r],h=Object.getOwnPropertyDescriptor(n,a);void 0!==h&&h.enumerable&&(e[a]=n[a])}}}return e}}),i})?n.call(e,i,e,t):n)||(t.exports=o)},ON3O:function(t,e,i){var n=i("uY1a");t.exports=function(t,e,i){return void 0===i?n(t,e,!1):n(t,i,!1!==e)}},Q22Q:function(t,e,i){"use strict";t.exports=o,t.exports.default=o;var n=i("6gaN");function o(t,e){if(!(this instanceof o))return new o(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),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 s(t,e){a(t,0,t.children.length,e,t)}function a(t,e,i,n,o){o||(o=_(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(var r,s=e;s<i;s++)r=t.children[s],h(o,t.leaf?n(r):r);return o}function h(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 u(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function p(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(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 _(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,e,i,o,r){for(var s,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=o||(s=e+Math.ceil((i-e)/o/2)*o,n(t,s,e,i,r),a.push(e,s,s,i))}o.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!f(t,e))return i;for(var o,r,s,a,h=[];e;){for(o=0,r=e.children.length;o<r;o++)s=e.children[o],f(t,a=e.leaf?n(s):s)&&(e.leaf?i.push(s):d(t,a)?this._all(s,i):h.push(s));e=h.pop()}return i},collides:function(t){var e=this.data,i=this.toBBox;if(!f(t,e))return!1;for(var n,o,r,s,a=[];e;){for(n=0,o=e.children.length;n<o;n++)if(r=e.children[n],f(t,s=e.leaf?i(r):r)){if(e.leaf||d(t,s))return!0;a.push(r)}e=a.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,i=t.length;e<i;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var o=this.data;this.data=n,n=o}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=_([]),this},remove:function(t,e){if(!t)return this;for(var i,n,o,s,a=this.data,h=this.toBBox(t),l=[],u=[];a||l.length;){if(a||(a=l.pop(),n=l[l.length-1],i=u.pop(),s=!0),a.leaf&&-1!==(o=r(t,a.children,e)))return a.children.splice(o,1),l.push(a),this._condense(l),this;s||a.leaf||!d(a,h)?n?(i++,a=n.children[i],s=!1):a=null:(l.push(a),u.push(i),i=0,n=a,a=a.children[0])}return this},toBBox:function(t){return t},compareMinX:l,compareMinY:u,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_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},_build:function(t,e,i,n){var o,r=i-e+1,a=this._maxEntries;if(r<=a)return s(o=_(t.slice(e,i+1)),this.toBBox),o;n||(n=Math.ceil(Math.log(r)/Math.log(a)),a=Math.ceil(r/Math.pow(a,n-1))),(o=_([])).leaf=!1,o.height=n;var h,l,u,c,p=Math.ceil(r/a),d=p*Math.ceil(Math.sqrt(a));for(g(t,e,i,d,this.compareMinX),h=e;h<=i;h+=d)for(g(t,h,u=Math.min(h+d-1,i),p,this.compareMinY),l=h;l<=u;l+=p)c=Math.min(l+p-1,u),o.children.push(this._build(t,l,c,n-1));return s(o,this.toBBox),o},_chooseSubtree:function(t,e,i,n){for(var o,r,s,a,h,l,u,p,d,f;n.push(e),!e.leaf&&n.length-1!==i;){for(u=p=1/0,o=0,r=e.children.length;o<r;o++)h=c(s=e.children[o]),d=t,f=s,(l=(Math.max(f.maxX,d.maxX)-Math.min(f.minX,d.minX))*(Math.max(f.maxY,d.maxY)-Math.min(f.minY,d.minY))-h)<p?(p=l,u=h<u?h:u,a=s):l===p&&h<u&&(u=h,a=s);e=a||e.children[0]}return e},_insert:function(t,e,i){var n=this.toBBox,o=i?t:n(t),r=[],s=this._chooseSubtree(o,this.data,e,r);for(s.children.push(t),h(s,o);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(o,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,o=this._minEntries;this._chooseSplitAxis(i,o,n);var r=this._chooseSplitIndex(i,o,n),a=_(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,s(i,this.toBBox),s(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=_([t,e]),this.data.height=t.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,o,r,s,h,l,u,p,d,f,_,g,v,y;for(l=u=1/0,n=e;n<=i-e;n++)o=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),d=o,f=r,void 0,void 0,void 0,void 0,_=Math.max(d.minX,f.minX),g=Math.max(d.minY,f.minY),v=Math.min(d.maxX,f.maxX),y=Math.min(d.maxY,f.maxY),s=Math.max(0,v-_)*Math.max(0,y-g),h=c(o)+c(r),s<l?(l=s,p=n,u=h<u?h:u):s===l&&h<u&&(u=h,p=n);return p},_chooseSplitAxis:function(t,e,i){var n=t.leaf?this.compareMinX:l,o=t.leaf?this.compareMinY:u;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,o)&&t.children.sort(n)},_allDistMargin:function(t,e,i,n){t.children.sort(n);var o,r,s=this.toBBox,l=a(t,0,e,s),u=a(t,i-e,i,s),c=p(l)+p(u);for(o=e;o<i-e;o++)r=t.children[o],h(l,t.leaf?s(r):r),c+=p(l);for(o=i-e-1;o>=e;o--)r=t.children[o],h(u,t.leaf?s(r):r),c+=p(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():s(t[i],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}},SExR:function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=84)}({0:function(t,e){t.exports=function(t,e,i,n,o,r){var s,a=t=t||{},h=typeof t.default;"object"!==h&&"function"!==h||(s=t,a=t.default);var l,u="function"==typeof a?a.options:a;if(e&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId=o),r?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},u._ssrRegister=l):n&&(l=n),l){var c=u.functional,p=c?u.render:u.beforeCreate;c?(u._injectStyles=l,u.render=function(t,e){return l.call(e),p(t,e)}):u.beforeCreate=p?[].concat(p,l):[l]}return{esModule:s,exports:a,options:u}}},1:function(t,e){t.exports=i("fPll")},2:function(t,e){t.exports=i("2kvA")},47:function(t,e,i){"use strict";e.__esModule=!0;var n=n||{};n.Utils=n.Utils||{},n.Utils.focusFirstDescendant=function(t){for(var e=0;e<t.childNodes.length;e++){var i=t.childNodes[e];if(n.Utils.attemptFocus(i)||n.Utils.focusFirstDescendant(i))return!0}return!1},n.Utils.focusLastDescendant=function(t){for(var e=t.childNodes.length-1;e>=0;e--){var i=t.childNodes[e];if(n.Utils.attemptFocus(i)||n.Utils.focusLastDescendant(i))return!0}return!1},n.Utils.attemptFocus=function(t){if(!n.Utils.isFocusable(t))return!1;n.Utils.IgnoreUtilFocusChanges=!0;try{t.focus()}catch(t){}return n.Utils.IgnoreUtilFocusChanges=!1,document.activeElement===t},n.Utils.isFocusable=function(t){if(t.tabIndex>0||0===t.tabIndex&&null!==t.getAttribute("tabIndex"))return!0;if(t.disabled)return!1;switch(t.nodeName){case"A":return!!t.href&&"ignore"!==t.rel;case"INPUT":return"hidden"!==t.type&&"file"!==t.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},n.Utils.triggerEvent=function(t,e){var i=void 0;i=/^mouse|click/.test(e)?"MouseEvents":/^key/.test(e)?"KeyboardEvent":"HTMLEvents";for(var n=document.createEvent(i),o=arguments.length,r=Array(o>2?o-2:0),s=2;s<o;s++)r[s-2]=arguments[s];return n.initEvent.apply(n,[e].concat(r)),t.dispatchEvent?t.dispatchEvent(n):t.fireEvent("on"+e,n),t},n.Utils.keys={tab:9,enter:13,space:32,left:37,up:38,right:39,down:40},e.default=n.Utils},8:function(t,e){t.exports=i("aW5l")},84:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i(85),r=(n=o)&&n.__esModule?n:{default:n};r.default.install=function(t){t.component(r.default.name,r.default)},e.default=r.default},85:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(86),o=i.n(n),r=i(0)(o.a,null,!1,null,null,null);e.default=r.exports},86:function(t,e,i){"use strict";e.__esModule=!0;var n=a(i(1)),o=a(i(8)),r=a(i(87)),s=i(2);function a(t){return t&&t.__esModule?t:{default:t}}e.default={name:"ElMenu",render:function(t){var e=t("ul",{attrs:{role:"menubar"},key:+this.collapse,style:{backgroundColor:this.backgroundColor||""},class:{"el-menu--horizontal":"horizontal"===this.mode,"el-menu--collapse":this.collapse,"el-menu":!0}},[this.$slots.default]);return this.collapseTransition?t("el-menu-collapse-transition",null,[e]):e},componentName:"ElMenu",mixins:[n.default,o.default],provide:function(){return{rootMenu:this}},components:{"el-menu-collapse-transition":{functional:!0,render:function(t,e){return t("transition",{props:{mode:"out-in"},on:{beforeEnter:function(t){t.style.opacity=.2},enter:function(t){(0,s.addClass)(t,"el-opacity-transition"),t.style.opacity=1},afterEnter:function(t){(0,s.removeClass)(t,"el-opacity-transition"),t.style.opacity=""},beforeLeave:function(t){t.dataset||(t.dataset={}),(0,s.hasClass)(t,"el-menu--collapse")?((0,s.removeClass)(t,"el-menu--collapse"),t.dataset.oldOverflow=t.style.overflow,t.dataset.scrollWidth=t.clientWidth,(0,s.addClass)(t,"el-menu--collapse")):((0,s.addClass)(t,"el-menu--collapse"),t.dataset.oldOverflow=t.style.overflow,t.dataset.scrollWidth=t.clientWidth,(0,s.removeClass)(t,"el-menu--collapse")),t.style.width=t.scrollWidth+"px",t.style.overflow="hidden"},leave:function(t){(0,s.addClass)(t,"horizontal-collapse-transition"),t.style.width=t.dataset.scrollWidth+"px"}}},e.children)}}},props:{mode:{type:String,default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:Array,uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,collapseTransition:{type:Boolean,default:!0}},data:function(){return{activeIndex:this.defaultActive,openedMenus:this.defaultOpeneds&&!this.collapse?this.defaultOpeneds.slice(0):[],items:{},submenus:{}}},computed:{hoverBackground:function(){return this.backgroundColor?this.mixColor(this.backgroundColor,.2):""},isMenuPopup:function(){return"horizontal"===this.mode||"vertical"===this.mode&&this.collapse}},watch:{defaultActive:"updateActiveIndex",defaultOpeneds:function(t){this.collapse||(this.openedMenus=t)},collapse:function(t){t&&(this.openedMenus=[]),this.broadcast("ElSubmenu","toggle-collapse",t)}},methods:{updateActiveIndex:function(t){var e=this.items[t]||this.items[this.activeIndex]||this.items[this.defaultActive];e?(this.activeIndex=e.index,this.initOpenedMenu()):this.activeIndex=null},getMigratingConfig:function(){return{props:{theme:"theme is removed."}}},getColorChannels:function(t){if(t=t.replace("#",""),/^[0-9a-fA-F]{3}$/.test(t)){t=t.split("");for(var e=2;e>=0;e--)t.splice(e,0,t[e]);t=t.join("")}return/^[0-9a-fA-F]{6}$/.test(t)?{red:parseInt(t.slice(0,2),16),green:parseInt(t.slice(2,4),16),blue:parseInt(t.slice(4,6),16)}:{red:255,green:255,blue:255}},mixColor:function(t,e){var i=this.getColorChannels(t),n=i.red,o=i.green,r=i.blue;return e>0?(n*=1-e,o*=1-e,r*=1-e):(n+=(255-n)*e,o+=(255-o)*e,r+=(255-r)*e),"rgb("+Math.round(n)+", "+Math.round(o)+", "+Math.round(r)+")"},addItem:function(t){this.$set(this.items,t.index,t)},removeItem:function(t){delete this.items[t.index]},addSubmenu:function(t){this.$set(this.submenus,t.index,t)},removeSubmenu:function(t){delete this.submenus[t.index]},openMenu:function(t,e){var i=this.openedMenus;-1===i.indexOf(t)&&(this.uniqueOpened&&(this.openedMenus=i.filter(function(t){return-1!==e.indexOf(t)})),this.openedMenus.push(t))},closeMenu:function(t){var e=this.openedMenus.indexOf(t);-1!==e&&this.openedMenus.splice(e,1)},handleSubmenuClick:function(t){var e=t.index,i=t.indexPath;-1!==this.openedMenus.indexOf(e)?(this.closeMenu(e),this.$emit("close",e,i)):(this.openMenu(e,i),this.$emit("open",e,i))},handleItemClick:function(t){var e=this,i=t.index,n=t.indexPath,o=this.activeIndex;this.activeIndex=t.index,this.$emit("select",i,n,t),("horizontal"===this.mode||this.collapse)&&(this.openedMenus=[]),this.router&&this.routeToItem(t,function(t){e.activeIndex=o,t&&console.error(t)})},initOpenedMenu:function(){var t=this,e=this.activeIndex,i=this.items[e];i&&"horizontal"!==this.mode&&!this.collapse&&i.indexPath.forEach(function(e){var i=t.submenus[e];i&&t.openMenu(e,i.indexPath)})},routeToItem:function(t,e){var i=t.route||t.index;try{this.$router.push(i,function(){},e)}catch(t){console.error(t)}},open:function(t){var e=this,i=this.submenus[t.toString()].indexPath;i.forEach(function(t){return e.openMenu(t,i)})},close:function(t){this.closeMenu(t)}},mounted:function(){this.initOpenedMenu(),this.$on("item-click",this.handleItemClick),this.$on("submenu-click",this.handleSubmenuClick),"horizontal"===this.mode&&new r.default(this.$el),this.$watch("items",this.updateActiveIndex)}}},87:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i(88),r=(n=o)&&n.__esModule?n:{default:n};var s=function(t){this.domNode=t,this.init()};s.prototype.init=function(){var t=this.domNode.childNodes;[].filter.call(t,function(t){return 1===t.nodeType}).forEach(function(t){new r.default(t)})},e.default=s},88:function(t,e,i){"use strict";e.__esModule=!0;var n=r(i(47)),o=r(i(89));function r(t){return t&&t.__esModule?t:{default:t}}var s=function(t){this.domNode=t,this.submenu=null,this.init()};s.prototype.init=function(){this.domNode.setAttribute("tabindex","0");var t=this.domNode.querySelector(".el-menu");t&&(this.submenu=new o.default(this,t)),this.addListeners()},s.prototype.addListeners=function(){var t=this,e=n.default.keys;this.domNode.addEventListener("keydown",function(i){var o=!1;switch(i.keyCode){case e.down:n.default.triggerEvent(i.currentTarget,"mouseenter"),t.submenu&&t.submenu.gotoSubIndex(0),o=!0;break;case e.up:n.default.triggerEvent(i.currentTarget,"mouseenter"),t.submenu&&t.submenu.gotoSubIndex(t.submenu.subMenuItems.length-1),o=!0;break;case e.tab:n.default.triggerEvent(i.currentTarget,"mouseleave");break;case e.enter:case e.space:o=!0,i.currentTarget.click()}o&&i.preventDefault()})},e.default=s},89:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i(47),r=(n=o)&&n.__esModule?n:{default:n};var s=function(t,e){this.domNode=e,this.parent=t,this.subMenuItems=[],this.subIndex=0,this.init()};s.prototype.init=function(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()},s.prototype.gotoSubIndex=function(t){t===this.subMenuItems.length?t=0:t<0&&(t=this.subMenuItems.length-1),this.subMenuItems[t].focus(),this.subIndex=t},s.prototype.addListeners=function(){var t=this,e=r.default.keys,i=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,function(n){n.addEventListener("keydown",function(n){var o=!1;switch(n.keyCode){case e.down:t.gotoSubIndex(t.subIndex+1),o=!0;break;case e.up:t.gotoSubIndex(t.subIndex-1),o=!0;break;case e.tab:r.default.triggerEvent(i,"mouseleave");break;case e.enter:case e.space:o=!0,n.currentTarget.click()}return o&&(n.preventDefault(),n.stopPropagation()),!1})})},e.default=s}})},Zcwg:function(t,e,i){"use strict";e.__esModule=!0;var n=i("2kvA");var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.prototype.beforeEnter=function(t){(0,n.addClass)(t,"collapse-transition"),t.dataset||(t.dataset={}),t.dataset.oldPaddingTop=t.style.paddingTop,t.dataset.oldPaddingBottom=t.style.paddingBottom,t.style.height="0",t.style.paddingTop=0,t.style.paddingBottom=0},t.prototype.enter=function(t){t.dataset.oldOverflow=t.style.overflow,0!==t.scrollHeight?(t.style.height=t.scrollHeight+"px",t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom):(t.style.height="",t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom),t.style.overflow="hidden"},t.prototype.afterEnter=function(t){(0,n.removeClass)(t,"collapse-transition"),t.style.height="",t.style.overflow=t.dataset.oldOverflow},t.prototype.beforeLeave=function(t){t.dataset||(t.dataset={}),t.dataset.oldPaddingTop=t.style.paddingTop,t.dataset.oldPaddingBottom=t.style.paddingBottom,t.dataset.oldOverflow=t.style.overflow,t.style.height=t.scrollHeight+"px",t.style.overflow="hidden"},t.prototype.leave=function(t){0!==t.scrollHeight&&((0,n.addClass)(t,"collapse-transition"),t.style.height=0,t.style.paddingTop=0,t.style.paddingBottom=0)},t.prototype.afterLeave=function(t){(0,n.removeClass)(t,"collapse-transition"),t.style.height="",t.style.overflow=t.dataset.oldOverflow,t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom},t}();e.default={name:"ElCollapseTransition",functional:!0,render:function(t,e){var i=e.children;return t("transition",{on:new o},i)}}},aMwW:function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=207)}({14:function(t,e){t.exports=i("ON3O")},2:function(t,e){t.exports=i("2kvA")},20:function(t,e){t.exports=i("fUqW")},207:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i(208),r=(n=o)&&n.__esModule?n:{default:n};r.default.install=function(t){t.component(r.default.name,r.default)},e.default=r.default},208:function(t,e,i){"use strict";e.__esModule=!0;var n=l(i(7)),o=l(i(14)),r=i(2),s=i(20),a=i(3),h=l(i(4));function l(t){return t&&t.__esModule?t:{default:t}}e.default={name:"ElTooltip",mixins:[n.default],props:{openDelay:{type:Number,default:0},disabled:Boolean,manual:Boolean,effect:{type:String,default:"dark"},arrowOffset:{type:Number,default:0},popperClass:String,content:String,visibleArrow:{default:!0},transition:{type:String,default:"el-fade-in-linear"},popperOptions:{default:function(){return{boundariesPadding:10,gpuAcceleration:!1}}},enterable:{type:Boolean,default:!0},hideAfter:{type:Number,default:0}},data:function(){return{timeoutPending:null,focusing:!1}},computed:{tooltipId:function(){return"el-tooltip-"+(0,a.generateId)()}},beforeCreate:function(){var t=this;this.$isServer||(this.popperVM=new h.default({data:{node:""},render:function(t){return this.node}}).$mount(),this.debounceClose=(0,o.default)(200,function(){return t.handleClosePopper()}))},render:function(t){var e=this;if(this.popperVM&&(this.popperVM.node=t("transition",{attrs:{name:this.transition},on:{afterLeave:this.doDestroy}},[t("div",{on:{mouseleave:function(){e.setExpectedState(!1),e.debounceClose()},mouseenter:function(){e.setExpectedState(!0)}},ref:"popper",attrs:{role:"tooltip",id:this.tooltipId,"aria-hidden":this.disabled||!this.showPopper?"true":"false"},directives:[{name:"show",value:!this.disabled&&this.showPopper}],class:["el-tooltip__popper","is-"+this.effect,this.popperClass]},[this.$slots.content||this.content])])),!this.$slots.default||!this.$slots.default.length)return this.$slots.default;var i=(0,s.getFirstComponentChild)(this.$slots.default);if(!i)return i;var n=i.data=i.data||{};return n.staticClass=this.concatClass(n.staticClass,"el-tooltip"),i},mounted:function(){var t=this;this.referenceElm=this.$el,1===this.$el.nodeType&&(this.$el.setAttribute("aria-describedby",this.tooltipId),this.$el.setAttribute("tabindex",0),(0,r.on)(this.referenceElm,"mouseenter",this.show),(0,r.on)(this.referenceElm,"mouseleave",this.hide),(0,r.on)(this.referenceElm,"focus",function(){if(t.$slots.default&&t.$slots.default.length){var e=t.$slots.default[0].componentInstance;e&&e.focus?e.focus():t.handleFocus()}else t.handleFocus()}),(0,r.on)(this.referenceElm,"blur",this.handleBlur),(0,r.on)(this.referenceElm,"click",this.removeFocusing))},watch:{focusing:function(t){t?(0,r.addClass)(this.referenceElm,"focusing"):(0,r.removeClass)(this.referenceElm,"focusing")}},methods:{show:function(){this.setExpectedState(!0),this.handleShowPopper()},hide:function(){this.setExpectedState(!1),this.debounceClose()},handleFocus:function(){this.focusing=!0,this.show()},handleBlur:function(){this.focusing=!1,this.hide()},removeFocusing:function(){this.focusing=!1},concatClass:function(t,e){return t&&t.indexOf(e)>-1?t:t?e?t+" "+e:t:e||""},handleShowPopper:function(){var t=this;this.expectedState&&!this.manual&&(clearTimeout(this.timeout),this.timeout=setTimeout(function(){t.showPopper=!0},this.openDelay),this.hideAfter>0&&(this.timeoutPending=setTimeout(function(){t.showPopper=!1},this.hideAfter)))},handleClosePopper:function(){this.enterable&&this.expectedState||this.manual||(clearTimeout(this.timeout),this.timeoutPending&&clearTimeout(this.timeoutPending),this.showPopper=!1,this.disabled&&this.doDestroy())},setExpectedState:function(t){!1===t&&clearTimeout(this.timeoutPending),this.expectedState=t}},destroyed:function(){var t=this.referenceElm;(0,r.off)(t,"mouseenter",this.show),(0,r.off)(t,"mouseleave",this.hide),(0,r.off)(t,"focus",this.handleFocus),(0,r.off)(t,"blur",this.handleBlur),(0,r.off)(t,"click",this.removeFocusing)}}},3:function(t,e){t.exports=i("ylDJ")},4:function(t,e){t.exports=i("7+uW")},7:function(t,e){t.exports=i("fKx3")}})},bwiK:function(t,e){},d5BH:function(t,e){},exT9:function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=90)}({0:function(t,e){t.exports=function(t,e,i,n,o,r){var s,a=t=t||{},h=typeof t.default;"object"!==h&&"function"!==h||(s=t,a=t.default);var l,u="function"==typeof a?a.options:a;if(e&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId=o),r?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},u._ssrRegister=l):n&&(l=n),l){var c=u.functional,p=c?u.render:u.beforeCreate;c?(u._injectStyles=l,u.render=function(t,e){return l.call(e),p(t,e)}):u.beforeCreate=p?[].concat(p,l):[l]}return{esModule:s,exports:a,options:u}}},1:function(t,e){t.exports=i("fPll")},21:function(t,e){t.exports=i("Zcwg")},34:function(t,e,i){"use strict";e.__esModule=!0,e.default={inject:["rootMenu"],computed:{indexPath:function(){for(var t=[this.index],e=this.$parent;"ElMenu"!==e.$options.componentName;)e.index&&t.unshift(e.index),e=e.$parent;return t},parentMenu:function(){for(var t=this.$parent;t&&-1===["ElMenu","ElSubmenu"].indexOf(t.$options.componentName);)t=t.$parent;return t},paddingStyle:function(){if("vertical"!==this.rootMenu.mode)return{};var t=20,e=this.$parent;if(this.rootMenu.collapse)t=20;else for(;e&&"ElMenu"!==e.$options.componentName;)"ElSubmenu"===e.$options.componentName&&(t+=20),e=e.$parent;return{paddingLeft:t+"px"}}}}},7:function(t,e){t.exports=i("fKx3")},90:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i(91),r=(n=o)&&n.__esModule?n:{default:n};r.default.install=function(t){t.component(r.default.name,r.default)},e.default=r.default},91:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(92),o=i.n(n),r=i(0)(o.a,null,!1,null,null,null);e.default=r.exports},92:function(t,e,i){"use strict";e.__esModule=!0;var n=a(i(21)),o=a(i(34)),r=a(i(1)),s=a(i(7));function a(t){return t&&t.__esModule?t:{default:t}}var h={props:{transformOrigin:{type:[Boolean,String],default:!1},offset:s.default.props.offset,boundariesPadding:s.default.props.boundariesPadding,popperOptions:s.default.props.popperOptions},data:s.default.data,methods:s.default.methods,beforeDestroy:s.default.beforeDestroy,deactivated:s.default.deactivated};e.default={name:"ElSubmenu",componentName:"ElSubmenu",mixins:[o.default,r.default,h],components:{ElCollapseTransition:n.default},props:{index:{type:String,required:!0},showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},popperClass:String,disabled:Boolean,popperAppendToBody:{type:Boolean,default:void 0}},data:function(){return{popperJS:null,timeout:null,items:{},submenus:{},mouseInChild:!1}},watch:{opened:function(t){var e=this;this.isMenuPopup&&this.$nextTick(function(t){e.updatePopper()})}},computed:{appendToBody:function(){return void 0===this.popperAppendToBody?this.isFirstLevel:this.popperAppendToBody},menuTransitionName:function(){return this.rootMenu.collapse?"el-zoom-in-left":"el-zoom-in-top"},opened:function(){return this.rootMenu.openedMenus.indexOf(this.index)>-1},active:function(){var t=!1,e=this.submenus,i=this.items;return Object.keys(i).forEach(function(e){i[e].active&&(t=!0)}),Object.keys(e).forEach(function(i){e[i].active&&(t=!0)}),t},hoverBackground:function(){return this.rootMenu.hoverBackground},backgroundColor:function(){return this.rootMenu.backgroundColor||""},activeTextColor:function(){return this.rootMenu.activeTextColor||""},textColor:function(){return this.rootMenu.textColor||""},mode:function(){return this.rootMenu.mode},isMenuPopup:function(){return this.rootMenu.isMenuPopup},titleStyle:function(){return"horizontal"!==this.mode?{color:this.textColor}:{borderBottomColor:this.active?this.rootMenu.activeTextColor?this.activeTextColor:"":"transparent",color:this.active?this.activeTextColor:this.textColor}},isFirstLevel:function(){for(var t=!0,e=this.$parent;e&&e!==this.rootMenu;){if(["ElSubmenu","ElMenuItemGroup"].indexOf(e.$options.componentName)>-1){t=!1;break}e=e.$parent}return t}},methods:{handleCollapseToggle:function(t){t?this.initPopper():this.doDestroy()},addItem:function(t){this.$set(this.items,t.index,t)},removeItem:function(t){delete this.items[t.index]},addSubmenu:function(t){this.$set(this.submenus,t.index,t)},removeSubmenu:function(t){delete this.submenus[t.index]},handleClick:function(){var t=this.rootMenu,e=this.disabled;"hover"===t.menuTrigger&&"horizontal"===t.mode||t.collapse&&"vertical"===t.mode||e||this.dispatch("ElMenu","submenu-click",this)},handleMouseenter:function(){var t=this,e=this.rootMenu,i=this.disabled;"click"===e.menuTrigger&&"horizontal"===e.mode||!e.collapse&&"vertical"===e.mode||i||(this.dispatch("ElSubmenu","mouse-enter-child"),clearTimeout(this.timeout),this.timeout=setTimeout(function(){t.rootMenu.openMenu(t.index,t.indexPath)},this.showTimeout))},handleMouseleave:function(){var t=this,e=this.rootMenu;"click"===e.menuTrigger&&"horizontal"===e.mode||!e.collapse&&"vertical"===e.mode||(this.dispatch("ElSubmenu","mouse-leave-child"),clearTimeout(this.timeout),this.timeout=setTimeout(function(){!t.mouseInChild&&t.rootMenu.closeMenu(t.index)},this.hideTimeout))},handleTitleMouseenter:function(){if("horizontal"!==this.mode||this.rootMenu.backgroundColor){var t=this.$refs["submenu-title"];t&&(t.style.backgroundColor=this.rootMenu.hoverBackground)}},handleTitleMouseleave:function(){if("horizontal"!==this.mode||this.rootMenu.backgroundColor){var t=this.$refs["submenu-title"];t&&(t.style.backgroundColor=this.rootMenu.backgroundColor||"")}},updatePlacement:function(){this.currentPlacement="horizontal"===this.mode&&this.isFirstLevel?"bottom-start":"right-start"},initPopper:function(){this.referenceElm=this.$el,this.popperElm=this.$refs.menu,this.updatePlacement()}},created:function(){var t=this;this.$on("toggle-collapse",this.handleCollapseToggle),this.$on("mouse-enter-child",function(){t.mouseInChild=!0,clearTimeout(t.timeout)}),this.$on("mouse-leave-child",function(){t.mouseInChild=!1,clearTimeout(t.timeout)})},mounted:function(){this.parentMenu.addSubmenu(this),this.rootMenu.addSubmenu(this),this.initPopper()},beforeDestroy:function(){this.parentMenu.removeSubmenu(this),this.rootMenu.removeSubmenu(this)},render:function(t){var e=this.active,i=this.opened,n=this.paddingStyle,o=this.titleStyle,r=this.backgroundColor,s=this.rootMenu,a=this.currentPlacement,h=this.menuTransitionName,l=this.mode,u=this.disabled,c=this.popperClass,p=this.$slots,d=this.isFirstLevel,f=t("transition",{attrs:{name:h}},[t("div",{ref:"menu",directives:[{name:"show",value:i}],class:["el-menu--"+l,c],on:{mouseenter:this.handleMouseenter,mouseleave:this.handleMouseleave,focus:this.handleMouseenter}},[t("ul",{attrs:{role:"menu"},class:["el-menu el-menu--popup","el-menu--popup-"+a],style:{backgroundColor:s.backgroundColor||""}},[p.default])])]),_=t("el-collapse-transition",null,[t("ul",{attrs:{role:"menu"},class:"el-menu el-menu--inline",directives:[{name:"show",value:i}],style:{backgroundColor:s.backgroundColor||""}},[p.default])]),g="horizontal"===s.mode&&d||"vertical"===s.mode&&!s.collapse?"el-icon-arrow-down":"el-icon-arrow-right";return t("li",{class:{"el-submenu":!0,"is-active":e,"is-opened":i,"is-disabled":u},attrs:{role:"menuitem","aria-haspopup":"true","aria-expanded":i},on:{mouseenter:this.handleMouseenter,mouseleave:this.handleMouseleave,focus:this.handleMouseenter}},[t("div",{class:"el-submenu__title",ref:"submenu-title",on:{click:this.handleClick,mouseenter:this.handleTitleMouseenter,mouseleave:this.handleTitleMouseleave},style:[n,o,{backgroundColor:r}]},[p.title,t("i",{class:["el-submenu__icon-arrow",g]},[])]),this.isMenuPopup?f:_])}}}})},fKx3:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i("7+uW"),r=(n=o)&&n.__esModule?n:{default:n},s=i("7J9s");var a=r.default.prototype.$isServer?function(){}:i("NMof"),h=function(t){return t.stopPropagation()};e.default={props:{transformOrigin:{type:[Boolean,String],default:!0},placement:{type:String,default:"bottom"},boundariesPadding:{type:Number,default:5},reference:{},popper:{},offset:{default:0},value:Boolean,visibleArrow:Boolean,arrowOffset:{type:Number,default:35},appendToBody:{type:Boolean,default:!0},popperOptions:{type:Object,default:function(){return{gpuAcceleration:!1}}}},data:function(){return{showPopper:!1,currentPlacement:""}},watch:{value:{immediate:!0,handler:function(t){this.showPopper=t,this.$emit("input",t)}},showPopper:function(t){this.disabled||(t?this.updatePopper():this.destroyPopper(),this.$emit("input",t))}},methods:{createPopper:function(){var t=this;if(!this.$isServer&&(this.currentPlacement=this.currentPlacement||this.placement,/^(top|bottom|left|right)(-start|-end)?$/g.test(this.currentPlacement))){var e=this.popperOptions,i=this.popperElm=this.popperElm||this.popper||this.$refs.popper,n=this.referenceElm=this.referenceElm||this.reference||this.$refs.reference;!n&&this.$slots.reference&&this.$slots.reference[0]&&(n=this.referenceElm=this.$slots.reference[0].elm),i&&n&&(this.visibleArrow&&this.appendArrow(i),this.appendToBody&&document.body.appendChild(this.popperElm),this.popperJS&&this.popperJS.destroy&&this.popperJS.destroy(),e.placement=this.currentPlacement,e.offset=this.offset,e.arrowOffset=this.arrowOffset,this.popperJS=new a(n,i,e),this.popperJS.onCreate(function(e){t.$emit("created",t),t.resetTransformOrigin(),t.$nextTick(t.updatePopper)}),"function"==typeof e.onUpdate&&this.popperJS.onUpdate(e.onUpdate),this.popperJS._popper.style.zIndex=s.PopupManager.nextZIndex(),this.popperElm.addEventListener("click",h))}},updatePopper:function(){var t=this.popperJS;t?(t.update(),t._popper&&(t._popper.style.zIndex=s.PopupManager.nextZIndex())):this.createPopper()},doDestroy:function(t){!this.popperJS||this.showPopper&&!t||(this.popperJS.destroy(),this.popperJS=null)},destroyPopper:function(){this.popperJS&&this.resetTransformOrigin()},resetTransformOrigin:function(){if(this.transformOrigin){var t=this.popperJS._popper.getAttribute("x-placement").split("-")[0],e={top:"bottom",bottom:"top",left:"right",right:"left"}[t];this.popperJS._popper.style.transformOrigin="string"==typeof this.transformOrigin?this.transformOrigin:["top","bottom"].indexOf(t)>-1?"center "+e:e+" center"}},appendArrow:function(t){var e=void 0;if(!this.appended){for(var i in this.appended=!0,t.attributes)if(/^_v-/.test(t.attributes[i].name)){e=t.attributes[i].name;break}var n=document.createElement("div");e&&n.setAttribute(e,""),n.setAttribute("x-arrow",""),n.className="popper__arrow",t.appendChild(n)}}},beforeDestroy:function(){this.doDestroy(!0),this.popperElm&&this.popperElm.parentNode===document.body&&(this.popperElm.removeEventListener("click",h),document.body.removeChild(this.popperElm))},deactivated:function(){this.$options.beforeDestroy[0].call(this)}}},fUqW:function(t,e,i){"use strict";e.__esModule=!0;var n="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};e.isVNode=function(t){return null!==t&&"object"===(void 0===t?"undefined":n(t))&&(0,o.hasOwn)(t,"componentOptions")},e.getFirstComponentChild=function(t){return t&&t.filter(function(t){return t&&t.tag})[0]};var o=i("ylDJ")},jKJX:function(t,e){},oju6:function(t,e,i){t.exports=i.p+"static/img/visitor_device.7b16bc2.png"},orbS:function(t,e){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=244)}({0:function(t,e){t.exports=function(t,e,i,n,o,r){var s,a=t=t||{},h=typeof t.default;"object"!==h&&"function"!==h||(s=t,a=t.default);var l,u="function"==typeof a?a.options:a;if(e&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId=o),r?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},u._ssrRegister=l):n&&(l=n),l){var c=u.functional,p=c?u.render:u.beforeCreate;c?(u._injectStyles=l,u.render=function(t,e){return l.call(e),p(t,e)}):u.beforeCreate=p?[].concat(p,l):[l]}return{esModule:s,exports:a,options:u}}},244:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i(245),r=(n=o)&&n.__esModule?n:{default:n};r.default.install=function(t){t.component(r.default.name,r.default)},e.default=r.default},245:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(246),o=i.n(n),r=i(247),s=i(0)(o.a,r.a,!1,null,null,null);e.default=s.exports},246:function(t,e,i){"use strict";e.__esModule=!0,e.default={name:"ElTag",props:{text:String,closable:Boolean,type:String,hit:Boolean,disableTransitions:Boolean,color:String,size:String},methods:{handleClose:function(t){this.$emit("close",t)}},computed:{tagSize:function(){return this.size||(this.$ELEMENT||{}).size}}}},247:function(t,e,i){"use strict";var n={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:t.disableTransitions?"":"el-zoom-in-center"}},[i("span",{staticClass:"el-tag",class:[t.type?"el-tag--"+t.type:"",t.tagSize&&"el-tag--"+t.tagSize,{"is-hit":t.hit}],style:{backgroundColor:t.color}},[t._t("default"),t.closable?i("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(e){e.stopPropagation(),t.handleClose(e)}}}):t._e()],2)])},staticRenderFns:[]};e.a=n}})},uY1a:function(t,e){t.exports=function(t,e,i,n){var o,r=0;return"boolean"!=typeof e&&(n=i,i=e,e=void 0),function(){var s=this,a=Number(new Date)-r,h=arguments;function l(){r=Number(new Date),i.apply(s,h)}n&&!o&&l(),o&&clearTimeout(o),void 0===n&&a>t?l():!0!==e&&(o=setTimeout(n?function(){o=void 0}:l,void 0===n?t-a:t))}}},ush1:function(t,e){},wJKS:function(t,e){},ylDJ:function(t,e,i){"use strict";e.__esModule=!0,e.noop=function(){},e.hasOwn=function(t,e){return n.call(t,e)},e.toObject=function(t){for(var e={},i=0;i<t.length;i++)t[i]&&o(e,t[i]);return e},e.getPropByPath=function(t,e,i){for(var n=t,o=(e=(e=e.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),r=0,s=o.length;r<s-1&&(n||i);++r){var a=o[r];if(!(a in n)){if(i)throw new Error("please transfer a valid prop path to form item!");break}n=n[a]}return{o:n,k:o[r],v:n?n[o[r]]:null}};var n=Object.prototype.hasOwnProperty;function o(t,e){for(var i in e)t[i]=e[i];return t}e.getValueByPath=function(t,e){for(var i=(e=e||"").split("."),n=t,o=null,r=0,s=i.length;r<s;r++){var a=i[r];if(!n)break;if(r===s-1){o=n[a];break}n=n[a]}return o};e.generateId=function(){return Math.floor(1e4*Math.random())},e.valueEquals=function(t,e){if(t===e)return!0;if(!(t instanceof Array))return!1;if(!(e instanceof Array))return!1;if(t.length!==e.length)return!1;for(var i=0;i!==t.length;++i)if(t[i]!==e[i])return!1;return!0},e.escapeRegexpString=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return String(t).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")}}});
|