@extendz/extendz-openlayer
Version:
Extend UI Platform built on Angular Material
2 lines • 561 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@angular/router"),require("rxjs/Observable"),require("@angular/material")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/common","@angular/router","rxjs/Observable","@angular/material"],e):e((t.td=t.td||{},t.td.extendzOpenlayer=t.td.extendzOpenlayer||{}),t.ng.core,t.ng.common,t.ng.router,t.Rx,t.ng.material)}(this,function(t,e,o,i,r,n){"use strict";function s(t,e){function o(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}function p(t,e,o,i){var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var p=t.length-1;p>=0;p--)(r=t[p])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s}function a(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};!function(e,o){"object"==typeof t?module.exports=o():"function"==typeof define&&define.amd?define([],o):e.ol=o()}(this,function(){function t(t,e){var o=Gd;t=t.split("."),o=o||Bd,t[0]in o||!o.execScript||o.execScript("var "+t[0]);for(var i;t.length&&(i=t.shift());)t.length||void 0===e?o=o[i]&&o[i]!==Object.prototype[i]?o[i]:o[i]={}:o[i]=e}function e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t}function o(){}function i(t){return t.xp||(t.xp=++Vd)}function r(t){this.message="Assertion failed. See https://openlayers.org/en/v4.6.0/doc/errors/#"+t+" for details.",this.code=t,this.name="AssertionError"}function n(t,e,o,i){this.fa=t,this.la=e,this.ea=o,this.ka=i}function s(t,e,o,i,r){return void 0!==r?(r.fa=t,r.la=e,r.ea=o,r.ka=i,r):new n(t,e,o,i)}function p(t,e,o){return t.fa<=e&&e<=t.la&&t.ea<=o&&o<=t.ka}function a(t,e){return t.fa==e.fa&&t.ea==e.ea&&t.la==e.la&&t.ka==e.ka}function h(t,e){if(!t)throw new r(e)}function l(t,e,o){return Math.min(Math.max(t,e),o)}function u(t){return h(0<t,29),Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function c(t,e,o,i,r,n){var s=r-o,p=n-i;if(0!==s||0!==p){var a=((t-o)*s+(e-i)*p)/(s*s+p*p);1<a?(o=r,i=n):0<a&&(o+=s*a,i+=p*a)}return y(t,e,o,i)}function y(t,e,o,i){return t=o-t,e=i-e,t*t+e*e}function f(t){return t*Math.PI/180}function g(t,e){return t%=e,0>t*e?t+e:t}function d(t,e,o){return t+o*(e-t)}function v(t,e,o){return void 0===o&&(o=[0,0]),o[0]=t[0]+2*e,o[1]=t[1]+2*e,o}function m(t,e,o){return void 0===o&&(o=[0,0]),o[0]=t[0]*e+.5|0,o[1]=t[1]*e+.5|0,o}function b(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:e[0]=e[1]=t,e)}function w(t){for(var e=C(),o=0,i=t.length;o<i;++o)O(e,t[o]);return e}function x(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 S(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function M(t,e,o){return e=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0,t=o<t[1]?t[1]-o:t[3]<o?o-t[3]:0,e*e+t*t}function P(t,e){return E(t,e[0],e[1])}function T(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function E(t,e,o){return t[0]<=e&&e<=t[2]&&t[1]<=o&&o<=t[3]}function A(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:n>i&&(s|=4),e<o?s|=8:e>r&&(s|=2),0===s&&(s=1),s}function C(){return[1/0,1/0,-1/0,-1/0]}function j(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 L(t){return j(1/0,1/0,-1/0,-1/0,t)}function R(t,e){var o=t[0];return t=t[1],j(o,t,o,t,e)}function I(t,e,o,i,r){return r=L(r),D(r,t,e,o,i)}function N(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function F(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 O(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 D(t,e,o,i,r){for(;o<i;o+=r){var n=t,s=e[o],p=e[o+1];n[0]=Math.min(n[0],s),n[1]=Math.min(n[1],p),n[2]=Math.max(n[2],s),n[3]=Math.max(n[3],p)}return t}function k(t,e,o){var i;return(i=e.call(o,G(t)))||(i=e.call(o,B(t)))||(i=e.call(o,q(t)))?i:!!(i=e.call(o,Z(t)))&&i}function U(t){var e=0;return H(t)||(e=K(t)*z(t)),e}function G(t){return[t[0],t[1]]}function B(t){return[t[2],t[1]]}function V(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function X(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 p=i*s,a=t[0],h=t[1];t=a-o+p,i=a-o-p,s=a+o-p,o=a+o+p,p=h-n-e,a=h-n+e;var l=h+n+e;return n=h+n-e,j(Math.min(t,i,s,o),Math.min(p,a,l,n),Math.max(t,i,s,o),Math.max(p,a,l,n),r)}function z(t){return t[3]-t[1]}function W(t,e,o){return o=o||C(),Y(t,e)&&(o[0]=t[0]>e[0]?t[0]:e[0],o[1]=t[1]>e[1]?t[1]:e[1],o[2]=t[2]<e[2]?t[2]:e[2],o[3]=t[3]<e[3]?t[3]:e[3]),o}function Z(t){return[t[0],t[3]]}function q(t){return[t[2],t[3]]}function K(t){return t[2]-t[0]}function Y(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function H(t){return t[2]<t[0]||t[3]<t[1]}function J(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 _(t,e,o){t=[t[0],t[1],t[0],t[3],t[2],t[1],t[2],t[3]],e(t,t,2);var i=[t[0],t[2],t[4],t[6]],r=[t[1],t[3],t[5],t[7]];return e=Math.min.apply(null,i),t=Math.min.apply(null,r),i=Math.max.apply(null,i),r=Math.max.apply(null,r),j(e,t,i,r,o)}function $(t){for(var e in t)delete t[e]}function Q(t){var e,o=[];for(e in t)o.push(t[e]);return o}function tt(t){for(var e in t)return!1;return!e}function et(t){this.radius=t}function ot(t,e){var o=e||{},i=o.radius||6371008.8;o=o.projection||"EPSG:3857",t=t.clone().mb(o,"EPSG:4326");var r=t.S();o=0;var n;switch(r){case"Point":case"MultiPoint":break;case"LineString":case"LinearRing":e=t.W(),o=it(e,i);break;case"MultiLineString":case"Polygon":for(e=t.W(),t=0,r=e.length;t<r;++t)o+=it(e[t],i);break;case"MultiPolygon":for(e=t.W(),t=0,r=e.length;t<r;++t){var s=e[t],p=0;for(n=s.length;p<n;++p)o+=it(s[p],i)}break;case"GeometryCollection":for(i=t.vd(),t=0,r=i.length;t<r;++t)o+=ot(i[t],e);break;default:throw Error("Unsupported geometry type: "+r)}return o}function it(t,e){for(var o=0,i=0,r=t.length;i<r-1;++i)o+=rt(t[i],t[i+1],e);return o}function rt(t,e,o){var i=f(t[1]),r=f(e[1]),n=(r-i)/2;return t=f(e[0]-t[0])/2,i=Math.sin(n)*Math.sin(n)+Math.sin(t)*Math.sin(t)*Math.cos(i)*Math.cos(r),2*o*Math.atan2(Math.sqrt(i),Math.sqrt(1-i))}function nt(t,e){var o=e||{},i=o.radius||6371008.8;o=o.projection||"EPSG:3857",t=t.clone().mb(o,"EPSG:4326");var r=t.S();o=0;var n;switch(r){case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"LinearRing":break;case"Polygon":for(e=t.W(),o=Math.abs(st(e[0],i)),t=1,r=e.length;t<r;++t)o-=Math.abs(st(e[t],i));break;case"MultiPolygon":for(e=t.W(),t=0,r=e.length;t<r;++t){var s=e[t];o+=Math.abs(st(s[0],i));var p=1;for(n=s.length;p<n;++p)o-=Math.abs(st(s[p],i))}break;case"GeometryCollection":for(i=t.vd(),t=0,r=i.length;t<r;++t)o+=nt(i[t],e);break;default:throw Error("Unsupported geometry type: "+r)}return o}function st(t,e){for(var o=0,i=t.length,r=t[i-1][0],n=t[i-1][1],s=0;s<i;s++){var p=t[s][0],a=t[s][1];o+=f(p-r)*(2+Math.sin(f(n))+Math.sin(f(a))),r=p,n=a}return o*e*e/2}function pt(t){this.wb=t.code,this.a=t.units,this.i=void 0!==t.extent?t.extent:null,this.oe=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.g=!(!this.c||!this.i),this.j=t.getPointResolution,this.f=null,this.l=t.metersPerUnit;var e=t.code,o=Zd||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 at(t){pt.call(this,{code:t,units:"m",extent:Kd,global:!0,worldExtent:Yd,getPointResolution:function(t,e){return t/Xd(e[1]/6378137)}})}function ht(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]=qd*t[r]/180;var n=6378137*Math.log(Math.tan(Math.PI*(t[r+1]+90)/360));n>qd?n=qd:n<-qd&&(n=-qd),e[r+1]=n}return e}function lt(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]/qd,e[r+1]=360*Math.atan(Math.exp(t[r+1]/6378137))/Math.PI-90;return e}function ut(t,e){pt.call(this,{code:t,units:"degrees",extent:Jd,axisOrientation:e,global:!0,metersPerUnit:_d,worldExtent:Jd})}function ct(t,e,o){t=t.wb,e=e.wb,t in tv||(tv[t]={}),tv[t][e]=o}function yt(t,e){var o;return t in tv&&e in tv[t]&&(o=tv[t][e]),o}function ft(t,e,o,i){t=xt(t);var r=t.j;return r?e=r(e,o):"degrees"==t.a&&!i||"degrees"==i||(r=Pt(t,xt("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=r(e,e,2),e=(ev.b(e.slice(0,2),e.slice(2,4))+ev.b(e.slice(4,6),e.slice(6,8)))/2,void 0!==(t=i?Wd[i]:t.Bc())&&(e/=t)),e}function gt(t){t.forEach(vt),t.forEach(function(e){t.forEach(function(t){e!==t&&ct(e,t,Et)})})}function dt(){$d.forEach(function(t){Hd.forEach(function(e){ct(t,e,ht),ct(e,t,lt)})})}function vt(t){Qd[t.wb]=t,ct(t,t,Et)}function mt(t){return t?"string"==typeof t?xt(t):t:xt("EPSG:3857")}function bt(t,e,o,i){t=xt(t),e=xt(e),ct(t,e,wt(o)),ct(e,t,wt(i))}function wt(t){return function(e,o,i){var r=e.length;i=void 0!==i?i:2,o=void 0!==o?o:Array(r);var n;for(n=0;n<r;n+=i){var s=t([e[n],e[n+1]]);for(o[n]=s[0],o[n+1]=s[1],s=i-1;2<=s;--s)o[n+s]=e[n+s]}return o}}function xt(t){var e=null;if(t instanceof pt)e=t;else if("string"==typeof t&&!(e=Qd[t]||null)){var o=Zd||window.proj4;"function"==typeof o&&void 0!==o.defs(t)&&(e=new pt({code:t}),vt(e))}return e}function St(t,e){if(t===e)return!0;var o=t.a===e.a;return t.wb===e.wb?o:Pt(t,e)===Et&&o}function Mt(t,e){return t=xt(t),e=xt(e),Pt(t,e)}function Pt(t,e){var o=t.wb,i=e.wb,r=yt(o,i);if(!r){var n=Zd||window.proj4;if("function"==typeof n){var s=n.defs(o),p=n.defs(i);void 0!==s&&void 0!==p&&(s===p?gt([e,t]):(r=n(i,o),bt(e,t,r.forward,r.inverse)),r=yt(o,i))}}return r||(r=Tt),r}function Tt(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 Et(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 At(t,e,o){return Mt(e,o)(t,void 0,t.length)}function Ct(t,e,o){return e=Mt(e,o),_(t,e)}function jt(){gt(Hd),gt($d),dt()}function Lt(t,e){return t>e?1:t<e?-1:0}function Rt(t,e){return 0<=t.indexOf(e)}function It(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(0>o){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 Nt(t,e){var o=Array.isArray(e)?e:[e],i=o.length;for(e=0;e<i;e++)t[t.length]=o[e]}function Ft(t,e){for(var o,i=t.length>>>0,r=0;r<i;r++)if(o=t[r],e(o,r,t))return o;return null}function Ot(t,e){var o=t.length;if(o!==e.length)return!1;for(var i=0;i<o;i++)if(t[i]!==e[i])return!1;return!0}function Dt(t){var e,o=rs,i=t.length,r=Array(t.length);for(e=0;e<i;e++)r[e]={index:e,value:t[e]};for(r.sort(function(t,e){return o(t.value,e.value)||t.index-e.index}),e=0;e<t.length;e++)t[e]=r[e].value}function kt(t,e){var o;return t.every(function(i,r){return o=r,!e(i,r,t)})?-1:o}function Ut(t,e){var o=e||Lt;return t.every(function(e,i){return 0===i||!(0<(e=o(t[i-1],e))||0===e)})}function Gt(t,e,o,i){return void 0!==i?(i[0]=t,i[1]=e,i[2]=o,i):[t,e,o]}function Bt(t){var e,o=t[0],i=Array(o),r=1<<o-1;for(e=0;e<o;++e){var n=48;t[1]&r&&(n+=1),t[2]&r&&(n+=2),i[e]=String.fromCharCode(n),r>>=1}return i.join("")}function Vt(t){if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.b=t.resolutions,h(Ut(this.b,function(t,e){return e-t}),17),!t.origins)for(var e=0,o=this.b.length-1;e<o;++e)if(i){if(this.b[e]/this.b[e+1]!==i){i=void 0;break}}else var i=this.b[e]/this.b[e+1];this.l=i,this.maxZoom=this.b.length-1,this.g=void 0!==t.origin?t.origin:null,this.c=null,void 0!==t.origins&&(this.c=t.origins,h(this.c.length==this.b.length,20)),i=t.extent,void 0===i||this.g||this.c||(this.g=Z(i)),h(!this.g&&this.c||this.g&&!this.c,18),this.i=null,void 0!==t.tileSizes&&(this.i=t.tileSizes,h(this.i.length==this.b.length,19)),this.j=void 0!==t.tileSize?t.tileSize:this.i?null:256,h(!this.j&&this.i||this.j&&!this.i,22),this.o=void 0!==i?i:null,this.a=null,this.f=[0,0],void 0!==t.sizes?this.a=t.sizes.map(function(t){return new n(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1))},this):i&&Yt(this,i)}function Xt(t,e,o,i,r){var n=null,p=e[0]-1;if(2===t.l)var a=e[1],h=e[2];else n=t.Ma(e,r);for(;p>=t.minZoom;){if(2===t.l?(a=Math.floor(a/2),h=Math.floor(h/2),e=s(a,a,h,h,i)):e=Zt(t,n,p,i),o.call(null,p,e))return!0;--p}return!1}function zt(t,e,o,i){return e[0]<t.maxZoom?2===t.l?(t=2*e[1],e=2*e[2],s(t,t+1,e,e+1,o)):(i=t.Ma(e,i),Zt(t,i,e[0]+1,o)):null}function Wt(t,e,o){var i=t.Ic(e),r=t.Ta(e);return t=b(t.Za(e),t.f),j(i[0]+o.fa*t[0]*r,i[1]+o.ea*t[1]*r,i[0]+(o.la+1)*t[0]*r,i[1]+(o.ka+1)*t[1]*r,void 0)}function Zt(t,e,o,i){Kt(t,e[0],e[1],o,!1,ov);var r=ov[1],n=ov[2];return Kt(t,e[2],e[3],o,!0,ov),s(r,ov[1],n,ov[2],i)}function qt(t,e){var o=t.Ic(e[0]),i=t.Ta(e[0]);return t=b(t.Za(e[0]),t.f),[o[0]+(e[1]+.5)*t[0]*i,o[1]+(e[2]+.5)*t[1]*i]}function Kt(t,e,o,i,r,n){var s=t.Ic(i),p=t.Ta(i);return t=b(t.Za(i),t.f),e=Math.floor((e-s[0])/p+(r?.5:0))/t[0],o=Math.floor((o-s[1])/p+(r?0:.5))/t[1],r?(e=Math.ceil(e)-1,o=Math.ceil(o)-1):(e=Math.floor(e),o=Math.floor(o)),Gt(i,e,o,n)}function Yt(t,e){for(var o=t.b.length,i=Array(o),r=t.minZoom;r<o;++r)i[r]=Zt(t,e,r);t.a=i}function Ht(t){var e=t.f;return e||(e=$t(t),t.f=e),e}function Jt(t){var e={};return zd(e,void 0!==t?t:{}),void 0===e.extent&&(e.extent=xt("EPSG:3857").G()),e.resolutions=_t(e.extent,e.maxZoom,e.tileSize),delete e.maxZoom,new Vt(e)}function _t(t,e,o){e=void 0!==e?e:42;var i=z(t);for(t=K(t),o=b(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 $t(t,e,o){return t=Qt(t),e=_t(t,e,o),new Vt({extent:t,origin:Z(t),resolutions:e,tileSize:o})}function Qt(t){t=xt(t);var e=t.G();return e||(t=180*Wd.degrees/t.Bc(),e=j(-t,-t,t,t)),e}function te(t){this.og=t.html}function ee(t){function e(e){var o=t.listener,i=t.Ch||t.target;return t.Eh&&he(t),o.call(i,e)}return t.Dh=e}function oe(t,e,o,i){for(var r,n=0,s=t.length;n<s;++n)if(r=t[n],r.listener===e&&r.Ch===o)return i&&(r.deleteIndex=n),r}function ie(t,e){return(t=t.ab)?t[e]:void 0}function re(t){var e=t.ab;return e||(e=t.ab={}),e}function ne(t,e){var o=ie(t,e);if(o){for(var i=0,r=o.length;i<r;++i)t.removeEventListener(e,o[i].Dh),$(o[i]);o.length=0,(o=t.ab)&&(delete o[e],0===Object.keys(o).length&&delete t.ab)}}function se(t,e,o,i,r){var n=re(t),s=n[e];return s||(s=n[e]=[]),(n=oe(s,o,i,!1))?r||(n.Eh=!1):(n={Ch:i,Eh:!!r,listener:o,target:t,type:e},t.addEventListener(e,ee(n)),s.push(n)),n}function pe(t,e,o,i){return se(t,e,o,i,!0)}function ae(t,e,o,i){(t=ie(t,e))&&(o=oe(t,o,i,!0))&&he(o)}function he(t){if(t&&t.target){t.target.removeEventListener(t.type,t.Dh);var e=ie(t.target,t.type);if(e){var o="deleteIndex"in t?t.deleteIndex:e.indexOf(t);-1!==o&&e.splice(o,1),0===e.length&&ne(t.target,t.type)}$(t)}}function le(t){var e,o=re(t);for(e in o)ne(t,e)}function ue(){}function ce(t){t.Ub||(t.Ub=!0,t.ia())}function ye(t){this.type=t,this.target=null}function fe(t){t.stopPropagation()}function ge(){this.Wa={},this.qa={},this.oa={}}function de(t,e){return e?e in t.oa:0<Object.keys(t.oa).length}function ve(){ge.call(this),this.g=0}function me(t){ve.call(this),i(this),this.O={},void 0!==t&&this.H(t)}function be(t){return iv.hasOwnProperty(t)?iv[t]:iv[t]="change:"+t}function we(t,e,o){var i=be(e);t.b(new xe(i,e,o)),t.b(new xe("propertychange",e,o))}function xe(t,e,o){ye.call(this,t),this.key=e,this.oldValue=o}function Se(t,e){if(me.call(this),this.c=!!(e||{}).unique,this.a=t||[],this.c)for(t=0,e=this.a.length;t<e;++t)Pe(this,this.a[t],t);Me(this)}function Me(t){t.set(rv,t.a.length)}function Pe(t,e,o){for(var i=0,n=t.a.length;i<n;++i)if(t.a[i]===e&&i!==o)throw new r(58)}function Te(t,e){ye.call(this,t),this.element=e}function Ee(t,e,o){ye.call(this,t),this.map=e,this.frameState=void 0!==o?o:null}function Ae(t,e,o,i,r){Ee.call(this,t,e,r),this.originalEvent=o,this.pixel=e.ud(o),this.coordinate=e.Ra(this.pixel),this.dragging=void 0!==i&&i}function Ce(t,e){var o,i,r=pv.length;for(i=0;i<r;++i)try{if(o=t.getContext(pv[i],e))return o}catch(t){}return null}function je(t,e,o,i,r){Ae.call(this,t,e,o.b,i,r),this.b=o}function Le(t,e){this.b=t,this.i=e}function Re(t){Le.call(this,t,{mousedown:this.Jm,mousemove:this.Km,mouseup:this.Nm,mouseover:this.Mm,mouseout:this.Lm}),this.a=t.g,this.g=[]}function Ie(t,e){t=t.g;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(25>=Math.abs(o-i[0])&&25>=s)return!0}return!1}function Ne(t){var e=Ye(t,t),o=e.preventDefault;return e.preventDefault=function(){t.preventDefault(),o()},e.pointerId=1,e.isPrimary=!0,e.pointerType="mouse",e}function Fe(t){Le.call(this,t,{MSPointerDown:this.Sm,MSPointerMove:this.Tm,MSPointerUp:this.Wm,MSPointerOut:this.Um,MSPointerOver:this.Vm,MSPointerCancel:this.Rm,MSGotPointerCapture:this.Pm,MSLostPointerCapture:this.Qm}),this.a=t.g,this.g=["","unavailable","touch","pen","mouse"]}function Oe(t,e){var o=e;return"number"==typeof e.pointerType&&(o=Ye(e,e),o.pointerType=t.g[e.pointerType]),o}function De(t){Le.call(this,t,{pointerdown:this.Kp,pointermove:this.Lp,pointerup:this.Op,pointerout:this.Mp,pointerover:this.Np,pointercancel:this.Jp,gotpointercapture:this.Wl,lostpointercapture:this.Hm})}function ke(t,e,o){ye.call(this,t),this.b=e,t=o||{},this.buttons=Ue(t),this.pressure=Ge(t,this.buttons),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()})}function Ue(t){if(t.buttons||Tv)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}function Ge(t,e){return t.pressure?t.pressure:e?.5:0}function Be(t,e){Le.call(this,t,{touchstart:this.Qq,touchmove:this.Pq,touchend:this.Oq,touchcancel:this.Nq}),this.a=t.g,this.j=e,this.g=void 0,this.f=0,this.c=void 0}function Ve(t,e,o){return e=Ye(e,o),e.pointerId=o.identifier+2,e.bubbles=!0,e.cancelable=!0,e.detail=t.f,e.button=0,e.buttons=1,e.width=o.webkitRadiusX||o.radiusX||0,e.height=o.webkitRadiusY||o.radiusY||0,e.pressure=o.webkitForce||o.force||.5,e.isPrimary=t.g===o.identifier,e.pointerType="touch",e.clientX=o.clientX,e.clientY=o.clientY,e.screenX=o.screenX,e.screenY=o.screenY,e}function Xe(t,e,o){function i(){e.preventDefault()}var r,n=Array.prototype.slice.call(e.changedTouches),s=n.length;for(r=0;r<s;++r){var p=Ve(t,e,n[r]);p.preventDefault=i,o.call(t,e,p)}}function ze(t,e){var o=t.j.g;if(e=e.changedTouches[0],t.g===e.identifier){var i=[e.clientX,e.clientY];o.push(i),setTimeout(function(){var t=o.indexOf(i);-1<t&&o.splice(t,1)},2500)}}function We(t){ge.call(this),this.f=t,this.g={},this.i={},this.a=[],bv?Ze(this,new De(this)):wv?Ze(this,new Fe(this)):(t=new Re(this),Ze(this,t),mv&&Ze(this,new Be(this,t))),t=this.a.length;for(var e,o=0;o<t;o++)e=this.a[o],qe(this,Object.keys(e.i))}function Ze(t,e){var o=Object.keys(e.i);o&&(o.forEach(function(t){var o=e.i[t];o&&(this.i[t]=o.bind(e))},t),t.a.push(e))}function qe(t,e){e.forEach(function(t){se(this.f,t,this.c,this)},t)}function Ke(t,e){e.forEach(function(t){ae(this.f,t,this.c,this)},t)}function Ye(t,e){for(var o,i={},r=0,n=Ev.length;r<n;r++)o=Ev[r][0],i[o]=t[o]||e[o]||Ev[r][1];return i}function He(t,e,o){e.bubbles=!1,$e(t,"pointerleave",e,o)}function Je(t,e,o){t.out(e,o);var i=e.target,r=e.relatedTarget;i&&r&&i.contains(r)||He(t,e,o)}function _e(t,e,o){e.bubbles=!0,$e(t,"pointerover",e,o);var i=e.target,r=e.relatedTarget;i&&r&&i.contains(r)||(e.bubbles=!1,$e(t,"pointerenter",e,o))}function $e(t,e,o,i){t.b(new ke(e,i,o))}function Qe(t,e){t.b(new ke(e.type,e,e))}function to(t,e){ge.call(this),this.g=t,this.j=0,this.l=!1,this.i=[],this.D=e?e*yv:yv,this.c=null,t=this.g.a,this.O=0,this.o={},this.f=new We(t),this.a=null,this.s=se(this.f,"pointerdown",this.pm,this),this.v=se(this.f,"pointermove",this.mq,this)}function eo(t,e){var o=new je("click",t.g,e);t.b(o),0!==t.j?(clearTimeout(t.j),t.j=0,o=new je("dblclick",t.g,e),t.b(o)):t.j=setTimeout(function(){this.j=0;var t=new je("singleclick",this.g,e);this.b(t)}.bind(t),250)}function oo(t,e){"pointerup"==e.type||"pointercancel"==e.type?delete t.o[e.pointerId]:"pointerdown"==e.type&&(t.o[e.pointerId]=!0),t.O=Object.keys(t.o).length}function io(t,e){return Math.abs(e.clientX-t.c.clientX)>t.D||Math.abs(e.clientY-t.c.clientY)>t.D}function ro(t,e){this.s=t,this.c=e,this.b=[],this.g=[],this.a={}}function no(t){var e=t.b,o=t.g,i=e[0];return 1==e.length?(e.length=0,o.length=0):(e[0]=e.pop(),o[0]=o.pop(),so(t,0)),e=t.c(i),delete t.a[e],i}function so(t,e){for(var o=t.b,i=t.g,r=o.length,n=o[e],s=i[e],p=e;e<r>>1;){var a=2*e+1,h=2*e+2;a=h<r&&i[h]<i[a]?h:a,o[e]=o[a],i[e]=i[a],e=a}o[e]=n,i[e]=s,po(t,p,e)}function po(t,e,o){var i=t.b;t=t.g;for(var r=i[o],n=t[o];o>e;){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 ao(t){var e,o=t.s,i=t.b,r=t.g,n=0,s=i.length;for(e=0;e<s;++e){var p=i[e],a=o(p);1/0==a?delete t.a[t.c(p)]:(r[n]=a,i[n++]=p)}for(i.length=n,r.length=n,o=(t.b.length>>1)-1;0<=o;o--)so(t,o)}function ho(t,e){ro.call(this,function(e){return t.apply(null,e)},function(t){return t[0].lb()}),this.v=e,this.j=0,this.f={}}function lo(t,e,o){for(var i,r,n,s=0,p=!1;t.j<e&&s<o&&0<t.b.length;)r=no(t)[0],n=r.lb(),i=r.getState(),5===i?p=!0:0!==i||n in t.f||(t.f[n]=!0,++t.j,++s,r.load());0===s&&p&&t.v()}function uo(t){return function(e){if(e)return[l(e[0],t[0],t[2]),l(e[1],t[1],t[3])]}}function co(t){return t}function yo(t){return function(e,o,i){if(void 0!==e)return e=It(t,e,i),e=l(e+o,0,t.length-1),o=Math.floor(e),e!=o&&o<t.length-1?t[o]/Math.pow(t[o]/t[o+1],e-o):t[o]}}function fo(t,e,o){return function(i,r,n){if(void 0!==i)return i=Math.max(Math.floor(Math.log(e/i)/Math.log(t)+(-n/2+.5))+r,0),void 0!==o&&(i=Math.min(i,o)),e/Math.pow(t,i)}}function go(t){if(void 0!==t)return 0}function vo(t,e){if(void 0!==t)return t+e}function mo(t){var e=2*Math.PI/t;return function(t,o){if(void 0!==t)return t=Math.floor((t+o)/e+.5)*e}}function bo(){var t=f(5);return function(e,o){if(void 0!==e)return Math.abs(e+o)<=t?0:e+o}}function wo(t,e){return t=void 0!==e?t.toFixed(e):""+t,e=t.indexOf("."),e=-1===e?t.length:e,2<e?t:Array(3-e).join("0")+t}function xo(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(i>r)return 1;if(r>i)return-1}return 0}function So(t,e){return t[0]+=e[0],t[1]+=e[1],t}function Mo(t,e){var o=e.Bd(),i=e.xa();e=i[0],i=i[1];var r=t[0]-e;t=t[1]-i,0===r&&0===t&&(r=1);var n=Math.sqrt(r*r+t*t);return[e+o*r/n,i+o*t/n]}function Po(t,e){var o=t[0];t=t[1];var i=e[0],r=e[1];e=i[0],i=i[1];var n=r[0];r=r[1];var s=n-e,p=r-i;return o=0===s&&0===p?0:(s*(o-e)+p*(t-i))/(s*s+p*p||0),0>=o?(t=e,o=i):1<=o?(t=n,o=r):(t=e+o*s,o=i+o*p),[t,o]}function To(t,e,o){e=g(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 i=Math.ceil((i-3600*n-60*s)*r)/r,60<=i&&(i=0,s+=1),60<=s&&(s=0,n+=1),n+"° "+wo(s)+"′ "+wo(i,o)+"″"+(0==e?"":" "+t.charAt(0>e?1:0))}function Eo(t,e,o){return t?e.replace("{x}",t[0].toFixed(o)).replace("{y}",t[1].toFixed(o)):""}function Ao(t,e){for(var o=!0,i=t.length-1;0<=i;--i)if(t[i]!=e[i]){o=!1;break}return o}function Co(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 jo(t,e){t[0]*=e,t[1]*=e}function Lo(t,e){var o=t[0]-e[0];return t=t[1]-e[1],o*o+t*t}function Ro(t,e){return Math.sqrt(Lo(t,e))}function Io(t,e){return Lo(t,Po(t,e))}function No(t,e){return Eo(t,"{x}, {y}",e)}function Fo(t){return Math.pow(t,3)}function Oo(t){return 1-Fo(1-t)}function Do(t){return 3*t*t-2*t*t*t}function ko(t){return t}function Uo(){return!0}function Go(){return!1}function Bo(t,e,o,i,r,n){for(var s=n||[],p=0;e<o;e+=i){var a=t[e],h=t[e+1];s[p++]=r[0]*a+r[2]*h+r[4],s[p++]=r[1]*a+r[3]*h+r[5]}return n&&s.length!=p&&(s.length=p),s}function Vo(t,e,o,i,r,n,s){for(var p,a=s||[],h=0;e<o;e+=i)for(a[h++]=t[e]+r,a[h++]=t[e+1]+n,p=e+2;p<e+i;++p)a[h++]=t[p];return s&&a.length!=h&&(a.length=h),a}function Xo(){return[1,0,0,1,0,0]}function zo(t){return Zo(t,1,0,0,1,0,0)}function Wo(t,e){var o=t[0],i=t[1],r=t[2],n=t[3],s=t[4],p=t[5],a=e[0],h=e[1],l=e[2],u=e[3],c=e[4];return e=e[5],t[0]=o*a+r*h,t[1]=i*a+n*h,t[2]=o*l+r*u,t[3]=i*l+n*u,t[4]=o*c+r*e+s,t[5]=i*c+n*e+p,t}function Zo(t,e,o,i,r,n,s){return t[0]=e,t[1]=o,t[2]=i,t[3]=r,t[4]=n,t[5]=s,t}function qo(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 Ko(t,e){var o=e[0],i=e[1];return e[0]=t[0]*o+t[2]*i+t[4],e[1]=t[1]*o+t[3]*i+t[5],e}function Yo(t,e){var o=Math.cos(e);e=Math.sin(e),Wo(t,Zo(Av,o,e,-e,o,0,0))}function Ho(t,e,o){return Wo(t,Zo(Av,e,0,0,o,0,0))}function Jo(t,e,o){Wo(t,Zo(Av,1,0,0,1,e,o))}function _o(t,e,o,i,r,n,s,p){var a=Math.sin(n);return n=Math.cos(n),t[0]=i*n,t[1]=r*a,t[2]=-i*a,t[3]=r*n,t[4]=s*i*n-p*i*a+e,t[5]=s*r*a+p*r*n+o,t}function $o(t){var e=t[0]*t[3]-t[1]*t[2];h(0!==e,32);var o=t[0],i=t[1],r=t[2],n=t[3],s=t[4],p=t[5];return t[0]=n/e,t[1]=-i/e,t[2]=-r/e,t[3]=o/e,t[4]=(r*p-n*s)/e,t[5]=-(o*p-i*s)/e,t}function Qo(){me.call(this),this.s=C(),this.v=-1,this.i={},this.l=this.f=0,this.N=Xo()}function ti(){Qo.call(this),this.ja="XY",this.a=2,this.A=null}function ei(t){var e;return"XY"==t?e=2:"XYZ"==t||"XYM"==t?e=3:"XYZM"==t&&(e=4),e}function oi(t,e,o){t.a=ei(e),t.ja=e,t.A=o}function ii(t,e,o,i){if(e)o=ei(e);else{for(e=0;e<i;++e){if(0===o.length)return t.ja="XY",void(t.a=2);o=o[0]}o=o.length;var r;2==o?r="XY":3==o?r="XYZ":4==o&&(r="XYZM"),e=r}t.ja=e,t.a=o}function ri(t,e,o,i){for(var r=0,n=t[o-i],s=t[o-i+1];e<o;e+=i){var p=t[e],a=t[e+1];r+=s*p-n*a,n=p,s=a}return r/2}function ni(t,e,o,i){var r,n=0,s=0;for(r=o.length;s<r;++s){var p=o[s];n+=ri(t,e,p,i),e=p}return n}function si(t,e,o,i,r,n,s){var p=t[e],a=t[e+1],h=t[o]-p,l=t[o+1]-a;if(0!==h||0!==l)if(1<(n=((r-p)*h+(n-a)*l)/(h*h+l*l)))e=o;else if(0<n){for(r=0;r<i;++r)s[r]=d(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 pi(t,e,o,i,r){var n=t[e],s=t[e+1];for(e+=i;e<o;e+=i){var p=t[e],a=t[e+1];n=y(n,s,p,a),n>r&&(r=n),n=p,s=a}return r}function ai(t,e,o,i,r){var n,s=0;for(n=o.length;s<n;++s){var p=o[s];r=pi(t,e,p,i,r),e=p}return r}function hi(t,e,o,i,r,n,s,p,a,h,l){if(e==o)return h;if(0===r){var u=y(s,p,t[e],t[e+1]);if(u<h){for(l=0;l<i;++l)a[l]=t[e+l];return a.length=i,u}return h}for(var c=l||[NaN,NaN],f=e+i;f<o;)if(si(t,f-i,f,i,s,p,c),(u=y(s,p,c[0],c[1]))<h){for(h=u,l=0;l<i;++l)a[l]=c[l];a.length=i,f+=i}else f+=i*Math.max((Math.sqrt(u)-Math.sqrt(h))/r|0,1);if(n&&(si(t,o-i,e,i,s,p,c),(u=y(s,p,c[0],c[1]))<h)){for(h=u,l=0;l<i;++l)a[l]=c[l];a.length=i}return h}function li(t,e,o,i,r,n,s,p,a,h,l){l=l||[NaN,NaN];var u,c=0;for(u=o.length;c<u;++c){var y=o[c];h=hi(t,e,y,i,r,n,s,p,a,h,l),e=y}return h}function ui(t,e){var o,i=0,r=0;for(o=e.length;r<o;++r)t[i++]=e[r];return i}function ci(t,e,o,i){var r,n=0;for(r=o.length;n<r;++n){var s,p=o[n];for(s=0;s<i;++s)t[e++]=p[s]}return e}function yi(t,e,o,i,r){r=r||[];var n,s=0,p=0;for(n=o.length;p<n;++p)e=ci(t,e,o[p],i),r[s++]=e;return r.length=s,r}function fi(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 gi(t,e,o,i,r){r=void 0!==r?r:[];var n,s=0,p=0;for(n=o.length;p<n;++p){var a=o[p];r[s++]=fi(t,e,a,i,r[s]),e=a}return r.length=s,r}function di(t,e,o,i,r){r=void 0!==r?r:[];var n,s=0,p=0;for(n=o.length;p<n;++p){var a=o[p];r[s++]=gi(t,e,a,i,r[s]),e=a[a.length-1]}return r.length=s,r}function vi(t,e,o,i,r,n,s){var p=(o-e)/i;if(3>p){for(;e<o;e+=i)n[s++]=t[e],n[s++]=t[e+1];return s}var a=Array(p);a[0]=1,a[p-1]=1,o=[e,o-i];for(var h,l=0;0<o.length;){var u=o.pop(),y=o.pop(),f=0,g=t[y],d=t[y+1],v=t[u],m=t[u+1];for(h=y+i;h<u;h+=i){var b=c(t[h],t[h+1],g,d,v,m);b>f&&(l=h,f=b)}f>r&&(a[(l-e)/i]=1,y+i<l&&o.push(y,l),l+i<u&&o.push(l,u))}for(h=0;h<p;++h)a[h]&&(n[s++]=t[e+h*i],n[s++]=t[e+h*i+1]);return s}function mi(t,e,o,i,r,n,s,p){var a,h=0;for(a=o.length;h<a;++h){var l=o[h];t:{var u=t,c=l,y=i,f=r,g=n,d=s;if(e!=c){var v=f*Math.round(u[e]/f),m=f*Math.round(u[e+1]/f);e+=y,g[d++]=v,g[d++]=m;do{var b=f*Math.round(u[e]/f);if(s=f*Math.round(u[e+1]/f),(e+=y)==c){g[d++]=b,g[d++]=s,s=d;break t}}while(b==v&&s==m);for(;e<c;){var w=f*Math.round(u[e]/f),x=f*Math.round(u[e+1]/f);if(e+=y,w!=b||x!=s){var S=b-v,M=s-m,P=w-v,T=x-m;S*T==M*P&&(0>S&&P<S||S==P||0<S&&P>S)&&(0>M&&T<M||M==T||0<M&&T>M)||(g[d++]=b,g[d++]=s,v=b,m=s),b=w,s=x}}g[d++]=b,g[d++]=s}s=d}p.push(s),e=l}return s}function bi(t,e){ti.call(this),this.c=this.j=-1,this.na(t,e)}function wi(t,e,o){oi(t,e,o),t.u()}function xi(t,e){ti.call(this),this.na(t,e)}function Si(t,e,o,i,r){return!k(r,function(r){return!Mi(t,e,o,i,r[0],r[1])})}function Mi(t,e,o,i,r,n){for(var s=0,p=t[o-i],a=t[o-i+1];e<o;e+=i){var h=t[e],l=t[e+1];a<=n?l>n&&0<(h-p)*(n-a)-(r-p)*(l-a)&&s++:l<=n&&0>(h-p)*(n-a)-(r-p)*(l-a)&&s--,p=h,a=l}return 0!==s}function Pi(t,e,o,i,r,n){if(0===o.length||!Mi(t,e,o[0],i,r,n))return!1;var s;for(e=1,s=o.length;e<s;++e)if(Mi(t,o[e-1],o[e],i,r,n))return!1;return!0}function Ti(t,e,o,i,r,n,s){var p,a=r[n+1],h=[],l=o[0],u=t[l-i],c=t[l-i+1];for(p=e;p<l;p+=i){var y=t[p],f=t[p+1];(a<=c&&f<=a||c<=a&&a<=f)&&(u=(a-c)/(f-c)*(y-u)+u,h.push(u)),u=y,c=f}for(l=NaN,c=-1/0,h.sort(Lt),u=h[0],p=1,f=h.length;p<f;++p){y=h[p];var g=Math.abs(y-u);g>c&&(u=(u+y)/2,Pi(t,e,o,i,u,a)&&(l=u,c=g)),u=y}return isNaN(l)&&(l=r[n]),s?(s.push(l,a,c),s):[l,a,c]}function Ei(t,e,o,i,r,n){for(var s,p=[t[e],t[e+1]],a=[];e+i<o;e+=i){if(a[0]=t[e+i],a[1]=t[e+i+1],s=r.call(n,p,a))return s;p[0]=a[0],p[1]=a[1]}return!1}function Ai(t,e,o,i,r){var n=D(C(),t,e,o,i);return!!Y(r,n)&&(!!(T(r,n)||n[0]>=r[0]&&n[2]<=r[2]||n[1]>=r[1]&&n[3]<=r[3])||Ei(t,e,o,i,function(t,e){var o=!1,i=A(r,t),n=A(r,e);if(1===i||1===n)o=!0;else{var s=r[0],p=r[1],a=r[2],h=r[3],l=e[0];e=e[1],t=(e-t[1])/(l-t[0]),2&n&&!(2&i)&&(o=l-(e-h)/t,o=o>=s&&o<=a),o||!(4&n)||4&i||(o=e-(l-a)*t,o=o>=p&&o<=h),o||!(8&n)||8&i||(o=l-(e-p)/t,o=o>=s&&o<=a),o||!(16&n)||16&i||(o=e-(l-s)*t,o=o>=p&&o<=h)}return o}))}function Ci(t,e,o,i,r){var n=o[0];if(!(Ai(t,e,n,i,r)||Mi(t,e,n,i,r[0],r[1])||Mi(t,e,n,i,r[0],r[3])||Mi(t,e,n,i,r[2],r[1])||Mi(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(Si(t,o[e-1],o[e],i,r))return!1;return!0}function ji(t,e,o,i){for(var r=0,n=t[o-i],s=t[o-i+1];e<o;e+=i){var p=t[e],a=t[e+1];r+=(p-n)*(a+s),n=p,s=a}return 0<r}function Li(t,e,o,i){var r=0;i=void 0!==i&&i;var n,s=0;for(n=e.length;s<n;++s){var p=e[s];if(r=ji(t,r,p,o),0===s){if(i&&r||!i&&!r)return!1}else if(i&&!r||!i&&r)return!1;r=p}return!0}function Ri(t,e,o,i,r){r=void 0!==r&&r;var n,s=0;for(n=o.length;s<n;++s){var p=o[s],a=ji(t,e,p,i);if(0===s?r&&a||!r&&!a:r&&!a||!r&&a){a=t;for(var h=p,l=i;e<h-l;){var u;for(u=0;u<l;++u){var c=a[e+u];a[e+u]=a[h-l+u],a[h-l+u]=c}e+=l,h-=l}}e=p}return e}function Ii(t,e,o,i){var r,n=0,s=0;for(r=e.length;s<r;++s)n=Ri(t,n,e[s],o,i);return n}
function Ni(t,e){ti.call(this),this.c=[],this.o=-1,this.D=null,this.T=this.C=this.B=-1,this.j=null,this.na(t,e)}function Fi(t,e,o,i){var r=i||32;i=[];var n;for(n=0;n<r;++n)Nt(i,t.offset(e,o,2*Math.PI*n/r));return i.push(i[0],i[1]),t=new Ni(null),t.ba("XY",i,[i.length]),t}function Oi(t){var e=t[0],o=t[1],i=t[2];return t=t[3],e=[e,o,e,t,i,t,i,o,e,o],o=new Ni(null),o.ba("XY",e,[e.length]),o}function Di(t,e,o){var i=e||32,r=t.pa();e=t.ja;var n=new Ni(null,e);i=r*(i+1),r=Array(i);for(var s=0;s<i;s++)r[s]=0;return n.ba(e,r,[r.length]),ki(n,t.xa(),t.Bd(),o),n}function ki(t,e,o,i){var r=t.da(),n=t.ja,s=t.pa(),p=t.pb(),a=r.length/s-1;i=i||0;for(var h,l,u=0;u<=a;++u)l=u*s,h=i+2*g(u,a)*Math.PI/a,r[l]=e[0]+o*Math.cos(h),r[l+1]=e[1]+o*Math.sin(h);t.ba(n,r,p)}function Ui(t){me.call(this),t=zd({},t),this.f=[0,0],this.c=[],this.Ff=this.Ff.bind(this),this.v=mt(t.projection),Gi(this,t)}function Gi(t,e){var o={};o.center=void 0!==e.center?e.center:null;var i=void 0!==e.minZoom?e.minZoom:0,r=void 0!==e.maxZoom?e.maxZoom:28,n=void 0!==e.zoomFactor?e.zoomFactor:2;if(void 0!==e.resolutions){var s=e.resolutions,p=s[i],a=void 0!==s[r]?s[r]:s[s.length-1];r=yo(s)}else{p=mt(e.projection),a=p.G(),s=(a?Math.max(K(a),z(a)):360*Wd.degrees/p.Bc())/256/Math.pow(2,0);var h=s/Math.pow(2,28);p=e.maxResolution,void 0!==p?i=0:p=s/Math.pow(n,i),a=e.minResolution,void 0===a&&(a=void 0!==e.maxZoom?void 0!==e.maxResolution?p/Math.pow(n,r):s/Math.pow(n,r):h),r=i+Math.floor(Math.log(p/a)/Math.log(n)),a=p/Math.pow(n,r-i),r=fo(n,p,r-i)}t.a=p,t.i=a,t.D=n,t.j=e.resolutions,t.s=i,(void 0!==e.enableRotation?e.enableRotation:1)?(i=e.constrainRotation,i=void 0===i||!0===i?bo():!1===i?vo:"number"==typeof i?mo(i):vo):i=go,t.l={center:void 0!==e.extent?uo(e.extent):co,resolution:r,rotation:i},void 0!==e.resolution?o.resolution=e.resolution:void 0!==e.zoom&&(o.resolution=t.constrainResolution(t.a,e.zoom-t.s),t.j&&(o.resolution=l(Number(t.Pa()||o.resolution),t.i,t.a))),o.rotation=void 0!==e.rotation?e.rotation:0,t.H(o),t.C=e}function Bi(t,e){var o=zd({},t.C);return void 0!==o.resolution?o.resolution=t.Pa():o.zoom=t.lg(),o.center=t.xa(),o.rotation=t.Sa(),zd({},o,e)}function Vi(t,e,o){var i=t.xa();if(void 0!==i){var r=[i[0]-o[0],i[1]-o[1]];Co(r,e-t.Sa()),So(r,o)}return r}function Xi(t,e,o){var i,r=t.xa();return t=t.Pa(),void 0!==r&&void 0!==t&&(i=[o[0]-e*(o[0]-r[0])/t,o[1]-e*(o[1]-r[1])/t]),i}function zi(t){var e=[100,100];return t='.ol-viewport[data-view="'+i(t)+'"]',(t=document.querySelector(t))&&(t=getComputedStyle(t),e[0]=parseInt(t.width,10),e[1]=parseInt(t.height,10)),e}function Wi(t){var e=t.a,o=Math.log(e/t.i)/Math.log(2);return function(t){return e/Math.pow(2,t*o)}}function Zi(t){var e=t.a,o=Math.log(e/t.i)/Math.log(2);return function(t){return Math.log(e/t)/Math.log(2)/o}}function qi(t){return!!t.xa()&&void 0!==t.Pa()}function Ki(t,e,o){t.f[e]+=o,t.u()}function Yi(t,e){var o=document.createElement("CANVAS");return t&&(o.width=t),e&&(o.height=e),o.getContext("2d")}function Hi(t,e){var o=e.parentNode;o&&o.replaceChild(t,e)}function Ji(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function _i(t){me.call(this);var e=zd({},t);e.opacity=void 0!==t.opacity?t.opacity:1,e.visible=void 0===t.visible||t.visible,e.zIndex=void 0!==t.zIndex?t.zIndex:0,e.maxResolution=void 0!==t.maxResolution?t.maxResolution:1/0,e.minResolution=void 0!==t.minResolution?t.minResolution:0,this.H(e),this.a={layer:this,Te:!0}}function $i(t){return t.a.opacity=l(t.nc(),0,1),t.a.Vj=t.hg(),t.a.visible=t.Jb(),t.a.extent=t.G(),t.a.zIndex=t.Ba(),t.a.maxResolution=t.lc(),t.a.minResolution=Math.max(t.mc(),0),t.a}function Qi(t){var e=t||{};t=zd({},e),delete t.layers,e=e.layers,_i.call(this,t),this.i=[],this.c={},se(this,be(Cv),this.im,this),e?Array.isArray(e)?e=new Se(e.slice(),{unique:!0}):h(e instanceof Se,43):e=new Se(void 0,{unique:!0}),this.Qi(e)}function tr(t,e){switch(t){case"MAP_RENDERER":t=jv,t.push(e);break;case"LAYER_RENDERER":t=Lv,t.push(e);break;default:throw Error("Unsupported plugin type: "+t)}}function er(t){for(var e=0,o=t.length;e<o;++e)tr("LAYER_RENDERER",t[e])}function or(t){me.call(this);var e=ir(t);this.ob=void 0!==t.loadTilesWhileAnimating&&t.loadTilesWhileAnimating,this.sc=void 0!==t.loadTilesWhileInteracting&&t.loadTilesWhileInteracting,this.ra=void 0!==t.pixelRatio?t.pixelRatio:yv,this.Md=e.logos,this.V=function(){this.j=void 0,this.pq.call(this)}.bind(this),this.La=Xo(),this.If=Xo(),this.bb=0,this.D=this.C=this.B=this.f=this.c=null,this.a=document.createElement("DIV"),this.a.className="ol-viewport"+(mv?" ol-touch":""),this.a.style.position="relative",this.a.style.overflow="hidden",this.a.style.width="100%",this.a.style.height="100%",this.a.style.msTouchAction="none",this.a.style.touchAction="none",this.o=document.createElement("DIV"),this.o.className="ol-overlaycontainer",this.a.appendChild(this.o),this.v=document.createElement("DIV"),this.v.className="ol-overlaycontainer-stopevent";for(var o="click dblclick mousedown touchstart MSPointerDown pointerdown mousewheel wheel".split(" "),i=0,r=o.length;i<r;++i)se(this.v,o[i],fe);this.a.appendChild(this.v),this.ca=new to(this,t.moveTolerance);for(var n in Pv)se(this.ca,Pv[n],this.bi,this);this.$=e.keyboardEventTarget,this.s=null,se(this.a,"wheel",this.yd,this),se(this.a,"mousewheel",this.yd,this),this.controls=e.controls||new Se,this.interactions=e.interactions||new Se,this.l=e.overlays,this.Fg={},this.pc=e.Im.create(this.a,this),this.T=null,this.Ea=[],this.ua=new ho(this.Tl.bind(this),this.zm.bind(this)),this.N={},se(this,be("layergroup"),this.fm,this),se(this,be("view"),this.Am,this),se(this,be("size"),this.um,this),se(this,be("target"),this.ym,this),this.H(e.values),this.controls.forEach(function(t){t.setMap(this)},this),se(this.controls,"add",function(t){t.element.setMap(this)},this),se(this.controls,"remove",function(t){t.element.setMap(null)},this),this.interactions.forEach(function(t){t.setMap(this)},this),se(this.interactions,"add",function(t){t.element.setMap(this)},this),se(this.interactions,"remove",function(t){t.element.setMap(null)},this),this.l.forEach(this.zh,this),se(this.l,"add",function(t){this.zh(t.element)},this),se(this.l,"remove",function(t){var e=t.element.id;void 0!==e&&delete this.Fg[e.toString()],t.element.setMap(null)},this)}function ir(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var o={},r={};if(void 0===t.logo||"boolean"==typeof t.logo&&t.logo)r["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAHGAAABxgEXwfpGAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAhNQTFRF////AP//AICAgP//AFVVQECA////K1VVSbbbYL/fJ05idsTYJFtbbcjbJllmZszWWMTOIFhoHlNiZszTa9DdUcHNHlNlV8XRIVdiasrUHlZjIVZjaMnVH1RlIFRkH1RkH1ZlasvYasvXVsPQH1VkacnVa8vWIVZjIFRjVMPQa8rXIVVkXsXRsNveIFVkIFZlIVVj3eDeh6GmbMvXH1ZkIFRka8rWbMvXIFVkIFVjIFVkbMvWH1VjbMvWIFVlbcvWIFVla8vVIFVkbMvWbMvVH1VkbMvWIFVlbcvWIFVkbcvVbMvWjNPbIFVkU8LPwMzNIFVkbczWIFVkbsvWbMvXIFVkRnB8bcvW2+TkW8XRIFVkIlZlJVloJlpoKlxrLl9tMmJwOWd0Omh1RXF8TneCT3iDUHiDU8LPVMLPVcLPVcPQVsPPVsPQV8PQWMTQWsTQW8TQXMXSXsXRX4SNX8bSYMfTYcfTYsfTY8jUZcfSZsnUaIqTacrVasrVa8jTa8rWbI2VbMvWbcvWdJObdcvUdszUd8vVeJaee87Yfc3WgJyjhqGnitDYjaarldPZnrK2oNbborW5o9bbo9fbpLa6q9ndrL3ArtndscDDutzfu8fJwN7gwt7gxc/QyuHhy+HizeHi0NfX0+Pj19zb1+Tj2uXk29/e3uLg3+Lh3+bl4uXj4ufl4+fl5Ofl5ufl5ujm5+jmySDnBAAAAFp0Uk5TAAECAgMEBAYHCA0NDg4UGRogIiMmKSssLzU7PkJJT1JTVFliY2hrdHZ3foSFhYeJjY2QkpugqbG1tre5w8zQ09XY3uXn6+zx8vT09vf4+Pj5+fr6/P39/f3+gz7SsAAAAVVJREFUOMtjYKA7EBDnwCPLrObS1BRiLoJLnte6CQy8FLHLCzs2QUG4FjZ5GbcmBDDjxJBXDWxCBrb8aM4zbkIDzpLYnAcE9VXlJSWlZRU13koIeW57mGx5XjoMZEUqwxWYQaQbSzLSkYGfKFSe0QMsX5WbjgY0YS4MBplemI4BdGBW+DQ11eZiymfqQuXZIjqwyadPNoSZ4L+0FVM6e+oGI6g8a9iKNT3o8kVzNkzRg5lgl7p4wyRUL9Yt2jAxVh6mQCogae6GmflI8p0r13VFWTHBQ0rWPW7ahgWVcPm+9cuLoyy4kCJDzCm6d8PSFoh0zvQNC5OjDJhQopPPJqph1doJBUD5tnkbZiUEqaCnB3bTqLTFG1bPn71kw4b+GFdpLElKIzRxxgYgWNYc5SCENVHKeUaltHdXx0dZ8uBI1hJ2UUDgq82CM2MwKeibqAvSO7MCABq0wXEPiqWEAAAAAElFTkSuQmCC"]="https://openlayers.org/";else{var n=t.logo;"string"==typeof n?r[n]="":n instanceof HTMLElement?r[i(n).toString()]=n:n&&(h("string"==typeof n.href,44),h("string"==typeof n.src,45),r[n.src]=n.href)}n=t.layers instanceof Qi?t.layers:new Qi({layers:t.layers}),o.layergroup=n,o.target=t.target,o.view=void 0!==t.view?t.view:new Ui;var s;void 0!==t.renderer?(Array.isArray(t.renderer)?s=t.renderer:"string"==typeof t.renderer?s=[t.renderer]:h(!1,46),0<=s.indexOf("dom")&&(s=s.concat(Rv))):s=Rv,n=0;var p=s.length;t:for(;n<p;++n)for(var a=s[n],l=0,u=jv.length;l<u;++l){var c=jv[l];if(c.handles(a)){var y=c;break t}}if(!y)throw Error("Unable to create a map renderer for types: "+s.join(", "));if(void 0!==t.controls)if(Array.isArray(t.controls))var f=new Se(t.controls.slice());else h(t.controls instanceof Se,47),f=t.controls;if(void 0!==t.interactions)if(Array.isArray(t.interactions))var g=new Se(t.interactions.slice());else h(t.interactions instanceof Se,48),g=t.interactions;return void 0!==t.overlays?Array.isArray(t.overlays)?t=new Se(t.overlays.slice()):(h(t.overlays instanceof Se,49),t=t.overlays):t=new Se,{controls:f,interactions:g,keyboardEventTarget:e,logos:r,overlays:t,Im:y,values:o}}function rr(t){me.call(this),this.element=t.element?t.element:null,this.a=this.T=null,this.s=[],this.render=t.render?t.render:o,t.target&&this.i(t.target)}function nr(t){var e=zd({},t);delete e.source,_i.call(this,e),this.o=this.v=this.s=null,t.map&&this.setMap(t.map),se(this,be("source"),this.wm,this),this.hd(t.source?t.source:null)}function sr(t,e){return t.visible&&e>=t.minResolution&&e<t.maxResolution}function pr(t){t=t||{},this.v=document.createElement("UL"),this.l=document.createElement("LI"),this.v.appendChild(this.l),this.l.style.display="none",this.c=void 0===t.collapsed||t.collapsed,this.j=void 0===t.collapsible||t.collapsible,this.j||(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.o=document.createElement("span"),this.o.textContent=i):this.o=i,i=void 0!==t.label?t.label:"i","string"==typeof i?(this.D=document.createElement("span"),this.D.textContent=i):this.D=i;var r=this.j&&!this.c?this.o:this.D;i=document.createElement("button"),i.setAttribute("type","button"),i.title=o,i.appendChild(r),se(i,"click",this.Bn,this),o=document.createElement("div"),o.className=e+" ol-unselectable ol-control"+(this.c&&this.j?" ol-collapsed":"")+(this.j?"":" ol-uncollapsible"),o.appendChild(this.v),o.appendChild(i),rr.call(this,{element:o,render:t.render?t.render:ar,target:t.target}),this.B=[],this.C=!0,this.N={}}function ar(t){if(t=t.frameState){for(var e={},o=[],i=t.layerStatesArray,r=t.viewState.resolution,n=0,s=i.length;n<s;++n){var p=i[n];if(sr(p,r)&&(p=p.layer.ha())&&(p=p.C)&&(p=p(t)))if(Array.isArray(p))for(var a=0,h=p.length;a<h;++a)p[a]in e||(o.push(p[a]),e[p[a]]=!0);else p in e||(o.push(p),e[p]=!0)}if(!Ot(o,this.B)){for(;this.v.lastChild!==this.l;)this.v.removeChild(this.v.lastChild);for(e=0,i=o.length;e<i;++e)r=document.createElement("LI"),r.innerHTML=o[e],this.v.appendChild(r);0===o.length&&0<this.B.length?this.element.classList.add("ol-logo-only"):0===this.B.length&&0<o.length&&this.element.classList.remove("ol-logo-only"),e=0<o.length||!tt(t.logos),this.C!=e&&(this.element.style.display=e?"":"none",this.C=e),this.B=o,t=t.logos,o=this.N;for(u in o)u in t||(Ji(o[u]),delete o[u]);for(var l in t)if(i=t[l],i instanceof HTMLElement&&(this.l.appendChild(i),o[l]=i),!(l in o)){var u=new Image;u.src=l,""===i?e=u:(e=document.createElement("a"),e.href=i,e.appendChild(u)),this.l.appendChild(e),o[l]=e}this.l.style.display=tt(t)?"none":""}}else this.C&&(this.element.style.display="none",this.C=!1)}function hr(t){t.element.classList.toggle("ol-collapsed"),t.c?Hi(t.o,t.D):Hi(t.D,t.o),t.c=!t.c}function lr(t){t=t||{};var e=void 0!==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?t.tipLabel:"Reset rotation";o=document.createElement("button"),o.className=e+"-reset",o.setAttribute("type","button"),o.title=i,o.appendChild(this.c),se(o,"click",lr.prototype.D,this),i=document.createElement("div"),i.className=e+" ol-unselectable ol-control",i.appendChild(o),e=t.render?t.render:ur,this.l=t.resetNorth?t.resetNorth:void 0,rr.call(this,{element:i,render:e,target:t.target}),this.v=void 0!==t.duration?t.duration:250,this.j=void 0===t.autoHide||t.autoHide,this.o=void 0,this.j&&this.element.classList.add("ol-hidden")}function ur(t){if(t=t.frameState){if((t=t.viewState.rotation)!=this.o){var e="rotate("+t+"rad)";if(this.j){var o=this.element.classList.contains("ol-hidden");o||0!==t?o&&0!==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.o=t}}function cr(t){t=t||{};var e=void 0!==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",p=document.createElement("button");p.className=e+"-in",p.setAttribute("type","button"),p.title=n,p.appendChild("string"==typeof i?document.createTextNode(i):i),se(p,"click",cr.prototype.j.bind(this,o)),i=document.createElement("button"),i.className=e+"-out",i.setAttribute("type","button"),i.title=s,i.appendChild("string"==typeof r?document.createTextNode(r):r),se(i,"click",cr.prototype.j.bind(this,-o)),o=document.createElement("div"),o.className=e+" ol-unselectable ol-control",o.appendChild(p),o.appendChild(i),rr.call(this,{element:o,target:t.target}),this.c=void 0!==t.duration?t.duration:250}function yr(t){t=t||{};var e=new Se;return(void 0!==t.zoom?t.zoom:1)&&e.push(new cr(t.zoomOptions)),(void 0!==t.rotate?t.rotate:1)&&e.push(new lr(t.rotateOptions)),(void 0!==t.attribution?t.attribution:1)&&e.push(new pr(t.attributionOptions)),e}function fr(t,e,o){this.i=t,this.c=e,this.f=o,this.b=[],this.a=this.g=0}function gr(t){t.b.length=0,t.g=0,t.a=0}function dr(t){if(6>t.b.length)return!1;var e=Date.now()-t.f,o=t.b.length-3;if(t.b[o+2]<e)return!1;for(var i=o-3;0<i&&t.b[i+2]>e;)i-=3;if((e=t.b[o+2]-t.b[i+2])<1e3/60)return!1;var r=t.b[o]-t.b[i];return o=t.b[o+1]-t.b[i+1],t.g=Math.atan2(o,r),t.a=Math.sqrt(r*r+o*o)/e,t.a>t.c}function vr(t){me.call(this),this.v=null,this.Ha(!0),this.handleEvent=t.handleEvent}function mr(t,e,o,i){if(void 0!==e){var r=t.Sa(),n=t.xa();void 0!==r&&n&&0<i?t.animate({rotation:e,anchor:o,duration:i,easing:Oo}):t.rotate(e,o)}}function br(t,e,o,i){var r=t.Pa();if(void 0!==(e=t.constrainResolution(r,e,0))){var n=t.j;e=l(e,t.i||n[n.length-1],t.a||n[0])}o&&void 0!==e&&e!==r&&(n=t.xa(),o=Xi(t,e,o),o=t.Sc(o),o=[(e*n[0]-r*o[0])/(e-r),(e*n[1]-r*o[1])/(e-r)]),wr(t,e,o,i)}function wr(t,e,o,i){if(e){var r=t.Pa(),n=t.xa();void 0!==r&&n&&e!==r&&i?t.animate({resolution:e,anchor:o,duration:i,easing:Oo}):(o&&(o=Xi(t,e,o),t.ub(o)),t.gd(e))}}function xr(t){t=t||{},this.a=t.delta?t.delta:1,vr.call(this,{handleEvent:Sr}),this.f=void 0!==t.duration?t.duration:250}function Sr(t){var e=!1,o=t.originalEvent;if("dblclick"==t.type){e=t.coordinate,o=o.shiftKey?-this.a:this.a;br(t.map.aa(),o,e,this.f),t.preventDefault(),e=!0}return!e}function Mr(t){return t=t.originalEvent,t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey}function Pr(t){return t=t.originalEvent,t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey}function Tr(t){return t=t.originalEvent,0==t.button&&!(uv&&cv&&t.ctrlKey)}function Er(t){return"pointermove"==t.type}function Ar(t){return"singleclick"==t.type}function Cr(t){return t=t.originalEvent,!t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey}function jr(t){return t=t.originalEvent,!t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey}function Lr(t){return"INPUT"!==(t=t.originalEvent.target.tagName)&&"SELECT"!==t&&"TEXTAREA"!==t}function Rr(t){return h(t.b,56),"mouse"==t.b.pointerType}function Ir(t){return t=t.b,t.isPrimary&&0===t.button}function Nr(t){t=t||{},vr.call(this,{handleEvent:t.handleEvent?t.handleEvent:Or}),this.ck=t.handleDownEvent?t.handleDownEvent:Go,this.Ek=t.handleDragEvent?t.handleDragEvent:o,this.Kk=t.handleMoveEvent?t.handleMoveEvent:o,this.Lk=t.handleUpEvent?t.handleUpEvent:Go,this.D=!1,this.$={},this.l=[]}function Fr(t){for(var e=t.length,o=0,i=0,r=0;r<e;r++)o+=t[r].clientX,i+=t[r].clientY;return[o/e,i/e]}function Or(t){if(!(t instanceof je))return!0;var e=!1,o=t.type;if("pointerdown"===o||"pointerdrag"===o||"pointerup"===o){o=t.b;var i=o.pointerId.toString();"pointerup"==t.type?delete this.$[i]:"pointerdown"==t.type?this.$[i]=o:i in this.$&&(this.$[i]=o),this.l=Q(this.$)}return this.D?"pointerdrag"==t.type?this.Ek(t):"pointerup"==t.type&&(this.D=this.Lk(t)&&0<this.l.length):"pointerdown"==t.type?(this.D=t=this.ck(t),e=this.jd(t)):"pointermove"==t.type&&this.Kk(t),!e}function Dr(t){Nr.call(this,{handleDownEvent:Gr,handleDragEvent:kr,handleUpEvent:Ur}),t=t||{},this.a=t.kinetic,this.f=null,this.o=t.condition?t.condition:Cr,this.j=!1}function kr(t){var e=this.l,o=Fr(e);if(e.length==this.s){if(this.a&&this.a.b.push(o[0],o[1],Date.now()),this.f){var i=this.f[0]-o[0],r=o[1]-this.f[1];t=t.map.aa();var n=t.getState();i=[i,r],jo(i,n.resolution),Co(i,n.rotation),So(i,n.center),i=t.Sc(i),t.ub(i)}}else this.a&&gr(this.a);this.f=o,this.s=e.length}function Ur(t){var e=t.map;if(t=e.aa(),0===this.l.length){if(!this.j&&this.a&&dr(this.a)){var o=this.a;o=(o.c-o.a)/o.i;var i=this.a.g,r=t.xa();r=e.Ia(r),e=e.Ra([r[0]-o*Math.cos(i),r[1]-o*Math.sin(i)]),t.animate({center:t.Sc(e),duration:500,easing:Oo})}return Ki(t,1,-1),!1}return this.a&&gr(this.a),this.f=null,!0}function Gr(t){if(0<this.l.length&&this.o(t)){var e=t.map.aa();return this.f=null,this.D||Ki(e,1,1),e.Ac()&&e.ub(t.frameState.viewState.center)