UNPKG

138 kBJavaScriptView Raw
1!function(t){"use strict";function e(t){for(var e=t.length,i=1/0,a=-(1/0);e--;){var r=t[e];null==r||(i>r?i=r:r>a&&(a=r))}return i===1/0?i=a:a===-(1/0)&&(a=i),i!==1/0&&i!==-(1/0)||(i=null,a=null),[i,a]}function i(t,e){if(0===t.length)throw new Error("Array must have at least one element");var i=-1,a=t.length,r=1===t.length||t[0]<t[1];if(r)for(;a-i>1;){var s=Math.round((i+a)/2);t[s]<=e?i=s:a=s}else for(;a-i>1;){var n=Math.round((i+a)/2);t[n]>=e?i=n:a=n}return t[i]===e&&(a=i),-1===i&&(i=a),a===t.length&&(a=i),[i,a]}function a(t,e){var a=i(t,e),r=a[0],s=a[1];return Math.abs(e-t[r])<=Math.abs(e-t[s])?r:s}function r(t){var e=arguments.length<=1||void 0===arguments[1]?ht:arguments[1];if(e in t)return e;var i=e.split("-")[0],a=Object.keys(t).filter(function(t){return i===t.split("-")[0]});return a.length?a[0]:Object.keys(t)[0]}function s(t){var e=arguments.length<=1||void 0===arguments[1]?ht:arguments[1],i=r(t,e);return t[i]}function n(t,e){if(!t)return"";if(t.symbol){var i=t.symbol.value||t.symbol,a=t.symbol.type;return"http://www.opengis.net/def/uom/UCUM/"===a&&("Cel"===i?i="°C":"1"===i&&(i="")),i}return s(t.label,e)}function h(t){var e=1/0,i=-(1/0),a=function(t){null!==t&&(e>t&&(e=t),t>i&&(i=t))};return u(t,a),e===1/0?[void 0,void 0]:[e,i]}function o(t,e,i){var a=i,r=function(t){a=e(a,t)};return u(t,r),a}function u(t,e){var i=[].concat(pt(t.shape));i.sort(function(t,e){var i=ct(t,2),a=i[1],r=ct(e,2),s=r[1];return a-s});var a="var obj = {}",r="",s=!0,n=!1,h=void 0;try{for(var o,u=i[Symbol.iterator]();!(s=(o=u.next()).done);s=!0){var l=ct(o.value,2),f=l[0],c=l[1];a+="\n for (var i"+f+"=0; i"+f+" < "+c+"; ++i"+f+") {\n obj['"+f+"'] = i"+f+"\n ",r+="}"}}catch(p){n=!0,h=p}finally{try{!s&&u["return"]&&u["return"]()}finally{if(n)throw h}}a+="\n fn(get(obj))\n ";var d=new Function("return function iterRange (get, fn) { "+a+" "+r+" }")();d(t.get,e)}function l(t,e){var i=!0,a=!1,r=void 0;try{for(var s,n=function(){var i=ct(s.value,2),a=i[0],r=i[1];if(-1!==r.indexOf(e)){var n=t.observedProperty.categories.filter(function(t){return t.id===a})[0];return{v:n}}},h=t.categoryEncoding[Symbol.iterator]();!(i=(s=h.next()).done);i=!0){var o=n();if("object"===("undefined"==typeof o?"undefined":ot(o)))return o.v}}catch(u){a=!0,r=u}finally{try{!i&&h["return"]&&h["return"]()}finally{if(a)throw r}}}function f(t){return t.type===it}function c(t){if(!f(t))throw new Error("must be a Coverage")}function p(t){return t.type===et}function d(t){if(!p(t))throw new Error("must be a Domain")}function y(t,e){return e={exports:{}},t(e,e.exports),e.exports}function m(t,e){var i=t.referencing.find(function(t){return-1!==t.coordinates.indexOf(e)});return i}function v(t){var e=function(t){return-1!==["GeodeticCRS","GeographicCRS","GeocentricCRS","ProjectedCRS"].indexOf(t.system.type)},i=t.referencing.find(e);return i}function M(t){return"GeographicCRS"===t.type||-1!==Pa.indexOf(t.id)}function g(t){var e=t.referencing.some(function(t){return M(t.system)});if(e)return P(t);var i=v(t);if(!i)throw new Error("No horizontal CRS found in coverage domain");var a=i.system.id,r=ga(a);if(!r)throw new Error("Projection "+a+" not cached in uriproj, use loadProjection() instead");return w(r)}function b(t){try{return g(t)}catch(e){}var i=v(t);if(!i)throw new Error("No horizontal CRS found in coverage domain");var a=i.system.id;return Ma(a).then(function(t){return w(t)})}function _(t){return x(t)}function x(t){var e=v(t);return e.coordinates}function w(t){return{project:function(e){var i=e.lon,a=e.lat,r=t.forward([i,a]),s=ct(r,2),n=s[0],h=s[1];return{x:n,y:h}},unproject:function(e){var i=e.x,a=e.y,r=t.inverse([i,a]),s=ct(r,2),n=s[0],h=s[1];return{lon:n,lat:h}}}}function P(t){var e=t.referencing.find(function(t){return M(t.system)}),i=ja[e.system.id];if(i>1)throw new Error;var a=e.coordinates[i],r=void 0,s=void 0;if(t.axes.has(a)){var n=a,h=t.axes.get(n).values;if(r=h[0],s=h[h.length-1],r>s){var o=[s,r];r=o[0],s=o[1]}}else{var u=[].concat(pt(t.axes.values())),l=u.find(function(t){return-1!==t.coordinates.indexOf(a)}),f=l.coordinates.indexOf(a);if(r=1/0,s=-(1/0),l.dataType===st){var c=!0,p=!1,d=void 0;try{for(var y,m=l.values[Symbol.iterator]();!(c=(y=m.next()).done);c=!0){var v=y.value,g=v[f];r=Math.min(g,r),s=Math.max(g,s)}}catch(b){p=!0,d=b}finally{try{!c&&m["return"]&&m["return"]()}finally{if(p)throw d}}}else{if(l.dataType!==nt)throw new Error("Unsupported data type: "+l.dataType);var _=!0,x=!1,w=void 0;try{for(var P,j=l.values[Symbol.iterator]();!(_=(P=j.next()).done);_=!0){var k=P.value,S=!0,C=!1,E=void 0;try{for(var O,A=k[Symbol.iterator]();!(S=(O=A.next()).done);S=!0){var I=O.value,N=!0,T=!1,R=void 0;try{for(var q,G=I[Symbol.iterator]();!(N=(q=G.next()).done);N=!0){var B=q.value,D=B[f];r=Math.min(D,r),s=Math.max(D,s)}}catch(b){T=!0,R=b}finally{try{!N&&G["return"]&&G["return"]()}finally{if(T)throw R}}}}catch(b){C=!0,E=b}finally{try{!S&&A["return"]&&A["return"]()}finally{if(C)throw E}}}}catch(b){x=!0,w=b}finally{try{!_&&j["return"]&&j["return"]()}finally{if(x)throw w}}}}var L=(s+r)/2,z=L-180,U=L+180;return{project:function(t){var e=t.lon,a=t.lat,r=void 0;r=e>=z&&U>=e?e:((e-z)%360+360)%360+z;var s=0===i?[r,a]:[a,r],n=ct(s,2),h=n[0],o=n[1];return{x:h,y:o}},unproject:function(t){var e=t.x,a=t.y,r=0===i?[e,a]:[a,e],s=ct(r,2),n=s[0],h=s[1];return{lon:n,lat:h}}}}function j(t,e,i){return i.project(e.unproject(t))}function k(t,e){if(!S(t,e))throw new Error("'"+e+"' is not a longitude axis");var i=t.axes.get(e).values,a=i[0],r=i[i.length-1];if(a>r){var s=[r,a];a=s[0],r=s[1]}var n=(r+a)/2,h=n-180,o=n+180;return function(t){return t>=h&&o>=t?t:((t-h)%360+360)%360+h}}function S(t,e){var i=m(t,e);if(!i)return!1;var a=i.system.id;if(-1===Pa.indexOf(a))return!1;var r=i.coordinates.indexOf(e),s=ja[a]===r;return s}function C(t,e){var i=t.axes.get(e).values[0];return"string"!=typeof i?!1:!isNaN(new Date(i).getTime())}function E(t){var e=void 0,i=!1;if("string"==typeof t?e=new Date(t).getTime():t instanceof Date?e=t.getTime():i=!0,isNaN(e)&&(i=!0),i)throw new Error("Invalid date: "+t);return e}function O(t,e){var i={};for(var a in e)if(t.axes.has(a)&&void 0!==e[a]&&null!==e[a]){if("number"==typeof e[a]){var r=e[a];i[a]={start:r,stop:r+1}}else i[a]=e[a];var s=i[a],n=s.start,h=void 0===n?0:n,o=s.stop,u=void 0===o?t.axes.get(a).values.length:o,l=s.step,f=void 0===l?1:l;if(0>=f)throw new Error("Invalid constraint for "+a+": step="+f+" must be > 0");if(h>=u||0>h)throw new Error("Invalid constraint for "+a+": stop="+u+" must be > start="+h+" and both >= 0");i[a]={start:h,stop:u,step:f}}var c=!0,p=!1,d=void 0;try{for(var y,m=t.axes.keys()[Symbol.iterator]();!(c=(y=m.next()).done);c=!0){var v=y.value;if(!(v in i)){var M=t.axes.get(v).values.length;i[v]={start:0,stop:M,step:1}}}}catch(g){p=!0,d=g}finally{try{!c&&m["return"]&&m["return"]()}finally{if(p)throw d}}return i}function A(t,e){e=O(t,e);var i={type:et,domainType:t.domainType,axes:new Map(t.axes),referencing:t.referencing},a=!0,r=!1,s=void 0;try{for(var n,h=function(){var a=n.value,r=t.axes.get(a),s=r.values,h=r.bounds,o=e[a],u=void 0,l=void 0,f=o.start,c=o.stop,p=o.step;if(0===f&&c===s.length&&1===p)u=s,l=h;else if(1===p)u=s.subarray?s.subarray(f,c):s.slice(f,c),h&&(l={get:function(t){return h.get(f+t)}});else{var d=Math.trunc((c-f)/p),y=(c-f)%p,m=d+y;u=new s.constructor(m);for(var v=f,M=0;c>v;v+=p,M++)u[M]=s[v];h&&(l={get:function(t){return h.get(f+t*p)}})}var g={dataType:r.dataType,coordinates:r.coordinates,values:u,bounds:l};i.axes.set(a,g)},o=Object.keys(e)[Symbol.iterator]();!(a=(n=o.next()).done);a=!0)h()}catch(u){r=!0,s=u}finally{try{!a&&o["return"]&&o["return"]()}finally{if(r)throw s}}return i}function I(t,e){var i,a=arguments.length<=2||void 0===arguments[2]?["x","y"]:arguments[2],r=ct(e,4),s=r[0],n=r[1],h=r[2],o=r[3];return t.subsetByValue((i={},ft(i,a[0],{start:s,stop:h}),ft(i,a[1],{start:n,stop:o}),i))}function N(t,e){return t.loadDomain().then(function(i){e=O(i,e);var a=A(i,e),r=function(t){var r={dataType:t.dataType,get:function(i){var a={},r=!0,s=!1,n=void 0;try{for(var h,o=Object.keys(i)[Symbol.iterator]();!(r=(h=o.next()).done);r=!0){var u=h.value,l=e[u],f=l.start,c=l.step;a[u]=f+i[u]*c}}catch(p){s=!0,n=p}finally{try{!r&&o["return"]&&o["return"]()}finally{if(s)throw n}}return t.get(a)}};r.shape=new Map;var s=!0,n=!1,h=void 0;try{for(var o,u=i.axes.keys()[Symbol.iterator]();!(s=(o=u.next()).done);s=!0){var l=o.value,f=a.axes.get(l).values.length;r.shape.set(l,f)}}catch(c){n=!0,h=c}finally{try{!s&&u["return"]&&u["return"]()}finally{if(n)throw h}}return r},s=function(e){return t.loadRange(e).then(r)},n=function(e){return t.loadRanges(e).then(function(t){return new Map([].concat(pt(t)).map(function(t){var e=ct(t,2),i=e[0],a=e[1];return[i,r(a)]}))})},h={type:it,domainType:t.domainType,parameters:t.parameters,loadDomain:function(){return Promise.resolve(a)},loadRange:s,loadRanges:n};return h.subsetByIndex=N.bind(null,h),h.subsetByValue=T.bind(null,h),h})}function T(t,e){return t.loadDomain().then(function(r){var s={},n=!0,h=!1,o=void 0;try{for(var u,l=Object.keys(e)[Symbol.iterator]();!(n=(u=l.next()).done);n=!0){var f=u.value,c=e[f];if(void 0!==c&&null!==c&&r.axes.has(f)){var p=r.axes.get(f),d=p.values,y=C(r,f),m=S(r,f),v=m?k(r,f):void 0;if("number"==typeof c||"string"==typeof c||c instanceof Date){var M=c;y?(M=E(M),d=d.map(function(t){return new Date(t).getTime()})):m&&(M=v(M));var g=void 0;if(g=d.indexOf?d.indexOf(M):Array.prototype.indexOf.call(d,M),-1===g)throw new Error("Domain value not found: "+c);s[f]=g}else if("target"in c){var b=c.target;if(y)b=E(b),d=d.map(function(t){return new Date(t).getTime()});else if(m)b=v(b);else if("number"!=typeof d[0]||"number"!=typeof b)throw new Error("Invalid axis or constraint value type");var _=a(d,b);s[f]=_}else{if(!("start"in c&&"stop"in c))throw new Error("Invalid subset constraints");var x=c.start,w=c.stop;if(y){var P=[E(x),E(w)];x=P[0],w=P[1],d=d.map(function(t){return new Date(t).getTime()})}else if(m){var j=[v(x),v(w)];x=j[0],w=j[1]}else if("number"!=typeof d[0]||"number"!=typeof x)throw new Error("Invalid axis or constraint value type");var O=i(d,x),A=ct(O,2),I=A[0],N=A[1],T=i(d,w),R=ct(T,2),q=R[0],G=R[1],B=Math.min(I,N,q,G),D=Math.max(I,N,q,G)+1;s[f]={start:B,stop:D}}}}}catch(L){h=!0,o=L}finally{try{!n&&l["return"]&&l["return"]()}finally{if(h)throw o}}return t.subsetByIndex(s)})}function R(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];d(t);var i=e.gridAxes;i=void 0===i?["x","y"]:i;var a=ct(i,2),r=a[0],s=a[1],n="domain",h="Domain",o=t.axes.has(r)&&t.axes.has(s)&&(t.axes.get(r).values.length>1||t.axes.get(s).values.length>1),u=void 0,l=void 0,f="a",c=0,p="b",y=1;o?(u=[{id:f,label:{en:"A"}},{id:p,label:{en:"B"}}],l=new Map([[f,[c]],[p,[y]]])):(u=[{id:f,label:{en:"X"}}],l=new Map([[f,[c]]]));var m=new Map;m.set(n,{key:n,observedProperty:{label:{en:h},categories:u},categoryEncoding:l});var v=new Map([].concat(pt(t.axes)).map(function(t){var e=ct(t,2),i=e[0],a=e[1];return[i,a.values.length]})),M=void 0;o?!function(){var t=function(t){return t%2};M=function(e){var i=e.x,a=void 0===i?0:i,r=e.y,s=void 0===r?0:r;return t(a+s)?c:y}}():M=function(){return c};var g=function(){return Promise.resolve({shape:v,dataType:"integer",get:M})},b={type:it,domainType:t.domainType,parameters:m,loadDomain:function(){return Promise.resolve(t)},loadRange:g};return B(b),G(b),b}function q(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=e.parameter,a=void 0===i?{key:"p1",observedProperty:{label:{en:"Parameter 1"}}}:i,r=e.referencing,s=e.domainType,n=new Map;n.set(a.key,a),r||(r=[],t.coords.has("x")&&t.coords.has("y")&&r.push({coordinates:["x","y"],system:{type:"GeographicCRS",id:"http://www.opengis.net/def/crs/OGC/1.3/CRS84"}}),t.coords.has("t")&&r.push({coordinates:["t"],system:{type:"TemporalRS",calendar:"Gregorian"}}));var h=new Map,o=!0,u=!1,l=void 0;try{for(var f,c=t.coords[Symbol.iterator]();!(o=(f=c.next()).done);o=!0){for(var p=ct(f.value,2),d=p[0],y=p[1],m=new Array(y.size),v=0;v<y.size;v++)m[v]=y.get(v);h.set(d,{key:d,coordinates:[d],values:m})}}catch(M){u=!0,l=M}finally{try{!o&&c["return"]&&c["return"]()}finally{if(u)throw l}}var g={type:et,domainType:s,referencing:r,axes:h},b=new Map([].concat(pt(g.axes)).map(function(t){var e=ct(t,2),i=e[0],a=e[1];return[i,a.values.length]})),_=-1!==t.dtype.indexOf("int")?"integer":"float",x=function(){return Promise.resolve({shape:b,dataType:_,get:t.xget.bind(t)})},w={type:it,domainType:s,parameters:n,loadDomain:function(){return Promise.resolve(g)},loadRange:x};return B(w),G(w),w}function G(t){c(t),t.subsetByIndex=N.bind(null,t),t.subsetByValue=T.bind(null,t)}function B(t){function e(e){return e||(e=t.parameters.keys()),Promise.all([].concat(pt(e)).map(t.loadRange)).then(function(t){return new Map(e.map(function(e,i){return[e,t[i]]}))})}c(t),t.loadRanges=e}function D(t){var e=void 0;if(t instanceof Map)e=new Map(t);else{e=Object.create(Object.getPrototypeOf(t));for(var i in t)e[i]=t[i]}return e}function L(t,e){return t.loadDomain().then(function(i){var a=v(i);if(a.coordinates.length>2)throw new Error("Reprojection not supported for >2D CRSs");if(a.coordinates.some(i.axes.has))throw new Error("Grid reprojection not supported yet");var r=ct(a.coordinates,2),s=r[0],n=r[1],h=[].concat(pt(i.axes.values())),o=h.find(function(t){return a.coordinates.every(function(e){return-1!==t.coordinates.indexOf(e)})}),u=o.coordinates.indexOf(s),l=o.coordinates.indexOf(n),f=g(i),c=g(e),p=void 0;if(o.dataType!==st)throw new Error("Unsupported data type: "+o.dataType);p=o.values.map(function(t){return t.slice()});var d=!0,y=!1,m=void 0;try{for(var M,b=p[Symbol.iterator]();!(d=(M=b.next()).done);d=!0){var _=M.value,x=_[u],w=_[l],P=f.unproject({x:x,y:w}),j=c.project(P),k=j.x,S=j.y;_[u]=k,_[l]=S}}catch(C){y=!0,m=C}finally{try{!d&&b["return"]&&b["return"]()}finally{if(y)throw m}}var E=new Map(i.axes),O=D(o);delete O.bounds,O.values=p,E.set(o.key,O);var A=v(e);if(A.coordinates.length>2)throw new Error("Reprojection not supported for >2D CRSs");var I=i.referencing.map(function(t){return t===a?{coordinates:a.coordinates,system:A.system}:t}),N={type:et,domainType:i.domainType,axes:E,referencing:I},T={type:it,domainType:t.domainType,parameters:t.parameters,loadDomain:function(){return Promise.resolve(N)},loadRange:function(e){return t.loadRange(e)},loadRanges:function(e){return t.loadRanges(e)},subsetByIndex:function(i){return t.subsetByIndex(i).then(function(t){return L(t,e)})},subsetByValue:function(i){return t.subsetByValue(i).then(function(t){return L(t,e)})}};return T})}function z(t,e){var i={type:it,domainType:t.domainType,parameters:e,loadDomain:function(){return t.loadDomain()},loadRange:function(e){return t.loadRange(e)},loadRanges:function(e){return t.loadRanges(e)},subsetByIndex:function(i){return t.subsetByIndex(i).then(function(t){return z(t,e)})},subsetByValue:function(i){return t.subsetByValue(i).then(function(t){return z(t,e)})}};return i}function U(t,e,i,a){if(c(t),i.categories.some(function(t){return!t.id}))throw new Error('At least one category object is missing the "id" property');var r=D(t.parameters),s=D(r.get(e));r.set(e,s),r.get(e).observedProperty=i;var n=t.parameters.get(e).categoryEncoding,h=new Map,o=i.categories,u=!0,l=!1,f=void 0;try{for(var p,d=o[Symbol.iterator]();!(u=(p=d.next()).done);u=!0){var y=p.value,m=[],v=!0,M=!1,g=void 0;try{for(var b,_=a[Symbol.iterator]();!(v=(b=_.next()).done);v=!0){var x=ct(b.value,2),w=x[0],P=x[1];P===y.id&&n.has(w)&&m.push.apply(m,pt(n.get(w)))}}catch(j){M=!0,g=j}finally{try{!v&&_["return"]&&_["return"]()}finally{if(M)throw g}}m.length>0&&h.set(y.id,m)}}catch(j){l=!0,f=j}finally{try{!u&&d["return"]&&d["return"]()}finally{if(l)throw f}}r.get(e).categoryEncoding=h;var k=z(t,r);return k}function F(t,e){c(t);var i=function(t){var i={type:et,domainType:e,axes:t.axes,referencing:t.referencing};return i},a={type:it,domainType:e,parameters:t.parameters,loadDomain:function(){return t.loadDomain().then(i)},loadRange:function(e){return t.loadRange(e)},loadRanges:function(e){return t.loadRanges(e)},subsetByIndex:function(i){return t.subsetByIndex(i).then(function(t){return F(t,e)})},subsetByValue:function(i){return t.subsetByValue(i).then(function(t){return F(t,e)})}};return a}function V(t){return t.loadDomain().then(function(t){})}function Q(t,e){c(t),e=new Map(e);var i=!0,a=!1,r=void 0;try{for(var s,n=t.axes.keys()[Symbol.iterator]();!(i=(s=n.next()).done);i=!0){var h=s.value;e.has(h)||e.set(h,h)}}catch(o){a=!0,r=o}finally{try{!i&&n["return"]&&n["return"]()}finally{if(a)throw r}}var u=function(t){var i=new Map,a=!0,r=!1,s=void 0;try{for(var n,h=e[Symbol.iterator]();!(a=(n=h.next()).done);a=!0){var o=ct(n.value,2),u=o[0],l=o[1],f=t.axes.get(u),c=f.dataType,p=f.coordinates,d=f.values,y=f.bounds,m={key:l,dataType:c,coordinates:p.map(function(t){return e.has(t)?e.get(t):t}),values:d,bounds:y};i.set(l,m)}}catch(v){r=!0,s=v}finally{try{!a&&h["return"]&&h["return"]()}finally{if(r)throw s}}var M=t.referencing.map(function(t){var i=t.coordinates,a=t.system;return{coordinates:i.map(function(t){return e.has(t)?e.get(t):t}),system:a}}),g={type:et,domainType:t.domainType,axes:i,referencing:M};return g},l=[].concat(pt(e)).map(function(t){var e=ct(t,2),i=e[0],a=e[1];return"['"+i+"']:obj['"+a+"']"}).join(","),f=function(t){var i=new Function("range","return function get (obj){return range.get({"+l+"})}")(t),a={shape:new Map([].concat(pt(t.shape)).map(function(t){var i=ct(t,2),a=i[0],r=i[1];return[e.get(a),r]})),dataType:t.dataType,get:i};return a},p=function(e){return t.loadRange(e).then(f)},d=function(e){return t.loadRanges(e).then(function(t){return new Map([].concat(pt(t)).map(function(t){var e=ct(t,2),i=e[0],a=e[1];return[i,f(a)]}))})},y={type:it,domainType:t.domainType,parameters:t.parameters,loadDomain:function(){return t.loadDomain().then(u)},loadRange:p,loadRanges:d,subsetByIndex:function(i){return t.subsetByIndex(i).then(function(t){return Q(t,e)})},subsetByValue:function(i){return t.subsetByValue(i).then(function(t){return Q(t,e)})}};return y}function H(t,e,i,a){c(t);var r=function(t){var e={shape:t.shape,dataType:a||t.dataType,get:function(e){return i(e,t)}};return e},s=function(i){return e===i?t.loadRange(i).then(r):t.loadRange(i)},n=function(i){return t.loadRanges(i).then(function(t){return new Map([].concat(pt(t)).map(function(t){var i=ct(t,2),a=i[0],s=i[1];return[a,e===a?r(s):s]}))})},h={type:it,domainType:t.domainType,parameters:t.parameters,loadDomain:function(){return t.loadDomain()},loadRange:s,loadRanges:n,subsetByIndex:function(r){return t.subsetByIndex(r).then(function(t){return H(t,e,i,a)})},subsetByValue:function(r){return t.subsetByValue(r).then(function(t){return H(t,e,i,a)})}};return h}function W(t,e){c(t);var i=e.parameter,a=e.inputParameters,r=e.dataType,s=void 0===r?"float":r,n=e.fn,h=new Map(t.parameters);h.set(i.key,i);var o=function(){return t.loadRanges(a).then(function(t){var e=a.map(function(e){return t.get(e)}),i=e[0].shape,r={shape:i,dataType:s,get:function(t){return n.apply(void 0,[t].concat(pt(e)))}};return r})},u=function(e){return i.key===e?o():t.loadRange(e)},l={type:it,domainType:t.domainType,parameters:h,loadDomain:function(){return t.loadDomain()},loadRange:u,subsetByIndex:function(i){return t.subsetByIndex(i).then(function(t){return W(t,e)})},subsetByValue:function(i){return t.subsetByValue(i).then(function(t){return W(t,e)})}};return B(l),l}function X(t,e){var i=e.parameter,a=e.inputParameters,r=e.dataType,s=e.fn,n={parameter:i,inputParameters:a,dataType:r,fn:function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),r=1;e>r;r++)i[r-1]=arguments[r];var n=a.map(function(e,a){return i[a].get(t)});return n.some(function(t){return null===t})?null:s.apply(void 0,pt(n))}};return W(t,n)}function J(t){if(t.paging)throw new Error("Paged collections not supported");t.query=function(){return new ka(t)}}function K(t,e){var i=!0,a=!1,r=void 0;try{for(var s,n=Object.keys(e)[Symbol.iterator]();!(i=(s=n.next()).done);i=!0){var h=s.value,o=e[h];if(!t.axes.has(h))throw new Error('Axis "'+h+'" does not exist');var u=t.axes.get(h),l=u.values,f=l[0],c=l[l.length-1];if("number"!=typeof f&&"string"!=typeof f)throw new Error("Can only filter primitive axis values");var p=o.start,d=o.stop;if(C(t,h)){var y=[E(f),E(c)];f=y[0],c=y[1];var m=[E(p),E(d)];p=m[0],d=m[1]}else if(S(t,h)){var v=k(t,h),M=[v(p),v(d)];p=M[0],d=M[1]}if(f>c){var g=[c,f];f=g[0],c=g[1]}if(p>c||f>d)return!1}}catch(b){a=!0,r=b}finally{try{!i&&n["return"]&&n["return"]()}finally{if(a)throw r}}return!0}function Z(t,e){var i=!0,a=!1,r=void 0;try{for(var s,n=Object.keys(t)[Symbol.iterator]();!(i=(s=n.next()).done);i=!0){var h=s.value;e[h]=t[h]}}catch(o){a=!0,r=o}finally{try{!i&&n["return"]&&n["return"]()}finally{if(a)throw r}}}function Y(t){for(var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i=e?tr:Ya,a=0;a<t.length;a++){var r=i(t[a]);(0===a&&0>r||a>0&&r>0)&&t[a].reverse()}}function $(t){var e=t.map(Ka),i=t.length;return function(t){for(var a=0;i>a;a++)if(e[a](t)<=0)return a;return-1}}function tt(t,e){var i=arguments.length<=2||void 0===arguments[2]?["x","y"]:arguments[2];c(t),"Polygon"===e.type&&(e={type:"MultiPolygon",coordinates:[e.coordinates]});var a=e.coordinates;a.forEach(function(t){return Y(t)});var r=$(a),s=ct(i,2),n=s[0],h=s[1];return t.loadDomain().then(function(e){for(var i=e.axes.get(n).values,a=e.axes.get(h).values,s=nr(new Uint8Array(i.length*a.length),[i.length,a.length]),o=0;o<i.length;o++)for(var u=0;u<a.length;u++){var l=r([i[o],a[u]])>=0;s.set(o,u,l)}var f=function(t,e){return s.get(t[n]||0,t[h]||0)?e.get(t):null},c=t,p=!0,d=!1,y=void 0;try{for(var m,v=t.parameters.keys()[Symbol.iterator]();!(p=(m=v.next()).done);p=!0){var M=m.value;c=H(c,M,f)}}catch(g){d=!0,y=g}finally{try{!p&&v["return"]&&v["return"]()}finally{if(d)throw y}}return c})}var et="Domain",it="Coverage",at=it+"Collection",rt="http://covjson.org/def/core#",st=rt+"tuple",nt=rt+"polygon",ht="en",ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},ut=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},lt=function(){function t(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,i,a){return i&&t(e.prototype,i),a&&t(e,a),e}}(),ft=function(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t},ct=function(){function t(t,e){var i=[],a=!0,r=!1,s=void 0;try{for(var n,h=t[Symbol.iterator]();!(a=(n=h.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(o){r=!0,s=o}finally{try{!a&&h["return"]&&h["return"]()}finally{if(r)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),pt=function(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)},dt=y(function(t){t.exports=function(t,e,i,a,r){var s,n;s=t/e;for(var h=0;15>h;h++)if(n=(t-(e*s-i*Math.sin(2*s)+a*Math.sin(4*s)-r*Math.sin(6*s)))/(e-2*i*Math.cos(2*s)+4*a*Math.cos(4*s)-6*r*Math.cos(6*s)),s+=n,Math.abs(n)<=1e-10)return s;return NaN}}),yt=dt&&"object"==typeof dt&&"default"in dt?dt["default"]:dt,mt=y(function(t){t.exports=function(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)}}),vt=mt&&"object"==typeof mt&&"default"in mt?mt["default"]:mt,Mt=y(function(t){t.exports=function(t,e,i){var a=e*i;return t/Math.sqrt(1-a*a)}}),gt=Mt&&"object"==typeof Mt&&"default"in Mt?Mt["default"]:Mt,bt=y(function(t){t.exports=function(t){return t*t*t*(35/3072)}}),_t=bt&&"object"==typeof bt&&"default"in bt?bt["default"]:bt,xt=y(function(t){t.exports=function(t){return.05859375*t*t*(1+.75*t)}}),wt=xt&&"object"==typeof xt&&"default"in xt?xt["default"]:xt,Pt=y(function(t){t.exports=function(t){return.375*t*(1+.25*t*(1+.46875*t))}}),jt=Pt&&"object"==typeof Pt&&"default"in Pt?Pt["default"]:Pt,kt=y(function(t){t.exports=function(t){return 1-.25*t*(1+t/16*(3+1.25*t))}}),St=kt&&"object"==typeof kt&&"default"in kt?kt["default"]:kt,Ct=y(function(t){t.exports=function(t,e,i,a,r){return t*r-e*Math.sin(2*r)+i*Math.sin(4*r)-a*Math.sin(6*r)}}),Et=Ct&&"object"==typeof Ct&&"default"in Ct?Ct["default"]:Ct,Ot=y(function(t){t.exports=function(t){return 0>t?-1:1}}),At=Ot&&"object"==typeof Ot&&"default"in Ot?Ot["default"]:Ot,It=y(function(t){var e=2*Math.PI,i=3.14159265359,a=At;t.exports=function(t){return Math.abs(t)<=i?t:t-a(t)*e}}),Nt=It&&"object"==typeof It&&"default"in It?It["default"]:It,Tt=y(function(t,e){var i=Nt,a=Math.PI/2,r=1e-10,s=Et,n=St,h=jt,o=wt,u=_t,l=gt,f=vt,c=yt;e.init=function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},e.forward=function(t){var e,f,c,p,d,y,m,v,M,g,b,_,x,w,P,j,k,S,C,E,O,A,I,N=t.x,T=t.y,R=Math.sin(t.y),q=Math.cos(t.y),G=i(N-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=r?(t.x=this.x0+this.a*(a-T)*Math.sin(G),t.y=this.y0-this.a*(a-T)*Math.cos(G),t):Math.abs(this.sin_p12+1)<=r?(t.x=this.x0+this.a*(a+T)*Math.sin(G),t.y=this.y0+this.a*(a+T)*Math.cos(G),t):(S=this.sin_p12*R+this.cos_p12*q*Math.cos(G),j=Math.acos(S),k=j/Math.sin(j),t.x=this.x0+this.a*k*q*Math.sin(G),t.y=this.y0+this.a*k*(this.cos_p12*R-this.sin_p12*q*Math.cos(G)),t):(e=n(this.es),f=h(this.es),c=o(this.es),p=u(this.es),Math.abs(this.sin_p12-1)<=r?(d=this.a*s(e,f,c,p,a),y=this.a*s(e,f,c,p,T),t.x=this.x0+(d-y)*Math.sin(G),t.y=this.y0-(d-y)*Math.cos(G),t):Math.abs(this.sin_p12+1)<=r?(d=this.a*s(e,f,c,p,a),y=this.a*s(e,f,c,p,T),t.x=this.x0+(d+y)*Math.sin(G),t.y=this.y0+(d+y)*Math.cos(G),t):(m=R/q,v=l(this.a,this.e,this.sin_p12),M=l(this.a,this.e,R),g=Math.atan((1-this.es)*m+this.es*v*this.sin_p12/(M*q)),b=Math.atan2(Math.sin(G),this.cos_p12*Math.tan(g)-this.sin_p12*Math.cos(G)),C=0===b?Math.asin(this.cos_p12*Math.sin(g)-this.sin_p12*Math.cos(g)):Math.abs(Math.abs(b)-Math.PI)<=r?-Math.asin(this.cos_p12*Math.sin(g)-this.sin_p12*Math.cos(g)):Math.asin(Math.sin(G)*Math.cos(g)/Math.sin(b)),_=this.e*this.sin_p12/Math.sqrt(1-this.es),x=this.e*this.cos_p12*Math.cos(b)/Math.sqrt(1-this.es),w=_*x,P=x*x,E=C*C,O=E*C,A=O*C,I=A*C,j=v*C*(1-E*P*(1-P)/6+O/8*w*(1-2*P)+A/120*(P*(4-7*P)-3*_*_*(1-7*P))-I/48*w),t.x=this.x0+j*Math.sin(b),t.y=this.y0+j*Math.cos(b),t))},e.inverse=function(t){t.x-=this.x0,t.y-=this.y0;var e,p,d,y,m,v,M,g,b,_,x,w,P,j,k,S,C,E,O,A,I,N,T;if(this.sphere){if(e=Math.sqrt(t.x*t.x+t.y*t.y),e>2*a*this.a)return;return p=e/this.a,d=Math.sin(p),y=Math.cos(p),m=this.long0,Math.abs(e)<=r?v=this.lat0:(v=f(y*this.sin_p12+t.y*d*this.cos_p12/e),M=Math.abs(this.lat0)-a,m=i(Math.abs(M)<=r?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*d,e*this.cos_p12*y-t.y*this.sin_p12*d))),t.x=m,t.y=v,t}return g=n(this.es),b=h(this.es),_=o(this.es),x=u(this.es),Math.abs(this.sin_p12-1)<=r?(w=this.a*s(g,b,_,x,a),e=Math.sqrt(t.x*t.x+t.y*t.y),P=w-e,v=c(P/this.a,g,b,_,x),m=i(this.long0+Math.atan2(t.x,-1*t.y)),t.x=m,t.y=v,t):Math.abs(this.sin_p12+1)<=r?(w=this.a*s(g,b,_,x,a),e=Math.sqrt(t.x*t.x+t.y*t.y),P=e-w,v=c(P/this.a,g,b,_,x),m=i(this.long0+Math.atan2(t.x,t.y)),t.x=m,t.y=v,t):(e=Math.sqrt(t.x*t.x+t.y*t.y),S=Math.atan2(t.x,t.y),j=l(this.a,this.e,this.sin_p12),C=Math.cos(S),E=this.e*this.cos_p12*C,O=-E*E/(1-this.es),A=3*this.es*(1-O)*this.sin_p12*this.cos_p12*C/(1-this.es),I=e/j,N=I-O*(1+O)*Math.pow(I,3)/6-A*(1+3*O)*Math.pow(I,4)/24,T=1-O*N*N/2-I*N*N*N/6,k=Math.asin(this.sin_p12*Math.cos(N)+this.cos_p12*Math.sin(N)*C),m=i(this.long0+Math.asin(Math.sin(S)*Math.sin(N)/Math.cos(k))),v=Math.atan((1-this.es*T*this.sin_p12/Math.sin(k))*Math.tan(k)/(1-this.es)),t.x=m,t.y=v,t)},e.names=["Azimuthal_Equidistant","aeqd"]}),Rt=Tt&&"object"==typeof Tt&&"default"in Tt?Tt["default"]:Tt,qt=y(function(t,e){var i=Nt,a=Math.PI/2,r=1e-10,s=vt;e.init=function(){this.R=this.a},e.forward=function(t){var e,n,h=t.x,o=t.y,u=i(h-this.long0);Math.abs(o)<=r&&(e=this.x0+this.R*u,n=this.y0);var l=s(2*Math.abs(o/Math.PI));(Math.abs(u)<=r||Math.abs(Math.abs(o)-a)<=r)&&(e=this.x0,n=o>=0?this.y0+Math.PI*this.R*Math.tan(.5*l):this.y0+Math.PI*this.R*-Math.tan(.5*l));var f=.5*Math.abs(Math.PI/u-u/Math.PI),c=f*f,p=Math.sin(l),d=Math.cos(l),y=d/(p+d-1),m=y*y,v=y*(2/p-1),M=v*v,g=Math.PI*this.R*(f*(y-M)+Math.sqrt(c*(y-M)*(y-M)-(M+c)*(m-M)))/(M+c);0>u&&(g=-g),e=this.x0+g;var b=c+y;return g=Math.PI*this.R*(v*b-f*Math.sqrt((M+c)*(c+1)-b*b))/(M+c),n=o>=0?this.y0+g:this.y0-g,t.x=e,t.y=n,t},e.inverse=function(t){var e,a,s,n,h,o,u,l,f,c,p,d,y;return t.x-=this.x0,t.y-=this.y0,p=Math.PI*this.R,s=t.x/p,n=t.y/p,h=s*s+n*n,o=-Math.abs(n)*(1+h),u=o-2*n*n+s*s,l=-2*o+1+2*n*n+h*h,y=n*n/l+(2*u*u*u/l/l/l-9*o*u/l/l)/27,f=(o-u*u/3/l)/l,c=2*Math.sqrt(-f/3),p=3*y/f/c,Math.abs(p)>1&&(p=p>=0?1:-1),d=Math.acos(p)/3,a=t.y>=0?(-c*Math.cos(d+Math.PI/3)-u/3/l)*Math.PI:-(-c*Math.cos(d+Math.PI/3)-u/3/l)*Math.PI,e=Math.abs(s)<r?this.long0:i(this.long0+Math.PI*(h-1+Math.sqrt(1+2*(s*s-n*n)+h*h))/2/s),t.x=e,t.y=a,t},e.names=["Van_der_Grinten_I","VanDerGrinten","vandg"]}),Gt=qt&&"object"==typeof qt&&"default"in qt?qt["default"]:qt,Bt=y(function(t){var e=Math.PI/2,i=At;t.exports=function(t){return Math.abs(t)<e?t:t-i(t)*Math.PI}}),Dt=Bt&&"object"==typeof Bt&&"default"in Bt?Bt["default"]:Bt,Lt=y(function(t){t.exports=function(t,e,i){var a=t*e;return i/Math.sqrt(1-a*a)}}),zt=Lt&&"object"==typeof Lt&&"default"in Lt?Lt["default"]:Lt,Ut=y(function(t,e){var i=St,a=jt,r=wt,s=_t,n=zt,h=Et,o=Nt,u=Dt,l=yt,f=1e-10;e.init=function(){Math.abs(this.lat1+this.lat2)<f||(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=i(this.es),this.e1=a(this.es),this.e2=r(this.es),this.e3=s(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=n(this.e,this.sinphi,this.cosphi),this.ml1=h(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<f?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=n(this.e,this.sinphi,this.cosphi),this.ml2=h(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=h(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},e.forward=function(t){var e,i=t.x,a=t.y;if(this.sphere)e=this.a*(this.g-a);else{var r=h(this.e0,this.e1,this.e2,this.e3,a);e=this.a*(this.g-r)}var s=this.ns*o(i-this.long0),n=this.x0+e*Math.sin(s),u=this.y0+this.rh-e*Math.cos(s);return t.x=n,t.y=u,t},e.inverse=function(t){t.x-=this.x0,t.y=this.rh-t.y+this.y0;var e,i,a,r;this.ns>=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var s=0;if(0!==i&&(s=Math.atan2(e*t.x,e*t.y)),this.sphere)return r=o(this.long0+s/this.ns),a=u(this.g-i/this.a),t.x=r,t.y=a,t;var n=this.g-i/this.a;return a=l(n,this.e0,this.e1,this.e2,this.e3),r=o(this.long0+s/this.ns),t.x=r,t.y=a,t},e.names=["Equidistant_Conic","eqdc"]}),Ft=Ut&&"object"==typeof Ut&&"default"in Ut?Ut["default"]:Ut,Vt=y(function(t,e){var i=Nt,a=1e-10;e.init=function(){},e.forward=function(t){for(var e=t.x,r=t.y,s=i(e-this.long0),n=r,h=Math.PI*Math.sin(r),o=0;!0;o++){var u=-(n+Math.sin(n)-h)/(1+Math.cos(n));if(n+=u,Math.abs(u)<a)break}n/=2,Math.PI/2-Math.abs(r)<a&&(s=0);var l=.900316316158*this.a*s*Math.cos(n)+this.x0,f=1.4142135623731*this.a*Math.sin(n)+this.y0;return t.x=l,t.y=f,t},e.inverse=function(t){var e,a;t.x-=this.x0,t.y-=this.y0,a=t.y/(1.4142135623731*this.a),Math.abs(a)>.999999999999&&(a=.999999999999),e=Math.asin(a);var r=i(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));r<-Math.PI&&(r=-Math.PI),r>Math.PI&&(r=Math.PI),a=(2*e+Math.sin(2*e))/Math.PI,Math.abs(a)>1&&(a=1);var s=Math.asin(a);return t.x=r,t.y=s,t},e.names=["Mollweide","moll"]}),Qt=Vt&&"object"==typeof Vt&&"default"in Vt?Vt["default"]:Vt,Ht=y(function(t){t.exports=function(t,e,i,a){return i*=e,e*=e,a[0]*t-i*(a[1]+e*(a[2]+e*(a[3]+e*a[4])));
2}}),Wt=Ht&&"object"==typeof Ht&&"default"in Ht?Ht["default"]:Ht,Xt=y(function(t){var e=Wt,i=1e-10,a=20;t.exports=function(t,r,s){for(var n=1/(1-r),h=t,o=a;o;--o){var u=Math.sin(h),l=1-r*u*u;if(l=(e(h,u,Math.cos(h),s)-t)*(l*Math.sqrt(l))*n,h-=l,Math.abs(l)<i)return h}return h}}),Jt=Xt&&"object"==typeof Xt&&"default"in Xt?Xt["default"]:Xt,Kt=y(function(t){var e=1,i=.25,a=.046875,r=.01953125,s=.01068115234375,n=.75,h=.46875,o=.013020833333333334,u=.007120768229166667,l=.3645833333333333,f=.005696614583333333,c=.3076171875;t.exports=function(t){var p=[];p[0]=e-t*(i+t*(a+t*(r+t*s))),p[1]=t*(n-t*(a+t*(r+t*s)));var d=t*t;return p[2]=d*(h-t*(o+t*u)),d*=t,p[3]=d*(l-t*f),p[4]=d*t*c,p}}),Zt=Kt&&"object"==typeof Kt&&"default"in Kt?Kt["default"]:Kt,Yt=y(function(t,e){var i=Nt,a=Dt,r=Zt,s=20,n=Wt,h=Jt,o=Math.PI/2,u=1e-10,l=vt;e.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=r(this.es)},e.forward=function(t){var e,a,r=t.x,h=t.y;if(r=i(r-this.long0),this.sphere){if(this.m)for(var o=this.n*Math.sin(h),l=s;l;--l){var f=(this.m*h+Math.sin(h)-o)/(this.m+Math.cos(h));if(h-=f,Math.abs(f)<u)break}else h=1!==this.n?Math.asin(this.n*Math.sin(h)):h;e=this.a*this.C_x*r*(this.m+Math.cos(h)),a=this.a*this.C_y*h}else{var c=Math.sin(h),p=Math.cos(h);a=this.a*n(h,c,p,this.en),e=this.a*r*p/Math.sqrt(1-this.es*c*c)}return t.x=e,t.y=a,t},e.inverse=function(t){var e,r,s,n;return t.x-=this.x0,s=t.x/this.a,t.y-=this.y0,e=t.y/this.a,this.sphere?(e/=this.C_y,s/=this.C_x*(this.m+Math.cos(e)),this.m?e=l((this.m*e+Math.sin(e))/this.n):1!==this.n&&(e=l(Math.sin(e)/this.n)),s=i(s+this.long0),e=a(e)):(e=h(t.y/this.a,this.es,this.en),n=Math.abs(e),o>n?(n=Math.sin(e),r=this.long0+t.x*Math.sqrt(1-this.es*n*n)/(this.a*Math.cos(e)),s=i(r)):o>n-u&&(s=this.long0)),t.x=s,t.y=e,t},e.names=["Sinusoidal","sinu"]}),$t=Yt&&"object"==typeof Yt&&"default"in Yt?Yt["default"]:Yt,te=y(function(t,e){var i=Nt;e.init=function(){},e.forward=function(t){var e=t.x,a=t.y,r=i(e-this.long0),s=this.x0+this.a*r,n=this.y0+this.a*Math.log(Math.tan(Math.PI/4+a/2.5))*1.25;return t.x=s,t.y=n,t},e.inverse=function(t){t.x-=this.x0,t.y-=this.y0;var e=i(this.long0+t.x/this.a),a=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=e,t.y=a,t},e.names=["Miller_Cylindrical","mill"]}),ee=te&&"object"==typeof te&&"default"in te?te["default"]:te,ie=y(function(t,e){var i=484813681109536e-20;e.iterations=1,e.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},e.forward=function(t){var e,a=t.x,r=t.y,s=r-this.lat0,n=a-this.long0,h=s/i*1e-5,o=n,u=1,l=0;for(e=1;10>=e;e++)u*=h,l+=this.A[e]*u;var f,c,p=l,d=o,y=1,m=0,v=0,M=0;for(e=1;6>=e;e++)f=y*p-m*d,c=m*p+y*d,y=f,m=c,v=v+this.B_re[e]*y-this.B_im[e]*m,M=M+this.B_im[e]*y+this.B_re[e]*m;return t.x=M*this.a+this.x0,t.y=v*this.a+this.y0,t},e.inverse=function(t){var e,a,r,s=t.x,n=t.y,h=s-this.x0,o=n-this.y0,u=o/this.a,l=h/this.a,f=1,c=0,p=0,d=0;for(e=1;6>=e;e++)a=f*u-c*l,r=c*u+f*l,f=a,c=r,p=p+this.C_re[e]*f-this.C_im[e]*c,d=d+this.C_im[e]*f+this.C_re[e]*c;for(var y=0;y<this.iterations;y++){var m,v,M=p,g=d,b=u,_=l;for(e=2;6>=e;e++)m=M*p-g*d,v=g*p+M*d,M=m,g=v,b+=(e-1)*(this.B_re[e]*M-this.B_im[e]*g),_+=(e-1)*(this.B_im[e]*M+this.B_re[e]*g);M=1,g=0;var x=this.B_re[1],w=this.B_im[1];for(e=2;6>=e;e++)m=M*p-g*d,v=g*p+M*d,M=m,g=v,x+=e*(this.B_re[e]*M-this.B_im[e]*g),w+=e*(this.B_im[e]*M+this.B_re[e]*g);var P=x*x+w*w;p=(b*x+_*w)/P,d=(_*x-b*w)/P}var j=p,k=d,S=1,C=0;for(e=1;9>=e;e++)S*=j,C+=this.D[e]*S;var E=this.lat0+C*i*1e5,O=this.long0+k;return t.x=O,t.y=E,t},e.names=["New_Zealand_Map_Grid","nzmg"]}),ae=ie&&"object"==typeof ie&&"default"in ie?ie["default"]:ie,re=y(function(t,e){var i=St,a=jt,r=wt,s=_t,n=Nt,h=Dt,o=Et,u=1e-10,l=gt,f=20;e.init=function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=i(this.es),this.e1=a(this.es),this.e2=r(this.es),this.e3=s(this.es),this.ml0=this.a*o(this.e0,this.e1,this.e2,this.e3,this.lat0)},e.forward=function(t){var e,i,a,r=t.x,s=t.y,f=n(r-this.long0);if(a=f*Math.sin(s),this.sphere)Math.abs(s)<=u?(e=this.a*f,i=-1*this.a*this.lat0):(e=this.a*Math.sin(a)/Math.tan(s),i=this.a*(h(s-this.lat0)+(1-Math.cos(a))/Math.tan(s)));else if(Math.abs(s)<=u)e=this.a*f,i=-1*this.ml0;else{var c=l(this.a,this.e,Math.sin(s))/Math.tan(s);e=c*Math.sin(a),i=this.a*o(this.e0,this.e1,this.e2,this.e3,s)-this.ml0+c*(1-Math.cos(a))}return t.x=e+this.x0,t.y=i+this.y0,t},e.inverse=function(t){var e,i,a,r,s,h,l,c,p;if(a=t.x-this.x0,r=t.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=u)e=n(a/this.a+this.long0),i=0;else{h=this.lat0+r/this.a,l=a*a/this.a/this.a+h*h,c=h;var d;for(s=f;s;--s)if(d=Math.tan(c),p=-1*(h*(c*d+1)-c-.5*(c*c+l)*d)/((c-h)/d-1),c+=p,Math.abs(p)<=u){i=c;break}e=n(this.long0+Math.asin(a*Math.tan(c)/this.a)/Math.sin(i))}else if(Math.abs(r+this.ml0)<=u)i=0,e=n(this.long0+a/this.a);else{h=(this.ml0+r)/this.a,l=a*a/this.a/this.a+h*h,c=h;var y,m,v,M,g;for(s=f;s;--s)if(g=this.e*Math.sin(c),y=Math.sqrt(1-g*g)*Math.tan(c),m=this.a*o(this.e0,this.e1,this.e2,this.e3,c),v=this.e0-2*this.e1*Math.cos(2*c)+4*this.e2*Math.cos(4*c)-6*this.e3*Math.cos(6*c),M=m/this.a,p=(h*(y*M+1)-M-.5*y*(M*M+l))/(this.es*Math.sin(2*c)*(M*M+l-2*h*M)/(4*y)+(h-M)*(y*v-2/Math.sin(2*c))-v),c-=p,Math.abs(p)<=u){i=c;break}y=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),e=n(this.long0+Math.asin(a*y/this.a)/Math.sin(i))}return t.x=e,t.y=i,t},e.names=["Polyconic","poly"]}),se=re&&"object"==typeof re&&"default"in re?re["default"]:re,ne=y(function(t,e){var i=Nt,a=Dt;e.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)},e.forward=function(t){var e=t.x,r=t.y,s=i(e-this.long0),n=a(r-this.lat0);return t.x=this.x0+this.a*s*this.rc,t.y=this.y0+this.a*n,t},e.inverse=function(t){var e=t.x,r=t.y;return t.x=i(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=a(this.lat0+(r-this.y0)/this.a),t},e.names=["Equirectangular","Equidistant_Cylindrical","eqc"]}),he=ne&&"object"==typeof ne&&"default"in ne?ne["default"]:ne,oe=y(function(t){var e=Math.PI/2;t.exports=function(t,i){var a=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(i)-a)<1e-6)return 0>i?-1*e:e;for(var r,s,n,h,o=Math.asin(.5*i),u=0;30>u;u++)if(s=Math.sin(o),n=Math.cos(o),h=t*s,r=Math.pow(1-h*h,2)/(2*n)*(i/(1-t*t)-s/(1-h*h)+.5/t*Math.log((1-h)/(1+h))),o+=r,Math.abs(r)<=1e-10)return o;return NaN}}),ue=oe&&"object"==typeof oe&&"default"in oe?oe["default"]:oe,le=y(function(t){t.exports=function(t,e){var i;return t>1e-7?(i=t*e,(1-t*t)*(e/(1-i*i)-.5/t*Math.log((1-i)/(1+i)))):2*e}}),fe=le&&"object"==typeof le&&"default"in le?le["default"]:le,ce=y(function(t,e){var i=Nt,a=fe,r=zt,s=ue;e.init=function(){this.sphere||(this.k0=r(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},e.forward=function(t){var e,r,s=t.x,n=t.y,h=i(s-this.long0);if(this.sphere)e=this.x0+this.a*h*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(n)/Math.cos(this.lat_ts);else{var o=a(this.e,Math.sin(n));e=this.x0+this.a*this.k0*h,r=this.y0+this.a*o*.5/this.k0}return t.x=e,t.y=r,t},e.inverse=function(t){t.x-=this.x0,t.y-=this.y0;var e,a;return this.sphere?(e=i(this.long0+t.x/this.a/Math.cos(this.lat_ts)),a=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(a=s(this.e,2*t.y*this.k0/this.a),e=i(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=a,t},e.names=["cea"]}),pe=ce&&"object"==typeof ce&&"default"in ce?ce["default"]:ce,de=y(function(t,e){var i=Nt,a=1e-10,r=vt;e.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},e.forward=function(t){var e,r,s,n,h,o,u,l,f=t.x,c=t.y;return s=i(f-this.long0),e=Math.sin(c),r=Math.cos(c),n=Math.cos(s),o=this.sin_p14*e+this.cos_p14*r*n,h=1,o>0||Math.abs(o)<=a?(u=this.x0+this.a*h*r*Math.sin(s)/o,l=this.y0+this.a*h*(this.cos_p14*e-this.sin_p14*r*n)/o):(u=this.x0+this.infinity_dist*r*Math.sin(s),l=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*r*n)),t.x=u,t.y=l,t},e.inverse=function(t){var e,a,s,n,h,o;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,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(n=Math.atan2(e,this.rc),a=Math.sin(n),s=Math.cos(n),o=r(s*this.sin_p14+t.y*a*this.cos_p14/e),h=Math.atan2(t.x*a,e*this.cos_p14*s-t.y*this.sin_p14*a),h=i(this.long0+h)):(o=this.phic0,h=0),t.x=h,t.y=o,t},e.names=["gnom"]}),ye=de&&"object"==typeof de&&"default"in de?de["default"]:de,me=y(function(t,e){var i=1e-10,a=zt,r=fe,s=Nt,n=vt;e.init=function(){Math.abs(this.lat1+this.lat2)<i||(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=a(this.e3,this.sin_po,this.cos_po),this.qs1=r(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=a(this.e3,this.sin_po,this.cos_po),this.qs2=r(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=r(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>i?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)},e.forward=function(t){var e=t.x,i=t.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var a=r(this.e3,this.sin_phi,this.cos_phi),n=this.a*Math.sqrt(this.c-this.ns0*a)/this.ns0,h=this.ns0*s(e-this.long0),o=n*Math.sin(h)+this.x0,u=this.rh-n*Math.cos(h)+this.y0;return t.x=o,t.y=u,t},e.inverse=function(t){var e,i,a,r,n,h;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),a=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),a=-1),r=0,0!==e&&(r=Math.atan2(a*t.x,a*t.y)),a=e*this.ns0/this.a,this.sphere?h=Math.asin((this.c-a*a)/(2*this.ns0)):(i=(this.c-a*a)/this.ns0,h=this.phi1z(this.e3,i)),n=s(r/this.ns0+this.long0),t.x=n,t.y=h,t},e.phi1z=function(t,e){var a,r,s,h,o,u=n(.5*e);if(i>t)return u;for(var l=t*t,f=1;25>=f;f++)if(a=Math.sin(u),r=Math.cos(u),s=t*a,h=1-s*s,o=.5*h*h/r*(e/(1-l)-a/h+.5/t*Math.log((1-s)/(1+s))),u+=o,Math.abs(o)<=1e-7)return u;return null},e.names=["Albers_Conic_Equal_Area","Albers","aea"]}),ve=me&&"object"==typeof me&&"default"in me?me["default"]:me,Me=y(function(t,e){var i=Math.PI/2,a=Math.PI/4,r=1e-10,s=fe,n=Nt;e.S_POLE=1,e.N_POLE=2,e.EQUIT=3,e.OBLIQ=4,e.init=function(){var t=Math.abs(this.lat0);if(Math.abs(t-i)<r?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(t)<r?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var e;switch(this.qp=s(this.e,1),this.mmf=.5/(1-this.es),this.apa=this.authset(this.es),this.mode){case this.N_POLE:this.dd=1;break;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),e=Math.sin(this.lat0),this.sinb1=s(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*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))},e.forward=function(t){var e,h,o,u,l,f,c,p,d,y,m=t.x,v=t.y;if(m=n(m-this.long0),this.sphere){if(l=Math.sin(v),y=Math.cos(v),o=Math.cos(m),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(h=this.mode===this.EQUIT?1+y*o:1+this.sinph0*l+this.cosph0*y*o,r>=h)return null;h=Math.sqrt(2/h),e=h*y*Math.sin(m),h*=this.mode===this.EQUIT?l:this.cosph0*l-this.sinph0*y*o}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(o=-o),Math.abs(v+this.phi0)<r)return null;h=a-.5*v,h=2*(this.mode===this.S_POLE?Math.cos(h):Math.sin(h)),e=h*Math.sin(m),h*=o}}else{switch(c=0,p=0,d=0,o=Math.cos(m),u=Math.sin(m),l=Math.sin(v),f=s(this.e,l),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(c=f/this.qp,p=Math.sqrt(1-c*c)),this.mode){case this.OBLIQ:d=1+this.sinb1*c+this.cosb1*p*o;break;case this.EQUIT:d=1+p*o;break;case this.N_POLE:d=i+v,f=this.qp-f;break;case this.S_POLE:d=v-i,f=this.qp+f}if(Math.abs(d)<r)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:d=Math.sqrt(2/d),h=this.mode===this.OBLIQ?this.ymf*d*(this.cosb1*c-this.sinb1*p*o):(d=Math.sqrt(2/(1+p*o)))*c*this.ymf,e=this.xmf*d*p*u;break;case this.N_POLE:case this.S_POLE:f>=0?(e=(d=Math.sqrt(f))*u,h=o*(this.mode===this.S_POLE?d:-d)):e=h=0}}return t.x=this.a*e+this.x0,t.y=this.a*h+this.y0,t},e.inverse=function(t){t.x-=this.x0,t.y-=this.y0;var e,a,s,h,o,u,l,f=t.x/this.a,c=t.y/this.a;if(this.sphere){var p,d=0,y=0;if(p=Math.sqrt(f*f+c*c),a=.5*p,a>1)return null;switch(a=2*Math.asin(a),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(y=Math.sin(a),d=Math.cos(a)),this.mode){case this.EQUIT:a=Math.abs(p)<=r?0:Math.asin(c*y/p),f*=y,c=d*p;break;case this.OBLIQ:a=Math.abs(p)<=r?this.phi0:Math.asin(d*this.sinph0+c*y*this.cosph0/p),f*=y*this.cosph0,c=(d-Math.sin(a)*this.sinph0)*p;break;case this.N_POLE:c=-c,a=i-a;break;case this.S_POLE:a-=i}e=0!==c||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(f,c):0}else{if(l=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(f/=this.dd,c*=this.dd,u=Math.sqrt(f*f+c*c),r>u)return t.x=0,t.y=this.phi0,t;h=2*Math.asin(.5*u/this.rq),s=Math.cos(h),f*=h=Math.sin(h),this.mode===this.OBLIQ?(l=s*this.sinb1+c*h*this.cosb1/u,o=this.qp*l,c=u*this.cosb1*s-c*this.sinb1*h):(l=c*h/u,o=this.qp*l,c=u*s)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(c=-c),o=f*f+c*c,!o)return t.x=0,t.y=this.phi0,t;l=1-o/this.qp,this.mode===this.S_POLE&&(l=-l)}e=Math.atan2(f,c),a=this.authlat(Math.asin(l),this.apa)}return t.x=n(this.long0+e),t.y=a,t},e.P00=.3333333333333333,e.P01=.17222222222222222,e.P02=.10257936507936508,e.P10=.06388888888888888,e.P11=.0664021164021164,e.P20=.016415012942191543,e.authset=function(t){var e,i=[];return i[0]=t*this.P00,e=t*t,i[0]+=e*this.P01,i[1]=e*this.P10,e*=t,i[0]+=e*this.P02,i[1]+=e*this.P11,i[2]=e*this.P20,i},e.authlat=function(t,e){var i=t+t;return t+e[0]*Math.sin(i)+e[1]*Math.sin(i+i)+e[2]*Math.sin(i+i+i)},e.names=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"]}),ge=Me&&"object"==typeof Me&&"default"in Me?Me["default"]:Me,be=y(function(t,e){var i=Et,a=St,r=jt,s=wt,n=_t,h=gt,o=Nt,u=Dt,l=yt,f=Math.PI/2,c=1e-10;e.init=function(){this.sphere||(this.e0=a(this.es),this.e1=r(this.es),this.e2=s(this.es),this.e3=n(this.es),this.ml0=this.a*i(this.e0,this.e1,this.e2,this.e3,this.lat0))},e.forward=function(t){var e,a,r=t.x,s=t.y;if(r=o(r-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(s)*Math.sin(r)),a=this.a*(Math.atan2(Math.tan(s),Math.cos(r))-this.lat0);else{var n=Math.sin(s),u=Math.cos(s),l=h(this.a,this.e,n),f=Math.tan(s)*Math.tan(s),c=r*Math.cos(s),p=c*c,d=this.es*u*u/(1-this.es),y=this.a*i(this.e0,this.e1,this.e2,this.e3,s);e=l*c*(1-p*f*(1/6-(8-f+8*d)*p/120)),a=y-this.ml0+l*n/u*p*(.5+(5-f+6*d)*p/24)}return t.x=e+this.x0,t.y=a+this.y0,t},e.inverse=function(t){t.x-=this.x0,t.y-=this.y0;var e,i,a=t.x/this.a,r=t.y/this.a;if(this.sphere){var s=r+this.lat0;e=Math.asin(Math.sin(s)*Math.cos(a)),i=Math.atan2(Math.tan(a),Math.cos(s))}else{var n=this.ml0/this.a+r,p=l(n,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(p)-f)<=c)return t.x=this.long0,t.y=f,0>r&&(t.y*=-1),t;var d=h(this.a,this.e,Math.sin(p)),y=d*d*d/this.a/this.a*(1-this.es),m=Math.pow(Math.tan(p),2),v=a*this.a/d,M=v*v;e=p-d*Math.tan(p)/y*v*v*(.5-(1+3*m)*v*v/24),i=v*(1-M*(m/3+(1+3*m)*m*M/15))/Math.cos(p)}return t.x=o(i+this.long0),t.y=u(e),t},e.names=["Cassini","Cassini_Soldner","cass"]}),_e=be&&"object"==typeof be&&"default"in be?be["default"]:be,xe=y(function(t,e){var i=Nt;e.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},e.forward=function(t){var e,a,r,s,n,h,o,u=t.x,l=t.y,f=i(u-this.long0);return e=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),a=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/e)-this.s45),r=-f*this.alfa,s=Math.asin(Math.cos(this.ad)*Math.sin(a)+Math.sin(this.ad)*Math.cos(a)*Math.cos(r)),n=Math.asin(Math.cos(a)*Math.sin(r)/Math.cos(s)),h=this.n*n,o=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(s/2+this.s45),this.n),t.y=o*Math.cos(h)/1,t.x=o*Math.sin(h)/1,this.czech||(t.y*=-1,t.x*=-1),t},e.inverse=function(t){var e,i,a,r,s,n,h,o,u=t.x;t.x=t.y,t.y=u,this.czech||(t.y*=-1,t.x*=-1),n=Math.sqrt(t.x*t.x+t.y*t.y),s=Math.atan2(t.y,t.x),r=s/Math.sin(this.s0),a=2*(Math.atan(Math.pow(this.ro0/n,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(a)-Math.sin(this.ad)*Math.cos(a)*Math.cos(r)),i=Math.asin(Math.cos(a)*Math.sin(r)/Math.cos(e)),t.x=this.long0-i/this.alfa,h=e,o=0;var l=0;do t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.e/2))-this.s45),Math.abs(h-t.y)<1e-10&&(o=1),h=t.y,l+=1;while(0===o&&15>l);return l>=15?null:t},e.names=["Krovak","krovak"]}),we=xe&&"object"==typeof xe&&"default"in xe?xe["default"]:xe,Pe=y(function(t){var e=Math.PI/2;t.exports=function(t,i){for(var a,r,s=.5*t,n=e-2*Math.atan(i),h=0;15>=h;h++)if(a=t*Math.sin(n),r=e-2*Math.atan(i*Math.pow((1-a)/(1+a),s))-n,n+=r,Math.abs(r)<=1e-10)return n;return-9999}}),je=Pe&&"object"==typeof Pe&&"default"in Pe?Pe["default"]:Pe,ke=y(function(t){var e=Math.PI/2;t.exports=function(t,i,a){var r=t*a,s=.5*t;return r=Math.pow((1-r)/(1+r),s),Math.tan(.5*(e-i))/r}}),Se=ke&&"object"==typeof ke&&"default"in ke?ke["default"]:ke,Ce=y(function(t,e){var i=1e-10,a=zt,r=Se,s=Math.PI/2,n=At,h=Nt,o=je;e.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)<i)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var e=Math.sin(this.lat1),s=Math.cos(this.lat1),n=a(this.e,e,s),h=r(this.e,this.lat1,e),o=Math.sin(this.lat2),u=Math.cos(this.lat2),l=a(this.e,o,u),f=r(this.e,this.lat2,o),c=r(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>i?this.ns=Math.log(n/l)/Math.log(h/f):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=n/(this.ns*Math.pow(h,this.ns)),this.rh=this.a*this.f0*Math.pow(c,this.ns),this.title||(this.title="Lambert Conformal Conic")}},e.forward=function(t){var e=t.x,a=t.y;Math.abs(2*Math.abs(a)-Math.PI)<=i&&(a=n(a)*(s-2*i));var o,u,l=Math.abs(Math.abs(a)-s);if(l>i)o=r(this.e,a,Math.sin(a)),u=this.a*this.f0*Math.pow(o,this.ns);else{if(l=a*this.ns,0>=l)return null;u=0}var f=this.ns*h(e-this.long0);return t.x=this.k0*(u*Math.sin(f))+this.x0,t.y=this.k0*(this.rh-u*Math.cos(f))+this.y0,t},e.inverse=function(t){var e,i,a,r,n,u=(t.x-this.x0)/this.k0,l=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(u*u+l*l),i=1):(e=-Math.sqrt(u*u+l*l),i=-1);var f=0;if(0!==e&&(f=Math.atan2(i*u,i*l)),0!==e||this.ns>0){if(i=1/this.ns,a=Math.pow(e/(this.a*this.f0),i),r=o(this.e,a),-9999===r)return null}else r=-s;return n=h(f/this.ns+this.long0),t.x=n,t.y=r,t},e.names=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"]}),Ee=Ce&&"object"==typeof Ce&&"default"in Ce?Ce["default"]:Ce,Oe=y(function(t,e){var i=Se,a=Nt,r=je,s=Math.PI/2,n=Math.PI/4,h=1e-10;e.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),e=Math.cos(this.lat0),r=this.e*t;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(e,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-r*r);var s=i(this.e,this.lat0,t),n=this.bl/e*Math.sqrt((1-this.es)/(1-r*r));1>n*n&&(n=1);var h,o;if(isNaN(this.longc)){var u=i(this.e,this.lat1,Math.sin(this.lat1)),l=i(this.e,this.lat2,Math.sin(this.lat2));this.lat0>=0?this.el=(n+Math.sqrt(n*n-1))*Math.pow(s,this.bl):this.el=(n-Math.sqrt(n*n-1))*Math.pow(s,this.bl);var f=Math.pow(u,this.bl),c=Math.pow(l,this.bl);h=this.el/f,o=.5*(h-1/h);var p=(this.el*this.el-c*f)/(this.el*this.el+c*f),d=(c-f)/(c+f),y=a(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(p*Math.tan(.5*this.bl*y)/d)/this.bl,this.long0=a(this.long0);var m=a(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*m)/o),this.alpha=Math.asin(n*Math.sin(this.gamma0))}else h=this.lat0>=0?n+Math.sqrt(n*n-1):n-Math.sqrt(n*n-1),this.el=h*Math.pow(s,this.bl),o=.5*(h-1/h),this.gamma0=Math.asin(Math.sin(this.alpha)/n),this.long0=this.longc-Math.asin(o*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(n*n-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(n*n-1),Math.cos(this.alpha))},e.forward=function(t){var e,r,o,u=t.x,l=t.y,f=a(u-this.long0);if(Math.abs(Math.abs(l)-s)<=h)o=l>0?-1:1,r=this.al/this.bl*Math.log(Math.tan(n+o*this.gamma0*.5)),e=-1*o*s*this.al/this.bl;else{var c=i(this.e,l,Math.sin(l)),p=this.el/Math.pow(c,this.bl),d=.5*(p-1/p),y=.5*(p+1/p),m=Math.sin(this.bl*f),v=(d*Math.sin(this.gamma0)-m*Math.cos(this.gamma0))/y;r=Math.abs(Math.abs(v)-1)<=h?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-v)/(1+v))/this.bl,e=Math.abs(Math.cos(this.bl*f))<=h?this.al*this.bl*f:this.al*Math.atan2(d*Math.cos(this.gamma0)+m*Math.sin(this.gamma0),Math.cos(this.bl*f))/this.bl}return this.no_rot?(t.x=this.x0+e,t.y=this.y0+r):(e-=this.uc,t.x=this.x0+r*Math.cos(this.alpha)+e*Math.sin(this.alpha),t.y=this.y0+e*Math.cos(this.alpha)-r*Math.sin(this.alpha)),t},e.inverse=function(t){var e,i;this.no_rot?(i=t.y-this.y0,e=t.x-this.x0):(i=(t.x-this.x0)*Math.cos(this.alpha)-(t.y-this.y0)*Math.sin(this.alpha),e=(t.y-this.y0)*Math.cos(this.alpha)+(t.x-this.x0)*Math.sin(this.alpha),e+=this.uc);var n=Math.exp(-1*this.bl*i/this.al),o=.5*(n-1/n),u=.5*(n+1/n),l=Math.sin(this.bl*e/this.al),f=(l*Math.cos(this.gamma0)+o*Math.sin(this.gamma0))/u,c=Math.pow(this.el/Math.sqrt((1+f)/(1-f)),1/this.bl);return Math.abs(f-1)<h?(t.x=this.long0,t.y=s):Math.abs(f+1)<h?(t.x=this.long0,t.y=-1*s):(t.y=r(this.e,c),t.x=a(this.long0-Math.atan2(o*Math.cos(this.gamma0)-l*Math.sin(this.gamma0),Math.cos(this.bl*e/this.al))/this.bl)),t},e.names=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","omerc"]}),Ae=Oe&&"object"==typeof Oe&&"default"in Oe?Oe["default"]:Oe,Ie=y(function(t,e){e.init=function(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),i=this.a,a=this.rf,r=1/a,s=2*r-Math.pow(r,2),n=this.e=Math.sqrt(s);this.R=this.k0*i*Math.sqrt(1-s)/(1-s*Math.pow(e,2)),this.alpha=Math.sqrt(1+s/(1-s)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var h=Math.log(Math.tan(Math.PI/4+this.b0/2)),o=Math.log(Math.tan(Math.PI/4+t/2)),u=Math.log((1+n*e)/(1-n*e));this.K=h-this.alpha*o+this.alpha*n/2*u},e.forward=function(t){var e=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*(e+i)+this.K,r=2*(Math.atan(Math.exp(a))-Math.PI/4),s=this.alpha*(t.x-this.lambda0),n=Math.atan(Math.sin(s)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(s))),h=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(s));return t.y=this.R/2*Math.log((1+Math.sin(h))/(1-Math.sin(h)))+this.y0,t.x=this.R*n+this.x0,t},e.inverse=function(t){for(var e=t.x-this.x0,i=t.y-this.y0,a=e/this.R,r=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),s=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(a)),n=Math.atan(Math.sin(a)/(Math.cos(this.b0)*Math.cos(a)-Math.sin(this.b0)*Math.tan(r))),h=this.lambda0+n/this.alpha,o=0,u=s,l=-1e3,f=0;Math.abs(u-l)>1e-7;){if(++f>20)return;o=1/this.alpha*(Math.log(Math.tan(Math.PI/4+s/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(u))/2)),l=u,u=2*Math.atan(Math.exp(o))-Math.PI/2}return t.x=h,t.y=u,t},e.names=["somerc"]}),Ne=Ie&&"object"==typeof Ie&&"default"in Ie?Ie["default"]:Ie,Te=y(function(t,e){var i=Math.PI/2,a=1e-10,r=At,s=zt,n=Se,h=je,o=Nt;e.ssfn_=function(t,e,a){return e*=a,Math.tan(.5*(i+t))*Math.pow((1-e)/(1+e),.5*a)},e.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)<=a&&(this.k0=.5*(1+r(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=a&&(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)<=a&&(this.k0=.5*this.cons*s(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/n(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=s(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-i,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},e.forward=function(t){var e,r,s,h,u,l,f=t.x,c=t.y,p=Math.sin(c),d=Math.cos(c),y=o(f-this.long0);return Math.abs(Math.abs(f-this.long0)-Math.PI)<=a&&Math.abs(c+this.lat0)<=a?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*p+this.coslat0*d*Math.cos(y)),t.x=this.a*e*d*Math.sin(y)+this.x0,t.y=this.a*e*(this.coslat0*p-this.sinlat0*d*Math.cos(y))+this.y0,t):(r=2*Math.atan(this.ssfn_(c,p,this.e))-i,h=Math.cos(r),s=Math.sin(r),Math.abs(this.coslat0)<=a?(u=n(this.e,c*this.con,this.con*p),l=2*this.a*this.k0*u/this.cons,t.x=this.x0+l*Math.sin(f-this.long0),t.y=this.y0-this.con*l*Math.cos(f-this.long0),t):(Math.abs(this.sinlat0)<a?(e=2*this.a*this.k0/(1+h*Math.cos(y)),t.y=e*s):(e=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*s+this.cosX0*h*Math.cos(y))),t.y=e*(this.cosX0*s-this.sinX0*h*Math.cos(y))+this.y0),t.x=e*h*Math.sin(y)+this.x0,t))},e.inverse=function(t){t.x-=this.x0,t.y-=this.y0;var e,r,s,n,u,l=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var f=2*Math.atan(l/(.5*this.a*this.k0));return e=this.long0,r=this.lat0,a>=l?(t.x=e,t.y=r,t):(r=Math.asin(Math.cos(f)*this.sinlat0+t.y*Math.sin(f)*this.coslat0/l),e=o(Math.abs(this.coslat0)<a?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(f),l*this.coslat0*Math.cos(f)-t.y*this.sinlat0*Math.sin(f))),t.x=e,t.y=r,t)}if(Math.abs(this.coslat0)<=a){if(a>=l)return r=this.lat0,e=this.long0,t.x=e,t.y=r,t;t.x*=this.con,t.y*=this.con,s=l*this.cons/(2*this.a*this.k0),r=this.con*h(this.e,s),e=this.con*o(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else n=2*Math.atan(l*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,a>=l?u=this.X0:(u=Math.asin(Math.cos(n)*this.sinX0+t.y*Math.sin(n)*this.cosX0/l),e=o(this.long0+Math.atan2(t.x*Math.sin(n),l*this.cosX0*Math.cos(n)-t.y*this.sinX0*Math.sin(n)))),r=-1*h(this.e,Math.tan(.5*(i+u)));return t.x=e,t.y=r,t},e.names=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"]}),Re=Te&&"object"==typeof Te&&"default"in Te?Te["default"]:Te,qe=y(function(t){t.exports=function(t,e){return Math.pow((1-t)/(1+t),e)}}),Ge=qe&&"object"==typeof qe&&"default"in qe?qe["default"]:qe,Be=y(function(t,e){var i=Math.PI/4,a=Ge,r=Math.PI/2,s=20;e.init=function(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+i)/(Math.pow(Math.tan(.5*this.lat0+i),this.C)*a(this.e*t,this.ratexp))},e.forward=function(t){var e=t.x,s=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*s+i),this.C)*a(this.e*Math.sin(s),this.ratexp))-r,t.x=this.C*e,t},e.inverse=function(t){for(var e=1e-14,n=t.x/this.C,h=t.y,o=Math.pow(Math.tan(.5*h+i)/this.K,1/this.C),u=s;u>0&&(h=2*Math.atan(o*a(this.e*Math.sin(t.y),-.5*this.e))-r,!(Math.abs(h-t.y)<e));--u)t.y=h;return u?(t.x=n,t.y=h,t):null},e.names=["gauss"]}),De=Be&&"object"==typeof Be&&"default"in Be?Be["default"]:Be,Le=y(function(t,e){var i=De,a=Nt;e.init=function(){i.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"))},e.forward=function(t){var e,r,s,n;return t.x=a(t.x-this.long0),i.forward.apply(this,[t]),e=Math.sin(t.y),r=Math.cos(t.y),s=Math.cos(t.x),n=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*r*s),t.x=n*r*Math.sin(t.x),t.y=n*(this.cosc0*e-this.sinc0*r*s),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},e.inverse=function(t){var e,r,s,n,h;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,h=Math.sqrt(t.x*t.x+t.y*t.y)){var o=2*Math.atan2(h,this.R2);e=Math.sin(o),r=Math.cos(o),n=Math.asin(r*this.sinc0+t.y*e*this.cosc0/h),s=Math.atan2(t.x*e,h*this.cosc0*r-t.y*this.sinc0*e)}else n=this.phic0,s=0;return t.x=s,t.y=n,i.inverse.apply(this,[t]),t.x=a(t.x+this.long0),t},e.names=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative"]}),ze=Le&&"object"==typeof Le&&"default"in Le?Le["default"]:Le,Ue=y(function(t,e){var i=St,a=jt,r=wt,s=_t,n=Et,h=Nt,o=Math.PI/2,u=1e-10,l=At,f=vt;e.init=function(){this.e0=i(this.es),this.e1=a(this.es),this.e2=r(this.es),this.e3=s(this.es),this.ml0=this.a*n(this.e0,this.e1,this.e2,this.e3,this.lat0)},e.forward=function(t){var e,i,a,r=t.x,s=t.y,o=h(r-this.long0),u=Math.sin(s),l=Math.cos(s);if(this.sphere){var f=l*Math.sin(o);if(Math.abs(Math.abs(f)-1)<1e-10)return 93;i=.5*this.a*this.k0*Math.log((1+f)/(1-f)),e=Math.acos(l*Math.cos(o)/Math.sqrt(1-f*f)),0>s&&(e=-e),a=this.a*this.k0*(e-this.lat0)}else{var c=l*o,p=Math.pow(c,2),d=this.ep2*Math.pow(l,2),y=Math.tan(s),m=Math.pow(y,2);e=1-this.es*Math.pow(u,2);var v=this.a/Math.sqrt(e),M=this.a*n(this.e0,this.e1,this.e2,this.e3,s);i=this.k0*v*c*(1+p/6*(1-m+d+p/20*(5-18*m+Math.pow(m,2)+72*d-58*this.ep2)))+this.x0,a=this.k0*(M-this.ml0+v*y*(p*(.5+p/24*(5-m+9*d+4*Math.pow(d,2)+p/30*(61-58*m+Math.pow(m,2)+600*d-330*this.ep2)))))+this.y0}return t.x=i,t.y=a,t},e.inverse=function(t){var e,i,a,r,s,n,c=6;if(this.sphere){var p=Math.exp(t.x/(this.a*this.k0)),d=.5*(p-1/p),y=this.lat0+t.y/(this.a*this.k0),m=Math.cos(y);e=Math.sqrt((1-m*m)/(1+d*d)),s=f(e),0>y&&(s=-s),n=0===d&&0===m?this.long0:h(Math.atan2(d,m)+this.long0)}else{var v=t.x-this.x0,M=t.y-this.y0;for(e=(this.ml0+M/this.k0)/this.a,i=e,r=0;!0&&(a=(e+this.e1*Math.sin(2*i)-this.e2*Math.sin(4*i)+this.e3*Math.sin(6*i))/this.e0-i,
3i+=a,!(Math.abs(a)<=u));r++)if(r>=c)return 95;if(Math.abs(i)<o){var g=Math.sin(i),b=Math.cos(i),_=Math.tan(i),x=this.ep2*Math.pow(b,2),w=Math.pow(x,2),P=Math.pow(_,2),j=Math.pow(P,2);e=1-this.es*Math.pow(g,2);var k=this.a/Math.sqrt(e),S=k*(1-this.es)/e,C=v/(k*this.k0),E=Math.pow(C,2);s=i-k*_*E/S*(.5-E/24*(5+3*P+10*x-4*w-9*this.ep2-E/30*(61+90*P+298*x+45*j-252*this.ep2-3*w))),n=h(this.long0+C*(1-E/6*(1+2*P+x-E/20*(5-2*x+28*P-3*w+8*this.ep2+24*j)))/b)}else s=o*l(M),n=this.long0}return t.x=n,t.y=s,t},e.names=["Transverse_Mercator","Transverse Mercator","tmerc"]}),Fe=Ue&&"object"==typeof Ue&&"default"in Ue?Ue["default"]:Ue,Ve=y(function(t,e){var i=.017453292519943295,a=Fe;e.dependsOn="tmerc",e.init=function(){this.zone&&(this.lat0=0,this.long0=(6*Math.abs(this.zone)-183)*i,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,a.init.apply(this),this.forward=a.forward,this.inverse=a.inverse)},e.names=["Universal Transverse Mercator System","utm"]}),Qe=Ve&&"object"==typeof Ve&&"default"in Ve?Ve["default"]:Ve,He=y(function(t){var e=[Fe,Qe,ze,Re,Ne,Ae,Ee,we,_e,ge,ve,ye,pe,he,se,ae,ee,$t,Qt,Ft,Gt,Rt];t.exports=function(t){e.forEach(function(e){t.Proj.projections.add(e)})}}),We=He&&"object"==typeof He&&"default"in He?He["default"]:He,Xe="proj4",Je="2.3.14",Ke="Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",Ze="lib/index.js",Ye={test:"test",doc:"docs"},$e={test:"./node_modules/istanbul/lib/cli.js test ./node_modules/mocha/bin/_mocha test/test.js"},ti={type:"git",url:"git://github.com/proj4js/proj4js.git"},ei="",ii="MIT",ai={main:"dist/proj4.js",include:["dist/proj4.js","README.md","AUTHORS","LICENSE.md"]},ri={"grunt-cli":"~0.1.13",grunt:"~0.4.2","grunt-contrib-connect":"~0.6.0","grunt-contrib-jshint":"~0.8.0",chai:"~1.8.1",mocha:"~1.17.1","grunt-mocha-phantomjs":"~0.4.0",browserify:"~12.0.1","grunt-browserify":"~4.0.1","grunt-contrib-uglify":"~0.11.1",curl:"git://github.com/cujojs/curl.git",istanbul:"~0.2.4",tin:"~0.4.0"},si={mgrs:"~0.0.2"},ni=[{name:"Mike Adair",email:"madair@dmsolutions.ca"},{name:"Richard Greenwood",email:"rich@greenwoodmap.com"},{name:"Calvin Metcalf",email:"calvin.metcalf@gmail.com"},{name:"Richard Marsden",url:"http://www.winwaed.com"},{name:"T. Mittan"},{name:"D. Steinwand"},{name:"S. Nelson"}],hi="7619c8a63df1eae5bad0b9ad31ca1d87b0549243",oi={url:"https://github.com/proj4js/proj4js/issues"},ui="https://github.com/proj4js/proj4js#readme",li="proj4@2.3.14",fi="928906144388980c914c5a357fc493aba59a747a",ci="proj4@>=2.3.14 <3.0.0",pi="2.14.12",di="4.2.6",yi={name:"ahocevar",email:"andreas.hocevar@gmail.com"},mi={shasum:"928906144388980c914c5a357fc493aba59a747a",tarball:"https://registry.npmjs.org/proj4/-/proj4-2.3.14.tgz"},vi=[{name:"cwmma",email:"calvin.metcalf@gmail.com"},{name:"ahocevar",email:"andreas.hocevar@gmail.com"}],Mi={host:"packages-13-west.internal.npmjs.com",tmp:"tmp/proj4-2.3.14.tgz_1457689264880_0.9409773757215589"},gi="https://registry.npmjs.org/proj4/-/proj4-2.3.14.tgz",bi="ERROR: No README data found!",_i={name:Xe,version:Je,description:Ke,main:Ze,directories:Ye,scripts:$e,repository:ti,author:ei,license:ii,jam:ai,devDependencies:ri,dependencies:si,contributors:ni,gitHead:hi,bugs:oi,homepage:ui,_id:li,_shasum:fi,_from:ci,_npmVersion:pi,_nodeVersion:di,_npmUser:yi,dist:mi,maintainers:vi,_npmOperationalInternal:Mi,_resolved:gi,readme:bi},xi=y(function(t,e){function i(t){return t*(Math.PI/180)}function a(t){return 180*(t/Math.PI)}function r(t){var e,a,r,s,h,o,u,l,f,c=t.lat,p=t.lon,d=6378137,y=.00669438,m=.9996,v=i(c),M=i(p);f=Math.floor((p+180)/6)+1,180===p&&(f=60),c>=56&&64>c&&p>=3&&12>p&&(f=32),c>=72&&84>c&&(p>=0&&9>p?f=31:p>=9&&21>p?f=33:p>=21&&33>p?f=35:p>=33&&42>p&&(f=37)),e=6*(f-1)-180+3,l=i(e),a=y/(1-y),r=d/Math.sqrt(1-y*Math.sin(v)*Math.sin(v)),s=Math.tan(v)*Math.tan(v),h=a*Math.cos(v)*Math.cos(v),o=Math.cos(v)*(M-l),u=d*((1-y/4-3*y*y/64-5*y*y*y/256)*v-(3*y/8+3*y*y/32+45*y*y*y/1024)*Math.sin(2*v)+(15*y*y/256+45*y*y*y/1024)*Math.sin(4*v)-35*y*y*y/3072*Math.sin(6*v));var g=m*r*(o+(1-s+h)*o*o*o/6+(5-18*s+s*s+72*h-58*a)*o*o*o*o*o/120)+5e5,b=m*(u+r*Math.tan(v)*(o*o/2+(5-s+9*h+4*h*h)*o*o*o*o/24+(61-58*s+s*s+600*h-330*a)*o*o*o*o*o*o/720));return 0>c&&(b+=1e7),{northing:Math.round(b),easting:Math.round(g),zoneNumber:f,zoneLetter:n(c)}}function s(t){var e=t.northing,i=t.easting,r=t.zoneLetter,n=t.zoneNumber;if(0>n||n>60)return null;var h,o,u,l,f,c,p,d,y,m,v=.9996,M=6378137,g=.00669438,b=(1-Math.sqrt(1-g))/(1+Math.sqrt(1-g)),_=i-5e5,x=e;"N">r&&(x-=1e7),d=6*(n-1)-180+3,h=g/(1-g),p=x/v,y=p/(M*(1-g/4-3*g*g/64-5*g*g*g/256)),m=y+(3*b/2-27*b*b*b/32)*Math.sin(2*y)+(21*b*b/16-55*b*b*b*b/32)*Math.sin(4*y)+151*b*b*b/96*Math.sin(6*y),o=M/Math.sqrt(1-g*Math.sin(m)*Math.sin(m)),u=Math.tan(m)*Math.tan(m),l=h*Math.cos(m)*Math.cos(m),f=M*(1-g)/Math.pow(1-g*Math.sin(m)*Math.sin(m),1.5),c=_/(o*v);var w=m-o*Math.tan(m)/f*(c*c/2-(5+3*u+10*l-4*l*l-9*h)*c*c*c*c/24+(61+90*u+298*l+45*u*u-252*h-3*l*l)*c*c*c*c*c*c/720);w=a(w);var P=(c-(1+2*u+l)*c*c*c/6+(5-2*l+28*u-3*l*l+8*h+24*u*u)*c*c*c*c*c/120)/Math.cos(m);P=d+a(P);var j;if(t.accuracy){var k=s({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});j={top:k.lat,right:k.lon,bottom:w,left:P}}else j={lat:w,lon:P};return j}function n(t){var e="Z";return 84>=t&&t>=72?e="X":72>t&&t>=64?e="W":64>t&&t>=56?e="V":56>t&&t>=48?e="U":48>t&&t>=40?e="T":40>t&&t>=32?e="S":32>t&&t>=24?e="R":24>t&&t>=16?e="Q":16>t&&t>=8?e="P":8>t&&t>=0?e="N":0>t&&t>=-8?e="M":-8>t&&t>=-16?e="L":-16>t&&t>=-24?e="K":-24>t&&t>=-32?e="J":-32>t&&t>=-40?e="H":-40>t&&t>=-48?e="G":-48>t&&t>=-56?e="F":-56>t&&t>=-64?e="E":-64>t&&t>=-72?e="D":-72>t&&t>=-80&&(e="C"),e}function h(t,e){var i="00000"+t.easting,a="00000"+t.northing;return t.zoneNumber+t.zoneLetter+o(t.easting,t.northing,t.zoneNumber)+i.substr(i.length-5,e)+a.substr(a.length-5,e)}function o(t,e,i){var a=u(i),r=Math.floor(t/1e5),s=Math.floor(e/1e5)%20;return l(r,s,a)}function u(t){var e=t%y;return 0===e&&(e=y),e}function l(t,e,i){var a=i-1,r=m.charCodeAt(a),s=v.charCodeAt(a),n=r+t-1,h=s+e,o=!1;n>x&&(n=n-x+M-1,o=!0),(n===g||g>r&&n>g||(n>g||g>r)&&o)&&n++,(n===b||b>r&&n>b||(n>b||b>r)&&o)&&(n++,n===g&&n++),n>x&&(n=n-x+M-1),h>_?(h=h-_+M-1,o=!0):o=!1,(h===g||g>s&&h>g||(h>g||g>s)&&o)&&h++,(h===b||b>s&&h>b||(h>b||b>s)&&o)&&(h++,h===g&&h++),h>_&&(h=h-_+M-1);var u=String.fromCharCode(n)+String.fromCharCode(h);return u}function f(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,i=t.length,a=null,r="",s=0;!/[A-Z]/.test(e=t.charAt(s));){if(s>=2)throw"MGRSPoint bad conversion from: "+t;r+=e,s++}var n=parseInt(r,10);if(0===s||s+3>i)throw"MGRSPoint bad conversion from: "+t;var h=t.charAt(s++);if("A">=h||"B"===h||"Y"===h||h>="Z"||"I"===h||"O"===h)throw"MGRSPoint zone letter "+h+" not handled: "+t;a=t.substring(s,s+=2);for(var o=u(n),l=c(a.charAt(0),o),f=p(a.charAt(1),o);f<d(h);)f+=2e6;var y=i-s;if(y%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 m,v,M,g,b,_=y/2,x=0,w=0;return _>0&&(m=1e5/Math.pow(10,_),v=t.substring(s,s+_),x=parseFloat(v)*m,M=t.substring(s+_),w=parseFloat(M)*m),g=x+l,b=w+f,{easting:g,northing:b,zoneLetter:h,zoneNumber:n,accuracy:m}}function c(t,e){for(var i=m.charCodeAt(e-1),a=1e5,r=!1;i!==t.charCodeAt(0);){if(i++,i===g&&i++,i===b&&i++,i>x){if(r)throw"Bad character: "+t;i=M,r=!0}a+=1e5}return a}function p(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var i=v.charCodeAt(e-1),a=0,r=!1;i!==t.charCodeAt(0);){if(i++,i===g&&i++,i===b&&i++,i>_){if(r)throw"Bad character: "+t;i=M,r=!0}a+=1e5}return a}function d(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}var y=6,m="AJSAJS",v="AFAFAF",M=65,g=73,b=79,_=86,x=90;e.forward=function(t,e){return e=e||5,h(r({lat:t[1],lon:t[0]}),e)},e.inverse=function(t){var e=s(f(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]},e.toPoint=function(t){var e=s(f(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}}),wi=xi&&"object"==typeof xi&&"default"in xi?xi["default"]:xi,Pi=y(function(t){t.exports=function(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e}}),ji=Pi&&"object"==typeof Pi&&"default"in Pi?Pi["default"]:Pi,ki=y(function(t){var e=Math.PI/2,i=1,a=2,r=3,s=4,n=5,h=484813681109536e-20,o=1.0026,u=.3826834323650898,l=function(t){return this instanceof l?(this.datum_type=s,void(t&&(t.datumCode&&"none"===t.datumCode&&(this.datum_type=n),t.datum_params&&(this.datum_params=t.datum_params.map(parseFloat),0===this.datum_params[0]&&0===this.datum_params[1]&&0===this.datum_params[2]||(this.datum_type=i),this.datum_params.length>3&&(0===this.datum_params[3]&&0===this.datum_params[4]&&0===this.datum_params[5]&&0===this.datum_params[6]||(this.datum_type=a,this.datum_params[3]*=h,this.datum_params[4]*=h,this.datum_params[5]*=h,this.datum_params[6]=this.datum_params[6]/1e6+1))),this.datum_type=t.grids?r:this.datum_type,this.a=t.a,this.b=t.b,this.es=t.es,this.ep2=t.ep2,this.datum_type===r&&(this.grids=t.grids)))):new l(t)};l.prototype={compare_datums:function(t){return this.datum_type!==t.datum_type?!1:this.a!==t.a||Math.abs(this.es-t.es)>5e-11?!1:this.datum_type===i?this.datum_params[0]===t.datum_params[0]&&this.datum_params[1]===t.datum_params[1]&&this.datum_params[2]===t.datum_params[2]:this.datum_type===a?this.datum_params[0]===t.datum_params[0]&&this.datum_params[1]===t.datum_params[1]&&this.datum_params[2]===t.datum_params[2]&&this.datum_params[3]===t.datum_params[3]&&this.datum_params[4]===t.datum_params[4]&&this.datum_params[5]===t.datum_params[5]&&this.datum_params[6]===t.datum_params[6]:this.datum_type===r||t.datum_type===r?this.nadgrids===t.nadgrids:!0},geodetic_to_geocentric:function(t){var i,a,r,s,n,h,o,u=t.x,l=t.y,f=t.z?t.z:0,c=0;if(-e>l&&l>-1.001*e)l=-e;else if(l>e&&1.001*e>l)l=e;else if(-e>l||l>e)return null;return u>Math.PI&&(u-=2*Math.PI),n=Math.sin(l),o=Math.cos(l),h=n*n,s=this.a/Math.sqrt(1-this.es*h),i=(s+f)*o*Math.cos(u),a=(s+f)*o*Math.sin(u),r=(s*(1-this.es)+f)*n,t.x=i,t.y=a,t.z=r,c},geocentric_to_geodetic:function(t){var i,a,r,s,n,h,o,u,l,f,c,p,d,y,m,v,M,g=1e-12,b=g*g,_=30,x=t.x,w=t.y,P=t.z?t.z:0;if(d=!1,i=Math.sqrt(x*x+w*w),a=Math.sqrt(x*x+w*w+P*P),i/this.a<g){if(d=!0,m=0,a/this.a<g)return v=e,void(M=-this.b)}else m=Math.atan2(w,x);r=P/a,s=i/a,n=1/Math.sqrt(1-this.es*(2-this.es)*s*s),u=s*(1-this.es)*n,l=r*n,y=0;do y++,o=this.a/Math.sqrt(1-this.es*l*l),M=i*u+P*l-o*(1-this.es*l*l),h=this.es*o/(o+M),n=1/Math.sqrt(1-h*(2-h)*s*s),f=s*(1-h)*n,c=r*n,p=c*u-f*l,u=f,l=c;while(p*p>b&&_>y);return v=Math.atan(c/Math.abs(f)),t.x=m,t.y=v,t.z=M,t},geocentric_to_geodetic_noniter:function(t){var i,a,r,s,n,h,l,f,c,p,d,y,m,v,M,g,b,_=t.x,x=t.y,w=t.z?t.z:0;if(_=parseFloat(_),x=parseFloat(x),w=parseFloat(w),b=!1,0!==_)i=Math.atan2(x,_);else if(x>0)i=e;else if(0>x)i=-e;else if(b=!0,i=0,w>0)a=e;else{if(!(0>w))return a=e,void(r=-this.b);a=-e}return n=_*_+x*x,s=Math.sqrt(n),h=w*o,f=Math.sqrt(h*h+n),p=h/f,y=s/f,d=p*p*p,l=w+this.b*this.ep2*d,g=s-this.a*this.es*y*y*y,c=Math.sqrt(l*l+g*g),m=l/c,v=g/c,M=this.a/Math.sqrt(1-this.es*m*m),r=v>=u?s/v-M:-u>=v?s/-v-M:w/m+M*(this.es-1),b===!1&&(a=Math.atan(m/v)),t.x=i,t.y=a,t.z=r,t},geocentric_to_wgs84:function(t){if(this.datum_type===i)t.x+=this.datum_params[0],t.y+=this.datum_params[1],t.z+=this.datum_params[2];else if(this.datum_type===a){var e=this.datum_params[0],r=this.datum_params[1],s=this.datum_params[2],n=this.datum_params[3],h=this.datum_params[4],o=this.datum_params[5],u=this.datum_params[6],l=u*(t.x-o*t.y+h*t.z)+e,f=u*(o*t.x+t.y-n*t.z)+r,c=u*(-h*t.x+n*t.y+t.z)+s;t.x=l,t.y=f,t.z=c}},geocentric_from_wgs84:function(t){if(this.datum_type===i)t.x-=this.datum_params[0],t.y-=this.datum_params[1],t.z-=this.datum_params[2];else if(this.datum_type===a){var e=this.datum_params[0],r=this.datum_params[1],s=this.datum_params[2],n=this.datum_params[3],h=this.datum_params[4],o=this.datum_params[5],u=this.datum_params[6],l=(t.x-e)/u,f=(t.y-r)/u,c=(t.z-s)/u;t.x=l+o*f-h*c,t.y=-o*l+f+n*c,t.z=h*l-n*f+c}}},t.exports=l}),Si=ki&&"object"==typeof ki&&"default"in ki?ki["default"]:ki,Ci=y(function(t){t.exports=function(t,e){t=t||{};var i,a;if(!e)return t;for(a in e)i=e[a],void 0!==i&&(t[a]=i);return t}}),Ei=Ci&&"object"==typeof Ci&&"default"in Ci?Ci["default"]:Ci,Oi=y(function(t,e){e.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},e.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},e.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},e.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},e.airy={a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},e.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},e.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},e.mod_airy={a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},e.andrae={a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},e.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},e.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},e.bessel={a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},e.bess_nam={a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},e.clrk66={a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},e.clrk80={a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},e.clrk58={a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},e.CPM={a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},e.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},e.engelis={a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},e.evrst30={a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},e.evrst48={a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},e.evrst56={a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},e.evrst69={a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},e.evrstSS={a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},e.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},e.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},e.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},e.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},e.hough={a:6378270,rf:297,ellipseName:"Hough"},e.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},e.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},e.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},e.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},e.new_intl={a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},e.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},e.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},e.SEasia={a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},e.walbeck={a:6376896,b:6355834.8467,ellipseName:"Walbeck"},e.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},e.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},e.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"},e.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"},e.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}}),Ai=Oi&&"object"==typeof Oi&&"default"in Oi?Oi["default"]:Oi,Ii=y(function(t,e){e.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},e.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},e.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},e.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},e.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},e.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},e.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},e.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},e.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},e.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},e.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},e.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},e.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},e.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},e.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},e.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}}),Ni=Ii&&"object"==typeof Ii&&"default"in Ii?Ii["default"]:Ii,Ti=y(function(t){var e=Ni,i=Ai,a=Ei,r=Si,s=1e-10,n=.16666666666666666,h=.04722222222222222,o=.022156084656084655;t.exports=function(t){if(t.datumCode&&"none"!==t.datumCode){var u=e[t.datumCode];u&&(t.datum_params=u.towgs84?u.towgs84.split(","):null,t.ellps=u.ellipse,t.datumName=u.datumName?u.datumName:t.datumCode)}if(!t.a){var l=i[t.ellps]?i[t.ellps]:i.WGS84;a(t,l)}return t.rf&&!t.b&&(t.b=(1-1/t.rf)*t.a),(0===t.rf||Math.abs(t.a-t.b)<s)&&(t.sphere=!0,t.b=t.a),t.a2=t.a*t.a,t.b2=t.b*t.b,t.es=(t.a2-t.b2)/t.a2,t.e=Math.sqrt(t.es),t.R_A&&(t.a*=1-t.es*(n+t.es*(h+t.es*o)),t.a2=t.a*t.a,t.b2=t.b*t.b,t.es=0),t.ep2=(t.a2-t.b2)/t.b2,t.k0||(t.k0=1),t.axis||(t.axis="enu"),t.datum||(t.datum=r(t)),t}}),Ri=Ti&&"object"==typeof Ti&&"default"in Ti?Ti["default"]:Ti,qi=y(function(t,e){function i(t){return t}e.init=function(){},e.forward=i,e.inverse=i,e.names=["longlat","identity"]}),Gi=qi&&"object"==typeof qi&&"default"in qi?qi["default"]:qi,Bi=y(function(t,e){var i=zt,a=Math.PI/2,r=1e-10,s=57.29577951308232,n=Nt,h=Math.PI/4,o=Se,u=je;e.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=i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},e.forward=function(t){var e=t.x,i=t.y;if(i*s>90&&-90>i*s&&e*s>180&&-180>e*s)return null;var u,l;if(Math.abs(Math.abs(i)-a)<=r)return null;if(this.sphere)u=this.x0+this.a*this.k0*n(e-this.long0),l=this.y0+this.a*this.k0*Math.log(Math.tan(h+.5*i));else{var f=Math.sin(i),c=o(this.e,i,f);u=this.x0+this.a*this.k0*n(e-this.long0),l=this.y0-this.a*this.k0*Math.log(c)}return t.x=u,t.y=l,t},e.inverse=function(t){var e,i,r=t.x-this.x0,s=t.y-this.y0;if(this.sphere)i=a-2*Math.atan(Math.exp(-s/(this.a*this.k0)));else{var h=Math.exp(-s/(this.a*this.k0));if(i=u(this.e,h),-9999===i)return null}return e=n(this.long0+r/(this.a*this.k0)),t.x=e,t.y=i,t},e.names=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]}),Di=Bi&&"object"==typeof Bi&&"default"in Bi?Bi["default"]:Bi,Li=y(function(t,e){function i(t,e){var i=s.length;return t.names?(s[i]=t,t.names.forEach(function(t){r[t.toLowerCase()]=i}),this):(console.log(e),!0)}var a=[Di,Gi],r={},s=[];e.add=i,e.get=function(t){if(!t)return!1;var e=t.toLowerCase();return"undefined"!=typeof r[e]&&s[r[e]]?s[r[e]]:void 0},e.start=function(){a.forEach(i)}}),zi=Li&&"object"==typeof Li&&"default"in Li?Li["default"]:Li,Ui=y(function(t,e){e.ft={to_meter:.3048},e["us-ft"]={to_meter:1200/3937}}),Fi=Ui&&"object"==typeof Ui&&"default"in Ui?Ui["default"]:Ui,Vi=y(function(t,e){e.greenwich=0,e.lisbon=-9.131906111111,e.paris=2.337229166667,e.bogota=-74.080916666667,e.madrid=-3.687938888889,e.rome=12.452333333333,e.bern=7.439583333333,e.jakarta=106.807719444444,e.ferro=-17.666666666667,e.brussels=4.367975,e.stockholm=18.058277777778,e.athens=23.7163375,e.oslo=10.722916666667}),Qi=Vi&&"object"==typeof Vi&&"default"in Vi?Vi["default"]:Vi,Hi=y(function(t){var e=.017453292519943295,i=Qi,a=Fi;t.exports=function(t){var r={},s={};t.split("+").map(function(t){return t.trim()}).filter(function(t){return t}).forEach(function(t){var e=t.split("=");e.push(!0),s[e[0].toLowerCase()]=e[1]});var n,h,o,u={proj:"projName",datum:"datumCode",rf:function(t){r.rf=parseFloat(t)},lat_0:function(t){r.lat0=t*e},lat_1:function(t){r.lat1=t*e},lat_2:function(t){r.lat2=t*e},lat_ts:function(t){r.lat_ts=t*e},lon_0:function(t){r.long0=t*e},lon_1:function(t){r.long1=t*e},lon_2:function(t){r.long2=t*e},alpha:function(t){r.alpha=parseFloat(t)*e},lonc:function(t){r.longc=t*e},x_0:function(t){r.x0=parseFloat(t)},y_0:function(t){r.y0=parseFloat(t)},k_0:function(t){r.k0=parseFloat(t)},k:function(t){r.k0=parseFloat(t)},a:function(t){r.a=parseFloat(t)},b:function(t){r.b=parseFloat(t)},r_a:function(){r.R_A=!0},zone:function(t){r.zone=parseInt(t,10)},south:function(){r.utmSouth=!0},towgs84:function(t){r.datum_params=t.split(",").map(function(t){return parseFloat(t)})},to_meter:function(t){r.to_meter=parseFloat(t)},units:function(t){r.units=t,a[t]&&(r.to_meter=a[t].to_meter)},from_greenwich:function(t){r.from_greenwich=t*e},pm:function(t){r.from_greenwich=(i[t]?i[t]:parseFloat(t))*e},nadgrids:function(t){"@null"===t?r.datumCode="none":r.nadgrids=t},axis:function(t){var e="ewnsud";3===t.length&&-1!==e.indexOf(t.substr(0,1))&&-1!==e.indexOf(t.substr(1,1))&&-1!==e.indexOf(t.substr(2,1))&&(r.axis=t)}};for(n in s)h=s[n],n in u?(o=u[n],"function"==typeof o?o(h):r[o]=h):r[n]=h;return"string"==typeof r.datumCode&&"WGS84"!==r.datumCode&&(r.datumCode=r.datumCode.toLowerCase()),r}}),Wi=Hi&&"object"==typeof Hi&&"default"in Hi?Hi["default"]:Hi,Xi=y(function(t){function e(t,e,a){t[e]=a.map(function(t){var e={};return i(t,e),e}).reduce(function(t,e){return h(t,e)},{})}function i(t,a){var r;return Array.isArray(t)?(r=t.shift(),"PARAMETER"===r&&(r=t.shift()),1===t.length?Array.isArray(t[0])?(a[r]={},i(t[0],a[r])):a[r]=t[0]:t.length?"TOWGS84"===r?a[r]=t:(a[r]={},["UNIT","PRIMEM","VERT_DATUM"].indexOf(r)>-1?(a[r]={name:t[0].toLowerCase(),convert:t[1]},3===t.length&&(a[r].auth=t[2])):"SPHEROID"===r?(a[r]={name:t[0],a:t[1],rf:t[2]},4===t.length&&(a[r].auth=t[3])):["GEOGCS","GEOCCS","DATUM","VERT_CS","COMPD_CS","LOCAL_CS","FITTED_CS","LOCAL_DATUM"].indexOf(r)>-1?(t[0]=["name",t[0]],e(a,r,t)):t.every(function(t){return Array.isArray(t)})?e(a,r,t):i(t,a[r])):a[r]=!0,void 0):void(a[t]=!0)}function a(t,e){var i=e[0],a=e[1];!(i in t)&&a in t&&(t[i]=t[a],3===e.length&&(t[i]=e[2](t[i])))}function r(t){return t*n}function s(t){function e(e){var i=t.to_meter||1;return parseFloat(e,10)*i}"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=parseFloat(t.UNIT.convert,10)*t.DATUM.SPHEROID.a):t.to_meter=parseFloat(t.UNIT.convert,10))),t.GEOGCS&&(t.GEOGCS.DATUM?t.datumCode=t.GEOGCS.DATUM.name.toLowerCase():t.datumCode=t.GEOGCS.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"),t.GEOGCS.DATUM&&t.GEOGCS.DATUM.SPHEROID&&(t.ellps=t.GEOGCS.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=t.GEOGCS.DATUM.SPHEROID.a,t.rf=parseFloat(t.GEOGCS.DATUM.SPHEROID.rf,10)),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36")),t.b&&!isFinite(t.b)&&(t.b=t.a);var i=function(e){return a(t,e)},s=[["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"],["lat0","latitude_of_center",r],["longitude_of_center","Longitude_Of_Center"],["longc","longitude_of_center",r],["x0","false_easting",e],["y0","false_northing",e],["long0","central_meridian",r],["lat0","latitude_of_origin",r],["lat0","standard_parallel_1",r],["lat1","standard_parallel_1",r],["lat2","standard_parallel_2",r],["alpha","azimuth",r],["srsCode","name"]];s.forEach(i),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=r(t.lat1>0?90:-90),t.lat_ts=t.lat1)}var n=.017453292519943295,h=Ei;t.exports=function(t,e){var a=JSON.parse((","+t).replace(/\s*\,\s*([A-Z_0-9]+?)(\[)/g,',["$1",').slice(1).replace(/\s*\,\s*([A-Z_0-9]+?)\]/g,',"$1"]').replace(/,\["VERTCS".+/,"")),r=a.shift(),n=a.shift();a.unshift(["name",n]),a.unshift(["type",r]),a.unshift("output");var o={};return i(a,o),s(o.output),h(e,o.output)}}),Ji=Xi&&"object"==typeof Xi&&"default"in Xi?Xi["default"]:Xi,Ki=y(function(t){t.exports=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"]}}),Zi=Ki&&"object"==typeof Ki&&"default"in Ki?Ki["default"]:Ki,Yi=y(function(t){function e(t){var i=this;if(2===arguments.length){var s=arguments[1];"string"==typeof s?"+"===s.charAt(0)?e[t]=a(arguments[1]):e[t]=r(arguments[1]):e[t]=s}else if(1===arguments.length){if(Array.isArray(t))return t.map(function(t){Array.isArray(t)?e.apply(i,t):e(t)});if("string"==typeof t){if(t in e)return e[t]}else"EPSG"in t?e["EPSG:"+t.EPSG]=t:"ESRI"in t?e["ESRI:"+t.ESRI]=t:"IAU2000"in t?e["IAU2000:"+t.IAU2000]=t:console.log(t);return}}var i=Zi,a=Wi,r=Ji;i(e),t.exports=e}),$i=Yi&&"object"==typeof Yi&&"default"in Yi?Yi["default"]:Yi,ta=y(function(t){function e(t){return"string"==typeof t}function i(t){return t in n}function a(t){var e=["GEOGCS","GEOCCS","PROJCS","LOCAL_CS"];return e.reduce(function(e,i){return e+1+t.indexOf(i)},0)}function r(t){return"+"===t[0]}function s(t){return e(t)?i(t)?n[t]:a(t)?h(t):r(t)?o(t):void 0:t}var n=$i,h=Ji,o=Wi;t.exports=s}),ea=ta&&"object"==typeof ta&&"default"in ta?ta["default"]:ta,ia=y(function(t){function e(t,r){if(!(this instanceof e))return new e(t);r=r||function(t){if(t)throw t};var n=i(t);if("object"!=typeof n)return void r(t);var h=s(n),o=e.projections.get(h.projName);o?(a(this,h),a(this,o),this.init(),r(null,this)):r(t)}var i=ea,a=Ei,r=zi,s=Ri;e.projections=r,e.projections.start(),t.exports=e}),aa=ia&&"object"==typeof ia&&"default"in ia?ia["default"]:ia,ra=y(function(t){t.exports=function(t,e,i){var a,r,s,n=i.x,h=i.y,o=i.z||0;for(s=0;3>s;s++)if(!e||2!==s||void 0!==i.z)switch(0===s?(a=n,r="x"):1===s?(a=h,r="y"):(a=o,r="z"),t.axis[s]){case"e":i[r]=a;break;case"w":i[r]=-a;break;case"n":i[r]=a;break;case"s":i[r]=-a;break;case"u":void 0!==i[r]&&(i.z=a);break;case"d":void 0!==i[r]&&(i.z=-a);break;default:return null}return i}}),sa=ra&&"object"==typeof ra&&"default"in ra?ra["default"]:ra,na=y(function(t){var e=1,i=2,a=3,r=5,s=6378137,n=.006694379990141316;t.exports=function(t,h,o){function u(t){return t===e||t===i}var l,f,c;if(t.compare_datums(h))return o;if(t.datum_type===r||h.datum_type===r)return o;var p=t.a,d=t.es,y=h.a,m=h.es,v=t.datum_type;if(v===a)if(0===this.apply_gridshift(t,0,o))t.a=s,t.es=n;else{if(!t.datum_params)return t.a=p,t.es=t.es,o;for(l=1,f=0,c=t.datum_params.length;c>f;f++)l*=t.datum_params[f];if(0===l)return t.a=p,t.es=t.es,o;v=t.datum_params.length>3?i:e}return h.datum_type===a&&(h.a=s,h.es=n),(t.es!==h.es||t.a!==h.a||u(v)||u(h.datum_type))&&(t.geodetic_to_geocentric(o),u(t.datum_type)&&t.geocentric_to_wgs84(o),u(h.datum_type)&&h.geocentric_from_wgs84(o),h.geocentric_to_geodetic(o)),h.datum_type===a&&this.apply_gridshift(h,1,o),t.a=p,t.es=d,h.a=y,h.es=m,o}}),ha=na&&"object"==typeof na&&"default"in na?na["default"]:na,oa=y(function(t){var e=.017453292519943295,i=57.29577951308232,a=1,r=2,s=ha,n=sa,h=aa,o=ji;t.exports=function u(t,l,f){function c(t,e){return(t.datum.datum_type===a||t.datum.datum_type===r)&&"WGS84"!==e.datumCode}var p;return Array.isArray(f)&&(f=o(f)),t.datum&&l.datum&&(c(t,l)||c(l,t))&&(p=new h("WGS84"),u(t,p,f),t=p),"enu"!==t.axis&&n(t,!1,f),"longlat"===t.projName?(f.x*=e,f.y*=e):(t.to_meter&&(f.x*=t.to_meter,f.y*=t.to_meter),t.inverse(f)),t.from_greenwich&&(f.x+=t.from_greenwich),f=s(t.datum,l.datum,f),l.from_greenwich&&(f.x-=l.from_greenwich),"longlat"===l.projName?(f.x*=i,f.y*=i):(l.forward(f),l.to_meter&&(f.x/=l.to_meter,f.y/=l.to_meter)),"enu"!==l.axis&&n(l,!0,f),f}}),ua=oa&&"object"==typeof oa&&"default"in oa?oa["default"]:oa,la=y(function(t){function e(t,i,a){if(!(this instanceof e))return new e(t,i,a);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&&"undefined"==typeof i){var r=t.split(",");this.x=parseFloat(r[0],10),this.y=parseFloat(r[1],10),this.z=parseFloat(r[2],10)||0}else this.x=t,this.y=i,this.z=a||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}var i=wi;e.fromMGRS=function(t){return new e(i.toPoint(t))},e.prototype.toMGRS=function(t){return i.forward([this.x,this.y],t)},t.exports=e}),fa=la&&"object"==typeof la&&"default"in la?la["default"]:la,ca=y(function(t){function e(t,e,i){var a;return Array.isArray(i)?(a=s(t,e,i),3===i.length?[a.x,a.y,a.z]:[a.x,a.y]):s(t,e,i)}function i(t){return t instanceof r?t:t.oProj?t.oProj:r(t)}function a(t,a,r){t=i(t);var s,h=!1;return"undefined"==typeof a?(a=t,t=n,h=!0):("undefined"!=typeof a.x||Array.isArray(a))&&(r=a,a=t,t=n,h=!0),a=i(a),r?e(t,a,r):(s={forward:function(i){return e(t,a,i)},inverse:function(i){return e(a,t,i)}},h&&(s.oProj=a),s)}var r=aa,s=ua,n=r("WGS84");t.exports=a}),pa=ca&&"object"==typeof ca&&"default"in ca?ca["default"]:ca,da=y(function(t){var e=pa;e.defaultDatum="WGS84",e.Proj=aa,e.WGS84=new e.Proj("WGS84"),e.Point=fa,e.toPoint=ji,e.defs=$i,e.transform=ua,e.mgrs=wi,e.version=_i.version,We(e),t.exports=e}),ya=da&&"object"==typeof da&&"default"in da?da["default"]:da;!function(t){function e(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function i(t){return"string"!=typeof t&&(t=String(t)),t}function a(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return y.iterable&&(e[Symbol.iterator]=function(){return e}),e}function r(t){this.map={},t instanceof r?t.forEach(function(t,e){this.append(e,t)},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function s(t){return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0);
4}function n(t){return new Promise(function(e,i){t.onload=function(){e(t.result)},t.onerror=function(){i(t.error)}})}function h(t){var e=new FileReader;return e.readAsArrayBuffer(t),n(e)}function o(t){var e=new FileReader;return e.readAsText(t),n(e)}function u(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,"string"==typeof t)this._bodyText=t;else if(y.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(y.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(y.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(t){if(!y.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):y.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},y.blob?(this.blob=function(){var t=s(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(h)},this.text=function(){var t=s(this);if(t)return t;if(this._bodyBlob)return o(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var t=s(this);return t?t:Promise.resolve(this._bodyText)},y.formData&&(this.formData=function(){return this.text().then(c)}),this.json=function(){return this.text().then(JSON.parse)},this}function l(t){var e=t.toUpperCase();return m.indexOf(e)>-1?e:t}function f(t,e){e=e||{};var i=e.body;if(f.prototype.isPrototypeOf(t)){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new r(t.headers)),this.method=t.method,this.mode=t.mode,i||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=t;if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new r(e.headers)),this.method=l(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function c(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var i=t.split("="),a=i.shift().replace(/\+/g," "),r=i.join("=").replace(/\+/g," ");e.append(decodeURIComponent(a),decodeURIComponent(r))}}),e}function p(t){var e=new r,i=(t.getAllResponseHeaders()||"").trim().split("\n");return i.forEach(function(t){var i=t.trim().split(":"),a=i.shift().trim(),r=i.join(":").trim();e.append(a,r)}),e}function d(t,e){e||(e={}),this.type="default",this.status=e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText,this.headers=e.headers instanceof r?e.headers:new r(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var y={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};r.prototype.append=function(t,a){t=e(t),a=i(a);var r=this.map[t];r||(r=[],this.map[t]=r),r.push(a)},r.prototype["delete"]=function(t){delete this.map[e(t)]},r.prototype.get=function(t){var i=this.map[e(t)];return i?i[0]:null},r.prototype.getAll=function(t){return this.map[e(t)]||[]},r.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},r.prototype.set=function(t,a){this.map[e(t)]=[i(a)]},r.prototype.forEach=function(t,e){Object.getOwnPropertyNames(this.map).forEach(function(i){this.map[i].forEach(function(a){t.call(e,a,i,this)},this)},this)},r.prototype.keys=function(){var t=[];return this.forEach(function(e,i){t.push(i)}),a(t)},r.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),a(t)},r.prototype.entries=function(){var t=[];return this.forEach(function(e,i){t.push([i,e])}),a(t)},y.iterable&&(r.prototype[Symbol.iterator]=r.prototype.entries);var m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];f.prototype.clone=function(){return new f(this)},u.call(f.prototype),u.call(d.prototype),d.prototype.clone=function(){return new d(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new r(this.headers),url:this.url})},d.error=function(){var t=new d(null,{status:0,statusText:""});return t.type="error",t};var v=[301,302,303,307,308];d.redirect=function(t,e){if(-1===v.indexOf(e))throw new RangeError("Invalid status code");return new d(null,{status:e,headers:{location:t}})},t.Headers=r,t.Request=f,t.Response=d,t.fetch=function(t,e){return new Promise(function(i,a){function r(){return"responseURL"in n?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):void 0}var s;s=f.prototype.isPrototypeOf(t)&&!e?t:new f(t,e);var n=new XMLHttpRequest;n.onload=function(){var t={status:n.status,statusText:n.statusText,headers:p(n),url:r()},e="response"in n?n.response:n.responseText;i(new d(e,t))},n.onerror=function(){a(new TypeError("Network request failed"))},n.ontimeout=function(){a(new TypeError("Network request failed"))},n.open(s.method,s.url,!0),"include"===s.credentials&&(n.withCredentials=!0),"responseType"in n&&y.blob&&(n.responseType="blob"),s.headers.forEach(function(t,e){n.setRequestHeader(e,t)}),n.send("undefined"==typeof s._bodyInit?null:s._bodyInit)})},t.fetch.polyfill=!0}}("undefined"!=typeof self?self:this);var ma,va=y(function(t,e){function i(t){return t&&t.__esModule?t:{"default":t}}function a(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function r(t){return d[t]}function s(t){if(t in d)return Promise.resolve(d[t]);var e=h(t),i="https://epsg.io/"+e+".proj4";return fetch(i).then(function(t){if(!t.ok)throw new Error("HTTP response code: "+t.status);return t.text()}).then(function(e){return n(t,e,{reverseAxes:t in y})})}function n(t,e){var i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];if(!t||!e)throw new Error("crsUri and proj cannot be empty");var a=void 0;if("string"==typeof e){if(a=(0,l["default"])(e),!a)throw new Error("Unsupported proj4 string: "+e);i.reverseAxes&&(a=o(a))}else a=e;return d[t]=a,a}function h(t){var e=void 0;if(0!==t.indexOf(p))throw new Error("Unsupported CRS URI: "+t);return e=t.substr(p.length)}function o(t){return{forward:function(e){return t.forward(e).reverse()},inverse:function(e){return t.inverse([e[1],e[0]])}}}Object.defineProperty(e,"__esModule",{value:!0}),e.get=r,e.load=s,e.set=n;var u=ya,l=i(u),f="http://www.opengis.net/def/crs/",c=f+"OGC/",p=f+"EPSG/0/",d={},y=a({},p+4326,!0),m=(0,l["default"])("+proj=longlat +datum=WGS84 +no_defs");n(c+"1.3/CRS84",m),n(p+4979,o(m))}),Ma=va.load,ga=va.get,ba="http://www.opengis.net/def/crs/",_a=ba+"EPSG/0/4979",xa=ba+"EPSG/0/4326",wa=ba+"OGC/1.3/CRS84",Pa=[_a,xa,wa],ja=(ma={},ft(ma,_a,1),ft(ma,xa,1),ft(ma,wa,0),ma),ka=function(){function t(e){ut(this,t),this._collection=e,this._filter={},this._subset={}}return lt(t,[{key:"filter",value:function(t){return Z(t,this._filter),this}},{key:"subset",value:function(t){return Z(t,this._subset),this}},{key:"execute",value:function(){var e=this,i=this._collection,a={type:at,coverages:[],parameters:i.parameters,domainType:i.domainType},r=[],s=!0,n=!1,h=void 0;try{for(var o,u=function(){var t=o.value;r.push(t.loadDomain().then(function(i){return K(i,e._filter)?0!==Object.keys(e._subset).length?t.subsetByValue(e._subset).then(function(t){a.coverages.push(t)}):void a.coverages.push(t):void 0}))},l=i.coverages[Symbol.iterator]();!(s=(o=l.next()).done);s=!0)u()}catch(f){n=!0,h=f}finally{try{!s&&l["return"]&&l["return"]()}finally{if(n)throw h}}return Promise.all(r).then(function(){return a.query=function(){return new t(a)},a})}}]),t}(),Sa=y(function(t){function e(t,e,i,a,r,s){var n=["function ",t,"(a,l,h,",a.join(","),"){",s?"":"var i=",i?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",r?".get(m)":"[m]"];return s?e.indexOf("c")<0?n.push(";if(x===y){return m}else if(x<=y){"):n.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):n.push(";if(",e,"){i=m;"),i?n.push("l=m+1}else{h=m-1}"):n.push("h=m-1}else{l=m+1}"),n.push("}"),s?n.push("return -1};"):n.push("return i};"),n.join("")}function i(t,i,a,r){var s=new Function([e("A","x"+t+"y",i,["y"],!1,r),e("B","x"+t+"y",i,["y"],!0,r),e("P","c(x,y)"+t+"0",i,["y","c"],!1,r),e("Q","c(x,y)"+t+"0",i,["y","c"],!0,r),"function dispatchBsearch",a,"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch",a].join(""));return s()}t.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}}),Ca=Sa&&"object"==typeof Sa&&"default"in Sa?Sa["default"]:Sa,Ea=y(function(t){function e(t,e,i,a,r){this.mid=t,this.left=e,this.right=i,this.leftPoints=a,this.rightPoints=r,this.count=(e?e.count:0)+(i?i.count:0)+a.length}function i(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function a(t,e){var i=c(e);t.mid=i.mid,t.left=i.left,t.right=i.right,t.leftPoints=i.leftPoints,t.rightPoints=i.rightPoints,t.count=i.count}function r(t,e){var i=t.intervals([]);i.push(e),a(t,i)}function s(t,e){var i=t.intervals([]),r=i.indexOf(e);return 0>r?m:(i.splice(r,1),a(t,i),v)}function n(t,e,i){for(var a=0;a<t.length&&t[a][0]<=e;++a){var r=i(t[a]);if(r)return r}}function h(t,e,i){for(var a=t.length-1;a>=0&&t[a][1]>=e;--a){var r=i(t[a]);if(r)return r}}function o(t,e){for(var i=0;i<t.length;++i){var a=e(t[i]);if(a)return a}}function u(t,e){return t-e}function l(t,e){var i=t[0]-e[0];return i?i:t[1]-e[1]}function f(t,e){var i=t[1]-e[1];return i?i:t[0]-e[0]}function c(t){if(0===t.length)return null;for(var i=[],a=0;a<t.length;++a)i.push(t[a][0],t[a][1]);i.sort(u);for(var r=i[i.length>>1],s=[],n=[],h=[],a=0;a<t.length;++a){var o=t[a];o[1]<r?s.push(o):r<o[0]?n.push(o):h.push(o)}var p=h,d=h.slice();return p.sort(l),d.sort(f),new e(r,c(s),c(n),p,d)}function p(t){this.root=t}function d(t){return new p(t&&0!==t.length?c(t):null)}var y=Ca,m=0,v=1,M=2;t.exports=d;var g=e.prototype;g.intervals=function(t){return t.push.apply(t,this.leftPoints),this.left&&this.left.intervals(t),this.right&&this.right.intervals(t),t},g.insert=function(t){var e=this.count-this.leftPoints.length;if(this.count+=1,t[1]<this.mid)this.left?4*(this.left.count+1)>3*(e+1)?r(this,t):this.left.insert(t):this.left=c([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?r(this,t):this.right.insert(t):this.right=c([t]);else{var i=y.ge(this.leftPoints,t,l),a=y.ge(this.rightPoints,t,f);this.leftPoints.splice(i,0,t),this.rightPoints.splice(a,0,t)}},g.remove=function(t){var e=this.count-this.leftPoints;if(t[1]<this.mid){if(!this.left)return m;var a=this.right?this.right.count:0;if(4*a>3*(e-1))return s(this,t);var r=this.left.remove(t);return r===M?(this.left=null,this.count-=1,v):(r===v&&(this.count-=1),r)}if(t[0]>this.mid){if(!this.right)return m;var n=this.left?this.left.count:0;if(4*n>3*(e-1))return s(this,t);var r=this.right.remove(t);return r===M?(this.right=null,this.count-=1,v):(r===v&&(this.count-=1),r)}if(1===this.count)return this.leftPoints[0]===t?M:m;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var h=this,o=this.left;o.right;)h=o,o=o.right;if(h===this)o.right=this.right;else{var u=this.left,r=this.right;h.count-=o.count,h.right=o.left,o.left=u,o.right=r}i(this,o),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?i(this,this.left):i(this,this.right);return v}for(var u=y.ge(this.leftPoints,t,l);u<this.leftPoints.length&&this.leftPoints[u][0]===t[0];++u)if(this.leftPoints[u]===t){this.count-=1,this.leftPoints.splice(u,1);for(var r=y.ge(this.rightPoints,t,f);r<this.rightPoints.length&&this.rightPoints[r][1]===t[1];++r)if(this.rightPoints[r]===t)return this.rightPoints.splice(r,1),v}return m},g.queryPoint=function(t,e){if(t<this.mid){if(this.left){var i=this.left.queryPoint(t,e);if(i)return i}return n(this.leftPoints,t,e)}if(t>this.mid){if(this.right){var i=this.right.queryPoint(t,e);if(i)return i}return h(this.rightPoints,t,e)}return o(this.leftPoints,e)},g.queryInterval=function(t,e,i){if(t<this.mid&&this.left){var a=this.left.queryInterval(t,e,i);if(a)return a}if(e>this.mid&&this.right){var a=this.right.queryInterval(t,e,i);if(a)return a}return e<this.mid?n(this.leftPoints,e,i):t>this.mid?h(this.rightPoints,t,i):o(this.leftPoints,i)};var b=p.prototype;b.insert=function(t){this.root?this.root.insert(t):this.root=new e(t[0],null,null,[t],[t])},b.remove=function(t){if(this.root){var e=this.root.remove(t);return e===M&&(this.root=null),e!==m}return!1},b.queryPoint=function(t,e){return this.root?this.root.queryPoint(t,e):void 0},b.queryInterval=function(t,e,i){return e>=t&&this.root?this.root.queryInterval(t,e,i):void 0},Object.defineProperty(b,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(b,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})}),Oa=Ea&&"object"==typeof Ea&&"default"in Ea?Ea["default"]:Ea,Aa=y(function(t){function e(t,e){var i=t+e,a=i-t,r=i-a,s=e-a,n=t-r,h=n+s;return h?[h,i]:[i]}function i(t,i){var a=0|t.length,r=0|i.length;if(1===a&&1===r)return e(t[0],-i[0]);var s,n,h=a+r,o=new Array(h),u=0,l=0,f=0,c=Math.abs,p=t[l],d=c(p),y=-i[f],m=c(y);m>d?(n=p,l+=1,a>l&&(p=t[l],d=c(p))):(n=y,f+=1,r>f&&(y=-i[f],m=c(y))),a>l&&m>d||f>=r?(s=p,l+=1,a>l&&(p=t[l],d=c(p))):(s=y,f+=1,r>f&&(y=-i[f],m=c(y)));for(var v,M,g,b,_,x=s+n,w=x-s,P=n-w,j=P,k=x;a>l&&r>f;)m>d?(s=p,l+=1,a>l&&(p=t[l],d=c(p))):(s=y,f+=1,r>f&&(y=-i[f],m=c(y))),n=j,x=s+n,w=x-s,P=n-w,P&&(o[u++]=P),v=k+x,M=v-k,g=v-M,b=x-M,_=k-g,j=_+b,k=v;for(;a>l;)s=p,n=j,x=s+n,w=x-s,P=n-w,P&&(o[u++]=P),v=k+x,M=v-k,g=v-M,b=x-M,_=k-g,j=_+b,k=v,l+=1,a>l&&(p=t[l]);for(;r>f;)s=y,n=j,x=s+n,w=x-s,P=n-w,P&&(o[u++]=P),v=k+x,M=v-k,g=v-M,b=x-M,_=k-g,j=_+b,k=v,f+=1,r>f&&(y=-i[f]);return j&&(o[u++]=j),k&&(o[u++]=k),u||(o[u++]=0),o.length=u,o}t.exports=i}),Ia=Aa&&"object"==typeof Aa&&"default"in Aa?Aa["default"]:Aa,Na=y(function(t){function e(t,e,i){var a=t+e,r=a-t,s=a-r,n=e-r,h=t-s;return i?(i[0]=h+n,i[1]=a,i):[h+n,a]}t.exports=e}),Ta=Na&&"object"==typeof Na&&"default"in Na?Na["default"]:Na,Ra=y(function(t){function e(t,e,a){var r=t*e,s=i*t,n=s-t,h=s-n,o=t-h,u=i*e,l=u-e,f=u-l,c=e-f,p=r-h*f,d=p-o*f,y=d-h*c,m=o*c-y;return a?(a[0]=m,a[1]=r,a):[m,r]}t.exports=e;var i=+(Math.pow(2,27)+1)}),qa=Ra&&"object"==typeof Ra&&"default"in Ra?Ra["default"]:Ra,Ga=y(function(t){function e(t,e){var r=t.length;if(1===r){var s=i(t[0],e);return s[0]?s:[s[1]]}var n=new Array(2*r),h=[.1,.1],o=[.1,.1],u=0;i(t[0],e,h),h[0]&&(n[u++]=h[0]);for(var l=1;r>l;++l){i(t[l],e,o);var f=h[1];a(f,o[0],h),h[0]&&(n[u++]=h[0]);var c=o[1],p=h[1],d=c+p,y=d-c,m=p-y;h[1]=d,m&&(n[u++]=m)}return h[1]&&(n[u++]=h[1]),0===u&&(n[u++]=0),n.length=u,n}var i=qa,a=Ta;t.exports=e}),Ba=Ga&&"object"==typeof Ga&&"default"in Ga?Ga["default"]:Ga,Da=y(function(t){function e(t,e){var i=t+e,a=i-t,r=i-a,s=e-a,n=t-r,h=n+s;return h?[h,i]:[i]}function i(t,i){var a=0|t.length,r=0|i.length;if(1===a&&1===r)return e(t[0],i[0]);var s,n,h=a+r,o=new Array(h),u=0,l=0,f=0,c=Math.abs,p=t[l],d=c(p),y=i[f],m=c(y);m>d?(n=p,l+=1,a>l&&(p=t[l],d=c(p))):(n=y,f+=1,r>f&&(y=i[f],m=c(y))),a>l&&m>d||f>=r?(s=p,l+=1,a>l&&(p=t[l],d=c(p))):(s=y,f+=1,r>f&&(y=i[f],m=c(y)));for(var v,M,g,b,_,x=s+n,w=x-s,P=n-w,j=P,k=x;a>l&&r>f;)m>d?(s=p,l+=1,a>l&&(p=t[l],d=c(p))):(s=y,f+=1,r>f&&(y=i[f],m=c(y))),n=j,x=s+n,w=x-s,P=n-w,P&&(o[u++]=P),v=k+x,M=v-k,g=v-M,b=x-M,_=k-g,j=_+b,k=v;for(;a>l;)s=p,n=j,x=s+n,w=x-s,P=n-w,P&&(o[u++]=P),v=k+x,M=v-k,g=v-M,b=x-M,_=k-g,j=_+b,k=v,l+=1,a>l&&(p=t[l]);for(;r>f;)s=y,n=j,x=s+n,w=x-s,P=n-w,P&&(o[u++]=P),v=k+x,M=v-k,g=v-M,b=x-M,_=k-g,j=_+b,k=v,f+=1,r>f&&(y=i[f]);return j&&(o[u++]=j),k&&(o[u++]=k),u||(o[u++]=0),o.length=u,o}t.exports=i}),La=Da&&"object"==typeof Da&&"default"in Da?Da["default"]:Da,za=y(function(t){function e(t,e){for(var i=new Array(t.length-1),a=1;a<t.length;++a)for(var r=i[a-1]=new Array(t.length-1),s=0,n=0;s<t.length;++s)s!==e&&(r[n++]=t[a][s]);return i}function i(t){for(var e=new Array(t),i=0;t>i;++i){e[i]=new Array(t);for(var a=0;t>a;++a)e[i][a]=["m",a,"[",t-i-1,"]"].join("")}return e}function a(t){return 1&t?"-":""}function r(t){if(1===t.length)return t[0];if(2===t.length)return["sum(",t[0],",",t[1],")"].join("");var e=t.length>>1;return["sum(",r(t.slice(0,e)),",",r(t.slice(e)),")"].join("")}function s(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var i=[],n=0;n<t.length;++n)i.push(["scale(",r(s(e(t,n))),",",a(n),t[0][n],")"].join(""));return i}function n(t){for(var a=[],n=[],h=i(t),o=[],p=0;t>p;++p)0===(1&p)?a.push.apply(a,s(e(h,p))):n.push.apply(n,s(e(h,p))),o.push("m"+p);var d=r(a),y=r(n),m="orientation"+t+"Exact",v=["function ",m,"(",o.join(),"){var p=",d,",n=",y,",d=sub(p,n);return d[d.length-1];};return ",m].join(""),M=new Function("sum","prod","scale","sub",v);return M(l,u,f,c)}function h(t){var e=g[t.length];return e||(e=g[t.length]=n(t.length)),e.apply(void 0,t)}function o(){for(;g.length<=p;)g.push(n(g.length));for(var e=[],i=["slow"],a=0;p>=a;++a)e.push("a"+a),i.push("o"+a);for(var r=["function getOrientation(",e.join(),"){switch(arguments.length){case 0:case 1:return 0;"],a=2;p>=a;++a)r.push("case ",a,":return o",a,"(",e.slice(0,a).join(),");");r.push("}var s=new Array(arguments.length);for(var i=0;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return getOrientation"),i.push(r.join(""));var s=Function.apply(void 0,i);t.exports=s.apply(void 0,[h].concat(g));for(var a=0;p>=a;++a)t.exports[a]=g[a]}var u=qa,l=La,f=Ba,c=Ia,p=5,d=1.1102230246251565e-16,y=(3+16*d)*d,m=(7+56*d)*d,v=n(3),M=n(4),g=[function(){return 0},function(){return 0},function(t,e){return e[0]-t[0]},function(t,e,i){var a,r=(t[1]-i[1])*(e[0]-i[0]),s=(t[0]-i[0])*(e[1]-i[1]),n=r-s;if(r>0){if(0>=s)return n;a=r+s}else{if(!(0>r))return n;if(s>=0)return n;a=-(r+s)}var h=y*a;return n>=h||-h>=n?n:v(t,e,i)},function(t,e,i,a){var r=t[0]-a[0],s=e[0]-a[0],n=i[0]-a[0],h=t[1]-a[1],o=e[1]-a[1],u=i[1]-a[1],l=t[2]-a[2],f=e[2]-a[2],c=i[2]-a[2],p=s*u,d=n*o,y=n*h,v=r*u,g=r*o,b=s*h,_=l*(p-d)+f*(y-v)+c*(g-b),x=(Math.abs(p)+Math.abs(d))*Math.abs(l)+(Math.abs(y)+Math.abs(v))*Math.abs(f)+(Math.abs(g)+Math.abs(b))*Math.abs(c),w=m*x;return _>w||-_>w?_:M(t,e,i,a)}];o()}),Ua=za&&"object"==typeof za&&"default"in za?za["default"]:za,Fa=y(function(t){function e(t,e){var i,r;if(e[0][0]<e[1][0])i=e[0],r=e[1];else{if(!(e[0][0]>e[1][0])){var s=Math.min(t[0][1],t[1][1]),n=Math.max(t[0][1],t[1][1]),h=Math.min(e[0][1],e[1][1]),o=Math.max(e[0][1],e[1][1]);return h>n?n-h:s>o?s-o:n-o}i=e[1],r=e[0]}var u,l;t[0][1]<t[1][1]?(u=t[0],l=t[1]):(u=t[1],l=t[0]);var f=a(r,i,u);return f?f:(f=a(r,i,l),f?f:l-r)}function i(t,i){var r,s;if(i[0][0]<i[1][0])r=i[0],s=i[1];else{if(!(i[0][0]>i[1][0]))return e(i,t);r=i[1],s=i[0]}var n,h;if(t[0][0]<t[1][0])n=t[0],h=t[1];else{if(!(t[0][0]>t[1][0]))return-e(t,i);n=t[1],h=t[0]}var o=a(r,s,h),u=a(r,s,n);if(0>o){if(0>=u)return o}else if(o>0){if(u>=0)return o}else if(u)return u;if(o=a(h,n,s),u=a(h,n,r),0>o){if(0>=u)return o}else if(o>0){if(u>=0)return o}else if(u)return u;return s[0]-h[0]}t.exports=i;var a=Ua}),Va=Fa&&"object"==typeof Fa&&"default"in Fa?Fa["default"]:Fa,Qa=y(function(t){function e(t,e,i,a,r,s){this._color=t,this.key=e,this.value=i,this.left=a,this.right=r,this._count=s}function i(t){return new e(t._color,t.key,t.value,t.left,t.right,t._count)}function a(t,i){return new e(t,i.key,i.value,i.left,i.right,i._count)}function r(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function s(t,e){this._compare=t,this.root=e}function n(t,e){if(e.left){var i=n(t,e.left);if(i)return i}var i=t(e.key,e.value);return i?i:e.right?n(t,e.right):void 0}function h(t,e,i,a){var r=e(t,a.key);if(0>=r){if(a.left){var s=h(t,e,i,a.left);if(s)return s}var s=i(a.key,a.value);if(s)return s}return a.right?h(t,e,i,a.right):void 0}function o(t,e,i,a,r){var s,n=i(t,r.key),h=i(e,r.key);if(0>=n){if(r.left&&(s=o(t,e,i,a,r.left)))return s;if(h>0&&(s=a(r.key,r.value)))return s}return h>0&&r.right?o(t,e,i,a,r.right):void 0}function u(t,e){this.tree=t,this._stack=e}function l(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function f(t){for(var e,s,n,h,o=t.length-1;o>=0;--o){if(e=t[o],0===o)return void(e._color=y);if(s=t[o-1],s.left===e){if(n=s.right,n.right&&n.right._color===d){if(n=s.right=i(n),h=n.right=i(n.right),s.right=n.left,n.left=s,n.right=h,n._color=s._color,e._color=y,s._color=y,h._color=y,r(s),r(n),o>1){var u=t[o-2];u.left===s?u.left=n:u.right=n}return void(t[o-1]=n)}if(n.left&&n.left._color===d){if(n=s.right=i(n),h=n.left=i(n.left),s.right=h.left,n.left=h.right,h.left=s,h.right=n,h._color=s._color,s._color=y,n._color=y,e._color=y,r(s),r(n),r(h),o>1){var u=t[o-2];u.left===s?u.left=h:u.right=h}return void(t[o-1]=h)}if(n._color===y){if(s._color===d)return s._color=y,void(s.right=a(d,n));s.right=a(d,n);continue}if(n=i(n),s.right=n.left,n.left=s,n._color=s._color,s._color=d,r(s),r(n),o>1){var u=t[o-2];u.left===s?u.left=n:u.right=n}t[o-1]=n,t[o]=s,o+1<t.length?t[o+1]=e:t.push(e),o+=2}else{if(n=s.left,n.left&&n.left._color===d){if(n=s.left=i(n),h=n.left=i(n.left),s.left=n.right,n.right=s,n.left=h,n._color=s._color,e._color=y,s._color=y,h._color=y,r(s),r(n),o>1){var u=t[o-2];u.right===s?u.right=n:u.left=n}return void(t[o-1]=n)}if(n.right&&n.right._color===d){if(n=s.left=i(n),h=n.right=i(n.right),s.left=h.right,n.right=h.left,h.right=s,h.left=n,h._color=s._color,s._color=y,n._color=y,e._color=y,r(s),r(n),r(h),o>1){var u=t[o-2];u.right===s?u.right=h:u.left=h}return void(t[o-1]=h)}if(n._color===y){if(s._color===d)return s._color=y,void(s.left=a(d,n));s.left=a(d,n);continue}if(n=i(n),s.left=n.right,n.right=s,n._color=s._color,s._color=d,r(s),r(n),o>1){var u=t[o-2];u.right===s?u.right=n:u.left=n}t[o-1]=n,t[o]=s,o+1<t.length?t[o+1]=e:t.push(e),o+=2}}}function c(t,e){return e>t?-1:t>e?1:0}function p(t){return new s(t||c,null)}t.exports=p;var d=0,y=1,m=s.prototype;Object.defineProperty(m,"keys",{get:function(){var t=[];return this.forEach(function(e,i){t.push(e)}),t}}),Object.defineProperty(m,"values",{get:function(){var t=[];return this.forEach(function(e,i){t.push(i)}),t}}),Object.defineProperty(m,"length",{get:function(){return this.root?this.root._count:0}}),m.insert=function(t,i){for(var n=this._compare,h=this.root,o=[],u=[];h;){var l=n(t,h.key);o.push(h),u.push(l),h=0>=l?h.left:h.right}o.push(new e(d,t,i,null,null,1));for(var f=o.length-2;f>=0;--f){var h=o[f];u[f]<=0?o[f]=new e(h._color,h.key,h.value,o[f+1],h.right,h._count+1):o[f]=new e(h._color,h.key,h.value,h.left,o[f+1],h._count+1)}for(var f=o.length-1;f>1;--f){var c=o[f-1],h=o[f];if(c._color===y||h._color===y)break;var p=o[f-2];if(p.left===c)if(c.left===h){var m=p.right;if(!m||m._color!==d){if(p._color=d,p.left=c.right,c._color=y,c.right=p,o[f-2]=c,o[f-1]=h,r(p),r(c),f>=3){var v=o[f-3];v.left===p?v.left=c:v.right=c}break}c._color=y,p.right=a(y,m),p._color=d,f-=1}else{var m=p.right;if(!m||m._color!==d){if(c.right=h.left,p._color=d,p.left=h.right,h._color=y,h.left=c,h.right=p,o[f-2]=h,o[f-1]=c,r(p),r(c),r(h),f>=3){var v=o[f-3];v.left===p?v.left=h:v.right=h}break}c._color=y,p.right=a(y,m),p._color=d,f-=1}else if(c.right===h){var m=p.left;if(!m||m._color!==d){if(p._color=d,p.right=c.left,c._color=y,c.left=p,o[f-2]=c,o[f-1]=h,r(p),r(c),f>=3){var v=o[f-3];v.right===p?v.right=c:v.left=c}break}c._color=y,p.left=a(y,m),p._color=d,f-=1}else{var m=p.left;if(!m||m._color!==d){if(c.left=h.right,p._color=d,p.right=h.left,h._color=y,h.right=c,h.left=p,o[f-2]=h,o[f-1]=c,r(p),r(c),r(h),f>=3){var v=o[f-3];v.right===p?v.right=h:v.left=h}break}c._color=y,p.left=a(y,m),p._color=d,f-=1}}return o[0]._color=y,new s(n,o[0])},m.forEach=function(t,e,i){if(this.root)switch(arguments.length){case 1:return n(t,this.root);case 2:return h(e,this._compare,t,this.root);case 3:if(this._compare(e,i)>=0)return;return o(e,i,this._compare,t,this.root)}},Object.defineProperty(m,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new u(this,t)}}),Object.defineProperty(m,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new u(this,t)}}),m.at=function(t){if(0>t)return new u(this,[]);for(var e=this.root,i=[];;){if(i.push(e),e.left){if(t<e.left._count){e=e.left;continue}t-=e.left._count}if(!t)return new u(this,i);if(t-=1,!e.right)break;if(t>=e.right._count)break;e=e.right}return new u(this,[])},m.ge=function(t){for(var e=this._compare,i=this.root,a=[],r=0;i;){var s=e(t,i.key);a.push(i),0>=s&&(r=a.length),i=0>=s?i.left:i.right}return a.length=r,new u(this,a)},m.gt=function(t){for(var e=this._compare,i=this.root,a=[],r=0;i;){var s=e(t,i.key);a.push(i),0>s&&(r=a.length),i=0>s?i.left:i.right}return a.length=r,new u(this,a)},m.lt=function(t){for(var e=this._compare,i=this.root,a=[],r=0;i;){var s=e(t,i.key);a.push(i),s>0&&(r=a.length),i=0>=s?i.left:i.right}return a.length=r,new u(this,a)},m.le=function(t){for(var e=this._compare,i=this.root,a=[],r=0;i;){var s=e(t,i.key);a.push(i),s>=0&&(r=a.length),i=0>s?i.left:i.right}return a.length=r,new u(this,a)},m.find=function(t){for(var e=this._compare,i=this.root,a=[];i;){var r=e(t,i.key);if(a.push(i),0===r)return new u(this,a);i=0>=r?i.left:i.right}return new u(this,[])},m.remove=function(t){var e=this.find(t);return e?e.remove():this},m.get=function(t){for(var e=this._compare,i=this.root;i;){var a=e(t,i.key);if(0===a)return i.value;i=0>=a?i.left:i.right}};var v=u.prototype;Object.defineProperty(v,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(v,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),v.clone=function(){return new u(this.tree,this._stack.slice())},v.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var i=new Array(t.length),a=t[t.length-1];i[i.length-1]=new e(a._color,a.key,a.value,a.left,a.right,a._count);for(var r=t.length-2;r>=0;--r){var a=t[r];a.left===t[r+1]?i[r]=new e(a._color,a.key,a.value,i[r+1],a.right,a._count):i[r]=new e(a._color,a.key,a.value,a.left,i[r+1],a._count)}if(a=i[i.length-1],a.left&&a.right){var n=i.length;for(a=a.left;a.right;)i.push(a),a=a.right;var h=i[n-1];i.push(new e(a._color,h.key,h.value,a.left,a.right,a._count)),i[n-1].key=a.key,i[n-1].value=a.value;for(var r=i.length-2;r>=n;--r)a=i[r],i[r]=new e(a._color,a.key,a.value,a.left,i[r+1],a._count);i[n-1].left=i[n]}if(a=i[i.length-1],a._color===d){var o=i[i.length-2];o.left===a?o.left=null:o.right===a&&(o.right=null),i.pop();for(var r=0;r<i.length;++r)i[r]._count--;return new s(this.tree._compare,i[0])}if(a.left||a.right){a.left?l(a,a.left):a.right&&l(a,a.right),a._color=y;for(var r=0;r<i.length-1;++r)i[r]._count--;return new s(this.tree._compare,i[0])}if(1===i.length)return new s(this.tree._compare,null);for(var r=0;r<i.length;++r)i[r]._count--;var u=i[i.length-2];return f(i),u.left===a?u.left=null:u.right=null,new s(this.tree._compare,i[0])},Object.defineProperty(v,"key",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1].key:void 0},enumerable:!0}),Object.defineProperty(v,"value",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1].value:void 0},enumerable:!0}),Object.defineProperty(v,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var i=this.tree.root;return i?i._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var a=e.length-2;a>=0;--a)e[a+1]===e[a].right&&(++t,e[a].left&&(t+=e[a].left._count));return t},enumerable:!0}),v.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(v,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),v.update=function(t){var i=this._stack;if(0===i.length)throw new Error("Can't update empty node!");var a=new Array(i.length),r=i[i.length-1];a[a.length-1]=new e(r._color,r.key,t,r.left,r.right,r._count);for(var n=i.length-2;n>=0;--n)r=i[n],r.left===i[n+1]?a[n]=new e(r._color,r.key,r.value,a[n+1],r.right,r._count):a[n]=new e(r._color,r.key,r.value,r.left,a[n+1],r._count);return new s(this.tree._compare,a[0])},v.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(v,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})}),Ha=Qa&&"object"==typeof Qa&&"default"in Qa?Qa["default"]:Qa,Wa=y(function(t){function e(t,e,i){this.slabs=t,this.coordinates=e,this.horizontal=i}function i(t,e){return t.y-e}function a(t,e){for(var i=null;t;){var r,s,n=t.key;n[0][0]<n[1][0]?(r=n[0],s=n[1]):(r=n[1],s=n[0]);var h=u(r,s,e);if(0>h)t=t.left;else if(h>0)if(e[0]!==n[1][0])i=t,t=t.right;else{var o=a(t.right,e);if(o)return o;t=t.left}else{if(e[0]!==n[1][0])return t;var o=a(t.right,e);if(o)return o;t=t.left}}return i}function r(t,e,i,a){this.y=t,this.index=e,this.start=i,this.closed=a}function s(t,e,i,a){this.x=t,this.segment=e,this.create=i,this.index=a}function n(t){for(var i=t.length,a=2*i,n=new Array(a),h=0;i>h;++h){var u=t[h],f=u[0][0]<u[1][0];n[2*h]=new s(u[0][0],u,f,h),n[2*h+1]=new s(u[1][0],u,!f,h)}n.sort(function(t,e){var i=t.x-e.x;return i?i:(i=t.create-e.create,i?i:Math.min(t.segment[0][1],t.segment[1][1])-Math.min(e.segment[0][1],e.segment[1][1]))});for(var c=o(l),p=[],d=[],y=[],h=0;a>h;){for(var m=n[h].x,v=[];a>h;){var M=n[h];if(M.x!==m)break;h+=1,M.segment[0][0]===M.x&&M.segment[1][0]===M.x?M.create&&(M.segment[0][1]<M.segment[1][1]?(v.push(new r(M.segment[0][1],M.index,!0,!0)),v.push(new r(M.segment[1][1],M.index,!1,!1))):(v.push(new r(M.segment[1][1],M.index,!0,!1)),v.push(new r(M.segment[0][1],M.index,!1,!0)))):c=M.create?c.insert(M.segment,M.index):c.remove(M.segment)}p.push(c.root),d.push(m),y.push(v)}return new e(p,d,y)}t.exports=n;var h=Ca,o=Ha,u=Ua,l=Va,f=e.prototype;f.castUp=function(t){var e=h.le(this.coordinates,t[0]);if(0>e)return-1;var r=(this.slabs[e],a(this.slabs[e],t)),s=-1;if(r&&(s=r.value),this.coordinates[e]===t[0]){var n=null;if(r&&(n=r.key),e>0){var o=a(this.slabs[e-1],t);o&&(n?l(o.key,n)>0&&(n=o.key,s=o.value):(s=o.value,n=o.key))}var f=this.horizontal[e];if(f.length>0){var c=h.ge(f,t[1],i);if(c<f.length){var p=f[c];if(t[1]===p.y){if(p.closed)return p.index;for(;c<f.length-1&&f[c+1].y===t[1];)if(c+=1,p=f[c],p.closed)return p.index;if(p.y===t[1]&&!p.start){if(c+=1,c>=f.length)return s;p=f[c]}}if(p.start)if(n){var d=u(n[0],n[1],[t[0],p.y]);n[0][0]>n[1][0]&&(d=-d),d>0&&(s=p.index)}else s=p.index;else p.y!==t[1]&&(s=p.index)}}}return s}}),Xa=Wa&&"object"==typeof Wa&&"default"in Wa?Wa["default"]:Wa,Ja=y(function(t){function e(){return!0}function i(t){return function(i,a){var r=t[i];return r?!!r.queryPoint(a,e):!1}}function a(t){for(var e={},a=0;a<t.length;++a){var r=t[a],s=r[0][0],n=r[0][1],h=r[1][1],o=[Math.min(n,h),Math.max(n,h)];s in e?e[s].push(o):e[s]=[o]}for(var u={},l=Object.keys(e),a=0;a<l.length;++a){
5var c=e[l[a]];u[l[a]]=f(c)}return i(u)}function r(t,e){return function(i){var a=c.le(e,i[0]);if(0>a)return 1;var r=t[a];if(!r){if(!(a>0&&e[a]===i[0]))return 1;r=t[a-1]}for(var s=1;r;){var n=r.key,h=u(i,n[0],n[1]);if(n[0][0]<n[1][0])if(0>h)r=r.left;else{if(!(h>0))return 0;s=-1,r=r.right}else if(h>0)r=r.left;else{if(!(0>h))return 0;s=1,r=r.right}}return s}}function s(t){return 1}function n(t){return function(e){return t(e[0],e[1])?0:1}}function h(t,e){return function(i){return t(i[0],i[1])?0:e(i)}}function o(t){for(var e=t.length,i=[],o=[],u=0;e>u;++u)for(var f=t[u],c=f.length,p=c-1,d=0;c>d;p=d++){var y=f[p],m=f[d];y[0]===m[0]?o.push([y,m]):i.push([y,m])}if(0===i.length)return 0===o.length?s:n(a(o));var v=l(i),M=r(v.slabs,v.coordinates);return 0===o.length?M:h(a(o),M)}t.exports=o;var u=Ua[3],l=Xa,f=Oa,c=Ca}),Ka=Ja&&"object"==typeof Ja&&"default"in Ja?Ja["default"]:Ja,Za=y(function(t,e){function i(t){var e=t*f*6371;return(e>1?e.toFixed(3)+"km":(1e3*e).toPrecision(3)+"m")+" ("+t.toPrecision(3)+"°)"}function a(t){if(!t.length)return 0;for(var e=0,i=t[0],a=i[0]*f,r=i[1]*f/2+l,s=a,n=Math.cos(r),h=Math.sin(r),o=1,c=t.length;c>o;++o){i=t[o],a=i[0]*f,r=i[1]*f/2+l;var p=a-s,d=Math.cos(r),y=Math.sin(r),m=h*y,v=n*d+m*Math.cos(p),M=m*Math.sin(p);e+=Math.atan2(M,v),s=a,n=d,h=y}return 2*(e>u?e-2*u:-u>e?e+2*u:e)}function r(t){return 0>t?t+4*u:t}function s(t){var e=n(t[0],t[1]),i=n(t[1],t[2]),a=n(t[2],t[0]),r=(e+i+a)/2;return 4*Math.atan(Math.sqrt(Math.max(0,Math.tan(r/2)*Math.tan((r-e)/2)*Math.tan((r-i)/2)*Math.tan((r-a)/2))))}function n(t,e){var i,a=(e[0]-t[0])*f,r=Math.sin(a),s=Math.cos(a),n=Math.sin(t[1]*f),h=Math.cos(t[1]*f),o=Math.sin(e[1]*f),u=Math.cos(e[1]*f);return Math.atan2(Math.sqrt((i=u*r)*i+(i=h*o-n*u*s)*i),n*o+h*u*s)}function h(t,e,i,a){return t*=f,e*=f,i*=f,a*=f,2*Math.asin(Math.sqrt(o(a-e)+Math.cos(e)*Math.cos(a)*o(i-t)))}function o(t){return(t=Math.sin(t/2))*t}var u=Math.PI,l=u/4,f=u/180;e.name="spherical",e.formatDistance=i,e.ringArea=a,e.absoluteArea=r,e.triangleArea=s,e.distance=h}),Ya=Za.ringArea,$a=y(function(t,e){function i(t){return t.toString()}function a(t){for(var e,i=-1,a=t.length,r=t[a-1],s=0;++i<a;)e=r,r=t[i],s+=e[0]*r[1]-e[1]*r[0];return.5*s}function r(t){return Math.abs((t[0][0]-t[2][0])*(t[1][1]-t[0][1])-(t[0][0]-t[1][0])*(t[2][1]-t[0][1]))}function s(t,e,i,a){var r=t-i,s=e-a;return Math.sqrt(r*r+s*s)}e.name="cartesian",e.formatDistance=i,e.ringArea=a,e.absoluteArea=Math.abs,e.triangleArea=r,e.distance=s}),tr=$a.ringArea,er=y(function(t){t.exports=function(t){return!(null==t||!(t._isBuffer||t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)))}}),ir=er&&"object"==typeof er&&"default"in er?er["default"]:er,ar=y(function(t){function e(t){for(var e=new Array(t),i=0;t>i;++i)e[i]=i;return e}t.exports=e}),rr=ar&&"object"==typeof ar&&"default"in ar?ar["default"]:ar,sr=y(function(t){function e(t,e){return t[0]-e[0]}function i(){var t,i=this.stride,a=new Array(i.length);for(t=0;t<a.length;++t)a[t]=[Math.abs(i[t]),t];a.sort(e);var r=new Array(a.length);for(t=0;t<r.length;++t)r[t]=a[t][1];return r}function a(t,e){var a=["View",e,"d",t].join("");0>e&&(a="View_Nil"+t);var r="generic"===t;if(-1===e){var s="function "+a+"(a){this.data=a;};var proto="+a+".prototype;proto.dtype='"+t+"';proto.index=function(){return -1};proto.size=0;proto.dimension=-1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function(){return new "+a+"(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_"+a+"(a){return new "+a+"(a);}",h=new Function(s);return h()}if(0===e){var s="function "+a+"(a,d) {this.data = a;this.offset = d};var proto="+a+".prototype;proto.dtype='"+t+"';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function "+a+"_copy() {return new "+a+"(this.data,this.offset)};proto.pick=function "+a+"_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function "+a+"_get(){return "+(r?"this.data.get(this.offset)":"this.data[this.offset]")+"};proto.set=function "+a+"_set(v){return "+(r?"this.data.set(this.offset,v)":"this.data[this.offset]=v")+"};return function construct_"+a+"(a,b,c,d){return new "+a+"(a,d)}",h=new Function("TrivialArray",s);return h(u[t][0])}var s=["'use strict'"],o=n(e),l=o.map(function(t){return"i"+t}),f="this.offset+"+o.map(function(t){return"this.stride["+t+"]*i"+t}).join("+"),c=o.map(function(t){return"b"+t}).join(","),p=o.map(function(t){return"c"+t}).join(",");s.push("function "+a+"(a,"+c+","+p+",d){this.data=a","this.shape=["+c+"]","this.stride=["+p+"]","this.offset=d|0}","var proto="+a+".prototype","proto.dtype='"+t+"'","proto.dimension="+e),s.push("Object.defineProperty(proto,'size',{get:function "+a+"_size(){return "+o.map(function(t){return"this.shape["+t+"]"}).join("*"),"}})"),1===e?s.push("proto.order=[0]"):(s.push("Object.defineProperty(proto,'order',{get:"),4>e?(s.push("function "+a+"_order(){"),2===e?s.push("return (Math.abs(this.stride[0])>Math.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===e&&s.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):s.push("ORDER})")),s.push("proto.set=function "+a+"_set("+l.join(",")+",v){"),r?s.push("return this.data.set("+f+",v)}"):s.push("return this.data["+f+"]=v}"),s.push("proto.get=function "+a+"_get("+l.join(",")+"){"),r?s.push("return this.data.get("+f+")}"):s.push("return this.data["+f+"]}"),s.push("proto.index=function "+a+"_index(",l.join(),"){return "+f+"}"),s.push("proto.hi=function "+a+"_hi("+l.join(",")+"){return new "+a+"(this.data,"+o.map(function(t){return["(typeof i",t,"!=='number'||i",t,"<0)?this.shape[",t,"]:i",t,"|0"].join("")}).join(",")+","+o.map(function(t){return"this.stride["+t+"]"}).join(",")+",this.offset)}");var d=o.map(function(t){return"a"+t+"=this.shape["+t+"]"}),y=o.map(function(t){return"c"+t+"=this.stride["+t+"]"});s.push("proto.lo=function "+a+"_lo("+l.join(",")+"){var b=this.offset,d=0,"+d.join(",")+","+y.join(","));for(var m=0;e>m;++m)s.push("if(typeof i"+m+"==='number'&&i"+m+">=0){d=i"+m+"|0;b+=c"+m+"*d;a"+m+"-=d}");s.push("return new "+a+"(this.data,"+o.map(function(t){return"a"+t}).join(",")+","+o.map(function(t){return"c"+t}).join(",")+",b)}"),s.push("proto.step=function "+a+"_step("+l.join(",")+"){var "+o.map(function(t){return"a"+t+"=this.shape["+t+"]"}).join(",")+","+o.map(function(t){return"b"+t+"=this.stride["+t+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(var m=0;e>m;++m)s.push("if(typeof i"+m+"==='number'){d=i"+m+"|0;if(d<0){c+=b"+m+"*(a"+m+"-1);a"+m+"=ceil(-a"+m+"/d)}else{a"+m+"=ceil(a"+m+"/d)}b"+m+"*=d}");s.push("return new "+a+"(this.data,"+o.map(function(t){return"a"+t}).join(",")+","+o.map(function(t){return"b"+t}).join(",")+",c)}");for(var v=new Array(e),M=new Array(e),m=0;e>m;++m)v[m]="a[i"+m+"]",M[m]="b[i"+m+"]";s.push("proto.transpose=function "+a+"_transpose("+l+"){"+l.map(function(t,e){return t+"=("+t+"===undefined?"+e+":"+t+"|0)"}).join(";"),"var a=this.shape,b=this.stride;return new "+a+"(this.data,"+v.join(",")+","+M.join(",")+",this.offset)}"),s.push("proto.pick=function "+a+"_pick("+l+"){var a=[],b=[],c=this.offset");for(var m=0;e>m;++m)s.push("if(typeof i"+m+"==='number'&&i"+m+">=0){c=(c+this.stride["+m+"]*i"+m+")|0}else{a.push(this.shape["+m+"]);b.push(this.stride["+m+"])}");s.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),s.push("return function construct_"+a+"(data,shape,stride,offset){return new "+a+"(data,"+o.map(function(t){return"shape["+t+"]"}).join(",")+","+o.map(function(t){return"stride["+t+"]"}).join(",")+",offset)}");var h=new Function("CTOR_LIST","ORDER",s.join("\n"));return h(u[t],i)}function r(t){if(h(t))return"buffer";if(o)switch(Object.prototype.toString.call(t)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped"}return Array.isArray(t)?"array":"generic"}function s(t,e,i,s){if(void 0===t){var n=u.array[0];return n([])}"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var h=e.length;if(void 0===i){i=new Array(h);for(var o=h-1,l=1;o>=0;--o)i[o]=l,l*=e[o]}if(void 0===s){s=0;for(var o=0;h>o;++o)i[o]<0&&(s-=(e[o]-1)*i[o])}for(var f=r(t),c=u[f];c.length<=h+1;)c.push(a(f,c.length-1));var n=c[h+1];return n(t,e,i,s)}var n=rr,h=ir,o="undefined"!=typeof Float64Array,u={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};t.exports=s}),nr=sr&&"object"==typeof sr&&"default"in sr?sr["default"]:sr;t.minMax=e,t.indicesOfNearest=i,t.indexOfNearest=a,t.DOMAIN=et,t.COVERAGE=it,t.COVERAGECOLLECTION=at,t.COVJSON_DATATYPE_TUPLE=st,t.COVJSON_DATATYPE_POLYGON=nt,t.getLanguageTag=r,t.getLanguageString=s,t.stringifyUnit=n,t.minMaxOfRange=h,t.reduceRange=o,t.iterateRange=u,t.getCategory=l,t.isCoverage=f,t.checkCoverage=c,t.isDomain=p,t.checkDomain=d,t.getReferenceObject=m,t.getHorizontalCRSReferenceObject=v,t.isEllipsoidalCRS=M,t.getProjection=g,t.loadProjection=b,t.getHorizontalCRSComponents=_,t.getHorizontalCRSCoordinateIDs=x,t.reprojectCoords=j,t.getLongitudeWrapper=k,t.isLongitudeAxis=S,t.isISODateAxis=C,t.asTime=E,t.normalizeIndexSubsetConstraints=O,t.subsetDomainByIndex=A,t.fromDomain=R,t.fromXndarray=q,t.addSubsetFunctions=G,t.addLoadRangesFunction=B,t.reproject=L,t.subsetByBbox=I,t.subsetByIndex=N,t.subsetByValue=T,t.withSimpleDerivedParameter=X,t.withParameters=z,t.withCategories=U,t.withDomainType=F,t.asCovJSONDomainType=V,t.renameAxes=Q,t.mapRange=H,t.withDerivedParameter=W,t.addCollectionQueryFunction=J,t.CollectionQuery=ka,t.ensureClockwisePolygon=Y,t.getPointInPolygonsFn=$,t.maskByPolygon=tt}(this.CovUtils=this.CovUtils||{});
6//# sourceMappingURL=covutils.min.js.map
\No newline at end of file