vcm_thirdparty.js 641 KB
Newer Older
Patrick's avatar
Patrick committed
1
2
// Ol-Cesium. See https://github.com/openlayers/ol-cesium/
// License: https://github.com/openlayers/ol-cesium/blob/master/LICENSE
Patrick's avatar
Patrick committed
3
// Version: v3.7-55-g38fe032c7a
Patrick's avatar
Patrick committed
4
5
6
7
8
9

(function(){'use strict';var k,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function ca(){ca=function(){};ba.Symbol||(ba.Symbol=da)}var da=function(){var a=0;return function(b){return"jscomp_symbol_"+(b||"")+a++}}();
function ea(){ca();var a=ba.Symbol.iterator;a||(a=ba.Symbol.iterator=ba.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(this)}});ea=function(){}}function fa(a){var b=0;return ha(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})}function ha(a){ea();a={next:a};a[ba.Symbol.iterator]=function(){return this};return a}
function ia(a){if(!(a instanceof Array)){ea();var b=a[Symbol.iterator];a=b?b.call(a):fa(a);for(var c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}function ja(a,b){if(b){var c=ba;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&aa(c,a,{configurable:!0,writable:!0,value:b})}}ja("Object.getOwnPropertySymbols",function(a){return a?a:function(){return[]}});
ja("Object.assign",function(a){return a?a:function(a,c){for(var b=1;b<arguments.length;b++){var e=arguments[b];if(e)for(var f in e)Object.prototype.hasOwnProperty.call(e,f)&&(a[f]=e[f])}return a}});ja("Math.cosh",function(a){if(a)return a;var b=Math.exp;return function(a){a=Number(a);return(b(a)+b(-a))/2}});ja("Number.EPSILON",function(){return Math.pow(2,-52)});ja("Object.is",function(a){return a?a:function(a,c){return a===c?0!==a||1/a===1/c:a!==a&&c!==c}});
ja("Number.isFinite",function(a){return a?a:function(a){return"number"!==typeof a?!1:!isNaN(a)&&Infinity!==a&&-Infinity!==a}});var ka=this;function r(a,b){a=a.split(".");var c=ka;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b}
Patrick's avatar
Patrick committed
10
11
12
function la(a,b){function c(){}c.prototype=b.prototype;a.gs=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.bs=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};function ma(a){if(Error.captureStackTrace)Error.captureStackTrace(this,ma);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))}la(ma,Error);ma.prototype.name="CustomError";function na(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")};function oa(a,b){b.unshift(a);ma.call(this,na.apply(null,b));b.shift()}la(oa,ma);oa.prototype.name="AssertionError";function qa(a,b){throw new oa("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));};var sa,ta;function v(a,b){a.prototype=Object.create(b.prototype);a.prototype.constructor=a}function ua(){}function x(a){return a.zj||(a.zj=++va)}var va=0;var wa="function"===typeof Object.assign?Object.assign:function(a,b){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var c=Object(a),d=1,e=arguments.length;d<e;++d){var f=arguments[d];if(void 0!==f&&null!==f)for(var g in f)f.hasOwnProperty(g)&&(c[g]=f[g])}return c};function xa(a){for(var b in a)delete a[b]}function za(a){var b=[],c;for(c in a)b.push(a[c]);return b}function Aa(a){for(var b in a)return!1;return!b};function Ba(a){function b(b){var c=a.listener,e=a.Qh||a.target;a.Sh&&Ca(a);return c.call(e,b)}return a.Rh=b}function Ea(a,b,c,d){for(var e,f=0,g=a.length;f<g;++f)if(e=a[f],e.listener===b&&e.Qh===c)return d&&(e.deleteIndex=f),e}function Fa(a,b){return(a=a.Za)?a[b]:void 0}function Ga(a){var b=a.Za;b||(b=a.Za={});return b}
function Ha(a,b){var c=Fa(a,b);if(c){for(var d=0,e=c.length;d<e;++d)a.removeEventListener(b,c[d].Rh),xa(c[d]);c.length=0;if(c=a.Za)delete c[b],0===Object.keys(c).length&&delete a.Za}}function y(a,b,c,d,e){var f=Ga(a),g=f[b];g||(g=f[b]=[]);(f=Ea(g,c,d,!1))?e||(f.Sh=!1):(f={Qh:d,Sh:!!e,listener:c,target:a,type:b},a.addEventListener(b,Ba(f)),g.push(f));return f}function Ia(a,b,c,d){return y(a,b,c,d,!0)}function Ja(a,b,c,d){(a=Fa(a,b))&&(c=Ea(a,c,d,!0))&&Ca(c)}
function Ca(a){if(a&&a.target){a.target.removeEventListener(a.type,a.Rh);var b=Fa(a.target,a.type);if(b){var c="deleteIndex"in a?a.deleteIndex:b.indexOf(a);-1!==c&&b.splice(c,1);0===b.length&&Ha(a.target,a.type)}xa(a)}}function Ka(a){var b=Ga(a),c;for(c in b)Ha(a,c)};function La(){}La.prototype.Db=!1;function Ma(a){a.Db||(a.Db=!0,a.xa())}La.prototype.xa=ua;function Na(a){this.type=a;this.target=null}Na.prototype.preventDefault=Na.prototype.stopPropagation=function(){this.lq=!0};function Oa(a){a.stopPropagation()};function Qa(){this.Ba={};this.ta={};this.ea={}}v(Qa,La);Qa.prototype.addEventListener=function(a,b){var c=this.ea[a];c||(c=this.ea[a]=[]);-1===c.indexOf(b)&&c.push(b)};
Patrick's avatar
Patrick committed
13
14
15
Qa.prototype.b=function(a){var b="string"===typeof a?new Na(a):a;a=b.type;b.target=this;var c=this.ea[a];if(c){a in this.ta||(this.ta[a]=0,this.Ba[a]=0);++this.ta[a];for(var d=0,e=c.length;d<e;++d)if(!1===c[d].call(this,b)||b.lq){var f=!1;break}--this.ta[a];if(0===this.ta[a]){b=this.Ba[a];for(delete this.Ba[a];b--;)this.removeEventListener(a,ua);delete this.ta[a]}return f}};Qa.prototype.xa=function(){Ka(this)};function Ra(a,b){return b?b in a.ea:0<Object.keys(a.ea).length}
Qa.prototype.removeEventListener=function(a,b){var c=this.ea[a];c&&(b=c.indexOf(b),a in this.Ba?(c[b]=ua,++this.Ba[a]):(c.splice(b,1),0===c.length&&delete this.ea[a]))};function Sa(){Qa.call(this);this.g=0}v(Sa,Qa);function Ta(a){if(Array.isArray(a))for(var b=0,c=a.length;b<c;++b)Ca(a[b]);else Ca(a)}k=Sa.prototype;k.u=function(){++this.g;this.b("change")};k.M=function(){return this.g};k.H=function(a,b,c){if(Array.isArray(a)){for(var d=a.length,e=Array(d),f=0;f<d;++f)e[f]=y(this,a[f],b,c);return e}return y(this,a,b,c)};k.once=function(a,b,c){if(Array.isArray(a)){for(var d=a.length,e=Array(d),f=0;f<d;++f)e[f]=Ia(this,a[f],b,c);return e}return Ia(this,a,b,c)};
k.K=function(a,b,c){if(Array.isArray(a))for(var d=0,e=a.length;d<e;++d)Ja(this,a[d],b,c);else Ja(this,a,b,c)};function Va(a){this.message="Assertion failed. See https://openlayers.org/en/latest/doc/errors/#"+a+" for details.";this.code=a;this.name="AssertionError"}v(Va,Error);function Wa(a){Sa.call(this);x(this);this.I={};void 0!==a&&this.J(a)}v(Wa,Sa);var Xa={};function Ya(a){return Xa.hasOwnProperty(a)?Xa[a]:Xa[a]="change:"+a.toString()}k=Wa.prototype;k.get=function(a){var b;this.I.hasOwnProperty(a)&&(b=this.I[a]);return b};k.P=function(){return[].concat(Object.keys(this.I),Object.getOwnPropertySymbols(this.I))};k.L=function(){return Object.assign({},this.I)};function Za(a,b,c){var d=Ya(b);a.b(new ab(d,b,c));a.b(new ab("propertychange",b,c))}
Patrick's avatar
Patrick committed
16
17
k.set=function(a,b,c){c?this.I[a]=b:(c=this.I[a],this.I[a]=b,c!==b&&Za(this,a,c))};k.J=function(a,b){if(a)for(var c,d=[].concat(Object.keys(a),Object.getOwnPropertySymbols(a)),e=d.length,f=0;f<e;f++)c=d[f],this.set(c,a[c],b)};k.S=function(a,b){if(a in this.I){var c=this.I[a];delete this.I[a];b||Za(this,a,c)}};function ab(a,b,c){Na.call(this,a);this.key=b;this.oldValue=c}v(ab,Na);function bb(a,b){Wa.call(this);this.c=!!(b||{}).unique;this.a=a?a:[];if(this.c)for(a=0,b=this.a.length;a<b;++a)cb(this,this.a[a],a);db(this)}v(bb,Wa);k=bb.prototype;k.clear=function(){for(;0<this.rc();)this.pop()};k.Gg=function(a){var b;var c=0;for(b=a.length;c<b;++c)this.push(a[c]);return this};k.forEach=function(a,b){this.a.forEach(a,b)};k.ln=function(){return this.a};k.item=function(a){return this.a[a]};k.rc=function(){return this.get(eb)};
k.ff=function(a,b){this.c&&cb(this,b);this.a.splice(a,0,b);db(this);this.b(new fb("add",b))};k.pop=function(){return this.jh(this.rc()-1)};k.push=function(a){this.c&&cb(this,a);var b=this.rc();this.ff(b,a);return this.rc()};k.remove=function(a){var b=this.a,c;var d=0;for(c=b.length;d<c;++d)if(b[d]===a)return this.jh(d)};k.jh=function(a){var b=this.a[a];this.a.splice(a,1);db(this);this.b(new fb("remove",b));return b};
Patrick's avatar
Patrick committed
18
19
20
21
22
23
24
25
k.gr=function(a,b){var c=this.rc();if(a<c)this.c&&cb(this,b,a),c=this.a[a],this.a[a]=b,this.b(new fb("remove",c)),this.b(new fb("add",b));else{for(;c<a;++c)this.ff(c,void 0);this.ff(a,b)}};function db(a){a.set(eb,a.a.length)}function cb(a,b,c){for(var d=0,e=a.a.length;d<e;++d)if(a.a[d]===b&&d!==c)throw new Va(58);}var eb="length";function fb(a,b){Na.call(this,a);this.element=b}v(fb,Na);function gb(a,b){if(!a)throw new Va(b);};function hb(a){for(var b=ib(),c=0,d=a.length;c<d;++c)jb(b,a[c]);return b}function kb(a,b,c){return c?(c[0]=a[0]-b,c[1]=a[1]-b,c[2]=a[2]+b,c[3]=a[3]+b,c):[a[0]-b,a[1]-b,a[2]+b,a[3]+b]}function lb(a,b){return b?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b):a.slice()}function mb(a,b,c){b=b<a[0]?a[0]-b:a[2]<b?b-a[2]:0;a=c<a[1]?a[1]-c:a[3]<c?c-a[3]:0;return b*b+a*a}function nb(a,b){return ob(a,b[0],b[1])}function pb(a,b){return a[0]<=b[0]&&b[2]<=a[2]&&a[1]<=b[1]&&b[3]<=a[3]}
function ob(a,b,c){return a[0]<=b&&b<=a[2]&&a[1]<=c&&c<=a[3]}function qb(a,b){var c=a[1],d=a[2],e=a[3],f=b[0];b=b[1];var g=0;f<a[0]?g|=16:f>d&&(g|=4);b<c?g|=8:b>e&&(g|=2);0===g&&(g=1);return g}function ib(){return[Infinity,Infinity,-Infinity,-Infinity]}function rb(a,b,c,d,e){return e?(e[0]=a,e[1]=b,e[2]=c,e[3]=d,e):[a,b,c,d]}function sb(a,b){var c=a[0];a=a[1];return rb(c,a,c,a,b)}function tb(a,b,c,d,e){e=rb(Infinity,Infinity,-Infinity,-Infinity,e);return ub(e,a,b,c,d)}
function vb(a,b){return a[0]==b[0]&&a[2]==b[2]&&a[1]==b[1]&&a[3]==b[3]}function wb(a,b){b[0]<a[0]&&(a[0]=b[0]);b[2]>a[2]&&(a[2]=b[2]);b[1]<a[1]&&(a[1]=b[1]);b[3]>a[3]&&(a[3]=b[3]);return a}function jb(a,b){b[0]<a[0]&&(a[0]=b[0]);b[0]>a[2]&&(a[2]=b[0]);b[1]<a[1]&&(a[1]=b[1]);b[1]>a[3]&&(a[3]=b[1])}function ub(a,b,c,d,e){for(;c<d;c+=e){var f=a,g=b[c],h=b[c+1];f[0]=Math.min(f[0],g);f[1]=Math.min(f[1],h);f[2]=Math.max(f[2],g);f[3]=Math.max(f[3],h)}return a}
function xb(a,b,c){var d;return(d=b.call(c,yb(a)))||(d=b.call(c,zb(a)))||(d=b.call(c,Ab(a)))?d:(d=b.call(c,Bb(a)))?d:!1}function Cb(a){var b=0;Db(a)||(b=Eb(a)*Fb(a));return b}function yb(a){return[a[0],a[1]]}function zb(a){return[a[2],a[1]]}function Gb(a){return[(a[0]+a[2])/2,(a[1]+a[3])/2]}
function Hb(a,b,c,d,e){var f=b*d[0]/2;d=b*d[1]/2;b=Math.cos(c);var g=Math.sin(c);c=f*b;f*=g;b*=d;var h=d*g,l=a[0],m=a[1];a=l-c+h;d=l-c-h;g=l+c-h;c=l+c+h;h=m-f-b;l=m-f+b;var n=m+f+b;f=m+f-b;return rb(Math.min(a,d,g,c),Math.min(h,l,n,f),Math.max(a,d,g,c),Math.max(h,l,n,f),e)}function Fb(a){return a[3]-a[1]}function Ib(a,b,c){c=c?c:ib();Jb(a,b)&&(c[0]=a[0]>b[0]?a[0]:b[0],c[1]=a[1]>b[1]?a[1]:b[1],c[2]=a[2]<b[2]?a[2]:b[2],c[3]=a[3]<b[3]?a[3]:b[3]);return c}function Bb(a){return[a[0],a[3]]}
function Ab(a){return[a[2],a[3]]}function Eb(a){return a[2]-a[0]}function Jb(a,b){return a[0]<=b[2]&&a[2]>=b[0]&&a[1]<=b[3]&&a[3]>=b[1]}function Db(a){return a[2]<a[0]||a[3]<a[1]}function Kb(a,b){var c=(a[2]-a[0])/2*(b-1);b=(a[3]-a[1])/2*(b-1);a[0]-=c;a[2]+=c;a[1]-=b;a[3]+=b}
function Lb(a,b,c){a=[a[0],a[1],a[0],a[3],a[2],a[1],a[2],a[3]];b(a,a,2);var d=[a[0],a[2],a[4],a[6]],e=[a[1],a[3],a[5],a[7]];b=Math.min.apply(null,d);a=Math.min.apply(null,e);d=Math.max.apply(null,d);e=Math.max.apply(null,e);return rb(b,a,d,e,c)};function Mb(a,b,c){return Math.min(Math.max(a,b),c)}var Nb=function(){var a;"cosh"in Math?a=Math.cosh:a=function(a){a=Math.exp(a);return(a+1/a)/2};return a}();function Ob(a){gb(0<a,29);return Math.pow(2,Math.ceil(Math.log(a)/Math.LN2))}function Pb(a,b,c,d,e,f){var g=e-c,h=f-d;if(0!==g||0!==h){var l=((a-c)*g+(b-d)*h)/(g*g+h*h);1<l?(c=e,d=f):0<l&&(c+=g*l,d+=h*l)}return Qb(a,b,c,d)}function Qb(a,b,c,d){a=c-a;b=d-b;return a*a+b*b}function Rb(a){return a*Math.PI/180}
function Sb(a,b){a%=b;return 0>a*b?a+b:a}function Tb(a,b,c){return a+c*(b-a)};function Ub(a){Wa.call(this);var b=wa({},a);b.opacity=void 0!==a.opacity?a.opacity:1;b.visible=void 0!==a.visible?a.visible:!0;b.zIndex=void 0!==a.zIndex?a.zIndex:0;b.maxResolution=void 0!==a.maxResolution?a.maxResolution:Infinity;b.minResolution=void 0!==a.minResolution?a.minResolution:0;this.J(b);this.c={layer:this,hf:!0}}v(Ub,Wa);
Patrick's avatar
Patrick committed
26
27
function Vb(a){a.c.opacity=Mb(a.La(),0,1);a.c.fk=a.xg();a.c.visible=a.lb();a.c.extent=a.D();a.c.zIndex=a.Da();a.c.maxResolution=a.tc();a.c.minResolution=Math.max(a.uc(),0);return a.c}k=Ub.prototype;k.D=function(){return this.get("extent")};k.tc=function(){return this.get("maxResolution")};k.uc=function(){return this.get("minResolution")};k.La=function(){return this.get("opacity")};k.lb=function(){return this.get("visible")};k.Da=function(){return this.get("zIndex")};
k.Oc=function(a){this.set("extent",a)};k.Sc=function(a){this.set("maxResolution",a)};k.Tc=function(a){this.set("minResolution",a)};k.Pc=function(a){this.set("opacity",a)};k.ec=function(a){this.set("visible",a)};k.jc=function(a){this.set("zIndex",a)};function Wb(a){var b=a||{};a=wa({},b);delete a.layers;b=b.layers;Ub.call(this,a);this.i=[];this.a={};y(this,Ya(Xb),this.wm,this);b?Array.isArray(b)?b=new bb(b.slice(),{unique:!0}):gb(b instanceof bb,43):b=new bb(void 0,{unique:!0});this.$i(b)}v(Wb,Ub);k=Wb.prototype;k.Zd=function(){};k.df=function(){this.lb()&&this.u()};
Patrick's avatar
Patrick committed
28
k.wm=function(){this.i.forEach(Ca);this.i.length=0;var a=this.Tb();this.i.push(y(a,"add",this.vm,this),y(a,"remove",this.xm,this));for(var b in this.a)this.a[b].forEach(Ca);xa(this.a);a=a.a;var c;b=0;for(c=a.length;b<c;b++){var d=a[b];this.a[x(d).toString()]=[y(d,"propertychange",this.df,this),y(d,"change",this.df,this)]}this.u()};k.vm=function(a){a=a.element;var b=x(a).toString();this.a[b]=[y(a,"propertychange",this.df,this),y(a,"change",this.df,this)];this.u()};
Patrick's avatar
Patrick committed
29
30
31
k.xm=function(a){a=x(a.element).toString();this.a[a].forEach(Ca);delete this.a[a];this.u()};k.Tb=function(){return this.get(Xb)};k.$i=function(a){this.set(Xb,a)};
k.ug=function(a){var b=void 0!==a?a:[],c=b.length;this.Tb().forEach(function(a){a.ug(b)});a=Vb(this);var d;for(d=b.length;c<d;c++){var e=b[c];e.opacity*=a.opacity;e.visible=e.visible&&a.visible;e.maxResolution=Math.min(e.maxResolution,a.maxResolution);e.minResolution=Math.max(e.minResolution,a.minResolution);void 0!==a.extent&&(e.extent=void 0!==e.extent?Ib(e.extent,a.extent):a.extent)}return b};k.xg=function(){return"ready"};var Xb="layers";function Yb(a,b){this.map=a;this.view=a.Z();this.scene=b;a.Nb().Tb();this.c=a.Nb();this.ed={};this.g={};this.a={}}Yb.prototype.xh=function(){this.Nj(!0);for(var a in this.a)this.a[a].forEach(Ta);for(a in this.g)Ta(this.g[a]);this.a={};this.g={};this.ed={};Zb(this,this.c)};Yb.prototype.Sg=function(){};
function Zb(a,b){for(var c=[b];0<c.length;){b=c.splice(0,1)[0];var d=x(b).toString(),e=null;b instanceof Wb?($b(a,b),(e=a.$d(b))||b.Tb().forEach(function(a){a&&c.push(a)})):e=a.$d(b);e&&(a.ed[d]=e,a.g[d]=y(b,"change:zIndex",a.Sg,a),e.forEach(function(a){this.Pe(a)},a))}a.Sg()}function ac(a,b){b=x(b).toString();var c=a.ed[b];c&&(c.forEach(function(a){this.lh(a,!1);this.kg(a)},a),Ta(a.g[b]),delete a.g[b]);delete a.ed[b];return!!c}
Patrick's avatar
Patrick committed
32
33
34
35
36
37
function bc(a,b){b!==a.c&&(b=x(b).toString(),a.a[b].forEach(function(a){Ta(a)}),delete a.a[b],delete a.ed[b])}function cc(a,b){if(b)for(var c=[b];0<c.length;){b=c.splice(0,1)[0];var d=ac(a,b);b instanceof Wb&&(bc(a,b),d||b.Tb().forEach(function(a){c.push(a)}))}}
function $b(a,b){var c=x(b).toString(),d=[];a.a[c]=d;var e=[],f=function(){var a=b.Tb();a&&(e=[a.H("add",function(a){Zb(this,a.element)},this),a.H("remove",function(a){cc(this,a.element)},this)],d.push.apply(d,[].concat(ia(e))))}.bind(a);f();d.push(b.H("change:layers",function(){e.forEach(function(a){var b=d.indexOf(a);0<=b&&d.splice(b,1);Ta(a)});f()}))};function ec(a){this.i=a;this.g=a.b;this.j=!1;this.a=this.b.bind(this);this.o=new Cesium.Matrix4;this.c=0;this.f=!1;this.g.postRender.addEventListener(this.N.bind(this));this.l="";this.l="onwheel"in this.g.canvas?"wheel":document.onmousewheel?"mousewheel":"DOMMouseScroll";this.ta=Cesium.loadWithXhr.load;this.G=Cesium.TaskProcessor.prototype.a;this.ea=Cesium.Camera.prototype.setView;this.C=Cesium.Camera.prototype.move;this.B=Cesium.Camera.prototype.rotate;this.v=Cesium.Camera.prototype.lookAt;this.I=
Cesium.Camera.prototype.flyTo;fc(this)}function gc(a,b){a.g.canvas.addEventListener(b,a.a,!1)}
function fc(a){gc(a,"mousemove");gc(a,"mousedown");gc(a,"mouseup");gc(a,"touchstart");gc(a,"touchend");gc(a,"touchmove");window.PointerEvent&&(gc(a,"pointerdown"),gc(a,"pointerup"),gc(a,"pointermove"));gc(a,a.l);window.addEventListener("resize",a.a,!1);Cesium.loadWithXhr.load=function(b,c,d,e,f,g,h,l,m){g.promise.always(a.a);a.ta(b,c,d,e,f,g,h,l,m)};Cesium.TaskProcessor.prototype.a=function(b,c){b=a.G.call(this,b,c);var d=this;d.b||(c=d._worker,d.b=c.onmessage,c.onmessage=function(b){d.b(b);a.b()});
return b};Cesium.Camera.prototype.setView=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];a.ea.apply(this,c);a.b()};Cesium.Camera.prototype.move=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];a.C.apply(this,c);a.b()};Cesium.Camera.prototype.rotate=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];a.B.apply(this,c);a.b()};Cesium.Camera.prototype.lookAt=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];a.v.apply(this,
c);a.b()};Cesium.Camera.prototype.flyTo=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];a.I.apply(this,c);a.b()};a.i.R.Nb().H("change",a.a)}
Patrick's avatar
Patrick committed
38
39
ec.prototype.N=function(){var a=Date.now(),b=this.g,c=b.camera;Cesium.Matrix4.equalsEpsilon(this.o,c.viewMatrix,1E-5)||(this.c=a);var d=b.globe._surface;d=!d.tileProvider.ready||0<d._tileLoadQueueHigh.length||0<d._tileLoadQueueMedium.length||0<d._tileLoadQueueLow.length||0<d._debug.tilesWaitingForChildren;b=b.tweens;1E3>a-this.c||d||0!=b.length||(this.j&&console.log("stopping rendering @ "+Date.now()),this.i.qh(!0),this.f=!0);Cesium.Matrix4.clone(c.viewMatrix,this.o)};ec.prototype.s=function(){this.b()};
ec.prototype.b=function(){this.j&&this.f&&console.log("starting rendering @ "+Date.now());this.c=Date.now();this.i.qh(!1);this.f=!1};ec.prototype.Ba=function(a){this.j=a};/*
Patrick's avatar
Patrick committed
40
41
42
43
44

 Latitude/longitude spherical geodesy formulae taken from
 http://www.movable-type.co.uk/scripts/latlong.html
 Licensed under CC-BY-3.0.
*/
Patrick's avatar
Patrick committed
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
function hc(a){this.radius=a}hc.prototype.a=function(a){return jc(a,this.radius)};hc.prototype.b=function(a,b){return kc(a,b,this.radius)};hc.prototype.offset=function(a,b,c){var d=Rb(a[1]);b/=this.radius;var e=Math.asin(Math.sin(d)*Math.cos(b)+Math.cos(d)*Math.sin(b)*Math.cos(c));return[180*(Rb(a[0])+Math.atan2(Math.sin(c)*Math.sin(b)*Math.cos(d),Math.cos(b)-Math.sin(d)*Math.sin(e)))/Math.PI,180*e/Math.PI]};
function lc(a,b){var c=b||{},d=c.radius||6371008.8;c=c.projection||"EPSG:3857";a=a.clone().transform(c,"EPSG:4326");var e=a.U();c=0;var f;switch(e){case "Point":case "MultiPoint":break;case "LineString":case "LinearRing":b=a.T();c=mc(b,d);break;case "MultiLineString":case "Polygon":b=a.T();a=0;for(e=b.length;a<e;++a)c+=mc(b[a],d);break;case "MultiPolygon":b=a.T();a=0;for(e=b.length;a<e;++a){var g=b[a];var h=0;for(f=g.length;h<f;++h)c+=mc(g[h],d)}break;case "GeometryCollection":d=a.Dd();a=0;for(e=
d.length;a<e;++a)c+=lc(d[a],b);break;default:throw Error("Unsupported geometry type: "+e);}return c}function mc(a,b){for(var c=0,d=0,e=a.length;d<e-1;++d)c+=kc(a[d],a[d+1],b);return c}function kc(a,b,c){var d=Rb(a[1]),e=Rb(b[1]),f=(e-d)/2;a=Rb(b[0]-a[0])/2;d=Math.sin(f)*Math.sin(f)+Math.sin(a)*Math.sin(a)*Math.cos(d)*Math.cos(e);return 2*c*Math.atan2(Math.sqrt(d),Math.sqrt(1-d))}
function nc(a,b){var c=b||{},d=c.radius||6371008.8;c=c.projection||"EPSG:3857";a=a.clone().transform(c,"EPSG:4326");var e=a.U();c=0;var f;switch(e){case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "LinearRing":break;case "Polygon":b=a.T();c=Math.abs(jc(b[0],d));a=1;for(e=b.length;a<e;++a)c-=Math.abs(jc(b[a],d));break;case "MultiPolygon":b=a.T();a=0;for(e=b.length;a<e;++a){var g=b[a];c+=Math.abs(jc(g[0],d));var h=1;for(f=g.length;h<f;++h)c-=Math.abs(jc(g[h],d))}break;case "GeometryCollection":d=
a.Dd();a=0;for(e=d.length;a<e;++a)c+=nc(d[a],b);break;default:throw Error("Unsupported geometry type: "+e);}return c}function jc(a,b){for(var c=0,d=a.length,e=a[d-1][0],f=a[d-1][1],g=0;g<d;g++){var h=a[g][0],l=a[g][1];c+=Rb(h-e)*(2+Math.sin(Rb(f))+Math.sin(Rb(l)));e=h;f=l}return c*b*b/2};var oc=new hc(6370997);var pc={};pc.degrees=2*Math.PI*oc.radius/360;pc.ft=.3048;pc.m=1;pc["us-ft"]=1200/3937;var rc=null;function sc(a){this.tb=a.code;this.i=a.units;this.c=void 0!==a.extent?a.extent:null;this.f=void 0!==a.worldExtent?a.worldExtent:null;this.b=void 0!==a.axisOrientation?a.axisOrientation:"enu";this.g=void 0!==a.global?a.global:!1;this.a=!(!this.g||!this.c);this.l=a.getPointResolution;this.j=null;this.o=a.metersPerUnit;var b=a.code,c=rc||window.proj4;"function"==typeof c&&(b=c.defs(b),void 0!==b&&(void 0!==b.axis&&void 0===a.axisOrientation&&(this.b=b.axis),void 0===a.metersPerUnit&&(this.o=b.to_meter),
void 0===a.units&&(this.i=b.units)))}k=sc.prototype;k.vl=function(){return this.tb};k.D=function(){return this.c};k.Pb=function(){return this.i};k.dc=function(){return this.o||pc[this.i]};k.im=function(){return this.f};k.Um=function(){return this.g};k.kr=function(a){this.g=a;this.a=!(!a||!this.c)};k.Mo=function(a){this.c=a;this.a=!(!this.g||!a)};k.zr=function(a){this.f=a};k.jr=function(a){this.l=a};function tc(a){sc.call(this,{code:a,units:"m",extent:uc,global:!0,worldExtent:vc,getPointResolution:function(a,c){return a/Nb(c[1]/6378137)}})}v(tc,sc);var wc=6378137*Math.PI,uc=[-wc,-wc,wc,wc],vc=[-180,-85,180,85],xc="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(a){return new tc(a)});
function yc(a,b,c){var d=a.length;c=1<c?c:2;void 0===b&&(2<c?b=a.slice():b=Array(d));for(var e=0;e<d;e+=c){b[e]=wc*a[e]/180;var f=6378137*Math.log(Math.tan(Math.PI*(a[e+1]+90)/360));f>wc?f=wc:f<-wc&&(f=-wc);b[e+1]=f}return b}function zc(a,b,c){var d=a.length;c=1<c?c:2;void 0===b&&(2<c?b=a.slice():b=Array(d));for(var e=0;e<d;e+=c)b[e]=180*a[e]/wc,b[e+1]=360*Math.atan(Math.exp(a[e+1]/6378137))/Math.PI-90;return b};var Ac=new hc(6378137);function Bc(a,b){sc.call(this,{code:a,units:"degrees",extent:Cc,axisOrientation:b,global:!0,metersPerUnit:Dc,worldExtent:Cc})}v(Bc,sc);var Cc=[-180,-90,180,90],Dc=Math.PI*Ac.radius/180,Ec=[new Bc("CRS:84"),new Bc("EPSG:4326","neu"),new Bc("urn:ogc:def:crs:EPSG::4326","neu"),new Bc("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new Bc("urn:ogc:def:crs:OGC:1.3:CRS84"),new Bc("urn:ogc:def:crs:OGC:2:84"),new Bc("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Bc("urn:x-ogc:def:crs:EPSG:4326","neu")];var Fc={};var Gc={};function Hc(a,b,c){a=a.tb;b=b.tb;a in Gc||(Gc[a]={});Gc[a][b]=c}function Ic(a,b){var c;a in Gc&&b in Gc[a]&&(c=Gc[a][b]);return c};function Jc(a,b,c){var d=a.l;d?b=d(b,c):"degrees"!=a.Pb()&&(d=Kc(a,Lc("EPSG:4326")),b=[c[0]-b/2,c[1],c[0]+b/2,c[1],c[0],c[1]-b/2,c[0],c[1]+b/2],b=d(b,b,2),b=(oc.b(b.slice(0,2),b.slice(2,4))+oc.b(b.slice(4,6),b.slice(6,8)))/2,a=a.dc(),void 0!==a&&(b/=a));return b}function Mc(a){Nc(a);a.forEach(function(b){a.forEach(function(a){b!==a&&Hc(b,a,Oc)})})}function Pc(){Ec.forEach(function(a){xc.forEach(function(b){Hc(a,b,yc);Hc(b,a,zc)})})}function Qc(a){Fc[a.tb]=a;Hc(a,a,Oc)}
function Nc(a){var b=[];a.forEach(function(a){b.push(Qc(a))})}function Rc(a){return a?"string"===typeof a?Lc(a):a:Lc("EPSG:3857")}function Sc(a,b,c,d){a=Lc(a);b=Lc(b);Hc(a,b,Tc(c));Hc(b,a,Tc(d))}function Tc(a){return function(b,c,d){var e=b.length;d=void 0!==d?d:2;c=void 0!==c?c:Array(e);var f;for(f=0;f<e;f+=d){var g=a([b[f],b[f+1]]);c[f]=g[0];c[f+1]=g[1];for(g=d-1;2<=g;--g)c[f+g]=b[f+g]}return c}}
function Lc(a){var b=null;if(a instanceof sc)b=a;else if("string"===typeof a){b=Fc[a]||null;var c=rc||window.proj4;b||"function"!=typeof c||void 0===c.defs(a)||(b=new sc({code:a}),Qc(b))}return b}function Uc(a,b){if(a===b)return!0;var c=a.Pb()===b.Pb();return a.tb===b.tb?c:Kc(a,b)===Oc&&c}function Vc(a,b){a=Lc(a);b=Lc(b);return Kc(a,b)}
function Kc(a,b){var c=a.tb,d=b.tb,e=Ic(c,d);if(!e){var f=rc||window.proj4;if("function"==typeof f){var g=f.defs(c),h=f.defs(d);void 0!==g&&void 0!==h&&(g===h?Mc([b,a]):(e=f(d,c),Sc(b,a,e.forward,e.inverse)),e=Ic(c,d))}}e||(e=Wc);return e}function Wc(a,b){if(void 0!==b&&a!==b){for(var c=0,d=a.length;c<d;++c)b[c]=a[c];a=b}return a}function Oc(a,b){if(void 0!==b){for(var c=0,d=a.length;c<d;++c)b[c]=a[c];a=b}else a=a.slice();return a}function Xc(a,b,c){return Vc(b,c)(a,void 0,a.length)}
function Yc(a,b,c){b=Vc(b,c);return Lb(a,b)}function Zc(){Mc(xc);Mc(Ec);Pc()}Zc();function $c(a){var b=wa({},a);delete b.source;Ub.call(this,b);this.v=this.o=this.l=null;a.map&&this.setMap(a.map);y(this,Ya("source"),this.Jm,this);this.rd(a.source?a.source:null)}v($c,Ub);function ad(a,b){return a.visible&&b>=a.minResolution&&b<a.maxResolution}k=$c.prototype;k.ug=function(a){a=a?a:[];a.push(Vb(this));return a};k.ba=function(){return this.get("source")||null};k.xg=function(){var a=this.ba();return a?a.getState():"undefined"};k.Lo=function(){this.u()};
k.Jm=function(){this.v&&(Ca(this.v),this.v=null);var a=this.ba();a&&(this.v=y(a,"change",this.Lo,this));this.u()};k.setMap=function(a){this.l&&(Ca(this.l),this.l=null);a||this.u();this.o&&(Ca(this.o),this.o=null);a&&(this.l=y(a,"precompose",function(a){var b=Vb(this);b.hf=!1;b.zIndex=Infinity;a.frameState.layerStatesArray.push(b);a.frameState.layerStates[x(this)]=b},this),this.o=y(this,"change",a.render,a),this.u())};k.rd=function(a){this.set("source",a)};function bd(a,b,c,d){this.ga=a;this.da=b;this.ha=c;this.ka=d}function cd(a,b,c){return a.ga<=b&&b<=a.da&&a.ha<=c&&c<=a.ka}function dd(a,b){return a.ga==b.ga&&a.ha==b.ha&&a.da==b.da&&a.ka==b.ka}function ed(a,b){return a.ga<=b.da&&a.da>=b.ga&&a.ha<=b.ka&&a.ka>=b.ha};function fd(a,b){return a>b?1:a<b?-1:0}function gd(a,b){return 0<=a.indexOf(b)}function hd(a,b,c){var d=a.length;if(a[0]<=b)return 0;if(!(b<=a[d-1]))if(0<c)for(c=1;c<d;++c){if(a[c]<b)return c-1}else if(0>c)for(c=1;c<d;++c){if(a[c]<=b)return c}else for(c=1;c<d;++c){if(a[c]==b)return c;if(a[c]<b)return a[c-1]-b<b-a[c]?c-1:c}return d-1}function id(a,b){var c=Array.isArray(b)?b:[b],d=c.length;for(b=0;b<d;b++)a[a.length]=c[b]}
function kd(a,b){for(var c=a.length>>>0,d,e=0;e<c;e++)if(d=a[e],b(d,e,a))return d;return null}function ld(a,b){var c=a.length;if(c!==b.length)return!1;for(var d=0;d<c;d++)if(a[d]!==b[d])return!1;return!0}function md(a,b){var c=a.length,d=Array(a.length),e;for(e=0;e<c;e++)d[e]={index:e,value:a[e]};d.sort(function(a,c){return b(a.value,c.value)||a.index-c.index});for(e=0;e<a.length;e++)a[e]=d[e].value}function nd(a,b){var c;return a.every(function(d,e){c=e;return!b(d,e,a)})?-1:c}
function od(a,b){var c=b||fd;return a.every(function(b,e){if(0===e)return!0;b=c(a[e-1],b);return!(0<b||0===b)})};function pd(a,b){var c=document.createElement("CANVAS");a&&(c.width=a);b&&(c.height=b);return c.getContext("2d")}function qd(a,b){var c=b.parentNode;c&&c.replaceChild(a,b)}function rd(a){a&&a.parentNode&&a.parentNode.removeChild(a)};function sd(a,b){a=void 0!==b?a.toFixed(b):""+a;b=a.indexOf(".");b=-1===b?a.length:b;return 2<b?a:Array(3-b).join("0")+a}function td(a){a=(""+a).split(".");for(var b=["1","3"],c=0;c<Math.max(a.length,b.length);c++){var d=parseInt(a[c]||"0",10),e=parseInt(b[c]||"0",10);if(d>e)return 1;if(e>d)return-1}return 0};function ud(a,b){a[0]+=b[0];a[1]+=b[1];return a}function vd(a,b){var c=a[0];a=a[1];var d=b[0],e=b[1];b=d[0];d=d[1];var f=e[0];e=e[1];var g=f-b,h=e-d;c=0===g&&0===h?0:(g*(c-b)+h*(a-d))/(g*g+h*h||0);0>=c?(a=b,c=d):1<=c?(a=f,c=e):(a=b+c*g,c=d+c*h);return[a,c]}
function wd(a,b,c){a=Sb(a+180,360)-180;var d=Math.abs(3600*a);c=c||0;var e=Math.pow(10,c),f=Math.floor(d/3600),g=Math.floor((d-3600*f)/60);d=Math.ceil((d-3600*f-60*g)*e)/e;60<=d&&(d=0,g+=1);60<=g&&(g=0,f+=1);return f+"\u00b0 "+sd(g)+"\u2032 "+sd(d,c)+"\u2033 "+b.charAt(0>a?1:0)}function xd(a,b,c){return a?b.replace("{x}",a[0].toFixed(c)).replace("{y}",a[1].toFixed(c)):""}function yd(a,b){for(var c=!0,d=a.length-1;0<=d;--d)if(a[d]!=b[d]){c=!1;break}return c}
function zd(a,b){var c=Math.cos(b);b=Math.sin(b);var d=a[1]*c+a[0]*b;a[0]=a[0]*c-a[1]*b;a[1]=d;return a}function Ad(a,b){a[0]*=b;a[1]*=b}function Bd(a,b){var c=a[0]-b[0];a=a[1]-b[1];return c*c+a*a}function Cd(a,b){return Math.sqrt(Bd(a,b))}function Dd(a,b){return Bd(a,vd(a,b))}function Ed(a,b){return xd(a,"{x}, {y}",b)};function Fd(){return!0}function Gd(){return!1};function Hd(a,b,c,d,e){Na.call(this,a);this.vectorContext=b;this.frameState=c;this.context=d;this.glContext=e}v(Hd,Na);var Id=[0,0,0,1],Jd=[],Kd=[0,0,0,1];function Ld(a,b,c,d){0!==b&&(a.translate(c,d),a.rotate(b),a.translate(-c,-d))};var Md=/^#(?:[0-9a-f]{3}){1,2}$/i,Nd=/^([a-z]*)$/i;function Od(a){return Array.isArray(a)?a:Pd(a)}function Qd(a){if("string"!==typeof a){var b=a[0];b!=(b|0)&&(b=b+.5|0);var c=a[1];c!=(c|0)&&(c=c+.5|0);var d=a[2];d!=(d|0)&&(d=d+.5|0);a="rgba("+b+","+c+","+d+","+(void 0===a[3]?1:a[3])+")"}return a}
var Pd=function(){var a={},b=0;return function(c){if(a.hasOwnProperty(c))var d=a[c];else{if(1024<=b){d=0;for(var e in a)0===(d++&3)&&(delete a[e],--b)}d=c;Nd.exec(d)&&(e=document.createElement("div"),e.style.color=d,document.body.appendChild(e),d=getComputedStyle(e).color,document.body.removeChild(e));if(Md.exec(d)){var f=d.length-1;gb(3==f||6==f,54);var g=3==f?1:2;f=parseInt(d.substr(1+0*g,g),16);e=parseInt(d.substr(1+1*g,g),16);d=parseInt(d.substr(1+2*g,g),16);1==g&&(f=(f<<4)+f,e=(e<<4)+e,d=(d<<
4)+d);f=[f,e,d,1]}else 0==d.indexOf("rgba(")?(d=d.slice(5,-1).split(",").map(Number),f=Rd(d)):0==d.indexOf("rgb(")?(d=d.slice(4,-1).split(",").map(Number),d.push(1),f=Rd(d)):gb(!1,14);d=f;a[c]=d;++b}return d}}();function Rd(a){var b=[];b[0]=Mb(a[0]+.5|0,0,255);b[1]=Mb(a[1]+.5|0,0,255);b[2]=Mb(a[2]+.5|0,0,255);b[3]=Mb(a[3],0,1);return b};function Sd(a){return"string"===typeof a||a instanceof CanvasPattern||a instanceof CanvasGradient?a:Qd(a)};function Td(){Wa.call(this);this.o=ib();this.s=-1;this.i={};this.l=this.f=0}v(Td,Wa);k=Td.prototype;k.Fb=function(a,b){b=b?b:[NaN,NaN];this.Lb(a[0],a[1],b,Infinity);return b};k.yb=function(a){return this.hd(a[0],a[1])};k.hd=Gd;k.D=function(a){this.s!=this.g&&(this.o=this.Re(this.o),this.s=this.g);var b=this.o;a?(a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=b[3]):a=b;return a};k.Wb=function(a){return this.me(a*a)};k.transform=function(a,b){this.yc(Vc(a,b));return this};function Ud(a,b,c,d,e,f){for(var g=f?f:[],h=0;b<c;b+=d){var l=a[b],m=a[b+1];g[h++]=e[0]*l+e[2]*m+e[4];g[h++]=e[1]*l+e[3]*m+e[5]}f&&g.length!=h&&(g.length=h);return g}function Vd(a,b,c,d,e,f){var g=f?f:[],h=0,l,m;for(l=0;l<b;l+=c)for(g[h++]=a[l]+d,g[h++]=a[l+1]+e,m=l+2;m<l+c;++m)g[h++]=a[m];f&&g.length!=h&&(g.length=h);return g};function Wd(){Td.call(this);this.ma="XY";this.a=2;this.A=null}v(Wd,Td);function Xd(a){var b;"XY"==a?b=2:"XYZ"==a||"XYM"==a?b=3:"XYZM"==a&&(b=4);return b}k=Wd.prototype;k.hd=Gd;k.Re=function(a){return tb(this.A,0,this.A.length,this.a,a)};k.ac=function(){return this.A.slice(0,this.a)};k.ja=function(){return this.A};k.pc=function(){return this.A.slice(this.A.length-this.a)};k.qc=function(){return this.ma};
k.me=function(a){this.l!=this.g&&(xa(this.i),this.f=0,this.l=this.g);if(0>a||0!==this.f&&a<=this.f)return this;var b=a.toString();if(this.i.hasOwnProperty(b))return this.i[b];var c=this.Ed(a);if(c.ja().length<this.A.length)return this.i[b]=c;this.f=a;return this};k.Ed=function(){return this};k.ya=function(){return this.a};function Yd(a,b,c){a.a=Xd(b);a.ma=b;a.A=c}
function Zd(a,b,c,d){if(b)c=Xd(b);else{for(b=0;b<d;++b){if(0===c.length){a.ma="XY";a.a=2;return}c=c[0]}c=c.length;var e;2==c?e="XY":3==c?e="XYZ":4==c&&(e="XYZM");b=e}a.ma=b;a.a=c}k.yc=function(a){this.A&&(a(this.A,this.A,this.a),this.u())};
Patrick's avatar
Patrick committed
65
k.rotate=function(a,b){var c=this.ja();if(c){var d=c.length,e=this.ya(),f=c?c:[],g=Math.cos(a);a=Math.sin(a);var h=b[0];b=b[1];for(var l=0,m=0;m<d;m+=e){var n=c[m]-h,p=c[m+1]-b;f[l++]=h+n*g-p*a;f[l++]=b+n*a+p*g;for(n=m+2;n<m+e;++n)f[l++]=c[n]}c&&f.length!=l&&(f.length=l);this.u()}};
Patrick's avatar
Patrick committed
66
67
68
69
70
71
72
73
74
75
76
77
78
k.scale=function(a,b,c){var d=b;void 0===d&&(d=a);var e=c;e||(e=Gb(this.D()));if(c=this.ja()){b=c.length;var f=this.ya(),g=c?c:[],h=e[0];e=e[1];for(var l=0,m=0;m<b;m+=f){var n=c[m]-h,p=c[m+1]-e;g[l++]=h+a*n;g[l++]=e+d*p;for(n=m+2;n<m+f;++n)g[l++]=c[n]}c&&g.length!=l&&(g.length=l);this.u()}};k.translate=function(a,b){var c=this.ja();c&&(Vd(c,c.length,this.ya(),a,b,c),this.u())};var $d=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function ae(a,b){var c,d,e=$d.length;for(d=0;d<e;++d)try{if(c=a.getContext($d[d],b))return c}catch(f){}return null};var be,ce="undefined"!==typeof navigator?navigator.userAgent.toLowerCase():"",de=-1!==ce.indexOf("firefox"),ee=-1!==ce.indexOf("safari")&&-1==ce.indexOf("chrom"),fe=-1!==ce.indexOf("webkit")&&-1==ce.indexOf("edge"),ge=-1!==ce.indexOf("macintosh"),he=window.devicePixelRatio||1,ie=!1,je=function(){if(!("HTMLCanvasElement"in window))return!1;try{var a=document.createElement("CANVAS").getContext("2d");return a?(void 0!==a.setLineDash&&(ie=!0),!0):!1}catch(b){return!1}}(),ke="DeviceOrientationEvent"in
window,le="geolocation"in navigator,me="ontouchstart"in window,ne="PointerEvent"in window,oe=!!navigator.msPointerEnabled,pe=!1,qe,re=[];if("WebGLRenderingContext"in window)try{var se=ae(document.createElement("CANVAS"),{failIfMajorPerformanceCaveat:!0});se&&(pe=!0,qe=se.getParameter(se.MAX_TEXTURE_SIZE),re=se.getSupportedExtensions())}catch(a){}be=pe;ta=re;sa=qe;function te(){}k=te.prototype;k.Ac=function(){};k.Jd=function(){};k.nc=function(){};k.Se=function(){};k.Te=function(){};k.Yb=function(){};k.Bc=function(){};k.Cc=function(){};k.Dc=function(){};k.Ec=function(){};k.Fc=function(){};k.Qc=function(){};k.Ta=function(){};k.ic=function(){};k.fc=function(){};var ue=Array(6);function ve(){return[1,0,0,1,0,0]}function we(a){return xe(a,1,0,0,1,0,0)}function ye(a,b){var c=a[0],d=a[1],e=a[2],f=a[3],g=a[4],h=a[5],l=b[0],m=b[1],n=b[2],p=b[3],q=b[4];b=b[5];a[0]=c*l+e*m;a[1]=d*l+f*m;a[2]=c*n+e*p;a[3]=d*n+f*p;a[4]=c*q+e*b+g;a[5]=d*q+f*b+h;return a}function xe(a,b,c,d,e,f,g){a[0]=b;a[1]=c;a[2]=d;a[3]=e;a[4]=f;a[5]=g;return a}function ze(a,b){a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];a[4]=b[4];a[5]=b[5];return a}
function Ae(a,b){var c=b[0],d=b[1];b[0]=a[0]*c+a[2]*d+a[4];b[1]=a[1]*c+a[3]*d+a[5];return b}function Be(a,b){var c=Math.cos(b);b=Math.sin(b);ye(a,xe(ue,c,b,-b,c,0,0))}function Ce(a,b,c){return ye(a,xe(ue,b,0,0,c,0,0))}function De(a,b,c){ye(a,xe(ue,1,0,0,1,b,c))}function Ee(a,b,c,d,e,f,g,h){var l=Math.sin(f);f=Math.cos(f);a[0]=d*f;a[1]=e*l;a[2]=-d*l;a[3]=e*f;a[4]=g*d*f-h*d*l+b;a[5]=g*e*l+h*e*f+c;return a}
function Fe(a){var b=a[0]*a[3]-a[1]*a[2];gb(0!==b,32);var c=a[0],d=a[1],e=a[2],f=a[3],g=a[4],h=a[5];a[0]=f/b;a[1]=-d/b;a[2]=-e/b;a[3]=c/b;a[4]=(e*h-f*g)/b;a[5]=-(c*h-d*g)/b;return a};function Ge(a,b,c,d,e){this.g=a;this.I=b;this.c=c;this.v=d;this.lc=e;this.O=this.b=this.a=this.aa=this.Ba=this.N=null;this.$=this.X=this.o=this.ea=this.B=this.C=0;this.Za=!1;this.i=this.la=0;this.oa=!1;this.ta=0;this.Ja="";this.wa=this.Db=0;this.Xa=!1;this.j=this.Ua=0;this.G=this.l=this.f=null;this.s=[];this.rb=ve()}v(Ge,te);
function He(a,b,c){if(a.O){b=Ud(b,0,c,2,a.v,a.s);c=a.g;var d=a.rb,e=c.globalAlpha;1!=a.o&&(c.globalAlpha=e*a.o);var f=a.la;a.Za&&(f+=a.lc);var g;var h=0;for(g=b.length;h<g;h+=2){var l=b[h]-a.C,m=b[h+1]-a.B;a.oa&&(l=Math.round(l),m=Math.round(m));if(0!==f||1!=a.i){var n=l+a.C,p=m+a.B;Ee(d,n,p,a.i,a.i,f,-n,-p);c.setTransform.apply(c,d)}c.drawImage(a.O,a.X,a.$,a.ta,a.ea,l,m,a.ta,a.ea)}0===f&&1==a.i||c.setTransform(1,0,0,1,0,0);1!=a.o&&(c.globalAlpha=e)}}
function Ie(a,b,c,d){var e=0;if(a.G&&""!==a.Ja){a.f&&Je(a,a.f);a.l&&Ke(a,a.l);var f=a.G,g=a.g,h=a.aa;h?(h.font!=f.font&&(h.font=g.font=f.font),h.textAlign!=f.textAlign&&(h.textAlign=g.textAlign=f.textAlign),h.textBaseline!=f.textBaseline&&(h.textBaseline=g.textBaseline=f.textBaseline)):(g.font=f.font,g.textAlign=f.textAlign,g.textBaseline=f.textBaseline,a.aa={font:f.font,textAlign:f.textAlign,textBaseline:f.textBaseline});b=Ud(b,e,c,d,a.v,a.s);f=a.g;g=a.Ua;for(a.Xa&&(g+=a.lc);e<c;e+=d){h=b[e]+a.Db;
var l=b[e+1]+a.wa;if(0!==g||1!=a.j){var m=Ee(a.rb,h,l,a.j,a.j,g,-h,-l);f.setTransform.apply(f,m)}a.l&&f.strokeText(a.Ja,h,l);a.f&&f.fillText(a.Ja,h,l)}0===g&&1==a.j||f.setTransform(1,0,0,1,0,0)}}function Le(a,b,c,d,e,f){var g=a.g;a=Ud(b,c,d,e,a.v,a.s);g.moveTo(a[0],a[1]);b=a.length;f&&(b-=2);for(c=2;c<b;c+=2)g.lineTo(a[c],a[c+1]);f&&g.closePath();return d}function Me(a,b,c,d,e){var f;var g=0;for(f=d.length;g<f;++g)c=Le(a,b,c,d[g],e,!0);return c}k=Ge.prototype;
k.nc=function(a){if(Jb(this.c,a.D())){if(this.a||this.b){this.a&&Je(this,this.a);this.b&&Ke(this,this.b);var b=this.v;var c=this.s,d=a.ja();b=d?Ud(d,0,d.length,a.ya(),b,c):null;c=b[2]-b[0];d=b[3]-b[1];c=Math.sqrt(c*c+d*d);d=this.g;d.beginPath();d.arc(b[0],b[1],c,0,2*Math.PI);this.a&&d.fill();this.b&&d.stroke()}""!==this.Ja&&Ie(this,a.va(),2,2)}};k.Jd=function(a){this.Ta(a.qa(),a.pa());this.ic(a.W());this.fc(a.ra())};
k.Ac=function(a){switch(a.U()){case "Point":this.Ec(a);break;case "LineString":this.Yb(a);break;case "Polygon":this.Fc(a);break;case "MultiPoint":this.Cc(a);break;case "MultiLineString":this.Bc(a);break;case "MultiPolygon":this.Dc(a);break;case "GeometryCollection":this.Te(a);break;case "Circle":this.nc(a)}};k.Se=function(a,b){(a=(0,b.Va)(a))&&Jb(this.c,a.D())&&(this.Jd(b),this.Ac(a))};k.Te=function(a){a=a.a;var b;var c=0;for(b=a.length;c<b;++c)this.Ac(a[c])};
k.Ec=function(a){var b=a.ja();a=a.ya();this.O&&He(this,b,b.length);""!==this.Ja&&Ie(this,b,b.length,a)};k.Cc=function(a){var b=a.ja();a=a.ya();this.O&&He(this,b,b.length);""!==this.Ja&&Ie(this,b,b.length,a)};k.Yb=function(a){if(Jb(this.c,a.D())){if(this.b){Ke(this,this.b);var b=this.g,c=a.ja();b.beginPath();Le(this,c,0,c.length,a.ya(),!1);b.stroke()}""!==this.Ja&&(a=Ne(a),Ie(this,a,2,2))}};
k.Bc=function(a){var b=a.D();if(Jb(this.c,b)){if(this.b){Ke(this,this.b);b=this.g;var c=a.ja(),d=0,e=a.$b(),f=a.ya();b.beginPath();var g;var h=0;for(g=e.length;h<g;++h)d=Le(this,c,d,e[h],f,!1);b.stroke()}""!==this.Ja&&(a=Oe(a),Ie(this,a,a.length,2))}};k.Fc=function(a){if(Jb(this.c,a.D())){if(this.b||this.a){this.a&&Je(this,this.a);this.b&&Ke(this,this.b);var b=this.g;b.beginPath();Me(this,a.sc(),0,a.$b(),a.ya());this.a&&b.fill();this.b&&b.stroke()}""!==this.Ja&&(a=Pe(a),Ie(this,a,2,2))}};
k.Dc=function(a){if(Jb(this.c,a.D())){if(this.b||this.a){this.a&&Je(this,this.a);this.b&&Ke(this,this.b);var b=this.g,c=Qe(a),d=0,e=a.c,f=a.ya(),g;b.beginPath();var h=0;for(g=e.length;h<g;++h)d=Me(this,c,d,e[h],f);this.a&&b.fill();this.b&&b.stroke()}""!==this.Ja&&(a=Re(a),Ie(this,a,a.length,2))}};function Je(a,b){var c=a.g,d=a.N;d?d.fillStyle!=b.fillStyle&&(d.fillStyle=c.fillStyle=b.fillStyle):(c.fillStyle=b.fillStyle,a.N={fillStyle:b.fillStyle})}
function Ke(a,b){var c=a.g,d=a.Ba;d?(d.lineCap!=b.lineCap&&(d.lineCap=c.lineCap=b.lineCap),ie&&!ld(d.lineDash,b.lineDash)&&c.setLineDash(d.lineDash=b.lineDash),d.lineJoin!=b.lineJoin&&(d.lineJoin=c.lineJoin=b.lineJoin),d.lineWidth!=b.lineWidth&&(d.lineWidth=c.lineWidth=b.lineWidth),d.miterLimit!=b.miterLimit&&(d.miterLimit=c.miterLimit=b.miterLimit),d.strokeStyle!=b.strokeStyle&&(d.strokeStyle=c.strokeStyle=b.strokeStyle)):(c.lineCap=b.lineCap,ie&&c.setLineDash(b.lineDash),c.lineJoin=b.lineJoin,c.lineWidth=
Patrick's avatar
Patrick committed
79
b.lineWidth,c.miterLimit=b.miterLimit,c.strokeStyle=b.strokeStyle,a.Ba={lineCap:b.lineCap,lineDash:b.lineDash,lineJoin:b.lineJoin,lineWidth:b.lineWidth,miterLimit:b.miterLimit,strokeStyle:b.strokeStyle})}
Patrick's avatar
Patrick committed
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
k.Ta=function(a,b){a?(a=a.b,this.a={fillStyle:Sd(a?a:Id)}):this.a=null;if(b){a=b.b;var c=b.i,d=b.g,e=b.f,f=b.j,g=b.c;b=b.l;this.b={lineCap:void 0!==c?c:"round",lineDash:d?d:Jd,lineDashOffset:e?e:0,lineJoin:void 0!==f?f:"round",lineWidth:this.I*(void 0!==g?g:1),miterLimit:void 0!==b?b:10,strokeStyle:Sd(a?a:Kd)}}else this.b=null};
k.ic=function(a){if(a){var b=a.Gc(),c=a.W(1),d=a.jd(),e=a.gc();this.C=b[0];this.B=b[1];this.ea=e[1];this.O=c;this.o=a.La();this.X=d[0];this.$=d[1];this.Za=a.j;this.la=a.i;this.i=a.Ma();this.oa=a.l;this.ta=e[0]}else this.O=null};
k.fc=function(a){if(a){var b=a.qa();b?(b=b.b,this.f={fillStyle:Sd(b?b:Id)}):this.f=null;var c=a.pa();if(c){b=c.b;var d=c.i,e=c.g,f=c.f,g=c.j,h=c.c;c=c.l;this.l={lineCap:void 0!==d?d:"round",lineDash:e?e:Jd,lineDashOffset:f?f:0,lineJoin:void 0!==g?g:"round",lineWidth:void 0!==h?h:1,miterLimit:void 0!==c?c:10,strokeStyle:Sd(b?b:Kd)}}else this.l=null;b=a.Zb;d=a.Lc;e=a.Mc;f=a.a;g=a.b;h=a.Ma();c=a.ra();var l=a.Vc;a=a.sb;this.G={font:void 0!==b?b:"10px sans-serif",textAlign:void 0!==l?l:"center",textBaseline:void 0!==
a?a:"middle"};this.Ja=void 0!==c?c:"";this.Db=void 0!==d?this.I*d:0;this.wa=void 0!==e?this.I*e:0;this.Xa=void 0!==f?f:!1;this.Ua=void 0!==g?g:0;this.j=this.I*(void 0!==h?h:1)}else this.Ja=""};function Se(a){Sa.call(this);this.a=a}v(Se,Sa);Se.prototype.Ga=ua;Se.prototype.vf=Gd;Se.prototype.ig=function(a,b,c){return function(d,e){return Te(a,b,d,e,function(a){c[d]||(c[d]={});c[d][a.Ka.toString()]=a})}};Se.prototype.$=function(a){2===a.target.getState()&&Ue(this)};function Ve(a,b){var c=b.getState();2!=c&&3!=c&&y(b,"change",a.$,a);0==c&&(b.load(),c=b.getState());return 2==c}function Ue(a){var b=a.a;b.lb()&&"ready"==b.xg()&&a.u()}
function We(a,b){b.nj()&&a.postRenderFunctions.push(function(a,b,e){b=x(a).toString();a.Bd(e.viewState.projection,e.usedTiles[b])}.bind(null,b))}function Xe(a,b){if(b){var c;var d=0;for(c=b.length;d<c;++d){var e=b[d];a[x(e).toString()]=e}}}function Ye(a,b){b=b.C;void 0!==b&&("string"===typeof b?a.logos[b]="":b&&(gb("string"==typeof b.href,44),gb("string"==typeof b.src,45),a.logos[b.src]=b.href))}
function Ze(a,b,c,d){b=x(b).toString();c=c.toString();b in a?c in a[b]?(a=a[b][c],d.ga<a.ga&&(a.ga=d.ga),d.da>a.da&&(a.da=d.da),d.ha<a.ha&&(a.ha=d.ha),d.ka>a.ka&&(a.ka=d.ka)):a[b][c]=d:(a[b]={},a[b][c]=d)}
function $e(a,b,c,d,e,f,g,h,l,m){var n=x(b).toString();n in a.wantedTiles||(a.wantedTiles[n]={});var p=a.wantedTiles[n];a=a.tileQueue;var q=c.minZoom,t,u,w;for(w=g;w>=q;--w){var z=af(c,f,w,z);var D=c.Ra(w);for(t=z.ga;t<=z.da;++t)for(u=z.ha;u<=z.ka;++u)if(g-w<=h){var B=b.cd(w,t,u,d,e);0==B.getState()&&(p[B.ob()]=!0,B.ob()in a.a||a.i([B,n,bf(c,B.Ka),D]));void 0!==l&&l.call(m,B)}else b.zh(w,t,u,e)}};function cf(a){Se.call(this,a);this.la=ve()}v(cf,Se);function df(a,b,c){var d=b.pixelRatio,e=b.size[0]*d,f=b.size[1]*d,g=b.viewState.rotation,h=Bb(c),l=Ab(c),m=zb(c);c=yb(c);Ae(b.coordinateToPixelTransform,h);Ae(b.coordinateToPixelTransform,l);Ae(b.coordinateToPixelTransform,m);Ae(b.coordinateToPixelTransform,c);a.save();Ld(a,-g,e/2,f/2);a.beginPath();a.moveTo(h[0]*d,h[1]*d);a.lineTo(l[0]*d,l[1]*d);a.lineTo(m[0]*d,m[1]*d);a.lineTo(c[0]*d,c[1]*d);a.clip();Ld(a,g,e/2,f/2)}
function ef(a,b,c,d,e){var f=a.a;if(Ra(f,b)){var g=d.size[0]*d.pixelRatio,h=d.size[1]*d.pixelRatio,l=d.viewState.rotation;Ld(c,-l,g/2,h/2);a=void 0!==e?e:ff(a,d,0);f.b(new Hd(b,new Ge(c,d.pixelRatio,d.extent,a,d.viewState.rotation),d,c,null));Ld(c,l,g/2,h/2)}}cf.prototype.I=function(a,b,c,d){if(this.Ga(a,b,0,Fd,this))return c.call(d,this.a,null)};cf.prototype.Cf=function(a,b,c,d){ef(this,"postcompose",a,b,d)};
function ff(a,b,c){var d=b.viewState,e=b.pixelRatio,f=e/d.resolution;return Ee(a.la,e*b.size[0]/2,e*b.size[1]/2,f,-f,-d.rotation,-d.center[0]+c,-d.center[1])};function gf(a){cf.call(this,a);this.s=ve();this.j=null}v(gf,cf);gf.prototype.v=function(a,b,c){ef(this,"precompose",c,a,void 0);var d=this.W();if(d){var e=b.extent,f=void 0!==e&&!pb(e,a.extent)&&Jb(e,a.extent);f&&df(c,a,e);e=this.C();var g=c.globalAlpha;c.globalAlpha=b.opacity;c.drawImage(d,0,0,+d.width,+d.height,Math.round(e[4]),Math.round(e[5]),Math.round(d.width*e[0]),Math.round(d.height*e[3]));c.globalAlpha=g;f&&c.restore()}this.Cf(c,a,b)};
gf.prototype.Ga=function(a,b,c,d,e){var f=this.a;return f.ba().Ga(a,b.viewState.resolution,b.viewState.rotation,c,b.skippedFeatureUids,function(a){return d.call(e,a,f)})};
gf.prototype.I=function(a,b,c,d){if(this.W()){if(this.a.ba().Ga!==ua)return cf.prototype.I.apply(this,arguments);var e=Ae(this.s,a.slice());Ad(e,b.viewState.resolution/this.f);this.j||(this.j=pd(1,1));this.j.clearRect(0,0,1,1);this.j.drawImage(this.W(),e[0],e[1],1,1,0,0,1,1);e=this.j.getImageData(0,0,1,1).data;if(0<e[3])return c.call(d,this.a,e)}};function hf(a){gf.call(this,a);this.c=null===this.c?null:pd();this.l=null;this.i=[];this.o=ib();this.wa=new bd(0,0,0,0);this.B=ve();this.X=0}v(hf,gf);function jf(a,b){b=b.getState();a=a.a.pe();return 2==b||4==b||3==b&&!a}
hf.prototype.Kd=function(a,b){var c=a.pixelRatio,d=a.size,e=a.viewState,f=e.projection,g=e.resolution;e=e.center;var h=this.a,l=h.ba(),m=l.g,n=l.Ob(f),p=n.dd(g,this.X),q=n.Ra(p),t=Math.round(g/q)||1,u=a.extent;void 0!==b.extent&&(u=Ib(u,b.extent));if(Db(u))return!1;var w=lf(n,u,q);var z=n.kd(p);var D=n.Ra(p),B=mf(n.gb(p),n.j);z=rb(z[0]+w.ga*B[0]*D,z[1]+w.ha*B[1]*D,z[0]+(w.da+1)*B[0]*D,z[1]+(w.ka+1)*B[1]*D,void 0);D=l.vb(c);B={};B[p]={};var S=this.ig(l,f,B),Ua=this.o,ya=this.wa,Da=!1,C,pa;for(C=w.ga;C<=
w.da;++C)for(pa=w.ha;pa<=w.ka;++pa){var $a=l.cd(p,C,pa,c,f);jf(this,$a)||($a=nf($a));jf(this,$a)?2==$a.getState()&&(B[p][$a.Ka.toString()]=$a,Da||-1!=this.i.indexOf($a)||(Da=!0)):of(n,$a.Ka,S,ya,Ua)||($a=pf(n,$a.Ka,ya,Ua))&&S(p+1,$a)}C=a.viewHints;if(!(this.f&&16<Date.now()-a.time&&(C[0]||C[1])||!Da&&this.l&&pb(this.l,u)&&this.If==m)||t!=this.N){if(C=this.c)pa=l.oe(p,c,f),$a=Math.round((w.da-w.ga+1)*pa[0]/t),pa=Math.round((w.ka-w.ha+1)*pa[1]/t),Da=C.canvas,Da.width!=$a||Da.height!=pa?(this.N=t,Da.width=
$a,Da.height=pa):(C.clearRect(0,0,$a,pa),t=this.N);this.i.length=0;Da=Object.keys(B).map(Number);Da.sort(fd);var ra;ya=0;for(ra=Da.length;ya<ra;++ya){C=Da[ya];S=l.oe(C,c,f);$a=n.Ra(C);var dc=$a/q;var Pa=D*l.sg(f);var ic=B[C];for(var jd in ic){$a=ic[jd];pa=n.Ya($a.Ka,Ua);C=(pa[0]-z[0])/q*D/t;pa=(z[3]-pa[3])/q*D/t;var qc=S[0]*dc/t;var Lf=S[1]*dc/t;this.lg($a,a,b,C,pa,qc,Lf,Pa);this.i.push($a)}}this.If=m;this.f=q*c/D*t;this.l=z}b=this.f/g;b=Ee(this.B,c*d[0]/2,c*d[1]/2,b,b,0,(this.l[0]-e[0])/this.f*c,
(e[1]-this.l[3])/this.f*c);Ee(this.s,c*d[0]/2-b[4],c*d[1]/2-b[5],c/g,-c/g,0,-e[0],-e[1]);Ze(a.usedTiles,l,p,w);$e(a,l,n,c,f,u,p,h.le());We(a,l);Ye(a,l);return 0<this.i.length};hf.prototype.lg=function(a,b,c,d,e,f,g,h){this.a.ba().wg(b.viewState.projection)||this.c.clearRect(d,e,f,g);(a=a.W())&&this.c.drawImage(a,h,h,a.width-2*h,a.height-2*h,d,e,f,g)};hf.prototype.W=function(){var a=this.c;return a?a.canvas:null};hf.prototype.C=function(){return this.B};var qf=["Polygon","Circle","LineString","Image","Text"];function rf(){};function sf(a){this.b=a};function tf(a){this.b=a}v(tf,sf);tf.prototype.U=function(){return 35632};function uf(a){this.b=a}v(uf,sf);uf.prototype.U=function(){return 35633};function vf(){this.b="precision mediump float;\nvarying vec2 v_center;\nvarying vec2 v_offset;\nvarying float v_halfWidth;\nvarying float v_pixelRatio;\n\n\n\nuniform float u_opacity;\nuniform vec4 u_fillColor;\nuniform vec4 u_strokeColor;\nuniform vec2 u_size;\n\nvoid main(void) {\n  vec2 windowCenter = vec2((v_center.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\n      (v_center.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\n  vec2 windowOffset = vec2((v_offset.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\n      (v_offset.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\n  float radius = length(windowCenter - windowOffset);\n  float dist = length(windowCenter - gl_FragCoord.xy);\n  if (dist > radius + v_halfWidth) {\n    if (u_strokeColor.a == 0.0) {\n      gl_FragColor = u_fillColor;\n    } else {\n      gl_FragColor = u_strokeColor;\n    }\n    gl_FragColor.a = gl_FragColor.a - (dist - (radius + v_halfWidth));\n  } else if (u_fillColor.a == 0.0) {\n    // Hooray, no fill, just stroke. We can use real antialiasing.\n    gl_FragColor = u_strokeColor;\n    if (dist < radius - v_halfWidth) {\n      gl_FragColor.a = gl_FragColor.a - (radius - v_halfWidth - dist);\n    }\n  } else {\n    gl_FragColor = u_fillColor;\n    float strokeDist = radius - v_halfWidth;\n    float antialias = 2.0 * v_pixelRatio;\n    if (dist > strokeDist) {\n      gl_FragColor = u_strokeColor;\n    } else if (dist >= strokeDist - antialias) {\n      float step = smoothstep(strokeDist - antialias, strokeDist, dist);\n      gl_FragColor = mix(u_fillColor, u_strokeColor, step);\n    }\n  }\n  gl_FragColor.a = gl_FragColor.a * u_opacity;\n  if (gl_FragColor.a <= 0.0) {\n    discard;\n  }\n}\n"}
v(vf,tf);var wf=new vf;
function xf(){this.b="varying vec2 v_center;\nvarying vec2 v_offset;\nvarying float v_halfWidth;\nvarying float v_pixelRatio;\n\n\nattribute vec2 a_position;\nattribute float a_instruction;\nattribute float a_radius;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_lineWidth;\nuniform float u_pixelRatio;\n\nvoid main(void) {\n  mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n  v_center = vec4(u_projectionMatrix * vec4(a_position, 0.0, 1.0)).xy;\n  v_pixelRatio = u_pixelRatio;\n  float lineWidth = u_lineWidth * u_pixelRatio;\n  v_halfWidth = lineWidth / 2.0;\n  if (lineWidth == 0.0) {\n    lineWidth = 2.0 * u_pixelRatio;\n  }\n  vec2 offset;\n  // Radius with anitaliasing (roughly).\n  float radius = a_radius + 3.0 * u_pixelRatio;\n  // Until we get gl_VertexID in WebGL, we store an instruction.\n  if (a_instruction == 0.0) {\n    // Offsetting the edges of the triangle by lineWidth / 2 is necessary, however\n    // we should also leave some space for the antialiasing, thus we offset by lineWidth.\n    offset = vec2(-1.0, 1.0);\n  } else if (a_instruction == 1.0) {\n    offset = vec2(-1.0, -1.0);\n  } else if (a_instruction == 2.0) {\n    offset = vec2(1.0, -1.0);\n  } else {\n    offset = vec2(1.0, 1.0);\n  }\n\n  gl_Position = u_projectionMatrix * vec4(a_position + offset * radius, 0.0, 1.0) +\n      offsetMatrix * vec4(offset * lineWidth, 0.0, 0.0);\n  v_offset = vec4(u_projectionMatrix * vec4(a_position.x + a_radius, a_position.y,\n      0.0, 1.0)).xy;\n\n  if (distance(v_center, v_offset) > 20000.0) {\n    gl_Position = vec4(v_center, 0.0, 1.0);\n  }\n}\n\n\n"}
v(xf,uf);var yf=new xf;
function zf(a,b){this.ea=a.getUniformLocation(b,"u_fillColor");this.ta=a.getUniformLocation(b,"u_lineWidth");this.c=a.getUniformLocation(b,"u_offsetRotateMatrix");this.i=a.getUniformLocation(b,"u_offsetScaleMatrix");this.a=a.getUniformLocation(b,"u_opacity");this.G=a.getUniformLocation(b,"u_pixelRatio");this.g=a.getUniformLocation(b,"u_projectionMatrix");this.N=a.getUniformLocation(b,"u_size");this.Ba=a.getUniformLocation(b,"u_strokeColor");this.j=a.getAttribLocation(b,"a_instruction");this.b=a.getAttribLocation(b,
"a_position");this.v=a.getAttribLocation(b,"a_radius")};function Af(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function Bf(a,b){a[0]=b[0];a[1]=b[1];a[4]=b[2];a[5]=b[3];a[12]=b[4];a[13]=b[5];return a};function Cf(a,b){this.origin=Gb(b);this.lc=ve();this.Ua=ve();this.rb=ve();this.wa=Af();this.b=[];this.o=null;this.g=[];this.f=[];this.a=[];this.s=null;this.j=void 0}v(Cf,te);
Cf.prototype.i=function(a,b,c,d,e,f,g,h,l,m,n){var p=a.b;if(this.j){var q=p.isEnabled(p.STENCIL_TEST);var t=p.getParameter(p.STENCIL_FUNC);var u=p.getParameter(p.STENCIL_VALUE_MASK);var w=p.getParameter(p.STENCIL_REF);var z=p.getParameter(p.STENCIL_WRITEMASK);var D=p.getParameter(p.STENCIL_FAIL);var B=p.getParameter(p.STENCIL_PASS_DEPTH_PASS);var S=p.getParameter(p.STENCIL_PASS_DEPTH_FAIL);p.enable(p.STENCIL_TEST);p.clear(p.STENCIL_BUFFER_BIT);p.stencilMask(255);p.stencilFunc(p.ALWAYS,1,255);p.stencilOp(p.KEEP,
p.KEEP,p.REPLACE);this.j.i(a,b,c,d,e,f,g,h,l,m,n);p.stencilMask(0);p.stencilFunc(p.NOTEQUAL,1,255)}Df(a,34962,this.s);Df(a,34963,this.o);f=this.Nf(p,a,e,f);var Ua=we(this.lc);Ce(Ua,2/(c*e[0]),2/(c*e[1]));Be(Ua,-d);De(Ua,-(b[0]-this.origin[0]),-(b[1]-this.origin[1]));b=we(this.rb);Ce(b,2/e[0],2/e[1]);e=we(this.Ua);0!==d&&Be(e,-d);p.uniformMatrix4fv(f.g,!1,Bf(this.wa,Ua));p.uniformMatrix4fv(f.i,!1,Bf(this.wa,b));p.uniformMatrix4fv(f.c,!1,Bf(this.wa,e));p.uniform1f(f.a,g);if(void 0===l)this.ie(p,a,h,
!1);else{m?a=this.Ue(p,a,h,l,n):(p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT),this.ie(p,a,h,!0),a=(a=l(null))?a:void 0);var ya=a}this.Of(p,f);this.j&&(q||p.disable(p.STENCIL_TEST),p.clear(p.STENCIL_BUFFER_BIT),p.stencilFunc(t,w,u),p.stencilMask(z),p.stencilOp(D,S,B));return ya};function Ef(a,b,c,d){a.drawElements(4,d-c,b.f?5125:5123,c*(b.f?4:2))};var Ff=[0,0,0,1],Gf=[],Hf=[0,0,0,1];function If(a,b,c,d,e,f){a=(c-a)*(f-b)-(e-a)*(d-b);return a<=Jf&&a>=-Jf?void 0:0<a}var Jf=Number.EPSILON||2.220446049250313E-16;function Kf(a){this.b=void 0!==a?a:[];this.a=Mf}var Mf=35044;function Nf(a,b){Cf.call(this,a,b);this.I=null;this.l=[];this.v=[];this.C=0;this.c={fillColor:null,strokeColor:null,lineDash:null,lineDashOffset:void 0,lineWidth:void 0,u:!1}}v(Nf,Cf);k=Nf.prototype;
k.nc=function(a,b){var c=a.Hd(),d=a.ya();if(c){this.g.push(this.b.length);this.f.push(b);this.c.u&&(this.v.push(this.b.length),this.c.u=!1);this.C=c;a=a.ja();a=Vd(a,2,d,-this.origin[0],-this.origin[1]);b=this.a.length;c=this.b.length;var e=b/4,f;for(f=0;2>f;f+=d)this.a[b++]=a[f],this.a[b++]=a[f+1],this.a[b++]=0,this.a[b++]=this.C,this.a[b++]=a[f],this.a[b++]=a[f+1],this.a[b++]=1,this.a[b++]=this.C,this.a[b++]=a[f],this.a[b++]=a[f+1],this.a[b++]=2,this.a[b++]=this.C,this.a[b++]=a[f],this.a[b++]=a[f+
1],this.a[b++]=3,this.a[b++]=this.C,this.b[c++]=e,this.b[c++]=e+1,this.b[c++]=e+2,this.b[c++]=e+2,this.b[c++]=e+3,this.b[c++]=e,e+=4}else this.c.u&&(this.l.pop(),this.l.length&&(d=this.l[this.l.length-1],this.c.fillColor=d[0],this.c.strokeColor=d[1],this.c.lineWidth=d[2],this.c.u=!1))};k.Gb=function(){this.s=new Kf(this.a);this.o=new Kf(this.b);this.g.push(this.b.length);0===this.v.length&&0<this.l.length&&(this.l=[]);this.b=this.a=null};
k.Hb=function(a){var b=this.s,c=this.o;return function(){Of(a,b);Of(a,c)}};k.Nf=function(a,b,c,d){var e=Pf(b,wf,yf);if(this.I)var f=this.I;else this.I=f=new zf(a,e);b.ld(e);a.enableVertexAttribArray(f.b);a.vertexAttribPointer(f.b,2,5126,!1,16,0);a.enableVertexAttribArray(f.j);a.vertexAttribPointer(f.j,1,5126,!1,16,8);a.enableVertexAttribArray(f.v);a.vertexAttribPointer(f.v,1,5126,!1,16,12);a.uniform2fv(f.N,c);a.uniform1f(f.G,d);return f};
Patrick's avatar
Patrick committed
106
k.Of=function(a,b){a.disableVertexAttribArray(b.b);a.disableVertexAttribArray(b.j);a.disableVertexAttribArray(b.v)};
Patrick's avatar
Patrick committed
107
108
109
110
111
112
113
k.ie=function(a,b,c){if(Aa(c)){var d=this.g[this.g.length-1];for(c=this.v.length-1;0<=c;--c){var e=this.v[c];var f=this.l[c];a.uniform4fv(this.I.ea,f[0]);Qf(this,a,f[1],f[2]);Ef(a,b,e,d);d=e}}else{var g=this.g.length-2;f=d=this.g[g+1];for(e=this.v.length-1;0<=e;--e){var h=this.l[e];a.uniform4fv(this.I.ea,h[0]);Qf(this,a,h[1],h[2]);for(h=this.v[e];0<=g&&this.g[g]>=h;){var l=this.g[g];var m=this.f[g];m=x(m).toString();c[m]&&(d!==f&&Ef(a,b,d,f),f=l);g--;d=l}d!==f&&Ef(a,b,d,f);d=f=h}}};
k.Ue=function(a,b,c,d,e){var f,g;var h=this.g.length-2;var l=this.g[h+1];for(f=this.v.length-1;0<=f;--f){var m=this.l[f];a.uniform4fv(this.I.ea,m[0]);Qf(this,a,m[1],m[2]);for(g=this.v[f];0<=h&&this.g[h]>=g;){m=this.g[h];var n=this.f[h];var p=x(n).toString();if(void 0===c[p]&&n.V()&&(void 0===e||Jb(e,n.V().D()))&&(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),Ef(a,b,m,l),l=d(n)))return l;h--;l=m}}};function Qf(a,b,c,d){b.uniform4fv(a.I.Ba,c);b.uniform1f(a.I.ta,d)}
k.Ta=function(a,b){if(b){var c=b.g;this.c.lineDash=c?c:Gf;c=b.f;this.c.lineDashOffset=c?c:0;c=b.b;c instanceof CanvasGradient||c instanceof CanvasPattern?c=Hf:c=Od(c).map(function(a,b){return 3!=b?a/255:a})||Hf;b=b.c;b=void 0!==b?b:1}else c=[0,0,0,0],b=0;a=a?a.b:[0,0,0,0];a instanceof CanvasGradient||a instanceof CanvasPattern?a=Ff:a=Od(a).map(function(a,b){return 3!=b?a/255:a})||Ff;this.c.strokeColor&&ld(this.c.strokeColor,c)&&this.c.fillColor&&ld(this.c.fillColor,a)&&this.c.lineWidth===b||(this.c.u=
!0,this.c.fillColor=a,this.c.strokeColor=c,this.c.lineWidth=b,this.l.push([a,c,b]))};function Rf(){this.b="precision mediump float;\nvarying vec2 v_texCoord;\nvarying float v_opacity;\n\nuniform float u_opacity;\nuniform sampler2D u_image;\n\nvoid main(void) {\n  vec4 texColor = texture2D(u_image, v_texCoord);\n  gl_FragColor.rgb = texColor.rgb;\n  float alpha = texColor.a * v_opacity * u_opacity;\n  if (alpha == 0.0) {\n    discard;\n  }\n  gl_FragColor.a = alpha;\n}\n"}v(Rf,tf);var Sf=new Rf;
function Tf(){this.b="varying vec2 v_texCoord;\nvarying float v_opacity;\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nattribute vec2 a_offsets;\nattribute float a_opacity;\nattribute float a_rotateWithView;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\n\nvoid main(void) {\n  mat4 offsetMatrix = u_offsetScaleMatrix;\n  if (a_rotateWithView == 1.0) {\n    offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n  }\n  vec4 offsets = offsetMatrix * vec4(a_offsets, 0.0, 0.0);\n  gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n  v_texCoord = a_texCoord;\n  v_opacity = a_opacity;\n}\n\n\n"}
v(Tf,uf);var Uf=new Tf;function Vf(a,b){this.c=a.getUniformLocation(b,"u_offsetRotateMatrix");this.i=a.getUniformLocation(b,"u_offsetScaleMatrix");this.a=a.getUniformLocation(b,"u_opacity");this.g=a.getUniformLocation(b,"u_projectionMatrix");this.s=a.getAttribLocation(b,"a_offsets");this.I=a.getAttribLocation(b,"a_opacity");this.b=a.getAttribLocation(b,"a_position");this.C=a.getAttribLocation(b,"a_rotateWithView");this.B=a.getAttribLocation(b,"a_texCoord")};function Wf(a,b){this.j=a;this.b=b;this.a={};this.c={};this.g={};this.o=this.s=this.i=this.l=null;(this.f=gd(ta,"OES_element_index_uint"))&&b.getExtension("OES_element_index_uint");y(this.j,"webglcontextlost",this.Jp,this);y(this.j,"webglcontextrestored",this.Kp,this)}v(Wf,La);
function Df(a,b,c){var d=a.b,e=c.b,f=String(x(c));if(f in a.a)d.bindBuffer(b,a.a[f].buffer);else{var g=d.createBuffer();d.bindBuffer(b,g);var h;34962==b?h=new Float32Array(e):34963==b&&(h=a.f?new Uint32Array(e):new Uint16Array(e));d.bufferData(b,h,c.a);a.a[f]={mc:c,buffer:g}}}function Of(a,b){var c=a.b;b=String(x(b));var d=a.a[b];c.isContextLost()||c.deleteBuffer(d.buffer);delete a.a[b]}k=Wf.prototype;
Patrick's avatar
Patrick committed
114
k.xa=function(){Ka(this.j);var a=this.b;if(!a.isContextLost()){for(var b in this.a)a.deleteBuffer(this.a[b].buffer);for(b in this.g)a.deleteProgram(this.g[b]);for(b in this.c)a.deleteShader(this.c[b]);a.deleteFramebuffer(this.i);a.deleteRenderbuffer(this.o);a.deleteTexture(this.s)}};k.Ip=function(){return this.b};
Patrick's avatar
Patrick committed
115
116
117
118
119
120
121
122
123
function Xf(a){if(!a.i){var b=a.b,c=b.createFramebuffer();b.bindFramebuffer(b.FRAMEBUFFER,c);var d=Yf(b,1,1),e=b.createRenderbuffer();b.bindRenderbuffer(b.RENDERBUFFER,e);b.renderbufferStorage(b.RENDERBUFFER,b.DEPTH_COMPONENT16,1,1);b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,d,0);b.framebufferRenderbuffer(b.FRAMEBUFFER,b.DEPTH_ATTACHMENT,b.RENDERBUFFER,e);b.bindTexture(b.TEXTURE_2D,null);b.bindRenderbuffer(b.RENDERBUFFER,null);b.bindFramebuffer(b.FRAMEBUFFER,null);a.i=c;
a.s=d;a.o=e}return a.i}function Zf(a,b){var c=String(x(b));if(c in a.c)return a.c[c];var d=a.b,e=d.createShader(b.U());d.shaderSource(e,b.b);d.compileShader(e);return a.c[c]=e}function Pf(a,b,c){var d=x(b)+"/"+x(c);if(d in a.g)return a.g[d];var e=a.b,f=e.createProgram();e.attachShader(f,Zf(a,b));e.attachShader(f,Zf(a,c));e.linkProgram(f);return a.g[d]=f}k.Jp=function(){xa(this.a);xa(this.c);xa(this.g);this.o=this.s=this.i=this.l=null};k.Kp=function(){};
k.ld=function(a){if(a==this.l)return!1;this.b.useProgram(a);this.l=a;return!0};function $f(a,b,c){var d=a.createTexture();a.bindTexture(a.TEXTURE_2D,d);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR);void 0!==b&&a.texParameteri(3553,10242,b);void 0!==c&&a.texParameteri(3553,10243,c);return d}function Yf(a,b,c){var d=$f(a,void 0,void 0);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,b,c,0,a.RGBA,a.UNSIGNED_BYTE,null);return d}
function ag(a,b){var c=$f(a,33071,33071);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,b);return c};function bg(a,b){Cf.call(this,a,b);this.ea=this.B=void 0;this.C=[];this.I=[];this.G=void 0;this.l=[];this.c=[];this.Ba=this.N=void 0;this.ta=null;this.oa=this.la=this.Za=this.$=this.X=this.aa=void 0;this.Xa=[];this.v=[];this.Db=void 0}v(bg,Cf);k=bg.prototype;k.Hb=function(a){var b=this.s,c=this.o,d=this.Xa,e=this.v,f=a.b;return function(){if(!f.isContextLost()){var g;var h=0;for(g=d.length;h<g;++h)f.deleteTexture(d[h]);h=0;for(g=e.length;h<g;++h)f.deleteTexture(e[h])}Of(a,b);Of(a,c)}};
function cg(a,b,c,d){var e=a.B,f=a.ea,g=a.G,h=a.N,l=a.Ba,m=a.aa,n=a.X,p=a.$,q=a.Za?1:0,t=-a.la,u=a.oa,w=a.Db,z=Math.cos(t);t=Math.sin(t);var D=a.b.length,B=a.a.length,S;for(S=0;S<c;S+=d){var Ua=b[S]-a.origin[0];var ya=b[S+1]-a.origin[1];var Da=B/8;var C=-u*e;var pa=-u*(g-f);a.a[B++]=Ua;a.a[B++]=ya;a.a[B++]=C*z-pa*t;a.a[B++]=C*t+pa*z;a.a[B++]=n/l;a.a[B++]=(p+g)/h;a.a[B++]=m;a.a[B++]=q;C=u*(w-e);pa=-u*(g-f);a.a[B++]=Ua;a.a[B++]=ya;a.a[B++]=C*z-pa*t;a.a[B++]=C*t+pa*z;a.a[B++]=(n+w)/l;a.a[B++]=(p+g)/
h;a.a[B++]=m;a.a[B++]=q;C=u*(w-e);pa=u*f;a.a[B++]=Ua;a.a[B++]=ya;a.a[B++]=C*z-pa*t;a.a[B++]=C*t+pa*z;a.a[B++]=(n+w)/l;a.a[B++]=p/h;a.a[B++]=m;a.a[B++]=q;C=-u*e;pa=u*f;a.a[B++]=Ua;a.a[B++]=ya;a.a[B++]=C*z-pa*t;a.a[B++]=C*t+pa*z;a.a[B++]=n/l;a.a[B++]=p/h;a.a[B++]=m;a.a[B++]=q;a.b[D++]=Da;a.b[D++]=Da+1;a.b[D++]=Da+2;a.b[D++]=Da;a.b[D++]=Da+2;a.b[D++]=Da+3}}k.Cc=function(a,b){this.g.push(this.b.length);this.f.push(b);b=a.ja();cg(this,b,b.length,a.ya())};
k.Ec=function(a,b){this.g.push(this.b.length);this.f.push(b);b=a.ja();cg(this,b,b.length,a.ya())};k.Gb=function(a){a=a.b;this.C.push(this.b.length);this.I.push(this.b.length);this.s=new Kf(this.a);this.o=new Kf(this.b);var b={};dg(this.Xa,this.l,b,a);dg(this.v,this.c,b,a);this.G=this.ea=this.B=void 0;this.c=this.l=null;this.Ba=this.N=void 0;this.b=null;this.oa=this.la=this.Za=this.$=this.X=this.aa=void 0;this.a=null;this.Db=void 0};
function dg(a,b,c,d){var e,f=b.length;for(e=0;e<f;++e){var g=b[e];var h=x(g).toString();h in c?g=c[h]:(g=ag(d,g),c[h]=g);a[e]=g}}
k.Nf=function(a,b){var c=Pf(b,Sf,Uf);if(this.ta)var d=this.ta;else this.ta=d=new Vf(a,c);b.ld(c);a.enableVertexAttribArray(d.b);a.vertexAttribPointer(d.b,2,5126,!1,32,0);a.enableVertexAttribArray(d.s);a.vertexAttribPointer(d.s,2,5126,!1,32,8);a.enableVertexAttribArray(d.B);a.vertexAttribPointer(d.B,2,5126,!1,32,16);a.enableVertexAttribArray(d.I);a.vertexAttribPointer(d.I,1,5126,!1,32,24);a.enableVertexAttribArray(d.C);a.vertexAttribPointer(d.C,1,5126,!1,32,28);return d};
Patrick's avatar
Patrick committed
124
k.Of=function(a,b){a.disableVertexAttribArray(b.b);a.disableVertexAttribArray(b.s);a.disableVertexAttribArray(b.B);a.disableVertexAttribArray(b.I);a.disableVertexAttribArray(b.C)};
Patrick's avatar
Patrick committed
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
k.ie=function(a,b,c,d){var e=d?this.v:this.Xa;d=d?this.I:this.C;if(Aa(c)){var f;c=0;var g=e.length;for(f=0;c<g;++c){a.bindTexture(3553,e[c]);var h=d[c];Ef(a,b,f,h);f=h}}else for(f=g=0,h=e.length;f<h;++f){a.bindTexture(3553,e[f]);for(var l=0<f?d[f-1]:0,m=d[f],n=l;g<this.g.length&&this.g[g]<=m;){var p=x(this.f[g]).toString();void 0!==c[p]?(n!==l&&Ef(a,b,n,l),l=n=g===this.g.length-1?m:this.g[g+1]):l=g===this.g.length-1?m:this.g[g+1];g++}n!==l&&Ef(a,b,n,l)}};
k.Ue=function(a,b,c,d,e){var f,g,h=this.g.length-1;for(f=this.v.length-1;0<=f;--f){a.bindTexture(3553,this.v[f]);var l=0<f?this.I[f-1]:0;for(g=this.I[f];0<=h&&this.g[h]>=l;){var m=this.g[h];var n=this.f[h];var p=x(n).toString();if(void 0===c[p]&&n.V()&&(void 0===e||Jb(e,n.V().D()))&&(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),Ef(a,b,m,g),g=d(n)))return g;g=m;h--}}};
k.ic=function(a){var b=a.Gc(),c=a.W(1),d=a.Ye(),e=a.Rg(),f=a.La(),g=a.jd(),h=a.j,l=a.i,m=a.gc();a=a.Ma();if(0===this.l.length)this.l.push(c);else{var n=this.l[this.l.length-1];x(n)!=x(c)&&(this.C.push(this.b.length),this.l.push(c))}0===this.c.length?this.c.push(e):(n=this.c[this.c.length-1],x(n)!=x(e)&&(this.I.push(this.b.length),this.c.push(e)));this.B=b[0];this.ea=b[1];this.G=m[1];this.N=d[1];this.Ba=d[0];this.aa=f;this.X=g[0];this.$=g[1];this.la=l;this.Za=h;this.oa=a;this.Db=m[0]};function eg(a,b,c,d){for(var e=0,f=a[c-d],g=a[c-d+1];b<c;b+=d){var h=a[b],l=a[b+1];e+=(h-f)*(l+g);f=h;g=l}return 0<e}function fg(a,b,c,d){var e=0;d=void 0!==d?d:!1;var f;var g=0;for(f=b.length;g<f;++g){var h=b[g];e=eg(a,e,h,c);if(0===g){if(d&&e||!d&&!e)return!1}else if(d&&!e||!d&&e)return!1;e=h}return!0}
function gg(a,b,c,d,e){e=void 0!==e?e:!1;var f;var g=0;for(f=c.length;g<f;++g){var h=c[g],l=eg(a,b,h,d);if(0===g?e&&l||!e&&!l:e&&!l||!e&&l){l=a;for(var m=h,n=d;b<m-n;){var p;for(p=0;p<n;++p){var q=l[b+p];l[b+p]=l[m-n+p];l[m-n+p]=q}b+=n;m-=n}}b=h}return b}function hg(a,b,c,d){var e=0,f;var g=0;for(f=b.length;g<f;++g)e=gg(a,e,b[g],c,d);return e};function ig(a,b,c,d){for(var e=0,f=a[c-d],g=a[c-d+1];b<c;b+=d){var h=a[b],l=a[b+1];e+=g*h-f*l;f=h;g=l}return e/2}function jg(a,b,c,d){var e=0,f;var g=0;for(f=c.length;g<f;++g){var h=c[g];e+=ig(a,b,h,d);b=h}return e};function kg(a,b,c){var d=b-c;return a[0]===a[d]&&a[1]===a[d+1]&&3<(b-0)/c?!!ig(a,0,b,c):!1};function lg(){this.b="precision mediump float;\nvarying float v_round;\nvarying vec2 v_roundVertex;\nvarying float v_halfWidth;\n\n\n\nuniform float u_opacity;\nuniform vec4 u_color;\nuniform vec2 u_size;\nuniform float u_pixelRatio;\n\nvoid main(void) {\n  if (v_round > 0.0) {\n    vec2 windowCoords = vec2((v_roundVertex.x + 1.0) / 2.0 * u_size.x * u_pixelRatio,\n        (v_roundVertex.y + 1.0) / 2.0 * u_size.y * u_pixelRatio);\n    if (length(windowCoords - gl_FragCoord.xy) > v_halfWidth * u_pixelRatio) {\n      discard;\n    }\n  }\n  gl_FragColor = u_color;\n  float alpha = u_color.a * u_opacity;\n  if (alpha == 0.0) {\n    discard;\n  }\n  gl_FragColor.a = alpha;\n}\n"}
v(lg,tf);var mg=new lg;
function ng(){this.b="varying float v_round;\nvarying vec2 v_roundVertex;\nvarying float v_halfWidth;\n\n\nattribute vec2 a_lastPos;\nattribute vec2 a_position;\nattribute vec2 a_nextPos;\nattribute float a_direction;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_lineWidth;\nuniform float u_miterLimit;\n\nbool nearlyEquals(in float value, in float ref) {\n  float epsilon = 0.000000000001;\n  return value >= ref - epsilon && value <= ref + epsilon;\n}\n\nvoid alongNormal(out vec2 offset, in vec2 nextP, in float turnDir, in float direction) {\n  vec2 dirVect = nextP - a_position;\n  vec2 normal = normalize(vec2(-turnDir * dirVect.y, turnDir * dirVect.x));\n  offset = u_lineWidth / 2.0 * normal * direction;\n}\n\nvoid miterUp(out vec2 offset, out float round, in bool isRound, in float direction) {\n  float halfWidth = u_lineWidth / 2.0;\n  vec2 tangent = normalize(normalize(a_nextPos - a_position) + normalize(a_position - a_lastPos));\n  vec2 normal = vec2(-tangent.y, tangent.x);\n  vec2 dirVect = a_nextPos - a_position;\n  vec2 tmpNormal = normalize(vec2(-dirVect.y, dirVect.x));\n  float miterLength = abs(halfWidth / dot(normal, tmpNormal));\n  offset = normal * direction * miterLength;\n  round = 0.0;\n  if (isRound) {\n    round = 1.0;\n  } else if (miterLength > u_miterLimit + u_lineWidth) {\n    offset = halfWidth * tmpNormal * direction;\n  }\n}\n\nbool miterDown(out vec2 offset, in vec4 projPos, in mat4 offsetMatrix, in float direction) {\n  bool degenerate = false;\n  vec2 tangent = normalize(normalize(a_nextPos - a_position) + normalize(a_position - a_lastPos));\n  vec2 normal = vec2(-tangent.y, tangent.x);\n  vec2 dirVect = a_lastPos - a_position;\n  vec2 tmpNormal = normalize(vec2(-dirVect.y, dirVect.x));\n  vec2 longOffset, shortOffset, longVertex;\n  vec4 shortProjVertex;\n  float halfWidth = u_lineWidth / 2.0;\n  if (length(a_nextPos - a_position) > length(a_lastPos - a_position)) {\n    longOffset = tmpNormal * direction * halfWidth;\n    shortOffset = normalize(vec2(dirVect.y, -dirVect.x)) * direction * halfWidth;\n    longVertex = a_nextPos;\n    shortProjVertex = u_projectionMatrix * vec4(a_lastPos, 0.0, 1.0);\n  } else {\n    shortOffset = tmpNormal * direction * halfWidth;\n    longOffset = normalize(vec2(dirVect.y, -dirVect.x)) * direction * halfWidth;\n    longVertex = a_lastPos;\n    shortProjVertex = u_projectionMatrix * vec4(a_nextPos, 0.0, 1.0);\n  }\n  //Intersection algorithm based on theory by Paul Bourke (http://paulbourke.net/geometry/pointlineplane/).\n  vec4 p1 = u_projectionMatrix * vec4(longVertex, 0.0, 1.0) + offsetMatrix * vec4(longOffset, 0.0, 0.0);\n  vec4 p2 = projPos + offsetMatrix * vec4(longOffset, 0.0, 0.0);\n  vec4 p3 = shortProjVertex + offsetMatrix * vec4(-shortOffset, 0.0, 0.0);\n  vec4 p4 = shortProjVertex + offsetMatrix * vec4(shortOffset, 0.0, 0.0);\n  float denom = (p4.y - p3.y) * (p2.x - p1.x) - (p4.x - p3.x) * (p2.y - p1.y);\n  float firstU = ((p4.x - p3.x) * (p1.y - p3.y) - (p4.y - p3.y) * (p1.x - p3.x)) / denom;\n  float secondU = ((p2.x - p1.x) * (p1.y - p3.y) - (p2.y - p1.y) * (p1.x - p3.x)) / denom;\n  float epsilon = 0.000000000001;\n  if (firstU > epsilon && firstU < 1.0 - epsilon && secondU > epsilon && secondU < 1.0 - epsilon) {\n    shortProjVertex.x = p1.x + firstU * (p2.x - p1.x);\n    shortProjVertex.y = p1.y + firstU * (p2.y - p1.y);\n    offset = shortProjVertex.xy;\n    degenerate = true;\n  } else {\n    float miterLength = abs(halfWidth / dot(normal, tmpNormal));\n    offset = normal * direction * miterLength;\n  }\n  return degenerate;\n}\n\nvoid squareCap(out vec2 offset, out float round, in bool isRound, in vec2 nextP,\n    in float turnDir, in float direction) {\n  round = 0.0;\n  vec2 dirVect = a_position - nextP;\n  vec2 firstNormal = normalize(dirVect);\n  vec2 secondNormal = vec2(turnDir * firstNormal.y * direction, -turnDir * firstNormal.x * direction);\n  vec2 hypotenuse = normalize(firstNormal - secondNormal);\n  vec2 normal = vec2(turnDir * hypotenuse.y * direction, -turnDir * hypotenuse.x * direction);\n  float length = sqrt(v_halfWidth * v_halfWidth * 2.0);\n  offset = normal * length;\n  if (isRound) {\n    round = 1.0;\n  }\n}\n\nvoid main(void) {\n  bool degenerate = false;\n  float direction = float(sign(a_direction));\n  mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n  vec2 offset;\n  vec4 projPos = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n  bool round = nearlyEquals(mod(a_direction, 2.0), 0.0);\n\n  v_round = 0.0;\n  v_halfWidth = u_lineWidth / 2.0;\n  v_roundVertex = projPos.xy;\n\n  if (nearlyEquals(mod(a_direction, 3.0), 0.0) || nearlyEquals(mod(a_direction, 17.0), 0.0)) {\n    alongNormal(offset, a_nextPos, 1.0, direction);\n  } else if (nearlyEquals(mod(a_direction, 5.0), 0.0) || nearlyEquals(mod(a_direction, 13.0), 0.0)) {\n    alongNormal(offset, a_lastPos, -1.0, direction);\n  } else if (nearlyEquals(mod(a_direction, 23.0), 0.0)) {\n    miterUp(offset, v_round, round, direction);\n  } else if (nearlyEquals(mod(a_direction, 19.0), 0.0)) {\n    degenerate = miterDown(offset, projPos, offsetMatrix, direction);\n  } else if (nearlyEquals(mod(a_direction, 7.0), 0.0)) {\n    squareCap(offset, v_round, round, a_nextPos, 1.0, direction);\n  } else if (nearlyEquals(mod(a_direction, 11.0), 0.0)) {\n    squareCap(offset, v_round, round, a_lastPos, -1.0, direction);\n  }\n  if (!degenerate) {\n    vec4 offsets = offsetMatrix * vec4(offset, 0.0, 0.0);\n    gl_Position = projPos + offsets;\n  } else {\n    gl_Position = vec4(offset, 0.0, 1.0);\n  }\n}\n\n\n"}
v(ng,uf);var og=new ng;
function pg(a,b){this.ea=a.getUniformLocation(b,"u_color");this.ta=a.getUniformLocation(b,"u_lineWidth");this.Ba=a.getUniformLocation(b,"u_miterLimit");this.c=a.getUniformLocation(b,"u_offsetRotateMatrix");this.i=a.getUniformLocation(b,"u_offsetScaleMatrix");this.a=a.getUniformLocation(b,"u_opacity");this.G=a.getUniformLocation(b,"u_pixelRatio");this.g=a.getUniformLocation(b,"u_projectionMatrix");this.N=a.getUniformLocation(b,"u_size");this.f=a.getAttribLocation(b,"a_direction");this.l=a.getAttribLocation(b,
"a_lastPos");this.o=a.getAttribLocation(b,"a_nextPos");this.b=a.getAttribLocation(b,"a_position")};function qg(a,b){Cf.call(this,a,b);this.I=null;this.v=[];this.l=[];this.c={strokeColor:null,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0,u:!1}}v(qg,Cf);
function rg(a,b,c,d){var e,f=a.a.length,g=a.b.length,h="bevel"===a.c.lineJoin?0:"miter"===a.c.lineJoin?1:2,l="butt"===a.c.lineCap?0:"square"===a.c.lineCap?1:2,m=kg(b,c,d),n=g,p=1;for(e=0;e<c;e+=d){var q=f/7;var t=u;var u=w||[b[e],b[e+1]];if(0===e){var w=[b[e+d],b[e+d+1]];if(c-0===2*d&&ld(u,w))break;if(m){t=[b[c-2*d],b[c-2*d+1]];var z=w}else{l&&(f=sg(a,[0,0],u,w,p*tg*l,f),f=sg(a,[0,0],u,w,-p*tg*l,f),a.b[g++]=q+2,a.b[g++]=q,a.b[g++]=q+1,a.b[g++]=q+1,a.b[g++]=q+3,a.b[g++]=q+2);f=sg(a,[0,0],u,w,p*ug*
(l||1),f);f=sg(a,[0,0],u,w,-p*ug*(l||1),f);n=f/7-1;continue}}else if(e===c-d){m?w=z:(t=t||[0,0],f=sg(a,t,u,[0,0],p*vg*(l||1),f),f=sg(a,t,u,[0,0],-p*vg*(l||1),f),a.b[g++]=q,a.b[g++]=n-1,a.b[g++]=n,a.b[g++]=n,a.b[g++]=q+1,a.b[g++]=q,l&&(f=sg(a,t,u,[0,0],p*wg*l,f),f=sg(a,t,u,[0,0],-p*wg*l,f),a.b[g++]=q+2,a.b[g++]=q,a.b[g++]=q+1,a.b[g++]=q+1,a.b[g++]=q+3,a.b[g++]=q+2));break}else w=[b[e+d],b[e+d+1]];var D=If(t[0],t[1],u[0],u[1],w[0],w[1])?-1:1;f=sg(a,t,u,w,D*xg*(h||1),f);f=sg(a,t,u,w,D*yg*(h||1),f);f=
sg(a,t,u,w,-D*zg*(h||1),f);0<e&&(a.b[g++]=q,a.b[g++]=n-1,a.b[g++]=n,a.b[g++]=q+2,a.b[g++]=q,a.b[g++]=0<p*D?n:n-1);a.b[g++]=q;a.b[g++]=q+2;a.b[g++]=q+1;n=q+2;p=D;h&&(f=sg(a,t,u,w,D*Ag*h,f),a.b[g++]=q+1,a.b[g++]=q+3,a.b[g++]=q)}m&&(q=q||f/7,D=eg([t[0],t[1],u[0],u[1],w[0],w[1]],0,6,2)?1:-1,f=sg(a,t,u,w,D*xg*(h||1),f),sg(a,t,u,w,-D*zg*(h||1),f),a.b[g++]=q,a.b[g++]=n-1,a.b[g++]=n,a.b[g++]=q+1,a.b[g++]=q,a.b[g++]=0<p*D?n:n-1)}
function sg(a,b,c,d,e,f){a.a[f++]=b[0];a.a[f++]=b[1];a.a[f++]=c[0];a.a[f++]=c[1];a.a[f++]=d[0];a.a[f++]=d[1];a.a[f++]=e;return f}function Bg(a,b,c){b-=0;return b<2*c?!1:b===2*c?!ld([a[0],a[1]],[a[0+c],a[c+1]]):!0}k=qg.prototype;k.Yb=function(a,b){var c=a.ja();a=a.ya();Bg(c,c.length,a)&&(c=Vd(c,c.length,a,-this.origin[0],-this.origin[1]),this.c.u&&(this.l.push(this.b.length),this.c.u=!1),this.g.push(this.b.length),this.f.push(b),rg(this,c,c.length,a))};
k.Bc=function(a,b){var c=this.b.length;a=a.Hc();var d;var e=0;for(d=a.length;e<d;++e){var f=a[e].ja(),g=a[e].ya();Bg(f,f.length,g)&&(f=Vd(f,f.length,g,-this.origin[0],-this.origin[1]),rg(this,f,f.length,g))}this.b.length>c&&(this.g.push(c),this.f.push(b),this.c.u&&(this.l.push(c),this.c.u=!1))};
function Dg(a,b,c,d){kg(b,b.length,d)||(b.push(b[0]),b.push(b[1]));rg(a,b,b.length,d);if(c.length){var e;b=0;for(e=c.length;b<e;++b)kg(c[b],c[b].length,d)||(c[b].push(c[b][0]),c[b].push(c[b][1])),rg(a,c[b],c[b].length,d)}}function Eg(a,b,c){c=void 0===c?a.b.length:c;a.g.push(c);a.f.push(b);a.c.u&&(a.l.push(c),a.c.u=!1)}k.Gb=function(){this.s=new Kf(this.a);this.o=new Kf(this.b);this.g.push(this.b.length);0===this.l.length&&0<this.v.length&&(this.v=[]);this.b=this.a=null};
k.Hb=function(a){var b=this.s,c=this.o;return function(){Of(a,b);Of(a,c)}};
k.Nf=function(a,b,c,d){var e=Pf(b,mg,og);if(this.I)var f=this.I;else this.I=f=new pg(a,e);b.ld(e);a.enableVertexAttribArray(f.l);a.vertexAttribPointer(f.l,2,5126,!1,28,0);a.enableVertexAttribArray(f.b);a.vertexAttribPointer(f.b,2,5126,!1,28,8);a.enableVertexAttribArray(f.o);a.vertexAttribPointer(f.o,2,5126,!1,28,16);a.enableVertexAttribArray(f.f);a.vertexAttribPointer(f.f,1,5126,!1,28,24);a.uniform2fv(f.N,c);a.uniform1f(f.G,d);return f};
Patrick's avatar
Patrick committed
142
k.Of=function(a,b){a.disableVertexAttribArray(b.l);a.disableVertexAttribArray(b.b);a.disableVertexAttribArray(b.o);a.disableVertexAttribArray(b.f)};
Patrick's avatar
Patrick committed
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
k.ie=function(a,b,c,d){var e=a.getParameter(a.DEPTH_FUNC),f=a.getParameter(a.DEPTH_WRITEMASK);d||(a.enable(a.DEPTH_TEST),a.depthMask(!0),a.depthFunc(a.NOTEQUAL));if(Aa(c)){var g=this.g[this.g.length-1];for(c=this.l.length-1;0<=c;--c){var h=this.l[c];var l=this.v[c];Fg(this,a,l[0],l[1],l[2]);Ef(a,b,h,g);a.clear(a.DEPTH_BUFFER_BIT);g=h}}else{var m=this.g.length-2;l=g=this.g[m+1];for(h=this.l.length-1;0<=h;--h){var n=this.v[h];Fg(this,a,n[0],n[1],n[2]);for(n=this.l[h];0<=m&&this.g[m]>=n;){var p=this.g[m];
var q=this.f[m];q=x(q).toString();c[q]&&(g!==l&&(Ef(a,b,g,l),a.clear(a.DEPTH_BUFFER_BIT)),l=p);m--;g=p}g!==l&&(Ef(a,b,g,l),a.clear(a.DEPTH_BUFFER_BIT));g=l=n}}d||(a.disable(a.DEPTH_TEST),a.clear(a.DEPTH_BUFFER_BIT),a.depthMask(f),a.depthFunc(e))};
k.Ue=function(a,b,c,d,e){var f,g;var h=this.g.length-2;var l=this.g[h+1];for(f=this.l.length-1;0<=f;--f){var m=this.v[f];Fg(this,a,m[0],m[1],m[2]);for(g=this.l[f];0<=h&&this.g[h]>=g;){m=this.g[h];var n=this.f[h];var p=x(n).toString();if(void 0===c[p]&&n.V()&&(void 0===e||Jb(e,n.V().D()))&&(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),Ef(a,b,m,l),l=d(n)))return l;h--;l=m}}};function Fg(a,b,c,d,e){b.uniform4fv(a.I.ea,c);b.uniform1f(a.I.ta,d);b.uniform1f(a.I.Ba,e)}
k.Ta=function(a,b){a=b.i;this.c.lineCap=void 0!==a?a:"round";a=b.g;this.c.lineDash=a?a:Gf;a=b.f;this.c.lineDashOffset=a?a:0;a=b.j;this.c.lineJoin=void 0!==a?a:"round";a=b.b;a instanceof CanvasGradient||a instanceof CanvasPattern?a=Hf:a=Od(a).map(function(a,b){return 3!=b?a/255:a})||Hf;var c=b.c;c=void 0!==c?c:1;b=b.l;b=void 0!==b?b:10;this.c.strokeColor&&ld(this.c.strokeColor,a)&&this.c.lineWidth===c&&this.c.miterLimit===b||(this.c.u=!0,this.c.strokeColor=a,this.c.lineWidth=c,this.c.miterLimit=b,
this.v.push([a,c,b]))};var ug=3,vg=5,tg=7,wg=11,xg=13,yg=17,zg=19,Ag=23;function Gg(a,b,c,d,e){return!xb(e,function(e){return!Hg(a,b,c,d,e[0],e[1])})}function Hg(a,b,c,d,e,f){for(var g=0,h=a[c-d],l=a[c-d+1];b<c;b+=d){var m=a[b],n=a[b+1];l<=f?n>f&&0<(m-h)*(f-l)-(e-h)*(n-l)&&g++:n<=f&&0>(m-h)*(f-l)-(e-h)*(n-l)&&g--;h=m;l=n}return 0!==g}function Ig(a,b,c,d,e,f){if(0===c.length||!Hg(a,b,c[0],d,e,f))return!1;var g;b=1;for(g=c.length;b<g;++b)if(Hg(a,c[b-1],c[b],d,e,f))return!1;return!0};function Jg(){this.b="precision mediump float;\n\n\n\nuniform vec4 u_color;\nuniform float u_opacity;\n\nvoid main(void) {\n  gl_FragColor = u_color;\n  float alpha = u_color.a * u_opacity;\n  if (alpha == 0.0) {\n    discard;\n  }\n  gl_FragColor.a = alpha;\n}\n"}v(Jg,tf);var Kg=new Jg;
function Lg(){this.b="\n\nattribute vec2 a_position;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\n\nvoid main(void) {\n  gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n}\n\n\n"}v(Lg,uf);var Mg=new Lg;
function Ng(a,b){this.ea=a.getUniformLocation(b,"u_color");this.c=a.getUniformLocation(b,"u_offsetRotateMatrix");this.i=a.getUniformLocation(b,"u_offsetScaleMatrix");this.a=a.getUniformLocation(b,"u_opacity");this.g=a.getUniformLocation(b,"u_projectionMatrix");this.b=a.getAttribLocation(b,"a_position")};function Og(a){a=a||{};this.b=void 0!==a.color?a.color:null;this.i=a.lineCap;this.g=void 0!==a.lineDash?a.lineDash:null;this.f=a.lineDashOffset;this.j=a.lineJoin;this.l=a.miterLimit;this.c=a.width;this.a=void 0}k=Og.prototype;k.clone=function(){var a=this.b;return new Og({color:a&&a.slice?a.slice():a||void 0,lineCap:this.i,lineDash:this.g?this.g.slice():void 0,lineDashOffset:this.f,lineJoin:this.j,miterLimit:this.l,width:this.c})};k.Bp=function(){return this.b};k.Jl=function(){return this.i};
k.Cp=function(){return this.g};k.Kl=function(){return this.f};k.Ll=function(){return this.j};k.Ql=function(){return this.l};k.Dp=function(){return this.c};k.Ep=function(a){this.b=a;this.a=void 0};k.mr=function(a){this.i=a;this.a=void 0};k.setLineDash=function(a){this.g=a;this.a=void 0};k.nr=function(a){this.f=a;this.a=void 0};k.pr=function(a){this.j=a;this.a=void 0};k.sr=function(a){this.l=a;this.a=void 0};k.yr=function(a){this.c=a;this.a=void 0};function Pg(){this.b=this.a=this.g=void 0;this.c=0}function Qg(a){var b=a.b;if(b){var c=b.next,d=b.zb;c&&(c.zb=d);d&&(d.next=c);a.b=c||d;a.g===a.a?(a.b=void 0,a.g=void 0,a.a=void 0):a.g===b?a.g=a.b:a.a===b&&(a.a=d?a.b.zb:a.b);a.c--}}function Rg(a){a.b=a.g;if(a.b)return a.b.data}function Sg(a){if(a.b&&a.b.next)return a.b=a.b.next,a.b.data}function Tg(a){if(a.b&&a.b.next)return a.b.next.data}function Ug(a){if(a.b&&a.b.zb)return a.b=a.b.zb,a.b.data}function Vg(a){if(a.b&&a.b.zb)return a.b.zb.data}
function Wg(a){if(a.b)return a.b.data}Pg.prototype.concat=function(a){if(a.b){if(this.b){var b=this.b.next;this.b.next=a.g;a.g.zb=this.b;b.zb=a.a;a.a.next=b;this.c+=a.c}else this.b=a.b,this.g=a.g,this.a=a.a,this.c=a.c;a.b=void 0;a.g=void 0;a.a=void 0;a.c=0}};var Xg,Yg,Zg,$g;
(function(){var a={},b={na:a};(function(c){if("object"===typeof a&&"undefined"!==typeof b)b.na=c();else{var d;"undefined"!==typeof window?d=window:"undefined"!==typeof global?d=global:"undefined"!==typeof self?d=self:d=this;d.fs=c()}})(function(){return function g(a,b,f){function d(h,l){if(!b[h]){if(!a[h]){var m="function"==typeof require&&require;if(!l&&m)return m(h,!0);if(e)return e(h,!0);l=Error("Cannot find module '"+h+"'");throw l.code="MODULE_NOT_FOUND",l;}l=b[h]={na:{}};a[h][0].call(l.na,function(b){var e=
a[h][1][b];return d(e?e:b)},l,l.na,g,a,b,f)}return b[h].na}for(var e="function"==typeof require&&require,m=0;m<f.length;m++)d(f[m]);return d}({1:[function(a,b){function d(a,b,d,f,g){e(a,b,d||0,f||a.length-1,g||l)}function e(a,b,d,f,g){for(;f>d;){if(600<f-d){var l=f-d+1,m=b-d+1,n=Math.log(l),p=.5*Math.exp(2*n/3);n=.5*Math.sqrt(n*p*(l-p)/l)*(0>m-l/2?-1:1);e(a,b,Math.max(d,Math.floor(b-m*p/l+n)),Math.min(f,Math.floor(b+(l-m)*p/l+n)),g)}l=a[b];m=d;p=f;h(a,d,b);for(0<g(a[f],l)&&h(a,d,f);m<p;){h(a,m,p);
m++;for(p--;0>g(a[m],l);)m++;for(;0<g(a[p],l);)p--}0===g(a[d],l)?h(a,d,p):(p++,h(a,p,f));p<=b&&(d=p+1);b<=p&&(f=p-1)}}function h(a,b,d){var e=a[b];a[b]=a[d];a[d]=e}function l(a,b){return a<b?-1:a>b?1:0}b.na=d;b.na.b=d},{}],2:[function(a,b){function d(a,b){if(!(this instanceof d))return new d(a,b);this.cg=Math.max(4,a||9);this.Kh=Math.max(2,Math.ceil(.4*this.cg));b&&this.Nk(b);this.clear()}function e(a,b){h(a,0,a.children.length,b,a)}function h(a,b,d,e,f){f||(f=w(null));f.ga=Infinity;f.ha=Infinity;
f.da=-Infinity;f.ka=-Infinity;for(var g;b<d;b++)g=a.children[b],l(f,a.nb?e(g):g);return f}function l(a,b){a.ga=Math.min(a.ga,b.ga);a.ha=Math.min(a.ha,b.ha);a.da=Math.max(a.da,b.da);a.ka=Math.max(a.ka,b.ka);return a}function m(a,b){return a.ga-b.ga}function n(a,b){return a.ha-b.ha}function p(a){return(a.da-a.ga)*(a.ka-a.ha)}function q(a){return a.da-a.ga+(a.ka-a.ha)}function t(a,b){return a.ga<=b.ga&&a.ha<=b.ha&&b.da<=a.da&&b.ka<=a.ka}function u(a,b){return b.ga<=a.da&&b.ha<=a.ka&&b.da>=a.ga&&b.ka>=
a.ha}function w(a){return{children:a,height:1,nb:!0,ga:Infinity,ha:Infinity,da:-Infinity,ka:-Infinity}}function z(a,b,d,e,f){for(var g=[b,d],h;g.length;)d=g.pop(),b=g.pop(),d-b<=e||(h=b+Math.ceil((d-b)/e/2)*e,D(a,h,b,d,f),g.push(b,h,h,d))}b.na=d;var D=a("quickselect");d.prototype={all:function(){return this.Fh(this.data,[])},search:function(a){var b=this.data,d=[],e=this.Cb;if(!u(a,b))return d;for(var f=[],g,h,l,m;b;){g=0;for(h=b.children.length;g<h;g++)l=b.children[g],m=b.nb?e(l):l,u(a,m)&&(b.nb?
d.push(l):t(a,m)?this.Fh(l,d):f.push(l));b=f.pop()}return d},load:function(a){if(!a||!a.length)return this;if(a.length<this.Kh){for(var b=0,d=a.length;b<d;b++)this.Ha(a[b]);return this}a=this.Hh(a.slice(),0,a.length-1,0);this.data.children.length?this.data.height===a.height?this.Mh(this.data,a):(this.data.height<a.height&&(b=this.data,this.data=a,a=b),this.Jh(a,this.data.height-a.height-1,!0)):this.data=a;return this},Ha:function(a){a&&this.Jh(a,this.data.height-1);return this},clear:function(){this.data=
w([]);return this},remove:function(a,b){if(!a)return this;for(var d=this.data,e=this.Cb(a),f=[],g=[],h,l,m,n;d||f.length;){d||(d=f.pop(),l=f[f.length-1],h=g.pop(),n=!0);if(d.nb){a:{m=a;var p=d.children,q=b;if(q){for(var u=0;u<p.length;u++)if(q(m,p[u])){m=u;break a}m=-1}else m=p.indexOf(m)}if(-1!==m){d.children.splice(m,1);f.push(d);this.Kk(f);break}}n||d.nb||!t(d,e)?l?(h++,d=l.children[h],n=!1):d=null:(f.push(d),g.push(h),h=0,l=d,d=d.children[0])}return this},Cb:function(a){return a},gg:m,hg:n,toJSON:function(){return this.data},
Fh:function(a,b){for(var d=[];a;)a.nb?b.push.apply(b,a.children):d.push.apply(d,a.children),a=d.pop();return b},Hh:function(a,b,d,f){var g=d-b+1,h=this.cg;if(g<=h){var l=w(a.slice(b,d+1));e(l,this.Cb);return l}f||(f=Math.ceil(Math.log(g)/Math.log(h)),h=Math.ceil(g/Math.pow(h,f-1)));l=w([]);l.nb=!1;l.height=f;g=Math.ceil(g/h);h=g*Math.ceil(Math.sqrt(h));var m;for(z(a,b,d,h,this.gg);b<=d;b+=h){var n=Math.min(b+h-1,d);z(a,b,n,g,this.hg);for(m=b;m<=n;m+=g){var p=Math.min(m+g-1,n);l.children.push(this.Hh(a,
m,p,f-1))}}e(l,this.Cb);return l},Jk:function(a,b,d,e){for(var f,g,h,l,m,n,q,t;;){e.push(b);if(b.nb||e.length-1===d)break;q=t=Infinity;f=0;for(g=b.children.length;f<g;f++)h=b.children[f],m=p(h),n=(Math.max(h.da,a.da)-Math.min(h.ga,a.ga))*(Math.max(h.ka,a.ka)-Math.min(h.ha,a.ha))-m,n<t?(t=n,q=m<q?m:q,l=h):n===t&&m<q&&(q=m,l=h);b=l||b.children[0]}return b},Jh:function(a,b,d){var e=this.Cb;d=d?a:e(a);e=[];var f=this.Jk(d,this.data,b,e);f.children.push(a);for(l(f,d);0<=b;)if(e[b].children.length>this.cg)this.Sk(e,
b),b--;else break;this.Gk(d,e,b)},Sk:function(a,b){var d=a[b],f=d.children.length,g=this.Kh;this.Hk(d,g,f);f=this.Ik(d,g,f);f=w(d.children.splice(f,d.children.length-f));f.height=d.height;f.nb=d.nb;e(d,this.Cb);e(f,this.Cb);b?a[b-1].children.push(f):this.Mh(d,f)},Mh:function(a,b){this.data=w([a,b]);this.data.height=a.height+1;this.data.nb=!1;e(this.data,this.Cb)},Ik:function(a,b,d){var e,f;var g=f=Infinity;for(e=b;e<=d-b;e++){var l=h(a,0,e,this.Cb);var m=h(a,e,d,this.Cb);var n=Math.max(0,Math.min(l.da,
m.da)-Math.max(l.ga,m.ga))*Math.max(0,Math.min(l.ka,m.ka)-Math.max(l.ha,m.ha));l=p(l)+p(m);if(n<g){g=n;var q=e;f=l<f?l:f}else n===g&&l<f&&(f=l,q=e)}return q},Hk:function(a,b,d){var e=a.nb?this.gg:m,f=a.nb?this.hg:n,g=this.Gh(a,b,d,e);b=this.Gh(a,b,d,f);g<b&&a.children.sort(e)},Gh:function(a,b,d,e){a.children.sort(e);e=this.Cb;var f=h(a,0,b,e),g=h(a,d-b,d,e),m=q(f)+q(g),n;for(n=b;n<d-b;n++){var p=a.children[n];l(f,a.nb?e(p):p);m+=q(f)}for(n=d-b-1;n>=b;n--)p=a.children[n],l(g,a.nb?e(p):p),m+=q(g);return m},
Gk:function(a,b,d){for(;0<=d;d--)l(b[d],a)},Kk:function(a){for(var b=a.length-1,d;0<=b;b--)0===a[b].children.length?0<b?(d=a[b-1].children,d.splice(d.indexOf(a[b]),1)):this.clear():e(a[b],this.Cb)},Nk:function(a){var b=["return a"," - b",";"];this.gg=new Function("a","b",b.join(a[0]));this.hg=new Function("a","b",b.join(a[1]));this.Cb=new Function("a","return {minX: a"+a[0]+", minY: a"+a[1]+", maxX: a"+a[2]+", maxY: a"+a[3]+"};")}}},{quickselect:1}]},{},[2])(2)});Xg=b.na})();function ah(){this.b=Xg(void 0);this.a={}}k=ah.prototype;k.Ha=function(a,b){a={ga:a[0],ha:a[1],da:a[2],ka:a[3],value:b};this.b.Ha(a);this.a[x(b)]=a};k.load=function(a,b){for(var c=Array(b.length),d=0,e=b.length;d<e;d++){var f=a[d],g=b[d];f={ga:f[0],ha:f[1],da:f[2],ka:f[3],value:g};c[d]=f;this.a[x(g)]=f}this.b.load(c)};k.remove=function(a){a=x(a);var b=this.a[a];delete this.a[a];return null!==this.b.remove(b)};
function bh(a,b,c){var d=a.a[x(c)];vb([d.ga,d.ha,d.da,d.ka],b)||(a.remove(c),a.Ha(b,c))}function ch(a){return a.b.all().map(function(a){return a.value})}function dh(a,b){return a.b.search({ga:b[0],ha:b[1],da:b[2],ka:b[3]}).map(function(a){return a.value})}k.forEach=function(a,b){return eh(ch(this),a,b)};function fh(a,b,c,d){return eh(dh(a,b),c,d)}function eh(a,b,c){for(var d,e=0,f=a.length;e<f&&!(d=b.call(c,a[e]));e++);return d}k.clear=function(){this.b.clear();this.a={}};
k.D=function(a){var b=this.b.data;return rb(b.ga,b.ha,b.da,b.ka,a)};function gh(a,b){Cf.call(this,a,b);this.j=new qg(a,b);this.I=null;this.v=[];this.c=[];this.l={fillColor:null,u:!1}}v(gh,Cf);function hh(a,b,c,d){var e=new Pg,f=new ah;b=ih(a,b,d,e,f,!0);if(c.length){var g,h=[];var l=0;for(g=c.length;l<g;++l){var m={list:new Pg,da:void 0};h.push(m);m.da=ih(a,c[l],d,m.list,f,!1)}h.sort(function(a,b){return b.da-a.da});for(l=0;l<h.length;++l)jh(h[l].list,h[l].da,e,b,f)}kh(e,f,!1);lh(a,e,f)}
function ih(a,b,c,d,e,f){var g,h=a.a.length/2,l,m=[],n=[];if(f===eg(b,0,b.length,c)){var p=l=mh(a,b[0],b[1],h++);f=b[0];var q=c;for(g=b.length;q<g;q+=c){var t=mh(a,b[q],b[q+1],h++);n.push(nh(p,t,d));m.push([Math.min(p.x,t.x),Math.min(p.y,t.y),Math.max(p.x,t.x),Math.max(p.y,t.y)]);f=b[q]>f?b[q]:f;p=t}}else for(q=b.length-c,p=l=mh(a,b[q],b[q+1],h++),f=b[q],q-=c,g=0;q>=g;q-=c)t=mh(a,b[q],b[q+1],h++),n.push(nh(p,t,d)),m.push([Math.min(p.x,t.x),Math.min(p.y,t.y),Math.max(p.x,t.x),Math.max(p.y,t.y)]),f=
b[q]>f?b[q]:f,p=t;n.push(nh(t,l,d));m.push([Math.min(p.x,t.x),Math.min(p.y,t.y),Math.max(p.x,t.x),Math.max(p.y,t.y)]);e.load(m,n);return f}function kh(a,b,c){var d=Rg(a),e=d,f=Sg(a),g=!1;do{var h=c?If(f.Y.x,f.Y.y,e.Y.x,e.Y.y,e.ca.x,e.ca.y):If(e.ca.x,e.ca.y,e.Y.x,e.Y.y,f.Y.x,f.Y.y);void 0===h?(oh(e,f,a,b),g=!0,f===d&&(d=Tg(a)),f=e,Ug(a)):e.Y.Ab!==h&&(e.Y.Ab=h,g=!0);e=f;f=Sg(a)}while(e!==d);return g}
function jh(a,b,c,d,e){kh(a,e,!0);for(var f=Rg(a);f.Y.x!==b;)f=Sg(a);b=f.Y;d={x:d,y:b.y,mb:-1};var g=Infinity,h;var l=ph({ca:b,Y:d},e,!0);var m=0;for(h=l.length;m<h;++m){var n=l[m];if(void 0===n.ca.Ab){var p=qh(b,d,n.ca,n.Y,!0),q=Math.abs(b.x-p[0]);if(q<g){g=q;var t={x:p[0],y:p[1],mb:-1};f=n}}}if(Infinity!==g){l=f.Y;if(0<g&&(f=rh(b,t,f.Y,e),f.length))for(t=Infinity,m=0,h=f.length;m<h;++m)if(g=f[m],n=Math.atan2(b.y-g.y,d.x-g.x),n<t||n===t&&g.x<l.x)t=n,l=g;for(f=Rg(c);f.Y!==l;)f=Sg(c);d={x:b.x,y:b.y,
mb:b.mb,Ab:void 0};m={x:f.Y.x,y:f.Y.y,mb:f.Y.mb,Ab:void 0};Tg(a).ca=d;nh(b,f.Y,a,e);nh(m,d,a,e);f.Y=m;a.b&&(a.g=a.b,a.a=a.b.zb);c.concat(a)}}
function lh(a,b,c){for(var d=!1,e=sh(b,c);3<b.c;)if(e){if(!th(a,b,c,e,d)&&!kh(b,c,d)&&!uh(a,b,c,!0))break}else if(!th(a,b,c,e,d)&&!kh(b,c,d)&&!uh(a,b,c))if(e=sh(b,c)){d=b;var f=2*d.c,g=Array(f),h=Rg(d),l=h,m=0;do g[m++]=l.ca.x,g[m++]=l.ca.y,l=Sg(d);while(l!==h);d=!eg(g,0,f,2);kh(b,c,d)}else{e=a;d=b;f=g=Rg(d);do{h=ph(f,c);if(h.length){g=h[0];h=qh(f.ca,f.Y,g.ca,g.Y);h=mh(e,h[0],h[1],e.a.length/2);l=new Pg;m=new ah;nh(h,f.Y,l,m);f.Y=h;bh(c,[Math.min(f.ca.x,h.x),Math.min(f.ca.y,h.y),Math.max(f.ca.x,h.x),
Math.max(f.ca.y,h.y)],f);for(f=Sg(d);f!==g;)nh(f.ca,f.Y,l,m),c.remove(f),Qg(d),f=Wg(d);nh(g.ca,h,l,m);g.ca=h;bh(c,[Math.min(g.Y.x,h.x),Math.min(g.Y.y,h.y),Math.max(g.Y.x,h.x),Math.max(g.Y.y,h.y)],g);kh(d,c,!1);lh(e,d,c);kh(l,m,!1);lh(e,l,m);break}f=Sg(d)}while(f!==g);break}3===b.c&&(e=a.b.length,a.b[e++]=Vg(b).ca.mb,a.b[e++]=Wg(b).ca.mb,a.b[e++]=Tg(b).ca.mb)}
function th(a,b,c,d,e){var f=a.b.length,g=Rg(b),h=Vg(b),l=g,m=Sg(b),n=Tg(b),p=!1;do{var q=l.ca;var t=l.Y;var u=m.Y;if(!1===t.Ab){var w=e?vh(n.Y,u,t,q,h.ca):vh(h.ca,q,t,u,n.Y);!d&&0!==ph({ca:q,Y:u},c).length||!w||0!==rh(q,t,u,c,!0).length||!d&&!1!==q.Ab&&!1!==u.Ab&&eg([h.ca.x,h.ca.y,q.x,q.y,t.x,t.y,u.x,u.y,n.Y.x,n.Y.y],0,10,2)!==!e||(a.b[f++]=q.mb,a.b[f++]=t.mb,a.b[f++]=u.mb,oh(l,m,b,c),m===g&&(g=n),p=!0)}h=Vg(b);l=Wg(b);m=Sg(b);n=Tg(b)}while(l!==g&&3<b.c);return p}
function uh(a,b,c,d){var e=Rg(b);Sg(b);var f=e,g=Sg(b),h=!1;do{var l=qh(f.ca,f.Y,g.ca,g.Y,d);if(l){h=a.b.length;var m=a.a.length/2,n=Ug(b);Qg(b);c.remove(n);var p=n===e;d?(l[0]===f.ca.x&&l[1]===f.ca.y?(Ug(b),l=f.ca,g.ca=l,c.remove(f),p=p||f===e):(l=g.Y,f.Y=l,c.remove(g),p=p||g===e),Qg(b)):(l=mh(a,l[0],l[1],m),f.Y=l,g.ca=l,bh(c,[Math.min(f.ca.x,f.Y.x),Math.min(f.ca.y,f.Y.y),Math.max(f.ca.x,f.Y.x),Math.max(f.ca.y,f.Y.y)],f),bh(c,[Math.min(g.ca.x,g.Y.x),Math.min(g.ca.y,g.Y.y),Math.max(g.ca.x,g.Y.x),
Math.max(g.ca.y,g.Y.y)],g));a.b[h++]=n.ca.mb;a.b[h++]=n.Y.mb;a.b[h++]=l.mb;h=!0;if(p)break}f=Vg(b);g=Sg(b)}while(f!==e);return h}function sh(a,b){var c=Rg(a),d=c;do{if(ph(d,b).length)return!1;d=Sg(a)}while(d!==c);return!0}function mh(a,b,c,d){var e=a.a.length;a.a[e++]=b;a.a[e++]=c;return{x:b,y:c,mb:d,Ab:void 0}}
function nh(a,b,c,d){var e={ca:a,Y:b},f={zb:void 0,next:void 0,data:e},g=c.b;if(g){var h=g.next;f.zb=g;f.next=h;g.next=f;h&&(h.zb=f);g===c.a&&(c.a=f)}else c.g=f,c.a=f,f.next=f,f.zb=f;c.b=f;c.c++;d&&d.Ha([Math.min(a.x,b.x),Math.min(a.y,b.y),Math.max(a.x,b.x),Math.max(a.y,b.y)],e);return e}function oh(a,b,c,d){Wg(c)===b&&(Qg(c),a.Y=b.Y,d.remove(b),bh(d,[Math.min(a.ca.x,a.Y.x),Math.min(a.ca.y,a.Y.y),Math.max(a.ca.x,a.Y.x),Math.max(a.ca.y,a.Y.y)],a))}
function rh(a,b,c,d,e){var f,g,h=[],l=dh(d,[Math.min(a.x,b.x,c.x),Math.min(a.y,b.y,c.y),Math.max(a.x,b.x,c.x),Math.max(a.y,b.y,c.y)]);d=0;for(f=l.length;d<f;++d)for(g in l[d]){var m=l[d][g];"object"!==typeof m||e&&!m.Ab||m.x===a.x&&m.y===a.y||m.x===b.x&&m.y===b.y||m.x===c.x&&m.y===c.y||-1!==h.indexOf(m)||!Hg([a.x,a.y,b.x,b.y,c.x,c.y],0,6,2,m.x,m.y)||h.push(m)}return h}
function ph(a,b,c){var d=a.ca,e=a.Y;b=dh(b,[Math.min(d.x,e.x),Math.min(d.y,e.y),Math.max(d.x,e.x),Math.max(d.y,e.y)]);var f=[],g;var h=0;for(g=b.length;h<g;++h){var l=b[h];a!==l&&(c||l.ca!==e||l.Y!==d)&&qh(d,e,l.ca,l.Y,c)&&f.push(l)}return f}
function qh(a,b,c,d,e){var f=(d.y-c.y)*(b.x-a.x)-(d.x-c.x)*(b.y-a.y);if(0!==f&&(d=((d.x-c.x)*(a.y-c.y)-(d.y-c.y)*(a.x-c.x))/f,c=((b.x-a.x)*(a.y-c.y)-(b.y-a.y)*(a.x-c.x))/f,!e&&d>Jf&&d<1-Jf&&c>Jf&&c<1-Jf||e&&0<=d&&1>=d&&0<=c&&1>=c))return[a.x+d*(b.x-a.x),a.y+d*(b.y-a.y)]}
function vh(a,b,c,d,e){if(void 0===b.Ab||void 0===d.Ab)return!1;var f=(c.x-d.x)*(b.y-d.y)>(c.y-d.y)*(b.x-d.x);e=(e.x-d.x)*(b.y-d.y)<(e.y-d.y)*(b.x-d.x);a=(a.x-b.x)*(d.y-b.y)>(a.y-b.y)*(d.x-b.x);c=(c.x-b.x)*(d.y-b.y)<(c.y-b.y)*(d.x-b.x);b=b.Ab?c||a:c&&a;return(d.Ab?e||f:e&&f)&&b}k=gh.prototype;
k.Dc=function(a,b){var c=a.bd();a=a.ya();var d=this.b.length,e=this.j.b.length,f,g;var h=0;for(f=c.length;h<f;++h){var l=c[h].Ic();if(0<l.length){var m=l[0].ja();m=Vd(m,m.length,a,-this.origin[0],-this.origin[1]);var n=[];var p=1;for(g=l.length;p<g;++p){var q=l[p].ja();q=Vd(q,q.length,a,-this.origin[0],-this.origin[1]);n.push(q)}Dg(this.j,m,n,a);hh(this,m,n,a)}}this.b.length>d&&(this.g.push(d),this.f.push(b),this.l.u&&(this.c.push(d),this.l.u=!1));this.j.b.length>e&&Eg(this.j,b,e)};
k.Fc=function(a,b){var c=a.Ic();a=a.ya();if(0<c.length){this.g.push(this.b.length);this.f.push(b);this.l.u&&(this.c.push(this.b.length),this.l.u=!1);Eg(this.j,b);b=c[0].ja();b=Vd(b,b.length,a,-this.origin[0],-this.origin[1]);var d=[],e;var f=1;for(e=c.length;f<e;++f){var g=c[f].ja();g=Vd(g,g.length,a,-this.origin[0],-this.origin[1]);d.push(g)}Dg(this.j,b,d,a);hh(this,b,d,a)}};
k.Gb=function(a){this.s=new Kf(this.a);this.o=new Kf(this.b);this.g.push(this.b.length);this.j.Gb(a);0===this.c.length&&0<this.v.length&&(this.v=[]);this.b=this.a=null};k.Hb=function(a){var b=this.s,c=this.o,d=this.j.Hb(a);return function(){Of(a,b);Of(a,c);d()}};k.Nf=function(a,b){var c=Pf(b,Kg,Mg);if(this.I)var d=this.I;else this.I=d=new Ng(a,c);b.ld(c);a.enableVertexAttribArray(d.b);a.vertexAttribPointer(d.b,2,5126,!1,8,0);return d};k.Of=function(a,b){a.disableVertexAttribArray(b.b)};
k.ie=function(a,b,c,d){var e=a.getParameter(a.DEPTH_FUNC),f=a.getParameter(a.DEPTH_WRITEMASK);d||(a.enable(a.DEPTH_TEST),a.depthMask(!0),a.depthFunc(a.NOTEQUAL));if(Aa(c)){var g=this.g[this.g.length-1];for(c=this.c.length-1;0<=c;--c){var h=this.c[c];var l=this.v[c];a.uniform4fv(this.I.ea,l);Ef(a,b,h,g);g=h}}else{var m=this.g.length-2;l=g=this.g[m+1];for(h=this.c.length-1;0<=h;--h){var n=this.v[h];a.uniform4fv(this.I.ea,n);for(n=this.c[h];0<=m&&this.g[m]>=n;){var p=this.g[m];var q=this.f[m];q=x(q).toString();
c[q]&&(g!==l&&(Ef(a,b,g,l),a.clear(a.DEPTH_BUFFER_BIT)),l=p);m--;g=p}g!==l&&(Ef(a,b,g,l),a.clear(a.DEPTH_BUFFER_BIT));g=l=n}}d||(a.disable(a.DEPTH_TEST),a.clear(a.DEPTH_BUFFER_BIT),a.depthMask(f),a.depthFunc(e))};
k.Ue=function(a,b,c,d,e){var f,g;var h=this.g.length-2;var l=this.g[h+1];for(f=this.c.length-1;0<=f;--f){var m=this.v[f];a.uniform4fv(this.I.ea,m);for(g=this.c[f];0<=h&&this.g[h]>=g;){m=this.g[h];var n=this.f[h];var p=x(n).toString();if(void 0===c[p]&&n.V()&&(void 0===e||Jb(e,n.V().D()))&&(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),Ef(a,b,m,l),l=d(n)))return l;h--;l=m}}};
k.Ta=function(a,b){a=a?a.b:[0,0,0,0];a instanceof CanvasGradient||a instanceof CanvasPattern?a=Ff:a=Od(a).map(function(a,b){return 3!=b?a/255:a})||Ff;this.l.fillColor&&ld(a,this.l.fillColor)||(this.l.fillColor=a,this.l.u=!0,this.v.push(a));b?this.j.Ta(null,b):this.j.Ta(null,new Og({color:[0,0,0,0],lineWidth:0}))};function xh(){}xh.prototype.i=function(){};function yh(a,b,c){this.f=b;this.j=a;this.c=c;this.a={}}v(yh,rf);function zh(a,b){var c=[],d;for(d in a.a){var e=a.a[d],f;for(f in e)c.push(e[f].Hb(b))}return function(){for(var a=c.length,b,d=0;d<a;d++)b=c[d].apply(this,arguments);return b}}function Ah(a,b){for(var c in a.a){var d=a.a[c],e;for(e in d)d[e].Gb(b)}}yh.prototype.b=function(a,b){var c=void 0!==a?a.toString():"0";a=this.a[c];void 0===a&&(a={},this.a[c]=a);c=a[b];void 0===c&&(c=new Bh[b](this.j,this.f),a[b]=c);return c};
yh.prototype.g=function(){return Aa(this.a)};yh.prototype.i=function(a,b,c,d,e,f,g,h){var l=Object.keys(this.a).map(Number);l.sort(fd);var m,n;var p=0;for(m=l.length;p<m;++p){var q=this.a[l[p].toString()];var t=0;for(n=qf.length;t<n;++t){var u=q[qf[t]];void 0!==u&&u.i(a,b,c,d,e,f,g,h,void 0,!1)}}};
function Ch(a,b,c,d,e,f,g,h,l,m,n){var p=Dh,q=Object.keys(a.a).map(Number);q.sort(function(a,b){return b-a});var t,u;var w=0;for(t=q.length;w<t;++w){var z=a.a[q[w].toString()];for(u=qf.length-1;0<=u;--u){var D=z[qf[u]];if(void 0!==D&&(D=D.i(b,c,d,e,p,f,g,h,l,m,n)))return D}}}
yh.prototype.Ga=function(a,b,c,d,e,f,g,h,l,m){var n=b.b;n.bindFramebuffer(n.FRAMEBUFFER,Xf(b));var p;void 0!==this.c&&(p=kb(sb(a),d*this.c));return Ch(this,b,a,d,e,g,h,l,function(a){var b=new Uint8Array(4);n.readPixels(0,0,1,1,n.RGBA,n.UNSIGNED_BYTE,b);if(0<b[3]&&(a=m(a)))return a},!0,p)};
function Eh(a,b,c,d,e,f,g,h){var l=c.b;l.bindFramebuffer(l.FRAMEBUFFER,Xf(c));return void 0!==Ch(a,c,b,d,e,f,g,h,function(){var a=new Uint8Array(4);l.readPixels(0,0,1,1,l.RGBA,l.UNSIGNED_BYTE,a);return 0<a[3]},!1)}var Dh=[1,1],Bh={Circle:Nf,Image:bg,LineString:qg,Polygon:gh,Text:xh};function Fh(a,b,c,d,e,f,g){this.b=a;this.g=b;this.a=f;this.c=g;this.j=e;this.f=d;this.i=c;this.l=this.o=this.s=null}v(Fh,te);k=Fh.prototype;k.Jd=function(a){this.Ta(a.qa(),a.pa());this.ic(a.W())};
k.Ac=function(a){switch(a.U()){case "Point":this.Ec(a,null);break;case "LineString":this.Yb(a,null);break;case "Polygon":this.Fc(a,null);break;case "MultiPoint":this.Cc(a,null);break;case "MultiLineString":this.Bc(a,null);break;case "MultiPolygon":this.Dc(a,null);break;case "GeometryCollection":this.Te(a);break;case "Circle":this.nc(a,null)}};k.Se=function(a,b){(a=(0,b.Va)(a))&&Jb(this.a,a.D())&&(this.Jd(b),this.Ac(a))};k.Te=function(a){a=a.a;var b;var c=0;for(b=a.length;c<b;++c)this.Ac(a[c])};
k.Ec=function(a,b){var c=this.b,d=(new yh(1,this.a)).b(0,"Image");d.ic(this.s);d.Ec(a,b);d.Gb(c);d.i(this.b,this.g,this.i,this.f,this.j,this.c,1,{},void 0,!1);d.Hb(c)()};k.Cc=function(a,b){var c=this.b,d=(new yh(1,this.a)).b(0,"Image");d.ic(this.s);d.Cc(a,b);d.Gb(c);d.i(this.b,this.g,this.i,this.f,this.j,this.c,1,{},void 0,!1);d.Hb(c)()};
k.Yb=function(a,b){var c=this.b,d=(new yh(1,this.a)).b(0,"LineString");d.Ta(null,this.l);d.Yb(a,b);d.Gb(c);d.i(this.b,this.g,this.i,this.f,this.j,this.c,1,{},void 0,!1);d.Hb(c)()};k.Bc=function(a,b){var c=this.b,d=(new yh(1,this.a)).b(0,"LineString");d.Ta(null,this.l);d.Bc(a,b);d.Gb(c);d.i(this.b,this.g,this.i,this.f,this.j,this.c,1,{},void 0,!1);d.Hb(c)()};
k.Fc=function(a,b){var c=this.b,d=(new yh(1,this.a)).b(0,"Polygon");d.Ta(this.o,this.l);d.Fc(a,b);d.Gb(c);d.i(this.b,this.g,this.i,this.f,this.j,this.c,1,{},void 0,!1);d.Hb(c)()};k.Dc=function(a,b){var c=this.b,d=(new yh(1,this.a)).b(0,"Polygon");d.Ta(this.o,this.l);d.Dc(a,b);d.Gb(c);d.i(this.b,this.g,this.i,this.f,this.j,this.c,1,{},void 0,!1);d.Hb(c)()};
k.nc=function(a,b){var c=this.b,d=(new yh(1,this.a)).b(0,"Circle");d.Ta(this.o,this.l);d.nc(a,b);d.Gb(c);d.i(this.b,this.g,this.i,this.f,this.j,this.c,1,{},void 0,!1);d.Hb(c)()};k.ic=function(a){this.s=a};k.Ta=function(a,b){this.o=a;this.l=b};function Gh(){this.b="precision mediump float;\nvarying vec2 v_texCoord;\n\n\nuniform float u_opacity;\nuniform sampler2D u_texture;\n\nvoid main(void) {\n  vec4 texColor = texture2D(u_texture, v_texCoord);\n  gl_FragColor.rgb = texColor.rgb;\n  gl_FragColor.a = texColor.a * u_opacity;\n}\n"}v(Gh,tf);var Hh=new Gh;
function Ih(){this.b="varying vec2 v_texCoord;\n\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\n\nuniform mat4 u_texCoordMatrix;\nuniform mat4 u_projectionMatrix;\n\nvoid main(void) {\n  gl_Position = u_projectionMatrix * vec4(a_position, 0., 1.);\n  v_texCoord = (u_texCoordMatrix * vec4(a_texCoord, 0., 1.)).st;\n}\n\n\n"}v(Ih,uf);var Jh=new Ih;
function Kh(a,b){this.g=a.getUniformLocation(b,"u_opacity");this.c=a.getUniformLocation(b,"u_projectionMatrix");this.f=a.getUniformLocation(b,"u_texCoordMatrix");this.i=a.getUniformLocation(b,"u_texture");this.b=a.getAttribLocation(b,"a_position");this.a=a.getAttribLocation(b,"a_texCoord")};function Lh(a,b){Se.call(this,b);this.c=a;this.X=new Kf([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]);this.f=this.texture=null;this.j=void 0;this.s=ve();this.v=ve();this.B=Af();this.I=null}v(Lh,Se);
function Mh(a,b,c){var d=a.c.g;if(void 0===a.j||a.j!=c){b.postRenderFunctions.push(function(a,b,c){a.isContextLost()||(a.deleteFramebuffer(b),a.deleteTexture(c))}.bind(null,d,a.f,a.texture));b=Yf(d,c,c);var e=d.createFramebuffer();d.bindFramebuffer(36160,e);d.framebufferTexture2D(36160,36064,3553,b,0);a.texture=b;a.f=e;a.j=c}else d.bindFramebuffer(36160,a.f)}
Lh.prototype.ij=function(a,b,c){Nh(this,"precompose",c,a);Df(c,34962,this.X);var d=c.b,e=Pf(c,Hh,Jh);if(this.I)var f=this.I;else this.I=f=new Kh(d,e);c.ld(e)&&(d.enableVertexAttribArray(f.b),d.vertexAttribPointer(f.b,2,5126,!1,16,0),d.enableVertexAttribArray(f.a),d.vertexAttribPointer(f.a,2,5126,!1,16,8),d.uniform1i(f.i,0));d.uniformMatrix4fv(f.f,!1,Bf(this.B,this.s));d.uniformMatrix4fv(f.c,!1,Bf(this.B,this.v));d.uniform1f(f.g,b.opacity);d.bindTexture(3553,this.texture);d.drawArrays(5,0,4);Nh(this,
"postcompose",c,a)};function Nh(a,b,c,d){a=a.a;if(Ra(a,b)){var e=d.viewState;a.b(new Hd(b,new Fh(c,e.center,e.resolution,e.rotation,d.size,d.extent,d.pixelRatio),d,null,c))}}Lh.prototype.Og=function(){this.f=this.texture=null;this.j=void 0};function Oh(){this.b="precision mediump float;\nvarying vec2 v_texCoord;\n\n\nuniform sampler2D u_texture;\n\nvoid main(void) {\n  gl_FragColor = texture2D(u_texture, v_texCoord);\n}\n"}v(Oh,tf);var Ph=new Oh;function Qh(){this.b="varying vec2 v_texCoord;\n\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nuniform vec4 u_tileOffset;\n\nvoid main(void) {\n  gl_Position = vec4(a_position * u_tileOffset.xy + u_tileOffset.zw, 0., 1.);\n  v_texCoord = a_texCoord;\n}\n\n\n"}v(Qh,uf);var Rh=new Qh;
function Sh(a,b){this.g=a.getUniformLocation(b,"u_texture");this.c=a.getUniformLocation(b,"u_tileOffset");this.b=a.getAttribLocation(b,"a_position");this.a=a.getAttribLocation(b,"a_texCoord")};function Th(a,b,c){void 0===c&&(c=[0,0]);c[0]=a[0]+2*b;c[1]=a[1]+2*b;return c}function Uh(a,b,c){void 0===c&&(c=[0,0]);c[0]=a[0]*b+.5|0;c[1]=a[1]*b+.5|0;return c}function mf(a,b){if(Array.isArray(a))return a;void 0===b?b=[a,a]:b[0]=b[1]=a;return b};function Vh(a,b){Lh.call(this,a,b);this.N=Ph;this.la=Rh;this.i=null;this.G=new Kf([0,0,0,1,1,0,1,1,0,1,0,0,1,1,1,0]);this.C=this.l=null;this.o=-1;this.aa=[0,0]}v(Vh,Lh);k=Vh.prototype;k.xa=function(){Of(this.c.i,this.G);Lh.prototype.xa.call(this)};k.ig=function(a,b,c){var d=this.c;return function(e,f){return Te(a,b,e,f,function(a){var b=d.a.b.hasOwnProperty(a.ob());b&&(c[e]||(c[e]={}),c[e][a.Ka.toString()]=a);return b})}};k.Og=function(){Lh.prototype.Og.call(this);this.i=null};
k.Pg=function(a,b,c){var d=this.c,e=c.b,f=a.viewState,g=f.projection,h=this.a,l=h.ba(),m=l.Ob(g),n=m.dd(f.resolution),p=m.Ra(n),q=l.oe(n,a.pixelRatio,g),t=q[0]/mf(m.gb(n),this.aa)[0],u=p/t,w=l.vb(t)*l.sg(g),z=f.center,D=a.extent,B=lf(m,D,p);if(this.l&&dd(this.l,B)&&this.o==l.g)u=this.C;else{var S=[B.da-B.ga+1,B.ka-B.ha+1],Ua=Ob(Math.max(S[0]*q[0],S[1]*q[1]));S=u*Ua;var ya=m.kd(n),Da=ya[0]+B.ga*q[0]*u;u=ya[1]+B.ha*q[1]*u;u=[Da,u,Da+S,u+S];Mh(this,a,Ua);e.viewport(0,0,Ua,Ua);e.clearColor(0,0,0,0);e.clear(16384);
e.disable(3042);Ua=Pf(c,this.N,this.la);c.ld(Ua);this.i||(this.i=new Sh(e,Ua));Df(c,34962,this.G);e.enableVertexAttribArray(this.i.b);e.vertexAttribPointer(this.i.b,2,5126,!1,16,0);e.enableVertexAttribArray(this.i.a);e.vertexAttribPointer(this.i.a,2,5126,!1,16,8);e.uniform1i(this.i.g,0);c={};c[n]={};var C=this.ig(l,g,c),pa=h.pe();Ua=!0;Da=ib();var $a=new bd(0,0,0,0),ra,dc;for(ra=B.ga;ra<=B.da;++ra)for(dc=B.ha;dc<=B.ka;++dc){ya=l.cd(n,ra,dc,t,g);if(void 0!==b.extent){var Pa=m.Ya(ya.Ka,Da);if(!Jb(Pa,
b.extent))continue}Pa=ya.getState();(Pa=2==Pa||4==Pa||3==Pa&&!pa)||(ya=nf(ya));Pa=ya.getState();if(2==Pa){if(d.a.b.hasOwnProperty(ya.ob())){c[n][ya.Ka.toString()]=ya;continue}}else if(4==Pa||3==Pa&&!pa)continue;Ua=!1;Pa=of(m,ya.Ka,C,$a,Da);Pa||(ya=pf(m,ya.Ka,$a,Da))&&C(n+1,ya)}b=Object.keys(c).map(Number);b.sort(fd);C=new Float32Array(4);var ic;pa=0;for($a=b.length;pa<$a;++pa)for(ic in ra=c[b[pa]],ra)ya=ra[ic],Pa=m.Ya(ya.Ka,Da),C[0]=2*(Pa[2]-Pa[0])/S,C[1]=2*(Pa[3]-Pa[1])/S,C[2]=2*(Pa[0]-u[0])/S-1,
C[3]=2*(Pa[1]-u[1])/S-1,e.uniform4fv(this.i.c,C),Wh(d,ya,q,w*t),e.drawArrays(5,0,4);Ua?(this.l=B,this.C=u,this.o=l.g):(this.C=this.l=null,this.o=-1,a.animate=!0)}Ze(a.usedTiles,l,n,B);var jd=d.j;$e(a,l,m,t,g,D,n,h.le(),function(a){2!=a.getState()||d.a.b.hasOwnProperty(a.ob())||a.ob()in jd.a||jd.i([a,bf(m,a.Ka),m.Ra(a.Ka[0]),q,w*t])},this);We(a,l);Ye(a,l);e=this.s;we(e);De(e,(Math.round(z[0]/p)*p-u[0])/(u[2]-u[0]),(Math.round(z[1]/p)*p-u[1])/(u[3]-u[1]));0!==f.rotation&&Be(e,f.rotation);Ce(e,a.size[0]*
f.resolution/(u[2]-u[0]),a.size[1]*f.resolution/(u[3]-u[1]));De(e,-.5,-.5);return!0};k.Ng=function(a,b,c,d){if(this.f){a=Ae(this.s,[a[0]/b.size[0],(b.size[1]-a[1])/b.size[1]].slice());a=[a[0]*this.j,a[1]*this.j];b=this.c.i.b;b.bindFramebuffer(b.FRAMEBUFFER,this.f);var e=new Uint8Array(4);b.readPixels(a[0],a[1],1,1,b.RGBA,b.UNSIGNED_BYTE,e);if(0<e[3])return c.call(d,this.a,e)}};function Xh(a){a=a?a:{};var b=wa({},a);delete b.preload;delete b.useInterimTilesOnError;$c.call(this,b);this.bj(void 0!==a.preload?a.preload:0);this.cj(void 0!==a.useInterimTilesOnError?a.useInterimTilesOnError:!0)}v(Xh,$c);k=Xh.prototype;k.Zd=function(a){var b=null,c=a.U();"canvas"===c?b=new hf(this):"webgl"===c&&(b=new Vh(a,this));return b};k.le=function(){return this.get("preload")};k.bj=function(a){this.set("preload",a)};k.pe=function(){return this.get("useInterimTilesOnError")};
k.cj=function(a){this.set("useInterimTilesOnError",a)};function Yh(a,b){Qa.call(this);this.Ka=a;this.state=b;this.a=null;this.key=""}v(Yh,Qa);Yh.prototype.u=function(){this.b("change")};Yh.prototype.ob=function(){return this.key+"/"+this.Ka};function nf(a){if(!a.a)return a;var b=a.a;do{if(2==b.getState())return b;b=b.a}while(b);return a}Yh.prototype.i=function(){return this.Ka};Yh.prototype.getState=function(){return this.state};function Zh(a,b,c,d,e){Yh.call(this,a,b);this.f=c;this.O=new Image;null!==d&&(this.O.crossOrigin=d);this.c=null;this.l=e}v(Zh,Yh);k=Zh.prototype;k.xa=function(){1==this.state&&$h(this);this.a&&Ma(this.a);this.state=5;this.u();Yh.prototype.xa.call(this)};k.W=function(){return this.O};k.ob=function(){return this.f};k.yn=function(){this.state=3;$h(this);this.u()};k.zn=function(){this.state=this.O.naturalWidth&&this.O.naturalHeight?2:4;$h(this);this.u()};
k.load=function(){if(0==this.state||3==this.state)this.state=1,this.u(),this.c=[Ia(this.O,"error",this.yn,this),Ia(this.O,"load",this.zn,this)],this.l(this,this.f)};function $h(a){a.c.forEach(Ca);a.c=null};function ai(){this.c=0;this.b={};this.g=this.a=null}k=ai.prototype;k.clear=function(){this.c=0;this.b={};this.g=this.a=null};k.forEach=function(a,b){for(var c=this.a;c;)a.call(b,c.ud,c.Kc,this),c=c.Qb};k.get=function(a){a=this.b[a];gb(void 0!==a,15);if(a===this.g)return a.ud;a===this.a?(this.a=this.a.Qb,this.a.Nd=null):(a.Qb.Nd=a.Nd,a.Nd.Qb=a.Qb);a.Qb=null;a.Nd=this.g;this.g=this.g.Qb=a;return a.ud};
k.pop=function(){var a=this.a;delete this.b[a.Kc];a.Qb&&(a.Qb.Nd=null);this.a=a.Qb;this.a||(this.g=null);--this.c;return a.ud};k.replace=function(a,b){this.get(a);this.b[a].ud=b};k.set=function(a,b){gb(!(a in this.b),16);b={Kc:a,Qb:null,Nd:this.g,ud:b};this.g?this.g.Qb=b:this.a=b;this.g=b;this.b[a]=b;++this.c};function bi(a){ai.call(this);this.highWaterMark=void 0!==a?a:2048}v(bi,ai);function ci(a){return a.c>a.highWaterMark}bi.prototype.Bd=function(a){for(var b,c;ci(this);){b=this.a.ud;c=b.Ka[0].toString();var d;if(d=c in a)b=b.Ka,d=cd(a[c],b[1],b[2]);if(d)break;else Ma(this.pop())}};function di(a,b,c,d){var e=Xc(c,b,a);c=Jc(b,d,c);b=b.dc();void 0!==b&&(c*=b);b=a.dc();void 0!==b&&(c/=b);a=Jc(a,c,e)/c;isFinite(a)&&0<a&&(c/=a);return c}function ei(a,b,c,d){a=c-a;b=d-b;var e=Math.sqrt(a*a+b*b);return[Math.round(c+a/e),Math.round(d+b/e)]}
function fi(a,b,c,d,e,f,g,h,l,m,n){var p=pd(Math.round(c*a),Math.round(c*b));if(0===l.length)return p.canvas;p.scale(c,c);var q=ib();l.forEach(function(a){wb(q,a.extent)});var t=pd(Math.round(c*Eb(q)/d),Math.round(c*Fb(q)/d)),u=c/d;l.forEach(function(a){t.drawImage(a.image,m,m,a.image.width-2*m,a.image.height-2*m,(a.extent[0]-q[0])*u,-(a.extent[3]-q[3])*u,Eb(a.extent)*u,Fb(a.extent)*u)});var w=Bb(g);h.c.forEach(function(a){var b=a.source,e=a.target,g=b[1][0],h=b[1][1],l=b[2][0],m=b[2][1];a=(e[0][0]-
Patrick's avatar
Patrick committed
211
w[0])/f;var n=-(e[0][1]-w[1])/f,u=(e[1][0]-w[0])/f,z=-(e[1][1]-w[1])/f,ra=(e[2][0]-w[0])/f,dc=-(e[2][1]-w[1])/f;e=b[0][0];b=b[0][1];g-=e;h-=b;l-=e;m-=b;a:{g=[[g,h,0,0,u-a],[l,m,0,0,ra-a],[0,0,g,h,z-n],[0,0,l,m,dc-n]];h=g.length;for(l=0;l<h;l++){m=l;for(var Pa=Math.abs(g[l][l]),ic=l+1;ic<h;ic++){var jd=Math.abs(g[ic][l]);jd>Pa&&(Pa=jd,m=ic)}if(0===Pa){g=null;break a}Pa=g[m];g[m]=g[l];g[l]=Pa;for(m=l+1;m<h;m++)for(Pa=-g[m][l]/g[l][l],ic=l;ic<h+1;ic++)g[m][ic]=l==ic?0:g[m][ic]+Pa*g[l][ic]}l=Array(h);
Patrick's avatar
Patrick committed
212
213
for(m=h-1;0<=m;m--)for(l[m]=g[m][h]/g[m][m],Pa=m-1;0<=Pa;Pa--)g[Pa][h]-=g[Pa][m]*l[m];g=l}g&&(p.save(),p.beginPath(),l=(a+u+ra)/3,m=(n+z+dc)/3,h=ei(l,m,a,n),u=ei(l,m,u,z),ra=ei(l,m,ra,dc),p.moveTo(u[0],u[1]),p.lineTo(h[0],h[1]),p.lineTo(ra[0],ra[1]),p.clip(),p.transform(g[0],g[2],g[1],g[3],a,n),p.translate(q[0]-e,q[3]-b),p.scale(d/c,-d/c),p.drawImage(t.canvas,0,0),p.restore())});n&&(p.save(),p.strokeStyle="black",p.lineWidth=1,h.c.forEach(function(a){var b=a.target;a=(b[0][0]-w[0])/f;var c=-(b[0][1]-
w[1])/f,d=(b[1][0]-w[0])/f,e=-(b[1][1]-w[1])/f,g=(b[2][0]-w[0])/f;b=-(b[2][1]-w[1])/f;p.beginPath();p.moveTo(d,e);p.lineTo(a,c);p.lineTo(g,b);p.closePath();p.stroke()}),p.restore());return p.canvas};function gi(a,b,c,d,e){this.g=a;this.i=b;var f={},g=Vc(this.i,this.g);this.a=function(a){var b=a[0]+"/"+a[1];f[b]||(f[b]=g(a));return f[b]};this.f=d;this.s=e*e;this.c=[];this.l=!1;this.o=this.g.a&&!!d&&!!this.g.D()&&Eb(d)==Eb(this.g.D());this.b=this.g.D()?Eb(this.g.D()):null;this.j=this.i.D()?Eb(this.i.D()):null;a=Bb(c);b=Ab(c);d=zb(c);c=yb(c);e=this.a(a);var h=this.a(b),l=this.a(d),m=this.a(c);hi(this,a,b,d,c,e,h,l,m,10);if(this.l){var n=Infinity;this.c.forEach(function(a){n=Math.min(n,a.source[0][0],
Patrick's avatar
Patrick committed
214
a.source[1][0],a.source[2][0])});this.c.forEach(function(a){if(Math.max(a.source[0][0],a.source[1][0],a.source[2][0])-n>this.b/2){var b=[[a.source[0][0],a.source[0][1]],[a.source[1][0],a.source[1][1]],[a.source[2][0],a.source[2][1]]];b[0][0]-n>this.b/2&&(b[0][0]-=this.b);b[1][0]-n>this.b/2&&(b[1][0]-=this.b);b[2][0]-n>this.b/2&&(b[2][0]-=this.b);Math.max(b[0][0],b[1][0],b[2][0])-Math.min(b[0][0],b[1][0],b[2][0])<this.b/2&&(a.source=b)}},this)}f={}}
Patrick's avatar
Patrick committed
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
function hi(a,b,c,d,e,f,g,h,l,m){var n=hb([f,g,h,l]),p=a.b?Eb(n)/a.b:null,q=a.b,t=a.g.a&&.5<p&&1>p,u=!1;if(0<m){if(a.i.g&&a.j){var w=hb([b,c,d,e]);u|=.25<Eb(w)/a.j}!t&&a.g.g&&p&&(u|=.25<p)}if(u||!a.f||Jb(n,a.f)){if(!(u||isFinite(f[0])&&isFinite(f[1])&&isFinite(g[0])&&isFinite(g[1])&&isFinite(h[0])&&isFinite(h[1])&&isFinite(l[0])&&isFinite(l[1])))if(0<m)u=!0;else return;if(0<m&&(u||(n=a.a([(b[0]+d[0])/2,(b[1]+d[1])/2]),q=t?(Sb(f[0],q)+Sb(h[0],q))/2-Sb(n[0],q):(f[0]+h[0])/2-n[0],n=(f[1]+h[1])/2-n[1],
u=q*q+n*n>a.s),u)){Math.abs(b[0]-d[0])<=Math.abs(b[1]-d[1])?(t=[(c[0]+d[0])/2,(c[1]+d[1])/2],q=a.a(t),n=[(e[0]+b[0])/2,(e[1]+b[1])/2],p=a.a(n),hi(a,b,c,t,n,f,g,q,p,m-1),hi(a,n,t,d,e,p,q,h,l,m-1)):(t=[(b[0]+c[0])/2,(b[1]+c[1])/2],q=a.a(t),n=[(d[0]+e[0])/2,(d[1]+e[1])/2],p=a.a(n),hi(a,b,t,n,e,f,q,p,l,m-1),hi(a,t,c,d,n,q,g,h,p,m-1));return}if(t){if(!a.o)return;a.l=!0}a.c.push({source:[f,h,l],target:[b,d,e]});a.c.push({source:[f,g,h],target:[b,c,d]})}}
function ii(a){var b=ib();a.c.forEach(function(a){a=a.source;jb(b,a[0]);jb(b,a[1]);jb(b,a[2])});return b};function ji(a,b,c,d,e,f,g,h,l,m,n){Yh.call(this,e,0);this.B=void 0!==n?n:!1;this.C=g;this.v=h;this.I=null;this.c=b;this.l=d;this.o=f?f:e;this.g=[];this.Sd=null;this.f=0;f=d.Ya(this.o);h=this.l.D();e=this.c.D();f=h?Ib(f,h):f;if(0===Cb(f))this.state=4;else if((h=a.D())&&(e?e=Ib(e,h):e=h),d=di(a,c,Gb(f),d.Ra(this.o[0])),!isFinite(d)||0>=d)this.state=4;else if(this.s=new gi(a,c,f,e,d*(void 0!==m?m:.5)),0===this.s.c.length)this.state=4;else if(this.f=b.dd(d),c=ii(this.s),e&&(a.a?(c[1]=Mb(c[1],e[1],e[3]),
c[3]=Mb(c[3],e[1],e[3])):c=Ib(c,e)),Cb(c)){a=af(b,c,this.f);for(b=a.ga;b<=a.da;b++)for(c=a.ha;c<=a.ka;c++)(m=l(this.f,b,c,g))&&this.g.push(m);0===this.g.length&&(this.state=4)}else this.state=4}v(ji,Yh);ji.prototype.xa=function(){1==this.state&&(this.Sd.forEach(Ca),this.Sd=null);Yh.prototype.xa.call(this)};ji.prototype.W=function(){return this.I};
ji.prototype.Ae=function(){var a=[];this.g.forEach(function(b){b&&2==b.getState()&&a.push({extent:this.c.Ya(b.Ka),image:b.W()})},this);this.g.length=0;if(0===a.length)this.state=3;else{var b=this.o[0],c=this.l.gb(b),d="number"===typeof c?c:c[0];c="number"===typeof c?c:c[1];b=this.l.Ra(b);var e=this.c.Ra(this.f),f=this.l.Ya(this.o);this.I=fi(d,c,this.C,e,this.c.D(),b,f,this.s,a,this.v,this.B);this.state=2}this.u()};
ji.prototype.load=function(){if(0==this.state){this.state=1;this.u();var a=0;this.Sd=[];this.g.forEach(function(b){var c=b.getState();if(0==c||1==c){a++;var d=y(b,"change",function(){var c=b.getState();if(2==c||3==c||4==c)Ca(d),a--,0===a&&(this.Sd.forEach(Ca),this.Sd=null,this.Ae())},this);this.Sd.push(d)}},this);this.g.forEach(function(a){0==a.getState()&&a.load()});0===a&&setTimeout(this.Ae.bind(this),0)}};function ki(a,b,c,d){return void 0!==d?(d[0]=a,d[1]=b,d[2]=c,d):[a,b,c]}function li(a){var b=a[0],c=Array(b),d=1<<b-1,e;for(e=0;e<b;++e){var f=48;a[1]&d&&(f+=1);a[2]&d&&(f+=2);c[e]=String.fromCharCode(f);d>>=1}return c.join("")};function mi(a,b){var c=/\{z\}/g,d=/\{x\}/g,e=/\{y\}/g,f=/\{-y\}/g;return function(g){if(g)return a.replace(c,g[0].toString()).replace(d,g[1].toString()).replace(e,function(){return(-g[2]-1).toString()}).replace(f,function(){var a=b.a?b.a[g[0]]:null;gb(a,55);return(a.ka-a.ha+1+g[2]).toString()})}}function ni(a,b){for(var c=a.length,d=Array(c),e=0;e<c;++e)d[e]=mi(a[e],b);return oi(d)}function oi(a){return 1===a.length?a[0]:function(b,c,d){if(b)return a[Sb((b[1]<<b[0])+b[2],a.length)](b,c,d)}}
function pi(){}function qi(a){var b=[],c=/\{([a-z])-([a-z])\}/.exec(a);if(c){var d=c[2].charCodeAt(0),e;for(e=c[1].charCodeAt(0);e<=d;++e)b.push(a.replace(c[0],String.fromCharCode(e)));return b}if(c=c=/\{(\d+)-(\d+)\}/.exec(a)){d=parseInt(c[2],10);for(e=parseInt(c[1],10);e<=d;e++)b.push(a.replace(c[0],e.toString()));return b}b.push(a);return b};function ri(a){this.minZoom=void 0!==a.minZoom?a.minZoom:0;this.b=a.resolutions;gb(od(this.b,function(a,b){return b-a}),17);this.maxZoom=this.b.length-1;this.g=void 0!==a.origin?a.origin:null;this.c=null;void 0!==a.origins&&(this.c=a.origins,gb(this.c.length==this.b.length,20));var b=a.extent;void 0===b||this.g||this.c||(this.g=Bb(b));gb(!this.g&&this.c||this.g&&!this.c,18);this.i=null;void 0!==a.tileSizes&&(this.i=a.tileSizes,gb(this.i.length==this.b.length,19));this.f=void 0!==a.tileSize?a.tileSize:
this.i?null:256;gb(!this.f&&this.i||this.f&&!this.i,22);this.s=void 0!==b?b:null;this.a=null;this.j=[0,0];void 0!==a.sizes?this.a=a.sizes.map(function(a){return new bd(Math.min(0,a[0]),Math.max(a[0]-1,-1),Math.min(0,a[1]),Math.max(a[1]-1,-1))},this):b&&si(this,b)}var ti=[0,0,0];k=ri.prototype;k.Zh=function(a,b,c){a=af(this,a,b);for(var d=a.ga,e=a.da;d<=e;++d)for(var f=a.ha,g=a.ka;f<=g;++f)c([b,d,f])};
function of(a,b,c,d,e){e=a.Ya(b,e);for(b=b[0]-1;b>=a.minZoom;){if(c.call(null,b,af(a,e,b,d)))return!0;--b}return!1}k.D=function(){return this.s};k.wj=function(){return this.maxZoom};k.xj=function(){return this.minZoom};k.kd=function(a){return this.g?this.g:this.c[a]};k.Ra=function(a){return this.b[a]};k.yj=function(){return this.b};function pf(a,b,c,d){return b[0]<a.maxZoom?(d=a.Ya(b,d),af(a,d,b[0]+1,c)):null}
function lf(a,b,c,d){ui(a,b[0],b[1],c,!1,ti);var e=ti[1],f=ti[2];ui(a,b[2],b[3],c,!0,ti);a=ti[1];b=ti[2];void 0!==d?(d.ga=e,d.da=a,d.ha=f,d.ka=b):d=new bd(e,a,f,b);return d}function af(a,b,c,d){return lf(a,b,a.Ra(c),d)}function bf(a,b){var c=a.kd(b[0]),d=a.Ra(b[0]);a=mf(a.gb(b[0]),a.j);return[c[0]+(b[1]+.5)*a[0]*d,c[1]+(b[2]+.5)*a[1]*d]}k.Ya=function(a,b){var c=this.kd(a[0]),d=this.Ra(a[0]),e=mf(this.gb(a[0]),this.j),f=c[0]+a[1]*e[0]*d;a=c[1]+a[2]*e[1]*d;return rb(f,a,f+e[0]*d,a+e[1]*d,b)};
k.$e=function(a,b,c){return ui(this,a[0],a[1],b,!1,c)};function ui(a,b,c,d,e,f){var g=a.dd(d),h=d/a.Ra(g),l=a.kd(g);a=mf(a.gb(g),a.j);b=h*Math.floor((b-l[0])/d+(e?.5:0))/a[0];c=h*Math.floor((c-l[1])/d+(e?0:.5))/a[1];e?(b=Math.ceil(b)-1,c=Math.ceil(c)-1):(b=Math.floor(b),c=Math.floor(c));return ki(g,b,c,f)}k.zg=function(a,b,c){return ui(this,a[0],a[1],this.Ra(b),!1,c)};k.gb=function(a){return this.f?this.f:this.i[a]};k.dd=function(a,b){return Mb(hd(this.b,a,b||0),this.minZoom,this.maxZoom)};
function si(a,b){for(var c=a.b.length,d=Array(c),e=a.minZoom;e<c;++e)d[e]=af(a,b,e);a.a=d};function vi(a){var b=a.j;if(!b){b=wi(a);var c=xi(b,void 0,void 0);var d=Bb(b);b=new ri({extent:b,origin:d,resolutions:c,tileSize:void 0});a.j=b}return b}function yi(a){var b={};wa(b,void 0!==a?a:{});void 0===b.extent&&(b.extent=Lc("EPSG:3857").D());b.resolutions=xi(b.extent,b.maxZoom,b.tileSize);delete b.maxZoom;return new ri(b)}function xi(a,b,c){b=void 0!==b?b:42;var d=Fb(a);a=Eb(a);c=mf(void 0!==c?c:256);c=Math.max(a/c[0],d/c[1]);b+=1;d=Array(b);for(a=0;a<b;++a)d[a]=c/Math.pow(2,a);return d}
function wi(a){a=Lc(a);var b=a.D();b||(a=180*pc.degrees/a.dc(),b=rb(-a,-a,a,a));return b};function zi(a){this.b=a.html;this.a=a.tileRanges?a.tileRanges:null}zi.prototype.g=function(){return this.b};function Ai(a){Wa.call(this);this.c=Lc(a.projection);this.j=Bi(a.attributions);this.C=a.logo;this.Xa=void 0!==a.state?a.state:"ready";this.aa=void 0!==a.wrapX?a.wrapX:!1}v(Ai,Wa);function Bi(a){if("string"===typeof a)return[new zi({html:a})];if(a instanceof zi)return[a];if(Array.isArray(a)){for(var b=a.length,c=Array(b),d=0;d<b;d++){var e=a[d];c[d]="string"===typeof e?new zi({html:e}):e}return c}return null}k=Ai.prototype;k.Ga=ua;k.Ea=function(){return this.j};k.Ca=function(){return this.C};
k.Fa=function(){return this.c};k.getState=function(){return this.Xa};k.Aa=function(){this.u()};k.za=function(a){this.j=Bi(a);this.u()};function Ci(a,b){a.Xa=b;a.u()};function Di(a){Ai.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,state:a.state,wrapX:a.wrapX});this.oa=void 0!==a.opaque?a.opaque:!1;this.Ua=void 0!==a.tilePixelRatio?a.tilePixelRatio:1;this.tileGrid=void 0!==a.tileGrid?a.tileGrid:null;this.a=new bi(a.cacheSize);this.l=[0,0];this.Kc=""}v(Di,Ai);k=Di.prototype;k.nj=function(){return ci(this.a)};k.Bd=function(a,b){(a=this.ne(a))&&a.Bd(b)};
function Te(a,b,c,d,e){b=a.ne(b);if(!b)return!1;for(var f=!0,g,h,l=d.ga;l<=d.da;++l)for(var m=d.ha;m<=d.ka;++m)g=a.cc(c,l,m),h=!1,b.b.hasOwnProperty(g)&&(g=b.get(g),(h=2===g.getState())&&(h=!1!==e(g))),h||(f=!1);return f}k.sg=function(){return 0};function Ei(a,b){a.Kc!==b&&(a.Kc=b,a.u())}k.cc=function(a,b,c){return a+"/"+b+"/"+c};k.wg=function(){return this.oa};k.fb=function(){return this.tileGrid};k.Ob=function(a){return this.tileGrid?this.tileGrid:vi(a)};
k.ne=function(a){var b=this.c;return b&&!Uc(b,a)?null:this.a};k.vb=function(){return this.Ua};k.oe=function(a,b,c){c=this.Ob(c);b=this.vb(b);a=mf(c.gb(a),this.l);return 1==b?a:Uh(a,b,this.l)};function Fi(a,b,c){var d=void 0!==c?c:a.c;c=a.Ob(d);if(a.aa&&d.g){var e=b;b=e[0];a=bf(c,e);d=wi(d);nb(d,a)?b=e:(e=Eb(d),a[0]+=e*Math.ceil((d[0]-a[0])/e),b=c.zg(a,b))}e=b[0];d=b[1];a=b[2];if(c.minZoom>e||e>c.maxZoom)c=!1;else{var f=c.D();c=(c=f?af(c,f,e):c.a?c.a[e]:null)?cd(c,d,a):!0}return c?b:null}
k.Aa=function(){this.a.clear();this.u()};k.zh=ua;function Gi(a,b){Na.call(this,a);this.tile=b}v(Gi,Na);function Hi(a){Di.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,extent:a.extent,logo:a.logo,opaque:a.opaque,projection:a.projection,state:a.state,tileGrid:a.tileGrid,tilePixelRatio:a.tilePixelRatio,wrapX:a.wrapX});this.tileLoadFunction=a.tileLoadFunction;this.tileUrlFunction=this.Yc?this.Yc.bind(this):pi;this.urls=null;a.urls?this.jb(a.urls):a.url&&this.pb(a.url);a.tileUrlFunction&&this.ib(a.tileUrlFunction)}v(Hi,Di);k=Hi.prototype;k.ub=function(){return this.tileLoadFunction};
k.wb=function(){return this.tileUrlFunction};k.xb=function(){return this.urls};k.oj=function(a){a=a.target;switch(a.getState()){case 1:this.b(new Gi("tileloadstart",a));break;case 2:this.b(new Gi("tileloadend",a));break;case 3:this.b(new Gi("tileloaderror",a))}};k.Bb=function(a){this.a.clear();this.tileLoadFunction=a;this.u()};k.ib=function(a,b){this.tileUrlFunction=a;"undefined"!==typeof b?Ei(this,b):this.u()};
k.pb=function(a){var b=this.urls=qi(a);this.ib(this.Yc?this.Yc.bind(this):ni(b,this.tileGrid),a)};k.jb=function(a){this.urls=a;var b=a.join("\n");this.ib(this.Yc?this.Yc.bind(this):ni(a,this.tileGrid),b)};k.zh=function(a,b,c){a=this.cc(a,b,c);this.a.b.hasOwnProperty(a)&&this.a.get(a)};function A(a){Hi.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,extent:a.extent,logo:a.logo,opaque:a.opaque,projection:a.projection,state:a.state,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction?a.tileLoadFunction:Ii,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:a.tileUrlFunction,url:a.url,urls:a.urls,wrapX:a.wrapX});this.crossOrigin=void 0!==a.crossOrigin?a.crossOrigin:null;this.tileClass=void 0!==a.tileClass?a.tileClass:Zh;this.f={};this.s={};this.wa=a.reprojectionErrorThreshold;
this.G=!1}v(A,Hi);k=A.prototype;k.nj=function(){if(ci(this.a))return!0;for(var a in this.f)if(ci(this.f[a]))return!0;return!1};k.Bd=function(a,b){a=this.ne(a);this.a.Bd(this.a==a?b:{});for(var c in this.f){var d=this.f[c];d.Bd(d==a?b:{})}};k.sg=function(a){return this.c&&a&&!Uc(this.c,a)?0:this.tg()};k.tg=function(){return 0};k.wg=function(a){return this.c&&a&&!Uc(this.c,a)?!1:Hi.prototype.wg.call(this,a)};
k.Ob=function(a){var b=this.c;return!this.tileGrid||b&&!Uc(b,a)?(b=x(a).toString(),b in this.s||(this.s[b]=vi(a)),this.s[b]):this.tileGrid};k.ne=function(a){var b=this.c;if(!b||Uc(b,a))return this.a;a=x(a).toString();a in this.f||(this.f[a]=new bi(this.a.highWaterMark));return this.f[a]};function Ji(a,b,c,d,e,f,g){b=[b,c,d];e=(c=Fi(a,b,f))?a.tileUrlFunction(c,e,f):void 0;e=new a.tileClass(b,void 0!==e?0:4,void 0!==e?e:"",a.crossOrigin,a.tileLoadFunction);e.key=g;y(e,"change",a.oj,a);return e}
k.cd=function(a,b,c,d,e){if(this.c&&e&&!Uc(this.c,e)){var f=this.ne(e);c=[a,b,c];var g;a=this.cc.apply(this,c);f.b.hasOwnProperty(a)&&(g=f.get(a));b=this.Kc;if(g&&g.key==b)return g;var h=this.c,l=this.Ob(h),m=this.Ob(e),n=Fi(this,c,e);d=new ji(h,l,e,m,c,n,this.vb(d),this.tg(),function(a,b,c,d){return Ki(this,a,b,c,d,h)}.bind(this),this.wa,this.G);d.key=b;g?(d.a=g,f.replace(a,d)):f.set(a,d);return d}return Ki(this,a,b,c,d,e)};
function Ki(a,b,c,d,e,f){var g=a.cc(b,c,d),h=a.Kc;if(a.a.b.hasOwnProperty(g)){var l=a.a.get(g);if(l.key!=h){var m=l;l=Ji(a,b,c,d,e,f,h);0==m.getState()?l.a=m.a:l.a=m;if(l.a){b=l.a;c=l;do{if(2==b.getState()){b.a=null;break}else 1==b.getState()?c=b:0==b.getState()?c.a=b.a:c=b;b=c.a}while(b)}a.a.replace(g,l)}}else l=Ji(a,b,c,d,e,f,h),a.a.set(g,l);return l}k.Ub=function(a){if(this.G!=a){this.G=a;for(var b in this.f)this.f[b].clear();this.u()}};
k.Vb=function(a,b){if(a=Lc(a))a=x(a).toString(),a in this.s||(this.s[a]=b)};function Ii(a,b){a.W().src=b};function Li(a,b){this.b=a;this.a=null;this.o=b||null;this.f=!1;if(a=this.b.get("olcs.proxy"))"function"===typeof a?this.c={getURL:a}:"string"===typeof a&&(this.c=new Cesium.DefaultProxy(a));this.l=new Cesium.Event;this.g=document.createElement("canvas");this.g.width=1;this.g.height=1;this.b.H("change",function(){Mi(this)},this);Mi(this)}
Object.defineProperties(Li.prototype,{ready:{get:function(){return this.f}},rectangle:{get:function(){return this.s}},tileWidth:{get:function(){var a=this.b.tileGrid;return a?a.gb(0):256}},tileHeight:{get:function(){return this.tileWidth}},maximumLevel:{get:function(){var a=this.b.tileGrid;return a?a.maxZoom:18}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this.i}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this.l}},credit:{get:function(){return this.j}},
proxy:{get:function(){return this.c}},hasAlphaChannel:{get:function(){return!0}},pickFeatures:{get:function(){}}});function Mi(a){if(!a.f&&"ready"==a.b.getState()){var b=a.b.c;a.a=b?b:a.o;if(a.a==Lc("EPSG:4326"))a.i=new Cesium.GeographicTilingScheme;else if(a.a==Lc("EPSG:3857"))a.i=new Cesium.WebMercatorTilingScheme;else return;a.s=a.i.rectangle;a.j=Ni(a.b)||void 0;a.f=!0}}
function Ni(a){var b="",c=a.j;c&&c.forEach(function(a){b+=a.b.replace(/<\/?[^>]+(>|$)/g,"")+" "});if(0==b.length&&(a=a.C))if("string"==typeof a)var d=a;else{d=a.src;var e=a.href}return d||0<b.length?new Cesium.Credit(b,d,e):null}Li.prototype.getTileCredits=function(){};Li.prototype.getTileCredits=Li.prototype.getTileCredits;
Li.prototype.requestImage=function(a,b,c){var d=this.b.tileUrlFunction;return d&&this.a?(a=d.call(this.b,[this.i instanceof Cesium.GeographicTilingScheme?c+1:c,a,-b-1],1,this.a),this.c&&(a=this.c.cs(a)),a?Cesium.ImageryProvider.loadImage(this,a):this.g):this.g};Li.prototype.requestImage=Li.prototype.requestImage;function Oi(a,b,c,d,e){function f(){var e=Date.now()-t;e=m(g(e/l,0,1));a.transform.clone(q);var h=(e-p)*b;p=e;a.lookAtTransform(d);a.rotate(c,h);a.lookAtTransform(q);1>e?window.requestAnimationFrame(f):n&&n()}var g=Cesium.Math.clamp,h=Cesium.defaultValue;e=e||{};var l=h(e.duration,500),m=h(e.easing,Pi),n=e.callback,p=0,q=new Cesium.Matrix4,t=Date.now();window.requestAnimationFrame(f)}function Qi(a,b){var c=a.camera.getPickRay(b);return a.globe.pick(c,a)||a.camera.pickEllipsoid(b)}
function Ri(a){var b=a.canvas;b=new Cesium.Cartesian2(b.clientWidth/2,b.clientHeight/2);return Qi(a,b)}function Si(a,b,c){var d=new Cesium.Cartesian3,e=new Cesium.Cartesian3,f=new Cesium.Cartesian3;Cesium.Cartesian3.normalize(a,d);Cesium.Cartesian3.normalize(b,e);Cesium.Cartesian3.cross(d,e,f);a=Cesium.Cartesian3.dot(d,e);b=Cesium.Cartesian3.magnitude(f);c=Cesium.Cartesian3.dot(c,f);f=Math.atan2(b,a);return 0<=c?f:-f}
function Ti(a,b){var c=a.camera,d=c.frustum.fovy/2;a=a.camera;var e=a.direction,f=Cesium.Quaternion.fromAxisAngle(a.right,a.frustum.fovy/2);f=Cesium.Matrix3.fromQuaternion(f);var g=new Cesium.Cartesian3;Cesium.Matrix3.multiplyByVector(f,e,g);a=new Cesium.Ray(a.position,g);a=Cesium.Cartesian3.clone(a.direction);Cesium.Cartesian3.negate(a,a);e=new Cesium.Cartesian3;Cesium.Ellipsoid.WGS84.geocentricSurfaceNormal(b,e);b=new Cesium.Cartesian3;Cesium.Cartesian3.negate(c.right,b);return Si(e,a,b)+d}
function Ui(a,b,c){c&&(c=c.getHeight(b),b.height=c||0);c=Cesium.Ellipsoid.WGS84;b=c.cartographicToCartesian(b);var d=a.position,e=new Cesium.Cartesian3;c.geocentricSurfaceNormal(d,e);a.lookAt(d,b,e)}function Vi(a,b){return a&&b?(a=Yc(a,b,"EPSG:4326"),Cesium.Rectangle.fromDegrees(a[0],a[1],a[2],a[3])):null}
function Wi(a,b){if(!(a instanceof Xh))return null;var c=a.ba();if(c instanceof A){var d=c.c;if(!d)d=b;else if(d!==b)return null;var e=d===Lc("EPSG:3857");d=d===Lc("EPSG:4326");if(e||d)c=new Li(c,b);else return null}else return null;e={};(a=a.D())&&b&&(e.rectangle=Vi(a,b));return new Cesium.ImageryLayer(c,e)}function Xi(a,b){var c=a.La();void 0!==c&&(b.alpha=c);a=a.lb();void 0!==a&&(b.show=a)}
function Yi(a){return 2<a.length?Cesium.Cartesian3.fromDegrees(a[0],a[1],a[2]):Cesium.Cartesian3.fromDegrees(a[0],a[1])}function Zi(a){for(var b=[],c=0;c<a.length;++c)b.push(Yi(a[c]));return b}function $i(a,b){var c=Lc("EPSG:4326");b=Lc(b);if(b!==c){var d=a.L();a=a.clone();a.transform(b,c);a.J(d)}return a}
function aj(a){a=a||"black";if(Array.isArray(a))return new Cesium.Color(Cesium.Color.byteToFloat(a[0]),Cesium.Color.byteToFloat(a[1]),Cesium.Color.byteToFloat(a[2]),a[3]);if("string"==typeof a)return Cesium.Color.fromCssColorString(a);qa("impossible")};function bj(a,b){this.f=a;this.a=a.camera;this.R=b;this.l=this.b=null;this.c=this.g=cj;this.i=this.j=0;this.s=null;this.o=!1;this.R.H("change:view",function(){dj(this,this.R.Z())},this);dj(this,this.R.Z())}function cj(a,b,c){c=c||a.length;if(b)for(var d=0;d<c;++d)b[d]=a[d];return a}function dj(a,b){a.b&&(Ta(a.l),a.l=null);if(a.b=b){var c=Vc(b.c,"EPSG:4326"),d=Vc("EPSG:4326",b.c);a.g=c;a.c=d;a.l=y(b,"propertychange",a.Nm,a);a.xe()}else a.g=cj,a.c=cj}k=bj.prototype;k.Nm=function(){this.o||this.xe()};
k.lr=function(a){this.b&&this.b.gd(a)};k.Mp=function(){if(this.b)return this.b.Qa()||0};k.xr=function(a){this.j=a;ej(this)};k.fm=function(){return this.j};k.Pp=function(a){this.i=a;ej(this);this.td()};k.Lp=function(){return this.i};k.cb=function(a){this.b&&this.b.cb(a)};k.va=function(){if(this.b)return this.b.va()};k.Qp=function(a){this.g&&(a=this.g(a),a=new Cesium.Cartographic(Rb(a[0]),Rb(a[1]),this.Aj()),this.a.position=Cesium.Ellipsoid.WGS84.cartographicToCartesian(a),this.td())};
k.Np=function(){if(this.c){var a=Cesium.Ellipsoid.WGS84.cartesianToCartographic(this.a.position);return this.c([180*a.longitude/Math.PI,180*a.latitude/Math.PI])}};k.fr=function(a){var b=Cesium.Ellipsoid.WGS84.cartesianToCartographic(this.a.position);b.height=a;this.a.position=Cesium.Ellipsoid.WGS84.cartographicToCartesian(b);this.td()};k.Aj=function(){return Cesium.Ellipsoid.WGS84.cartesianToCartographic(this.a.position).height};
k.Op=function(a){this.g&&(a=this.g(a),a=Cesium.Cartographic.fromDegrees(a[0],a[1]),Ui(this.a,a,this.f.globe),this.td())};function ej(a){if(a.b&&a.g){var b=a.b.va();if(b){b=a.g(b);b=new Cesium.Cartographic(Rb(b[0]),Rb(b[1]));if(a.f.globe){var c=a.f.globe.getHeight(b);b.height=c||0}b=Cesium.Ellipsoid.WGS84.cartographicToCartesian(b);c={pitch:a.j-Cesium.Math.PI_OVER_TWO,heading:-a.b.Qa(),roll:void 0};a.a.setView({destination:b,orientation:c});a.a.moveBackward(a.i);fj(a,!0)}}}
k.xe=function(){if(this.b&&this.g){var a=this.b.va();void 0!==a&&null!==a&&(a=this.g(a),this.i=(this.b.Ia()||0)*this.f.canvas.clientHeight*this.b.c.dc()*Math.cos(Math.abs(Rb(a[1])))/2/Math.tan(this.a.frustum.fovy/2),ej(this))}};
k.td=function(){if(this.b&&this.c){this.o=!0;var a=Cesium.Ellipsoid.WGS84,b=this.f,c=Ri(b),d=c;d||(d=b.globe,b=this.a.positionCartographic.clone(),d=d.getHeight(b),b.height=d||0,d=Cesium.Ellipsoid.WGS84.cartographicToCartesian(b));this.i=Cesium.Cartesian3.distance(d,this.a.position);b=a.cartesianToCartographic(d);this.b.cb(this.c([180*b.longitude/Math.PI,180*b.latitude/Math.PI]));this.b.Uc(2*this.i*Math.tan(this.a.frustum.fovy/2)/this.b.c.dc()/Math.cos(Math.abs(b?b.latitude:0))/this.f.canvas.clientHeight);
Patrick's avatar
Patrick committed
254
if(c){d=this.a.position;b=new Cesium.Cartesian3;a.geocentricSurfaceNormal(c,b);a=new Cesium.Cartesian3;Cesium.Cartesian3.subtract(d,c,a);Cesium.Cartesian3.normalize(a,a);d=this.a.up;var e=this.a.right,f=new Cesium.Cartesian3(-c.y,c.x,0);e=Cesium.Cartesian3.angleBetween(e,f);c=Cesium.Cartesian3.cross(c,d,new Cesium.Cartesian3).z;this.b.gd(0>c?e:-e);c=Math.acos(Cesium.Cartesian3.dot(b,a));this.j=isNaN(c)?0:c}else this.b.gd(this.a.heading),this.j=-this.a.pitch+Math.PI/2;this.o=!1}};
Patrick's avatar
Patrick committed
255
256
257
258
259
260
261
function fj(a,b){var c=a.s,d=a.a.viewMatrix;c&&Cesium.Matrix4.equalsEpsilon(c,d,1E-5)||(a.s=d.clone(),!0!==b&&a.td())};function gj(a){this.ta=a.opacity;this.j=a.rotateWithView;this.i=a.rotation;this.G=a.scale;this.l=a.snapToPixel}k=gj.prototype;k.La=function(){return this.ta};k.zf=function(){return this.j};k.Af=function(){return this.i};k.Ma=function(){return this.G};k.Ze=function(){return this.l};k.Ld=function(a){this.ta=a};k.Bf=function(a){this.i=a};k.Md=function(a){this.G=a};function hj(a){this.I=this.o=this.c=null;this.$a=void 0!==a.fill?a.fill:null;this.B=[0,0];this.b=a.points;this.a=void 0!==a.radius?a.radius:a.radius1;this.g=void 0!==a.radius2?a.radius2:this.a;this.f=void 0!==a.angle?a.angle:0;this.eb=void 0!==a.stroke?a.stroke:null;this.C=this.ea=this.v=null;this.s=a.atlasManager;ij(this,this.s);gj.call(this,{opacity:1,rotateWithView:void 0!==a.rotateWithView?a.rotateWithView:!1,rotation:void 0!==a.rotation?a.rotation:0,scale:1,snapToPixel:void 0!==a.snapToPixel?
a.snapToPixel:!0})}v(hj,gj);k=hj.prototype;k.clone=function(){var a=new hj({fill:this.qa()?this.qa().clone():void 0,points:this.g!==this.a?this.b/2:this.b,radius:this.a,radius2:this.g,angle:this.f,snapToPixel:this.l,stroke:this.pa()?this.pa().clone():void 0,rotation:this.i,rotateWithView:this.j,atlasManager:this.s});a.Ld(this.La());a.Md(this.Ma());return a};k.Gc=function(){return this.v};k.sj=function(){return this.f};k.qa=function(){return this.$a};k.Rg=function(){return this.I};k.W=function(){return this.o};
k.Ye=function(){return this.C};k.yf=function(){return 2};k.jd=function(){return this.B};k.tj=function(){return this.b};k.uj=function(){return this.a};k.ii=function(){return this.g};k.gc=function(){return this.ea};k.pa=function(){return this.eb};k.ri=function(){};k.load=function(){};k.hk=function(){};
function ij(a,b){var c="",d="",e=0,f=null,g=0;if(a.eb){var h=a.eb.b;null===h&&(h=Kd);h=Sd(h);g=a.eb.c;void 0===g&&(g=1);f=a.eb.g;ie||(f=null);d=a.eb.j;void 0===d&&(d="round");c=a.eb.i;void 0===c&&(c="round");e=a.eb.l;void 0===e&&(e=10)}var l=2*(a.a+g)+1;c={strokeStyle:h,strokeWidth:g,size:l,lineCap:c,lineDash:f,lineJoin:d,miterLimit:e};if(void 0===b){var m=pd(l,l);a.o=m.canvas;b=l=a.o.width;a.Wh(c,m,0,0);a.$a?a.I=a.o:(m=pd(c.size,c.size),a.I=m.canvas,a.Vh(c,m,0,0))}else l=Math.round(l),(d=!a.$a)&&
(m=a.Vh.bind(a,c)),a.eb?(e=a.eb,void 0===e.a&&(e.a="s",e.a=e.b?"string"===typeof e.b?e.a+e.b:e.a+x(e.b).toString():e.a+"-",e.a+=","+(void 0!==e.i?e.i.toString():"-")+","+(e.g?e.g.toString():"-")+","+(void 0!==e.f?e.f:"-")+","+(void 0!==e.j?e.j:"-")+","+(void 0!==e.l?e.l.toString():"-")+","+(void 0!==e.c?e.c.toString():"-")),e=e.a):e="-",a.$a?(f=a.$a,void 0===f.a&&(f.a=f.b instanceof CanvasPattern||f.b instanceof CanvasGradient?x(f.b).toString():"f"+(f.b?Qd(f.b):"-")),f=f.a):f="-",a.c&&e==a.c[1]&&
f==a.c[2]&&a.a==a.c[3]&&a.g==a.c[4]&&a.f==a.c[5]&&a.b==a.c[6]||(a.c=["r"+e+f+(void 0!==a.a?a.a.toString():"-")+(void 0!==a.g?a.g.toString():"-")+(void 0!==a.f?a.f.toString():"-")+(void 0!==a.b?a.b.toString():"-"),e,f,a.a,a.g,a.f,a.b]),m=b.add(a.c[0],l,l,a.Wh.bind(a,c),m),a.o=m.image,a.B=[m.offsetX,m.offsetY],b=m.image.width,a.I=d?m.Pm:a.o;a.v=[l/2,l/2];a.ea=[l,l];a.C=[b,b]}
k.Wh=function(a,b,c,d){b.setTransform(1,0,0,1,0,0);b.translate(c,d);b.beginPath();if(Infinity===this.b)b.arc(a.size/2,a.size/2,this.a,0,2*Math.PI,!0);else for(this.g!==this.a&&(this.b*=2),c=0;c<=this.b;c++){d=2*c*Math.PI/this.b-Math.PI/2+this.f;var e=0===c%2?this.a:this.g;b.lineTo(a.size/2+e*Math.cos(d),a.size/2+e*Math.sin(d))}this.$a&&(c=this.$a.b,null===c&&(c=Id),b.fillStyle=Sd(c),b.fill());this.eb&&(b.strokeStyle=a.strokeStyle,b.lineWidth=a.strokeWidth,a.lineDash&&b.setLineDash(a.lineDash),b.lineCap=
Patrick's avatar
Patrick committed
262
a.lineCap,b.lineJoin=a.lineJoin,b.miterLimit=a.miterLimit,b.stroke());b.closePath()};
Patrick's avatar
Patrick committed
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
k.Vh=function(a,b,c,d){b.setTransform(1,0,0,1,0,0);b.translate(c,d);b.beginPath();if(Infinity===this.b)b.arc(a.size/2,a.size/2,this.a,0,2*Math.PI,!0);else for(this.g!==this.a&&(this.b*=2),c=0;c<=this.b;c++){var e=2*c*Math.PI/this.b-Math.PI/2+this.f;d=0===c%2?this.a:this.g;b.lineTo(a.size/2+d*Math.cos(e),a.size/2+d*Math.sin(e))}b.fillStyle=Id;b.fill();this.eb&&(b.strokeStyle=a.strokeStyle,b.lineWidth=a.strokeWidth,a.lineDash&&b.setLineDash(a.lineDash),b.stroke());b.closePath()};function jj(a){a=a||{};hj.call(this,{points:Infinity,fill:a.fill,radius:a.radius,snapToPixel:a.snapToPixel,stroke:a.stroke,atlasManager:a.atlasManager})}v(jj,hj);jj.prototype.clone=function(){var a=new jj({fill:this.qa()?this.qa().clone():void 0,stroke:this.pa()?this.pa().clone():void 0,radius:this.a,snapToPixel:this.l,atlasManager:this.s});a.Ld(this.La());a.Md(this.Ma());return a};jj.prototype.qd=function(a){this.a=a;ij(this,this.s)};function kj(a){a=a||{};this.b=void 0!==a.color?a.color:null;this.a=void 0}kj.prototype.clone=function(){var a=this.b;return new kj({color:a&&a.slice?a.slice():a||void 0})};kj.prototype.g=function(){return this.b};kj.prototype.c=function(a){this.b=a;this.a=void 0};function lj(a){a=a||{};this.Zc=null;this.Va=mj;void 0!==a.geometry&&this.Wa(a.geometry);this.$a=void 0!==a.fill?a.fill:null;this.O=void 0!==a.image?a.image:null;this.eb=void 0!==a.stroke?a.stroke:null;this.Ja=void 0!==a.text?a.text:null;this.lk=a.zIndex}k=lj.prototype;
k.clone=function(){var a=this.V();a&&a.clone&&(a=a.clone());return new lj({geometry:a,fill:this.qa()?this.qa().clone():void 0,image:this.W()?this.W().clone():void 0,stroke:this.pa()?this.pa().clone():void 0,text:this.ra()?this.ra().clone():void 0,zIndex:this.Da()})};k.V=function(){return this.Zc};k.El=function(){return this.Va};k.qa=function(){return this.$a};k.Kf=function(a){this.$a=a};k.W=function(){return this.O};k.sh=function(a){this.O=a};k.pa=function(){return this.eb};
k.Lf=function(a){this.eb=a};k.ra=function(){return this.Ja};k.Mf=function(a){this.Ja=a};k.Da=function(){return this.lk};k.Wa=function(a){"function"===typeof a?this.Va=a:"string"===typeof a?this.Va=function(b){return b.get(a)}:a?void 0!==a&&(this.Va=function(){return a}):this.Va=mj;this.Zc=a};k.jc=function(a){this.lk=a};function nj(a){if("function"!==typeof a){if(Array.isArray(a))var b=a;else gb(a instanceof lj,41),b=[a];a=function(){return b}}return a}var oj=null;
function pj(){if(!oj){var a=new kj({color:"rgba(255,255,255,0.4)"}),b=new Og({color:"#3399CC",width:1.25});oj=[new lj({image:new jj({fill:a,stroke:b,radius:5}),fill:a,stroke:b})]}return oj}
function qj(){var a={},b=[255,255,255,1],c=[0,153,255,1];a.Polygon=[new lj({fill:new kj({color:[255,255,255,.5]})})];a.MultiPolygon=a.Polygon;a.LineString=[new lj({stroke:new Og({color:b,width:5})}),new lj({stroke:new Og({color:c,width:3})})];a.MultiLineString=a.LineString;a.Circle=a.Polygon.concat(a.LineString);a.Point=[new lj({image:new jj({radius:6,fill:new kj({color:c}),stroke:new Og({color:b,width:1.5})}),zIndex:Infinity})];a.MultiPoint=a.Point;a.GeometryCollection=a.Polygon.concat(a.LineString,
a.Point);return a}function mj(a){return a.V()};function E(a){Wa.call(this);this.a=void 0;this.c="geometry";this.f=null;this.j=void 0;this.i=null;y(this,Ya(this.c),this.cf,this);void 0!==a&&(a instanceof Td||!a?this.Wa(a):this.J(a))}v(E,Wa);k=E.prototype;k.clone=function(){var a=new E(this.L());a.pd(this.c);var b=this.V();b&&a.Wa(b.clone());(b=this.f)&&a.Ig(b);return a};k.V=function(){return this.get(this.c)};k.pn=function(){return this.a};k.Fl=function(){return this.c};k.qn=function(){return this.f};k.Nc=function(){return this.j};k.pm=function(){this.u()};
k.cf=function(){this.i&&(Ca(this.i),this.i=null);var a=this.V();a&&(this.i=y(a,"change",this.pm,this));this.u()};k.Wa=function(a){this.set(this.c,a)};k.Ig=function(a){this.j=(this.f=a)?rj(a):void 0;this.u()};k.xc=function(a){this.a=a;this.u()};k.pd=function(a){Ja(this,Ya(this.c),this.cf,this);this.c=a;y(this,Ya(this.c),this.cf,this);this.cf()};
function rj(a){var b;if("function"===typeof a)2==a.length?b=function(b){return a(this,b)}:b=a;else{if(Array.isArray(a))var c=a;else gb(a instanceof lj,41),c=[a];b=function(){return c}}return b};var sj=void 0,tj=void 0;function uj(){if(void 0===sj){var a=document.createElement("canvas");a.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");a=a.style.imageRendering;(sj=!!a)&&(tj=a)}return sj};var vj=document.implementation.createDocument("","",null);function wj(a,b){return vj.createElementNS(a,b)}function xj(a,b){return yj(a,b,[]).join("")}function yj(a,b,c){if(a.nodeType==Node.CDATA_SECTION_NODE||a.nodeType==Node.TEXT_NODE)b?c.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):c.push(a.nodeValue);else for(a=a.firstChild;a;a=a.nextSibling)yj(a,b,c);return c}function zj(a){return a instanceof Document}function Aj(a){return a instanceof Node}
function Bj(a){return(new DOMParser).parseFromString(a,"application/xml")}function Cj(a,b){return function(c,d){c=a.call(b,c,d);void 0!==c&&id(d[d.length-1],c)}}function Dj(a,b){return function(c,d){c=a.call(void 0!==b?b:this,c,d);void 0!==c&&d[d.length-1].push(c)}}function Ej(a,b){return function(c,d){c=a.call(void 0!==b?b:this,c,d);void 0!==c&&(d[d.length-1]=c)}}
function Fj(a,b){return function(c,d){var e=a.call(this,c,d);if(void 0!==e){d=d[d.length-1];c=void 0!==b?b:c.localName;var f;c in d?f=d[c]:f=d[c]=[];f.push(e)}}}function F(a,b){return function(c,d){var e=a.call(this,c,d);void 0!==e&&(d[d.length-1][void 0!==b?b:c.localName]=e)}}function G(a,b){return function(c,d,e){a.call(void 0!==b?b:this,c,d,e);e[e.length-1].node.appendChild(c)}}
function Gj(a){var b,c;return function(d,e,f){if(void 0===b){b={};var g={};g[d.localName]=a;b[d.namespaceURI]=g;c=Hj(d.localName)}Ij(b,c,e,f)}}function Hj(a,b){return function(c,d,e){c=d[d.length-1].node;d=a;void 0===d&&(d=e);e=b;void 0===b&&(e=c.namespaceURI);return wj(e,d)}}var Jj=Hj();function Kj(a,b){for(var c=b.length,d=Array(c),e=0;e<c;++e)d[e]=a[b[e]];return d}function H(a,b,c){c=void 0!==c?c:{};var d;var e=0;for(d=a.length;e<d;++e)c[a[e]]=b;return c}
function Lj(a,b,c,d){for(b=b.firstElementChild;b;b=b.nextElementSibling){var e=a[b.namespaceURI];void 0!==e&&(e=e[b.localName],void 0!==e&&e.call(d,b,c))}}function I(a,b,c,d,e){d.push(a);Lj(b,c,d,e);return d.pop()}function Ij(a,b,c,d,e,f){for(var g=(void 0!==e?e:c).length,h,l,m=0;m<g;++m)h=c[m],void 0!==h&&(l=b.call(f,h,d,void 0!==e?e[m]:void 0),void 0!==l&&a[l.namespaceURI][l.localName].call(f,l,h,d))}function Mj(a,b,c,d,e,f,g){e.push(a);Ij(b,c,d,e,f,g);e.pop()};function Nj(a,b,c,d){return function(e,f,g){var h=new XMLHttpRequest;h.open("GET","function"===typeof a?a(e,f,g):a,!0);"arraybuffer"==b.U()&&(h.responseType="arraybuffer");h.onload=function(){if(!h.status||200<=h.status&&300>h.status){var a=b.U();if("json"==a||"text"==a)var e=h.responseText;else"xml"==a?(e=h.responseXML)||(e=Bj(h.responseText)):"arraybuffer"==a&&(e=h.response);e?c.call(this,b.Oa(e,{featureProjection:g}),b.hb(e)):d.call(this)}else d.call(this)}.bind(this);h.onerror=function(){d.call(this)}.bind(this);
h.send()}}function Oj(a,b){return Nj(a,b,function(a){this.yd(a)},ua)};function Pj(){return[[-Infinity,-Infinity,Infinity,Infinity]]};function J(a){a=a||{};Ai.call(this,{attributions:a.attributions,logo:a.logo,projection:void 0,state:"ready",wrapX:void 0!==a.wrapX?a.wrapX:!0});this.$=ua;this.X=a.format;this.Ua=void 0==a.overlaps?!0:a.overlaps;this.la=a.url;void 0!==a.loader?this.$=a.loader:void 0!==this.la&&(gb(this.X,7),this.$=Oj(this.la,this.X));this.rb=void 0!==a.strategy?a.strategy:Pj;var b=void 0!==a.useSpatialIndex?a.useSpatialIndex:!0;this.a=b?new ah:null;this.wa=new ah;this.f={};this.l={};this.o={};this.s={};this.i=null;
if(a.features instanceof bb){var c=a.features;var d=c.a}else Array.isArray(a.features)&&(d=a.features);b||void 0!==c||(c=new bb(d));void 0!==d&&Qj(this,d);void 0!==c&&Rj(this,c)}v(J,Ai);k=J.prototype;k.Eb=function(a,b){var c=x(a).toString();if(Sj(this,c,a)){Tj(this,c,a);var d=a.V();d?(c=d.D(),this.a&&this.a.Ha(c,a)):this.f[c]=a;this.b(new Uj("addfeature",a))}b||this.u()};function Tj(a,b,c){a.s[b]=[y(c,"change",a.rj,a),y(c,"propertychange",a.rj,a)]}
function Sj(a,b,c){var d=!0,e=c.a;void 0!==e?e.toString()in a.l?d=!1:a.l[e.toString()]=c:(gb(!(b in a.o),30),a.o[b]=c);return d}k.yd=function(a){Qj(this,a);this.u()};function Qj(a,b){var c,d=[],e=[],f=[];var g=0;for(c=b.length;g<c;g++){var h=b[g];var l=x(h).toString();Sj(a,l,h)&&e.push(h)}g=0;for(c=e.length;g<c;g++)h=e[g],l=x(h).toString(),Tj(a,l,h),(b=h.V())?(l=b.D(),d.push(l),f.push(h)):a.f[l]=h;a.a&&a.a.load(d,f);g=0;for(c=e.length;g<c;g++)a.b(new Uj("addfeature",e[g]))}
function Rj(a,b){var c=!1;y(a,"addfeature",function(a){c||(c=!0,b.push(a.feature),c=!1)});y(a,"removefeature",function(a){c||(c=!0,b.remove(a.feature),c=!1)});y(b,"add",function(a){c||(c=!0,this.Eb(a.element),c=!1)},a);y(b,"remove",function(a){c||(c=!0,this.Ib(a.element),c=!1)},a);a.i=b}
k.clear=function(a){if(a){for(var b in this.s)this.s[b].forEach(Ca);this.i||(this.s={},this.l={},this.o={})}else if(this.a){this.a.forEach(this.kh,this);for(var c in this.f)this.kh(this.f[c])}this.i&&this.i.clear();this.a&&this.a.clear();this.wa.clear();this.f={};this.b(new Uj("clear"));this.u()};k.Xh=function(a,b){if(this.a)return this.a.forEach(a,b);if(this.i)return this.i.forEach(a,b)};function Vj(a,b,c){a.oc([b[0],b[1],b[0],b[1]],function(a){if(a.V().yb(b))return c.call(void 0,a)})}
k.oc=function(a,b,c){if(this.a)return fh(this.a,a,b,c);if(this.i)return this.i.forEach(b,c)};k.Yh=function(a,b,c){return this.oc(a,function(d){if(d.V().bb(a)&&(d=b.call(c,d)))return d})};k.ei=function(){return this.i};k.Rc=function(){if(this.i)var a=this.i.a;else this.a&&(a=ch(this.a),Aa(this.f)||id(a,za(this.f)));return a};k.di=function(a){var b=[];Vj(this,a,function(a){b.push(a)});return b};k.rg=function(a){return dh(this.a,a)};
k.ai=function(a,b){var c=a[0],d=a[1],e=null,f=[NaN,NaN],g=Infinity,h=[-Infinity,-Infinity,Infinity,Infinity],l=b?b:Fd;fh(this.a,h,function(a){if(l(a)){var b=a.V(),m=g;g=b.Lb(c,d,f,g);g<m&&(e=a,a=Math.sqrt(g),h[0]=c-a,h[1]=d-a,h[2]=c+a,h[3]=d+a)}});return e};k.D=function(a){return this.a.D(a)};k.qg=function(a){a=this.l[a.toString()];return void 0!==a?a:null};k.pj=function(){return this.X};k.qj=function(){return this.la};
k.rj=function(a){a=a.target;var b=x(a).toString(),c=a.V();c?(c=c.D(),b in this.f?(delete this.f[b],this.a&&this.a.Ha(c,a)):this.a&&bh(this.a,c,a)):b in this.f||(this.a&&this.a.remove(a),this.f[b]=a);c=a.a;void 0!==c?(c=c.toString(),b in this.o?(delete this.o[b],this.l[c]=a):this.l[c]!==a&&(Wj(this,a),this.l[c]=a)):b in this.o||(Wj(this,a),this.o[b]=a);this.u();this.b(new Uj("changefeature",a))};
k.re=function(a,b,c){var d=this.wa;a=this.rb(a,b);var e;var f=0;for(e=a.length;f<e;++f){var g=a[f];fh(d,g,function(a){return pb(a.extent,g)})||(this.$.call(this,g,b,c),d.Ha(g,{extent:g.slice()}))}};k.Ib=function(a,b){var c=x(a).toString();c in this.f?delete this.f[c]:this.a&&this.a.remove(a);this.kh(a);b||this.u()};k.kh=function(a){var b=x(a).toString();this.s[b].forEach(Ca);delete this.s[b];var c=a.a;void 0!==c?delete this.l[c.toString()]:delete this.o[b];this.b(new Uj("removefeature",a))};
function Wj(a,b){for(var c in a.l)if(a.l[c]===b){delete a.l[c];break}}function Uj(a,b){Na.call(this,a);this.feature=b}v(Uj,Na);function Xj(a,b,c,d){this.oa=a;this.X=b;this.overlaps=d;this.c=0;this.resolution=c;this.N=this.G=null;this.a=[];this.coordinates=[];this.$=ve();this.b=[];this.ta=null;this.la=ve();this.Za=ve()}v(Xj,te);
function Yj(a,b,c,d,e,f,g){var h=a.coordinates.length,l=a.og();g&&(c+=e);g=[b[c],b[c+1]];var m=[NaN,NaN],n=!0,p;for(p=c+e;p<d;p+=e){m[0]=b[p];m[1]=b[p+1];var q=qb(l,m);q!==t?(n&&(a.coordinates[h++]=g[0],a.coordinates[h++]=g[1]),a.coordinates[h++]=m[0],a.coordinates[h++]=m[1],n=!1):1===q?(a.coordinates[h++]=m[0],a.coordinates[h++]=m[1],n=!1):n=!0;g[0]=m[0];g[1]=m[1];var t=q}if(f&&n||p===c+e)a.coordinates[h++]=g[0],a.coordinates[h++]=g[1];return h}
function Zj(a,b){a.G=[0,b,0];a.a.push(a.G);a.N=[0,b,0];a.b.push(a.N)}Xj.prototype.$a=function(a,b){if(this.aa){var c=Ae(this.$,this.aa.slice());a.translate(c[0],c[1]);a.rotate(b)}a.fill();this.aa&&a.setTransform.apply(a,this.Za)};
function ak(a,b,c,d,e,f,g,h,l){if(a.ta&&ld(d,a.$))var m=a.ta;else a.ta||(a.ta=[]),m=Ud(a.coordinates,0,a.coordinates.length,2,d,a.ta),ze(a.$,d);d=!Aa(f);for(var n=0,p=g.length,q=0,t,u=a.la,w=a.Za,z,D,B,S,Ua=0,ya=0,Da=a.a!=g||a.overlaps?0:200;n<p;){var C=g[n];switch(C[0]){case 0:q=C[1];d&&f[x(q).toString()]||!q.V()?n=C[2]:void 0===l||Jb(l,q.V().D())?++n:n=C[2]+1;break;case 1:Ua>Da&&(a.$a(b,e),Ua=0);ya>Da&&(b.stroke(),ya=0);Ua||ya||(b.beginPath(),z=D=NaN);++n;break;case 2:q=C[1];t=m[q];C=m[q+1];B=m[q+
2]-t;q=m[q+3]-C;q=Math.sqrt(B*B+q*q);b.moveTo(t+q,C);b.arc(t,C,q,0,2*Math.PI,!0);++n;break;case 3:b.closePath();++n;break;case 4:q=C[1];t=C[2];var pa=C[3];var $a=C[4]*c;var ra=C[5]*c;var dc=C[6],Pa=C[7],ic=C[8],jd=C[9];var qc=C[10];B=C[11];S=C[12];var Lf=C[13],Cg=C[14];for(qc&&(B+=e);q<t;q+=2){C=m[q]-$a;qc=m[q+1]-ra;Lf&&(C=Math.round(C),qc=Math.round(qc));if(1!=S||0!==B){var kf=C+$a,wh=qc+ra;Ee(u,kf,wh,S,S,B,-kf,-wh);b.setTransform.apply(b,u)}kf=b.globalAlpha;1!=Pa&&(b.globalAlpha=kf*Pa);wh=Cg+ic>
pa.width?pa.width-ic:Cg;var Ep=dc+jd>pa.height?pa.height-jd:dc;b.drawImage(pa,ic,jd,wh,Ep,C,qc,wh*c,Ep*c);1!=Pa&&(b.globalAlpha=kf);1==S&&0===B||b.setTransform.apply(b,w)}++n;break;case 5:q=C[1];t=C[2];ra=C[3];dc=C[4]*c;Pa=C[5]*c;B=C[6];S=C[7]*c;pa=C[8];$a=C[9];for((qc=C[10])&&(B+=e);q<t;q+=2){C=m[q]+dc;qc=m[q+1]+Pa;if(1!=S||0!==B)Ee(u,C,qc,S,S,B,-C,-qc),b.setTransform.apply(b,u);ic=ra.split("\n");jd=ic.length;1<jd?(Lf=Math.round(1.5*b.measureText("M").width),qc-=(jd-1)/2*Lf):Lf=0;for(Cg=0;Cg<jd;Cg++)kf=
Patrick's avatar
Patrick committed
290
ic[Cg],$a&&b.strokeText(kf,C,qc),pa&&b.fillText(kf,C,qc),qc+=Lf;1==S&&0===B||b.setTransform.apply(b,w)}++n;break;case 6:if(void 0!==h&&(q=C[1],q=h(q)))return q;++n;break;case 7:Da?Ua++:a.$a(b,e);++n;break;case 8:q=C[1];t=C[2];C=m[q];qc=m[q+1];B=C+.5|0;S=qc+.5|0;if(B!==z||S!==D)b.moveTo(C,qc),z=B,D=S;for(q+=2;q<t;q+=2)if(C=m[q],qc=m[q+1],B=C+.5|0,S=qc+.5|0,q==t-2||B!==z||S!==D)b.lineTo(C,qc),z=B,D=S;++n;break;case 9:a.aa=C[2];Ua&&(a.$a(b,e),Ua=0,ya&&(b.stroke(),ya=0));b.fillStyle=C[1];++n;break;case 10:q=
Patrick's avatar
Patrick committed
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
void 0!==C[8]?C[8]:!0;var qk=C[9];t=C[2];ya&&(b.stroke(),ya=0);b.strokeStyle=C[1];b.lineWidth=q?t*c:t;b.lineCap=C[3];b.lineJoin=C[4];b.miterLimit=C[5];ie&&(t=C[6],B=C[7],q&&c!==qk&&(t=t.map(function(a){return a*c/qk}),B*=c/qk,C[6]=t,C[7]=B,C[9]=c),b.lineDashOffset=B,b.setLineDash(t));++n;break;case 11:b.font=C[1];b.textAlign=C[2];b.textBaseline=C[3];++n;break;case 12:Da?ya++:b.stroke();++n;break;default:++n}}Ua&&a.$a(b,e);ya&&b.stroke()}
Xj.prototype.i=function(a,b,c,d,e){ak(this,a,b,c,d,e,this.a,void 0,void 0)};function bk(a){var b=a.b;b.reverse();var c,d=b.length,e=-1;for(c=0;c<d;++c){var f=b[c];var g=f[0];if(6==g)e=c;else if(0==g){f[2]=c;f=a.b;for(g=c;e<g;){var h=f[e];f[e]=f[g];f[g]=h;++e;--g}e=-1}}}function ck(a,b){a.G[2]=a.a.length;a.G=null;a.N[2]=a.b.length;a.N=null;b=[6,b];a.a.push(b);a.b.push(b)}Xj.prototype.uf=ua;Xj.prototype.og=function(){return this.X};function dk(a,b,c,d){Xj.call(this,a,b,c,d);this.O=this.Ba=null;this.ea=this.B=this.C=this.v=this.I=this.s=this.o=this.l=this.j=this.f=this.g=void 0}v(dk,Xj);
dk.prototype.Ec=function(a,b){if(this.O){Zj(this,b);var c=a.ja(),d=this.coordinates.length;a=Yj(this,c,0,c.length,a.ya(),!1,!1);this.a.push([4,d,a,this.O,this.g,this.f,this.j,this.l,this.o,this.s,this.I,this.v,this.C,this.B,this.ea]);this.b.push([4,d,a,this.Ba,this.g,this.f,this.j,this.l,this.o,this.s,this.I,this.v,this.C,this.B,this.ea]);ck(this,b)}};
dk.prototype.Cc=function(a,b){if(this.O){Zj(this,b);var c=a.ja(),d=this.coordinates.length;a=Yj(this,c,0,c.length,a.ya(),!1,!1);this.a.push([4,d,a,this.O,this.g,this.f,this.j,this.l,this.o,this.s,this.I,this.v,this.C,this.B,this.ea]);this.b.push([4,d,a,this.Ba,this.g,this.f,this.j,this.l,this.o,this.s,this.I,this.v,this.C,this.B,this.ea]);ck(this,b)}};dk.prototype.uf=function(){bk(this);this.f=this.g=void 0;this.O=this.Ba=null;this.ea=this.B=this.v=this.I=this.s=this.o=this.l=this.C=this.j=void 0};
dk.prototype.ic=function(a){var b=a.Gc(),c=a.gc(),d=a.Rg(),e=a.W(1),f=a.jd();this.g=b[0];this.f=b[1];this.Ba=d;this.O=e;this.j=c[1];this.l=a.La();this.o=f[0];this.s=f[1];this.I=a.j;this.v=a.i;this.C=a.Ma();this.B=a.l;this.ea=c[0]};function ek(a,b,c,d){Xj.call(this,a,b,c,d);this.f=null;this.g={ge:void 0,ae:void 0,be:null,ce:void 0,de:void 0,ee:void 0,fe:void 0,Cg:0,strokeStyle:void 0,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0}}v(ek,Xj);function fk(a,b,c,d,e){var f=a.coordinates.length;b=Yj(a,b,c,d,e,!1,!1);f=[8,f,b];a.a.push(f);a.b.push(f);return d}k=ek.prototype;k.og=function(){this.f||(this.f=lb(this.X),0<this.c&&kb(this.f,this.resolution*(this.c+1)/2,this.f));return this.f};
function gk(a){var b=a.g,c=b.strokeStyle,d=b.lineCap,e=b.lineDash,f=b.lineDashOffset,g=b.lineJoin,h=b.lineWidth,l=b.miterLimit;b.ge==c&&b.ae==d&&ld(b.be,e)&&b.ce==f&&b.de==g&&b.ee==h&&b.fe==l||(b.Cg!=a.coordinates.length&&(a.a.push([12]),b.Cg=a.coordinates.length),a.a.push([10,c,h,d,g,l,e,f,!0,1],[1]),b.ge=c,b.ae=d,b.be=e,b.ce=f,b.de=g,b.ee=h,b.fe=l)}
k.Yb=function(a,b){var c=this.g,d=c.lineWidth;void 0!==c.strokeStyle&&void 0!==d&&(gk(this),Zj(this,b),this.b.push([10,c.strokeStyle,c.lineWidth,c.lineCap,c.lineJoin,c.miterLimit,c.lineDash,c.lineDashOffset,!0,1],[1]),c=a.ja(),fk(this,c,0,c.length,a.ya()),this.b.push([12]),ck(this,b))};
k.Bc=function(a,b){var c=this.g,d=c.lineWidth;if(void 0!==c.strokeStyle&&void 0!==d){gk(this);Zj(this,b);this.b.push([10,c.strokeStyle,c.lineWidth,c.lineCap,c.lineJoin,c.miterLimit,c.lineDash,c.lineDashOffset,!0,1],[1]);c=a.$b();d=a.ja();a=a.ya();var e=0,f;var g=0;for(f=c.length;g<f;++g)e=fk(this,d,e,c[g],a);this.b.push([12]);ck(this,b)}};k.uf=function(){this.g.Cg!=this.coordinates.length&&this.a.push([12]);bk(this);this.g=null};
k.Ta=function(a,b){a=b.b;this.g.strokeStyle=Sd(a?a:Kd);a=b.i;this.g.lineCap=void 0!==a?a:"round";a=b.g;this.g.lineDash=a?a:Jd;a=b.f;this.g.lineDashOffset=a?a:0;a=b.j;this.g.lineJoin=void 0!==a?a:"round";a=b.c;this.g.lineWidth=void 0!==a?a:1;b=b.l;this.g.miterLimit=void 0!==b?b:10;this.g.lineWidth>this.c&&(this.c=this.g.lineWidth,this.f=null)};function hk(a,b,c,d,e,f,g){var h=(c-b)/d;if(3>h){for(;b<c;b+=d)f[g++]=a[b],f[g++]=a[b+1];return g}var l=Array(h);l[0]=1;l[h-1]=1;c=[b,c-d];for(var m=0,n;0<c.length;){var p=c.pop(),q=c.pop(),t=0,u=a[q],w=a[q+1],z=a[p],D=a[p+1];for(n=q+d;n<p;n+=d){var B=Pb(a[n],a[n+1],u,w,z,D);B>t&&(m=n,t=B)}t>e&&(l[(m-b)/d]=1,q+d<m&&c.push(q,m),m+d<p&&c.push(m,p))}for(n=0;n<h;++n)l[n]&&(f[g++]=a[b+n*d],f[g++]=a[b+n*d+1]);return g}
function ik(a,b,c,d,e,f,g,h){var l;var m=0;for(l=c.length;m<l;++m){var n=c[m];a:{var p=a,q=n,t=d,u=e,w=f,z=g;if(b!=q){var D=u*Math.round(p[b]/u),B=u*Math.round(p[b+1]/u);b+=t;w[z++]=D;w[z++]=B;do{var S=u*Math.round(p[b]/u);g=u*Math.round(p[b+1]/u);b+=t;if(b==q){w[z++]=S;w[z++]=g;g=z;break a}}while(S==D&&g==B);for(;b<q;){var Ua=u*Math.round(p[b]/u);var ya=u*Math.round(p[b+1]/u);b+=t;if(Ua!=S||ya!=g){var Da=S-D,C=g-B,pa=Ua-D,$a=ya-B;Da*$a==C*pa&&(0>Da&&pa<Da||Da==pa||0<Da&&pa>Da)&&(0>C&&$a<C||C==$a||
0<C&&$a>C)||(w[z++]=S,w[z++]=g,D=S,B=g);S=Ua;g=ya}}w[z++]=S;w[z++]=g}g=z}h.push(g);b=n}return g};function jk(a,b,c,d){Xj.call(this,a,b,c,d);this.f=null;this.g={Th:void 0,ge:void 0,ae:void 0,be:null,ce:void 0,de:void 0,ee:void 0,fe:void 0,fillStyle:void 0,strokeStyle:void 0,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0}}v(jk,Xj);
function kk(a,b,c,d,e){var f=a.g,g=void 0!==f.fillStyle;f=void 0!=f.strokeStyle;var h=d.length,l=[1];a.a.push(l);a.b.push(l);for(l=0;l<h;++l){var m=d[l],n=a.coordinates.length;c=Yj(a,b,c,m,e,!0,!f);c=[8,n,c];a.a.push(c);a.b.push(c);f&&(c=[3],a.a.push(c),a.b.push(c));c=m}b=[7];a.b.push(b);g&&a.a.push(b);f&&(g=[12],a.a.push(g),a.b.push(g));return c}k=jk.prototype;
k.nc=function(a,b){var c=this.g,d=c.strokeStyle;if(void 0!==c.fillStyle||void 0!==d){lk(this,a);Zj(this,b);this.b.push([9,Qd(Id)]);void 0!==c.strokeStyle&&this.b.push([10,c.strokeStyle,c.lineWidth,c.lineCap,c.lineJoin,c.miterLimit,c.lineDash,c.lineDashOffset,!0,1]);var e=a.ja();d=this.coordinates.length;Yj(this,e,0,e.length,a.ya(),!1,!1);a=[1];d=[2,d];this.a.push(a,d);this.b.push(a,d);a=[7];this.b.push(a);void 0!==c.fillStyle&&this.a.push(a);void 0!==c.strokeStyle&&(c=[12],this.a.push(c),this.b.push(c));
ck(this,b)}};k.Fc=function(a,b){var c=this.g;lk(this,a);Zj(this,b);this.b.push([9,Qd(Id)]);void 0!==c.strokeStyle&&this.b.push([10,c.strokeStyle,c.lineWidth,c.lineCap,c.lineJoin,c.miterLimit,c.lineDash,c.lineDashOffset,!0,1]);c=a.$b();var d=a.sc();kk(this,d,0,c,a.ya());ck(this,b)};
k.Dc=function(a,b){var c=this.g,d=c.strokeStyle;if(void 0!==c.fillStyle||void 0!==d){lk(this,a);Zj(this,b);this.b.push([9,Qd(Id)]);void 0!==c.strokeStyle&&this.b.push([10,c.strokeStyle,c.lineWidth,c.lineCap,c.lineJoin,c.miterLimit,c.lineDash,c.lineDashOffset,!0,1]);c=a.c;d=Qe(a);a=a.ya();var e=0,f;var g=0;for(f=c.length;g<f;++g)e=kk(this,d,e,c[g],a);ck(this,b)}};
k.uf=function(){bk(this);this.g=null;var a=this.oa;if(0!==a){var b=this.coordinates,c;var d=0;for(c=b.length;d<c;++d)b[d]=a*Math.round(b[d]/a)}};k.og=function(){this.f||(this.f=lb(this.X),0<this.c&&kb(this.f,this.resolution*(this.c+1)/2,this.f));return this.f};
k.Ta=function(a,b){var c=this.g;a?(a=a.b,c.fillStyle=Sd(a?a:Id)):c.fillStyle=void 0;b?(a=b.b,c.strokeStyle=Sd(a?a:Kd),a=b.i,c.lineCap=void 0!==a?a:"round",a=b.g,c.lineDash=a?a.slice():Jd,a=b.f,c.lineDashOffset=a?a:0,a=b.j,c.lineJoin=void 0!==a?a:"round",a=b.c,c.lineWidth=void 0!==a?a:1,b=b.l,c.miterLimit=void 0!==b?b:10,c.lineWidth>this.c&&(this.c=c.lineWidth,this.f=null)):(c.strokeStyle=void 0,c.lineCap=void 0,c.lineDash=null,c.lineDashOffset=void 0,c.lineJoin=void 0,c.lineWidth=void 0,c.miterLimit=
void 0)};function lk(a,b){var c=a.g,d=c.fillStyle,e=c.strokeStyle,f=c.lineCap,g=c.lineDash,h=c.lineDashOffset,l=c.lineJoin,m=c.lineWidth,n=c.miterLimit;if(void 0!==d&&("string"!==typeof d||c.Th!=d)){var p=[9,d];"string"!==typeof d&&(b=b.D(),p.push([b[0],b[3]]));a.a.push(p);c.Th=c.fillStyle}void 0===e||c.ge==e&&c.ae==f&&ld(c.be,g)&&c.ce==h&&c.de==l&&c.ee==m&&c.fe==n||(a.a.push([10,e,m,f,l,n,g,h,!0,1]),c.ge=e,c.ae=f,c.be=g,c.ce=h,c.de=l,c.ee=m,c.fe=n)};function mk(a,b,c,d){Xj.call(this,a,b,c,d);this.ea=this.B=this.C=null;this.Ja="";this.o=this.l=0;this.s=void 0;this.v=this.I=0;this.j=this.f=this.g=null}v(mk,Xj);
mk.prototype.Qc=function(a,b,c,d,e){if(""!==this.Ja&&this.j&&(this.g||this.f)){if(this.g){var f=this.g,g=this.C;if(!g||g.fillStyle!=f.fillStyle){var h=[9,f.fillStyle];this.a.push(h);this.b.push(h);g?g.fillStyle=f.fillStyle:this.C={fillStyle:f.fillStyle}}}this.f&&(f=this.f,g=this.B,g&&g.lineCap==f.lineCap&&g.lineDash==f.lineDash&&g.lineDashOffset==f.lineDashOffset&&g.lineJoin==f.lineJoin&&g.lineWidth==f.lineWidth&&g.miterLimit==f.miterLimit&&g.strokeStyle==f.strokeStyle||(h=[10,f.strokeStyle,f.lineWidth,
Patrick's avatar
Patrick committed
310
f.lineCap,f.lineJoin,f.miterLimit,f.lineDash,f.lineDashOffset,!1,1],this.a.push(h),this.b.push(h),g?(g.lineCap=f.lineCap,g.lineDash=f.lineDash,g.lineDashOffset=f.lineDashOffset,g.lineJoin=f.lineJoin,g.lineWidth=f.lineWidth,g.miterLimit=f.miterLimit,g.strokeStyle=f.strokeStyle):this.B={lineCap:f.lineCap,lineDash:f.lineDash,lineDashOffset:f.lineDashOffset,lineJoin:f.lineJoin,lineWidth:f.lineWidth,miterLimit:f.miterLimit,strokeStyle:f.strokeStyle}));f=this.j;g=this.ea;g&&g.font==f.font&&g.textAlign==
Patrick's avatar
Patrick committed
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
f.textAlign&&g.textBaseline==f.textBaseline||(h=[11,f.font,f.textAlign,f.textBaseline],this.a.push(h),this.b.push(h),g?(g.font=f.font,g.textAlign=f.textAlign,g.textBaseline=f.textBaseline):this.ea={font:f.font,textAlign:f.textAlign,textBaseline:f.textBaseline});Zj(this,e);f=this.coordinates.length;a=Yj(this,a,b,c,d,!1,!1);a=[5,f,a,this.Ja,this.l,this.o,this.I,this.v,!!this.g,!!this.f,this.s];this.a.push(a);this.b.push(a);ck(this,e)}};
mk.prototype.fc=function(a){if(a){var b=a.qa();b?(b=b.b,b=Sd(b?b:Id),this.g?this.g.fillStyle=b:this.g={fillStyle:b}):this.g=null;var c=a.pa();if(c){b=c.b;var d=c.i,e=c.g,f=c.f,g=c.j,h=c.c;c=c.l;d=void 0!==d?d:"round";e=e?e.slice():Jd;f=void 0!==f?f:0;g=void 0!==g?g:"round";h=void 0!==h?h:1;c=void 0!==c?c:10;b=Sd(b?b:Kd);if(this.f){var l=this.f;l.lineCap=d;l.lineDash=e;l.lineDashOffset=f;l.lineJoin=g;l.lineWidth=h;l.miterLimit=c;l.strokeStyle=b}else this.f={lineCap:d,lineDash:e,lineDashOffset:f,lineJoin:g,
lineWidth:h,miterLimit:c,strokeStyle:b}}else this.f=null;var m=a.Zb;b=a.Lc;d=a.Mc;e=a.a;h=a.b;c=a.Ma();f=a.ra();g=a.Vc;l=a.sb;a=void 0!==m?m:"10px sans-serif";g=void 0!==g?g:"center";l=void 0!==l?l:"middle";this.j?(m=this.j,m.font=a,m.textAlign=g,m.textBaseline=l):this.j={font:a,textAlign:g,textBaseline:l};this.Ja=void 0!==f?f:"";this.l=void 0!==b?b:0;this.o=void 0!==d?d:0;this.s=void 0!==e?e:!1;this.I=void 0!==h?h:0;this.v=void 0!==c?c:1}else this.Ja=""};function nk(a,b,c,d,e){this.I=a;this.c=b;this.o=d;this.s=c;this.f=e;this.a={};this.j=pd(1,1);this.l=ve()}v(nk,rf);var ok={0:[[!0]]};function pk(a,b,c){var d,e=Math.floor(a.length/2);if(b>=e)for(d=e;d<b;d++)a[d][c]=!0;else if(b<e)for(d=b+1;d<e;d++)a[d][c]=!0}
function rk(a){if(void 0!==ok[a])return ok[a];for(var b=2*a+1,c=Array(b),d=0;d<b;d++)c[d]=Array(b);b=a;for(var e=d=0;b>=d;)pk(c,a+b,a+d),pk(c,a+d,a+b),pk(c,a-d,a+b),pk(c,a-b,a+d),pk(c,a-b,a-d),pk(c,a-d,a-b),pk(c,a+d,a-b),pk(c,a+b,a-d),d++,e+=1+2*d,0<2*(e-b)+1&&(--b,e+=1-2*b);return ok[a]=c}function sk(a){for(var b in a.a){var c=a.a[b],d;for(d in c)c[d].uf()}}
nk.prototype.Ga=function(a,b,c,d,e,f){d=Math.round(d);var g=2*d+1,h=Ee(this.l,d+.5,d+.5,1/b,-1/b,-c,-a[0],-a[1]),l=this.j;l.canvas.width!==g||l.canvas.height!==g?(l.canvas.width=g,l.canvas.height=g):l.clearRect(0,0,g,g);if(void 0!==this.f){var m=ib();jb(m,a);kb(m,b*(this.f+d),m)}var n=rk(d);return tk(this,l,h,c,e,function(a){for(var b=l.getImageData(0,0,g,g).data,c=0;c<g;c++)for(var d=0;d<g;d++)if(n[c][d]&&0<b[4*(d*g+c)+3]){if(a=f(a))return a;l.clearRect(0,0,g,g);return}},m)};
function uk(a,b){var c=a.c;a=c[0];var d=c[1],e=c[2];c=c[3];a=[a,d,a,c,e,c,e,d];Ud(a,0,8,2,b,a);return a}nk.prototype.b=function(a,b){var c=void 0!==a?a.toString():"0";a=this.a[c];void 0===a&&(a={},this.a[c]=a);c=a[b];void 0===c&&(c=new vk[b](this.I,this.c,this.s,this.o),a[b]=c);return c};nk.prototype.g=function(){return Aa(this.a)};
nk.prototype.i=function(a,b,c,d,e,f){var g=Object.keys(this.a).map(Number);g.sort(fd);var h=uk(this,c);a.save();a.beginPath();a.moveTo(h[0],h[1]);a.lineTo(h[2],h[3]);a.lineTo(h[4],h[5]);a.lineTo(h[6],h[7]);a.clip();f=f?f:qf;var l,m;h=0;for(l=g.length;h<l;++h){var n=this.a[g[h].toString()];var p=0;for(m=f.length;p<m;++p){var q=n[f[p]];void 0!==q&&q.i(a,b,c,d,e)}}a.restore()};
function tk(a,b,c,d,e,f,g){var h=Object.keys(a.a).map(Number);h.sort(function(a,b){return b-a});var l,m;var n=0;for(l=h.length;n<l;++n){var p=a.a[h[n].toString()];for(m=qf.length-1;0<=m;--m){var q=p[qf[m]];if(void 0!==q&&(q=ak(q,b,1,c,d,e,q.b,f,g)))return q}}}var vk={Circle:jk,Image:dk,LineString:ek,Polygon:jk,Text:mk};function wk(a,b){return x(a)-x(b)}function xk(a,b){a=.5*a/b;return a*a}function yk(a,b,c,d,e,f){var g=!1,h;if(h=c.W()){var l=h.yf();2==l||3==l?h.hk(e,f):(0==l&&h.load(),h.ri(e,f),g=!0)}if(e=(0,c.Va)(b))d=e.me(d),(0,zk[d.U()])(a,d,c,b);return g}
var zk={Point:function(a,b,c,d){var e=c.W();if(e){if(2!=e.yf())return;var f=a.b(c.Da(),"Image");f.ic(e);f.Ec(b,d)}if(e=c.ra())a=a.b(c.Da(),"Text"),a.fc(e),a.Qc(b.ja(),0,2,2,d)},LineString:function(a,b,c,d){var e=c.pa();if(e){var f=a.b(c.Da(),"LineString");f.Ta(null,e);f.Yb(b,d)}if(e=c.ra())a=a.b(c.Da(),"Text"),a.fc(e),a.Qc(Ne(b),0,2,2,d)},Polygon:function(a,b,c,d){var e=c.qa(),f=c.pa();if(e||f){var g=a.b(c.Da(),"Polygon");g.Ta(e,f);g.Fc(b,d)}if(e=c.ra())a=a.b(c.Da(),"Text"),a.fc(e),a.Qc(Pe(b),0,2,
2,d)},MultiPoint:function(a,b,c,d){var e=c.W();if(e){if(2!=e.yf())return;var f=a.b(c.Da(),"Image");f.ic(e);f.Cc(b,d)}if(e=c.ra())a=a.b(c.Da(),"Text"),a.fc(e),c=b.ja(),a.Qc(c,0,c.length,b.ya(),d)},MultiLineString:function(a,b,c,d){var e=c.pa();if(e){var f=a.b(c.Da(),"LineString");f.Ta(null,e);f.Bc(b,d)}if(e=c.ra())a=a.b(c.Da(),"Text"),a.fc(e),b=Oe(b),a.Qc(b,0,b.length,2,d)},MultiPolygon:function(a,b,c,d){var e=c.qa(),f=c.pa();if(f||e){var g=a.b(c.Da(),"Polygon");g.Ta(e,f);g.Dc(b,d)}if(e=c.ra())a=a.b(c.Da(),
"Text"),a.fc(e),b=Re(b),a.Qc(b,0,b.length,2,d)},GeometryCollection:function(a,b,c,d){b=b.a;var e;var f=0;for(e=b.length;f<e;++f)(0,zk[b[f].U()])(a,b[f],c,d)},Circle:function(a,b,c,d){var e=c.qa(),f=c.pa();if(e||f){var g=a.b(c.Da(),"Circle");g.Ta(e,f);g.nc(b,d)}if(e=c.ra())a=a.b(c.Da(),"Text"),a.fc(e),a.Qc(b.va(),0,2,2,d)}};function Ak(a,b,c,d,e){Qa.call(this);this.i=e;this.extent=a;this.a=c;this.resolution=b;this.state=d}v(Ak,Qa);Ak.prototype.u=function(){this.b("change")};Ak.prototype.D=function(){return this.extent};Ak.prototype.getState=function(){return this.state};function Bk(a,b,c,d,e,f){this.c=void 0!==f?f:null;Ak.call(this,a,b,c,void 0!==f?0:2,d);this.g=e}v(Bk,Ak);Bk.prototype.f=function(a){this.state=a?3:2;this.u()};Bk.prototype.load=function(){0==this.state&&(this.state=1,this.u(),this.c(this.f.bind(this)))};Bk.prototype.W=function(){return this.g};function Ck(a,b,c,d,e,f){this.s=b;this.o=a.D();var g=b.D(),h=g?Ib(c,g):c;g=di(a,b,Gb(h),d);this.j=new gi(a,b,h,this.o,.5*g);this.c=d;this.g=c;a=ii(this.j);this.l=(this.Jb=f(a,g,e))?this.Jb.a:1;this.Ce=this.f=null;e=2;f=[];this.Jb&&(e=0,f=this.Jb.i);Ak.call(this,c,d,this.l,e,f)}v(Ck,Ak);Ck.prototype.xa=function(){1==this.state&&(Ca(this.Ce),this.Ce=null);Ak.prototype.xa.call(this)};Ck.prototype.W=function(){return this.f};
Ck.prototype.Ae=function(){var a=this.Jb.getState();2==a&&(this.f=fi(Eb(this.g)/this.c,Fb(this.g)/this.c,this.l,this.Jb.resolution,0,this.c,this.g,this.j,[{extent:this.Jb.D(),image:this.Jb.W()}],0));this.state=a;this.u()};Ck.prototype.load=function(){if(0==this.state){this.state=1;this.u();var a=this.Jb.getState();2==a||3==a?this.Ae():(this.Ce=y(this.Jb,"change",function(){var a=this.Jb.getState();if(2==a||3==a)Ca(this.Ce),this.Ce=null,this.Ae()},this),this.Jb.load())}};function Dk(a){Ai.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,state:a.state});this.v=void 0!==a.resolutions?a.resolutions:null;this.a=null;this.la=0}v(Dk,Ai);function Ek(a,b){a.v&&(b=a.v[hd(a.v,b,0)]);return b}
Dk.prototype.W=function(a,b,c,d){var e=this.c;if(e&&d&&!Uc(e,d)){if(this.a){if(this.la==this.g&&Uc(this.a.s,d)&&this.a.resolution==b&&this.a.a==c&&vb(this.a.D(),a))return this.a;Ma(this.a);this.a=null}this.a=new Ck(e,d,a,b,c,function(a,b,c){return this.ad(a,b,c,e)}.bind(this));this.la=this.g;return this.a}e&&(d=e);return this.ad(a,b,c,d)};Dk.prototype.l=function(a){a=a.target;switch(a.getState()){case 1:this.b(new Fk(Gk,a));break;case 2:this.b(new Fk(Hk,a));break;case 3:this.b(new Fk(Ik,a))}};
function Jk(a,b){a.W().src=b}function Fk(a,b){Na.call(this,a);this.image=b}v(Fk,Na);var Gk="imageloadstart",Hk="imageloadend",Ik="imageloaderror";function Kk(a){Dk.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions,state:a.state});this.$=a.canvasFunction;this.N=null;this.X=0;this.oa=void 0!==a.ratio?a.ratio:1.5}v(Kk,Dk);Kk.prototype.ad=function(a,b,c,d){b=Ek(this,b);var e=this.N;if(e&&this.X==this.g&&e.resolution==b&&e.a==c&&pb(e.D(),a))return e;a=a.slice();Kb(a,this.oa);(d=this.$(a,b,c,[Eb(a)/b*c,Fb(a)/b*c],d))&&(e=new Bk(a,b,c,this.j,d));this.N=e;this.X=this.g;return e};function Lk(a){this.i=a.source;this.Ua=ve();this.f=pd();this.s=[0,0];this.wa=void 0==a.renderBuffer?100:a.renderBuffer;this.B=null;Kk.call(this,{attributions:a.attributions,canvasFunction:this.bl.bind(this),logo:a.logo,projection:a.projection,ratio:a.ratio,resolutions:a.resolutions,state:this.i.getState()});this.G=null;this.o=void 0;this.kj(a.style);y(this.i,"change",this.ep,this)}v(Lk,Kk);k=Lk.prototype;
k.bl=function(a,b,c,d,e){var f=new nk(.5*b/c,a,b,this.i.Ua,this.wa);this.i.re(a,b,e);var g=!1;this.i.oc(a,function(a){var d;if(!(d=g)){var e;(d=a.Nc())?e=d.call(a,b):this.o&&(e=this.o(a,b));if(e){var h,p=!1;Array.isArray(e)||(e=[e]);d=0;for(h=e.length;d<h;++d)p=yk(f,a,e[d],xk(b,c),this.cp,this)||p;d=p}else d=!1}g=d},this);sk(f);if(g)return null;this.s[0]!=d[0]||this.s[1]!=d[1]?(this.f.canvas.width=d[0],this.f.canvas.height=d[1],this.s[0]=d[0],this.s[1]=d[1]):this.f.clearRect(0,0,d[0],d[1]);a=Mk(this,
Gb(a),b,c,d);f.i(this.f,c,a,0,{});this.B=f;return this.f.canvas};k.Ga=function(a,b,c,d,e,f){if(this.B){var g={};return this.B.Ga(a,b,0,d,e,function(a){var b=x(a).toString();if(!(b in g))return g[b]=!0,f(a)})}};k.vc=function(){return this.i};k.ap=function(){return this.G};k.bp=function(){return this.o};function Mk(a,b,c,d,e){c=d/c;return Ee(a.Ua,e[0]/2,e[1]/2,c,-c,0,-b[0],-b[1])}k.cp=function(){this.u()};k.ep=function(){Ci(this,this.i.getState())};
k.kj=function(a){this.G=void 0!==a?a:pj;this.o=a?nj(this.G):void 0;this.u()};function Nk(a,b,c,d,e,f,g){var h=a[b],l=a[b+1],m=a[c]-h,n=a[c+1]-l;if(0!==m||0!==n)if(f=((e-h)*m+(f-l)*n)/(m*m+n*n),1<f)b=c;else if(0<f){for(e=0;e<d;++e)g[e]=Tb(a[b+e],a[c+e],f);g.length=d;return}for(e=0;e<d;++e)g[e]=a[b+e];g.length=d}function Ok(a,b,c,d,e){var f=a[b],g=a[b+1];for(b+=d;b<c;b+=d){var h=a[b],l=a[b+1];f=Qb(f,g,h,l);f>e&&(e=f);f=h;g=l}return e}function Pk(a,b,c,d,e){var f;var g=0;for(f=c.length;g<f;++g){var h=c[g];e=Ok(a,b,h,d,e);b=h}return e}
function Qk(a,b,c,d,e,f,g,h,l,m,n){if(b==c)return m;if(0===e){var p=Qb(g,h,a[b],a[b+1]);if(p<m){for(n=0;n<d;++n)l[n]=a[b+n];l.length=d;return p}return m}for(var q=n?n:[NaN,NaN],t=b+d;t<c;)if(Nk(a,t-d,t,d,g,h,q),p=Qb(g,h,q[0],q[1]),p<m){m=p;for(n=0;n<d;++n)l[n]=q[n];l.length=d;t+=d}else t+=d*Math.max((Math.sqrt(p)-Math.sqrt(m))/e|0,1);if(f&&(Nk(a,c-d,b,d,g,h,q),p=Qb(g,h,q[0],q[1]),p<m)){m=p;for(n=0;n<d;++n)l[n]=q[n];l.length=d}return m}
function Rk(a,b,c,d,e,f,g,h,l,m,n){n=n?n:[NaN,NaN];var p;var q=0;for(p=c.length;q<p;++q){var t=c[q];m=Qk(a,b,t,d,e,f,g,h,l,m,n);b=t}return m};function Sk(a,b){var c=0,d;var e=0;for(d=b.length;e<d;++e)a[c++]=b[e];return c}function Tk(a,b,c,d){var e;var f=0;for(e=c.length;f<e;++f){var g=c[f],h;for(h=0;h<d;++h)a[b++]=g[h]}return b}function Uk(a,b,c,d,e){e=e?e:[];var f=0,g;var h=0;for(g=c.length;h<g;++h)b=Tk(a,b,c[h],d),e[f++]=b;e.length=f;return e};function Vk(a,b,c,d,e){e=void 0!==e?e:[];for(var f=0;b<c;b+=d)e[f++]=a.slice(b,b+d);e.length=f;return e}function Wk(a,b,c,d,e){e=void 0!==e?e:[];var f=0,g;var h=0;for(g=c.length;h<g;++h){var l=c[h];e[f++]=Vk(a,b,l,d,e[f]);b=l}e.length=f;return e};function Xk(a,b,c,d,e,f){var g=NaN,h=NaN,l=(c-b)/d;if(1===l)g=a[b],h=a[b+1];else if(2==l)g=(1-e)*a[b]+e*a[b+d],h=(1-e)*a[b+1]+e*a[b+d+1];else if(0!==l){h=a[b];l=a[b+1];var m=0;g=[0];var n;for(n=b+d;n<c;n+=d){var p=a[n],q=a[n+1];m+=Math.sqrt((p-h)*(p-h)+(q-l)*(q-l));g.push(m);h=p;l=q}c=e*m;l=0;m=g.length;for(n=!1;l<m;)e=l+(m-l>>1),h=+fd(g[e],c),0>h?l=e+1:(m=e,n=!h);e=n?l:~l;0>e?(c=(c-g[-e-2])/(g[-e-1]-g[-e-2]),b+=(-e-2)*d,g=Tb(a[b],a[b+d],c),h=Tb(a[b+1],a[b+d+1],c)):(g=a[b+e*d],h=a[b+e*d+1])}return f?
(f[0]=g,f[1]=h,f):[g,h]}function Yk(a,b,c,d,e,f){if(c==b)return null;if(e<a[b+d-1])return f?(c=a.slice(b,b+d),c[d-1]=e,c):null;if(a[c-1]<e)return f?(c=a.slice(c-d,c),c[d-1]=e,c):null;if(e==a[b+d-1])return a.slice(b,b+d);b/=d;for(c/=d;b<c;)f=b+c>>1,e<a[(f+1)*d-1]?c=f:b=f+1;c=a[b*d-1];if(e==c)return a.slice((b-1)*d,(b-1)*d+d);f=(e-c)/(a[(b+1)*d-1]-c);c=[];var g;for(g=0;g<d-1;++g)c.push(Tb(a[(b-1)*d+g],a[b*d+g],f));c.push(e);return c}
function Zk(a,b,c,d,e,f){var g=0;if(f)return Yk(a,g,b[b.length-1],c,d,e);if(d<a[c-1])return e?(a=a.slice(0,c),a[c-1]=d,a):null;if(a[a.length-1]<d)return e?(a=a.slice(a.length-c),a[c-1]=d,a):null;e=0;for(f=b.length;e<f;++e){var h=b[e];if(g!=h){if(d<a[g+c-1])break;else if(d<=a[h-1])return Yk(a,g,h,c,d,!1);g=h}}return null};function $k(a,b,c,d,e,f){for(var g=[a[b],a[b+1]],h=[],l;b+d<c;b+=d){h[0]=a[b+d];h[1]=a[b+d+1];if(l=e.call(f,g,h))return l;g[0]=h[0];g[1]=h[1]}return!1};function al(a,b,c,d,e){var f=ub(ib(),a,b,c,d);return Jb(e,f)?pb(e,f)||f[0]>=e[0]&&f[2]<=e[2]||f[1]>=e[1]&&f[3]<=e[3]?!0:$k(a,b,c,d,function(a,b){var c=!1,d=qb(e,a),f=qb(e,b);if(1===d||1===f)c=!0;else{var g=e[0],h=e[1],t=e[2],u=e[3],w=b[0];b=b[1];a=(b-a[1])/(w-a[0]);f&2&&!(d&2)&&(c=w-(b-u)/a,c=c>=g&&c<=t);c||!(f&4)||d&4||(c=b-(w-t)*a,c=c>=h&&c<=u);c||!(f&8)||d&8||(c=w-(b-h)/a,c=c>=g&&c<=t);c||!(f&16)||d&16||(c=b-(w-g)*a,c=c>=h&&c<=u)}return c}):!1}
function bl(a,b,c,d,e){var f=c[0];if(!(al(a,b,f,d,e)||Hg(a,b,f,d,e[0],e[1])||Hg(a,b,f,d,e[0],e[3])||Hg(a,b,f,d,e[2],e[1])||Hg(a,b,f,d,e[2],e[3])))return!1;if(1===c.length)return!0;b=1;for(f=c.length;b<f;++b)if(Gg(a,c[b-1],c[b],d,e))return!1;return!0};function K(a,b){Wd.call(this);this.c=null;this.v=this.C=this.j=-1;this.ua(a,b)}v(K,Wd);k=K.prototype;k.Wk=function(a){this.A?id(this.A,a):this.A=a.slice();this.u()};k.clone=function(){var a=new K(null);a.fa(this.ma,this.A.slice());return a};k.Lb=function(a,b,c,d){if(d<mb(this.D(),a,b))return d;this.v!=this.g&&(this.C=Math.sqrt(Ok(this.A,0,this.A.length,this.a,0)),this.v=this.g);return Qk(this.A,0,this.A.length,this.a,this.C,!1,a,b,c,d)};
k.ml=function(a,b){return $k(this.A,0,this.A.length,this.a,a,b)};k.io=function(a,b){return"XYM"!=this.ma&&"XYZM"!=this.ma?null:Yk(this.A,0,this.A.length,this.a,a,void 0!==b?b:!1)};k.T=function(){return Vk(this.A,0,this.A.length,this.a)};k.bi=function(a,b){return Xk(this.A,0,this.A.length,this.a,a,b)};k.jo=function(){var a=this.A,b=this.a,c=a[0],d=a[1],e=0,f;for(f=0+b;f<this.A.length;f+=b){var g=a[f],h=a[f+1];e+=Math.sqrt((g-c)*(g-c)+(h-d)*(h-d));c=g;d=h}return e};
function Ne(a){a.j!=a.g&&(a.c=a.bi(.5,a.c),a.j=a.g);return a.c}k.Ed=function(a){var b=[];b.length=hk(this.A,0,this.A.length,this.a,a,b,0);a=new K(null);a.fa("XY",b);return a};k.U=function(){return"LineString"};k.bb=function(a){return al(this.A,0,this.A.length,this.a,a)};k.ua=function(a,b){a?(Zd(this,b,a,1),this.A||(this.A=[]),this.A.length=Tk(this.A,0,a,this.a),this.u()):this.fa("XY",null)};k.fa=function(a,b){Yd(this,a,b);this.u()};function cl(a,b){Wd.call(this);this.c=this.j=-1;this.ua(a,b)}v(cl,Wd);k=cl.prototype;k.clone=function(){var a=new cl(null);dl(a,this.ma,this.A.slice());return a};k.Lb=function(a,b,c,d){if(d<mb(this.D(),a,b))return d;this.c!=this.g&&(this.j=Math.sqrt(Ok(this.A,0,this.A.length,this.a,0)),this.c=this.g);return Qk(this.A,0,this.A.length,this.a,this.j,!0,a,b,c,d)};k.ko=function(){return ig(this.A,0,this.A.length,this.a)};k.T=function(){return Vk(this.A,0,this.A.length,this.a)};
k.Ed=function(a){var b=[];b.length=hk(this.A,0,this.A.length,this.a,a,b,0);a=new cl(null);dl(a,"XY",b);return a};k.U=function(){return"LinearRing"};k.bb=function(){};k.ua=function(a,b){a?(Zd(this,b,a,1),this.A||(this.A=[]),this.A.length=Tk(this.A,0,a,this.a),this.u()):dl(this,"XY",null)};function dl(a,b,c){Yd(a,b,c);a.u()};function L(a,b){Wd.call(this);this.ua(a,b)}v(L,Wd);k=L.prototype;k.clone=function(){var a=new L(null);a.fa(this.ma,this.A.slice());return a};k.Lb=function(a,b,c,d){var e=this.A;a=Qb(a,b,e[0],e[1]);if(a<d){d=this.a;for(b=0;b<d;++b)c[b]=e[b];c.length=d;return a}return d};k.T=function(){return this.A?this.A.slice():[]};k.Re=function(a){return sb(this.A,a)};k.U=function(){return"Point"};k.bb=function(a){return ob(a,this.A[0],this.A[1])};
k.ua=function(a,b){a?(Zd(this,b,a,0),this.A||(this.A=[]),this.A.length=Sk(this.A,a),this.u()):this.fa("XY",null)};k.fa=function(a,b){Yd(this,a,b);this.u()};function el(a,b,c,d,e,f,g){var h,l=e[f+1],m=[],n=c[0];var p=a[n-d];var q=a[n-d+1];for(h=b;h<n;h+=d){var t=a[h];var u=a[h+1];if(l<=q&&u<=l||q<=l&&l<=u)p=(l-q)/(u-q)*(t-p)+p,m.push(p);p=t;q=u}n=NaN;q=-Infinity;m.sort(fd);p=m[0];h=1;for(u=m.length;h<u;++h){t=m[h];var w=Math.abs(t-p);w>q&&(p=(p+t)/2,Ig(a,b,c,d,p,l)&&(n=p,q=w));p=t}isNaN(n)&&(n=e[f]);return g?(g.push(n,l),g):[n,l]};function M(a,b){Wd.call(this);this.c=[];this.v=-1;this.C=null;this.N=this.B=this.G=-1;this.j=null;this.ua(a,b)}v(M,Wd);k=M.prototype;k.Yk=function(a){this.A?id(this.A,a.ja()):this.A=a.ja().slice();this.c.push(this.A.length);this.u()};k.clone=function(){var a=new M(null);a.fa(this.ma,this.A.slice(),this.c.slice());return a};
k.Lb=function(a,b,c,d){if(d<mb(this.D(),a,b))return d;this.B!=this.g&&(this.G=Math.sqrt(Pk(this.A,0,this.c,this.a,0)),this.B=this.g);return Rk(this.A,0,this.c,this.a,this.G,!0,a,b,c,d)};k.hd=function(a,b){return Ig(this.sc(),0,this.c,this.a,a,b)};k.oo=function(){return jg(this.sc(),0,this.c,this.a)};k.T=function(a){if(void 0!==a){var b=this.sc().slice();gg(b,0,this.c,this.a,a)}else b=this.A;return Wk(b,0,this.c,this.a)};k.$b=function(){return this.c};
function Pe(a){if(a.v!=a.g){var b=Gb(a.D());a.C=el(a.sc(),0,a.c,a.a,b,0);a.v=a.g}return a.C}k.Hl=function(){return new L(Pe(this))};k.Nl=function(){return this.c.length};k.vg=function(a){if(0>a||this.c.length<=a)return null;var b=new cl(null);dl(b,this.ma,this.A.slice(0===a?0:this.c[a-1],this.c[a]));return b};k.Ic=function(){var a=this.ma,b=this.A,c=this.c,d=[],e=0,f;var g=0;for(f=c.length;g<f;++g){var h=c[g],l=new cl(null);dl(l,a,b.slice(e,h));d.push(l);e=h}return d};
k.sc=function(){if(this.N!=this.g){var a=this.A;fg(a,this.c,this.a)?this.j=a:(this.j=a.slice(),this.j.length=gg(this.j,0,this.c,this.a));this.N=this.g}return this.j};k.Ed=function(a){var b=[],c=[];b.length=ik(this.A,0,this.c,this.a,Math.sqrt(a),b,0,c);a=new M(null);a.fa("XY",b,c);return a};k.U=function(){return"Polygon"};k.bb=function(a){return bl(this.sc(),0,this.c,this.a,a)};
k.ua=function(a,b){a?(Zd(this,b,a,2),this.A||(this.A=[]),a=Uk(this.A,0,a,this.a,this.c),this.A.length=0===a.length?0:a[a.length-1],this.u()):this.fa("XY",null,this.c)};k.fa=function(a,b,c){Yd(this,a,b);this.c=c;this.u()};function fl(a,b,c,d){var e=d?d:32;d=[];var f;for(f=0;f<e;++f)id(d,a.offset(b,c,2*Math.PI*f/e));d.push(d[0],d[1]);a=new M(null);a.fa("XY",d,[d.length]);return a}function gl(a){var b=a[0],c=a[1],d=a[2];a=a[3];b=[b,c,b,a,d,a,d,c,b,c];c=new M(null);c.fa("XY",b,[b.length]);return c}
function hl(a,b,c){var d=b?b:32;b=a.ya();var e=a.ma,f=a.va(),g=new M(null,e);d=b*(d+1);for(var h=Array(d),l=0;l<d;l+=b){h[l]=0;h[l+1]=0;for(var m=2;m<b;m++)h[l+m]=f[m]}g.fa(e,h,[h.length]);il(g,f,a.Hd(),c);return g}function il(a,b,c,d){var e=a.ja(),f=a.ma,g=a.ya(),h=a.$b(),l=e.length/g-1;d=d?d:0;for(var m,n,p=0;p<=l;++p)n=p*g,m=d+2*Sb(p,l)*Math.PI/l,e[n]=b[0]+c*Math.cos(m),e[n+1]=b[1]+c*Math.sin(m);a.fa(f,e,h)};function jl(a,b){b=new Cesium.BillboardCollection({scene:b});var c=new Cesium.PrimitiveCollection;this.c=[];this.b=new Cesium.PrimitiveCollection;this.g={projection:a,billboards:b,featureToCesiumMap:{},primitives:c};this.b.add(b);this.b.add(c)}jl.prototype.destroy=function(){this.c.forEach(Ta);this.c.length=0};function kl(a){this.scene=a;this.g=this.Vp.bind(this);this.b={both:Cesium.ClassificationType.BOTH,cesium3DTile:Cesium.ClassificationType.CESIUM_3D_TILE,terrain:Cesium.ClassificationType.TERRAIN}}k=kl.prototype;k.Vp=function(a){var b=a.target,c=b.olcs_cancellers;if(c)if(a=a.feature){b=x(a);var d=c[b];d&&(d(),delete c[b])}else{for(d in c)if(c.hasOwnProperty(d))c[d]();b.olcs_cancellers={}}};function ll(a,b,c){c.olLayer=a;c.olFeature=b}
function ml(a,b,c,d,e,f,g,h,l){function m(a,b){var c;b instanceof HTMLCanvasElement?c={geometry:a}:c={geometry:a,attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(b)}};return new Cesium.GeometryInstance(c)}l={flat:!!l,renderState:{depthTest:{enabled:!0}},translucent:1!==f.alpha};void 0!==h&&(l.renderState||(l.renderState={}),l.renderState.lineWidth=1);h=Array.isArray(e)?e.map(function(a){return m(a,f)}):m(e,f);var n=a.bc(b,c,d);e=a.Cd(b,c,d);var p;f instanceof HTMLCanvasElement?(l.material=
Cesium.Material.fromType("Wallpaper",{image:f,anchor:Cesium.SceneTransforms.wgs84ToDrawingBufferCoordinates(a.scene,Cesium.Cartesian3.fromDegreesArray(yb(d.D()))[0])}),l=new Cesium.MaterialAppearance(l)):l=new Cesium.PerInstanceColorAppearance(l);var q=a.We(b,c);if(n!=Cesium.HeightReference.CLAMP_TO_GROUND||g)null!=q&&g&&("Polygon"===d.U()||"MultiPolygon"===d.U()||"Circle"===d.U())&&Cesium.GroundPolylinePrimitive.isSupported(a.scene)?p=new Cesium.ClassificationPrimitive({geometryInstances:h,appearance:l,
shadows:Cesium.ShadowMode.ENABLED,allowPicking:e,classificationType:q}):p=new Cesium.Primitive({geometryInstances:h,appearance:l,shadows:Cesium.ShadowMode.ENABLED,allowPicking:e});else{if((d=h.geometry.constructor)&&!d.createShadowVolume)return null;a={geometryInstances:h,classificationType:null!=q?q:a.b.terrain,allowPicking:e};f instanceof HTMLCanvasElement&&(a.appearance=l);p=new Cesium.GroundPrimitive(a)}e&&ll(b,c,p);return p}
function nl(a,b){var c=a.qa()?a.qa().b:null;a=a.pa()?a.pa().b:null;var d="black";a&&b?d=a:c&&(d=c);return aj(d)}function pl(a){a=a.pa()?a.pa().c:void 0;return void 0!==a?a:0}
function ql(a,b,c,d,e,f,g,h){var l=new Cesium.PrimitiveCollection;if(g.qa()){a:{var m=g.qa();var n="black";if(m&&(n=m.b,n instanceof CanvasPattern)){if(Cesium.GroundPrimitive.supportsMaterials(a.scene)){m=document.createElement("canvas");var p=m.getContext("2d");p.fillStyle=n;p.fillRect(0,0,300,300);n=m;break a}n=m.fallBackColor||n}n=aj(n)}n=ml(a,b,c,d,e,n,h);l.add(n)}g.pa()&&f&&!(n instanceof Cesium.ClassificationPrimitive)&&(e=pl(g))&&(g=nl(g,!0),(a=ml(a,b,c,d,f,g,h,e,!0))&&l.add(a));return l}
function rl(a,b,c,d,e,f){if(f instanceof Cesium.PrimitiveCollection)var g=f;else g=new Cesium.PrimitiveCollection,g.add(f);if(!e.ra()||!e.ra().ra())return g;(a=a.Eg(b,c,d,e.ra()))&&g.add(a);return g}k.jg=function(a,b,c,d){a=a.add(b);ll(c,d,a);return a};
k.Dg=function(a,b,c,d,e){c=$i(c,d);var f=c.va();d=f.slice();d[0]+=c.Hd();var g=Yi(f);d=Yi(d);var h=Cesium.Cartesian3.distance(g,d),l=this.bc(a,b,c);d=sl(a,b);var m=tl([f],b.get("olcs_groundLevel"));d?(m-=d.Be,f=new Cesium.CircleGeometry({center:g,radius:h,extrudedHeight:m+d.extrudedHeight,height:m,vertexFormat:Cesium.PerInstanceColorAppearance.VERTEX_FORMAT})):f=new Cesium.CircleGeometry({center:g,radius:h,height:m,vertexFormat:Cesium.PerInstanceColorAppearance.VERTEX_FORMAT});if(!d&&l===Cesium.HeightReference.CLAMP_TO_GROUND&&
Cesium.GroundPolylinePrimitive.isSupported(this.scene)){if(g=pl(e)){var n=fl(new hc(6378137),c.va(),h);n=Zi(n.vg(0).T());n=new Cesium.GroundPolylinePrimitive({geometryInstances:new Cesium.GeometryInstance({geometry:new Cesium.GroundPolylineGeometry({positions:n,width:g})}),appearance:new Cesium.PolylineMaterialAppearance({material:this.ue(b,e,!0)}),allowPicking:this.Cd(a,b,c),classificationType:Cesium.ClassificationType.TERRAIN})}}else if(d){var p=new Cesium.CircleOutlineGeometry({center:g,radius:h,
extrudedHeight:m+d.extrudedHeight,height:m,vertexFormat:Cesium.PerInstanceColorAppearance.FLAT_VERTEX_FORMAT});if(1<d.Qf){p=[p];l=d.Qf;for(var q=1;q<l;q++)p[q]=new Cesium.CircleOutlineGeometry({center:g,radius:h,height:m+d.wh*q,vertexFormat:Cesium.PerInstanceColorAppearance.FLAT_VERTEX_FORMAT})}}else p=new Cesium.CircleOutlineGeometry({center:g,radius:h,height:m,vertexFormat:Cesium.PerInstanceColorAppearance.FLAT_VERTEX_FORMAT});p=ql(this,a,b,c,f,p,e,d);n&&(ll(a,b,n),p.add(n));return rl(this,a,b,
c,e,p)};
k.se=function(a,b,c,d,e,f){c=$i(c,d);var g=this.Cd(a,b,c),h=this.bc(a,b,c);d=sl(a,b);if(!f&&d){f=c.T();g=tl(f,d.qe);h=g+d.extrudedHeight;g-=d.Be;var l=Zi(f);f=Cesium.WallGeometry.fromConstantHeights({positions:l,maximumHeight:h,minimumHeight:g,vertexFormat:Cesium.PerInstanceColorAppearance.VERTEX_FORMAT});g=Cesium.WallOutlineGeometry.fromConstantHeights({positions:l,maximumHeight:h,minimumHeight:g});d=ql(this,a,b,c,f,g,e,d);return rl(this,a,b,c,e,d)}f=Zi(c.T());d=new Cesium.PolylineMaterialAppearance({material:this.ue(b,e,
!0)});f={positions:f,width:pl(e),vertexFormat:d.vertexFormat};l=this.We(a,b);h==Cesium.HeightReference.CLAMP_TO_GROUND?Cesium.GroundPolylinePrimitive.isSupported(this.scene)?d=new Cesium.GroundPolylinePrimitive({geometryInstances:new Cesium.GeometryInstance({geometry:new Cesium.GroundPolylineGeometry(f)}),classificationType:null!=l?l:this.b.terrain,appearance:d,allowPicking:g}):(d=nl(e,!0),d=new Cesium.GroundPrimitive({geometryInstances:new Cesium.GeometryInstance({geometry:new Cesium.CorridorGeometry(f),
attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(d)}}),classificationType:null!=l?l:this.b.terrain,allowPicking:g})):d=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:new Cesium.PolylineGeometry(f)}),appearance:d,allowPicking:g});ll(a,b,d);return rl(this,a,b,c,e,d)};
k.jf=function(a,b,c,d,e){c=$i(c,d);var f=c.Ic();d={};for(var g=sl(a,b),h=Infinity,l=0;l<f.length;++l){var m=f[l].T();g&&(h=tl(m,g.qe,h));var n=m[m.length-1];m[0][0]===n[0]&&m[0][1]===n[1]||m.push(m[0]);m=Zi(m);0==l?d.positions=m:(d.holes||(d.holes=[]),d.holes.push({positions:m}))}l=!0;if(g)if(g.Be){var p=h-g.Be;l=!1}else g.qe&&(p=g.qe,l=!1);if(g&&g.Qf){p=p||h;f=[];var q=[];l=!1;m=h+g.extrudedHeight;n=h+g.wh;for(var t=0;t<g.Qf;t++)f[t]=new Cesium.PolygonGeometry({polygonHierarchy:d,perPositionHeight:l,
height:p,vertexFormat:Cesium.PerInstanceColorAppearance.VERTEX_FORMAT,extrudedHeight:n}),q[t]=new Cesium.PolygonOutlineGeometry({polygonHierarchy:d,height:p,perPositionHeight:l,extrudedHeight:n,vertexFormat:Cesium.PerInstanceColorAppearance.FLAT_VERTEX_FORMAT}),n+=g.wh,n=n>m?m:n}else f=new Cesium.PolygonGeometry({polygonHierarchy:d,perPositionHeight:l,height:p,vertexFormat:Cesium.PerInstanceColorAppearance.VERTEX_FORMAT,extrudedHeight:g?h+g.extrudedHeight:void 0});if(!g&&this.bc(a,b,c)===Cesium.HeightReference.CLAMP_TO_GROUND&&
Cesium.GroundPolylinePrimitive.isSupported(this.scene)){if(p=pl(e),0<p){var u=d.holes?d.holes.length:0;h=Array(u+1);h[0]=new Cesium.GeometryInstance({geometry:new Cesium.GroundPolylineGeometry({positions:d.positions,width:p})});for(l=0;l<u;l++)h[l+1]=new Cesium.GeometryInstance({geometry:new Cesium.GroundPolylineGeometry({positions:d.holes[l].positions,width:p})});u=new Cesium.GroundPolylinePrimitive({geometryInstances:h,appearance:new Cesium.PolylineMaterialAppearance({material:this.ue(b,e,!0)}),
allowPicking:this.Cd(a,b,c),classificationType:Cesium.ClassificationType.TERRAIN})}}else q||(q=new Cesium.PolygonOutlineGeometry({polygonHierarchy:d,height:p,perPositionHeight:l,extrudedHeight:g?h+g.extrudedHeight:void 0,vertexFormat:Cesium.PerInstanceColorAppearance.FLAT_VERTEX_FORMAT}));q=ql(this,a,b,c,f,q,e,g);u&&(ll(a,b,u),q.add(u));return rl(this,a,b,c,e,q)};
function sl(a,b){var c=b.get("olcs_extrudedHeight"),d=b.get("olcs_storeyNumber");var e=null!=b.get("olcs_storeyHeight")?b.get("olcs_storeyHeight"):a.get("olcs_storeyHeight");0>c?e=d=void 0:c&&e&&c>e?d=Math.ceil(c/e):c&&d?e=c/d:e&&d&&(c=d*e);200<d&&(d=e=void 0);if(c){var f=Number;a=null!=b.get("olcs_skirt")?b.get("olcs_skirt"):a.get("olcs_skirt");f=f(a);f=Number.isFinite(f)?f:0;return{extrudedHeight:c,Qf:d,wh:e,Be:f,qe:b.get("olcs_groundLevel")}}return null}
function tl(a,b,c){if(null!=b&&Number.isFinite(Number(b)))return b;b=a.length;for(c=null!=c?c:Infinity;b--;)c=a[b][2]&&a[b][2]<c?a[b][2]:c;return Number.isFinite(c)?c:0}k.Cd=function(a,b,c){c=c.get("olcs_allowPicking");void 0===c&&(c=b.get("olcs_allowPicking"));void 0===c&&(c=a.get("olcs_allowPicking"));return null!=c?!!c:!0};
k.bc=function(a,b,c){var d=c.get("olcs_altitudeMode");void 0===d&&(d=b.get("olcs_altitudeMode"));void 0===d&&(d=a.get("olcs_altitudeMode"));a=Cesium.HeightReference.NONE;"clampToGround"===d?a=Cesium.HeightReference.CLAMP_TO_GROUND:"relativeToGround"===d&&(a="Point"===c.U()?Cesium.HeightReference.RELATIVE_TO_GROUND:Cesium.HeightReference.CLAMP_TO_GROUND);return a};k.We=function(a,b){(b=b.get("olcs_classificationType"))||(b=a.get("olcs_classificationType"));return"string"===typeof b?this.b[b]:void 0};
function ul(a,b,c,d,e,f){d=d.T();var g=d.slice();g[2]=f;f=new K([d,g]);f.set("olcs_altitudeMode","absolute",!1);return a.se(b,c,f,"EPSG:4326",e,!0)}
k.te=function(a,b,c,d,e,f,g){var h=$i(c,d),l=sl(a,b);if(l){var m=tl([c.T()],l.qe);d=h.T();d[2]=m+l.extrudedHeight;h.ua(d)}var n=e.W();if(n){n instanceof vl&&n.load();var p=n.W(1),q=function(){if(p&&(p instanceof HTMLCanvasElement||p instanceof Image||p instanceof HTMLImageElement)){var d=h.T(),m,q=n.La();void 0!==q&&(m=new Cesium.Color(1,1,1,q));q=b.get("olcs_zCoordinateEyeOffset");"number"!=typeof q&&(q=0);var t=this.bc(a,b,c),u=t;t!==Cesium.HeightReference.NONE&&l&&(u=Cesium.HeightReference.NONE);
u===Cesium.HeightReference.RELATIVE_TO_GROUND&&(t=b.get("olcs_heightAboveGround"),"number"==typeof t&&(d[2]=t));d=Yi(d);m={image:p,color:m,scale:n.Ma(),heightReference:u,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,position:d,id:b.a,eyeOffset:new Cesium.Cartesian3(0,0,q)};d=n.Gc();q=n.gc();d&&q&&(m.pixelOffset=new Cesium.Cartesian2(q[0]/2-d[0],q[1]/2-d[1]));b.get("olcs_scaleByDistance")&&Array.isArray(b.get("olcs_scaleByDistance"))&&4===b.get("olcs_scaleByDistance").length&&(d=b.get("olcs_scaleByDistance"),
m.scaleByDistance=new Cesium.NearFarScalar(d[0],d[1],d[2],d[3]));m=this.jg(f,m,a,b,h,e);g&&g(m)}}.bind(this);if(p instanceof Image&&(""==p.src||0==p.naturalHeight||0==p.naturalWidth||!p.complete)){var t=!1,u=a.ba();u instanceof Lk&&(u=u.vc());u.H(["removefeature","clear"],this.g);(d=u.olcs_cancellers)||(d=u.olcs_cancellers={});u=x(b);if(d[u])d[u]();d[u]=function(){t=!0};Ia(p,"load",function(){f.isDestroyed()||t||q()})}else q()}return l?(m-=l.Be,ul(this,a,b,h,e,m)):e.ra()&&e.ra().ra()?rl(this,a,b,
Patrick's avatar
Patrick committed
366
h,e,new Cesium.Primitive):null};
Patrick's avatar
Patrick committed
367
368
369
k.Fg=function(a,b,c,d,e,f,g){function h(c,f){var g=new Cesium.PrimitiveCollection;c.forEach(function(c){g.add(f(a,b,c,d,e))});return g}var l=this;switch(c.U()){case "MultiPoint":c=c.Id();if(e.ra()){var m=new Cesium.PrimitiveCollection;c.forEach(function(c){(c=l.te(a,b,c,d,e,f,g))&&m.add(c)});return m}c.forEach(function(c){l.te(a,b,c,d,e,f,g)});return null;case "MultiLineString":return c=c.Hc(),h(c,this.se.bind(this));case "MultiPolygon":return c=c.bd(),h(c,this.jf.bind(this));default:qa("Unhandled multi geometry type"+
c.U())}};
k.Eg=function(a,b,c,d){var e=d.ra(),f=new Cesium.LabelCollection({scene:this.scene}),g=Gb(c.D());if(c instanceof Wd){var h=c.ac();g[2]=3==h.length?h[2]:0}h={};h.position=Yi(g);h.text=e;h.heightReference=this.bc(a,b,c);h.pixelOffset=new Cesium.Cartesian2(d.Lc||0,d.Mc||0);c=d.Zb;void 0!==c&&(h.font=c);c=void 0;d.qa()&&(h.fillColor=nl(d,!1),c=Cesium.LabelStyle.FILL);d.pa()&&(h.outlineWidth=pl(d),h.outlineColor=nl(d,!0),c=Cesium.LabelStyle.OUTLINE);d.qa()&&d.pa()&&(c=Cesium.LabelStyle.FILL_AND_OUTLINE);h.style=
Patrick's avatar
Patrick committed
370
c;switch(d.Vc){case "left":c=Cesium.HorizontalOrigin.LEFT;break;case "right":c=Cesium.HorizontalOrigin.RIGHT;break;default:c=Cesium.HorizontalOrigin.CENTER}h.horizontalOrigin=c;if(d.sb){switch(d.sb){case "top":var l=Cesium.VerticalOrigin.TOP;break;case "middle":l=Cesium.VerticalOrigin.CENTER;break;case "bottom":l=Cesium.VerticalOrigin.BOTTOM;break;case "alphabetic":l=Cesium.VerticalOrigin.TOP;break;case "hanging":l=Cesium.VerticalOrigin.BOTTOM;break;default:qa("unhandled baseline "+d.sb)}h.verticalOrigin=
Patrick's avatar
Patrick committed
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
l;d=b.get("olcs_zCoordinateEyeOffset");"number"===typeof d&&(h.eyeOffset=new Cesium.Cartesian3(0,0,d))}d=f.add(h);ll(a,b,d);return f};k.ue=function(a,b,c){a=b.qa();b=b.pa();if(c&&!b||!c&&!a)return null;a=c?b.b:a.b;a=aj(a);return c&&b.g?Cesium.Material.fromType("Stripe",{horizontal:!1,repeat:500,evenColor:a,oddColor:new Cesium.Color(0,0,0,0)}):Cesium.Material.fromType("Color",{color:a})};
k.Yd=function(a,b,c,d){a=b.Nc();var e=null;a&&(e=a.call(b,d));!e&&c&&(e=c(b,d));return e?Array.isArray(e)?e[0]:e:null};
k.fd=function(a,b,c,d,e){function f(a){var c=d.featureToCesiumMap[x(b)];c?c.push(a):d.featureToCesiumMap[x(b)]=[a]}var g=this;e=e||b.V();var h=d.projection;if(!e)return null;switch(e.U()){case "GeometryCollection":var l=new Cesium.PrimitiveCollection;e.Dd().forEach(function(e){e&&(e=g.fd(a,b,c,d,e))&&l.add(e)});return l;case "Point":return(e=this.te(a,b,e,h,c,d.billboards,f))?e:null;case "Circle":return this.Dg(a,b,e,h,c);case "LineString":return 2>e.T().length?null:this.se(a,b,e,h,c);case "Polygon":return e.T().some(function(a){return 2>
a.length})?null:this.jf(a,b,e,h,c);case "MultiPoint":case "MultiLineString":case "MultiPolygon":return(e=this.Fg(a,b,e,h,c,d.billboards,f))?e:null;case "LinearRing":throw Error("LinearRing should only be part of polygon.");default:throw Error("Ol geom type not handled : "+e.U());}};
k.kf=function(a,b,c){var d=b.c;b=b.Ia();if(void 0===b||!d)throw qa("View not ready"),Error("View not ready");var e=a.ba();if(a instanceof wl)if(e instanceof Lk)e=e.vc();else return new jl(d,this.scene);e=e.Rc();d=new jl(d,this.scene);for(var f=d.g,g=0;g<e.length;++g){var h=e[g];if(h){var l=a instanceof wl?a.ba().o:a.a;if(l=this.Yd(a,h,l,b))if(l=this.fd(a,h,l,f))c[x(h)]=l,d.b.add(l)}}return d};
k.convert=function(a,b,c,d){var e=b.c;b=b.Ia();if(void 0==b||!e)return null;if(a instanceof wl){var f=a.ba();if(f instanceof Lk)f=f.o;else return null}else f=a.a;b=this.Yd(a,c,f,b);if(!b)return null;d.projection=e;return this.fd(a,c,b,d)};function xl(a,b,c){jl.call(this,a,b);this.a=new Cesium.CustomDataSource(x({}).zj);this.a.clustering.enabled=!1;this.a.clustering.minimumClusterSize=2;a=c.ba();this.a.clustering.pixelRange=a.B;this.b=this.a.entities;this.g.entities=this.b}la(xl,jl);xl.prototype.i=function(){return this.a};xl.prototype.f=function(a){this.a.clustering.enabled=a};function yl(a){kl.call(this,a);this.a={};new Cesium.DataSourceCollection}la(yl,kl);yl.prototype.kf=function(a,b,c){var d=b.c;b=b.Ia();if(void 0===b||!d)throw qa("View not ready"),Error("View not ready");var e=a.ba();e=e.vc();e=e.Rc();d=new xl(d,this.scene,a);var f=d.g;f.il=c;for(var g=0;g<e.length;++g){var h=e[g];if(h){var l=this.Yd(a,h,a.a,b);l&&(l=this.fd(a,h,l,f))&&(c[x(h)]=l,d.b.add(l))}}c=d.a;c.clustering.clusterEvent.addEventListener(this.c.bind(this,a));c.clustering.enabled=!0;return d};
yl.prototype.fd=function(a,b,c,d,e){var f=e||b.V();if(!f||"Point"!=f.U())return null;f=$i(f,d.projection);var g={};e=f.T();var h=b.get("olcs_heightAboveGround")||a.get("olcs_heightAboveGround");"number"==typeof h&&(e[2]=h);e=Yi(e);g.position=e;g.id=b.a;c.ra()&&(g.label=zl(this,a,b,f,c.ra()));var l=c.W();if(l){l instanceof vl&&l.load();var m=l.W(1),n=function(){if(m&&(m instanceof HTMLCanvasElement||m instanceof Image||m instanceof HTMLImageElement)){var c,d=l.La();void 0!==d&&(c=new Cesium.Color(1,
1,1,d));d=b.get("olcs_zCoordinateEyeOffset");"number"!=typeof d&&(d=0);var e=this.bc(a,b,f);g.billboard={image:m,color:c,scale:l.Ma(),heightReference:e,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,eyeOffset:new Cesium.Cartesian3(0,0,d)};b.get("olcs_scaleByDistance")&&Array.isArray(b.get("olcs_scaleByDistance")&&4===b.get("olcs_scaleByDistance").length)&&(c=b.get("olcs_scaleByDistance"),g.billboard.scaleByDistance=new Cesium.NearFarScalar(c[0],c[1],c[2],c[3]));c=new Cesium.Entity(g);Al(a,b,c);return c}}.bind(this);
if(m instanceof Image&&(""==m.src||0==m.naturalHeight||0==m.naturalWidth||!m.complete)){var p=!1;e=a.ba();e=e.vc();(c=e.olcs_cancellers)||(c=e.olcs_cancellers={});e=x(b);if(c[e])c[e]();c[e]=function(){p=!0};Ia(m,"load",function(){if(!d.entities.isDestroyed()&&!p){var a=n();d.il[x(b)]=a}})}else return n()}c=new Cesium.Entity(g);Al(a,b,c);return c};function Al(a,b,c){c.olLayer=a;c.olFeature=b}
function zl(a,b,c,d,e){var f={};f.text=e.ra();f.heightReference=a.bc(b,c,d);a=e.Lc;b=e.Mc;0!=a&&0!=b&&(a=new Cesium.Cartesian2(a,b),f.pixelOffset=a);a=e.Zb;void 0!==a&&(f.font=a);a=void 0;e.qa()&&(f.fillColor=nl(e,!1),a=Cesium.LabelStyle.FILL);e.pa()&&(f.outlineWidth=pl(e),f.outlineColor=nl(e,!0),a=Cesium.LabelStyle.OUTLINE);e.qa()&&e.pa()&&(a=Cesium.LabelStyle.FILL_AND_OUTLINE);f.style=a;switch(e.Vc){case "left":a=Cesium.HorizontalOrigin.LEFT;break;case "right":a=Cesium.HorizontalOrigin.RIGHT;break;
default:a=Cesium.HorizontalOrigin.CENTER}f.horizontalOrigin=a;if(e.sb){switch(e.sb){case "top":var g=Cesium.VerticalOrigin.TOP;break;case "middle":g=Cesium.VerticalOrigin.CENTER;break;case "bottom":g=Cesium.VerticalOrigin.BOTTOM;break;case "alphabetic":g=Cesium.VerticalOrigin.TOP;break;case "hanging":g=Cesium.VerticalOrigin.BOTTOM;break;default:qa("unhandled baseline "+e.sb)}f.verticalOrigin=g}return f}yl.prototype.i=function(a,b){a=x(a).toString();this.a[a]=b};
yl.prototype.c=function(a,b,c){c.label.show=!1;c.label.entities=b;c.billboard.id=c.label.id;c.billboard.entities=b;var d=a.get("olcs_zCoordinateEyeOffset");"number"!=typeof d&&(d=0);c.billboard.eyeOffset=new Cesium.Cartesian3(0,0,d);c.label.eyeOffset=new Cesium.Cartesian3(0,0,d);d=a.get("olcs_altitudeMode");var e=Cesium.HeightReference.NONE;"clampToGround"===d?e=Cesium.HeightReference.CLAMP_TO_GROUND:"relativeToGround"===d&&(e=Cesium.HeightReference.RELATIVE_TO_GROUND);c.billboard.heightReference=
e;c.label.heightReference=e;c.billboard.verticalOrigin=Cesium.VerticalOrigin.BOTTOM;d=x(a).toString();(d=this.a[d])&&"function"===typeof d?d(b,c):(d=b,1===b.length&&(d=[a.ba().vc().qg(b[0].id)]),a=(0,a.a)(new E({features:d}),1),a.W()&&Bl(this,a.W(),c.billboard),a.ra()&&Object.assign(c.label,Cl(a.ra())))};
function Bl(a,b,c){b instanceof vl&&b.load();var d=b.W(1),e=function(){if(d&&(d instanceof HTMLCanvasElement||d instanceof Image||d instanceof HTMLImageElement)){var a,e=b.La();void 0!==e&&(a=new Cesium.Color(1,1,1,e));Object.assign(c,{image:d,color:a,scale:b.Ma(),show:!0})}}.bind(a);d instanceof Image&&(""==d.src||0==d.naturalHeight||0==d.naturalWidth||!d.complete)?Ia(d,"load",function(){e()}):e()}
function Cl(a){var b={};b.text=a.ra();b.show=!0;var c=a.Lc,d=a.Mc;0!=c&&0!=d&&(c=new Cesium.Cartesian2(c,d),b.pixelOffset=c);c=a.Zb||"10px sans-serif";void 0!==c&&(b.font=c);c=void 0;a.qa()&&(b.fillColor=nl(a,!1),c=Cesium.LabelStyle.FILL);a.pa()&&(b.outlineWidth=pl(a),b.outlineColor=nl(a,!0),c=Cesium.LabelStyle.OUTLINE);a.qa()&&a.pa()&&(c=Cesium.LabelStyle.FILL_AND_OUTLINE);b.style=c;switch(a.Vc){case "left":c=Cesium.HorizontalOrigin.LEFT;break;case "right":c=Cesium.HorizontalOrigin.RIGHT;break;default:c=
Cesium.HorizontalOrigin.CENTER}b.horizontalOrigin=c;if(a.sb){switch(a.sb){case "top":var e=Cesium.VerticalOrigin.TOP;break;case "middle":e=Cesium.VerticalOrigin.CENTER;break;case "bottom":e=Cesium.VerticalOrigin.BOTTOM;break;case "alphabetic":e=Cesium.VerticalOrigin.TOP;break;case "hanging":e=Cesium.VerticalOrigin.BOTTOM;break;default:qa("unhandled baseline "+a.sb)}b.verticalOrigin=e}return b};function Dl(a,b){this.zc=b.imageryLayers;this.Od=new Cesium.ImageryLayerCollection;Yb.call(this,a,b)}v(Dl,Yb);k=Dl.prototype;k.Pe=function(a){this.zc.add(a);this.Od.add(a)};k.kg=function(a){a.destroy()};k.lh=function(a,b){this.zc.remove(a,b);this.Od.remove(a,!1)};k.Nj=function(a){for(var b=0;b<this.Od.length;++b)this.zc.remove(this.Od.get(b),a);this.Od.removeAll(!1)};function El(a,b){return(a=Wi(a,b))?[a]:null}
k.$d=function(a){var b=El(a,this.view.c);if(b){a.H(["change:opacity","change:visible"],function(){for(var c=0;c<b.length;++c)Xi(a,b[c])});for(var c=0;c<b.length;++c)Xi(a,b[c]);a.H("change:extent",function(){for(var c=0;c<b.length;++c)this.zc.remove(b[c],!0),this.Od.remove(b[c],!1);delete this.ed[x(a)];this.xh()},this);a.H("change",function(){for(var a=0;a<b.length;++a){var c=this.zc.indexOf(b[a]);0<=c&&(this.zc.remove(b[a],!1),this.zc.add(b[a],c))}},this)}return Array.isArray(b)?b:null};
k.Sg=function(){for(var a=[],b={},c=[this.c];0<c.length;){var d=c.splice(0,1)[0];a.push(d);b[x(d)]=d.Da();d instanceof Wb&&(d=d.Tb())&&c.unshift.apply(c,[].concat(ia(d.a)))}md(a,function(a,c){return b[x(a)]-b[x(c)]});a.forEach(function(a){a=x(a).toString();(a=this.ed[a])&&a.forEach(this.Rp,this)},this)};k.Rp=function(a){this.zc.raiseToTop(a)};function Fl(a){cf.call(this,a);this.c=!1;this.s=-1;this.o=NaN;this.j=ib();this.i=this.l=null;this.f=pd()}v(Fl,cf);
Fl.prototype.v=function(a,b,c){var d=a.extent,e=a.pixelRatio,f=b.hf?a.skippedFeatureUids:{},g=a.viewState,h=g.projection;g=g.rotation;var l=h.D(),m=this.a.ba(),n=ff(this,a,0);ef(this,"precompose",c,a,n);var p=b.extent,q=void 0!==p;q&&df(c,a,p);if((p=this.i)&&!p.g()){var t=0,u=0;if(Ra(this.a,"render")){var w=c.canvas.width;var z=c.canvas.height;if(g){var D=Math.round(Math.sqrt(w*w+z*z));t=(D-w)/2;u=(D-z)/2;w=z=D}this.f.canvas.width=w;this.f.canvas.height=z;w=this.f}else w=c;z=w.globalAlpha;w.globalAlpha=
b.opacity;w!=c&&w.translate(t,u);D=a.size[0]*e;var B=a.size[1]*e;Ld(w,-g,D/2,B/2);p.i(w,e,n,g,f);if(m.aa&&h.a&&!pb(l,d)){h=d[0];m=Eb(l);for(var S=0;h<l[0];)--S,n=m*S,n=ff(this,a,n),p.i(w,e,n,g,f),h+=m;S=0;for(h=d[2];h>l[2];)++S,n=m*S,n=ff(this,a,n),p.i(w,e,n,g,f),h-=m;n=ff(this,a,0)}Ld(w,g,D/2,B/2);w!=c&&(ef(this,"render",w,a,n),c.drawImage(w.canvas,-t,-u),w.translate(-t,-u));w.globalAlpha=z}q&&c.restore();this.Cf(c,a,b,n)};
Fl.prototype.Ga=function(a,b,c,d,e){if(this.i){var f=this.a,g={};return this.i.Ga(a,b.viewState.resolution,b.viewState.rotation,c,{},function(a){var b=x(a).toString();if(!(b in g))return g[b]=!0,d.call(e,a,f)})}};Fl.prototype.C=function(){Ue(this)};
Fl.prototype.Kd=function(a){function b(a){var b=a.Nc();if(b)var d=b.call(a,m);else(b=c.a)&&(d=b(a,m));if(d){if(d){b=!1;if(Array.isArray(d))for(var e=0,f=d.length;e<f;++e)b=yk(q,a,d[e],xk(m,n),this.C,this)||b;else b=yk(q,a,d,xk(m,n),this.C,this)||b;a=b}else a=!1;this.c=this.c||a}}var c=this.a,d=c.ba();Xe(a.attributions,d.j);Ye(a,d);var e=a.viewHints[0],f=a.viewHints[1],g=c.$,h=c.la;if(!this.c&&!g&&e||!h&&f)return!0;var l=a.extent;h=a.viewState;e=h.projection;var m=h.resolution,n=a.pixelRatio;f=c.g;
var p=c.i;g=c.get(Gl);void 0===g&&(g=wk);l=kb(l,p*m);p=h.projection.D();d.aa&&h.projection.a&&!pb(p,a.extent)&&(a=Math.max(Eb(l)/2,Eb(p)),l[0]=p[0]-a,l[2]=p[2]+a);if(!this.c&&this.o==m&&this.s==f&&this.l==g&&pb(this.j,l))return!0;this.i=null;this.c=!1;var q=new nk(.5*m/n,l,m,d.Ua,c.i);d.re(l,m,e);if(g){var t=[];d.oc(l,function(a){t.push(a)},this);t.sort(g);t.forEach(b,this)}else d.oc(l,b,this);sk(q);this.o=m;this.s=f;this.l=g;this.j=l;this.i=q;return!0};function Hl(a,b){Lh.call(this,a,b);this.o=!1;this.aa=-1;this.N=NaN;this.C=ib();this.l=this.i=this.G=null}v(Hl,Lh);k=Hl.prototype;k.ij=function(a,b,c){this.l=b;var d=a.viewState,e=this.i,f=a.size,g=a.pixelRatio,h=this.c.g;e&&!e.g()&&(h.enable(h.SCISSOR_TEST),h.scissor(0,0,f[0]*g,f[1]*g),e.i(c,d.center,d.resolution,d.rotation,f,g,b.opacity,b.hf?a.skippedFeatureUids:{}),h.disable(h.SCISSOR_TEST))};k.xa=function(){var a=this.i;a&&(zh(a,this.c.i)(),this.i=null);Lh.prototype.xa.call(this)};
k.Ga=function(a,b,c,d,e){if(this.i&&this.l){c=b.viewState;var f=this.a,g={};return this.i.Ga(a,this.c.i,c.center,c.resolution,c.rotation,b.size,b.pixelRatio,this.l.opacity,{},function(a){var b=x(a).toString();if(!(b in g))return g[b]=!0,d.call(e,a,f)})}};k.vf=function(a,b){if(this.i&&this.l){var c=b.viewState;return Eh(this.i,a,this.c.i,c.resolution,c.rotation,b.pixelRatio,this.l.opacity,b.skippedFeatureUids)}return!1};
k.Ng=function(a,b,c,d){a=Ae(b.pixelToCoordinateTransform,a.slice());if(this.vf(a,b))return c.call(d,this.a,null)};k.jj=function(){Ue(this)};
k.Pg=function(a,b,c){function d(a){var b=a.Nc();if(b)var c=b.call(a,m);else(b=e.a)&&(c=b(a,m));if(c){if(c){b=!1;if(Array.isArray(c))for(var d=c.length-1;0<=d;--d)b=yk(q,a,c[d],xk(m,n),this.jj,this)||b;else b=yk(q,a,c,xk(m,n),this.jj,this)||b;a=b}else a=!1;this.o=this.o||a}}var e=this.a;b=e.ba();Xe(a.attributions,b.j);Ye(a,b);var f=a.viewHints[0],g=a.viewHints[1],h=e.$,l=e.la;if(!this.o&&!h&&f||!l&&g)return!0;g=a.extent;h=a.viewState;f=h.projection;var m=h.resolution,n=a.pixelRatio;h=e.g;var p=e.i;
l=e.get(Gl);void 0===l&&(l=wk);g=kb(g,p*m);if(!this.o&&this.N==m&&this.aa==h&&this.G==l&&pb(this.C,g))return!0;this.i&&a.postRenderFunctions.push(zh(this.i,c));this.o=!1;var q=new yh(.5*m/n,g,e.i);b.re(g,m,f);if(l){var t=[];b.oc(g,function(a){t.push(a)},this);t.sort(l);t.forEach(d,this)}else b.oc(g,d,this);Ah(q,c);this.N=m;this.aa=h;this.G=l;this.C=g;this.i=q;return!0};function N(a){a=a?a:{};var b=wa({},a);delete b.style;delete b.renderBuffer;delete b.updateWhileAnimating;delete b.updateWhileInteracting;$c.call(this,b);this.i=void 0!==a.renderBuffer?a.renderBuffer:100;this.C=null;this.a=void 0;this.f(a.style);this.$=void 0!==a.updateWhileAnimating?a.updateWhileAnimating:!1;this.la=void 0!==a.updateWhileInteracting?a.updateWhileInteracting:!1}v(N,$c);N.prototype.Zd=function(a){var b=null,c=a.U();"canvas"===c?b=new Fl(this):"webgl"===c&&(b=new Hl(a,this));return b};
N.prototype.B=function(){return this.C};N.prototype.G=function(){return this.a};N.prototype.f=function(a){this.C=void 0!==a?a:pj;this.a=null===a?void 0:nj(this.C);this.u()};var Gl="renderOrder";function Il(a){gf.call(this,a);this.O=null;this.c=ve()}v(Il,gf);Il.prototype.W=function(){return this.O?this.O.W():null};Il.prototype.C=function(){return this.c};
Il.prototype.Kd=function(a,b){var c=a.pixelRatio,d=a.size,e=a.viewState,f=e.center,g=e.resolution,h=this.a.ba(),l=a.viewHints,m=a.extent;void 0!==b.extent&&(m=Ib(m,b.extent));l[0]||l[1]||Db(m)||(b=h.W(m,g,c,e.projection))&&Ve(this,b)&&(this.O=b);if(this.O){b=this.O;l=b.D();m=b.resolution;e=b.a;var n=c*m/(g*e);l=Ee(this.c,c*d[0]/2,c*d[1]/2,n,n,0,e*(l[0]-f[0])/m,e*(f[1]-l[3])/m);Ee(this.s,c*d[0]/2-l[4],c*d[1]/2-l[5],c/g,-c/g,0,-f[0],-f[1]);Xe(a.attributions,b.i);Ye(a,h);this.f=g*c/e}return!!this.O};function Jl(a,b){Lh.call(this,a,b);this.l=this.i=this.O=null}v(Jl,Lh);function Kl(a,b){b=b.W();return ag(a.c.g,b)}Jl.prototype.Ga=function(a,b,c,d,e){var f=this.a;return f.ba().Ga(a,b.viewState.resolution,b.viewState.rotation,c,b.skippedFeatureUids,function(a){return d.call(e,a,f)})};
Jl.prototype.Pg=function(a,b){var c=this.c.g,d=a.pixelRatio,e=a.viewState,f=e.center,g=e.resolution,h=e.rotation,l=this.O,m=this.texture,n=this.a.ba(),p=a.viewHints,q=a.extent;void 0!==b.extent&&(q=Ib(q,b.extent));p[0]||p[1]||Db(q)||(b=n.W(q,g,d,e.projection))&&Ve(this,b)&&(l=b,m=Kl(this,b),this.texture&&a.postRenderFunctions.push(function(a,b){a.isContextLost()||a.deleteTexture(b)}.bind(null,c,this.texture)));l&&(c=this.c.i.j,Ll(this,c.width,c.height,d,f,g,h,l.D()),this.l=null,d=this.s,we(d),Ce(d,
1,-1),De(d,0,-1),this.O=l,this.texture=m,Xe(a.attributions,l.i),Ye(a,n));return!!l};function Ll(a,b,c,d,e,f,g,h){b*=f;c*=f;a=a.v;we(a);Ce(a,2*d/b,2*d/c);Be(a,-g);De(a,h[0]-e[0],h[1]-e[1]);Ce(a,(h[2]-h[0])/2,(h[3]-h[1])/2);De(a,1,1)}Jl.prototype.vf=function(a,b){return void 0!==this.Ga(a,b,0,Fd,this)};
Jl.prototype.Ng=function(a,b,c,d){if(this.O&&this.O.W())if(this.a.ba()instanceof Lk){var e=Ae(b.pixelToCoordinateTransform,a.slice());if(this.Ga(e,b,0,Fd,this))return c.call(d,this.a,null)}else{e=[this.O.W().width,this.O.W().height];if(!this.l){var f=b.size;b=ve();De(b,-1,-1);Ce(b,2/f[0],2/f[1]);De(b,0,f[1]);Ce(b,1,-1);f=Fe(this.v.slice());var g=ve();De(g,0,e[1]);Ce(g,1,-1);Ce(g,e[0]/2,e[1]/2);De(g,1,1);ye(g,f);ye(g,b);this.l=g}a=Ae(this.l,a.slice());if(!(0>a[0]||a[0]>e[0]||0>a[1]||a[1]>e[1])&&(this.i||
(this.i=pd(1,1)),this.i.clearRect(0,0,1,1),this.i.drawImage(this.O.W(),a[0],a[1],1,1,0,0,1,1),e=this.i.getImageData(0,0,1,1).data,0<e[3]))return c.call(d,this.a,e)}};function wl(a){$c.call(this,a?a:{})}v(wl,$c);wl.prototype.Zd=function(a){var b=null,c=a.U();"canvas"===c?b=new Il(this):"webgl"===c&&(b=new Jl(a,this));return b};function Ml(a,b,c){this.i=c||new kl(b);this.b=new Cesium.PrimitiveCollection;b.primitives.add(this.b);this.b.destroyPrimitives=!1;Yb.call(this,a,b)}v(Ml,Yb);k=Ml.prototype;k.Pe=function(a){a.b.counterpart=a;this.b.add(a.b)};k.kg=function(a){a.b.destroy()};k.lh=function(a,b){a.destroy();this.b.destroyPrimitives=b;this.b.remove(a.b);this.b.destroyPrimitives=!1};
k.Nj=function(a){if(this.b.destroyPrimitives=a)for(a=0;a<this.b.length;++a)this.b.get(a).counterpart.destroy();this.b.removeAll();this.b.destroyPrimitives=!1};
k.$d=function(a){if(!(a instanceof N||a instanceof wl&&a.ba()instanceof Lk))return null;var b=a.ba();if(b instanceof Lk||b instanceof O)b=b.vc();var c=this.view,d={},e=this.i.kf(a,c,d),f=e.b,g=e.c;f.show=a.lb();g.push(y(a,"change:visible",function(){f.show=a.lb()}));var h=function(b){var g=this.i.convert(a,c,b,e.g);g&&(d[x(b)]=g,f.add(g))}.bind(this),l=function(a){a=x(a);var b=e.g,c=b.featureToCesiumMap[a];delete b.featureToCesiumMap[a];if(Array.isArray(c))for(var g=c.length,h=0;h<g;h++)b.billboards.remove(c[h]);
Patrick's avatar
Patrick committed
406
b=d[a];delete d[a];b&&f.remove(b)}.bind(this);g.push(y(b,"addfeature",function(a){h(a.feature)},this));g.push(y(b,"removefeature",function(a){l(a.feature)},this));g.push(y(b,"changefeature",function(a){a=a.feature;l(a);h(a)},this));g.push(y(a,"propertychange",function(a){a=a.key;if("olcs_altitudeMode"===a||"olcs_allowPicking"===a||"olcs_classificationType"===a)for(var c=b.Rc(),d=c.length,e=0;e<d;e++){var f=c[e];null==f.get(a)&&f.u()}else if("olcs_storeyHeight"===a||"olcs_skirt"===a)for(c=b.Rc(),d=
Patrick's avatar
Patrick committed
407
408
409
410
411
412
413
414
c.length,e=0;e<d;e++)f=c[e],null==f.get(a)&&(f.get("olcs_extrudedHeight")||f.get("olcs_storeyNumber"))&&f.u()},this));return e?[e]:null};k.el=function(a){this.lh(a,!0)};function Nl(a){this.f=null;this.R=a.map;this.wa=a.time||function(){return Cesium.JulianDate.now()};this.Xa=Vc(this.R.Z().c,"EPSG:4326");this.X=1;this.la=this.oa=0;this.aa=!0;this.o=document.createElement("DIV");var b=document.createAttribute("style");b.value="position:absolute;top:0;left:0;width:100%;height:100%;visibility:hidden;";this.o.setAttributeNode(b);if(b=a.target||null)"string"===typeof b&&(b=document.getElementById(b)),b.appendChild(this.o);else{var c=this.R.a.querySelector(".ol-overlaycontainer");
c&&c.parentNode&&c.parentNode.insertBefore(this.o,c)}this.N=!b;this.a=document.createElement("CANVAS");b=document.createAttribute("style");b.value="position:absolute;top:0;left:0;width:100%;height:100%;";this.a.setAttributeNode(b);uj()&&(b=this.a.style,uj(),b.imageRendering=tj||"");this.a.oncontextmenu=function(){return!1};this.a.onselectstart=function(){return!1};this.o.appendChild(this.a);this.g=!1;this.Ba=[];this.I=null;b=void 0!==a.sceneOptions?a.sceneOptions:{};b.canvas=this.a;b.scene3DOnly=
!0;this.b=new Cesium.Scene(b);b=this.b.screenSpaceCameraController;b.tiltEventTypes.push({eventType:Cesium.CameraEventType.LEFT_DRAG,modifier:Cesium.KeyboardEventModifier.SHIFT});b.tiltEventTypes.push({eventType:Cesium.CameraEventType.LEFT_DRAG,modifier:Cesium.KeyboardEventModifier.ALT});b.enableLook=!1;this.b.camera.constrainedAxis=Cesium.Cartesian3.UNIT_Z;this.l=new bj(this.b,this.R);this.G=new Cesium.Globe(Cesium.Ellipsoid.WGS84);this.G.baseColor=Cesium.Color.WHITE;this.b.globe=this.G;this.b.skyAtmosphere=
new Cesium.SkyAtmosphere;this.ta=new Cesium.DataSourceCollection;this.c=new Cesium.DataSourceDisplay({scene:this.b,dataSourceCollection:this.ta});a=a.createSynchronizers?a.createSynchronizers(this.R,this.b,this.ta):[new Dl(this.R,this.b),new Ml(this.R,this.b)];Ol(this);for(b=a.length-1;0<=b;--b)a[b].xh();this.N&&(a=this.a.nextElementSibling)&&(a.style.display="none");this.Db=0;this.v=void 0;this.$=Number.POSITIVE_INFINITY;this.Za=this.ea=!1;this.s=this.i=this.B=null;this.C=!1;this.j=new Cesium.BoundingSphere;
(new Cesium.EventHelper).add(this.b.postRender,Nl.prototype.Jr,this)}
Object.defineProperties(Nl.prototype,{trackedFeature:{get:function(){return this.B},set:function(a){if(this.B!==a){var b=this.b;if(a&&a.V()){this.B=a;this.C=!0;var c=this.Xa;b={position:new Cesium.CallbackProperty(function(){var b=a.V().T();b=c(b,void 0,b.length);return Yi(b)},!1),point:{pixelSize:1,color:Cesium.Color.TRANSPARENT}};this.i=this.c.defaultDataSource.entities.add(b)}else this.C=!1,b.screenSpaceCameraController.enableTilt=!0,this.i&&this.c.defaultDataSource.entities.remove(this.i),this.s=
this.B=this.i=null,b.camera.lookAtTransform(Cesium.Matrix4.IDENTITY)}}}});function Pl(a){void 0!==a.v&&(cancelAnimationFrame(a.v),a.v=void 0);!a.g&&!a.Za||a.ea||(a.v=requestAnimationFrame(a.Sp.bind(a)))}k=Nl.prototype;
k.Sp=function(a){this.v=void 0;a-this.Db<1E3/this.$||(this.Db=a,a=this.wa(),this.b.initializeFrame(),Ol(this),this.c.update(a),this.s&&this.c.getBoundingSphere(this.i,!1,this.j)===Cesium.BoundingSphereState.DONE&&(this.j.radius=1,this.s.update(a,this.j)),this.b.render(a),fj(this.l));Pl(this)};
Patrick's avatar
Patrick committed
415
k.Jr=function(){if(this.C){var a=this.i,b=this.b,c=this.c.getBoundingSphere(a,!1,this.j);if(c!==Cesium.BoundingSphereState.PENDING){b.screenSpaceCameraController.enableTilt=!1;if(c=c!==Cesium.BoundingSphereState.FAILED?this.j:void 0)c.radius=1;this.s=new Cesium.EntityView(a,b,b.mapProjection.ellipsoid);this.s.update(this.wa(),c);this.C=!1}}};
Patrick's avatar
Patrick committed
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
function Ol(a){var b=a.a.clientWidth,c=a.a.clientHeight;if(!(0===b|0===c||b===a.oa&&c===a.la&&!a.aa)){var d=a.X;uj()||(d*=window.devicePixelRatio||1);a.aa=!1;a.oa=b;a.la=c;b*=d;c*=d;a.a.width=b;a.a.height=c;a.b.camera.frustum.aspectRatio=b/c}}k.tl=function(){return this.l};k.Tl=function(){return this.R};k.ul=function(){return this.b};k.zl=function(){return this.ta};k.yl=function(){return this.c};k.Bl=function(){return this.g};
k.ir=function(a){if(this.g!==a)if(this.g=a,this.o.style.visibility=this.g?"visible":"hidden",this.g){Ql(this);if(this.N){var b=this.R.i;b.forEach(function(a){this.Ba.push(a)},this);b.clear();a=this.R.Nb();a.lb()&&(this.I=a,this.I.ec(!1))}this.l.xe();Pl(this)}else this.N&&(b=this.R.i,this.Ba.forEach(function(a){b.push(a)}),this.Ba.length=0,this.I&&(this.I.ec(!0),this.I=null)),this.l.td()};
k.Kr=function(a,b){var c=this;if(!this.g){Ql(this);this.l.xe();var d=this.G.ellipsoid,e=this.b.camera,f=d.cartesianToCartographic(e.position);f.height<a&&(f.height=a,e.position=d.cartographicToCartesian(f));this.Za=!0;Pl(this);setTimeout(function(){c.Za=!1},b)}};k.qh=function(a){this.ea!==a&&(this.ea=a,Pl(this))};k.fl=function(){this.f||(this.f=new ec(this))};k.rl=function(){return this.f};k.ur=function(a){a=Math.max(0,a);a!==this.X&&(this.X=Math.max(0,a),this.aa=!0,this.f&&this.f.s())};
k.vr=function(a){this.$!==a&&(this.$=a,Pl(this))};function Ql(a){a=a.R.Z();var b=a.va();if(!Rl(a)||isNaN(b[0])||isNaN(b[1]))throw Error("The OpenLayers map is not properly initialized: "+b+" / "+a.Ia());};function Sl(a){return function(b){if(b)return[Mb(b[0],a[0],a[2]),Mb(b[1],a[1],a[3])]}}function Tl(a){return a};function Ul(a,b,c){this.center=a;this.resolution=b;this.rotation=c};function Vl(a){Wa.call(this);this.element=a.element?a.element:null;this.R=this.N=null;this.o=[];this.render=a.render?a.render:ua;a.target&&this.c(a.target)}v(Vl,Wa);Vl.prototype.xa=function(){rd(this.element);Wa.prototype.xa.call(this)};Vl.prototype.i=function(){return this.R};
Vl.prototype.setMap=function(a){this.R&&rd(this.element);for(var b=0,c=this.o.length;b<c;++b)Ca(this.o[b]);this.o.length=0;if(this.R=a)(this.N?this.N:a.v).appendChild(this.element),this.render!==ua&&this.o.push(y(a,"postrender",this.render,this)),a.render()};Vl.prototype.c=function(a){this.N="string"===typeof a?document.getElementById(a):a};function Wl(a){a=a?a:{};this.G=document.createElement("UL");this.s=document.createElement("LI");this.G.appendChild(this.s);this.s.style.display="none";this.a=void 0!==a.collapsed?a.collapsed:!0;this.j=void 0!==a.collapsible?a.collapsible:!0;this.j||(this.a=!1);var b=void 0!==a.className?a.className:"ol-attribution",c=void 0!==a.tipLabel?a.tipLabel:"Attributions",d=void 0!==a.collapseLabel?a.collapseLabel:"\u00bb";"string"===typeof d?(this.v=document.createElement("span"),this.v.textContent=d):this.v=
d;d=void 0!==a.label?a.label:"i";"string"===typeof d?(this.C=document.createElement("span"),this.C.textContent=d):this.C=d;var e=this.j&&!this.a?this.v:this.C;d=document.createElement("button");d.setAttribute("type","button");d.title=c;d.appendChild(e);y(d,"click",this.Pn,this);c=document.createElement("div");c.className=b+" ol-unselectable ol-control"+(this.a&&this.j?" ol-collapsed":"")+(this.j?"":" ol-uncollapsible");c.appendChild(this.G);c.appendChild(d);Vl.call(this,{element:c,render:a.render?
a.render:Xl,target:a.target});this.B=!0;this.l={};this.f={};this.aa={}}v(Wl,Vl);
function Xl(a){if(a=a.frameState){var b,c,d,e,f,g=a.layerStatesArray,h=wa({},a.attributions),l={},m={},n=a.viewState.projection;var p=0;for(b=g.length;p<b;p++)if(e=g[p].layer.ba()){var q=x(e).toString();if(f=e.j){var t=0;for(c=f.length;t<c;t++){var u=f[t];var w=x(u).toString();if(!(w in h)){if(d=a.usedTiles[q]){var z=e.Ob(n);a:{var D=void 0;var B,S=u,Ua=z,ya=n;if(S.a){for(D in d)if(D in S.a){z=d[D];var Da=0;for(B=S.a[D].length;Da<B;++Da){var C=S.a[D][Da];if(ed(C,z)){D=!0;break a}var pa=af(Ua,wi(ya),
parseInt(D,10)),$a=pa.da-pa.ga+1;if(z.ga<pa.ga||z.da>pa.da)if(ed(C,new bd(Sb(z.ga,$a),Sb(z.da,$a),z.ha,z.ka))||z.da-z.ga+1>$a&&ed(C,pa)){D=!0;break a}}}D=!1}else D=!0}}else D=!1;D?(w in l&&delete l[w],D=u.b,D in m||(m[D]=!0,h[w]=u)):l[w]=u}}}}b=[h,l];p=b[0];b=b[1];for(var ra in this.l)ra in p?(this.f[ra]||(this.l[ra].style.display="",this.f[ra]=!0),delete p[ra]):ra in b?(this.f[ra]&&(this.l[ra].style.display="none",delete this.f[ra]),delete b[ra]):(rd(this.l[ra]),delete this.l[ra],delete this.f[ra]);
for(ra in p)t=document.createElement("LI"),t.innerHTML=p[ra].b,this.G.appendChild(t),this.l[ra]=t,this.f[ra]=!0;for(ra in b)t=document.createElement("LI"),t.innerHTML=b[ra].b,t.style.display="none",this.G.appendChild(t),this.l[ra]=t;ra=!Aa(this.f)||!Aa(a.logos);this.B!=ra&&(this.element.style.display=ra?"":"none",this.B=ra);ra&&Aa(this.f)?this.element.classList.add("ol-logo-only"):this.element.classList.remove("ol-logo-only");a=a.logos;ra=this.aa;for(Pa in ra)Pa in a||(rd(ra[Pa]),delete ra[Pa]);for(var dc in a)if(b=
a[dc],b instanceof HTMLElement&&(this.s.appendChild(b),ra[dc]=b),!(dc in ra)){var Pa=new Image;Pa.src=dc;""===b?p=Pa:(p=document.createElement("a"),p.href=b,p.appendChild(Pa));this.s.appendChild(p);ra[dc]=p}this.s.style.display=Aa(a)?"none":""}else this.B&&(this.element.style.display="none",this.B=!1)}k=Wl.prototype;k.Pn=function(a){a.preventDefault();Yl(this)};function Yl(a){a.element.classList.toggle("ol-collapsed");a.a?qd(a.v,a.C):qd(a.C,a.v);a.a=!a.a}k.On=function(){return this.j};
k.Rn=function(a){this.j!==a&&(this.j=a,this.element.classList.toggle("ol-uncollapsible"),!a&&this.a&&Yl(this))};k.Qn=function(a){this.j&&this.a!==a&&Yl(this)};k.Nn=function(){return this.a};function Zl(a){return Math.pow(a,3)}function $l(a){return 1-Zl(1-a)}function am(a){return 3*a*a-2*a*a*a}function Pi(a){return a};function bm(a){a=a?a:{};var b=void 0!==a.className?a.className:"ol-rotate",c=void 0!==a.label?a.label:"\u21e7";this.a=null;"string"===typeof c?(this.a=document.createElement("span"),this.a.className="ol-compass",this.a.textContent=c):(this.a=c,this.a.classList.add("ol-compass"));var d=a.tipLabel?a.tipLabel:"Reset rotation";c=document.createElement("button");c.className=b+"-reset";c.setAttribute("type","button");c.title=d;c.appendChild(this.a);y(c,"click",bm.prototype.v,this);d=document.createElement("div");
d.className=b+" ol-unselectable ol-control";d.appendChild(c);b=a.render?a.render:cm;this.j=a.resetNorth?a.resetNorth:void 0;Vl.call(this,{element:d,render:b,target:a.target});this.l=void 0!==a.duration?a.duration:250;this.f=void 0!==a.autoHide?a.autoHide:!0;this.s=void 0;this.f&&this.element.classList.add("ol-hidden")}v(bm,Vl);bm.prototype.v=function(a){a.preventDefault();void 0!==this.j?this.j():(a=this.R.Z())&&void 0!==a.Qa()&&(0<this.l?a.animate({rotation:0,duration:this.l,easing:$l}):a.gd(0))};
function cm(a){if(a=a.frameState){a=a.viewState.rotation;if(a!=this.s){var b="rotate("+a+"rad)";if(this.f){var c=this.element.classList.contains("ol-hidden");c||0!==a?c&&0!==a&&this.element.classList.remove("ol-hidden"):this.element.classList.add("ol-hidden")}this.a.style.msTransform=b;this.a.style.webkitTransform=b;this.a.style.transform=b}this.s=a}};function dm(a){a=a?a:{};var b=void 0!==a.className?a.className:"ol-zoom",c=void 0!==a.delta?a.delta:1,d=void 0!==a.zoomInLabel?a.zoomInLabel:"+",e=void 0!==a.zoomOutLabel?a.zoomOutLabel:"\u2212",f=void 0!==a.zoomInTipLabel?a.zoomInTipLabel:"Zoom in",g=void 0!==a.zoomOutTipLabel?a.zoomOutTipLabel:"Zoom out",h=document.createElement("button");h.className=b+"-in";h.setAttribute("type","button");h.title=f;h.appendChild("string"===typeof d?document.createTextNode(d):d);y(h,"click",dm.prototype.f.bind(this,
c));d=document.createElement("button");d.className=b+"-out";d.setAttribute("type","button");d.title=g;d.appendChild("string"===typeof e?document.createTextNode(e):e);y(d,"click",dm.prototype.f.bind(this,-c));c=document.createElement("div");c.className=b+" ol-unselectable ol-control";c.appendChild(h);c.appendChild(d);Vl.call(this,{element:c,target:a.target});this.a=void 0!==a.duration?a.duration:250}v(dm,Vl);
dm.prototype.f=function(a,b){b.preventDefault();if(b=this.R.Z()){var c=b.Ia();c&&(a=b.constrainResolution(c,a),0<this.a?(b.$c()&&b.Ad(),b.animate({resolution:a,duration:this.a,easing:$l})):b.Uc(a))}};function em(a){a=a?a:{};var b=new bb;(void 0!==a.zoom?a.zoom:1)&&b.push(new dm(a.zoomOptions));(void 0!==a.rotate?a.rotate:1)&&b.push(new bm(a.rotateOptions));(void 0!==a.attribution?a.attribution:1)&&b.push(new Wl(a.attributionOptions));return b};function fm(a){a=a?a:{};this.a=void 0!==a.className?a.className:"ol-full-screen";var b=void 0!==a.label?a.label:"\u2922";this.j="string"===typeof b?document.createTextNode(b):b;b=void 0!==a.labelActive?a.labelActive:"\u00d7";this.l="string"===typeof b?document.createTextNode(b):b;var c=a.tipLabel?a.tipLabel:"Toggle full-screen";b=document.createElement("button");b.className=this.a+"-"+gm();b.setAttribute("type","button");b.title=c;b.appendChild(this.j);y(b,"click",this.C,this);c=document.createElement("div");
c.className=this.a+" ol-unselectable ol-control "+(hm()?"":"ol-unsupported");c.appendChild(b);Vl.call(this,{element:c,target:a.target});this.v=void 0!==a.keys?a.keys:!1;this.f=a.source}v(fm,Vl);
fm.prototype.C=function(a){a.preventDefault();hm()&&(a=this.R)&&(gm()?document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():(a=this.f?"string"===typeof this.f?document.getElementById(this.f):this.f:a.Jc(),this.v?a.mozRequestFullScreenWithKeys?a.mozRequestFullScreenWithKeys():a.webkitRequestFullscreen?a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):
im(a):im(a)))};fm.prototype.s=function(){var a=this.element.firstElementChild,b=this.R;gm()?(a.className=this.a+"-true",qd(this.l,this.j)):(a.className=this.a+"-false",qd(this.j,this.l));b&&b.Ud()};fm.prototype.setMap=function(a){Vl.prototype.setMap.call(this,a);a&&this.o.push(y(document,jm(),this.s,this))};
function hm(){var a=document.body;return!!(a.webkitRequestFullscreen||a.mozRequestFullScreen&&document.mozFullScreenEnabled||a.msRequestFullscreen&&document.msFullscreenEnabled||a.requestFullscreen&&document.fullscreenEnabled)}function gm(){return!!(document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||document.fullscreenElement)}
function im(a){a.requestFullscreen?a.requestFullscreen():a.msRequestFullscreen?a.msRequestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen&&a.webkitRequestFullscreen()}var jm=function(){var a;return function(){if(!a){var b=document.body;b.webkitRequestFullscreen?a="webkitfullscreenchange":b.mozRequestFullScreen?a="mozfullscreenchange":b.msRequestFullscreen?a="MSFullscreenChange":b.requestFullscreen&&(a="fullscreenchange")}return a}}();function km(a){a=a?a:{};var b=document.createElement("DIV");b.className=void 0!==a.className?a.className:"ol-mouse-position";Vl.call(this,{element:b,render:a.render?a.render:lm,target:a.target});y(this,Ya(mm),this.Sn,this);a.coordinateFormat&&this.Rj(a.coordinateFormat);a.projection&&this.Ei(Lc(a.projection));this.s=void 0!==a.undefinedHTML?a.undefinedHTML:"";this.l=b.innerHTML;this.j=this.f=this.a=null}v(km,Vl);
function lm(a){a=a.frameState;a?this.a!=a.viewState.projection&&(this.a=a.viewState.projection,this.f=null):this.a=null;nm(this,this.j)}k=km.prototype;k.Sn=function(){this.f=null};k.ci=function(){return this.get(om)};k.Di=function(){return this.get(mm)};k.Am=function(a){this.j=this.R.Xe(a);nm(this,this.j)};k.Bm=function(){nm(this,null);this.j=null};k.setMap=function(a){Vl.prototype.setMap.call(this,a);a&&(a=a.a,this.o.push(y(a,"mousemove",this.Am,this),y(a,"mouseout",this.Bm,this)))};
k.Rj=function(a){this.set(om,a)};k.Ei=function(a){this.set(mm,a)};function nm(a,b){var c=a.s;if(b&&a.a){if(!a.f){var d=a.Di();a.f=d?Kc(a.a,d):Wc}if(b=a.R.ab(b))a.f(b,b),c=(c=a.ci())?c(b):b.toString()}a.l&&c==a.l||(a.element.innerHTML=c,a.l=c)}var mm="projection",om="coordinateFormat";function pm(a,b,c){Na.call(this,a);this.map=b;this.frameState=void 0!==c?c:null}v(pm,Na);function qm(a,b,c,d,e){pm.call(this,a,b,e);this.originalEvent=c;this.pixel=b.Xe(c);this.coordinate=b.ab(this.pixel);this.dragging=void 0!==d?d:!1}v(qm,pm);qm.prototype.preventDefault=function(){pm.prototype.preventDefault.call(this);this.originalEvent.preventDefault()};qm.prototype.stopPropagation=function(){pm.prototype.stopPropagation.call(this);this.originalEvent.stopPropagation()};var rm={Yr:"singleclick",Mr:"click",Nr:"dblclick",Rr:"pointerdrag",Ur:"pointermove",Qr:"pointerdown",Xr:"pointerup",Wr:"pointerover",Vr:"pointerout",Sr:"pointerenter",Tr:"pointerleave",Pr:"pointercancel"};function sm(a,b,c,d,e){qm.call(this,a,b,c.b,d,e);this.b=c}v(sm,qm);function tm(a,b){this.b=a;this.i=b};function um(a){tm.call(this,a,{mousedown:this.Wm,mousemove:this.Xm,mouseup:this.$m,mouseover:this.Zm,mouseout:this.Ym});this.a=a.g;this.g=[]}v(um,tm);function vm(a,b){a=a.g;var c=b.clientX;b=b.clientY;for(var d=0,e=a.length,f;d<e&&(f=a[d]);d++){var g=Math.abs(b-f[1]);if(25>=Math.abs(c-f[0])&&25>=g)return!0}return!1}function wm(a){var b=xm(a,a),c=b.preventDefault;b.preventDefault=function(){a.preventDefault();c()};b.pointerId=1;b.isPrimary=!0;b.pointerType="mouse";return b}k=um.prototype;
k.Wm=function(a){if(!vm(this,a)){(1).toString()in this.a&&this.cancel(a);var b=wm(a);this.a[(1).toString()]=a;ym(this.b,"pointerdown",b,a)}};k.Xm=function(a){if(!vm(this,a)){var b=wm(a);ym(this.b,"pointermove",b,a)}};k.$m=function(a){if(!vm(this,a)){var b=this.a[(1).toString()];b&&b.button===a.button&&(b=wm(a),ym(this.b,"pointerup",b,a),delete this.a[(1).toString()])}};k.Zm=function(a){if(!vm(this,a)){var b=wm(a);zm(this.b,b,a)}};k.Ym=function(a){if(!vm(this,a)){var b=wm(a);Am(this.b,b,a)}};
k.cancel=function(a){var b=wm(a);this.b.cancel(b,a);delete this.a[(1).toString()]};function Bm(a){tm.call(this,a,{MSPointerDown:this.en,MSPointerMove:this.fn,MSPointerUp:this.jn,MSPointerOut:this.gn,MSPointerOver:this.hn,MSPointerCancel:this.dn,MSGotPointerCapture:this.bn,MSLostPointerCapture:this.cn});this.a=a.g;this.g=["","unavailable","touch","pen","mouse"]}v(Bm,tm);function Cm(a,b){var c=b;"number"===typeof b.pointerType&&(c=xm(b,b),c.pointerType=a.g[b.pointerType]);return c}k=Bm.prototype;
k.en=function(a){this.a[a.pointerId.toString()]=a;var b=Cm(this,a);ym(this.b,"pointerdown",b,a)};k.fn=function(a){var b=Cm(this,a);ym(this.b,"pointermove",b,a)};k.jn=function(a){var b=Cm(this,a);ym(this.b,"pointerup",b,a);delete this.a[a.pointerId.toString()]};k.gn=function(a){var b=Cm(this,a);Am(this.b,b,a)};k.hn=function(a){var b=Cm(this,a);zm(this.b,b,a)};k.dn=function(a){var b=Cm(this,a);this.b.cancel(b,a);delete this.a[a.pointerId.toString()]};
k.cn=function(a){this.b.b(new Dm("lostpointercapture",a,a))};k.bn=function(a){this.b.b(new Dm("gotpointercapture",a,a))};function Em(a){tm.call(this,a,{pointerdown:this.cq,pointermove:this.eq,pointerup:this.hq,pointerout:this.fq,pointerover:this.gq,pointercancel:this.bq,gotpointercapture:this.jm,lostpointercapture:this.Vm})}v(Em,tm);k=Em.prototype;k.cq=function(a){Fm(this.b,a)};k.eq=function(a){Fm(this.b,a)};k.hq=function(a){Fm(this.b,a)};k.fq=function(a){Fm(this.b,a)};k.gq=function(a){Fm(this.b,a)};k.bq=function(a){Fm(this.b,a)};k.Vm=function(a){Fm(this.b,a)};k.jm=function(a){Fm(this.b,a)};function Dm(a,b,c){Na.call(this,a);this.b=b;a=c?c:{};this.buttons=Gm(a);this.pressure=Hm(a,this.buttons);this.bubbles="bubbles"in a?a.bubbles:!1;this.cancelable="cancelable"in a?a.cancelable:!1;this.view="view"in a?a.view:null;this.detail="detail"in a?a.detail:null;this.screenX="screenX"in a?a.screenX:0;this.screenY="screenY"in a?a.screenY:0;this.clientX="clientX"in a?a.clientX:0;this.clientY="clientY"in a?a.clientY:0;this.ctrlKey="ctrlKey"in a?a.ctrlKey:!1;this.altKey="altKey"in a?a.altKey:!1;this.shiftKey=
Patrick's avatar
Patrick committed
443
"shiftKey"in a?a.shiftKey:!1;this.metaKey="metaKey"in a?a.metaKey:!1;this.button="button"in a?a.button:0;this.relatedTarget="relatedTarget"in a?a.relatedTarget:null;this.pointerId="pointerId"in a?a.pointerId:0;this.width="width"in a?a.width:0;this.height="height"in a?a.height:0;this.tiltX="tiltX"in a?a.tiltX:0;this.tiltY="tiltY"in a?a.tiltY:0;this.pointerType="pointerType"in a?a.pointerType:"";this.isPrimary="isPrimary"in a?a.isPrimary:!1;b.preventDefault&&(this.preventDefault=function(){b.preventDefault()})}
Patrick's avatar
Patrick committed
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
v(Dm,Na);function Gm(a){if(a.buttons||Im)a=a.buttons;else switch(a.which){case 1:a=1;break;case 2:a=4;break;case 3:a=2;break;default:a=0}return a}function Hm(a,b){var c=0;a.pressure?c=a.pressure:c=b?.5:0;return c}var Im=!1;try{Im=1===(new MouseEvent("click",{buttons:1})).buttons}catch(a){};function Jm(a,b){tm.call(this,a,{touchstart:this.Fr,touchmove:this.Er,touchend:this.Dr,touchcancel:this.Cr});this.a=a.g;this.j=b;this.g=void 0;this.f=0;this.c=void 0}v(Jm,tm);k=Jm.prototype;k.Pj=function(){this.f=0;this.c=void 0};
function Km(a,b,c){b=xm(b,c);b.pointerId=c.identifier+2;b.bubbles=!0;b.cancelable=!0;b.detail=a.f;b.button=0;b.buttons=1;b.width=c.webkitRadiusX||c.radiusX||0;b.height=c.webkitRadiusY||c.radiusY||0;b.pressure=c.webkitForce||c.force||.5;b.isPrimary=a.g===c.identifier;b.pointerType="touch";b.clientX=c.clientX;b.clientY=c.clientY;b.screenX=c.screenX;b.screenY=c.screenY;return b}
function Lm(a,b,c){function d(){b.preventDefault()}var e=Array.prototype.slice.call(b.changedTouches),f=e.length,g;for(g=0;g<f;++g){var h=Km(a,b,e[g]);h.preventDefault=d;c.call(a,b,h)}}
k.Fr=function(a){var b=a.touches,c=Object.keys(this.a),d=c.length;if(d>=b.length){var e=[],f;for(f=0;f<d;++f){var g=c[f];var h=this.a[g];var l;if(!(l=1==g))a:{for(var m=b.length,n=0;n<m;n++)if(l=b[n],l.identifier===g-2){l=!0;break a}l=!1}l||e.push(h.out)}for(f=0;f<e.length;++f)this.fg(a,e[f])}b=a.changedTouches[0];c=Object.keys(this.a).length;if(0===c||1===c&&(1).toString()in this.a)this.g=b.identifier,void 0!==this.c&&clearTimeout(this.c);Mm(this,a);this.f++;Lm(this,a,this.Yp)};
k.Yp=function(a,b){this.a[b.pointerId]={target:b.target,out:b,Bj:b.target};var c=this.b;b.bubbles=!0;ym(c,"pointerover",b,a);c=this.b;b.bubbles=!1;ym(c,"pointerenter",b,a);ym(this.b,"pointerdown",b,a)};k.Er=function(a){a.preventDefault();Lm(this,a,this.an)};
k.an=function(a,b){var c=this.a[b.pointerId];if(c){var d=c.out,e=c.Bj;ym(this.b,"pointermove",b,a);d&&e!==b.target&&(d.relatedTarget=b.target,b.relatedTarget=e,d.target=e,b.target?(Am(this.b,d,a),zm(this.b,b,a)):(b.target=e,b.relatedTarget=null,this.fg(a,b)));c.out=b;c.Bj=b.target}};k.Dr=function(a){Mm(this,a);Lm(this,a,this.Gr)};
k.Gr=function(a,b){ym(this.b,"pointerup",b,a);this.b.out(b,a);Nm(this.b,b,a);delete this.a[b.pointerId];b.isPrimary&&(this.g=void 0,this.c=setTimeout(this.Pj.bind(this),200))};k.Cr=function(a){Lm(this,a,this.fg)};k.fg=function(a,b){this.b.cancel(b,a);this.b.out(b,a);Nm(this.b,b,a);delete this.a[b.pointerId];b.isPrimary&&(this.g=void 0,this.c=setTimeout(this.Pj.bind(this),200))};
function Mm(a,b){var c=a.j.g;b=b.changedTouches[0];if(a.g===b.identifier){var d=[b.clientX,b.clientY];c.push(d);setTimeout(function(){var a=c.indexOf(d);-1<a&&c.splice(a,1)},2500)}};function Om(a){Qa.call(this);this.f=a;this.g={};this.i={};this.a=[];ne?Pm(this,new Em(this)):oe?Pm(this,new Bm(this)):(a=new um(this),Pm(this,a),me&&Pm(this,new Jm(this,a)));a=this.a.length;for(var b,c=0;c<a;c++)b=this.a[c],Qm(this,Object.keys(b.i))}v(Om,Qa);function Pm(a,b){var c=Object.keys(b.i);c&&(c.forEach(function(a){var c=b.i[a];c&&(this.i[a]=c.bind(b))},a),a.a.push(b))}Om.prototype.c=function(a){var b=this.i[a.type];b&&b(a)};
function Qm(a,b){b.forEach(function(a){y(this.f,a,this.c,this)},a)}function Rm(a,b){b.forEach(function(a){Ja(this.f,a,this.c,this)},a)}function xm(a,b){for(var c={},d,e=0,f=Sm.length;e<f;e++)d=Sm[e][0],c[d]=a[d]||b[d]||Sm[e][1];return c}function Nm(a,b,c){b.bubbles=!1;ym(a,"pointerleave",b,c)}Om.prototype.out=function(a,b){a.bubbles=!0;ym(this,"pointerout",a,b)};Om.prototype.cancel=function(a,b){ym(this,"pointercancel",a,b)};
function Am(a,b,c){a.out(b,c);var d=b.target,e=b.relatedTarget;d&&e&&d.contains(e)||Nm(a,b,c)}function zm(a,b,c){b.bubbles=!0;ym(a,"pointerover",b,c);var d=b.target,e=b.relatedTarget;d&&e&&d.contains(e)||(b.bubbles=!1,ym(a,"pointerenter",b,c))}function ym(a,b,c,d){a.b(new Dm(b,d,c))}function Fm(a,b){a.b(new Dm(b.type,b,b))}Om.prototype.xa=function(){for(var a=this.a.length,b,c=0;c<a;c++)b=this.a[c],Rm(this,Object.keys(b.i));Qa.prototype.xa.call(this)};
var Sm=[["bubbles",!1],["cancelable",!1],["view",null],["detail",null],["screenX",0],["screenY",0],["clientX",0],["clientY",0],["ctrlKey",!1],["altKey",!1],["shiftKey",!1],["metaKey",!1],["button",0],["relatedTarget",null],["buttons",0],["pointerId",0],["width",0],["height",0],["pressure",0],["tiltX",0],["tiltY",0],["pointerType",""],["hwTimestamp",0],["isPrimary",!1],["type",""],["target",null],["currentTarget",null],["which",0]];function Tm(a){Qa.call(this);this.R=a;this.f=0;this.j=!1;this.c=[];this.g=null;a=this.R.a;this.I=0;this.s={};this.i=new Om(a);this.a=null;this.l=y(this.i,"pointerdown",this.Dm,this);this.o=y(this.i,"pointermove",this.Wq,this)}v(Tm,Qa);function Um(a,b){var c=new sm("click",a.R,b);a.b(c);0!==a.f?(clearTimeout(a.f),a.f=0,c=new sm("dblclick",a.R,b),a.b(c)):a.f=setTimeout(function(){this.f=0;var a=new sm("singleclick",this.R,b);this.b(a)}.bind(a),250)}
function Vm(a,b){"pointerup"==b.type||"pointercancel"==b.type?delete a.s[b.pointerId]:"pointerdown"==b.type&&(a.s[b.pointerId]=!0);a.I=Object.keys(a.s).length}k=Tm.prototype;k.mi=function(a){Vm(this,a);var b=new sm("pointerup",this.R,a);this.b(b);!this.j&&0===a.button&&Um(this,this.g);0===this.I&&(this.c.forEach(Ca),this.c.length=0,this.j=!1,this.g=null,Ma(this.a),this.a=null)};
k.Dm=function(a){Vm(this,a);var b=new sm("pointerdown",this.R,a);this.b(b);this.g=a;0===this.c.length&&(this.a=new Om(document),this.c.push(y(this.a,"pointermove",this.Cn,this),y(this.a,"pointerup",this.mi,this),y(this.i,"pointercancel",this.mi,this)))};k.Cn=function(a){if(a.clientX!=this.g.clientX||a.clientY!=this.g.clientY){this.j=!0;var b=new sm("pointerdrag",this.R,a,this.j);this.b(b)}a.preventDefault()};
k.Wq=function(a){this.b(new sm(a.type,this.R,a,!(!this.g||a.clientX==this.g.clientX&&a.clientY==this.g.clientY)))};k.xa=function(){this.o&&(Ca(this.o),this.o=null);this.l&&(Ca(this.l),this.l=null);this.c.forEach(Ca);this.c.length=0;this.a&&(Ma(this.a),this.a=null);this.i&&(Ma(this.i),this.i=null);Qa.prototype.xa.call(this)};function Wm(a,b){this.o=a;this.c=b;this.b=[];this.g=[];this.a={}}Wm.prototype.clear=function(){this.b.length=0;this.g.length=0;xa(this.a)};function Xm(a){var b=a.b,c=a.g,d=b[0];1==b.length?(b.length=0,c.length=0):(b[0]=b.pop(),c[0]=c.pop(),Ym(a,0));b=a.c(d);delete a.a[b];return d}Wm.prototype.i=function(a){gb(!(this.c(a)in this.a),31);var b=this.o(a);return Infinity!=b?(this.b.push(a),this.g.push(b),this.a[this.c(a)]=!0,Zm(this,0,this.b.length-1),!0):!1};
function Ym(a,b){for(var c=a.b,d=a.g,e=c.length,f=c[b],g=d[b],h=b;b<e>>1;){var l=2*b+1,m=2*b+2;l=m<e&&d[m]<d[l]?m:l;c[b]=c[l];d[b]=d[l];b=l}c[b]=f;d[b]=g;Zm(a,h,b)}function Zm(a,b,c){var d=a.b;a=a.g;for(var e=d[c],f=a[c];c>b;){var g=c-1>>1;if(a[g]>f)d[c]=d[g],a[c]=a[g],c=g;else break}d[c]=e;a[c]=f}
function $m(a){var b=a.o,c=a.b,d=a.g,e=0,f=c.length,g;for(g=0;g<f;++g){var h=c[g];var l=b(h);Infinity==l?delete a.a[a.c(h)]:(d[e]=l,c[e++]=h)}c.length=e;d.length=e;for(b=(a.b.length>>1)-1;0<=b;b--)Ym(a,b)};function an(a,b){Wm.call(this,function(b){return a.apply(null,b)},function(a){return a[0].ob()});this.s=b;this.j=0;this.f={}}v(an,Wm);an.prototype.i=function(a){var b=Wm.prototype.i.call(this,a);b&&y(a[0],"change",this.l,this);return b};an.prototype.l=function(a){a=a.target;var b=a.getState();if(2===b||3===b||4===b||5===b)Ja(a,"change",this.l,this),a=a.ob(),a in this.f&&(delete this.f[a],--this.j),this.s()};
function bn(a,b,c){for(var d=0,e,f;a.j<b&&d<c&&0<a.b.length;)e=Xm(a)[0],f=e.ob(),0!==e.getState()||f in a.f||(a.f[f]=!0,++a.j,++d,e.load())};function cn(a){return function(b,c,d){if(void 0!==b)return b=hd(a,b,d),b=Mb(b+c,0,a.length-1),c=Math.floor(b),b!=c&&c<a.length-1?a[c]/Math.pow(a[c]/a[c+1],b-c):a[c]}}function dn(a,b,c){return function(d,e,f){if(void 0!==d)return d=Math.max(Math.floor(Math.log(b/d)/Math.log(a)+(-f/2+.5))+e,0),void 0!==c&&(d=Math.min(d,c)),b/Math.pow(a,d)}};function en(a){if(void 0!==a)return 0}function fn(a,b){if(void 0!==a)return a+b}function gn(a){var b=2*Math.PI/a;return function(a,d){if(void 0!==a)return a=Math.floor((a+d)/b+.5)*b}}function hn(){var a=Rb(5);return function(b,c){if(void 0!==b)return Math.abs(b+c)<=a?0:b+c}};function P(a){Wa.call(this);a=wa({},a);this.l=[0,0];this.i=[];this.Tf=this.Tf.bind(this);this.c=Rc(a.projection);jn(this,a)}v(P,Wa);
function jn(a,b){var c={};c.center=void 0!==b.center?b.center:null;var d=void 0!==b.minZoom?b.minZoom:0;var e=void 0!==b.maxZoom?b.maxZoom:28;var f=void 0!==b.zoomFactor?b.zoomFactor:2;if(void 0!==b.resolutions){e=b.resolutions;var g=e[0];var h=e[e.length-1];e=cn(e)}else{g=Rc(b.projection);h=g.D();var l=(h?Math.max(Eb(h),Fb(h)):360*pc.degrees/g.dc())/256/Math.pow(2,0),m=l/Math.pow(2,28);g=b.maxResolution;void 0!==g?d=0:g=l/Math.pow(f,d);h=b.minResolution;void 0===h&&(h=void 0!==b.maxZoom?void 0!==
b.maxResolution?g/Math.pow(f,e):l/Math.pow(f,e):m);e=d+Math.floor(Math.log(g/h)/Math.log(f));h=g/Math.pow(f,e-d);e=dn(f,g,e-d)}a.a=g;a.f=h;a.B=f;a.j=b.resolutions;a.o=d;(void 0!==b.enableRotation?b.enableRotation:1)?(d=b.constrainRotation,d=void 0===d||!0===d?hn():!1===d?fn:"number"===typeof d?gn(d):fn):d=en;a.v=new Ul(void 0!==b.extent?Sl(b.extent):Tl,e,d);void 0!==b.resolution?c.resolution=b.resolution:void 0!==b.zoom&&(c.resolution=a.constrainResolution(a.a,b.zoom-a.o));c.rotation=void 0!==b.rotation?
b.rotation:0;a.J(c);a.C=b}function kn(a,b){var c=wa({},a.C);void 0!==c.resolution?c.resolution=a.Ia():c.zoom=a.ki();c.center=a.va();c.rotation=a.Qa();return wa({},c,b)}k=P.prototype;
k.animate=function(a){var b=Date.now(),c=this.va().slice(),d=this.Ia(),e=this.Qa(),f=arguments.length;if(1<f&&"function"===typeof arguments[f-1]){var g=arguments[f-1];--f}for(var h=[],l=0;l<f;++l){var m=arguments[l],n={start:b,complete:!1,anchor:m.anchor,duration:void 0!==m.duration?m.duration:1E3,easing:m.easing||am};m.center&&(n.uh=c,n.yh=m.center,c=n.yh);void 0!==m.zoom?(n.Pf=d,n.Td=this.constrainResolution(this.a,m.zoom-this.o,0),d=n.Td):m.resolution&&(n.Pf=d,n.Td=m.resolution,d=n.Td);void 0!==
m.rotation&&(n.vh=e,n.Rf=m.rotation,e=n.Rf);n.callback=g;b+=n.duration;h.push(n)}this.i.push(h);ln(this,0,1);this.Tf()};k.$c=function(){return 0<mn(this)[0]};k.Ad=function(){ln(this,0,-mn(this)[0]);for(var a=0,b=this.i.length;a<b;++a){var c=this.i[a];c[0].callback&&c[0].callback(!1)}this.i.length=0};
k.Tf=function(){void 0!==this.s&&(cancelAnimationFrame(this.s),this.s=void 0);if(this.$c()){for(var a=Date.now(),b=!1,c=this.i.length-1;0<=c;--c){for(var d=this.i[c],e=!0,f=0,g=d.length;f<g;++f){var h=d[f];if(!h.complete){b=a-h.start;b=0<h.duration?b/h.duration:1;1<=b?(h.complete=!0,b=1):e=!1;b=h.easing(b);if(h.uh){var l=h.uh[0],m=h.uh[1];this.set("center",[l+b*(h.yh[0]-l),m+b*(h.yh[1]-m)])}h.Pf&&h.Td&&(l=1===b?h.Td:h.Pf+b*(h.Td-h.Pf),h.anchor&&this.set("center",nn(this,l,h.anchor)),this.set("resolution",
l));void 0!==h.vh&&void 0!==h.Rf&&(b=1===b?h.Rf:h.vh+b*(h.Rf-h.vh),h.anchor&&this.set("center",on(this,b,h.anchor)),this.set("rotation",b));b=!0;if(!h.complete)break}}e&&(this.i[c]=null,ln(this,0,-1),(d=d[0].callback)&&d(!0))}this.i=this.i.filter(Boolean);b&&void 0===this.s&&(this.s=requestAnimationFrame(this.Tf))}};function on(a,b,c){var d=a.va();if(void 0!==d){var e=[d[0]-c[0],d[1]-c[1]];zd(e,b-a.Qa());ud(e,c)}return e}
function nn(a,b,c){var d,e=a.va();a=a.Ia();void 0!==e&&void 0!==a&&(d=[c[0]-b*(c[0]-e[0])/a,c[1]-b*(c[1]-e[1])/a]);return d}function pn(a){var b=[100,100];a='.ol-viewport[data-view="'+x(a)+'"]';if(a=document.querySelector(a))a=getComputedStyle(a),b[0]=parseInt(a.width,10),b[1]=parseInt(a.height,10);return b}k.Xc=function(a){return this.v.center(a)};k.constrainResolution=function(a,b,c){return this.v.resolution(a,b||0,c||0)};k.constrainRotation=function(a,b){return this.v.rotation(a,b||0)};k.va=function(){return this.get("center")};
function mn(a,b){return void 0!==b?(b[0]=a.l[0],b[1]=a.l[1],b):a.l.slice()}k.zd=function(a){a=a||pn(this);var b=this.va();gb(b,1);var c=this.Ia();gb(void 0!==c,2);var d=this.Qa();gb(void 0!==d,3);return Hb(b,c,d,a)};k.Hn=function(){return this.a};k.Jn=function(){return this.f};k.In=function(){return this.af(this.f)};k.qr=function(a){jn(this,kn(this,{maxZoom:a}))};k.Kn=function(){return this.af(this.a)};k.rr=function(a){jn(this,kn(this,{minZoom:a}))};k.Ln=function(){return this.c};k.Ia=function(){return this.get("resolution")};
k.Mn=function(){return this.j};function qn(a,b){return Math.max(Eb(a)/b[0],Fb(a)/b[1])}function rn(a){var b=a.a,c=Math.log(b/a.f)/Math.log(2);return function(a){return b/Math.pow(2,a*c)}}k.Qa=function(){return this.get("rotation")};function sn(a){var b=a.a,c=Math.log(b/a.f)/Math.log(2);return function(a){return Math.log(b/a)/Math.log(2)/c}}k.getState=function(){var a=this.va(),b=this.c,c=this.Ia(),d=this.Qa();return{center:a.slice(),projection:void 0!==b?b:null,resolution:c,rotation:d}};
k.ki=function(){var a,b=this.Ia();void 0!==b&&(a=this.af(b));return a};k.af=function(a){if(a>=this.f&&a<=this.a){var b=this.o||0;if(this.j){var c=hd(this.j,a,1);b+=c;if(c==this.j.length-1)return b;var d=this.j[c];c=d/this.j[c+1]}else d=this.a,c=this.B;b+=Math.log(d/a)/Math.log(c)}return b};
k.ng=function(a,b){b=b||{};var c=b.size;c||(c=pn(this));if(a instanceof Wd)if("Circle"===a.U()){a=a.D();var d=gl(a);d.rotate(this.Qa(),Gb(a))}else d=a;else gb(Array.isArray(a),24),gb(!Db(a),25),d=gl(a);var e=void 0!==b.padding?b.padding:[0,0,0,0],f=void 0!==b.constrainResolution?b.constrainResolution:!0,g=void 0!==b.nearest?b.nearest:!1,h;void 0!==b.minResolution?h=b.minResolution:void 0!==b.maxZoom?h=this.constrainResolution(this.a,b.maxZoom-this.o,0):h=0;var l=d.ja(),m=this.Qa();a=Math.cos(-m);
m=Math.sin(-m);var n=Infinity,p=Infinity,q=-Infinity,t=-Infinity;d=d.ya();for(var u=0,w=l.length;u<w;u+=d){var z=l[u]*a-l[u+1]*m,D=l[u]*m+l[u+1]*a;n=Math.min(n,z);p=Math.min(p,D);q=Math.max(q,z);t=Math.max(t,D)}c=qn([n,p,q,t],[c[0]-e[1]-e[3],c[1]-e[0]-e[2]]);c=isNaN(c)?h:Math.max(c,h);f&&(h=this.constrainResolution(c,0,0),!g&&h<c&&(h=this.constrainResolution(h,-1,0)),c=h);m=-m;h=(n+q)/2+(e[1]-e[3])/2*c;e=(p+t)/2+(e[0]-e[2])/2*c;a=[h*a-e*m,e*a+h*m];void 0!==b.duration?this.animate({resolution:c,center:a,
duration:b.duration,easing:b.easing}):(this.Uc(c),this.cb(a))};k.cl=function(a,b,c){var d=this.Qa(),e=Math.cos(-d);d=Math.sin(-d);var f=a[0]*e-a[1]*d;a=a[1]*e+a[0]*d;var g=this.Ia();f+=(b[0]/2-c[0])*g;a+=(c[1]-b[1]/2)*g;d=-d;this.cb([f*e-a*d,a*e+f*d])};function Rl(a){return!!a.va()&&void 0!==a.Ia()}k.rotate=function(a,b){void 0!==b&&(b=on(this,a,b),this.cb(b));this.gd(a)};k.cb=function(a){this.set("center",a);this.$c()&&this.Ad()};function ln(a,b,c){a.l[b]+=c;a.u()}
k.Uc=function(a){this.set("resolution",a);this.$c()&&this.Ad()};k.gd=function(a){this.set("rotation",a);this.$c()&&this.Ad()};k.Ar=function(a){a=this.constrainResolution(this.a,a-this.o,0);this.Uc(a)};function tn(a,b,c){this.i=a;this.c=b;this.f=c;this.b=[];this.a=this.g=0}function un(a){a.b.length=0;a.g=0;a.a=0};function vn(a){Wa.call(this);this.R=null;this.Na(!0);this.handleEvent=a.handleEvent}v(vn,Wa);vn.prototype.c=function(){return this.get("active")};vn.prototype.i=function(){return this.R};vn.prototype.Na=function(a){this.set("active",a)};vn.prototype.setMap=function(a){this.R=a};function wn(a,b,c,d){if(void 0!==b){var e=a.Qa(),f=a.va();void 0!==e&&f&&0<d?a.animate({rotation:b,anchor:c,duration:d,easing:$l}):a.rotate(b,c)}}
function xn(a,b,c,d){var e=a.Ia();b=a.constrainResolution(e,b,0);if(c&&void 0!==b&&b!==e){var f=a.va();c=nn(a,b,c);c=a.Xc(c);c=[(b*f[0]-e*c[0])/(b-e),(b*f[1]-e*c[1])/(b-e)]}yn(a,b,c,d)}function yn(a,b,c,d){if(b){var e=a.Ia(),f=a.va();void 0!==e&&f&&b!==e&&d?a.animate({resolution:b,anchor:c,duration:d,easing:$l}):(c&&(c=nn(a,b,c),a.cb(c)),a.Uc(b))}};function zn(a){a=a?a:{};this.a=a.delta?a.delta:1;vn.call(this,{handleEvent:An});this.f=void 0!==a.duration?a.duration:250}v(zn,vn);function An(a){var b=!1,c=a.originalEvent;if("dblclick"==a.type){b=a.coordinate;c=c.shiftKey?-this.a:this.a;var d=a.map.Z();xn(d,c,b,this.f);a.preventDefault();b=!0}return!b};function Bn(a){a=a.originalEvent;return a.altKey&&!(a.metaKey||a.ctrlKey)&&a.shiftKey}function Cn(a){a=a.originalEvent;return 0==a.button&&!(fe&&ge&&a.ctrlKey)}function Dn(a){return"pointermove"==a.type}function En(a){return"singleclick"==a.type}function Fn(a){a=a.originalEvent;return!a.altKey&&!(a.metaKey||a.ctrlKey)&&!a.shiftKey}function Gn(a){a=a.originalEvent;return!a.altKey&&!(a.metaKey||a.ctrlKey)&&a.shiftKey}
function Hn(a){a=a.originalEvent.target.tagName;return"INPUT"!==a&&"SELECT"!==a&&"TEXTAREA"!==a}function In(a){gb(a.b,56);return"mouse"==a.b.pointerType}function Jn(a){a=a.b;return a.isPrimary&&0===a.button};function Kn(a){a=a?a:{};vn.call(this,{handleEvent:a.handleEvent?a.handleEvent:Ln});this.Zf=a.handleDownEvent?a.handleDownEvent:Gd;this.Uf=a.handleDragEvent?a.handleDragEvent:ua;this.dg=a.handleMoveEvent?a.handleMoveEvent:ua;this.eg=a.handleUpEvent?a.handleUpEvent:Gd;this.v=!1;this.X={};this.l=[]}v(Kn,vn);function Mn(a){for(var b=a.length,c=0,d=0,e=0;e<b;e++)c+=a[e].clientX,d+=a[e].clientY;return[c/b,d/b]}
function Ln(a){if(!(a instanceof sm))return!0;var b=!1,c=a.type;if("pointerdown"===c||"pointerdrag"===c||"pointerup"===c){c=a.b;var d=c.pointerId.toString();"pointerup"==a.type?delete this.X[d]:"pointerdown"==a.type?this.X[d]=c:d in this.X&&(this.X[d]=c);this.l=za(this.X)}this.v?"pointerdrag"==a.type?this.Uf(a):"pointerup"==a.type&&(this.v=this.eg(a)&&0<this.l.length):"pointerdown"==a.type?(this.v=a=this.Zf(a),b=this.sd(a)):"pointermove"==a.type&&this.dg(a);return!b}Kn.prototype.sd=function(a){return a};function Nn(a){Kn.call(this,{handleDownEvent:On,handleDragEvent:Pn,handleUpEvent:Qn});a=a?a:{};this.a=a.kinetic;this.f=null;this.s=a.condition?a.condition:Fn;this.j=!1}v(Nn,Kn);function Pn(a){var b=this.l,c=Mn(b);if(b.length==this.o){if(this.a&&this.a.b.push(c[0],c[1],Date.now()),this.f){var d=this.f[0]-c[0],e=c[1]-this.f[1];a=a.map.Z();var f=a.getState();d=[d,e];Ad(d,f.resolution);zd(d,f.rotation);ud(d,f.center);d=a.Xc(d);a.cb(d)}}else this.a&&un(this.a);this.f=c;this.o=b.length}
function Qn(a){var b=a.map;a=b.Z();if(0===this.l.length){var c;if(c=!this.j&&this.a)if(c=this.a,6>c.b.length)c=!1;else{var d=Date.now()-c.f,e=c.b.length-3;if(c.b[e+2]<d)c=!1;else{for(var f=e-3;0<f&&c.b[f+2]>d;)f-=3;d=c.b[e+2]-c.b[f+2];var g=c.b[e]-c.b[f];e=c.b[e+1]-c.b[f+1];c.g=Math.atan2(e,g);c.a=Math.sqrt(g*g+e*e)/d;c=c.a>c.c}}c&&(c=this.a,c=(c.c-c.a)/c.i,e=this.a.g,f=a.va(),f=b.Pa(f),b=b.ab([f[0]-c*Math.cos(e),f[1]-c*Math.sin(e)]),a.animate({center:a.Xc(b),duration:500,easing:$l}));ln(a,1,-1);
return!1}this.a&&un(this.a);this.f=null;return!0}function On(a){if(0<this.l.length&&this.s(a)){var b=a.map.Z();this.f=null;this.v||ln(b,1,1);mn(b)[0]&&b.cb(a.frameState.viewState.center);this.a&&un(this.a);this.j=1<this.l.length;return!0}return!1}Nn.prototype.sd=Gd;function Rn(a){a=a?a:{};Kn.call(this,{handleDownEvent:Sn,handleDragEvent:Tn,handleUpEvent:Un});this.f=a.condition?a.condition:Bn;this.a=void 0;this.j=void 0!==a.duration?a.duration:250}v(Rn,Kn);function Tn(a){if(In(a)){var b=a.map,c=b.Rb();a=a.pixel;c=Math.atan2(c[1]/2-a[1],a[0]-c[0]/2);if(void 0!==this.a){a=c-this.a;b=b.Z();var d=b.Qa();wn(b,d-a)}this.a=c}}function Un(a){if(!In(a))return!0;a=a.map.Z();ln(a,1,-1);var b=a.Qa(),c=this.j;b=a.constrainRotation(b,0);wn(a,b,void 0,c);return!1}
function Sn(a){return In(a)&&Cn(a)&&this.f(a)?(ln(a.map.Z(),1,1),this.a=void 0,!0):!1}Rn.prototype.sd=Gd;function Vn(a){this.Zc=null;this.b=document.createElement("div");this.b.style.position="absolute";this.b.className="ol-box "+a;this.a=this.g=this.R=null}v(Vn,La);Vn.prototype.xa=function(){this.setMap(null)};function Wn(a){var b=a.g,c=a.a;a=a.b.style;a.left=Math.min(b[0],c[0])+"px";a.top=Math.min(b[1],c[1])+"px";a.width=Math.abs(c[0]-b[0])+"px";a.height=Math.abs(c[1]-b[1])+"px"}
Vn.prototype.setMap=function(a){if(this.R){this.R.C.removeChild(this.b);var b=this.b.style;b.left=b.top=b.width=b.height="inherit"}(this.R=a)&&this.R.C.appendChild(this.b)};function Xn(a){var b=a.g,c=a.a;b=[b,[b[0],c[1]],c,[c[0],b[1]]].map(a.R.ab,a.R);b[4]=b[0].slice();a.Zc?a.Zc.ua([b]):a.Zc=new M([b])}Vn.prototype.V=function(){return this.Zc};function Yn(a){Kn.call(this,{handleDownEvent:Zn,handleDragEvent:$n,handleUpEvent:ao});a=a?a:{};this.a=new Vn(a.className||"ol-dragbox");this.s=void 0!==a.minArea?a.minArea:64;this.f=null;this.C=a.condition?a.condition:Fd;this.o=a.boxEndCondition?a.boxEndCondition:bo}v(Yn,Kn);function bo(a,b,c){a=c[0]-b[0];b=c[1]-b[1];return a*a+b*b>=this.s}function $n(a){if(In(a)){var b=this.a,c=a.pixel;b.g=this.f;b.a=c;Xn(b);Wn(b);this.b(new co(eo,a.coordinate,a))}}Yn.prototype.V=function(){return this.a.V()};
Yn.prototype.j=ua;function ao(a){if(!In(a))return!0;this.a.setMap(null);this.o(a,this.f,a.pixel)&&(this.j(a),this.b(new co(fo,a.coordinate,a)));return!1}function Zn(a){if(In(a)&&Cn(a)&&this.C(a)){this.f=a.pixel;this.a.setMap(a.map);var b=this.a,c=this.f;b.g=this.f;b.a=c;Xn(b);Wn(b);this.b(new co(go,a.coordinate,a));return!0}return!1}var go="boxstart",eo="boxdrag",fo="boxend";function co(a,b,c){Na.call(this,a);this.coordinate=b;this.mapBrowserEvent=c}v(co,Na);function ho(a){a=a?a:{};var b=a.condition?a.condition:Gn;this.B=void 0!==a.duration?a.duration:200;this.G=void 0!==a.out?a.out:!1;Yn.call(this,{condition:b,className:a.className||"ol-dragzoom"})}v(ho,Yn);
ho.prototype.j=function(){var a=this.R,b=a.Z(),c=a.Rb(),d=this.V().D();if(this.G){var e=b.zd(c);d=[a.Pa(yb(d)),a.Pa(Ab(d))];a=rb(Infinity,Infinity,-Infinity,-Infinity,void 0);var f;var g=0;for(f=d.length;g<f;++g)jb(a,d[g]);Kb(e,1/qn(a,c));d=e}c=b.constrainResolution(qn(d,c));e=Gb(d);e=b.Xc(e);b.animate({resolution:c,center:e,duration:this.B,easing:$l})};function io(a){vn.call(this,{handleEvent:jo});a=a||{};this.a=function(a){return Fn(a)&&Hn(a)};this.f=void 0!==a.condition?a.condition:this.a;this.j=void 0!==a.duration?a.duration:100;this.l=void 0!==a.pixelDelta?a.pixelDelta:128}v(io,vn);
function jo(a){var b=!1;if("keydown"==a.type){var c=a.originalEvent.keyCode;if(this.f(a)&&(40==c||37==c||39==c||38==c)){b=a.map.Z();var d=b.Ia()*this.l,e=0,f=0;40==c?f=-d:37==c?e=-d:39==c?e=d:f=d;d=[e,f];zd(d,b.Qa());c=this.j;if(e=b.va())d=b.Xc([e[0]+d[0],e[1]+d[1]]),c?b.animate({duration:c,easing:Pi,center:d}):b.cb(d);a.preventDefault();b=!0}}return!b};function ko(a){vn.call(this,{handleEvent:lo});a=a?a:{};this.f=a.condition?a.condition:Hn;this.a=a.delta?a.delta:1;this.j=void 0!==a.duration?a.duration:100}v(ko,vn);function lo(a){var b=!1;if("keydown"==a.type||"keypress"==a.type){var c=a.originalEvent.charCode;!this.f(a)||43!=c&&45!=c||(b=43==c?this.a:-this.a,c=a.map.Z(),xn(c,b,void 0,this.j),a.preventDefault(),b=!0)}return!b};function mo(a){vn.call(this,{handleEvent:no});a=a||{};this.j=0;this.v=void 0!==a.duration?a.duration:250;this.X=void 0!==a.timeout?a.timeout:80;this.C=void 0!==a.useAnchor?a.useAnchor:!0;this.N=a.constrainResolution||!1;this.a=null;this.o=this.l=this.s=this.f=void 0}v(mo,vn);
function no(a){var b=a.type;if("wheel"!==b&&"mousewheel"!==b)return!0;a.preventDefault();b=a.map;var c=a.originalEvent;this.C&&(this.a=a.coordinate);if("wheel"==a.type){var d=c.deltaY;de&&c.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(d/=he);c.deltaMode===WheelEvent.DOM_DELTA_LINE&&(d*=40)}else"mousewheel"==a.type&&(d=-c.wheelDeltaY,ee&&(d/=3));if(0===d)return!1;a=Date.now();void 0===this.f&&(this.f=a);if(!this.l||400<a-this.f)this.l=4>Math.abs(d)?oo:po;if(this.l===oo){b=b.Z();this.o?clearTimeout(this.o):
ln(b,1,1);this.o=setTimeout(this.B.bind(this),400);c=b.Ia()*Math.pow(2,d/300);var e=b.f,f=b.a,g=0;c<e?(c=Math.max(c,e/1.5),g=1):c>f&&(c=Math.min(c,1.5*f),g=-1);if(this.a){var h=nn(b,c,this.a);b.cb(b.Xc(h))}b.Uc(c);0===g&&this.N&&b.animate({resolution:b.constrainResolution(c,0<d?-1:1),easing:$l,anchor:this.a,duration:this.v});0<g?b.animate({resolution:e,easing:$l,anchor:this.a,duration:500}):0>g&&b.animate({resolution:f,easing:$l,anchor:this.a,duration:500});this.f=a;return!1}this.j+=d;d=Math.max(this.X-
(a-this.f),0);clearTimeout(this.s);this.s=setTimeout(this.G.bind(this,b),d);return!1}mo.prototype.B=function(){this.o=void 0;ln(this.R.Z(),1,-1)};mo.prototype.G=function(a){a=a.Z();a.$c()&&a.Ad();xn(a,-Mb(this.j,-1,1),this.a,this.v);this.l=void 0;this.j=0;this.a=null;this.s=this.f=void 0};mo.prototype.aa=function(a){this.C=a;a||(this.a=null)};var oo="trackpad",po="wheel";function qo(a){Kn.call(this,{handleDownEvent:ro,handleDragEvent:so,handleUpEvent:to});a=a||{};this.f=null;this.j=void 0;this.a=!1;this.o=0;this.C=void 0!==a.threshold?a.threshold:.3;this.s=void 0!==a.duration?a.duration:250}v(qo,Kn);
function so(a){var b=0,c=this.l[0],d=this.l[1];c=Math.atan2(d.clientY-c.clientY,d.clientX-c.clientX);void 0!==this.j&&(b=c-this.j,this.o+=b,!this.a&&Math.abs(this.o)>this.C&&(this.a=!0));this.j=c;a=a.map;c=a.a.getBoundingClientRect();d=Mn(this.l);d[0]-=c.left;d[1]-=c.top;this.f=a.ab(d);this.a&&(c=a.Z(),d=c.Qa(),a.render(),wn(c,d+b,this.f))}function to(a){if(2>this.l.length){a=a.map.Z();ln(a,1,-1);if(this.a){var b=a.Qa(),c=this.f,d=this.s;b=a.constrainRotation(b,0);wn(a,b,c,d)}return!1}return!0}
function ro(a){return 2<=this.l.length?(a=a.map,this.f=null,this.j=void 0,this.a=!1,this.o=0,this.v||ln(a.Z(),1,1),!0):!1}qo.prototype.sd=Gd;function uo(a){Kn.call(this,{handleDownEvent:vo,handleDragEvent:wo,handleUpEvent:xo});a=a?a:{};this.o=a.constrainResolution||!1;this.f=null;this.s=void 0!==a.duration?a.duration:400;this.a=void 0;this.j=1}v(uo,Kn);
function wo(a){var b=1,c=this.l[0],d=this.l[1],e=c.clientX-d.clientX;c=c.clientY-d.clientY;e=Math.sqrt(e*e+c*c);void 0!==this.a&&(b=this.a/e);this.a=e;a=a.map;e=a.Z();d=e.Ia();var f=e.a,g=e.f;c=d*b;c>f?(b=f/d,c=f):c<g&&(b=g/d,c=g);1!=b&&(this.j=b);b=a.a.getBoundingClientRect();d=Mn(this.l);d[0]-=b.left;d[1]-=b.top;this.f=a.ab(d);a.render();yn(e,c,this.f)}
function xo(a){if(2>this.l.length){a=a.map.Z();ln(a,1,-1);var b=a.Ia();if(this.o||b<a.f||b>a.a){var c=this.f,d=this.s;b=a.constrainResolution(b,0,this.j-1);yn(a,b,c,d)}return!1}return!0}function vo(a){return 2<=this.l.length?(a=a.map,this.f=null,this.a=void 0,this.j=1,this.v||ln(a.Z(),1,1),!0):!1}uo.prototype.sd=Gd;function yo(a){a=a?a:{};var b=new bb,c=new tn(-.005,.05,100);(void 0!==a.altShiftDragRotate?a.altShiftDragRotate:1)&&b.push(new Rn);(void 0!==a.doubleClickZoom?a.doubleClickZoom:1)&&b.push(new zn({delta:a.zoomDelta,duration:a.zoomDuration}));(void 0!==a.dragPan?a.dragPan:1)&&b.push(new Nn({kinetic:c}));(void 0!==a.pinchRotate?a.pinchRotate:1)&&b.push(new qo);(void 0!==a.pinchZoom?a.pinchZoom:1)&&b.push(new uo({constrainResolution:a.constrainResolution,duration:a.zoomDuration}));if(void 0!==a.keyboard?
a.keyboard:1)b.push(new io),b.push(new ko({delta:a.zoomDelta,duration:a.zoomDuration}));(void 0!==a.mouseWheelZoom?a.mouseWheelZoom:1)&&b.push(new mo({constrainResolution:a.constrainResolution,duration:a.zoomDuration}));(void 0!==a.shiftDragZoom?a.shiftDragZoom:1)&&b.push(new ho({duration:a.zoomDuration}));return b};function zo(){this.b={};this.a=0}zo.prototype.clear=function(){this.b={};this.a=0};zo.prototype.get=function(a,b,c){a=b+":"+a+":"+(c?Qd(c):"null");return a in this.b?this.b[a]:null};zo.prototype.set=function(a,b,c,d){this.b[b+":"+a+":"+(c?Qd(c):"null")]=d;++this.a};var Ao=new zo;function Bo(a,b){this.R=b;this.c={};this.o={}}v(Bo,La);function Co(a){var b=a.viewState,c=a.coordinateToPixelTransform,d=a.pixelToCoordinateTransform;Ee(c,a.size[0]/2,a.size[1]/2,1/b.resolution,-1/b.resolution,-b.rotation,-b.center[0],-b.center[1]);Fe(ze(d,c))}k=Bo.prototype;k.xa=function(){for(var a in this.c)Ma(this.c[a])};function Do(){if(32<Ao.a){var a=0,b;for(b in Ao.b){var c=Ao.b[b];0!==(a++&3)||Ra(c)||(delete Ao.b[b],--Ao.a)}}}
k.Ga=function(a,b,c,d,e,f,g){function h(a,c){var f=x(a).toString(),g=b.layerStates[x(c)].hf;if(!(f in b.skippedFeatureUids)||g)return d.call(e,a,g?c:null)}var l,m=b.viewState,n=m.resolution,p=m.projection;m=a;if(p.a){p=p.D();var q=Eb(p),t=a[0];if(t<p[0]||t>p[2])m=[t+q*Math.ceil((p[0]-t)/q),a[1]]}p=b.layerStatesArray;for(q=p.length-1;0<=q;--q){var u=p[q];t=u.layer;if(ad(u,n)&&f.call(g,t)&&(u=Eo(this,t),t.ba()&&(l=u.Ga(t.ba().aa?m:a,b,c,h,e)),l))return l}};
k.gj=function(a,b,c,d,e){return void 0!==this.Ga(a,b,c,Fd,this,d,e)};function Eo(a,b){var c=x(b).toString();if(c in a.c)return a.c[c];b=b.Zd(a);a.c[c]=b;a.o[c]=y(b,"change",a.um,a);return b}k.um=function(){this.R.render()};k.mh=ua;k.br=function(a,b){for(var c in this.c)if(!(b&&c in b.layerStates)){a=c;var d=this.c[a];delete this.c[a];Ca(this.o[a]);delete this.o[a];Ma(d)}};function Fo(a,b){for(var c in a.c)if(!(c in b.layerStates)){b.postRenderFunctions.push(a.br.bind(a));break}}
function Go(a,b){return a.zIndex-b.zIndex};function Ho(a,b){Bo.call(this,a,b);this.g=pd();this.b=this.g.canvas;this.b.style.width="100%";this.b.style.height="100%";this.b.style.display="block";this.b.className="ol-unselectable";a.insertBefore(this.b,a.childNodes[0]||null);this.a=!0;this.i=ve()}v(Ho,Bo);
function Io(a,b,c){var d=a.R,e=a.g;if(Ra(d,b)){var f=c.extent,g=c.pixelRatio,h=c.viewState.rotation,l=c.viewState,m=c.pixelRatio/l.resolution;a=Ee(a.i,a.b.width/2,a.b.height/2,m,-m,-l.rotation,-l.center[0],-l.center[1]);d.b(new Hd(b,new Ge(e,g,f,a,h),c,e,null))}}Ho.prototype.U=function(){return"canvas"};
Ho.prototype.mh=function(a){if(a){var b=this.g,c=a.pixelRatio,d=Math.round(a.size[0]*c),e=Math.round(a.size[1]*c);this.b.width!=d||this.b.height!=e?(this.b.width=d,this.b.height=e):b.clearRect(0,0,d,e);c=a.viewState.rotation;Co(a);Io(this,"precompose",a);var f=a.layerStatesArray;md(f,Go);c&&(b.save(),Ld(b,c,d/2,e/2));d=a.viewState.resolution;var g;e=0;for(g=f.length;e<g;++e){var h=f[e];var l=h.layer;l=Eo(this,l);ad(h,d)&&"ready"==h.fk&&l.Kd(a,h)&&l.v(a,h,b)}c&&b.restore();Io(this,"postcompose",a);
this.a||(this.b.style.display="",this.a=!0);Fo(this,a);a.postRenderFunctions.push(Do)}else this.a&&(this.b.style.display="none",this.a=!1)};Ho.prototype.fj=function(a,b,c,d,e,f){var g=b.viewState.resolution,h=b.layerStatesArray,l=h.length;a=Ae(b.pixelToCoordinateTransform,a.slice());for(--l;0<=l;--l){var m=h[l];var n=m.layer;if(ad(m,g)&&e.call(f,n)&&(m=Eo(this,n).I(a,b,c,d)))return m}};function Jo(a,b){Bo.call(this,a,b);this.b=document.createElement("CANVAS");this.b.style.width="100%";this.b.style.height="100%";this.b.style.display="block";this.b.className="ol-unselectable";a.insertBefore(this.b,a.childNodes[0]||null);this.I=this.v=0;this.C=pd();this.l=!0;this.g=ae(this.b,{antialias:!0,depth:!0,failIfMajorPerformanceCaveat:!0,preserveDrawingBuffer:!1,stencil:!0});this.i=new Wf(this.b,this.g);y(this.b,"webglcontextlost",this.No,this);y(this.b,"webglcontextrestored",this.Oo,this);
this.a=new ai;this.s=null;this.j=new Wm(function(a){var b=a[1];a=a[2];var c=b[0]-this.s[0];b=b[1]-this.s[1];return 65536*Math.log(a)+Math.sqrt(c*c+b*b)/a}.bind(this),function(a){return a[0].ob()});this.B=function(){if(0!==this.j.b.length){$m(this.j);var a=Xm(this.j);Wh(this,a[0],a[3],a[4])}return!1}.bind(this);this.f=0;Ko(this)}v(Jo,Bo);
function Wh(a,b,c,d){var e=a.g,f=b.ob();if(a.a.b.hasOwnProperty(f))a=a.a.get(f),e.bindTexture(3553,a.texture),9729!=a.ti&&(e.texParameteri(3553,10240,9729),a.ti=9729),9729!=a.vi&&(e.texParameteri(3553,10241,9729),a.vi=9729);else{var g=e.createTexture();e.bindTexture(3553,g);if(0<d){var h=a.C.canvas,l=a.C;a.v!==c[0]||a.I!==c[1]?(h.width=c[0],h.height=c[1],a.v=c[0],a.I=c[1]):l.clearRect(0,0,c[0],c[1]);l.drawImage(b.W(),d,d,c[0],c[1],0,0,c[0],c[1]);e.texImage2D(3553,0,6408,6408,5121,h)}else e.texImage2D(3553,
0,6408,6408,5121,b.W());e.texParameteri(3553,10240,9729);e.texParameteri(3553,10241,9729);e.texParameteri(3553,10242,33071);e.texParameteri(3553,10243,33071);a.a.set(f,{texture:g,ti:9729,vi:9729})}}function Lo(a,b,c){var d=a.R;if(Ra(d,b)){a=a.i;var e=c.viewState;d.b(new Hd(b,new Fh(a,e.center,e.resolution,e.rotation,c.size,c.extent,c.pixelRatio),c,null,a))}}k=Jo.prototype;k.xa=function(){var a=this.g;a.isContextLost()||this.a.forEach(function(b){b&&a.deleteTexture(b.texture)});Ma(this.i);Bo.prototype.xa.call(this)};
k.gl=function(a,b){a=this.g;for(var c;1024<this.a.c-this.f;){if(c=this.a.a.ud)a.deleteTexture(c.texture);else if(+this.a.a.Kc==b.index)break;else--this.f;this.a.pop()}};k.U=function(){return"webgl"};k.No=function(a){a.preventDefault();this.a.clear();this.f=0;a=this.c;for(var b in a)a[b].Og()};k.Oo=function(){Ko(this);this.R.render()};function Ko(a){a=a.g;a.activeTexture(33984);a.blendFuncSeparate(770,771,1,771);a.disable(2884);a.disable(2929);a.disable(3089);a.disable(2960)}
k.mh=function(a){var b=this.i,c=this.g;if(c.isContextLost())return!1;if(!a)return this.l&&(this.b.style.display="none",this.l=!1),!1;this.s=a.focus;this.a.set((-a.index).toString(),null);++this.f;Lo(this,"precompose",a);var d=[],e=a.layerStatesArray;md(e,Go);var f=a.viewState.resolution,g;var h=0;for(g=e.length;h<g;++h){var l=e[h];if(ad(l,f)&&"ready"==l.fk){var m=Eo(this,l.layer);m.Pg(a,l,b)&&d.push(l)}}e=a.size[0]*a.pixelRatio;f=a.size[1]*a.pixelRatio;if(this.b.width!=e||this.b.height!=f)this.b.width=
e,this.b.height=f;c.bindFramebuffer(36160,null);c.clearColor(0,0,0,0);c.clear(16384);c.enable(3042);c.viewport(0,0,this.b.width,this.b.height);h=0;for(g=d.length;h<g;++h)l=d[h],m=Eo(this,l.layer),m.ij(a,l,b);this.l||(this.b.style.display="",this.l=!0);Co(a);1024<this.a.c-this.f&&a.postRenderFunctions.push(this.gl.bind(this));0!==this.j.b.length&&(a.postRenderFunctions.push(this.B),a.animate=!0);Lo(this,"postcompose",a);Fo(this,a);a.postRenderFunctions.push(Do)};
k.Ga=function(a,b,c,d,e,f,g){if(this.g.isContextLost())return!1;var h=b.viewState,l=b.layerStatesArray,m;for(m=l.length-1;0<=m;--m){var n=l[m];var p=n.layer;if(ad(n,h.resolution)&&f.call(g,p)&&(n=Eo(this,p).Ga(a,b,c,d,e)))return n}};k.gj=function(a,b,c,d,e){c=!1;if(this.g.isContextLost())return!1;var f=b.viewState,g=b.layerStatesArray,h;for(h=g.length-1;0<=h;--h){var l=g[h],m=l.layer;if(ad(l,f.resolution)&&d.call(e,m)&&(c=Eo(this,m).vf(a,b)))return!0}return c};
k.fj=function(a,b,c,d,e){if(this.g.isContextLost())return!1;var f=b.viewState,g=b.layerStatesArray,h;for(h=g.length-1;0<=h;--h){var l=g[h];var m=l.layer;if(ad(l,f.resolution)&&e.call(d,m)&&(l=Eo(this,m).Ng(a,b,c,d)))return l}};var Mo=["canvas","webgl"];
function Q(a){Wa.call(this);var b=No(a);this.Yf=void 0!==a.loadTilesWhileAnimating?a.loadTilesWhileAnimating:!1;this.Zf=void 0!==a.loadTilesWhileInteracting?a.loadTilesWhileInteracting:!1;this.dg=void 0!==a.pixelRatio?a.pixelRatio:he;this.Uf=b.logos;this.la=function(){this.j=void 0;this.cr.call(this)}.bind(this);this.lc=ve();this.eg=ve();this.Xf=0;this.c=null;this.rb=ib();this.G=this.N=this.aa=null;this.a=document.createElement("DIV");this.a.className="ol-viewport"+(me?" ol-touch":"");this.a.style.position=
Patrick's avatar
Patrick committed
509
"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.C=document.createElement("DIV");this.C.className="ol-overlaycontainer";this.a.appendChild(this.C);this.v=document.createElement("DIV");this.v.className="ol-overlaycontainer-stopevent";a="click dblclick mousedown touchstart MSPointerDown pointerdown mousewheel wheel".split(" ");for(var c=0,d=a.length;c<d;++c)y(this.v,a[c],Oa);this.a.appendChild(this.v);
Patrick's avatar
Patrick committed
510
511
512
513
514
515
516
517
518
519
this.wa=new Tm(this);for(var e in rm)y(this.wa,rm[e],this.li,this);this.oa=b.keyboardEventTarget;this.s=null;y(this.a,"wheel",this.Fd,this);y(this.a,"mousewheel",this.Fd,this);this.l=b.controls;this.i=b.interactions;this.o=b.overlays;this.Tg={};this.B=new b.er(this.a,this);this.X=null;this.Ua=[];this.Xa=new an(this.em.bind(this),this.Lm.bind(this));this.$={};y(this,Ya("layergroup"),this.tm,this);y(this,Ya("view"),this.Mm,this);y(this,Ya("size"),this.Im,this);y(this,Ya("target"),this.Km,this);this.J(b.values);
this.l.forEach(function(a){a.setMap(this)},this);y(this.l,"add",function(a){a.element.setMap(this)},this);y(this.l,"remove",function(a){a.element.setMap(null)},this);this.i.forEach(function(a){a.setMap(this)},this);y(this.i,"add",function(a){a.element.setMap(this)},this);y(this.i,"remove",function(a){a.element.setMap(null)},this);this.o.forEach(this.Ph,this);y(this.o,"add",function(a){this.Ph(a.element)},this);y(this.o,"remove",function(a){var b=a.element.f;void 0!==b&&delete this.Tg[b.toString()];
a.element.setMap(null)},this)}v(Q,Wa);k=Q.prototype;k.Uk=function(a){this.l.push(a)};k.Vk=function(a){this.i.push(a)};k.Nh=function(a){this.Nb().Tb().push(a)};k.Oh=function(a){this.o.push(a)};k.Ph=function(a){var b=a.f;void 0!==b&&(this.Tg[b.toString()]=a);a.setMap(this)};
k.xa=function(){Ma(this.wa);Ma(this.B);Ja(this.a,"wheel",this.Fd,this);Ja(this.a,"mousewheel",this.Fd,this);void 0!==this.f&&(window.removeEventListener("resize",this.f,!1),this.f=void 0);this.j&&(cancelAnimationFrame(this.j),this.j=void 0);this.mf(null);Wa.prototype.xa.call(this)};k.Ve=function(a,b,c){if(this.c)return a=this.ab(a),c=void 0!==c?c:{},this.B.Ga(a,this.c,void 0!==c.hitTolerance?c.hitTolerance*this.c.pixelRatio:0,b,null,void 0!==c.layerFilter?c.layerFilter:Fd,null)};
k.Dn=function(a,b,c,d,e){if(this.c)return this.B.fj(a,this.c,b,void 0!==c?c:null,void 0!==d?d:Fd,void 0!==e?e:null)};k.Om=function(a,b){if(!this.c)return!1;a=this.ab(a);b=void 0!==b?b:{};return this.B.gj(a,this.c,void 0!==b.hitTolerance?b.hitTolerance*this.c.pixelRatio:0,void 0!==b.layerFilter?b.layerFilter:Fd,null)};k.pg=function(a){return this.ab(this.Xe(a))};k.Xe=function(a){var b=this.a.getBoundingClientRect();a=a.changedTouches?a.changedTouches[0]:a;return[a.clientX-b.left,a.clientY-b.top]};
k.yg=function(){return this.get("target")};k.Jc=function(){var a=this.yg();return void 0!==a?"string"===typeof a?document.getElementById(a):a:null};k.ab=function(a){var b=this.c;return b?Ae(b.pixelToCoordinateTransform,a.slice()):null};k.xl=function(){return this.l};k.Vl=function(){return this.o};k.Ul=function(a){a=this.Tg[a.toString()];return void 0!==a?a:null};k.Gl=function(){return this.i};k.Nb=function(){return this.get("layergroup")};k.Bi=function(){return this.Nb().Tb()};
k.Pa=function(a){var b=this.c;return b?Ae(b.coordinateToPixelTransform,a.slice(0,2)):null};k.Rb=function(){return this.get("size")};k.Z=function(){return this.get("view")};k.hm=function(){return this.a};k.em=function(a,b,c,d){var e=this.c;if(!(e&&b in e.wantedTiles&&e.wantedTiles[b][a.ob()]))return Infinity;a=c[0]-e.focus[0];c=c[1]-e.focus[1];return 65536*Math.log(d)+Math.sqrt(a*a+c*c)/d};k.Fd=function(a,b){a=new qm(b||a.type,this,a);this.li(a)};
k.li=function(a){if(this.c){this.X=a.coordinate;a.frameState=this.c;var b=this.i.a,c;if(!1!==this.b(a))for(c=b.length-1;0<=c;c--){var d=b[c];if(d.c()&&!d.handleEvent(a))break}}};k.Gm=function(){var a=this.c,b=this.Xa;if(0!==b.b.length){var c=16,d=c;if(a){var e=a.viewHints;e[0]&&(c=this.Yf?8:0,d=2);e[1]&&(c=this.Zf?8:0,d=2)}b.j<c&&($m(b),bn(b,c,d))}b=this.Ua;c=0;for(d=b.length;c<d;++c)b[c](this,a);b.length=0};k.Im=function(){this.render()};
k.Km=function(){var a;this.yg()&&(a=this.Jc());if(this.s){for(var b=0,c=this.s.length;b<c;++b)Ca(this.s[b]);this.s=null}a?(a.appendChild(this.a),a=this.oa?this.oa:a,this.s=[y(a,"keydown",this.Fd,this),y(a,"keypress",this.Fd,this)],this.f||(this.f=this.Ud.bind(this),window.addEventListener("resize",this.f,!1))):(rd(this.a),void 0!==this.f&&(window.removeEventListener("resize",this.f,!1),this.f=void 0));this.Ud()};k.Lm=function(){this.render()};k.oi=function(){this.render()};
k.Mm=function(){this.aa&&(Ca(this.aa),this.aa=null);this.N&&(Ca(this.N),this.N=null);var a=this.Z();a&&(this.a.setAttribute("data-view",x(a)),this.aa=y(a,"propertychange",this.oi,this),this.N=y(a,"change",this.oi,this));this.render()};k.tm=function(){this.G&&(this.G.forEach(Ca),this.G=null);var a=this.Nb();a&&(this.G=[y(a,"propertychange",this.render,this),y(a,"change",this.render,this)]);this.render()};k.dr=function(){this.j&&cancelAnimationFrame(this.j);this.la()};
Patrick's avatar
Patrick committed
520
k.render=function(){void 0===this.j&&(this.j=requestAnimationFrame(this.la))};k.Xq=function(a){return this.l.remove(a)};k.Yq=function(a){return this.i.remove(a)};k.$q=function(a){return this.Nb().Tb().remove(a)};k.ar=function(a){return this.o.remove(a)};
Patrick's avatar
Patrick committed
521
522
523
k.cr=function(){var a=Date.now(),b,c=this.Rb(),d=this.Z(),e=ib(),f=null;if(void 0!==c&&0<c[0]&&0<c[1]&&d&&Rl(d)){f=mn(d,this.c?this.c.viewHints:void 0);var g=this.Nb().ug(),h={};var l=0;for(b=g.length;l<b;++l)h[x(g[l].layer)]=g[l];l=d.getState();f={animate:!1,attributions:{},coordinateToPixelTransform:this.lc,extent:e,focus:this.X?this.X:l.center,index:this.Xf++,layerStates:h,layerStatesArray:g,logos:wa({},this.Uf),pixelRatio:this.dg,pixelToCoordinateTransform:this.eg,postRenderFunctions:[],size:c,
skippedFeatureUids:this.$,tileQueue:this.Xa,time:a,usedTiles:{},viewState:l,viewHints:f,wantedTiles:{}}}f&&(f.extent=Hb(l.center,l.resolution,l.rotation,f.size,e));this.c=f;this.B.mh(f);f&&(f.animate&&this.render(),Array.prototype.push.apply(this.Ua,f.postRenderFunctions),f.viewHints[0]||f.viewHints[1]||vb(f.extent,this.rb)||(this.b(new pm("moveend",this,f)),lb(f.extent,this.rb)));this.b(new pm("postrender",this,f));setTimeout(this.Gm.bind(this),0)};k.Xj=function(a){this.set("layergroup",a)};
k.th=function(a){this.set("size",a)};k.mf=function(a){this.set("target",a)};k.En=function(a){this.set("view",a)};k.ek=function(a){a=x(a).toString();this.$[a]=!0;this.render()};k.Ud=function(){var a=this.Jc();if(a){var b=getComputedStyle(a);this.th([a.offsetWidth-parseFloat(b.borderLeftWidth)-parseFloat(b.paddingLeft)-parseFloat(b.paddingRight)-parseFloat(b.borderRightWidth),a.offsetHeight-parseFloat(b.borderTopWidth)-parseFloat(b.paddingTop)-parseFloat(b.paddingBottom)-parseFloat(b.borderBottomWidth)])}else this.th(void 0)};
Patrick's avatar
Patrick committed
524
k.ik=function(a){a=x(a).toString();delete this.$[a];this.render()};
Patrick's avatar
Patrick committed
525
526
527
528
529
530
531
532
533
534
535
function No(a){var b=null;void 0!==a.keyboardEventTarget&&(b="string"===typeof a.keyboardEventTarget?document.getElementById(a.keyboardEventTarget):a.keyboardEventTarget);var c={},d={};if(void 0===a.logo||"boolean"===typeof a.logo&&a.logo)d["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 e=a.logo;"string"===typeof e?d[e]="":e instanceof HTMLElement?d[x(e).toString()]=e:e&&(gb("string"==typeof e.href,44),gb("string"==typeof e.src,45),d[e.src]=e.href)}e=a.layers instanceof Wb?a.layers:new Wb({layers:a.layers});c.layergroup=e;c.target=a.target;c.view=void 0!==a.view?a.view:new P;e=Bo;var f;void 0!==a.renderer?(Array.isArray(a.renderer)?f=a.renderer:"string"===typeof a.renderer?f=[a.renderer]:gb(!1,46),0<=f.indexOf("dom")&&(f=f.concat(Mo))):f=Mo;var g;var h=0;for(g=f.length;h<
g;++h){var l=f[h];if("canvas"==l){if(je){e=Ho;break}}else if("webgl"==l&&be){e=Jo;break}}void 0!==a.controls?Array.isArray(a.controls)?f=new bb(a.controls.slice()):(gb(a.controls instanceof bb,47),f=a.controls):f=em();void 0!==a.interactions?Array.isArray(a.interactions)?h=new bb(a.interactions.slice()):(gb(a.interactions instanceof bb,48),h=a.interactions):h=yo();void 0!==a.overlays?Array.isArray(a.overlays)?a=new bb(a.overlays.slice()):(gb(a.overlays instanceof bb,49),a=a.overlays):a=new bb;return{controls:f,
interactions:h,keyboardEventTarget:b,logos:d,overlays:a,er:e,values:c}};function Oo(a){Wa.call(this);this.f=a.id;this.o=void 0!==a.insertFirst?a.insertFirst:!0;this.s=void 0!==a.stopEvent?a.stopEvent:!0;this.c=document.createElement("DIV");this.c.className="ol-overlay-container ol-selectable";this.c.style.position="absolute";this.autoPan=void 0!==a.autoPan?a.autoPan:!1;this.j=a.autoPanAnimation||{};this.l=void 0!==a.autoPanMargin?a.autoPanMargin:20;this.a={Qe:"",gf:"",Jf:"",Sf:"",visible:!0};this.i=null;y(this,Ya(Po),this.om,this);y(this,Ya(Qo),this.ym,this);y(this,Ya(Ro),
this.Cm,this);y(this,Ya(So),this.Em,this);y(this,Ya(To),this.Fm,this);void 0!==a.element&&this.Sj(a.element);this.Zj(void 0!==a.offset?a.offset:[0,0]);this.bk(void 0!==a.positioning?a.positioning:"top-left");void 0!==a.position&&this.pf(a.position)}v(Oo,Wa);k=Oo.prototype;k.ke=function(){return this.get(Po)};k.Fn=function(){return this.f};k.nf=function(){return this.get(Qo)};k.gi=function(){return this.get(Ro)};k.Ci=function(){return this.get(So)};k.hi=function(){return this.get(To)};
k.om=function(){for(var a=this.c;a.lastChild;)a.removeChild(a.lastChild);(a=this.ke())&&this.c.appendChild(a)};k.ym=function(){this.i&&(rd(this.c),Ca(this.i),this.i=null);var a=this.nf();a&&(this.i=y(a,"postrender",this.render,this),Uo(this),a=this.s?a.v:a.C,this.o?a.insertBefore(this.c,a.childNodes[0]||null):a.appendChild(this.c))};k.render=function(){Uo(this)};k.Cm=function(){Uo(this)};
k.Em=function(){Uo(this);if(this.get(So)&&this.autoPan){var a=this.nf();if(a&&a.Jc()){var b=Vo(a.Jc(),a.Rb()),c=this.ke(),d=c.offsetWidth,e=getComputedStyle(c);d+=parseInt(e.marginLeft,10)+parseInt(e.marginRight,10);e=c.offsetHeight;var f=getComputedStyle(c);e+=parseInt(f.marginTop,10)+parseInt(f.marginBottom,10);var g=Vo(c,[d,e]);c=this.l;pb(b,g)||(d=g[0]-b[0],e=b[2]-g[2],f=g[1]-b[1],g=b[3]-g[3],b=[0,0],0>d?b[0]=d-c:0>e&&(b[0]=Math.abs(e)+c),0>f?b[1]=f-c:0>g&&(b[1]=Math.abs(g)+c),0===b[0]&&0===b[1])||
(c=a.Z().va(),c=a.Pa(c),b=[c[0]+b[0],c[1]+b[1]],a.Z().animate({center:a.ab(b),duration:this.j.duration,easing:this.j.easing}))}}};k.Fm=function(){Uo(this)};k.Sj=function(a){this.set(Po,a)};k.setMap=function(a){this.set(Qo,a)};k.Zj=function(a){this.set(Ro,a)};k.pf=function(a){this.set(So,a)};function Vo(a,b){var c=a.getBoundingClientRect();a=c.left+window.pageXOffset;c=c.top+window.pageYOffset;return[a,c,a+b[0],c+b[1]]}k.bk=function(a){this.set(To,a)};
function Wo(a,b){a.a.visible!==b&&(a.c.style.display=b?"":"none",a.a.visible=b)}
function Uo(a){var b=a.nf(),c=a.Ci();if(b&&b.c&&c){c=b.Pa(c);var d=b.Rb();b=a.c.style;var e=a.gi(),f=a.hi();Wo(a,!0);var g=e[0];e=e[1];if("bottom-right"==f||"center-right"==f||"top-right"==f)""!==a.a.gf&&(a.a.gf=b.left=""),g=Math.round(d[0]-c[0]-g)+"px",a.a.Jf!=g&&(a.a.Jf=b.right=g);else{""!==a.a.Jf&&(a.a.Jf=b.right="");if("bottom-center"==f||"center-center"==f||"top-center"==f)g-=a.c.offsetWidth/2;g=Math.round(c[0]+g)+"px";a.a.gf!=g&&(a.a.gf=b.left=g)}if("bottom-left"==f||"bottom-center"==f||"bottom-right"==
f)""!==a.a.Sf&&(a.a.Sf=b.top=""),c=Math.round(d[1]-c[1]-e)+"px",a.a.Qe!=c&&(a.a.Qe=b.bottom=c);else{""!==a.a.Qe&&(a.a.Qe=b.bottom="");if("center-left"==f||"center-center"==f||"center-right"==f)e-=a.c.offsetHeight/2;c=Math.round(c[1]+e)+"px";a.a.Sf!=c&&(a.a.Sf=b.top=c)}}else Wo(a,!1)}var Po="element",Qo="map",Ro="offset",So="position",To="positioning";function Xo(a){function b(a){a=h.pg(a);l.R.Z().cb(a);window.removeEventListener("mousemove",c);window.removeEventListener("mouseup",b)}function c(a){a=h.pg({clientX:a.clientX-n.offsetWidth/2,clientY:a.clientY+n.offsetHeight/2});m.pf(a)}a=a?a:{};this.f=void 0!==a.collapsed?a.collapsed:!0;this.j=void 0!==a.collapsible?a.collapsible:!0;this.j||(this.f=!1);var d=void 0!==a.className?a.className:"ol-overviewmap",e=void 0!==a.tipLabel?a.tipLabel:"Overview map",f=void 0!==a.collapseLabel?a.collapseLabel:
Patrick's avatar
Patrick committed
536
"\u00ab";"string"===typeof f?(this.s=document.createElement("span"),this.s.textContent=f):this.s=f;f=void 0!==a.label?a.label:"\u00bb";"string"===typeof f?(this.v=document.createElement("span"),this.v.textContent=f):this.v=f;var g=this.j&&!this.f?this.s:this.v;f=document.createElement("button");f.setAttribute("type","button");f.title=e;f.appendChild(g);y(f,"click",this.Vn,this);this.C=document.createElement("DIV");this.C.className="ol-overviewmap-map";var h=this.a=new Q({controls:new bb,interactions:new bb,
Patrick's avatar
Patrick committed
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
view:a.view});a.layers&&a.layers.forEach(function(a){h.Nh(a)},this);e=document.createElement("DIV");e.className="ol-overviewmap-box";e.style.boxSizing="border-box";this.l=new Oo({position:[0,0],positioning:"bottom-left",element:e});this.a.Oh(this.l);e=document.createElement("div");e.className=d+" ol-unselectable ol-control"+(this.f&&this.j?" ol-collapsed":"")+(this.j?"":" ol-uncollapsible");e.appendChild(this.C);e.appendChild(f);Vl.call(this,{element:e,render:a.render?a.render:Yo,target:a.target});
var l=this,m=this.l,n=this.l.ke();n.addEventListener("mousedown",function(){window.addEventListener("mousemove",c);window.addEventListener("mouseup",b)})}v(Xo,Vl);k=Xo.prototype;k.setMap=function(a){var b=this.R;a!==b&&(b&&((b=b.Z())&&Ja(b,Ya("rotation"),this.ef,this),this.a.mf(null)),Vl.prototype.setMap.call(this,a),a&&(this.a.mf(this.C),this.o.push(y(a,"propertychange",this.zm,this)),0===this.a.Bi().rc()&&this.a.Xj(a.Nb()),a=a.Z()))&&(y(a,Ya("rotation"),this.ef,this),Rl(a)&&(this.a.Ud(),Zo(this)))};
k.zm=function(a){"view"===a.key&&((a=a.oldValue)&&Ja(a,Ya("rotation"),this.ef,this),a=this.R.Z(),y(a,Ya("rotation"),this.ef,this))};k.ef=function(){this.a.Z().gd(this.R.Z().Qa())};function Yo(){var a=this.R,b=this.a;if(a.c&&b.c){var c=a.Rb();a=a.Z().zd(c);var d=b.Rb();c=b.Z().zd(d);var e=b.Pa(Bb(a)),f=b.Pa(zb(a));b=Math.abs(e[0]-f[0]);e=Math.abs(e[1]-f[1]);f=d[0];d=d[1];b<.1*f||e<.1*d||b>.75*f||e>.75*d?Zo(this):pb(c,a)||(a=this.a,c=this.R.Z(),a.Z().cb(c.va()))}$o(this)}
function Zo(a){var b=a.R;a=a.a;var c=b.Rb();b=b.Z().zd(c);a=a.Z();Kb(b,1/(.1*Math.pow(2,Math.log(7.5)/Math.LN2/2)));a.ng(b)}function $o(a){var b=a.R,c=a.a;if(b.c&&c.c){var d=b.Rb(),e=b.Z(),f=c.Z();c=e.Qa();b=a.l;var g=a.l.ke(),h=e.zd(d);d=f.Ia();e=yb(h);f=Ab(h);if(a=a.R.Z().va()){var l=[e[0]-a[0],e[1]-a[1]];zd(l,c);ud(l,a)}b.pf(l);g&&(g.style.width=Math.abs((e[0]-f[0])/d)+"px",g.style.height=Math.abs((f[1]-e[1])/d)+"px")}}k.Vn=function(a){a.preventDefault();ap(this)};
function ap(a){a.element.classList.toggle("ol-collapsed");a.f?qd(a.s,a.v):qd(a.v,a.s);a.f=!a.f;var b=a.a;a.f||b.c||(b.Ud(),Zo(a),Ia(b,"postrender",function(){$o(this)},a))}k.Un=function(){return this.j};k.Xn=function(a){this.j!==a&&(this.j=a,this.element.classList.toggle("ol-uncollapsible"),!a&&this.f&&ap(this))};k.Wn=function(a){this.j&&this.f!==a&&ap(this)};k.Tn=function(){return this.f};k.Wl=function(){return this.a};function bp(a){a=a?a:{};var b=void 0!==a.className?a.className:"ol-scale-line";this.j=document.createElement("DIV");this.j.className=b+"-inner";this.a=document.createElement("DIV");this.a.className=b+" ol-unselectable";this.a.appendChild(this.j);this.s=null;this.l=void 0!==a.minWidth?a.minWidth:64;this.f=!1;this.C=void 0;this.v="";Vl.call(this,{element:this.a,render:a.render?a.render:cp,target:a.target});y(this,Ya(dp),this.G,this);this.B(a.units||"metric")}v(bp,Vl);var ep=[1,2,5];
bp.prototype.Pb=function(){return this.get(dp)};function cp(a){(a=a.frameState)?this.s=a.viewState:this.s=null;fp(this)}bp.prototype.G=function(){fp(this)};bp.prototype.B=function(a){this.set(dp,a)};
function fp(a){var b=a.s;if(b){var c=b.projection,d=c.dc();b=Jc(c,b.resolution,b.center)*d;d=a.l*b;c="";var e=a.Pb();"degrees"==e?(c=pc.degrees,b/=c,d<c/60?(c="\u2033",b*=3600):d<c?(c="\u2032",b*=60):c="\u00b0"):"imperial"==e?.9144>d?(c="in",b/=.0254):1609.344>d?(c="ft",b/=.3048):(c="mi",b/=1609.344):"nautical"==e?(b/=1852,c="nm"):"metric"==e?.001>d?(c="\u03bcm",b*=1E6):1>d?(c="mm",b*=1E3):1E3>d?c="m":(c="km",b/=1E3):"us"==e?.9144>d?(c="in",b*=39.37):1609.344>d?(c="ft",b/=.30480061):(c="mi",b/=1609.3472):
gb(!1,33);e=3*Math.floor(Math.log(a.l*b)/Math.log(10));for(var f;;){f=ep[(e%3+3)%3]*Math.pow(10,Math.floor(e/3));d=Math.round(f/b);if(isNaN(d)){a.a.style.display="none";a.f=!1;return}if(d>=a.l)break;++e}b=f+" "+c;a.v!=b&&(a.j.innerHTML=b,a.v=b);a.C!=d&&(a.j.style.width=d+"px",a.C=d);a.f||(a.a.style.display="",a.f=!0)}else a.f&&(a.a.style.display="none",a.f=!1)}var dp="units";function gp(a){a=a?a:{};this.a=void 0;this.f=hp;this.v=this.l=0;this.G=null;this.X=!1;this.aa=void 0!==a.duration?a.duration:200;var b=void 0!==a.className?a.className:"ol-zoomslider",c=document.createElement("button");c.setAttribute("type","button");c.className=b+"-thumb ol-unselectable";var d=document.createElement("div");d.className=b+" ol-unselectable ol-control";d.appendChild(c);this.j=new Om(d);y(this.j,"pointerdown",this.nm,this);y(this.j,"pointermove",this.lm,this);y(this.j,"pointerup",this.mm,
this);y(d,"click",this.km,this);y(c,"click",Oa);Vl.call(this,{element:d,render:a.render?a.render:ip})}v(gp,Vl);gp.prototype.xa=function(){Ma(this.j);Vl.prototype.xa.call(this)};var hp=0;k=gp.prototype;k.setMap=function(a){Vl.prototype.setMap.call(this,a);a&&a.render()};
function ip(a){if(a.frameState){if(!this.X){var b=this.element,c=b.offsetWidth,d=b.offsetHeight,e=b.firstElementChild,f=getComputedStyle(e);b=e.offsetWidth+parseFloat(f.marginRight)+parseFloat(f.marginLeft);e=e.offsetHeight+parseFloat(f.marginTop)+parseFloat(f.marginBottom);this.G=[b,e];c>d?(this.f=1,this.v=c-b):(this.f=hp,this.l=d-e);this.X=!0}a=a.frameState.viewState.resolution;a!==this.a&&(this.a=a,jp(this,a))}}
k.km=function(a){var b=this.R.Z();a=kp(this,Mb(1===this.f?(a.offsetX-this.G[0]/2)/this.v:(a.offsetY-this.G[1]/2)/this.l,0,1));b.animate({resolution:b.constrainResolution(a),duration:this.aa,easing:$l})};k.nm=function(a){this.s||a.b.target!==this.element.firstElementChild||(ln(this.R.Z(),1,1),this.C=a.clientX,this.B=a.clientY,this.s=!0)};
k.lm=function(a){if(this.s){var b=this.element.firstElementChild;this.a=kp(this,Mb(1===this.f?(a.clientX-this.C+parseInt(b.style.left,10))/this.v:(a.clientY-this.B+parseInt(b.style.top,10))/this.l,0,1));this.R.Z().Uc(this.a);jp(this,this.a);this.C=a.clientX;this.B=a.clientY}};k.mm=function(){if(this.s){var a=this.R.Z();ln(a,1,-1);a.animate({resolution:a.constrainResolution(this.a),duration:this.aa,easing:$l});this.s=!1;this.B=this.C=void 0}};
function jp(a,b){b=1-sn(a.R.Z())(b);var c=a.element.firstElementChild;1==a.f?c.style.left=a.v*b+"px":c.style.top=a.l*b+"px"}function kp(a,b){return rn(a.R.Z())(1-b)};function lp(a){a=a?a:{};this.a=a.extent?a.extent:null;var b=void 0!==a.className?a.className:"ol-zoom-extent",c=void 0!==a.label?a.label:"E",d=void 0!==a.tipLabel?a.tipLabel:"Fit to extent",e=document.createElement("button");e.setAttribute("type","button");e.title=d;e.appendChild("string"===typeof c?document.createTextNode(c):c);y(e,"click",this.f,this);c=document.createElement("div");c.className=b+" ol-unselectable ol-control";c.appendChild(e);Vl.call(this,{element:c,target:a.target})}v(lp,Vl);
lp.prototype.f=function(a){a.preventDefault();a=this.R.Z();var b=this.a?this.a:a.c.D();a.ng(b)};function mp(a){Wa.call(this);a=a?a:{};this.a=null;y(this,Ya(np),this.nn,this);this.Hg(void 0!==a.tracking?a.tracking:!1)}v(mp,Wa);k=mp.prototype;k.xa=function(){this.Hg(!1);Wa.prototype.xa.call(this)};
k.Wp=function(a){if(null!==a.alpha){var b=Rb(a.alpha);this.set(op,b);"boolean"===typeof a.absolute&&a.absolute?this.set(pp,b):"number"===typeof a.webkitCompassHeading&&-1!=a.webkitCompassAccuracy&&this.set(pp,Rb(a.webkitCompassHeading))}null!==a.beta&&this.set(qp,Rb(a.beta));null!==a.gamma&&this.set(rp,Rb(a.gamma));this.u()};k.pl=function(){return this.get(op)};k.sl=function(){return this.get(qp)};k.Dl=function(){return this.get(rp)};k.mn=function(){return this.get(pp)};k.xi=function(){return this.get(np)};
k.nn=function(){if(ke){var a=this.xi();a&&!this.a?this.a=y(window,"deviceorientation",this.Wp,this):a||null===this.a||(Ca(this.a),this.a=null)}};k.Hg=function(a){this.set(np,a)};var op="alpha",qp="beta",rp="gamma",pp="heading",np="tracking";function sp(){this.i=this.defaultDataProjection=null}function tp(a,b,c){var d;c&&(d={dataProjection:c.dataProjection?c.dataProjection:a.hb(b),featureProjection:c.featureProjection});return up(a,d)}function up(a,b){return wa({dataProjection:a.defaultDataProjection,featureProjection:a.i},b)}
function vp(a,b,c){var d=c?Lc(c.featureProjection):null,e=c?Lc(c.dataProjection):null,f;d&&e&&!Uc(d,e)?a instanceof Td?f=(b?a.clone():a).transform(b?d:e,b?e:d):f=Yc(b?a.slice():a,b?d:e,b?e:d):f=a;if(b&&c&&c.decimals){var g=Math.pow(10,c.decimals);a=function(a){for(var b=0,c=a.length;b<c;++b)a[b]=Math.round(a[b]*g)/g;return a};Array.isArray(f)?a(f):f.yc(a)}return f};function wp(){this.g=new XMLSerializer;sp.call(this)}v(wp,sp);k=wp.prototype;k.U=function(){return"xml"};k.hc=function(a,b){return zj(a)?xp(this,a,b):Aj(a)?this.Zg(a,b):"string"===typeof a?(a=Bj(a),xp(this,a,b)):null};function xp(a,b,c){a=yp(a,b,c);return 0<a.length?a[0]:null}k.Zg=function(){return null};k.Oa=function(a,b){return zj(a)?yp(this,a,b):Aj(a)?this.wc(a,b):"string"===typeof a?(a=Bj(a),yp(this,a,b)):[]};
function yp(a,b,c){var d=[];for(b=b.firstChild;b;b=b.nextSibling)b.nodeType==Node.ELEMENT_NODE&&id(d,a.wc(b,c));return d}k.od=function(a,b){if(zj(a))return null;if(Aj(a))return this.Gj(a,b);"string"===typeof a&&Bj(a);return null};k.Gj=function(){return null};k.hb=function(a){return zj(a)?this.Gf(a):Aj(a)?this.Qd(a):"string"===typeof a?(a=Bj(a),this.Gf(a)):null};k.Gf=function(){return this.defaultDataProjection};k.Qd=function(){return this.defaultDataProjection};k.Vd=function(){return this.g.serializeToString(this.Bh())};
k.Bh=function(){return null};k.Xb=function(a,b){a=this.kc(a,b);return this.g.serializeToString(a)};k.kc=function(){return null};k.wd=function(a,b){a=this.Ge(a,b);return this.g.serializeToString(a)};k.Ge=function(){return null};function R(a,b){Wd.call(this);this.c=[];this.j=this.v=-1;this.ua(a,b)}v(R,Wd);k=R.prototype;k.Xk=function(a){this.A?id(this.A,a.ja().slice()):this.A=a.ja().slice();this.c.push(this.A.length);this.u()};k.clone=function(){var a=new R(null);a.fa(this.ma,this.A.slice(),this.c.slice());return a};k.Lb=function(a,b,c,d){if(d<mb(this.D(),a,b))return d;this.j!=this.g&&(this.v=Math.sqrt(Pk(this.A,0,this.c,this.a,0)),this.j=this.g);return Rk(this.A,0,this.c,this.a,this.v,!1,a,b,c,d)};
k.lo=function(a,b,c){return"XYM"!=this.ma&&"XYZM"!=this.ma||0===this.A.length?null:Zk(this.A,this.c,this.a,a,void 0!==b?b:!1,void 0!==c?c:!1)};k.T=function(){return Wk(this.A,0,this.c,this.a)};k.$b=function(){return this.c};k.Ml=function(a){if(0>a||this.c.length<=a)return null;var b=new K(null);b.fa(this.ma,this.A.slice(0===a?0:this.c[a-1],this.c[a]));return b};
k.Hc=function(){var a=this.A,b=this.c,c=this.ma,d=[],e=0,f;var g=0;for(f=b.length;g<f;++g){var h=b[g],l=new K(null);l.fa(c,a.slice(e,h));d.push(l);e=h}return d};function Oe(a){var b=[],c=a.A,d=0,e=a.c;a=a.a;var f;var g=0;for(f=e.length;g<f;++g){var h=e[g];d=Xk(c,d,h,a,.5);id(b,d);d=h}return b}k.Ed=function(a){var b=[],c=[],d=this.A,e=this.c,f=this.a,g=0,h=0,l;var m=0;for(l=e.length;m<l;++m){var n=e[m];h=hk(d,g,n,f,a,b,h);c.push(h);g=n}b.length=h;a=new R(null);a.fa("XY",b,c);return a};k.U=function(){return"MultiLineString"};
k.bb=function(a){a:{var b=this.A,c=this.c,d=this.a,e=0,f;var g=0;for(f=c.length;g<f;++g){if(al(b,e,c[g],d,a)){a=!0;break a}e=c[g]}a=!1}return a};k.ua=function(a,b){a?(Zd(this,b,a,2),this.A||(this.A=[]),a=Uk(this.A,0,a,this.a,this.c),this.A.length=0===a.length?0:a[a.length-1],this.u()):this.fa("XY",null,this.c)};k.fa=function(a,b,c){Yd(this,a,b);this.c=c;this.u()};
function zp(a,b){var c=a.ma,d=[],e=[],f;var g=0;for(f=b.length;g<f;++g){var h=b[g];0===g&&(c=h.ma);id(d,h.ja());e.push(d.length)}a.fa(c,d,e)};function T(a,b){Wd.call(this);this.ua(a,b)}v(T,Wd);k=T.prototype;k.Zk=function(a){this.A?id(this.A,a.ja()):this.A=a.ja().slice();this.u()};k.clone=function(){var a=new T(null);a.fa(this.ma,this.A.slice());return a};k.Lb=function(a,b,c,d){if(d<mb(this.D(),a,b))return d;var e=this.A,f=this.a,g;var h=0;for(g=e.length;h<g;h+=f){var l=Qb(a,b,e[h],e[h+1]);if(l<d){d=l;for(l=0;l<f;++l)c[l]=e[h+l];c.length=f}}return d};k.T=function(){return Vk(this.A,0,this.A.length,this.a)};
k.mo=function(a){var b=this.A?this.A.length/this.a:0;if(0>a||b<=a)return null;b=new L(null);b.fa(this.ma,this.A.slice(a*this.a,(a+1)*this.a));return b};k.Id=function(){var a=this.A,b=this.ma,c=this.a,d=[],e;var f=0;for(e=a.length;f<e;f+=c){var g=new L(null);g.fa(b,a.slice(f,f+c));d.push(g)}return d};k.U=function(){return"MultiPoint"};k.bb=function(a){var b=this.A,c=this.a,d;var e=0;for(d=b.length;e<d;e+=c){var f=b[e];var g=b[e+1];if(ob(a,f,g))return!0}return!1};
k.ua=function(a,b){a?(Zd(this,b,a,1),this.A||(this.A=[]),this.A.length=Tk(this.A,0,a,this.a),this.u()):this.fa("XY",null)};k.fa=function(a,b){Yd(this,a,b);this.u()};function U(a,b){Wd.call(this);this.c=[];this.v=-1;this.C=null;this.N=this.B=this.G=-1;this.j=null;this.ua(a,b)}v(U,Wd);k=U.prototype;k.$k=function(a){if(this.A){var b=this.A.length;id(this.A,a.ja());a=a.$b().slice();var c;var d=0;for(c=a.length;d<c;++d)a[d]+=b}else this.A=a.ja().slice(),a=a.$b().slice(),this.c.push();this.c.push(a);this.u()};k.clone=function(){for(var a=new U(null),b=this.c.length,c=Array(b),d=0;d<b;++d)c[d]=this.c[d].slice();Ap(a,this.ma,this.A.slice(),c);return a};
k.Lb=function(a,b,c,d){if(d<mb(this.D(),a,b))return d;if(this.B!=this.g){var e=this.c,f=0,g=0,h;var l=0;for(h=e.length;l<h;++l){var m=e[l];g=Pk(this.A,f,m,this.a,g);f=m[m.length-1]}this.G=Math.sqrt(g);this.B=this.g}e=Qe(this);f=this.c;g=this.a;l=this.G;h=0;m=[NaN,NaN];var n;var p=0;for(n=f.length;p<n;++p){var q=f[p];d=Rk(e,h,q,g,l,!0,a,b,c,d,m);h=q[q.length-1]}return d};
k.hd=function(a,b){a:{var c=Qe(this),d=this.c,e=0;if(0!==d.length){var f;var g=0;for(f=d.length;g<f;++g){var h=d[g];if(Ig(c,e,h,this.a,a,b)){a=!0;break a}e=h[h.length-1]}}a=!1}return a};k.no=function(){var a=Qe(this),b=this.c,c=0,d=0,e;var f=0;for(e=b.length;f<e;++f){var g=b[f];d+=jg(a,c,g,this.a);c=g[g.length-1]}return d};
k.T=function(a){if(void 0!==a){var b=Qe(this).slice();hg(b,this.c,this.a,a)}else b=this.A;a=b;b=this.c;var c=this.a,d=0,e=[],f=0,g;var h=0;for(g=b.length;h<g;++h){var l=b[h];e[f++]=Wk(a,d,l,c,e[f]);d=l[l.length-1]}e.length=f;return e};
function Re(a){if(a.v!=a.g){var b=a.A,c=a.c,d=a.a,e=0,f=[],g;var h=0;for(g=c.length;h<g;++h){var l=c[h];e=tb(b,e,l[0],d);f.push((e[0]+e[2])/2,(e[1]+e[3])/2);e=l[l.length-1]}b=Qe(a);c=a.c;d=a.a;h=0;g=[];l=0;for(e=c.length;l<e;++l){var m=c[l];g=el(b,h,m,d,f,2*l,g);h=m[m.length-1]}a.C=g;a.v=a.g}return a.C}k.Il=function(){var a=new T(null);a.fa("XY",Re(this).slice());return a};
function Qe(a){if(a.N!=a.g){var b=a.A;a:{var c=a.c;var d;var e=0;for(d=c.length;e<d;++e)if(!fg(b,c[e],a.a,void 0)){c=!1;break a}c=!0}c?a.j=b:(a.j=b.slice(),a.j.length=hg(a.j,a.c,a.a));a.N=a.g}return a.j}k.Ed=function(a){var b=[],c=[],d=this.A,e=this.c,f=this.a;a=Math.sqrt(a);var g=0,h=0,l;var m=0;for(l=e.length;m<l;++m){var n=e[m],p=[];h=ik(d,g,n,f,a,b,h,p);c.push(p);g=n[n.length-1]}b.length=h;d=new U(null);Ap(d,"XY",b,c);return d};
Patrick's avatar
Patrick committed
567
k.Yl=function(a){if(0>a||this.c.length<=a)return null;if(0===a)var b=0;else b=this.c[a-1],b=b[b.length-1];a=this.c[a].slice();var c=a[a.length-1];if(0!==b){var d;var e=0;for(d=a.length;e<d;++e)a[e]-=b}e=new M(null);e.fa(this.ma,this.A.slice(b,c),a);return e};k.bd=function(){var a=this.ma,b=this.A,c=this.c,d=[],e=0,f,g;var h=0;for(f=c.length;h<f;++h){var l=c[h].slice(),m=l[l.length-1];if(0!==e){var n=0;for(g=l.length;n<g;++n)l[n]-=e}n=new M(null);n.fa(a,b.slice(e,m),l);d.push(n);e=m}return d};
Patrick's avatar
Patrick committed
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
k.U=function(){return"MultiPolygon"};k.bb=function(a){a:{var b=Qe(this),c=this.c,d=this.a,e=0,f;var g=0;for(f=c.length;g<f;++g){var h=c[g];if(bl(b,e,h,d,a)){a=!0;break a}e=h[h.length-1]}a=!1}return a};
k.ua=function(a,b){if(a){Zd(this,b,a,3);this.A||(this.A=[]);b=this.A;var c=this.a,d=this.c,e=0;d=d?d:[];var f=0,g;var h=0;for(g=a.length;h<g;++h)e=Uk(b,e,a[h],c,d[f]),d[f++]=e,e=e[e.length-1];d.length=f;0===d.length?this.A.length=0:(a=d[d.length-1],this.A.length=0===a.length?0:a[a.length-1]);this.u()}else Ap(this,"XY",null,this.c)};function Ap(a,b,c,d){Yd(a,b,c);a.c=d;a.u()}
function Bp(a,b){var c=a.ma,d=[],e=[],f;var g=0;for(f=b.length;g<f;++g){var h=b[g];0===g&&(c=h.ma);var l=d.length;var m=h.$b();var n;var p=0;for(n=m.length;p<n;++p)m[p]+=l;id(d,h.ja());e.push(m)}Ap(a,c,d,e)};function Cp(a){a=a?a:{};this.featureType=a.featureType;this.featureNS=a.featureNS;this.srsName=a.srsName;this.schemaLocation="";this.b={};this.b["http://www.opengis.net/gml"]={featureMember:Ej(Cp.prototype.we),featureMembers:Ej(Cp.prototype.we)};wp.call(this)}v(Cp,wp);var Dp=/^[\s\xa0]*$/;k=Cp.prototype;
k.we=function(a,b){var c=a.localName,d=null;if("FeatureCollection"==c)"http://www.opengis.net/wfs"===a.namespaceURI?d=I([],this.b,a,b,this):d=I(null,this.b,a,b,this);else if("featureMembers"==c||"featureMember"==c){var e=b[0],f=e.featureType,g=e.featureNS,h;if(!f&&a.childNodes){f=[];g={};var l=0;for(h=a.childNodes.length;l<h;++l){var m=a.childNodes[l];if(1===m.nodeType){var n=m.nodeName.split(":").pop();if(-1===f.indexOf(n)){var p="",q=0;m=m.namespaceURI;for(var t in g){if(g[t]===m){p=t;break}++q}p||
(p="p"+q,g[p]=m);f.push(p+":"+n)}}}"featureMember"!=c&&(e.featureType=f,e.featureNS=g)}"string"===typeof g&&(l=g,g={},g.p0=l);e={};f=Array.isArray(f)?f:[f];for(var u in g){n={};l=0;for(h=f.length;l<h;++l)(-1===f[l].indexOf(":")?"p0":f[l].split(":")[0])===u&&(n[f[l].split(":").pop()]="featureMembers"==c?Dj(this.Yg,this):Ej(this.Yg,this));e[g[u]]=n}"featureMember"==c?d=I(void 0,e,a,b):d=I([],e,a,b)}null===d&&(d=[]);return d};
k.ye=function(a,b){var c=b[0];c.srsName=a.firstElementChild.getAttribute("srsName");if(a=I(null,this.Wf,a,b,this))return vp(a,!1,c)};
k.Yg=function(a,b){var c;(c=a.getAttribute("fid"))||(c=a.getAttributeNS("http://www.opengis.net/gml","id")||"");var d={},e;for(a=a.firstElementChild;a;a=a.nextElementSibling){var f=a.localName;if(0===a.childNodes.length||1===a.childNodes.length&&(3===a.firstChild.nodeType||4===a.firstChild.nodeType)){var g=xj(a,!1);Dp.test(g)&&(g=void 0);d[f]=g}else"boundedBy"!==f&&(e=f),d[f]=this.ye(a,b)}b=new E(d);e&&b.pd(e);c&&b.xc(c);return b};
k.Lj=function(a,b){if(a=this.Df(a,b))return b=new L(null),b.fa("XYZ",a),b};k.Jj=function(a,b){if(a=I([],this.uk,a,b,this))return new T(a)};k.Ij=function(a,b){if(a=I([],this.tk,a,b,this))return b=new R(null),zp(b,a),b};k.Kj=function(a,b){if(a=I([],this.vk,a,b,this))return b=new U(null),Bp(b,a),b};k.Cj=function(a,b){Lj(this.yk,a,b,this)};k.pi=function(a,b){Lj(this.rk,a,b,this)};k.Dj=function(a,b){Lj(this.zk,a,b,this)};k.Ef=function(a,b){if(a=this.Df(a,b))return b=new K(null),b.fa("XYZ",a),b};
k.wq=function(a,b){if(a=I(null,this.Ie,a,b,this))return a};k.Hj=function(a,b){if(a=this.Df(a,b))return b=new cl(null),dl(b,"XYZ",a),b};k.Ff=function(a,b){if((a=I([null],this.Vf,a,b,this))&&a[0]){b=new M(null);var c=a[0],d=[c.length],e;var f=1;for(e=a.length;f<e;++f)id(c,a[f]),d.push(c.length);b.fa("XYZ",c,d);return b}};k.Df=function(a,b){return I(null,this.Ie,a,b,this)};k.uk={"http://www.opengis.net/gml":{pointMember:Dj(Cp.prototype.Cj),pointMembers:Dj(Cp.prototype.Cj)}};
k.tk={"http://www.opengis.net/gml":{lineStringMember:Dj(Cp.prototype.pi),lineStringMembers:Dj(Cp.prototype.pi)}};k.vk={"http://www.opengis.net/gml":{polygonMember:Dj(Cp.prototype.Dj),polygonMembers:Dj(Cp.prototype.Dj)}};k.yk={"http://www.opengis.net/gml":{Point:Dj(Cp.prototype.Df)}};k.rk={"http://www.opengis.net/gml":{LineString:Dj(Cp.prototype.Ef)}};k.zk={"http://www.opengis.net/gml":{Polygon:Dj(Cp.prototype.Ff)}};k.Je={"http://www.opengis.net/gml":{LinearRing:Ej(Cp.prototype.wq)}};
k.Gj=function(a,b){return(a=this.ye(a,[tp(this,a,b?b:{})]))?a:null};k.wc=function(a,b){var c={featureType:this.featureType,featureNS:this.featureNS};b&&wa(c,tp(this,a,b));return this.we(a,[c])||[]};k.Qd=function(a){return Lc(this.srsName?this.srsName:a.firstElementChild.getAttribute("srsName"))};function Fp(a){a=xj(a,!1);return Gp(a)}function Gp(a){if(a=/^\s*(true|1)|(false|0)\s*$/.exec(a))return void 0!==a[1]||!1}function Hp(a){a=xj(a,!1);a=Date.parse(a);return isNaN(a)?void 0:a/1E3}function Ip(a){a=xj(a,!1);return Jp(a)}function Jp(a){if(a=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(a))return parseFloat(a[1])}function Kp(a){a=xj(a,!1);return Lp(a)}function Lp(a){if(a=/^\s*(\d+)\s*$/.exec(a))return parseInt(a[1],10)}function V(a){return xj(a,!1).trim()}
function Mp(a,b){Np(a,b?"1":"0")}function Op(a,b){a.appendChild(vj.createTextNode(b.toPrecision()))}function Pp(a,b){a.appendChild(vj.createTextNode(b.toString()))}function Np(a,b){a.appendChild(vj.createTextNode(b))};function W(a){a=a?a:{};Cp.call(this,a);this.o=void 0!==a.surface?a.surface:!1;this.c=void 0!==a.curve?a.curve:!1;this.f=void 0!==a.multiCurve?a.multiCurve:!0;this.j=void 0!==a.multiSurface?a.multiSurface:!0;this.schemaLocation=a.schemaLocation?a.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd"}v(W,Cp);k=W.prototype;k.Cq=function(a,b){if(a=I([],this.sk,a,b,this))return b=new R(null),zp(b,a),b};
k.Dq=function(a,b){if(a=I([],this.wk,a,b,this))return b=new U(null),Bp(b,a),b};k.Uh=function(a,b){Lj(this.nk,a,b,this)};k.gk=function(a,b){Lj(this.Ck,a,b,this)};k.Gq=function(a,b){return I([null],this.xk,a,b,this)};k.Mq=function(a,b){return I([null],this.Bk,a,b,this)};k.Iq=function(a,b){return I([null],this.Vf,a,b,this)};k.Bq=function(a,b){return I([null],this.Ie,a,b,this)};k.Tm=function(a,b){(a=I(void 0,this.Je,a,b,this))&&b[b.length-1].push(a)};
k.hl=function(a,b){(a=I(void 0,this.Je,a,b,this))&&(b[b.length-1][0]=a)};k.Mj=function(a,b){if((a=I([null],this.Dk,a,b,this))&&a[0]){b=new M(null);var c=a[0],d=[c.length],e;var f=1;for(e=a.length;f<e;++f)id(c,a[f]),d.push(c.length);b.fa("XYZ",c,d);return b}};k.Ej=function(a,b){if(a=I([null],this.pk,a,b,this))return b=new K(null),b.fa("XYZ",a),b};k.vq=function(a,b){a=I([null],this.qk,a,b,this);return rb(a[1][0],a[1][1],a[2][0],a[2][1])};
k.xq=function(a,b){var c=xj(a,!1),d=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/;a=[];for(var e;e=d.exec(c);)a.push(parseFloat(e[1])),c=c.substr(e[0].length);if(""===c){b=b[0].srsName;c="enu";b&&(c=Lc(b).b);if("neu"===c)for(b=0,c=a.length;b<c;b+=3)d=a[b],a[b]=a[b+1],a[b+1]=d;b=a.length;2==b&&a.push(0);if(0!==b)return a}};
k.dh=function(a,b){var c=xj(a,!1).replace(/^\s*|\s*$/g,""),d=b[0].srsName,e=a.parentNode.getAttribute("srsDimension");b="enu";d&&(b=Lc(d).b);c=c.split(/\s+/);d=2;a.getAttribute("srsDimension")?d=Lp(a.getAttribute("srsDimension")):a.getAttribute("dimension")?d=Lp(a.getAttribute("dimension")):e&&(d=Lp(e));for(var f,g=[],h=0,l=c.length;h<l;h+=d)a=parseFloat(c[h]),e=parseFloat(c[h+1]),f=3===d?parseFloat(c[h+2]):0,"en"===b.substr(0,2)?g.push(a,e,f):g.push(e,a,f);return g};
k.Ie={"http://www.opengis.net/gml":{pos:Ej(W.prototype.xq),posList:Ej(W.prototype.dh)}};k.Vf={"http://www.opengis.net/gml":{interior:W.prototype.Tm,exterior:W.prototype.hl}};
k.Wf={"http://www.opengis.net/gml":{Point:Ej(Cp.prototype.Lj),MultiPoint:Ej(Cp.prototype.Jj),LineString:Ej(Cp.prototype.Ef),MultiLineString:Ej(Cp.prototype.Ij),LinearRing:Ej(Cp.prototype.Hj),Polygon:Ej(Cp.prototype.Ff),MultiPolygon:Ej(Cp.prototype.Kj),Surface:Ej(W.prototype.Mj),MultiSurface:Ej(W.prototype.Dq),Curve:Ej(W.prototype.Ej),MultiCurve:Ej(W.prototype.Cq),Envelope:Ej(W.prototype.vq)}};k.sk={"http://www.opengis.net/gml":{curveMember:Dj(W.prototype.Uh),curveMembers:Dj(W.prototype.Uh)}};
k.wk={"http://www.opengis.net/gml":{surfaceMember:Dj(W.prototype.gk),surfaceMembers:Dj(W.prototype.gk)}};k.nk={"http://www.opengis.net/gml":{LineString:Dj(Cp.prototype.Ef),Curve:Dj(W.prototype.Ej)}};k.Ck={"http://www.opengis.net/gml":{Polygon:Dj(Cp.prototype.Ff),Surface:Dj(W.prototype.Mj)}};k.Dk={"http://www.opengis.net/gml":{patches:Ej(W.prototype.Gq)}};k.pk={"http://www.opengis.net/gml":{segments:Ej(W.prototype.Mq)}};k.qk={"http://www.opengis.net/gml":{lowerCorner:Dj(W.prototype.dh),upperCorner:Dj(W.prototype.dh)}};
k.xk={"http://www.opengis.net/gml":{PolygonPatch:Ej(W.prototype.Iq)}};k.Bk={"http://www.opengis.net/gml":{LineStringSegment:Ej(W.prototype.Bq)}};function Qp(a,b,c){c=c[c.length-1].srsName;b=b.T();for(var d=b.length,e=Array(d),f,g=0;g<d;++g){f=b[g];var h=g,l="enu";c&&(l=Lc(c).b);e[h]="en"===l.substr(0,2)?f[0]+" "+f[1]:f[1]+" "+f[0]}Np(a,e.join(" "))}
k.Ri=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);d=wj(a.namespaceURI,"pos");a.appendChild(d);c=c[c.length-1].srsName;a="enu";c&&(a=Lc(c).b);b=b.T();Np(d,"en"===a.substr(0,2)?b[0]+" "+b[1]:b[1]+" "+b[0])};var Rp={"http://www.opengis.net/gml":{lowerCorner:G(Np),upperCorner:G(Np)}};k=W.prototype;k.co=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);Mj({node:a},Rp,Jj,[b[0]+" "+b[1],b[2]+" "+b[3]],c,["lowerCorner","upperCorner"],this)};
k.Oi=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);d=wj(a.namespaceURI,"posList");a.appendChild(d);Qp(d,b,c)};k.bo=function(a,b){a=b[b.length-1];b=a.node;var c=a.exteriorWritten;void 0===c&&(a.exteriorWritten=!0);return wj(b.namespaceURI,void 0!==c?"interior":"exterior")};
k.tf=function(a,b,c){var d=c[c.length-1].srsName;"PolygonPatch"!==a.nodeName&&d&&a.setAttribute("srsName",d);"Polygon"===a.nodeName||"PolygonPatch"===a.nodeName?(b=b.Ic(),Mj({node:a,srsName:d},Sp,this.bo,b,c,void 0,this)):"Surface"===a.nodeName&&(d=wj(a.namespaceURI,"patches"),a.appendChild(d),a=wj(d.namespaceURI,"PolygonPatch"),d.appendChild(a),this.tf(a,b,c))};
k.sf=function(a,b,c){var d=c[c.length-1].srsName;"LineStringSegment"!==a.nodeName&&d&&a.setAttribute("srsName",d);"LineString"===a.nodeName||"LineStringSegment"===a.nodeName?(d=wj(a.namespaceURI,"posList"),a.appendChild(d),Qp(d,b,c)):"Curve"===a.nodeName&&(d=wj(a.namespaceURI,"segments"),a.appendChild(d),a=wj(d.namespaceURI,"LineStringSegment"),d.appendChild(a),this.sf(a,b,c))};
k.Qi=function(a,b,c){var d=c[c.length-1],e=d.srsName;d=d.surface;e&&a.setAttribute("srsName",e);b=b.bd();Mj({node:a,srsName:e,surface:d},Tp,this.l,b,c,void 0,this)};k.eo=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);b=b.Id();Mj({node:a,srsName:d},Up,Hj("pointMember"),b,c,void 0,this)};k.Pi=function(a,b,c){var d=c[c.length-1],e=d.srsName;d=d.curve;e&&a.setAttribute("srsName",e);b=b.Hc();Mj({node:a,srsName:e,curve:d},Vp,this.l,b,c,void 0,this)};
k.Si=function(a,b,c){var d=wj(a.namespaceURI,"LinearRing");a.appendChild(d);this.Oi(d,b,c)};k.Ti=function(a,b,c){var d=this.a(b,c);d&&(a.appendChild(d),this.tf(d,b,c))};k.fo=function(a,b,c){var d=wj(a.namespaceURI,"Point");a.appendChild(d);this.Ri(d,b,c)};k.Ni=function(a,b,c){var d=this.a(b,c);d&&(a.appendChild(d),this.sf(d,b,c))};
k.Sb=function(a,b,c){var d=c[c.length-1],e=wa({},d);e.node=a;var f;Array.isArray(b)?d.dataProjection?f=Yc(b,d.featureProjection,d.dataProjection):f=b:f=vp(b,!0,d);Mj(e,Wp,this.a,[f],c,void 0,this)};
k.Lg=function(a,b,c){var d=b.a;d&&a.setAttribute("fid",d);d=c[c.length-1];var e=d.featureNS,f=b.c;d.qb||(d.qb={},d.qb[e]={});var g=b.L();b=[];var h=[];for(m in g){var l=g[m];null!==l&&(b.push(m),h.push(l),m==f||l instanceof Td?m in d.qb[e]||(d.qb[e][m]=G(this.Sb,this)):m in d.qb[e]||(d.qb[e][m]=G(Np)))}var m=wa({},d);m.node=a;Mj(m,d.qb,Hj(void 0,e),h,c,b)};
var Tp={"http://www.opengis.net/gml":{surfaceMember:G(W.prototype.Ti),polygonMember:G(W.prototype.Ti)}},Up={"http://www.opengis.net/gml":{pointMember:G(W.prototype.fo)}},Vp={"http://www.opengis.net/gml":{lineStringMember:G(W.prototype.Ni),curveMember:G(W.prototype.Ni)}},Sp={"http://www.opengis.net/gml":{exterior:G(W.prototype.Si),interior:G(W.prototype.Si)}},Wp={"http://www.opengis.net/gml":{Curve:G(W.prototype.sf),MultiCurve:G(W.prototype.Pi),Point:G(W.prototype.Ri),MultiPoint:G(W.prototype.eo),
LineString:G(W.prototype.sf),MultiLineString:G(W.prototype.Pi),LinearRing:G(W.prototype.Oi),Polygon:G(W.prototype.tf),MultiPolygon:G(W.prototype.Qi),Surface:G(W.prototype.tf),MultiSurface:G(W.prototype.Qi),Envelope:G(W.prototype.co)}},Xp={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"};W.prototype.l=function(a,b){return wj("http://www.opengis.net/gml",Xp[b[b.length-1].node.nodeName])};
W.prototype.a=function(a,b){var c=b[b.length-1];b=c.multiSurface;var d=c.surface,e=c.curve;c=c.multiCurve;Array.isArray(a)?a="Envelope":(a=a.U(),"MultiPolygon"===a&&!0===b?a="MultiSurface":"Polygon"===a&&!0===d?a="Surface":"LineString"===a&&!0===e?a="Curve":"MultiLineString"===a&&!0===c&&(a="MultiCurve"));return wj("http://www.opengis.net/gml",a)};
W.prototype.Ge=function(a,b){b=up(this,b);var c=wj("http://www.opengis.net/gml","geom"),d={node:c,srsName:this.srsName,curve:this.c,surface:this.o,multiSurface:this.j,multiCurve:this.f};b&&wa(d,b);this.Sb(c,a,[d]);return c};
W.prototype.kc=function(a,b){b=up(this,b);var c=wj("http://www.opengis.net/gml","featureMembers");c.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",this.schemaLocation);var d={srsName:this.srsName,curve:this.c,surface:this.o,multiSurface:this.j,multiCurve:this.f,featureNS:this.featureNS,featureType:this.featureType};b&&wa(d,b);b=[d];var e=b[b.length-1];d=e.featureType;var f=e.featureNS,g={};g[f]={};g[f][d]=G(this.Lg,this);e=wa({},e);e.node=c;Mj(e,g,Hj(d,f),a,b);return c};function Yp(a){a=a?a:{};W.call(this,a);this.schemaLocation=a.schemaLocation?a.schemaLocation:Yp.a;this.b["http://www.opengis.net/citygml/building/2.0"]={Building:Ej(this.rq)};this.b["http://www.opengis.net/citygml/bridge/2.0"]={Bridge:Ej(this.qq)};this.b["http://www.opengis.net/citygml/generics/2.0"]={GenericCityObject:Ej(this.zq)};this.b["http://www.opengis.net/citygml/tunnel/2.0"]={Tunnel:Ej(this.Tq)};this.b["http://www.opengis.net/citygml/cityfurniture/2.0"]={CityFurniture:Ej(this.sq)};this.b["http://www.opengis.net/citygml/cityobjectgroup/2.0"]=
{CityObjectGroup:Ej(this.tq)};this.b["http://www.opengis.net/citygml/landuse/2.0"]={LandUse:Ej(this.Aq)};this.b["http://www.opengis.net/citygml/transportation/2.0"]={TransportationComplex:Ej(this.Sq),Railway:Ej(this.Jq),Road:Ej(this.Lq),Track:Ej(this.Rq),Square:Ej(this.Qq)};this.b["http://www.opengis.net/citygml/vegetation/2.0"]={SolitaryVegetationObject:Ej(this.Pq),PlantCover:Ej(this.Hq)};this.b["http://www.opengis.net/citygml/waterbody/2.0"]={WaterBody:Ej(this.Vq)}}v(Yp,W);k=Yp.prototype;
Patrick's avatar
Patrick committed
602
603
604
k.zq=function(a,b){var c={id:a.getAttribute("gml:id"),type:5,children:[]};return c=I(c,this.kb,a,b,this)};k.rq=function(a,b){var c={id:a.getAttribute("gml:id"),type:26,children:[]};return c=I(c,this.kb,a,b,this)};k.qq=function(a,b){var c={id:a.getAttribute("gml:id"),type:64,children:[]};return c=I(c,this.kb,a,b,this)};k.Tq=function(a,b){var c={id:a.getAttribute("gml:id"),type:85,children:[]};return c=I(c,this.kb,a,b,this)};
k.sq=function(a,b){var c={id:a.getAttribute("gml:id"),type:21,children:[]};return c=I(c,this.kb,a,b,this)};k.tq=function(a,b){var c={id:a.getAttribute("gml:id"),type:23,children:[]};return c=I(c,this.kb,a,b,this)};k.Aq=function(a,b){var c={id:a.getAttribute("gml:id"),type:4,children:[]};return c=I(c,this.kb,a,b,this)};k.Sq=function(a,b){var c={id:a.getAttribute("gml:id"),type:42,children:[]};return c=I(c,this.kb,a,b,this)};
k.Jq=function(a,b){var c={id:a.getAttribute("gml:id"),type:44,children:[]};return c=I(c,this.kb,a,b,this)};k.Lq=function(a,b){var c={id:a.getAttribute("gml:id"),type:45,children:[]};return c=I(c,this.kb,a,b,this)};k.Rq=function(a,b){var c={id:a.getAttribute("gml:id"),type:43,children:[]};return c=I(c,this.kb,a,b,this)};k.Qq=function(a,b){var c={id:a.getAttribute("gml:id"),type:46,children:[]};return c=I(c,this.kb,a,b,this)};
Patrick's avatar
Patrick committed
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
k.Pq=function(a,b){var c={id:a.getAttribute("gml:id"),type:7,children:[]};return c=I(c,this.kb,a,b,this)};k.Hq=function(a,b){var c={id:a.getAttribute("gml:id"),type:8,children:[]};return c=I(c,this.kb,a,b,this)};k.Vq=function(a,b){var c={id:a.getAttribute("gml:id"),type:9,children:[]};return c=I(c,this.kb,a,b,this)};k.oq=function(a,b){var c={id:null,type:"_3",attributes:{},children:[]};c.attributes.extent=I(c,W.prototype.Wf,a,b,this);return c};
k.kb={"http://www.opengis.net/gml":{boundedBy:Fj(Yp.prototype.oq,"children")}};function Zp(){sp.call(this)}v(Zp,sp);function $p(a){return"string"===typeof a?(a=JSON.parse(a))?a:null:null!==a?a:null}k=Zp.prototype;k.U=function(){return"json"};k.hc=function(a,b){return this.md($p(a),tp(this,a,b))};k.Oa=function(a,b){return this.$g($p(a),tp(this,a,b))};k.od=function(a,b){return this.eh($p(a),tp(this,a,b))};k.hb=function(a){return this.gh($p(a))};k.Vd=function(a,b){return JSON.stringify(this.vd(a,b))};k.Xb=function(a,b){return JSON.stringify(this.Fe(a,b))};
k.wd=function(a,b){return JSON.stringify(this.He(a,b))};function aq(a){a=a?a:{};sp.call(this);this.b=a.geometryName}v(aq,Zp);
function bq(a,b){if(!a)return null;if("number"===typeof a.x&&"number"===typeof a.y)var c="Point";else if(a.points)c="MultiPoint";else if(a.paths)c=1===a.paths.length?"LineString":"MultiLineString";else if(a.rings){var d=a.rings,e=cq(a),f=[],g=[];c=[];var h;var l=0;for(h=d.length;l<h;++l)f.length=0,Tk(f,0,d[l],e.length),eg(f,0,f.length,e.length)?g.push([d[l]]):c.push(d[l]);for(;c.length;){d=c.shift();e=!1;for(l=g.length-1;0<=l;l--)if(pb((new cl(g[l][0])).D(),(new cl(d)).D())){g[l].push(d);e=!0;break}e||
g.push([d.reverse()])}a=wa({},a);1===g.length?(c="Polygon",a.rings=g[0]):(c="MultiPolygon",a.rings=g)}return vp((0,dq[c])(a),!1,b)}function cq(a){var b="XY";!0===a.hasZ&&!0===a.hasM?b="XYZM":!0===a.hasZ?b="XYZ":!0===a.hasM&&(b="XYM");return b}function eq(a){a=a.ma;return{hasZ:"XYZ"===a||"XYZM"===a,hasM:"XYM"===a||"XYZM"===a}}
var dq={Point:function(a){return void 0!==a.m&&void 0!==a.z?new L([a.x,a.y,a.z,a.m],"XYZM"):void 0!==a.z?new L([a.x,a.y,a.z],"XYZ"):void 0!==a.m?new L([a.x,a.y,a.m],"XYM"):new L([a.x,a.y])},LineString:function(a){return new K(a.paths[0],cq(a))},Polygon:function(a){return new M(a.rings,cq(a))},MultiPoint:function(a){return new T(a.points,cq(a))},MultiLineString:function(a){return new R(a.paths,cq(a))},MultiPolygon:function(a){return new U(a.rings,cq(a))}},fq={Point:function(a){var b=a.T(),c;a=a.ma;
"XYZ"===a?c={x:b[0],y:b[1],z:b[2]}:"XYM"===a?c={x:b[0],y:b[1],m:b[2]}:"XYZM"===a?c={x:b[0],y:b[1],z:b[2],m:b[3]}:"XY"===a?c={x:b[0],y:b[1]}:gb(!1,34);return c},LineString:function(a){var b=eq(a);return{hasZ:b.hasZ,hasM:b.hasM,paths:[a.T()]}},Polygon:function(a){var b=eq(a);return{hasZ:b.hasZ,hasM:b.hasM,rings:a.T(!1)}},MultiPoint:function(a){var b=eq(a);return{hasZ:b.hasZ,hasM:b.hasM,points:a.T()}},MultiLineString:function(a){var b=eq(a);return{hasZ:b.hasZ,hasM:b.hasM,paths:a.T()}},MultiPolygon:function(a){var b=
eq(a);a=a.T(!1);for(var c=[],d=0;d<a.length;d++)for(var e=a[d].length-1;0<=e;e--)c.push(a[d][e]);return{hasZ:b.hasZ,hasM:b.hasM,rings:c}}};k=aq.prototype;k.md=function(a,b){var c=bq(a.geometry,b),d=new E;this.b&&d.pd(this.b);d.Wa(c);b&&b.Bg&&a.attributes[b.Bg]&&d.xc(a.attributes[b.Bg]);a.attributes&&d.J(a.attributes);return d};k.$g=function(a,b){b=b?b:{};if(a.features){var c=[],d=a.features,e;b.Bg=a.objectIdFieldName;a=0;for(e=d.length;a<e;++a)c.push(this.md(d[a],b));return c}return[this.md(a,b)]};
k.eh=function(a,b){return bq(a,b)};k.gh=function(a){return a.spatialReference&&a.spatialReference.wkid?Lc("EPSG:"+a.spatialReference.wkid):null};function gq(a,b){return(0,fq[a.U()])(vp(a,!0,b),b)}k.He=function(a,b){return gq(a,up(this,b))};k.vd=function(a,b){b=up(this,b);var c={},d=a.V();d&&(c.geometry=gq(d,b));d=a.L();delete d[a.c];c.attributes=Aa(d)?{}:d;b&&b.featureProjection&&(c.spatialReference={wkid:Lc(b.featureProjection).tb.split(":").pop()});return c};
k.Fe=function(a,b){b=up(this,b);var c=[],d;var e=0;for(d=a.length;e<d;++e)c.push(this.vd(a[e],b));return{features:c}};function hq(a){this.Kb=a};function iq(a,b){this.Kb=a;this.b=Array.prototype.slice.call(arguments,1);gb(2<=this.b.length,57)}v(iq,hq);function jq(a){var b=["And"].concat(Array.prototype.slice.call(arguments));iq.apply(this,b)}v(jq,iq);function kq(a,b,c){this.Kb="BBOX";this.geometryName=a;this.extent=b;this.srsName=c}v(kq,hq);function lq(a,b){this.Kb=a;this.b=b}v(lq,hq);function mq(a,b,c,d){lq.call(this,a,b);this.g=c;this.a=d}v(mq,lq);function nq(a,b,c){mq.call(this,"PropertyIsEqualTo",a,b,c)}v(nq,mq);function oq(a,b){mq.call(this,"PropertyIsGreaterThan",a,b)}v(oq,mq);function pq(a,b){mq.call(this,"PropertyIsGreaterThanOrEqualTo",a,b)}v(pq,mq);function qq(a,b,c,d){this.Kb=a;this.geometryName=b||"the_geom";this.geometry=c;this.srsName=d}v(qq,hq);function rq(a,b,c){qq.call(this,"Intersects",a,b,c)}v(rq,qq);function sq(a,b,c){lq.call(this,"PropertyIsBetween",a);this.a=b;this.g=c}v(sq,lq);function tq(a,b,c,d,e,f){lq.call(this,"PropertyIsLike",a);this.c=b;this.f=void 0!==c?c:"*";this.i=void 0!==d?d:".";this.g=void 0!==e?e:"!";this.a=f}v(tq,lq);function uq(a){lq.call(this,"PropertyIsNull",a)}v(uq,lq);function vq(a,b){mq.call(this,"PropertyIsLessThan",a,b)}v(vq,mq);function wq(a,b){mq.call(this,"PropertyIsLessThanOrEqualTo",a,b)}v(wq,mq);function xq(a){this.Kb="Not";this.condition=a}v(xq,hq);function yq(a,b,c){mq.call(this,"PropertyIsNotEqualTo",a,b,c)}v(yq,mq);function zq(a){var b=["Or"].concat(Array.prototype.slice.call(arguments));iq.apply(this,b)}v(zq,iq);function Aq(a,b,c){qq.call(this,"Within",a,b,c)}v(Aq,qq);function Bq(a){var b=[null].concat(Array.prototype.slice.call(arguments));return new (Function.prototype.bind.apply(jq,b))}function Cq(a,b,c){return new kq(a,b,c)};function Dq(a,b,c,d,e){qq.call(this,"DWithin",a,b,e);this.distance=c;this.b=d}v(Dq,qq);function Eq(a){Td.call(this);this.a=a?a:null;Fq(this)}v(Eq,Td);function Gq(a){var b=[],c;var d=0;for(c=a.length;d<c;++d)b.push(a[d].clone());return b}function Hq(a){var b;if(a.a){var c=0;for(b=a.a.length;c<b;++c)Ja(a.a[c],"change",a.u,a)}}function Fq(a){var b;if(a.a){var c=0;for(b=a.a.length;c<b;++c)y(a.a[c],"change",a.u,a)}}k=Eq.prototype;k.clone=function(){var a=new Eq(null);a.Vj(this.a);return a};
k.Lb=function(a,b,c,d){if(d<mb(this.D(),a,b))return d;var e=this.a,f;var g=0;for(f=e.length;g<f;++g)d=e[g].Lb(a,b,c,d);return d};k.hd=function(a,b){var c=this.a,d;var e=0;for(d=c.length;e<d;++e)if(c[e].hd(a,b))return!0;return!1};k.Re=function(a){rb(Infinity,Infinity,-Infinity,-Infinity,a);for(var b=this.a,c=0,d=b.length;c<d;++c)wb(a,b[c].D());return a};k.Dd=function(){return Gq(this.a)};
k.me=function(a){this.l!=this.g&&(xa(this.i),this.f=0,this.l=this.g);if(0>a||0!==this.f&&a<this.f)return this;var b=a.toString();if(this.i.hasOwnProperty(b))return this.i[b];var c=[],d=this.a,e=!1,f;var g=0;for(f=d.length;g<f;++g){var h=d[g],l=h.me(a);c.push(l);l!==h&&(e=!0)}if(e)return a=new Eq(null),Hq(a),a.a=c,Fq(a),a.u(),this.i[b]=a;this.f=a;return this};k.U=function(){return"GeometryCollection"};k.bb=function(a){var b=this.a,c;var d=0;for(c=b.length;d<c;++d)if(b[d].bb(a))return!0;return!1};
k.rotate=function(a,b){for(var c=this.a,d=0,e=c.length;d<e;++d)c[d].rotate(a,b);this.u()};k.scale=function(a,b,c){c||(c=Gb(this.D()));for(var d=this.a,e=0,f=d.length;e<f;++e)d[e].scale(a,b,c);this.u()};k.Vj=function(a){a=Gq(a);Hq(this);this.a=a;Fq(this);this.u()};k.yc=function(a){var b=this.a,c;var d=0;for(c=b.length;d<c;++d)b[d].yc(a);this.u()};k.translate=function(a,b){var c=this.a,d;var e=0;for(d=c.length;e<d;++e)c[e].translate(a,b);this.u()};k.xa=function(){Hq(this);Td.prototype.xa.call(this)};function Iq(a){a=a?a:{};sp.call(this);this.defaultDataProjection=Lc(a.defaultDataProjection?a.defaultDataProjection:"EPSG:4326");a.featureProjection&&(this.i=Lc(a.featureProjection));this.b=a.geometryName}v(Iq,Zp);function Jq(a,b){return a?vp((0,Kq[a.type])(a),!1,b):null}function Lq(a,b){return(0,Mq[a.U()])(vp(a,!0,b),b)}
var Kq={Point:function(a){return new L(a.coordinates)},LineString:function(a){return new K(a.coordinates)},Polygon:function(a){return new M(a.coordinates)},MultiPoint:function(a){return new T(a.coordinates)},MultiLineString:function(a){return new R(a.coordinates)},MultiPolygon:function(a){return new U(a.coordinates)},GeometryCollection:function(a,b){a=a.geometries.map(function(a){return Jq(a,b)});return new Eq(a)}},Mq={Point:function(a){return{type:"Point",coordinates:a.T()}},LineString:function(a){return{type:"LineString",
coordinates:a.T()}},Polygon:function(a,b){if(b)var c=b.rightHanded;return{type:"Polygon",coordinates:a.T(c)}},MultiPoint:function(a){return{type:"MultiPoint",coordinates:a.T()}},MultiLineString:function(a){return{type:"MultiLineString",coordinates:a.T()}},MultiPolygon:function(a,b){if(b)var c=b.rightHanded;return{type:"MultiPolygon",coordinates:a.T(c)}},GeometryCollection:function(a,b){return{type:"GeometryCollection",geometries:a.a.map(function(a){var c=wa({},b);delete c.featureProjection;return Lq(a,
c)})}},Circle:function(){return{type:"GeometryCollection",geometries:[]}}};k=Iq.prototype;k.md=function(a,b){a="Feature"===a.type?a:{type:"Feature",geometry:a};b=Jq(a.geometry,b);var c=new E;this.b&&c.pd(this.b);c.Wa(b);void 0!==a.id&&c.xc(a.id);a.properties&&c.J(a.properties);return c};k.$g=function(a,b){if("FeatureCollection"===a.type){var c=[];a=a.features;var d;var e=0;for(d=a.length;e<d;++e)c.push(this.md(a[e],b))}else c=[this.md(a,b)];return c};k.eh=function(a,b){return Jq(a,b)};
k.gh=function(a){a=a.crs;var b;a?"name"==a.type?b=Lc(a.properties.name):"EPSG"==a.type?b=Lc("EPSG:"+a.properties.code):gb(!1,36):b=this.defaultDataProjection;return b};k.vd=function(a,b){b=up(this,b);var c={type:"Feature"},d=a.a;void 0!==d&&(c.id=d);(d=a.V())?c.geometry=Lq(d,b):c.geometry=null;b=a.L();delete b[a.c];Aa(b)?c.properties=null:c.properties=b;return c};k.Fe=function(a,b){b=up(this,b);var c=[],d;var e=0;for(d=a.length;e<d;++e)c.push(this.vd(a[e],b));return{type:"FeatureCollection",features:c}};
k.He=function(a,b){return Lq(a,up(this,b))};function Nq(a){a=a?a:{};Cp.call(this,a);this.b["http://www.opengis.net/gml"].featureMember=Dj(Cp.prototype.we);this.schemaLocation=a.schemaLocation?a.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd"}v(Nq,Cp);k=Nq.prototype;
k.Fj=function(a,b){a=xj(a,!1).replace(/^\s*|\s*$/g,"");var c=b[0].srsName;b="enu";c&&(c=Lc(c))&&(b=c.b);a=a.trim().split(/\s+/);for(var d,e,f=[],g=0,h=a.length;g<h;g++)e=a[g].split(/,+/),c=parseFloat(e[0]),d=parseFloat(e[1]),e=3===e.length?parseFloat(e[2]):0,"en"===b.substr(0,2)?f.push(c,d,e):f.push(d,c,e);return f};k.pq=function(a,b){a=I([null],this.mk,a,b,this);return rb(a[1][0],a[1][1],a[1][3],a[1][4])};k.Rm=function(a,b){(a=I(void 0,this.Je,a,b,this))&&b[b.length-1].push(a)};
k.Xp=function(a,b){(a=I(void 0,this.Je,a,b,this))&&(b[b.length-1][0]=a)};k.Ie={"http://www.opengis.net/gml":{coordinates:Ej(Nq.prototype.Fj)}};k.Vf={"http://www.opengis.net/gml":{innerBoundaryIs:Nq.prototype.Rm,outerBoundaryIs:Nq.prototype.Xp}};k.mk={"http://www.opengis.net/gml":{coordinates:Dj(Nq.prototype.Fj)}};
k.Wf={"http://www.opengis.net/gml":{Point:Ej(Cp.prototype.Lj),MultiPoint:Ej(Cp.prototype.Jj),LineString:Ej(Cp.prototype.Ef),MultiLineString:Ej(Cp.prototype.Ij),LinearRing:Ej(Cp.prototype.Hj),Polygon:Ej(Cp.prototype.Ff),MultiPolygon:Ej(Cp.prototype.Kj),Box:Ej(Nq.prototype.pq)}};
k.Kg=function(a,b){var c=b[b.length-1];b=c.multiSurface;var d=c.surface;c=c.multiCurve;Array.isArray(a)?a="Envelope":(a=a.U(),"MultiPolygon"===a&&!0===b?a="MultiSurface":"Polygon"===a&&!0===d?a="Surface":"MultiLineString"===a&&!0===c&&(a="MultiCurve"));return wj("http://www.opengis.net/gml",a)};k.Fi=function(a,b,c){var d=c[c.length-1],e=wa({},d);e.node=a;var f;Array.isArray(b)?d.dataProjection?f=Yc(b,d.featureProjection,d.dataProjection):f=b:f=vp(b,!0,d);Mj(e,Oq,this.Kg,[f],c,void 0,this)};
k.qf=function(a,b,c){var d=c[c.length-1].srsName;"LineStringSegment"!==a.nodeName&&d&&a.setAttribute("srsName",d);"LineString"===a.nodeName||"LineStringSegment"===a.nodeName?(d=Pq(a.namespaceURI),a.appendChild(d),Qq(d,b,c)):"Curve"===a.nodeName&&(d=wj(a.namespaceURI,"segments"),a.appendChild(d),a=wj(d.namespaceURI,"LineStringSegment"),d.appendChild(a),this.qf(a,b,c))};function Pq(a){a=wj(a,"coordinates");a.setAttribute("decimal",".");a.setAttribute("cs",",");a.setAttribute("ts"," ");return a}
function Qq(a,b,c){c=c[c.length-1].srsName;b=b.T();for(var d=b.length,e=Array(d),f,g=0;g<d;++g)f=b[g],e[g]=Rq(f,c);Np(a,e.join(" "))}k.rf=function(a,b,c){var d=c[c.length-1].srsName;"PolygonPatch"!==a.nodeName&&d&&a.setAttribute("srsName",d);"Polygon"===a.nodeName||"PolygonPatch"===a.nodeName?(b=b.Ic(),Mj({node:a,srsName:d},Sq,this.Yn,b,c,void 0,this)):"Surface"===a.nodeName&&(d=wj(a.namespaceURI,"patches"),a.appendChild(d),a=wj(d.namespaceURI,"PolygonPatch"),d.appendChild(a),this.rf(a,b,c))};
k.Yn=function(a,b){a=b[b.length-1];b=a.node;var c=a.exteriorWritten;void 0===c&&(a.exteriorWritten=!0);return wj(b.namespaceURI,void 0!==c?"innerBoundaryIs":"outerBoundaryIs")};k.Li=function(a,b,c){var d=wj(a.namespaceURI,"LinearRing");a.appendChild(d);this.Hi(d,b,c)};function Rq(a,b){var c="enu";b&&(c=Lc(b).b);return"en"===c.substr(0,2)?a[0]+","+a[1]:a[1]+","+a[0]}
k.Ii=function(a,b,c){var d=c[c.length-1],e=d.srsName;d=d.curve;e&&a.setAttribute("srsName",e);b=b.Hc();Mj({node:a,srsName:e,curve:d},Tq,this.a,b,c,void 0,this)};k.Ki=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);c=Pq(a.namespaceURI);a.appendChild(c);a=b.T();a=Rq(a,d);Np(c,a)};k.$n=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);b=b.Id();Mj({node:a,srsName:d},Uq,Hj("pointMember"),b,c,void 0,this)};
k.ao=function(a,b,c){var d=wj(a.namespaceURI,"Point");a.appendChild(d);this.Ki(d,b,c)};k.Gi=function(a,b,c){var d=this.Kg(b,c);d&&(a.appendChild(d),this.qf(d,b,c))};k.Hi=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);d=Pq(a.namespaceURI);a.appendChild(d);Qq(d,b,c)};k.Ji=function(a,b,c){var d=c[c.length-1],e=d.srsName;d=d.surface;e&&a.setAttribute("srsName",e);b=b.bd();Mj({node:a,srsName:e,surface:d},Vq,this.a,b,c,void 0,this)};
k.Mi=function(a,b,c){var d=this.Kg(b,c);d&&(a.appendChild(d),this.rf(d,b,c))};k.Zn=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);Mj({node:a},Wq,Jj,[b[0]+" "+b[1],b[2]+" "+b[3]],c,["lowerCorner","upperCorner"],this)};
var Oq={"http://www.opengis.net/gml":{Curve:G(Nq.prototype.qf),MultiCurve:G(Nq.prototype.Ii),Point:G(Nq.prototype.Ki),MultiPoint:G(Nq.prototype.$n),LineString:G(Nq.prototype.qf),MultiLineString:G(Nq.prototype.Ii),LinearRing:G(Nq.prototype.Hi),Polygon:G(Nq.prototype.rf),MultiPolygon:G(Nq.prototype.Ji),Surface:G(Nq.prototype.rf),MultiSurface:G(Nq.prototype.Ji),Envelope:G(Nq.prototype.Zn)}},Sq={"http://www.opengis.net/gml":{outerBoundaryIs:G(Nq.prototype.Li),innerBoundaryIs:G(Nq.prototype.Li)}},Uq={"http://www.opengis.net/gml":{pointMember:G(Nq.prototype.ao)}},
Tq={"http://www.opengis.net/gml":{lineStringMember:G(Nq.prototype.Gi),curveMember:G(Nq.prototype.Gi)}};Nq.prototype.a=function(a,b){return wj("http://www.opengis.net/gml",Xq[b[b.length-1].node.nodeName])};var Xq={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},Vq={"http://www.opengis.net/gml":{surfaceMember:G(Nq.prototype.Mi),polygonMember:G(Nq.prototype.Mi)}},Wq={"http://www.opengis.net/gml":{lowerCorner:G(Np),upperCorner:G(Np)}};function Yq(a){a=a?a:{};wp.call(this);this.defaultDataProjection=Lc("EPSG:4326");this.b=a.readExtensions}v(Yq,wp);var Zq=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"];function $q(a,b,c,d){a.push(parseFloat(c.getAttribute("lon")),parseFloat(c.getAttribute("lat")));"ele"in d?(a.push(d.ele),delete d.ele,b.hasZ=!0):a.push(0);"time"in d?(a.push(d.time),delete d.time,b.hasM=!0):a.push(0);return a}
function ar(a,b,c){var d="XY",e=2;a.hasZ&&a.hasM?(d="XYZM",e=4):a.hasZ?(d="XYZ",e=3):a.hasM&&(d="XYM",e=3);if(4!==e){var f;var g=0;for(f=b.length/4;g<f;g++)b[g*e]=b[4*g],b[g*e+1]=b[4*g+1],a.hasZ&&(b[g*e+2]=b[4*g+2]),a.hasM&&(b[g*e+2]=b[4*g+3]);b.length=b.length/4*e;if(c)for(g=0,f=c.length;g<f;g++)c[g]=c[g]/4*e}return d}function br(a,b){var c=b[b.length-1],d=a.getAttribute("href");null!==d&&(c.link=d);Lj(cr,a,b)}function dr(a,b){b[b.length-1].extensionsNode_=a}
function er(a,b){var c=b[0];if(a=I({flatCoordinates:[],layoutOptions:{}},fr,a,b)){b=a.flatCoordinates;delete a.flatCoordinates;var d=a.layoutOptions;delete a.layoutOptions;d=ar(d,b);var e=new K(null);e.fa(d,b);vp(e,!1,c);c=new E(e);c.J(a);return c}}
function gr(a,b){var c=b[0];if(a=I({flatCoordinates:[],ends:[],layoutOptions:{}},hr,a,b)){b=a.flatCoordinates;delete a.flatCoordinates;var d=a.ends;delete a.ends;var e=a.layoutOptions;delete a.layoutOptions;e=ar(e,b,d);var f=new R(null);f.fa(e,b,d);vp(f,!1,c);c=new E(f);c.J(a);return c}}function ir(a,b){var c=b[0];if(b=I({},jr,a,b)){var d={};a=$q([],d,a,b);d=ar(d,a);a=new L(a,d);vp(a,!1,c);c=new E(a);c.J(b);return c}}
var kr={rte:er,trk:gr,wpt:ir},lr=H(Zq,{rte:Dj(er),trk:Dj(gr),wpt:Dj(ir)}),cr=H(Zq,{text:F(V,"linkText"),type:F(V,"linkType")}),fr=H(Zq,{name:F(V),cmt:F(V),desc:F(V),src:F(V),link:br,number:F(Kp),extensions:dr,type:F(V),rtept:function(a,b){var c=I({},mr,a,b);c&&(b=b[b.length-1],$q(b.flatCoordinates,b.layoutOptions,a,c))}}),mr=H(Zq,{ele:F(Ip),time:F(Hp)}),hr=H(Zq,{name:F(V),cmt:F(V),desc:F(V),src:F(V),link:br,number:F(Kp),type:F(V),extensions:dr,trkseg:function(a,b){var c=b[b.length-1];Lj(nr,a,b);c.ends.push(c.flatCoordinates.length)}}),
nr=H(Zq,{trkpt:function(a,b){var c=I({},or,a,b);c&&(b=b[b.length-1],$q(b.flatCoordinates,b.layoutOptions,a,c))}}),or=H(Zq,{ele:F(Ip),time:F(Hp)}),jr=H(Zq,{ele:F(Ip),time:F(Hp),magvar:F(Ip),geoidheight:F(Ip),name:F(V),cmt:F(V),desc:F(V),src:F(V),link:br,sym:F(V),type:F(V),fix:F(V),sat:F(Kp),hdop:F(Ip),vdop:F(Ip),pdop:F(Ip),ageofdgpsdata:F(Ip),dgpsid:F(Kp),extensions:dr});
function pr(a,b){b||(b=[]);for(var c=0,d=b.length;c<d;++c){var e=b[c];if(a.b){var f=e.get("extensionsNode_")||null;a.b(e,f)}e.set("extensionsNode_",void 0)}}Yq.prototype.Zg=function(a,b){if(!gd(Zq,a.namespaceURI))return null;var c=kr[a.localName];if(!c)return null;a=c(a,[tp(this,a,b)]);if(!a)return null;pr(this,[a]);return a};Yq.prototype.wc=function(a,b){return gd(Zq,a.namespaceURI)?"gpx"==a.localName&&(a=I([],lr,a,[tp(this,a,b)]))?(pr(this,a),a):[]:[]};
function qr(a,b,c){a.setAttribute("href",b);b=c[c.length-1].properties;Mj({node:a},rr,Jj,[b.linkText,b.linkType],c,sr)}function tr(a,b,c){var d=c[c.length-1],e=d.node.namespaceURI,f=d.properties;a.setAttributeNS(null,"lat",b[1]);a.setAttributeNS(null,"lon",b[0]);switch(d.geometryLayout){case "XYZM":0!==b[3]&&(f.time=b[3]);case "XYZ":0!==b[2]&&(f.ele=b[2]);break;case "XYM":0!==b[2]&&(f.time=b[2])}b="rtept"==a.nodeName?ur[e]:vr[e];d=Kj(f,b);Mj({node:a,properties:f},wr,Jj,d,c,b)}
var sr=["text","type"],rr=H(Zq,{text:G(Np),type:G(Np)}),xr=H(Zq,"name cmt desc src link number type rtept".split(" ")),yr=H(Zq,{name:G(Np),cmt:G(Np),desc:G(Np),src:G(Np),link:G(qr),number:G(Pp),type:G(Np),rtept:Gj(G(tr))}),ur=H(Zq,["ele","time"]),zr=H(Zq,"name cmt desc src link number type trkseg".split(" ")),Cr=H(Zq,{name:G(Np),cmt:G(Np),desc:G(Np),src:G(Np),link:G(qr),number:G(Pp),type:G(Np),trkseg:Gj(G(function(a,b,c){Mj({node:a,geometryLayout:b.ma,properties:{}},Ar,Br,b.T(),c)}))}),Br=Hj("trkpt"),
Ar=H(Zq,{trkpt:G(tr)}),vr=H(Zq,"ele time magvar geoidheight name cmt desc src link sym type fix sat hdop vdop pdop ageofdgpsdata dgpsid".split(" ")),wr=H(Zq,{ele:G(Op),time:G(function(a,b){b=new Date(1E3*b);b=b.getUTCFullYear()+"-"+sd(b.getUTCMonth()+1)+"-"+sd(b.getUTCDate())+"T"+sd(b.getUTCHours())+":"+sd(b.getUTCMinutes())+":"+sd(b.getUTCSeconds())+"Z";a.appendChild(vj.createTextNode(b))}),magvar:G(Op),geoidheight:G(Op),name:G(Np),cmt:G(Np),desc:G(Np),src:G(Np),link:G(qr),sym:G(Np),type:G(Np),fix:G(Np),
sat:G(Pp),hdop:G(Op),vdop:G(Op),pdop:G(Op),ageofdgpsdata:G(Op),dgpsid:G(Pp)}),Dr={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function Er(a,b){if(a=a.V())if(a=Dr[a.U()])return wj(b[b.length-1].node.namespaceURI,a)}
var Fr=H(Zq,{rte:G(function(a,b,c){var d=c[0],e=b.L();a={node:a,properties:e};if(b=b.V())b=vp(b,!0,d),a.geometryLayout=b.ma,e.rtept=b.T();d=xr[c[c.length-1].node.namespaceURI];e=Kj(e,d);Mj(a,yr,Jj,e,c,d)}),trk:G(function(a,b,c){var d=c[0],e=b.L();a={node:a,properties:e};if(b=b.V())b=vp(b,!0,d),e.trkseg=b.Hc();d=zr[c[c.length-1].node.namespaceURI];e=Kj(e,d);Mj(a,Cr,Jj,e,c,d)}),wpt:G(function(a,b,c){var d=c[0],e=c[c.length-1];e.properties=b.L();if(b=b.V())b=vp(b,!0,d),e.geometryLayout=b.ma,tr(a,b.T(),
c)})});Yq.prototype.kc=function(a,b){b=up(this,b);var c=wj("http://www.topografix.com/GPX/1/1","gpx");c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance");c.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation","http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd");c.setAttribute("version","1.1");c.setAttribute("creator","OpenLayers");Mj({node:c},Fr,Er,a,[b]);return c};function Gr(){sp.call(this)}v(Gr,sp);function Hr(a){return"string"===typeof a?a:""}k=Gr.prototype;k.U=function(){return"text"};k.hc=function(a,b){return this.ve(Hr(a),up(this,b))};k.Oa=function(a,b){return this.ah(Hr(a),up(this,b))};k.od=function(a,b){return this.Pd(Hr(a),up(this,b))};k.hb=function(){return this.defaultDataProjection};k.Vd=function(a,b){return this.Ee(a,up(this,b))};k.Xb=function(a,b){return this.Ch(a,up(this,b))};k.wd=function(a,b){return this.Wd(a,up(this,b))};function Ir(a){a=a?a:{};sp.call(this);this.defaultDataProjection=Lc("EPSG:4326");this.b=a.altitudeMode?a.altitudeMode:"none"}v(Ir,Gr);var Jr=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,Kr=/^H.([A-Z]{3}).*?:(.*)/,Lr=/^HFDTE(\d{2})(\d{2})(\d{2})/,Mr=/\r\n|\r|\n/;k=Ir.prototype;
k.ve=function(a,b){var c=this.b,d=a.split(Mr);a={};var e=[],f=2E3,g=0,h=1,l=-1,m;var n=0;for(m=d.length;n<m;++n){var p=d[n],q;if("B"==p.charAt(0)){if(q=Jr.exec(p)){p=parseInt(q[1],10);var t=parseInt(q[2],10),u=parseInt(q[3],10),w=parseInt(q[4],10)+parseInt(q[5],10)/6E4;"S"==q[6]&&(w=-w);var z=parseInt(q[7],10)+parseInt(q[8],10)/6E4;"W"==q[9]&&(z=-z);e.push(z,w);"none"!=c&&e.push("gps"==c?parseInt(q[11],10):"barometric"==c?parseInt(q[12],10):0);q=Date.UTC(f,g,h,p,t,u);q<l&&(q=Date.UTC(f,g,h+1,p,t,
u));e.push(q/1E3);l=q}}else"H"==p.charAt(0)&&((q=Lr.exec(p))?(h=parseInt(q[1],10),g=parseInt(q[2],10)-1,f=2E3+parseInt(q[3],10)):(q=Kr.exec(p))&&(a[q[1]]=q[2].trim()))}if(0===e.length)return null;d=new K(null);d.fa("none"==c?"XYM":"XYZM",e);b=new E(vp(d,!1,b));b.J(a);return b};k.ah=function(a,b){return(a=this.ve(a,b))?[a]:[]};k.Ee=function(){};k.Ch=function(){};k.Wd=function(){};k.Pd=function(){};function Nr(a,b,c,d,e,f){Qa.call(this);this.j=null;this.O=a?a:new Image;null!==d&&(this.O.crossOrigin=d);this.c=f?document.createElement("CANVAS"):null;this.f=f;this.i=null;this.g=e;this.a=c;this.l=b;this.o=!1;2==this.g&&Or(this)}v(Nr,Qa);function Or(a){var b=pd(1,1);try{b.drawImage(a.O,0,0),b.getImageData(0,0,1,1)}catch(c){a.o=!0}}Nr.prototype.s=function(){this.g=3;this.i.forEach(Ca);this.i=null;this.b("change")};
Nr.prototype.I=function(){this.g=2;this.a&&(this.O.width=this.a[0],this.O.height=this.a[1]);this.a=[this.O.width,this.O.height];this.i.forEach(Ca);this.i=null;Or(this);if(!this.o&&null!==this.f){this.c.width=this.O.width;this.c.height=this.O.height;var a=this.c.getContext("2d");a.drawImage(this.O,0,0);for(var b=a.getImageData(0,0,this.O.width,this.O.height),c=b.data,d=this.f[0]/255,e=this.f[1]/255,f=this.f[2]/255,g=0,h=c.length;g<h;g+=4)c[g]*=d,c[g+1]*=e,c[g+2]*=f;a.putImageData(b,0,0)}this.b("change")};
Nr.prototype.W=function(){return this.c?this.c:this.O};Nr.prototype.load=function(){if(0==this.g){this.g=1;this.i=[Ia(this.O,"error",this.s,this),Ia(this.O,"load",this.I,this)];try{this.O.src=this.l}catch(a){this.s()}}};function vl(a){a=a||{};this.f=void 0!==a.anchor?a.anchor:[.5,.5];this.o=null;this.a=void 0!==a.anchorOrigin?a.anchorOrigin:"top-left";this.v=void 0!==a.anchorXUnits?a.anchorXUnits:"fraction";this.C=void 0!==a.anchorYUnits?a.anchorYUnits:"fraction";this.ea=void 0!==a.crossOrigin?a.crossOrigin:null;var b=void 0!==a.img?a.img:null,c=void 0!==a.imgSize?a.imgSize:null,d=a.src;gb(!(void 0!==d&&b),4);gb(!b||b&&c,5);void 0!==d&&0!==d.length||!b||(d=b.src||x(b).toString());gb(void 0!==d&&0<d.length,6);var e=
void 0!==a.src?0:2;this.c=void 0!==a.color?Od(a.color):null;var f=this.ea,g=this.c,h=Ao.get(d,f,g);h||(h=new Nr(b,d,c,f,e,g),Ao.set(d,f,g,h));this.b=h;this.B=void 0!==a.offset?a.offset:[0,0];this.g=void 0!==a.offsetOrigin?a.offsetOrigin:"top-left";this.s=null;this.I=void 0!==a.size?a.size:null;gj.call(this,{opacity:void 0!==a.opacity?a.opacity:1,rotation:void 0!==a.rotation?a.rotation:0,scale:void 0!==a.scale?a.scale:1,snapToPixel:void 0!==a.snapToPixel?a.snapToPixel:!0,rotateWithView:void 0!==a.rotateWithView?
a.rotateWithView:!1})}v(vl,gj);k=vl.prototype;k.clone=function(){return new vl({anchor:this.f.slice(),anchorOrigin:this.a,anchorXUnits:this.v,anchorYUnits:this.C,crossOrigin:this.ea,color:this.c&&this.c.slice?this.c.slice():this.c||void 0,src:this.b.l,offset:this.B.slice(),offsetOrigin:this.g,size:null!==this.I?this.I.slice():void 0,opacity:this.La(),scale:this.Ma(),snapToPixel:this.l,rotation:this.i,rotateWithView:this.j})};
Patrick's avatar
Patrick committed
653
k.Gc=function(){if(this.o)return this.o;var a=this.f,b=this.gc();if("fraction"==this.v||"fraction"==this.C){if(!b)return null;a=this.f.slice();"fraction"==this.v&&(a[0]*=b[0]);"fraction"==this.C&&(a[1]*=b[1])}if("top-left"!=this.a){if(!b)return null;a===this.f&&(a=this.f.slice());if("top-right"==this.a||"bottom-right"==this.a)a[0]=-a[0]+b[0];if("bottom-left"==this.a||"bottom-right"==this.a)a[1]=-a[1]+b[1]}return this.o=a};k.zp=function(){return this.c};k.W=function(a){return this.b.W(a)};k.Ye=function(){return this.b.a};
Patrick's avatar
Patrick committed
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
k.yf=function(){return this.b.g};k.Rg=function(){var a=this.b;if(!a.j)if(a.o){var b=a.a[0],c=a.a[1],d=pd(b,c);d.fillRect(0,0,b,c);a.j=d.canvas}else a.j=a.O;return a.j};k.jd=function(){if(this.s)return this.s;var a=this.B;if("top-left"!=this.g){var b=this.gc(),c=this.b.a;if(!b||!c)return null;a=a.slice();if("top-right"==this.g||"bottom-right"==this.g)a[0]=c[0]-b[0]-a[0];if("bottom-left"==this.g||"bottom-right"==this.g)a[1]=c[1]-b[1]-a[1]}return this.s=a};k.Ap=function(){return this.b.l};
k.gc=function(){return this.I?this.I:this.b.a};k.ri=function(a,b){y(this.b,"change",a,b)};k.load=function(){this.b.load()};k.hk=function(a,b){Ja(this.b,"change",a,b)};function Pr(a){a=a||{};this.Zb=a.font;this.b=a.rotation;this.a=a.rotateWithView;this.g=a.scale;this.Ja=a.text;this.Vc=a.textAlign;this.sb=a.textBaseline;this.$a=void 0!==a.fill?a.fill:new kj({color:"#333"});this.eb=void 0!==a.stroke?a.stroke:null;this.Lc=void 0!==a.offsetX?a.offsetX:0;this.Mc=void 0!==a.offsetY?a.offsetY:0}k=Pr.prototype;
k.clone=function(){return new Pr({font:this.Zb,rotation:this.b,rotateWithView:this.a,scale:this.Ma(),text:this.ra(),textAlign:this.Vc,textBaseline:this.sb,fill:this.qa()?this.qa().clone():void 0,stroke:this.pa()?this.pa().clone():void 0,offsetX:this.Lc,offsetY:this.Mc})};k.Cl=function(){return this.Zb};k.Rl=function(){return this.Lc};k.Sl=function(){return this.Mc};k.qa=function(){return this.$a};k.Fp=function(){return this.a};k.Gp=function(){return this.b};k.Ma=function(){return this.g};k.pa=function(){return this.eb};
k.ra=function(){return this.Ja};k.bm=function(){return this.Vc};k.cm=function(){return this.sb};k.Uj=function(a){this.Zb=a};k.$j=function(a){this.Lc=a};k.ak=function(a){this.Mc=a};k.Kf=function(a){this.$a=a};k.Hp=function(a){this.b=a};k.vj=function(a){this.g=a};k.Lf=function(a){this.eb=a};k.Mf=function(a){this.Ja=a};k.ck=function(a){this.Vc=a};k.wr=function(a){this.sb=a};function Qr(a){a=a?a:{};wp.call(this);Rr||(Sr=[255,255,255,1],Tr=new kj({color:Sr}),Ur=[20,2],Vr=Wr="pixels",Xr=[64,64],Yr="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",Zr=.5,$r=new vl({anchor:Ur,anchorOrigin:"bottom-left",anchorXUnits:Wr,anchorYUnits:Vr,crossOrigin:"anonymous",rotation:0,scale:Zr,size:Xr,src:Yr}),as="NO_IMAGE",bs=new Og({color:Sr,width:1}),cs=new Og({color:[51,51,51,1],width:2}),ds=new Pr({font:"bold 16px Helvetica",fill:Tr,stroke:cs,scale:.8}),es=new lj({fill:Tr,
image:$r,text:ds,stroke:bs,zIndex:0}),Rr=[es]);this.defaultDataProjection=Lc("EPSG:4326");this.a=a.defaultStyle?a.defaultStyle:Rr;this.c=void 0!==a.extractStyles?a.extractStyles:!0;this.j=void 0!==a.writeStyles?a.writeStyles:!0;this.b={};this.f=void 0!==a.showPointNames?a.showPointNames:!0}var Rr,Sr,Tr,Ur,Wr,Vr,Xr,Yr,Zr,$r,as,bs,cs,ds,es;v(Qr,wp);
var fs=["http://www.google.com/kml/ext/2.2"],gs=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],hs={fraction:"fraction",pixels:"pixels"};
function is(a,b){var c=[0,0],d="start";if(a.W()){var e=a.W().Ye();null===e&&(e=Xr);2==e.length&&(d=a.W().Ma(),c[0]=d*e[0]/2,c[1]=-d*e[1]/2,d="left")}null!==a.ra()?(e=a.ra(),a=e.clone(),a.Uj(e.Zb||ds.Zb),a.vj(e.Ma()||ds.Ma()),a.Kf(e.qa()||ds.qa()),a.Lf(e.pa()||cs)):a=ds.clone();a.Mf(b);a.$j(c[0]);a.ak(c[1]);a.ck(d);return new lj({text:a})}
function js(a,b,c,d,e){return function(){var f=e,g="";f&&this.V()&&(f="Point"===this.V().U());f&&(g=this.get("name"),f=f&&g);if(a)return f?(f=is(a[0],g),a.concat(f)):a;if(b){var h=ks(b,c,d);return f?(f=is(h[0],g),h.concat(f)):h}return f?(f=is(c[0],g),c.concat(f)):c}}function ks(a,b,c){return Array.isArray(a)?a:"string"===typeof a?(!(a in c)&&"#"+a in c&&(a="#"+a),ks(c[a],b,c)):b}
function ls(a){a=xj(a,!1);if(a=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(a))return a=a[1],[parseInt(a.substr(6,2),16),parseInt(a.substr(4,2),16),parseInt(a.substr(2,2),16),parseInt(a.substr(0,2),16)/255]}function ms(a){a=xj(a,!1);for(var b=[],c=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?))?\s*/i,d;d=c.exec(a);)b.push(parseFloat(d[1]),parseFloat(d[2]),d[3]?parseFloat(d[3]):0),a=a.substr(d[0].length);if(""===a)return b}
function ns(a){var b=xj(a,!1).trim();return a.baseURI?(new URL(b,a.baseURI)).href:b}function os(a){return Ip(a)}function ps(a,b){return I(null,qs,a,b)}function rs(a,b){if(b=I({A:[],kk:[]},ss,a,b)){a=b.A;b=b.kk;var c;var d=0;for(c=Math.min(a.length,b.length);d<c;++d)a[4*d+3]=b[d];b=new K(null);b.fa("XYZM",a);return b}}function ts(a,b){var c=I({},us,a,b);if(a=I(null,vs,a,b))return b=new K(null),b.fa("XYZ",a),b.J(c),b}
function ws(a,b){var c=I({},us,a,b);if(a=I(null,vs,a,b))return b=new M(null),b.fa("XYZ",a,[a.length]),b.J(c),b}
function xs(a,b){a=I([],ys,a,b);if(!a)return null;if(0===a.length)return new Eq(a);var c=!0,d=a[0].U(),e;var f=1;for(e=a.length;f<e;++f)if(b=a[f],b.U()!=d){c=!1;break}if(c)if("Point"==d){var g=a[0];c=g.ma;d=g.ja();f=1;for(e=a.length;f<e;++f)b=a[f],id(d,b.ja());g=new T(null);g.fa(c,d);zs(g,a)}else"LineString"==d?(g=new R(null),zp(g,a),zs(g,a)):"Polygon"==d?(g=new U(null),Bp(g,a),zs(g,a)):"GeometryCollection"==d?g=new Eq(a):gb(!1,37);else g=new Eq(a);return g}
function As(a,b){var c=I({},us,a,b);if(a=I(null,vs,a,b))return b=new L(null),b.fa("XYZ",a),b.J(c),b}function Bs(a,b){var c=I({},us,a,b);if((a=I([null],Cs,a,b))&&a[0]){b=new M(null);var d=a[0],e=[d.length],f;var g=1;for(f=a.length;g<f;++g)id(d,a[g]),e.push(d.length);b.fa("XYZ",d,e);b.J(c);return b}}
function Ds(a,b){b=I({},Es,a,b);if(!b)return null;a="fillStyle"in b?b.fillStyle:Tr;var c=b.fill;void 0===c||c||(a=null);c="imageStyle"in b?b.imageStyle:$r;c==as&&(c=void 0);var d="textStyle"in b?b.textStyle:ds,e="strokeStyle"in b?b.strokeStyle:bs;b=b.outline;void 0===b||b||(e=null);return[new lj({fill:a,image:c,stroke:e,text:d,zIndex:void 0})]}
function zs(a,b){var c=b.length,d=Array(b.length),e=Array(b.length),f,g;var h=g=!1;for(f=0;f<c;++f){var l=b[f];d[f]=l.get("extrude");e[f]=l.get("altitudeMode");h=h||void 0!==d[f];g=g||e[f]}h&&a.set("extrude",d);g&&a.set("altitudeMode",e)}function Fs(a,b){Lj(Gs,a,b)}function Hs(a,b){Lj(Is,a,b)}
var Js=H(gs,{displayName:F(V),value:F(V)}),Gs=H(gs,{Data:function(a,b){var c=a.getAttribute("name");Lj(Js,a,b);a=b[b.length-1];null!==c?a[c]=a.value:null!==a.displayName&&(a[a.displayName]=a.value)},SchemaData:function(a,b){Lj(Ks,a,b)}}),Is=H(gs,{LatLonAltBox:function(a,b){if(a=I({},Ls,a,b))b=b[b.length-1],b.extent=[parseFloat(a.west),parseFloat(a.south),parseFloat(a.east),parseFloat(a.north)],b.altitudeMode=a.altitudeMode,b.minAltitude=parseFloat(a.minAltitude),b.maxAltitude=parseFloat(a.maxAltitude)},
Lod:function(a,b){if(a=I({},Ms,a,b))b=b[b.length-1],b.minLodPixels=parseFloat(a.minLodPixels),b.maxLodPixels=parseFloat(a.maxLodPixels),b.minFadeExtent=parseFloat(a.minFadeExtent),b.maxFadeExtent=parseFloat(a.maxFadeExtent)}}),Ls=H(gs,{altitudeMode:F(V),minAltitude:F(Ip),maxAltitude:F(Ip),north:F(Ip),south:F(Ip),east:F(Ip),west:F(Ip)}),Ms=H(gs,{minLodPixels:F(Ip),maxLodPixels:F(Ip),minFadeExtent:F(Ip),maxFadeExtent:F(Ip)}),us=H(gs,{extrude:F(Fp),altitudeMode:F(V)}),qs=H(gs,{coordinates:Ej(ms)}),Cs=
H(gs,{innerBoundaryIs:function(a,b){(a=I(void 0,Ns,a,b))&&b[b.length-1].push(a)},outerBoundaryIs:function(a,b){(a=I(void 0,Os,a,b))&&(b[b.length-1][0]=a)}}),ss=H(gs,{when:function(a,b){b=b[b.length-1].kk;a=xj(a,!1);a=Date.parse(a);b.push(isNaN(a)?0:a)}},H(fs,{coord:function(a,b){b=b[b.length-1].A;a=xj(a,!1);(a=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(a))?b.push(parseFloat(a[1]),parseFloat(a[2]),parseFloat(a[3]),
0):b.push(0,0,0,0)}})),vs=H(gs,{coordinates:Ej(ms)}),Ps=H(gs,{href:F(ns)},H(fs,{x:F(Ip),y:F(Ip),w:F(Ip),h:F(Ip)})),Qs=H(gs,{Icon:F(function(a,b){return(a=I({},Ps,a,b))?a:null}),heading:F(Ip),hotSpot:F(function(a){var b=a.getAttribute("xunits"),c=a.getAttribute("yunits");return{x:parseFloat(a.getAttribute("x")),Dh:hs[b],y:parseFloat(a.getAttribute("y")),Eh:hs[c]}}),scale:F(os)}),Ns=H(gs,{LinearRing:Ej(ps)}),Rs=H(gs,{color:F(ls),scale:F(os)}),Ss=H(gs,{color:F(ls),width:F(Ip)}),ys=H(gs,{LineString:Dj(ts),
LinearRing:Dj(ws),MultiGeometry:Dj(xs),Point:Dj(As),Polygon:Dj(Bs)}),Ts=H(fs,{Track:Dj(rs)}),Vs=H(gs,{ExtendedData:Fs,Region:Hs,Link:function(a,b){Lj(Us,a,b)},address:F(V),description:F(V),name:F(V),open:F(Fp),phoneNumber:F(V),visibility:F(Fp)}),Us=H(gs,{href:F(ns)}),Os=H(gs,{LinearRing:Ej(ps)}),Ws=H(gs,{Style:F(Ds),key:F(V),styleUrl:F(ns)}),Ys=H(gs,{ExtendedData:Fs,Region:Hs,MultiGeometry:F(xs,"geometry"),LineString:F(ts,"geometry"),LinearRing:F(ws,"geometry"),Point:F(As,"geometry"),Polygon:F(Bs,
"geometry"),Style:F(Ds),StyleMap:function(a,b){if(a=I(void 0,Xs,a,b))b=b[b.length-1],Array.isArray(a)?b.Style=a:"string"===typeof a?b.styleUrl=a:gb(!1,38)},address:F(V),description:F(V),name:F(V),open:F(Fp),phoneNumber:F(V),styleUrl:F(ns),visibility:F(Fp)},H(fs,{MultiTrack:F(function(a,b){if(a=I([],Ts,a,b))return b=new R(null),zp(b,a),b},"geometry"),Track:F(rs,"geometry")})),Zs=H(gs,{color:F(ls),fill:F(Fp),outline:F(Fp)}),Ks=H(gs,{SimpleData:function(a,b){var c=a.getAttribute("name");null!==c&&(a=
V(a),b[b.length-1][c]=a)}}),Es=H(gs,{IconStyle:function(a,b){if(a=I({},Qs,a,b)){b=b[b.length-1];var c="Icon"in a?a.Icon:{},d=!("Icon"in a)||0<Object.keys(c).length,e,f=c.href;f?e=f:d&&(e=Yr);if(f=a.hotSpot){var g=[f.x,f.y];var h=f.Dh;var l=f.Eh}else e===Yr?(g=Ur,h=Wr,l=Vr):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(e)&&(g=[.5,0],l=h="fraction");var m;f=c.x;var n=c.y;void 0!==f&&void 0!==n&&(m=[f,n]);var p;f=c.w;c=c.h;void 0!==f&&void 0!==c&&(p=[f,c]);var q;c=a.heading;void 0!==c&&(q=Rb(c));
a=a.scale;d?(e==Yr&&(p=Xr,void 0===a&&(a=Zr)),e=new vl({anchor:g,anchorOrigin:"bottom-left",anchorXUnits:h,anchorYUnits:l,crossOrigin:"anonymous",offset:m,offsetOrigin:"bottom-left",rotation:q,scale:a,size:p,src:e}),b.imageStyle=e):b.imageStyle=as}},LabelStyle:function(a,b){(a=I({},Rs,a,b))&&(b[b.length-1].textStyle=new Pr({fill:new kj({color:"color"in a?a.color:Sr}),scale:a.scale}))},LineStyle:function(a,b){(a=I({},Ss,a,b))&&(b[b.length-1].strokeStyle=new Og({color:"color"in a?a.color:Sr,width:"width"in
a?a.width:1}))},PolyStyle:function(a,b){if(a=I({},Zs,a,b)){b=b[b.length-1];b.fillStyle=new kj({color:"color"in a?a.color:Sr});var c=a.fill;void 0!==c&&(b.fill=c);a=a.outline;void 0!==a&&(b.outline=a)}}}),Xs=H(gs,{Pair:function(a,b){if(a=I({},Ws,a,b)){var c=a.key;c&&"normal"==c&&((c=a.styleUrl)&&(b[b.length-1]=c),(a=a.Style)&&(b[b.length-1]=a))}}});k=Qr.prototype;
k.Xg=function(a,b){var c=H(gs,{Document:Cj(this.Xg,this),Folder:Cj(this.Xg,this),Placemark:Dj(this.fh,this),Style:this.Oq.bind(this),StyleMap:this.Nq.bind(this)});if(a=I([],c,a,b,this))return a};k.fh=function(a,b){var c=I({geometry:null},Ys,a,b);if(c){var d=new E;a=a.getAttribute("id");null!==a&&d.xc(a);b=b[0];(a=c.geometry)&&vp(a,!1,b);d.Wa(a);delete c.geometry;this.c&&d.Ig(js(c.Style,c.styleUrl,this.a,this.b,this.f));delete c.Style;d.J(c);return d}};
k.Oq=function(a,b){var c=a.getAttribute("id");null!==c&&(b=Ds(a,b))&&(a=a.baseURI?(new URL("#"+c,a.baseURI)).href:"#"+c,this.b[a]=b)};k.Nq=function(a,b){var c=a.getAttribute("id");null!==c&&(b=I(void 0,Xs,a,b))&&(a=a.baseURI?(new URL("#"+c,a.baseURI)).href:"#"+c,this.b[a]=b)};k.Zg=function(a,b){return gd(gs,a.namespaceURI)?(a=this.fh(a,[tp(this,a,b)]))?a:null:null};
k.wc=function(a,b){if(!gd(gs,a.namespaceURI))return[];var c=a.localName;if("Document"==c||"Folder"==c)return(c=this.Xg(a,[tp(this,a,b)]))?c:[];if("Placemark"==c)return(b=this.fh(a,[tp(this,a,b)]))?[b]:[];if("kml"==c){c=[];for(a=a.firstElementChild;a;a=a.nextElementSibling){var d=this.wc(a,b);d&&id(c,d)}return c}return[]};k.Eq=function(a){if(zj(a))return $s(this,a);if(Aj(a))return at(this,a);if("string"===typeof a)return a=Bj(a),$s(this,a)};
function $s(a,b){for(b=b.firstChild;b;b=b.nextSibling)if(b.nodeType==Node.ELEMENT_NODE){var c=at(a,b);if(c)return c}}function at(a,b){var c;for(c=b.firstElementChild;c;c=c.nextElementSibling)if(gd(gs,c.namespaceURI)&&"name"==c.localName)return V(c);for(c=b.firstElementChild;c;c=c.nextElementSibling)if(b=c.localName,gd(gs,c.namespaceURI)&&("Document"==b||"Folder"==b||"Placemark"==b||"kml"==b)&&(b=at(a,c)))return b}
k.Fq=function(a){var b=[];zj(a)?id(b,bt(this,a)):Aj(a)?id(b,ct(this,a)):"string"===typeof a&&(a=Bj(a),id(b,bt(this,a)));return b};function bt(a,b){var c=[];for(b=b.firstChild;b;b=b.nextSibling)b.nodeType==Node.ELEMENT_NODE&&id(c,ct(a,b));return c}
function ct(a,b){var c,d=[];for(c=b.firstElementChild;c;c=c.nextElementSibling)if(gd(gs,c.namespaceURI)&&"NetworkLink"==c.localName){var e=I({},Vs,c,[]);d.push(e)}for(c=b.firstElementChild;c;c=c.nextElementSibling)b=c.localName,!gd(gs,c.namespaceURI)||"Document"!=b&&"Folder"!=b&&"kml"!=b||id(d,ct(a,c));return d}k.Kq=function(a){var b=[];zj(a)?id(b,dt(this,a)):Aj(a)?id(b,this.Hf(a)):"string"===typeof a&&(a=Bj(a),id(b,dt(this,a)));return b};
function dt(a,b){var c=[];for(b=b.firstChild;b;b=b.nextSibling)b.nodeType==Node.ELEMENT_NODE&&id(c,a.Hf(b));return c}k.Hf=function(a){var b,c=[];for(b=a.firstElementChild;b;b=b.nextElementSibling)if(gd(gs,b.namespaceURI)&&"Region"==b.localName){var d=I({},Is,b,[]);c.push(d)}for(b=a.firstElementChild;b;b=b.nextElementSibling)a=b.localName,!gd(gs,b.namespaceURI)||"Document"!=a&&"Folder"!=a&&"kml"!=a||id(c,this.Hf(b));return c};
function et(a,b){b=Od(b);b=[255*(4==b.length?b[3]:1),b[2],b[1],b[0]];var c;for(c=0;4>c;++c){var d=parseInt(b[c],10).toString(16);b[c]=1==d.length?"0"+d:d}Np(a,b.join(""))}function ft(a,b,c){a={node:a};var d=b.U();if("GeometryCollection"==d){var e=b.Dd();var f=gt}else"MultiPoint"==d?(e=b.Id(),f=ht):"MultiLineString"==d?(e=b.Hc(),f=it):"MultiPolygon"==d?(e=b.bd(),f=jt):gb(!1,39);Mj(a,kt,f,e,c)}function lt(a,b,c){Mj({node:a},mt,nt,[b],c)}
function ot(a,b,c){var d={node:a};b.a&&a.setAttribute("id",b.a);a=b.L();var e={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};e[b.c]=1;var f=Object.keys(a||{}).sort().filter(function(a){return!e[a]});if(0<f.length){var g=Kj(a,f);Mj(d,pt,qt,[{names:f,values:g}],c)}if(f=b.Nc())if(f=f.call(b,0))f=Array.isArray(f)?f[0]:f,this.j&&(a.Style=f),(f=f.ra())&&(a.name=f.ra());f=rt[c[c.length-1].node.namespaceURI];a=Kj(a,f);Mj(d,pt,Jj,a,c,f);a=c[0];(b=b.V())&&(b=vp(b,!0,a));Mj(d,
pt,gt,[b],c)}function st(a,b,c){var d=b.ja();a={node:a};a.layout=b.ma;a.stride=b.ya();Mj(a,tt,ut,[d],c)}function vt(a,b,c){b=b.Ic();var d=b.shift();a={node:a};Mj(a,wt,xt,b,c);Mj(a,wt,yt,[d],c)}function zt(a,b){Op(a,Math.round(1E6*b)/1E6)}
var At=H(gs,["Document","Placemark"]),Dt=H(gs,{Document:G(function(a,b,c){Mj({node:a},Bt,Ct,b,c,void 0,this)}),Placemark:G(ot)}),Bt=H(gs,{Placemark:G(ot)}),Et=H(gs,{Data:G(function(a,b,c){a.setAttribute("name",b.name);a={node:a};b=b.value;"object"==typeof b?(null!==b&&b.displayName&&Mj(a,Et,Jj,[b.displayName],c,["displayName"]),null!==b&&b.value&&Mj(a,Et,Jj,[b.value],c,["value"])):Mj(a,Et,Jj,[b],c,["value"])}),value:G(function(a,b){Np(a,b)}),displayName:G(function(a,b){a.appendChild(vj.createCDATASection(b))})}),
Ft={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},Gt=H(gs,["href"],H(fs,["x","y","w","h"])),Ht=H(gs,{href:G(Np)},H(fs,{x:G(Op),y:G(Op),w:G(Op),h:G(Op)})),It=H(gs,["scale","heading","Icon","hotSpot"]),Kt=H(gs,{Icon:G(function(a,b,c){a={node:a};var d=Gt[c[c.length-1].node.namespaceURI],e=Kj(b,d);Mj(a,Ht,Jj,e,c,d);d=Gt[fs[0]];e=Kj(b,d);Mj(a,Ht,
Jt,e,c,d)}),heading:G(Op),hotSpot:G(function(a,b){a.setAttribute("x",b.x);a.setAttribute("y",b.y);a.setAttribute("xunits",b.Dh);a.setAttribute("yunits",b.Eh)}),scale:G(zt)}),Lt=H(gs,["color","scale"]),Mt=H(gs,{color:G(et),scale:G(zt)}),Nt=H(gs,["color","width"]),Ot=H(gs,{color:G(et),width:G(Op)}),mt=H(gs,{LinearRing:G(st)}),kt=H(gs,{LineString:G(st),Point:G(st),Polygon:G(vt),GeometryCollection:G(ft)}),rt=H(gs,"name open visibility address phoneNumber description styleUrl Style".split(" ")),pt=H(gs,
{ExtendedData:G(function(a,b,c){a={node:a};var d=b.names;b=b.values;for(var e=d.length,f=0;f<e;f++)Mj(a,Et,Pt,[{name:d[f],value:b[f]}],c)}),MultiGeometry:G(ft),LineString:G(st),LinearRing:G(st),Point:G(st),Polygon:G(vt),Style:G(function(a,b,c){a={node:a};var d={},e=b.qa(),f=b.pa(),g=b.W();b=b.ra();g instanceof vl&&(d.IconStyle=g);b&&(d.LabelStyle=b);f&&(d.LineStyle=f);e&&(d.PolyStyle=e);b=Qt[c[c.length-1].node.namespaceURI];d=Kj(d,b);Mj(a,Rt,Jj,d,c,b)}),address:G(Np),description:G(Np),name:G(Np),
open:G(Mp),phoneNumber:G(Np),styleUrl:G(Np),visibility:G(Mp)}),tt=H(gs,{coordinates:G(function(a,b,c){c=c[c.length-1];var d=c.layout;c=c.stride;var e;"XY"==d||"XYM"==d?e=2:"XYZ"==d||"XYZM"==d?e=3:gb(!1,34);var f,g=b.length,h="";if(0<g){h+=b[0];for(d=1;d<e;++d)h+=","+b[d];for(f=c;f<g;f+=c)for(h+=" "+b[f],d=1;d<e;++d)h+=","+b[f+d]}Np(a,h)})}),wt=H(gs,{outerBoundaryIs:G(lt),innerBoundaryIs:G(lt)}),St=H(gs,{color:G(et)}),Qt=H(gs,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),Rt=H(gs,{IconStyle:G(function(a,
b,c){a={node:a};var d={},e=b.gc(),f=b.Ye(),g={href:b.b.l};if(e){g.w=e[0];g.h=e[1];var h=b.Gc(),l=b.jd();l&&f&&0!==l[0]&&l[1]!==e[1]&&(g.x=l[0],g.y=f[1]-(l[1]+e[1]));h&&0!==h[0]&&h[1]!==e[1]&&(d.hotSpot={x:h[0],Dh:"pixels",y:e[1]-h[1],Eh:"pixels"})}d.Icon=g;e=b.Ma();1!==e&&(d.scale=e);b=b.i;0!==b&&(d.heading=b);b=It[c[c.length-1].node.namespaceURI];d=Kj(d,b);Mj(a,Kt,Jj,d,c,b)}),LabelStyle:G(function(a,b,c){a={node:a};var d={},e=b.qa();e&&(d.color=e.b);(b=b.Ma())&&1!==b&&(d.scale=b);b=Lt[c[c.length-
1].node.namespaceURI];d=Kj(d,b);Mj(a,Mt,Jj,d,c,b)}),LineStyle:G(function(a,b,c){a={node:a};var d=Nt[c[c.length-1].node.namespaceURI];b=Kj({color:b.b,width:b.c},d);Mj(a,Ot,Jj,b,c,d)}),PolyStyle:G(function(a,b,c){Mj({node:a},St,Tt,[b.b],c)})});function Jt(a,b,c){return wj(fs[0],"gx:"+c)}function Ct(a,b){return wj(b[b.length-1].node.namespaceURI,"Placemark")}function gt(a,b){if(a)return wj(b[b.length-1].node.namespaceURI,Ft[a.U()])}
var Tt=Hj("color"),ut=Hj("coordinates"),Pt=Hj("Data"),qt=Hj("ExtendedData"),xt=Hj("innerBoundaryIs"),ht=Hj("Point"),it=Hj("LineString"),nt=Hj("LinearRing"),jt=Hj("Polygon"),yt=Hj("outerBoundaryIs");
Qr.prototype.kc=function(a,b){b=up(this,b);var c=wj(gs[4],"kml");c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:gx",fs[0]);c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance");c.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var d={node:c},e={};1<a.length?e.Document=a:1==a.length&&(e.Placemark=a[0]);a=At[c.namespaceURI];
e=Kj(e,a);Mj(d,Dt,Jj,e,[b],a,this);return c};(function(){var a={},b={na:a};(function(c){if("object"===typeof a&&"undefined"!==typeof b)b.na=c();else{var d;"undefined"!==typeof window?d=window:"undefined"!==typeof global?d=global:"undefined"!==typeof self?d=self:d=this;d.ds=c()}})(function(){return function g(a,b,f){function d(h,l){if(!b[h]){if(!a[h]){var m="function"==typeof require&&require;if(!l&&m)return m(h,!0);if(e)return e(h,!0);l=Error("Cannot find module '"+h+"'");throw l.code="MODULE_NOT_FOUND",l;}l=b[h]={na:{}};a[h][0].call(l.na,function(b){var e=
a[h][1][b];return d(e?e:b)},l,l.na,g,a,b,f)}return b[h].na}for(var e="function"==typeof require&&require,m=0;m<f.length;m++)d(f[m]);return d}({1:[function(a,b,f){f.read=function(a,b,d,e,f){var g=8*f-e-1;var h=(1<<g)-1,l=h>>1,m=-7;f=d?f-1:0;var n=d?-1:1,z=a[b+f];f+=n;d=z&(1<<-m)-1;z>>=-m;for(m+=g;0<m;d=256*d+a[b+f],f+=n,m-=8);g=d&(1<<-m)-1;d>>=-m;for(m+=e;0<m;g=256*g+a[b+f],f+=n,m-=8);if(0===d)d=1-l;else{if(d===h)return g?NaN:Infinity*(z?-1:1);g+=Math.pow(2,e);d-=l}return(z?-1:1)*g*Math.pow(2,d-e)};
Patrick's avatar
Patrick committed
699
700
f.write=function(a,b,d,e,f,p){var g,h=8*p-f-1,l=(1<<h)-1,m=l>>1,n=23===f?Math.pow(2,-24)-Math.pow(2,-77):0;p=e?0:p-1;var D=e?1:-1,B=0>b||0===b&&0>1/b?1:0;b=Math.abs(b);isNaN(b)||Infinity===b?(b=isNaN(b)?1:0,e=l):(e=Math.floor(Math.log(b)/Math.LN2),1>b*(g=Math.pow(2,-e))&&(e--,g*=2),b=1<=e+m?b+n/g:b+n*Math.pow(2,1-m),2<=b*g&&(e++,g/=2),e+m>=l?(b=0,e=l):1<=e+m?(b=(b*g-1)*Math.pow(2,f),e+=m):(b=b*Math.pow(2,m-1)*Math.pow(2,f),e=0));for(;8<=f;a[d+p]=b&255,p+=D,b/=256,f-=8);e=e<<f|b;for(h+=f;0<h;a[d+p]=
e&255,p+=D,e/=256,h-=8);a[d+p-D]|=128*B}},{}],2:[function(a,b){function d(a){this.mc=ArrayBuffer.isView&&ArrayBuffer.isView(a)?a:new Uint8Array(a||0);this.type=this.ia=0;this.length=this.mc.length}function e(a,b,d){var e=d.mc;var f=e[d.ia++];var g=(f&112)>>4;if(128>f)return h(a,g,b);f=e[d.ia++];g|=(f&127)<<3;if(128>f)return h(a,g,b);f=e[d.ia++];g|=(f&127)<<10;if(128>f)return h(a,g,b);f=e[d.ia++];g|=(f&127)<<17;if(128>f)return h(a,g,b);f=e[d.ia++];g|=(f&127)<<24;if(128>f)return h(a,g,b);f=e[d.ia++];
Patrick's avatar
Patrick committed
701
702
if(128>f)return h(a,g|(f&1)<<31,b);throw Error("Expected varint not more than 10 bytes");}function h(a,b,d){return d?4294967296*b+(a>>>0):4294967296*(b>>>0)+(a>>>0)}b.na=d;var l=a("ieee754");d.c=0;d.g=1;d.b=2;d.a=5;d.prototype={destroy:function(){this.mc=null},bh:function(a,b,d){for(d=d||this.length;this.ia<d;){var e=this.Sa(),f=e>>3,g=this.ia;this.type=e&7;a(f,b,this);this.ia===g&&this.Br(e)}return b},yq:function(){var a=l.read(this.mc,this.ia,!0,23,4);this.ia+=4;return a},uq:function(){var a=l.read(this.mc,
this.ia,!0,52,8);this.ia+=8;return a},Sa:function(a){var b=this.mc;var d=b[this.ia++];var f=d&127;if(128>d)return f;d=b[this.ia++];f|=(d&127)<<7;if(128>d)return f;d=b[this.ia++];f|=(d&127)<<14;if(128>d)return f;d=b[this.ia++];f|=(d&127)<<21;if(128>d)return f;d=b[this.ia];return e(f|(d&15)<<28,a,this)},Uq:function(){return this.Sa(!0)},ze:function(){var a=this.Sa();return 1===a%2?(a+1)/-2:a/2},nq:function(){return!!this.Sa()},hh:function(){for(var a=this.Sa()+this.ia,b=this.mc,d="",e=this.ia;e<a;){var f=
Patrick's avatar
Patrick committed
703
b[e],g=null,h=239<f?4:223<f?3:191<f?2:1;if(e+h>a)break;if(1===h)128>f&&(g=f);else if(2===h){var l=b[e+1];128===(l&192)&&(g=(f&31)<<6|l&63,127>=g&&(g=null))}else if(3===h){l=b[e+1];var D=b[e+2];128===(l&192)&&128===(D&192)&&(g=(f&15)<<12|(l&63)<<6|D&63,2047>=g||55296<=g&&57343>=g)&&(g=null)}else if(4===h){l=b[e+1];D=b[e+2];var B=b[e+3];128===(l&192)&&128===(D&192)&&128===(B&192)&&(g=(f&15)<<18|(l&63)<<12|(D&63)<<6|B&63,65535>=g||1114112<=g)&&(g=null)}null===g?(g=65533,h=1):65535<g&&(g-=65536,d+=String.fromCharCode(g>>>
Patrick's avatar
Patrick committed
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
10&1023|55296),g=56320|g&1023);d+=String.fromCharCode(g);e+=h}this.ia=a;return d},Br:function(a){a&=7;if(a===d.c)for(;127<this.mc[this.ia++];);else if(a===d.b)this.ia=this.Sa()+this.ia;else if(a===d.a)this.ia+=4;else if(a===d.g)this.ia+=8;else throw Error("Unimplemented type: "+a);}}},{ieee754:1}]},{},[2])(2)});Yg=b.na})();(function(){var a={},b={na:a};(function(c){if("object"===typeof a&&"undefined"!==typeof b)b.na=c();else{var d;"undefined"!==typeof window?d=window:"undefined"!==typeof global?d=global:"undefined"!==typeof self?d=self:d=this;d.hs=c()}})(function(){return function g(a,b,f){function d(h,l){if(!b[h]){if(!a[h]){var m="function"==typeof require&&require;if(!l&&m)return m(h,!0);if(e)return e(h,!0);l=Error("Cannot find module '"+h+"'");throw l.code="MODULE_NOT_FOUND",l;}l=b[h]={na:{}};a[h][0].call(l.na,function(b){var e=
a[h][1][b];return d(e?e:b)},l,l.na,g,a,b,f)}return b[h].na}for(var e="function"==typeof require&&require,m=0;m<f.length;m++)d(f[m]);return d}({1:[function(a,b){function d(a,b){this.x=a;this.y=b}b.na=d;d.prototype={clone:function(){return new d(this.x,this.y)},add:function(a){return this.clone().Fk(a)},sub:function(a){return this.clone().Tk(a)},rotate:function(a){return this.clone().Qk(a)},round:function(){return this.clone().Rk()},angle:function(){return Math.atan2(this.y,this.x)},Fk:function(a){this.x+=
a.x;this.y+=a.y;return this},Tk:function(a){this.x-=a.x;this.y-=a.y;return this},Qk:function(a){var b=Math.cos(a);a=Math.sin(a);var d=a*this.x+b*this.y;this.x=b*this.x-a*this.y;this.y=d;return this},Rk:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this}};d.convert=function(a){return a instanceof d?a:Array.isArray(a)?new d(a[0],a[1]):a}},{}],2:[function(a,b){b.na.Ek=a("./lib/vectortile.js");b.na.Zr=a("./lib/vectortilefeature.js");b.na.$r=a("./lib/vectortilelayer.js")},{"./lib/vectortile.js":3,
"./lib/vectortilefeature.js":4,"./lib/vectortilelayer.js":5}],3:[function(a,b){function d(a,b,d){3===a&&(a=new e(d,d.Sa()+d.ia),a.length&&(b[a.name]=a))}var e=a("./vectortilelayer");b.na=function(a,b){this.layers=a.bh(d,{},b)}},{"./vectortilelayer":5}],4:[function(a,b){function d(a,b,d,f,g){this.properties={};this.extent=d;this.type=0;this.Wc=a;this.$f=-1;this.Le=f;this.Ne=g;a.bh(e,this,b)}function e(a,b,d){if(1==a)b.id=d.Sa();else if(2==a)for(a=d.Sa()+d.ia;d.ia<a;){var e=b.Le[d.Sa()],f=b.Ne[d.Sa()];
b.properties[e]=f}else 3==a?b.type=d.Sa():4==a&&(b.$f=d.ia)}var h=a("point-geometry");b.na=d;d.a=["Unknown","Point","LineString","Polygon"];d.prototype.si=function(){var a=this.Wc;a.ia=this.$f;for(var b=a.Sa()+a.ia,d=1,e=0,f=0,g=0,u=[],w;a.ia<b;)if(e||(e=a.Sa(),d=e&7,e>>=3),e--,1===d||2===d)f+=a.ze(),g+=a.ze(),1===d&&(w&&u.push(w),w=[]),w.push(new h(f,g));else if(7===d)w&&w.push(w[0].clone());else throw Error("unknown command "+d);w&&u.push(w);return u};d.prototype.bbox=function(){var a=this.Wc;a.ia=
this.$f;for(var b=a.Sa()+a.ia,d=1,e=0,f=0,g=0,h=Infinity,w=-Infinity,z=Infinity,D=-Infinity;a.ia<b;)if(e||(e=a.Sa(),d=e&7,e>>=3),e--,1===d||2===d)f+=a.ze(),g+=a.ze(),f<h&&(h=f),f>w&&(w=f),g<z&&(z=g),g>D&&(D=g);else if(7!==d)throw Error("unknown command "+d);return[h,z,w,D]}},{"point-geometry":1}],5:[function(a,b){function d(a,b){this.version=1;this.name=null;this.extent=4096;this.length=0;this.Wc=a;this.Le=[];this.Ne=[];this.Ke=[];a.bh(e,this,b);this.length=this.Ke.length}function e(a,b,d){15===a?
b.version=d.Sa():1===a?b.name=d.hh():5===a?b.extent=d.Sa():2===a?b.Ke.push(d.ia):3===a?b.Le.push(d.hh()):4===a&&b.Ne.push(h(d))}function h(a){for(var b=null,d=a.Sa()+a.ia;a.ia<d;)b=a.Sa()>>3,b=1===b?a.hh():2===b?a.yq():3===b?a.uq():4===b?a.Uq():5===b?a.Sa():6===b?a.ze():7===b?a.nq():null;return b}var l=a("./vectortilefeature.js");b.na=d;d.prototype.feature=function(a){if(0>a||a>=this.Ke.length)throw Error("feature index out of bounds");this.Wc.ia=this.Ke[a];a=this.Wc.Sa()+this.Wc.ia;return new l(this.Wc,
a,this.extent,this.Le,this.Ne)}},{"./vectortilefeature.js":4}]},{},[2])(2)});Zg=b.na})();function Ut(a,b,c,d){this.g=a;this.b=b;this.i=c;this.c=d}k=Ut.prototype;k.get=function(a){return this.c[a]};k.$b=function(){return this.i};k.D=function(){this.a||(this.a="Point"===this.g?sb(this.b):tb(this.b,0,this.b.length,2));return this.a};k.sc=function(){return this.b};k.ja=Ut.prototype.sc;k.V=function(){return this};k.L=function(){return this.c};k.me=Ut.prototype.V;k.ya=function(){return 2};k.Nc=ua;k.U=function(){return this.g};function Vt(a){sp.call(this);a=a?a:{};this.defaultDataProjection=new sc({code:"",units:"tile-pixels"});this.b=a.featureClass?a.featureClass:Ut;this.g=a.geometryName;this.a=a.layerName?a.layerName:"layer";this.c=a.layers?a.layers:null}v(Vt,sp);k=Vt.prototype;k.U=function(){return"arraybuffer"};
k.Oa=function(a,b){var c=this.c;a=new Yg(a);a=new Zg.Ek(a);var d=[],e=this.b,f;for(f in a.layers)if(!c||-1!=c.indexOf(f)){var g=a.layers[f];for(var h=0,l=g.length;h<l;++h){if(e===Ut){var m=void 0;var n=g.feature(h),p=f,q=n.si(),t=[],u=[];Wt(q,u,t);var w=n.type;1===w?m=1===q.length?"Point":"MultiPoint":2===w?m=1===q.length?"LineString":"MultiLineString":3===w&&(m="Polygon");n=n.properties;n[this.a]=p;m=new this.b(m,u,t,n)}else{w=g.feature(h);n=f;u=b;m=new this.b;p=w.id;t=w.properties;t[this.a]=n;this.g&&
m.pd(this.g);n=void 0;q=w.type;if(0===q)n=null;else{w=w.si();var z=[],D=[];Wt(w,D,z);1===q?n=1===w.length?new L(null):new T(null):2===q?1===w.length?n=new K(null):n=new R(null):3===q&&(n=new M(null));n.fa("XY",D,z)}u=vp(n,!1,up(this,u));m.Wa(u);m.xc(p);m.J(t)}d.push(m)}}return d};k.hb=function(){return this.defaultDataProjection};k.ho=function(a){this.c=a};
function Wt(a,b,c){for(var d=0,e=0,f=a.length;e<f;++e){var g=a[e],h;var l=0;for(h=g.length;l<h;++l){var m=g[l];b.push(m.x,m.y)}d+=2*l;c.push(d)}}k.hc=function(){};k.od=function(){};k.Vd=function(){};k.wd=function(){};k.Xb=function(){};function Xt(){wp.call(this);this.defaultDataProjection=Lc("EPSG:4326")}v(Xt,wp);function Yt(a,b){b[b.length-1].De[a.getAttribute("k")]=a.getAttribute("v")}
var Zt=[null],$t=H(Zt,{nd:function(a,b){b[b.length-1].Gd.push(a.getAttribute("ref"))},tag:Yt}),bu=H(Zt,{node:function(a,b){var c=b[0],d=b[b.length-1],e=a.getAttribute("id"),f=[parseFloat(a.getAttribute("lon")),parseFloat(a.getAttribute("lat"))];d.wi[e]=f;a=I({De:{}},au,a,b);Aa(a.De)||(f=new L(f),vp(f,!1,c),c=new E(f),c.xc(e),c.J(a.De),d.features.push(c))},way:function(a,b){var c=b[0],d=a.getAttribute("id");a=I({Gd:[],De:{}},$t,a,b);b=b[b.length-1];for(var e=[],f=0,g=a.Gd.length;f<g;f++)id(e,b.wi[a.Gd[f]]);
a.Gd[0]==a.Gd[a.Gd.length-1]?(f=new M(null),f.fa("XY",e,[e.length])):(f=new K(null),f.fa("XY",e));vp(f,!1,c);c=new E(f);c.xc(d);c.J(a.De);b.features.push(c)}}),au=H(Zt,{tag:Yt});Xt.prototype.wc=function(a,b){b=tp(this,a,b);return"osm"==a.localName&&(a=I({wi:{},features:[]},bu,a,[b]),a.features)?a.features:[]};Xt.prototype.Bh=function(){};Xt.prototype.kc=function(){};Xt.prototype.Ge=function(){};function cu(a){return a.getAttributeNS("http://www.w3.org/1999/xlink","href")};function du(){}du.prototype.read=function(a){return zj(a)?this.a(a):Aj(a)?this.b(a):"string"===typeof a?(a=Bj(a),this.a(a)):null};function eu(){}v(eu,du);eu.prototype.a=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return this.b(a);return null};eu.prototype.b=function(a){return(a=I({},fu,a,[]))?a:null};
var gu=[null,"http://www.opengis.net/ows/1.1"],fu=H(gu,{ServiceIdentification:F(function(a,b){return I({},hu,a,b)}),ServiceProvider:F(function(a,b){return I({},iu,a,b)}),OperationsMetadata:F(function(a,b){return I({},ju,a,b)})}),ku=H(gu,{DeliveryPoint:F(V),City:F(V),AdministrativeArea:F(V),PostalCode:F(V),Country:F(V),ElectronicMailAddress:F(V)}),lu=H(gu,{Value:Fj(function(a){return V(a)})}),mu=H(gu,{AllowedValues:F(function(a,b){return I({},lu,a,b)})}),ou=H(gu,{Phone:F(function(a,b){return I({},
nu,a,b)}),Address:F(function(a,b){return I({},ku,a,b)})}),qu=H(gu,{HTTP:F(function(a,b){return I({},pu,a,b)})}),pu=H(gu,{Get:Fj(function(a,b){var c=cu(a);if(c)return I({href:c},ru,a,b)}),Post:void 0}),su=H(gu,{DCP:F(function(a,b){return I({},qu,a,b)})}),ju=H(gu,{Operation:function(a,b){var c=a.getAttribute("name");(a=I({},su,a,b))&&(b[b.length-1][c]=a)}}),nu=H(gu,{Voice:F(V),Facsimile:F(V)}),ru=H(gu,{Constraint:Fj(function(a,b){var c=a.getAttribute("name");if(c)return I({name:c},mu,a,b)})}),tu=H(gu,
{IndividualName:F(V),PositionName:F(V),ContactInfo:F(function(a,b){return I({},ou,a,b)})}),hu=H(gu,{Title:F(V),ServiceTypeVersion:F(V),ServiceType:F(V)}),iu=H(gu,{ProviderName:F(V),ProviderSite:F(cu),ServiceContact:F(function(a,b){return I({},tu,a,b)})});function uu(a,b,c,d){var e;void 0!==d?e=d:e=[];for(var f=d=0;f<b;){var g=a[f++];e[d++]=a[f++];e[d++]=g;for(g=2;g<c;++g)e[d++]=a[f++]}e.length=d};function vu(a){a=a?a:{};sp.call(this);this.defaultDataProjection=Lc("EPSG:4326");this.b=a.factor?a.factor:1E5;this.a=a.geometryLayout?a.geometryLayout:"XY"}v(vu,Gr);function wu(a,b,c){var d,e=Array(b);for(d=0;d<b;++d)e[d]=0;var f;var g=0;for(f=a.length;g<f;)for(d=0;d<b;++d,++g){var h=a[g],l=h-e[d];e[d]=h;a[g]=l}return xu(a,c?c:1E5)}function yu(a,b,c){var d,e=Array(b);for(d=0;d<b;++d)e[d]=0;a=zu(a,c?c:1E5);var f;c=0;for(f=a.length;c<f;)for(d=0;d<b;++d,++c)e[d]+=a[c],a[c]=e[d];return a}
function xu(a,b){b=b?b:1E5;var c;var d=0;for(c=a.length;d<c;++d)a[d]=Math.round(a[d]*b);b=0;for(d=a.length;b<d;++b)c=a[b],a[b]=0>c?~(c<<1):c<<1;b="";d=0;for(c=a.length;d<c;++d){for(var e,f=a[d],g="";32<=f;)e=(32|f&31)+63,g+=String.fromCharCode(e),f>>=5;g+=String.fromCharCode(f+63);b+=g}return b}
function zu(a,b){b=b?b:1E5;var c=[],d=0,e=0,f;var g=0;for(f=a.length;g<f;++g){var h=a.charCodeAt(g)-63;d|=(h&31)<<e;32>h?(c.push(d),e=d=0):e+=5}a=0;for(d=c.length;a<d;++a)e=c[a],c[a]=e&1?~(e>>1):e>>1;a=0;for(d=c.length;a<d;++a)c[a]/=b;return c}k=vu.prototype;k.ve=function(a,b){a=this.Pd(a,b);return new E(a)};k.ah=function(a,b){return[this.ve(a,b)]};k.Pd=function(a,b){var c=Xd(this.a);a=yu(a,c,this.b);uu(a,a.length,c,a);c=Vk(a,0,a.length,c);return vp(new K(c,this.a),!1,up(this,b))};
k.Ee=function(a,b){if(a=a.V())return this.Wd(a,b);gb(!1,40);return""};k.Ch=function(a,b){return this.Ee(a[0],b)};k.Wd=function(a,b){a=vp(a,!0,up(this,b));b=a.ja();a=a.ya();uu(b,b.length,a,b);return wu(b,a,this.b)};function Au(a){a=a?a:{};sp.call(this);this.defaultDataProjection=Lc(a.defaultDataProjection?a.defaultDataProjection:"EPSG:4326")}v(Au,Zp);function Bu(a,b){var c=[],d,e;var f=0;for(e=a.length;f<e;++f){var g=a[f];0<f&&c.pop();0<=g?d=b[g]:d=b[~g].slice().reverse();c.push.apply(c,d)}a=0;for(b=c.length;a<b;++a)c[a]=c[a].slice();return c}function Cu(a,b,c,d,e){a=a.geometries;var f=[],g;var h=0;for(g=a.length;h<g;++h)f[h]=Du(a[h],b,c,d,e);return f}
function Du(a,b,c,d,e){var f=a.type,g=Eu[f];b="Point"===f||"MultiPoint"===f?g(a,c,d):g(a,b);c=new E;c.Wa(vp(b,!1,e));void 0!==a.id&&c.xc(a.id);a.properties&&c.J(a.properties);return c}
Au.prototype.$g=function(a,b){if("Topology"==a.type){var c=null,d=null;if(a.transform){var e=a.transform;c=e.scale;d=e.translate}var f=a.arcs;if(e){e=c;var g=d,h;var l=0;for(h=f.length;l<h;++l){var m,n=f[l],p=e,q=g,t=0,u=0;var w=0;for(m=n.length;w<m;++w){var z=n[w];t+=z[0];u+=z[1];z[0]=t;z[1]=u;Fu(z,p,q)}}}e=[];a=za(a.objects);g=0;for(l=a.length;g<l;++g)"GeometryCollection"===a[g].type?(h=a[g],e.push.apply(e,Cu(h,f,c,d,b))):(h=a[g],e.push(Du(h,f,c,d,b)));return e}return[]};
function Fu(a,b,c){a[0]=a[0]*b[0]+c[0];a[1]=a[1]*b[1]+c[1]}Au.prototype.gh=function(){return this.defaultDataProjection};
var Eu={Point:function(a,b,c){a=a.coordinates;b&&c&&Fu(a,b,c);return new L(a)},LineString:function(a,b){a=Bu(a.arcs,b);return new K(a)},Polygon:function(a,b){var c=[],d;var e=0;for(d=a.arcs.length;e<d;++e)c[e]=Bu(a.arcs[e],b);return new M(c)},MultiPoint:function(a,b,c){a=a.coordinates;var d;if(b&&c){var e=0;for(d=a.length;e<d;++e)Fu(a[e],b,c)}return new T(a)},MultiLineString:function(a,b){var c=[],d;var e=0;for(d=a.arcs.length;e<d;++e)c[e]=Bu(a.arcs[e],b);return new R(c)},MultiPolygon:function(a,
b){var c=[],d,e;var f=0;for(e=a.arcs.length;f<e;++f){var g=a.arcs[f];var h=[];var l=0;for(d=g.length;l<d;++l)h[l]=Bu(g[l],b);c[f]=h}return new U(c)}};k=Au.prototype;k.vd=function(){};k.Fe=function(){};k.He=function(){};k.eh=function(){};k.md=function(){};function Gu(a){a=a?a:{};this.f=a.featureType;this.c=a.featureNS;this.b=a.gmlFormat?a.gmlFormat:new W;this.a=a.schemaLocation?a.schemaLocation:Hu["1.1.0"];wp.call(this)}v(Gu,wp);var Hu={"1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"};
Gu.prototype.wc=function(a,b){var c={featureType:this.f,featureNS:this.c};wa(c,tp(this,a,b?b:{}));b=[c];this.b.b["http://www.opengis.net/gml"].featureMember=Dj(Cp.prototype.we);(a=I([],this.b.b,a,b,this.b))||(a=[]);return a};Gu.prototype.l=function(a){if(zj(a))return Iu(a);if(Aj(a))return I({},Ju,a,[]);if("string"===typeof a)return a=Bj(a),Iu(a)};Gu.prototype.j=function(a){if(zj(a))return Ku(this,a);if(Aj(a))return Lu(this,a);if("string"===typeof a)return a=Bj(a),Ku(this,a)};
function Ku(a,b){for(b=b.firstChild;b;b=b.nextSibling)if(b.nodeType==Node.ELEMENT_NODE)return Lu(a,b)}var Mu={"http://www.opengis.net/gml":{boundedBy:F(Cp.prototype.ye,"bounds")}};function Lu(a,b){var c={},d=Lp(b.getAttribute("numberOfFeatures"));c.numberOfFeatures=d;return I(c,Mu,b,[],a.b)}
var Nu={"http://www.opengis.net/wfs":{totalInserted:F(Kp),totalUpdated:F(Kp),totalDeleted:F(Kp)}},Ou={"http://www.opengis.net/ogc":{FeatureId:Dj(function(a){return a.getAttribute("fid")})}},Pu={"http://www.opengis.net/wfs":{Feature:function(a,b){Lj(Ou,a,b)}}},Ju={"http://www.opengis.net/wfs":{TransactionSummary:F(function(a,b){return I({},Nu,a,b)},"transactionSummary"),InsertResults:F(function(a,b){return I([],Pu,a,b)},"insertIds")}};
function Iu(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return I({},Ju,a,[])}var Qu={"http://www.opengis.net/wfs":{PropertyName:G(Np)}};function Ru(a,b){var c=wj("http://www.opengis.net/ogc","Filter"),d=wj("http://www.opengis.net/ogc","FeatureId");c.appendChild(d);d.setAttribute("fid",b);a.appendChild(c)}
var Su={"http://www.opengis.net/wfs":{Insert:G(function(a,b,c){var d=c[c.length-1],e=d.gmlVersion;d=wj(d.featureNS,d.featureType);a.appendChild(d);if(2===e){a=Nq.prototype;(e=b.a)&&d.setAttribute("fid",e);e=c[c.length-1];var f=e.featureNS,g=b.c;e.qb||(e.qb={},e.qb[f]={});var h=b.L();b=[];var l=[];for(n in h){var m=h[n];null!==m&&(b.push(n),l.push(m),n==g||m instanceof Td?n in e.qb[f]||(e.qb[f][n]=G(a.Fi,a)):n in e.qb[f]||(e.qb[f][n]=G(Np)))}var n=wa({},e);n.node=d;Mj(n,e.qb,Hj(void 0,f),l,c,b)}else W.prototype.Lg(d,
b,c)}),Update:G(function(a,b,c){var d=c[c.length-1];gb(void 0!==b.a,27);var e=d.featureType,f=d.featurePrefix;f=f?f:"feature";var g=d.featureNS;a.setAttribute("typeName",f+":"+e);a.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+f,g);e=b.a;if(void 0!==e){f=b.P();g=[];for(var h=0,l=f.length;h<l;h++){var m=b.get(f[h]);void 0!==m&&g.push({name:f[h],value:m})}Mj({gmlVersion:d.gmlVersion,node:a,srsName:d.srsName},Su,Hj("Property"),g,c);Ru(a,e)}}),Delete:G(function(a,b,c){var d=c[c.length-1];gb(void 0!==
b.a,26);c=d.featureType;var e=d.featurePrefix;e=e?e:"feature";d=d.featureNS;a.setAttribute("typeName",e+":"+c);a.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+e,d);b=b.a;void 0!==b&&Ru(a,b)}),Property:G(function(a,b,c){var d=wj("http://www.opengis.net/wfs","Name"),e=c[c.length-1].gmlVersion;a.appendChild(d);Np(d,b.name);void 0!==b.value&&null!==b.value&&(d=wj("http://www.opengis.net/wfs","Value"),a.appendChild(d),b.value instanceof Td?2===e?Nq.prototype.Fi(d,b.value,c):W.prototype.Sb(d,
b.value,c):Np(d,b.value))}),Native:G(function(a,b){b.Ah&&a.setAttribute("vendorId",b.Ah);void 0!==b.ph&&a.setAttribute("safeToIgnore",b.ph);void 0!==b.value&&Np(a,b.value)})}};function Tu(a,b,c){var d={node:a};b.b.forEach(function(a){Mj(d,Uu,Hj(a.Kb),[a],c)})}function Vu(a,b){void 0!==b.a&&a.setAttribute("matchCase",b.a.toString());Wu(a,b.b);Xu(a,""+b.g)}function Yu(a,b,c){a=wj("http://www.opengis.net/ogc",a);Np(a,c);b.appendChild(a)}function Wu(a,b){Yu("PropertyName",a,b)}
function Xu(a,b){Yu("Literal",a,b)}
var Uu={"http://www.opengis.net/wfs":{Query:G(function(a,b,c){var d=c[c.length-1],e=d.featurePrefix,f=d.featureNS,g=d.propertyNames,h=d.srsName;a.setAttribute("typeName",(e?e+":":"")+b);h&&a.setAttribute("srsName",h);f&&a.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+e,f);b=wa({},d);b.node=a;Mj(b,Qu,Hj("PropertyName"),g,c);if(d=d.filter)g=wj("http://www.opengis.net/ogc","Filter"),a.appendChild(g),Mj({node:g},Uu,Hj(d.Kb),[d],c)})},"http://www.opengis.net/ogc":{And:G(Tu),Or:G(Tu),Not:G(function(a,
b,c){b=b.condition;Mj({node:a},Uu,Hj(b.Kb),[b],c)}),BBOX:G(function(a,b,c){c[c.length-1].srsName=b.srsName;Wu(a,b.geometryName);W.prototype.Sb(a,b.extent,c)}),Intersects:G(function(a,b,c){c[c.length-1].srsName=b.srsName;Wu(a,b.geometryName);W.prototype.Sb(a,b.geometry,c)}),Within:G(function(a,b,c){c[c.length-1].srsName=b.srsName;Wu(a,b.geometryName);W.prototype.Sb(a,b.geometry,c)}),PropertyIsEqualTo:G(Vu),PropertyIsNotEqualTo:G(Vu),PropertyIsLessThan:G(Vu),PropertyIsLessThanOrEqualTo:G(Vu),PropertyIsGreaterThan:G(Vu),
PropertyIsGreaterThanOrEqualTo:G(Vu),PropertyIsNull:G(function(a,b){Wu(a,b.b)}),PropertyIsBetween:G(function(a,b){Wu(a,b.b);var c=wj("http://www.opengis.net/ogc","LowerBoundary");a.appendChild(c);Xu(c,""+b.a);c=wj("http://www.opengis.net/ogc","UpperBoundary");a.appendChild(c);Xu(c,""+b.g)}),PropertyIsLike:G(function(a,b){a.setAttribute("wildCard",b.f);a.setAttribute("singleChar",b.i);a.setAttribute("escapeChar",b.g);void 0!==b.a&&a.setAttribute("matchCase",b.a.toString());Wu(a,b.b);Xu(a,""+b.c)})}};
Gu.prototype.o=function(a){var b=wj("http://www.opengis.net/wfs","GetFeature");b.setAttribute("service","WFS");b.setAttribute("version","1.1.0");if(a){a.handle&&b.setAttribute("handle",a.handle);a.outputFormat&&b.setAttribute("outputFormat",a.outputFormat);void 0!==a.maxFeatures&&b.setAttribute("maxFeatures",a.maxFeatures);a.resultType&&b.setAttribute("resultType",a.resultType);void 0!==a.startIndex&&b.setAttribute("startIndex",a.startIndex);void 0!==a.count&&b.setAttribute("count",a.count);var c=
a.filter;if(a.bbox){gb(a.geometryName,12);var d=Cq(a.geometryName,a.bbox,a.srsName);c?c=Bq(c,d):c=d}}b.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",this.a);c={node:b,srsName:a.srsName,featureNS:a.featureNS?a.featureNS:this.c,featurePrefix:a.featurePrefix,geometryName:a.geometryName,filter:c,propertyNames:a.propertyNames?a.propertyNames:[]};gb(Array.isArray(a.featureTypes),11);a=a.featureTypes;c=[c];d=wa({},c[c.length-1]);d.node=b;Mj(d,Uu,Hj("Query"),a,c);return b};
Gu.prototype.s=function(a,b,c,d){var e=[],f=wj("http://www.opengis.net/wfs","Transaction"),g=d.version?d.version:"1.1.0",h="1.0.0"===g?2:3;f.setAttribute("service","WFS");f.setAttribute("version",g);if(d){var l=d.gmlOptions?d.gmlOptions:{};d.handle&&f.setAttribute("handle",d.handle)}f.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",Hu[g]);a&&(g={node:f,featureNS:d.featureNS,featureType:d.featureType,featurePrefix:d.featurePrefix,gmlVersion:h,srsName:d.srsName},wa(g,
l),Mj(g,Su,Hj("Insert"),a,e));b&&(g={node:f,featureNS:d.featureNS,featureType:d.featureType,featurePrefix:d.featurePrefix,gmlVersion:h,srsName:d.srsName},wa(g,l),Mj(g,Su,Hj("Update"),b,e));c&&Mj({node:f,featureNS:d.featureNS,featureType:d.featureType,featurePrefix:d.featurePrefix,gmlVersion:h,srsName:d.srsName},Su,Hj("Delete"),c,e);d.nativeElements&&Mj({node:f,featureNS:d.featureNS,featureType:d.featureType,featurePrefix:d.featurePrefix,gmlVersion:h,srsName:d.srsName},Su,Hj("Native"),d.nativeElements,
e);return f};Gu.prototype.Gf=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return this.Qd(a);return null};Gu.prototype.Qd=function(a){if(a.firstElementChild&&a.firstElementChild.firstElementChild)for(a=a.firstElementChild.firstElementChild,a=a.firstElementChild;a;a=a.nextElementSibling)if(0!==a.childNodes.length&&(1!==a.childNodes.length||3!==a.firstChild.nodeType)){var b=[{}];this.b.ye(a,b);return Lc(b.pop().srsName)}return null};function Zu(a){a=a?a:{};this.j=a.featureType;this.f=a.featureNS;this.b=a.gmlFormat?a.gmlFormat:new Yp;this.a=a.schemaLocation?a.schemaLocation:"http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd";wp.call(this)}v(Zu,wp);
Zu.prototype.wc=function(a,b){var c={featureType:this.j,featureNS:this.f};wa(c,tp(this,a,b?b:{}));b=[c];this.b.b["http://www.opengis.net/wfs/2.0"]={};this.b.b["http://www.opengis.net/wfs/2.0"].member=Dj(Zu.prototype.c,this);(a=I([],this.b.b,a,b,this.b))||(a=[]);return a};Zu.prototype.o=function(a){if(zj(a))return $u(a);if(Aj(a))return I({},av,a,[]);if("string"===typeof a)return a=Bj(a),$u(a)};
Zu.prototype.l=function(a){if(zj(a))return bv(this,a);if(Aj(a))return cv(this,a);if("string"===typeof a)return a=Bj(a),bv(this,a)};function bv(a,b){for(b=b.firstChild;b;b=b.nextSibling)if(b.nodeType==Node.ELEMENT_NODE)return cv(a,b)}Zu.prototype.c=function(a,b){return I([],this.b.b,a,b,this.b)};var dv={"http://www.opengis.net/wfs/2.0":{member:Dj(Zu.prototype.c)}};function cv(a,b){var c={},d=Lp(b.getAttribute("numberOfFeatures"));c.numberOfFeatures=d;return I(c,dv,b,[],a.b)}
var ev={"http://www.opengis.net/wfs":{totalInserted:F(Kp),totalUpdated:F(Kp),totalDeleted:F(Kp)}},fv={"http://www.opengis.net/ogc":{FeatureId:Dj(function(a){return a.getAttribute("fid")})}},gv={"http://www.opengis.net/wfs":{Feature:function(a,b){Lj(fv,a,b)}}},av={"http://www.opengis.net/wfs":{TransactionSummary:F(function(a,b){return I({},ev,a,b)},"transactionSummary"),InsertResults:F(function(a,b){return I([],gv,a,b)},"insertIds")}};
function $u(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return I({},av,a,[])}var hv={"http://www.opengis.net/wfs/2.0":{PropertyName:G(Np)}};function iv(a,b){var c=wj("http://www.opengis.net/fes/2.0","Filter"),d=wj("http://www.opengis.net/fes/2.0","ResourceId");c.appendChild(d);d.setAttribute("rid",b);a.appendChild(c)}
var jv={"http://www.opengis.net/wfs/2.0":{Insert:G(function(a,b,c){var d=c[c.length-1];d=wj(d.featureNS,d.featureType);a.appendChild(d);W.prototype.Lg(d,b,c)}),Update:G(function(a,b,c){var d=c[c.length-1];gb(void 0!==b.a,27);var e=d.featureType,f=d.featurePrefix;f=f?f:"feature";var g=d.featureNS;a.setAttribute("typeName",f+":"+e);a.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+f,g);e=b.a;if(void 0!==e){f=b.P();g=[];for(var h=0,l=f.length;h<l;h++){var m=b.get(f[h]);void 0!==m&&g.push({name:f[h],
value:m})}Mj({node:a,srsName:d.srsName},jv,Hj("Property"),g,c);iv(a,e)}}),Delete:G(function(a,b,c){var d=c[c.length-1];gb(void 0!==b.a,26);c=d.featureType;var e=d.featurePrefix;e=e?e:"feature";d=d.featureNS;a.setAttribute("typeName",e+":"+c);a.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+e,d);b=b.a;void 0!==b&&iv(a,b)}),Property:G(function(a,b,c){var d=wj("http://www.opengis.net/wfs/2.0","ValueReference");a.appendChild(d);Np(d,b.name);void 0!==b.value&&null!==b.value&&(d=wj("http://www.opengis.net/wfs/2.0",
"Value"),a.appendChild(d),b.value instanceof Td?W.prototype.Sb(d,b.value,c):Np(d,b.value))}),Native:G(function(a,b){b.Ah&&a.setAttribute("vendorId",b.Ah);void 0!==b.ph&&a.setAttribute("safeToIgnore",b.ph);void 0!==b.value&&Np(a,b.value)})}};function kv(a,b,c){var d={node:a};b.b.forEach(function(a){Mj(d,lv,Hj(a.Kb),[a],c)})}function mv(a,b){void 0!==b.a&&a.setAttribute("matchCase",b.a.toString());nv(a,b.b);ov(a,""+b.g)}
function pv(a,b,c){a=wj("http://www.opengis.net/fes/2.0",a);Np(a,c);b.appendChild(a)}function nv(a,b){pv("ValueReference",a,b)}function ov(a,b){pv("Literal",a,b)}
var lv={"http://www.opengis.net/wfs/2.0":{Query:G(function(a,b,c){var d=c[c.length-1],e=d.featurePrefix,f=d.featureNS,g=d.propertyNames,h=d.srsName;a.setAttribute("typeNames","schema-element("+(e?e+":":"")+b+")");h&&a.setAttribute("srsName",h);f&&a.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+e,f);b=wa({},d);b.node=a;Mj(b,hv,Hj("PropertyName"),g,c);if(d=d.filter)g=wj("http://www.opengis.net/fes/2.0","Filter"),a.appendChild(g),Mj({node:g},lv,Hj(d.Kb),[d],c)})},"http://www.opengis.net/fes/2.0":{And:G(kv),
Or:G(kv),Not:G(function(a,b,c){b=b.condition;Mj({node:a},lv,Hj(b.Kb),[b],c)}),BBOX:G(function(a,b,c){c[c.length-1].srsName=b.srsName;nv(a,b.geometryName);W.prototype.Sb(a,b.extent,c)}),Intersects:G(function(a,b,c){c[c.length-1].srsName=b.srsName;nv(a,b.geometryName);W.prototype.Sb(a,b.geometry,c)}),Within:G(function(a,b,c){c[c.length-1].srsName=b.srsName;nv(a,b.geometryName);W.prototype.Sb(a,b.geometry,c)}),DWithin:G(function(a,b,c){c[c.length-1].srsName=b.srsName;nv(a,b.geometryName);W.prototype.Sb(a,
b.geometry,c);c=wj("http://www.opengis.net/fes/2.0","Distance");Np(c,String(b.distance));c.setAttribute("uom",b.b);a.appendChild(c)}),PropertyIsEqualTo:G(mv),PropertyIsNotEqualTo:G(mv),PropertyIsLessThan:G(mv),PropertyIsLessThanOrEqualTo:G(mv),PropertyIsGreaterThan:G(mv),PropertyIsGreaterThanOrEqualTo:G(mv),PropertyIsNull:G(function(a,b){nv(a,b.b)}),PropertyIsBetween:G(function(a,b){nv(a,b.b);var c=wj("http://www.opengis.net/fes/2.0","LowerBoundary");a.appendChild(c);ov(c,""+b.a);c=wj("http://www.opengis.net/fes/2.0",
"UpperBoundary");a.appendChild(c);ov(c,""+b.g)}),PropertyIsLike:G(function(a,b){a.setAttribute("wildCard",b.f);a.setAttribute("singleChar",b.i);a.setAttribute("escapeChar",b.g);void 0!==b.a&&a.setAttribute("matchCase",b.a.toString());nv(a,b.b);ov(a,""+b.c)})}};
Zu.prototype.s=function(a){var b=wj("http://www.opengis.net/wfs/2.0","GetFeature");b.setAttribute("service","WFS");b.setAttribute("version","2.0.0");if(a){a.handle&&b.setAttribute("handle",a.handle);a.outputFormat&&b.setAttribute("outputFormat",a.outputFormat);void 0!==a.maxFeatures&&b.setAttribute("maxFeatures",a.maxFeatures);a.resultType&&b.setAttribute("resultType",a.resultType);void 0!==a.startIndex&&b.setAttribute("startIndex",a.startIndex);void 0!==a.count&&b.setAttribute("count",a.count);var c=
a.filter;if(a.bbox){gb(a.geometryName,12);var d=Cq(a.geometryName,a.bbox,a.srsName);c?c=Bq(c,d):c=d}}b.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",this.a);if(a.allNs)for(var e in a.allNs)a.allNs.hasOwnProperty(e)&&b.setAttribute("xmlns__--__"+e,a.allNs[e]);c={node:b,srsName:a.srsName,featureNS:a.featureNS?a.featureNS:this.f,featurePrefix:a.featurePrefix,geometryName:a.geometryName,filter:c,propertyNames:a.propertyNames?a.propertyNames:[]};gb(Array.isArray(a.featureTypes),
11);a=a.featureTypes;c=[c];d=wa({},c[c.length-1]);d.node=b;Mj(d,lv,Hj("Query"),a,c);return b};
Zu.prototype.I=function(a,b,c,d){var e=[],f=wj("http://www.opengis.net/wfs/2.0","Transaction");f.setAttribute("service","WFS");f.setAttribute("version","2.0.0");if(d){var g=d.gmlOptions?d.gmlOptions:{};d.handle&&f.setAttribute("handle",d.handle)}f.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",this.a);if(a){var h={node:f,featureNS:d.featureNS,featureType:d.featureType,featurePrefix:d.featurePrefix,srsName:d.srsName};wa(h,g);Mj(h,jv,Hj("Insert"),a,e)}b&&(h={node:f,
featureNS:d.featureNS,featureType:d.featureType,featurePrefix:d.featurePrefix,srsName:d.srsName},wa(h,g),Mj(h,jv,Hj("Update"),b,e));c&&Mj({node:f,featureNS:d.featureNS,featureType:d.featureType,featurePrefix:d.featurePrefix,srsName:d.srsName},jv,Hj("Delete"),c,e);d.nativeElements&&Mj({node:f,featureNS:d.featureNS,featureType:d.featureType,featurePrefix:d.featurePrefix,srsName:d.srsName},jv,Hj("Native"),d.nativeElements,e);return f};
Zu.prototype.Gf=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return this.Qd(a);return null};Zu.prototype.Qd=function(a){if(a.firstElementChild&&a.firstElementChild.firstElementChild)for(a=a.firstElementChild.firstElementChild,a=a.firstElementChild;a;a=a.nextElementSibling)if(0!==a.childNodes.length&&(1!==a.childNodes.length||3!==a.firstChild.nodeType)){var b=[{}];this.b.ye(a,b);return Lc(b.pop().srsName)}return null};function qv(a){a=a?a:{};sp.call(this);this.b=void 0!==a.splitCollection?a.splitCollection:!1}v(qv,Gr);function rv(a){a=a.T();return 0===a.length?"":a.join(" ")}function sv(a){a=a.T();for(var b=[],c=0,d=a.length;c<d;++c)b.push(a[c].join(" "));return b.join(",")}function tv(a){var b=[];a=a.Ic();for(var c=0,d=a.length;c<d;++c)b.push("("+sv(a[c])+")");return b.join(",")}
function uv(a){var b=a.U(),c=(0,vv[b])(a);b=b.toUpperCase();if(a instanceof Wd){a=a.ma;var d="";if("XYZ"===a||"XYZM"===a)d+="Z";if("XYM"===a||"XYZM"===a)d+="M";a=d;0<a.length&&(b+=" "+a)}return 0===c.length?b+" EMPTY":b+"("+c+")"}
var vv={Point:rv,LineString:sv,Polygon:tv,MultiPoint:function(a){var b=[];a=a.Id();for(var c=0,d=a.length;c<d;++c)b.push("("+rv(a[c])+")");return b.join(",")},MultiLineString:function(a){var b=[];a=a.Hc();for(var c=0,d=a.length;c<d;++c)b.push("("+sv(a[c])+")");return b.join(",")},MultiPolygon:function(a){var b=[];a=a.bd();for(var c=0,d=a.length;c<d;++c)b.push("("+tv(a[c])+")");return b.join(",")},GeometryCollection:function(a){var b=[];a=a.Dd();for(var c=0,d=a.length;c<d;++c)b.push(uv(a[c]));return b.join(",")}};
k=qv.prototype;k.ve=function(a,b){return(a=this.Pd(a,b))?(b=new E,b.Wa(a),b):null};k.ah=function(a,b){var c=[];a=this.Pd(a,b);this.b&&"GeometryCollection"==a.U()?c=a.a:c=[a];b=[];for(var d=0,e=c.length;d<e;++d)a=new E,a.Wa(c[d]),b.push(a);return b};k.Pd=function(a,b){a=new wv(new xv(a));yv(a);return(a=zv(a))?vp(a,!1,b):null};k.Ee=function(a,b){return(a=a.V())?this.Wd(a,b):""};
k.Ch=function(a,b){if(1==a.length)return this.Ee(a[0],b);for(var c=[],d=0,e=a.length;d<e;++d)c.push(a[d].V());a=new Eq(c);return this.Wd(a,b)};k.Wd=function(a,b){return uv(vp(a,!0,b))};function xv(a){this.a=a;this.b=-1}
function Av(a){var b=a.a.charAt(++a.b),c={position:a.b,value:b};if("("==b)c.type=2;else if(","==b)c.type=5;else if(")"==b)c.type=3;else if("0"<=b&&"9">=b||"."==b||"-"==b){c.type=4;b=a.b;var d=!1,e=!1;do{if("."==f)d=!0;else if("e"==f||"E"==f)e=!0;var f=a.a.charAt(++a.b)}while("0"<=f&&"9">=f||"."==f&&(void 0===d||!d)||!e&&("e"==f||"E"==f)||e&&("-"==f||"+"==f));a=parseFloat(a.a.substring(b,a.b--));c.value=a}else if("a"<=b&&"z">=b||"A"<=b&&"Z">=b){c.type=1;b=a.b;do f=a.a.charAt(++a.b);while("a"<=f&&"z">=
f||"A"<=f&&"Z">=f);a=a.a.substring(b,a.b--).toUpperCase();c.value=a}else{if(" "==b||"\t"==b||"\r"==b||"\n"==b)return Av(a);if(""===b)c.type=6;else throw Error("Unexpected character: "+b);}return c}function wv(a){this.g=a;this.a="XY"}function yv(a){a.b=Av(a.g)}function Bv(a,b){(b=a.b.type==b)&&yv(a);return b}
function zv(a){var b=a.b;if(Bv(a,1)){b=b.value;var c="XY",d=a.b;1==a.b.type&&(d=d.value,"Z"===d?c="XYZ":"M"===d?c="XYM":"ZM"===d&&(c="XYZM"),"XY"!==c&&yv(a));a.a=c;if("GEOMETRYCOLLECTION"==b){a:{if(Bv(a,2)){b=[];do b.push(zv(a));while(Bv(a,5));if(Bv(a,3)){a=b;break a}}else if(Cv(a)){a=[];break a}throw Error(Dv(a));}return new Eq(a)}d=Ev[b];c=Fv[b];if(!d||!c)throw Error("Invalid geometry type: "+b);b=d.call(a);return new c(b,a.a)}throw Error(Dv(a));}k=wv.prototype;
k.Vg=function(){if(Bv(this,2)){var a=Gv(this);if(Bv(this,3))return a}else if(Cv(this))return null;throw Error(Dv(this));};k.Ug=function(){if(Bv(this,2)){var a=Hv(this);if(Bv(this,3))return a}else if(Cv(this))return[];throw Error(Dv(this));};k.Wg=function(){if(Bv(this,2)){var a=Iv(this);if(Bv(this,3))return a}else if(Cv(this))return[];throw Error(Dv(this));};
k.$p=function(){if(Bv(this,2)){var a;if(2==this.b.type)for(a=[this.Vg()];Bv(this,5);)a.push(this.Vg());else a=Hv(this);if(Bv(this,3))return a}else if(Cv(this))return[];throw Error(Dv(this));};k.Zp=function(){if(Bv(this,2)){var a=Iv(this);if(Bv(this,3))return a}else if(Cv(this))return[];throw Error(Dv(this));};k.aq=function(){if(Bv(this,2)){for(var a=[this.Wg()];Bv(this,5);)a.push(this.Wg());if(Bv(this,3))return a}else if(Cv(this))return[];throw Error(Dv(this));};
function Gv(a){for(var b=[],c=a.a.length,d=0;d<c;++d){var e=a.b;if(Bv(a,4))b.push(e.value);else break}if(b.length==c)return b;throw Error(Dv(a));}function Hv(a){for(var b=[Gv(a)];Bv(a,5);)b.push(Gv(a));return b}function Iv(a){for(var b=[a.Ug()];Bv(a,5);)b.push(a.Ug());return b}function Cv(a){var b=1==a.b.type&&"EMPTY"==a.b.value;b&&yv(a);return b}function Dv(a){return"Unexpected `"+a.b.value+"` at position "+a.b.position+" in `"+a.g.a+"`"}
var Fv={POINT:L,LINESTRING:K,POLYGON:M,MULTIPOINT:T,MULTILINESTRING:R,MULTIPOLYGON:U},Ev={POINT:wv.prototype.Vg,LINESTRING:wv.prototype.Ug,POLYGON:wv.prototype.Wg,MULTIPOINT:wv.prototype.$p,MULTILINESTRING:wv.prototype.Zp,MULTIPOLYGON:wv.prototype.aq};function Jv(){this.version=void 0}v(Jv,du);Jv.prototype.a=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return this.b(a);return null};Jv.prototype.b=function(a){this.version=a.getAttribute("version").trim();return(a=I({version:this.version},Kv,a,[]))?a:null};function Lv(a,b){return I({},Mv,a,b)}function Nv(a,b){return I({},Ov,a,b)}function Pv(a,b){if(b=Lv(a,b))return a=[Lp(a.getAttribute("width")),Lp(a.getAttribute("height"))],b.size=a,b}
function Qv(a,b){return I([],Rv,a,b)}
var Sv=[null,"http://www.opengis.net/wms"],Kv=H(Sv,{Service:F(function(a,b){return I({},Tv,a,b)}),Capability:F(function(a,b){return I({},Uv,a,b)})}),Uv=H(Sv,{Request:F(function(a,b){return I({},Vv,a,b)}),Exception:F(function(a,b){return I([],Wv,a,b)}),Layer:F(function(a,b){return I({},Xv,a,b)})}),Tv=H(Sv,{Name:F(V),Title:F(V),Abstract:F(V),KeywordList:F(Qv),OnlineResource:F(cu),ContactInformation:F(function(a,b){return I({},Yv,a,b)}),Fees:F(V),AccessConstraints:F(V),LayerLimit:F(Kp),MaxWidth:F(Kp),
MaxHeight:F(Kp)}),Yv=H(Sv,{ContactPersonPrimary:F(function(a,b){return I({},Zv,a,b)}),ContactPosition:F(V),ContactAddress:F(function(a,b){return I({},$v,a,b)}),ContactVoiceTelephone:F(V),ContactFacsimileTelephone:F(V),ContactElectronicMailAddress:F(V)}),Zv=H(Sv,{ContactPerson:F(V),ContactOrganization:F(V)}),$v=H(Sv,{AddressType:F(V),Address:F(V),City:F(V),StateOrProvince:F(V),PostCode:F(V),Country:F(V)}),Wv=H(Sv,{Format:Dj(V)}),Xv=H(Sv,{Name:F(V),Title:F(V),Abstract:F(V),KeywordList:F(Qv),CRS:Fj(V),
EX_GeographicBoundingBox:F(function(a,b){var c=I({},aw,a,b);if(c){a=c.westBoundLongitude;b=c.southBoundLatitude;var d=c.eastBoundLongitude;c=c.northBoundLatitude;if(void 0!==a&&void 0!==b&&void 0!==d&&void 0!==c)return[a,b,d,c]}}),BoundingBox:Fj(function(a){var b=[Jp(a.getAttribute("minx")),Jp(a.getAttribute("miny")),Jp(a.getAttribute("maxx")),Jp(a.getAttribute("maxy"))],c=[Jp(a.getAttribute("resx")),Jp(a.getAttribute("resy"))];return{crs:a.getAttribute("CRS"),extent:b,res:c}}),Dimension:Fj(function(a){return{name:a.getAttribute("name"),
units:a.getAttribute("units"),unitSymbol:a.getAttribute("unitSymbol"),"default":a.getAttribute("default"),multipleValues:Gp(a.getAttribute("multipleValues")),nearestValue:Gp(a.getAttribute("nearestValue")),current:Gp(a.getAttribute("current")),values:V(a)}}),Attribution:F(function(a,b){return I({},bw,a,b)}),AuthorityURL:Fj(function(a,b){if(b=Lv(a,b))return b.name=a.getAttribute("name"),b}),Identifier:Fj(V),MetadataURL:Fj(function(a,b){if(b=Lv(a,b))return b.type=a.getAttribute("type"),b}),DataURL:Fj(Lv),
FeatureListURL:Fj(Lv),Style:Fj(function(a,b){return I({},cw,a,b)}),MinScaleDenominator:F(Ip),MaxScaleDenominator:F(Ip),Layer:Fj(function(a,b){var c=b[b.length-1],d=I({},Xv,a,b);if(d)return b=Gp(a.getAttribute("queryable")),void 0===b&&(b=c.queryable),d.queryable=void 0!==b?b:!1,b=Lp(a.getAttribute("cascaded")),void 0===b&&(b=c.cascaded),d.cascaded=b,b=Gp(a.getAttribute("opaque")),void 0===b&&(b=c.opaque),d.opaque=void 0!==b?b:!1,b=Gp(a.getAttribute("noSubsets")),void 0===b&&(b=c.noSubsets),d.noSubsets=
void 0!==b?b:!1,(b=Jp(a.getAttribute("fixedWidth")))||(b=c.fixedWidth),d.fixedWidth=b,(a=Jp(a.getAttribute("fixedHeight")))||(a=c.fixedHeight),d.fixedHeight=a,["Style","CRS","AuthorityURL"].forEach(function(a){a in c&&(d[a]=(d[a]||[]).concat(c[a]))}),"EX_GeographicBoundingBox BoundingBox Dimension Attribution MinScaleDenominator MaxScaleDenominator".split(" ").forEach(function(a){a in d||(d[a]=c[a])}),d})}),bw=H(Sv,{Title:F(V),OnlineResource:F(cu),LogoURL:F(Pv)}),aw=H(Sv,{westBoundLongitude:F(Ip),
eastBoundLongitude:F(Ip),southBoundLatitude:F(Ip),northBoundLatitude:F(Ip)}),Vv=H(Sv,{GetCapabilities:F(Nv),GetMap:F(Nv),GetFeatureInfo:F(Nv)}),Ov=H(Sv,{Format:Fj(V),DCPType:Fj(function(a,b){return I({},dw,a,b)})}),dw=H(Sv,{HTTP:F(function(a,b){return I({},ew,a,b)})}),ew=H(Sv,{Get:F(Lv),Post:F(Lv)}),cw=H(Sv,{Name:F(V),Title:F(V),Abstract:F(V),LegendURL:Fj(Pv),StyleSheetURL:F(Lv),StyleURL:F(Lv)}),Mv=H(Sv,{Format:F(V),OnlineResource:F(cu)}),Rv=H(Sv,{Keyword:Dj(V)});function fw(a){a=a?a:{};this.a="http://mapserver.gis.umn.edu/mapserver";this.b=new Nq;this.c=a.layers?a.layers:null;wp.call(this)}v(fw,wp);
fw.prototype.wc=function(a,b){var c={};b&&wa(c,tp(this,a,b));c=[c];a.setAttribute("namespaceURI",this.a);var d=a.localName;b=[];if(0!==a.childNodes.length){if("msGMLOutput"==d)for(var e=0,f=a.childNodes.length;e<f;e++){var g=a.childNodes[e];if(g.nodeType===Node.ELEMENT_NODE){var h=c[0],l=g.localName.replace("_layer","");if(!this.c||gd(this.c,l)){l+="_feature";h.featureType=l;h.featureNS=this.a;var m={};m[l]=Dj(this.b.Yg,this.b);h=H([h.featureNS,null],m);g.setAttribute("namespaceURI",this.a);(g=I([],
h,g,c,this.b))&&id(b,g)}}}"FeatureCollection"==d&&(a=I([],this.b.b,a,[{}],this.b))&&(b=a)}return b};fw.prototype.Bh=function(){};fw.prototype.kc=function(){};fw.prototype.Ge=function(){};function gw(){this.g=new eu}v(gw,du);gw.prototype.a=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return this.b(a);return null};gw.prototype.b=function(a){var b=a.getAttribute("version").trim(),c=this.g.b(a);if(!c)return null;c.version=b;return(c=I(c,hw,a,[]))?c:null};function iw(a){var b=V(a).split(" ");if(b&&2==b.length&&(a=+b[0],b=+b[1],!isNaN(a)&&!isNaN(b)))return[a,b]}
var jw=[null,"http://www.opengis.net/wmts/1.0"],kw=[null,"http://www.opengis.net/ows/1.1"],hw=H(jw,{Contents:F(function(a,b){return I({},lw,a,b)})}),lw=H(jw,{Layer:Fj(function(a,b){return I({},mw,a,b)}),TileMatrixSet:Fj(function(a,b){return I({},nw,a,b)})}),mw=H(jw,{Style:Fj(function(a,b){if(b=I({},ow,a,b))return a="true"===a.getAttribute("isDefault"),b.isDefault=a,b}),Format:Fj(V),TileMatrixSetLink:Fj(function(a,b){return I({},pw,a,b)}),Dimension:Fj(function(a,b){return I({},qw,a,b)}),ResourceURL:Fj(function(a){var b=
a.getAttribute("format"),c=a.getAttribute("template");a=a.getAttribute("resourceType");var d={};b&&(d.format=b);c&&(d.template=c);a&&(d.resourceType=a);return d})},H(kw,{Title:F(V),Abstract:F(V),WGS84BoundingBox:F(function(a,b){a=I([],rw,a,b);if(2==a.length)return hb(a)}),Identifier:F(V)})),ow=H(jw,{LegendURL:Fj(function(a){var b={};b.format=a.getAttribute("format");b.href=cu(a);return b})},H(kw,{Title:F(V),Identifier:F(V)})),pw=H(jw,{TileMatrixSet:F(V),TileMatrixSetLimits:F(function(a,b){return I([],
sw,a,b)})}),sw=H(jw,{TileMatrixLimits:Dj(function(a,b){return I({},tw,a,b)})}),tw=H(jw,{TileMatrix:F(V),MinTileRow:F(Kp),MaxTileRow:F(Kp),MinTileCol:F(Kp),MaxTileCol:F(Kp)}),qw=H(jw,{Default:F(V),Value:Fj(V)},H(kw,{Identifier:F(V)})),rw=H(kw,{LowerCorner:Dj(iw),UpperCorner:Dj(iw)}),nw=H(jw,{WellKnownScaleSet:F(V),TileMatrix:Fj(function(a,b){return I({},uw,a,b)})},H(kw,{SupportedCRS:F(V),Identifier:F(V)})),uw=H(jw,{TopLeftCorner:F(iw),ScaleDenominator:F(Ip),TileWidth:F(Kp),TileHeight:F(Kp),MatrixWidth:F(Kp),
MatrixHeight:F(Kp)},H(kw,{Identifier:F(V)}));function vw(a){Wa.call(this);a=a||{};this.a=null;this.i=Wc;this.c=void 0;y(this,Ya("projection"),this.vn,this);y(this,Ya("tracking"),this.wn,this);void 0!==a.projection&&this.Ai(Lc(a.projection));void 0!==a.trackingOptions&&this.dk(a.trackingOptions);this.lf(void 0!==a.tracking?a.tracking:!1)}v(vw,Wa);k=vw.prototype;k.xa=function(){this.lf(!1);Wa.prototype.xa.call(this)};k.vn=function(){var a=this.yi();a&&(this.i=Kc(Lc("EPSG:4326"),a),this.a&&this.set("position",this.i(this.a)))};
k.wn=function(){if(le){var a=this.zi();a&&void 0===this.c?this.c=navigator.geolocation.watchPosition(this.iq.bind(this),this.jq.bind(this),this.ji()):a||void 0===this.c||(navigator.geolocation.clearWatch(this.c),this.c=void 0)}};
k.iq=function(a){a=a.coords;this.set("accuracy",a.accuracy);this.set("altitude",null===a.altitude?void 0:a.altitude);this.set("altitudeAccuracy",null===a.altitudeAccuracy?void 0:a.altitudeAccuracy);this.set("heading",null===a.heading?void 0:Rb(a.heading));this.a?(this.a[0]=a.longitude,this.a[1]=a.latitude):this.a=[a.longitude,a.latitude];var b=this.i(this.a);this.set("position",b);this.set("speed",null===a.speed?void 0:a.speed);a=fl(Ac,this.a,a.accuracy);a.yc(this.i);this.set("accuracyGeometry",a);
this.u()};k.jq=function(a){a.type="error";this.lf(!1);this.b(a)};k.nl=function(){return this.get("accuracy")};k.ol=function(){return this.get("accuracyGeometry")||null};k.rn=function(){return this.get("altitude")};k.ql=function(){return this.get("altitudeAccuracy")};k.sn=function(){return this.get("heading")};k.tn=function(){return this.get("position")};k.yi=function(){return this.get("projection")};k.$l=function(){return this.get("speed")};k.zi=function(){return this.get("tracking")};k.ji=function(){return this.get("trackingOptions")};
k.Ai=function(a){this.set("projection",a)};k.lf=function(a){this.set("tracking",a)};k.dk=function(a){this.set("trackingOptions",a)};function ww(a,b,c){Wd.call(this);this.rh(a,b?b:0,c)}v(ww,Wd);k=ww.prototype;k.clone=function(){var a=new ww(null);Yd(a,this.ma,this.A.slice());a.u();return a};k.Lb=function(a,b,c,d){var e=this.A;a-=e[0];var f=b-e[1];b=a*a+f*f;if(b<d){if(0===b)for(d=0;d<this.a;++d)c[d]=e[d];else for(d=this.Hd()/Math.sqrt(b),c[0]=e[0]+d*a,c[1]=e[1]+d*f,d=2;d<this.a;++d)c[d]=e[d];c.length=this.a;return b}return d};k.hd=function(a,b){var c=this.A;a-=c[0];b-=c[1];return a*a+b*b<=xw(this)};
k.va=function(){return this.A.slice(0,this.a)};k.Re=function(a){var b=this.A,c=b[this.a]-b[0];return rb(b[0]-c,b[1]-c,b[0]+c,b[1]+c,a)};k.Hd=function(){return Math.sqrt(xw(this))};function xw(a){var b=a.A[a.a]-a.A[0];a=a.A[a.a+1]-a.A[1];return b*b+a*a}k.U=function(){return"Circle"};k.bb=function(a){var b=this.D();return Jb(a,b)?(b=this.va(),a[0]<=b[0]&&a[2]>=b[0]||a[1]<=b[1]&&a[3]>=b[1]?!0:xb(a,this.yb,this)):!1};
k.cb=function(a){var b=this.a,c=a.slice();c[b]=c[0]+(this.A[b]-this.A[0]);var d;for(d=1;d<b;++d)c[b+d]=a[d];Yd(this,this.ma,c);this.u()};k.rh=function(a,b,c){if(a){Zd(this,c,a,0);this.A||(this.A=[]);c=this.A;a=Sk(c,a);c[a++]=c[0]+b;var d;b=1;for(d=this.a;b<d;++b)c[a++]=c[b];c.length=a}else Yd(this,"XY",null);this.u()};k.T=function(){};k.ua=function(){};k.qd=function(a){this.A[this.a]=this.A[0]+a;this.u()};function yw(a,b,c){for(var d=[],e=a(0),f=a(1),g=b(e),h=b(f),l=[f,e],m=[h,g],n=[1,0],p={},q=1E5,t,u,w,z,D;0<--q&&0<n.length;)w=n.pop(),e=l.pop(),g=m.pop(),f=w.toString(),f in p||(d.push(g[0],g[1]),p[f]=!0),z=n.pop(),f=l.pop(),h=m.pop(),D=(w+z)/2,t=a(D),u=b(t),Pb(u[0],u[1],g[0],g[1],h[0],h[1])<c?(d.push(h[0],h[1]),f=z.toString(),p[f]=!0):(n.push(z,D,D,w),m.push(h,u,u,g),l.push(f,t,t,e));return d}function zw(a,b,c,d,e){var f=Lc("EPSG:4326");return yw(function(d){return[a,b+(c-b)*d]},Vc(f,d),e)}
function Aw(a,b,c,d,e){var f=Lc("EPSG:4326");return yw(function(d){return[b+(c-b)*d,a]},Vc(f,d),e)};function Bw(a){a=a||{};this.i=this.R=null;this.g=this.f=Infinity;this.c=this.j=-Infinity;this.v=this.I=Infinity;this.B=this.C=-Infinity;this.G=void 0!==a.targetSize?a.targetSize:100;this.ea=void 0!==a.maxLines?a.maxLines:100;this.b=[];this.a=[];this.ta=void 0!==a.strokeStyle?a.strokeStyle:Cw;this.s=this.l=void 0;this.o=null;this.setMap(void 0!==a.map?a.map:null)}var Cw=new Og({color:"rgba(0,0,0,0.2)"}),Dw=[90,45,30,20,10,5,2,1,.5,.2,.1,.05,.01,.005,.002,.001];
function Ew(a,b,c,d,e,f,g){var h=g;b=zw(b,c,d,a.i,e);h=void 0!==a.b[h]?a.b[h]:new K(null);h.fa("XY",b);Jb(h.D(),f)&&(a.b[g++]=h);return g}function Fw(a,b,c,d,e){var f=e;b=Aw(b,a.c,a.g,a.i,c);f=void 0!==a.a[f]?a.a[f]:new K(null);f.fa("XY",b);Jb(f.D(),d)&&(a.a[e++]=f);return e}k=Bw.prototype;k.xn=function(){return this.R};k.Pl=function(){return this.b};k.Xl=function(){return this.a};
k.ni=function(a){var b=a.vectorContext,c=a.frameState,d=c.extent;a=c.viewState;var e=a.center,f=a.projection,g=a.resolution;a=c.pixelRatio;a=g*g/(4*a*a);if(!this.i||!Uc(this.i,f)){var h=Lc("EPSG:4326"),l=f.D(),m=f.f,n=Yc(m,h,f),p=m[2],q=m[1],t=m[0],u=n[3],w=n[2],z=n[1];n=n[0];this.f=m[3];this.g=p;this.j=q;this.c=t;this.I=u;this.v=w;this.C=z;this.B=n;this.l=Vc(h,f);this.s=Vc(f,h);this.o=this.s(Gb(l));this.i=f}f.a&&(f=f.D(),h=Eb(f),c=c.focus[0],c<f[0]||c>f[2])&&(c=h*Math.ceil((f[0]-c)/h),d=[d[0]+c,
d[1],d[2]+c,d[3]]);c=this.o[0];f=this.o[1];h=-1;m=Math.pow(this.G*g,2);p=[];q=[];g=0;for(l=Dw.length;g<l;++g){t=Dw[g]/2;p[0]=c-t;p[1]=f-t;q[0]=c+t;q[1]=f+t;this.l(p,p);this.l(q,q);t=Math.pow(q[0]-p[0],2)+Math.pow(q[1]-p[1],2);if(t<=m)break;h=Dw[g]}g=h;if(-1==g)this.b.length=this.a.length=0;else{c=this.s(e);e=c[0];c=c[1];f=this.ea;h=[Math.max(d[0],this.B),Math.max(d[1],this.C),Math.min(d[2],this.v),Math.min(d[3],this.I)];h=Yc(h,this.i,"EPSG:4326");m=h[3];q=h[1];e=Math.floor(e/g)*g;p=Mb(e,this.c,this.g);
l=Ew(this,p,q,m,a,d,0);for(h=0;p!=this.c&&h++<f;)p=Math.max(p-g,this.c),l=Ew(this,p,q,m,a,d,l);p=Mb(e,this.c,this.g);for(h=0;p!=this.g&&h++<f;)p=Math.min(p+g,this.g),l=Ew(this,p,q,m,a,d,l);this.b.length=l;c=Math.floor(c/g)*g;e=Mb(c,this.j,this.f);l=Fw(this,e,a,d,0);for(h=0;e!=this.j&&h++<f;)e=Math.max(e-g,this.j),l=Fw(this,e,a,d,l);e=Mb(c,this.j,this.f);for(h=0;e!=this.f&&h++<f;)e=Math.min(e+g,this.f),l=Fw(this,e,a,d,l);this.a.length=l}b.Ta(null,this.ta);a=0;for(e=this.b.length;a<e;++a)g=this.b[a],
b.Yb(g,null);a=0;for(e=this.a.length;a<e;++a)g=this.a[a],b.Yb(g,null)};k.setMap=function(a){this.R&&(this.R.K("postcompose",this.ni,this),this.R.render());a&&(a.H("postcompose",this.ni,this),a.render());this.R=a};function Gw(a,b,c,d,e,f,g){Ak.call(this,a,b,c,0,d);this.j=e;this.O=new Image;null!==f&&(this.O.crossOrigin=f);this.c={};this.g=null;this.state=0;this.f=g}v(Gw,Ak);k=Gw.prototype;k.W=function(a){if(void 0!==a){var b;a=x(a);if(a in this.c)return this.c[a];Aa(this.c)?b=this.O:b=this.O.cloneNode(!1);return this.c[a]=b}return this.O};k.An=function(){this.state=3;this.g.forEach(Ca);this.g=null;this.u()};
k.Bn=function(){void 0===this.resolution&&(this.resolution=Fb(this.extent)/this.O.height);this.state=2;this.g.forEach(Ca);this.g=null;this.u()};k.load=function(){if(0==this.state||3==this.state)this.state=1,this.u(),this.g=[Ia(this.O,"error",this.An,this),Ia(this.O,"load",this.Bn,this)],this.f(this,this.j)};k.sh=function(a){this.O=a};function Hw(a){a=a?a:{};vn.call(this,{handleEvent:Fd});this.f=a.formatConstructors?a.formatConstructors:[];this.l=a.projection?Lc(a.projection):null;this.a=null;this.target=a.target?a.target:null}v(Hw,vn);function Iw(a){a=a.dataTransfer.files;var b;var c=0;for(b=a.length;c<b;++c){var d=a.item(c);var e=new FileReader;e.addEventListener("load",this.j.bind(this,d));e.readAsText(d)}}function Jw(a){a.stopPropagation();a.preventDefault();a.dataTransfer.dropEffect="copy"}
Hw.prototype.j=function(a,b){b=b.target.result;var c=this.R,d=this.l;d||(d=c.Z().c);c=this.f;var e=[],f;var g=0;for(f=c.length;g<f;++g){var h=new c[g];var l={featureProjection:d};try{e=h.Oa(b,l)}catch(m){e=null}if(e&&0<e.length)break}this.b(new Kw(Lw,a,e,d))};Hw.prototype.setMap=function(a){this.a&&(this.a.forEach(Ca),this.a=null);vn.prototype.setMap.call(this,a);a&&(a=this.target?this.target:a.a,this.a=[y(a,"drop",Iw,this),y(a,"dragenter",Jw,this),y(a,"dragover",Jw,this),y(a,"drop",Jw,this)])};
var Lw="addfeatures";function Kw(a,b,c,d){Na.call(this,a);this.features=c;this.file=b;this.projection=d}v(Kw,Na);function Mw(a){a=a?a:{};Kn.call(this,{handleDownEvent:Nw,handleDragEvent:Ow,handleUpEvent:Pw});this.o=a.condition?a.condition:Gn;this.a=this.f=void 0;this.j=0;this.s=void 0!==a.duration?a.duration:400}v(Mw,Kn);function Ow(a){if(In(a)){var b=a.map,c=b.Rb(),d=a.pixel;a=d[0]-c[0]/2;d=c[1]/2-d[1];c=Math.atan2(d,a);a=Math.sqrt(a*a+d*d);b=b.Z();void 0!==this.f&&(d=c-this.f,wn(b,b.Qa()-d));this.f=c;void 0!==this.a&&(c=this.a*(b.Ia()/a),yn(b,c));void 0!==this.a&&(this.j=this.a/a);this.a=a}}
function Pw(a){if(!In(a))return!0;a=a.map.Z();ln(a,1,-1);var b=this.j-1,c=a.Qa();c=a.constrainRotation(c,0);wn(a,c,void 0,void 0);c=a.Ia();var d=this.s;c=a.constrainResolution(c,0,b);yn(a,c,void 0,d);this.j=0;return!1}function Nw(a){return In(a)&&this.o(a)?(ln(a.map.Z(),1,1),this.a=this.f=void 0,!0):!1};function Qw(a){Kn.call(this,{handleDownEvent:Rw,handleEvent:Sw,handleUpEvent:Tw});this.aa=!1;this.$=null;this.s=!1;this.rb=a.source?a.source:null;this.Xa=a.features?a.features:null;this.dl=a.snapTolerance?a.snapTolerance:12;this.N=a.type;this.f=Uw(this.N);this.wa=a.minPoints?a.minPoints:this.f===Vw?3:2;this.oa=a.maxPoints?a.maxPoints:Infinity;this.Xf=a.finishCondition?a.finishCondition:Fd;var b=a.geometryFunction;if(!b)if("Circle"===this.N)b=function(a,b){b=b?b:new ww([NaN,NaN]);b.rh(a[0],Math.sqrt(Bd(a[0],
a[1])));return b};else{var c,d=this.f;d===Ww?c=L:d===Xw?c=K:d===Vw&&(c=M);b=function(a,b){b?d===Vw?b.ua([a[0].concat([a[0][0]])]):b.ua(a):b=new c(a);return b}}this.Va=b;this.G=this.C=this.a=this.B=this.j=this.o=null;this.lc=a.clickTolerance?a.clickTolerance*a.clickTolerance:36;this.la=new N({source:new J({useSpatialIndex:!1,wrapX:a.wrapX?a.wrapX:!1}),style:a.style?a.style:Yw()});this.Ua=a.geometryName;this.al=a.condition?a.condition:Fn;this.Yf=a.freehand?Fd:a.freehandCondition?a.freehandCondition:
Gn;y(this,Ya("active"),this.Ui,this)}v(Qw,Kn);function Yw(){var a=qj();return function(b){return a[b.V().U()]}}k=Qw.prototype;k.setMap=function(a){Kn.prototype.setMap.call(this,a);this.Ui()};function Sw(a){this.s=this.f!==Ww&&this.Yf(a);var b=!this.s;this.s&&"pointerdrag"===a.type&&null!==this.j?(Zw(this,a),b=!1):"pointermove"===a.type?b=$w(this,a):"dblclick"===a.type&&(b=!1);return Ln.call(this,a)&&b}
function Rw(a){this.aa=!this.s;return this.s?(this.$=a.pixel,this.o||ax(this,a),!0):this.al(a)?(this.$=a.pixel,!0):!1}function Tw(a){var b=!0;$w(this,a);var c=this.f===bx;this.aa?(this.o?this.s||c?this.je():cx(this,a)?this.Xf(a)&&this.je():Zw(this,a):(ax(this,a),this.f===Ww&&this.je()),b=!1):this.s&&(this.o=null,dx(this));return b}
function $w(a,b){if(a.$&&(!a.s&&a.aa||a.s&&!a.aa)){var c=a.$,d=b.pixel,e=c[0]-d[0];c=c[1]-d[1];e=e*e+c*c;a.aa=a.s?e>a.lc:e<=a.lc}a.o?(e=b.coordinate,c=a.j.V(),a.f===Ww?d=a.a:a.f===Vw?(d=a.a[0],d=d[d.length-1],cx(a,b)&&(e=a.o.slice())):(d=a.a,d=d[d.length-1]),d[0]=e[0],d[1]=e[1],a.Va(a.a,c),a.B&&a.B.V().ua(e),c instanceof M&&a.f!==Vw?(a.C||(a.C=new E(new K(null))),e=c.vg(0),b=a.C.V(),b.fa(e.ma,e.ja())):a.G&&(b=a.C.V(),b.ua(a.G)),ex(a)):(b=b.coordinate.slice(),a.B?a.B.V().ua(b):(a.B=new E(new L(b)),
ex(a)));return!0}function cx(a,b){var c=!1;if(a.j){var d=!1,e=[a.o];a.f===Xw?d=a.a.length>a.wa:a.f===Vw&&(d=a.a[0].length>a.wa,e=[a.a[0][0],a.a[0][a.a[0].length-2]]);if(d){d=b.map;for(var f=0,g=e.length;f<g;f++){var h=e[f],l=d.Pa(h),m=b.pixel;c=m[0]-l[0];l=m[1]-l[1];if(c=Math.sqrt(c*c+l*l)<=(a.s?1:a.dl)){a.o=h;break}}}}return c}
function ax(a,b){b=b.coordinate;a.o=b;a.f===Ww?a.a=b.slice():a.f===Vw?(a.a=[[b.slice(),b.slice()]],a.G=a.a[0]):(a.a=[b.slice(),b.slice()],a.f===bx&&(a.G=a.a));a.G&&(a.C=new E(new K(a.G)));b=a.Va(a.a);a.j=new E;a.Ua&&a.j.pd(a.Ua);a.j.Wa(b);ex(a);a.b(new fx("drawstart",a.j))}
function Zw(a,b){b=b.coordinate;var c=a.j.V(),d;if(a.f===Xw){a.o=b.slice();var e=a.a;e.length>=a.oa&&(a.s?e.pop():d=!0);e.push(b.slice());a.Va(e,c)}else a.f===Vw&&(e=a.a[0],e.length>=a.oa&&(a.s?e.pop():d=!0),e.push(b.slice()),d&&(a.o=e[0]),a.Va(a.a,c));ex(a);d&&a.je()}
k.Zq=function(){if(this.j){var a=this.j.V();if(this.f===Xw){var b=this.a;b.splice(-2,1);this.Va(b,a);2<=b.length&&(this.o=b[b.length-2].slice())}else if(this.f===Vw){b=this.a[0];b.splice(-2,1);var c=this.C.V();c.ua(b);this.Va(this.a,a)}0===b.length&&(this.o=null);ex(this)}};
k.je=function(){var a=dx(this),b=this.a,c=a.V();this.f===Xw?(b.pop(),this.Va(b,c)):this.f===Vw&&(b[0].pop(),this.Va(b,c),b=c.T());"MultiPoint"===this.N?a.Wa(new T([b])):"MultiLineString"===this.N?a.Wa(new R([b])):"MultiPolygon"===this.N&&a.Wa(new U([b]));this.b(new fx("drawend",a));this.Xa&&this.Xa.push(a);this.rb&&this.rb.Eb(a)};function dx(a){a.o=null;var b=a.j;b&&(a.j=null,a.B=null,a.C=null,a.la.ba().clear(!0));return b}
k.po=function(a){var b=a.V();this.j=a;this.a=b.T();a=this.a[this.a.length-1];this.o=a.slice();this.a.push(a.slice());ex(this);this.b(new fx("drawstart",this.j))};k.sd=Gd;function ex(a){var b=[];a.j&&b.push(a.j);a.C&&b.push(a.C);a.B&&b.push(a.B);a=a.la.ba();a.clear(!0);a.yd(b)}k.Ui=function(){var a=this.R,b=this.c();a&&b||dx(this);this.la.setMap(b?a:null)};
function Uw(a){var b;"Point"===a||"MultiPoint"===a?b=Ww:"LineString"===a||"MultiLineString"===a?b=Xw:"Polygon"===a||"MultiPolygon"===a?b=Vw:"Circle"===a&&(b=bx);return b}var Ww="Point",Xw="LineString",Vw="Polygon",bx="Circle";function fx(a,b){Na.call(this,a);this.feature=b}v(fx,Na);function gx(a){this.a=this.j=null;this.C=!1;this.B=this.o=null;a||(a={});a.extent&&this.f(a.extent);Kn.call(this,{handleDownEvent:hx,handleDragEvent:ix,handleEvent:jx,handleUpEvent:kx});this.s=new N({source:new J({useSpatialIndex:!1,wrapX:!!a.wrapX}),style:a.boxStyle?a.boxStyle:lx(),updateWhileAnimating:!0,updateWhileInteracting:!0});this.G=new N({source:new J({useSpatialIndex:!1,wrapX:!!a.wrapX}),style:a.pointerStyle?a.pointerStyle:mx(),updateWhileAnimating:!0,updateWhileInteracting:!0})}v(gx,Kn);
function jx(a){if(!(a instanceof sm))return!0;if("pointermove"==a.type&&!this.v){var b=a.pixel,c=a.map,d=nx(this,b,c);d||(d=c.ab(b));ox(this,d)}Ln.call(this,a);return!1}
function hx(a){function b(a){var b=null,c=null;a[0]==e[0]?b=e[2]:a[0]==e[2]&&(b=e[0]);a[1]==e[1]?c=e[3]:a[1]==e[3]&&(c=e[1]);return null!==b&&null!==c?[b,c]:null}var c=a.pixel,d=a.map,e=this.D();(a=nx(this,c,d))&&e?(c=a[0]==e[0]||a[0]==e[2]?a[0]:null,d=a[1]==e[1]||a[1]==e[3]?a[1]:null,null!==c&&null!==d?this.a=px(b(a)):null!==c?this.a=qx(b([c,e[1]]),b([c,e[3]])):null!==d&&(this.a=qx(b([e[0],d]),b([e[2],d])))):(a=d.ab(c),this.f([a[0],a[1],a[0],a[1]]),this.a=px(a));return!0}
function ix(a){this.a&&(a=a.coordinate,this.f(this.a(a)),ox(this,a));return!0}function kx(){this.a=null;var a=this.D();a&&0!==Cb(a)||this.f(null);return!1}function lx(){var a=qj();return function(){return a.Polygon}}function mx(){var a=qj();return function(){return a.Point}}function px(a){return function(b){return hb([a,b])}}function qx(a,b){return a[0]==b[0]?function(c){return hb([a,[c[0],b[1]]])}:a[1]==b[1]?function(c){return hb([a,[b[0],c[1]]])}:null}
function nx(a,b,c){function d(a,b){return Dd(e,a)-Dd(e,b)}var e=c.ab(b),f=a.D();if(f){f=[[[f[0],f[1]],[f[0],f[3]]],[[f[0],f[3]],[f[2],f[3]]],[[f[2],f[3]],[f[2],f[1]]],[[f[2],f[1]],[f[0],f[1]]]];f.sort(d);f=f[0];var g=vd(e,f),h=c.Pa(g);if(10>=Cd(b,h))return b=c.Pa(f[0]),c=c.Pa(f[1]),b=Bd(h,b),c=Bd(h,c),a.C=10>=Math.sqrt(Math.min(b,c)),a.C&&(g=b>c?f[1]:f[0]),g}return null}function ox(a,b){var c=a.B;c?c.V().ua(b):(c=new E(new L(b)),a.B=c,a.G.ba().Eb(c))}
gx.prototype.setMap=function(a){this.s.setMap(a);this.G.setMap(a);Kn.prototype.setMap.call(this,a)};gx.prototype.D=function(){return this.j};gx.prototype.f=function(a){this.j=a?a:null;var b=this.o;b?a?b.Wa(gl(a)):b.Wa(void 0):(this.o=b=a?new E(gl(a)):new E({}),this.s.ba().Eb(b));this.b(new rx(this.j))};function rx(a){Na.call(this,sx);this.b=a}v(rx,Na);var sx="extentchanged";function tx(a){Kn.call(this,{handleDownEvent:ux,handleDragEvent:vx,handleEvent:wx,handleUpEvent:xx});this.rb=a.condition?a.condition:Jn;this.Xa=function(a){return Fn(a)&&En(a)};this.Ua=a.deleteCondition?a.deleteCondition:this.Xa;this.wa=this.f=null;this.oa=[0,0];this.C=this.G=!1;this.a=new ah;this.$=void 0!==a.pixelTolerance?a.pixelTolerance:10;this.o=this.la=!1;this.j=[];this.B=new N({source:new J({useSpatialIndex:!1,wrapX:!!a.wrapX}),style:a.style?a.style:yx(),updateWhileAnimating:!0,updateWhileInteracting:!0});
this.aa={Point:this.wo,LineString:this.Wi,LinearRing:this.Wi,Polygon:this.xo,MultiPoint:this.uo,MultiLineString:this.to,MultiPolygon:this.vo,Circle:this.Lr,GeometryCollection:this.so};this.s=a.features;this.s.forEach(this.Mg,this);y(this.s,"add",this.qo,this);y(this.s,"remove",this.ro,this);this.N=null}v(tx,Kn);k=tx.prototype;k.Mg=function(a){var b=a.V();b&&b.U()in this.aa&&this.aa[b.U()].call(this,a,b);(b=this.R)&&b.c&&this.c()&&zx(this,this.oa,b);y(a,"change",this.Vi,this)};
function Ax(a,b){a.C||(a.C=!0,a.b(new Bx("modifystart",a.s,b)))}function Cx(a,b){Dx(a,b);a.f&&0===a.s.rc()&&(a.B.ba().Ib(a.f),a.f=null);Ja(b,"change",a.Vi,a)}function Dx(a,b){a=a.a;var c=[];a.forEach(function(a){b===a.feature&&c.push(a)});for(var d=c.length-1;0<=d;--d)a.remove(c[d])}k.Na=function(a){this.f&&!a&&(this.B.ba().Ib(this.f),this.f=null);Kn.prototype.Na.call(this,a)};k.setMap=function(a){this.B.setMap(a);Kn.prototype.setMap.call(this,a)};k.qo=function(a){this.Mg(a.element)};
k.Vi=function(a){this.o||(a=a.target,Cx(this,a),this.Mg(a))};k.ro=function(a){Cx(this,a.element)};k.wo=function(a,b){var c=b.T();a={feature:a,geometry:b,sa:[c,c]};this.a.Ha(b.D(),a)};k.uo=function(a,b){var c=b.T(),d;var e=0;for(d=c.length;e<d;++e){var f=c[e];f={feature:a,geometry:b,depth:[e],index:e,sa:[f,f]};this.a.Ha(b.D(),f)}};k.Wi=function(a,b){var c=b.T(),d;var e=0;for(d=c.length-1;e<d;++e){var f=c.slice(e,e+2);var g={feature:a,geometry:b,index:e,sa:f};this.a.Ha(hb(f),g)}};
k.to=function(a,b){var c=b.T(),d,e;var f=0;for(e=c.length;f<e;++f){var g=c[f];var h=0;for(d=g.length-1;h<d;++h){var l=g.slice(h,h+2);var m={feature:a,geometry:b,depth:[f],index:h,sa:l};this.a.Ha(hb(l),m)}}};k.xo=function(a,b){var c=b.T(),d,e;var f=0;for(e=c.length;f<e;++f){var g=c[f];var h=0;for(d=g.length-1;h<d;++h){var l=g.slice(h,h+2);var m={feature:a,geometry:b,depth:[f],index:h,sa:l};this.a.Ha(hb(l),m)}}};
k.vo=function(a,b){var c=b.T(),d,e,f;var g=0;for(f=c.length;g<f;++g){var h=c[g];var l=0;for(e=h.length;l<e;++l){var m=h[l];var n=0;for(d=m.length-1;n<d;++n){var p=m.slice(n,n+2);var q={feature:a,geometry:b,depth:[l,g],index:n,sa:p};this.a.Ha(hb(p),q)}}}};k.Lr=function(a,b){var c=b.va(),d={feature:a,geometry:b,index:0,sa:[c,c]};a={feature:a,geometry:b,index:1,sa:[c,c]};d.mg=a.mg=[d,a];this.a.Ha(sb(c),d);this.a.Ha(b.D(),a)};
k.so=function(a,b){var c=b.a;for(b=0;b<c.length;++b)this.aa[c[b].U()].call(this,a,c[b])};function Ex(a,b){var c=a.f;c?c.V().ua(b):(c=new E(new L(b)),a.f=c,a.B.ba().Eb(c))}function Fx(a,b){return a.index-b.index}
function ux(a){if(!this.rb(a))return!1;zx(this,a.pixel,a.map);var b=a.map.ab(a.pixel);this.j.length=0;this.C=!1;var c=this.f;if(c){var d=[];c=c.V().T();var e=hb([c]);e=dh(this.a,e);var f={};e.sort(Fx);for(var g=0,h=e.length;g<h;++g){var l=e[g],m=l.sa,n=x(l.feature),p=l.depth;p&&(n+="-"+p.join("-"));f[n]||(f[n]=Array(2));if("Circle"===l.geometry.U()&&1===l.index)m=Gx(b,l),yd(m,c)&&!f[n][0]&&(this.j.push([l,0]),f[n][0]=l);else if(yd(m[0],c)&&!f[n][0])this.j.push([l,0]),f[n][0]=l;else if(yd(m[1],c)&&
!f[n][1]){if("LineString"!==l.geometry.U()&&"MultiLineString"!==l.geometry.U()||!f[n][0]||0!==f[n][0].index)this.j.push([l,1]),f[n][1]=l}else x(m)in this.wa&&!f[n][0]&&!f[n][1]&&d.push([l,c])}d.length&&Ax(this,a);for(a=d.length-1;0<=a;--a)this.Sm.apply(this,d[a])}return!!this.f}
function vx(a){this.G=!1;Ax(this,a);a=a.coordinate;for(var b=0,c=this.j.length;b<c;++b){var d=this.j[b],e=d[0],f=e.depth,g=e.geometry,h=e.sa;for(d=d[1];a.length<g.ya();)a.push(h[d][a.length]);switch(g.U()){case "Point":var l=a;h[0]=h[1]=a;break;case "MultiPoint":l=g.T();l[e.index]=a;h[0]=h[1]=a;break;case "LineString":l=g.T();l[e.index+d]=a;h[d]=a;break;case "MultiLineString":l=g.T();l[f[0]][e.index+d]=a;h[d]=a;break;case "Polygon":l=g.T();l[f[0]][e.index+d]=a;h[d]=a;break;case "MultiPolygon":l=g.T();
l[f[1]][f[0]][e.index+d]=a;h[d]=a;break;case "Circle":h[0]=h[1]=a,0===e.index?(this.o=!0,g.cb(a)):(this.o=!0,g.qd(Cd(g.va(),a))),this.o=!1}l&&(e=g,f=l,this.o=!0,e.ua(f),this.o=!1)}Ex(this,a)}function xx(a){for(var b,c,d=this.j.length-1;0<=d;--d)if(b=this.j[d][0],c=b.geometry,"Circle"===c.U()){var e=c.va(),f=b.mg[0];b=b.mg[1];f.sa[0]=f.sa[1]=e;b.sa[0]=b.sa[1]=e;bh(this.a,sb(e),f);bh(this.a,c.D(),b)}else bh(this.a,hb(b.sa),b);this.C&&(this.b(new Bx("modifyend",this.s,a)),this.C=!1);return!1}
function wx(a){if(!(a instanceof sm))return!0;this.N=a;var b;mn(a.map.Z())[1]||"pointermove"!=a.type||this.v||(this.oa=a.pixel,zx(this,a.pixel,a.map));this.f&&this.Ua(a)&&(b="singleclick"==a.type&&this.G?!0:this.Oj());"singleclick"==a.type&&(this.G=!1);return Ln.call(this,a)&&!b}
function zx(a,b,c){function d(a,b){return Hx(e,a)-Hx(e,b)}var e=c.ab(b),f=kb(sb(e),c.Z().Ia()*a.$);f=dh(a.a,f);if(0<f.length){f.sort(d);var g=f[0],h=g.sa,l=Gx(e,g),m=c.Pa(l),n=Cd(b,m);if(n<=a.$){b={};if("Circle"===g.geometry.U()&&1===g.index)a.la=!0,Ex(a,l);else for(n=c.Pa(h[0]),g=c.Pa(h[1]),c=Bd(m,n),m=Bd(m,g),n=Math.sqrt(Math.min(c,m)),a.la=n<=a.$,a.la&&(l=c>m?h[1]:h[0]),Ex(a,l),m=1,c=f.length;m<c;++m)if(l=f[m].sa,yd(h[0],l[0])&&yd(h[1],l[1])||yd(h[0],l[1])&&yd(h[1],l[0]))b[x(l)]=!0;else break;
b[x(h)]=!0;a.wa=b;return}}a.f&&(a.B.ba().Ib(a.f),a.f=null)}function Hx(a,b){var c=b.geometry;return"Circle"===c.U()&&1===b.index?(a=Bd(c.va(),a),c=Math.sqrt(a)-c.Hd(),c*c):Dd(a,b.sa)}function Gx(a,b){var c=b.geometry;return"Circle"===c.U()&&1===b.index?c.Fb(a):vd(a,b.sa)}
k.Sm=function(a,b){for(var c=a.sa,d=a.feature,e=a.geometry,f=a.depth,g=a.index,h;b.length<e.ya();)b.push(0);switch(e.U()){case "MultiLineString":h=e.T();h[f[0]].splice(g+1,0,b);break;case "Polygon":h=e.T();h[f[0]].splice(g+1,0,b);break;case "MultiPolygon":h=e.T();h[f[1]][f[0]].splice(g+1,0,b);break;case "LineString":h=e.T();h.splice(g+1,0,b);break;default:return}this.o=!0;e.ua(h);this.o=!1;h=this.a;h.remove(a);Ix(this,e,g,f,1);a={sa:[c[0],b],feature:d,geometry:e,depth:f,index:g};h.Ha(hb(a.sa),a);
Patrick's avatar
Patrick committed
834
this.j.push([a,1]);b={sa:[b,c[1]],feature:d,geometry:e,depth:f,index:g+1};h.Ha(hb(b.sa),b);this.j.push([b,0]);this.G=!0};
Patrick's avatar
Patrick committed
835
k.Oj=function(){if(this.N&&"pointerdrag"!=this.N.type){var a=this.N;Ax(this,a);var b=this.j,c={},d,e;for(e=b.length-1;0<=e;--e){var f=b[e];var g=f[0];var h=x(g.feature);g.depth&&(h+="-"+g.depth.join("-"));h in c||(c[h]={});0===f[1]?(c[h].right=g,c[h].index=g.index):1==f[1]&&(c[h].left=g,c[h].index=g.index+1)}for(h in c){var l=c[h].right;var m=c[h].left;e=c[h].index;var n=e-1;g=void 0!==m?m:l;0>n&&(n=0);f=g.geometry;var p=d=f.T();var q=!1;switch(f.U()){case "MultiLineString":2<d[g.depth[0]].length&&
Patrick's avatar
Patrick committed
836
(d[g.depth[0]].splice(e,1),q=!0);break;case "LineString":2<d.length&&(d.splice(e,1),q=!0);break;case "MultiPolygon":p=p[g.depth[1]];case "Polygon":p=p[g.depth[0]],4<p.length&&(e==p.length-1&&(e=0),p.splice(e,1),q=!0,0===e&&(p.pop(),p.push(p[0]),n=p.length-1))}q&&(q=f,this.o=!0,q.ua(d),this.o=!1,d=[],void 0!==m&&(this.a.remove(m),d.push(m.sa[0])),void 0!==l&&(this.a.remove(l),d.push(l.sa[1])),void 0!==m&&void 0!==l&&(m={depth:g.depth,feature:g.feature,geometry:g.geometry,index:n,sa:d},this.a.Ha(hb(m.sa),
Patrick's avatar
Patrick committed
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
m)),Ix(this,f,e,g.depth,-1),this.f&&(this.B.ba().Ib(this.f),this.f=null),b.length=0)}this.b(new Bx("modifyend",this.s,a));this.C=!1;return!0}return!1};function Ix(a,b,c,d,e){fh(a.a,b.D(),function(a){a.geometry===b&&(void 0===d||void 0===a.depth||ld(a.depth,d))&&a.index>c&&(a.index+=e)})}function yx(){var a=qj();return function(){return a.Point}}function Bx(a,b,c){Na.call(this,a);this.features=b;this.mapBrowserEvent=c}v(Bx,Na);function Jx(a){vn.call(this,{handleEvent:Kx});a=a?a:{};this.C=a.condition?a.condition:En;this.v=a.addCondition?a.addCondition:Gd;this.B=a.removeCondition?a.removeCondition:Gd;this.G=a.toggleCondition?a.toggleCondition:Gn;this.o=a.multi?a.multi:!1;this.l=a.filter?a.filter:Fd;this.j=a.hitTolerance?a.hitTolerance:0;this.f=new N({source:new J({useSpatialIndex:!1,features:a.features,wrapX:a.wrapX}),style:a.style?a.style:Lx(),updateWhileAnimating:!0,updateWhileInteracting:!0});if(a.layers)if("function"===
typeof a.layers)a=a.layers;else{var b=a.layers;a=function(a){return gd(b,a)}}else a=Fd;this.s=a;this.a={};a=this.f.ba().i;y(a,"add",this.yo,this);y(a,"remove",this.Co,this)}v(Jx,vn);k=Jx.prototype;k.zo=function(){return this.f.ba().i};k.Ao=function(){return this.j};k.Bo=function(a){a=x(a);return this.a[a]};
function Kx(a){if(!this.C(a))return!0;var b=this.v(a),c=this.B(a),d=this.G(a),e=!b&&!c&&!d,f=a.map,g=this.f.ba().i,h=[],l=[];if(e){xa(this.a);f.Ve(a.pixel,function(a,b){if(this.l(a,b))return l.push(a),a=x(a),this.a[a]=b,!this.o}.bind(this),{layerFilter:this.s,hitTolerance:this.j});for(e=g.rc()-1;0<=e;--e){f=g.item(e);var m=l.indexOf(f);-1<m?l.splice(m,1):(g.remove(f),h.push(f))}0!==l.length&&g.Gg(l)}else{f.Ve(a.pixel,function(a,e){if(this.l(a,e))return!b&&!d||gd(g.a,a)?(c||d)&&gd(g.a,a)&&(h.push(a),
e=x(a),delete this.a[e]):(l.push(a),a=x(a),this.a[a]=e),!this.o}.bind(this),{layerFilter:this.s,hitTolerance:this.j});for(e=h.length-1;0<=e;--e)g.remove(h[e]);g.Gg(l)}(0<l.length||0<h.length)&&this.b(new Mx(Nx,l,h,a));return Dn(a)}k.Do=function(a){this.j=a};k.setMap=function(a){var b=this.R,c=this.f.ba().i;b&&c.forEach(b.ik,b);vn.prototype.setMap.call(this,a);this.f.setMap(a);a&&c.forEach(a.ek,a)};
function Lx(){var a=qj();id(a.Polygon,a.LineString);id(a.GeometryCollection,a.LineString);return function(b){return b.V()?a[b.V().U()]:null}}k.yo=function(a){var b=this.R;b&&b.ek(a.element)};k.Co=function(a){var b=this.R;b&&b.ik(a.element)};function Mx(a,b,c,d){Na.call(this,a);this.selected=b;this.deselected=c;this.mapBrowserEvent=d}v(Mx,Na);var Nx="select";function Ox(a){Kn.call(this,{handleEvent:Px,handleDownEvent:Fd,handleUpEvent:Qx});a=a?a:{};this.o=a.source?a.source:null;this.$=void 0!==a.vertex?a.vertex:!0;this.G=void 0!==a.edge?a.edge:!0;this.j=a.features?a.features:null;this.la=[];this.C={};this.N={};this.s={};this.B=null;this.f=void 0!==a.pixelTolerance?a.pixelTolerance:10;this.oa=Rx.bind(this);this.a=new ah;this.aa={Point:this.Jo,LineString:this.Zi,LinearRing:this.Zi,Polygon:this.Ko,MultiPoint:this.Ho,MultiLineString:this.Go,MultiPolygon:this.Io,
GeometryCollection:this.Fo}}v(Ox,Kn);k=Ox.prototype;k.Eb=function(a,b){b=void 0!==b?b:!0;var c=x(a),d=a.V();if(d){var e=this.aa[d.U()];e&&(this.N[c]=d.D(ib()),e.call(this,a,d))}b&&(this.C[c]=y(a,"change",this.Eo,this))};k.kl=function(a){this.Eb(a)};k.ll=function(a){this.Ib(a)};k.Xi=function(a){if(a instanceof Uj)var b=a.feature;else a instanceof fb&&(b=a.element);this.Eb(b)};k.Yi=function(a){if(a instanceof Uj)var b=a.feature;else a instanceof fb&&(b=a.element);this.Ib(b)};
k.Eo=function(a){a=a.target;if(this.v){var b=x(a);b in this.s||(this.s[b]=a)}else this.jk(a)};k.Ib=function(a,b){b=void 0!==b?b:!0;var c=x(a),d=this.N[c];if(d){var e=this.a,f=[];fh(e,d,function(b){a===b.feature&&f.push(b)});for(d=f.length-1;0<=d;--d)e.remove(f[d])}b&&(Ca(this.C[c]),delete this.C[c])};
k.setMap=function(a){var b=this.R,c=this.la,d;this.j?d=this.j:this.o&&(d=this.o.Rc());b&&(c.forEach(Ca),c.length=0,d.forEach(this.ll,this));Kn.prototype.setMap.call(this,a);a&&(this.j?c.push(y(this.j,"add",this.Xi,this),y(this.j,"remove",this.Yi,this)):this.o&&c.push(y(this.o,"addfeature",this.Xi,this),y(this.o,"removefeature",this.Yi,this)),d.forEach(this.kl,this))};k.sd=Gd;k.jk=function(a){this.Ib(a,!1);this.Eb(a,!1)};
k.Fo=function(a,b){var c=b.a;for(b=0;b<c.length;++b)this.aa[c[b].U()].call(this,a,c[b])};k.Zi=function(a,b){b=b.T();var c;var d=0;for(c=b.length-1;d<c;++d){var e=b.slice(d,d+2);var f={feature:a,sa:e};this.a.Ha(hb(e),f)}};k.Go=function(a,b){b=b.T();var c,d;var e=0;for(d=b.length;e<d;++e){var f=b[e];var g=0;for(c=f.length-1;g<c;++g){var h=f.slice(g,g+2);var l={feature:a,sa:h};this.a.Ha(hb(h),l)}}};
k.Ho=function(a,b){var c=b.T(),d;var e=0;for(d=c.length;e<d;++e){var f=c[e];f={feature:a,sa:[f,f]};this.a.Ha(b.D(),f)}};k.Io=function(a,b){b=b.T();var c,d,e;var f=0;for(e=b.length;f<e;++f){var g=b[f];var h=0;for(d=g.length;h<d;++h){var l=g[h];var m=0;for(c=l.length-1;m<c;++m){var n=l.slice(m,m+2);var p={feature:a,sa:n};this.a.Ha(hb(n),p)}}}};k.Jo=function(a,b){var c=b.T();a={feature:a,sa:[c,c]};this.a.Ha(b.D(),a)};
k.Ko=function(a,b){b=b.T();var c,d;var e=0;for(d=b.length;e<d;++e){var f=b[e];var g=0;for(c=f.length-1;g<c;++g){var h=f.slice(g,g+2);var l={feature:a,sa:h};this.a.Ha(hb(h),l)}}};
function Px(a){var b=a.pixel,c=a.coordinate;var d=a.map;var e=d.ab([b[0]-this.f,b[1]+this.f]);var f=d.ab([b[0]+this.f,b[1]-this.f]);e=hb([e,f]);var g=dh(this.a,e);e=!1;var h=null;f=null;if(0<g.length){this.B=c;g.sort(this.oa);g=g[0].sa;if(this.$&&!this.G){c=d.Pa(g[0]);var l=d.Pa(g[1]);c=Bd(b,c);b=Bd(b,l);l=Math.sqrt(Math.min(c,b));if(l=l<=this.f)e=!0,h=c>b?g[1]:g[0],f=d.Pa(h)}else this.G&&(h=vd(c,g),f=d.Pa(h),Cd(b,f)<=this.f&&(e=!0,this.$&&(c=d.Pa(g[0]),l=d.Pa(g[1]),c=Bd(f,c),b=Bd(f,l),l=Math.sqrt(Math.min(c,
b)),l=l<=this.f)))&&(h=c>b?g[1]:g[0],f=d.Pa(h));e&&(f=[Math.round(f[0]),Math.round(f[1])])}d=h;e&&(a.coordinate=d.slice(0,2),a.pixel=f);return Ln.call(this,a)}function Qx(){var a=za(this.s);a.length&&(a.forEach(this.jk,this),this.s={});return!1}function Rx(a,b){return Dd(this.B,a.sa)-Dd(this.B,b.sa)};function Sx(a){Kn.call(this,{handleDownEvent:Tx,handleDragEvent:Ux,handleMoveEvent:Vx,handleUpEvent:Wx});a=a?a:{};this.f=void 0;this.a=null;this.o=void 0!==a.features?a.features:null;if(a.layers)if("function"===typeof a.layers)var b=a.layers;else{var c=a.layers;b=function(a){return gd(c,a)}}else b=Fd;this.B=b;this.s=a.hitTolerance?a.hitTolerance:0;this.j=null;y(this,Ya("active"),this.C,this)}v(Sx,Kn);
function Tx(a){this.j=Xx(this,a.pixel,a.map);if(!this.a&&this.j){this.a=a.coordinate;Vx.call(this,a);var b=this.o||new bb([this.j]);this.b(new Yx("translatestart",b,a.coordinate));return!0}return!1}function Wx(a){if(this.a){this.a=null;Vx.call(this,a);var b=this.o||new bb([this.j]);this.b(new Yx("translateend",b,a.coordinate));return!0}return!1}
function Ux(a){if(this.a){a=a.coordinate;var b=a[0]-this.a[0],c=a[1]-this.a[1],d=this.o||new bb([this.j]);d.forEach(function(a){var d=a.V();d.translate(b,c);a.Wa(d)});this.a=a;this.b(new Yx("translating",d,a))}}function Vx(a){var b=a.map.Jc();Xx(this,a.pixel,a.map)?(this.f=void 0!==this.f?this.f:b.style.cursor,b.style.cursor=this.a?"-webkit-grabbing":"-webkit-grab",b.style.cursor=this.a?"grabbing":"grab"):void 0!==this.f&&(b.style.cursor=this.f,this.f=void 0)}
function Xx(a,b,c){return c.Ve(b,function(a){if(!this.o||gd(this.o.a,a))return a}.bind(a),{layerFilter:a.B,hitTolerance:a.s})}Sx.prototype.G=function(){return this.s};Sx.prototype.N=function(a){this.s=a};Sx.prototype.setMap=function(a){var b=this.R;Kn.prototype.setMap.call(this,a);Zx(this,b)};Sx.prototype.C=function(){Zx(this,null)};function Zx(a,b){var c=a.R,d=a.c();c&&d||void 0===a.f||(c||(c=b),c.Jc().style.cursor=a.f,a.f=void 0)}
function Yx(a,b,c){Na.call(this,a);this.features=b;this.coordinate=c}v(Yx,Na);function X(a){a=a?a:{};var b=wa({},a);delete b.gradient;delete b.radius;delete b.blur;delete b.shadow;delete b.weight;N.call(this,b);this.j=null;this.X=void 0!==a.shadow?a.shadow:250;this.aa=void 0;this.N=null;y(this,Ya($x),this.qm,this);this.Wj(a.gradient?a.gradient:ay);this.Qj(void 0!==a.blur?a.blur:15);this.qd(void 0!==a.radius?a.radius:8);y(this,Ya(by),this.Ag,this);y(this,Ya(cy),this.Ag,this);this.Ag();var c=a.weight?a.weight:"weight",d;"string"===typeof c?d=function(a){return a.get(c)}:d=c;
this.f(function(a){a=d(a);a=void 0!==a?Mb(a,0,1):1;var b=255*a|0,c=this.N[b];c||(c=[new lj({image:new vl({opacity:a,src:this.aa})})],this.N[b]=c);return c}.bind(this));this.set(Gl,null);y(this,"render",this.Hm,this)}v(X,N);var ay=["#00f","#0ff","#0f0","#ff0","#f00"];k=X.prototype;k.$h=function(){return this.get(by)};k.fi=function(){return this.get($x)};k.aj=function(){return this.get(cy)};
k.qm=function(){for(var a=this.fi(),b=pd(1,256),c=b.createLinearGradient(0,0,1,256),d=1/(a.length-1),e=0,f=a.length;e<f;++e)c.addColorStop(e*d,a[e]);b.fillStyle=c;b.fillRect(0,0,1,256);this.j=b.getImageData(0,0,1,256).data};k.Ag=function(){var a=this.aj(),b=this.$h(),c=a+b+1,d=2*c;d=pd(d,d);d.shadowOffsetX=d.shadowOffsetY=this.X;d.shadowBlur=b;d.shadowColor="#000";d.beginPath();b=c-this.X;d.arc(b,b,a,0,2*Math.PI,!0);d.fill();this.aa=d.canvas.toDataURL();this.N=Array(256);this.u()};
k.Hm=function(a){a=a.context;var b=a.canvas;b=a.getImageData(0,0,b.width,b.height);var c=b.data,d,e;var f=0;for(d=c.length;f<d;f+=4)if(e=4*c[f+3])c[f]=this.j[e],c[f+1]=this.j[e+1],c[f+2]=this.j[e+2];a.putImageData(b,0,0)};k.Qj=function(a){this.set(by,a)};k.Wj=function(a){this.set($x,a)};k.qd=function(a){this.set(cy,a)};var by="blur",$x="gradient",cy="radius";function dy(a){this.c=null;hf.call(this,a);this.G=!1;this.aa=ve();this.X="vector"==a.s?1:0}v(dy,hf);var ey={image:qf,hybrid:["Polygon","LineString"]},fy={hybrid:["Image","Text"],vector:qf};k=dy.prototype;k.Kd=function(a,b){var c=this.a,d=c.g;this.oa!=d&&(this.i.length=0,c=c.s,this.c||"vector"==c||(this.c=pd()),this.c&&"vector"==c&&(this.c=null));this.oa=d;return hf.prototype.Kd.apply(this,arguments)};
k.lg=function(a,b,c,d,e,f,g,h){var l=a,m=this.a,n=b.pixelRatio,p=b.viewState.projection,q=m.g,t=m.get(Gl)||null,u=l.g;if(u.he||u.If!=q||u.nh!=t){u.Rd=null;u.he=!1;var w=m.ba(),z=w.tileGrid,D=l.Ka,B=l.j,S=z.Ra(D[0]),Ua;if("tile-pixels"==B.Pb()){var ya=Ua=w.vb();z=mf(z.gb(D[0]));ya=[0,0,z[0]*ya,z[1]*ya]}else if(Ua=S,ya=z.Ya(D),!Uc(p,B)){var Da=!0;l.Jg(p)}u.he=!1;w=new nk(0,ya,Ua,w.f,m.i);n=xk(Ua,n);Ua=l.f;t&&t!==u.nh&&Ua.sort(t);ya=0;for(z=Ua.length;ya<z;++ya){D=Ua[ya];Da&&D.V().transform(B,p);var C=
void 0,pa=D.Nc();pa?C=pa.call(D,S):(pa=m.a)&&(C=pa(D,S));if(C){Array.isArray(C)||(C=[C]);pa=n;var $a=w;if(C){var ra=!1;if(Array.isArray(C))for(var dc=0,Pa=C.length;dc<Pa;++dc)ra=yk($a,D,C[dc],pa,this.hj,this)||ra;else ra=yk($a,D,C,pa,this.hj,this)||ra;D=ra}else D=!1;this.G=this.G||D;u.he=u.he||D}}sk(w);u.If=q;u.nh=t;u.Rd=w;u.resolution=NaN}this.c&&(q=b,B=this.a,m=l.g,t=B.g,(p=ey[B.s])&&m.oh!==t&&(m.oh=t,Da=l.Ka,u=l.Ka[0],t=q.pixelRatio,S=B.ba(),w=S.tileGrid,n=S.vb(),B=we(this.aa),"tile-pixels"==l.j.Pb()?
(Da=t/n,Ce(B,Da,Da)):(n=t/w.Ra(u),Da=w.Ya(Da,this.o),Ce(B,n,-n),De(B,-Da[0],-Da[3])),l.c||(l.c=pd()),l=l.c,q=S.oe(u,t,q.viewState.projection),l.canvas.width=q[0],l.canvas.height=q[1],m.Rd.i(l,t,B,0,{},p)),hf.prototype.lg.apply(this,arguments))};
k.Ga=function(a,b,c,d,e){var f=b.viewState.resolution;b=b.viewState.rotation;c=void 0==c?0:c;var g=this.a,h={},l=this.i,m=g.ba(),n=m.tileGrid,p;var q=0;for(p=l.length;q<p;++q){var t=l[q];var u=t.Ka;var w=m.tileGrid.Ya(u,this.o);if(nb(kb(w,c*f),a)){"tile-pixels"===t.j.Pb()?(w=Bb(w),f=m.vb(),u=n.Ra(u[0])/f,u=[(a[0]-w[0])/u,(w[1]-a[1])/u]):u=a;t=t.g.Rd;var z=z||t.Ga(u,f,b,c,{},function(a){var b=x(a).toString();if(!(b in h))return h[b]=!0,d.call(e,a,g)})}}return z};k.hj=function(){Ue(this)};
k.Cf=function(a,b,c){var d=fy[this.a.s];if(d){var e=b.pixelRatio,f=b.viewState.rotation,g=b.size,h=Math.round(e*g[0]/2);g=Math.round(e*g[1]/2);for(var l=this.i,m=[],n=[],p=l.length-1;0<=p;--p){var q=l[p];var t=q;var u=b;if("tile-pixels"==t.j.Pb()){var w=this.a.ba(),z=w.tileGrid,D=t.Ka;w=z.Ra(D[0])/w.vb();t=u.viewState;var B=u.pixelRatio,S=t.resolution/B;D=z.Ya(D,this.o);z=t.center;D=Bb(D);u=u.size;u=Ee(this.aa,Math.round(B*u[0]/2),Math.round(B*u[1]/2),w/S,w/S,t.rotation,(D[0]-z[0])/w,(z[1]-D[1])/
w)}else u=ff(this,u,0);w=uk(q.g.Rd,u);t=q.Ka[0];a.save();a.globalAlpha=c.opacity;Ld(a,-f,h,g);B=0;for(S=m.length;B<S;++B)z=m[B],t<n[B]&&(a.beginPath(),a.moveTo(w[0],w[1]),a.lineTo(w[2],w[3]),a.lineTo(w[4],w[5]),a.lineTo(w[6],w[7]),a.moveTo(z[6],z[7]),a.lineTo(z[4],z[5]),a.lineTo(z[2],z[3]),a.lineTo(z[0],z[1]),a.clip());q.g.Rd.i(a,e,u,f,{},d);a.restore();m.push(w);n.push(t)}}hf.prototype.Cf.apply(this,arguments)};function Y(a){a=a?a:{};var b=wa({},a);delete b.preload;delete b.useInterimTilesOnError;N.call(this,b);this.dj(a.preload?a.preload:0);this.ej(a.useInterimTilesOnError?a.useInterimTilesOnError:!0);gb(void 0==a.renderMode||"image"==a.renderMode||"hybrid"==a.renderMode||"vector"==a.renderMode,28);this.s=a.renderMode||"hybrid"}v(Y,N);k=Y.prototype;k.Zd=function(a){var b=null;"canvas"===a.U()&&(b=new dy(this));return b};k.le=function(){return this.get("preload")};k.pe=function(){return this.get("useInterimTilesOnError")};
k.dj=function(a){this.set("preload",a)};k.ej=function(a){this.set("useInterimTilesOnError",a)};function gy(a,b,c,d){function e(){delete window[g];f.parentNode.removeChild(f)}var f=document.createElement("script"),g="olc_"+x(b);f.async=!0;f.src=a+(-1==a.indexOf("?")?"?":"&")+(d||"callback")+"="+g;var h=setTimeout(function(){e();c&&c()},1E4);window[g]=function(a){clearTimeout(h);e();b(a)};document.getElementsByTagName("head")[0].appendChild(f)};function hy(a){this.B=void 0!==a.hidpi?a.hidpi:!1;A.call(this,{cacheSize:a.cacheSize,crossOrigin:"anonymous",opaque:!0,projection:Lc("EPSG:3857"),reprojectionErrorThreshold:a.reprojectionErrorThreshold,state:"loading",tileLoadFunction:a.tileLoadFunction,tilePixelRatio:this.B?2:1,wrapX:void 0!==a.wrapX?a.wrapX:!0});this.N=void 0!==a.culture?a.culture:"en-us";this.v=void 0!==a.maxZoom?a.maxZoom:-1;this.i=a.key;this.o=a.imagerySet;gy("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+this.o+"?uriScheme=https&include=ImageryProviders&key="+
this.i,this.la.bind(this),void 0,"jsonp")}v(hy,A);var iy=new zi({html:'<a class="ol-attribution-bing-tos" href="http://www.microsoft.com/maps/product/terms.html">Terms of Use</a>'});hy.prototype.X=function(){return this.i};hy.prototype.$=function(){return this.o};
hy.prototype.la=function(a){if(200!=a.statusCode||"OK"!=a.statusDescription||"ValidCredentials"!=a.authenticationResultCode||1!=a.resourceSets.length||1!=a.resourceSets[0].resources.length)Ci(this,"error");else{var b=a.brandLogoUri;-1==b.indexOf("https")&&(b=b.replace("http","https"));var c=a.resourceSets[0].resources[0],d=-1==this.v?c.zoomMax:this.v;a=wi(this.c);var e=yi({extent:a,minZoom:c.zoomMin,maxZoom:d,tileSize:(c.imageWidth==c.imageHeight?c.imageWidth:[c.imageWidth,c.imageHeight])/this.vb()});
this.tileGrid=e;var f=this.N,g=this.B;this.tileUrlFunction=oi(c.imageUrlSubdomains.map(function(a){var b=[0,0,0],d=c.imageUrl.replace("{subdomain}",a).replace("{culture}",f);return function(a){if(a)return ki(a[0],a[1],-a[2]-1,b),a=d,g&&(a+="&dpi=d1&device=mobile"),a.replace("{quadkey}",li(b))}}));if(c.imageryProviders){var h=Kc(Lc("EPSG:4326"),this.c);a=c.imageryProviders.map(function(a){var b=a.attribution,c={};a.coverageAreas.forEach(function(a){var b=a.zoomMin,f=Math.min(a.zoomMax,d);a=a.bbox;
a=Lb([a[1],a[0],a[3],a[2]],h);var g;for(g=b;g<=f;++g){var l=g.toString();b=af(e,a,g);l in c?c[l].push(b):c[l]=[b]}});return new zi({html:b,tileRanges:c})});a.push(iy);this.za(a)}this.C=b;Ci(this,"ready")}};function jy(a){a=a||{};var b=void 0!==a.projection?a.projection:"EPSG:3857",c=void 0!==a.tileGrid?a.tileGrid:yi({extent:wi(b),maxZoom:a.maxZoom,minZoom:a.minZoom,tileSize:a.tileSize});A.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,opaque:a.opaque,projection:b,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileGrid:c,tileLoadFunction:a.tileLoadFunction,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:a.tileUrlFunction,url:a.url,urls:a.urls,
wrapX:void 0!==a.wrapX?a.wrapX:!0})}v(jy,A);function ky(a){this.v=a.account;this.B=a.map||"";this.i=a.config||{};this.o={};jy.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,maxZoom:void 0!==a.maxZoom?a.maxZoom:18,minZoom:a.minZoom,projection:a.projection,state:"loading",wrapX:a.wrapX});ly(this)}v(ky,jy);k=ky.prototype;k.wl=function(){return this.i};k.Hr=function(a){wa(this.i,a);ly(this)};k.hr=function(a){this.i=a||{};ly(this)};
function ly(a){var b=JSON.stringify(a.i);if(a.o[b])my(a,a.o[b]);else{var c="https://"+a.v+".cartodb.com/api/v1/map";a.B&&(c+="/named/"+a.B);var d=new XMLHttpRequest;d.addEventListener("load",a.sm.bind(a,b));d.addEventListener("error",a.rm.bind(a));d.open("POST",c);d.setRequestHeader("Content-type","application/json");d.send(JSON.stringify(a.i))}}
k.sm=function(a,b){b=b.target;if(!b.status||200<=b.status&&300>b.status){try{var c=JSON.parse(b.responseText)}catch(d){Ci(this,"error");return}my(this,c);this.o[a]=c;Ci(this,"ready")}else Ci(this,"error")};k.rm=function(){Ci(this,"error")};function my(a,b){a.pb("https://"+b.cdn_url.https+"/"+a.v+"/api/v1/map/"+b.layergroupid+"/{z}/{x}/{y}.png")};function O(a){J.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,wrapX:a.wrapX});this.N=void 0;this.B=void 0!==a.distance?a.distance:20;this.oa=!1;this.G=[];this.Va=a.geometryFunction||function(a){a=a.V();gb(a instanceof L,10);return a};this.v=a.source;this.v.H("change",O.prototype.ih,this)}v(O,J);k=O.prototype;k.Po=function(){return this.B};k.vc=function(){return this.v};k.re=function(a,b,c){this.v.re(a,b,c);b!==this.N&&(this.clear(),this.N=b,ny(this),this.yd(this.G))};
k.Qo=function(a){this.B=a;this.ih()};k.tr=function(a){(this.oa=a)||this.ih()};k.ih=function(){this.oa||(this.clear(),ny(this),this.yd(this.G),this.u())};function ny(a){if(void 0!==a.N){a.G.length=0;for(var b=ib(),c=a.B*a.N,d=a.v.Rc(),e={},f=0,g=d.length;f<g;f++){var h=d[f];x(h).toString()in e||!(h=a.Va(h))||(h=h.T(),sb(h,b),kb(b,c,b),h=a.v.rg(b),h=h.filter(function(a){a=x(a).toString();return a in e?!1:e[a]=!0}),a.G.push(oy(a,h)))}}}
function oy(a,b){for(var c=[0,0],d=b.length-1;0<=d;--d){var e=a.Va(b[d]);e?ud(c,e.T()):b.splice(d,1)}Ad(c,1/b.length);a=new E(new L(c));a.set("features",b);return a};function py(a,b){var c=[];Object.keys(b).forEach(function(a){null!==b[a]&&void 0!==b[a]&&c.push(a+"="+encodeURIComponent(b[a]))});var d=c.join("&");a=a.replace(/[?&]$/,"");a=-1===a.indexOf("?")?a+"?":a+"&";return a+d};function qy(a){a=a||{};Dk.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions});this.X=void 0!==a.crossOrigin?a.crossOrigin:null;this.$=void 0!==a.hidpi?a.hidpi:!0;this.i=a.url;this.f=void 0!==a.imageLoadFunction?a.imageLoadFunction:Jk;this.B=a.params||{};this.O=null;this.s=[0,0];this.N=0;this.G=void 0!==a.ratio?a.ratio:1.5}v(qy,Dk);k=qy.prototype;k.So=function(){return this.B};
k.ad=function(a,b,c,d){if(void 0===this.i)return null;b=Ek(this,b);c=this.$?c:1;var e=this.O;if(e&&this.N==this.g&&e.resolution==b&&e.a==c&&pb(e.D(),a))return e;e={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};wa(e,this.B);a=a.slice();var f=(a[0]+a[2])/2,g=(a[1]+a[3])/2;if(1!=this.G){var h=this.G*Eb(a)/2,l=this.G*Fb(a)/2;a[0]=f-h;a[1]=g-l;a[2]=f+h;a[3]=g+l}h=b/c;l=Math.ceil(Eb(a)/h);var m=Math.ceil(Fb(a)/h);a[0]=f-h*l/2;a[2]=f+h*l/2;a[1]=g-h*m/2;a[3]=g+h*m/2;this.s[0]=l;this.s[1]=m;f=a;g=this.s;h=c;d=
d.tb.split(":").pop();e.SIZE=g[0]+","+g[1];e.BBOX=f.join(",");e.BBOXSR=d;e.IMAGESR=d;e.DPI=Math.round(90*h);d=this.i;f=d.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");f==d&&gb(!1,50);e=py(f,e);this.O=new Gw(a,b,c,this.j,e,this.X,this.f);this.N=this.g;y(this.O,"change",this.l,this);return this.O};k.Ro=function(){return this.f};k.To=function(){return this.i};k.Uo=function(a){this.O=null;this.f=a;this.u()};
k.Vo=function(a){a!=this.i&&(this.i=a,this.O=null,this.u())};k.Wo=function(a){wa(this.B,a);this.O=null;this.u()};function ry(a){Dk.call(this,{projection:a.projection,resolutions:a.resolutions});this.X=void 0!==a.crossOrigin?a.crossOrigin:null;this.s=void 0!==a.displayDpi?a.displayDpi:96;this.f=a.params||{};this.N=a.url;this.i=void 0!==a.imageLoadFunction?a.imageLoadFunction:Jk;this.$=void 0!==a.hidpi?a.hidpi:!0;this.oa=void 0!==a.metersPerUnit?a.metersPerUnit:1;this.B=void 0!==a.ratio?a.ratio:1;this.wa=void 0!==a.useOverlay?a.useOverlay:!1;this.O=null;this.G=0}v(ry,Dk);k=ry.prototype;k.Yo=function(){return this.f};
k.ad=function(a,b,c){b=Ek(this,b);c=this.$?c:1;var d=this.O;if(d&&this.G==this.g&&d.resolution==b&&d.a==c&&pb(d.D(),a))return d;1!=this.B&&(a=a.slice(),Kb(a,this.B));var e=[Eb(a)/b*c,Fb(a)/b*c];if(void 0!==this.N){d=this.N;var f=Gb(a),g=this.oa,h=Eb(a),l=Fb(a),m=e[0],n=e[1],p=.0254/this.s;e={OPERATION:this.wa?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol.source.ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.s,SETDISPLAYWIDTH:Math.round(e[0]),SETDISPLAYHEIGHT:Math.round(e[1]),
SETVIEWSCALE:n*h>m*l?h*g/(m*p):l*g/(n*p),SETVIEWCENTERX:f[0],SETVIEWCENTERY:f[1]};wa(e,this.f);d=py(d,e);d=new Gw(a,b,c,this.j,d,this.X,this.i);y(d,"change",this.l,this)}else d=null;this.O=d;this.G=this.g;return d};k.Xo=function(){return this.i};k.$o=function(a){wa(this.f,a);this.u()};k.Zo=function(a){this.O=null;this.i=a;this.u()};function sy(a){var b=a.imageExtent,c=void 0!==a.crossOrigin?a.crossOrigin:null,d=void 0!==a.imageLoadFunction?a.imageLoadFunction:Jk;Dk.call(this,{attributions:a.attributions,logo:a.logo,projection:Lc(a.projection)});this.O=new Gw(b,void 0,1,this.j,a.url,c,d);this.i=a.imageSize?a.imageSize:null;y(this.O,"change",this.l,this)}v(sy,Dk);sy.prototype.ad=function(a){return Jb(a,this.O.D())?this.O:null};
sy.prototype.l=function(a){if(2==this.O.getState()){var b=this.O.D(),c=this.O.W();if(this.i){var d=this.i[0];var e=this.i[1]}else d=c.width,e=c.height;b=Math.ceil(Eb(b)/(Fb(b)/e));if(b!=d){b=pd(b,e);var f=b.canvas;b.drawImage(c,0,0,d,e,0,0,f.width,f.height);this.O.sh(f)}}Dk.prototype.l.call(this,a)};function ty(a){a=a||{};Dk.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions});this.oa=void 0!==a.crossOrigin?a.crossOrigin:null;this.f=a.url;this.B=void 0!==a.imageLoadFunction?a.imageLoadFunction:Jk;this.i=a.params||{};this.s=!0;uy(this);this.$=a.serverType;this.wa=void 0!==a.hidpi?a.hidpi:!0;this.O=null;this.G=[0,0];this.X=0;this.N=void 0!==a.ratio?a.ratio:1.5}v(ty,Dk);var vy=[101,101];k=ty.prototype;
k.fp=function(a,b,c,d){if(void 0!==this.f){var e=Hb(a,b,0,vy),f={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.i.LAYERS};wa(f,this.i,d);d=Math.floor((e[3]-a[1])/b);f[this.s?"I":"X"]=Math.floor((a[0]-e[0])/b);f[this.s?"J":"Y"]=d;return wy(this,e,vy,1,Lc(c),f)}};k.hp=function(){return this.i};
k.ad=function(a,b,c,d){if(void 0===this.f)return null;b=Ek(this,b);1==c||this.wa&&void 0!==this.$||(c=1);var e=b/c,f=Gb(a),g=Hb(f,e,0,[Math.ceil(Eb(a)/e),Math.ceil(Fb(a)/e)]);a=Hb(f,e,0,[Math.ceil(this.N*Eb(a)/e),Math.ceil(this.N*Fb(a)/e)]);if((f=this.O)&&this.X==this.g&&f.resolution==b&&f.a==c&&pb(f.D(),g))return f;g={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};wa(g,this.i);this.G[0]=Math.round(Eb(a)/e);this.G[1]=Math.round(Fb(a)/e);d=wy(this,a,this.G,c,d,g);
this.O=new Gw(a,b,c,this.j,d,this.oa,this.B);this.X=this.g;y(this.O,"change",this.l,this);return this.O};k.gp=function(){return this.B};
function wy(a,b,c,d,e,f){gb(void 0!==a.f,9);f[a.s?"CRS":"SRS"]=e.tb;"STYLES"in a.i||(f.STYLES="");if(1!=d)switch(a.$){case "geoserver":d=90*d+.5|0;f.FORMAT_OPTIONS="FORMAT_OPTIONS"in f?f.FORMAT_OPTIONS+(";dpi:"+d):"dpi:"+d;break;case "mapserver":f.MAP_RESOLUTION=90*d;break;case "carmentaserver":case "qgis":f.DPI=90*d;break;default:gb(!1,8)}f.WIDTH=c[0];f.HEIGHT=c[1];c=e.b;var g;a.s&&"ne"==c.substr(0,2)?g=[b[1],b[0],b[3],b[2]]:g=b;f.BBOX=g.join(",");return py(a.f,f)}k.ip=function(){return this.f};
k.jp=function(a){this.O=null;this.B=a;this.u()};k.kp=function(a){a!=this.f&&(this.f=a,this.O=null,this.u())};k.lp=function(a){wa(this.i,a);uy(this);this.O=null;this.u()};function uy(a){a.s=0<=td(a.i.VERSION||"1.3.0")};function xy(a){a=a||{};var b;void 0!==a.attributions?b=a.attributions:b=[yy];jy.call(this,{attributions:b,cacheSize:a.cacheSize,crossOrigin:void 0!==a.crossOrigin?a.crossOrigin:"anonymous",opaque:void 0!==a.opaque?a.opaque:!0,maxZoom:void 0!==a.maxZoom?a.maxZoom:19,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileLoadFunction:a.tileLoadFunction,url:void 0!==a.url?a.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",wrapX:a.wrapX})}v(xy,jy);var yy=new zi({html:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.'});(function(){var a={},b={na:a};(function(c){if("object"===typeof a&&"undefined"!==typeof b)b.na=c();else{var d;"undefined"!==typeof window?d=window:"undefined"!==typeof global?d=global:"undefined"!==typeof self?d=self:d=this;d.es=c()}})(function(){return function g(a,b,f){function d(h,l){if(!b[h]){if(!a[h]){var m="function"==typeof require&&require;if(!l&&m)return m(h,!0);if(e)return e(h,!0);l=Error("Cannot find module '"+h+"'");throw l.code="MODULE_NOT_FOUND",l;}l=b[h]={na:{}};a[h][0].call(l.na,function(b){var e=
a[h][1][b];return d(e?e:b)},l,l.na,g,a,b,f)}return b[h].na}for(var e="function"==typeof require&&require,m=0;m<f.length;m++)d(f[m]);return d}({1:[function(a,b,f){a=a("./processor");f.Ak=a},{"./processor":2}],2:[function(a,b){function d(a){var b=!0;try{new ImageData(10,10)}catch(q){b=!1}return function(d){var e=d.buffers,f=d.meta,g=d.width,h=d.height,l=e.length,m=e[0].byteLength;if(d.imageOps){m=Array(l);for(d=0;d<l;++d){var n=d;var p=new Uint8ClampedArray(e[d]);var q=g,Da=h;p=b?new ImageData(p,q,
Patrick's avatar
Patrick committed
885
Da):{data:p,width:q,height:Da};m[n]=p}g=a(m,f).data}else{g=new Uint8ClampedArray(m);h=Array(l);n=Array(l);for(d=0;d<l;++d)h[d]=new Uint8ClampedArray(e[d]),n[d]=[0,0,0,0];for(e=0;e<m;e+=4){for(d=0;d<l;++d)p=h[d],n[d][0]=p[e],n[d][1]=p[e+1],n[d][2]=p[e+2],n[d][3]=p[e+3];d=a(n,f);g[e]=d[0];g[e+1]=d[1];g[e+2]=d[2];g[e+3]=d[3]}}return g.buffer}}function e(a,b){var e=Object.keys(a.lib||{}).map(function(b){return"var "+b+" = "+a.lib[b].toString()+";"}).concat(["var __minion__ = ("+d.toString()+")(",a.operation.toString(),
Patrick's avatar
Patrick committed
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
");",'self.addEventListener("message", function(event) {',"  var buffer = __minion__(event.data);","  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]);e=URL.createObjectURL(new Blob(e,{type:"text/javascript"}));e=new Worker(e);e.addEventListener("message",b);return e}function h(a,b){var e=d(a.operation);return{postMessage:function(a){setTimeout(function(){b({data:{buffer:e(a),meta:a.meta}})},0)}}}function l(a){this.ag=!!a.Qm;var b;0===a.threads?b=0:this.ag?b=1:b=a.threads||
1;var d=[];if(b)for(var f=0;f<b;++f)d[f]=e(a,this.Lh.bind(this,f));else d[0]=h(a,this.Lh.bind(this,0));this.Oe=d;this.Xd=[];this.Ok=a.mq||Infinity;this.Me=0;this.xd={};this.bg=null}var m=a("./util").kn;l.prototype.kq=function(a,b,d){this.Mk({inputs:a,ui:b,callback:d});this.Ih()};l.prototype.destroy=function(){for(var a in this)this[a]=null;this.Lk=!0};l.prototype.Mk=function(a){for(this.Xd.push(a);this.Xd.length>this.Ok;)this.Xd.shift().callback(null,null)};l.prototype.Ih=function(){if(0===this.Me&&
0<this.Xd.length){var a=this.bg=this.Xd.shift(),b=a.inputs[0].width,d=a.inputs[0].height,e=a.inputs.map(function(a){return a.data.buffer}),f=this.Oe.length;this.Me=f;if(1===f)this.Oe[0].postMessage({buffers:e,meta:a.ui,imageOps:this.ag,width:b,height:d},e);else for(var g=4*Math.ceil(a.inputs[0].data.length/4/f),h=0;h<f;++h){for(var l=h*g,m=[],S=0,Ua=e.length;S<Ua;++S)m.push(e[h].slice(l,l+g));this.Oe[h].postMessage({buffers:m,meta:a.ui,imageOps:this.ag,width:b,height:d},m)}}};l.prototype.Lh=function(a,
b){this.Lk||(this.xd[a]=b.data,--this.Me,0===this.Me&&this.Pk())};l.prototype.Pk=function(){var a=this.bg,b=this.Oe.length;if(1===b){var d=new Uint8ClampedArray(this.xd[0].buffer);var e=this.xd[0].meta}else{var f=a.inputs[0].data.length;d=new Uint8ClampedArray(f);e=Array(f);f=4*Math.ceil(f/4/b);for(var g=0;g<b;++g){var h=g*f;d.set(new Uint8ClampedArray(this.xd[g].buffer),h);e[g]=this.xd[g].meta}}this.bg=null;this.xd={};a.callback(null,m(d,a.inputs[0].width,a.inputs[0].height),e);this.Ih()};b.na=l},
{"./util":3}],3:[function(a,b,f){var d=!0;try{new ImageData(10,10)}catch(l){d=!1}var e=document.createElement("canvas").getContext("2d");f.kn=function(a,b,f){if(d)return new ImageData(a,b,f);b=e.createImageData(b,f);b.data.set(a);return b}},{}]},{},[1])(1)});$g=b.na})();function zy(a){this.G=null;this.wa=void 0!==a.operationType?a.operationType:"pixel";this.Ua=void 0!==a.threads?a.threads:1;this.f=Ay(a.sources);for(var b=0,c=this.f.length;b<c;++b)y(this.f[b],"change",this.u,this);this.$=new an(function(){return 1},this.u.bind(this));b=By(this.f);c={};for(var d=0,e=b.length;d<e;++d)c[x(b[d].layer)]=b[d];this.i=null;this.N={animate:!1,attributions:{},coordinateToPixelTransform:ve(),extent:null,focus:null,index:0,layerStates:c,layerStatesArray:b,logos:{},pixelRatio:1,
pixelToCoordinateTransform:ve(),postRenderFunctions:[],size:[0,0],skippedFeatureUids:{},tileQueue:this.$,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{}};Dk.call(this,{});void 0!==a.operation&&this.B(a.operation,a.lib)}v(zy,Dk);zy.prototype.B=function(a,b){this.G=new $g.Ak({operation:a,Qm:"image"===this.wa,mq:1,lib:b,threads:this.Ua});this.u()};
zy.prototype.W=function(a,b,c,d){c=!0;for(var e,f=0,g=this.f.length;f<g;++f)if(e=this.f[f].a.ba(),"ready"!==e.getState()){c=!1;break}if(!c)return null;c=wa({},this.N);c.viewState=wa({},c.viewState);e=Gb(a);c.extent=a.slice();c.focus=e;c.size[0]=Math.round(Eb(a)/b);c.size[1]=Math.round(Fb(a)/b);f=c.viewState;f.center=e;f.projection=d;f.resolution=b;this.s=c;bn(c.tileQueue,16,16);this.i&&(d=this.i.resolution,c=this.i.D(),b===d&&vb(a,c)||(this.i=null));if(!this.i||this.g!==this.X)a:{a=this.s;d=this.f.length;
b=Array(d);for(c=0;c<d;++c){e=this.f[c];f=a;g=a.layerStatesArray[c];if(e.Kd(f,g)){var h=f.size[0],l=f.size[1];if(Cy){var m=Cy.canvas;m.width!==h||m.height!==l?Cy=pd(h,l):Cy.clearRect(0,0,h,l)}else Cy=pd(h,l);e.v(f,g,Cy);e=Cy.getImageData(0,0,h,l)}else e=null;if(e)b[c]=e;else break a}d={};this.b(new Dy(Ey,a,d));this.G.kq(b,d,this.oa.bind(this,a))}return this.i};
zy.prototype.oa=function(a,b,c,d){if(!b&&c){b=a.extent;var e=a.viewState.resolution;if(e===this.s.viewState.resolution&&vb(b,this.s.extent)){if(this.i)var f=this.i.W().getContext("2d");else f=pd(Math.round(Eb(b)/e),Math.round(Fb(b)/e)),this.i=new Bk(b,e,1,this.j,f.canvas);f.putImageData(c,0,0);this.u();this.X=this.g;this.b(new Dy(Fy,a,d))}}};var Cy=null;function By(a){return a.map(function(a){return Vb(a.a)})}
function Ay(a){for(var b=a.length,c=Array(b),d=0;d<b;++d){var e=d,f=a[d],g=null;f instanceof Di?(f=new Xh({source:f}),g=new hf(f)):f instanceof Dk&&(f=new wl({source:f}),g=new Il(f));c[e]=g}return c}function Dy(a,b,c){Na.call(this,a);this.extent=b.extent;this.resolution=b.viewState.resolution/b.pixelRatio;this.data=c}v(Dy,Na);zy.prototype.ad=function(){return null};var Ey="beforeoperations",Fy="afteroperations";function Gy(a){var b=a.layer.indexOf("-");b=Hy[-1==b?a.layer:a.layer.slice(0,b)];var c=Iy[a.layer];jy.call(this,{attributions:Jy,cacheSize:a.cacheSize,crossOrigin:"anonymous",maxZoom:void 0!=a.maxZoom?a.maxZoom:b.maxZoom,minZoom:void 0!=a.minZoom?a.minZoom:b.minZoom,opaque:c.opaque,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileLoadFunction:a.tileLoadFunction,url:void 0!==a.url?a.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+a.layer+"/{z}/{x}/{y}."+c.Mb})}v(Gy,jy);
var Jy=[new zi({html:'Map tiles by <a href="http://stamen.com/">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.'}),yy],Iy={terrain:{Mb:"jpg",opaque:!0},"terrain-background":{Mb:"jpg",opaque:!0},"terrain-labels":{Mb:"png",opaque:!1},"terrain-lines":{Mb:"png",opaque:!1},"toner-background":{Mb:"png",opaque:!0},toner:{Mb:"png",opaque:!0},"toner-hybrid":{Mb:"png",opaque:!1},"toner-labels":{Mb:"png",opaque:!1},"toner-lines":{Mb:"png",opaque:!1},"toner-lite":{Mb:"png",
opaque:!0},watercolor:{Mb:"jpg",opaque:!0}},Hy={terrain:{minZoom:4,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:1,maxZoom:16}};function Ky(a){a=a||{};A.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,projection:a.projection,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction,url:a.url,urls:a.urls,wrapX:void 0!==a.wrapX?a.wrapX:!0});this.i=a.params||{};this.o=ib();Ei(this,Ly(this))}v(Ky,A);function Ly(a){var b=0,c=[],d;for(d in a.i)c[b++]=d+"-"+a.i[d];return c.join("/")}Ky.prototype.v=function(){return this.i};
Ky.prototype.vb=function(a){return a};
Ky.prototype.Yc=function(a,b,c){var d=this.tileGrid;d||(d=this.Ob(c));if(!(d.b.length<=a[0])){var e=d.Ya(a,this.o),f=mf(d.gb(a[0]),this.l);1!=b&&(f=Uh(f,b,this.l));d={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};wa(d,this.i);var g=this.urls;g?(c=c.tb.split(":").pop(),d.SIZE=f[0]+","+f[1],d.BBOX=e.join(","),d.BBOXSR=c,d.IMAGESR=c,d.DPI=Math.round(d.DPI?d.DPI*b:90*b),a=(1==g.length?g[0]:g[Sb((a[1]<<a[0])+a[2],g.length)]).replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),
a=py(a,d)):a=void 0;return a}};Ky.prototype.B=function(a){wa(this.i,a);Ei(this,Ly(this))};function My(a){Di.call(this,{opaque:!1,projection:a.projection,tileGrid:a.tileGrid,wrapX:void 0!==a.wrapX?a.wrapX:!0})}v(My,Di);My.prototype.cd=function(a,b,c){var d=this.cc(a,b,c);if(this.a.b.hasOwnProperty(d))return this.a.get(d);var e=mf(this.tileGrid.gb(a));a=[a,b,c];b=(b=Fi(this,a))?Fi(this,b).toString():"";e=new Ny(a,e,b);this.a.set(d,e);return e};function Ny(a,b,c){Yh.call(this,a,2);this.c=b;this.Ja=c;this.g=null}v(Ny,Yh);
Ny.prototype.W=function(){if(this.g)return this.g;var a=this.c,b=pd(a[0],a[1]);b.strokeStyle="black";b.strokeRect(.5,.5,a[0]+.5,a[1]+.5);b.fillStyle="black";b.textAlign="center";b.textBaseline="middle";b.font="24px sans-serif";b.fillText(this.Ja,a[0]/2,a[1]/2);return this.g=b.canvas};Ny.prototype.load=function(){};function Oy(a){this.i=null;A.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,projection:Lc("EPSG:3857"),reprojectionErrorThreshold:a.reprojectionErrorThreshold,state:"loading",tileLoadFunction:a.tileLoadFunction,wrapX:void 0!==a.wrapX?a.wrapX:!0});if(a.jsonp)gy(a.url,this.lj.bind(this),this.wf.bind(this));else{var b=new XMLHttpRequest;b.addEventListener("load",this.np.bind(this));b.addEventListener("error",this.mp.bind(this));b.open("GET",a.url);b.send()}}
v(Oy,A);k=Oy.prototype;k.np=function(a){a=a.target;if(!a.status||200<=a.status&&300>a.status){try{var b=JSON.parse(a.responseText)}catch(c){this.wf();return}this.lj(b)}else this.wf()};k.mp=function(){this.wf()};k.dm=function(){return this.i};
k.lj=function(a){var b=Lc("EPSG:4326"),c=this.c;if(void 0!==a.bounds){var d=Kc(b,c);var e=Lb(a.bounds,d)}var f=a.minzoom||0;d=a.maxzoom||22;this.tileGrid=c=yi({extent:wi(c),maxZoom:d,minZoom:f});this.tileUrlFunction=ni(a.tiles,c);if(void 0!==a.attribution&&!this.j){b=void 0!==e?e:b.D();e={};for(var g;f<=d;++f)g=f.toString(),e[g]=[af(c,b,f)];this.za([new zi({html:a.attribution,tileRanges:e})])}this.i=a;Ci(this,"ready")};k.wf=function(){Ci(this,"error")};function Py(a){Di.call(this,{projection:Lc("EPSG:3857"),state:"loading"});this.s=void 0!==a.preemptive?a.preemptive:!0;this.o=pi;this.f=void 0;this.i=a.jsonp||!1;if(a.url)if(this.i)gy(a.url,this.Qg.bind(this),this.xf.bind(this));else{var b=new XMLHttpRequest;b.addEventListener("load",this.rp.bind(this));b.addEventListener("error",this.qp.bind(this));b.open("GET",a.url);b.send()}else a.tileJSON?this.Qg(a.tileJSON):gb(!1,51)}v(Py,Di);k=Py.prototype;
k.rp=function(a){a=a.target;if(!a.status||200<=a.status&&300>a.status){try{var b=JSON.parse(a.responseText)}catch(c){this.xf();return}this.Qg(b)}else this.xf()};k.qp=function(){this.xf()};k.am=function(){return this.f};k.jl=function(a,b,c,d,e){this.tileGrid?(b=this.tileGrid.$e(a,b),Qy(this.cd(b[0],b[1],b[2],1,this.c),a,c,d,e)):!0===e?setTimeout(function(){c.call(d,null)},0):c.call(d,null)};k.xf=function(){Ci(this,"error")};
k.Qg=function(a){var b=Lc("EPSG:4326"),c=this.c;if(void 0!==a.bounds){var d=Kc(b,c);var e=Lb(a.bounds,d)}var f=a.minzoom||0;d=a.maxzoom||22;this.tileGrid=c=yi({extent:wi(c),maxZoom:d,minZoom:f});this.f=a.template;var g=a.grids;if(g){this.o=ni(g,c);if(void 0!==a.attribution){b=void 0!==e?e:b.D();for(e={};f<=d;++f)g=f.toString(),e[g]=[af(c,b,f)];this.za([new zi({html:a.attribution,tileRanges:e})])}Ci(this,"ready")}else Ci(this,"error")};
k.cd=function(a,b,c,d,e){var f=this.cc(a,b,c);if(this.a.b.hasOwnProperty(f))return this.a.get(f);a=[a,b,c];b=Fi(this,a,e);d=this.o(b,d,e);d=new Ry(a,void 0!==d?0:4,void 0!==d?d:"",this.tileGrid.Ya(a),this.s,this.i);this.a.set(f,d);return d};k.zh=function(a,b,c){a=this.cc(a,b,c);this.a.b.hasOwnProperty(a)&&this.a.get(a)};function Ry(a,b,c,d,e,f){Yh.call(this,a,b);this.o=c;this.g=d;this.I=e;this.c=this.l=this.f=null;this.s=f}v(Ry,Yh);k=Ry.prototype;k.W=function(){return null};
Patrick's avatar
Patrick committed
907
k.getData=function(a){if(!this.f||!this.l)return null;var b=this.f[Math.floor((1-(a[1]-this.g[1])/(this.g[3]-this.g[1]))*this.f.length)];if("string"!==typeof b)return null;b=b.charCodeAt(Math.floor((a[0]-this.g[0])/(this.g[2]-this.g[0])*b.length));93<=b&&b--;35<=b&&b--;b-=32;a=null;b in this.l&&(b=this.l[b],this.c&&b in this.c?a=this.c[b]:a=b);return a};
Patrick's avatar
Patrick committed
908
909
910
911
function Qy(a,b,c,d,e){0==a.state&&!0===e?(Ia(a,"change",function(){c.call(d,this.getData(b))},a),Sy(a)):!0===e?setTimeout(function(){c.call(d,this.getData(b))}.bind(a),0):c.call(d,a.getData(b))}k.ob=function(){return this.o};k.bf=function(){this.state=3;this.u()};k.mj=function(a){this.f=a.grid;this.l=a.keys;this.c=a.data;this.state=4;this.u()};
function Sy(a){if(0==a.state)if(a.state=1,a.s)gy(a.o,a.mj.bind(a),a.bf.bind(a));else{var b=new XMLHttpRequest;b.addEventListener("load",a.pp.bind(a));b.addEventListener("error",a.op.bind(a));b.open("GET",a.o);b.send()}}k.pp=function(a){a=a.target;if(!a.status||200<=a.status&&300>a.status){try{var b=JSON.parse(a.responseText)}catch(c){this.bf();return}this.mj(b)}else this.bf()};k.op=function(){this.bf()};k.load=function(){this.I&&Sy(this)};function Ty(a){a=a||{};var b=a.params||{};A.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,opaque:!("TRANSPARENT"in b?b.TRANSPARENT:1),projection:a.projection,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction,url:a.url,urls:a.urls,wrapX:void 0!==a.wrapX?a.wrapX:!0});this.v=void 0!==a.gutter?a.gutter:0;this.i=b;this.o=!0;this.B=a.serverType;this.X=void 0!==a.hidpi?a.hidpi:!0;this.N="";
Uy(this);this.$=ib();Vy(this);Ei(this,Wy(this))}v(Ty,A);k=Ty.prototype;
k.sp=function(a,b,c,d){c=Lc(c);var e=this.tileGrid;e||(e=this.Ob(c));b=e.$e(a,b);if(!(e.b.length<=b[0])){var f=e.Ra(b[0]),g=e.Ya(b,this.$);e=mf(e.gb(b[0]),this.l);var h=this.v;0!==h&&(e=Th(e,h,this.l),g=kb(g,f*h,g));h={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.i.LAYERS};wa(h,this.i,d);d=Math.floor((g[3]-a[1])/f);h[this.o?"I":"X"]=Math.floor((a[0]-g[0])/f);h[this.o?"J":"Y"]=d;return Xy(this,b,e,g,1,c,h)}};k.tg=function(){return this.v};
Patrick's avatar
Patrick committed
912
k.cc=function(a,b,c){return this.N+A.prototype.cc.call(this,a,b,c)};k.tp=function(){return this.i};
Patrick's avatar
Patrick committed
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
function Xy(a,b,c,d,e,f,g){var h=a.urls;if(h){g.WIDTH=c[0];g.HEIGHT=c[1];g[a.o?"CRS":"SRS"]=f.tb;"STYLES"in a.i||(g.STYLES="");if(1!=e)switch(a.B){case "geoserver":c=90*e+.5|0;g.FORMAT_OPTIONS="FORMAT_OPTIONS"in g?g.FORMAT_OPTIONS+(";dpi:"+c):"dpi:"+c;break;case "mapserver":g.MAP_RESOLUTION=90*e;break;case "carmentaserver":case "qgis":g.DPI=90*e;break;default:gb(!1,52)}f=f.b;a.o&&"ne"==f.substr(0,2)&&(a=d[0],d[0]=d[1],d[1]=a,a=d[2],d[2]=d[3],d[3]=a);g.BBOX=d.join(",");return py(1==h.length?h[0]:h[Sb((b[1]<<
b[0])+b[2],h.length)],g)}}k.vb=function(a){return this.X&&void 0!==this.B?a:1};function Uy(a){var b=0,c=[];if(a.urls){var d;var e=0;for(d=a.urls.length;e<d;++e)c[b++]=a.urls[e]}a.N=c.join("#")}function Wy(a){var b=0,c=[],d;for(d in a.i)c[b++]=d+"-"+a.i[d];return c.join("/")}
k.Yc=function(a,b,c){var d=this.tileGrid;d||(d=this.Ob(c));if(!(d.b.length<=a[0])){1==b||this.X&&void 0!==this.B||(b=1);var e=d.Ra(a[0]),f=d.Ya(a,this.$);d=mf(d.gb(a[0]),this.l);var g=this.v;0!==g&&(d=Th(d,g,this.l),f=kb(f,e*g,f));1!=b&&(d=Uh(d,b,this.l));e={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};wa(e,this.i);return Xy(this,a,d,f,b,c,e)}};k.jb=function(a){A.prototype.jb.call(this,a);Uy(this)};k.vp=function(a){wa(this.i,a);Uy(this);Vy(this);Ei(this,Wy(this))};
function Vy(a){a.o=0<=td(a.i.VERSION||"1.3.0")};function Yy(a,b,c,d,e){Yh.call(this,a,b);this.c=null;this.l=d;this.f=null;this.g={he:!1,nh:null,If:-1,oh:-1,Rd:null};this.I=e;this.o=c}v(Yy,Yh);k=Yy.prototype;k.W=function(){return-1==this.g.oh?null:this.c.canvas};k.Gn=function(){return this.l};k.ob=function(){return this.o};k.load=function(){0==this.state&&(this.state=1,this.u(),this.I(this,this.o),this.s(null,NaN,null))};k.Up=function(a,b){this.Jg(b);this.Tj(a)};k.Tp=function(){this.state=3;this.u()};k.Tj=function(a){this.f=a;this.state=2;this.u()};
k.Jg=function(a){this.j=a};k.Yj=function(a){this.s=a};function Zy(a,b){a.Yj(Nj(b,a.l,a.Up.bind(a),a.Tp.bind(a)))};function $y(a){Hi.call(this,{attributions:a.attributions,cacheSize:void 0!==a.cacheSize?a.cacheSize:128,extent:a.extent,logo:a.logo,opaque:!1,projection:a.projection,state:a.state,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction?a.tileLoadFunction:Zy,tileUrlFunction:a.tileUrlFunction,tilePixelRatio:a.tilePixelRatio,url:a.url,urls:a.urls,wrapX:void 0===a.wrapX?!0:a.wrapX});this.i=a.format?a.format:null;this.f=void 0==a.overlaps?!0:a.overlaps;this.tileClass=a.tileClass?a.tileClass:Yy}v($y,Hi);
$y.prototype.cd=function(a,b,c,d,e){var f=this.cc(a,b,c);if(this.a.b.hasOwnProperty(f))return this.a.get(f);a=[a,b,c];d=(b=Fi(this,a,e))?this.tileUrlFunction(b,d,e):void 0;d=new this.tileClass(a,void 0!==d?0:4,void 0!==d?d:"",this.i,this.tileLoadFunction);y(d,"change",this.oj,this);this.a.set(f,d);return d};$y.prototype.vb=function(a){return void 0==a?Hi.prototype.vb.call(this,a):a};$y.prototype.oe=function(a,b){a=mf(this.tileGrid.gb(a));return[Math.round(a[0]*b),Math.round(a[1]*b)]};function az(a){this.l=a.matrixIds;ri.call(this,{extent:a.extent,origin:a.origin,origins:a.origins,resolutions:a.resolutions,tileSize:a.tileSize,tileSizes:a.tileSizes,sizes:a.sizes,minZoom:a.minZoom})}v(az,ri);az.prototype.o=function(){return this.l};
function bz(a,b,c){var d=[],e=[],f=[],g=[],h=[],l=void 0!==c?c:[];c=Lc(a.SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"));var m=c.dc(),n="ne"==c.b.substr(0,2);a.TileMatrix.sort(function(a,b){return b.ScaleDenominator-a.ScaleDenominator});a.TileMatrix.forEach(function(a){var b;0<l.length?b=kd(l,function(b){return a.Identifier==b.TileMatrix}):b=!0;if(b){e.push(a.Identifier);b=2.8E-4*a.ScaleDenominator/m;var c=a.TileWidth,p=a.TileHeight;n?f.push([a.TopLeftCorner[1],a.TopLeftCorner[0]]):
f.push(a.TopLeftCorner);d.push(b);g.push(c==p?c:[c,p]);h.push([a.MatrixWidth,-a.MatrixHeight])}});return new az({extent:b,origins:f,resolutions:d,matrixIds:e,tileSizes:g,sizes:h})};function Z(a){function b(a){a="KVP"==d?py(a,f):a.replace(/\{(\w+?)\}/g,function(a,b){return b.toLowerCase()in f?f[b.toLowerCase()]:a});return function(b){if(b){var c={TileMatrix:e.l[b[0]],TileCol:b[1],TileRow:-b[2]-1};wa(c,g);b=a;return b="KVP"==d?py(b,c):b.replace(/\{(\w+?)\}/g,function(a,b){return c[b]})}}}this.$=void 0!==a.version?a.version:"1.0.0";this.v=void 0!==a.format?a.format:"image/jpeg";this.i=void 0!==a.dimensions?a.dimensions:{};this.B=a.layer;this.o=a.matrixSet;this.N=a.style;var c=
a.urls;void 0===c&&void 0!==a.url&&(c=qi(a.url));var d=this.X=void 0!==a.requestEncoding?a.requestEncoding:"KVP",e=a.tileGrid,f={layer:this.B,style:this.N,tilematrixset:this.o};"KVP"==d&&wa(f,{Service:"WMTS",Request:"GetTile",Version:this.$,Format:this.v});var g=this.i,h=c&&0<c.length?oi(c.map(b)):pi;A.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,projection:a.projection,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileClass:a.tileClass,
tileGrid:e,tileLoadFunction:a.tileLoadFunction,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:h,urls:c,wrapX:void 0!==a.wrapX?a.wrapX:!1});Ei(this,cz(this))}v(Z,A);k=Z.prototype;k.Al=function(){return this.i};k.wp=function(){return this.v};k.xp=function(){return this.B};k.Ol=function(){return this.o};k.Zl=function(){return this.X};k.yp=function(){return this.N};k.gm=function(){return this.$};function cz(a){var b=0,c=[],d;for(d in a.i)c[b++]=d+"-"+a.i[d];return c.join("/")}
k.Ir=function(a){wa(this.i,a);Ei(this,cz(this))};function dz(a){a=a||{};var b=a.size,c=b[0],d=b[1],e=[],f=256;switch(void 0!==a.tierSizeCalculation?a.tierSizeCalculation:ez){case ez:for(;c>f||d>f;)e.push([Math.ceil(c/f),Math.ceil(d/f)]),f+=f;break;case fz:for(;c>f||d>f;)e.push([Math.ceil(c/f),Math.ceil(d/f)]),c>>=1,d>>=1;break;default:gb(!1,53)}e.push([1,1]);e.reverse();f=[1];var g=[0];d=1;for(c=e.length;d<c;d++)f.push(1<<d),g.push(e[d-1][0]*e[d-1][1]+g[d-1]);f.reverse();b=[0,-b[1],b[0],0];b=new ri({extent:b,origin:Bb(b),resolutions:f});(f=a.url)&&
-1==f.indexOf("{TileGroup}")&&(f+="{TileGroup}/{z}-{x}-{y}.jpg");f=qi(f);f=oi(f.map(function(a){return function(b){if(b){var c=b[0],d=b[1];b=-b[2]-1;var f={z:c,x:d,y:b,TileGroup:"TileGroup"+((d+b*e[c][0]+g[c])/256|0)};return a.replace(/\{(\w+?)\}/g,function(a,b){return f[b]})}}}));A.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,projection:a.projection,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileClass:gz,tileGrid:b,tileUrlFunction:f})}
v(dz,A);function gz(a,b,c,d,e){Zh.call(this,a,b,c,d,e);this.g=null}v(gz,Zh);gz.prototype.W=function(){if(this.g)return this.g;var a=Zh.prototype.W.call(this);if(2==this.state){if(256==a.width&&256==a.height)return this.g=a;var b=pd(256,256);b.drawImage(a,0,0);return this.g=b.canvas}return a};var ez="default",fz="truncated";function hz(a,b){this.b=b;this.a=[{x:0,y:0,width:a,height:a}];this.c={};this.g=pd(a,a);this.i=this.g.canvas}hz.prototype.get=function(a){return this.c[a]||null};
hz.prototype.add=function(a,b,c,d,e){var f;var g=0;for(f=this.a.length;g<f;++g){var h=this.a[g];if(h.width>=b+this.b&&h.height>=c+this.b)return f={offsetX:h.x+this.b,offsetY:h.y+this.b,image:this.i},this.c[a]=f,d.call(e,this.g,h.x+this.b,h.y+this.b),a=g,b+=this.b,d=c+this.b,h.width-b>h.height-d?(c={x:h.x+b,y:h.y,width:h.width-b,height:h.height},b={x:h.x,y:h.y+d,width:b,height:h.height-d},iz(this,a,c,b)):(c={x:h.x+b,y:h.y,width:h.width-b,height:d},b={x:h.x,y:h.y+d,width:h.width,height:h.height-d},
iz(this,a,c,b)),f}return null};function iz(a,b,c,d){b=[b,1];0<c.width&&0<c.height&&b.push(c);0<d.width&&0<d.height&&b.push(d);a.a.splice.apply(a.a,b)};function jz(a){a=a||{};this.a=void 0!==a.initialSize?a.initialSize:256;this.g=void 0!==a.maxSize?a.maxSize:void 0!==sa?sa:2048;this.b=void 0!==a.space?a.space:1;this.i=[new hz(this.a,this.b)];this.c=this.a;this.f=[new hz(this.c,this.b)]}jz.prototype.add=function(a,b,c,d,e,f){if(b+this.b>this.g||c+this.b>this.g)return null;d=kz(this,!1,a,b,c,d,f);if(!d)return null;a=kz(this,!0,a,b,c,void 0!==e?e:ua,f);return{offsetX:d.offsetX,offsetY:d.offsetY,image:d.image,Pm:a.image}};
function kz(a,b,c,d,e,f,g){var h=b?a.f:a.i,l;var m=0;for(l=h.length;m<l;++m){var n=h[m];if(n=n.add(c,d,e,f,g))return n;n||m!==l-1||(b?(n=Math.min(2*a.c,a.g),a.c=n):(n=Math.min(2*a.a,a.g),a.a=n),n=new hz(n,a.b),h.push(n),++l)}return null};Va.prototype.code=Va.prototype.code;r("ol.Attribution",zi);zi.prototype.getHTML=zi.prototype.g;r("ol.Collection",bb);bb.prototype.clear=bb.prototype.clear;bb.prototype.extend=bb.prototype.Gg;bb.prototype.forEach=bb.prototype.forEach;bb.prototype.getArray=bb.prototype.ln;bb.prototype.item=bb.prototype.item;bb.prototype.getLength=bb.prototype.rc;bb.prototype.insertAt=bb.prototype.ff;bb.prototype.pop=bb.prototype.pop;bb.prototype.push=bb.prototype.push;bb.prototype.remove=bb.prototype.remove;
bb.prototype.removeAt=bb.prototype.jh;bb.prototype.setAt=bb.prototype.gr;fb.prototype.element=fb.prototype.element;r("ol.color.asArray",Od);r("ol.color.asString",Qd);r("ol.colorlike.asColorLike",Sd);r("ol.control.defaults",em);r("ol.coordinate.add",ud);r("ol.coordinate.createStringXY",function(a){return function(b){return Ed(b,a)}});r("ol.coordinate.format",xd);r("ol.coordinate.rotate",zd);r("ol.coordinate.toStringHDMS",function(a,b){return a?wd(a[1],"NS",b)+" "+wd(a[0],"EW",b):""});
r("ol.coordinate.toStringXY",Ed);r("ol.DeviceOrientation",mp);mp.prototype.getAlpha=mp.prototype.pl;mp.prototype.getBeta=mp.prototype.sl;mp.prototype.getGamma=mp.prototype.Dl;mp.prototype.getHeading=mp.prototype.mn;mp.prototype.getTracking=mp.prototype.xi;mp.prototype.setTracking=mp.prototype.Hg;r("ol.easing.easeIn",Zl);r("ol.easing.easeOut",$l);r("ol.easing.inAndOut",am);r("ol.easing.linear",Pi);r("ol.easing.upAndDown",function(a){return.5>a?am(2*a):1-am(2*(a-.5))});
Patrick's avatar
Patrick committed
931
r("ol.extent.boundingExtent",hb);r("ol.extent.buffer",kb);r("ol.extent.containsCoordinate",nb);r("ol.extent.containsExtent",pb);r("ol.extent.containsXY",ob);r("ol.extent.createEmpty",ib);r("ol.extent.equals",vb);r("ol.extent.extend",wb);r("ol.extent.getBottomLeft",yb);r("ol.extent.getBottomRight",zb);r("ol.extent.getCenter",Gb);r("ol.extent.getHeight",Fb);r("ol.extent.getIntersection",Ib);r("ol.extent.getSize",function(a){return[a[2]-a[0],a[3]-a[1]]});r("ol.extent.getTopLeft",Bb);
Patrick's avatar
Patrick committed
932
933
934
935
936
937
938
939
940
941
942
943
r("ol.extent.getTopRight",Ab);r("ol.extent.getWidth",Eb);r("ol.extent.intersects",Jb);r("ol.extent.isEmpty",Db);r("ol.extent.applyTransform",Lb);r("ol.Feature",E);E.prototype.clone=E.prototype.clone;E.prototype.getGeometry=E.prototype.V;E.prototype.getId=E.prototype.pn;E.prototype.getGeometryName=E.prototype.Fl;E.prototype.getStyle=E.prototype.qn;E.prototype.getStyleFunction=E.prototype.Nc;E.prototype.setGeometry=E.prototype.Wa;E.prototype.setStyle=E.prototype.Ig;E.prototype.setId=E.prototype.xc;
E.prototype.setGeometryName=E.prototype.pd;r("ol.featureloader.xhr",Oj);r("ol.Geolocation",vw);vw.prototype.getAccuracy=vw.prototype.nl;vw.prototype.getAccuracyGeometry=vw.prototype.ol;vw.prototype.getAltitude=vw.prototype.rn;vw.prototype.getAltitudeAccuracy=vw.prototype.ql;vw.prototype.getHeading=vw.prototype.sn;vw.prototype.getPosition=vw.prototype.tn;vw.prototype.getProjection=vw.prototype.yi;vw.prototype.getSpeed=vw.prototype.$l;vw.prototype.getTracking=vw.prototype.zi;
vw.prototype.getTrackingOptions=vw.prototype.ji;vw.prototype.setProjection=vw.prototype.Ai;vw.prototype.setTracking=vw.prototype.lf;vw.prototype.setTrackingOptions=vw.prototype.dk;r("ol.Graticule",Bw);Bw.prototype.getMap=Bw.prototype.xn;Bw.prototype.getMeridians=Bw.prototype.Pl;Bw.prototype.getParallels=Bw.prototype.Xl;Bw.prototype.setMap=Bw.prototype.setMap;r("ol.has.DEVICE_PIXEL_RATIO",he);r("ol.has.CANVAS",je);r("ol.has.DEVICE_ORIENTATION",ke);r("ol.has.GEOLOCATION",le);r("ol.has.TOUCH",me);
r("ol.has.WEBGL",be);Gw.prototype.getImage=Gw.prototype.W;Gw.prototype.load=Gw.prototype.load;Zh.prototype.getImage=Zh.prototype.W;r("ol.inherits",v);r("ol.interaction.defaults",yo);r("ol.Kinetic",tn);r("ol.loadingstrategy.all",Pj);r("ol.loadingstrategy.bbox",function(a){return[a]});r("ol.loadingstrategy.tile",function(a){return function(b,c){c=a.dd(c);b=af(a,b,c);var d=[];c=[c,0,0];for(c[1]=b.ga;c[1]<=b.da;++c[1])for(c[2]=b.ha;c[2]<=b.ka;++c[2])d.push(a.Ya(c));return d}});r("ol.Map",Q);
Q.prototype.addControl=Q.prototype.Uk;Q.prototype.addInteraction=Q.prototype.Vk;Q.prototype.addLayer=Q.prototype.Nh;Q.prototype.addOverlay=Q.prototype.Oh;Q.prototype.forEachFeatureAtPixel=Q.prototype.Ve;Q.prototype.forEachLayerAtPixel=Q.prototype.Dn;Q.prototype.hasFeatureAtPixel=Q.prototype.Om;Q.prototype.getEventCoordinate=Q.prototype.pg;Q.prototype.getEventPixel=Q.prototype.Xe;Q.prototype.getTarget=Q.prototype.yg;Q.prototype.getTargetElement=Q.prototype.Jc;Q.prototype.getCoordinateFromPixel=Q.prototype.ab;
Q.prototype.getControls=Q.prototype.xl;Q.prototype.getOverlays=Q.prototype.Vl;Q.prototype.getOverlayById=Q.prototype.Ul;Q.prototype.getInteractions=Q.prototype.Gl;Q.prototype.getLayerGroup=Q.prototype.Nb;Q.prototype.getLayers=Q.prototype.Bi;Q.prototype.getPixelFromCoordinate=Q.prototype.Pa;Q.prototype.getSize=Q.prototype.Rb;Q.prototype.getView=Q.prototype.Z;Q.prototype.getViewport=Q.prototype.hm;Q.prototype.renderSync=Q.prototype.dr;Q.prototype.render=Q.prototype.render;
Q.prototype.removeControl=Q.prototype.Xq;Q.prototype.removeInteraction=Q.prototype.Yq;Q.prototype.removeLayer=Q.prototype.$q;Q.prototype.removeOverlay=Q.prototype.ar;Q.prototype.setLayerGroup=Q.prototype.Xj;Q.prototype.setSize=Q.prototype.th;Q.prototype.setTarget=Q.prototype.mf;Q.prototype.setView=Q.prototype.En;Q.prototype.updateSize=Q.prototype.Ud;qm.prototype.originalEvent=qm.prototype.originalEvent;qm.prototype.pixel=qm.prototype.pixel;qm.prototype.coordinate=qm.prototype.coordinate;
qm.prototype.dragging=qm.prototype.dragging;pm.prototype.map=pm.prototype.map;pm.prototype.frameState=pm.prototype.frameState;r("ol.Object",Wa);Wa.prototype.get=Wa.prototype.get;Wa.prototype.getKeys=Wa.prototype.P;Wa.prototype.getProperties=Wa.prototype.L;Wa.prototype.set=Wa.prototype.set;Wa.prototype.setProperties=Wa.prototype.J;Wa.prototype.unset=Wa.prototype.S;ab.prototype.key=ab.prototype.key;ab.prototype.oldValue=ab.prototype.oldValue;r("ol.Observable",Sa);r("ol.Observable.unByKey",Ta);
Sa.prototype.changed=Sa.prototype.u;Sa.prototype.dispatchEvent=Sa.prototype.b;Sa.prototype.getRevision=Sa.prototype.M;Sa.prototype.on=Sa.prototype.H;Sa.prototype.once=Sa.prototype.once;Sa.prototype.un=Sa.prototype.K;r("ol.Overlay",Oo);Oo.prototype.getElement=Oo.prototype.ke;Oo.prototype.getId=Oo.prototype.Fn;Oo.prototype.getMap=Oo.prototype.nf;Oo.prototype.getOffset=Oo.prototype.gi;Oo.prototype.getPosition=Oo.prototype.Ci;Oo.prototype.getPositioning=Oo.prototype.hi;Oo.prototype.setElement=Oo.prototype.Sj;
Oo.prototype.setMap=Oo.prototype.setMap;Oo.prototype.setOffset=Oo.prototype.Zj;Oo.prototype.setPosition=Oo.prototype.pf;Oo.prototype.setPositioning=Oo.prototype.bk;r("ol.proj.METERS_PER_UNIT",pc);r("ol.proj.setProj4",function(a){rc=a});r("ol.proj.getPointResolution",Jc);r("ol.proj.addEquivalentProjections",Mc);r("ol.proj.addProjection",Qc);r("ol.proj.addCoordinateTransforms",Sc);r("ol.proj.fromLonLat",function(a,b){return Xc(a,"EPSG:4326",void 0!==b?b:"EPSG:3857")});
r("ol.proj.toLonLat",function(a,b){return Xc(a,void 0!==b?b:"EPSG:3857","EPSG:4326")});r("ol.proj.get",Lc);r("ol.proj.equivalent",Uc);r("ol.proj.getTransform",Vc);r("ol.proj.transform",Xc);r("ol.proj.transformExtent",Yc);r("ol.render.toContext",function(a,b){var c=a.canvas,d=b?b:{};b=d.pixelRatio||he;if(d=d.size)c.width=d[0]*b,c.height=d[1]*b,c.style.width=d[0]+"px",c.style.height=d[1]+"px";c=[0,0,c.width,c.height];d=Ce(ve(),b,b);return new Ge(a,b,c,d,0)});r("ol.size.toSize",mf);r("ol.Sphere",hc);
hc.prototype.geodesicArea=hc.prototype.a;hc.prototype.haversineDistance=hc.prototype.b;r("ol.Sphere.getLength",lc);r("ol.Sphere.getArea",nc);Yh.prototype.getTileCoord=Yh.prototype.i;Yh.prototype.load=Yh.prototype.load;r("ol.tilegrid.createXYZ",yi);Yy.prototype.getFormat=Yy.prototype.Gn;Yy.prototype.setFeatures=Yy.prototype.Tj;Yy.prototype.setProjection=Yy.prototype.Jg;Yy.prototype.setLoader=Yy.prototype.Yj;r("ol.View",P);P.prototype.animate=P.prototype.animate;P.prototype.getAnimating=P.prototype.$c;
Patrick's avatar
Patrick committed
944
P.prototype.cancelAnimations=P.prototype.Ad;P.prototype.constrainCenter=P.prototype.Xc;P.prototype.constrainResolution=P.prototype.constrainResolution;P.prototype.constrainRotation=P.prototype.constrainRotation;P.prototype.getCenter=P.prototype.va;P.prototype.calculateExtent=P.prototype.zd;P.prototype.getMaxResolution=P.prototype.Hn;P.prototype.getMinResolution=P.prototype.Jn;P.prototype.getMaxZoom=P.prototype.In;P.prototype.setMaxZoom=P.prototype.qr;P.prototype.getMinZoom=P.prototype.Kn;
Patrick's avatar
Patrick committed
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
P.prototype.setMinZoom=P.prototype.rr;P.prototype.getProjection=P.prototype.Ln;P.prototype.getResolution=P.prototype.Ia;P.prototype.getResolutions=P.prototype.Mn;P.prototype.getRotation=P.prototype.Qa;P.prototype.getZoom=P.prototype.ki;P.prototype.getZoomForResolution=P.prototype.af;P.prototype.fit=P.prototype.ng;P.prototype.centerOn=P.prototype.cl;P.prototype.rotate=P.prototype.rotate;P.prototype.setCenter=P.prototype.cb;P.prototype.setResolution=P.prototype.Uc;P.prototype.setRotation=P.prototype.gd;
P.prototype.setZoom=P.prototype.Ar;r("ol.xml.getAllTextContent",xj);r("ol.xml.parse",Bj);Wf.prototype.getGL=Wf.prototype.Ip;Wf.prototype.useProgram=Wf.prototype.ld;r("ol.tilegrid.TileGrid",ri);ri.prototype.forEachTileCoord=ri.prototype.Zh;ri.prototype.getMaxZoom=ri.prototype.wj;ri.prototype.getMinZoom=ri.prototype.xj;ri.prototype.getOrigin=ri.prototype.kd;ri.prototype.getResolution=ri.prototype.Ra;ri.prototype.getResolutions=ri.prototype.yj;ri.prototype.getTileCoordExtent=ri.prototype.Ya;
ri.prototype.getTileCoordForCoordAndResolution=ri.prototype.$e;ri.prototype.getTileCoordForCoordAndZ=ri.prototype.zg;ri.prototype.getTileSize=ri.prototype.gb;ri.prototype.getZForResolution=ri.prototype.dd;r("ol.tilegrid.WMTS",az);az.prototype.getMatrixIds=az.prototype.o;r("ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet",bz);r("ol.style.AtlasManager",jz);r("ol.style.Circle",jj);jj.prototype.setRadius=jj.prototype.qd;r("ol.style.Fill",kj);kj.prototype.clone=kj.prototype.clone;
kj.prototype.getColor=kj.prototype.g;kj.prototype.setColor=kj.prototype.c;r("ol.style.Icon",vl);vl.prototype.clone=vl.prototype.clone;vl.prototype.getAnchor=vl.prototype.Gc;vl.prototype.getColor=vl.prototype.zp;vl.prototype.getImage=vl.prototype.W;vl.prototype.getOrigin=vl.prototype.jd;vl.prototype.getSrc=vl.prototype.Ap;vl.prototype.getSize=vl.prototype.gc;vl.prototype.load=vl.prototype.load;r("ol.style.Image",gj);gj.prototype.getOpacity=gj.prototype.La;gj.prototype.getRotateWithView=gj.prototype.zf;
gj.prototype.getRotation=gj.prototype.Af;gj.prototype.getScale=gj.prototype.Ma;gj.prototype.getSnapToPixel=gj.prototype.Ze;gj.prototype.setOpacity=gj.prototype.Ld;gj.prototype.setRotation=gj.prototype.Bf;gj.prototype.setScale=gj.prototype.Md;r("ol.style.RegularShape",hj);hj.prototype.clone=hj.prototype.clone;hj.prototype.getAnchor=hj.prototype.Gc;hj.prototype.getAngle=hj.prototype.sj;hj.prototype.getFill=hj.prototype.qa;hj.prototype.getImage=hj.prototype.W;hj.prototype.getOrigin=hj.prototype.jd;
hj.prototype.getPoints=hj.prototype.tj;hj.prototype.getRadius=hj.prototype.uj;hj.prototype.getRadius2=hj.prototype.ii;hj.prototype.getSize=hj.prototype.gc;hj.prototype.getStroke=hj.prototype.pa;r("ol.style.Stroke",Og);Og.prototype.clone=Og.prototype.clone;Og.prototype.getColor=Og.prototype.Bp;Og.prototype.getLineCap=Og.prototype.Jl;Og.prototype.getLineDash=Og.prototype.Cp;Og.prototype.getLineDashOffset=Og.prototype.Kl;Og.prototype.getLineJoin=Og.prototype.Ll;Og.prototype.getMiterLimit=Og.prototype.Ql;
Og.prototype.getWidth=Og.prototype.Dp;Og.prototype.setColor=Og.prototype.Ep;Og.prototype.setLineCap=Og.prototype.mr;Og.prototype.setLineDash=Og.prototype.setLineDash;Og.prototype.setLineDashOffset=Og.prototype.nr;Og.prototype.setLineJoin=Og.prototype.pr;Og.prototype.setMiterLimit=Og.prototype.sr;Og.prototype.setWidth=Og.prototype.yr;r("ol.style.Style",lj);lj.prototype.clone=lj.prototype.clone;lj.prototype.getGeometry=lj.prototype.V;lj.prototype.getGeometryFunction=lj.prototype.El;
lj.prototype.getFill=lj.prototype.qa;lj.prototype.setFill=lj.prototype.Kf;lj.prototype.getImage=lj.prototype.W;lj.prototype.setImage=lj.prototype.sh;lj.prototype.getStroke=lj.prototype.pa;lj.prototype.setStroke=lj.prototype.Lf;lj.prototype.getText=lj.prototype.ra;lj.prototype.setText=lj.prototype.Mf;lj.prototype.getZIndex=lj.prototype.Da;lj.prototype.setGeometry=lj.prototype.Wa;lj.prototype.setZIndex=lj.prototype.jc;r("ol.style.Text",Pr);Pr.prototype.clone=Pr.prototype.clone;
Pr.prototype.getFont=Pr.prototype.Cl;Pr.prototype.getOffsetX=Pr.prototype.Rl;Pr.prototype.getOffsetY=Pr.prototype.Sl;Pr.prototype.getFill=Pr.prototype.qa;Pr.prototype.getRotateWithView=Pr.prototype.Fp;Pr.prototype.getRotation=Pr.prototype.Gp;Pr.prototype.getScale=Pr.prototype.Ma;Pr.prototype.getStroke=Pr.prototype.pa;Pr.prototype.getText=Pr.prototype.ra;Pr.prototype.getTextAlign=Pr.prototype.bm;Pr.prototype.getTextBaseline=Pr.prototype.cm;Pr.prototype.setFont=Pr.prototype.Uj;
Pr.prototype.setOffsetX=Pr.prototype.$j;Pr.prototype.setOffsetY=Pr.prototype.ak;Pr.prototype.setFill=Pr.prototype.Kf;Pr.prototype.setRotation=Pr.prototype.Hp;Pr.prototype.setScale=Pr.prototype.vj;Pr.prototype.setStroke=Pr.prototype.Lf;Pr.prototype.setText=Pr.prototype.Mf;Pr.prototype.setTextAlign=Pr.prototype.ck;Pr.prototype.setTextBaseline=Pr.prototype.wr;r("ol.source.BingMaps",hy);r("ol.source.BingMaps.TOS_ATTRIBUTION",iy);hy.prototype.getApiKey=hy.prototype.X;hy.prototype.getImagerySet=hy.prototype.$;
r("ol.source.CartoDB",ky);ky.prototype.getConfig=ky.prototype.wl;ky.prototype.updateConfig=ky.prototype.Hr;ky.prototype.setConfig=ky.prototype.hr;r("ol.source.Cluster",O);O.prototype.getDistance=O.prototype.Po;O.prototype.getSource=O.prototype.vc;O.prototype.setDistance=O.prototype.Qo;O.prototype.setPause=O.prototype.tr;r("ol.source.Image",Dk);Fk.prototype.image=Fk.prototype.image;r("ol.source.ImageArcGISRest",qy);qy.prototype.getParams=qy.prototype.So;qy.prototype.getImageLoadFunction=qy.prototype.Ro;
qy.prototype.getUrl=qy.prototype.To;qy.prototype.setImageLoadFunction=qy.prototype.Uo;qy.prototype.setUrl=qy.prototype.Vo;qy.prototype.updateParams=qy.prototype.Wo;r("ol.source.ImageCanvas",Kk);r("ol.source.ImageMapGuide",ry);ry.prototype.getParams=ry.prototype.Yo;ry.prototype.getImageLoadFunction=ry.prototype.Xo;ry.prototype.updateParams=ry.prototype.$o;ry.prototype.setImageLoadFunction=ry.prototype.Zo;r("ol.source.ImageStatic",sy);r("ol.source.ImageVector",Lk);Lk.prototype.getSource=Lk.prototype.vc;
Lk.prototype.getStyle=Lk.prototype.ap;Lk.prototype.getStyleFunction=Lk.prototype.bp;Lk.prototype.setStyle=Lk.prototype.kj;r("ol.source.ImageWMS",ty);ty.prototype.getGetFeatureInfoUrl=ty.prototype.fp;ty.prototype.getParams=ty.prototype.hp;ty.prototype.getImageLoadFunction=ty.prototype.gp;ty.prototype.getUrl=ty.prototype.ip;ty.prototype.setImageLoadFunction=ty.prototype.jp;ty.prototype.setUrl=ty.prototype.kp;ty.prototype.updateParams=ty.prototype.lp;r("ol.source.OSM",xy);
r("ol.source.OSM.ATTRIBUTION",yy);r("ol.source.Raster",zy);zy.prototype.setOperation=zy.prototype.B;Dy.prototype.extent=Dy.prototype.extent;Dy.prototype.resolution=Dy.prototype.resolution;Dy.prototype.data=Dy.prototype.data;r("ol.source.Source",Ai);Ai.prototype.getAttributions=Ai.prototype.Ea;Ai.prototype.getLogo=Ai.prototype.Ca;Ai.prototype.getProjection=Ai.prototype.Fa;Ai.prototype.getState=Ai.prototype.getState;Ai.prototype.refresh=Ai.prototype.Aa;Ai.prototype.setAttributions=Ai.prototype.za;
r("ol.source.Stamen",Gy);r("ol.source.Tile",Di);Di.prototype.getTileGrid=Di.prototype.fb;Gi.prototype.tile=Gi.prototype.tile;r("ol.source.TileArcGISRest",Ky);Ky.prototype.getParams=Ky.prototype.v;Ky.prototype.updateParams=Ky.prototype.B;r("ol.source.TileDebug",My);r("ol.source.TileImage",A);A.prototype.setRenderReprojectionEdges=A.prototype.Ub;A.prototype.setTileGridForProjection=A.prototype.Vb;r("ol.source.TileJSON",Oy);Oy.prototype.getTileJSON=Oy.prototype.dm;r("ol.source.TileUTFGrid",Py);
Py.prototype.getTemplate=Py.prototype.am;Py.prototype.forDataAtCoordinateAndResolution=Py.prototype.jl;r("ol.source.TileWMS",Ty);Ty.prototype.getGetFeatureInfoUrl=Ty.prototype.sp;Ty.prototype.getParams=Ty.prototype.tp;Ty.prototype.updateParams=Ty.prototype.vp;Hi.prototype.getTileLoadFunction=Hi.prototype.ub;Hi.prototype.getTileUrlFunction=Hi.prototype.wb;Hi.prototype.getUrls=Hi.prototype.xb;Hi.prototype.setTileLoadFunction=Hi.prototype.Bb;Hi.prototype.setTileUrlFunction=Hi.prototype.ib;
Hi.prototype.setUrl=Hi.prototype.pb;Hi.prototype.setUrls=Hi.prototype.jb;r("ol.source.Vector",J);J.prototype.addFeature=J.prototype.Eb;J.prototype.addFeatures=J.prototype.yd;J.prototype.clear=J.prototype.clear;J.prototype.forEachFeature=J.prototype.Xh;J.prototype.forEachFeatureInExtent=J.prototype.oc;J.prototype.forEachFeatureIntersectingExtent=J.prototype.Yh;J.prototype.getFeaturesCollection=J.prototype.ei;J.prototype.getFeatures=J.prototype.Rc;J.prototype.getFeaturesAtCoordinate=J.prototype.di;
J.prototype.getFeaturesInExtent=J.prototype.rg;J.prototype.getClosestFeatureToCoordinate=J.prototype.ai;J.prototype.getExtent=J.prototype.D;J.prototype.getFeatureById=J.prototype.qg;J.prototype.getFormat=J.prototype.pj;J.prototype.getUrl=J.prototype.qj;J.prototype.removeFeature=J.prototype.Ib;Uj.prototype.feature=Uj.prototype.feature;r("ol.source.VectorTile",$y);r("ol.source.WMTS",Z);Z.prototype.getDimensions=Z.prototype.Al;Z.prototype.getFormat=Z.prototype.wp;Z.prototype.getLayer=Z.prototype.xp;
Patrick's avatar
Patrick committed
963
Z.prototype.getMatrixSet=Z.prototype.Ol;Z.prototype.getRequestEncoding=Z.prototype.Zl;Z.prototype.getStyle=Z.prototype.yp;Z.prototype.getVersion=Z.prototype.gm;Z.prototype.updateDimensions=Z.prototype.Ir;
Patrick's avatar
Patrick committed
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
r("ol.source.WMTS.optionsFromCapabilities",function(a,b){var c=kd(a.Contents.Layer,function(a){return a.Identifier==b.layer});if(null===c)return null;var d=a.Contents.TileMatrixSet;var e=1<c.TileMatrixSetLink.length?"projection"in b?nd(c.TileMatrixSetLink,function(a){var c=kd(d,function(b){return b.Identifier==a.TileMatrixSet}).SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"),e=Lc(c),f=Lc(b.projection);return e&&f?Uc(e,f):c==b.projection}):nd(c.TileMatrixSetLink,function(a){return a.TileMatrixSet==
b.matrixSet}):0;0>e&&(e=0);var f=c.TileMatrixSetLink[e].TileMatrixSet;var g=c.TileMatrixSetLink[e].TileMatrixSetLimits;var h=c.Format[0];"format"in b&&(h=b.format);e=nd(c.Style,function(a){return"style"in b?a.Title==b.style:a.isDefault});0>e&&(e=0);e=c.Style[e].Identifier;var l={};"Dimension"in c&&c.Dimension.forEach(function(a){var b=a.Identifier,c=a.Default;void 0===c&&(c=a.Value[0]);l[b]=c});var m=kd(a.Contents.TileMatrixSet,function(a){return a.Identifier==f});var n="projection"in b?Lc(b.projection):
Lc(m.SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"));var p=c.WGS84BoundingBox;if(void 0!==p){var q=Lc("EPSG:4326").D();q=p[0]==q[0]&&p[2]==q[2];var t=Yc(p,"EPSG:4326",n);(p=n.D())&&(pb(p,t)||(t=void 0))}g=bz(m,t,g);var u=[];m=b.requestEncoding;m=void 0!==m?m:"";if("OperationsMetadata"in a&&"GetTile"in a.OperationsMetadata)for(a=a.OperationsMetadata.GetTile.DCP.HTTP.Get,t=0,p=a.length;t<p;++t){var w=kd(a[t].Constraint,function(a){return"GetEncoding"==a.name}).AllowedValues.Value;
""===m&&(m=w[0]);if("KVP"===m)gd(w,"KVP")&&u.push(a[t].href);else break}0===u.length&&(m="REST",c.ResourceURL.forEach(function(a){"tile"===a.resourceType&&(h=a.format,u.push(a.template))}));return{urls:u,layer:b.layer,matrixSet:f,format:h,projection:n,requestEncoding:m,tileGrid:g,style:e,dimensions:l,wrapX:q,crossOrigin:b.crossOrigin}});r("ol.source.XYZ",jy);r("ol.source.Zoomify",dz);Hd.prototype.vectorContext=Hd.prototype.vectorContext;Hd.prototype.frameState=Hd.prototype.frameState;
Hd.prototype.context=Hd.prototype.context;Hd.prototype.glContext=Hd.prototype.glContext;Ut.prototype.get=Ut.prototype.get;Ut.prototype.getExtent=Ut.prototype.D;Ut.prototype.getGeometry=Ut.prototype.V;Ut.prototype.getProperties=Ut.prototype.L;Ut.prototype.getType=Ut.prototype.U;r("ol.render.VectorContext",te);Fh.prototype.setStyle=Fh.prototype.Jd;Fh.prototype.drawGeometry=Fh.prototype.Ac;Fh.prototype.drawFeature=Fh.prototype.Se;Ge.prototype.drawCircle=Ge.prototype.nc;Ge.prototype.setStyle=Ge.prototype.Jd;
Ge.prototype.drawGeometry=Ge.prototype.Ac;Ge.prototype.drawFeature=Ge.prototype.Se;r("ol.proj.common.add",Zc);r("ol.proj.Projection",sc);sc.prototype.getCode=sc.prototype.vl;sc.prototype.getExtent=sc.prototype.D;sc.prototype.getUnits=sc.prototype.Pb;sc.prototype.getMetersPerUnit=sc.prototype.dc;sc.prototype.getWorldExtent=sc.prototype.im;sc.prototype.isGlobal=sc.prototype.Um;sc.prototype.setGlobal=sc.prototype.kr;sc.prototype.setExtent=sc.prototype.Mo;sc.prototype.setWorldExtent=sc.prototype.zr;
sc.prototype.setGetPointResolution=sc.prototype.jr;r("ol.proj.Units.METERS_PER_UNIT",pc);r("ol.layer.Base",Ub);Ub.prototype.getExtent=Ub.prototype.D;Ub.prototype.getMaxResolution=Ub.prototype.tc;Ub.prototype.getMinResolution=Ub.prototype.uc;Ub.prototype.getOpacity=Ub.prototype.La;Ub.prototype.getVisible=Ub.prototype.lb;Ub.prototype.getZIndex=Ub.prototype.Da;Ub.prototype.setExtent=Ub.prototype.Oc;Ub.prototype.setMaxResolution=Ub.prototype.Sc;Ub.prototype.setMinResolution=Ub.prototype.Tc;
Ub.prototype.setOpacity=Ub.prototype.Pc;Ub.prototype.setVisible=Ub.prototype.ec;Ub.prototype.setZIndex=Ub.prototype.jc;r("ol.layer.Group",Wb);Wb.prototype.getLayers=Wb.prototype.Tb;Wb.prototype.setLayers=Wb.prototype.$i;r("ol.layer.Heatmap",X);X.prototype.getBlur=X.prototype.$h;X.prototype.getGradient=X.prototype.fi;X.prototype.getRadius=X.prototype.aj;X.prototype.setBlur=X.prototype.Qj;X.prototype.setGradient=X.prototype.Wj;X.prototype.setRadius=X.prototype.qd;r("ol.layer.Image",wl);
wl.prototype.getSource=wl.prototype.ba;r("ol.layer.Layer",$c);$c.prototype.getSource=$c.prototype.ba;$c.prototype.setMap=$c.prototype.setMap;$c.prototype.setSource=$c.prototype.rd;r("ol.layer.Tile",Xh);Xh.prototype.getPreload=Xh.prototype.le;Xh.prototype.getSource=Xh.prototype.ba;Xh.prototype.setPreload=Xh.prototype.bj;Xh.prototype.getUseInterimTilesOnError=Xh.prototype.pe;Xh.prototype.setUseInterimTilesOnError=Xh.prototype.cj;r("ol.layer.Vector",N);N.prototype.getSource=N.prototype.ba;
N.prototype.getStyle=N.prototype.B;N.prototype.getStyleFunction=N.prototype.G;N.prototype.setStyle=N.prototype.f;r("ol.layer.VectorTile",Y);Y.prototype.getPreload=Y.prototype.le;Y.prototype.getUseInterimTilesOnError=Y.prototype.pe;Y.prototype.setPreload=Y.prototype.dj;Y.prototype.setUseInterimTilesOnError=Y.prototype.ej;r("ol.interaction.DoubleClickZoom",zn);r("ol.interaction.DoubleClickZoom.handleEvent",An);r("ol.interaction.DragAndDrop",Hw);r("ol.interaction.DragAndDrop.handleEvent",Fd);
Kw.prototype.features=Kw.prototype.features;Kw.prototype.file=Kw.prototype.file;Kw.prototype.projection=Kw.prototype.projection;r("ol.interaction.DragBox",Yn);Yn.prototype.getGeometry=Yn.prototype.V;co.prototype.coordinate=co.prototype.coordinate;co.prototype.mapBrowserEvent=co.prototype.mapBrowserEvent;r("ol.interaction.DragPan",Nn);r("ol.interaction.DragRotate",Rn);r("ol.interaction.DragRotateAndZoom",Mw);r("ol.interaction.DragZoom",ho);r("ol.interaction.Draw",Qw);
r("ol.interaction.Draw.handleEvent",Sw);Qw.prototype.removeLastPoint=Qw.prototype.Zq;Qw.prototype.finishDrawing=Qw.prototype.je;Qw.prototype.extend=Qw.prototype.po;r("ol.interaction.Draw.createRegularPolygon",function(a,b){return function(c,d){var e=c[0];c=c[1];var f=Math.sqrt(Bd(e,c));d=d?d:hl(new ww(e),a);il(d,e,f,b?b:Math.atan((c[1]-e[1])/(c[0]-e[0])));return d}});
r("ol.interaction.Draw.createBox",function(){return function(a,b){a=hb(a);b=b||new M(null);b.ua([[yb(a),zb(a),Ab(a),Bb(a),yb(a)]]);return b}});fx.prototype.feature=fx.prototype.feature;r("ol.interaction.Extent",gx);gx.prototype.getExtent=gx.prototype.D;gx.prototype.setExtent=gx.prototype.f;rx.prototype.extent_=rx.prototype.b;r("ol.interaction.Interaction",vn);vn.prototype.getActive=vn.prototype.c;vn.prototype.getMap=vn.prototype.i;vn.prototype.setActive=vn.prototype.Na;
r("ol.interaction.KeyboardPan",io);r("ol.interaction.KeyboardPan.handleEvent",jo);r("ol.interaction.KeyboardZoom",ko);r("ol.interaction.KeyboardZoom.handleEvent",lo);r("ol.interaction.Modify",tx);r("ol.interaction.Modify.handleEvent",wx);tx.prototype.removePoint=tx.prototype.Oj;Bx.prototype.features=Bx.prototype.features;Bx.prototype.mapBrowserEvent=Bx.prototype.mapBrowserEvent;r("ol.interaction.MouseWheelZoom",mo);r("ol.interaction.MouseWheelZoom.handleEvent",no);mo.prototype.setMouseAnchor=mo.prototype.aa;
r("ol.interaction.PinchRotate",qo);r("ol.interaction.PinchZoom",uo);r("ol.interaction.Pointer",Kn);r("ol.interaction.Pointer.handleEvent",Ln);r("ol.interaction.Select",Jx);Jx.prototype.getFeatures=Jx.prototype.zo;Jx.prototype.getHitTolerance=Jx.prototype.Ao;Jx.prototype.getLayer=Jx.prototype.Bo;r("ol.interaction.Select.handleEvent",Kx);Jx.prototype.setHitTolerance=Jx.prototype.Do;Jx.prototype.setMap=Jx.prototype.setMap;Mx.prototype.selected=Mx.prototype.selected;Mx.prototype.deselected=Mx.prototype.deselected;
Mx.prototype.mapBrowserEvent=Mx.prototype.mapBrowserEvent;r("ol.interaction.Snap",Ox);Ox.prototype.addFeature=Ox.prototype.Eb;Ox.prototype.removeFeature=Ox.prototype.Ib;r("ol.interaction.Translate",Sx);Sx.prototype.getHitTolerance=Sx.prototype.G;Sx.prototype.setHitTolerance=Sx.prototype.N;Yx.prototype.features=Yx.prototype.features;Yx.prototype.coordinate=Yx.prototype.coordinate;r("ol.geom.Circle",ww);ww.prototype.clone=ww.prototype.clone;ww.prototype.getCenter=ww.prototype.va;
ww.prototype.getRadius=ww.prototype.Hd;ww.prototype.getType=ww.prototype.U;ww.prototype.intersectsExtent=ww.prototype.bb;ww.prototype.setCenter=ww.prototype.cb;ww.prototype.setCenterAndRadius=ww.prototype.rh;ww.prototype.setRadius=ww.prototype.qd;ww.prototype.transform=ww.prototype.transform;r("ol.geom.Geometry",Td);Td.prototype.getClosestPoint=Td.prototype.Fb;Td.prototype.intersectsCoordinate=Td.prototype.yb;Td.prototype.getExtent=Td.prototype.D;Td.prototype.rotate=Td.prototype.rotate;
Td.prototype.scale=Td.prototype.scale;Td.prototype.simplify=Td.prototype.Wb;Td.prototype.transform=Td.prototype.transform;r("ol.geom.GeometryCollection",Eq);Eq.prototype.clone=Eq.prototype.clone;Eq.prototype.getGeometries=Eq.prototype.Dd;Eq.prototype.getType=Eq.prototype.U;Eq.prototype.intersectsExtent=Eq.prototype.bb;Eq.prototype.setGeometries=Eq.prototype.Vj;Eq.prototype.applyTransform=Eq.prototype.yc;Eq.prototype.translate=Eq.prototype.translate;r("ol.geom.LinearRing",cl);cl.prototype.clone=cl.prototype.clone;
cl.prototype.getArea=cl.prototype.ko;cl.prototype.getCoordinates=cl.prototype.T;cl.prototype.getType=cl.prototype.U;cl.prototype.setCoordinates=cl.prototype.ua;r("ol.geom.LineString",K);K.prototype.appendCoordinate=K.prototype.Wk;K.prototype.clone=K.prototype.clone;K.prototype.forEachSegment=K.prototype.ml;K.prototype.getCoordinateAtM=K.prototype.io;K.prototype.getCoordinates=K.prototype.T;K.prototype.getCoordinateAt=K.prototype.bi;K.prototype.getLength=K.prototype.jo;K.prototype.getType=K.prototype.U;
K.prototype.intersectsExtent=K.prototype.bb;K.prototype.setCoordinates=K.prototype.ua;r("ol.geom.MultiLineString",R);R.prototype.appendLineString=R.prototype.Xk;R.prototype.clone=R.prototype.clone;R.prototype.getCoordinateAtM=R.prototype.lo;R.prototype.getCoordinates=R.prototype.T;R.prototype.getLineString=R.prototype.Ml;R.prototype.getLineStrings=R.prototype.Hc;R.prototype.getType=R.prototype.U;R.prototype.intersectsExtent=R.prototype.bb;R.prototype.setCoordinates=R.prototype.ua;
r("ol.geom.MultiPoint",T);T.prototype.appendPoint=T.prototype.Zk;T.prototype.clone=T.prototype.clone;T.prototype.getCoordinates=T.prototype.T;T.prototype.getPoint=T.prototype.mo;T.prototype.getPoints=T.prototype.Id;T.prototype.getType=T.prototype.U;T.prototype.intersectsExtent=T.prototype.bb;T.prototype.setCoordinates=T.prototype.ua;r("ol.geom.MultiPolygon",U);U.prototype.appendPolygon=U.prototype.$k;U.prototype.clone=U.prototype.clone;U.prototype.getArea=U.prototype.no;
U.prototype.getCoordinates=U.prototype.T;U.prototype.getInteriorPoints=U.prototype.Il;U.prototype.getPolygon=U.prototype.Yl;U.prototype.getPolygons=U.prototype.bd;U.prototype.getType=U.prototype.U;U.prototype.intersectsExtent=U.prototype.bb;U.prototype.setCoordinates=U.prototype.ua;r("ol.geom.Point",L);L.prototype.clone=L.prototype.clone;L.prototype.getCoordinates=L.prototype.T;L.prototype.getType=L.prototype.U;L.prototype.intersectsExtent=L.prototype.bb;L.prototype.setCoordinates=L.prototype.ua;
r("ol.geom.Polygon",M);M.prototype.appendLinearRing=M.prototype.Yk;M.prototype.clone=M.prototype.clone;M.prototype.getArea=M.prototype.oo;M.prototype.getCoordinates=M.prototype.T;M.prototype.getInteriorPoint=M.prototype.Hl;M.prototype.getLinearRingCount=M.prototype.Nl;M.prototype.getLinearRing=M.prototype.vg;M.prototype.getLinearRings=M.prototype.Ic;M.prototype.getType=M.prototype.U;M.prototype.intersectsExtent=M.prototype.bb;M.prototype.setCoordinates=M.prototype.ua;
r("ol.geom.Polygon.circular",fl);r("ol.geom.Polygon.fromExtent",gl);r("ol.geom.Polygon.fromCircle",hl);r("ol.geom.SimpleGeometry",Wd);Wd.prototype.getFirstCoordinate=Wd.prototype.ac;Wd.prototype.getLastCoordinate=Wd.prototype.pc;Wd.prototype.getLayout=Wd.prototype.qc;Wd.prototype.applyTransform=Wd.prototype.yc;Wd.prototype.translate=Wd.prototype.translate;r("ol.format.CityGML",Yp);r("ol.format.EsriJSON",aq);aq.prototype.readFeature=aq.prototype.hc;aq.prototype.readFeatures=aq.prototype.Oa;
aq.prototype.readGeometry=aq.prototype.od;aq.prototype.readProjection=aq.prototype.hb;aq.prototype.writeGeometry=aq.prototype.wd;aq.prototype.writeGeometryObject=aq.prototype.He;aq.prototype.writeFeature=aq.prototype.Vd;aq.prototype.writeFeatureObject=aq.prototype.vd;aq.prototype.writeFeatures=aq.prototype.Xb;aq.prototype.writeFeaturesObject=aq.prototype.Fe;r("ol.format.Feature",sp);r("ol.format.filter.and",Bq);
r("ol.format.filter.or",function(a){var b=[null].concat(Array.prototype.slice.call(arguments));return new (Function.prototype.bind.apply(zq,b))});r("ol.format.filter.not",function(a){return new xq(a)});r("ol.format.filter.bbox",Cq);r("ol.format.filter.intersects",function(a,b,c){return new rq(a,b,c)});r("ol.format.filter.within",function(a,b,c){return new Aq(a,b,c)});r("ol.format.filter.equalTo",function(a,b,c){return new nq(a,b,c)});
r("ol.format.filter.notEqualTo",function(a,b,c){return new yq(a,b,c)});r("ol.format.filter.lessThan",function(a,b){return new vq(a,b)});r("ol.format.filter.lessThanOrEqualTo",function(a,b){return new wq(a,b)});r("ol.format.filter.greaterThan",function(a,b){return new oq(a,b)});r("ol.format.filter.greaterThanOrEqualTo",function(a,b){return new pq(a,b)});r("ol.format.filter.isNull",function(a){return new uq(a)});r("ol.format.filter.between",function(a,b,c){return new sq(a,b,c)});
r("ol.format.filter.like",function(a,b,c,d,e,f){return new tq(a,b,c,d,e,f)});r("ol.format.GeoJSON",Iq);Iq.prototype.readFeature=Iq.prototype.hc;Iq.prototype.readFeatures=Iq.prototype.Oa;Iq.prototype.readGeometry=Iq.prototype.od;Iq.prototype.readProjection=Iq.prototype.hb;Iq.prototype.writeFeature=Iq.prototype.Vd;Iq.prototype.writeFeatureObject=Iq.prototype.vd;Iq.prototype.writeFeatures=Iq.prototype.Xb;Iq.prototype.writeFeaturesObject=Iq.prototype.Fe;Iq.prototype.writeGeometry=Iq.prototype.wd;
Iq.prototype.writeGeometryObject=Iq.prototype.He;r("ol.format.GML",W);W.prototype.writeFeatures=W.prototype.Xb;W.prototype.writeFeaturesNode=W.prototype.kc;r("ol.format.GML2",Nq);r("ol.format.GML3",W);W.prototype.writeGeometryNode=W.prototype.Ge;W.prototype.writeFeatures=W.prototype.Xb;W.prototype.writeFeaturesNode=W.prototype.kc;Cp.prototype.readFeatures=Cp.prototype.Oa;r("ol.format.GPX",Yq);Yq.prototype.readFeature=Yq.prototype.hc;Yq.prototype.readFeatures=Yq.prototype.Oa;
Yq.prototype.readProjection=Yq.prototype.hb;Yq.prototype.writeFeatures=Yq.prototype.Xb;Yq.prototype.writeFeaturesNode=Yq.prototype.kc;r("ol.format.IGC",Ir);Ir.prototype.readFeature=Ir.prototype.hc;Ir.prototype.readFeatures=Ir.prototype.Oa;Ir.prototype.readProjection=Ir.prototype.hb;r("ol.format.KML",Qr);Qr.prototype.readFeature=Qr.prototype.hc;Qr.prototype.readFeatures=Qr.prototype.Oa;Qr.prototype.readName=Qr.prototype.Eq;Qr.prototype.readNetworkLinks=Qr.prototype.Fq;Qr.prototype.readRegion=Qr.prototype.Kq;
Qr.prototype.readRegionFromNode=Qr.prototype.Hf;Qr.prototype.readProjection=Qr.prototype.hb;Qr.prototype.writeFeatures=Qr.prototype.Xb;Qr.prototype.writeFeaturesNode=Qr.prototype.kc;r("ol.format.MVT",Vt);Vt.prototype.readFeatures=Vt.prototype.Oa;Vt.prototype.readProjection=Vt.prototype.hb;Vt.prototype.setLayers=Vt.prototype.ho;r("ol.format.OSMXML",Xt);Xt.prototype.readFeatures=Xt.prototype.Oa;Xt.prototype.readProjection=Xt.prototype.hb;r("ol.format.Polyline",vu);
r("ol.format.Polyline.encodeDeltas",wu);r("ol.format.Polyline.decodeDeltas",yu);r("ol.format.Polyline.encodeFloats",xu);r("ol.format.Polyline.decodeFloats",zu);vu.prototype.readFeature=vu.prototype.hc;vu.prototype.readFeatures=vu.prototype.Oa;vu.prototype.readGeometry=vu.prototype.od;vu.prototype.readProjection=vu.prototype.hb;vu.prototype.writeGeometry=vu.prototype.wd;r("ol.format.TopoJSON",Au);Au.prototype.readFeatures=Au.prototype.Oa;Au.prototype.readProjection=Au.prototype.hb;
r("ol.format.WFS",Gu);Gu.prototype.readFeatures=Gu.prototype.Oa;Gu.prototype.readTransactionResponse=Gu.prototype.l;Gu.prototype.readFeatureCollectionMetadata=Gu.prototype.j;r("ol.format.WFS.writeFilter",function(a){var b=wj("http://www.opengis.net/ogc","Filter");Mj({node:b},Uu,Hj(a.Kb),[a],[]);return b});Gu.prototype.writeGetFeature=Gu.prototype.o;Gu.prototype.writeTransaction=Gu.prototype.s;Gu.prototype.readProjection=Gu.prototype.hb;r("ol.format.WFS2",Zu);Zu.prototype.readFeatures=Zu.prototype.Oa;
Zu.prototype.readTransactionResponse=Zu.prototype.o;Zu.prototype.readFeatureCollectionMetadata=Zu.prototype.l;Zu.prototype.writeGetFeature=Zu.prototype.s;Zu.prototype.writeTransaction=Zu.prototype.I;Zu.prototype.readProjection=Zu.prototype.hb;r("ol.format.WKT",qv);qv.prototype.readFeature=qv.prototype.hc;qv.prototype.readFeatures=qv.prototype.Oa;qv.prototype.readGeometry=qv.prototype.od;qv.prototype.writeFeature=qv.prototype.Vd;qv.prototype.writeFeatures=qv.prototype.Xb;
qv.prototype.writeGeometry=qv.prototype.wd;r("ol.format.WMSCapabilities",Jv);Jv.prototype.read=Jv.prototype.read;r("ol.format.WMSGetFeatureInfo",fw);fw.prototype.readFeatures=fw.prototype.Oa;r("ol.format.WMTSCapabilities",gw);gw.prototype.read=gw.prototype.read;r("ol.format.filter.And",jq);r("ol.format.filter.Bbox",kq);r("ol.format.filter.Comparison",lq);r("ol.format.filter.ComparisonBinary",mq);r("ol.format.filter.DWithin",Dq);r("ol.format.filter.EqualTo",nq);r("ol.format.filter.Filter",hq);
r("ol.format.filter.GreaterThan",oq);r("ol.format.filter.GreaterThanOrEqualTo",pq);r("ol.format.filter.Intersects",rq);r("ol.format.filter.IsBetween",sq);r("ol.format.filter.IsLike",tq);r("ol.format.filter.IsNull",uq);r("ol.format.filter.LessThan",vq);r("ol.format.filter.LessThanOrEqualTo",wq);r("ol.format.filter.Not",xq);r("ol.format.filter.NotEqualTo",yq);r("ol.format.filter.Or",zq);r("ol.format.filter.Spatial",qq);r("ol.format.filter.Within",Aq);
r("ol.events.condition.altKeyOnly",function(a){a=a.originalEvent;return a.altKey&&!(a.metaKey||a.ctrlKey)&&!a.shiftKey});r("ol.events.condition.altShiftKeysOnly",Bn);r("ol.events.condition.always",Fd);r("ol.events.condition.click",function(a){return"click"==a.type});r("ol.events.condition.never",Gd);r("ol.events.condition.pointerMove",Dn);r("ol.events.condition.singleClick",En);r("ol.events.condition.doubleClick",function(a){return"dblclick"==a.type});r("ol.events.condition.noModifierKeys",Fn);
r("ol.events.condition.platformModifierKeyOnly",function(a){a=a.originalEvent;return!a.altKey&&(ge?a.metaKey:a.ctrlKey)&&!a.shiftKey});r("ol.events.condition.shiftKeyOnly",Gn);r("ol.events.condition.targetNotEditable",Hn);r("ol.events.condition.mouseOnly",In);r("ol.events.condition.primaryAction",Jn);Na.prototype.type=Na.prototype.type;Na.prototype.target=Na.prototype.target;Na.prototype.preventDefault=Na.prototype.preventDefault;Na.prototype.stopPropagation=Na.prototype.stopPropagation;
r("ol.control.Attribution",Wl);r("ol.control.Attribution.render",Xl);Wl.prototype.getCollapsible=Wl.prototype.On;Wl.prototype.setCollapsible=Wl.prototype.Rn;Wl.prototype.setCollapsed=Wl.prototype.Qn;Wl.prototype.getCollapsed=Wl.prototype.Nn;r("ol.control.Control",Vl);Vl.prototype.getMap=Vl.prototype.i;Vl.prototype.setMap=Vl.prototype.setMap;Vl.prototype.setTarget=Vl.prototype.c;r("ol.control.FullScreen",fm);r("ol.control.MousePosition",km);r("ol.control.MousePosition.render",lm);
km.prototype.getCoordinateFormat=km.prototype.ci;km.prototype.getProjection=km.prototype.Di;km.prototype.setCoordinateFormat=km.prototype.Rj;km.prototype.setProjection=km.prototype.Ei;r("ol.control.OverviewMap",Xo);r("ol.control.OverviewMap.render",Yo);Xo.prototype.getCollapsible=Xo.prototype.Un;Xo.prototype.setCollapsible=Xo.prototype.Xn;Xo.prototype.setCollapsed=Xo.prototype.Wn;Xo.prototype.getCollapsed=Xo.prototype.Tn;Xo.prototype.getOverviewMap=Xo.prototype.Wl;r("ol.control.Rotate",bm);
r("ol.control.Rotate.render",cm);r("ol.control.ScaleLine",bp);bp.prototype.getUnits=bp.prototype.Pb;r("ol.control.ScaleLine.render",cp);bp.prototype.setUnits=bp.prototype.B;r("ol.control.Zoom",dm);r("ol.control.ZoomSlider",gp);r("ol.control.ZoomSlider.render",ip);r("ol.control.ZoomToExtent",lp);r("olcs.AbstractSynchronizer",Yb);Yb.prototype.synchronize=Yb.prototype.xh;Yb.prototype.addCesiumObject=Yb.prototype.Pe;Yb.prototype.destroyCesiumObject=Yb.prototype.kg;
Yb.prototype.createSingleLayerCounterparts=Yb.prototype.$d;ec.prototype.restartRenderLoop=ec.prototype.s;ec.prototype.setDebug=ec.prototype.Ba;r("olcs.Camera",bj);bj.prototype.setHeading=bj.prototype.lr;bj.prototype.getHeading=bj.prototype.Mp;bj.prototype.setTilt=bj.prototype.xr;bj.prototype.getTilt=bj.prototype.fm;bj.prototype.setDistance=bj.prototype.Pp;bj.prototype.getDistance=bj.prototype.Lp;bj.prototype.setCenter=bj.prototype.cb;bj.prototype.getCenter=bj.prototype.va;
bj.prototype.setPosition=bj.prototype.Qp;bj.prototype.getPosition=bj.prototype.Np;bj.prototype.setAltitude=bj.prototype.fr;bj.prototype.getAltitude=bj.prototype.Aj;bj.prototype.lookAt=bj.prototype.Op;bj.prototype.readFromView=bj.prototype.xe;bj.prototype.updateView=bj.prototype.td;r("olcs.ClusterConverter",yl);yl.prototype.setLayerStyle=yl.prototype.i;
r("olcs.core.computePixelSizeAtCoordinate",function(a,b){var c=a.camera;a=a.canvas;var d=c.frustum;b=Cesium.Cartesian3.magnitude(Cesium.Cartesian3.subtract(c.position,b,new Cesium.Cartesian3));c=new Cesium.Cartesian2;return d.getPixelDimensions(a.clientWidth,a.clientHeight,b,c)});r("olcs.core.applyHeightOffsetToGeometry",function(a,b){a.yc(function(a,d,e){if(void 0!==e&&3<=e)for(a=0;a<d.length;a+=e)d[a+2]+=b;return d})});r("olcs.core.rotateAroundAxis",Oi);
r("olcs.core.setHeadingUsingBottomCenter",function(a,b,c,d){var e=a.camera;a=Ti(a,c);a=Cesium.Quaternion.fromAxisAngle(e.right,a);var f=Cesium.Matrix3.fromQuaternion(a),g=new Cesium.Cartesian3;Cesium.Cartesian3.subtract(e.position,c,g);a=new Cesium.Cartesian3;Cesium.Matrix3.multiplyByVector(f,g,a);Cesium.Cartesian3.add(a,c,a);c=Cesium.Matrix4.fromTranslation(a);Oi(e,b,a,c,d)});r("olcs.core.pickOnTerrainOrEllipsoid",Qi);
r("olcs.core.pickBottomPoint",function(a){var b=a.canvas;b=new Cesium.Cartesian2(b.clientWidth/2,b.clientHeight);return Qi(a,b)});r("olcs.core.pickCenterPoint",Ri);
r("olcs.core.computeSignedTiltAngleOnGlobe",function(a){var b=a.camera,c=new Cesium.Ray(b.position,b.direction);a=a.globe.pick(c,a);if(!a){var d=Cesium.IntersectionTests.rayEllipsoid(c,Cesium.Ellipsoid.WGS84);d&&(a=Cesium.Ray.getPoint(c,d.start))}if(a)return c=new Cesium.Cartesian3,Cesium.Ellipsoid.WGS84.geocentricSurfaceNormal(a,c),b=Si(b.direction,c,b.right)-Math.PI,Cesium.Math.convertLongitudeRange(b)});r("olcs.core.computeAngleToZenith",Ti);r("olcs.core.lookAt",Ui);
r("olcs.core.extentToRectangle",Vi);r("olcs.core.tileLayerToImageryLayer",Wi);r("olcs.core.updateCesiumLayerProperties",Xi);r("olcs.core.ol4326CoordinateToCesiumCartesian",Yi);r("olcs.core.ol4326CoordinateArrayToCsCartesians",Zi);r("olcs.core.olGeometryCloneTo4326",$i);r("olcs.core.convertColorToCesium",aj);
r("olcs.core.convertUrlToCesium",function(a){var b="",c=/\{(\d|[a-z])-(\d|[a-z])\}/,d=c.exec(a);if(d)for(a=a.replace(c,"{s}"),c=d[2].charCodeAt(0),d=d[1].charCodeAt(0);d<=c;++d)b+=String.fromCharCode(d);return{url:a,subdomains:b}});r("olcs.FeatureConverter",kl);kl.prototype.csAddBillboard=kl.prototype.jg;kl.prototype.olCircleGeometryToCesium=kl.prototype.Dg;kl.prototype.olLineStringGeometryToCesium=kl.prototype.se;kl.prototype.olPolygonGeometryToCesium=kl.prototype.jf;
kl.prototype.getAllowPicking=kl.prototype.Cd;kl.prototype.getHeightReference=kl.prototype.bc;kl.prototype.getClassificationType=kl.prototype.We;kl.prototype.olPointGeometryToCesium=kl.prototype.te;kl.prototype.olMultiGeometryToCesium=kl.prototype.Fg;kl.prototype.olGeometry4326TextPartToCesium=kl.prototype.Eg;kl.prototype.olStyleToCesium=kl.prototype.ue;kl.prototype.computePlainStyle=kl.prototype.Yd;kl.prototype.olFeatureToCesium=kl.prototype.fd;kl.prototype.olVectorLayerToCesium=kl.prototype.kf;
kl.prototype.convert=kl.prototype.convert;r("olcs.OLCesium",Nl);Nl.prototype.getCamera=Nl.prototype.tl;Nl.prototype.getOlMap=Nl.prototype.Tl;Nl.prototype.getCesiumScene=Nl.prototype.ul;Nl.prototype.getDataSources=Nl.prototype.zl;Nl.prototype.getDataSourceDisplay=Nl.prototype.yl;Nl.prototype.getEnabled=Nl.prototype.Bl;Nl.prototype.setEnabled=Nl.prototype.ir;Nl.prototype.warmUp=Nl.prototype.Kr;Nl.prototype.setBlockCesiumRendering=Nl.prototype.qh;Nl.prototype.enableAutoRenderLoop=Nl.prototype.fl;
Nl.prototype.getAutoRenderLoop=Nl.prototype.rl;Nl.prototype.setResolutionScale=Nl.prototype.ur;Nl.prototype.setTargetFrameRate=Nl.prototype.vr;r("olcs.RasterSynchronizer",Dl);r("olcs.VectorSynchronizer",Ml);Ml.prototype.addCesiumObject=Ml.prototype.Pe;Ml.prototype.createSingleLayerCounterparts=Ml.prototype.$d;Ml.prototype.destroySingleLayerCounterparts=Ml.prototype.el;r("olcs.core.ClusterLayerCounterpart",xl);xl.prototype.getDataSource=xl.prototype.i;xl.prototype.setClustering=xl.prototype.f;
r("olcs.core.VectorLayerCounterpart",jl);Wa.prototype.changed=Wa.prototype.u;Wa.prototype.dispatchEvent=Wa.prototype.b;Wa.prototype.getRevision=Wa.prototype.M;Wa.prototype.on=Wa.prototype.H;Wa.prototype.once=Wa.prototype.once;Wa.prototype.un=Wa.prototype.K;bb.prototype.get=bb.prototype.get;bb.prototype.getKeys=bb.prototype.P;bb.prototype.getProperties=bb.prototype.L;bb.prototype.set=bb.prototype.set;bb.prototype.setProperties=bb.prototype.J;bb.prototype.unset=bb.prototype.S;bb.prototype.changed=bb.prototype.u;
bb.prototype.dispatchEvent=bb.prototype.b;bb.prototype.getRevision=bb.prototype.M;bb.prototype.on=bb.prototype.H;bb.prototype.once=bb.prototype.once;bb.prototype.un=bb.prototype.K;fb.prototype.type=fb.prototype.type;fb.prototype.target=fb.prototype.target;fb.prototype.preventDefault=fb.prototype.preventDefault;fb.prototype.stopPropagation=fb.prototype.stopPropagation;mp.prototype.get=mp.prototype.get;mp.prototype.getKeys=mp.prototype.P;mp.prototype.getProperties=mp.prototype.L;mp.prototype.set=mp.prototype.set;
mp.prototype.setProperties=mp.prototype.J;mp.prototype.unset=mp.prototype.S;mp.prototype.changed=mp.prototype.u;mp.prototype.dispatchEvent=mp.prototype.b;mp.prototype.getRevision=mp.prototype.M;mp.prototype.on=mp.prototype.H;mp.prototype.once=mp.prototype.once;mp.prototype.un=mp.prototype.K;E.prototype.get=E.prototype.get;E.prototype.getKeys=E.prototype.P;E.prototype.getProperties=E.prototype.L;E.prototype.set=E.prototype.set;E.prototype.setProperties=E.prototype.J;E.prototype.unset=E.prototype.S;
E.prototype.changed=E.prototype.u;E.prototype.dispatchEvent=E.prototype.b;E.prototype.getRevision=E.prototype.M;E.prototype.on=E.prototype.H;E.prototype.once=E.prototype.once;E.prototype.un=E.prototype.K;vw.prototype.get=vw.prototype.get;vw.prototype.getKeys=vw.prototype.P;vw.prototype.getProperties=vw.prototype.L;vw.prototype.set=vw.prototype.set;vw.prototype.setProperties=vw.prototype.J;vw.prototype.unset=vw.prototype.S;vw.prototype.changed=vw.prototype.u;vw.prototype.dispatchEvent=vw.prototype.b;
vw.prototype.getRevision=vw.prototype.M;vw.prototype.on=vw.prototype.H;vw.prototype.once=vw.prototype.once;vw.prototype.un=vw.prototype.K;Zh.prototype.getTileCoord=Zh.prototype.i;Zh.prototype.load=Zh.prototype.load;Q.prototype.get=Q.prototype.get;Q.prototype.getKeys=Q.prototype.P;Q.prototype.getProperties=Q.prototype.L;Q.prototype.set=Q.prototype.set;Q.prototype.setProperties=Q.prototype.J;Q.prototype.unset=Q.prototype.S;Q.prototype.changed=Q.prototype.u;Q.prototype.dispatchEvent=Q.prototype.b;
Q.prototype.getRevision=Q.prototype.M;Q.prototype.on=Q.prototype.H;Q.prototype.once=Q.prototype.once;Q.prototype.un=Q.prototype.K;pm.prototype.type=pm.prototype.type;pm.prototype.target=pm.prototype.target;pm.prototype.preventDefault=pm.prototype.preventDefault;pm.prototype.stopPropagation=pm.prototype.stopPropagation;qm.prototype.map=qm.prototype.map;qm.prototype.frameState=qm.prototype.frameState;qm.prototype.type=qm.prototype.type;qm.prototype.target=qm.prototype.target;
qm.prototype.preventDefault=qm.prototype.preventDefault;qm.prototype.stopPropagation=qm.prototype.stopPropagation;sm.prototype.originalEvent=sm.prototype.originalEvent;sm.prototype.pixel=sm.prototype.pixel;sm.prototype.coordinate=sm.prototype.coordinate;sm.prototype.dragging=sm.prototype.dragging;sm.prototype.preventDefault=sm.prototype.preventDefault;sm.prototype.stopPropagation=sm.prototype.stopPropagation;sm.prototype.map=sm.prototype.map;sm.prototype.frameState=sm.prototype.frameState;
sm.prototype.type=sm.prototype.type;sm.prototype.target=sm.prototype.target;ab.prototype.type=ab.prototype.type;ab.prototype.target=ab.prototype.target;ab.prototype.preventDefault=ab.prototype.preventDefault;ab.prototype.stopPropagation=ab.prototype.stopPropagation;Oo.prototype.get=Oo.prototype.get;Oo.prototype.getKeys=Oo.prototype.P;Oo.prototype.getProperties=Oo.prototype.L;Oo.prototype.set=Oo.prototype.set;Oo.prototype.setProperties=Oo.prototype.J;Oo.prototype.unset=Oo.prototype.S;
Oo.prototype.changed=Oo.prototype.u;Oo.prototype.dispatchEvent=Oo.prototype.b;Oo.prototype.getRevision=Oo.prototype.M;Oo.prototype.on=Oo.prototype.H;Oo.prototype.once=Oo.prototype.once;Oo.prototype.un=Oo.prototype.K;Yy.prototype.getTileCoord=Yy.prototype.i;Yy.prototype.load=Yy.prototype.load;P.prototype.get=P.prototype.get;P.prototype.getKeys=P.prototype.P;P.prototype.getProperties=P.prototype.L;P.prototype.set=P.prototype.set;P.prototype.setProperties=P.prototype.J;P.prototype.unset=P.prototype.S;
P.prototype.changed=P.prototype.u;P.prototype.dispatchEvent=P.prototype.b;P.prototype.getRevision=P.prototype.M;P.prototype.on=P.prototype.H;P.prototype.once=P.prototype.once;P.prototype.un=P.prototype.K;az.prototype.forEachTileCoord=az.prototype.Zh;az.prototype.getMaxZoom=az.prototype.wj;az.prototype.getMinZoom=az.prototype.xj;az.prototype.getOrigin=az.prototype.kd;az.prototype.getResolution=az.prototype.Ra;az.prototype.getResolutions=az.prototype.yj;az.prototype.getTileCoordExtent=az.prototype.Ya;
az.prototype.getTileCoordForCoordAndResolution=az.prototype.$e;az.prototype.getTileCoordForCoordAndZ=az.prototype.zg;az.prototype.getTileSize=az.prototype.gb;az.prototype.getZForResolution=az.prototype.dd;hj.prototype.getOpacity=hj.prototype.La;hj.prototype.getRotateWithView=hj.prototype.zf;hj.prototype.getRotation=hj.prototype.Af;hj.prototype.getScale=hj.prototype.Ma;hj.prototype.getSnapToPixel=hj.prototype.Ze;hj.prototype.setOpacity=hj.prototype.Ld;hj.prototype.setRotation=hj.prototype.Bf;
hj.prototype.setScale=hj.prototype.Md;jj.prototype.clone=jj.prototype.clone;jj.prototype.getAngle=jj.prototype.sj;jj.prototype.getFill=jj.prototype.qa;jj.prototype.getPoints=jj.prototype.tj;jj.prototype.getRadius=jj.prototype.uj;jj.prototype.getRadius2=jj.prototype.ii;jj.prototype.getStroke=jj.prototype.pa;jj.prototype.getOpacity=jj.prototype.La;jj.prototype.getRotateWithView=jj.prototype.zf;jj.prototype.getRotation=jj.prototype.Af;jj.prototype.getScale=jj.prototype.Ma;
jj.prototype.getSnapToPixel=jj.prototype.Ze;jj.prototype.setOpacity=jj.prototype.Ld;jj.prototype.setRotation=jj.prototype.Bf;jj.prototype.setScale=jj.prototype.Md;vl.prototype.getOpacity=vl.prototype.La;vl.prototype.getRotateWithView=vl.prototype.zf;vl.prototype.getRotation=vl.prototype.Af;vl.prototype.getScale=vl.prototype.Ma;vl.prototype.getSnapToPixel=vl.prototype.Ze;vl.prototype.setOpacity=vl.prototype.Ld;vl.prototype.setRotation=vl.prototype.Bf;vl.prototype.setScale=vl.prototype.Md;
Ai.prototype.get=Ai.prototype.get;Ai.prototype.getKeys=Ai.prototype.P;Ai.prototype.getProperties=Ai.prototype.L;Ai.prototype.set=Ai.prototype.set;Ai.prototype.setProperties=Ai.prototype.J;Ai.prototype.unset=Ai.prototype.S;Ai.prototype.changed=Ai.prototype.u;Ai.prototype.dispatchEvent=Ai.prototype.b;Ai.prototype.getRevision=Ai.prototype.M;Ai.prototype.on=Ai.prototype.H;Ai.prototype.once=Ai.prototype.once;Ai.prototype.un=Ai.prototype.K;Di.prototype.getAttributions=Di.prototype.Ea;
Di.prototype.getLogo=Di.prototype.Ca;Di.prototype.getProjection=Di.prototype.Fa;Di.prototype.getState=Di.prototype.getState;Di.prototype.refresh=Di.prototype.Aa;Di.prototype.setAttributions=Di.prototype.za;Di.prototype.get=Di.prototype.get;Di.prototype.getKeys=Di.prototype.P;Di.prototype.getProperties=Di.prototype.L;Di.prototype.set=Di.prototype.set;Di.prototype.setProperties=Di.prototype.J;Di.prototype.unset=Di.prototype.S;Di.prototype.changed=Di.prototype.u;Di.prototype.dispatchEvent=Di.prototype.b;
Di.prototype.getRevision=Di.prototype.M;Di.prototype.on=Di.prototype.H;Di.prototype.once=Di.prototype.once;Di.prototype.un=Di.prototype.K;Hi.prototype.getTileGrid=Hi.prototype.fb;Hi.prototype.refresh=Hi.prototype.Aa;Hi.prototype.getAttributions=Hi.prototype.Ea;Hi.prototype.getLogo=Hi.prototype.Ca;Hi.prototype.getProjection=Hi.prototype.Fa;Hi.prototype.getState=Hi.prototype.getState;Hi.prototype.setAttributions=Hi.prototype.za;Hi.prototype.get=Hi.prototype.get;Hi.prototype.getKeys=Hi.prototype.P;
Hi.prototype.getProperties=Hi.prototype.L;Hi.prototype.set=Hi.prototype.set;Hi.prototype.setProperties=Hi.prototype.J;Hi.prototype.unset=Hi.prototype.S;Hi.prototype.changed=Hi.prototype.u;Hi.prototype.dispatchEvent=Hi.prototype.b;Hi.prototype.getRevision=Hi.prototype.M;Hi.prototype.on=Hi.prototype.H;Hi.prototype.once=Hi.prototype.once;Hi.prototype.un=Hi.prototype.K;A.prototype.getTileLoadFunction=A.prototype.ub;A.prototype.getTileUrlFunction=A.prototype.wb;A.prototype.getUrls=A.prototype.xb;
Patrick's avatar
Patrick committed
1033
A.prototype.setTileLoadFunction=A.prototype.Bb;A.prototype.setTileUrlFunction=A.prototype.ib;A.prototype.setUrl=A.prototype.pb;A.prototype.setUrls=A.prototype.jb;A.prototype.getTileGrid=A.prototype.fb;A.prototype.refresh=A.prototype.Aa;A.prototype.getAttributions=A.prototype.Ea;A.prototype.getLogo=A.prototype.Ca;A.prototype.getProjection=A.prototype.Fa;A.prototype.getState=A.prototype.getState;A.prototype.setAttributions=A.prototype.za;A.prototype.get=A.prototype.get;A.prototype.getKeys=A.prototype.P;
Patrick's avatar
Patrick committed
1034
1035
1036
1037
1038
1039
1040
1041
A.prototype.getProperties=A.prototype.L;A.prototype.set=A.prototype.set;A.prototype.setProperties=A.prototype.J;A.prototype.unset=A.prototype.S;A.prototype.changed=A.prototype.u;A.prototype.dispatchEvent=A.prototype.b;A.prototype.getRevision=A.prototype.M;A.prototype.on=A.prototype.H;A.prototype.once=A.prototype.once;A.prototype.un=A.prototype.K;hy.prototype.setRenderReprojectionEdges=hy.prototype.Ub;hy.prototype.setTileGridForProjection=hy.prototype.Vb;hy.prototype.getTileLoadFunction=hy.prototype.ub;
hy.prototype.getTileUrlFunction=hy.prototype.wb;hy.prototype.getUrls=hy.prototype.xb;hy.prototype.setTileLoadFunction=hy.prototype.Bb;hy.prototype.setTileUrlFunction=hy.prototype.ib;hy.prototype.setUrl=hy.prototype.pb;hy.prototype.setUrls=hy.prototype.jb;hy.prototype.getTileGrid=hy.prototype.fb;hy.prototype.refresh=hy.prototype.Aa;hy.prototype.getAttributions=hy.prototype.Ea;hy.prototype.getLogo=hy.prototype.Ca;hy.prototype.getProjection=hy.prototype.Fa;hy.prototype.getState=hy.prototype.getState;
hy.prototype.setAttributions=hy.prototype.za;hy.prototype.get=hy.prototype.get;hy.prototype.getKeys=hy.prototype.P;hy.prototype.getProperties=hy.prototype.L;hy.prototype.set=hy.prototype.set;hy.prototype.setProperties=hy.prototype.J;hy.prototype.unset=hy.prototype.S;hy.prototype.changed=hy.prototype.u;hy.prototype.dispatchEvent=hy.prototype.b;hy.prototype.getRevision=hy.prototype.M;hy.prototype.on=hy.prototype.H;hy.prototype.once=hy.prototype.once;hy.prototype.un=hy.prototype.K;
jy.prototype.setRenderReprojectionEdges=jy.prototype.Ub;jy.prototype.setTileGridForProjection=jy.prototype.Vb;jy.prototype.getTileLoadFunction=jy.prototype.ub;jy.prototype.getTileUrlFunction=jy.prototype.wb;jy.prototype.getUrls=jy.prototype.xb;jy.prototype.setTileLoadFunction=jy.prototype.Bb;jy.prototype.setTileUrlFunction=jy.prototype.ib;jy.prototype.setUrl=jy.prototype.pb;jy.prototype.setUrls=jy.prototype.jb;jy.prototype.getTileGrid=jy.prototype.fb;jy.prototype.refresh=jy.prototype.Aa;
jy.prototype.getAttributions=jy.prototype.Ea;jy.prototype.getLogo=jy.prototype.Ca;jy.prototype.getProjection=jy.prototype.Fa;jy.prototype.getState=jy.prototype.getState;jy.prototype.setAttributions=jy.prototype.za;jy.prototype.get=jy.prototype.get;jy.prototype.getKeys=jy.prototype.P;jy.prototype.getProperties=jy.prototype.L;jy.prototype.set=jy.prototype.set;jy.prototype.setProperties=jy.prototype.J;jy.prototype.unset=jy.prototype.S;jy.prototype.changed=jy.prototype.u;jy.prototype.dispatchEvent=jy.prototype.b;
jy.prototype.getRevision=jy.prototype.M;jy.prototype.on=jy.prototype.H;jy.prototype.once=jy.prototype.once;jy.prototype.un=jy.prototype.K;ky.prototype.setRenderReprojectionEdges=ky.prototype.Ub;ky.prototype.setTileGridForProjection=ky.prototype.Vb;ky.prototype.getTileLoadFunction=ky.prototype.ub;ky.prototype.getTileUrlFunction=ky.prototype.wb;ky.prototype.getUrls=ky.prototype.xb;ky.prototype.setTileLoadFunction=ky.prototype.Bb;ky.prototype.setTileUrlFunction=ky.prototype.ib;ky.prototype.setUrl=ky.prototype.pb;
ky.prototype.setUrls=ky.prototype.jb;ky.prototype.getTileGrid=ky.prototype.fb;ky.prototype.refresh=ky.prototype.Aa;ky.prototype.getAttributions=ky.prototype.Ea;ky.prototype.getLogo=ky.prototype.Ca;ky.prototype.getProjection=ky.prototype.Fa;ky.prototype.getState=ky.prototype.getState;ky.prototype.setAttributions=ky.prototype.za;ky.prototype.get=ky.prototype.get;ky.prototype.getKeys=ky.prototype.P;ky.prototype.getProperties=ky.prototype.L;ky.prototype.set=ky.prototype.set;
ky.prototype.setProperties=ky.prototype.J;ky.prototype.unset=ky.prototype.S;ky.prototype.changed=ky.prototype.u;ky.prototype.dispatchEvent=ky.prototype.b;ky.prototype.getRevision=ky.prototype.M;ky.prototype.on=ky.prototype.H;ky.prototype.once=ky.prototype.once;ky.prototype.un=ky.prototype.K;J.prototype.getAttributions=J.prototype.Ea;J.prototype.getLogo=J.prototype.Ca;J.prototype.getProjection=J.prototype.Fa;J.prototype.getState=J.prototype.getState;J.prototype.refresh=J.prototype.Aa;
Patrick's avatar
Patrick committed
1042
J.prototype.setAttributions=J.prototype.za;J.prototype.get=J.prototype.get;J.prototype.getKeys=J.prototype.P;J.prototype.getProperties=J.prototype.L;J.prototype.set=J.prototype.set;J.prototype.setProperties=J.prototype.J;J.prototype.unset=J.prototype.S;J.prototype.changed=J.prototype.u;J.prototype.dispatchEvent=J.prototype.b;J.prototype.getRevision=J.prototype.M;J.prototype.on=J.prototype.H;J.prototype.once=J.prototype.once;J.prototype.un=J.prototype.K;O.prototype.addFeature=O.prototype.Eb;
Patrick's avatar
Patrick committed
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
O.prototype.addFeatures=O.prototype.yd;O.prototype.clear=O.prototype.clear;O.prototype.forEachFeature=O.prototype.Xh;O.prototype.forEachFeatureInExtent=O.prototype.oc;O.prototype.forEachFeatureIntersectingExtent=O.prototype.Yh;O.prototype.getFeaturesCollection=O.prototype.ei;O.prototype.getFeatures=O.prototype.Rc;O.prototype.getFeaturesAtCoordinate=O.prototype.di;O.prototype.getFeaturesInExtent=O.prototype.rg;O.prototype.getClosestFeatureToCoordinate=O.prototype.ai;O.prototype.getExtent=O.prototype.D;
O.prototype.getFeatureById=O.prototype.qg;O.prototype.getFormat=O.prototype.pj;O.prototype.getUrl=O.prototype.qj;O.prototype.removeFeature=O.prototype.Ib;O.prototype.getAttributions=O.prototype.Ea;O.prototype.getLogo=O.prototype.Ca;O.prototype.getProjection=O.prototype.Fa;O.prototype.getState=O.prototype.getState;O.prototype.refresh=O.prototype.Aa;O.prototype.setAttributions=O.prototype.za;O.prototype.get=O.prototype.get;O.prototype.getKeys=O.prototype.P;O.prototype.getProperties=O.prototype.L;
O.prototype.set=O.prototype.set;O.prototype.setProperties=O.prototype.J;O.prototype.unset=O.prototype.S;O.prototype.changed=O.prototype.u;O.prototype.dispatchEvent=O.prototype.b;O.prototype.getRevision=O.prototype.M;O.prototype.on=O.prototype.H;O.prototype.once=O.prototype.once;O.prototype.un=O.prototype.K;Dk.prototype.getAttributions=Dk.prototype.Ea;Dk.prototype.getLogo=Dk.prototype.Ca;Dk.prototype.getProjection=Dk.prototype.Fa;Dk.prototype.getState=Dk.prototype.getState;Dk.prototype.refresh=Dk.prototype.Aa;
Dk.prototype.setAttributions=Dk.prototype.za;Dk.prototype.get=Dk.prototype.get;Dk.prototype.getKeys=Dk.prototype.P;Dk.prototype.getProperties=Dk.prototype.L;Dk.prototype.set=Dk.prototype.set;Dk.prototype.setProperties=Dk.prototype.J;Dk.prototype.unset=Dk.prototype.S;Dk.prototype.changed=Dk.prototype.u;Dk.prototype.dispatchEvent=Dk.prototype.b;Dk.prototype.getRevision=Dk.prototype.M;Dk.prototype.on=Dk.prototype.H;Dk.prototype.once=Dk.prototype.once;Dk.prototype.un=Dk.prototype.K;
Fk.prototype.type=Fk.prototype.type;Fk.prototype.target=Fk.prototype.target;Fk.prototype.preventDefault=Fk.prototype.preventDefault;Fk.prototype.stopPropagation=Fk.prototype.stopPropagation;qy.prototype.getAttributions=qy.prototype.Ea;qy.prototype.getLogo=qy.prototype.Ca;qy.prototype.getProjection=qy.prototype.Fa;qy.prototype.getState=qy.prototype.getState;qy.prototype.refresh=qy.prototype.Aa;qy.prototype.setAttributions=qy.prototype.za;qy.prototype.get=qy.prototype.get;qy.prototype.getKeys=qy.prototype.P;
qy.prototype.getProperties=qy.prototype.L;qy.prototype.set=qy.prototype.set;qy.prototype.setProperties=qy.prototype.J;qy.prototype.unset=qy.prototype.S;qy.prototype.changed=qy.prototype.u;qy.prototype.dispatchEvent=qy.prototype.b;qy.prototype.getRevision=qy.prototype.M;qy.prototype.on=qy.prototype.H;qy.prototype.once=qy.prototype.once;qy.prototype.un=qy.prototype.K;Kk.prototype.getAttributions=Kk.prototype.Ea;Kk.prototype.getLogo=Kk.prototype.Ca;Kk.prototype.getProjection=Kk.prototype.Fa;
Kk.prototype.getState=Kk.prototype.getState;Kk.prototype.refresh=Kk.prototype.Aa;Kk.prototype.setAttributions=Kk.prototype.za;Kk.prototype.get=Kk.prototype.get;Kk.prototype.getKeys=Kk.prototype.P;Kk.prototype.getProperties=Kk.prototype.L;Kk.prototype.set=Kk.prototype.set;Kk.prototype.setProperties=Kk.prototype.J;Kk.prototype.unset=Kk.prototype.S;Kk.prototype.changed=Kk.prototype.u;Kk.prototype.dispatchEvent=Kk.prototype.b;Kk.prototype.getRevision=Kk.prototype.M;Kk.prototype.on=Kk.prototype.H;
Kk.prototype.once=Kk.prototype.once;Kk.prototype.un=Kk.prototype.K;ry.prototype.getAttributions=ry.prototype.Ea;ry.prototype.getLogo=ry.prototype.Ca;ry.prototype.getProjection=ry.prototype.Fa;ry.prototype.getState=ry.prototype.getState;ry.prototype.refresh=ry.prototype.Aa;ry.prototype.setAttributions=ry.prototype.za;ry.prototype.get=ry.prototype.get;ry.prototype.getKeys=ry.prototype.P;ry.prototype.getProperties=ry.prototype.L;ry.prototype.set=ry.prototype.set;ry.prototype.setProperties=ry.prototype.J;
ry.prototype.unset=ry.prototype.S;ry.prototype.changed=ry.prototype.u;ry.prototype.dispatchEvent=ry.prototype.b;ry.prototype.getRevision=ry.prototype.M;ry.prototype.on=ry.prototype.H;ry.prototype.once=ry.prototype.once;ry.prototype.un=ry.prototype.K;sy.prototype.getAttributions=sy.prototype.Ea;sy.prototype.getLogo=sy.prototype.Ca;sy.prototype.getProjection=sy.prototype.Fa;sy.prototype.getState=sy.prototype.getState;sy.prototype.refresh=sy.prototype.Aa;sy.prototype.setAttributions=sy.prototype.za;
sy.prototype.get=sy.prototype.get;sy.prototype.getKeys=sy.prototype.P;sy.prototype.getProperties=sy.prototype.L;sy.prototype.set=sy.prototype.set;sy.prototype.setProperties=sy.prototype.J;sy.prototype.unset=sy.prototype.S;sy.prototype.changed=sy.prototype.u;sy.prototype.dispatchEvent=sy.prototype.b;sy.prototype.getRevision=sy.prototype.M;sy.prototype.on=sy.prototype.H;sy.prototype.once=sy.prototype.once;sy.prototype.un=sy.prototype.K;Lk.prototype.getAttributions=Lk.prototype.Ea;
Lk.prototype.getLogo=Lk.prototype.Ca;Lk.prototype.getProjection=Lk.prototype.Fa;Lk.prototype.getState=Lk.prototype.getState;Lk.prototype.refresh=Lk.prototype.Aa;Lk.prototype.setAttributions=Lk.prototype.za;Lk.prototype.get=Lk.prototype.get;Lk.prototype.getKeys=Lk.prototype.P;Lk.prototype.getProperties=Lk.prototype.L;Lk.prototype.set=Lk.prototype.set;Lk.prototype.setProperties=Lk.prototype.J;Lk.prototype.unset=Lk.prototype.S;Lk.prototype.changed=Lk.prototype.u;Lk.prototype.dispatchEvent=Lk.prototype.b;
Lk.prototype.getRevision=Lk.prototype.M;Lk.prototype.on=Lk.prototype.H;Lk.prototype.once=Lk.prototype.once;Lk.prototype.un=Lk.prototype.K;ty.prototype.getAttributions=ty.prototype.Ea;ty.prototype.getLogo=ty.prototype.Ca;ty.prototype.getProjection=ty.prototype.Fa;ty.prototype.getState=ty.prototype.getState;ty.prototype.refresh=ty.prototype.Aa;ty.prototype.setAttributions=ty.prototype.za;ty.prototype.get=ty.prototype.get;ty.prototype.getKeys=ty.prototype.P;ty.prototype.getProperties=ty.prototype.L;
ty.prototype.set=ty.prototype.set;ty.prototype.setProperties=ty.prototype.J;ty.prototype.unset=ty.prototype.S;ty.prototype.changed=ty.prototype.u;ty.prototype.dispatchEvent=ty.prototype.b;ty.prototype.getRevision=ty.prototype.M;ty.prototype.on=ty.prototype.H;ty.prototype.once=ty.prototype.once;ty.prototype.un=ty.prototype.K;xy.prototype.setRenderReprojectionEdges=xy.prototype.Ub;xy.prototype.setTileGridForProjection=xy.prototype.Vb;xy.prototype.getTileLoadFunction=xy.prototype.ub;
xy.prototype.getTileUrlFunction=xy.prototype.wb;xy.prototype.getUrls=xy.prototype.xb;xy.prototype.setTileLoadFunction=xy.prototype.Bb;xy.prototype.setTileUrlFunction=xy.prototype.ib;xy.prototype.setUrl=xy.prototype.pb;xy.prototype.setUrls=xy.prototype.jb;xy.prototype.getTileGrid=xy.prototype.fb;xy.prototype.refresh=xy.prototype.Aa;xy.prototype.getAttributions=xy.prototype.Ea;xy.prototype.getLogo=xy.prototype.Ca;xy.prototype.getProjection=xy.prototype.Fa;xy.prototype.getState=xy.prototype.getState;
xy.prototype.setAttributions=xy.prototype.za;xy.prototype.get=xy.prototype.get;xy.prototype.getKeys=xy.prototype.P;xy.prototype.getProperties=xy.prototype.L;xy.prototype.set=xy.prototype.set;xy.prototype.setProperties=xy.prototype.J;xy.prototype.unset=xy.prototype.S;xy.prototype.changed=xy.prototype.u;xy.prototype.dispatchEvent=xy.prototype.b;xy.prototype.getRevision=xy.prototype.M;xy.prototype.on=xy.prototype.H;xy.prototype.once=xy.prototype.once;xy.prototype.un=xy.prototype.K;
zy.prototype.getAttributions=zy.prototype.Ea;zy.prototype.getLogo=zy.prototype.Ca;zy.prototype.getProjection=zy.prototype.Fa;zy.prototype.getState=zy.prototype.getState;zy.prototype.refresh=zy.prototype.Aa;zy.prototype.setAttributions=zy.prototype.za;zy.prototype.get=zy.prototype.get;zy.prototype.getKeys=zy.prototype.P;zy.prototype.getProperties=zy.prototype.L;zy.prototype.set=zy.prototype.set;zy.prototype.setProperties=zy.prototype.J;zy.prototype.unset=zy.prototype.S;zy.prototype.changed=zy.prototype.u;
zy.prototype.dispatchEvent=zy.prototype.b;zy.prototype.getRevision=zy.prototype.M;zy.prototype.on=zy.prototype.H;zy.prototype.once=zy.prototype.once;zy.prototype.un=zy.prototype.K;Dy.prototype.type=Dy.prototype.type;Dy.prototype.target=Dy.prototype.target;Dy.prototype.preventDefault=Dy.prototype.preventDefault;Dy.prototype.stopPropagation=Dy.prototype.stopPropagation;Gy.prototype.setRenderReprojectionEdges=Gy.prototype.Ub;Gy.prototype.setTileGridForProjection=Gy.prototype.Vb;
Gy.prototype.getTileLoadFunction=Gy.prototype.ub;Gy.prototype.getTileUrlFunction=Gy.prototype.wb;Gy.prototype.getUrls=Gy.prototype.xb;Gy.prototype.setTileLoadFunction=Gy.prototype.Bb;Gy.prototype.setTileUrlFunction=Gy.prototype.ib;Gy.prototype.setUrl=Gy.prototype.pb;Gy.prototype.setUrls=Gy.prototype.jb;Gy.prototype.getTileGrid=Gy.prototype.fb;Gy.prototype.refresh=Gy.prototype.Aa;Gy.prototype.getAttributions=Gy.prototype.Ea;Gy.prototype.getLogo=Gy.prototype.Ca;Gy.prototype.getProjection=Gy.prototype.Fa;
Gy.prototype.getState=Gy.prototype.getState;Gy.prototype.setAttributions=Gy.prototype.za;Gy.prototype.get=Gy.prototype.get;Gy.prototype.getKeys=Gy.prototype.P;Gy.prototype.getProperties=Gy.prototype.L;Gy.prototype.set=Gy.prototype.set;Gy.prototype.setProperties=Gy.prototype.J;Gy.prototype.unset=Gy.prototype.S;Gy.prototype.changed=Gy.prototype.u;Gy.prototype.dispatchEvent=Gy.prototype.b;Gy.prototype.getRevision=Gy.prototype.M;Gy.prototype.on=Gy.prototype.H;Gy.prototype.once=Gy.prototype.once;
Gy.prototype.un=Gy.prototype.K;Gi.prototype.type=Gi.prototype.type;Gi.prototype.target=Gi.prototype.target;Gi.prototype.preventDefault=Gi.prototype.preventDefault;Gi.prototype.stopPropagation=Gi.prototype.stopPropagation;Ky.prototype.setRenderReprojectionEdges=Ky.prototype.Ub;Ky.prototype.setTileGridForProjection=Ky.prototype.Vb;Ky.prototype.getTileLoadFunction=Ky.prototype.ub;Ky.prototype.getTileUrlFunction=Ky.prototype.wb;Ky.prototype.getUrls=Ky.prototype.xb;Ky.prototype.setTileLoadFunction=Ky.prototype.Bb;
Ky.prototype.setTileUrlFunction=Ky.prototype.ib;Ky.prototype.setUrl=Ky.prototype.pb;Ky.prototype.setUrls=Ky.prototype.jb;Ky.prototype.getTileGrid=Ky.prototype.fb;Ky.prototype.refresh=Ky.prototype.Aa;Ky.prototype.getAttributions=Ky.prototype.Ea;Ky.prototype.getLogo=Ky.prototype.Ca;Ky.prototype.getProjection=Ky.prototype.Fa;Ky.prototype.getState=Ky.prototype.getState;Ky.prototype.setAttributions=Ky.prototype.za;Ky.prototype.get=Ky.prototype.get;Ky.prototype.getKeys=Ky.prototype.P;
Ky.prototype.getProperties=Ky.prototype.L;Ky.prototype.set=Ky.prototype.set;Ky.prototype.setProperties=Ky.prototype.J;Ky.prototype.unset=Ky.prototype.S;Ky.prototype.changed=Ky.prototype.u;Ky.prototype.dispatchEvent=Ky.prototype.b;Ky.prototype.getRevision=Ky.prototype.M;Ky.prototype.on=Ky.prototype.H;Ky.prototype.once=Ky.prototype.once;Ky.prototype.un=Ky.prototype.K;My.prototype.getTileGrid=My.prototype.fb;My.prototype.refresh=My.prototype.Aa;My.prototype.getAttributions=My.prototype.Ea;
My.prototype.getLogo=My.prototype.Ca;My.prototype.getProjection=My.prototype.Fa;My.prototype.getState=My.prototype.getState;My.prototype.setAttributions=My.prototype.za;My.prototype.get=My.prototype.get;My.prototype.getKeys=My.prototype.P;My.prototype.getProperties=My.prototype.L;My.prototype.set=My.prototype.set;My.prototype.setProperties=My.prototype.J;My.prototype.unset=My.prototype.S;My.prototype.changed=My.prototype.u;My.prototype.dispatchEvent=My.prototype.b;My.prototype.getRevision=My.prototype.M;
My.prototype.on=My.prototype.H;My.prototype.once=My.prototype.once;My.prototype.un=My.prototype.K;Oy.prototype.setRenderReprojectionEdges=Oy.prototype.Ub;Oy.prototype.setTileGridForProjection=Oy.prototype.Vb;Oy.prototype.getTileLoadFunction=Oy.prototype.ub;Oy.prototype.getTileUrlFunction=Oy.prototype.wb;Oy.prototype.getUrls=Oy.prototype.xb;Oy.prototype.setTileLoadFunction=Oy.prototype.Bb;Oy.prototype.setTileUrlFunction=Oy.prototype.ib;Oy.prototype.setUrl=Oy.prototype.pb;Oy.prototype.setUrls=Oy.prototype.jb;
Oy.prototype.getTileGrid=Oy.prototype.fb;Oy.prototype.refresh=Oy.prototype.Aa;Oy.prototype.getAttributions=Oy.prototype.Ea;Oy.prototype.getLogo=Oy.prototype.Ca;Oy.prototype.getProjection=Oy.prototype.Fa;Oy.prototype.getState=Oy.prototype.getState;Oy.prototype.setAttributions=Oy.prototype.za;Oy.prototype.get=Oy.prototype.get;Oy.prototype.getKeys=Oy.prototype.P;Oy.prototype.getProperties=Oy.prototype.L;Oy.prototype.set=Oy.prototype.set;Oy.prototype.setProperties=Oy.prototype.J;Oy.prototype.unset=Oy.prototype.S;
Oy.prototype.changed=Oy.prototype.u;Oy.prototype.dispatchEvent=Oy.prototype.b;Oy.prototype.getRevision=Oy.prototype.M;Oy.prototype.on=Oy.prototype.H;Oy.prototype.once=Oy.prototype.once;Oy.prototype.un=Oy.prototype.K;Py.prototype.getTileGrid=Py.prototype.fb;Py.prototype.refresh=Py.prototype.Aa;Py.prototype.getAttributions=Py.prototype.Ea;Py.prototype.getLogo=Py.prototype.Ca;Py.prototype.getProjection=Py.prototype.Fa;Py.prototype.getState=Py.prototype.getState;Py.prototype.setAttributions=Py.prototype.za;
Py.prototype.get=Py.prototype.get;Py.prototype.getKeys=Py.prototype.P;Py.prototype.getProperties=Py.prototype.L;Py.prototype.set=Py.prototype.set;Py.prototype.setProperties=Py.prototype.J;Py.prototype.unset=Py.prototype.S;Py.prototype.changed=Py.prototype.u;Py.prototype.dispatchEvent=Py.prototype.b;Py.prototype.getRevision=Py.prototype.M;Py.prototype.on=Py.prototype.H;Py.prototype.once=Py.prototype.once;Py.prototype.un=Py.prototype.K;Ty.prototype.setRenderReprojectionEdges=Ty.prototype.Ub;
Ty.prototype.setTileGridForProjection=Ty.prototype.Vb;Ty.prototype.getTileLoadFunction=Ty.prototype.ub;Ty.prototype.getTileUrlFunction=Ty.prototype.wb;Ty.prototype.getUrls=Ty.prototype.xb;Ty.prototype.setTileLoadFunction=Ty.prototype.Bb;Ty.prototype.setTileUrlFunction=Ty.prototype.ib;Ty.prototype.setUrl=Ty.prototype.pb;Ty.prototype.setUrls=Ty.prototype.jb;Ty.prototype.getTileGrid=Ty.prototype.fb;Ty.prototype.refresh=Ty.prototype.Aa;Ty.prototype.getAttributions=Ty.prototype.Ea;
Ty.prototype.getLogo=Ty.prototype.Ca;Ty.prototype.getProjection=Ty.prototype.Fa;Ty.prototype.getState=Ty.prototype.getState;Ty.prototype.setAttributions=Ty.prototype.za;Ty.prototype.get=Ty.prototype.get;Ty.prototype.getKeys=Ty.prototype.P;Ty.prototype.getProperties=Ty.prototype.L;Ty.prototype.set=Ty.prototype.set;Ty.prototype.setProperties=Ty.prototype.J;Ty.prototype.unset=Ty.prototype.S;Ty.prototype.changed=Ty.prototype.u;Ty.prototype.dispatchEvent=Ty.prototype.b;Ty.prototype.getRevision=Ty.prototype.M;
Ty.prototype.on=Ty.prototype.H;Ty.prototype.once=Ty.prototype.once;Ty.prototype.un=Ty.prototype.K;Uj.prototype.type=Uj.prototype.type;Uj.prototype.target=Uj.prototype.target;Uj.prototype.preventDefault=Uj.prototype.preventDefault;Uj.prototype.stopPropagation=Uj.prototype.stopPropagation;$y.prototype.getTileLoadFunction=$y.prototype.ub;$y.prototype.getTileUrlFunction=$y.prototype.wb;$y.prototype.getUrls=$y.prototype.xb;$y.prototype.setTileLoadFunction=$y.prototype.Bb;
$y.prototype.setTileUrlFunction=$y.prototype.ib;$y.prototype.setUrl=$y.prototype.pb;$y.prototype.setUrls=$y.prototype.jb;$y.prototype.getTileGrid=$y.prototype.fb;$y.prototype.refresh=$y.prototype.Aa;$y.prototype.getAttributions=$y.prototype.Ea;$y.prototype.getLogo=$y.prototype.Ca;$y.prototype.getProjection=$y.prototype.Fa;$y.prototype.getState=$y.prototype.getState;$y.prototype.setAttributions=$y.prototype.za;$y.prototype.get=$y.prototype.get;$y.prototype.getKeys=$y.prototype.P;
$y.prototype.getProperties=$y.prototype.L;$y.prototype.set=$y.prototype.set;$y.prototype.setProperties=$y.prototype.J;$y.prototype.unset=$y.prototype.S;$y.prototype.changed=$y.prototype.u;$y.prototype.dispatchEvent=$y.prototype.b;$y.prototype.getRevision=$y.prototype.M;$y.prototype.on=$y.prototype.H;$y.prototype.once=$y.prototype.once;$y.prototype.un=$y.prototype.K;Z.prototype.setRenderReprojectionEdges=Z.prototype.Ub;Z.prototype.setTileGridForProjection=Z.prototype.Vb;
Patrick's avatar
Patrick committed
1075
1076
Z.prototype.getTileLoadFunction=Z.prototype.ub;Z.prototype.getTileUrlFunction=Z.prototype.wb;Z.prototype.getUrls=Z.prototype.xb;Z.prototype.setTileLoadFunction=Z.prototype.Bb;Z.prototype.setTileUrlFunction=Z.prototype.ib;Z.prototype.setUrl=Z.prototype.pb;Z.prototype.setUrls=Z.prototype.jb;Z.prototype.getTileGrid=Z.prototype.fb;Z.prototype.refresh=Z.prototype.Aa;Z.prototype.getAttributions=Z.prototype.Ea;Z.prototype.getLogo=Z.prototype.Ca;Z.prototype.getProjection=Z.prototype.Fa;
Z.prototype.getState=Z.prototype.getState;Z.prototype.setAttributions=Z.prototype.za;Z.prototype.get=Z.prototype.get;Z.prototype.getKeys=Z.prototype.P;Z.prototype.getProperties=Z.prototype.L;Z.prototype.set=Z.prototype.set;Z.prototype.setProperties=Z.prototype.J;Z.prototype.unset=Z.prototype.S;Z.prototype.changed=Z.prototype.u;Z.prototype.dispatchEvent=Z.prototype.b;Z.prototype.getRevision=Z.prototype.M;Z.prototype.on=Z.prototype.H;Z.prototype.once=Z.prototype.once;Z.prototype.un=Z.prototype.K;
Patrick's avatar
Patrick committed
1077
1078
1079
1080
1081
1082
1083
1084
dz.prototype.setRenderReprojectionEdges=dz.prototype.Ub;dz.prototype.setTileGridForProjection=dz.prototype.Vb;dz.prototype.getTileLoadFunction=dz.prototype.ub;dz.prototype.getTileUrlFunction=dz.prototype.wb;dz.prototype.getUrls=dz.prototype.xb;dz.prototype.setTileLoadFunction=dz.prototype.Bb;dz.prototype.setTileUrlFunction=dz.prototype.ib;dz.prototype.setUrl=dz.prototype.pb;dz.prototype.setUrls=dz.prototype.jb;dz.prototype.getTileGrid=dz.prototype.fb;dz.prototype.refresh=dz.prototype.Aa;
dz.prototype.getAttributions=dz.prototype.Ea;dz.prototype.getLogo=dz.prototype.Ca;dz.prototype.getProjection=dz.prototype.Fa;dz.prototype.getState=dz.prototype.getState;dz.prototype.setAttributions=dz.prototype.za;dz.prototype.get=dz.prototype.get;dz.prototype.getKeys=dz.prototype.P;dz.prototype.getProperties=dz.prototype.L;dz.prototype.set=dz.prototype.set;dz.prototype.setProperties=dz.prototype.J;dz.prototype.unset=dz.prototype.S;dz.prototype.changed=dz.prototype.u;dz.prototype.dispatchEvent=dz.prototype.b;
dz.prototype.getRevision=dz.prototype.M;dz.prototype.on=dz.prototype.H;dz.prototype.once=dz.prototype.once;dz.prototype.un=dz.prototype.K;ji.prototype.getTileCoord=ji.prototype.i;ji.prototype.load=ji.prototype.load;Se.prototype.changed=Se.prototype.u;Se.prototype.dispatchEvent=Se.prototype.b;Se.prototype.getRevision=Se.prototype.M;Se.prototype.on=Se.prototype.H;Se.prototype.once=Se.prototype.once;Se.prototype.un=Se.prototype.K;Lh.prototype.changed=Lh.prototype.u;Lh.prototype.dispatchEvent=Lh.prototype.b;
Lh.prototype.getRevision=Lh.prototype.M;Lh.prototype.on=Lh.prototype.H;Lh.prototype.once=Lh.prototype.once;Lh.prototype.un=Lh.prototype.K;Jl.prototype.changed=Jl.prototype.u;Jl.prototype.dispatchEvent=Jl.prototype.b;Jl.prototype.getRevision=Jl.prototype.M;Jl.prototype.on=Jl.prototype.H;Jl.prototype.once=Jl.prototype.once;Jl.prototype.un=Jl.prototype.K;Vh.prototype.changed=Vh.prototype.u;Vh.prototype.dispatchEvent=Vh.prototype.b;Vh.prototype.getRevision=Vh.prototype.M;Vh.prototype.on=Vh.prototype.H;
Vh.prototype.once=Vh.prototype.once;Vh.prototype.un=Vh.prototype.K;Hl.prototype.changed=Hl.prototype.u;Hl.prototype.dispatchEvent=Hl.prototype.b;Hl.prototype.getRevision=Hl.prototype.M;Hl.prototype.on=Hl.prototype.H;Hl.prototype.once=Hl.prototype.once;Hl.prototype.un=Hl.prototype.K;cf.prototype.changed=cf.prototype.u;cf.prototype.dispatchEvent=cf.prototype.b;cf.prototype.getRevision=cf.prototype.M;cf.prototype.on=cf.prototype.H;cf.prototype.once=cf.prototype.once;cf.prototype.un=cf.prototype.K;
gf.prototype.changed=gf.prototype.u;gf.prototype.dispatchEvent=gf.prototype.b;gf.prototype.getRevision=gf.prototype.M;gf.prototype.on=gf.prototype.H;gf.prototype.once=gf.prototype.once;gf.prototype.un=gf.prototype.K;Il.prototype.changed=Il.prototype.u;Il.prototype.dispatchEvent=Il.prototype.b;Il.prototype.getRevision=Il.prototype.M;Il.prototype.on=Il.prototype.H;Il.prototype.once=Il.prototype.once;Il.prototype.un=Il.prototype.K;hf.prototype.changed=hf.prototype.u;hf.prototype.dispatchEvent=hf.prototype.b;
hf.prototype.getRevision=hf.prototype.M;hf.prototype.on=hf.prototype.H;hf.prototype.once=hf.prototype.once;hf.prototype.un=hf.prototype.K;Fl.prototype.changed=Fl.prototype.u;Fl.prototype.dispatchEvent=Fl.prototype.b;Fl.prototype.getRevision=Fl.prototype.M;Fl.prototype.on=Fl.prototype.H;Fl.prototype.once=Fl.prototype.once;Fl.prototype.un=Fl.prototype.K;dy.prototype.changed=dy.prototype.u;dy.prototype.dispatchEvent=dy.prototype.b;dy.prototype.getRevision=dy.prototype.M;dy.prototype.on=dy.prototype.H;
dy.prototype.once=dy.prototype.once;dy.prototype.un=dy.prototype.K;Hd.prototype.type=Hd.prototype.type;Hd.prototype.target=Hd.prototype.target;Hd.prototype.preventDefault=Hd.prototype.preventDefault;Hd.prototype.stopPropagation=Hd.prototype.stopPropagation;Dm.prototype.type=Dm.prototype.type;Dm.prototype.target=Dm.prototype.target;Dm.prototype.preventDefault=Dm.prototype.preventDefault;Dm.prototype.stopPropagation=Dm.prototype.stopPropagation;Ub.prototype.get=Ub.prototype.get;
Patrick's avatar
Patrick committed
1085
1086
Ub.prototype.getKeys=Ub.prototype.P;Ub.prototype.getProperties=Ub.prototype.L;Ub.prototype.set=Ub.prototype.set;Ub.prototype.setProperties=Ub.prototype.J;Ub.prototype.unset=Ub.prototype.S;Ub.prototype.changed=Ub.prototype.u;Ub.prototype.dispatchEvent=Ub.prototype.b;Ub.prototype.getRevision=Ub.prototype.M;Ub.prototype.on=Ub.prototype.H;Ub.prototype.once=Ub.prototype.once;Ub.prototype.un=Ub.prototype.K;Wb.prototype.getExtent=Wb.prototype.D;Wb.prototype.getMaxResolution=Wb.prototype.tc;
Wb.prototype.getMinResolution=Wb.prototype.uc;Wb.prototype.getOpacity=Wb.prototype.La;Wb.prototype.getVisible=Wb.prototype.lb;Wb.prototype.getZIndex=Wb.prototype.Da;Wb.prototype.setExtent=Wb.prototype.Oc;Wb.prototype.setMaxResolution=Wb.prototype.Sc;Wb.prototype.setMinResolution=Wb.prototype.Tc;Wb.prototype.setOpacity=Wb.prototype.Pc;Wb.prototype.setVisible=Wb.prototype.ec;Wb.prototype.setZIndex=Wb.prototype.jc;Wb.prototype.get=Wb.prototype.get;Wb.prototype.getKeys=Wb.prototype.P;
Patrick's avatar
Patrick committed
1087
1088
1089
Wb.prototype.getProperties=Wb.prototype.L;Wb.prototype.set=Wb.prototype.set;Wb.prototype.setProperties=Wb.prototype.J;Wb.prototype.unset=Wb.prototype.S;Wb.prototype.changed=Wb.prototype.u;Wb.prototype.dispatchEvent=Wb.prototype.b;Wb.prototype.getRevision=Wb.prototype.M;Wb.prototype.on=Wb.prototype.H;Wb.prototype.once=Wb.prototype.once;Wb.prototype.un=Wb.prototype.K;$c.prototype.getExtent=$c.prototype.D;$c.prototype.getMaxResolution=$c.prototype.tc;$c.prototype.getMinResolution=$c.prototype.uc;
$c.prototype.getOpacity=$c.prototype.La;$c.prototype.getVisible=$c.prototype.lb;$c.prototype.getZIndex=$c.prototype.Da;$c.prototype.setExtent=$c.prototype.Oc;$c.prototype.setMaxResolution=$c.prototype.Sc;$c.prototype.setMinResolution=$c.prototype.Tc;$c.prototype.setOpacity=$c.prototype.Pc;$c.prototype.setVisible=$c.prototype.ec;$c.prototype.setZIndex=$c.prototype.jc;$c.prototype.get=$c.prototype.get;$c.prototype.getKeys=$c.prototype.P;$c.prototype.getProperties=$c.prototype.L;$c.prototype.set=$c.prototype.set;
$c.prototype.setProperties=$c.prototype.J;$c.prototype.unset=$c.prototype.S;$c.prototype.changed=$c.prototype.u;$c.prototype.dispatchEvent=$c.prototype.b;$c.prototype.getRevision=$c.prototype.M;$c.prototype.on=$c.prototype.H;$c.prototype.once=$c.prototype.once;$c.prototype.un=$c.prototype.K;N.prototype.setMap=N.prototype.setMap;N.prototype.setSource=N.prototype.rd;N.prototype.getExtent=N.prototype.D;N.prototype.getMaxResolution=N.prototype.tc;N.prototype.getMinResolution=N.prototype.uc;
Patrick's avatar
Patrick committed
1090
1091
1092
N.prototype.getOpacity=N.prototype.La;N.prototype.getVisible=N.prototype.lb;N.prototype.getZIndex=N.prototype.Da;N.prototype.setExtent=N.prototype.Oc;N.prototype.setMaxResolution=N.prototype.Sc;N.prototype.setMinResolution=N.prototype.Tc;N.prototype.setOpacity=N.prototype.Pc;N.prototype.setVisible=N.prototype.ec;N.prototype.setZIndex=N.prototype.jc;N.prototype.get=N.prototype.get;N.prototype.getKeys=N.prototype.P;N.prototype.getProperties=N.prototype.L;N.prototype.set=N.prototype.set;
N.prototype.setProperties=N.prototype.J;N.prototype.unset=N.prototype.S;N.prototype.changed=N.prototype.u;N.prototype.dispatchEvent=N.prototype.b;N.prototype.getRevision=N.prototype.M;N.prototype.on=N.prototype.H;N.prototype.once=N.prototype.once;N.prototype.un=N.prototype.K;X.prototype.getSource=X.prototype.ba;X.prototype.getStyle=X.prototype.B;X.prototype.getStyleFunction=X.prototype.G;X.prototype.setStyle=X.prototype.f;X.prototype.setMap=X.prototype.setMap;X.prototype.setSource=X.prototype.rd;
X.prototype.getExtent=X.prototype.D;X.prototype.getMaxResolution=X.prototype.tc;X.prototype.getMinResolution=X.prototype.uc;X.prototype.getOpacity=X.prototype.La;X.prototype.getVisible=X.prototype.lb;X.prototype.getZIndex=X.prototype.Da;X.prototype.setExtent=X.prototype.Oc;X.prototype.setMaxResolution=X.prototype.Sc;X.prototype.setMinResolution=X.prototype.Tc;X.prototype.setOpacity=X.prototype.Pc;X.prototype.setVisible=X.prototype.ec;X.prototype.setZIndex=X.prototype.jc;X.prototype.get=X.prototype.get;
Patrick's avatar
Patrick committed
1093
1094
1095
1096
1097
X.prototype.getKeys=X.prototype.P;X.prototype.getProperties=X.prototype.L;X.prototype.set=X.prototype.set;X.prototype.setProperties=X.prototype.J;X.prototype.unset=X.prototype.S;X.prototype.changed=X.prototype.u;X.prototype.dispatchEvent=X.prototype.b;X.prototype.getRevision=X.prototype.M;X.prototype.on=X.prototype.H;X.prototype.once=X.prototype.once;X.prototype.un=X.prototype.K;wl.prototype.setMap=wl.prototype.setMap;wl.prototype.setSource=wl.prototype.rd;wl.prototype.getExtent=wl.prototype.D;
wl.prototype.getMaxResolution=wl.prototype.tc;wl.prototype.getMinResolution=wl.prototype.uc;wl.prototype.getOpacity=wl.prototype.La;wl.prototype.getVisible=wl.prototype.lb;wl.prototype.getZIndex=wl.prototype.Da;wl.prototype.setExtent=wl.prototype.Oc;wl.prototype.setMaxResolution=wl.prototype.Sc;wl.prototype.setMinResolution=wl.prototype.Tc;wl.prototype.setOpacity=wl.prototype.Pc;wl.prototype.setVisible=wl.prototype.ec;wl.prototype.setZIndex=wl.prototype.jc;wl.prototype.get=wl.prototype.get;
wl.prototype.getKeys=wl.prototype.P;wl.prototype.getProperties=wl.prototype.L;wl.prototype.set=wl.prototype.set;wl.prototype.setProperties=wl.prototype.J;wl.prototype.unset=wl.prototype.S;wl.prototype.changed=wl.prototype.u;wl.prototype.dispatchEvent=wl.prototype.b;wl.prototype.getRevision=wl.prototype.M;wl.prototype.on=wl.prototype.H;wl.prototype.once=wl.prototype.once;wl.prototype.un=wl.prototype.K;Xh.prototype.setMap=Xh.prototype.setMap;Xh.prototype.setSource=Xh.prototype.rd;
Xh.prototype.getExtent=Xh.prototype.D;Xh.prototype.getMaxResolution=Xh.prototype.tc;Xh.prototype.getMinResolution=Xh.prototype.uc;Xh.prototype.getOpacity=Xh.prototype.La;Xh.prototype.getVisible=Xh.prototype.lb;Xh.prototype.getZIndex=Xh.prototype.Da;Xh.prototype.setExtent=Xh.prototype.Oc;Xh.prototype.setMaxResolution=Xh.prototype.Sc;Xh.prototype.setMinResolution=Xh.prototype.Tc;Xh.prototype.setOpacity=Xh.prototype.Pc;Xh.prototype.setVisible=Xh.prototype.ec;Xh.prototype.setZIndex=Xh.prototype.jc;
Xh.prototype.get=Xh.prototype.get;Xh.prototype.getKeys=Xh.prototype.P;Xh.prototype.getProperties=Xh.prototype.L;Xh.prototype.set=Xh.prototype.set;Xh.prototype.setProperties=Xh.prototype.J;Xh.prototype.unset=Xh.prototype.S;Xh.prototype.changed=Xh.prototype.u;Xh.prototype.dispatchEvent=Xh.prototype.b;Xh.prototype.getRevision=Xh.prototype.M;Xh.prototype.on=Xh.prototype.H;Xh.prototype.once=Xh.prototype.once;Xh.prototype.un=Xh.prototype.K;Y.prototype.getSource=Y.prototype.ba;Y.prototype.getStyle=Y.prototype.B;
Patrick's avatar
Patrick committed
1098
1099
Y.prototype.getStyleFunction=Y.prototype.G;Y.prototype.setStyle=Y.prototype.f;Y.prototype.setMap=Y.prototype.setMap;Y.prototype.setSource=Y.prototype.rd;Y.prototype.getExtent=Y.prototype.D;Y.prototype.getMaxResolution=Y.prototype.tc;Y.prototype.getMinResolution=Y.prototype.uc;Y.prototype.getOpacity=Y.prototype.La;Y.prototype.getVisible=Y.prototype.lb;Y.prototype.getZIndex=Y.prototype.Da;Y.prototype.setExtent=Y.prototype.Oc;Y.prototype.setMaxResolution=Y.prototype.Sc;Y.prototype.setMinResolution=Y.prototype.Tc;
Y.prototype.setOpacity=Y.prototype.Pc;Y.prototype.setVisible=Y.prototype.ec;Y.prototype.setZIndex=Y.prototype.jc;Y.prototype.get=Y.prototype.get;Y.prototype.getKeys=Y.prototype.P;Y.prototype.getProperties=Y.prototype.L;Y.prototype.set=Y.prototype.set;Y.prototype.setProperties=Y.prototype.J;Y.prototype.unset=Y.prototype.S;Y.prototype.changed=Y.prototype.u;Y.prototype.dispatchEvent=Y.prototype.b;Y.prototype.getRevision=Y.prototype.M;Y.prototype.on=Y.prototype.H;Y.prototype.once=Y.prototype.once;
Patrick's avatar
Patrick committed
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
Y.prototype.un=Y.prototype.K;vn.prototype.get=vn.prototype.get;vn.prototype.getKeys=vn.prototype.P;vn.prototype.getProperties=vn.prototype.L;vn.prototype.set=vn.prototype.set;vn.prototype.setProperties=vn.prototype.J;vn.prototype.unset=vn.prototype.S;vn.prototype.changed=vn.prototype.u;vn.prototype.dispatchEvent=vn.prototype.b;vn.prototype.getRevision=vn.prototype.M;vn.prototype.on=vn.prototype.H;vn.prototype.once=vn.prototype.once;vn.prototype.un=vn.prototype.K;zn.prototype.getActive=zn.prototype.c;
zn.prototype.getMap=zn.prototype.i;zn.prototype.setActive=zn.prototype.Na;zn.prototype.get=zn.prototype.get;zn.prototype.getKeys=zn.prototype.P;zn.prototype.getProperties=zn.prototype.L;zn.prototype.set=zn.prototype.set;zn.prototype.setProperties=zn.prototype.J;zn.prototype.unset=zn.prototype.S;zn.prototype.changed=zn.prototype.u;zn.prototype.dispatchEvent=zn.prototype.b;zn.prototype.getRevision=zn.prototype.M;zn.prototype.on=zn.prototype.H;zn.prototype.once=zn.prototype.once;zn.prototype.un=zn.prototype.K;
Hw.prototype.getActive=Hw.prototype.c;Hw.prototype.getMap=Hw.prototype.i;Hw.prototype.setActive=Hw.prototype.Na;Hw.prototype.get=Hw.prototype.get;Hw.prototype.getKeys=Hw.prototype.P;Hw.prototype.getProperties=Hw.prototype.L;Hw.prototype.set=Hw.prototype.set;Hw.prototype.setProperties=Hw.prototype.J;Hw.prototype.unset=Hw.prototype.S;Hw.prototype.changed=Hw.prototype.u;Hw.prototype.dispatchEvent=Hw.prototype.b;Hw.prototype.getRevision=Hw.prototype.M;Hw.prototype.on=Hw.prototype.H;
Hw.prototype.once=Hw.prototype.once;Hw.prototype.un=Hw.prototype.K;Kw.prototype.type=Kw.prototype.type;Kw.prototype.target=Kw.prototype.target;Kw.prototype.preventDefault=Kw.prototype.preventDefault;Kw.prototype.stopPropagation=Kw.prototype.stopPropagation;Kn.prototype.getActive=Kn.prototype.c;Kn.prototype.getMap=Kn.prototype.i;Kn.prototype.setActive=Kn.prototype.Na;Kn.prototype.get=Kn.prototype.get;Kn.prototype.getKeys=Kn.prototype.P;Kn.prototype.getProperties=Kn.prototype.L;Kn.prototype.set=Kn.prototype.set;
Kn.prototype.setProperties=Kn.prototype.J;Kn.prototype.unset=Kn.prototype.S;Kn.prototype.changed=Kn.prototype.u;Kn.prototype.dispatchEvent=Kn.prototype.b;Kn.prototype.getRevision=Kn.prototype.M;Kn.prototype.on=Kn.prototype.H;Kn.prototype.once=Kn.prototype.once;Kn.prototype.un=Kn.prototype.K;Yn.prototype.getActive=Yn.prototype.c;Yn.prototype.getMap=Yn.prototype.i;Yn.prototype.setActive=Yn.prototype.Na;Yn.prototype.get=Yn.prototype.get;Yn.prototype.getKeys=Yn.prototype.P;
Yn.prototype.getProperties=Yn.prototype.L;Yn.prototype.set=Yn.prototype.set;Yn.prototype.setProperties=Yn.prototype.J;Yn.prototype.unset=Yn.prototype.S;Yn.prototype.changed=Yn.prototype.u;Yn.prototype.dispatchEvent=Yn.prototype.b;Yn.prototype.getRevision=Yn.prototype.M;Yn.prototype.on=Yn.prototype.H;Yn.prototype.once=Yn.prototype.once;Yn.prototype.un=Yn.prototype.K;co.prototype.type=co.prototype.type;co.prototype.target=co.prototype.target;co.prototype.preventDefault=co.prototype.preventDefault;
co.prototype.stopPropagation=co.prototype.stopPropagation;Nn.prototype.getActive=Nn.prototype.c;Nn.prototype.getMap=Nn.prototype.i;Nn.prototype.setActive=Nn.prototype.Na;Nn.prototype.get=Nn.prototype.get;Nn.prototype.getKeys=Nn.prototype.P;Nn.prototype.getProperties=Nn.prototype.L;Nn.prototype.set=Nn.prototype.set;Nn.prototype.setProperties=Nn.prototype.J;Nn.prototype.unset=Nn.prototype.S;Nn.prototype.changed=Nn.prototype.u;Nn.prototype.dispatchEvent=Nn.prototype.b;Nn.prototype.getRevision=Nn.prototype.M;
Nn.prototype.on=Nn.prototype.H;Nn.prototype.once=Nn.prototype.once;Nn.prototype.un=Nn.prototype.K;Rn.prototype.getActive=Rn.prototype.c;Rn.prototype.getMap=Rn.prototype.i;Rn.prototype.setActive=Rn.prototype.Na;Rn.prototype.get=Rn.prototype.get;Rn.prototype.getKeys=Rn.prototype.P;Rn.prototype.getProperties=Rn.prototype.L;Rn.prototype.set=Rn.prototype.set;Rn.prototype.setProperties=Rn.prototype.J;Rn.prototype.unset=Rn.prototype.S;Rn.prototype.changed=Rn.prototype.u;Rn.prototype.dispatchEvent=Rn.prototype.b;
Rn.prototype.getRevision=Rn.prototype.M;Rn.prototype.on=Rn.prototype.H;Rn.prototype.once=Rn.prototype.once;Rn.prototype.un=Rn.prototype.K;Mw.prototype.getActive=Mw.prototype.c;Mw.prototype.getMap=Mw.prototype.i;Mw.prototype.setActive=Mw.prototype.Na;Mw.prototype.get=Mw.prototype.get;Mw.prototype.getKeys=Mw.prototype.P;Mw.prototype.getProperties=Mw.prototype.L;Mw.prototype.set=Mw.prototype.set;Mw.prototype.setProperties=Mw.prototype.J;Mw.prototype.unset=Mw.prototype.S;Mw.prototype.changed=Mw.prototype.u;
Mw.prototype.dispatchEvent=Mw.prototype.b;Mw.prototype.getRevision=Mw.prototype.M;Mw.prototype.on=Mw.prototype.H;Mw.prototype.once=Mw.prototype.once;Mw.prototype.un=Mw.prototype.K;ho.prototype.getGeometry=ho.prototype.V;ho.prototype.getActive=ho.prototype.c;ho.prototype.getMap=ho.prototype.i;ho.prototype.setActive=ho.prototype.Na;ho.prototype.get=ho.prototype.get;ho.prototype.getKeys=ho.prototype.P;ho.prototype.getProperties=ho.prototype.L;ho.prototype.set=ho.prototype.set;
ho.prototype.setProperties=ho.prototype.J;ho.prototype.unset=ho.prototype.S;ho.prototype.changed=ho.prototype.u;ho.prototype.dispatchEvent=ho.prototype.b;ho.prototype.getRevision=ho.prototype.M;ho.prototype.on=ho.prototype.H;ho.prototype.once=ho.prototype.once;ho.prototype.un=ho.prototype.K;Qw.prototype.getActive=Qw.prototype.c;Qw.prototype.getMap=Qw.prototype.i;Qw.prototype.setActive=Qw.prototype.Na;Qw.prototype.get=Qw.prototype.get;Qw.prototype.getKeys=Qw.prototype.P;
Qw.prototype.getProperties=Qw.prototype.L;Qw.prototype.set=Qw.prototype.set;Qw.prototype.setProperties=Qw.prototype.J;Qw.prototype.unset=Qw.prototype.S;Qw.prototype.changed=Qw.prototype.u;Qw.prototype.dispatchEvent=Qw.prototype.b;Qw.prototype.getRevision=Qw.prototype.M;Qw.prototype.on=Qw.prototype.H;Qw.prototype.once=Qw.prototype.once;Qw.prototype.un=Qw.prototype.K;fx.prototype.type=fx.prototype.type;fx.prototype.target=fx.prototype.target;fx.prototype.preventDefault=fx.prototype.preventDefault;
fx.prototype.stopPropagation=fx.prototype.stopPropagation;gx.prototype.getActive=gx.prototype.c;gx.prototype.getMap=gx.prototype.i;gx.prototype.setActive=gx.prototype.Na;gx.prototype.get=gx.prototype.get;gx.prototype.getKeys=gx.prototype.P;gx.prototype.getProperties=gx.prototype.L;gx.prototype.set=gx.prototype.set;gx.prototype.setProperties=gx.prototype.J;gx.prototype.unset=gx.prototype.S;gx.prototype.changed=gx.prototype.u;gx.prototype.dispatchEvent=gx.prototype.b;gx.prototype.getRevision=gx.prototype.M;
gx.prototype.on=gx.prototype.H;gx.prototype.once=gx.prototype.once;gx.prototype.un=gx.prototype.K;rx.prototype.type=rx.prototype.type;rx.prototype.target=rx.prototype.target;rx.prototype.preventDefault=rx.prototype.preventDefault;rx.prototype.stopPropagation=rx.prototype.stopPropagation;io.prototype.getActive=io.prototype.c;io.prototype.getMap=io.prototype.i;io.prototype.setActive=io.prototype.Na;io.prototype.get=io.prototype.get;io.prototype.getKeys=io.prototype.P;io.prototype.getProperties=io.prototype.L;
io.prototype.set=io.prototype.set;io.prototype.setProperties=io.prototype.J;io.prototype.unset=io.prototype.S;io.prototype.changed=io.prototype.u;io.prototype.dispatchEvent=io.prototype.b;io.prototype.getRevision=io.prototype.M;io.prototype.on=io.prototype.H;io.prototype.once=io.prototype.once;io.prototype.un=io.prototype.K;ko.prototype.getActive=ko.prototype.c;ko.prototype.getMap=ko.prototype.i;ko.prototype.setActive=ko.prototype.Na;ko.prototype.get=ko.prototype.get;ko.prototype.getKeys=ko.prototype.P;
ko.prototype.getProperties=ko.prototype.L;ko.prototype.set=ko.prototype.set;ko.prototype.setProperties=ko.prototype.J;ko.prototype.unset=ko.prototype.S;ko.prototype.changed=ko.prototype.u;ko.prototype.dispatchEvent=ko.prototype.b;ko.prototype.getRevision=ko.prototype.M;ko.prototype.on=ko.prototype.H;ko.prototype.once=ko.prototype.once;ko.prototype.un=ko.prototype.K;tx.prototype.getActive=tx.prototype.c;tx.prototype.getMap=tx.prototype.i;tx.prototype.setActive=tx.prototype.Na;tx.prototype.get=tx.prototype.get;
tx.prototype.getKeys=tx.prototype.P;tx.prototype.getProperties=tx.prototype.L;tx.prototype.set=tx.prototype.set;tx.prototype.setProperties=tx.prototype.J;tx.prototype.unset=tx.prototype.S;tx.prototype.changed=tx.prototype.u;tx.prototype.dispatchEvent=tx.prototype.b;tx.prototype.getRevision=tx.prototype.M;tx.prototype.on=tx.prototype.H;tx.prototype.once=tx.prototype.once;tx.prototype.un=tx.prototype.K;Bx.prototype.type=Bx.prototype.type;Bx.prototype.target=Bx.prototype.target;
Bx.prototype.preventDefault=Bx.prototype.preventDefault;Bx.prototype.stopPropagation=Bx.prototype.stopPropagation;mo.prototype.getActive=mo.prototype.c;mo.prototype.getMap=mo.prototype.i;mo.prototype.setActive=mo.prototype.Na;mo.prototype.get=mo.prototype.get;mo.prototype.getKeys=mo.prototype.P;mo.prototype.getProperties=mo.prototype.L;mo.prototype.set=mo.prototype.set;mo.prototype.setProperties=mo.prototype.J;mo.prototype.unset=mo.prototype.S;mo.prototype.changed=mo.prototype.u;
mo.prototype.dispatchEvent=mo.prototype.b;mo.prototype.getRevision=mo.prototype.M;mo.prototype.on=mo.prototype.H;mo.prototype.once=mo.prototype.once;mo.prototype.un=mo.prototype.K;qo.prototype.getActive=qo.prototype.c;qo.prototype.getMap=qo.prototype.i;qo.prototype.setActive=qo.prototype.Na;qo.prototype.get=qo.prototype.get;qo.prototype.getKeys=qo.prototype.P;qo.prototype.getProperties=qo.prototype.L;qo.prototype.set=qo.prototype.set;qo.prototype.setProperties=qo.prototype.J;qo.prototype.unset=qo.prototype.S;
qo.prototype.changed=qo.prototype.u;qo.prototype.dispatchEvent=qo.prototype.b;qo.prototype.getRevision=qo.prototype.M;qo.prototype.on=qo.prototype.H;qo.prototype.once=qo.prototype.once;qo.prototype.un=qo.prototype.K;uo.prototype.getActive=uo.prototype.c;uo.prototype.getMap=uo.prototype.i;uo.prototype.setActive=uo.prototype.Na;uo.prototype.get=uo.prototype.get;uo.prototype.getKeys=uo.prototype.P;uo.prototype.getProperties=uo.prototype.L;uo.prototype.set=uo.prototype.set;
uo.prototype.setProperties=uo.prototype.J;uo.prototype.unset=uo.prototype.S;uo.prototype.changed=uo.prototype.u;uo.prototype.dispatchEvent=uo.prototype.b;uo.prototype.getRevision=uo.prototype.M;uo.prototype.on=uo.prototype.H;uo.prototype.once=uo.prototype.once;uo.prototype.un=uo.prototype.K;Jx.prototype.getActive=Jx.prototype.c;Jx.prototype.getMap=Jx.prototype.i;Jx.prototype.setActive=Jx.prototype.Na;Jx.prototype.get=Jx.prototype.get;Jx.prototype.getKeys=Jx.prototype.P;
Jx.prototype.getProperties=Jx.prototype.L;Jx.prototype.set=Jx.prototype.set;Jx.prototype.setProperties=Jx.prototype.J;Jx.prototype.unset=Jx.prototype.S;Jx.prototype.changed=Jx.prototype.u;Jx.prototype.dispatchEvent=Jx.prototype.b;Jx.prototype.getRevision=Jx.prototype.M;Jx.prototype.on=Jx.prototype.H;Jx.prototype.once=Jx.prototype.once;Jx.prototype.un=Jx.prototype.K;Mx.prototype.type=Mx.prototype.type;Mx.prototype.target=Mx.prototype.target;Mx.prototype.preventDefault=Mx.prototype.preventDefault;
Mx.prototype.stopPropagation=Mx.prototype.stopPropagation;Ox.prototype.getActive=Ox.prototype.c;Ox.prototype.getMap=Ox.prototype.i;Ox.prototype.setActive=Ox.prototype.Na;Ox.prototype.get=Ox.prototype.get;Ox.prototype.getKeys=Ox.prototype.P;Ox.prototype.getProperties=Ox.prototype.L;Ox.prototype.set=Ox.prototype.set;Ox.prototype.setProperties=Ox.prototype.J;Ox.prototype.unset=Ox.prototype.S;Ox.prototype.changed=Ox.prototype.u;Ox.prototype.dispatchEvent=Ox.prototype.b;Ox.prototype.getRevision=Ox.prototype.M;
Ox.prototype.on=Ox.prototype.H;Ox.prototype.once=Ox.prototype.once;Ox.prototype.un=Ox.prototype.K;Sx.prototype.getActive=Sx.prototype.c;Sx.prototype.getMap=Sx.prototype.i;Sx.prototype.setActive=Sx.prototype.Na;Sx.prototype.get=Sx.prototype.get;Sx.prototype.getKeys=Sx.prototype.P;Sx.prototype.getProperties=Sx.prototype.L;Sx.prototype.set=Sx.prototype.set;Sx.prototype.setProperties=Sx.prototype.J;Sx.prototype.unset=Sx.prototype.S;Sx.prototype.changed=Sx.prototype.u;Sx.prototype.dispatchEvent=Sx.prototype.b;
Sx.prototype.getRevision=Sx.prototype.M;Sx.prototype.on=Sx.prototype.H;Sx.prototype.once=Sx.prototype.once;Sx.prototype.un=Sx.prototype.K;Yx.prototype.type=Yx.prototype.type;Yx.prototype.target=Yx.prototype.target;Yx.prototype.preventDefault=Yx.prototype.preventDefault;Yx.prototype.stopPropagation=Yx.prototype.stopPropagation;Td.prototype.get=Td.prototype.get;Td.prototype.getKeys=Td.prototype.P;Td.prototype.getProperties=Td.prototype.L;Td.prototype.set=Td.prototype.set;
Td.prototype.setProperties=Td.prototype.J;Td.prototype.unset=Td.prototype.S;Td.prototype.changed=Td.prototype.u;Td.prototype.dispatchEvent=Td.prototype.b;Td.prototype.getRevision=Td.prototype.M;Td.prototype.on=Td.prototype.H;Td.prototype.once=Td.prototype.once;Td.prototype.un=Td.prototype.K;Wd.prototype.getClosestPoint=Wd.prototype.Fb;Wd.prototype.intersectsCoordinate=Wd.prototype.yb;Wd.prototype.getExtent=Wd.prototype.D;Wd.prototype.rotate=Wd.prototype.rotate;Wd.prototype.scale=Wd.prototype.scale;
Wd.prototype.simplify=Wd.prototype.Wb;Wd.prototype.transform=Wd.prototype.transform;Wd.prototype.get=Wd.prototype.get;Wd.prototype.getKeys=Wd.prototype.P;Wd.prototype.getProperties=Wd.prototype.L;Wd.prototype.set=Wd.prototype.set;Wd.prototype.setProperties=Wd.prototype.J;Wd.prototype.unset=Wd.prototype.S;Wd.prototype.changed=Wd.prototype.u;Wd.prototype.dispatchEvent=Wd.prototype.b;Wd.prototype.getRevision=Wd.prototype.M;Wd.prototype.on=Wd.prototype.H;Wd.prototype.once=Wd.prototype.once;
Wd.prototype.un=Wd.prototype.K;ww.prototype.getFirstCoordinate=ww.prototype.ac;ww.prototype.getLastCoordinate=ww.prototype.pc;ww.prototype.getLayout=ww.prototype.qc;ww.prototype.rotate=ww.prototype.rotate;ww.prototype.scale=ww.prototype.scale;ww.prototype.getClosestPoint=ww.prototype.Fb;ww.prototype.intersectsCoordinate=ww.prototype.yb;ww.prototype.getExtent=ww.prototype.D;ww.prototype.simplify=ww.prototype.Wb;ww.prototype.get=ww.prototype.get;ww.prototype.getKeys=ww.prototype.P;
ww.prototype.getProperties=ww.prototype.L;ww.prototype.set=ww.prototype.set;ww.prototype.setProperties=ww.prototype.J;ww.prototype.unset=ww.prototype.S;ww.prototype.changed=ww.prototype.u;ww.prototype.dispatchEvent=ww.prototype.b;ww.prototype.getRevision=ww.prototype.M;ww.prototype.on=ww.prototype.H;ww.prototype.once=ww.prototype.once;ww.prototype.un=ww.prototype.K;Eq.prototype.getClosestPoint=Eq.prototype.Fb;Eq.prototype.intersectsCoordinate=Eq.prototype.yb;Eq.prototype.getExtent=Eq.prototype.D;
Eq.prototype.rotate=Eq.prototype.rotate;Eq.prototype.scale=Eq.prototype.scale;Eq.prototype.simplify=Eq.prototype.Wb;Eq.prototype.transform=Eq.prototype.transform;Eq.prototype.get=Eq.prototype.get;Eq.prototype.getKeys=Eq.prototype.P;Eq.prototype.getProperties=Eq.prototype.L;Eq.prototype.set=Eq.prototype.set;Eq.prototype.setProperties=Eq.prototype.J;Eq.prototype.unset=Eq.prototype.S;Eq.prototype.changed=Eq.prototype.u;Eq.prototype.dispatchEvent=Eq.prototype.b;Eq.prototype.getRevision=Eq.prototype.M;
Eq.prototype.on=Eq.prototype.H;Eq.prototype.once=Eq.prototype.once;Eq.prototype.un=Eq.prototype.K;cl.prototype.getFirstCoordinate=cl.prototype.ac;cl.prototype.getLastCoordinate=cl.prototype.pc;cl.prototype.getLayout=cl.prototype.qc;cl.prototype.rotate=cl.prototype.rotate;cl.prototype.scale=cl.prototype.scale;cl.prototype.getClosestPoint=cl.prototype.Fb;cl.prototype.intersectsCoordinate=cl.prototype.yb;cl.prototype.getExtent=cl.prototype.D;cl.prototype.simplify=cl.prototype.Wb;
cl.prototype.transform=cl.prototype.transform;cl.prototype.get=cl.prototype.get;cl.prototype.getKeys=cl.prototype.P;cl.prototype.getProperties=cl.prototype.L;cl.prototype.set=cl.prototype.set;cl.prototype.setProperties=cl.prototype.J;cl.prototype.unset=cl.prototype.S;cl.prototype.changed=cl.prototype.u;cl.prototype.dispatchEvent=cl.prototype.b;cl.prototype.getRevision=cl.prototype.M;cl.prototype.on=cl.prototype.H;cl.prototype.once=cl.prototype.once;cl.prototype.un=cl.prototype.K;
Patrick's avatar
Patrick committed
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
K.prototype.getFirstCoordinate=K.prototype.ac;K.prototype.getLastCoordinate=K.prototype.pc;K.prototype.getLayout=K.prototype.qc;K.prototype.rotate=K.prototype.rotate;K.prototype.scale=K.prototype.scale;K.prototype.getClosestPoint=K.prototype.Fb;K.prototype.intersectsCoordinate=K.prototype.yb;K.prototype.getExtent=K.prototype.D;K.prototype.simplify=K.prototype.Wb;K.prototype.transform=K.prototype.transform;K.prototype.get=K.prototype.get;K.prototype.getKeys=K.prototype.P;
K.prototype.getProperties=K.prototype.L;K.prototype.set=K.prototype.set;K.prototype.setProperties=K.prototype.J;K.prototype.unset=K.prototype.S;K.prototype.changed=K.prototype.u;K.prototype.dispatchEvent=K.prototype.b;K.prototype.getRevision=K.prototype.M;K.prototype.on=K.prototype.H;K.prototype.once=K.prototype.once;K.prototype.un=K.prototype.K;R.prototype.getFirstCoordinate=R.prototype.ac;R.prototype.getLastCoordinate=R.prototype.pc;R.prototype.getLayout=R.prototype.qc;R.prototype.rotate=R.prototype.rotate;
R.prototype.scale=R.prototype.scale;R.prototype.getClosestPoint=R.prototype.Fb;R.prototype.intersectsCoordinate=R.prototype.yb;R.prototype.getExtent=R.prototype.D;R.prototype.simplify=R.prototype.Wb;R.prototype.transform=R.prototype.transform;R.prototype.get=R.prototype.get;R.prototype.getKeys=R.prototype.P;R.prototype.getProperties=R.prototype.L;R.prototype.set=R.prototype.set;R.prototype.setProperties=R.prototype.J;R.prototype.unset=R.prototype.S;R.prototype.changed=R.prototype.u;
R.prototype.dispatchEvent=R.prototype.b;R.prototype.getRevision=R.prototype.M;R.prototype.on=R.prototype.H;R.prototype.once=R.prototype.once;R.prototype.un=R.prototype.K;T.prototype.getFirstCoordinate=T.prototype.ac;T.prototype.getLastCoordinate=T.prototype.pc;T.prototype.getLayout=T.prototype.qc;T.prototype.rotate=T.prototype.rotate;T.prototype.scale=T.prototype.scale;T.prototype.getClosestPoint=T.prototype.Fb;T.prototype.intersectsCoordinate=T.prototype.yb;T.prototype.getExtent=T.prototype.D;
T.prototype.simplify=T.prototype.Wb;T.prototype.transform=T.prototype.transform;T.prototype.get=T.prototype.get;T.prototype.getKeys=T.prototype.P;T.prototype.getProperties=T.prototype.L;T.prototype.set=T.prototype.set;T.prototype.setProperties=T.prototype.J;T.prototype.unset=T.prototype.S;T.prototype.changed=T.prototype.u;T.prototype.dispatchEvent=T.prototype.b;T.prototype.getRevision=T.prototype.M;T.prototype.on=T.prototype.H;T.prototype.once=T.prototype.once;T.prototype.un=T.prototype.K;
U.prototype.getFirstCoordinate=U.prototype.ac;U.prototype.getLastCoordinate=U.prototype.pc;U.prototype.getLayout=U.prototype.qc;U.prototype.rotate=U.prototype.rotate;U.prototype.scale=U.prototype.scale;U.prototype.getClosestPoint=U.prototype.Fb;U.prototype.intersectsCoordinate=U.prototype.yb;U.prototype.getExtent=U.prototype.D;U.prototype.simplify=U.prototype.Wb;U.prototype.transform=U.prototype.transform;U.prototype.get=U.prototype.get;U.prototype.getKeys=U.prototype.P;
U.prototype.getProperties=U.prototype.L;U.prototype.set=U.prototype.set;U.prototype.setProperties=U.prototype.J;U.prototype.unset=U.prototype.S;U.prototype.changed=U.prototype.u;U.prototype.dispatchEvent=U.prototype.b;U.prototype.getRevision=U.prototype.M;U.prototype.on=U.prototype.H;U.prototype.once=U.prototype.once;U.prototype.un=U.prototype.K;L.prototype.getFirstCoordinate=L.prototype.ac;L.prototype.getLastCoordinate=L.prototype.pc;L.prototype.getLayout=L.prototype.qc;L.prototype.rotate=L.prototype.rotate;
L.prototype.scale=L.prototype.scale;L.prototype.getClosestPoint=L.prototype.Fb;L.prototype.intersectsCoordinate=L.prototype.yb;L.prototype.getExtent=L.prototype.D;L.prototype.simplify=L.prototype.Wb;L.prototype.transform=L.prototype.transform;L.prototype.get=L.prototype.get;L.prototype.getKeys=L.prototype.P;L.prototype.getProperties=L.prototype.L;L.prototype.set=L.prototype.set;L.prototype.setProperties=L.prototype.J;L.prototype.unset=L.prototype.S;L.prototype.changed=L.prototype.u;
L.prototype.dispatchEvent=L.prototype.b;L.prototype.getRevision=L.prototype.M;L.prototype.on=L.prototype.H;L.prototype.once=L.prototype.once;L.prototype.un=L.prototype.K;M.prototype.getFirstCoordinate=M.prototype.ac;M.prototype.getLastCoordinate=M.prototype.pc;M.prototype.getLayout=M.prototype.qc;M.prototype.rotate=M.prototype.rotate;M.prototype.scale=M.prototype.scale;M.prototype.getClosestPoint=M.prototype.Fb;M.prototype.intersectsCoordinate=M.prototype.yb;M.prototype.getExtent=M.prototype.D;
M.prototype.simplify=M.prototype.Wb;M.prototype.transform=M.prototype.transform;M.prototype.get=M.prototype.get;M.prototype.getKeys=M.prototype.P;M.prototype.getProperties=M.prototype.L;M.prototype.set=M.prototype.set;M.prototype.setProperties=M.prototype.J;M.prototype.unset=M.prototype.S;M.prototype.changed=M.prototype.u;M.prototype.dispatchEvent=M.prototype.b;M.prototype.getRevision=M.prototype.M;M.prototype.on=M.prototype.H;M.prototype.once=M.prototype.once;M.prototype.un=M.prototype.K;
Patrick's avatar
Patrick committed
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
W.prototype.readFeatures=W.prototype.Oa;Yp.prototype.writeFeatures=Yp.prototype.Xb;Yp.prototype.readFeatures=Yp.prototype.Oa;W.prototype.readFeatures=W.prototype.Oa;Nq.prototype.readFeatures=Nq.prototype.Oa;Vl.prototype.get=Vl.prototype.get;Vl.prototype.getKeys=Vl.prototype.P;Vl.prototype.getProperties=Vl.prototype.L;Vl.prototype.set=Vl.prototype.set;Vl.prototype.setProperties=Vl.prototype.J;Vl.prototype.unset=Vl.prototype.S;Vl.prototype.changed=Vl.prototype.u;Vl.prototype.dispatchEvent=Vl.prototype.b;
Vl.prototype.getRevision=Vl.prototype.M;Vl.prototype.on=Vl.prototype.H;Vl.prototype.once=Vl.prototype.once;Vl.prototype.un=Vl.prototype.K;Wl.prototype.getMap=Wl.prototype.i;Wl.prototype.setMap=Wl.prototype.setMap;Wl.prototype.setTarget=Wl.prototype.c;Wl.prototype.get=Wl.prototype.get;Wl.prototype.getKeys=Wl.prototype.P;Wl.prototype.getProperties=Wl.prototype.L;Wl.prototype.set=Wl.prototype.set;Wl.prototype.setProperties=Wl.prototype.J;Wl.prototype.unset=Wl.prototype.S;Wl.prototype.changed=Wl.prototype.u;
Wl.prototype.dispatchEvent=Wl.prototype.b;Wl.prototype.getRevision=Wl.prototype.M;Wl.prototype.on=Wl.prototype.H;Wl.prototype.once=Wl.prototype.once;Wl.prototype.un=Wl.prototype.K;fm.prototype.getMap=fm.prototype.i;fm.prototype.setMap=fm.prototype.setMap;fm.prototype.setTarget=fm.prototype.c;fm.prototype.get=fm.prototype.get;fm.prototype.getKeys=fm.prototype.P;fm.prototype.getProperties=fm.prototype.L;fm.prototype.set=fm.prototype.set;fm.prototype.setProperties=fm.prototype.J;fm.prototype.unset=fm.prototype.S;
fm.prototype.changed=fm.prototype.u;fm.prototype.dispatchEvent=fm.prototype.b;fm.prototype.getRevision=fm.prototype.M;fm.prototype.on=fm.prototype.H;fm.prototype.once=fm.prototype.once;fm.prototype.un=fm.prototype.K;km.prototype.getMap=km.prototype.i;km.prototype.setMap=km.prototype.setMap;km.prototype.setTarget=km.prototype.c;km.prototype.get=km.prototype.get;km.prototype.getKeys=km.prototype.P;km.prototype.getProperties=km.prototype.L;km.prototype.set=km.prototype.set;
km.prototype.setProperties=km.prototype.J;km.prototype.unset=km.prototype.S;km.prototype.changed=km.prototype.u;km.prototype.dispatchEvent=km.prototype.b;km.prototype.getRevision=km.prototype.M;km.prototype.on=km.prototype.H;km.prototype.once=km.prototype.once;km.prototype.un=km.prototype.K;Xo.prototype.getMap=Xo.prototype.i;Xo.prototype.setMap=Xo.prototype.setMap;Xo.prototype.setTarget=Xo.prototype.c;Xo.prototype.get=Xo.prototype.get;Xo.prototype.getKeys=Xo.prototype.P;
Xo.prototype.getProperties=Xo.prototype.L;Xo.prototype.set=Xo.prototype.set;Xo.prototype.setProperties=Xo.prototype.J;Xo.prototype.unset=Xo.prototype.S;Xo.prototype.changed=Xo.prototype.u;Xo.prototype.dispatchEvent=Xo.prototype.b;Xo.prototype.getRevision=Xo.prototype.M;Xo.prototype.on=Xo.prototype.H;Xo.prototype.once=Xo.prototype.once;Xo.prototype.un=Xo.prototype.K;bm.prototype.getMap=bm.prototype.i;bm.prototype.setMap=bm.prototype.setMap;bm.prototype.setTarget=bm.prototype.c;bm.prototype.get=bm.prototype.get;
bm.prototype.getKeys=bm.prototype.P;bm.prototype.getProperties=bm.prototype.L;bm.prototype.set=bm.prototype.set;bm.prototype.setProperties=bm.prototype.J;bm.prototype.unset=bm.prototype.S;bm.prototype.changed=bm.prototype.u;bm.prototype.dispatchEvent=bm.prototype.b;bm.prototype.getRevision=bm.prototype.M;bm.prototype.on=bm.prototype.H;bm.prototype.once=bm.prototype.once;bm.prototype.un=bm.prototype.K;bp.prototype.getMap=bp.prototype.i;bp.prototype.setMap=bp.prototype.setMap;
bp.prototype.setTarget=bp.prototype.c;bp.prototype.get=bp.prototype.get;bp.prototype.getKeys=bp.prototype.P;bp.prototype.getProperties=bp.prototype.L;bp.prototype.set=bp.prototype.set;bp.prototype.setProperties=bp.prototype.J;bp.prototype.unset=bp.prototype.S;bp.prototype.changed=bp.prototype.u;bp.prototype.dispatchEvent=bp.prototype.b;bp.prototype.getRevision=bp.prototype.M;bp.prototype.on=bp.prototype.H;bp.prototype.once=bp.prototype.once;bp.prototype.un=bp.prototype.K;dm.prototype.getMap=dm.prototype.i;
dm.prototype.setMap=dm.prototype.setMap;dm.prototype.setTarget=dm.prototype.c;dm.prototype.get=dm.prototype.get;dm.prototype.getKeys=dm.prototype.P;dm.prototype.getProperties=dm.prototype.L;dm.prototype.set=dm.prototype.set;dm.prototype.setProperties=dm.prototype.J;dm.prototype.unset=dm.prototype.S;dm.prototype.changed=dm.prototype.u;dm.prototype.dispatchEvent=dm.prototype.b;dm.prototype.getRevision=dm.prototype.M;dm.prototype.on=dm.prototype.H;dm.prototype.once=dm.prototype.once;
dm.prototype.un=dm.prototype.K;gp.prototype.getMap=gp.prototype.i;gp.prototype.setMap=gp.prototype.setMap;gp.prototype.setTarget=gp.prototype.c;gp.prototype.get=gp.prototype.get;gp.prototype.getKeys=gp.prototype.P;gp.prototype.getProperties=gp.prototype.L;gp.prototype.set=gp.prototype.set;gp.prototype.setProperties=gp.prototype.J;gp.prototype.unset=gp.prototype.S;gp.prototype.changed=gp.prototype.u;gp.prototype.dispatchEvent=gp.prototype.b;gp.prototype.getRevision=gp.prototype.M;gp.prototype.on=gp.prototype.H;
gp.prototype.once=gp.prototype.once;gp.prototype.un=gp.prototype.K;lp.prototype.getMap=lp.prototype.i;lp.prototype.setMap=lp.prototype.setMap;lp.prototype.setTarget=lp.prototype.c;lp.prototype.get=lp.prototype.get;lp.prototype.getKeys=lp.prototype.P;lp.prototype.getProperties=lp.prototype.L;lp.prototype.set=lp.prototype.set;lp.prototype.setProperties=lp.prototype.J;lp.prototype.unset=lp.prototype.S;lp.prototype.changed=lp.prototype.u;lp.prototype.dispatchEvent=lp.prototype.b;
lp.prototype.getRevision=lp.prototype.M;lp.prototype.on=lp.prototype.H;lp.prototype.once=lp.prototype.once;lp.prototype.un=lp.prototype.K;yl.prototype.csAddBillboard=yl.prototype.jg;yl.prototype.olCircleGeometryToCesium=yl.prototype.Dg;yl.prototype.olLineStringGeometryToCesium=yl.prototype.se;yl.prototype.olPolygonGeometryToCesium=yl.prototype.jf;yl.prototype.getAllowPicking=yl.prototype.Cd;yl.prototype.getHeightReference=yl.prototype.bc;yl.prototype.getClassificationType=yl.prototype.We;
yl.prototype.olPointGeometryToCesium=yl.prototype.te;yl.prototype.olMultiGeometryToCesium=yl.prototype.Fg;yl.prototype.olGeometry4326TextPartToCesium=yl.prototype.Eg;yl.prototype.olStyleToCesium=yl.prototype.ue;yl.prototype.computePlainStyle=yl.prototype.Yd;yl.prototype.olFeatureToCesium=yl.prototype.fd;yl.prototype.olVectorLayerToCesium=yl.prototype.kf;yl.prototype.convert=yl.prototype.convert;}).call(this);
Patrick's avatar
Patrick committed
1155
1156

!function(t,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):t.proj4=s()}(this,function(){"use strict";function t(t,s){if(t[s])return t[s];for(var i,a=Object.keys(t),h=s.toLowerCase().replace(dt,""),e=-1;++e<a.length;)if(i=a[e],i.toLowerCase().replace(dt,"")===h)return t[i]}function s(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=_t}function i(t){return new s(t).output()}function a(t,s,i){Array.isArray(s)&&(i.unshift(s),s=null);var a=s?{}:t,e=i.reduce(function(t,s){return h(s,t),t},a);s&&(t[s]=e)}function h(t,s){if(Array.isArray(t)){var i=t.shift();if("PARAMETER"===i&&(i=t.shift()),1===t.length)return Array.isArray(t[0])?(s[i]={},void h(t[0],s[i])):void(s[i]=t[0]);if(t.length)if("TOWGS84"!==i){Array.isArray(i)||(s[i]={});var e;switch(i){case"UNIT":case"PRIMEM":case"VERT_DATUM":return s[i]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&h(t[2],s[i]));case"SPHEROID":case"ELLIPSOID":return s[i]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&h(t[3],s[i]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return t[0]=["name",t[0]],void a(s,i,t);default:for(e=-1;++e<t.length;)if(!Array.isArray(t[e]))return h(t,s[i]);return a(s,i,t)}}else s[i]=t;else s[i]=!0}else s[t]=!0}function e(t,s){var i=s[0],a=s[1];!(i in t)&&a in t&&(t[i]=t[a],3===s.length&&(t[i]=s[2](t[i])))}function n(t){return t*At}function r(t){function s(s){return s*(t.to_meter||1)}"GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):"object"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var i=t.GEOGCS;"GEOGCS"===t.type&&(i=t),i&&(i.DATUM?t.datumCode=i.DATUM.name.toLowerCase():t.datumCode=i.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==t.datumCode&&"new_zealand_1949"!==t.datumCode||(t.datumCode="nzgd49"),"wgs_1984"===t.datumCode&&("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"_ferro"===t.datumCode.slice(-6)&&(t.datumCode=t.datumCode.slice(0,-6)),"_jakarta"===t.datumCode.slice(-8)&&(t.datumCode=t.datumCode.slice(0,-8)),~t.datumCode.indexOf("belge")&&(t.datumCode="rnb72"),i.DATUM&&i.DATUM.SPHEROID&&(t.ellps=i.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=i.DATUM.SPHEROID.a,t.rf=parseFloat(i.DATUM.SPHEROID.rf,10)),i.DATUM&&i.DATUM.TOWGS84&&(t.datum_params=i.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a);[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_2","Standard_Parallel_2"],["false_easting","False_Easting"],["false_northing","False_Northing"],["central_meridian","Central_Meridian"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",n],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",n],["x0","false_easting",s],["y0","false_northing",s],["long0","central_meridian",n],["lat0","latitude_of_origin",n],["lat0","standard_parallel_1",n],["lat1","standard_parallel_1",n],["lat2","standard_parallel_2",n],["azimuth","Azimuth"],["alpha","azimuth",n],["srsCode","name"]].forEach(function(s){return e(t,s)}),t.long0||!t.longc||"Albers_Conic_Equal_Area"!==t.projName&&"Lambert_Azimuthal_Equal_Area"!==t.projName||(t.long0=t.longc),t.lat_ts||!t.lat1||"Stereographic_South_Pole"!==t.projName&&"Polar Stereographic (variant B)"!==t.projName||(t.lat0=n(t.lat1>0?90:-90),t.lat_ts=t.lat1)}function o(t){var s=this;if(2===arguments.length){var i=arguments[1];"string"==typeof i?"+"===i.charAt(0)?o[t]=yt(arguments[1]):o[t]=Ct(arguments[1]):o[t]=i}else if(1===arguments.length){if(Array.isArray(t))return t.map(function(t){Array.isArray(t)?o.apply(s,t):o(t)});if("string"==typeof t){if(t in o)return o[t]}else"EPSG"in t?o["EPSG:"+t.EPSG]=t:"ESRI"in t?o["ESRI:"+t.ESRI]=t:"IAU2000"in t?o["IAU2000:"+t.IAU2000]=t:console.log(t);return}}function l(t){return"string"==typeof t}function M(t){return t in o}function c(t){return Et.some(function(s){return t.indexOf(s)>-1})}function u(s){var i=t(s,"authority");if(i){var a=t(i,"epsg");return a&&Pt.indexOf(a)>-1}}function f(s){var i=t(s,"extension");if(i)return t(i,"proj4")}function m(t){return"+"===t[0]}function p(t){if(!l(t))return t;if(M(t))return o[t];if(c(t)){var s=Ct(t);if(u(s))return o["EPSG:3857"];var i=f(s);return i?yt(i):s}return m(t)?yt(t):void 0}function d(t){return t}function y(t,s){var i=Tt.length;return t.names?(Tt[i]=t,t.names.forEach(function(t){Gt[t.toLowerCase()]=i}),this):(console.log(s),!0)}function _(t,s,i,a){var h=t*t,e=s*s,n=(h-e)/h,r=0;return a?(h=(t*=1-n*(et+n*(nt+n*rt)))*t,n=0):r=Math.sqrt(n),{es:n,e:r,ep2:(h-e)/e}}function x(s,i,a,h,e){if(!s){var n=t(Lt,h);n||(n=zt),s=n.a,i=n.b,a=n.rf}return a&&!i&&(i=(1-1/a)*s),(0===a||Math.abs(s-i)<ot)&&(e=!0,i=s),{a:s,b:i,rf:a,sphere:e}}function v(t,s,i,a,h,e){var n={};return n.datum_type=void 0===t||"none"===t?it:st,s&&(n.datum_params=s.map(parseFloat),0===n.datum_params[0]&&0===n.datum_params[1]&&0===n.datum_params[2]||(n.datum_type=$),n.datum_params.length>3&&(0===n.datum_params[3]&&0===n.datum_params[4]&&0===n.datum_params[5]&&0===n.datum_params[6]||(n.datum_type=tt,n.datum_params[3]*=at,n.datum_params[4]*=at,n.datum_params[5]*=at,n.datum_params[6]=n.datum_params[6]/1e6+1))),n.a=i,n.b=a,n.es=h,n.ep2=e,n}function Projection(s,i){if(!(this instanceof Projection))return new Projection(s);i=i||function(t){if(t)throw t};var a=p(s);if("object"==typeof a){var h=Projection.projections.get(a.projName);if(h){if(a.datumCode&&"none"!==a.datumCode){var e=t(Dt,a.datumCode);e&&(a.datum_params=e.towgs84?e.towgs84.split(","):null,a.ellps=e.ellipse,a.datumName=e.datumName?e.datumName:a.datumCode)}a.k0=a.k0||1,a.axis=a.axis||"enu",a.ellps=a.ellps||"wgs84";var n=x(a.a,a.b,a.rf,a.ellps,a.sphere),r=_(n.a,n.b,n.rf,a.R_A),o=a.datum||v(a.datumCode,a.datum_params,n.a,n.b,r.es,r.ep2);Nt(this,a),Nt(this,h),this.a=n.a,this.b=n.b,this.rf=n.rf,this.sphere=n.sphere,this.es=r.es,this.e=r.e,this.ep2=r.ep2,this.datum=o,this.init(),i(null,this)}else i(s)}else i(s)}function g(t,s){return t.datum_type===s.datum_type&&(!(t.a!==s.a||Math.abs(t.es-s.es)>5e-11)&&(t.datum_type===$?t.datum_params[0]===s.datum_params[0]&&t.datum_params[1]===s.datum_params[1]&&t.datum_params[2]===s.datum_params[2]:t.datum_type!==tt||t.datum_params[0]===s.datum_params[0]&&t.datum_params[1]===s.datum_params[1]&&t.datum_params[2]===s.datum_params[2]&&t.datum_params[3]===s.datum_params[3]&&t.datum_params[4]===s.datum_params[4]&&t.datum_params[5]===s.datum_params[5]&&t.datum_params[6]===s.datum_params[6]))}function b(t,s,i){var a,h,e,n,r=t.x,o=t.y,l=t.z?t.z:0;if(o<-ht&&o>-1.001*ht)o=-ht;else if(o>ht&&o<1.001*ht)o=ht;else{if(o<-ht)return{x:-1/0,y:-1/0,z:t.z};if(o>ht)return{x:1/0,y:1/0,z:t.z}}return r>Math.PI&&(r-=2*Math.PI),h=Math.sin(o),n=Math.cos(o),e=h*h,a=i/Math.sqrt(1-s*e),{x:(a+l)*n*Math.cos(r),y:(a+l)*n*Math.sin(r),z:(a*(1-s)+l)*h}}function w(t,s,i,a){var h,e,n,r,o,l,M,c,u,f,m,p,d,y,_,x,v=t.x,g=t.y,b=t.z?t.z:0;if(h=Math.sqrt(v*v+g*g),e=Math.sqrt(v*v+g*g+b*b),h/i<1e-12){if(y=0,e/i<1e-12)return _=ht,x=-a,{x:t.x,y:t.y,z:t.z}}else y=Math.atan2(g,v);n=b/e,c=(r=h/e)*(1-s)*(o=1/Math.sqrt(1-s*(2-s)*r*r)),u=n*o,d=0;do{d++,l=s*(M=i/Math.sqrt(1-s*u*u))/(M+(x=h*c+b*u-M*(1-s*u*u))),p=(m=n*(o=1/Math.sqrt(1-l*(2-l)*r*r)))*c-(f=r*(1-l)*o)*u,c=f,u=m}while(p*p>1e-24&&d<30);return _=Math.atan(m/Math.abs(f)),{x:y,y:_,z:x}}function A(t,s,i){if(s===$)return{x:t.x+i[0],y:t.y+i[1],z:t.z+i[2]};if(s===tt){var a=i[0],h=i[1],e=i[2],n=i[3],r=i[4],o=i[5],l=i[6];return{x:l*(t.x-o*t.y+r*t.z)+a,y:l*(o*t.x+t.y-n*t.z)+h,z:l*(-r*t.x+n*t.y+t.z)+e}}}function C(t,s,i){if(s===$)return{x:t.x-i[0],y:t.y-i[1],z:t.z-i[2]};if(s===tt){var a=i[0],h=i[1],e=i[2],n=i[3],r=i[4],o=i[5],l=i[6],M=(t.x-a)/l,c=(t.y-h)/l,u=(t.z-e)/l;return{x:M+o*c-r*u,y:-o*M+c+n*u,z:r*M-n*c+u}}}function E(t){return t===$||t===tt}function P(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!==t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function N(t,s){return(t.datum.datum_type===$||t.datum.datum_type===tt)&&"WGS84"!==s.datumCode||(s.datum.datum_type===$||s.datum.datum_type===tt)&&"WGS84"!==t.datumCode}function S(t,s,i){var a;return Array.isArray(i)&&(i=Ft(i)),Qt(i),t.datum&&s.datum&&N(t,s)&&(i=S(t,a=new Projection("WGS84"),i),t=a),"enu"!==t.axis&&(i=Ut(t,!1,i)),"longlat"===t.projName?i={x:i.x*lt,y:i.y*lt}:(t.to_meter&&(i={x:i.x*t.to_meter,y:i.y*t.to_meter}),i=t.inverse(i)),t.from_greenwich&&(i.x+=t.from_greenwich),i=Bt(t.datum,s.datum,i),s.from_greenwich&&(i={x:i.x-s.from_greenwich,y:i.y}),"longlat"===s.projName?i={x:i.x*Mt,y:i.y*Mt}:(i=s.forward(i),s.to_meter&&(i={x:i.x/s.to_meter,y:i.y/s.to_meter})),"enu"!==s.axis?Ut(s,!0,i):i}function k(t,s,i){var a,h,e;return Array.isArray(i)?(a=S(t,s,i),3===i.length?[a.x,a.y,a.z]:[a.x,a.y]):(h=S(t,s,i),2===(e=Object.keys(i)).length?h:(e.forEach(function(t){"x"!==t&&"y"!==t&&(h[t]=i[t])}),h))}function q(t){return t instanceof Projection?t:t.oProj?t.oProj:Projection(t)}function I(t,s,i){t=q(t);var a,h=!1;return void 0===s?(s=t,t=Wt,h=!0):(void 0!==s.x||Array.isArray(s))&&(i=s,s=t,t=Wt,h=!0),s=q(s),i?k(t,s,i):(a={forward:function(i){return k(t,s,i)},inverse:function(i){return k(s,t,i)}},h&&(a.oProj=s),a)}function O(t,s){return s=s||5,D(j({lat:t[1],lon:t[0]}),s)}function R(t){var s=L(Q(t.toUpperCase()));return s.lat&&s.lon?[s.lon,s.lat]:[(s.left+s.right)/2,(s.top+s.bottom)/2]}function G(t){return t*(Math.PI/180)}function T(t){return t/Math.PI*180}function j(t){var s,i,a,h,e,n,r,o=t.lat,l=t.lon,M=6378137,c=G(o),u=G(l);r=Math.floor((l+180)/6)+1,180===l&&(r=60),o>=56&&o<64&&l>=3&&l<12&&(r=32),o>=72&&o<84&&(l>=0&&l<9?r=31:l>=9&&l<21?r=33:l>=21&&l<33?r=35:l>=33&&l<42&&(r=37)),n=G(6*(r-1)-180+3),s=M/Math.sqrt(1-.00669438*Math.sin(c)*Math.sin(c)),i=Math.tan(c)*Math.tan(c),a=.006739496752268451*Math.cos(c)*Math.cos(c);var f=.9996*s*((h=Math.cos(c)*(u-n))+(1-i+a)*h*h*h/6+(5-18*i+i*i+72*a-.39089081163157013)*h*h*h*h*h/120)+5e5,m=.9996*((e=M*(.9983242984503243*c-.002514607064228144*Math.sin(2*c)+2639046602129982e-21*Math.sin(4*c)-3.418046101696858e-9*Math.sin(6*c)))+s*Math.tan(c)*(h*h/2+(5-i+9*a+4*a*a)*h*h*h*h/24+(61-58*i+i*i+600*a-2.2240339282485886)*h*h*h*h*h*h/720));return o<0&&(m+=1e7),{northing:Math.round(m),easting:Math.round(f),zoneNumber:r,zoneLetter:z(o)}}function L(t){var s=t.northing,i=t.easting,a=t.zoneLetter,h=t.zoneNumber;if(h<0||h>60)return null;var e,n,r,o,l,M,c,u,f=6378137,m=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),p=i-5e5,d=s;a<"N"&&(d-=1e7),M=6*(h-1)-180+3,u=(c=d/.9996/6367449.145945056)+(3*m/2-27*m*m*m/32)*Math.sin(2*c)+(21*m*m/16-55*m*m*m*m/32)*Math.sin(4*c)+151*m*m*m/96*Math.sin(6*c),e=f/Math.sqrt(1-.00669438*Math.sin(u)*Math.sin(u)),n=Math.tan(u)*Math.tan(u),r=.006739496752268451*Math.cos(u)*Math.cos(u),o=.99330562*f/Math.pow(1-.00669438*Math.sin(u)*Math.sin(u),1.5),l=p/(.9996*e);var y=u-e*Math.tan(u)/o*(l*l/2-(5+3*n+10*r-4*r*r-.06065547077041606)*l*l*l*l/24+(61+90*n+298*r+45*n*n-1.6983531815716497-3*r*r)*l*l*l*l*l*l/720);y=T(y);var _=(l-(1+2*n+r)*l*l*l/6+(5-2*r+28*n-3*r*r+.05391597401814761+24*n*n)*l*l*l*l*l/120)/Math.cos(u);_=M+T(_);var x;if(t.accuracy){var v=L({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});x={top:v.lat,right:v.lon,bottom:y,left:_}}else x={lat:y,lon:_};return x}function z(t){var s="Z";return 84>=t&&t>=72?s="X":72>t&&t>=64?s="W":64>t&&t>=56?s="V":56>t&&t>=48?s="U":48>t&&t>=40?s="T":40>t&&t>=32?s="S":32>t&&t>=24?s="R":24>t&&t>=16?s="Q":16>t&&t>=8?s="P":8>t&&t>=0?s="N":0>t&&t>=-8?s="M":-8>t&&t>=-16?s="L":-16>t&&t>=-24?s="K":-24>t&&t>=-32?s="J":-32>t&&t>=-40?s="H":-40>t&&t>=-48?s="G":-48>t&&t>=-56?s="F":-56>t&&t>=-64?s="E":-64>t&&t>=-72?s="D":-72>t&&t>=-80&&(s="C"),s}function D(t,s){var i="00000"+t.easting,a="00000"+t.northing;return t.zoneNumber+t.zoneLetter+B(t.easting,t.northing,t.zoneNumber)+i.substr(i.length-5,s)+a.substr(a.length-5,s)}function B(t,s,i){var a=U(i);return F(Math.floor(t/1e5),Math.floor(s/1e5)%20,a)}function U(t){var s=t%Ht;return 0===s&&(s=Ht),s}function F(t,s,i){var a=i-1,h=Kt.charCodeAt(a),e=Xt.charCodeAt(a),n=h+t-1,r=e+s,o=!1;return n>$t&&(n=n-$t+Jt-1,o=!0),(n===Vt||h<Vt&&n>Vt||(n>Vt||h<Vt)&&o)&&n++,(n===Zt||h<Zt&&n>Zt||(n>Zt||h<Zt)&&o)&&++n===Vt&&n++,n>$t&&(n=n-$t+Jt-1),r>Yt?(r=r-Yt+Jt-1,o=!0):o=!1,(r===Vt||e<Vt&&r>Vt||(r>Vt||e<Vt)&&o)&&r++,(r===Zt||e<Zt&&r>Zt||(r>Zt||e<Zt)&&o)&&++r===Vt&&r++,r>Yt&&(r=r-Yt+Jt-1),String.fromCharCode(n)+String.fromCharCode(r)}function Q(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var s,i=t.length,a=null,h="",e=0;!/[A-Z]/.test(s=t.charAt(e));){if(e>=2)throw"MGRSPoint bad conversion from: "+t;h+=s,e++}var n=parseInt(h,10);if(0===e||e+3>i)throw"MGRSPoint bad conversion from: "+t;var r=t.charAt(e++);if(r<="A"||"B"===r||"Y"===r||r>="Z"||"I"===r||"O"===r)throw"MGRSPoint zone letter "+r+" not handled: "+t;a=t.substring(e,e+=2);for(var o=U(n),l=W(a.charAt(0),o),M=H(a.charAt(1),o);M<K(r);)M+=2e6;var c=i-e;if(c%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var u,f,m,p,d,y=c/2,_=0,x=0;return y>0&&(u=1e5/Math.pow(10,y),f=t.substring(e,e+y),_=parseFloat(f)*u,m=t.substring(e+y),x=parseFloat(m)*u),p=_+l,d=x+M,{easting:p,northing:d,zoneLetter:r,zoneNumber:n,accuracy:u}}function W(t,s){for(var i=Kt.charCodeAt(s-1),a=1e5,h=!1;i!==t.charCodeAt(0);){if(++i===Vt&&i++,i===Zt&&i++,i>$t){if(h)throw"Bad character: "+t;i=Jt,h=!0}a+=1e5}return a}function H(t,s){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var i=Xt.charCodeAt(s-1),a=0,h=!1;i!==t.charCodeAt(0);){if(++i===Vt&&i++,i===Zt&&i++,i>Yt){if(h)throw"Bad character: "+t;i=Jt,h=!0}a+=1e5}return a}function K(t){var s;switch(t){case"C":s=11e5;break;case"D":s=2e6;break;case"E":s=28e5;break;case"F":s=37e5;break;case"G":s=46e5;break;case"H":s=55e5;break;case"J":s=64e5;break;case"K":s=73e5;break;case"L":s=82e5;break;case"M":s=91e5;break;case"N":s=0;break;case"P":s=8e5;break;case"Q":s=17e5;break;case"R":s=26e5;break;case"S":s=35e5;break;case"T":s=44e5;break;case"U":s=53e5;break;case"V":s=62e5;break;case"W":s=7e6;break;case"X":s=79e5;break;default:s=-1}if(s>=0)return s;throw"Invalid zone letter: "+t}function Point(t,s,i){if(!(this instanceof Point))return new Point(t,s,i);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===s){var a=t.split(",");this.x=parseFloat(a[0],10),this.y=parseFloat(a[1],10),this.z=parseFloat(a[2],10)||0}else this.x=t,this.y=s,this.z=i||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}function X(t){var s,i=[];return i[0]=t*Ts,s=t*t,i[0]+=s*js,i[1]=s*zs,s*=t,i[0]+=s*Ls,i[1]+=s*Ds,i[2]=s*Bs,i}function J(t,s){var i=t+t;return t+s[0]*Math.sin(i)+s[1]*Math.sin(i+i)+s[2]*Math.sin(i+i+i)}function V(t,s,i,a){var h;return t<ot?(a.value=ri.AREA_0,h=0):(h=Math.atan2(s,i),Math.abs(h)<=ct?a.value=ri.AREA_0:h>ct&&h<=ht+ct?(a.value=ri.AREA_1,h-=ht):h>ht+ct||h<=-(ht+ct)?(a.value=ri.AREA_2,h=h>=0?h-ft:h+ft):(a.value=ri.AREA_3,h+=ht)),h}function Z(t,s){var i=t+s;return i<-ft?i+=ut:i>+ft&&(i-=ut),i}function Y(t,s,i,a){for(var h=s;a;--a){var e=t(h);if(h-=e,Math.abs(e)<i)break}return h}var $=1,tt=2,st=4,it=5,at=484813681109536e-20,ht=Math.PI/2,et=.16666666666666666,nt=.04722222222222222,rt=.022156084656084655,ot=1e-10,lt=.017453292519943295,Mt=57.29577951308232,ct=Math.PI/4,ut=2*Math.PI,ft=3.14159265359,mt={};mt.greenwich=0,mt.lisbon=-9.131906111111,mt.paris=2.337229166667,mt.bogota=-74.080916666667,mt.madrid=-3.687938888889,mt.rome=12.452333333333,mt.bern=7.439583333333,mt.jakarta=106.807719444444,mt.ferro=-17.666666666667,mt.brussels=4.367975,mt.stockholm=18.058277777778,mt.athens=23.7163375,mt.oslo=10.722916666667;var pt={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},dt=/[\s_\-\/\(\)]/g,yt=function(s){var i,a,h,e={},n=s.split("+").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,s){var i=s.split("=");return i.push(!0),t[i[0].toLowerCase()]=i[1],t},{}),r={proj:"projName",datum:"datumCode",rf:function(t){e.rf=parseFloat(t)},lat_0:function(t){e.lat0=t*lt},lat_1:function(t){e.lat1=t*lt},lat_2:function(t){e.lat2=t*lt},lat_ts:function(t){e.lat_ts=t*lt},lon_0:function(t){e.long0=t*lt},lon_1:function(t){e.long1=t*lt},lon_2:function(t){e.long2=t*lt},alpha:function(t){e.alpha=parseFloat(t)*lt},lonc:function(t){e.longc=t*lt},x_0:function(t){e.x0=parseFloat(t)},y_0:function(t){e.y0=parseFloat(t)},k_0:function(t){e.k0=parseFloat(t)},k:function(t){e.k0=parseFloat(t)},a:function(t){e.a=parseFloat(t)},b:function(t){e.b=parseFloat(t)},r_a:function(){e.R_A=!0},zone:function(t){e.zone=parseInt(t,10)},south:function(){e.utmSouth=!0},towgs84:function(t){e.datum_params=t.split(",").map(function(t){return parseFloat(t)})},to_meter:function(t){e.to_meter=parseFloat(t)},units:function(s){e.units=s;var i=t(pt,s);i&&(e.to_meter=i.to_meter)},from_greenwich:function(t){e.from_greenwich=t*lt},pm:function(s){var i=t(mt,s);e.from_greenwich=(i||parseFloat(s))*lt},nadgrids:function(t){"@null"===t?e.datumCode="none":e.nadgrids=t},axis:function(t){3===t.length&&-1!=="ewnsud".indexOf(t.substr(0,1))&&-1!=="ewnsud".indexOf(t.substr(1,1))&&-1!=="ewnsud".indexOf(t.substr(2,1))&&(e.axis=t)}};for(i in n)a=n[i],i in r?"function"==typeof(h=r[i])?h(a):e[h]=a:e[i]=a;return"string"==typeof e.datumCode&&"WGS84"!==e.datumCode&&(e.datumCode=e.datumCode.toLowerCase()),e},_t=1,xt=/\s/,vt=/[A-Za-z]/,gt=/[A-Za-z84]/,bt=/[,\]]/,wt=/[\d\.E\-\+]/;s.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;xt.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case _t:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},s.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(bt.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},s.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=_t)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=_t,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},s.prototype.number=function(t){if(!wt.test(t)){if(bt.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},s.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},s.prototype.keyword=function(t){if(gt.test(t))this.word+=t;else{if("["===t){var s=[];return s.push(this.word),this.level++,null===this.root?this.root=s:this.currentObject.push(s),this.stack.push(this.currentObject),this.currentObject=s,void(this.state=_t)}if(!bt.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},s.prototype.neutral=function(t){if(vt.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(wt.test(t))return this.word=t,void(this.state=3);{if(!bt.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)}},s.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};var At=.017453292519943295,Ct=function(t){var s=i(t),a=s.shift(),e=s.shift();s.unshift(["name",e]),s.unshift(["type",a]);var n={};return h(s,n),r(n),n};!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(o);var Et=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"],Pt=["3857","900913","3785","102113"],Nt=function(t,s){t=t||{};var i,a;if(!s)return t;for(a in s)void 0!==(i=s[a])&&(t[a]=i);return t},St=function(t,s,i){var a=t*s;return i/Math.sqrt(1-a*a)},kt=function(t){return t<0?-1:1},qt=function(t){return Math.abs(t)<=ft?t:t-kt(t)*ut},It=function(t,s,i){var a=t*i,h=.5*t;return a=Math.pow((1-a)/(1+a),h),Math.tan(.5*(ht-s))/a},Ot=function(t,s){for(var i,a,h=.5*t,e=ht-2*Math.atan(s),n=0;n<=15;n++)if(i=t*Math.sin(e),a=ht-2*Math.atan(s*Math.pow((1-i)/(1+i),h))-e,e+=a,Math.abs(a)<=1e-10)return e;return-9999},Rt=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=St(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var s=t.x,i=t.y;if(i*Mt>90&&i*Mt<-90&&s*Mt>180&&s*Mt<-180)return null;var a,h;if(Math.abs(Math.abs(i)-ht)<=ot)return null;if(this.sphere)a=this.x0+this.a*this.k0*qt(s-this.long0),h=this.y0+this.a*this.k0*Math.log(Math.tan(ct+.5*i));else{var e=Math.sin(i),n=It(this.e,i,e);a=this.x0+this.a*this.k0*qt(s-this.long0),h=this.y0-this.a*this.k0*Math.log(n)}return t.x=a,t.y=h,t},inverse:function(t){var s,i,a=t.x-this.x0,h=t.y-this.y0;if(this.sphere)i=ht-2*Math.atan(Math.exp(-h/(this.a*this.k0)));else{var e=Math.exp(-h/(this.a*this.k0));if(-9999===(i=Ot(this.e,e)))return null}return s=qt(this.long0+a/(this.a*this.k0)),t.x=s,t.y=i,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:d,inverse:d,names:["longlat","identity"]}],Gt={},Tt=[],jt={start:function(){Rt.forEach(y)},add:y,get:function(t){if(!t)return!1;var s=t.toLowerCase();return void 0!==Gt[s]&&Tt[Gt[s]]?Tt[Gt[s]]:void 0}},Lt={};Lt.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},Lt.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},Lt.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},Lt.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},Lt.airy={a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},Lt.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},Lt.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},Lt.mod_airy={a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},Lt.andrae={a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},Lt.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},Lt.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},Lt.bessel={a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},Lt.bess_nam={a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},Lt.clrk66={a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},Lt.clrk80={a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},Lt.clrk58={a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},Lt.CPM={a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},Lt.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},Lt.engelis={a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},Lt.evrst30={a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},Lt.evrst48={a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},Lt.evrst56={a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},Lt.evrst69={a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},Lt.evrstSS={a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},Lt.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},Lt.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},Lt.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},Lt.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},Lt.hough={a:6378270,rf:297,ellipseName:"Hough"},Lt.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},Lt.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},Lt.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},Lt.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},Lt.new_intl={a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},Lt.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},Lt.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},Lt.SEasia={a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},Lt.walbeck={a:6376896,b:6355834.8467,ellipseName:"Walbeck"},Lt.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},Lt.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},Lt.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var zt=Lt.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Lt.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var Dt={};Dt.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},Dt.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},Dt.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},Dt.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},Dt.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},Dt.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},Dt.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},Dt.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},Dt.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},Dt.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},Dt.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},Dt.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},Dt.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},Dt.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},Dt.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},Dt.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},Dt.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},Projection.projections=jt,Projection.projections.start();var Bt=function(t,s,i){return g(t,s)?i:t.datum_type===it||s.datum_type===it?i:t.es!==s.es||t.a!==s.a||E(t.datum_type)||E(s.datum_type)?(i=b(i,t.es,t.a),E(t.datum_type)&&(i=A(i,t.datum_type,t.datum_params)),E(s.datum_type)&&(i=C(i,s.datum_type,s.datum_params)),w(i,s.es,s.a,s.b)):i},Ut=function(t,s,i){var a,h,e,n=i.x,r=i.y,o=i.z||0,l={};for(e=0;e<3;e++)if(!s||2!==e||void 0!==i.z)switch(0===e?(a=n,h="x"):1===e?(a=r,h="y"):(a=o,h="z"),t.axis[e]){case"e":l[h]=a;break;case"w":l[h]=-a;break;case"n":l[h]=a;break;case"s":l[h]=-a;break;case"u":void 0!==i[h]&&(l.z=a);break;case"d":void 0!==i[h]&&(l.z=-a);break;default:return null}return l},Ft=function(t){var s={x:t[0],y:t[1]};return t.length>2&&(s.z=t[2]),t.length>3&&(s.m=t[3]),s},Qt=function(t){P(t.x),P(t.y)},Wt=Projection("WGS84"),Ht=6,Kt="AJSAJS",Xt="AFAFAF",Jt=65,Vt=73,Zt=79,Yt=86,$t=90,ts={forward:O,inverse:function(t){var s=L(Q(t.toUpperCase()));return s.lat&&s.lon?[s.lon,s.lat,s.lon,s.lat]:[s.left,s.bottom,s.right,s.top]},toPoint:R};Point.fromMGRS=function(t){return new Point(R(t))},Point.prototype.toMGRS=function(t){return O([this.x,this.y],t)};var ss=.01068115234375,is=function(t){var s=[];s[0]=1-t*(.25+t*(.046875+t*(.01953125+t*ss))),s[1]=t*(.75-t*(.046875+t*(.01953125+t*ss)));var i=t*t;return s[2]=i*(.46875-t*(.013020833333333334+.007120768229166667*t)),i*=t,s[3]=i*(.3645833333333333-.005696614583333333*t),s[4]=i*t*.3076171875,s},as=function(t,s,i,a){return i*=s,s*=s,a[0]*t-i*(a[1]+s*(a[2]+s*(a[3]+s*a[4])))},hs=function(t,s,i){for(var a=1/(1-s),h=t,e=20;e;--e){var n=Math.sin(h),r=1-s*n*n;if(r=(as(h,n,Math.cos(h),i)-t)*(r*Math.sqrt(r))*a,h-=r,Math.abs(r)<ot)return h}return h},es={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=is(this.es),this.ml0=as(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var s,i,a,h=t.x,e=t.y,n=qt(h-this.long0),r=Math.sin(e),o=Math.cos(e);if(this.es){var l=o*n,M=Math.pow(l,2),c=this.ep2*Math.pow(o,2),u=Math.pow(c,2),f=Math.abs(o)>ot?Math.tan(e):0,m=Math.pow(f,2),p=Math.pow(m,2);s=1-this.es*Math.pow(r,2),l/=Math.sqrt(s);var d=as(e,r,o,this.en);i=this.a*(this.k0*l*(1+M/6*(1-m+c+M/20*(5-18*m+p+14*c-58*m*c+M/42*(61+179*p-p*m-479*m)))))+this.x0,a=this.a*(this.k0*(d-this.ml0+r*n*l/2*(1+M/12*(5-m+9*c+4*u+M/30*(61+p-58*m+270*c-330*m*c+M/56*(1385+543*p-p*m-3111*m))))))+this.y0}else{var y=o*Math.sin(n);if(Math.abs(Math.abs(y)-1)<ot)return 93;if(i=.5*this.a*this.k0*Math.log((1+y)/(1-y))+this.x0,a=o*Math.cos(n)/Math.sqrt(1-Math.pow(y,2)),(y=Math.abs(a))>=1){if(y-1>ot)return 93;a=0}else a=Math.acos(a);e<0&&(a=-a),a=this.a*this.k0*(a-this.lat0)+this.y0}return t.x=i,t.y=a,t},inverse:function(t){var s,i,a,h,e=(t.x-this.x0)*(1/this.a),n=(t.y-this.y0)*(1/this.a);if(this.es)if(s=this.ml0+n/this.k0,i=hs(s,this.es,this.en),Math.abs(i)<ht){var r=Math.sin(i),o=Math.cos(i),l=Math.abs(o)>ot?Math.tan(i):0,M=this.ep2*Math.pow(o,2),c=Math.pow(M,2),u=Math.pow(l,2),f=Math.pow(u,2);s=1-this.es*Math.pow(r,2);var m=e*Math.sqrt(s)/this.k0,p=Math.pow(m,2);a=i-(s*=l)*p/(1-this.es)*.5*(1-p/12*(5+3*u-9*M*u+M-4*c-p/30*(61+90*u-252*M*u+45*f+46*M-p/56*(1385+3633*u+4095*f+1574*f*u)))),h=qt(this.long0+m*(1-p/6*(1+2*u+M-p/20*(5+28*u+24*f+8*M*u+6*M-p/42*(61+662*u+1320*f+720*f*u))))/o)}else a=ht*kt(n),h=0;else{var d=Math.exp(e/this.k0),y=.5*(d-1/d),_=this.lat0+n/this.k0,x=Math.cos(_);s=Math.sqrt((1-Math.pow(x,2))/(1+Math.pow(y,2))),a=Math.asin(s),n<0&&(a=-a),h=0===y&&0===x?0:qt(Math.atan2(y,x)+this.long0)}return t.x=h,t.y=a,t},names:["Transverse_Mercator","Transverse Mercator","tmerc"]},ns=function(t){var s=Math.exp(t);return s=(s-1/s)/2},rs=function(t,s){t=Math.abs(t),s=Math.abs(s);var i=Math.max(t,s),a=Math.min(t,s)/(i||1);return i*Math.sqrt(1+Math.pow(a,2))},os=function(t){var s=1+t,i=s-1;return 0===i?t:t*Math.log(s)/i},ls=function(t){var s=Math.abs(t);return s=os(s*(1+s/(rs(1,s)+1))),t<0?-s:s},Ms=function(t,s){for(var i,a=2*Math.cos(2*s),h=t.length-1,e=t[h],n=0;--h>=0;)i=a*e-n+t[h],n=e,e=i;return s+i*Math.sin(2*s)},cs=function(t,s){for(var i,a=2*Math.cos(s),h=t.length-1,e=t[h],n=0;--h>=0;)i=a*e-n+t[h],n=e,e=i;return Math.sin(s)*i},us=function(t){var s=Math.exp(t);return s=(s+1/s)/2},fs=function(t,s,i){for(var a,h,e=Math.sin(s),n=Math.cos(s),r=ns(i),o=us(i),l=2*n*o,M=-2*e*r,c=t.length-1,u=t[c],f=0,m=0,p=0;--c>=0;)a=m,h=f,u=l*(m=u)-a-M*(f=p)+t[c],p=M*m-h+l*f;return l=e*o,M=n*r,[l*u-M*p,l*p+M*u]},ms={init:function(){if(void 0===this.es||this.es<=0)throw new Error("incorrect elliptical usage");this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),s=t/(2-t),i=s;this.cgb[0]=s*(2+s*(-2/3+s*(s*(116/45+s*(26/45+s*(-2854/675)))-2))),this.cbg[0]=s*(s*(2/3+s*(4/3+s*(-82/45+s*(32/45+s*(4642/4725)))))-2),i*=s,this.cgb[1]=i*(7/3+s*(s*(-227/45+s*(2704/315+s*(2323/945)))-1.6)),this.cbg[1]=i*(5/3+s*(-16/15+s*(-13/9+s*(904/315+s*(-1522/945))))),i*=s,this.cgb[2]=i*(56/15+s*(-136/35+s*(-1262/105+s*(73814/2835)))),this.cbg[2]=i*(-26/15+s*(34/21+s*(1.6+s*(-12686/2835)))),i*=s,this.cgb[3]=i*(4279/630+s*(-332/35+s*(-399572/14175))),this.cbg[3]=i*(1237/630+s*(s*(-24832/14175)-2.4)),i*=s,this.cgb[4]=i*(4174/315+s*(-144838/6237)),this.cbg[4]=i*(-734/315+s*(109598/31185)),i*=s,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(s,2),this.Qn=this.k0/(1+s)*(1+i*(.25+i*(1/64+i/256))),this.utg[0]=s*(s*(2/3+s*(-37/96+s*(1/360+s*(81/512+s*(-96199/604800)))))-.5),this.gtu[0]=s*(.5+s*(-2/3+s*(5/16+s*(41/180+s*(-127/288+s*(7891/37800)))))),this.utg[1]=i*(-1/48+s*(-1/15+s*(437/1440+s*(-46/105+s*(1118711/3870720))))),this.gtu[1]=i*(13/48+s*(s*(557/1440+s*(281/630+s*(-1983433/1935360)))-.6)),i*=s,this.utg[2]=i*(-17/480+s*(37/840+s*(209/4480+s*(-5569/90720)))),this.gtu[2]=i*(61/240+s*(-103/140+s*(15061/26880+s*(167603/181440)))),i*=s,this.utg[3]=i*(-4397/161280+s*(11/504+s*(830251/7257600))),this.gtu[3]=i*(49561/161280+s*(-179/168+s*(6601661/7257600))),i*=s,this.utg[4]=i*(-4583/161280+s*(108847/3991680)),this.gtu[4]=i*(34729/80640+s*(-3418889/1995840)),i*=s,this.utg[5]=-.03233083094085698*i,this.gtu[5]=.6650675310896665*i;var a=Ms(this.cbg,this.lat0);this.Zb=-this.Qn*(a+cs(this.gtu,2*a))},forward:function(t){var s=qt(t.x-this.long0),i=t.y;i=Ms(this.cbg,i);var a=Math.sin(i),h=Math.cos(i),e=Math.sin(s),n=Math.cos(s);i=Math.atan2(a,n*h),s=Math.atan2(e*h,rs(a,h*n)),s=ls(Math.tan(s));var r=fs(this.gtu,2*i,2*s);i+=r[0],s+=r[1];var o,l;return Math.abs(s)<=2.623395162778?(o=this.a*(this.Qn*s)+this.x0,l=this.a*(this.Qn*i+this.Zb)+this.y0):(o=1/0,l=1/0),t.x=o,t.y=l,t},inverse:function(t){var s=(t.x-this.x0)*(1/this.a),i=(t.y-this.y0)*(1/this.a);i=(i-this.Zb)/this.Qn,s/=this.Qn;var a,h;if(Math.abs(s)<=2.623395162778){var e=fs(this.utg,2*i,2*s);i+=e[0],s+=e[1],s=Math.atan(ns(s));var n=Math.sin(i),r=Math.cos(i),o=Math.sin(s),l=Math.cos(s);i=Math.atan2(n*l,rs(o,l*r)),s=Math.atan2(o,l*r),a=qt(s+this.long0),h=Ms(this.cgb,i)}else a=1/0,h=1/0;return t.x=a,t.y=h,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc"]},ps=function(t,s){if(void 0===t){if((t=Math.floor(30*(qt(s)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t},ds={init:function(){var t=ps(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*lt,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,ms.init.apply(this),this.forward=ms.forward,this.inverse=ms.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"},ys=function(t,s){return Math.pow((1-t)/(1+t),s)},_s=20,xs={init:function(){var t=Math.sin(this.lat0),s=Math.cos(this.lat0);s*=s,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*s*s/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+ct)/(Math.pow(Math.tan(.5*this.lat0+ct),this.C)*ys(this.e*t,this.ratexp))},forward:function(t){var s=t.x,i=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+ct),this.C)*ys(this.e*Math.sin(i),this.ratexp))-ht,t.x=this.C*s,t},inverse:function(t){for(var s=t.x/this.C,i=t.y,a=Math.pow(Math.tan(.5*i+ct)/this.K,1/this.C),h=_s;h>0&&(i=2*Math.atan(a*ys(this.e*Math.sin(t.y),-.5*this.e))-ht,!(Math.abs(i-t.y)<1e-14));--h)t.y=i;return h?(t.x=s,t.y=i,t):null},names:["gauss"]},vs={init:function(){xs.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var s,i,a,h;return t.x=qt(t.x-this.long0),xs.forward.apply(this,[t]),s=Math.sin(t.y),i=Math.cos(t.y),a=Math.cos(t.x),h=this.k0*this.R2/(1+this.sinc0*s+this.cosc0*i*a),t.x=h*i*Math.sin(t.x),t.y=h*(this.cosc0*s-this.sinc0*i*a),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var s,i,a,h,e;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,e=Math.sqrt(t.x*t.x+t.y*t.y)){var n=2*Math.atan2(e,this.R2);s=Math.sin(n),i=Math.cos(n),h=Math.asin(i*this.sinc0+t.y*s*this.cosc0/e),a=Math.atan2(t.x*s,e*this.cosc0*i-t.y*this.sinc0*s)}else h=this.phic0,a=0;return t.x=a,t.y=h,xs.inverse.apply(this,[t]),t.x=qt(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]},gs={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=ot&&(this.k0=.5*(1+kt(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=ot&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=ot&&(this.k0=.5*this.cons*St(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/It(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=St(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-ht,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var s,i,a,h,e,n,r=t.x,o=t.y,l=Math.sin(o),M=Math.cos(o),c=qt(r-this.long0);return Math.abs(Math.abs(r-this.long0)-Math.PI)<=ot&&Math.abs(o+this.lat0)<=ot?(t.x=NaN,t.y=NaN,t):this.sphere?(s=2*this.k0/(1+this.sinlat0*l+this.coslat0*M*Math.cos(c)),t.x=this.a*s*M*Math.sin(c)+this.x0,t.y=this.a*s*(this.coslat0*l-this.sinlat0*M*Math.cos(c))+this.y0,t):(i=2*Math.atan(this.ssfn_(o,l,this.e))-ht,h=Math.cos(i),a=Math.sin(i),Math.abs(this.coslat0)<=ot?(e=It(this.e,o*this.con,this.con*l),n=2*this.a*this.k0*e/this.cons,t.x=this.x0+n*Math.sin(r-this.long0),t.y=this.y0-this.con*n*Math.cos(r-this.long0),t):(Math.abs(this.sinlat0)<ot?(s=2*this.a*this.k0/(1+h*Math.cos(c)),t.y=s*a):(s=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*a+this.cosX0*h*Math.cos(c))),t.y=s*(this.cosX0*a-this.sinX0*h*Math.cos(c))+this.y0),t.x=s*h*Math.sin(c)+this.x0,t))},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s,i,a,h,e,n=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var r=2*Math.atan(n/(2*this.a*this.k0));return s=this.long0,i=this.lat0,n<=ot?(t.x=s,t.y=i,t):(i=Math.asin(Math.cos(r)*this.sinlat0+t.y*Math.sin(r)*this.coslat0/n),s=qt(Math.abs(this.coslat0)<ot?this.lat0>0?this.long0+Math.atan2(t.x,-1*t.y):this.long0+Math.atan2(t.x,t.y):this.long0+Math.atan2(t.x*Math.sin(r),n*this.coslat0*Math.cos(r)-t.y*this.sinlat0*Math.sin(r))),t.x=s,t.y=i,t)}if(Math.abs(this.coslat0)<=ot){if(n<=ot)return i=this.lat0,s=this.long0,t.x=s,t.y=i,t;t.x*=this.con,t.y*=this.con,a=n*this.cons/(2*this.a*this.k0),i=this.con*Ot(this.e,a),s=this.con*qt(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else h=2*Math.atan(n*this.cosX0/(2*this.a*this.k0*this.ms1)),s=this.long0,n<=ot?e=this.X0:(e=Math.asin(Math.cos(h)*this.sinX0+t.y*Math.sin(h)*this.cosX0/n),s=qt(this.long0+Math.atan2(t.x*Math.sin(h),n*this.cosX0*Math.cos(h)-t.y*this.sinX0*Math.sin(h)))),i=-1*Ot(this.e,Math.tan(.5*(ht+e)));return t.x=s,t.y=i,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(t,s,i){return s*=i,Math.tan(.5*(ht+t))*Math.pow((1-s)/(1+s),.5*i)}},bs={init:function(){var t=this.lat0;this.lambda0=this.long0;var s=Math.sin(t),i=this.a,a=1/this.rf,h=2*a-Math.pow(a,2),e=this.e=Math.sqrt(h);this.R=this.k0*i*Math.sqrt(1-h)/(1-h*Math.pow(s,2)),this.alpha=Math.sqrt(1+h/(1-h)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(s/this.alpha);var n=Math.log(Math.tan(Math.PI/4+this.b0/2)),r=Math.log(Math.tan(Math.PI/4+t/2)),o=Math.log((1+e*s)/(1-e*s));this.K=n-this.alpha*r+this.alpha*e/2*o},forward:function(t){var s=Math.log(Math.tan(Math.PI/4-t.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),a=-this.alpha*(s+i)+this.K,h=2*(Math.atan(Math.exp(a))-Math.PI/4),e=this.alpha*(t.x-this.lambda0),n=Math.atan(Math.sin(e)/(Math.sin(this.b0)*Math.tan(h)+Math.cos(this.b0)*Math.cos(e))),r=Math.asin(Math.cos(this.b0)*Math.sin(h)-Math.sin(this.b0)*Math.cos(h)*Math.cos(e));return t.y=this.R/2*Math.log((1+Math.sin(r))/(1-Math.sin(r)))+this.y0,t.x=this.R*n+this.x0,t},inverse:function(t){for(var s=t.x-this.x0,i=t.y-this.y0,a=s/this.R,h=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),e=Math.asin(Math.cos(this.b0)*Math.sin(h)+Math.sin(this.b0)*Math.cos(h)*Math.cos(a)),n=Math.atan(Math.sin(a)/(Math.cos(this.b0)*Math.cos(a)-Math.sin(this.b0)*Math.tan(h))),r=this.lambda0+n/this.alpha,o=0,l=e,M=-1e3,c=0;Math.abs(l-M)>1e-7;){if(++c>20)return;o=1/this.alpha*(Math.log(Math.tan(Math.PI/4+e/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),M=l,l=2*Math.atan(Math.exp(o))-Math.PI/2}return t.x=r,t.y=l,t},names:["somerc"]},ws={init:function(){this.no_off=this.no_off||!1,this.no_rot=this.no_rot||!1,isNaN(this.k0)&&(this.k0=1);var t=Math.sin(this.lat0),s=Math.cos(this.lat0),i=this.e*t;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(s,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-i*i);var a=It(this.e,this.lat0,t),h=this.bl/s*Math.sqrt((1-this.es)/(1-i*i));h*h<1&&(h=1);var e,n;if(isNaN(this.longc)){var r=It(this.e,this.lat1,Math.sin(this.lat1)),o=It(this.e,this.lat2,Math.sin(this.lat2));this.lat0>=0?this.el=(h+Math.sqrt(h*h-1))*Math.pow(a,this.bl):this.el=(h-Math.sqrt(h*h-1))*Math.pow(a,this.bl);var l=Math.pow(r,this.bl),M=Math.pow(o,this.bl);n=.5*((e=this.el/l)-1/e);var c=(this.el*this.el-M*l)/(this.el*this.el+M*l),u=(M-l)/(M+l),f=qt(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(c*Math.tan(.5*this.bl*f)/u)/this.bl,this.long0=qt(this.long0);var m=qt(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*m)/n),this.alpha=Math.asin(h*Math.sin(this.gamma0))}else e=this.lat0>=0?h+Math.sqrt(h*h-1):h-Math.sqrt(h*h-1),this.el=e*Math.pow(a,this.bl),n=.5*(e-1/e),this.gamma0=Math.asin(Math.sin(this.alpha)/h),this.long0=this.longc-Math.asin(n*Math.tan(this.gamma0))/this.bl;this.no_off?this.uc=0:this.lat0>=0?this.uc=this.al/this.bl*Math.atan2(Math.sqrt(h*h-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(h*h-1),Math.cos(this.alpha))},forward:function(t){var s,i,a,h=t.x,e=t.y,n=qt(h-this.long0);if(Math.abs(Math.abs(e)-ht)<=ot)a=e>0?-1:1,i=this.al/this.bl*Math.log(Math.tan(ct+a*this.gamma0*.5)),s=-1*a*ht*this.al/this.bl;else{var r=It(this.e,e,Math.sin(e)),o=this.el/Math.pow(r,this.bl),l=.5*(o-1/o),M=.5*(o+1/o),c=Math.sin(this.bl*n),u=(l*Math.sin(this.gamma0)-c*Math.cos(this.gamma0))/M;i=Math.abs(Math.abs(u)-1)<=ot?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-u)/(1+u))/this.bl,s=Math.abs(Math.cos(this.bl*n))<=ot?this.al*this.bl*n:this.al*Math.atan2(l*Math.cos(this.gamma0)+c*Math.sin(this.gamma0),Math.cos(this.bl*n))/this.bl}return this.no_rot?(t.x=this.x0+s,t.y=this.y0+i):(s-=this.uc,t.x=this.x0+i*Math.cos(this.alpha)+s*Math.sin(this.alpha),t.y=this.y0+s*Math.cos(this.alpha)-i*Math.sin(this.alpha)),t},inverse:function(t){var s,i;this.no_rot?(i=t.y-this.y0,s=t.x-this.x0):(i=(t.x-this.x0)*Math.cos(this.alpha)-(t.y-this.y0)*Math.sin(this.alpha),s=(t.y-this.y0)*Math.cos(this.alpha)+(t.x-this.x0)*Math.sin(this.alpha),s+=this.uc);var a=Math.exp(-1*this.bl*i/this.al),h=.5*(a-1/a),e=.5*(a+1/a),n=Math.sin(this.bl*s/this.al),r=(n*Math.cos(this.gamma0)+h*Math.sin(this.gamma0))/e,o=Math.pow(this.el/Math.sqrt((1+r)/(1-r)),1/this.bl);return Math.abs(r-1)<ot?(t.x=this.long0,t.y=ht):Math.abs(r+1)<ot?(t.x=this.long0,t.y=-1*ht):(t.y=Ot(this.e,o),t.x=qt(this.long0-Math.atan2(h*Math.cos(this.gamma0)-n*Math.sin(this.gamma0),Math.cos(this.bl*s/this.al))/this.bl)),t},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","omerc"]},As={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<ot)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var s=Math.sin(this.lat1),i=Math.cos(this.lat1),a=St(this.e,s,i),h=It(this.e,this.lat1,s),e=Math.sin(this.lat2),n=Math.cos(this.lat2),r=St(this.e,e,n),o=It(this.e,this.lat2,e),l=It(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>ot?this.ns=Math.log(a/r)/Math.log(h/o):this.ns=s,isNaN(this.ns)&&(this.ns=s),this.f0=a/(this.ns*Math.pow(h,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var s=t.x,i=t.y;Math.abs(2*Math.abs(i)-Math.PI)<=ot&&(i=kt(i)*(ht-2*ot));var a,h,e=Math.abs(Math.abs(i)-ht);if(e>ot)a=It(this.e,i,Math.sin(i)),h=this.a*this.f0*Math.pow(a,this.ns);else{if((e=i*this.ns)<=0)return null;h=0}var n=this.ns*qt(s-this.long0);return t.x=this.k0*(h*Math.sin(n))+this.x0,t.y=this.k0*(this.rh-h*Math.cos(n))+this.y0,t},inverse:function(t){var s,i,a,h,e,n=(t.x-this.x0)/this.k0,r=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(s=Math.sqrt(n*n+r*r),i=1):(s=-Math.sqrt(n*n+r*r),i=-1);var o=0;if(0!==s&&(o=Math.atan2(i*n,i*r)),0!==s||this.ns>0){if(i=1/this.ns,a=Math.pow(s/(this.a*this.f0),i),-9999===(h=Ot(this.e,a)))return null}else h=-ht;return e=qt(o/this.ns+this.long0),t.x=e,t.y=h,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"]},Cs={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var s,i,a,h,e,n,r,o=t.x,l=t.y,M=qt(o-this.long0);return s=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/s)-this.s45),a=-M*this.alfa,h=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(a)),e=Math.asin(Math.cos(i)*Math.sin(a)/Math.cos(h)),n=this.n*e,r=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(h/2+this.s45),this.n),t.y=r*Math.cos(n)/1,t.x=r*Math.sin(n)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var s,i,a,h,e,n,r,o=t.x;t.x=t.y,t.y=o,this.czech||(t.y*=-1,t.x*=-1),e=Math.sqrt(t.x*t.x+t.y*t.y),h=Math.atan2(t.y,t.x)/Math.sin(this.s0),a=2*(Math.atan(Math.pow(this.ro0/e,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),s=Math.asin(Math.cos(this.ad)*Math.sin(a)-Math.sin(this.ad)*Math.cos(a)*Math.cos(h)),i=Math.asin(Math.cos(a)*Math.sin(h)/Math.cos(s)),t.x=this.long0-i/this.alfa,n=s,r=0;var l=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(s/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(n))/(1-this.e*Math.sin(n)),this.e/2))-this.s45),Math.abs(n-t.y)<1e-10&&(r=1),n=t.y,l+=1}while(0===r&&l<15);return l>=15?null:t},names:["Krovak","krovak"]},Es=function(t,s,i,a,h){return t*h-s*Math.sin(2*h)+i*Math.sin(4*h)-a*Math.sin(6*h)},Ps=function(t){return 1-.25*t*(1+t/16*(3+1.25*t))},Ns=function(t){return.375*t*(1+.25*t*(1+.46875*t))},Ss=function(t){return.05859375*t*t*(1+.75*t)},ks=function(t){return t*t*t*(35/3072)},qs=function(t,s,i){var a=s*i;return t/Math.sqrt(1-a*a)},Is=function(t){return Math.abs(t)<ht?t:t-kt(t)*Math.PI},Os=function(t,s,i,a,h){var e,n;e=t/s;for(var r=0;r<15;r++)if(n=(t-(s*e-i*Math.sin(2*e)+a*Math.sin(4*e)-h*Math.sin(6*e)))/(s-2*i*Math.cos(2*e)+4*a*Math.cos(4*e)-6*h*Math.cos(6*e)),e+=n,Math.abs(n)<=1e-10)return e;return NaN},Rs={init:function(){this.sphere||(this.e0=Ps(this.es),this.e1=Ns(this.es),this.e2=Ss(this.es),this.e3=ks(this.es),this.ml0=this.a*Es(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var s,i,a=t.x,h=t.y;if(a=qt(a-this.long0),this.sphere)s=this.a*Math.asin(Math.cos(h)*Math.sin(a)),i=this.a*(Math.atan2(Math.tan(h),Math.cos(a))-this.lat0);else{var e=Math.sin(h),n=Math.cos(h),r=qs(this.a,this.e,e),o=Math.tan(h)*Math.tan(h),l=a*Math.cos(h),M=l*l,c=this.es*n*n/(1-this.es);s=r*l*(1-M*o*(1/6-(8-o+8*c)*M/120)),i=this.a*Es(this.e0,this.e1,this.e2,this.e3,h)-this.ml0+r*e/n*M*(.5+(5-o+6*c)*M/24)}return t.x=s+this.x0,t.y=i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s,i,a=t.x/this.a,h=t.y/this.a;if(this.sphere){var e=h+this.lat0;s=Math.asin(Math.sin(e)*Math.cos(a)),i=Math.atan2(Math.tan(a),Math.cos(e))}else{var n=this.ml0/this.a+h,r=Os(n,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(r)-ht)<=ot)return t.x=this.long0,t.y=ht,h<0&&(t.y*=-1),t;var o=qs(this.a,this.e,Math.sin(r)),l=o*o*o/this.a/this.a*(1-this.es),M=Math.pow(Math.tan(r),2),c=a*this.a/o,u=c*c;s=r-o*Math.tan(r)/l*c*c*(.5-(1+3*M)*c*c/24),i=c*(1-u*(M/3+(1+3*M)*M*u/15))/Math.cos(r)}return t.x=qt(i+this.long0),t.y=Is(s),t},names:["Cassini","Cassini_Soldner","cass"]},Gs=function(t,s){var i;return t>1e-7?(i=t*s,(1-t*t)*(s/(1-i*i)-.5/t*Math.log((1-i)/(1+i)))):2*s},Ts=.3333333333333333,js=.17222222222222222,Ls=.10257936507936508,zs=.06388888888888888,Ds=.0664021164021164,Bs=.016415012942191543,Us={init:function(){var t=Math.abs(this.lat0);if(Math.abs(t-ht)<ot?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(t)<ot?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var s;switch(this.qp=Gs(this.e,1),this.mmf=.5/(1-this.es),this.apa=X(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),s=Math.sin(this.lat0),this.sinb1=Gs(this.e,s)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*s*s)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var s,i,a,h,e,n,r,o,l,M,c=t.x,u=t.y;if(c=qt(c-this.long0),this.sphere){if(e=Math.sin(u),M=Math.cos(u),a=Math.cos(c),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((i=this.mode===this.EQUIT?1+M*a:1+this.sinph0*e+this.cosph0*M*a)<=ot)return null;s=(i=Math.sqrt(2/i))*M*Math.sin(c),i*=this.mode===this.EQUIT?e:this.cosph0*e-this.sinph0*M*a}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(a=-a),Math.abs(u+this.phi0)<ot)return null;i=ct-.5*u,s=(i=2*(this.mode===this.S_POLE?Math.cos(i):Math.sin(i)))*Math.sin(c),i*=a}}else{switch(r=0,o=0,l=0,a=Math.cos(c),h=Math.sin(c),e=Math.sin(u),n=Gs(this.e,e),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(r=n/this.qp,o=Math.sqrt(1-r*r)),this.mode){case this.OBLIQ:l=1+this.sinb1*r+this.cosb1*o*a;break;case this.EQUIT:l=1+o*a;break;case this.N_POLE:l=ht+u,n=this.qp-n;break;case this.S_POLE:l=u-ht,n=this.qp+n}if(Math.abs(l)<ot)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:l=Math.sqrt(2/l),i=this.mode===this.OBLIQ?this.ymf*l*(this.cosb1*r-this.sinb1*o*a):(l=Math.sqrt(2/(1+o*a)))*r*this.ymf,s=this.xmf*l*o*h;break;case this.N_POLE:case this.S_POLE:n>=0?(s=(l=Math.sqrt(n))*h,i=a*(this.mode===this.S_POLE?l:-l)):s=i=0}}return t.x=this.a*s+this.x0,t.y=this.a*i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s,i,a,h,e,n,r,o=t.x/this.a,l=t.y/this.a;if(this.sphere){var M,c=0,u=0;if(M=Math.sqrt(o*o+l*l),(i=.5*M)>1)return null;switch(i=2*Math.asin(i),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(u=Math.sin(i),c=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(M)<=ot?0:Math.asin(l*u/M),o*=u,l=c*M;break;case this.OBLIQ:i=Math.abs(M)<=ot?this.phi0:Math.asin(c*this.sinph0+l*u*this.cosph0/M),o*=u*this.cosph0,l=(c-Math.sin(i)*this.sinph0)*M;break;case this.N_POLE:l=-l,i=ht-i;break;case this.S_POLE:i-=ht}s=0!==l||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(o,l):0}else{if(r=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(o/=this.dd,l*=this.dd,(n=Math.sqrt(o*o+l*l))<ot)return t.x=0,t.y=this.phi0,t;h=2*Math.asin(.5*n/this.rq),a=Math.cos(h),o*=h=Math.sin(h),this.mode===this.OBLIQ?(r=a*this.sinb1+l*h*this.cosb1/n,e=this.qp*r,l=n*this.cosb1*a-l*this.sinb1*h):(r=l*h/n,e=this.qp*r,l=n*a)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(l=-l),!(e=o*o+l*l))return t.x=0,t.y=this.phi0,t;r=1-e/this.qp,this.mode===this.S_POLE&&(r=-r)}s=Math.atan2(o,l),i=J(Math.asin(r),this.apa)}return t.x=qt(this.long0+s),t.y=i,t},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4},Fs=function(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)},Qs={init:function(){Math.abs(this.lat1+this.lat2)<ot||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=St(this.e3,this.sin_po,this.cos_po),this.qs1=Gs(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=St(this.e3,this.sin_po,this.cos_po),this.qs2=Gs(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Gs(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>ot?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var s=t.x,i=t.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var a=Gs(this.e3,this.sin_phi,this.cos_phi),h=this.a*Math.sqrt(this.c-this.ns0*a)/this.ns0,e=this.ns0*qt(s-this.long0),n=h*Math.sin(e)+this.x0,r=this.rh-h*Math.cos(e)+this.y0;return t.x=n,t.y=r,t},inverse:function(t){var s,i,a,h,e,n;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(s=Math.sqrt(t.x*t.x+t.y*t.y),a=1):(s=-Math.sqrt(t.x*t.x+t.y*t.y),a=-1),h=0,0!==s&&(h=Math.atan2(a*t.x,a*t.y)),a=s*this.ns0/this.a,this.sphere?n=Math.asin((this.c-a*a)/(2*this.ns0)):(i=(this.c-a*a)/this.ns0,n=this.phi1z(this.e3,i)),e=qt(h/this.ns0+this.long0),t.x=e,t.y=n,t},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(t,s){var i,a,h,e,n,r=Fs(.5*s);if(t<ot)return r;for(var o=t*t,l=1;l<=25;l++)if(i=Math.sin(r),a=Math.cos(r),h=t*i,e=1-h*h,n=.5*e*e/a*(s/(1-o)-i/e+.5/t*Math.log((1-h)/(1+h))),r+=n,Math.abs(n)<=1e-7)return r;return null}},Ws={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(t){var s,i,a,h,e,n,r,o=t.x,l=t.y;return a=qt(o-this.long0),s=Math.sin(l),i=Math.cos(l),h=Math.cos(a),(e=this.sin_p14*s+this.cos_p14*i*h)>0||Math.abs(e)<=ot?(n=this.x0+1*this.a*i*Math.sin(a)/e,r=this.y0+1*this.a*(this.cos_p14*s-this.sin_p14*i*h)/e):(n=this.x0+this.infinity_dist*i*Math.sin(a),r=this.y0+this.infinity_dist*(this.cos_p14*s-this.sin_p14*i*h)),t.x=n,t.y=r,t},inverse:function(t){var s,i,a,h,e,n;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(s=Math.sqrt(t.x*t.x+t.y*t.y))?(h=Math.atan2(s,this.rc),i=Math.sin(h),a=Math.cos(h),n=Fs(a*this.sin_p14+t.y*i*this.cos_p14/s),e=Math.atan2(t.x*i,s*this.cos_p14*a-t.y*this.sin_p14*i),e=qt(this.long0+e)):(n=this.phic0,e=0),t.x=e,t.y=n,t},names:["gnom"]},Hs=function(t,s){var i=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(s)-i)<1e-6)return s<0?-1*ht:ht;for(var a,h,e,n,r=Math.asin(.5*s),o=0;o<30;o++)if(h=Math.sin(r),e=Math.cos(r),n=t*h,a=Math.pow(1-n*n,2)/(2*e)*(s/(1-t*t)-h/(1-n*n)+.5/t*Math.log((1-n)/(1+n))),r+=a,Math.abs(a)<=1e-10)return r;return NaN},Ks={init:function(){this.sphere||(this.k0=St(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var s,i,a=t.x,h=t.y,e=qt(a-this.long0);if(this.sphere)s=this.x0+this.a*e*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(h)/Math.cos(this.lat_ts);else{var n=Gs(this.e,Math.sin(h));s=this.x0+this.a*this.k0*e,i=this.y0+this.a*n*.5/this.k0}return t.x=s,t.y=i,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s,i;return this.sphere?(s=qt(this.long0+t.x/this.a/Math.cos(this.lat_ts)),i=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(i=Hs(this.e,2*t.y*this.k0/this.a),s=qt(this.long0+t.x/(this.a*this.k0))),t.x=s,t.y=i,t},names:["cea"]},Xs={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var s=t.x,i=t.y,a=qt(s-this.long0),h=Is(i-this.lat0);return t.x=this.x0+this.a*a*this.rc,t.y=this.y0+this.a*h,t},inverse:function(t){var s=t.x,i=t.y;return t.x=qt(this.long0+(s-this.x0)/(this.a*this.rc)),t.y=Is(this.lat0+(i-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},Js=20,Vs={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Ps(this.es),this.e1=Ns(this.es),this.e2=Ss(this.es),this.e3=ks(this.es),this.ml0=this.a*Es(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var s,i,a,h=t.x,e=t.y,n=qt(h-this.long0);if(a=n*Math.sin(e),this.sphere)Math.abs(e)<=ot?(s=this.a*n,i=-1*this.a*this.lat0):(s=this.a*Math.sin(a)/Math.tan(e),i=this.a*(Is(e-this.lat0)+(1-Math.cos(a))/Math.tan(e)));else if(Math.abs(e)<=ot)s=this.a*n,i=-1*this.ml0;else{var r=qs(this.a,this.e,Math.sin(e))/Math.tan(e);s=r*Math.sin(a),i=this.a*Es(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+r*(1-Math.cos(a))}return t.x=s+this.x0,t.y=i+this.y0,t},inverse:function(t){var s,i,a,h,e,n,r,o,l;if(a=t.x-this.x0,h=t.y-this.y0,this.sphere)if(Math.abs(h+this.a*this.lat0)<=ot)s=qt(a/this.a+this.long0),i=0;else{n=this.lat0+h/this.a,r=a*a/this.a/this.a+n*n,o=n;var M;for(e=Js;e;--e)if(M=Math.tan(o),l=-1*(n*(o*M+1)-o-.5*(o*o+r)*M)/((o-n)/M-1),o+=l,Math.abs(l)<=ot){i=o;break}s=qt(this.long0+Math.asin(a*Math.tan(o)/this.a)/Math.sin(i))}else if(Math.abs(h+this.ml0)<=ot)i=0,s=qt(this.long0+a/this.a);else{n=(this.ml0+h)/this.a,r=a*a/this.a/this.a+n*n,o=n;var c,u,f,m,p;for(e=Js;e;--e)if(p=this.e*Math.sin(o),c=Math.sqrt(1-p*p)*Math.tan(o),u=this.a*Es(this.e0,this.e1,this.e2,this.e3,o),f=this.e0-2*this.e1*Math.cos(2*o)+4*this.e2*Math.cos(4*o)-6*this.e3*Math.cos(6*o),m=u/this.a,l=(n*(c*m+1)-m-.5*c*(m*m+r))/(this.es*Math.sin(2*o)*(m*m+r-2*n*m)/(4*c)+(n-m)*(c*f-2/Math.sin(2*o))-f),o-=l,Math.abs(l)<=ot){i=o;break}c=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),s=qt(this.long0+Math.asin(a*c/this.a)/Math.sin(i))}return t.x=s,t.y=i,t},names:["Polyconic","poly"]},Zs={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var s,i=t.x,a=t.y-this.lat0,h=i-this.long0,e=a/at*1e-5,n=h,r=1,o=0;for(s=1;s<=10;s++)r*=e,o+=this.A[s]*r;var l,M=o,c=n,u=1,f=0,m=0,p=0;for(s=1;s<=6;s++)l=f*M+u*c,u=u*M-f*c,f=l,m=m+this.B_re[s]*u-this.B_im[s]*f,p=p+this.B_im[s]*u+this.B_re[s]*f;return t.x=p*this.a+this.x0,t.y=m*this.a+this.y0,t},inverse:function(t){var s,i,a=t.x,h=t.y,e=a-this.x0,n=(h-this.y0)/this.a,r=e/this.a,o=1,l=0,M=0,c=0;for(s=1;s<=6;s++)i=l*n+o*r,o=o*n-l*r,l=i,M=M+this.C_re[s]*o-this.C_im[s]*l,c=c+this.C_im[s]*o+this.C_re[s]*l;for(var u=0;u<this.iterations;u++){var f,m=M,p=c,d=n,y=r;for(s=2;s<=6;s++)f=p*M+m*c,m=m*M-p*c,p=f,d+=(s-1)*(this.B_re[s]*m-this.B_im[s]*p),y+=(s-1)*(this.B_im[s]*m+this.B_re[s]*p);m=1,p=0;var _=this.B_re[1],x=this.B_im[1];for(s=2;s<=6;s++)f=p*M+m*c,m=m*M-p*c,p=f,_+=s*(this.B_re[s]*m-this.B_im[s]*p),x+=s*(this.B_im[s]*m+this.B_re[s]*p);var v=_*_+x*x;M=(d*_+y*x)/v,c=(y*_-d*x)/v}var g=M,b=c,w=1,A=0;for(s=1;s<=9;s++)w*=g,A+=this.D[s]*w;var C=this.lat0+A*at*1e5,E=this.long0+b;return t.x=E,t.y=C,t},names:["New_Zealand_Map_Grid","nzmg"]},Ys={init:function(){},forward:function(t){var s=t.x,i=t.y,a=qt(s-this.long0),h=this.x0+this.a*a,e=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return t.x=h,t.y=e,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s=qt(this.long0+t.x/this.a),i=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=s,t.y=i,t},names:["Miller_Cylindrical","mill"]},$s=20,ti={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=is(this.es)},forward:function(t){var s,i,a=t.x,h=t.y;if(a=qt(a-this.long0),this.sphere){if(this.m)for(var e=this.n*Math.sin(h),n=$s;n;--n){var r=(this.m*h+Math.sin(h)-e)/(this.m+Math.cos(h));if(h-=r,Math.abs(r)<ot)break}else h=1!==this.n?Math.asin(this.n*Math.sin(h)):h;s=this.a*this.C_x*a*(this.m+Math.cos(h)),i=this.a*this.C_y*h}else{var o=Math.sin(h),l=Math.cos(h);i=this.a*as(h,o,l,this.en),s=this.a*a*l/Math.sqrt(1-this.es*o*o)}return t.x=s,t.y=i,t},inverse:function(t){var s,i,a,h;return t.x-=this.x0,a=t.x/this.a,t.y-=this.y0,s=t.y/this.a,this.sphere?(s/=this.C_y,a/=this.C_x*(this.m+Math.cos(s)),this.m?s=Fs((this.m*s+Math.sin(s))/this.n):1!==this.n&&(s=Fs(Math.sin(s)/this.n)),a=qt(a+this.long0),s=Is(s)):(s=hs(t.y/this.a,this.es,this.en),(h=Math.abs(s))<ht?(h=Math.sin(s),i=this.long0+t.x*Math.sqrt(1-this.es*h*h)/(this.a*Math.cos(s)),a=qt(i)):h-ot<ht&&(a=this.long0)),t.x=a,t.y=s,t},names:["Sinusoidal","sinu"]},si={init:function(){},forward:function(t){for(var s=t.x,i=t.y,a=qt(s-this.long0),h=i,e=Math.PI*Math.sin(i);;){var n=-(h+Math.sin(h)-e)/(1+Math.cos(h));if(h+=n,Math.abs(n)<ot)break}h/=2,Math.PI/2-Math.abs(i)<ot&&(a=0);var r=.900316316158*this.a*a*Math.cos(h)+this.x0,o=1.4142135623731*this.a*Math.sin(h)+this.y0;return t.x=r,t.y=o,t},inverse:function(t){var s,i;t.x-=this.x0,t.y-=this.y0,i=t.y/(1.4142135623731*this.a),Math.abs(i)>.999999999999&&(i=.999999999999),s=Math.asin(i);var a=qt(this.long0+t.x/(.900316316158*this.a*Math.cos(s)));a<-Math.PI&&(a=-Math.PI),a>Math.PI&&(a=Math.PI),i=(2*s+Math.sin(2*s))/Math.PI,Math.abs(i)>1&&(i=1);var h=Math.asin(i);return t.x=a,t.y=h,t},names:["Mollweide","moll"]},ii={init:function(){Math.abs(this.lat1+this.lat2)<ot||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Ps(this.es),this.e1=Ns(this.es),this.e2=Ss(this.es),this.e3=ks(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=St(this.e,this.sinphi,this.cosphi),this.ml1=Es(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<ot?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=St(this.e,this.sinphi,this.cosphi),this.ml2=Es(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Es(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(t){var s,i=t.x,a=t.y;if(this.sphere)s=this.a*(this.g-a);else{var h=Es(this.e0,this.e1,this.e2,this.e3,a);s=this.a*(this.g-h)}var e=this.ns*qt(i-this.long0),n=this.x0+s*Math.sin(e),r=this.y0+this.rh-s*Math.cos(e);return t.x=n,t.y=r,t},inverse:function(t){t.x-=this.x0,t.y=this.rh-t.y+this.y0;var s,i,a,h;this.ns>=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),s=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),s=-1);var e=0;if(0!==i&&(e=Math.atan2(s*t.x,s*t.y)),this.sphere)return h=qt(this.long0+e/this.ns),a=Is(this.g-i/this.a),t.x=h,t.y=a,t;var n=this.g-i/this.a;return a=Os(n,this.e0,this.e1,this.e2,this.e3),h=qt(this.long0+e/this.ns),t.x=h,t.y=a,t},names:["Equidistant_Conic","eqdc"]},ai={init:function(){this.R=this.a},forward:function(t){var s,i,a=t.x,h=t.y,e=qt(a-this.long0);Math.abs(h)<=ot&&(s=this.x0+this.R*e,i=this.y0);var n=Fs(2*Math.abs(h/Math.PI));(Math.abs(e)<=ot||Math.abs(Math.abs(h)-ht)<=ot)&&(s=this.x0,i=h>=0?this.y0+Math.PI*this.R*Math.tan(.5*n):this.y0+Math.PI*this.R*-Math.tan(.5*n));var r=.5*Math.abs(Math.PI/e-e/Math.PI),o=r*r,l=Math.sin(n),M=Math.cos(n),c=M/(l+M-1),u=c*c,f=c*(2/l-1),m=f*f,p=Math.PI*this.R*(r*(c-m)+Math.sqrt(o*(c-m)*(c-m)-(m+o)*(u-m)))/(m+o);e<0&&(p=-p),s=this.x0+p;var d=o+c;return p=Math.PI*this.R*(f*d-r*Math.sqrt((m+o)*(o+1)-d*d))/(m+o),i=h>=0?this.y0+p:this.y0-p,t.x=s,t.y=i,t},inverse:function(t){var s,i,a,h,e,n,r,o,l,M,c,u,f;return t.x-=this.x0,t.y-=this.y0,c=Math.PI*this.R,a=t.x/c,h=t.y/c,e=a*a+h*h,n=-Math.abs(h)*(1+e),r=n-2*h*h+a*a,o=-2*n+1+2*h*h+e*e,f=h*h/o+(2*r*r*r/o/o/o-9*n*r/o/o)/27,l=(n-r*r/3/o)/o,M=2*Math.sqrt(-l/3),c=3*f/l/M,Math.abs(c)>1&&(c=c>=0?1:-1),u=Math.acos(c)/3,i=t.y>=0?(-M*Math.cos(u+Math.PI/3)-r/3/o)*Math.PI:-(-M*Math.cos(u+Math.PI/3)-r/3/o)*Math.PI,s=Math.abs(a)<ot?this.long0:qt(this.long0+Math.PI*(e-1+Math.sqrt(1+2*(a*a-h*h)+e*e))/2/a),t.x=s,t.y=i,t},names:["Van_der_Grinten_I","VanDerGrinten","vandg"]},hi={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},forward:function(t){var s,i,a,h,e,n,r,o,l,M,c,u,f,m,p,d,y,_,x,v,g,b,w,A=t.x,C=t.y,E=Math.sin(t.y),P=Math.cos(t.y),N=qt(A-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=ot?(t.x=this.x0+this.a*(ht-C)*Math.sin(N),t.y=this.y0-this.a*(ht-C)*Math.cos(N),t):Math.abs(this.sin_p12+1)<=ot?(t.x=this.x0+this.a*(ht+C)*Math.sin(N),t.y=this.y0+this.a*(ht+C)*Math.cos(N),t):(_=this.sin_p12*E+this.cos_p12*P*Math.cos(N),d=Math.acos(_),y=d/Math.sin(d),t.x=this.x0+this.a*y*P*Math.sin(N),t.y=this.y0+this.a*y*(this.cos_p12*E-this.sin_p12*P*Math.cos(N)),t):(s=Ps(this.es),i=Ns(this.es),a=Ss(this.es),h=ks(this.es),Math.abs(this.sin_p12-1)<=ot?(e=this.a*Es(s,i,a,h,ht),n=this.a*Es(s,i,a,h,C),t.x=this.x0+(e-n)*Math.sin(N),t.y=this.y0-(e-n)*Math.cos(N),t):Math.abs(this.sin_p12+1)<=ot?(e=this.a*Es(s,i,a,h,ht),n=this.a*Es(s,i,a,h,C),t.x=this.x0+(e+n)*Math.sin(N),t.y=this.y0+(e+n)*Math.cos(N),t):(r=E/P,o=qs(this.a,this.e,this.sin_p12),l=qs(this.a,this.e,E),M=Math.atan((1-this.es)*r+this.es*o*this.sin_p12/(l*P)),c=Math.atan2(Math.sin(N),this.cos_p12*Math.tan(M)-this.sin_p12*Math.cos(N)),x=0===c?Math.asin(this.cos_p12*Math.sin(M)-this.sin_p12*Math.cos(M)):Math.abs(Math.abs(c)-Math.PI)<=ot?-Math.asin(this.cos_p12*Math.sin(M)-this.sin_p12*Math.cos(M)):Math.asin(Math.sin(N)*Math.cos(M)/Math.sin(c)),u=this.e*this.sin_p12/Math.sqrt(1-this.es),f=this.e*this.cos_p12*Math.cos(c)/Math.sqrt(1-this.es),m=u*f,p=f*f,v=x*x,g=v*x,b=g*x,w=b*x,d=o*x*(1-v*p*(1-p)/6+g/8*m*(1-2*p)+b/120*(p*(4-7*p)-3*u*u*(1-7*p))-w/48*m),t.x=this.x0+d*Math.sin(c),t.y=this.y0+d*Math.cos(c),t))},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s,i,a,h,e,n,r,o,l,M,c,u,f,m,p,d,y,_,x,v,g,b,w;if(this.sphere){if((s=Math.sqrt(t.x*t.x+t.y*t.y))>2*ht*this.a)return;return i=s/this.a,a=Math.sin(i),h=Math.cos(i),e=this.long0,Math.abs(s)<=ot?n=this.lat0:(n=Fs(h*this.sin_p12+t.y*a*this.cos_p12/s),r=Math.abs(this.lat0)-ht,e=qt(Math.abs(r)<=ot?this.lat0>=0?this.long0+Math.atan2(t.x,-t.y):this.long0-Math.atan2(-t.x,t.y):this.long0+Math.atan2(t.x*a,s*this.cos_p12*h-t.y*this.sin_p12*a))),t.x=e,t.y=n,t}return o=Ps(this.es),l=Ns(this.es),M=Ss(this.es),c=ks(this.es),Math.abs(this.sin_p12-1)<=ot?(u=this.a*Es(o,l,M,c,ht),s=Math.sqrt(t.x*t.x+t.y*t.y),f=u-s,n=Os(f/this.a,o,l,M,c),e=qt(this.long0+Math.atan2(t.x,-1*t.y)),t.x=e,t.y=n,t):Math.abs(this.sin_p12+1)<=ot?(u=this.a*Es(o,l,M,c,ht),s=Math.sqrt(t.x*t.x+t.y*t.y),f=s-u,n=Os(f/this.a,o,l,M,c),e=qt(this.long0+Math.atan2(t.x,t.y)),t.x=e,t.y=n,t):(s=Math.sqrt(t.x*t.x+t.y*t.y),d=Math.atan2(t.x,t.y),m=qs(this.a,this.e,this.sin_p12),y=Math.cos(d),_=this.e*this.cos_p12*y,x=-_*_/(1-this.es),v=3*this.es*(1-x)*this.sin_p12*this.cos_p12*y/(1-this.es),g=s/m,b=g-x*(1+x)*Math.pow(g,3)/6-v*(1+3*x)*Math.pow(g,4)/24,w=1-x*b*b/2-g*b*b*b/6,p=Math.asin(this.sin_p12*Math.cos(b)+this.cos_p12*Math.sin(b)*y),e=qt(this.long0+Math.asin(Math.sin(d)*Math.sin(b)/Math.cos(p))),n=Math.atan((1-this.es*w*this.sin_p12/Math.sin(p))*Math.tan(p)/(1-this.es)),t.x=e,t.y=n,t)},names:["Azimuthal_Equidistant","aeqd"]},ei={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var s,i,a,h,e,n,r,o=t.x,l=t.y;return a=qt(o-this.long0),s=Math.sin(l),i=Math.cos(l),h=Math.cos(a),((e=this.sin_p14*s+this.cos_p14*i*h)>0||Math.abs(e)<=ot)&&(n=1*this.a*i*Math.sin(a),r=this.y0+1*this.a*(this.cos_p14*s-this.sin_p14*i*h)),t.x=n,t.y=r,t},inverse:function(t){var s,i,a,h,e,n,r;return t.x-=this.x0,t.y-=this.y0,s=Math.sqrt(t.x*t.x+t.y*t.y),i=Fs(s/this.a),a=Math.sin(i),h=Math.cos(i),n=this.long0,Math.abs(s)<=ot?(r=this.lat0,t.x=n,t.y=r,t):(r=Fs(h*this.sin_p14+t.y*a*this.cos_p14/s),e=Math.abs(this.lat0)-ht,Math.abs(e)<=ot?(n=qt(this.lat0>=0?this.long0+Math.atan2(t.x,-t.y):this.long0-Math.atan2(-t.x,t.y)),t.x=n,t.y=r,t):(n=qt(this.long0+Math.atan2(t.x*a,s*this.cos_p14*h-t.y*this.sin_p14*a)),t.x=n,t.y=r,t))},names:["ortho"]},ni={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},ri={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4},oi={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=ht-ct/2?this.face=ni.TOP:this.lat0<=-(ht-ct/2)?this.face=ni.BOTTOM:Math.abs(this.long0)<=ct?this.face=ni.FRONT:Math.abs(this.long0)<=ht+ct?this.face=this.long0>0?ni.RIGHT:ni.LEFT:this.face=ni.BACK,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var s,i,a,h,e,n,r={x:0,y:0},o={value:0};if(t.x-=this.long0,s=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,i=t.x,this.face===ni.TOP)h=ht-s,i>=ct&&i<=ht+ct?(o.value=ri.AREA_0,a=i-ht):i>ht+ct||i<=-(ht+ct)?(o.value=ri.AREA_1,a=i>0?i-ft:i+ft):i>-(ht+ct)&&i<=-ct?(o.value=ri.AREA_2,a=i+ht):(o.value=ri.AREA_3,a=i);else if(this.face===ni.BOTTOM)h=ht+s,i>=ct&&i<=ht+ct?(o.value=ri.AREA_0,a=-i+ht):i<ct&&i>=-ct?(o.value=ri.AREA_1,a=-i):i<-ct&&i>=-(ht+ct)?(o.value=ri.AREA_2,a=-i-ht):(o.value=ri.AREA_3,a=i>0?-i+ft:-i-ft);else{var l,M,c,u,f,m;this.face===ni.RIGHT?i=Z(i,+ht):this.face===ni.BACK?i=Z(i,+ft):this.face===ni.LEFT&&(i=Z(i,-ht)),u=Math.sin(s),f=Math.cos(s),m=Math.sin(i),l=f*Math.cos(i),M=f*m,c=u,this.face===ni.FRONT?a=V(h=Math.acos(l),c,M,o):this.face===ni.RIGHT?a=V(h=Math.acos(M),c,-l,o):this.face===ni.BACK?a=V(h=Math.acos(-l),c,-M,o):this.face===ni.LEFT?a=V(h=Math.acos(-M),c,l,o):(h=a=0,o.value=ri.AREA_0)}return n=Math.atan(12/ft*(a+Math.acos(Math.sin(a)*Math.cos(ct))-ht)),e=Math.sqrt((1-Math.cos(h))/(Math.cos(n)*Math.cos(n))/(1-Math.cos(Math.atan(1/Math.cos(a))))),o.value===ri.AREA_1?n+=ht:o.value===ri.AREA_2?n+=ft:o.value===ri.AREA_3&&(n+=1.5*ft),r.x=e*Math.cos(n),r.y=e*Math.sin(n),r.x=r.x*this.a+this.x0,r.y=r.y*this.a+this.y0,t.x=r.x,t.y=r.y,t},inverse:function(t){var s,i,a,h,e,n,r,o,l,M={lam:0,phi:0},c={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,i=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),s=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?c.value=ri.AREA_0:t.y>=0&&t.y>=Math.abs(t.x)?(c.value=ri.AREA_1,s-=ht):t.x<0&&-t.x>=Math.abs(t.y)?(c.value=ri.AREA_2,s=s<0?s+ft:s-ft):(c.value=ri.AREA_3,s+=ht),l=ft/12*Math.tan(s),e=Math.sin(l)/(Math.cos(l)-1/Math.sqrt(2)),n=Math.atan(e),a=Math.cos(s),h=Math.tan(i),(r=1-a*a*h*h*(1-Math.cos(Math.atan(1/Math.cos(n)))))<-1?r=-1:r>1&&(r=1),this.face===ni.TOP)o=Math.acos(r),M.phi=ht-o,c.value===ri.AREA_0?M.lam=n+ht:c.value===ri.AREA_1?M.lam=n<0?n+ft:n-ft:c.value===ri.AREA_2?M.lam=n-ht:M.lam=n;else if(this.face===ni.BOTTOM)o=Math.acos(r),M.phi=o-ht,c.value===ri.AREA_0?M.lam=-n+ht:c.value===ri.AREA_1?M.lam=-n:c.value===ri.AREA_2?M.lam=-n-ht:M.lam=n<0?-n-ft:-n+ft;else{var u,f,m;l=(u=r)*u,f=(l+=(m=l>=1?0:Math.sqrt(1-l)*Math.sin(n))*m)>=1?0:Math.sqrt(1-l),c.value===ri.AREA_1?(l=f,f=-m,m=l):c.value===ri.AREA_2?(f=-f,m=-m):c.value===ri.AREA_3&&(l=f,f=m,m=-l),this.face===ni.RIGHT?(l=u,u=-f,f=l):this.face===ni.BACK?(u=-u,f=-f):this.face===ni.LEFT&&(l=u,u=f,f=-l),M.phi=Math.acos(-m)-ht,M.lam=Math.atan2(f,u),this.face===ni.RIGHT?M.lam=Z(M.lam,-ht):this.face===ni.BACK?M.lam=Z(M.lam,-ft):this.face===ni.LEFT&&(M.lam=Z(M.lam,+ht))}if(0!==this.es){var p,d,y;p=M.phi<0?1:0,d=Math.tan(M.phi),y=this.b/Math.sqrt(d*d+this.one_minus_f_squared),M.phi=Math.atan(Math.sqrt(this.a*this.a-y*y)/(this.one_minus_f*y)),p&&(M.phi=-M.phi)}return M.lam+=this.long0,t.x=M.lam,t.y=M.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},li=[[1,2.2199e-17,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Mi=[[-5.20417e-18,.0124,1.21431e-18,-8.45284e-11],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],ci=.8487,ui=1.3523,fi=Mt/5,mi=1/fi,pi=18,di=function(t,s){return t[0]+s*(t[1]+s*(t[2]+s*t[3]))},yi=function(t,s){return t[1]+s*(2*t[2]+3*s*t[3])},_i={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var s=qt(t.x-this.long0),i=Math.abs(t.y),a=Math.floor(i*fi);a<0?a=0:a>=pi&&(a=pi-1),i=Mt*(i-mi*a);var h={x:di(li[a],i)*s,y:di(Mi[a],i)};return t.y<0&&(h.y=-h.y),h.x=h.x*this.a*ci+this.x0,h.y=h.y*this.a*ui+this.y0,h},inverse:function(t){var s={x:(t.x-this.x0)/(this.a*ci),y:Math.abs(t.y-this.y0)/(this.a*ui)};if(s.y>=1)s.x/=li[pi][0],s.y=t.y<0?-ht:ht;else{var i=Math.floor(s.y*pi);for(i<0?i=0:i>=pi&&(i=pi-1);;)if(Mi[i][0]>s.y)--i;else{if(!(Mi[i+1][0]<=s.y))break;++i}var a=Mi[i],h=5*(s.y-a[0])/(Mi[i+1][0]-a[0]);h=Y(function(t){return(di(a,t)-s.y)/yi(a,t)},h,ot,100),s.x/=di(li[i],h),s.y=(5*i+h)*lt,t.y<0&&(s.y=-s.y)}return s.x=qt(s.x+this.long0),s},names:["Robinson","robin"]};return I.defaultDatum="WGS84",I.Proj=Projection,I.WGS84=new I.Proj("WGS84"),I.Point=Point,I.toPoint=Ft,I.defs=o,I.transform=S,I.mgrs=ts,I.version="2.5.0",function(proj4){proj4.Proj.projections.add(es),proj4.Proj.projections.add(ms),proj4.Proj.projections.add(ds),proj4.Proj.projections.add(vs),proj4.Proj.projections.add(gs),proj4.Proj.projections.add(bs),proj4.Proj.projections.add(ws),proj4.Proj.projections.add(As),proj4.Proj.projections.add(Cs),proj4.Proj.projections.add(Rs),proj4.Proj.projections.add(Us),proj4.Proj.projections.add(Qs),proj4.Proj.projections.add(Ws),proj4.Proj.projections.add(Ks),proj4.Proj.projections.add(Xs),proj4.Proj.projections.add(Vs),proj4.Proj.projections.add(Zs),proj4.Proj.projections.add(Ys),proj4.Proj.projections.add(ti),proj4.Proj.projections.add(si),proj4.Proj.projections.add(ii),proj4.Proj.projections.add(ai),proj4.Proj.projections.add(hi),proj4.Proj.projections.add(ei),proj4.Proj.projections.add(oi),proj4.Proj.projections.add(_i)}(I),I});