meshcentral
Version:
Web based remote computer management server
1 lines • 489 kB
JavaScript
!function(t,e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define([],e):t.ol=e()}(this,function(){var r={},n=this;function t(t,e){var o,i=r;t=t.split("."),i=i||n,t[0]in i||!i.execScript||i.execScript("var "+t[0]);for(;t.length&&(o=t.shift());)t.length||void 0===e?i=i[o]&&i[o]!==Object.prototype[o]?i[o]:i[o]={}:i[o]=e}function D(t,e){return e<t?1:t<e?-1:0}function d(t,e){return 0<=t.indexOf(e)}function v(t,e,o){var i=t.length;if(t[0]<=e)return 0;if(!(e<=t[i-1]))if(0<o){for(o=1;o<i;++o)if(t[o]<e)return o-1}else if(o<0){for(o=1;o<i;++o)if(t[o]<=e)return o}else for(o=1;o<i;++o){if(t[o]==e)return o;if(t[o]<e)return t[o-1]-e<e-t[o]?o-1:o}return i-1}function c(t,e){var o=Array.isArray(e)?e:[e],i=o.length;for(e=0;e<i;e++)t[t.length]=o[e]}function s(t,e){-1<(e=t.indexOf(e))&&t.splice(e,1)}function b(t,e){for(var o,i=t.length>>>0,r=0;r<i;r++)if(e(o=t[r],r,t))return o;return null}function U(t,e){var o=t.length;if(o===e.length){for(var i=0;i<o;i++)if(t[i]!==e[i])return;return 1}}function h(t){for(var o=us,e=t.length,i=Array(t.length),r=0;r<e;r++)i[r]={index:r,value:t[r]};for(i.sort(function(t,e){return o(t.value,e.value)||t.index-e.index}),r=0;r<t.length;r++)t[r]=i[r].value}function m(o,i){var r;return o.every(function(t,e){return!i(t,r=e,o)})?-1:r}function e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t}function w(){}function G(t){return t.Vo||(t.Vo=++o)}var o=0;function a(t){this.message="Assertion failed. See https://openlayers.org/en/v4.2.0/doc/errors/#"+t+" for details.",this.code=t,this.name="AssertionError"}function O(t,e){if(!t)throw new a(e)}function B(t,e,o,i){this.ca=t,this.$=e,this.da=o,this.ia=i}function p(t,e,o){return t.ca<=e&&e<=t.$&&t.da<=o&&o<=t.ia}function C(t,e){return t.ca<=e.$&&t.$>=e.ca&&t.da<=e.ia&&t.ia>=e.da}function x(t,e,o){return Math.min(Math.max(t,e),o)}e(a,Error);var i="cosh"in Math?Math.cosh:function(t){return((t=Math.exp(t))+1/t)/2};function S(t,e,o,i,r,n){var s,a=r-o,p=n-i;return(a||p)&&(1<(s=((t-o)*a+(e-i)*p)/(a*a+p*p))?(o=r,i=n):0<s&&(o+=a*s,i+=p*s)),y(t,e,o,i)}function y(t,e,o,i){return(t=o-t)*t+(e=i-e)*e}function M(t){return t*Math.PI/180}function L(t,e){return(t%=e)*e<0?t+e:t}function f(t,e,o){return t+o*(e-t)}function l(t,e,o){return(o=void 0===o?[0,0]:o)[0]=t[0]+2*e,o[1]=t[1]+2*e,o}function u(t,e,o){return(o=void 0===o?[0,0]:o)[0]=t[0]*e+.5|0,o[1]=t[1]*e+.5|0,o}function X(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:e[0]=e[1]=t,e)}function P(t){for(var e=V(),o=0,i=t.length;o<i;++o)z(e,t[o]);return e}function A(t,e,o){return o?(o[0]=t[0]-e,o[1]=t[1]-e,o[2]=t[2]+e,o[3]=t[3]+e,o):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function g(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function E(t,e,o){return(e=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*e+(t=o<t[1]?t[1]-o:t[3]<o?o-t[3]:0)*t}function T(t,e){return j(t,e[0],e[1])}function N(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function j(t,e,o){return t[0]<=e&&e<=t[2]&&t[1]<=o&&o<=t[3]}function R(t,e){var o=t[1],i=t[2],r=t[3],n=e[0];e=e[1];var s=0;return n<t[0]?s|=16:i<n&&(s|=4),e<o?s|=8:r<e&&(s|=2),s=s||1}function V(){return[1/0,1/0,-1/0,-1/0]}function F(t,e,o,i,r){return r?(r[0]=t,r[1]=e,r[2]=o,r[3]=i,r):[t,e,o,i]}function I(t){return F(1/0,1/0,-1/0,-1/0,t)}function k(t,e){var o=t[0];return F(o,t=t[1],o,t,e)}function W(t,e,o,i,r){return Y(r=I(r),t,e,o,i)}function Z(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function K(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 z(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 Y(t,e,o,i,r){for(;o<i;o+=r){var n=t,s=e[o],a=e[o+1];n[0]=Math.min(n[0],s),n[1]=Math.min(n[1],a),n[2]=Math.max(n[2],s),n[3]=Math.max(n[3],a)}return t}function H(t,e,o){var i;return((i=e.call(o,J(t)))||(i=e.call(o,_(t)))||(i=e.call(o,it(t)))||!!(i=e.call(o,ot(t))))&&i}function q(t){var e=0;return e=!st(t)?rt(t)*tt(t):e}function J(t){return[t[0],t[1]]}function _(t){return[t[2],t[1]]}function $(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function Q(t,e,o,i,r){var n=e*i[0]/2;i=e*i[1]/2,e=Math.cos(o);var s=Math.sin(o);o=n*e,n*=s,e*=i;var a=i*s,p=t[0],h=t[1];t=p-o+a,i=p-o-a,s=p+o-a,o=p+o+a;var a=h-n-e,p=h-n+e,l=h+n+e,n=h+n-e;return F(Math.min(t,i,s,o),Math.min(a,p,l,n),Math.max(t,i,s,o),Math.max(a,p,l,n),r)}function tt(t){return t[3]-t[1]}function et(t,e,o){return o=o||V(),nt(t,e)&&(o[0]=(t[0]>e[0]?t:e)[0],o[1]=(t[1]>e[1]?t:e)[1],o[2]=(t[2]<e[2]?t:e)[2],o[3]=(t[3]<e[3]?t:e)[3]),o}function ot(t){return[t[0],t[3]]}function it(t){return[t[2],t[3]]}function rt(t){return t[2]-t[0]}function nt(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function st(t){return t[2]<t[0]||t[3]<t[1]}function at(t,e){var o=(t[2]-t[0])/2*(e-1);e=(t[3]-t[1])/2*(e-1),t[0]-=o,t[2]+=o,t[1]-=e,t[3]+=e}function pt(t,e,o){e(t=[t[0],t[1],t[0],t[3],t[2],t[1],t[2],t[3]],t,2);var i=[t[0],t[2],t[4],t[6]],r=[t[1],t[3],t[5],t[7]];return F(e=Math.min.apply(null,i),t=Math.min.apply(null,r),Math.max.apply(null,i),Math.max.apply(null,r),o)}var ht="function"==typeof Object.assign?Object.assign:function(t,e){if(!t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(t),i=1,r=arguments.length;i<r;++i){var n=arguments[i];if(null!=n)for(var s in n)n.hasOwnProperty(s)&&(o[s]=n[s])}return o};function lt(t){for(var e in t)delete t[e]}function ut(t){var e,o=[];for(e in t)o.push(t[e]);return o}function ct(t){for(var e in t)return!1;return!e}function ft(t){this.radius=t}ft.prototype.a=function(t){for(var e=0,o=t.length,i=t[o-1][0],r=t[o-1][1],n=0;n<o;n++)var s=t[n][0],a=t[n][1],e=e+M(s-i)*(2+Math.sin(M(r))+Math.sin(M(a))),i=s,r=a;return e*this.radius*this.radius/2},ft.prototype.b=function(t,e){var o=M(t[1]),i=M(e[1]),r=(i-o)/2;return t=M(e[0]-t[0])/2,o=Math.sin(r)*Math.sin(r)+Math.sin(t)*Math.sin(t)*Math.cos(o)*Math.cos(i),2*this.radius*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))},ft.prototype.offset=function(t,e,o){var i=M(t[1]);e/=this.radius;var r=Math.asin(Math.sin(i)*Math.cos(e)+Math.cos(i)*Math.sin(e)*Math.cos(o));return[180*(M(t[0])+Math.atan2(Math.sin(o)*Math.sin(e)*Math.cos(i),Math.cos(e)-Math.sin(i)*Math.sin(r)))/Math.PI,180*r/Math.PI]};var yt=new ft(6370997),gt={};gt.degrees=2*Math.PI*yt.radius/360,gt.ft=.3048,gt.m=1,gt["us-ft"]=1200/3937;var dt=null;function vt(t){this.mb=t.code,this.a=t.units,this.f=void 0!==t.extent?t.extent:null,this.g=void 0!==t.worldExtent?t.worldExtent:null,this.b=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.c=void 0!==t.global&&t.global,this.i=!(!this.c||!this.f),this.o=t.getPointResolution,this.j=null,this.l=t.metersPerUnit;var e=t.code,o=dt||window.proj4;"function"!=typeof o||void 0!==(e=o.defs(e))&&(void 0!==e.axis&&void 0===t.axisOrientation&&(this.b=e.axis),void 0===t.metersPerUnit&&(this.l=e.to_meter),void 0===t.units&&(this.a=e.units))}function bt(t){vt.call(this,{code:t,units:"m",extent:wt,global:!0,worldExtent:xt,getPointResolution:function(t,e){return t/i(e[1]/6378137)}})}(Au=vt.prototype).Jk=function(){return this.mb},Au.G=function(){return this.f},Au.Un=function(){return this.a},Au.sc=function(){return this.l||gt[this.a]},Au.tl=function(){return this.g},Au.dm=function(){return this.c},Au.$p=function(t){this.c=t,this.i=!(!t||!this.f)},Au.Vn=function(t){this.f=t,this.i=!(!this.c||!t)},Au.kq=function(t){this.g=t},Au.Zp=function(t){this.o=t},e(bt,vt);var mt=6378137*Math.PI,wt=[-mt,-mt,mt,mt],xt=[-180,-85,180,85],St="EPSG:3857 EPSG:102100 EPSG:102113 EPSG:900913 urn:ogc:def:crs:EPSG:6.18:3:3857 urn:ogc:def:crs:EPSG::3857 http://www.opengis.net/gml/srs/epsg.xml#3857".split(" ").map(function(t){return new bt(t)});function Mt(t,e,o){var i=t.length;o=1<o?o:2,void 0===e&&(e=2<o?t.slice():Array(i));for(var r=0;r<i;r+=o){e[r]=mt*t[r]/180;var n=6378137*Math.log(Math.tan(Math.PI*(t[r+1]+90)/360));mt<n?n=mt:n<-mt&&(n=-mt),e[r+1]=n}return e}function Pt(t,e,o){var i=t.length;o=1<o?o:2,void 0===e&&(e=2<o?t.slice():Array(i));for(var r=0;r<i;r+=o)e[r]=180*t[r]/mt,e[r+1]=360*Math.atan(Math.exp(t[r+1]/6378137))/Math.PI-90;return e}var At=new ft(6378137);function Et(t,e){vt.call(this,{code:t,units:"degrees",extent:Tt,axisOrientation:e,global:!0,metersPerUnit:jt,worldExtent:Tt})}e(Et,vt);var Tt=[-180,-90,180,90],jt=Math.PI*At.radius/180,Ct=[new Et("CRS:84"),new Et("EPSG:4326","neu"),new Et("urn:ogc:def:crs:EPSG::4326","neu"),new Et("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new Et("urn:ogc:def:crs:OGC:1.3:CRS84"),new Et("urn:ogc:def:crs:OGC:2:84"),new Et("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Et("urn:x-ogc:def:crs:EPSG:4326","neu")],Lt={},Rt={};function It(t,e,o){t=t.mb,e=e.mb,t in Rt||(Rt[t]={}),Rt[t][e]=o}function Nt(t,e){var o;return o=t in Rt&&e in Rt[t]?Rt[t][e]:o}function Ft(t,e,o){var i=(t=Bt(t)).o;return i?e=i(e,o):"degrees"!=t.a&&(e=(i=Wt(t,Bt("EPSG:4326")))(e=[o[0]-e/2,o[1],o[0]+e/2,o[1],o[0],o[1]-e/2,o[0],o[1]+e/2],e,2),e=(yt.b(e.slice(0,2),e.slice(2,4))+yt.b(e.slice(4,6),e.slice(6,8)))/2,void 0!==(t=t.sc())&&(e/=t)),e}function kt(t){t.forEach(Dt),t.forEach(function(e){t.forEach(function(t){e!==t&&It(e,t,Kt)})})}function Dt(t){It(Lt[t.mb]=t,t,Kt)}function Ot(t){return t?"string"==typeof t?Bt(t):t:Bt("EPSG:3857")}function Ut(t,e,o,i){It(t=Bt(t),e=Bt(e),Gt(o)),It(e,t,Gt(i))}function Gt(s){return function(t,e,o){var i,r=t.length;for(o=void 0!==o?o:2,e=void 0!==e?e:Array(r),i=0;i<r;i+=o){var n=s([t[i],t[i+1]]);for(e[i]=n[0],e[i+1]=n[1],n=o-1;2<=n;--n)e[i+n]=t[i+n]}return e}}function Bt(t){var e,o=null;return t instanceof vt?o=t:"string"==typeof t&&(o=Lt[t]||null,e=dt||window.proj4,o||"function"!=typeof e||void 0===e.defs(t)||Dt(o=new vt({code:t}))),o}function Xt(t,e){if(t===e)return!0;var o=t.a===e.a;return(t.mb===e.mb||Wt(t,e)===Kt)&&o}function Vt(t,e){return Wt(t=Bt(t),e=Bt(e))}function Wt(t,e){var o,i,r,n=t.mb,s=e.mb,a=Nt(n,s);return a||"function"==typeof(o=dt||window.proj4)&&(i=o.defs(n),r=o.defs(s),void 0!==i&&void 0!==r&&(i===r?kt([e,t]):Ut(e,t,(a=o(s,n)).forward,a.inverse),a=Nt(n,s))),a=a||Zt}function Zt(t,e){if(void 0!==e&&t!==e){for(var o=0,i=t.length;o<i;++o)e[o]=t[o];t=e}return t}function Kt(t,e){if(void 0!==e){for(var o=0,i=t.length;o<i;++o)e[o]=t[o];t=e}else t=t.slice();return t}function zt(t,e,o){return Vt(e,o)(t,void 0,t.length)}function Yt(t,e,o){return pt(t,e=Vt(e,o))}function Ht(){kt(St),kt(Ct),Ct.forEach(function(e){St.forEach(function(t){It(e,t,Mt),It(t,e,Pt)})})}function qt(t,e,o,i){return void 0!==i?(i[0]=t,i[1]=e,i[2]=o,i):[t,e,o]}function Jt(t){var o,i;this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.b=t.resolutions,O((o=this.b,i=function(t,e){return e-t}||D,o.every(function(t,e){return!e||!(0<(t=i(o[e-1],t))||0===t)})),17),this.maxZoom=this.b.length-1,this.i=void 0!==t.origin?t.origin:null,this.c=null,void 0!==t.origins&&(this.c=t.origins,O(this.c.length==this.b.length,20));var e=t.extent;void 0===e||this.i||this.c||(this.i=ot(e)),O(!this.i&&this.c||this.i&&!this.c,18),this.f=null,void 0!==t.tileSizes&&(this.f=t.tileSizes,O(this.f.length==this.b.length,19)),this.g=void 0!==t.tileSize?t.tileSize:this.f?null:256,O(!this.g&&this.f||this.g&&!this.f,22),this.v=void 0!==e?e:null,this.a=null,this.j=[0,0],void 0!==t.sizes?this.a=t.sizes.map(function(t){return new B(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1))},this):e&&function(t,e){for(var o=t.b.length,i=Array(o),r=t.minZoom;r<o;++r)i[r]=ee(t,e,r);t.a=i}(this,e)}Ht();var _t=[0,0,0];function $t(t,e,o,i,r){for(r=t.Aa(e,r),e=e[0]-1;e>=t.minZoom;){if(o.call(null,e,ee(t,r,e,i)))return!0;--e}return!1}function Qt(t,e,o,i){return e[0]<t.maxZoom?(i=t.Aa(e,i),ee(t,i,e[0]+1,o)):null}function te(t,e,o,i){ie(t,e[0],e[1],o,!1,_t);var r=_t[1],n=_t[2];return ie(t,e[2],e[3],o,!0,_t),t=_t[1],e=_t[2],void 0!==i?(i.ca=r,i.$=t,i.da=n,i.ia=e):i=new B(r,t,n,e),i}function ee(t,e,o,i){return te(t,e,t.Da(o),i)}function oe(t,e){var o=t.Pc(e[0]),i=t.Da(e[0]);return t=X(t.gb(e[0]),t.j),[o[0]+(e[1]+.5)*t[0]*i,o[1]+(e[2]+.5)*t[1]*i]}function ie(t,e,o,i,r,n){var s=t.tc(i),a=i/t.Da(s),p=t.Pc(s);return t=X(t.gb(s),t.j),e=a*Math.floor((e-p[0])/i+(r?.5:0))/t[0],o=a*Math.floor((o-p[1])/i+(r?0:.5))/t[1],o=r?(e=Math.ceil(e)-1,Math.ceil(o)-1):(e=Math.floor(e),Math.floor(o)),qt(s,e,o,n)}function re(t){var e=t.j;return e||(e=ae(t),t.j=e),e}function ne(t){var e={};return ht(e,t||{}),void 0===e.extent&&(e.extent=Bt("EPSG:3857").G()),e.resolutions=se(e.extent,e.maxZoom,e.tileSize),delete e.maxZoom,new Jt(e)}function se(t,e,o){e=void 0!==e?e:42;var i=tt(t);for(t=rt(t),o=X(void 0!==o?o:256),o=Math.max(t/o[0],i/o[1]),e+=1,i=Array(e),t=0;t<e;++t)i[t]=o/Math.pow(2,t);return i}function ae(t,e,o){return e=se(t=pe(t),e,o),new Jt({extent:t,origin:ot(t),resolutions:e,tileSize:o})}function pe(t){var e=(t=Bt(t)).G();return e=!e?F(-(t=180*gt.degrees/t.sc()),-t,t,t):e}function he(t){this.b=t.html,this.a=t.tileRanges||null}function le(t){return t}function ue(i){return i.mh=function(t){var e=i.listener,o=i.lh||i.target;return i.nh&&me(i),e.call(o,t)}}function ce(t,e,o,i){for(var r,n=0,s=t.length;n<s;++n)if((r=t[n]).listener===e&&r.lh===o)return i&&(r.deleteIndex=n),r}function fe(t,e){return(t=t.fb)?t[e]:void 0}function ye(t){return t.fb||(t.fb={})}function ge(t,e){var o=fe(t,e);if(o){for(var i=0,r=o.length;i<r;++i)t.removeEventListener(e,o[i].mh),lt(o[i]);o.length=0,(o=t.fb)&&(delete o[e],Object.keys(o).length||delete t.fb)}}function de(t,e,o,i,r){var n=ye(t),s=n[e];return(n=ce(s=s||(n[e]=[]),o,i,!1))?r||(n.nh=!1):(n={lh:i,nh:!!r,listener:o,target:t,type:e},t.addEventListener(e,ue(n)),s.push(n)),n}function ve(t,e,o,i){return de(t,e,o,i,!0)}function be(t,e,o,i){(t=fe(t,e))&&(o=ce(t,o,i,!0))&&me(o)}function me(t){var e,o;t&&t.target&&(t.target.removeEventListener(t.type,t.mh),(e=fe(t.target,t.type))&&(-1!==(o="deleteIndex"in t?t.deleteIndex:e.indexOf(t))&&e.splice(o,1),e.length||ge(t.target,t.type)),lt(t))}function we(t){for(var e in ye(t))ge(t,e)}function xe(){}function Se(t){t.Jb||(t.Jb=!0,t.ka())}function Me(t){this.type=t,this.target=null}function Pe(t){t.stopPropagation()}function Ae(){this.Ua={},this.ra={},this.oa={}}function Ee(t,e){return e?e in t.oa:0<Object.keys(t.oa).length}function Te(){Ae.call(this),this.i=0}function je(t){Te.call(this),G(this),this.S={},void 0!==t&&this.H(t)}(Au=Jt.prototype).Rf=function(t,e,o){for(var i=(t=ee(this,t,e)).ca,r=t.$;i<=r;++i)for(var n=t.da,s=t.ia;n<=s;++n)o([e,i,n])},Au.G=function(){return this.v},Au.Ti=function(){return this.maxZoom},Au.Ui=function(){return this.minZoom},Au.Pc=function(t){return this.i||this.c[t]},Au.Da=function(t){return this.b[t]},Au.Vi=function(){return this.b},Au.Aa=function(t,e){var o=this.Pc(t[0]),i=this.Da(t[0]),r=X(this.gb(t[0]),this.j),n=o[0]+t[1]*r[0]*i;return F(n,t=o[1]+t[2]*r[1]*i,n+r[0]*i,t+r[1]*i,e)},Au.Be=function(t,e,o){return ie(this,t[0],t[1],e,!1,o)},Au.bg=function(t,e,o){return ie(this,t[0],t[1],this.Da(e),!1,o)},Au.gb=function(t){return this.g||this.f[t]},Au.tc=function(t,e){return x(v(this.b,t,e||0),this.minZoom,this.maxZoom)},xe.prototype.Jb=!(he.prototype.i=function(){return this.b}),xe.prototype.ka=w,Me.prototype.preventDefault=Me.prototype.stopPropagation=function(){this.qp=!0},e(Ae,xe),Ae.prototype.addEventListener=function(t,e){var o=this.oa[t];-1===(o=o||(this.oa[t]=[])).indexOf(e)&&o.push(e)},Ae.prototype.b=function(t){var e="string"==typeof t?new Me(t):t;t=e.type;var o=(e.target=this).oa[t];if(o){t in this.ra||(this.ra[t]=0,this.Ua[t]=0),++this.ra[t];for(var i=0,r=o.length;i<r;++i)if(!1===o[i].call(this,e)||e.qp){var n=!1;break}if(--this.ra[t],!this.ra[t]){for(e=this.Ua[t],delete this.Ua[t];e--;)this.removeEventListener(t,w);delete this.ra[t]}return n}},Ae.prototype.ka=function(){we(this)},Ae.prototype.removeEventListener=function(t,e){var o=this.oa[t];o&&(e=o.indexOf(e),t in this.Ua?(o[e]=w,++this.Ua[t]):(o.splice(e,1),o.length||delete this.oa[t]))},e(Te,Ae),(Au=Te.prototype).s=function(){++this.i,this.b("change")},Au.L=function(){return this.i},Au.J=function(t,e,o){if(Array.isArray(t)){for(var i=t.length,r=Array(i),n=0;n<i;++n)r[n]=de(this,t[n],e,o);return r}return de(this,t,e,o)},Au.once=function(t,e,o){if(Array.isArray(t)){for(var i=t.length,r=Array(i),n=0;n<i;++n)r[n]=ve(this,t[n],e,o);return r}return ve(this,t,e,o)},Au.K=function(t,e,o){if(Array.isArray(t))for(var i=0,r=t.length;i<r;++i)be(this,t[i],e,o);else be(this,t,e,o)},e(je,Te);var Ce={};function Le(t){return Ce.hasOwnProperty(t)?Ce[t]:Ce[t]="change:"+t}function Re(t,e,o){var i=Le(e);t.b(new Ie(i,e,o)),t.b(new Ie("propertychange",e,o))}function Ie(t,e,o){Me.call(this,t),this.key=e,this.oldValue=o}function Ne(t,e){if(je.call(this),this.c=!!(e||{}).unique,this.a=t||[],this.c)for(t=0,e=this.a.length;t<e;++t)ke(this,this.a[t],t);Fe(this)}function Fe(t){t.set(De,t.a.length)}function ke(t,e,o){for(var i=0,r=t.a.length;i<r;++i)if(t.a[i]===e&&i!==o)throw new a(58)}(Au=je.prototype).get=function(t){var e;return e=this.S.hasOwnProperty(t)?this.S[t]:e},Au.O=function(){return Object.keys(this.S)},Au.N=function(){return ht({},this.S)},Au.set=function(t,e,o){o?this.S[t]=e:(o=this.S[t])!==(this.S[t]=e)&&Re(this,t,o)},Au.H=function(t,e){for(var o in t)this.set(o,t[o],e)},Au.P=function(t,e){var o;t in this.S&&(o=this.S[t],delete this.S[t],e||Re(this,t,o))},e(Ie,Me),e(Ne,je),(Au=Ne.prototype).clear=function(){for(;0<this.dc();)this.pop()},Au.fg=function(t){for(var e=0,o=t.length;e<o;++e)this.push(t[e]);return this},Au.forEach=function(t,e){this.a.forEach(t,e)},Au.tm=function(){return this.a},Au.item=function(t){return this.a[t]},Au.dc=function(){return this.get(De)},Au.He=function(t,e){this.c&&ke(this,e),this.a.splice(t,0,e),Fe(this),this.b(new Oe("add",e))},Au.pop=function(){return this.Hg(this.dc()-1)},Au.push=function(t){this.c&&ke(this,t);var e=this.dc();return this.He(e,t),this.dc()},Au.remove=function(t){for(var e=this.a,o=0,i=e.length;o<i;++o)if(e[o]===t)return this.Hg(o)},Au.Hg=function(t){var e=this.a[t];return this.a.splice(t,1),Fe(this),this.b(new Oe("remove",e)),e},Au.Wp=function(t,e){var o=this.dc();if(t<o)this.c&&ke(this,e,t),o=this.a[t],this.a[t]=e,this.b(new Oe("remove",o)),this.b(new Oe("add",e));else{for(;o<t;++o)this.He(o,void 0);this.He(t,e)}};var De="length";function Oe(t,e){Me.call(this,t),this.element=e}e(Oe,Me);var Ue=/^#(?:[0-9a-f]{3}){1,2}$/i,Ge=/^([a-z]*)$/i;function Be(t){return Array.isArray(t)?t:Ze(t)}function Xe(t){var e;return t="string"!=typeof t?"rgba("+(e=(e=t[0])!=(0|e)?e+.5|0:e)+","+(e=(e=t[1])!=(0|e)?e+.5|0:e)+","+(e=(e=t[2])!=(0|e)?e+.5|0:e)+","+(void 0===t[3]?1:t[3])+")":t}var Ve,We,Ze=(Ve={},We=0,function(t){if(Ve.hasOwnProperty(t))var e=Ve[t];else{if(1024<=We)for(var o in e=0,Ve)3&e++||(delete Ve[o],--We);var i,r;e=t,Ge.exec(e)&&((o=document.createElement("div")).style.color=e,document.body.appendChild(o),e=getComputedStyle(o).color,document.body.removeChild(o)),Ue.exec(e)?(O(3==(r=e.length-1)||6==r,54),i=3==r?1:2,r=parseInt(e.substr(1+0*i,i),16),o=parseInt(e.substr(1+i,i),16),e=parseInt(e.substr(1+2*i,i),16),1==i&&(r=(r<<4)+r,o=(o<<4)+o,e=(e<<4)+e),r=[r,o,e,1]):e.indexOf("rgba(")?e.indexOf("rgb(")?O(!1,14):((e=e.slice(4,-1).split(",").map(Number)).push(1),r=Ke(e)):r=Ke(e=e.slice(5,-1).split(",").map(Number)),e=r,Ve[t]=e,++We}return e});function Ke(t){var e=[];return e[0]=x(t[0]+.5|0,0,255),e[1]=x(t[1]+.5|0,0,255),e[2]=x(t[2]+.5|0,0,255),e[3]=x(t[3],0,1),e}function ze(t){return"string"==typeof t||t instanceof CanvasPattern||t instanceof CanvasGradient?t:Xe(t)}function Ye(t,e){var o=document.createElement("CANVAS");return t&&(o.width=t),e&&(o.height=e),o.getContext("2d")}function He(t,e){var o=e.parentNode;o&&o.replaceChild(t,e)}function qe(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Je(t){je.call(this),this.element=t.element||null,this.a=this.R=null,this.v=[],this.render=t.render||w,t.target&&this.f(t.target)}function _e(t){t=t||{},this.I=document.createElement("UL"),this.u=document.createElement("LI"),this.I.appendChild(this.u),this.u.style.display="none",this.c=void 0===t.collapsed||t.collapsed,this.o=void 0===t.collapsible||t.collapsible,this.o||(this.c=!1);var e=void 0!==t.className?t.className:"ol-attribution",o=void 0!==t.tipLabel?t.tipLabel:"Attributions",i=void 0!==t.collapseLabel?t.collapseLabel:"»";"string"==typeof i?(this.D=document.createElement("span"),this.D.textContent=i):this.D=i,"string"==typeof(i=void 0!==t.label?t.label:"i")?(this.C=document.createElement("span"),this.C.textContent=i):this.C=i;var r=this.o&&!this.c?this.D:this.C;(i=document.createElement("button")).setAttribute("type","button"),i.title=o,i.appendChild(r),de(i,"click",this.Vm,this),(o=document.createElement("div")).className=e+" ol-unselectable ol-control"+(this.c&&this.o?" ol-collapsed":"")+(this.o?"":" ol-uncollapsible"),o.appendChild(this.I),o.appendChild(i),Je.call(this,{element:o,render:t.render||$e,target:t.target}),this.B=!0,this.l={},this.j={},this.T={}}function $e(t){if(t=t.frameState){var e,o,i,r,n,s,a,p=t.layerStatesArray,h=ht({},t.attributions),l={},u={},c=t.viewState.projection,f=0;for(a=p.length;f<a;f++)if(o=p[f].layer.ha()){var y=G(o).toString();if(i=o.j)for(var g=0,d=i.length;g<d;g++){var v=i[g],b=G(v).toString();if(!(b in h)){if(e=t.usedTiles[y])t:{var m=void 0,w=v,x=M=o.Ta(c),S=c;if(w.a){for(m in e)if(m in w.a)for(var M=e[m],P=0,A=w.a[m].length;P<A;++P){var E=w.a[m][P];if(C(E,M)){m=!0;break t}var T=ee(x,pe(S),parseInt(m,10)),j=T.$-T.ca+1;if((M.ca<T.ca||M.$>T.$)&&(C(E,new B(L(M.ca,j),L(M.$,j),M.da,M.ia))||M.$-M.ca+1>j&&C(E,T))){m=!0;break t}}m=!1}else m=!0}else m=!1;m?(b in l&&delete l[b],(m=v.b)in u||(u[m]=!0,h[b]=v)):l[b]=v}}}for(r in f=(a=[h,l])[0],a=a[1],this.l)r in f?(this.j[r]||(this.l[r].style.display="",this.j[r]=!0),delete f[r]):r in a?(this.j[r]&&(this.l[r].style.display="none",delete this.j[r]),delete a[r]):(qe(this.l[r]),delete this.l[r],delete this.j[r]);for(r in f)g=document.createElement("LI"),g.innerHTML=f[r].b,this.I.appendChild(g),this.l[r]=g,this.j[r]=!0;for(r in a)g=document.createElement("LI"),g.innerHTML=a[r].b,g.style.display="none",this.I.appendChild(g),this.l[r]=g;for(s in r=!ct(this.j)||!ct(t.logos),this.B!=r&&(this.element.style.display=r?"":"none",this.B=r),r&&ct(this.j)?this.element.classList.add("ol-logo-only"):this.element.classList.remove("ol-logo-only"),t=t.logos,r=this.T)s in t||(qe(r[s]),delete r[s]);for(n in t)(a=t[n])instanceof HTMLElement&&(this.u.appendChild(a),r[n]=a),n in r||((s=new Image).src=n,""===a?f=s:((f=document.createElement("a")).href=a,f.appendChild(s)),this.u.appendChild(f),r[n]=f);this.u.style.display=ct(t)?"none":""}else this.B&&(this.element.style.display="none",this.B=!1)}function Qe(t){t.element.classList.toggle("ol-collapsed"),t.c?He(t.D,t.C):He(t.C,t.D),t.c=!t.c}function to(t){return Math.pow(t,3)}function eo(t){return 1-to(1-t)}function oo(t){return 3*t*t-2*t*t*t}function io(t){return t}function ro(t){var e=void 0!==(t=t||{}).className?t.className:"ol-rotate",o=void 0!==t.label?t.label:"⇧";this.c=null,"string"==typeof o?(this.c=document.createElement("span"),this.c.className="ol-compass",this.c.textContent=o):(this.c=o,this.c.classList.add("ol-compass"));var i=t.tipLabel||"Reset rotation";(o=document.createElement("button")).className=e+"-reset",o.setAttribute("type","button"),o.title=i,o.appendChild(this.c),de(o,"click",ro.prototype.D,this),(i=document.createElement("div")).className=e+" ol-unselectable ol-control",i.appendChild(o),e=t.render||no,this.o=t.resetNorth||void 0,Je.call(this,{element:i,render:e,target:t.target}),this.l=void 0!==t.duration?t.duration:250,this.j=void 0===t.autoHide||t.autoHide,this.u=void 0,this.j&&this.element.classList.add("ol-hidden")}function no(t){var e,o;(t=t.frameState)&&((t=t.viewState.rotation)!=this.u&&(e="rotate("+t+"rad)",this.j&&((o=this.element.classList.contains("ol-hidden"))||t?o&&t&&this.element.classList.remove("ol-hidden"):this.element.classList.add("ol-hidden")),this.c.style.msTransform=e,this.c.style.webkitTransform=e,this.c.style.transform=e),this.u=t)}function so(t){var e=void 0!==(t=t||{}).className?t.className:"ol-zoom",o=void 0!==t.delta?t.delta:1,i=void 0!==t.zoomInLabel?t.zoomInLabel:"+",r=void 0!==t.zoomOutLabel?t.zoomOutLabel:"−",n=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",s=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",a=document.createElement("button");a.className=e+"-in",a.setAttribute("type","button"),a.title=n,a.appendChild("string"==typeof i?document.createTextNode(i):i),de(a,"click",so.prototype.j.bind(this,o)),(i=document.createElement("button")).className=e+"-out",i.setAttribute("type","button"),i.title=s,i.appendChild("string"==typeof r?document.createTextNode(r):r),de(i,"click",so.prototype.j.bind(this,-o)),(o=document.createElement("div")).className=e+" ol-unselectable ol-control",o.appendChild(a),o.appendChild(i),Je.call(this,{element:o,target:t.target}),this.c=void 0!==t.duration?t.duration:250}function ao(t){t=t||{};var e=new Ne;return void 0!==t.zoom&&!t.zoom||e.push(new so(t.zoomOptions)),void 0!==t.rotate&&!t.rotate||e.push(new ro(t.rotateOptions)),void 0!==t.attribution&&!t.attribution||e.push(new _e(t.attributionOptions)),e}function po(t){t=t||{},this.c=void 0!==t.className?t.className:"ol-full-screen";var e=void 0!==t.label?t.label:"⤢";this.o="string"==typeof e?document.createTextNode(e):e,e=void 0!==t.labelActive?t.labelActive:"×",this.l="string"==typeof e?document.createTextNode(e):e;var o=t.tipLabel||"Toggle full-screen";(e=document.createElement("button")).className=this.c+"-"+lo(),e.setAttribute("type","button"),e.title=o,e.appendChild(this.o),de(e,"click",this.C,this),(o=document.createElement("div")).className=this.c+" ol-unselectable ol-control "+(ho()?"":"ol-unsupported"),o.appendChild(e),Je.call(this,{element:o,target:t.target}),this.D=void 0!==t.keys&&t.keys,this.j=t.source}function ho(){var t=document.body;return t.webkitRequestFullscreen||t.mozRequestFullScreen&&document.mozFullScreenEnabled||t.msRequestFullscreen&&document.msFullscreenEnabled||t.requestFullscreen&&document.fullscreenEnabled}function lo(){return!!(document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||document.fullscreenElement)}function uo(t){t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}e(Je,je),Je.prototype.ka=function(){qe(this.element),je.prototype.ka.call(this)},Je.prototype.g=function(){return this.a},Je.prototype.setMap=function(t){this.a&&qe(this.element);for(var e=0,o=this.v.length;e<o;++e)me(this.v[e]);this.v.length=0,(this.a=t)&&((this.R||t.D).appendChild(this.element),this.render!==w&&this.v.push(de(t,"postrender",this.render,this)),t.render())},Je.prototype.f=function(t){this.R="string"==typeof t?document.getElementById(t):t},e(_e,Je),(Au=_e.prototype).Vm=function(t){t.preventDefault(),Qe(this)},Au.Um=function(){return this.o},Au.Xm=function(t){this.o!==t&&(this.o=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.c&&Qe(this))},Au.Wm=function(t){this.o&&this.c!==t&&Qe(this)},Au.Tm=function(){return this.c},e(ro,Je),ro.prototype.D=function(t){t.preventDefault(),this.o?this.o():(t=this.a.Z())&&void 0!==t.Qa()&&(0<this.l?t.animate({rotation:0,duration:this.l,easing:eo}):t.Oe(0))},e(so,Je),so.prototype.j=function(t,e){var o;e.preventDefault(),!(e=this.a.Z())||(o=e.Pa())&&(t=e.constrainResolution(o,t),0<this.c?(e.Ic()&&e.ed(),e.animate({resolution:t,duration:this.c,easing:eo})):e.Vc(t))},e(po,Je),po.prototype.C=function(t){t.preventDefault(),ho()&&(t=this.a)&&(lo()?document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():(t=this.j?"string"==typeof this.j?document.getElementById(this.j):this.j:t.jd(),this.D?t.mozRequestFullScreenWithKeys?t.mozRequestFullScreenWithKeys():t.webkitRequestFullscreen?t.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):uo(t):uo(t)))},po.prototype.u=function(){var t=this.element.firstElementChild,e=this.a;lo()?(t.className=this.c+"-true",He(this.l,this.o)):(t.className=this.c+"-false",He(this.o,this.l)),e&&e.Ad()},po.prototype.setMap=function(t){Je.prototype.setMap.call(this,t),t&&this.v.push(de(document,fo(),this.u,this))};var co,fo=function(){var t;return co||((t=document.body).webkitRequestFullscreen?co="webkitfullscreenchange":t.mozRequestFullScreen?co="mozfullscreenchange":t.msRequestFullscreen?co="MSFullscreenChange":t.requestFullscreen&&(co="fullscreenchange")),co};function yo(t){t=t||{};var e=document.createElement("DIV");e.className=void 0!==t.className?t.className:"ol-mouse-position",Je.call(this,{element:e,render:t.render||go,target:t.target}),de(this,Le(bo),this.Ym,this),t.coordinateFormat&&this.kj(t.coordinateFormat),t.projection&&this.$h(t.projection),this.u=void 0!==t.undefinedHTML?t.undefinedHTML:"",this.l=e.innerHTML,this.o=this.j=this.c=null}function go(t){(t=t.frameState)?this.c!=t.viewState.projection&&(this.c=t.viewState.projection,this.j=null):this.c=null,vo(this,this.o)}function vo(t,e){var o,i=t.u;e&&t.c&&(t.j||(o=t.Zh(),t.j=o?Wt(t.c,o):Zt),(e=t.a.Wa(e))&&(t.j(e,e),i=(i=t.xh())?i(e):e.toString())),t.l&&i==t.l||(t.element.innerHTML=i,t.l=i)}e(yo,Je),(Au=yo.prototype).Ym=function(){this.j=null},Au.xh=function(){return this.get(mo)},Au.Zh=function(){return this.get(bo)},Au.Ll=function(t){this.o=this.a.xe(t),vo(this,this.o)},Au.Ml=function(){vo(this,null),this.o=null},Au.setMap=function(t){Je.prototype.setMap.call(this,t),t&&(t=t.a,this.v.push(de(t,"mousemove",this.Ll,this),de(t,"mouseout",this.Ml,this)))},Au.kj=function(t){this.set(mo,t)},Au.$h=function(t){this.set(bo,Bt(t))};var bo="projection",mo="coordinateFormat";function wo(t,e,o){Me.call(this,t),this.map=e,this.frameState=void 0!==o?o:null}function xo(t,e,o,i,r){wo.call(this,t,e,r),this.originalEvent=o,this.pixel=e.xe(o),this.coordinate=e.Wa(this.pixel),this.dragging=void 0!==i&&i}e(wo,Me),e(xo,wo),xo.prototype.preventDefault=function(){wo.prototype.preventDefault.call(this),this.originalEvent.preventDefault()},xo.prototype.stopPropagation=function(){wo.prototype.stopPropagation.call(this),this.originalEvent.stopPropagation()};var So=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function Mo(t,e){for(var o,i=So.length,r=0;r<i;++r)try{if(o=t.getContext(So[r],e))return o}catch(t){}return null}var Po,Ao="undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"",Eo=-1!==Ao.indexOf("firefox"),To=-1!==Ao.indexOf("safari")&&-1==Ao.indexOf("chrom"),jo=-1!==Ao.indexOf("webkit")&&-1==Ao.indexOf("edge"),Co=-1!==Ao.indexOf("macintosh"),Lo=window.devicePixelRatio||1,Ro=!1,Io=function(){if(!("HTMLCanvasElement"in window))return!1;try{var t=document.createElement("CANVAS").getContext("2d");return!!t&&(void 0!==t.setLineDash&&(Ro=!0),!0)}catch(t){return!1}}(),No="DeviceOrientationEvent"in window,Fo="geolocation"in navigator,ko="ontouchstart"in window,Do="PointerEvent"in window,Oo=!!navigator.msPointerEnabled,Uo=!1,Go=[];if("WebGLRenderingContext"in window)try{var Bo=Mo(document.createElement("CANVAS"),{failIfMajorPerformanceCaveat:!0});Bo&&(Uo=!0,Po=Bo.getParameter(Bo.MAX_TEXTURE_SIZE),Go=Bo.getSupportedExtensions())}catch(t){}var Xo=Uo,Vo=Go,Wo=Po,Zo={Iq:"singleclick",xq:"click",yq:"dblclick",Bq:"pointerdrag",Eq:"pointermove",Aq:"pointerdown",Hq:"pointerup",Gq:"pointerover",Fq:"pointerout",Cq:"pointerenter",Dq:"pointerleave",zq:"pointercancel"};function Ko(t,e,o,i,r){xo.call(this,t,e,o.b,i,r),this.b=o}function zo(t,e){this.b=t,this.f=e}function Yo(t){zo.call(this,t,{mousedown:this.fm,mousemove:this.gm,mouseup:this.jm,mouseover:this.im,mouseout:this.hm}),this.a=t.i,this.i=[]}function Ho(t,e){t=t.i;var o=e.clientX;e=e.clientY;for(var i,r=0,n=t.length;r<n&&(i=t[r]);r++){var s=Math.abs(e-i[1]);if(Math.abs(o-i[0])<=25&&s<=25)return 1}}function qo(t){var e=si(t,t),o=e.preventDefault;return e.preventDefault=function(){t.preventDefault(),o()},e.pointerId=1,e.isPrimary=!0,e.pointerType="mouse",e}function Jo(t){zo.call(this,t,{MSPointerDown:this.om,MSPointerMove:this.pm,MSPointerUp:this.sm,MSPointerOut:this.qm,MSPointerOver:this.rm,MSPointerCancel:this.nm,MSGotPointerCapture:this.lm,MSLostPointerCapture:this.mm}),this.a=t.i,this.i=["","unavailable","touch","pen","mouse"]}function _o(t,e){var o=e;return"number"==typeof e.pointerType&&((o=si(e,e)).pointerType=t.i[e.pointerType]),o}function $o(t){zo.call(this,t,{pointerdown:this.ip,pointermove:this.jp,pointerup:this.mp,pointerout:this.kp,pointerover:this.lp,pointercancel:this.hp,gotpointercapture:this.ul,lostpointercapture:this.em})}function Qo(t,e,o){var i;Me.call(this,t),this.b=e,t=o||{},this.buttons=function(t){if(t.buttons||ti)t=t.buttons;else switch(t.which){case 1:t=1;break;case 2:t=4;break;case 3:t=2;break;default:t=0}return t}(t),this.pressure=(i=t,o=this.buttons,i.pressure||(o?.5:0)),this.bubbles="bubbles"in t&&t.bubbles,this.cancelable="cancelable"in t&&t.cancelable,this.view="view"in t?t.view:null,this.detail="detail"in t?t.detail:null,this.screenX="screenX"in t?t.screenX:0,this.screenY="screenY"in t?t.screenY:0,this.clientX="clientX"in t?t.clientX:0,this.clientY="clientY"in t?t.clientY:0,this.ctrlKey="ctrlKey"in t&&t.ctrlKey,this.altKey="altKey"in t&&t.altKey,this.shiftKey="shiftKey"in t&&t.shiftKey,this.metaKey="metaKey"in t&&t.metaKey,this.button="button"in t?t.button:0,this.relatedTarget="relatedTarget"in t?t.relatedTarget:null,this.pointerId="pointerId"in t?t.pointerId:0,this.width="width"in t?t.width:0,this.height="height"in t?t.height:0,this.tiltX="tiltX"in t?t.tiltX:0,this.tiltY="tiltY"in t?t.tiltY:0,this.pointerType="pointerType"in t?t.pointerType:"",this.isPrimary="isPrimary"in t&&t.isPrimary,e.preventDefault&&(this.preventDefault=function(){e.preventDefault()})}e(Ko,xo),e(Yo,zo),(Au=Yo.prototype).fm=function(t){var e;Ho(this,t)||(1..toString()in this.a&&this.cancel(t),e=qo(t),this.a[1..toString()]=t,li(this.b,"pointerdown",e,t))},Au.gm=function(t){var e;Ho(this,t)||(e=qo(t),li(this.b,"pointermove",e,t))},Au.jm=function(t){var e;Ho(this,t)||(e=this.a[1..toString()])&&e.button===t.button&&(e=qo(t),li(this.b,"pointerup",e,t),delete this.a[1..toString()])},Au.im=function(t){var e;Ho(this,t)||(e=qo(t),hi(this.b,e,t))},Au.hm=function(t){var e;Ho(this,t)||(e=qo(t),pi(this.b,e,t))},Au.cancel=function(t){var e=qo(t);this.b.cancel(e,t),delete this.a[1..toString()]},e(Jo,zo),(Au=Jo.prototype).om=function(t){this.a[t.pointerId.toString()]=t;var e=_o(this,t);li(this.b,"pointerdown",e,t)},Au.pm=function(t){var e=_o(this,t);li(this.b,"pointermove",e,t)},Au.sm=function(t){var e=_o(this,t);li(this.b,"pointerup",e,t),delete this.a[t.pointerId.toString()]},Au.qm=function(t){var e=_o(this,t);pi(this.b,e,t)},Au.rm=function(t){var e=_o(this,t);hi(this.b,e,t)},Au.nm=function(t){var e=_o(this,t);this.b.cancel(e,t),delete this.a[t.pointerId.toString()]},Au.mm=function(t){this.b.b(new Qo("lostpointercapture",t,t))},Au.lm=function(t){this.b.b(new Qo("gotpointercapture",t,t))},e($o,zo),(Au=$o.prototype).ip=function(t){ui(this.b,t)},Au.jp=function(t){ui(this.b,t)},Au.mp=function(t){ui(this.b,t)},Au.kp=function(t){ui(this.b,t)},Au.lp=function(t){ui(this.b,t)},Au.hp=function(t){ui(this.b,t)},Au.em=function(t){ui(this.b,t)},Au.ul=function(t){ui(this.b,t)},e(Qo,Me);var ti=!1;try{ti=1===new MouseEvent("click",{buttons:1}).buttons}catch(t){}function ei(t,e){zo.call(this,t,{touchstart:this.rq,touchmove:this.qq,touchend:this.pq,touchcancel:this.oq}),this.a=t.i,this.j=e,this.i=void 0,this.g=0,this.c=void 0}function oi(t,e,o){function i(){e.preventDefault()}for(var r,n,s=Array.prototype.slice.call(e.changedTouches),a=s.length,p=0;p<a;++p){var h=(r=t,h=e,n=s[p],(h=si(h,n)).pointerId=n.identifier+2,h.bubbles=!0,h.cancelable=!0,h.detail=r.g,h.button=0,h.buttons=1,h.width=n.webkitRadiusX||n.radiusX||0,h.height=n.webkitRadiusY||n.radiusY||0,h.pressure=n.webkitForce||n.force||.5,h.isPrimary=r.i===n.identifier,h.pointerType="touch",h.clientX=n.clientX,h.clientY=n.clientY,h.screenX=n.screenX,h.screenY=n.screenY,h);h.preventDefault=i,o.call(t,e,h)}}function ii(t,e){var o,i=t.j.i;e=e.changedTouches[0],t.i===e.identifier&&(o=[e.clientX,e.clientY],i.push(o),setTimeout(function(){s(i,o)},2500))}function ri(t){Ae.call(this),this.g=t,this.i={},this.f={},this.a=[],Do?ni(this,new $o(this)):Oo?ni(this,new Jo(this)):(ni(this,t=new Yo(this)),ko&&ni(this,new ei(this,t))),t=this.a.length;for(var e,o,i=0;i<t;i++)e=this.a[i],o=this,Object.keys(e.f).forEach(function(t){de(this.g,t,this.c,this)},o)}function ni(t,o){var e=Object.keys(o.f);e&&(e.forEach(function(t){var e=o.f[t];e&&(this.f[t]=e.bind(o))},t),t.a.push(o))}function si(t,e){for(var o,i={},r=0,n=ci.length;r<n;r++)i[o=ci[r][0]]=t[o]||e[o]||ci[r][1];return i}function ai(t,e,o){e.bubbles=!1,li(t,"pointerleave",e,o)}function pi(t,e,o){t.out(e,o);var i=e.target,r=e.relatedTarget;i&&r&&i.contains(r)||ai(t,e,o)}function hi(t,e,o){e.bubbles=!0,li(t,"pointerover",e,o);var i=e.target,r=e.relatedTarget;i&&r&&i.contains(r)||(e.bubbles=!1,li(t,"pointerenter",e,o))}function li(t,e,o,i){t.b(new Qo(e,i,o))}function ui(t,e){t.b(new Qo(e.type,e,e))}e(ei,zo),(Au=ei.prototype).ij=function(){this.g=0,this.c=void 0},Au.rq=function(t){var e=t.touches,o=Object.keys(this.a),i=o.length;if(i>=e.length){for(var r=[],n=0;n<i;++n){var s,a=o[n],p=this.a[a];if(!(s=1==a))t:{for(var h=e.length,l=0;l<h;l++)if((s=e[l]).identifier===a-2){s=!0;break t}s=!1}s||r.push(p.out)}for(n=0;n<r.length;++n)this.Kf(t,r[n])}e=t.changedTouches[0],(!(o=Object.keys(this.a).length)||1===o&&1..toString()in this.a)&&(this.i=e.identifier,void 0!==this.c&&clearTimeout(this.c)),ii(this,t),this.g++,oi(this,t,this.cp)},Au.cp=function(t,e){this.a[e.pointerId]={target:e.target,out:e,Wi:e.target};var o=this.b;e.bubbles=!0,li(o,"pointerover",e,t),o=this.b,e.bubbles=!1,li(o,"pointerenter",e,t),li(this.b,"pointerdown",e,t)},Au.qq=function(t){t.preventDefault(),oi(this,t,this.km)},Au.km=function(t,e){var o,i,r=this.a[e.pointerId];r&&(o=r.out,i=r.Wi,li(this.b,"pointermove",e,t),o&&i!==e.target&&(o.relatedTarget=e.target,e.relatedTarget=i,o.target=i,e.target?(pi(this.b,o,t),hi(this.b,e,t)):(e.target=i,e.relatedTarget=null,this.Kf(t,e))),r.out=e,r.Wi=e.target)},Au.pq=function(t){ii(this,t),oi(this,t,this.sq)},Au.sq=function(t,e){li(this.b,"pointerup",e,t),this.b.out(e,t),ai(this.b,e,t),delete this.a[e.pointerId],e.isPrimary&&(this.i=void 0,this.c=setTimeout(this.ij.bind(this),200))},Au.oq=function(t){oi(this,t,this.Kf)},Au.Kf=function(t,e){this.b.cancel(e,t),this.b.out(e,t),ai(this.b,e,t),delete this.a[e.pointerId],e.isPrimary&&(this.i=void 0,this.c=setTimeout(this.ij.bind(this),200))},e(ri,Ae),ri.prototype.c=function(t){var e=this.f[t.type];e&&e(t)},ri.prototype.out=function(t,e){t.bubbles=!0,li(this,"pointerout",t,e)},ri.prototype.cancel=function(t,e){li(this,"pointercancel",t,e)};var ci=[["bubbles",!(ri.prototype.ka=function(){for(var t,e,o=this.a.length,i=0;i<o;i++)t=this.a[i],e=this,Object.keys(t.f).forEach(function(t){be(this.g,t,this.c,this)},e);Ae.prototype.ka.call(this)})],["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]];function fi(t,e){Ae.call(this),this.i=t,this.j=0,this.o=!1,this.f=[],this.D=e?e*Lo:Lo,this.c=null,t=this.i.a,this.S=0,this.u={},this.g=new ri(t),this.a=null,this.l=de(this.g,"pointerdown",this.Ol,this),this.v=de(this.g,"pointermove",this.Lp,this)}function yi(t,e){"pointerup"==e.type||"pointercancel"==e.type?delete t.u[e.pointerId]:"pointerdown"==e.type&&(t.u[e.pointerId]=!0),t.S=Object.keys(t.u).length}function gi(t,e){return Math.abs(e.clientX-t.c.clientX)>t.D||Math.abs(e.clientY-t.c.clientY)>t.D}function di(t,e){this.l=t,this.c=e,this.b=[],this.i=[],this.a={}}function vi(t){var e=t.b,o=t.i,i=e[0];return 1==e.length?(e.length=0,o.length=0):(e[0]=e.pop(),o[0]=o.pop(),bi(t,0)),e=t.c(i),delete t.a[e],i}function bi(t,e){for(var o=t.b,i=t.i,r=o.length,n=o[e],s=i[e],a=e;e<r>>1;){var p=2*e+1,h=2*e+2,p=h<r&&i[h]<i[p]?h:p;o[e]=o[p],i[e]=i[p],e=p}o[e]=n,i[e]=s,mi(t,a,e)}function mi(t,e,o){var i=t.b;t=t.i;for(var r=i[o],n=t[o];e<o;){var s=o-1>>1;if(!(t[s]>n))break;i[o]=i[s],t[o]=t[s],o=s}i[o]=r,t[o]=n}function wi(t){for(var e=t.l,o=t.b,i=t.i,r=0,n=o.length,s=0;s<n;++s){var a=o[s],p=e(a);1/0==p?delete t.a[t.c(a)]:(i[r]=p,o[r++]=a)}for(o.length=r,i.length=r,e=(t.b.length>>1)-1;0<=e;e--)bi(t,e)}function xi(e,t){di.call(this,function(t){return e.apply(null,t)},function(t){return t[0].bb()}),this.v=t,this.j=0,this.g={}}function Si(t,e,o){for(var i,r,n=0;t.j<e&&n<o&&0<t.b.length;)r=(i=vi(t)[0]).bb(),0!==i.getState()||r in t.g||(t.g[r]=!0,++t.j,++n,i.load())}function Mi(t){if(void 0!==t)return 0}function Pi(t,e){if(void 0!==t)return t+e}function Ai(t,e){return 2<(e=-1===(e=(t=void 0!==e?t.toFixed(e):""+t).indexOf("."))?t.length:e)?t:Array(3-e).join("0")+t}function Ei(t){t=(""+t).split(".");for(var e=["1","3"],o=0;o<Math.max(t.length,e.length);o++){var i=parseInt(t[o]||"0",10),r=parseInt(e[o]||"0",10);if(r<i)return 1;if(i<r)return-1}return 0}function Ti(t,e){return t[0]+=e[0],t[1]+=e[1],t}function ji(t,e){var o=t[0];t=t[1];var i=e[0],r=e[1];e=i[0];var i=i[1],n=r[0],s=n-e,a=(r=r[1])-i;return o=(o=s||a?(s*(o-e)+a*(t-i))/(s*s+a*a||0):0)<=0?(t=e,i):1<=o?(t=n,r):(t=e+o*s,i+o*a),[t,o]}function Ci(t,e,o){e=L(e+180,360)-180;var i=Math.abs(3600*e);o=o||0;var r=Math.pow(10,o),n=Math.floor(i/3600),s=Math.floor((i-3600*n)/60);return 60<=(i=Math.ceil((i-3600*n-60*s)*r)/r)&&(i=0,s+=1),60<=s&&(s=0,n+=1),n+"° "+Ai(s)+"′ "+Ai(i,o)+"″"+(e?" "+t.charAt(e<0?1:0):"")}function Li(t,e,o){return t?e.replace("{x}",t[0].toFixed(o)).replace("{y}",t[1].toFixed(o)):""}function Ri(t,e){for(var o=!0,i=t.length-1;0<=i;--i)if(t[i]!=e[i]){o=!1;break}return o}function Ii(t,e){var o=Math.cos(e);e=Math.sin(e);var i=t[1]*o+t[0]*e;return t[0]=t[0]*o-t[1]*e,t[1]=i,t}function Ni(t,e){t[0]*=e,t[1]*=e}function Fi(t,e){var o=t[0]-e[0];return o*o+(t=t[1]-e[1])*t}function ki(t,e){return Math.sqrt(Fi(t,e))}function Di(t,e){return Fi(t,ji(t,e))}function Oi(t,e){return Li(t,"{x}, {y}",e)}function Ui(){return!0}function Gi(){return!1}function Bi(){je.call(this),this.l=V(),this.v=-1,this.f={},this.o=this.g=0}function Xi(t,e,o,i,r,n){for(var s=n||[],a=0;e<o;e+=i){var p=t[e],h=t[e+1];s[a++]=r[0]*p+r[2]*h+r[4],s[a++]=r[1]*p+r[3]*h+r[5]}return n&&s.length!=a&&(s.length=a),s}function Vi(t,e,o,i,r,n,s){for(var a,p=s||[],h=0;e<o;e+=i)for(p[h++]=t[e]+r,p[h++]=t[e+1]+n,a=e+2;a<e+i;++a)p[h++]=t[a];return s&&p.length!=h&&(p.length=h),p}function Wi(){Bi.call(this),this.ja="XY",this.a=2,this.A=null}function Zi(t){var e;return"XY"==t?e=2:"XYZ"==t||"XYM"==t?e=3:"XYZM"==t&&(e=4),e}function Ki(t,e,o){t.a=Zi(e),t.ja=e,t.A=o}function zi(t,e,o,i){if(e)o=Zi(e);else{for(e=0;e<i;++e){if(!o.length)return t.ja="XY",void(t.a=2);o=o[0]}var r;2==(o=o.length)?r="XY":3==o?r="XYZ":4==o&&(r="XYZM"),e=r}t.ja=e,t.a=o}function Yi(t,e,o,i){for(var r=0,n=t[o-i],s=t[o-i+1];e<o;e+=i)var a=t[e],p=t[e+1],r=r+(s*a-n*p),n=a,s=p;return r/2}function Hi(t,e,o,i){for(var r=0,n=0,s=o.length;n<s;++n){var a=o[n],r=r+Yi(t,e,a,i);e=a}return r}function qi(t,e,o,i,r,n,s){var a=t[e],p=t[e+1],h=t[o]-a,l=t[o+1]-p;if(h||l)if(1<(n=((r-a)*h+(n-p)*l)/(h*h+l*l)))e=o;else if(0<n){for(r=0;r<i;++r)s[r]=f(t[e+r],t[o+r],n);return void(s.length=i)}for(r=0;r<i;++r)s[r]=t[e+r];s.length=i}function Ji(t,e,o,i,r){var n=t[e],s=t[e+1];for(e+=i;e<o;e+=i){var a=t[e],p=t[e+1];r<(n=y(n,s,a,p))&&(r=n),n=a,s=p}return r}function _i(t,e,o,i,r){for(var n=0,s=o.length;n<s;++n){var a=o[n];r=Ji(t,e,a,i,r),e=a}return r}function $i(t,e,o,i,r,n,s,a,p,h,l){if(e==o)return h;if(!r){var u=y(s,a,t[e],t[e+1]);if(u<h){for(l=0;l<i;++l)p[l]=t[e+l];return p.length=i,u}return h}for(var c=l||[NaN,NaN],f=e+i;f<o;)if(qi(t,f-i,f,i,s,a,c),(u=y(s,a,c[0],c[1]))<h){for(h=u,l=0;l<i;++l)p[l]=c[l];f+=p.length=i}else f+=i*Math.max((Math.sqrt(u)-Math.sqrt(h))/r|0,1);if(n&&(qi(t,o-i,e,i,s,a,c),(u=y(s,a,c[0],c[1]))<h)){for(h=u,l=0;l<i;++l)p[l]=c[l];p.length=i}return h}function Qi(t,e,o,i,r,n,s,a,p,h,l){l=l||[NaN,NaN];for(var u=0,c=o.length;u<c;++u){var f=o[u];h=$i(t,e,f,i,r,n,s,a,p,h,l),e=f}return h}function tr(t,e){for(var o=0,i=0,r=e.length;i<r;++i)t[o++]=e[i];return o}function er(t,e,o,i){for(var r=0,n=o.length;r<n;++r)for(var s=o[r],a=0;a<i;++a)t[e++]=s[a];return e}function or(t,e,o,i,r){r=r||[];for(var n=0,s=0,a=o.length;s<a;++s)e=er(t,e,o[s],i),r[n++]=e;return r.length=n,r}function ir(t,e,o,i,r){r=void 0!==r?r:[];for(var n=0;e<o;e+=i)r[n++]=t.slice(e,e+i);return r.length=n,r}function rr(t,e,o,i,r){r=void 0!==r?r:[];for(var n=0,s=0,a=o.length;s<a;++s){var p=o[s];r[n++]=ir(t,e,p,i,r[n]),e=p}return r.length=n,r}function nr(t,e,o,i,r,n,s){var a=(o-e)/i;if(a<3){for(;e<o;e+=i)n[s++]=t[e],n[s++]=t[e+1];return s}var p=Array(a);p[0]=1,p[a-1]=1,o=[e,o-i];for(var h=0;0<o.length;){for(var l=o.pop(),u=o.pop(),c=0,f=t[u],y=t[u+1],g=t[l],d=t[l+1],v=u+i;v<l;v+=i){var b=S(t[v],t[v+1],f,y,g,d);c<b&&(h=v,c=b)}r<c&&(p[(h-e)/i]=1,u+i<h&&o.push(u,h),h+i<l&&o.push(h,l))}for(v=0;v<a;++v)p[v]&&(n[s++]=t[e+v*i],n[s++]=t[e+v*i+1]);return s}function sr(t,e,o,i,r,n,s,a){for(var p=0,h=o.length;p<h;++p){var l=o[p];t:{var u=t,c=l,f=i,y=r,g=n,d=s;if(e!=c){var v=y*Math.round(u[e]/y),b=y*Math.round(u[e+1]/y);e+=f,g[d++]=v,g[d++]=b;do{var m=y*Math.round(u[e]/y);if(s=y*Math.round(u[e+1]/y),(e+=f)==c){g[d++]=m,g[d++]=s,s=d;break t}}while(m==v&&s==b);for(;e<c;){var w,x,S,M,P=y*Math.round(u[e]/y),A=y*Math.round(u[e+1]/y);e+=f,P==m&&A==s||((w=m-v)*(M=A-b)==(x=s-b)*(S=P-v)&&(w<0&&S<w||w==S||0<w&&w<S)&&(x<0&&M<x||x==M||0<x&&x<M)||(v=g[d++]=m,b=g[d++]=s),m=P,s=A)}g[d++]=m,g[d++]=s}s=d}a.push(s),e=l}return s}function ar(t,e){Wi.call(this),this.c=this.j=-1,this.ma(t,e)}function pr(t,e,o){Ki(t,e,o),t.s()}function hr(t,e){Wi.call(this),this.ma(t,e)}function lr(t,e,o,i,r,n){for(var s=0,a=t[o-i],p=t[o-i+1];e<o;e+=i){var h=t[e],l=t[e+1];p<=n?n<l&&0<(h-a)*(n-p)-(r-a)*(l-p)&&s++:l<=n&&(h-a)*(n-p)-(r-a)*(l-p)<0&&s--,a=h,p=l}return s}function ur(t,e,o,i,r,n){if(!o.length||!lr(t,e,o[0],i,r,n))return!1;var s;for(e=1,s=o.length;e<s;++e)if(lr(t,o[e-1],o[e],i,r,n))return!1;return!0}function cr(t,e,o,i,r,n,s){for(var a=r[n+1],p=[],h=o[0],l=t[h-i],u=t[h-i+1],c=e;c<h;c+=i){var f=t[c],y=t[c+1];(a<=u&&y<=a||u<=a&&a<=y)&&(l=(a-u)/(y-u)*(f-l)+l,p.push(l)),l=f,u=y}for(h=NaN,u=-1/0,p.sort(D),l=p[0],c=1,y=p.length;c<y;++c){var f=p[c],g=Math.abs(f-l);u<g&&(ur(t,e,o,i,l=(l+f)/2,a)&&(h=l,u=g)),l=f}return isNaN(h)&&(h=r[n]),s?(s.push(h,a),s):[h,a]}function fr(t,e,o,i,r,n){for(var s,a=[t[e],t[e+1]],p=[];e+i<o;e+=i){if(p[0]=t[e+i],p[1]=t[e+i+1],s=r.call(n,a,p))return s;a[0]=p[0],a[1]=p[1]}return!1}function yr(t,e,o,i,l){var r=Y(V(),t,e,o,i);return!!nt(l,r)&&(!!(N(l,r)||r[0]>=l[0]&&r[2]<=l[2]||r[1]>=l[1]&&r[3]<=l[3])||fr(t,e,o,i,function(t,e){var o,i,r,n,s,a=!1,p=R(l,t),h=R(l,e);return 1===p||1===h?a=!0:(o=l[0],i=l[1],r=l[2],n=l[3],s=e[0],t=((e=e[1])-t[1])/(s-t[0]),(a=!(a=!(a=2&h&&!(2&p)?o<=(a=s-(e-n)/t)&&a<=r:a)&&4&h&&!(4&p)?i<=(a=e-(s-r)*t)&&a<=n:a)&&8&h&&!(8&p)?o<=(a=s-(e-i)/t)&&a<=r:a)||!(16&h)||16&p||(a=i<=(a=e-(s-o)*t)&&a<=n)),a}))}function gr(t,e,o,i,r){var n=o[0];if(!(yr(t,e,n,i,r)||lr(t,e,n,i,r[0],r[1])||lr(t,e,n,i,r[0],r[3])||lr(t,e,n,i,r[2],r[1])||lr(t,e,n,i,r[2],r[3])))return!1;if(1===o.length)return!0;for(e=1,n=o.length;e<n;++e)if(function(e,o,i,r,t){return!H(t,function(t){return!lr(e,o,i,r,t[0],t[1])})}(t,o[e-1],o[e],i,r))return!1;return!0}function dr(t,e,o,i){for(var r=0,n=t[o-i],s=t[o-i+1];e<o;e+=i)var a=t[e],p=t[e+1],r=r+(a-n)*(p+s),n=a,s=p;return 0<r}function vr(t,e,o,i){var r=0;i=void 0!==i&&i;for(var n=0,s=e.length;n<s;++n){var a=e[n],r=dr(t,r,a,o);if(n){if(i&&!r||!i&&r)return}else if(i&&r||!i&&!r)return;r=a}return 1}function br(t,e,o,i,r){r=void 0!==r&&r;for(var n=0,s=o.length;n<s;++n){var a=o[n],p=dr(t,e,a,i);if(n?r&&!p||!r&&p:r&&p||!r&&!p)for(var p=t,h=a,l=i;e<h-l;){for(var u=0;u<l;++u){var c=p[e+u];p[e+u]=p[h-l+u],p[h-l+u]=c}e+=l,h-=l}e=a}return e}function mr(t,e,o,i){for(var r=0,n=0,s=e.length;n<s;++n)r=br(t,r,e[n],o,i);return r}function wr(t,e){Wi.call(this),this.c=[],this.u=-1,this.D=null,this.I=this.C=this.B=-1,this.j=null,this.ma(t,e)}function xr(t){var e;return t.u!=t.i&&(e=$(t.G()),t.D=cr(t.ec(),0,t.c,t.a,e,0),t.u=t.i),t.D}function Sr(t,e,o,i){var r,n=i||32;for(i=[],r=0;r<n;++r)c(i,t.offset(e,o,2*Math.PI*r/n));return i.push(i[0],i[1]),(t=new wr(null)).ba("XY",i,[i.length]),t}function Mr(t){var e=t[0],o=t[1],i=t[2],e=[e,o,e,t=t[3],i,t,i,o,e,o];return(o=new wr(null)).ba("XY",e,[e.length]),o}function Pr(t,e,o){for(var i=e||32,r=t.qa(),n=new wr(null,e=t.ja),i=r*(i+1),r=Array(i),s=0;s<i;s++)r[s]=0;return n.ba(e,r,[r.length]),Ar(n,t.wa(),t.pd(),o),n}function Ar(t,e,o,i){var r=t.ga(),n=t.ja,s=t.qa(),a=t.Bb(),p=r.length/s-1;i=i||0;for(var h,l,u=0;u<=p;++u)l=u*s,h=i+2*L(u,p)*Math.PI/p,r[l]=e[0]+o*Math.cos(h),r[1+l]=e[1]+o*Math.sin(h);t.ba(n,r,a)}function Er(t){je.call(this),t=ht({},t),this.o=[0,0],this.c=[],this.wf=this.wf.bind(this),this.v=Ot(t.projection),Tr(this,t)}function Tr(t,e){var o={};o.center=void 0!==e.center?e.center:null;var i,r,n,s,a,p,h,l,u,c,f,y=void 0!==e.minZoom?e.minZoom:0,g=void 0!==e.maxZoom?e.maxZoom:28,d=void 0!==e.zoomFactor?e.zoomFactor:2;g=void 0!==e.resolutions?(i=(g=e.resolutions)[0],r=g[g.length-1],l=g,function(t,e,o){if(void 0!==t)return(t=x((t=v(l,t,o))+e,0,l.length-1))!=(e=Math.floor(t))&&e<l.length-1?l[e]/Math.pow(l[e]/l[e+1],t-e):l[e]}):(s=(n=((r=(i=Ot(e.projection)).G())?Math.max(rt(r),tt(r)):360*gt.degrees/i.sc())/256/Math.pow(2,0))/Math.pow(2,28),void 0!==(i=e.maxResolution)?y=0:i=n/Math.pow(d,y),void 0===(r=e.minResolution)&&(r=void 0!==e.maxZoom?void 0!==e.maxResolution?i/Math.pow(d,g):n/Math.pow(d,g):s),g=y+Math.floor(Math.log(i/r)/Math.log(d)),r=i/Math.pow(d,g-y),a=d,p=i,h=g-y,function(t,e,o){if(void 0!==t)return t=Math.max(Math.floor(Math.log(p/t)/Math.log(a)+(-o/2+.5))+e,0),void 0!==