@file-viewer/renderer-3d 3.3.1 → 3.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3842,7 +3842,7 @@ void main() {
3842
3842
  float depth = texture2D(depthTexture, vUv).r;
3843
3843
  gl_FragColor = packDepthToRGBA(depth);
3844
3844
  }
3845
- `}),za=new Yt(1,256,256*256,256*256*256),vc=255/256,RM=new Yt(vc/za.x,vc/za.y,vc/za.z,1/za.w),IM=new Fr(2,2);async function LM(n,t){let e=n.image.width,i=n.image.height,r=new Rr,s=new Ur(IM,Kf);r.add(s),Kf.uniforms.depthTexture.value=n;let a=new zi(e,i,{format:cn,type:on});t.setRenderTarget(a),t.render(r,new Br),t.setRenderTarget(null);let o=new Uint8Array(e*i*4);await t.readRenderTargetPixelsAsync(a,0,0,e,i,o);let l=new Float32Array(e*i),c=0,h=new Yt;for(let u=0;u<o.length;u+=4){let m=o[u+0]/255,d=o[u+1]/255,g=o[u+2]/255,y=o[u+3]/255;h.set(m,d,g,y);let v=h.dot(RM);l[c]=v,c++}return a.dispose(),l}function NM(n,t){let e=n.renderer.getContext(),i=e.getParameter(e.DEPTH_BITS),r=t.width*t.height*(i/8);n.objects.set(t.texture.id,{gpuMemory:r,cpuMemory:0})}function DM(n,t){t!=null&&(_M(t)?yc(n,t):yM(t)&&(t.depthBuffer&&(t.depthTexture!=null?yc(n,t.depthTexture):NM(n,t)),yc(n,t.texture)))}function UM(n){return n instanceof HTMLCanvasElement||n instanceof OffscreenCanvas?n.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,n.width,n.height).data:Sc(n)}function FM(n){let t=UM(n);for(let e=0;e<t.length;e+=4)if(t[e+3]!==0)return!1;return!0}function xc(n,t,e){let i=e?.getContext();if(i==null)return n;let r=an;return n===Ve&&(t===ln&&!i.getExtension("OES_texture_float_linear")||t===kr&&!i.getExtension("OES_texture_half_float_linear"))?r:n}function OM(n,t){n.minFilter=xc(n.minFilter,n.type,t),n.magFilter=xc(n.magFilter,n.type,t)}var Va={createDataTexture:wM,createDataTextureAsync:EM,isEmptyTexture:wc,decodeBlob:bM,getChannelCount:Yr,getBytesPerChannel:qr,getWiderType:AM,getDataTypeString:vM,create1DTexture:TM,createDataCopy:MM,computeMinMax:PM,isDataTexture:Mc,isCanvasTexture:ka,computeMinMaxFromBuffer:bc,computeMinMaxFromImage:id,estimateSize:xM,readDepthTexture:LM,shouldExpandRGB:CM,isCanvasEmpty:FM,getMemoryUsage:DM,getCompatibleTextureFilter:xc,ensureCompatibility:OM};var Ec=class extends Ot{},YI=new Ec;var BM="https://cdn.jsdelivr.net/npm/laz-perf@0.0.7/lib",GM=BM,Tc=null;function rd(n){Tc=n}var Ha;async function zM(n){return Ac.LazPerf.create({wasmBinary:n})}async function kM(n){return Ac.LazPerf.create({locateFile:t=>`${n}/${t}`})}function Cc(){return Ha||(Tc!=null?Ha=zM(Tc):Ha=kM(GM)),Ha}function Wa(n,t){return n==null||n.length===0?!0:n.every(e=>e(t))}function VM(n){let t=n.operator;switch(t){case"equal":return e=>e===n.value;case"less":return e=>e<n.value;case"lessequal":return e=>e<=n.value;case"greater":return e=>e>n.value;case"greaterequal":return e=>e>=n.value;case"not":return e=>e!==n.value;case"in":return e=>n.values.has(e);case"not_in":return e=>!n.values.has(e);default:throw new Error(`invalid filter operator: '${t}'`)}}function sd(n,t){if(n.length===0)return null;let e=[];for(let i of n){let r=VM(i);if(t.dimensions[i.dimension]!=null){let s=t.getter(i.dimension);e.push(a=>r(s(a)))}}return e.length>0?e:null}var Pc=class{_length=0;constructor(t,e){this._ctor=e,this._array=e(t)}get capacity(){return this._array.length}get length(){return this._length}push(t){this.isFull&&this.expand(),this._array[this._length]=t,this._length++}getArray(){return this.isFull?this._array:this._array.slice(0,this._length)}get isFull(){return this._length===this.capacity}expand(){let t=Math.round(this.capacity*1.5),e=this._ctor(t);e.set(this._array),this._array=e}},ad=Pc;function hn(n,t){if(n==null)throw new Error(t??"non-null assertion failed");return n}var un=0,fn=1,Xe=2,Wn=3,Rc=class{_lastExpansion=0;get byteLength(){return this.array.byteLength}get capacity(){return this.array.length/this._dimension}get array(){return this._array}toFloat32Array(){return this._array instanceof Float32Array?this._array.length===this._length*this._dimension?this._array:this._array.slice(0,this._length*this._dimension):new Float32Array(this._array.slice(0,this._length*this._dimension))}constructor(t,e){if(this._dimension=e,t.length%this._dimension!==0)throw new Error(`invalid size, expected a multiple of ${this._dimension}, got ${t.length}`);this._array=t,this._capacity=this._array.length/this._dimension,this._length=this._capacity}get length(){return this._length}set length(t){this._length=t}setX(t,e){let i=t*this._dimension;this._array[i+un]=e}getX(t){let e=t*this._dimension;return this._array[e+un]}setY(t,e){let i=t*this._dimension;this._array[i+fn]=e}getY(t){let e=t*this._dimension;return this._array[e+fn]}setZ(t,e){if(this._dimension>=3){let i=t*this._dimension;this._array[i+Xe]=e}}getZ(t){if(this._dimension>=3){let e=t*this._dimension;return this._array[e+Xe]}return null}setW(t,e){if(this._dimension>=4){let i=t*this._dimension;this._array[i+Wn]=e}}getW(t){if(this._dimension>=4){let e=t*this._dimension;return this._array[e+Wn]}return null}setVector(t,e){let i=t*this._dimension;this._array[i+un]=e.getComponent(un),this._array[i+fn]=e.getComponent(fn),this._dimension>=3&&(this._array[i+Xe]=e.getComponent(Xe)),this._dimension>=4&&(this._array[i+Wn]=e.getComponent(Wn))}set(t,e,i,r,s){let a=t*this._dimension;if(a>=this._array.length)throw new Error("index out of bounds");this._array[a+un]=e,this._array[a+fn]=i,this._dimension>=Xe&&r!=null&&(this._array[a+Xe]=r),this._dimension>=Wn&&s!=null&&(this._array[a+Wn]=s)}copyItem(t,e){let i=this._dimension,r=e*i,s=t*i;this._array[r+un]=this._array[s+un],this._array[r+fn]=this._array[s+fn],i>=3&&(this._array[r+Xe]=this._array[s+Xe]),i>=4&&(this._array[r+Wn]=this._array[s+Wn])}computeExpansionSize(){return this._lastExpansion===0?this._lastExpansion=32:(this._lastExpansion*=2,this._lastExpansion=jt.clamp(this._lastExpansion,32,65536)),this._lastExpansion}trim(){this._capacity>this._length&&(this._capacity=this._length,this._array=this._array.slice(0,this._length*this._dimension))}allocateIfFull(){if(this._capacity===this._length){let t=this._length;this.expand(this._length+this.computeExpansionSize()),this._capacity=this._array.length/this._dimension,this._length=t}}push(t,e,i,r){this._capacity===this._length&&this.allocateIfFull(),this.setX(this._length,t),this.setY(this._length,e),i!=null&&this.setZ(this._length,i),r!=null&&this.setW(this._length,r),this._length++}pushVector(t){this._capacity===this._length&&this.allocateIfFull(),this.assignVector(this._length*this._dimension,t),this._length++}expand(t){let e=new this.array.constructor(t*this._dimension);return e.set(this._array),this._array=e,this._capacity=this._array.length/this._dimension,this._length=this._capacity,this}forEach(t){let e=this.getTempVector(),i=this._dimension;for(let r=0;r<this._array.length;r+=i){this.readVector(r,e);let s=r/i;t(e,s,this)}}};var jr=class n extends Rc{dimension=3;constructor(t){super(t,3)}get(t,e){return e=e??new C,e.set(this.getX(t),this.getY(t),hn(this.getZ(t)))}clone(){return new n(this._array.slice(0))}getZ(t){return super.getZ(t)}getTempVector(){return new C}readVector(t,e){let i=this._array;e.set(i[t+un],i[t+fn],i[t+Xe])}assignVector(t,e){this._array[t+un]=e.x,this._array[t+fn]=e.y,this._array[t+Xe]=e.z}};var od=(function(n){return n[n.Elevation=1]="Elevation",n[n.Slope=2]="Slope",n[n.Aspect=3]="Aspect",n})(od||{}),ld=od;var Ic=class n extends Ot{_opacity=null;_shouldRecreateTexture=!0;constructor(t){if(super(),this._min=t.min,this._max=t.max,this._mode=t.mode??ld.Elevation,this._colors=hn(t.colors,"missing colors parameter"),t.opacities!=null){if(t.opacities.length!==this._colors.length)throw new Error("the opacity array must have the same length as the color array");this._opacity=t.opacities??null}this._cachedTexture=null,this._active=!0}get mode(){return this._mode}set mode(t){this._mode!==t&&(this._mode=t,this.notifyChange())}notifyChange(){this.dispatchEvent({type:"updated"})}get active(){return this._active}set active(t){this._active!==t&&(this._active=t,this.notifyChange())}get min(){return this._min}set min(t){this._min!==t&&(this._min=t,this.notifyChange())}get max(){return this._max}set max(t){this._max!==t&&(this._max=t,this.notifyChange())}get colors(){return this._colors}set colors(t){this._colors!==t&&(this._colors=t,this._opacity&&this._opacity.length!==t.length&&(this._opacity=null),this._shouldRecreateTexture=!0,this.notifyChange())}get opacity(){return this._opacity}set opacity(t){if(t&&t.length!==this.colors.length)throw new Error("the opacity array must have the same length as the color array");this._opacity!==t&&(this._opacity=t,this._shouldRecreateTexture=!0),this.notifyChange()}sample(t){let{min:e,max:i,colors:r}=this,s=jt.clamp(t,e,i),a=jt.mapLinear(s,e,i,0,r.length-1);return r[jt.clamp(Math.round(a),0,r.length-1)]}sampleOpacity(t){let{min:e,max:i,opacity:r}=this;if(!r)return 1;let s=jt.clamp(t,e,i),a=jt.mapLinear(s,e,i,0,r.length-1);return r[jt.clamp(Math.round(a),0,r.length-1)]}getTexture(){return(this._shouldRecreateTexture||this._cachedTexture==null)&&(this._cachedTexture?.dispose(),this._cachedTexture=Va.create1DTexture(this._colors,this._opacity??void 0),this._cachedTexture.minFilter=an,this._cachedTexture.magFilter=an,this._cachedTexture.wrapS=Pe,this._cachedTexture.wrapT=Pe,this._shouldRecreateTexture=!1),hn(this._cachedTexture)}clone(){return new n({colors:[...this.colors],min:this.min,max:this.max,mode:this._mode,opacities:this._opacity!=null?[...this._opacity]:void 0})}dispose(){this._cachedTexture?.dispose()}};var Lc=Ic;function cd(n){n("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),n("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),n("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");for(var t=1;t<=60;++t)n("EPSG:"+(32600+t),"+proj=utm +zone="+t+" +datum=WGS84 +units=m"),n("EPSG:"+(32700+t),"+proj=utm +zone="+t+" +south +datum=WGS84 +units=m");n("EPSG:5041","+title=WGS 84 / UPS North (E,N) +proj=stere +lat_0=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m"),n("EPSG:5042","+title=WGS 84 / UPS South (E,N) +proj=stere +lat_0=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m"),n.WGS84=n["EPSG:4326"],n["EPSG:3785"]=n["EPSG:3857"],n.GOOGLE=n["EPSG:3857"],n["EPSG:900913"]=n["EPSG:3857"],n["EPSG:102113"]=n["EPSG:3857"]}var Ie=1,Le=2,dn=3,hd=4,Zr=5,Nc=6378137,ud=6356752314e-3,Dc=.0066943799901413165,ri=484813681109536e-20,T=Math.PI/2,fd=.16666666666666666,dd=.04722222222222222,pd=.022156084656084655,D=1e-10,dt=.017453292519943295,Pt=57.29577951308232,st=Math.PI/4,Xn=Math.PI*2,vt=3.14159265359;var ie={};ie.greenwich=0;ie.lisbon=-9.131906111111;ie.paris=2.337229166667;ie.bogota=-74.080916666667;ie.madrid=-3.687938888889;ie.rome=12.452333333333;ie.bern=7.439583333333;ie.jakarta=106.807719444444;ie.ferro=-17.666666666667;ie.brussels=4.367975;ie.stockholm=18.058277777778;ie.athens=23.7163375;ie.oslo=10.722916666667;var md=ie;var gd={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var _d=/[\s_\-\/\(\)]/g;function pe(n,t){if(n[t])return n[t];for(var e=Object.keys(n),i=t.toLowerCase().replace(_d,""),r=-1,s,a;++r<e.length;)if(s=e[r],a=s.toLowerCase().replace(_d,""),a===i)return n[s]}function Jr(n){var t={},e=n.split("+").map(function(o){return o.trim()}).filter(function(o){return o}).reduce(function(o,l){var c=l.split("=");return c.push(!0),o[c[0].toLowerCase()]=c[1],o},{}),i,r,s,a={proj:function(o){t.projName=["lonlat","latlon","latlong"].includes(o)?"longlat":o},datum:"datumCode",rf:function(o){t.rf=parseFloat(o)},lat_0:function(o){t.lat0=o*dt},lat_1:function(o){t.lat1=o*dt},lat_2:function(o){t.lat2=o*dt},lat_ts:function(o){t.lat_ts=o*dt},lon_0:function(o){t.long0=o*dt},lon_wrap:function(o){t.long_wrap=parseFloat(o)*dt},lon_1:function(o){t.long1=o*dt},lon_2:function(o){t.long2=o*dt},alpha:function(o){t.alpha=parseFloat(o)*dt},gamma:function(o){t.rectified_grid_angle=parseFloat(o)*dt},lonc:function(o){t.longc=o*dt},x_0:function(o){t.x0=parseFloat(o)},y_0:function(o){t.y0=parseFloat(o)},k_0:function(o){t.k0=parseFloat(o)},k:function(o){t.k0=parseFloat(o)},a:function(o){t.a=parseFloat(o)},b:function(o){t.b=parseFloat(o)},r:function(o){t.a=t.b=parseFloat(o)},r_a:function(){t.R_A=!0},zone:function(o){t.zone=parseInt(o,10)},south:function(){t.utmSouth=!0},towgs84:function(o){t.datum_params=o.split(",").map(function(l){return parseFloat(l)})},to_meter:function(o){t.to_meter=parseFloat(o)},units:function(o){t.units=o;var l=pe(gd,o);l&&(t.to_meter=l.to_meter)},from_greenwich:function(o){t.from_greenwich=o*dt},pm:function(o){var l=pe(md,o);t.from_greenwich=(l||parseFloat(o))*dt},nadgrids:function(o){o==="@null"?t.datumCode="none":t.nadgrids=o},axis:function(o){var l="ewnsud";o.length===3&&l.indexOf(o.substr(0,1))!==-1&&l.indexOf(o.substr(1,1))!==-1&&l.indexOf(o.substr(2,1))!==-1&&(t.axis=o)},approx:function(){t.approx=!0},over:function(){t.over=!0}};for(i in e)r=e[i],i in a?(s=a[i],typeof s=="function"?s(r):t[s]=r):t[i]=r;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t.projStr=n,t}var Uc=class{static getId(t){let e=t.find(i=>Array.isArray(i)&&i[0]==="ID");return e&&e.length>=3?{authority:e[1],code:parseInt(e[2],10)}:null}static convertUnit(t,e="unit"){if(!t||t.length<3)return{type:e,name:"unknown",conversion_factor:null};let i=t[1],r=parseFloat(t[2])||null,s=t.find(o=>Array.isArray(o)&&o[0]==="ID"),a=s?{authority:s[1],code:parseInt(s[2],10)}:null;return{type:e,name:i,conversion_factor:r,id:a}}static convertAxis(t){let e=t[1]||"Unknown",i,r=e.match(/^\((.)\)$/);if(r){let c=r[1].toUpperCase();if(c==="E")i="east";else if(c==="N")i="north";else if(c==="U")i="up";else if(t[2])i=t[2];else throw new Error(`Unknown axis abbreviation: ${c}`)}else i=t[2]||"unknown";let s=t.find(c=>Array.isArray(c)&&c[0]==="ORDER"),a=s?parseInt(s[1],10):null,o=t.find(c=>Array.isArray(c)&&(c[0]==="LENGTHUNIT"||c[0]==="ANGLEUNIT"||c[0]==="SCALEUNIT")),l=this.convertUnit(o);return{name:e,direction:i,unit:l,order:a}}static extractAxes(t){return t.filter(e=>Array.isArray(e)&&e[0]==="AXIS").map(e=>this.convertAxis(e)).sort((e,i)=>(e.order||0)-(i.order||0))}static convert(t,e={}){switch(t[0]){case"PROJCRS":e.type="ProjectedCRS",e.name=t[1],e.base_crs=t.find(d=>Array.isArray(d)&&d[0]==="BASEGEOGCRS")?this.convert(t.find(d=>Array.isArray(d)&&d[0]==="BASEGEOGCRS")):null,e.conversion=t.find(d=>Array.isArray(d)&&d[0]==="CONVERSION")?this.convert(t.find(d=>Array.isArray(d)&&d[0]==="CONVERSION")):null;let i=t.find(d=>Array.isArray(d)&&d[0]==="CS");i&&(e.coordinate_system={type:i[1],axis:this.extractAxes(t)});let r=t.find(d=>Array.isArray(d)&&d[0]==="LENGTHUNIT");if(r){let d=this.convertUnit(r);e.coordinate_system.unit=d}e.id=this.getId(t);break;case"BASEGEOGCRS":case"GEOGCRS":case"GEODCRS":e.type=t[0]==="GEODCRS"?"GeodeticCRS":"GeographicCRS",e.name=t[1];let s=t.find(d=>Array.isArray(d)&&(d[0]==="DATUM"||d[0]==="ENSEMBLE"));if(s){let d=this.convert(s);s[0]==="ENSEMBLE"?e.datum_ensemble=d:e.datum=d;let g=t.find(y=>Array.isArray(y)&&y[0]==="PRIMEM");g&&g[1]!=="Greenwich"&&(d.prime_meridian={name:g[1],longitude:parseFloat(g[2])})}e.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(t)},e.id=this.getId(t);break;case"DATUM":e.type="GeodeticReferenceFrame",e.name=t[1],e.ellipsoid=t.find(d=>Array.isArray(d)&&d[0]==="ELLIPSOID")?this.convert(t.find(d=>Array.isArray(d)&&d[0]==="ELLIPSOID")):null;break;case"ENSEMBLE":e.type="DatumEnsemble",e.name=t[1],e.members=t.filter(d=>Array.isArray(d)&&d[0]==="MEMBER").map(d=>({type:"DatumEnsembleMember",name:d[1],id:this.getId(d)}));let a=t.find(d=>Array.isArray(d)&&d[0]==="ENSEMBLEACCURACY");a&&(e.accuracy=parseFloat(a[1]));let o=t.find(d=>Array.isArray(d)&&d[0]==="ELLIPSOID");o&&(e.ellipsoid=this.convert(o)),e.id=this.getId(t);break;case"ELLIPSOID":e.type="Ellipsoid",e.name=t[1],e.semi_major_axis=parseFloat(t[2]),e.inverse_flattening=parseFloat(t[3]);let l=t.find(d=>Array.isArray(d)&&d[0]==="LENGTHUNIT")?this.convert(t.find(d=>Array.isArray(d)&&d[0]==="LENGTHUNIT"),e):null;break;case"CONVERSION":e.type="Conversion",e.name=t[1],e.method=t.find(d=>Array.isArray(d)&&d[0]==="METHOD")?this.convert(t.find(d=>Array.isArray(d)&&d[0]==="METHOD")):null,e.parameters=t.filter(d=>Array.isArray(d)&&d[0]==="PARAMETER").map(d=>this.convert(d));break;case"METHOD":e.type="Method",e.name=t[1],e.id=this.getId(t);break;case"PARAMETER":e.type="Parameter",e.name=t[1],e.value=parseFloat(t[2]),e.unit=this.convertUnit(t.find(d=>Array.isArray(d)&&(d[0]==="LENGTHUNIT"||d[0]==="ANGLEUNIT"||d[0]==="SCALEUNIT"))),e.id=this.getId(t);break;case"BOUNDCRS":e.type="BoundCRS";let c=t.find(d=>Array.isArray(d)&&d[0]==="SOURCECRS");if(c){let d=c.find(g=>Array.isArray(g));e.source_crs=d?this.convert(d):null}let h=t.find(d=>Array.isArray(d)&&d[0]==="TARGETCRS");if(h){let d=h.find(g=>Array.isArray(g));e.target_crs=d?this.convert(d):null}let u=t.find(d=>Array.isArray(d)&&d[0]==="ABRIDGEDTRANSFORMATION");u?e.transformation=this.convert(u):e.transformation=null;break;case"ABRIDGEDTRANSFORMATION":if(e.type="Transformation",e.name=t[1],e.method=t.find(d=>Array.isArray(d)&&d[0]==="METHOD")?this.convert(t.find(d=>Array.isArray(d)&&d[0]==="METHOD")):null,e.parameters=t.filter(d=>Array.isArray(d)&&(d[0]==="PARAMETER"||d[0]==="PARAMETERFILE")).map(d=>{if(d[0]==="PARAMETER")return this.convert(d);if(d[0]==="PARAMETERFILE")return{name:d[1],value:d[2],id:{authority:"EPSG",code:8656}}}),e.parameters.length===7){let d=e.parameters[6];d.name==="Scale difference"&&(d.value=Math.round((d.value-1)*1e12)/1e6)}e.id=this.getId(t);break;case"AXIS":e.coordinate_system||(e.coordinate_system={type:"unspecified",axis:[]}),e.coordinate_system.axis.push(this.convertAxis(t));break;case"LENGTHUNIT":let m=this.convertUnit(t,"LinearUnit");e.coordinate_system&&e.coordinate_system.axis&&e.coordinate_system.axis.forEach(d=>{d.unit||(d.unit=m)}),m.conversion_factor&&m.conversion_factor!==1&&e.semi_major_axis&&(e.semi_major_axis={value:e.semi_major_axis,unit:m});break;default:e.keyword=t[0];break}return e}},Xa=Uc;var Fc=class extends Xa{static convert(t,e={}){return super.convert(t,e),e.coordinate_system&&e.coordinate_system.subtype==="Cartesian"&&delete e.coordinate_system,e.usage&&delete e.usage,e}},yd=Fc;var Oc=class extends Xa{static convert(t,e={}){super.convert(t,e);let i=t.find(s=>Array.isArray(s)&&s[0]==="CS");i&&(e.coordinate_system={subtype:i[1],axis:this.extractAxes(t)});let r=t.find(s=>Array.isArray(s)&&s[0]==="USAGE");if(r){let s=r.find(l=>Array.isArray(l)&&l[0]==="SCOPE"),a=r.find(l=>Array.isArray(l)&&l[0]==="AREA"),o=r.find(l=>Array.isArray(l)&&l[0]==="BBOX");e.usage={},s&&(e.usage.scope=s[1]),a&&(e.usage.area=a[1]),o&&(e.usage.bbox=o.slice(1))}return e}},vd=Oc;function HM(n){return n.find(t=>Array.isArray(t)&&t[0]==="USAGE")?"2019":(n.find(t=>Array.isArray(t)&&t[0]==="CS")||n[0]==="BOUNDCRS"||n[0]==="PROJCRS"||n[0]==="GEOGCRS","2015")}function xd(n){return(HM(n)==="2019"?vd:yd).convert(n)}function Md(n){let t=n.toUpperCase();return t.includes("PROJCRS")||t.includes("GEOGCRS")||t.includes("BOUNDCRS")||t.includes("VERTCRS")||t.includes("LENGTHUNIT")||t.includes("ANGLEUNIT")||t.includes("SCALEUNIT")?"WKT2":(t.includes("PROJCS")||t.includes("GEOGCS")||t.includes("LOCAL_CS")||t.includes("VERT_CS")||t.includes("UNIT"),"WKT1")}var Sd=YM,$r=1,bd=2,wd=3,qa=4,Ed=5,Bc=-1,WM=/\s/,XM=/[A-Za-z]/,qM=/[A-Za-z84_]/,Ya=/[,\]]/,Td=/[\d\.E\-\+]/;function pn(n){if(typeof n!="string")throw new Error("not a string");this.text=n.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=$r}pn.prototype.readCharicter=function(){var n=this.text[this.place++];if(this.state!==qa)for(;WM.test(n);){if(this.place>=this.text.length)return;n=this.text[this.place++]}switch(this.state){case $r:return this.neutral(n);case bd:return this.keyword(n);case qa:return this.quoted(n);case Ed:return this.afterquote(n);case wd:return this.number(n);case Bc:return}};pn.prototype.afterquote=function(n){if(n==='"'){this.word+='"',this.state=qa;return}if(Ya.test(n)){this.word=this.word.trim(),this.afterItem(n);return}throw new Error(`havn't handled "`+n+'" in afterquote yet, index '+this.place)};pn.prototype.afterItem=function(n){if(n===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=$r;return}if(n==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=$r,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Bc);return}};pn.prototype.number=function(n){if(Td.test(n)){this.word+=n;return}if(Ya.test(n)){this.word=parseFloat(this.word),this.afterItem(n);return}throw new Error(`havn't handled "`+n+'" in number yet, index '+this.place)};pn.prototype.quoted=function(n){if(n==='"'){this.state=Ed;return}this.word+=n};pn.prototype.keyword=function(n){if(qM.test(n)){this.word+=n;return}if(n==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=$r;return}if(Ya.test(n)){this.afterItem(n);return}throw new Error(`havn't handled "`+n+'" in keyword yet, index '+this.place)};pn.prototype.neutral=function(n){if(XM.test(n)){this.word=n,this.state=bd;return}if(n==='"'){this.word="",this.state=qa;return}if(Td.test(n)){this.word=n,this.state=wd;return}if(Ya.test(n)){this.afterItem(n);return}throw new Error(`havn't handled "`+n+'" in neutral yet, index '+this.place)};pn.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Bc)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function YM(n){var t=new pn(n);return t.output()}function Gc(n,t,e){Array.isArray(t)&&(e.unshift(t),t=null);var i=t?{}:n,r=e.reduce(function(s,a){return si(a,s),s},i);t&&(n[t]=r)}function si(n,t){if(!Array.isArray(n)){t[n]=!0;return}var e=n.shift();if(e==="PARAMETER"&&(e=n.shift()),n.length===1){if(Array.isArray(n[0])){t[e]={},si(n[0],t[e]);return}t[e]=n[0];return}if(!n.length){t[e]=!0;return}if(e==="TOWGS84"){t[e]=n;return}if(e==="AXIS"){e in t||(t[e]=[]),t[e].push(n);return}Array.isArray(e)||(t[e]={});var i;switch(e){case"UNIT":case"PRIMEM":case"VERT_DATUM":t[e]={name:n[0].toLowerCase(),convert:n[1]},n.length===3&&si(n[2],t[e]);return;case"SPHEROID":case"ELLIPSOID":t[e]={name:n[0],a:n[1],rf:n[2]},n.length===4&&si(n[3],t[e]);return;case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":n[0]=["name",n[0]],Gc(t,e,n);return;case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":n[0]=["name",n[0]],Gc(t,e,n),t[e].type=e;return;default:for(i=-1;++i<n.length;)if(!Array.isArray(n[i]))return si(n,t[e]);return Gc(t,e,n)}}var jM=.017453292519943295;function me(n){return n*jM}function ja(n){let t=(n.projName||"").toLowerCase().replace(/_/g," ");n.long0===void 0&&n.longc!==void 0&&(n.long0=n.longc),!n.lat_ts&&n.lat1&&(t==="stereographic south pole"||t==="polar stereographic (variant b)")?(n.lat0=me(n.lat1>0?90:-90),n.lat_ts=n.lat1,delete n.lat1):!n.lat_ts&&n.lat0&&(t==="polar stereographic"||t==="polar stereographic (variant a)")&&(n.lat_ts=n.lat0,n.lat0=me(n.lat0>0?90:-90),delete n.lat1)}function Ad(n){let t={units:null,to_meter:void 0};return typeof n=="string"?(t.units=n.toLowerCase(),t.units==="metre"&&(t.units="meter"),t.units==="meter"&&(t.to_meter=1)):n&&n.name&&(t.units=n.name.toLowerCase(),t.units==="metre"&&(t.units="meter"),t.to_meter=n.conversion_factor),t}function Cd(n){return typeof n=="object"?n.value*n.unit.conversion_factor:n}function Pd(n,t){n.ellipsoid.radius?(t.a=n.ellipsoid.radius,t.rf=0):(t.a=Cd(n.ellipsoid.semi_major_axis),n.ellipsoid.inverse_flattening!==void 0?t.rf=n.ellipsoid.inverse_flattening:n.ellipsoid.semi_major_axis!==void 0&&n.ellipsoid.semi_minor_axis!==void 0&&(t.rf=t.a/(t.a-Cd(n.ellipsoid.semi_minor_axis))))}function Kr(n,t={}){return!n||typeof n!="object"?n:n.type==="BoundCRS"?(Kr(n.source_crs,t),n.transformation&&(n.transformation.method&&n.transformation.method.name==="NTv2"?t.nadgrids=n.transformation.parameters[0].value:t.datum_params=n.transformation.parameters.map(e=>e.value)),t):(Object.keys(n).forEach(e=>{let i=n[e];if(i!==null)switch(e){case"name":if(t.srsCode)break;t.name=i,t.srsCode=i;break;case"type":i==="GeographicCRS"?t.projName="longlat":i==="GeodeticCRS"?n.coordinate_system&&n.coordinate_system.subtype==="Cartesian"?t.projName="geocent":t.projName="longlat":i==="ProjectedCRS"&&n.conversion&&n.conversion.method&&(t.projName=n.conversion.method.name);break;case"datum":case"datum_ensemble":i.ellipsoid&&(t.ellps=i.ellipsoid.name,Pd(i,t)),i.prime_meridian&&(t.from_greenwich=i.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":t.ellps=i.name,Pd(i,t);break;case"prime_meridian":t.long0=(i.longitude||0)*Math.PI/180;break;case"coordinate_system":if(i.axis){let r={east:"e",north:"n",west:"w",south:"s",up:"u",down:"d",geocentricx:"e",geocentricy:"n",geocentricz:"u"},s=i.axis.map(a=>r[a.direction.toLowerCase()]);if(s.every(Boolean)&&(t.axis=s.join(""),t.axis.length===2&&(t.axis+="u")),i.unit){let{units:a,to_meter:o}=Ad(i.unit);t.units=a,t.to_meter=o}else if(i.axis[0]&&i.axis[0].unit){let{units:a,to_meter:o}=Ad(i.axis[0].unit);t.units=a,t.to_meter=o}}break;case"id":i.authority&&i.code&&(t.title=i.authority+":"+i.code);break;case"conversion":i.method&&i.method.name&&(t.projName=i.method.name),i.parameters&&i.parameters.forEach(r=>{let s=r.name.toLowerCase().replace(/\s+/g,"_"),a=r.value;r.unit&&r.unit.conversion_factor?t[s]=a*r.unit.conversion_factor:r.unit==="degree"?t[s]=a*Math.PI/180:t[s]=a});break;case"unit":i.name&&(t.units=i.name.toLowerCase(),t.units==="metre"&&(t.units="meter")),i.conversion_factor&&(t.to_meter=i.conversion_factor);break;case"base_crs":Kr(i,t),t.datumCode=i.id?i.id.authority+"_"+i.id.code:i.name;break;default:break}}),t.latitude_of_false_origin!==void 0&&(t.lat0=t.latitude_of_false_origin),t.longitude_of_false_origin!==void 0&&(t.long0=t.longitude_of_false_origin),t.latitude_of_standard_parallel!==void 0&&(t.lat0=t.latitude_of_standard_parallel,t.lat1=t.latitude_of_standard_parallel),t.latitude_of_1st_standard_parallel!==void 0&&(t.lat1=t.latitude_of_1st_standard_parallel),t.latitude_of_2nd_standard_parallel!==void 0&&(t.lat2=t.latitude_of_2nd_standard_parallel),t.latitude_of_projection_centre!==void 0&&(t.lat0=t.latitude_of_projection_centre),t.longitude_of_projection_centre!==void 0&&(t.longc=t.longitude_of_projection_centre),t.easting_at_false_origin!==void 0&&(t.x0=t.easting_at_false_origin),t.northing_at_false_origin!==void 0&&(t.y0=t.northing_at_false_origin),t.latitude_of_natural_origin!==void 0&&(t.lat0=t.latitude_of_natural_origin),t.longitude_of_natural_origin!==void 0&&(t.long0=t.longitude_of_natural_origin),t.longitude_of_origin!==void 0&&(t.long0=t.longitude_of_origin),t.false_easting!==void 0&&(t.x0=t.false_easting),t.easting_at_projection_centre&&(t.x0=t.easting_at_projection_centre),t.false_northing!==void 0&&(t.y0=t.false_northing),t.northing_at_projection_centre&&(t.y0=t.northing_at_projection_centre),t.standard_parallel_1!==void 0&&(t.lat1=t.standard_parallel_1),t.standard_parallel_2!==void 0&&(t.lat2=t.standard_parallel_2),t.scale_factor_at_natural_origin!==void 0&&(t.k0=t.scale_factor_at_natural_origin),t.scale_factor_at_projection_centre!==void 0&&(t.k0=t.scale_factor_at_projection_centre),t.scale_factor_on_pseudo_standard_parallel!==void 0&&(t.k0=t.scale_factor_on_pseudo_standard_parallel),t.azimuth!==void 0&&(t.alpha=t.azimuth),t.azimuth_at_projection_centre!==void 0&&(t.alpha=t.azimuth_at_projection_centre),t.angle_from_rectified_to_skew_grid&&(t.rectified_grid_angle=t.angle_from_rectified_to_skew_grid),ja(t),t)}var ZM=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function JM(n,t){var e=t[0],i=t[1];!(e in n)&&i in n&&(n[e]=n[i],t.length===3&&(n[e]=t[2](n[e])))}function Rd(n){for(var t=Object.keys(n),e=0,i=t.length;e<i;++e){var r=t[e];ZM.indexOf(r)!==-1&&$M(n[r]),typeof n[r]=="object"&&Rd(n[r])}}function $M(n){if(n.AUTHORITY){var t=Object.keys(n.AUTHORITY)[0];t&&t in n.AUTHORITY&&(n.title=t+":"+n.AUTHORITY[t])}if(n.type==="GEOGCS"?n.projName="longlat":n.type==="LOCAL_CS"?(n.projName="identity",n.local=!0):typeof n.PROJECTION=="object"?n.projName=Object.keys(n.PROJECTION)[0]:n.projName=n.PROJECTION,n.AXIS){for(var e="",i=0,r=n.AXIS.length;i<r;++i){var s=[n.AXIS[i][0].toLowerCase(),n.AXIS[i][1].toLowerCase()];s[0].indexOf("north")!==-1||(s[0]==="y"||s[0]==="lat")&&s[1]==="north"?e+="n":s[0].indexOf("south")!==-1||(s[0]==="y"||s[0]==="lat")&&s[1]==="south"?e+="s":s[0].indexOf("east")!==-1||(s[0]==="x"||s[0]==="lon")&&s[1]==="east"?e+="e":(s[0].indexOf("west")!==-1||(s[0]==="x"||s[0]==="lon")&&s[1]==="west")&&(e+="w")}e.length===2&&(e+="u"),e.length===3&&(n.axis=e)}n.UNIT&&(n.units=n.UNIT.name.toLowerCase(),n.units==="metre"&&(n.units="meter"),n.UNIT.convert&&(n.type==="GEOGCS"?n.DATUM&&n.DATUM.SPHEROID&&(n.to_meter=n.UNIT.convert*n.DATUM.SPHEROID.a):n.to_meter=n.UNIT.convert));var a=n.GEOGCS;n.type==="GEOGCS"&&(a=n),a&&(a.PRIMEM&&a.PRIMEM.convert&&(n.from_greenwich=me(a.PRIMEM.convert)),a.DATUM?n.datumCode=a.DATUM.name.toLowerCase():n.datumCode=a.name.toLowerCase(),n.datumCode.slice(0,2)==="d_"&&(n.datumCode=n.datumCode.slice(2)),n.datumCode==="new_zealand_1949"&&(n.datumCode="nzgd49"),(n.datumCode==="wgs_1984"||n.datumCode==="world_geodetic_system_1984")&&(n.PROJECTION==="Mercator_Auxiliary_Sphere"&&(n.sphere=!0),n.datumCode="wgs84"),n.datumCode==="belge_1972"&&(n.datumCode="rnb72"),a.DATUM&&a.DATUM.SPHEROID&&(n.ellps=a.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),n.ellps.toLowerCase().slice(0,13)==="international"&&(n.ellps="intl"),n.a=a.DATUM.SPHEROID.a,n.rf=parseFloat(a.DATUM.SPHEROID.rf)),a.DATUM&&a.DATUM.TOWGS84&&(n.datum_params=a.DATUM.TOWGS84),~n.datumCode.indexOf("osgb_1936")&&(n.datumCode="osgb36"),~n.datumCode.indexOf("osni_1952")&&(n.datumCode="osni52"),(~n.datumCode.indexOf("tm65")||~n.datumCode.indexOf("geodetic_datum_of_1965"))&&(n.datumCode="ire65"),n.datumCode==="ch1903+"&&(n.datumCode="ch1903"),~n.datumCode.indexOf("israel")&&(n.datumCode="isr93")),n.b&&!isFinite(n.b)&&(n.b=n.a),n.rectified_grid_angle&&(n.rectified_grid_angle=me(n.rectified_grid_angle));function o(h){var u=n.to_meter||1;return h*u}var l=function(h){return JM(n,h)},c=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",me],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",me],["x0","false_easting",o],["y0","false_northing",o],["long0","central_meridian",me],["lat0","latitude_of_origin",me],["lat0","standard_parallel_1",me],["lat1","standard_parallel_1",me],["lat2","standard_parallel_2",me],["azimuth","Azimuth"],["alpha","azimuth",me],["srsCode","name"]];c.forEach(l),ja(n)}function qn(n){if(typeof n=="object")return Kr(n);let t=Md(n);var e=Sd(n);if(t==="WKT2"){let s=xd(e);return Kr(s)}var i=e[0],r={};return si(e,r),Rd(r),r[i]}function re(n){var t=this;if(arguments.length===2){var e=arguments[1];typeof e=="string"?e.charAt(0)==="+"?re[n]=Jr(arguments[1]):re[n]=qn(arguments[1]):e&&typeof e=="object"&&!("projName"in e)?re[n]=qn(arguments[1]):(re[n]=e,e||delete re[n])}else if(arguments.length===1){if(Array.isArray(n))return n.map(function(i){return Array.isArray(i)?re.apply(t,i):re(i)});if(typeof n=="string"){if(n in re)return re[n]}else"EPSG"in n?re["EPSG:"+n.EPSG]=n:"ESRI"in n?re["ESRI:"+n.ESRI]=n:"IAU2000"in n?re["IAU2000:"+n.IAU2000]=n:console.log(n);return}}cd(re);var qi=re;function KM(n){return typeof n=="string"}function QM(n){return n in qi}function tS(n){return n.indexOf("+")!==0&&n.indexOf("[")!==-1||typeof n=="object"&&!("srsCode"in n)}var Id=["3857","900913","3785","102113"];function eS(n){if(n.title)return n.title.toLowerCase().indexOf("epsg:")===0&&Id.indexOf(n.title.substr(5))>-1;var t=pe(n,"authority");if(t){var e=pe(t,"epsg");return e&&Id.indexOf(e)>-1}}function nS(n){var t=pe(n,"extension");if(t)return pe(t,"proj4")}function iS(n){return n[0]==="+"}function rS(n){let t;if(KM(n))if(QM(n))t=qi[n];else if(tS(n)){t=qn(n);var e=nS(t);e&&(t=Jr(e))}else iS(n)&&(t=Jr(n));else"projName"in n?t=n:t=qn(n);return t&&eS(t)?qi["EPSG:3857"]:t}var Za=rS;function zc(n,t){n=n||{};var e,i;if(!t)return n;for(i in t)e=t[i],e!==void 0&&(n[i]=e);return n}function Wt(n,t,e){var i=n*t;return e/Math.sqrt(1-i*i)}function qe(n){return n<0?-1:1}function N(n,t){return t||Math.abs(n)<=vt?n:n-qe(n)*Xn}function Jt(n,t,e){var i=n*e,r=.5*n;return i=Math.pow((1-i)/(1+i),r),Math.tan(.5*(T-t))/i}function mn(n,t){for(var e=.5*n,i,r,s=T-2*Math.atan(t),a=0;a<=15;a++)if(i=n*Math.sin(s),r=T-2*Math.atan(t*Math.pow((1-i)/(1+i),e))-s,s+=r,Math.abs(r)<=1e-10)return s;return-9999}function sS(){var n=this.b/this.a;this.es=1-n*n,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.long0=this.long0||0,this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=Wt(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function aS(n){var t=n.x,e=n.y;if(e*Pt>90&&e*Pt<-90&&t*Pt>180&&t*Pt<-180)return null;var i,r;if(Math.abs(Math.abs(e)-T)<=D)return null;if(this.sphere)i=this.x0+this.a*this.k0*N(t-this.long0,this.over),r=this.y0+this.a*this.k0*Math.log(Math.tan(st+.5*e));else{var s=Math.sin(e),a=Jt(this.e,e,s);i=this.x0+this.a*this.k0*N(t-this.long0,this.over),r=this.y0-this.a*this.k0*Math.log(a)}return n.x=i,n.y=r,n}function oS(n){var t=n.x-this.x0,e=n.y-this.y0,i,r;if(this.sphere)r=T-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var s=Math.exp(-e/(this.a*this.k0));if(r=mn(this.e,s),r===-9999)return null}return i=N(this.long0+t/(this.a*this.k0),this.over),n.x=i,n.y=r,n}var lS=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"],Ld={init:sS,forward:aS,inverse:oS,names:lS};function cS(){}function Nd(n){return n}var kc=["longlat","identity","lonlat","latlon","latlong"],Dd={init:cS,forward:Nd,inverse:Nd,names:kc};var hS=[Ld,Dd],ai={},Yi=[];function Ud(n,t){var e=Yi.length;return n.names?(Yi[e]=n,n.names.forEach(function(i){ai[i.toLowerCase()]=e}),this):(console.log(t),!0)}function Vc(n){return n.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}function uS(n){if(!n)return!1;var t=n.toLowerCase();if(typeof ai[t]<"u"&&Yi[ai[t]]||(t=Vc(t),t in ai&&Yi[ai[t]]))return Yi[ai[t]]}function fS(){hS.forEach(Ud)}var Fd={start:fS,add:Ud,get:uS};var dS={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},andrae:{a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},clrk80:{a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},plessis:{a:6376523,b:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}},Hc=dS;var pS=Hc.WGS84;function Od(n,t,e,i){var r=n*n,s=t*t,a=(r-s)/r,o=0;i?(n*=1-a*(fd+a*(dd+a*pd)),r=n*n,a=0):o=Math.sqrt(a);var l=(r-s)/s;return{es:a,e:o,ep2:l}}function Bd(n,t,e,i,r){if(!n){var s=pe(Hc,i);s||(s=pS),n=s.a,t=s.b,e=s.rf}return e&&!t&&(t=(1-1/e)*n),(e===0||Math.abs(n-t)<D)&&(r=!0,t=n),{a:n,b:t,rf:e,sphere:r}}var $a={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clrk80ign",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.005693,-0.044698,0.044285,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-0.395026,0.330772,-1.876073,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243648,-1.158828,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,6.681627,-31.611492,-19.848161,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-0.008393,0.000749,-0.010276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,0.02579,0.00965,0.01166,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"0.06155,-0.01087,-0.04019,0.039492,0.032722,0.032898,-0.009994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.309248,0.324822,0.497299,5.689063"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"372.87,149.23,585.29"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"},EPSG_10328:{towgs84:"0,0,0"},EPSG_9782:{towgs84:"0,0,0"},EPSG_9777:{towgs84:"0,0,0"},EPSG_10690:{towgs84:"0,0,0"},EPSG_10639:{towgs84:"0,0,0"},EPSG_10739:{towgs84:"0,0,0"},EPSG_7686:{towgs84:"0,0,0"},EPSG_8900:{towgs84:"0,0,0"},EPSG_5886:{towgs84:"0,0,0"},EPSG_7683:{towgs84:"0,0,0"},EPSG_6668:{towgs84:"0,0,0"},EPSG_20046:{towgs84:"0,0,0"},EPSG_10299:{towgs84:"0,0,0"},EPSG_10310:{towgs84:"0,0,0"},EPSG_10475:{towgs84:"0,0,0"},EPSG_4742:{towgs84:"0,0,0"},EPSG_10671:{towgs84:"0,0,0"},EPSG_10762:{towgs84:"0,0,0"},EPSG_10725:{towgs84:"0,0,0"},EPSG_10791:{towgs84:"0,0,0"},EPSG_10800:{towgs84:"0,0,0"},EPSG_10305:{towgs84:"0,0,0"},EPSG_10941:{towgs84:"0,0,0"},EPSG_10968:{towgs84:"0,0,0"},EPSG_10875:{towgs84:"0,0,0"},EPSG_6318:{towgs84:"0,0,0"},EPSG_10910:{towgs84:"0,0,0"}};for(Gd in $a)Ja=$a[Gd],Ja.datumName&&($a[Ja.datumName]=Ja);var Ja,Gd,zd=$a;function mS(n,t,e,i,r,s,a){var o={};return o.datum_type=Zr,t&&(o.datum_type=hd,o.datum_params=t.map(parseFloat),(o.datum_params[0]!==0||o.datum_params[1]!==0||o.datum_params[2]!==0)&&(o.datum_type=Ie),o.datum_params.length>3&&(o.datum_params[3]!==0||o.datum_params[4]!==0||o.datum_params[5]!==0||o.datum_params[6]!==0)&&(o.datum_type=Le,o.datum_params[3]*=ri,o.datum_params[4]*=ri,o.datum_params[5]*=ri,o.datum_params[6]=o.datum_params[6]/1e6+1)),a&&(o.datum_type=dn,o.grids=a),o.a=e,o.b=i,o.es=r,o.ep2=s,o}var kd=mS;var Xc={};function qc(n,t,e){return t instanceof ArrayBuffer?gS(n,t,e):{ready:_S(n,t)}}function gS(n,t,e){var i=!0;e!==void 0&&e.includeErrorFields===!1&&(i=!1);var r=new DataView(t),s=vS(r),a=xS(r,s),o=MS(r,a,s,i),l={header:a,subgrids:o};return Xc[n]=l,l}async function _S(n,t){for(var e=[],i=await t.getImageCount(),r=i-1;r>=0;r--){var s=await t.getImage(r),a=await s.readRasters(),o=a,l=[s.getWidth(),s.getHeight()],c=s.getBoundingBox().map(Vd),h=typeof s.fileDirectory.getValue=="function"?s.fileDirectory.getValue("ModelPixelScale"):s.fileDirectory.ModelPixelScale,u=[h[0],h[1]].map(Vd),m=c[0]+(l[0]-1)*u[0],d=c[3]-(l[1]-1)*u[1],g=o[0],y=o[1],v=[];for(let I=l[1]-1;I>=0;I--)for(let U=l[0]-1;U>=0;U--){var S=I*l[0]+U;v.push([-Yn(y[S]),Yn(g[S])])}e.push({del:u,lim:l,ll:[-m,d],cvs:v})}var w={header:{nSubgrids:i},subgrids:e};return Xc[n]=w,w}function Hd(n){if(n===void 0)return null;var t=n.split(",");return t.map(yS)}function yS(n){if(n.length===0)return null;var t=n[0]==="@";return t&&(n=n.slice(1)),n==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:n,mandatory:!t,grid:Xc[n]||null,isNull:!1}}function Vd(n){return n*Math.PI/180}function Yn(n){return n/3600*Math.PI/180}function vS(n){var t=n.getInt32(8,!1);return t===11?!1:(t=n.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function xS(n,t){return{nFields:n.getInt32(8,t),nSubgridFields:n.getInt32(24,t),nSubgrids:n.getInt32(40,t),shiftType:Wc(n,56,64).trim(),fromSemiMajorAxis:n.getFloat64(120,t),fromSemiMinorAxis:n.getFloat64(136,t),toSemiMajorAxis:n.getFloat64(152,t),toSemiMinorAxis:n.getFloat64(168,t)}}function Wc(n,t,e){return String.fromCharCode.apply(null,new Uint8Array(n.buffer.slice(t,e)))}function MS(n,t,e,i){for(var r=176,s=[],a=0;a<t.nSubgrids;a++){var o=bS(n,r,e),l=wS(n,r,o,e,i),c=Math.round(1+(o.upperLongitude-o.lowerLongitude)/o.longitudeInterval),h=Math.round(1+(o.upperLatitude-o.lowerLatitude)/o.latitudeInterval);s.push({ll:[Yn(o.lowerLongitude),Yn(o.lowerLatitude)],del:[Yn(o.longitudeInterval),Yn(o.latitudeInterval)],lim:[c,h],count:o.gridNodeCount,cvs:SS(l)});var u=16;i===!1&&(u=8),r+=176+o.gridNodeCount*u}return s}function SS(n){return n.map(function(t){return[Yn(t.longitudeShift),Yn(t.latitudeShift)]})}function bS(n,t,e){return{name:Wc(n,t+8,t+16).trim(),parent:Wc(n,t+24,t+24+8).trim(),lowerLatitude:n.getFloat64(t+72,e),upperLatitude:n.getFloat64(t+88,e),lowerLongitude:n.getFloat64(t+104,e),upperLongitude:n.getFloat64(t+120,e),latitudeInterval:n.getFloat64(t+136,e),longitudeInterval:n.getFloat64(t+152,e),gridNodeCount:n.getInt32(t+168,e)}}function wS(n,t,e,i,r){var s=t+176,a=16;r===!1&&(a=8);for(var o=[],l=0;l<e.gridNodeCount;l++){var c={latitudeShift:n.getFloat32(s+l*a,i),longitudeShift:n.getFloat32(s+l*a+4,i)};r!==!1&&(c.latitudeAccuracy=n.getFloat32(s+l*a+8,i),c.longitudeAccuracy=n.getFloat32(s+l*a+12,i)),o.push(c)}return o}function ji(n,t){if(!(this instanceof ji))return new ji(n);this.forward=null,this.inverse=null,this.init=null,this.name,this.axis,this.names=null,this.title,t=t||function(c){if(c)throw c};var e=Za(n);if(typeof e!="object"){t("Could not parse to valid json: "+n);return}var i=ji.projections.get(e.projName);if(!i){t("Could not get projection name from: "+n);return}if(e.datumCode&&e.datumCode!=="none"){var r=pe(zd,e.datumCode);r&&(e.datum_params=e.datum_params||(r.towgs84?r.towgs84.split(","):null),e.ellps=r.ellipse,e.datumName=r.datumName?r.datumName:e.datumCode)}e.axis=e.axis||"enu",e.ellps=e.ellps||"wgs84",e.lat1=e.lat1||e.lat0;var s=Bd(e.a,e.b,e.rf,e.ellps,e.sphere),a=Od(s.a,s.b,s.rf,e.R_A),o=Hd(e.nadgrids),l=e.datum||kd(e.datumCode,e.datum_params,s.a,s.b,a.es,a.ep2,o);zc(this,e),zc(this,i),this.a=s.a,this.b=s.b,this.rf=s.rf,this.sphere=s.sphere,this.es=a.es,this.e=a.e,this.ep2=a.ep2,this.datum=l,"init"in this&&typeof this.init=="function"&&this.init(),this.k0||(this.k0=1),t(null,this)}ji.projections=Fd;ji.projections.start();var Ne=ji;function Wd(n,t){return n.datum_type!==t.datum_type||n.a!==t.a||Math.abs(n.es-t.es)>5e-11?!1:n.datum_type===Ie?n.datum_params[0]===t.datum_params[0]&&n.datum_params[1]===t.datum_params[1]&&n.datum_params[2]===t.datum_params[2]:n.datum_type===Le?n.datum_params[0]===t.datum_params[0]&&n.datum_params[1]===t.datum_params[1]&&n.datum_params[2]===t.datum_params[2]&&n.datum_params[3]===t.datum_params[3]&&n.datum_params[4]===t.datum_params[4]&&n.datum_params[5]===t.datum_params[5]&&n.datum_params[6]===t.datum_params[6]:!0}function Ka(n,t,e){var i=n.x,r=n.y,s=n.z?n.z:0,a,o,l,c;if(r<-T&&r>-1.001*T)r=-T;else if(r>T&&r<1.001*T)r=T;else{if(r<-T)return{x:-1/0,y:-1/0,z:n.z};if(r>T)return{x:1/0,y:1/0,z:n.z}}return i>Math.PI&&(i-=2*Math.PI),o=Math.sin(r),c=Math.cos(r),l=o*o,a=e/Math.sqrt(1-t*l),{x:(a+s)*c*Math.cos(i),y:(a+s)*c*Math.sin(i),z:(a*(1-t)+s)*o}}function Qa(n,t,e,i){var r=1e-12,s=r*r,a=30,o,l,c,h,u,m,d,g,y,v,S,w,I,U=n.x,R=n.y,V=n.z?n.z:0,B,G,Y;if(o=Math.sqrt(U*U+R*R),l=Math.sqrt(U*U+R*R+V*V),o/e<r){if(B=0,l/e<r)return G=T,Y=-i,{x:n.x,y:n.y,z:n.z}}else B=Math.atan2(R,U);c=V/l,h=o/l,u=1/Math.sqrt(1-t*(2-t)*h*h),g=h*(1-t)*u,y=c*u,I=0;do I++,d=e/Math.sqrt(1-t*y*y),Y=o*g+V*y-d*(1-t*y*y),m=t*d/(d+Y),u=1/Math.sqrt(1-m*(2-m)*h*h),v=h*(1-m)*u,S=c*u,w=S*g-v*y,g=v,y=S;while(w*w>s&&I<a);return G=Math.atan(S/Math.abs(v)),{x:B,y:G,z:Y}}function Xd(n,t,e){if(t===Ie)return{x:n.x+e[0],y:n.y+e[1],z:n.z+e[2]};if(t===Le){var i=e[0],r=e[1],s=e[2],a=e[3],o=e[4],l=e[5],c=e[6];return{x:c*(n.x-l*n.y+o*n.z)+i,y:c*(l*n.x+n.y-a*n.z)+r,z:c*(-o*n.x+a*n.y+n.z)+s}}}function qd(n,t,e){if(t===Ie)return{x:n.x-e[0],y:n.y-e[1],z:n.z-e[2]};if(t===Le){var i=e[0],r=e[1],s=e[2],a=e[3],o=e[4],l=e[5],c=e[6],h=(n.x-i)/c,u=(n.y-r)/c,m=(n.z-s)/c;return{x:h+l*u-o*m,y:-l*h+u+a*m,z:o*h-a*u+m}}}function to(n){return n===Ie||n===Le}function Zd(n,t,e){if(Wd(n,t)||n.datum_type===Zr||t.datum_type===Zr)return e;var i=n.a,r=n.es;if(n.datum_type===dn){var s=Yd(n,!1,e);if(s!==0)return;i=Nc,r=Dc}var a=t.a,o=t.b,l=t.es;if(t.datum_type===dn&&(a=Nc,o=ud,l=Dc),r===l&&i===a&&!to(n.datum_type)&&!to(t.datum_type))return e;if(e=Ka(e,r,i),to(n.datum_type)&&(e=Xd(e,n.datum_type,n.datum_params)),to(t.datum_type)&&(e=qd(e,t.datum_type,t.datum_params)),e=Qa(e,l,a,o),t.datum_type===dn){var c=Yd(t,!0,e);if(c!==0)return}return e}function Yd(n,t,e){if(n.grids===null||n.grids.length===0)return console.log("Grid shift grids not found"),-1;var i={x:-e.x,y:e.y},r={x:Number.NaN,y:Number.NaN},s=[];t:for(var a=0;a<n.grids.length;a++){var o=n.grids[a];if(s.push(o.name),o.isNull){r=i;break}if(o.grid===null){if(o.mandatory)return console.log("Unable to find mandatory grid '"+o.name+"'"),-1;continue}for(var l=o.grid.subgrids,c=0,h=l.length;c<h;c++){var u=l[c],m=(Math.abs(u.del[1])+Math.abs(u.del[0]))/1e4,d=u.ll[0]-m,g=u.ll[1]-m,y=u.ll[0]+(u.lim[0]-1)*u.del[0]+m,v=u.ll[1]+(u.lim[1]-1)*u.del[1]+m;if(!(g>i.y||d>i.x||v<i.y||y<i.x)&&(r=ES(i,t,u),!isNaN(r.x)))break t}}return isNaN(r.x)?(console.log("Failed to find a grid shift table for location '"+-i.x*Pt+" "+i.y*Pt+" tried: '"+s+"'"),-1):(e.x=-r.x,e.y=r.y,0)}function ES(n,t,e){var i={x:Number.NaN,y:Number.NaN};if(isNaN(n.x))return i;var r={x:n.x,y:n.y};r.x-=e.ll[0],r.y-=e.ll[1],r.x=N(r.x-Math.PI)+Math.PI;var s=jd(r,e);if(t){if(isNaN(s.x))return i;s.x=r.x-s.x,s.y=r.y-s.y;var a=9,o=1e-12,l,c;do{if(c=jd(s,e),isNaN(c.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}l={x:r.x-(c.x+s.x),y:r.y-(c.y+s.y)},s.x+=l.x,s.y+=l.y}while(a--&&Math.abs(l.x)>o&&Math.abs(l.y)>o);if(a<0)return console.log("Inverse grid shift iterator failed to converge."),i;i.x=N(s.x+e.ll[0]),i.y=s.y+e.ll[1]}else isNaN(s.x)||(i.x=n.x+s.x,i.y=n.y+s.y);return i}function jd(n,t){var e={x:n.x/t.del[0],y:n.y/t.del[1]},i={x:Math.floor(e.x),y:Math.floor(e.y)},r={x:e.x-1*i.x,y:e.y-1*i.y},s={x:Number.NaN,y:Number.NaN},a;if(i.x<0||i.x>=t.lim[0]||i.y<0||i.y>=t.lim[1])return s;a=i.y*t.lim[0]+i.x;var o={x:t.cvs[a][0],y:t.cvs[a][1]};a++;var l={x:t.cvs[a][0],y:t.cvs[a][1]};a+=t.lim[0];var c={x:t.cvs[a][0],y:t.cvs[a][1]};a--;var h={x:t.cvs[a][0],y:t.cvs[a][1]},u=r.x*r.y,m=r.x*(1-r.y),d=(1-r.x)*(1-r.y),g=(1-r.x)*r.y;return s.x=d*o.x+m*l.x+g*h.x+u*c.x,s.y=d*o.y+m*l.y+g*h.y+u*c.y,s}var oi=["x","y","z"];function Jd(n,t){let e={};for(let i=0,r=n.axis.length;i<r;i++){if(i===2&&t.z===void 0)continue;let s=t[oi[i]];switch(n.axis[i]){case"e":e.x=s;break;case"w":e.x=-s;break;case"n":e.y=s;break;case"s":e.y=-s;break;case"u":e.z=s;break;case"d":e.z=-s;break;default:return null}}return e}function $d(n,t){let e={};for(let i=0,r=n.axis.length;i<r;i++)if(!(i===2&&t.z===void 0))switch(n.axis[i]){case"e":e[oi[i]]=t.x;break;case"w":e[oi[i]]=-t.x;break;case"n":e[oi[i]]=t.y;break;case"s":e[oi[i]]=-t.y;break;case"u":e[oi[i]]=t.z;break;case"d":e[oi[i]]=-t.z;break;default:return null}return e}function Zi(n){var t={x:n[0],y:n[1]};return n.length>2&&(t.z=n[2]),n.length>3&&(t.m=n[3]),t}function Qd(n){Kd(n.x),Kd(n.y)}function Kd(n){if(typeof Number.isFinite=="function"){if(Number.isFinite(n))return;throw new TypeError("coordinates must be finite numbers")}if(typeof n!="number"||n!==n||!isFinite(n))throw new TypeError("coordinates must be finite numbers")}function TS(n,t){return(n.datum.datum_type===Ie||n.datum.datum_type===Le||n.datum.datum_type===dn)&&t.datumCode!=="WGS84"||(t.datum.datum_type===Ie||t.datum.datum_type===Le||t.datum.datum_type===dn)&&n.datumCode!=="WGS84"}function Qr(n,t,e,i){var r,s=e.z!==void 0;if(Qd(e),n.datum&&t.datum&&TS(n,t)&&(r=new Ne("WGS84"),e=Qr(n,r,e,i),n=r),i&&n.axis!=="enu"&&(e=Jd(n,e)),n.projName==="longlat")e={x:e.x*dt,y:e.y*dt,z:e.z||0};else if(n.to_meter&&(e={x:e.x*n.to_meter,y:e.y*n.to_meter,z:e.z||0}),e=n.inverse(e),!e)return;if(n.from_greenwich&&(e.x+=n.from_greenwich),e=Zd(n.datum,t.datum,e),!!e)return e=e,t.from_greenwich&&(e={x:e.x-t.from_greenwich,y:e.y,z:e.z||0}),t.projName==="longlat"?(t.long_wrap!==void 0&&(e.x=t.long_wrap+N(e.x-t.long_wrap)),e={x:e.x*Pt,y:e.y*Pt,z:e.z||0}):(e=t.forward(e),t.to_meter&&(e={x:e.x/t.to_meter,y:e.y/t.to_meter,z:e.z||0})),i&&t.axis!=="enu"?$d(t,e):(e&&!s&&t.projName!=="geocent"&&delete e.z,e)}function Yc(n,t,e,i){var r;return Array.isArray(e)?r=Zi(e):r={x:e.x,y:e.y,z:e.z,m:e.m},Qr(n,t,r,i)}var tp=Ne("WGS84");function jc(n,t,e,i){var r,s,a;return Array.isArray(e)?(r=Qr(n,t,Zi(e),i)||{x:NaN,y:NaN},e.length>2?(s=typeof n.name<"u"&&n.name==="geocent"||typeof t.name<"u"&&t.name==="geocent",s?typeof r.z=="number"?[r.x,r.y,r.z].concat(e.slice(3)):[r.x,r.y,e[2]].concat(e.slice(3)):i&&typeof r.z=="number"?[r.x,r.y,r.z].concat(e.slice(3)):[r.x,r.y].concat(e.slice(2))):[r.x,r.y]):(r=Qr(n,t,{x:e.x,y:e.y,z:e.z,m:e.m},i)||{x:NaN,y:NaN},a=Object.keys(e),a.length===2||(s=typeof n.name<"u"&&n.name==="geocent"||typeof t.name<"u"&&t.name==="geocent",a.forEach(function(o){o==="x"||o==="y"||o==="z"&&(s||i)||(r[o]=e[o])})),r)}function eo(n){return n instanceof Ne?n:typeof n=="object"&&"oProj"in n?n.oProj:Ne(n)}function AS(n,t,e){var i,r,s=!1,a;return typeof t>"u"?(r=eo(n),i=tp,s=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,r=eo(n),i=tp,s=!0),i||(i=eo(n)),r||(r=eo(t)),e?jc(i,r,e):(a={forward:function(o,l){return jc(i,r,o,l)},inverse:function(o,l){return jc(r,i,o,l)}},s&&(a.oProj=r),a)}var ep=AS;var np=6,rp="AJSAJS",sp="AFAFAF",Ji=65,se=73,Ee=79,ts=86,es=90,ap={forward:Jc,inverse:CS,toPoint:$c};function Jc(n,t){return t=t||5,IS(PS({lat:n[1],lon:n[0]}),t)}function CS(n){var t=Kc(lp(n.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function $c(n){var t=Kc(lp(n.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function Zc(n){return n*(Math.PI/180)}function ip(n){return 180*(n/Math.PI)}function PS(n){var t=n.lat,e=n.lon,i=6378137,r=.00669438,s=.9996,a,o,l,c,h,u,m,d=Zc(t),g=Zc(e),y,v;v=Math.floor((e+180)/6)+1,e===180&&(v=60),t>=56&&t<64&&e>=3&&e<12&&(v=32),t>=72&&t<84&&(e>=0&&e<9?v=31:e>=9&&e<21?v=33:e>=21&&e<33?v=35:e>=33&&e<42&&(v=37)),a=(v-1)*6-180+3,y=Zc(a),o=r/(1-r),l=i/Math.sqrt(1-r*Math.sin(d)*Math.sin(d)),c=Math.tan(d)*Math.tan(d),h=o*Math.cos(d)*Math.cos(d),u=Math.cos(d)*(g-y),m=i*((1-r/4-3*r*r/64-5*r*r*r/256)*d-(3*r/8+3*r*r/32+45*r*r*r/1024)*Math.sin(2*d)+(15*r*r/256+45*r*r*r/1024)*Math.sin(4*d)-35*r*r*r/3072*Math.sin(6*d));var S=s*l*(u+(1-c+h)*u*u*u/6+(5-18*c+c*c+72*h-58*o)*u*u*u*u*u/120)+5e5,w=s*(m+l*Math.tan(d)*(u*u/2+(5-c+9*h+4*h*h)*u*u*u*u/24+(61-58*c+c*c+600*h-330*o)*u*u*u*u*u*u/720));return t<0&&(w+=1e7),{northing:Math.round(w),easting:Math.round(S),zoneNumber:v,zoneLetter:RS(t)}}function Kc(n){var t=n.northing,e=n.easting,i=n.zoneLetter,r=n.zoneNumber;if(r<0||r>60)return null;var s=.9996,a=6378137,o=.00669438,l,c=(1-Math.sqrt(1-o))/(1+Math.sqrt(1-o)),h,u,m,d,g,y,v,S,w,I=e-5e5,U=t;i<"N"&&(U-=1e7),v=(r-1)*6-180+3,l=o/(1-o),y=U/s,S=y/(a*(1-o/4-3*o*o/64-5*o*o*o/256)),w=S+(3*c/2-27*c*c*c/32)*Math.sin(2*S)+(21*c*c/16-55*c*c*c*c/32)*Math.sin(4*S)+151*c*c*c/96*Math.sin(6*S),h=a/Math.sqrt(1-o*Math.sin(w)*Math.sin(w)),u=Math.tan(w)*Math.tan(w),m=l*Math.cos(w)*Math.cos(w),d=a*(1-o)/Math.pow(1-o*Math.sin(w)*Math.sin(w),1.5),g=I/(h*s);var R=w-h*Math.tan(w)/d*(g*g/2-(5+3*u+10*m-4*m*m-9*l)*g*g*g*g/24+(61+90*u+298*m+45*u*u-252*l-3*m*m)*g*g*g*g*g*g/720);R=ip(R);var V=(g-(1+2*u+m)*g*g*g/6+(5-2*m+28*u-3*m*m+8*l+24*u*u)*g*g*g*g*g/120)/Math.cos(w);V=v+ip(V);var B;if(n.accuracy){var G=Kc({northing:n.northing+n.accuracy,easting:n.easting+n.accuracy,zoneLetter:n.zoneLetter,zoneNumber:n.zoneNumber});B={top:G.lat,right:G.lon,bottom:R,left:V}}else B={lat:R,lon:V};return B}function RS(n){var t="Z";return 84>=n&&n>=72?t="X":72>n&&n>=64?t="W":64>n&&n>=56?t="V":56>n&&n>=48?t="U":48>n&&n>=40?t="T":40>n&&n>=32?t="S":32>n&&n>=24?t="R":24>n&&n>=16?t="Q":16>n&&n>=8?t="P":8>n&&n>=0?t="N":0>n&&n>=-8?t="M":-8>n&&n>=-16?t="L":-16>n&&n>=-24?t="K":-24>n&&n>=-32?t="J":-32>n&&n>=-40?t="H":-40>n&&n>=-48?t="G":-48>n&&n>=-56?t="F":-56>n&&n>=-64?t="E":-64>n&&n>=-72?t="D":-72>n&&n>=-80&&(t="C"),t}function IS(n,t){var e="00000"+n.easting,i="00000"+n.northing;return n.zoneNumber+n.zoneLetter+LS(n.easting,n.northing,n.zoneNumber)+e.substr(e.length-5,t)+i.substr(i.length-5,t)}function LS(n,t,e){var i=op(e),r=Math.floor(n/1e5),s=Math.floor(t/1e5)%20;return NS(r,s,i)}function op(n){var t=n%np;return t===0&&(t=np),t}function NS(n,t,e){var i=e-1,r=rp.charCodeAt(i),s=sp.charCodeAt(i),a=r+n-1,o=s+t,l=!1;a>es&&(a=a-es+Ji-1,l=!0),(a===se||r<se&&a>se||(a>se||r<se)&&l)&&a++,(a===Ee||r<Ee&&a>Ee||(a>Ee||r<Ee)&&l)&&(a++,a===se&&a++),a>es&&(a=a-es+Ji-1),o>ts?(o=o-ts+Ji-1,l=!0):l=!1,(o===se||s<se&&o>se||(o>se||s<se)&&l)&&o++,(o===Ee||s<Ee&&o>Ee||(o>Ee||s<Ee)&&l)&&(o++,o===se&&o++),o>ts&&(o=o-ts+Ji-1);var c=String.fromCharCode(a)+String.fromCharCode(o);return c}function lp(n){if(n&&n.length===0)throw"MGRSPoint coverting from nothing";for(var t=n.length,e=null,i="",r,s=0;!/[A-Z]/.test(r=n.charAt(s));){if(s>=2)throw"MGRSPoint bad conversion from: "+n;i+=r,s++}var a=parseInt(i,10);if(s===0||s+3>t)throw"MGRSPoint bad conversion from: "+n;var o=n.charAt(s++);if(o<="A"||o==="B"||o==="Y"||o>="Z"||o==="I"||o==="O")throw"MGRSPoint zone letter "+o+" not handled: "+n;e=n.substring(s,s+=2);for(var l=op(a),c=DS(e.charAt(0),l),h=US(e.charAt(1),l);h<FS(o);)h+=2e6;var u=t-s;if(u%2!==0)throw`MGRSPoint has to have an even number
3845
+ `}),za=new Yt(1,256,256*256,256*256*256),vc=255/256,RM=new Yt(vc/za.x,vc/za.y,vc/za.z,1/za.w),IM=new Fr(2,2);async function LM(n,t){let e=n.image.width,i=n.image.height,r=new Rr,s=new Ur(IM,Kf);r.add(s),Kf.uniforms.depthTexture.value=n;let a=new zi(e,i,{format:cn,type:on});t.setRenderTarget(a),t.render(r,new Br),t.setRenderTarget(null);let o=new Uint8Array(e*i*4);await t.readRenderTargetPixelsAsync(a,0,0,e,i,o);let l=new Float32Array(e*i),c=0,h=new Yt;for(let u=0;u<o.length;u+=4){let m=o[u+0]/255,d=o[u+1]/255,g=o[u+2]/255,y=o[u+3]/255;h.set(m,d,g,y);let v=h.dot(RM);l[c]=v,c++}return a.dispose(),l}function NM(n,t){let e=n.renderer.getContext(),i=e.getParameter(e.DEPTH_BITS),r=t.width*t.height*(i/8);n.objects.set(t.texture.id,{gpuMemory:r,cpuMemory:0})}function DM(n,t){t!=null&&(_M(t)?yc(n,t):yM(t)&&(t.depthBuffer&&(t.depthTexture!=null?yc(n,t.depthTexture):NM(n,t)),yc(n,t.texture)))}function UM(n){return n instanceof HTMLCanvasElement||n instanceof OffscreenCanvas?n.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,n.width,n.height).data:Sc(n)}function FM(n){let t=UM(n);for(let e=0;e<t.length;e+=4)if(t[e+3]!==0)return!1;return!0}function xc(n,t,e){let i=e?.getContext();if(i==null)return n;let r=an;return n===Ve&&(t===ln&&!i.getExtension("OES_texture_float_linear")||t===kr&&!i.getExtension("OES_texture_half_float_linear"))?r:n}function OM(n,t){n.minFilter=xc(n.minFilter,n.type,t),n.magFilter=xc(n.magFilter,n.type,t)}var Va={createDataTexture:wM,createDataTextureAsync:EM,isEmptyTexture:wc,decodeBlob:bM,getChannelCount:Yr,getBytesPerChannel:qr,getWiderType:AM,getDataTypeString:vM,create1DTexture:TM,createDataCopy:MM,computeMinMax:PM,isDataTexture:Mc,isCanvasTexture:ka,computeMinMaxFromBuffer:bc,computeMinMaxFromImage:id,estimateSize:xM,readDepthTexture:LM,shouldExpandRGB:CM,isCanvasEmpty:FM,getMemoryUsage:DM,getCompatibleTextureFilter:xc,ensureCompatibility:OM};var Ec=class extends Ot{},YI=new Ec;var BM="file-viewer-offline-cdn/npm/laz-perf@0.0.7/lib",GM=BM,Tc=null;function rd(n){Tc=n}var Ha;async function zM(n){return Ac.LazPerf.create({wasmBinary:n})}async function kM(n){return Ac.LazPerf.create({locateFile:t=>`${n}/${t}`})}function Cc(){return Ha||(Tc!=null?Ha=zM(Tc):Ha=kM(GM)),Ha}function Wa(n,t){return n==null||n.length===0?!0:n.every(e=>e(t))}function VM(n){let t=n.operator;switch(t){case"equal":return e=>e===n.value;case"less":return e=>e<n.value;case"lessequal":return e=>e<=n.value;case"greater":return e=>e>n.value;case"greaterequal":return e=>e>=n.value;case"not":return e=>e!==n.value;case"in":return e=>n.values.has(e);case"not_in":return e=>!n.values.has(e);default:throw new Error(`invalid filter operator: '${t}'`)}}function sd(n,t){if(n.length===0)return null;let e=[];for(let i of n){let r=VM(i);if(t.dimensions[i.dimension]!=null){let s=t.getter(i.dimension);e.push(a=>r(s(a)))}}return e.length>0?e:null}var Pc=class{_length=0;constructor(t,e){this._ctor=e,this._array=e(t)}get capacity(){return this._array.length}get length(){return this._length}push(t){this.isFull&&this.expand(),this._array[this._length]=t,this._length++}getArray(){return this.isFull?this._array:this._array.slice(0,this._length)}get isFull(){return this._length===this.capacity}expand(){let t=Math.round(this.capacity*1.5),e=this._ctor(t);e.set(this._array),this._array=e}},ad=Pc;function hn(n,t){if(n==null)throw new Error(t??"non-null assertion failed");return n}var un=0,fn=1,Xe=2,Wn=3,Rc=class{_lastExpansion=0;get byteLength(){return this.array.byteLength}get capacity(){return this.array.length/this._dimension}get array(){return this._array}toFloat32Array(){return this._array instanceof Float32Array?this._array.length===this._length*this._dimension?this._array:this._array.slice(0,this._length*this._dimension):new Float32Array(this._array.slice(0,this._length*this._dimension))}constructor(t,e){if(this._dimension=e,t.length%this._dimension!==0)throw new Error(`invalid size, expected a multiple of ${this._dimension}, got ${t.length}`);this._array=t,this._capacity=this._array.length/this._dimension,this._length=this._capacity}get length(){return this._length}set length(t){this._length=t}setX(t,e){let i=t*this._dimension;this._array[i+un]=e}getX(t){let e=t*this._dimension;return this._array[e+un]}setY(t,e){let i=t*this._dimension;this._array[i+fn]=e}getY(t){let e=t*this._dimension;return this._array[e+fn]}setZ(t,e){if(this._dimension>=3){let i=t*this._dimension;this._array[i+Xe]=e}}getZ(t){if(this._dimension>=3){let e=t*this._dimension;return this._array[e+Xe]}return null}setW(t,e){if(this._dimension>=4){let i=t*this._dimension;this._array[i+Wn]=e}}getW(t){if(this._dimension>=4){let e=t*this._dimension;return this._array[e+Wn]}return null}setVector(t,e){let i=t*this._dimension;this._array[i+un]=e.getComponent(un),this._array[i+fn]=e.getComponent(fn),this._dimension>=3&&(this._array[i+Xe]=e.getComponent(Xe)),this._dimension>=4&&(this._array[i+Wn]=e.getComponent(Wn))}set(t,e,i,r,s){let a=t*this._dimension;if(a>=this._array.length)throw new Error("index out of bounds");this._array[a+un]=e,this._array[a+fn]=i,this._dimension>=Xe&&r!=null&&(this._array[a+Xe]=r),this._dimension>=Wn&&s!=null&&(this._array[a+Wn]=s)}copyItem(t,e){let i=this._dimension,r=e*i,s=t*i;this._array[r+un]=this._array[s+un],this._array[r+fn]=this._array[s+fn],i>=3&&(this._array[r+Xe]=this._array[s+Xe]),i>=4&&(this._array[r+Wn]=this._array[s+Wn])}computeExpansionSize(){return this._lastExpansion===0?this._lastExpansion=32:(this._lastExpansion*=2,this._lastExpansion=jt.clamp(this._lastExpansion,32,65536)),this._lastExpansion}trim(){this._capacity>this._length&&(this._capacity=this._length,this._array=this._array.slice(0,this._length*this._dimension))}allocateIfFull(){if(this._capacity===this._length){let t=this._length;this.expand(this._length+this.computeExpansionSize()),this._capacity=this._array.length/this._dimension,this._length=t}}push(t,e,i,r){this._capacity===this._length&&this.allocateIfFull(),this.setX(this._length,t),this.setY(this._length,e),i!=null&&this.setZ(this._length,i),r!=null&&this.setW(this._length,r),this._length++}pushVector(t){this._capacity===this._length&&this.allocateIfFull(),this.assignVector(this._length*this._dimension,t),this._length++}expand(t){let e=new this.array.constructor(t*this._dimension);return e.set(this._array),this._array=e,this._capacity=this._array.length/this._dimension,this._length=this._capacity,this}forEach(t){let e=this.getTempVector(),i=this._dimension;for(let r=0;r<this._array.length;r+=i){this.readVector(r,e);let s=r/i;t(e,s,this)}}};var jr=class n extends Rc{dimension=3;constructor(t){super(t,3)}get(t,e){return e=e??new C,e.set(this.getX(t),this.getY(t),hn(this.getZ(t)))}clone(){return new n(this._array.slice(0))}getZ(t){return super.getZ(t)}getTempVector(){return new C}readVector(t,e){let i=this._array;e.set(i[t+un],i[t+fn],i[t+Xe])}assignVector(t,e){this._array[t+un]=e.x,this._array[t+fn]=e.y,this._array[t+Xe]=e.z}};var od=(function(n){return n[n.Elevation=1]="Elevation",n[n.Slope=2]="Slope",n[n.Aspect=3]="Aspect",n})(od||{}),ld=od;var Ic=class n extends Ot{_opacity=null;_shouldRecreateTexture=!0;constructor(t){if(super(),this._min=t.min,this._max=t.max,this._mode=t.mode??ld.Elevation,this._colors=hn(t.colors,"missing colors parameter"),t.opacities!=null){if(t.opacities.length!==this._colors.length)throw new Error("the opacity array must have the same length as the color array");this._opacity=t.opacities??null}this._cachedTexture=null,this._active=!0}get mode(){return this._mode}set mode(t){this._mode!==t&&(this._mode=t,this.notifyChange())}notifyChange(){this.dispatchEvent({type:"updated"})}get active(){return this._active}set active(t){this._active!==t&&(this._active=t,this.notifyChange())}get min(){return this._min}set min(t){this._min!==t&&(this._min=t,this.notifyChange())}get max(){return this._max}set max(t){this._max!==t&&(this._max=t,this.notifyChange())}get colors(){return this._colors}set colors(t){this._colors!==t&&(this._colors=t,this._opacity&&this._opacity.length!==t.length&&(this._opacity=null),this._shouldRecreateTexture=!0,this.notifyChange())}get opacity(){return this._opacity}set opacity(t){if(t&&t.length!==this.colors.length)throw new Error("the opacity array must have the same length as the color array");this._opacity!==t&&(this._opacity=t,this._shouldRecreateTexture=!0),this.notifyChange()}sample(t){let{min:e,max:i,colors:r}=this,s=jt.clamp(t,e,i),a=jt.mapLinear(s,e,i,0,r.length-1);return r[jt.clamp(Math.round(a),0,r.length-1)]}sampleOpacity(t){let{min:e,max:i,opacity:r}=this;if(!r)return 1;let s=jt.clamp(t,e,i),a=jt.mapLinear(s,e,i,0,r.length-1);return r[jt.clamp(Math.round(a),0,r.length-1)]}getTexture(){return(this._shouldRecreateTexture||this._cachedTexture==null)&&(this._cachedTexture?.dispose(),this._cachedTexture=Va.create1DTexture(this._colors,this._opacity??void 0),this._cachedTexture.minFilter=an,this._cachedTexture.magFilter=an,this._cachedTexture.wrapS=Pe,this._cachedTexture.wrapT=Pe,this._shouldRecreateTexture=!1),hn(this._cachedTexture)}clone(){return new n({colors:[...this.colors],min:this.min,max:this.max,mode:this._mode,opacities:this._opacity!=null?[...this._opacity]:void 0})}dispose(){this._cachedTexture?.dispose()}};var Lc=Ic;function cd(n){n("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),n("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),n("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");for(var t=1;t<=60;++t)n("EPSG:"+(32600+t),"+proj=utm +zone="+t+" +datum=WGS84 +units=m"),n("EPSG:"+(32700+t),"+proj=utm +zone="+t+" +south +datum=WGS84 +units=m");n("EPSG:5041","+title=WGS 84 / UPS North (E,N) +proj=stere +lat_0=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m"),n("EPSG:5042","+title=WGS 84 / UPS South (E,N) +proj=stere +lat_0=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m"),n.WGS84=n["EPSG:4326"],n["EPSG:3785"]=n["EPSG:3857"],n.GOOGLE=n["EPSG:3857"],n["EPSG:900913"]=n["EPSG:3857"],n["EPSG:102113"]=n["EPSG:3857"]}var Ie=1,Le=2,dn=3,hd=4,Zr=5,Nc=6378137,ud=6356752314e-3,Dc=.0066943799901413165,ri=484813681109536e-20,T=Math.PI/2,fd=.16666666666666666,dd=.04722222222222222,pd=.022156084656084655,D=1e-10,dt=.017453292519943295,Pt=57.29577951308232,st=Math.PI/4,Xn=Math.PI*2,vt=3.14159265359;var ie={};ie.greenwich=0;ie.lisbon=-9.131906111111;ie.paris=2.337229166667;ie.bogota=-74.080916666667;ie.madrid=-3.687938888889;ie.rome=12.452333333333;ie.bern=7.439583333333;ie.jakarta=106.807719444444;ie.ferro=-17.666666666667;ie.brussels=4.367975;ie.stockholm=18.058277777778;ie.athens=23.7163375;ie.oslo=10.722916666667;var md=ie;var gd={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var _d=/[\s_\-\/\(\)]/g;function pe(n,t){if(n[t])return n[t];for(var e=Object.keys(n),i=t.toLowerCase().replace(_d,""),r=-1,s,a;++r<e.length;)if(s=e[r],a=s.toLowerCase().replace(_d,""),a===i)return n[s]}function Jr(n){var t={},e=n.split("+").map(function(o){return o.trim()}).filter(function(o){return o}).reduce(function(o,l){var c=l.split("=");return c.push(!0),o[c[0].toLowerCase()]=c[1],o},{}),i,r,s,a={proj:function(o){t.projName=["lonlat","latlon","latlong"].includes(o)?"longlat":o},datum:"datumCode",rf:function(o){t.rf=parseFloat(o)},lat_0:function(o){t.lat0=o*dt},lat_1:function(o){t.lat1=o*dt},lat_2:function(o){t.lat2=o*dt},lat_ts:function(o){t.lat_ts=o*dt},lon_0:function(o){t.long0=o*dt},lon_wrap:function(o){t.long_wrap=parseFloat(o)*dt},lon_1:function(o){t.long1=o*dt},lon_2:function(o){t.long2=o*dt},alpha:function(o){t.alpha=parseFloat(o)*dt},gamma:function(o){t.rectified_grid_angle=parseFloat(o)*dt},lonc:function(o){t.longc=o*dt},x_0:function(o){t.x0=parseFloat(o)},y_0:function(o){t.y0=parseFloat(o)},k_0:function(o){t.k0=parseFloat(o)},k:function(o){t.k0=parseFloat(o)},a:function(o){t.a=parseFloat(o)},b:function(o){t.b=parseFloat(o)},r:function(o){t.a=t.b=parseFloat(o)},r_a:function(){t.R_A=!0},zone:function(o){t.zone=parseInt(o,10)},south:function(){t.utmSouth=!0},towgs84:function(o){t.datum_params=o.split(",").map(function(l){return parseFloat(l)})},to_meter:function(o){t.to_meter=parseFloat(o)},units:function(o){t.units=o;var l=pe(gd,o);l&&(t.to_meter=l.to_meter)},from_greenwich:function(o){t.from_greenwich=o*dt},pm:function(o){var l=pe(md,o);t.from_greenwich=(l||parseFloat(o))*dt},nadgrids:function(o){o==="@null"?t.datumCode="none":t.nadgrids=o},axis:function(o){var l="ewnsud";o.length===3&&l.indexOf(o.substr(0,1))!==-1&&l.indexOf(o.substr(1,1))!==-1&&l.indexOf(o.substr(2,1))!==-1&&(t.axis=o)},approx:function(){t.approx=!0},over:function(){t.over=!0}};for(i in e)r=e[i],i in a?(s=a[i],typeof s=="function"?s(r):t[s]=r):t[i]=r;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t.projStr=n,t}var Uc=class{static getId(t){let e=t.find(i=>Array.isArray(i)&&i[0]==="ID");return e&&e.length>=3?{authority:e[1],code:parseInt(e[2],10)}:null}static convertUnit(t,e="unit"){if(!t||t.length<3)return{type:e,name:"unknown",conversion_factor:null};let i=t[1],r=parseFloat(t[2])||null,s=t.find(o=>Array.isArray(o)&&o[0]==="ID"),a=s?{authority:s[1],code:parseInt(s[2],10)}:null;return{type:e,name:i,conversion_factor:r,id:a}}static convertAxis(t){let e=t[1]||"Unknown",i,r=e.match(/^\((.)\)$/);if(r){let c=r[1].toUpperCase();if(c==="E")i="east";else if(c==="N")i="north";else if(c==="U")i="up";else if(t[2])i=t[2];else throw new Error(`Unknown axis abbreviation: ${c}`)}else i=t[2]||"unknown";let s=t.find(c=>Array.isArray(c)&&c[0]==="ORDER"),a=s?parseInt(s[1],10):null,o=t.find(c=>Array.isArray(c)&&(c[0]==="LENGTHUNIT"||c[0]==="ANGLEUNIT"||c[0]==="SCALEUNIT")),l=this.convertUnit(o);return{name:e,direction:i,unit:l,order:a}}static extractAxes(t){return t.filter(e=>Array.isArray(e)&&e[0]==="AXIS").map(e=>this.convertAxis(e)).sort((e,i)=>(e.order||0)-(i.order||0))}static convert(t,e={}){switch(t[0]){case"PROJCRS":e.type="ProjectedCRS",e.name=t[1],e.base_crs=t.find(d=>Array.isArray(d)&&d[0]==="BASEGEOGCRS")?this.convert(t.find(d=>Array.isArray(d)&&d[0]==="BASEGEOGCRS")):null,e.conversion=t.find(d=>Array.isArray(d)&&d[0]==="CONVERSION")?this.convert(t.find(d=>Array.isArray(d)&&d[0]==="CONVERSION")):null;let i=t.find(d=>Array.isArray(d)&&d[0]==="CS");i&&(e.coordinate_system={type:i[1],axis:this.extractAxes(t)});let r=t.find(d=>Array.isArray(d)&&d[0]==="LENGTHUNIT");if(r){let d=this.convertUnit(r);e.coordinate_system.unit=d}e.id=this.getId(t);break;case"BASEGEOGCRS":case"GEOGCRS":case"GEODCRS":e.type=t[0]==="GEODCRS"?"GeodeticCRS":"GeographicCRS",e.name=t[1];let s=t.find(d=>Array.isArray(d)&&(d[0]==="DATUM"||d[0]==="ENSEMBLE"));if(s){let d=this.convert(s);s[0]==="ENSEMBLE"?e.datum_ensemble=d:e.datum=d;let g=t.find(y=>Array.isArray(y)&&y[0]==="PRIMEM");g&&g[1]!=="Greenwich"&&(d.prime_meridian={name:g[1],longitude:parseFloat(g[2])})}e.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(t)},e.id=this.getId(t);break;case"DATUM":e.type="GeodeticReferenceFrame",e.name=t[1],e.ellipsoid=t.find(d=>Array.isArray(d)&&d[0]==="ELLIPSOID")?this.convert(t.find(d=>Array.isArray(d)&&d[0]==="ELLIPSOID")):null;break;case"ENSEMBLE":e.type="DatumEnsemble",e.name=t[1],e.members=t.filter(d=>Array.isArray(d)&&d[0]==="MEMBER").map(d=>({type:"DatumEnsembleMember",name:d[1],id:this.getId(d)}));let a=t.find(d=>Array.isArray(d)&&d[0]==="ENSEMBLEACCURACY");a&&(e.accuracy=parseFloat(a[1]));let o=t.find(d=>Array.isArray(d)&&d[0]==="ELLIPSOID");o&&(e.ellipsoid=this.convert(o)),e.id=this.getId(t);break;case"ELLIPSOID":e.type="Ellipsoid",e.name=t[1],e.semi_major_axis=parseFloat(t[2]),e.inverse_flattening=parseFloat(t[3]);let l=t.find(d=>Array.isArray(d)&&d[0]==="LENGTHUNIT")?this.convert(t.find(d=>Array.isArray(d)&&d[0]==="LENGTHUNIT"),e):null;break;case"CONVERSION":e.type="Conversion",e.name=t[1],e.method=t.find(d=>Array.isArray(d)&&d[0]==="METHOD")?this.convert(t.find(d=>Array.isArray(d)&&d[0]==="METHOD")):null,e.parameters=t.filter(d=>Array.isArray(d)&&d[0]==="PARAMETER").map(d=>this.convert(d));break;case"METHOD":e.type="Method",e.name=t[1],e.id=this.getId(t);break;case"PARAMETER":e.type="Parameter",e.name=t[1],e.value=parseFloat(t[2]),e.unit=this.convertUnit(t.find(d=>Array.isArray(d)&&(d[0]==="LENGTHUNIT"||d[0]==="ANGLEUNIT"||d[0]==="SCALEUNIT"))),e.id=this.getId(t);break;case"BOUNDCRS":e.type="BoundCRS";let c=t.find(d=>Array.isArray(d)&&d[0]==="SOURCECRS");if(c){let d=c.find(g=>Array.isArray(g));e.source_crs=d?this.convert(d):null}let h=t.find(d=>Array.isArray(d)&&d[0]==="TARGETCRS");if(h){let d=h.find(g=>Array.isArray(g));e.target_crs=d?this.convert(d):null}let u=t.find(d=>Array.isArray(d)&&d[0]==="ABRIDGEDTRANSFORMATION");u?e.transformation=this.convert(u):e.transformation=null;break;case"ABRIDGEDTRANSFORMATION":if(e.type="Transformation",e.name=t[1],e.method=t.find(d=>Array.isArray(d)&&d[0]==="METHOD")?this.convert(t.find(d=>Array.isArray(d)&&d[0]==="METHOD")):null,e.parameters=t.filter(d=>Array.isArray(d)&&(d[0]==="PARAMETER"||d[0]==="PARAMETERFILE")).map(d=>{if(d[0]==="PARAMETER")return this.convert(d);if(d[0]==="PARAMETERFILE")return{name:d[1],value:d[2],id:{authority:"EPSG",code:8656}}}),e.parameters.length===7){let d=e.parameters[6];d.name==="Scale difference"&&(d.value=Math.round((d.value-1)*1e12)/1e6)}e.id=this.getId(t);break;case"AXIS":e.coordinate_system||(e.coordinate_system={type:"unspecified",axis:[]}),e.coordinate_system.axis.push(this.convertAxis(t));break;case"LENGTHUNIT":let m=this.convertUnit(t,"LinearUnit");e.coordinate_system&&e.coordinate_system.axis&&e.coordinate_system.axis.forEach(d=>{d.unit||(d.unit=m)}),m.conversion_factor&&m.conversion_factor!==1&&e.semi_major_axis&&(e.semi_major_axis={value:e.semi_major_axis,unit:m});break;default:e.keyword=t[0];break}return e}},Xa=Uc;var Fc=class extends Xa{static convert(t,e={}){return super.convert(t,e),e.coordinate_system&&e.coordinate_system.subtype==="Cartesian"&&delete e.coordinate_system,e.usage&&delete e.usage,e}},yd=Fc;var Oc=class extends Xa{static convert(t,e={}){super.convert(t,e);let i=t.find(s=>Array.isArray(s)&&s[0]==="CS");i&&(e.coordinate_system={subtype:i[1],axis:this.extractAxes(t)});let r=t.find(s=>Array.isArray(s)&&s[0]==="USAGE");if(r){let s=r.find(l=>Array.isArray(l)&&l[0]==="SCOPE"),a=r.find(l=>Array.isArray(l)&&l[0]==="AREA"),o=r.find(l=>Array.isArray(l)&&l[0]==="BBOX");e.usage={},s&&(e.usage.scope=s[1]),a&&(e.usage.area=a[1]),o&&(e.usage.bbox=o.slice(1))}return e}},vd=Oc;function HM(n){return n.find(t=>Array.isArray(t)&&t[0]==="USAGE")?"2019":(n.find(t=>Array.isArray(t)&&t[0]==="CS")||n[0]==="BOUNDCRS"||n[0]==="PROJCRS"||n[0]==="GEOGCRS","2015")}function xd(n){return(HM(n)==="2019"?vd:yd).convert(n)}function Md(n){let t=n.toUpperCase();return t.includes("PROJCRS")||t.includes("GEOGCRS")||t.includes("BOUNDCRS")||t.includes("VERTCRS")||t.includes("LENGTHUNIT")||t.includes("ANGLEUNIT")||t.includes("SCALEUNIT")?"WKT2":(t.includes("PROJCS")||t.includes("GEOGCS")||t.includes("LOCAL_CS")||t.includes("VERT_CS")||t.includes("UNIT"),"WKT1")}var Sd=YM,$r=1,bd=2,wd=3,qa=4,Ed=5,Bc=-1,WM=/\s/,XM=/[A-Za-z]/,qM=/[A-Za-z84_]/,Ya=/[,\]]/,Td=/[\d\.E\-\+]/;function pn(n){if(typeof n!="string")throw new Error("not a string");this.text=n.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=$r}pn.prototype.readCharicter=function(){var n=this.text[this.place++];if(this.state!==qa)for(;WM.test(n);){if(this.place>=this.text.length)return;n=this.text[this.place++]}switch(this.state){case $r:return this.neutral(n);case bd:return this.keyword(n);case qa:return this.quoted(n);case Ed:return this.afterquote(n);case wd:return this.number(n);case Bc:return}};pn.prototype.afterquote=function(n){if(n==='"'){this.word+='"',this.state=qa;return}if(Ya.test(n)){this.word=this.word.trim(),this.afterItem(n);return}throw new Error(`havn't handled "`+n+'" in afterquote yet, index '+this.place)};pn.prototype.afterItem=function(n){if(n===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=$r;return}if(n==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=$r,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Bc);return}};pn.prototype.number=function(n){if(Td.test(n)){this.word+=n;return}if(Ya.test(n)){this.word=parseFloat(this.word),this.afterItem(n);return}throw new Error(`havn't handled "`+n+'" in number yet, index '+this.place)};pn.prototype.quoted=function(n){if(n==='"'){this.state=Ed;return}this.word+=n};pn.prototype.keyword=function(n){if(qM.test(n)){this.word+=n;return}if(n==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=$r;return}if(Ya.test(n)){this.afterItem(n);return}throw new Error(`havn't handled "`+n+'" in keyword yet, index '+this.place)};pn.prototype.neutral=function(n){if(XM.test(n)){this.word=n,this.state=bd;return}if(n==='"'){this.word="",this.state=qa;return}if(Td.test(n)){this.word=n,this.state=wd;return}if(Ya.test(n)){this.afterItem(n);return}throw new Error(`havn't handled "`+n+'" in neutral yet, index '+this.place)};pn.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Bc)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function YM(n){var t=new pn(n);return t.output()}function Gc(n,t,e){Array.isArray(t)&&(e.unshift(t),t=null);var i=t?{}:n,r=e.reduce(function(s,a){return si(a,s),s},i);t&&(n[t]=r)}function si(n,t){if(!Array.isArray(n)){t[n]=!0;return}var e=n.shift();if(e==="PARAMETER"&&(e=n.shift()),n.length===1){if(Array.isArray(n[0])){t[e]={},si(n[0],t[e]);return}t[e]=n[0];return}if(!n.length){t[e]=!0;return}if(e==="TOWGS84"){t[e]=n;return}if(e==="AXIS"){e in t||(t[e]=[]),t[e].push(n);return}Array.isArray(e)||(t[e]={});var i;switch(e){case"UNIT":case"PRIMEM":case"VERT_DATUM":t[e]={name:n[0].toLowerCase(),convert:n[1]},n.length===3&&si(n[2],t[e]);return;case"SPHEROID":case"ELLIPSOID":t[e]={name:n[0],a:n[1],rf:n[2]},n.length===4&&si(n[3],t[e]);return;case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":n[0]=["name",n[0]],Gc(t,e,n);return;case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":n[0]=["name",n[0]],Gc(t,e,n),t[e].type=e;return;default:for(i=-1;++i<n.length;)if(!Array.isArray(n[i]))return si(n,t[e]);return Gc(t,e,n)}}var jM=.017453292519943295;function me(n){return n*jM}function ja(n){let t=(n.projName||"").toLowerCase().replace(/_/g," ");n.long0===void 0&&n.longc!==void 0&&(n.long0=n.longc),!n.lat_ts&&n.lat1&&(t==="stereographic south pole"||t==="polar stereographic (variant b)")?(n.lat0=me(n.lat1>0?90:-90),n.lat_ts=n.lat1,delete n.lat1):!n.lat_ts&&n.lat0&&(t==="polar stereographic"||t==="polar stereographic (variant a)")&&(n.lat_ts=n.lat0,n.lat0=me(n.lat0>0?90:-90),delete n.lat1)}function Ad(n){let t={units:null,to_meter:void 0};return typeof n=="string"?(t.units=n.toLowerCase(),t.units==="metre"&&(t.units="meter"),t.units==="meter"&&(t.to_meter=1)):n&&n.name&&(t.units=n.name.toLowerCase(),t.units==="metre"&&(t.units="meter"),t.to_meter=n.conversion_factor),t}function Cd(n){return typeof n=="object"?n.value*n.unit.conversion_factor:n}function Pd(n,t){n.ellipsoid.radius?(t.a=n.ellipsoid.radius,t.rf=0):(t.a=Cd(n.ellipsoid.semi_major_axis),n.ellipsoid.inverse_flattening!==void 0?t.rf=n.ellipsoid.inverse_flattening:n.ellipsoid.semi_major_axis!==void 0&&n.ellipsoid.semi_minor_axis!==void 0&&(t.rf=t.a/(t.a-Cd(n.ellipsoid.semi_minor_axis))))}function Kr(n,t={}){return!n||typeof n!="object"?n:n.type==="BoundCRS"?(Kr(n.source_crs,t),n.transformation&&(n.transformation.method&&n.transformation.method.name==="NTv2"?t.nadgrids=n.transformation.parameters[0].value:t.datum_params=n.transformation.parameters.map(e=>e.value)),t):(Object.keys(n).forEach(e=>{let i=n[e];if(i!==null)switch(e){case"name":if(t.srsCode)break;t.name=i,t.srsCode=i;break;case"type":i==="GeographicCRS"?t.projName="longlat":i==="GeodeticCRS"?n.coordinate_system&&n.coordinate_system.subtype==="Cartesian"?t.projName="geocent":t.projName="longlat":i==="ProjectedCRS"&&n.conversion&&n.conversion.method&&(t.projName=n.conversion.method.name);break;case"datum":case"datum_ensemble":i.ellipsoid&&(t.ellps=i.ellipsoid.name,Pd(i,t)),i.prime_meridian&&(t.from_greenwich=i.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":t.ellps=i.name,Pd(i,t);break;case"prime_meridian":t.long0=(i.longitude||0)*Math.PI/180;break;case"coordinate_system":if(i.axis){let r={east:"e",north:"n",west:"w",south:"s",up:"u",down:"d",geocentricx:"e",geocentricy:"n",geocentricz:"u"},s=i.axis.map(a=>r[a.direction.toLowerCase()]);if(s.every(Boolean)&&(t.axis=s.join(""),t.axis.length===2&&(t.axis+="u")),i.unit){let{units:a,to_meter:o}=Ad(i.unit);t.units=a,t.to_meter=o}else if(i.axis[0]&&i.axis[0].unit){let{units:a,to_meter:o}=Ad(i.axis[0].unit);t.units=a,t.to_meter=o}}break;case"id":i.authority&&i.code&&(t.title=i.authority+":"+i.code);break;case"conversion":i.method&&i.method.name&&(t.projName=i.method.name),i.parameters&&i.parameters.forEach(r=>{let s=r.name.toLowerCase().replace(/\s+/g,"_"),a=r.value;r.unit&&r.unit.conversion_factor?t[s]=a*r.unit.conversion_factor:r.unit==="degree"?t[s]=a*Math.PI/180:t[s]=a});break;case"unit":i.name&&(t.units=i.name.toLowerCase(),t.units==="metre"&&(t.units="meter")),i.conversion_factor&&(t.to_meter=i.conversion_factor);break;case"base_crs":Kr(i,t),t.datumCode=i.id?i.id.authority+"_"+i.id.code:i.name;break;default:break}}),t.latitude_of_false_origin!==void 0&&(t.lat0=t.latitude_of_false_origin),t.longitude_of_false_origin!==void 0&&(t.long0=t.longitude_of_false_origin),t.latitude_of_standard_parallel!==void 0&&(t.lat0=t.latitude_of_standard_parallel,t.lat1=t.latitude_of_standard_parallel),t.latitude_of_1st_standard_parallel!==void 0&&(t.lat1=t.latitude_of_1st_standard_parallel),t.latitude_of_2nd_standard_parallel!==void 0&&(t.lat2=t.latitude_of_2nd_standard_parallel),t.latitude_of_projection_centre!==void 0&&(t.lat0=t.latitude_of_projection_centre),t.longitude_of_projection_centre!==void 0&&(t.longc=t.longitude_of_projection_centre),t.easting_at_false_origin!==void 0&&(t.x0=t.easting_at_false_origin),t.northing_at_false_origin!==void 0&&(t.y0=t.northing_at_false_origin),t.latitude_of_natural_origin!==void 0&&(t.lat0=t.latitude_of_natural_origin),t.longitude_of_natural_origin!==void 0&&(t.long0=t.longitude_of_natural_origin),t.longitude_of_origin!==void 0&&(t.long0=t.longitude_of_origin),t.false_easting!==void 0&&(t.x0=t.false_easting),t.easting_at_projection_centre&&(t.x0=t.easting_at_projection_centre),t.false_northing!==void 0&&(t.y0=t.false_northing),t.northing_at_projection_centre&&(t.y0=t.northing_at_projection_centre),t.standard_parallel_1!==void 0&&(t.lat1=t.standard_parallel_1),t.standard_parallel_2!==void 0&&(t.lat2=t.standard_parallel_2),t.scale_factor_at_natural_origin!==void 0&&(t.k0=t.scale_factor_at_natural_origin),t.scale_factor_at_projection_centre!==void 0&&(t.k0=t.scale_factor_at_projection_centre),t.scale_factor_on_pseudo_standard_parallel!==void 0&&(t.k0=t.scale_factor_on_pseudo_standard_parallel),t.azimuth!==void 0&&(t.alpha=t.azimuth),t.azimuth_at_projection_centre!==void 0&&(t.alpha=t.azimuth_at_projection_centre),t.angle_from_rectified_to_skew_grid&&(t.rectified_grid_angle=t.angle_from_rectified_to_skew_grid),ja(t),t)}var ZM=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function JM(n,t){var e=t[0],i=t[1];!(e in n)&&i in n&&(n[e]=n[i],t.length===3&&(n[e]=t[2](n[e])))}function Rd(n){for(var t=Object.keys(n),e=0,i=t.length;e<i;++e){var r=t[e];ZM.indexOf(r)!==-1&&$M(n[r]),typeof n[r]=="object"&&Rd(n[r])}}function $M(n){if(n.AUTHORITY){var t=Object.keys(n.AUTHORITY)[0];t&&t in n.AUTHORITY&&(n.title=t+":"+n.AUTHORITY[t])}if(n.type==="GEOGCS"?n.projName="longlat":n.type==="LOCAL_CS"?(n.projName="identity",n.local=!0):typeof n.PROJECTION=="object"?n.projName=Object.keys(n.PROJECTION)[0]:n.projName=n.PROJECTION,n.AXIS){for(var e="",i=0,r=n.AXIS.length;i<r;++i){var s=[n.AXIS[i][0].toLowerCase(),n.AXIS[i][1].toLowerCase()];s[0].indexOf("north")!==-1||(s[0]==="y"||s[0]==="lat")&&s[1]==="north"?e+="n":s[0].indexOf("south")!==-1||(s[0]==="y"||s[0]==="lat")&&s[1]==="south"?e+="s":s[0].indexOf("east")!==-1||(s[0]==="x"||s[0]==="lon")&&s[1]==="east"?e+="e":(s[0].indexOf("west")!==-1||(s[0]==="x"||s[0]==="lon")&&s[1]==="west")&&(e+="w")}e.length===2&&(e+="u"),e.length===3&&(n.axis=e)}n.UNIT&&(n.units=n.UNIT.name.toLowerCase(),n.units==="metre"&&(n.units="meter"),n.UNIT.convert&&(n.type==="GEOGCS"?n.DATUM&&n.DATUM.SPHEROID&&(n.to_meter=n.UNIT.convert*n.DATUM.SPHEROID.a):n.to_meter=n.UNIT.convert));var a=n.GEOGCS;n.type==="GEOGCS"&&(a=n),a&&(a.PRIMEM&&a.PRIMEM.convert&&(n.from_greenwich=me(a.PRIMEM.convert)),a.DATUM?n.datumCode=a.DATUM.name.toLowerCase():n.datumCode=a.name.toLowerCase(),n.datumCode.slice(0,2)==="d_"&&(n.datumCode=n.datumCode.slice(2)),n.datumCode==="new_zealand_1949"&&(n.datumCode="nzgd49"),(n.datumCode==="wgs_1984"||n.datumCode==="world_geodetic_system_1984")&&(n.PROJECTION==="Mercator_Auxiliary_Sphere"&&(n.sphere=!0),n.datumCode="wgs84"),n.datumCode==="belge_1972"&&(n.datumCode="rnb72"),a.DATUM&&a.DATUM.SPHEROID&&(n.ellps=a.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),n.ellps.toLowerCase().slice(0,13)==="international"&&(n.ellps="intl"),n.a=a.DATUM.SPHEROID.a,n.rf=parseFloat(a.DATUM.SPHEROID.rf)),a.DATUM&&a.DATUM.TOWGS84&&(n.datum_params=a.DATUM.TOWGS84),~n.datumCode.indexOf("osgb_1936")&&(n.datumCode="osgb36"),~n.datumCode.indexOf("osni_1952")&&(n.datumCode="osni52"),(~n.datumCode.indexOf("tm65")||~n.datumCode.indexOf("geodetic_datum_of_1965"))&&(n.datumCode="ire65"),n.datumCode==="ch1903+"&&(n.datumCode="ch1903"),~n.datumCode.indexOf("israel")&&(n.datumCode="isr93")),n.b&&!isFinite(n.b)&&(n.b=n.a),n.rectified_grid_angle&&(n.rectified_grid_angle=me(n.rectified_grid_angle));function o(h){var u=n.to_meter||1;return h*u}var l=function(h){return JM(n,h)},c=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",me],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",me],["x0","false_easting",o],["y0","false_northing",o],["long0","central_meridian",me],["lat0","latitude_of_origin",me],["lat0","standard_parallel_1",me],["lat1","standard_parallel_1",me],["lat2","standard_parallel_2",me],["azimuth","Azimuth"],["alpha","azimuth",me],["srsCode","name"]];c.forEach(l),ja(n)}function qn(n){if(typeof n=="object")return Kr(n);let t=Md(n);var e=Sd(n);if(t==="WKT2"){let s=xd(e);return Kr(s)}var i=e[0],r={};return si(e,r),Rd(r),r[i]}function re(n){var t=this;if(arguments.length===2){var e=arguments[1];typeof e=="string"?e.charAt(0)==="+"?re[n]=Jr(arguments[1]):re[n]=qn(arguments[1]):e&&typeof e=="object"&&!("projName"in e)?re[n]=qn(arguments[1]):(re[n]=e,e||delete re[n])}else if(arguments.length===1){if(Array.isArray(n))return n.map(function(i){return Array.isArray(i)?re.apply(t,i):re(i)});if(typeof n=="string"){if(n in re)return re[n]}else"EPSG"in n?re["EPSG:"+n.EPSG]=n:"ESRI"in n?re["ESRI:"+n.ESRI]=n:"IAU2000"in n?re["IAU2000:"+n.IAU2000]=n:console.log(n);return}}cd(re);var qi=re;function KM(n){return typeof n=="string"}function QM(n){return n in qi}function tS(n){return n.indexOf("+")!==0&&n.indexOf("[")!==-1||typeof n=="object"&&!("srsCode"in n)}var Id=["3857","900913","3785","102113"];function eS(n){if(n.title)return n.title.toLowerCase().indexOf("epsg:")===0&&Id.indexOf(n.title.substr(5))>-1;var t=pe(n,"authority");if(t){var e=pe(t,"epsg");return e&&Id.indexOf(e)>-1}}function nS(n){var t=pe(n,"extension");if(t)return pe(t,"proj4")}function iS(n){return n[0]==="+"}function rS(n){let t;if(KM(n))if(QM(n))t=qi[n];else if(tS(n)){t=qn(n);var e=nS(t);e&&(t=Jr(e))}else iS(n)&&(t=Jr(n));else"projName"in n?t=n:t=qn(n);return t&&eS(t)?qi["EPSG:3857"]:t}var Za=rS;function zc(n,t){n=n||{};var e,i;if(!t)return n;for(i in t)e=t[i],e!==void 0&&(n[i]=e);return n}function Wt(n,t,e){var i=n*t;return e/Math.sqrt(1-i*i)}function qe(n){return n<0?-1:1}function N(n,t){return t||Math.abs(n)<=vt?n:n-qe(n)*Xn}function Jt(n,t,e){var i=n*e,r=.5*n;return i=Math.pow((1-i)/(1+i),r),Math.tan(.5*(T-t))/i}function mn(n,t){for(var e=.5*n,i,r,s=T-2*Math.atan(t),a=0;a<=15;a++)if(i=n*Math.sin(s),r=T-2*Math.atan(t*Math.pow((1-i)/(1+i),e))-s,s+=r,Math.abs(r)<=1e-10)return s;return-9999}function sS(){var n=this.b/this.a;this.es=1-n*n,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.long0=this.long0||0,this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=Wt(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function aS(n){var t=n.x,e=n.y;if(e*Pt>90&&e*Pt<-90&&t*Pt>180&&t*Pt<-180)return null;var i,r;if(Math.abs(Math.abs(e)-T)<=D)return null;if(this.sphere)i=this.x0+this.a*this.k0*N(t-this.long0,this.over),r=this.y0+this.a*this.k0*Math.log(Math.tan(st+.5*e));else{var s=Math.sin(e),a=Jt(this.e,e,s);i=this.x0+this.a*this.k0*N(t-this.long0,this.over),r=this.y0-this.a*this.k0*Math.log(a)}return n.x=i,n.y=r,n}function oS(n){var t=n.x-this.x0,e=n.y-this.y0,i,r;if(this.sphere)r=T-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var s=Math.exp(-e/(this.a*this.k0));if(r=mn(this.e,s),r===-9999)return null}return i=N(this.long0+t/(this.a*this.k0),this.over),n.x=i,n.y=r,n}var lS=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"],Ld={init:sS,forward:aS,inverse:oS,names:lS};function cS(){}function Nd(n){return n}var kc=["longlat","identity","lonlat","latlon","latlong"],Dd={init:cS,forward:Nd,inverse:Nd,names:kc};var hS=[Ld,Dd],ai={},Yi=[];function Ud(n,t){var e=Yi.length;return n.names?(Yi[e]=n,n.names.forEach(function(i){ai[i.toLowerCase()]=e}),this):(console.log(t),!0)}function Vc(n){return n.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}function uS(n){if(!n)return!1;var t=n.toLowerCase();if(typeof ai[t]<"u"&&Yi[ai[t]]||(t=Vc(t),t in ai&&Yi[ai[t]]))return Yi[ai[t]]}function fS(){hS.forEach(Ud)}var Fd={start:fS,add:Ud,get:uS};var dS={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},andrae:{a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},clrk80:{a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},plessis:{a:6376523,b:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}},Hc=dS;var pS=Hc.WGS84;function Od(n,t,e,i){var r=n*n,s=t*t,a=(r-s)/r,o=0;i?(n*=1-a*(fd+a*(dd+a*pd)),r=n*n,a=0):o=Math.sqrt(a);var l=(r-s)/s;return{es:a,e:o,ep2:l}}function Bd(n,t,e,i,r){if(!n){var s=pe(Hc,i);s||(s=pS),n=s.a,t=s.b,e=s.rf}return e&&!t&&(t=(1-1/e)*n),(e===0||Math.abs(n-t)<D)&&(r=!0,t=n),{a:n,b:t,rf:e,sphere:r}}var $a={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clrk80ign",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.005693,-0.044698,0.044285,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-0.395026,0.330772,-1.876073,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243648,-1.158828,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,6.681627,-31.611492,-19.848161,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-0.008393,0.000749,-0.010276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,0.02579,0.00965,0.01166,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"0.06155,-0.01087,-0.04019,0.039492,0.032722,0.032898,-0.009994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.309248,0.324822,0.497299,5.689063"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"372.87,149.23,585.29"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"},EPSG_10328:{towgs84:"0,0,0"},EPSG_9782:{towgs84:"0,0,0"},EPSG_9777:{towgs84:"0,0,0"},EPSG_10690:{towgs84:"0,0,0"},EPSG_10639:{towgs84:"0,0,0"},EPSG_10739:{towgs84:"0,0,0"},EPSG_7686:{towgs84:"0,0,0"},EPSG_8900:{towgs84:"0,0,0"},EPSG_5886:{towgs84:"0,0,0"},EPSG_7683:{towgs84:"0,0,0"},EPSG_6668:{towgs84:"0,0,0"},EPSG_20046:{towgs84:"0,0,0"},EPSG_10299:{towgs84:"0,0,0"},EPSG_10310:{towgs84:"0,0,0"},EPSG_10475:{towgs84:"0,0,0"},EPSG_4742:{towgs84:"0,0,0"},EPSG_10671:{towgs84:"0,0,0"},EPSG_10762:{towgs84:"0,0,0"},EPSG_10725:{towgs84:"0,0,0"},EPSG_10791:{towgs84:"0,0,0"},EPSG_10800:{towgs84:"0,0,0"},EPSG_10305:{towgs84:"0,0,0"},EPSG_10941:{towgs84:"0,0,0"},EPSG_10968:{towgs84:"0,0,0"},EPSG_10875:{towgs84:"0,0,0"},EPSG_6318:{towgs84:"0,0,0"},EPSG_10910:{towgs84:"0,0,0"}};for(Gd in $a)Ja=$a[Gd],Ja.datumName&&($a[Ja.datumName]=Ja);var Ja,Gd,zd=$a;function mS(n,t,e,i,r,s,a){var o={};return o.datum_type=Zr,t&&(o.datum_type=hd,o.datum_params=t.map(parseFloat),(o.datum_params[0]!==0||o.datum_params[1]!==0||o.datum_params[2]!==0)&&(o.datum_type=Ie),o.datum_params.length>3&&(o.datum_params[3]!==0||o.datum_params[4]!==0||o.datum_params[5]!==0||o.datum_params[6]!==0)&&(o.datum_type=Le,o.datum_params[3]*=ri,o.datum_params[4]*=ri,o.datum_params[5]*=ri,o.datum_params[6]=o.datum_params[6]/1e6+1)),a&&(o.datum_type=dn,o.grids=a),o.a=e,o.b=i,o.es=r,o.ep2=s,o}var kd=mS;var Xc={};function qc(n,t,e){return t instanceof ArrayBuffer?gS(n,t,e):{ready:_S(n,t)}}function gS(n,t,e){var i=!0;e!==void 0&&e.includeErrorFields===!1&&(i=!1);var r=new DataView(t),s=vS(r),a=xS(r,s),o=MS(r,a,s,i),l={header:a,subgrids:o};return Xc[n]=l,l}async function _S(n,t){for(var e=[],i=await t.getImageCount(),r=i-1;r>=0;r--){var s=await t.getImage(r),a=await s.readRasters(),o=a,l=[s.getWidth(),s.getHeight()],c=s.getBoundingBox().map(Vd),h=typeof s.fileDirectory.getValue=="function"?s.fileDirectory.getValue("ModelPixelScale"):s.fileDirectory.ModelPixelScale,u=[h[0],h[1]].map(Vd),m=c[0]+(l[0]-1)*u[0],d=c[3]-(l[1]-1)*u[1],g=o[0],y=o[1],v=[];for(let I=l[1]-1;I>=0;I--)for(let U=l[0]-1;U>=0;U--){var S=I*l[0]+U;v.push([-Yn(y[S]),Yn(g[S])])}e.push({del:u,lim:l,ll:[-m,d],cvs:v})}var w={header:{nSubgrids:i},subgrids:e};return Xc[n]=w,w}function Hd(n){if(n===void 0)return null;var t=n.split(",");return t.map(yS)}function yS(n){if(n.length===0)return null;var t=n[0]==="@";return t&&(n=n.slice(1)),n==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:n,mandatory:!t,grid:Xc[n]||null,isNull:!1}}function Vd(n){return n*Math.PI/180}function Yn(n){return n/3600*Math.PI/180}function vS(n){var t=n.getInt32(8,!1);return t===11?!1:(t=n.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function xS(n,t){return{nFields:n.getInt32(8,t),nSubgridFields:n.getInt32(24,t),nSubgrids:n.getInt32(40,t),shiftType:Wc(n,56,64).trim(),fromSemiMajorAxis:n.getFloat64(120,t),fromSemiMinorAxis:n.getFloat64(136,t),toSemiMajorAxis:n.getFloat64(152,t),toSemiMinorAxis:n.getFloat64(168,t)}}function Wc(n,t,e){return String.fromCharCode.apply(null,new Uint8Array(n.buffer.slice(t,e)))}function MS(n,t,e,i){for(var r=176,s=[],a=0;a<t.nSubgrids;a++){var o=bS(n,r,e),l=wS(n,r,o,e,i),c=Math.round(1+(o.upperLongitude-o.lowerLongitude)/o.longitudeInterval),h=Math.round(1+(o.upperLatitude-o.lowerLatitude)/o.latitudeInterval);s.push({ll:[Yn(o.lowerLongitude),Yn(o.lowerLatitude)],del:[Yn(o.longitudeInterval),Yn(o.latitudeInterval)],lim:[c,h],count:o.gridNodeCount,cvs:SS(l)});var u=16;i===!1&&(u=8),r+=176+o.gridNodeCount*u}return s}function SS(n){return n.map(function(t){return[Yn(t.longitudeShift),Yn(t.latitudeShift)]})}function bS(n,t,e){return{name:Wc(n,t+8,t+16).trim(),parent:Wc(n,t+24,t+24+8).trim(),lowerLatitude:n.getFloat64(t+72,e),upperLatitude:n.getFloat64(t+88,e),lowerLongitude:n.getFloat64(t+104,e),upperLongitude:n.getFloat64(t+120,e),latitudeInterval:n.getFloat64(t+136,e),longitudeInterval:n.getFloat64(t+152,e),gridNodeCount:n.getInt32(t+168,e)}}function wS(n,t,e,i,r){var s=t+176,a=16;r===!1&&(a=8);for(var o=[],l=0;l<e.gridNodeCount;l++){var c={latitudeShift:n.getFloat32(s+l*a,i),longitudeShift:n.getFloat32(s+l*a+4,i)};r!==!1&&(c.latitudeAccuracy=n.getFloat32(s+l*a+8,i),c.longitudeAccuracy=n.getFloat32(s+l*a+12,i)),o.push(c)}return o}function ji(n,t){if(!(this instanceof ji))return new ji(n);this.forward=null,this.inverse=null,this.init=null,this.name,this.axis,this.names=null,this.title,t=t||function(c){if(c)throw c};var e=Za(n);if(typeof e!="object"){t("Could not parse to valid json: "+n);return}var i=ji.projections.get(e.projName);if(!i){t("Could not get projection name from: "+n);return}if(e.datumCode&&e.datumCode!=="none"){var r=pe(zd,e.datumCode);r&&(e.datum_params=e.datum_params||(r.towgs84?r.towgs84.split(","):null),e.ellps=r.ellipse,e.datumName=r.datumName?r.datumName:e.datumCode)}e.axis=e.axis||"enu",e.ellps=e.ellps||"wgs84",e.lat1=e.lat1||e.lat0;var s=Bd(e.a,e.b,e.rf,e.ellps,e.sphere),a=Od(s.a,s.b,s.rf,e.R_A),o=Hd(e.nadgrids),l=e.datum||kd(e.datumCode,e.datum_params,s.a,s.b,a.es,a.ep2,o);zc(this,e),zc(this,i),this.a=s.a,this.b=s.b,this.rf=s.rf,this.sphere=s.sphere,this.es=a.es,this.e=a.e,this.ep2=a.ep2,this.datum=l,"init"in this&&typeof this.init=="function"&&this.init(),this.k0||(this.k0=1),t(null,this)}ji.projections=Fd;ji.projections.start();var Ne=ji;function Wd(n,t){return n.datum_type!==t.datum_type||n.a!==t.a||Math.abs(n.es-t.es)>5e-11?!1:n.datum_type===Ie?n.datum_params[0]===t.datum_params[0]&&n.datum_params[1]===t.datum_params[1]&&n.datum_params[2]===t.datum_params[2]:n.datum_type===Le?n.datum_params[0]===t.datum_params[0]&&n.datum_params[1]===t.datum_params[1]&&n.datum_params[2]===t.datum_params[2]&&n.datum_params[3]===t.datum_params[3]&&n.datum_params[4]===t.datum_params[4]&&n.datum_params[5]===t.datum_params[5]&&n.datum_params[6]===t.datum_params[6]:!0}function Ka(n,t,e){var i=n.x,r=n.y,s=n.z?n.z:0,a,o,l,c;if(r<-T&&r>-1.001*T)r=-T;else if(r>T&&r<1.001*T)r=T;else{if(r<-T)return{x:-1/0,y:-1/0,z:n.z};if(r>T)return{x:1/0,y:1/0,z:n.z}}return i>Math.PI&&(i-=2*Math.PI),o=Math.sin(r),c=Math.cos(r),l=o*o,a=e/Math.sqrt(1-t*l),{x:(a+s)*c*Math.cos(i),y:(a+s)*c*Math.sin(i),z:(a*(1-t)+s)*o}}function Qa(n,t,e,i){var r=1e-12,s=r*r,a=30,o,l,c,h,u,m,d,g,y,v,S,w,I,U=n.x,R=n.y,V=n.z?n.z:0,B,G,Y;if(o=Math.sqrt(U*U+R*R),l=Math.sqrt(U*U+R*R+V*V),o/e<r){if(B=0,l/e<r)return G=T,Y=-i,{x:n.x,y:n.y,z:n.z}}else B=Math.atan2(R,U);c=V/l,h=o/l,u=1/Math.sqrt(1-t*(2-t)*h*h),g=h*(1-t)*u,y=c*u,I=0;do I++,d=e/Math.sqrt(1-t*y*y),Y=o*g+V*y-d*(1-t*y*y),m=t*d/(d+Y),u=1/Math.sqrt(1-m*(2-m)*h*h),v=h*(1-m)*u,S=c*u,w=S*g-v*y,g=v,y=S;while(w*w>s&&I<a);return G=Math.atan(S/Math.abs(v)),{x:B,y:G,z:Y}}function Xd(n,t,e){if(t===Ie)return{x:n.x+e[0],y:n.y+e[1],z:n.z+e[2]};if(t===Le){var i=e[0],r=e[1],s=e[2],a=e[3],o=e[4],l=e[5],c=e[6];return{x:c*(n.x-l*n.y+o*n.z)+i,y:c*(l*n.x+n.y-a*n.z)+r,z:c*(-o*n.x+a*n.y+n.z)+s}}}function qd(n,t,e){if(t===Ie)return{x:n.x-e[0],y:n.y-e[1],z:n.z-e[2]};if(t===Le){var i=e[0],r=e[1],s=e[2],a=e[3],o=e[4],l=e[5],c=e[6],h=(n.x-i)/c,u=(n.y-r)/c,m=(n.z-s)/c;return{x:h+l*u-o*m,y:-l*h+u+a*m,z:o*h-a*u+m}}}function to(n){return n===Ie||n===Le}function Zd(n,t,e){if(Wd(n,t)||n.datum_type===Zr||t.datum_type===Zr)return e;var i=n.a,r=n.es;if(n.datum_type===dn){var s=Yd(n,!1,e);if(s!==0)return;i=Nc,r=Dc}var a=t.a,o=t.b,l=t.es;if(t.datum_type===dn&&(a=Nc,o=ud,l=Dc),r===l&&i===a&&!to(n.datum_type)&&!to(t.datum_type))return e;if(e=Ka(e,r,i),to(n.datum_type)&&(e=Xd(e,n.datum_type,n.datum_params)),to(t.datum_type)&&(e=qd(e,t.datum_type,t.datum_params)),e=Qa(e,l,a,o),t.datum_type===dn){var c=Yd(t,!0,e);if(c!==0)return}return e}function Yd(n,t,e){if(n.grids===null||n.grids.length===0)return console.log("Grid shift grids not found"),-1;var i={x:-e.x,y:e.y},r={x:Number.NaN,y:Number.NaN},s=[];t:for(var a=0;a<n.grids.length;a++){var o=n.grids[a];if(s.push(o.name),o.isNull){r=i;break}if(o.grid===null){if(o.mandatory)return console.log("Unable to find mandatory grid '"+o.name+"'"),-1;continue}for(var l=o.grid.subgrids,c=0,h=l.length;c<h;c++){var u=l[c],m=(Math.abs(u.del[1])+Math.abs(u.del[0]))/1e4,d=u.ll[0]-m,g=u.ll[1]-m,y=u.ll[0]+(u.lim[0]-1)*u.del[0]+m,v=u.ll[1]+(u.lim[1]-1)*u.del[1]+m;if(!(g>i.y||d>i.x||v<i.y||y<i.x)&&(r=ES(i,t,u),!isNaN(r.x)))break t}}return isNaN(r.x)?(console.log("Failed to find a grid shift table for location '"+-i.x*Pt+" "+i.y*Pt+" tried: '"+s+"'"),-1):(e.x=-r.x,e.y=r.y,0)}function ES(n,t,e){var i={x:Number.NaN,y:Number.NaN};if(isNaN(n.x))return i;var r={x:n.x,y:n.y};r.x-=e.ll[0],r.y-=e.ll[1],r.x=N(r.x-Math.PI)+Math.PI;var s=jd(r,e);if(t){if(isNaN(s.x))return i;s.x=r.x-s.x,s.y=r.y-s.y;var a=9,o=1e-12,l,c;do{if(c=jd(s,e),isNaN(c.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}l={x:r.x-(c.x+s.x),y:r.y-(c.y+s.y)},s.x+=l.x,s.y+=l.y}while(a--&&Math.abs(l.x)>o&&Math.abs(l.y)>o);if(a<0)return console.log("Inverse grid shift iterator failed to converge."),i;i.x=N(s.x+e.ll[0]),i.y=s.y+e.ll[1]}else isNaN(s.x)||(i.x=n.x+s.x,i.y=n.y+s.y);return i}function jd(n,t){var e={x:n.x/t.del[0],y:n.y/t.del[1]},i={x:Math.floor(e.x),y:Math.floor(e.y)},r={x:e.x-1*i.x,y:e.y-1*i.y},s={x:Number.NaN,y:Number.NaN},a;if(i.x<0||i.x>=t.lim[0]||i.y<0||i.y>=t.lim[1])return s;a=i.y*t.lim[0]+i.x;var o={x:t.cvs[a][0],y:t.cvs[a][1]};a++;var l={x:t.cvs[a][0],y:t.cvs[a][1]};a+=t.lim[0];var c={x:t.cvs[a][0],y:t.cvs[a][1]};a--;var h={x:t.cvs[a][0],y:t.cvs[a][1]},u=r.x*r.y,m=r.x*(1-r.y),d=(1-r.x)*(1-r.y),g=(1-r.x)*r.y;return s.x=d*o.x+m*l.x+g*h.x+u*c.x,s.y=d*o.y+m*l.y+g*h.y+u*c.y,s}var oi=["x","y","z"];function Jd(n,t){let e={};for(let i=0,r=n.axis.length;i<r;i++){if(i===2&&t.z===void 0)continue;let s=t[oi[i]];switch(n.axis[i]){case"e":e.x=s;break;case"w":e.x=-s;break;case"n":e.y=s;break;case"s":e.y=-s;break;case"u":e.z=s;break;case"d":e.z=-s;break;default:return null}}return e}function $d(n,t){let e={};for(let i=0,r=n.axis.length;i<r;i++)if(!(i===2&&t.z===void 0))switch(n.axis[i]){case"e":e[oi[i]]=t.x;break;case"w":e[oi[i]]=-t.x;break;case"n":e[oi[i]]=t.y;break;case"s":e[oi[i]]=-t.y;break;case"u":e[oi[i]]=t.z;break;case"d":e[oi[i]]=-t.z;break;default:return null}return e}function Zi(n){var t={x:n[0],y:n[1]};return n.length>2&&(t.z=n[2]),n.length>3&&(t.m=n[3]),t}function Qd(n){Kd(n.x),Kd(n.y)}function Kd(n){if(typeof Number.isFinite=="function"){if(Number.isFinite(n))return;throw new TypeError("coordinates must be finite numbers")}if(typeof n!="number"||n!==n||!isFinite(n))throw new TypeError("coordinates must be finite numbers")}function TS(n,t){return(n.datum.datum_type===Ie||n.datum.datum_type===Le||n.datum.datum_type===dn)&&t.datumCode!=="WGS84"||(t.datum.datum_type===Ie||t.datum.datum_type===Le||t.datum.datum_type===dn)&&n.datumCode!=="WGS84"}function Qr(n,t,e,i){var r,s=e.z!==void 0;if(Qd(e),n.datum&&t.datum&&TS(n,t)&&(r=new Ne("WGS84"),e=Qr(n,r,e,i),n=r),i&&n.axis!=="enu"&&(e=Jd(n,e)),n.projName==="longlat")e={x:e.x*dt,y:e.y*dt,z:e.z||0};else if(n.to_meter&&(e={x:e.x*n.to_meter,y:e.y*n.to_meter,z:e.z||0}),e=n.inverse(e),!e)return;if(n.from_greenwich&&(e.x+=n.from_greenwich),e=Zd(n.datum,t.datum,e),!!e)return e=e,t.from_greenwich&&(e={x:e.x-t.from_greenwich,y:e.y,z:e.z||0}),t.projName==="longlat"?(t.long_wrap!==void 0&&(e.x=t.long_wrap+N(e.x-t.long_wrap)),e={x:e.x*Pt,y:e.y*Pt,z:e.z||0}):(e=t.forward(e),t.to_meter&&(e={x:e.x/t.to_meter,y:e.y/t.to_meter,z:e.z||0})),i&&t.axis!=="enu"?$d(t,e):(e&&!s&&t.projName!=="geocent"&&delete e.z,e)}function Yc(n,t,e,i){var r;return Array.isArray(e)?r=Zi(e):r={x:e.x,y:e.y,z:e.z,m:e.m},Qr(n,t,r,i)}var tp=Ne("WGS84");function jc(n,t,e,i){var r,s,a;return Array.isArray(e)?(r=Qr(n,t,Zi(e),i)||{x:NaN,y:NaN},e.length>2?(s=typeof n.name<"u"&&n.name==="geocent"||typeof t.name<"u"&&t.name==="geocent",s?typeof r.z=="number"?[r.x,r.y,r.z].concat(e.slice(3)):[r.x,r.y,e[2]].concat(e.slice(3)):i&&typeof r.z=="number"?[r.x,r.y,r.z].concat(e.slice(3)):[r.x,r.y].concat(e.slice(2))):[r.x,r.y]):(r=Qr(n,t,{x:e.x,y:e.y,z:e.z,m:e.m},i)||{x:NaN,y:NaN},a=Object.keys(e),a.length===2||(s=typeof n.name<"u"&&n.name==="geocent"||typeof t.name<"u"&&t.name==="geocent",a.forEach(function(o){o==="x"||o==="y"||o==="z"&&(s||i)||(r[o]=e[o])})),r)}function eo(n){return n instanceof Ne?n:typeof n=="object"&&"oProj"in n?n.oProj:Ne(n)}function AS(n,t,e){var i,r,s=!1,a;return typeof t>"u"?(r=eo(n),i=tp,s=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,r=eo(n),i=tp,s=!0),i||(i=eo(n)),r||(r=eo(t)),e?jc(i,r,e):(a={forward:function(o,l){return jc(i,r,o,l)},inverse:function(o,l){return jc(r,i,o,l)}},s&&(a.oProj=r),a)}var ep=AS;var np=6,rp="AJSAJS",sp="AFAFAF",Ji=65,se=73,Ee=79,ts=86,es=90,ap={forward:Jc,inverse:CS,toPoint:$c};function Jc(n,t){return t=t||5,IS(PS({lat:n[1],lon:n[0]}),t)}function CS(n){var t=Kc(lp(n.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function $c(n){var t=Kc(lp(n.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function Zc(n){return n*(Math.PI/180)}function ip(n){return 180*(n/Math.PI)}function PS(n){var t=n.lat,e=n.lon,i=6378137,r=.00669438,s=.9996,a,o,l,c,h,u,m,d=Zc(t),g=Zc(e),y,v;v=Math.floor((e+180)/6)+1,e===180&&(v=60),t>=56&&t<64&&e>=3&&e<12&&(v=32),t>=72&&t<84&&(e>=0&&e<9?v=31:e>=9&&e<21?v=33:e>=21&&e<33?v=35:e>=33&&e<42&&(v=37)),a=(v-1)*6-180+3,y=Zc(a),o=r/(1-r),l=i/Math.sqrt(1-r*Math.sin(d)*Math.sin(d)),c=Math.tan(d)*Math.tan(d),h=o*Math.cos(d)*Math.cos(d),u=Math.cos(d)*(g-y),m=i*((1-r/4-3*r*r/64-5*r*r*r/256)*d-(3*r/8+3*r*r/32+45*r*r*r/1024)*Math.sin(2*d)+(15*r*r/256+45*r*r*r/1024)*Math.sin(4*d)-35*r*r*r/3072*Math.sin(6*d));var S=s*l*(u+(1-c+h)*u*u*u/6+(5-18*c+c*c+72*h-58*o)*u*u*u*u*u/120)+5e5,w=s*(m+l*Math.tan(d)*(u*u/2+(5-c+9*h+4*h*h)*u*u*u*u/24+(61-58*c+c*c+600*h-330*o)*u*u*u*u*u*u/720));return t<0&&(w+=1e7),{northing:Math.round(w),easting:Math.round(S),zoneNumber:v,zoneLetter:RS(t)}}function Kc(n){var t=n.northing,e=n.easting,i=n.zoneLetter,r=n.zoneNumber;if(r<0||r>60)return null;var s=.9996,a=6378137,o=.00669438,l,c=(1-Math.sqrt(1-o))/(1+Math.sqrt(1-o)),h,u,m,d,g,y,v,S,w,I=e-5e5,U=t;i<"N"&&(U-=1e7),v=(r-1)*6-180+3,l=o/(1-o),y=U/s,S=y/(a*(1-o/4-3*o*o/64-5*o*o*o/256)),w=S+(3*c/2-27*c*c*c/32)*Math.sin(2*S)+(21*c*c/16-55*c*c*c*c/32)*Math.sin(4*S)+151*c*c*c/96*Math.sin(6*S),h=a/Math.sqrt(1-o*Math.sin(w)*Math.sin(w)),u=Math.tan(w)*Math.tan(w),m=l*Math.cos(w)*Math.cos(w),d=a*(1-o)/Math.pow(1-o*Math.sin(w)*Math.sin(w),1.5),g=I/(h*s);var R=w-h*Math.tan(w)/d*(g*g/2-(5+3*u+10*m-4*m*m-9*l)*g*g*g*g/24+(61+90*u+298*m+45*u*u-252*l-3*m*m)*g*g*g*g*g*g/720);R=ip(R);var V=(g-(1+2*u+m)*g*g*g/6+(5-2*m+28*u-3*m*m+8*l+24*u*u)*g*g*g*g*g/120)/Math.cos(w);V=v+ip(V);var B;if(n.accuracy){var G=Kc({northing:n.northing+n.accuracy,easting:n.easting+n.accuracy,zoneLetter:n.zoneLetter,zoneNumber:n.zoneNumber});B={top:G.lat,right:G.lon,bottom:R,left:V}}else B={lat:R,lon:V};return B}function RS(n){var t="Z";return 84>=n&&n>=72?t="X":72>n&&n>=64?t="W":64>n&&n>=56?t="V":56>n&&n>=48?t="U":48>n&&n>=40?t="T":40>n&&n>=32?t="S":32>n&&n>=24?t="R":24>n&&n>=16?t="Q":16>n&&n>=8?t="P":8>n&&n>=0?t="N":0>n&&n>=-8?t="M":-8>n&&n>=-16?t="L":-16>n&&n>=-24?t="K":-24>n&&n>=-32?t="J":-32>n&&n>=-40?t="H":-40>n&&n>=-48?t="G":-48>n&&n>=-56?t="F":-56>n&&n>=-64?t="E":-64>n&&n>=-72?t="D":-72>n&&n>=-80&&(t="C"),t}function IS(n,t){var e="00000"+n.easting,i="00000"+n.northing;return n.zoneNumber+n.zoneLetter+LS(n.easting,n.northing,n.zoneNumber)+e.substr(e.length-5,t)+i.substr(i.length-5,t)}function LS(n,t,e){var i=op(e),r=Math.floor(n/1e5),s=Math.floor(t/1e5)%20;return NS(r,s,i)}function op(n){var t=n%np;return t===0&&(t=np),t}function NS(n,t,e){var i=e-1,r=rp.charCodeAt(i),s=sp.charCodeAt(i),a=r+n-1,o=s+t,l=!1;a>es&&(a=a-es+Ji-1,l=!0),(a===se||r<se&&a>se||(a>se||r<se)&&l)&&a++,(a===Ee||r<Ee&&a>Ee||(a>Ee||r<Ee)&&l)&&(a++,a===se&&a++),a>es&&(a=a-es+Ji-1),o>ts?(o=o-ts+Ji-1,l=!0):l=!1,(o===se||s<se&&o>se||(o>se||s<se)&&l)&&o++,(o===Ee||s<Ee&&o>Ee||(o>Ee||s<Ee)&&l)&&(o++,o===se&&o++),o>ts&&(o=o-ts+Ji-1);var c=String.fromCharCode(a)+String.fromCharCode(o);return c}function lp(n){if(n&&n.length===0)throw"MGRSPoint coverting from nothing";for(var t=n.length,e=null,i="",r,s=0;!/[A-Z]/.test(r=n.charAt(s));){if(s>=2)throw"MGRSPoint bad conversion from: "+n;i+=r,s++}var a=parseInt(i,10);if(s===0||s+3>t)throw"MGRSPoint bad conversion from: "+n;var o=n.charAt(s++);if(o<="A"||o==="B"||o==="Y"||o>="Z"||o==="I"||o==="O")throw"MGRSPoint zone letter "+o+" not handled: "+n;e=n.substring(s,s+=2);for(var l=op(a),c=DS(e.charAt(0),l),h=US(e.charAt(1),l);h<FS(o);)h+=2e6;var u=t-s;if(u%2!==0)throw`MGRSPoint has to have an even number
3846
3846
  of digits after the zone letter and two 100km letters - front
3847
3847
  half for easting meters, second half for
3848
3848
  northing meters`+n;var m=u/2,d=0,g=0,y,v,S,w,I;return m>0&&(y=1e5/Math.pow(10,m),v=n.substring(s,s+m),d=parseFloat(v)*y,S=n.substring(s+m),g=parseFloat(S)*y),w=d+c,I=g+h,{easting:w,northing:I,zoneLetter:o,zoneNumber:a,accuracy:y}}function DS(n,t){for(var e=rp.charCodeAt(t-1),i=1e5,r=!1;e!==n.charCodeAt(0);){if(e++,e===se&&e++,e===Ee&&e++,e>es){if(r)throw"Bad character: "+n;e=Ji,r=!0}i+=1e5}return i}function US(n,t){if(n>"V")throw"MGRSPoint given invalid Northing "+n;for(var e=sp.charCodeAt(t-1),i=0,r=!1;e!==n.charCodeAt(0);){if(e++,e===se&&e++,e===Ee&&e++,e>ts){if(r)throw"Bad character: "+n;e=Ji,r=!0}i+=1e5}return i}function FS(n){var t;switch(n){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+n}function $i(n,t,e){if(!(this instanceof $i))return new $i(n,t,e);if(Array.isArray(n))this.x=n[0],this.y=n[1],this.z=n[2]||0;else if(typeof n=="object")this.x=n.x,this.y=n.y,this.z=n.z||0;else if(typeof n=="string"&&typeof t>"u"){var i=n.split(",");this.x=parseFloat(i[0]),this.y=parseFloat(i[1]),this.z=parseFloat(i[2])||0}else this.x=n,this.y=t,this.z=e||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}$i.fromMGRS=function(n){return new $i($c(n))};$i.prototype.toMGRS=function(n){return Jc([this.x,this.y],n)};var cp=$i;var OS=1,BS=.25,hp=.046875,up=.01953125,fp=.01068115234375,GS=.75,zS=.46875,kS=.013020833333333334,VS=.007120768229166667,HS=.3645833333333333,WS=.005696614583333333,XS=.3076171875;function Ki(n){var t=[];t[0]=OS-n*(BS+n*(hp+n*(up+n*fp))),t[1]=n*(GS-n*(hp+n*(up+n*fp)));var e=n*n;return t[2]=e*(zS-n*(kS+n*VS)),e*=n,t[3]=e*(HS-n*WS),t[4]=e*n*XS,t}function Ye(n,t,e,i){return e*=t,t*=t,i[0]*n-e*(i[1]+t*(i[2]+t*(i[3]+t*i[4])))}var qS=20;function Qi(n,t,e){for(var i=1/(1-t),r=n,s=qS;s;--s){var a=Math.sin(r),o=1-t*a*a;if(o=(Ye(r,a,Math.cos(r),e)-n)*(o*Math.sqrt(o))*i,r-=o,Math.abs(o)<D)return r}return r}function YS(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=Ki(this.es),this.ml0=Ye(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function jS(n){var t=n.x,e=n.y,i=N(t-this.long0,this.over),r,s,a,o=Math.sin(e),l=Math.cos(e);if(this.es){var h=l*i,u=Math.pow(h,2),m=this.ep2*Math.pow(l,2),d=Math.pow(m,2),g=Math.abs(l)>D?Math.tan(e):0,y=Math.pow(g,2),v=Math.pow(y,2);r=1-this.es*Math.pow(o,2),h=h/Math.sqrt(r);var S=Ye(e,o,l,this.en);s=this.a*(this.k0*h*(1+u/6*(1-y+m+u/20*(5-18*y+v+14*m-58*y*m+u/42*(61+179*v-v*y-479*y)))))+this.x0,a=this.a*(this.k0*(S-this.ml0+o*i*h/2*(1+u/12*(5-y+9*m+4*d+u/30*(61+v-58*y+270*m-330*y*m+u/56*(1385+543*v-v*y-3111*y))))))+this.y0}else{var c=l*Math.sin(i);if(Math.abs(Math.abs(c)-1)<D)return 93;if(s=.5*this.a*this.k0*Math.log((1+c)/(1-c))+this.x0,a=l*Math.cos(i)/Math.sqrt(1-Math.pow(c,2)),c=Math.abs(a),c>=1){if(c-1>D)return 93;a=0}else a=Math.acos(a);e<0&&(a=-a),a=this.a*this.k0*(a-this.lat0)+this.y0}return n.x=s,n.y=a,n}function ZS(n){var t,e,i,r,s=(n.x-this.x0)*(1/this.a),a=(n.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+a/this.k0,e=Qi(t,this.es,this.en),Math.abs(e)<T){var u=Math.sin(e),m=Math.cos(e),d=Math.abs(m)>D?Math.tan(e):0,g=this.ep2*Math.pow(m,2),y=Math.pow(g,2),v=Math.pow(d,2),S=Math.pow(v,2);t=1-this.es*Math.pow(u,2);var w=s*Math.sqrt(t)/this.k0,I=Math.pow(w,2);t=t*d,i=e-t*I/(1-this.es)*.5*(1-I/12*(5+3*v-9*g*v+g-4*y-I/30*(61+90*v-252*g*v+45*S+46*g-I/56*(1385+3633*v+4095*S+1574*S*v)))),r=N(this.long0+w*(1-I/6*(1+2*v+g-I/20*(5+28*v+24*S+8*g*v+6*g-I/42*(61+662*v+1320*S+720*S*v))))/m,this.over)}else i=T*qe(a),r=0;else{var o=Math.exp(s/this.k0),l=.5*(o-1/o),c=this.lat0+a/this.k0,h=Math.cos(c);t=Math.sqrt((1-Math.pow(h,2))/(1+Math.pow(l,2))),i=Math.asin(t),a<0&&(i=-i),l===0&&h===0?r=0:r=N(Math.atan2(l,h)+this.long0,this.over)}return n.x=r,n.y=i,n}var JS=["Fast_Transverse_Mercator","Fast Transverse Mercator"],tr={init:YS,forward:jS,inverse:ZS,names:JS};function no(n){var t=Math.exp(n);return t=(t-1/t)/2,t}function At(n,t){n=Math.abs(n),t=Math.abs(t);var e=Math.max(n,t),i=Math.min(n,t)/(e||1);return e*Math.sqrt(1+Math.pow(i,2))}function dp(n){var t=1+n,e=t-1;return e===0?n:n*Math.log(t)/e}function pp(n){var t=Math.abs(n);return t=dp(t*(1+t/(At(1,t)+1))),n<0?-t:t}function io(n,t){for(var e=2*Math.cos(2*t),i=n.length-1,r=n[i],s=0,a;--i>=0;)a=-s+e*r+n[i],s=r,r=a;return t+a*Math.sin(2*t)}function mp(n,t){for(var e=2*Math.cos(t),i=n.length-1,r=n[i],s=0,a;--i>=0;)a=-s+e*r+n[i],s=r,r=a;return Math.sin(t)*a}function gp(n){var t=Math.exp(n);return t=(t+1/t)/2,t}function Qc(n,t,e){for(var i=Math.sin(t),r=Math.cos(t),s=no(e),a=gp(e),o=2*r*a,l=-2*i*s,c=n.length-1,h=n[c],u=0,m=0,d=0,g,y;--c>=0;)g=m,y=u,m=h,u=d,h=-g+o*m-l*u+n[c],d=-y+l*m+o*u;return o=i*a,l=r*s,[o*h-l*d,o*d+l*h]}function $S(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(tr.init.apply(this),this.forward=tr.forward,this.inverse=tr.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.k0=this.k0!==void 0?this.k0:1,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var n=this.es/(1+Math.sqrt(1-this.es)),t=n/(2-n),e=t;this.cgb[0]=t*(2+t*(-2/3+t*(-2+t*(116/45+t*(26/45+t*(-2854/675)))))),this.cbg[0]=t*(-2+t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))),e=e*t,this.cgb[1]=e*(7/3+t*(-8/5+t*(-227/45+t*(2704/315+t*(2323/945))))),this.cbg[1]=e*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),e=e*t,this.cgb[2]=e*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=e*(-26/15+t*(34/21+t*(8/5+t*(-12686/2835)))),e=e*t,this.cgb[3]=e*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=e*(1237/630+t*(-12/5+t*(-24832/14175))),e=e*t,this.cgb[4]=e*(4174/315+t*(-144838/6237)),this.cbg[4]=e*(-734/315+t*(109598/31185)),e=e*t,this.cgb[5]=e*(601676/22275),this.cbg[5]=e*(444337/155925),e=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+e*(1/4+e*(1/64+e/256))),this.utg[0]=t*(-.5+t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=e*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=e*(13/48+t*(-3/5+t*(557/1440+t*(281/630+t*(-1983433/1935360))))),e=e*t,this.utg[2]=e*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=e*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),e=e*t,this.utg[3]=e*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=e*(49561/161280+t*(-179/168+t*(6601661/7257600))),e=e*t,this.utg[4]=e*(-4583/161280+t*(108847/3991680)),this.gtu[4]=e*(34729/80640+t*(-3418889/1995840)),e=e*t,this.utg[5]=e*(-20648693/638668800),this.gtu[5]=e*(212378941/319334400);var i=io(this.cbg,this.lat0);this.Zb=-this.Qn*(i+mp(this.gtu,2*i))}function KS(n){var t=N(n.x-this.long0,this.over),e=n.y;e=io(this.cbg,e);var i=Math.sin(e),r=Math.cos(e),s=Math.sin(t),a=Math.cos(t);e=Math.atan2(i,a*r),t=Math.atan2(s*r,At(i,r*a)),t=pp(Math.tan(t));var o=Qc(this.gtu,2*e,2*t);e=e+o[0],t=t+o[1];var l,c;return Math.abs(t)<=2.623395162778?(l=this.a*(this.Qn*t)+this.x0,c=this.a*(this.Qn*e+this.Zb)+this.y0):(l=1/0,c=1/0),n.x=l,n.y=c,n}function QS(n){var t=(n.x-this.x0)*(1/this.a),e=(n.y-this.y0)*(1/this.a);e=(e-this.Zb)/this.Qn,t=t/this.Qn;var i,r;if(Math.abs(t)<=2.623395162778){var s=Qc(this.utg,2*e,2*t);e=e+s[0],t=t+s[1],t=Math.atan(no(t));var a=Math.sin(e),o=Math.cos(e),l=Math.sin(t),c=Math.cos(t);e=Math.atan2(a*c,At(l,c*o)),t=Math.atan2(l,c*o),i=N(t+this.long0,this.over),r=io(this.cgb,e)}else i=1/0,r=1/0;return n.x=i,n.y=r,n}var tb=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"],er={init:$S,forward:KS,inverse:QS,names:tb};function _p(n,t){if(n===void 0){if(n=Math.floor((N(t)+Math.PI)*30/Math.PI)+1,n<0)return 0;if(n>60)return 60}return n}var eb="etmerc";function nb(){var n=_p(this.zone,this.long0);if(n===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(n)-183)*dt,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,er.init.apply(this),this.forward=er.forward,this.inverse=er.inverse}var ib=["Universal Transverse Mercator System","utm"],yp={init:nb,names:ib,dependsOn:eb};function ro(n,t){return Math.pow((1-n)/(1+n),t)}var rb=20;function sb(){var n=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*n*n),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(n/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+st)/(Math.pow(Math.tan(.5*this.lat0+st),this.C)*ro(this.e*n,this.ratexp))}function ab(n){var t=n.x,e=n.y;return n.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+st),this.C)*ro(this.e*Math.sin(e),this.ratexp))-T,n.x=this.C*t,n}function ob(n){for(var t=1e-14,e=n.x/this.C,i=n.y,r=Math.pow(Math.tan(.5*i+st)/this.K,1/this.C),s=rb;s>0&&(i=2*Math.atan(r*ro(this.e*Math.sin(n.y),-.5*this.e))-T,!(Math.abs(i-n.y)<t));--s)n.y=i;return s?(n.x=e,n.y=i,n):null}var lb=["gauss"],so={init:sb,forward:ab,inverse:ob,names:lb};function cb(){so.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"))}function hb(n){var t,e,i,r;return n.x=N(n.x-this.long0,this.over),so.forward.apply(this,[n]),t=Math.sin(n.y),e=Math.cos(n.y),i=Math.cos(n.x),r=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*e*i),n.x=r*e*Math.sin(n.x),n.y=r*(this.cosc0*t-this.sinc0*e*i),n.x=this.a*n.x+this.x0,n.y=this.a*n.y+this.y0,n}function ub(n){var t,e,i,r,s;if(n.x=(n.x-this.x0)/this.a,n.y=(n.y-this.y0)/this.a,n.x/=this.k0,n.y/=this.k0,s=At(n.x,n.y)){var a=2*Math.atan2(s,this.R2);t=Math.sin(a),e=Math.cos(a),r=Math.asin(e*this.sinc0+n.y*t*this.cosc0/s),i=Math.atan2(n.x*t,s*this.cosc0*e-n.y*this.sinc0*t)}else r=this.phic0,i=0;return n.x=i,n.y=r,so.inverse.apply(this,[n]),n.x=N(n.x+this.long0,this.over),n}var fb=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"],vp={init:cb,forward:hb,inverse:ub,names:fb};function th(n,t,e){return t*=e,Math.tan(.5*(T+n))*Math.pow((1-t)/(1+t),.5*e)}function db(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=D&&(this.k0=.5*(1+qe(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=D&&(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)),!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=D&&Math.abs(Math.cos(this.lat_ts))>D&&(this.k0=.5*this.cons*Wt(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Jt(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Wt(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(th(this.lat0,this.sinlat0,this.e))-T,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function pb(n){var t=n.x,e=n.y,i=Math.sin(e),r=Math.cos(e),s,a,o,l,c,h,u=N(t-this.long0,this.over);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=D&&Math.abs(e+this.lat0)<=D?(n.x=NaN,n.y=NaN,n):this.sphere?(s=2*this.k0/(1+this.sinlat0*i+this.coslat0*r*Math.cos(u)),n.x=this.a*s*r*Math.sin(u)+this.x0,n.y=this.a*s*(this.coslat0*i-this.sinlat0*r*Math.cos(u))+this.y0,n):(a=2*Math.atan(th(e,i,this.e))-T,l=Math.cos(a),o=Math.sin(a),Math.abs(this.coslat0)<=D?(c=Jt(this.e,e*this.con,this.con*i),h=2*this.a*this.k0*c/this.cons,n.x=this.x0+h*Math.sin(t-this.long0),n.y=this.y0-this.con*h*Math.cos(t-this.long0),n):(Math.abs(this.sinlat0)<D?(s=2*this.a*this.k0/(1+l*Math.cos(u)),n.y=s*o):(s=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*o+this.cosX0*l*Math.cos(u))),n.y=s*(this.cosX0*o-this.sinX0*l*Math.cos(u))+this.y0),n.x=s*l*Math.sin(u)+this.x0,n))}function mb(n){n.x-=this.x0,n.y-=this.y0;var t,e,i,r,s,a=Math.sqrt(n.x*n.x+n.y*n.y);if(this.sphere){var o=2*Math.atan(a/(2*this.a*this.k0));return t=this.long0,e=this.lat0,a<=D?(n.x=t,n.y=e,n):(e=Math.asin(Math.cos(o)*this.sinlat0+n.y*Math.sin(o)*this.coslat0/a),Math.abs(this.coslat0)<D?this.lat0>0?t=N(this.long0+Math.atan2(n.x,-1*n.y),this.over):t=N(this.long0+Math.atan2(n.x,n.y),this.over):t=N(this.long0+Math.atan2(n.x*Math.sin(o),a*this.coslat0*Math.cos(o)-n.y*this.sinlat0*Math.sin(o)),this.over),n.x=t,n.y=e,n)}else if(Math.abs(this.coslat0)<=D){if(a<=D)return e=this.lat0,t=this.long0,n.x=t,n.y=e,n;n.x*=this.con,n.y*=this.con,i=a*this.cons/(2*this.a*this.k0),e=this.con*mn(this.e,i),t=this.con*N(this.con*this.long0+Math.atan2(n.x,-1*n.y),this.over)}else r=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=D?s=this.X0:(s=Math.asin(Math.cos(r)*this.sinX0+n.y*Math.sin(r)*this.cosX0/a),t=N(this.long0+Math.atan2(n.x*Math.sin(r),a*this.cosX0*Math.cos(r)-n.y*this.sinX0*Math.sin(r)),this.over)),e=-1*mn(this.e,Math.tan(.5*(T+s)));return n.x=t,n.y=e,n}var gb=["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"],xp={init:db,forward:pb,inverse:mb,names:gb,ssfn_:th};function _b(){this.k0||(this.k0=1);var n=this.lat0;this.lambda0=this.long0;var t=Math.sin(n),e=this.a,i=this.rf,r=1/i,s=2*r-Math.pow(r,2),a=this.e=Math.sqrt(s);this.R=this.k0*e*Math.sqrt(1-s)/(1-s*Math.pow(t,2)),this.alpha=Math.sqrt(1+s/(1-s)*Math.pow(Math.cos(n),4)),this.b0=Math.asin(t/this.alpha);var o=Math.log(Math.tan(Math.PI/4+this.b0/2)),l=Math.log(Math.tan(Math.PI/4+n/2)),c=Math.log((1+a*t)/(1-a*t));this.K=o-this.alpha*l+this.alpha*a/2*c}function yb(n){var t=Math.log(Math.tan(Math.PI/4-n.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(n.y))/(1-this.e*Math.sin(n.y))),i=-this.alpha*(t+e)+this.K,r=2*(Math.atan(Math.exp(i))-Math.PI/4),s=this.alpha*(n.x-this.lambda0),a=Math.atan(Math.sin(s)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(s))),o=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(s));return n.y=this.R/2*Math.log((1+Math.sin(o))/(1-Math.sin(o)))+this.y0,n.x=this.R*a+this.x0,n}function vb(n){for(var t=n.x-this.x0,e=n.y-this.y0,i=t/this.R,r=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),s=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(i)),a=Math.atan(Math.sin(i)/(Math.cos(this.b0)*Math.cos(i)-Math.sin(this.b0)*Math.tan(r))),o=this.lambda0+a/this.alpha,l=0,c=s,h=-1e3,u=0;Math.abs(c-h)>1e-7;){if(++u>20)return;l=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(c))/2)),h=c,c=2*Math.atan(Math.exp(l))-Math.PI/2}return n.x=o,n.y=c,n}var xb=["somerc"],Mp={init:_b,forward:yb,inverse:vb,names:xb};var nr=1e-7;function Mb(n){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],e=typeof n.projName=="object"?Object.keys(n.projName)[0]:n.projName;return"no_uoff"in n||"no_off"in n||t.indexOf(e)!==-1||t.indexOf(Vc(e))!==-1}function Sb(){var n,t,e,i,r,s,a,o,l,c,h=0,u,m=0,d=0,g=0,y=0,v=0,S=0;this.k0||(this.k0=1),this.no_off=Mb(this),this.no_rot="no_rot"in this;var w=!1;"alpha"in this&&(w=!0);var I=!1;if("rectified_grid_angle"in this&&(I=!0),w&&(S=this.alpha),I&&(h=this.rectified_grid_angle,w||(S=0,w=!0)),w||I)m=this.longc;else if(d=this.long1,y=this.lat1,g=this.long2,v=this.lat2,Math.abs(y-v)<=nr||(n=Math.abs(y))<=nr||Math.abs(n-T)<=nr||Math.abs(Math.abs(this.lat0)-T)<=nr||Math.abs(Math.abs(v)-T)<=nr)throw new Error;var U=1-this.es;t=Math.sqrt(U),Math.abs(this.lat0)>D?(o=Math.sin(this.lat0),e=Math.cos(this.lat0),n=1-this.es*o*o,this.B=e*e,this.B=Math.sqrt(1+this.es*this.B*this.B/U),this.A=this.B*this.k0*t/n,i=this.B*t/(e*Math.sqrt(n)),r=i*i-1,r<=0?r=0:(r=Math.sqrt(r),this.lat0<0&&(r=-r)),this.E=r+=i,this.E*=Math.pow(Jt(this.e,this.lat0,o),this.B)):(this.B=1/t,this.A=this.k0,this.E=i=r=1),w||I?(w?(u=Math.asin(Math.sin(S)/i),I||(h=S)):(u=h,S=Math.asin(i*Math.sin(u))),this.lam0=m-Math.asin(.5*(r-1/r)*Math.tan(u))/this.B):(s=Math.pow(Jt(this.e,y,Math.sin(y)),this.B),a=Math.pow(Jt(this.e,v,Math.sin(v)),this.B),r=this.E/s,l=(a-s)/(a+s),c=this.E*this.E,c=(c-a*s)/(c+a*s),n=d-g,n<-Math.PI?g-=Xn:n>Math.PI&&(g+=Xn),this.lam0=N(.5*(d+g)-Math.atan(c*Math.tan(.5*this.B*(d-g))/l)/this.B,this.over),u=Math.atan(2*Math.sin(this.B*N(d-this.lam0,this.over))/(r-1/r)),h=S=Math.asin(i*Math.sin(u))),this.singam=Math.sin(u),this.cosgam=Math.cos(u),this.sinrot=Math.sin(h),this.cosrot=Math.cos(h),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(i*i-1)/Math.cos(S))),this.lat0<0&&(this.u_0=-this.u_0)),r=.5*u,this.v_pole_n=this.ArB*Math.log(Math.tan(st-r)),this.v_pole_s=this.ArB*Math.log(Math.tan(st+r))}function bb(n){var t={},e,i,r,s,a,o,l,c;if(n.x=n.x-this.lam0,Math.abs(Math.abs(n.y)-T)>D){if(a=this.E/Math.pow(Jt(this.e,n.y,Math.sin(n.y)),this.B),o=1/a,e=.5*(a-o),i=.5*(a+o),s=Math.sin(this.B*n.x),r=(e*this.singam-s*this.cosgam)/i,Math.abs(Math.abs(r)-1)<D)throw new Error;c=.5*this.ArB*Math.log((1-r)/(1+r)),o=Math.cos(this.B*n.x),Math.abs(o)<nr?l=this.A*n.x:l=this.ArB*Math.atan2(e*this.cosgam+s*this.singam,o)}else c=n.y>0?this.v_pole_n:this.v_pole_s,l=this.ArB*n.y;return this.no_rot?(t.x=l,t.y=c):(l-=this.u_0,t.x=c*this.cosrot+l*this.sinrot,t.y=l*this.cosrot-c*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,n.z!==void 0&&(t.z=n.z),n.m!==void 0&&(t.m=n.m),t}function wb(n){var t,e,i,r,s,a,o,l={};if(n.x=(n.x-this.x0)*(1/this.a),n.y=(n.y-this.y0)*(1/this.a),this.no_rot?(e=n.y,t=n.x):(e=n.x*this.cosrot-n.y*this.sinrot,t=n.y*this.cosrot+n.x*this.sinrot+this.u_0),i=Math.exp(-this.BrA*e),r=.5*(i-1/i),s=.5*(i+1/i),a=Math.sin(this.BrA*t),o=(a*this.cosgam+r*this.singam)/s,Math.abs(Math.abs(o)-1)<D)l.x=0,l.y=o<0?-T:T;else{if(l.y=this.E/Math.sqrt((1+o)/(1-o)),l.y=mn(this.e,Math.pow(l.y,1/this.B)),l.y===1/0)throw new Error;l.x=-this.rB*Math.atan2(r*this.cosgam-a*this.singam,Math.cos(this.BrA*t))}return l.x+=this.lam0,n.z!==void 0&&(l.z=n.z),n.m!==void 0&&(l.m=n.m),l}var Eb=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"],Sp={init:Sb,forward:bb,inverse:wb,names:Eb};function Tb(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,!(Math.abs(this.lat1+this.lat2)<D)){var n=this.b/this.a;this.e=Math.sqrt(1-n*n);var t=Math.sin(this.lat1),e=Math.cos(this.lat1),i=Wt(this.e,t,e),r=Jt(this.e,this.lat1,t),s=Math.sin(this.lat2),a=Math.cos(this.lat2),o=Wt(this.e,s,a),l=Jt(this.e,this.lat2,s),c=Jt(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>D?this.ns=Math.log(i/o)/Math.log(r/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=i/(this.ns*Math.pow(r,this.ns)),this.rh=Math.abs(Math.abs(this.lat0)-T)<D?0:this.a*this.f0*Math.pow(c,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function Ab(n){var t=n.x,e=n.y;Math.abs(2*Math.abs(e)-Math.PI)<=D&&(e=qe(e)*(T-2*D));var i=Math.abs(Math.abs(e)-T),r,s;if(i>D)r=Jt(this.e,e,Math.sin(e)),s=this.a*this.f0*Math.pow(r,this.ns);else{if(i=e*this.ns,i<=0)return null;s=0}var a=this.ns*N(t-this.long0,this.over);return n.x=this.k0*(s*Math.sin(a))+this.x0,n.y=this.k0*(this.rh-s*Math.cos(a))+this.y0,n}function Cb(n){var t,e,i,r,s,a=(n.x-this.x0)/this.k0,o=this.rh-(n.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+o*o),e=1):(t=-Math.sqrt(a*a+o*o),e=-1);var l=0;if(t!==0&&(l=Math.atan2(e*a,e*o)),t!==0||this.ns>0){if(e=1/this.ns,i=Math.pow(t/(this.a*this.f0),e),r=mn(this.e,i),r===-9999)return null}else r=-T;return s=N(l/this.ns+this.long0,this.over),n.x=s,n.y=r,n}var Pb=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"],bp={init:Tb,forward:Ab,inverse:Cb,names:Pb};function Rb(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),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}function Ib(n){var t,e,i,r,s,a,o,l=n.x,c=n.y,h=N(l-this.long0,this.over);return t=Math.pow((1+this.e*Math.sin(c))/(1-this.e*Math.sin(c)),this.alfa*this.e/2),e=2*(Math.atan(this.k*Math.pow(Math.tan(c/2+this.s45),this.alfa)/t)-this.s45),i=-h*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(i)),s=Math.asin(Math.cos(e)*Math.sin(i)/Math.cos(r)),a=this.n*s,o=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),n.y=o*Math.cos(a)/1,n.x=o*Math.sin(a)/1,this.czech||(n.y*=-1,n.x*=-1),n}function Lb(n){var t,e,i,r,s,a,o,l,c=n.x;n.x=n.y,n.y=c,this.czech||(n.y*=-1,n.x*=-1),a=Math.sqrt(n.x*n.x+n.y*n.y),s=Math.atan2(n.y,n.x),r=s/Math.sin(this.s0),i=2*(Math.atan(Math.pow(this.ro0/a,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(i)-Math.sin(this.ad)*Math.cos(i)*Math.cos(r)),e=Math.asin(Math.cos(i)*Math.sin(r)/Math.cos(t)),n.x=this.long0-e/this.alfa,o=t,l=0;var h=0;do n.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(o))/(1-this.e*Math.sin(o)),this.e/2))-this.s45),Math.abs(o-n.y)<1e-10&&(l=1),o=n.y,h+=1;while(l===0&&h<15);return h>=15?null:n}var Nb=["Krovak","Krovak Modified","Krovak (North Orientated)","Krovak Modified (North Orientated)","krovak"],wp={init:Rb,forward:Ib,inverse:Lb,names:Nb};function Rt(n,t,e,i,r){return n*r-t*Math.sin(2*r)+e*Math.sin(4*r)-i*Math.sin(6*r)}function gn(n){return 1-.25*n*(1+n/16*(3+1.25*n))}function _n(n){return .375*n*(1+.25*n*(1+.46875*n))}function yn(n){return .05859375*n*n*(1+.75*n)}function vn(n){return n*n*n*(35/3072)}function ns(n,t,e){var i=t*e;return n/Math.sqrt(1-i*i)}function ae(n){return Math.abs(n)<T?n:n-qe(n)*Math.PI}function li(n,t,e,i,r){var s,a;s=n/t;for(var o=0;o<15;o++)if(a=(n-(t*s-e*Math.sin(2*s)+i*Math.sin(4*s)-r*Math.sin(6*s)))/(t-2*e*Math.cos(2*s)+4*i*Math.cos(4*s)-6*r*Math.cos(6*s)),s+=a,Math.abs(a)<=1e-10)return s;return NaN}function Db(){this.sphere||(this.e0=gn(this.es),this.e1=_n(this.es),this.e2=yn(this.es),this.e3=vn(this.es),this.ml0=this.a*Rt(this.e0,this.e1,this.e2,this.e3,this.lat0))}function Ub(n){var t,e,i=n.x,r=n.y;if(i=N(i-this.long0,this.over),this.sphere)t=this.a*Math.asin(Math.cos(r)*Math.sin(i)),e=this.a*(Math.atan2(Math.tan(r),Math.cos(i))-this.lat0);else{var s=Math.sin(r),a=Math.cos(r),o=ns(this.a,this.e,s),l=Math.tan(r)*Math.tan(r),c=i*Math.cos(r),h=c*c,u=this.es*a*a/(1-this.es),m=this.a*Rt(this.e0,this.e1,this.e2,this.e3,r);t=o*c*(1-h*l*(1/6-(8-l+8*u)*h/120)),e=m-this.ml0+o*s/a*h*(.5+(5-l+6*u)*h/24)}return n.x=t+this.x0,n.y=e+this.y0,n}function Fb(n){n.x-=this.x0,n.y-=this.y0;var t=n.x/this.a,e=n.y/this.a,i,r;if(this.sphere){var s=e+this.lat0;i=Math.asin(Math.sin(s)*Math.cos(t)),r=Math.atan2(Math.tan(t),Math.cos(s))}else{var a=this.ml0/this.a+e,o=li(a,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(o)-T)<=D)return n.x=this.long0,n.y=T,e<0&&(n.y*=-1),n;var l=ns(this.a,this.e,Math.sin(o)),c=l*l*l/this.a/this.a*(1-this.es),h=Math.pow(Math.tan(o),2),u=t*this.a/l,m=u*u;i=o-l*Math.tan(o)/c*u*u*(.5-(1+3*h)*u*u/24),r=u*(1-m*(h/3+(1+3*h)*h*m/15))/Math.cos(o)}return n.x=N(r+this.long0,this.over),n.y=ae(i),n}var Ob=["Cassini","Cassini_Soldner","cass"],Ep={init:Db,forward:Ub,inverse:Fb,names:Ob};function oe(n,t){var e;return n>1e-7?(e=n*t,(1-n*n)*(t/(1-e*e)-.5/n*Math.log((1-e)/(1+e)))):2*t}var Bb=.3333333333333333,Gb=.17222222222222222,zb=.10257936507936508,kb=.06388888888888888,Vb=.0664021164021164,Hb=.016415012942191543;function is(n){var t,e=[];return e[0]=n*Bb,t=n*n,e[0]+=t*Gb,e[1]=t*kb,t*=n,e[0]+=t*zb,e[1]+=t*Vb,e[2]=t*Hb,e}function rs(n,t){var e=n+n;return n+t[0]*Math.sin(e)+t[1]*Math.sin(e+e)+t[2]*Math.sin(e+e+e)}var eh=1,nh=2,ih=3,ao=4;function Wb(){var n=Math.abs(this.lat0);if(Math.abs(n-T)<D?this.mode=this.lat0<0?eh:nh:Math.abs(n)<D?this.mode=ih:this.mode=ao,this.es>0){var t;switch(this.qp=oe(this.e,1),this.mmf=.5/(1-this.es),this.apa=is(this.es),this.mode){case nh:this.dd=1;break;case eh:this.dd=1;break;case ih:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case ao:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=oe(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===ao&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function Xb(n){var t,e,i,r,s,a,o,l,c,h,u=n.x,m=n.y;if(u=N(u-this.long0,this.over),this.sphere){if(s=Math.sin(m),h=Math.cos(m),i=Math.cos(u),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e=this.mode===this.EQUIT?1+h*i:1+this.sinph0*s+this.cosph0*h*i,e<=D)return null;e=Math.sqrt(2/e),t=e*h*Math.sin(u),e*=this.mode===this.EQUIT?s:this.cosph0*s-this.sinph0*h*i}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(i=-i),Math.abs(m+this.lat0)<D)return null;e=st-m*.5,e=2*(this.mode===this.S_POLE?Math.cos(e):Math.sin(e)),t=e*Math.sin(u),e*=i}}else{switch(o=0,l=0,c=0,i=Math.cos(u),r=Math.sin(u),s=Math.sin(m),a=oe(this.e,s),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(o=a/this.qp,l=Math.sqrt(1-o*o)),this.mode){case this.OBLIQ:c=1+this.sinb1*o+this.cosb1*l*i;break;case this.EQUIT:c=1+l*i;break;case this.N_POLE:c=T+m,a=this.qp-a;break;case this.S_POLE:c=m-T,a=this.qp+a;break}if(Math.abs(c)<D)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:c=Math.sqrt(2/c),this.mode===this.OBLIQ?e=this.ymf*c*(this.cosb1*o-this.sinb1*l*i):e=(c=Math.sqrt(2/(1+l*i)))*o*this.ymf,t=this.xmf*c*l*r;break;case this.N_POLE:case this.S_POLE:a>=0?(t=(c=Math.sqrt(a))*r,e=i*(this.mode===this.S_POLE?c:-c)):t=e=0;break}}return n.x=this.a*t+this.x0,n.y=this.a*e+this.y0,n}function qb(n){n.x-=this.x0,n.y-=this.y0;var t=n.x/this.a,e=n.y/this.a,i,r,s,a,o,l,c;if(this.sphere){var h=0,u,m=0;if(u=Math.sqrt(t*t+e*e),r=u*.5,r>1)return null;switch(r=2*Math.asin(r),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(m=Math.sin(r),h=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(u)<=D?0:Math.asin(e*m/u),t*=m,e=h*u;break;case this.OBLIQ:r=Math.abs(u)<=D?this.lat0:Math.asin(h*this.sinph0+e*m*this.cosph0/u),t*=m*this.cosph0,e=(h-Math.sin(r)*this.sinph0)*u;break;case this.N_POLE:e=-e,r=T-r;break;case this.S_POLE:r-=T;break}i=e===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,e)}else{if(c=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,e*=this.dd,l=Math.sqrt(t*t+e*e),l<D)return n.x=this.long0,n.y=this.lat0,n;a=2*Math.asin(.5*l/this.rq),s=Math.cos(a),t*=a=Math.sin(a),this.mode===this.OBLIQ?(c=s*this.sinb1+e*a*this.cosb1/l,o=this.qp*c,e=l*this.cosb1*s-e*this.sinb1*a):(c=e*a/l,o=this.qp*c,e=l*s)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(e=-e),o=t*t+e*e,!o)return n.x=this.long0,n.y=this.lat0,n;c=1-o/this.qp,this.mode===this.S_POLE&&(c=-c)}i=Math.atan2(t,e),r=rs(Math.asin(c),this.apa)}return n.x=N(this.long0+i,this.over),n.y=r,n}var Yb=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],Tp={init:Wb,forward:Xb,inverse:qb,names:Yb,S_POLE:eh,N_POLE:nh,EQUIT:ih,OBLIQ:ao};function le(n){return Math.abs(n)>1&&(n=n>1?1:-1),Math.asin(n)}function jb(){Math.abs(this.lat1+this.lat2)<D||(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=Wt(this.e3,this.sin_po,this.cos_po),this.qs1=oe(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=Wt(this.e3,this.sin_po,this.cos_po),this.qs2=oe(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=oe(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>D?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)}function Zb(n){var t=n.x,e=n.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var i=oe(this.e3,this.sin_phi),r=this.a*Math.sqrt(this.c-this.ns0*i)/this.ns0,s=this.ns0*N(t-this.long0,this.over),a=r*Math.sin(s)+this.x0,o=this.rh-r*Math.cos(s)+this.y0;return n.x=a,n.y=o,n}function Jb(n){var t,e,i,r,s,a;return n.x-=this.x0,n.y=this.rh-n.y+this.y0,this.ns0>=0?(t=Math.sqrt(n.x*n.x+n.y*n.y),i=1):(t=-Math.sqrt(n.x*n.x+n.y*n.y),i=-1),r=0,t!==0&&(r=Math.atan2(i*n.x,i*n.y)),i=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-i*i)/(2*this.ns0)):(e=(this.c-i*i)/this.ns0,a=this.phi1z(this.e3,e)),s=N(r/this.ns0+this.long0,this.over),n.x=s,n.y=a,n}function $b(n,t){var e,i,r,s,a,o=le(.5*t);if(n<D)return o;for(var l=n*n,c=1;c<=25;c++)if(e=Math.sin(o),i=Math.cos(o),r=n*e,s=1-r*r,a=.5*s*s/i*(t/(1-l)-e/s+.5/n*Math.log((1-r)/(1+r))),o=o+a,Math.abs(a)<=1e-7)return o;return null}var Kb=["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"],Ap={init:jb,forward:Zb,inverse:Jb,names:Kb,phi1z:$b};function Qb(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function tw(n){var t,e,i,r,s,a,o,l,c=n.x,h=n.y;return i=N(c-this.long0,this.over),t=Math.sin(h),e=Math.cos(h),r=Math.cos(i),a=this.sin_p14*t+this.cos_p14*e*r,s=1,a>0||Math.abs(a)<=D?(o=this.x0+this.a*s*e*Math.sin(i)/a,l=this.y0+this.a*s*(this.cos_p14*t-this.sin_p14*e*r)/a):(o=this.x0+this.infinity_dist*e*Math.sin(i),l=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*e*r)),n.x=o,n.y=l,n}function ew(n){var t,e,i,r,s,a;return n.x=(n.x-this.x0)/this.a,n.y=(n.y-this.y0)/this.a,n.x/=this.k0,n.y/=this.k0,(t=Math.sqrt(n.x*n.x+n.y*n.y))?(r=Math.atan2(t,this.rc),e=Math.sin(r),i=Math.cos(r),a=le(i*this.sin_p14+n.y*e*this.cos_p14/t),s=Math.atan2(n.x*e,t*this.cos_p14*i-n.y*this.sin_p14*e),s=N(this.long0+s,this.over)):(a=this.phic0,s=0),n.x=s,n.y=a,n}var nw=["gnom"],Cp={init:Qb,forward:tw,inverse:ew,names:nw};function Pp(n,t){var e=1-(1-n*n)/(2*n)*Math.log((1-n)/(1+n));if(Math.abs(Math.abs(t)-e)<1e-6)return t<0?-1*T:T;for(var i=Math.asin(.5*t),r,s,a,o,l=0;l<30;l++)if(s=Math.sin(i),a=Math.cos(i),o=n*s,r=Math.pow(1-o*o,2)/(2*a)*(t/(1-n*n)-s/(1-o*o)+.5/n*Math.log((1-o)/(1+o))),i+=r,Math.abs(r)<=1e-10)return i;return NaN}function iw(){this.sphere||(this.k0=Wt(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function rw(n){var t=n.x,e=n.y,i,r,s=N(t-this.long0,this.over);if(this.sphere)i=this.x0+this.a*s*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var a=oe(this.e,Math.sin(e));i=this.x0+this.a*this.k0*s,r=this.y0+this.a*a*.5/this.k0}return n.x=i,n.y=r,n}function sw(n){n.x-=this.x0,n.y-=this.y0;var t,e;return this.sphere?(t=N(this.long0+n.x/this.a/Math.cos(this.lat_ts),this.over),e=Math.asin(n.y/this.a*Math.cos(this.lat_ts))):(e=Pp(this.e,2*n.y*this.k0/this.a),t=N(this.long0+n.x/(this.a*this.k0),this.over)),n.x=t,n.y=e,n}var aw=["cea"],Rp={init:iw,forward:rw,inverse:sw,names:aw};function ow(){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)}function lw(n){var t=n.x,e=n.y,i=N(t-this.long0,this.over),r=ae(e-this.lat0);return n.x=this.x0+this.a*i*this.rc,n.y=this.y0+this.a*r,n}function cw(n){var t=n.x,e=n.y;return n.x=N(this.long0+(t-this.x0)/(this.a*this.rc),this.over),n.y=ae(this.lat0+(e-this.y0)/this.a),n}var hw=["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"],Ip={init:ow,forward:lw,inverse:cw,names:hw};var Lp=20;function uw(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=gn(this.es),this.e1=_n(this.es),this.e2=yn(this.es),this.e3=vn(this.es),this.ml0=this.a*Rt(this.e0,this.e1,this.e2,this.e3,this.lat0)}function fw(n){var t=n.x,e=n.y,i,r,s,a=N(t-this.long0,this.over);if(s=a*Math.sin(e),this.sphere)Math.abs(e)<=D?(i=this.a*a,r=-1*this.a*this.lat0):(i=this.a*Math.sin(s)/Math.tan(e),r=this.a*(ae(e-this.lat0)+(1-Math.cos(s))/Math.tan(e)));else if(Math.abs(e)<=D)i=this.a*a,r=-1*this.ml0;else{var o=ns(this.a,this.e,Math.sin(e))/Math.tan(e);i=o*Math.sin(s),r=this.a*Rt(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+o*(1-Math.cos(s))}return n.x=i+this.x0,n.y=r+this.y0,n}function dw(n){var t,e,i,r,s,a,o,l,c;if(i=n.x-this.x0,r=n.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=D)t=N(i/this.a+this.long0,this.over),e=0;else{a=this.lat0+r/this.a,o=i*i/this.a/this.a+a*a,l=a;var h;for(s=Lp;s;--s)if(h=Math.tan(l),c=-1*(a*(l*h+1)-l-.5*(l*l+o)*h)/((l-a)/h-1),l+=c,Math.abs(c)<=D){e=l;break}t=N(this.long0+Math.asin(i*Math.tan(l)/this.a)/Math.sin(e),this.over)}else if(Math.abs(r+this.ml0)<=D)e=0,t=N(this.long0+i/this.a,this.over);else{a=(this.ml0+r)/this.a,o=i*i/this.a/this.a+a*a,l=a;var u,m,d,g,y;for(s=Lp;s;--s)if(y=this.e*Math.sin(l),u=Math.sqrt(1-y*y)*Math.tan(l),m=this.a*Rt(this.e0,this.e1,this.e2,this.e3,l),d=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),g=m/this.a,c=(a*(u*g+1)-g-.5*u*(g*g+o))/(this.es*Math.sin(2*l)*(g*g+o-2*a*g)/(4*u)+(a-g)*(u*d-2/Math.sin(2*l))-d),l-=c,Math.abs(c)<=D){e=l;break}u=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),t=N(this.long0+Math.asin(i*u/this.a)/Math.sin(e),this.over)}return n.x=t,n.y=e,n}var pw=["Polyconic","American_Polyconic","poly"],Np={init:uw,forward:fw,inverse:dw,names:pw};var mw=1;function gw(){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}function _w(n){var t,e=n.x,i=n.y,r=i-this.lat0,s=e-this.long0,a=r/ri*1e-5,o=s,l=1,c=0;for(t=1;t<=10;t++)l=l*a,c=c+this.A[t]*l;var h=c,u=o,m=1,d=0,g,y,v=0,S=0;for(t=1;t<=6;t++)g=m*h-d*u,y=d*h+m*u,m=g,d=y,v=v+this.B_re[t]*m-this.B_im[t]*d,S=S+this.B_im[t]*m+this.B_re[t]*d;return n.x=S*this.a+this.x0,n.y=v*this.a+this.y0,n}function yw(n){var t,e=n.x,i=n.y,r=e-this.x0,s=i-this.y0,a=s/this.a,o=r/this.a,l=1,c=0,h,u,m=0,d=0;for(t=1;t<=6;t++)h=l*a-c*o,u=c*a+l*o,l=h,c=u,m=m+this.C_re[t]*l-this.C_im[t]*c,d=d+this.C_im[t]*l+this.C_re[t]*c;for(var g=0;g<this.iterations;g++){var y=m,v=d,S,w,I=a,U=o;for(t=2;t<=6;t++)S=y*m-v*d,w=v*m+y*d,y=S,v=w,I=I+(t-1)*(this.B_re[t]*y-this.B_im[t]*v),U=U+(t-1)*(this.B_im[t]*y+this.B_re[t]*v);y=1,v=0;var R=this.B_re[1],V=this.B_im[1];for(t=2;t<=6;t++)S=y*m-v*d,w=v*m+y*d,y=S,v=w,R=R+t*(this.B_re[t]*y-this.B_im[t]*v),V=V+t*(this.B_im[t]*y+this.B_re[t]*v);var B=R*R+V*V;m=(I*R+U*V)/B,d=(U*R-I*V)/B}var G=m,Y=d,K=1,M=0;for(t=1;t<=9;t++)K=K*G,M=M+this.D[t]*K;var A=this.lat0+M*ri*1e5,z=this.long0+Y;return n.x=z,n.y=A,n}var vw=["New_Zealand_Map_Grid","nzmg"],Dp={init:gw,forward:_w,inverse:yw,names:vw,iterations:mw};function xw(){}function Mw(n){var t=n.x,e=n.y,i=N(t-this.long0,this.over),r=this.x0+this.a*i,s=this.y0+this.a*Math.log(Math.tan(Math.PI/4+e/2.5))*1.25;return n.x=r,n.y=s,n}function Sw(n){n.x-=this.x0,n.y-=this.y0;var t=N(this.long0+n.x/this.a,this.over),e=2.5*(Math.atan(Math.exp(.8*n.y/this.a))-Math.PI/4);return n.x=t,n.y=e,n}var bw=["Miller_Cylindrical","mill"],Up={init:xw,forward:Mw,inverse:Sw,names:bw};var ww=20;function Ew(){this.long0=this.long0||0,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=Ki(this.es)}function rh(n){var t,e,i=n.x,r=n.y;if(i=N(i-this.long0,this.over),this.sphere){if(!this.m)r=this.n!==1?Math.asin(this.n*Math.sin(r)):r;else for(var s=this.n*Math.sin(r),a=ww;a;--a){var o=(this.m*r+Math.sin(r)-s)/(this.m+Math.cos(r));if(r-=o,Math.abs(o)<D)break}t=this.a*this.C_x*i*(this.m+Math.cos(r)),e=this.a*this.C_y*r}else{var l=Math.sin(r),c=Math.cos(r);e=this.a*Ye(r,l,c,this.en),t=this.a*i*c/Math.sqrt(1-this.es*l*l)}return n.x=t,n.y=e,n}function sh(n){var t,e,i,r;return n.x-=this.x0,i=n.x/this.a,n.y-=this.y0,t=n.y/this.a,this.sphere?(t/=this.C_y,i=i/(this.C_x*(this.m+Math.cos(t))),this.m?t=le((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=le(Math.sin(t)/this.n)),i=N(i+this.long0,this.over),t=ae(t)):(t=Qi(n.y/this.a,this.es,this.en),r=Math.abs(t),r<T?(r=Math.sin(t),e=this.long0+n.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(t)),i=N(e,this.over)):r-D<T&&(i=this.long0)),n.x=i,n.y=t,n}var Tw=["Sinusoidal","sinu"],Fp={init:Ew,forward:rh,inverse:sh,names:Tw};function Aw(){this.sphere=!0,this.b=this.a,this.m=1,this.n=2.5707963267948966,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)}var Cw=rh,Pw=sh,Rw=["Eckert_VI","eck6"],Op={init:Aw,forward:Cw,inverse:Pw,names:Rw};function Iw(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0}function Lw(n){for(var t=n.x,e=n.y,i=N(t-this.long0,this.over),r=e,s=Math.PI*Math.sin(e);;){var a=-(r+Math.sin(r)-s)/(1+Math.cos(r));if(r+=a,Math.abs(a)<D)break}r/=2,Math.PI/2-Math.abs(e)<D&&(i=0);var o=.900316316158*this.a*i*Math.cos(r)+this.x0,l=1.4142135623731*this.a*Math.sin(r)+this.y0;return n.x=o,n.y=l,n}function Nw(n){var t,e;n.x-=this.x0,n.y-=this.y0,e=n.y/(1.4142135623731*this.a),Math.abs(e)>.999999999999&&(e=.999999999999),t=Math.asin(e);var i=N(this.long0+n.x/(.900316316158*this.a*Math.cos(t)),this.over);i<-Math.PI&&(i=-Math.PI),i>Math.PI&&(i=Math.PI),e=(2*t+Math.sin(2*t))/Math.PI,Math.abs(e)>1&&(e=1);var r=Math.asin(e);return n.x=i,n.y=r,n}var Dw=["Mollweide","moll"],Bp={init:Iw,forward:Lw,inverse:Nw,names:Dw};function Uw(){Math.abs(this.lat1+this.lat2)<D||(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=gn(this.es),this.e1=_n(this.es),this.e2=yn(this.es),this.e3=vn(this.es),this.sin_phi=Math.sin(this.lat1),this.cos_phi=Math.cos(this.lat1),this.ms1=Wt(this.e,this.sin_phi,this.cos_phi),this.ml1=Rt(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<D?this.ns=this.sin_phi:(this.sin_phi=Math.sin(this.lat2),this.cos_phi=Math.cos(this.lat2),this.ms2=Wt(this.e,this.sin_phi,this.cos_phi),this.ml2=Rt(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=Rt(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function Fw(n){var t=n.x,e=n.y,i;if(this.sphere)i=this.a*(this.g-e);else{var r=Rt(this.e0,this.e1,this.e2,this.e3,e);i=this.a*(this.g-r)}var s=this.ns*N(t-this.long0,this.over),a=this.x0+i*Math.sin(s),o=this.y0+this.rh-i*Math.cos(s);return n.x=a,n.y=o,n}function Ow(n){n.x-=this.x0,n.y=this.rh-n.y+this.y0;var t,e,i,r;this.ns>=0?(e=Math.sqrt(n.x*n.x+n.y*n.y),t=1):(e=-Math.sqrt(n.x*n.x+n.y*n.y),t=-1);var s=0;if(e!==0&&(s=Math.atan2(t*n.x,t*n.y)),this.sphere)return r=N(this.long0+s/this.ns,this.over),i=ae(this.g-e/this.a),n.x=r,n.y=i,n;var a=this.g-e/this.a;return i=li(a,this.e0,this.e1,this.e2,this.e3),r=N(this.long0+s/this.ns,this.over),n.x=r,n.y=i,n}var Bw=["Equidistant_Conic","eqdc"],Gp={init:Uw,forward:Fw,inverse:Ow,names:Bw};function Gw(){this.R=this.a}function zw(n){var t=n.x,e=n.y,i=N(t-this.long0,this.over),r,s;if(Math.abs(e)<=D)return r=this.x0+this.R*i,s=this.y0,n.x=r,n.y=s,n;var a=le(2*Math.abs(e/Math.PI));if(Math.abs(i)<=D||Math.abs(Math.abs(e)-T)<=D)return r=this.x0,e>=0?s=this.y0+Math.PI*this.R*Math.tan(.5*a):s=this.y0+Math.PI*this.R*-Math.tan(.5*a),n.x=r,n.y=s,n;var o=.5*Math.abs(Math.PI/i-i/Math.PI),l=o*o,c=Math.sin(a),h=Math.cos(a),u=h/(c+h-1),m=u*u,d=u*(2/c-1),g=d*d,y=Math.PI*this.R*(o*(u-g)+Math.sqrt(l*(u-g)*(u-g)-(g+l)*(m-g)))/(g+l);i<0&&(y=-y),r=this.x0+y;var v=l+u;return y=Math.PI*this.R*(d*v-o*Math.sqrt((g+l)*(l+1)-v*v))/(g+l),e>=0?s=this.y0+y:s=this.y0-y,n.x=r,n.y=s,n}function kw(n){var t,e,i,r,s,a,o,l,c,h,u,m,d;return n.x-=this.x0,n.y-=this.y0,u=Math.PI*this.R,i=n.x/u,r=n.y/u,s=i*i+r*r,a=-Math.abs(r)*(1+s),o=a-2*r*r+i*i,l=-2*a+1+2*r*r+s*s,d=r*r/l+(2*o*o*o/l/l/l-9*a*o/l/l)/27,c=(a-o*o/3/l)/l,h=2*Math.sqrt(-c/3),u=3*d/c/h,Math.abs(u)>1&&(u>=0?u=1:u=-1),m=Math.acos(u)/3,n.y>=0?e=(-h*Math.cos(m+Math.PI/3)-o/3/l)*Math.PI:e=-(-h*Math.cos(m+Math.PI/3)-o/3/l)*Math.PI,Math.abs(i)<D?t=this.long0:t=N(this.long0+Math.PI*(s-1+Math.sqrt(1+2*(i*i-r*r)+s*s))/2/i,this.over),n.x=t,n.y=e,n}var Vw=["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"],zp={init:Gw,forward:zw,inverse:kw,names:Vw};function kp(n,t,e,i,r,s){let a=i-t,o=Math.atan((1-s)*Math.tan(n)),l=Math.atan((1-s)*Math.tan(e)),c=Math.sin(o),h=Math.cos(o),u=Math.sin(l),m=Math.cos(l),d=a,g,y=100,v,S,w,I,U,R,V,B,G,Y,K,M,A,z;do{if(v=Math.sin(d),S=Math.cos(d),w=Math.sqrt(m*v*(m*v)+(h*u-c*m*S)*(h*u-c*m*S)),w===0)return{azi1:0,s12:0};I=c*u+h*m*S,U=Math.atan2(w,I),R=h*m*v/w,V=1-R*R,B=V!==0?I-2*c*u/V:0,G=s/16*V*(4+s*(4-3*V)),g=d,d=a+(1-G)*s*R*(U+G*w*(B+G*I*(-1+2*B*B)))}while(Math.abs(d-g)>1e-12&&--y>0);return y===0?{azi1:NaN,s12:NaN}:(Y=V*(r*r-r*(1-s)*(r*(1-s)))/(r*(1-s)*(r*(1-s))),K=1+Y/16384*(4096+Y*(-768+Y*(320-175*Y))),M=Y/1024*(256+Y*(-128+Y*(74-47*Y))),A=M*w*(B+M/4*(I*(-1+2*B*B)-M/6*B*(-3+4*w*w)*(-3+4*B*B))),z=r*(1-s)*K*(U-A),{azi1:Math.atan2(m*v,h*u-c*m*S),s12:z})}function Vp(n,t,e,i,r,s){let a=Math.atan((1-s)*Math.tan(n)),o=Math.sin(a),l=Math.cos(a),c=Math.sin(e),h=Math.cos(e),u=Math.atan2(o,l*h),m=l*c,d=1-m*m,g=d*(r*r-r*(1-s)*(r*(1-s)))/(r*(1-s)*(r*(1-s))),y=1+g/16384*(4096+g*(-768+g*(320-175*g))),v=g/1024*(256+g*(-128+g*(74-47*g))),S=i/(r*(1-s)*y),w,I=100,U,R,V,B;do U=Math.cos(2*u+S),R=Math.sin(S),V=Math.cos(S),B=v*R*(U+v/4*(V*(-1+2*U*U)-v/6*U*(-3+4*R*R)*(-3+4*U*U))),w=S,S=i/(r*(1-s)*y)+B;while(Math.abs(S-w)>1e-12&&--I>0);if(I===0)return{lat2:NaN,lon2:NaN};let G=o*R-l*V*h,Y=Math.atan2(o*V+l*R*h,(1-s)*Math.sqrt(m*m+G*G)),K=Math.atan2(R*c,l*V-o*R*h),M=s/16*d*(4+s*(4-3*d)),A=K-(1-M)*s*m*(S+M*R*(U+M*V*(-1+2*U*U))),z=t+A;return{lat2:Y,lon2:z}}function Hw(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.f=this.es/(1+Math.sqrt(1-this.es))}function Ww(n){var t=n.x,e=n.y,i=Math.sin(n.y),r=Math.cos(n.y),s=N(t-this.long0,this.over),a,o,l,c,h,u,m,d,g,y,v;return this.sphere?Math.abs(this.sin_p12-1)<=D?(n.x=this.x0+this.a*(T-e)*Math.sin(s),n.y=this.y0-this.a*(T-e)*Math.cos(s),n):Math.abs(this.sin_p12+1)<=D?(n.x=this.x0+this.a*(T+e)*Math.sin(s),n.y=this.y0+this.a*(T+e)*Math.cos(s),n):(g=this.sin_p12*i+this.cos_p12*r*Math.cos(s),m=Math.acos(g),d=m?m/Math.sin(m):1,n.x=this.x0+this.a*d*r*Math.sin(s),n.y=this.y0+this.a*d*(this.cos_p12*i-this.sin_p12*r*Math.cos(s)),n):(a=gn(this.es),o=_n(this.es),l=yn(this.es),c=vn(this.es),Math.abs(this.sin_p12-1)<=D?(h=this.a*Rt(a,o,l,c,T),u=this.a*Rt(a,o,l,c,e),n.x=this.x0+(h-u)*Math.sin(s),n.y=this.y0-(h-u)*Math.cos(s),n):Math.abs(this.sin_p12+1)<=D?(h=this.a*Rt(a,o,l,c,T),u=this.a*Rt(a,o,l,c,e),n.x=this.x0+(h+u)*Math.sin(s),n.y=this.y0+(h+u)*Math.cos(s),n):Math.abs(t)<D&&Math.abs(e-this.lat0)<D?(n.x=this.x0,n.y=this.y0,n):(y=kp(this.lat0,this.long0,e,t,this.a,this.f),v=y.azi1,n.x=this.x0+y.s12*Math.sin(v),n.y=this.y0+y.s12*Math.cos(v),n))}function Xw(n){n.x-=this.x0,n.y-=this.y0;var t,e,i,r,s,a,o,l,c,h,u,m,d,g,y,v;return this.sphere?(t=Math.sqrt(n.x*n.x+n.y*n.y),t>2*T*this.a?void 0:(e=t/this.a,i=Math.sin(e),r=Math.cos(e),s=this.long0,Math.abs(t)<=D?a=this.lat0:(a=le(r*this.sin_p12+n.y*i*this.cos_p12/t),o=Math.abs(this.lat0)-T,Math.abs(o)<=D?this.lat0>=0?s=N(this.long0+Math.atan2(n.x,-n.y),this.over):s=N(this.long0-Math.atan2(-n.x,n.y),this.over):s=N(this.long0+Math.atan2(n.x*i,t*this.cos_p12*r-n.y*this.sin_p12*i),this.over)),n.x=s,n.y=a,n)):(l=gn(this.es),c=_n(this.es),h=yn(this.es),u=vn(this.es),Math.abs(this.sin_p12-1)<=D?(m=this.a*Rt(l,c,h,u,T),t=Math.sqrt(n.x*n.x+n.y*n.y),d=m-t,a=li(d/this.a,l,c,h,u),s=N(this.long0+Math.atan2(n.x,-1*n.y),this.over),n.x=s,n.y=a,n):Math.abs(this.sin_p12+1)<=D?(m=this.a*Rt(l,c,h,u,T),t=Math.sqrt(n.x*n.x+n.y*n.y),d=t-m,a=li(d/this.a,l,c,h,u),s=N(this.long0+Math.atan2(n.x,n.y),this.over),n.x=s,n.y=a,n):(g=Math.atan2(n.x,n.y),y=Math.sqrt(n.x*n.x+n.y*n.y),v=Vp(this.lat0,this.long0,g,y,this.a,this.f),n.x=v.lon2,n.y=v.lat2,n))}var qw=["Azimuthal_Equidistant","aeqd"],Hp={init:Hw,forward:Ww,inverse:Xw,names:qw};function Yw(){this.sin_p14=Math.sin(this.lat0||0),this.cos_p14=Math.cos(this.lat0||0)}function jw(n){var t,e,i,r,s,a,o,l,c=n.x,h=n.y;return i=N(c-(this.long0||0),this.over),t=Math.sin(h),e=Math.cos(h),r=Math.cos(i),a=this.sin_p14*t+this.cos_p14*e*r,s=1,(a>0||Math.abs(a)<=D)&&(o=(this.x0||0)+this.a*s*e*Math.sin(i),l=(this.y0||0)+this.a*s*(this.cos_p14*t-this.sin_p14*e*r)),n.x=o,n.y=l,n}function Zw(n){var t,e,i,r,s,a,o,l,c;return n.x-=this.x0||0,n.y-=this.y0||0,t=Math.sqrt(n.x*n.x+n.y*n.y),e=le(t/this.a),i=Math.sin(e),r=Math.cos(e),l=this.long0||0,c=this.lat0||0,a=l,Math.abs(t)<=D?(o=c,n.x=a,n.y=o,n):(o=le(r*this.sin_p14+n.y*i*this.cos_p14/t),s=Math.abs(c)-T,Math.abs(s)<=D?(c>=0?a=N(l+Math.atan2(n.x,-n.y),this.over):a=N(l-Math.atan2(-n.x,n.y),this.over),n.x=a,n.y=o,n):(a=N(l+Math.atan2(n.x*i,t*this.cos_p14*r-n.y*this.sin_p14*i),this.over),n.x=a,n.y=o,n))}var Jw=["ortho"],Wp={init:Yw,forward:jw,inverse:Zw,names:Jw};var xt={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},ft={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function $w(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=T-st/2?this.face=xt.TOP:this.lat0<=-(T-st/2)?this.face=xt.BOTTOM:Math.abs(this.long0)<=st?this.face=xt.FRONT:Math.abs(this.long0)<=T+st?this.face=this.long0>0?xt.RIGHT:xt.LEFT:this.face=xt.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function Kw(n){var t={x:0,y:0},e,i,r,s,a,o,l={value:0};if(n.x-=this.long0,this.es!==0?e=Math.atan(this.one_minus_f_squared*Math.tan(n.y)):e=n.y,i=n.x,this.face===xt.TOP)s=T-e,i>=st&&i<=T+st?(l.value=ft.AREA_0,r=i-T):i>T+st||i<=-(T+st)?(l.value=ft.AREA_1,r=i>0?i-vt:i+vt):i>-(T+st)&&i<=-st?(l.value=ft.AREA_2,r=i+T):(l.value=ft.AREA_3,r=i);else if(this.face===xt.BOTTOM)s=T+e,i>=st&&i<=T+st?(l.value=ft.AREA_0,r=-i+T):i<st&&i>=-st?(l.value=ft.AREA_1,r=-i):i<-st&&i>=-(T+st)?(l.value=ft.AREA_2,r=-i-T):(l.value=ft.AREA_3,r=i>0?-i+vt:-i-vt);else{var c,h,u,m,d,g,y;this.face===xt.RIGHT?i=ir(i,+T):this.face===xt.BACK?i=ir(i,+vt):this.face===xt.LEFT&&(i=ir(i,-T)),m=Math.sin(e),d=Math.cos(e),g=Math.sin(i),y=Math.cos(i),c=d*y,h=d*g,u=m,this.face===xt.FRONT?(s=Math.acos(c),r=oo(s,u,h,l)):this.face===xt.RIGHT?(s=Math.acos(h),r=oo(s,u,-c,l)):this.face===xt.BACK?(s=Math.acos(-c),r=oo(s,u,-h,l)):this.face===xt.LEFT?(s=Math.acos(-h),r=oo(s,u,c,l)):(s=r=0,l.value=ft.AREA_0)}return o=Math.atan(12/vt*(r+Math.acos(Math.sin(r)*Math.cos(st))-T)),a=Math.sqrt((1-Math.cos(s))/(Math.cos(o)*Math.cos(o))/(1-Math.cos(Math.atan(1/Math.cos(r))))),l.value===ft.AREA_1?o+=T:l.value===ft.AREA_2?o+=vt:l.value===ft.AREA_3&&(o+=1.5*vt),t.x=a*Math.cos(o),t.y=a*Math.sin(o),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,n.x=t.x,n.y=t.y,n}function Qw(n){var t={lam:0,phi:0},e,i,r,s,a,o,l,c,h,u={value:0};if(n.x=(n.x-this.x0)/this.a,n.y=(n.y-this.y0)/this.a,i=Math.atan(Math.sqrt(n.x*n.x+n.y*n.y)),e=Math.atan2(n.y,n.x),n.x>=0&&n.x>=Math.abs(n.y)?u.value=ft.AREA_0:n.y>=0&&n.y>=Math.abs(n.x)?(u.value=ft.AREA_1,e-=T):n.x<0&&-n.x>=Math.abs(n.y)?(u.value=ft.AREA_2,e=e<0?e+vt:e-vt):(u.value=ft.AREA_3,e+=T),h=vt/12*Math.tan(e),a=Math.sin(h)/(Math.cos(h)-1/Math.sqrt(2)),o=Math.atan(a),r=Math.cos(e),s=Math.tan(i),l=1-r*r*s*s*(1-Math.cos(Math.atan(1/Math.cos(o)))),l<-1?l=-1:l>1&&(l=1),this.face===xt.TOP)c=Math.acos(l),t.phi=T-c,u.value===ft.AREA_0?t.lam=o+T:u.value===ft.AREA_1?t.lam=o<0?o+vt:o-vt:u.value===ft.AREA_2?t.lam=o-T:t.lam=o;else if(this.face===xt.BOTTOM)c=Math.acos(l),t.phi=c-T,u.value===ft.AREA_0?t.lam=-o+T:u.value===ft.AREA_1?t.lam=-o:u.value===ft.AREA_2?t.lam=-o-T:t.lam=o<0?-o-vt:-o+vt;else{var m,d,g;m=l,h=m*m,h>=1?g=0:g=Math.sqrt(1-h)*Math.sin(o),h+=g*g,h>=1?d=0:d=Math.sqrt(1-h),u.value===ft.AREA_1?(h=d,d=-g,g=h):u.value===ft.AREA_2?(d=-d,g=-g):u.value===ft.AREA_3&&(h=d,d=g,g=-h),this.face===xt.RIGHT?(h=m,m=-d,d=h):this.face===xt.BACK?(m=-m,d=-d):this.face===xt.LEFT&&(h=m,m=d,d=-h),t.phi=Math.acos(-g)-T,t.lam=Math.atan2(d,m),this.face===xt.RIGHT?t.lam=ir(t.lam,-T):this.face===xt.BACK?t.lam=ir(t.lam,-vt):this.face===xt.LEFT&&(t.lam=ir(t.lam,+T))}if(this.es!==0){var y,v,S;y=t.phi<0?1:0,v=Math.tan(t.phi),S=this.b/Math.sqrt(v*v+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-S*S)/(this.one_minus_f*S)),y&&(t.phi=-t.phi)}return t.lam+=this.long0,n.x=t.lam,n.y=t.phi,n}function oo(n,t,e,i){var r;return n<D?(i.value=ft.AREA_0,r=0):(r=Math.atan2(t,e),Math.abs(r)<=st?i.value=ft.AREA_0:r>st&&r<=T+st?(i.value=ft.AREA_1,r-=T):r>T+st||r<=-(T+st)?(i.value=ft.AREA_2,r=r>=0?r-vt:r+vt):(i.value=ft.AREA_3,r+=T)),r}function ir(n,t){var e=n+t;return e<-vt?e+=Xn:e>+vt&&(e-=Xn),e}var tE=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"],Xp={init:$w,forward:Kw,inverse:Qw,names:tE};var ah=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],ss=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],qp=.8487,Yp=1.3523,jp=Pt/5,eE=1/jp,rr=18,lo=function(n,t){return n[0]+t*(n[1]+t*(n[2]+t*n[3]))},nE=function(n,t){return n[1]+t*(2*n[2]+t*3*n[3])};function iE(n,t,e,i){for(var r=t;i;--i){var s=n(r);if(r-=s,Math.abs(s)<e)break}return r}function rE(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function sE(n){var t=N(n.x-this.long0,this.over),e=Math.abs(n.y),i=Math.floor(e*jp);i<0?i=0:i>=rr&&(i=rr-1),e=Pt*(e-eE*i);var r={x:lo(ah[i],e)*t,y:lo(ss[i],e)};return n.y<0&&(r.y=-r.y),r.x=r.x*this.a*qp+this.x0,r.y=r.y*this.a*Yp+this.y0,n.z!==void 0&&(r.z=n.z),n.m!==void 0&&(r.m=n.m),r}function aE(n){var t={x:(n.x-this.x0)/(this.a*qp),y:Math.abs(n.y-this.y0)/(this.a*Yp)};if(t.y>=1)t.x/=ah[rr][0],t.y=n.y<0?-T:T;else{var e=Math.floor(t.y*rr);for(e<0?e=0:e>=rr&&(e=rr-1);;)if(ss[e][0]>t.y)--e;else if(ss[e+1][0]<=t.y)++e;else break;var i=ss[e],r=5*(t.y-i[0])/(ss[e+1][0]-i[0]);r=iE(function(s){return(lo(i,s)-t.y)/nE(i,s)},r,D,100),t.x/=lo(ah[e],r),t.y=(5*e+r)*dt,n.y<0&&(t.y=-t.y)}return t.x=N(t.x+this.long0,this.over),n.z!==void 0&&(t.z=n.z),n.m!==void 0&&(t.m=n.m),t}var oE=["Robinson","robin"],Zp={init:rE,forward:sE,inverse:aE,names:oE};function lE(){this.name="geocent"}function cE(n){var t=Ka(n,this.es,this.a);return t}function hE(n){var t=Qa(n,this.es,this.a,this.b);return t}var uE=["Geocentric","geocentric","geocent","Geocent"],Jp={init:lE,forward:cE,inverse:hE,names:uE};var Xt={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},as={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function fE(){if(Object.keys(as).forEach(function(e){if(typeof this[e]>"u")this[e]=as[e].def;else{if(as[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);as[e].num&&(this[e]=parseFloat(this[e]))}as[e].degrees&&(this[e]=this[e]*dt)}.bind(this)),Math.abs(Math.abs(this.lat0)-T)<D?this.mode=this.lat0<0?Xt.S_POLE:Xt.N_POLE:Math.abs(this.lat0)<D?this.mode=Xt.EQUIT:(this.mode=Xt.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var n=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(n),this.sw=Math.sin(n)}function dE(n){n.x-=this.long0;var t=Math.sin(n.y),e=Math.cos(n.y),i=Math.cos(n.x),r,s;switch(this.mode){case Xt.OBLIQ:s=this.sinph0*t+this.cosph0*e*i;break;case Xt.EQUIT:s=e*i;break;case Xt.S_POLE:s=-t;break;case Xt.N_POLE:s=t;break}switch(s=this.pn1/(this.p-s),r=s*e*Math.sin(n.x),this.mode){case Xt.OBLIQ:s*=this.cosph0*t-this.sinph0*e*i;break;case Xt.EQUIT:s*=t;break;case Xt.N_POLE:s*=-(e*i);break;case Xt.S_POLE:s*=e*i;break}var a,o;return a=s*this.cg+r*this.sg,o=1/(a*this.sw*this.h1+this.cw),r=(r*this.cg-s*this.sg)*this.cw*o,s=a*o,n.x=r*this.a,n.y=s*this.a,n}function pE(n){n.x/=this.a,n.y/=this.a;var t={x:n.x,y:n.y},e,i,r;r=1/(this.pn1-n.y*this.sw),e=this.pn1*n.x*r,i=this.pn1*n.y*this.cw*r,n.x=e*this.cg+i*this.sg,n.y=i*this.cg-e*this.sg;var s=At(n.x,n.y);if(Math.abs(s)<D)t.x=0,t.y=n.y;else{var a,o;switch(o=1-s*s*this.pfact,o=(this.p-Math.sqrt(o))/(this.pn1/s+s/this.pn1),a=Math.sqrt(1-o*o),this.mode){case Xt.OBLIQ:t.y=Math.asin(a*this.sinph0+n.y*o*this.cosph0/s),n.y=(a-this.sinph0*Math.sin(t.y))*s,n.x*=o*this.cosph0;break;case Xt.EQUIT:t.y=Math.asin(n.y*o/s),n.y=a*s,n.x*=o;break;case Xt.N_POLE:t.y=Math.asin(a),n.y=-n.y;break;case Xt.S_POLE:t.y=-Math.asin(a);break}t.x=Math.atan2(n.x,n.y)}return n.x=t.x+this.long0,n.y=t.y,n}var mE=["Tilted_Perspective","tpers"],$p={init:fE,forward:dE,inverse:pE,names:mE};function gE(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var n=1-this.es,t=1/n;this.radius_p=Math.sqrt(n),this.radius_p2=n,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function _E(n){var t=n.x,e=n.y,i,r,s,a;if(t=t-this.long0,this.shape==="ellipse"){e=Math.atan(this.radius_p2*Math.tan(e));var o=this.radius_p/At(this.radius_p*Math.cos(e),Math.sin(e));if(r=o*Math.cos(t)*Math.cos(e),s=o*Math.sin(t)*Math.cos(e),a=o*Math.sin(e),(this.radius_g-r)*r-s*s-a*a*this.radius_p_inv2<0)return n.x=Number.NaN,n.y=Number.NaN,n;i=this.radius_g-r,this.flip_axis?(n.x=this.radius_g_1*Math.atan(s/At(a,i)),n.y=this.radius_g_1*Math.atan(a/i)):(n.x=this.radius_g_1*Math.atan(s/i),n.y=this.radius_g_1*Math.atan(a/At(s,i)))}else this.shape==="sphere"&&(i=Math.cos(e),r=Math.cos(t)*i,s=Math.sin(t)*i,a=Math.sin(e),i=this.radius_g-r,this.flip_axis?(n.x=this.radius_g_1*Math.atan(s/At(a,i)),n.y=this.radius_g_1*Math.atan(a/i)):(n.x=this.radius_g_1*Math.atan(s/i),n.y=this.radius_g_1*Math.atan(a/At(s,i))));return n.x=n.x*this.a,n.y=n.y*this.a,n}function yE(n){var t=-1,e=0,i=0,r,s,a,o;if(n.x=n.x/this.a,n.y=n.y/this.a,this.shape==="ellipse"){this.flip_axis?(i=Math.tan(n.y/this.radius_g_1),e=Math.tan(n.x/this.radius_g_1)*At(1,i)):(e=Math.tan(n.x/this.radius_g_1),i=Math.tan(n.y/this.radius_g_1)*At(1,e));var l=i/this.radius_p;if(r=e*e+l*l+t*t,s=2*this.radius_g*t,a=s*s-4*r*this.C,a<0)return n.x=Number.NaN,n.y=Number.NaN,n;o=(-s-Math.sqrt(a))/(2*r),t=this.radius_g+o*t,e*=o,i*=o,n.x=Math.atan2(e,t),n.y=Math.atan(i*Math.cos(n.x)/t),n.y=Math.atan(this.radius_p_inv2*Math.tan(n.y))}else if(this.shape==="sphere"){if(this.flip_axis?(i=Math.tan(n.y/this.radius_g_1),e=Math.tan(n.x/this.radius_g_1)*Math.sqrt(1+i*i)):(e=Math.tan(n.x/this.radius_g_1),i=Math.tan(n.y/this.radius_g_1)*Math.sqrt(1+e*e)),r=e*e+i*i+t*t,s=2*this.radius_g*t,a=s*s-4*r*this.C,a<0)return n.x=Number.NaN,n.y=Number.NaN,n;o=(-s-Math.sqrt(a))/(2*r),t=this.radius_g+o*t,e*=o,i*=o,n.x=Math.atan2(e,t),n.y=Math.atan(i*Math.cos(n.x)/t)}return n.x=n.x+this.long0,n}var vE=["Geostationary Satellite View","Geostationary_Satellite","geos"],Kp={init:gE,forward:_E,inverse:yE,names:vE};var os=1.340264,ls=-.081106,cs=893e-6,hs=.003796,co=Math.sqrt(3)/2;function xE(){this.long0=this.long0!==void 0?this.long0:0,this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.es!==0&&(this.apa=is(this.es),this.qp=oe(this.e,1),this.rqda=Math.sqrt(.5*this.qp))}function ME(n){var t=N(n.x-this.long0,this.over),e=n.y,i=Math.sin(e);this.es!==0&&(i=oe(this.e,i)/this.qp);var r=Math.asin(co*i),s=r*r,a=s*s*s;return n.x=t*Math.cos(r)/(co*(os+3*ls*s+a*(7*cs+9*hs*s))),n.y=r*(os+ls*s+a*(cs+hs*s)),this.es!==0&&(n.x*=this.rqda,n.y*=this.rqda),n.x=this.a*n.x+this.x0,n.y=this.a*n.y+this.y0,n}function SE(n){n.x=(n.x-this.x0)/this.a,n.y=(n.y-this.y0)/this.a,this.es!==0&&(n.x/=this.rqda,n.y/=this.rqda);var t=1e-9,e=12,i=n.y,r,s,a,o,l,c;for(c=0;c<e&&(r=i*i,s=r*r*r,a=i*(os+ls*r+s*(cs+hs*r))-n.y,o=os+3*ls*r+s*(7*cs+9*hs*r),i-=l=a/o,!(Math.abs(l)<t));++c);return r=i*i,s=r*r*r,n.x=co*n.x*(os+3*ls*r+s*(7*cs+9*hs*r))/Math.cos(i),n.y=Math.asin(Math.sin(i)/co),this.es!==0&&(n.y=rs(n.y,this.apa)),n.x=N(n.x+this.long0,this.over),n}var bE=["eqearth","Equal Earth","Equal_Earth"],Qp={init:xE,forward:ME,inverse:SE,names:bE};var us=1e-10;function wE(){var n;if(this.phi1=this.lat1,Math.abs(this.phi1)<us)throw new Error;this.es?(this.en=Ki(this.es),this.m1=Ye(this.phi1,this.am1=Math.sin(this.phi1),n=Math.cos(this.phi1),this.en),this.am1=n/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=TE,this.forward=EE):(Math.abs(this.phi1)+us>=T?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=CE,this.forward=AE)}function EE(n){var t=N(n.x-(this.long0||0),this.over),e=n.y,i,r,s;return i=this.am1+this.m1-Ye(e,r=Math.sin(e),s=Math.cos(e),this.en),r=s*t/(i*Math.sqrt(1-this.es*r*r)),n.x=i*Math.sin(r),n.y=this.am1-i*Math.cos(r),n.x=this.a*n.x+(this.x0||0),n.y=this.a*n.y+(this.y0||0),n}function TE(n){n.x=(n.x-(this.x0||0))/this.a,n.y=(n.y-(this.y0||0))/this.a;var t,e,i,r;if(e=At(n.x,n.y=this.am1-n.y),r=Qi(this.am1+this.m1-e,this.es,this.en),(t=Math.abs(r))<T)t=Math.sin(r),i=e*Math.atan2(n.x,n.y)*Math.sqrt(1-this.es*t*t)/Math.cos(r);else if(Math.abs(t-T)<=us)i=0;else throw new Error;return n.x=N(i+(this.long0||0),this.over),n.y=ae(r),n}function AE(n){var t=N(n.x-(this.long0||0),this.over),e=n.y,i,r;return r=this.cphi1+this.phi1-e,Math.abs(r)>us?(n.x=r*Math.sin(i=t*Math.cos(e)/r),n.y=this.cphi1-r*Math.cos(i)):n.x=n.y=0,n.x=this.a*n.x+(this.x0||0),n.y=this.a*n.y+(this.y0||0),n}function CE(n){n.x=(n.x-(this.x0||0))/this.a,n.y=(n.y-(this.y0||0))/this.a;var t,e,i=At(n.x,n.y=this.cphi1-n.y);if(e=this.cphi1+this.phi1-i,Math.abs(e)>T)throw new Error;return Math.abs(Math.abs(e)-T)<=us?t=0:t=i*Math.atan2(n.x,n.y)/Math.cos(e),n.x=N(t+(this.long0||0),this.over),n.y=ae(e),n}var PE=["bonne","Bonne (Werner lat_1=90)"],tm={init:wE,names:PE};var em={OBLIQUE:{forward:DE,inverse:FE},TRANSVERSE:{forward:UE,inverse:OE}},ho={ROTATE:{o_alpha:"oAlpha",o_lon_c:"oLongC",o_lat_c:"oLatC"},NEW_POLE:{o_lat_p:"oLatP",o_lon_p:"oLongP"},NEW_EQUATOR:{o_lon_1:"oLong1",o_lat_1:"oLat1",o_lon_2:"oLong2",o_lat_2:"oLat2"}};function RE(){if(this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.title=this.title||"General Oblique Transformation",this.isIdentity=kc.includes(this.o_proj),!this.o_proj)throw new Error("Missing parameter: o_proj");if(this.o_proj==="ob_tran")throw new Error("Invalid value for o_proj: "+this.o_proj);let n=this.projStr.replace("+proj=ob_tran","").replace("+o_proj=","+proj=").trim(),t=Ne(n);if(!t)throw new Error("Invalid parameter: o_proj. Unknown projection "+this.o_proj);t.long0=0,this.obliqueProjection=t;let e,i=Object.keys(ho),r=o=>{if(typeof this[o]>"u")return;let l=parseFloat(this[o])*dt;if(isNaN(l))throw new Error("Invalid value for "+o+": "+this[o]);return l};for(let o=0;o<i.length;o++){let l=i[o],c=ho[l],h=Object.entries(c);if(h.some(([m])=>typeof this[m]<"u")){e=c;for(let m=0;m<h.length;m++){let[d,g]=h[m],y=r(d);if(typeof y>"u")throw new Error("Missing parameter: "+d+".");this[g]=y}break}}if(!e)throw new Error("No valid parameters provided for ob_tran projection.");let{lamp:s,phip:a}=NE(this,e);this.lamp=s,Math.abs(a)>D?(this.cphip=Math.cos(a),this.sphip=Math.sin(a),this.projectionType=em.OBLIQUE):this.projectionType=em.TRANSVERSE}function IE(n){return this.projectionType.forward(this,n)}function LE(n){return this.projectionType.inverse(this,n)}function NE(n,t){let e,i;if(t===ho.ROTATE){let r=n.oLongC,s=n.oLatC,a=n.oAlpha;if(Math.abs(Math.abs(s)-T)<=D)throw new Error("Invalid value for o_lat_c: "+n.o_lat_c+" should be < 90\xB0");i=r+Math.atan2(-1*Math.cos(a),-1*Math.sin(a)*Math.sin(s)),e=Math.asin(Math.cos(s)*Math.sin(a))}else if(t===ho.NEW_POLE)i=n.oLongP,e=n.oLatP;else{let r=n.oLong1,s=n.oLat1,a=n.oLong2,o=n.oLat2,l=Math.abs(s);if(Math.abs(s)>T-D)throw new Error("Invalid value for o_lat_1: "+n.o_lat_1+" should be < 90\xB0");if(Math.abs(o)>T-D)throw new Error("Invalid value for o_lat_2: "+n.o_lat_2+" should be < 90\xB0");if(Math.abs(s-o)<D)throw new Error("Invalid value for o_lat_1 and o_lat_2: o_lat_1 should be different from o_lat_2");if(l<D)throw new Error("Invalid value for o_lat_1: o_lat_1 should be different from zero");i=Math.atan2(Math.cos(s)*Math.sin(o)*Math.cos(r)-Math.sin(s)*Math.cos(o)*Math.cos(a),Math.sin(s)*Math.cos(o)*Math.sin(a)-Math.cos(s)*Math.sin(o)*Math.sin(r)),e=Math.atan(-1*Math.cos(i-r)/Math.tan(s))}return{lamp:i,phip:e}}function DE(n,t){let{x:e,y:i}=t;e=N(e-n.long0,n.over);let r=Math.cos(e),s=Math.sin(i),a=Math.cos(i);t.x=N(Math.atan2(a*Math.sin(e),n.sphip*a*r+n.cphip*s)+n.lamp),t.y=Math.asin(n.sphip*s-n.cphip*a*r);let o=n.obliqueProjection.forward(t);return n.isIdentity&&(o.x*=Pt,o.y*=Pt),o}function UE(n,t){let{x:e,y:i}=t;e=N(e-n.long0,n.over);let r=Math.cos(i),s=Math.cos(e);t.x=N(Math.atan2(r*Math.sin(e),Math.sin(i))+n.lamp),t.y=Math.asin(-1*r*s);let a=n.obliqueProjection.forward(t);return n.isIdentity&&(a.x*=Pt,a.y*=Pt),a}function FE(n,t){n.isIdentity&&(t.x*=dt,t.y*=dt);let e=n.obliqueProjection.inverse(t),{x:i,y:r}=e;if(i<Number.MAX_VALUE){i-=n.lamp;let s=Math.cos(i),a=Math.sin(r),o=Math.cos(r);t.x=Math.atan2(o*Math.sin(i),n.sphip*o*s-n.cphip*a),t.y=Math.asin(n.sphip*a+n.cphip*o*s)}return t.x=N(t.x+n.long0),t}function OE(n,t){n.isIdentity&&(t.x*=dt,t.y*=dt);let e=n.obliqueProjection.inverse(t),{x:i,y:r}=e;if(i<Number.MAX_VALUE){let s=Math.cos(r);i-=n.lamp,t.x=Math.atan2(s*Math.sin(i),-1*Math.sin(r)),t.y=Math.asin(s*Math.cos(i))}return t.x=N(t.x+n.long0),t}var BE=["General Oblique Transformation","General_Oblique_Transformation","ob_tran"],nm={init:RE,forward:IE,inverse:LE,names:BE};function im(n){n.Proj.projections.add(tr),n.Proj.projections.add(er),n.Proj.projections.add(yp),n.Proj.projections.add(vp),n.Proj.projections.add(xp),n.Proj.projections.add(Mp),n.Proj.projections.add(Sp),n.Proj.projections.add(bp),n.Proj.projections.add(wp),n.Proj.projections.add(Ep),n.Proj.projections.add(Tp),n.Proj.projections.add(Ap),n.Proj.projections.add(Cp),n.Proj.projections.add(Rp),n.Proj.projections.add(Ip),n.Proj.projections.add(Np),n.Proj.projections.add(Dp),n.Proj.projections.add(Up),n.Proj.projections.add(Fp),n.Proj.projections.add(Op),n.Proj.projections.add(Bp),n.Proj.projections.add(Gp),n.Proj.projections.add(zp),n.Proj.projections.add(Hp),n.Proj.projections.add(Wp),n.Proj.projections.add(Xp),n.Proj.projections.add(Zp),n.Proj.projections.add(Jp),n.Proj.projections.add($p),n.Proj.projections.add(Kp),n.Proj.projections.add(Qp),n.Proj.projections.add(tm),n.Proj.projections.add(nm)}var rm=Object.assign(ep,{defaultDatum:"WGS84",Proj:Ne,WGS84:new Ne("WGS84"),Point:cp,toPoint:Zi,defs:qi,nadgrid:qc,transform:Yc,mgrs:ap,version:"__VERSION__"});im(rm);var je=rm;var fs=class{_rootMap=new Map;get size(){if(this._rootMap.size===0)return 0;let t=0;return this._rootMap.forEach(e=>t+=e.size),t}forEach(t){this._rootMap.size!==0&&this._rootMap.forEach((e,i)=>{e.forEach((r,s)=>t(r,i,s,this))})}has(t,e){return this._rootMap.get(t)?.has(e)??!1}clear(){this._rootMap.clear()}getOrCreate(t,e,i){let r=this._rootMap.get(t);r==null&&(r=new Map,this._rootMap.set(t,r));let s=r.get(e);return s==null&&(s=i(t,e),r.set(e,s)),s}};var XO=new fs;var JO=new nt(0,0);function ds(n){return n[2]-n[0]}function oh(n,t,e){return Math.min(Math.max(n,t),e)}function sm(n,t,e){let i=t.getExtent(),r=0;return t.canWrapX()&&(n[0]<i[0]||n[0]>i[2])&&(e=e||ds(i),r=Math.floor((n[0]-i[0])/e)),r}var am={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};var lh=class{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||am[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}},jn=lh;var ps=6378137,sr=Math.PI*ps,zE=[-sr,-sr,sr,sr],kE=[-180,-85,180,85],uo=ps*Math.log(Math.tan(Math.PI/2)),Zn=class extends jn{constructor(t){super({code:t,units:"m",extent:zE,global:!0,worldExtent:kE,getPointResolution:function(e,i){return e/Math.cosh(i[1]/ps)}})}},ch=[new Zn("EPSG:3857"),new Zn("EPSG:102100"),new Zn("EPSG:102113"),new Zn("EPSG:900913"),new Zn("http://www.opengis.net/def/crs/EPSG/0/3857"),new Zn("http://www.opengis.net/gml/srs/epsg.xml#3857")];function om(n,t,e,i){let r=n.length;e=e!==void 0&&e>1?e:2,i=i??e,t===void 0&&(e>2?t=n.slice():t=new Array(r));for(let s=0;s<r;s+=i){t[s]=sr*n[s]/180;let a=ps*Math.log(Math.tan(Math.PI*(+n[s+1]+90)/360));a>uo?a=uo:a<-uo&&(a=-uo),t[s+1]=a}return t}function lm(n,t,e,i){let r=n.length;e=e!==void 0&&e>1?e:2,i=i??e,t===void 0&&(e>2?t=n.slice():t=new Array(r));for(let s=0;s<r;s+=i)t[s]=180*n[s]/sr,t[s+1]=360*Math.atan(Math.exp(n[s+1]/ps))/Math.PI-90;return t}var VE=6378137,cm=[-180,-90,180,90],HE=Math.PI*VE/180,xn=class extends jn{constructor(t,e){super({code:t,units:"degrees",extent:cm,axisOrientation:e,global:!0,metersPerUnit:HE,worldExtent:cm})}},hh=[new xn("CRS:84"),new xn("EPSG:4326","neu"),new xn("urn:ogc:def:crs:OGC:1.3:CRS84"),new xn("urn:ogc:def:crs:OGC:2:84"),new xn("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new xn("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new xn("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];var uh={};function ar(n){return uh[n]||uh[n.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function hm(n,t){uh[n]=t}var or={};function ci(n,t,e){let i=n.getCode(),r=t.getCode();i in or||(or[i]={}),or[i][r]=e}function fh(n,t){return n in or&&t in or[n]?or[n][t]:null}var Jn=.00669438,fo=Jn*Jn,po=fo*Jn,d8=Jn/(1-Jn),um=Math.sqrt(1-Jn),lr=(1-um)/(1+um),fm=lr*lr,dh=fm*lr,ph=dh*lr,dm=ph*lr,p8=1-Jn/4-3*fo/64-5*po/256,m8=3*Jn/8+3*fo/32+45*po/1024,g8=15*fo/256+45*po/1024,_8=35*po/3072,y8=3/2*lr-27/32*dh+269/512*dm,v8=21/16*fm-55/32*ph,x8=151/96*dh-417/128*dm,M8=1097/512*ph;var WE=[/^EPSG:(\d+)$/,/^urn:ogc:def:crs:EPSG::(\d+)$/,/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/];function XE(n){let t=0;for(let r of WE){let s=n.match(r);if(s){t=parseInt(s[1]);break}}if(!t)return null;let e=0,i=!1;return t>32700&&t<32761?e=t-32700:t>32600&&t<32661&&(i=!0,e=t-32600),e?{number:e,north:i}:null}function pm(n){return XE(n)?new jn({code:n,units:"m"}):null}var qE=[pm];function _m(n,t){if(t!==void 0){for(let e=0,i=n.length;e<i;++e)t[e]=n[e];t=t}else t=n.slice();return t}function mh(n){hm(n.getCode(),n),ci(n,n,_m)}function YE(n){n.forEach(mh)}function mm(n){if(typeof n!="string")return n!==void 0?n:null;let t=ar(n);if(t)return t;for(let e of qE){let i=e(n);if(i)return i}return null}function mo(n){YE(n),n.forEach(function(t){n.forEach(function(e){t!==e&&ci(t,e,_m)})})}function jE(n,t,e,i){n.forEach(function(r){t.forEach(function(s){ci(r,s,e),ci(s,r,i)})})}function gm(n){return(function(t,e,i,r){let s=t.length;i=i!==void 0?i:2,r=r??i,e=e!==void 0?e:new Array(s);for(let a=0;a<s;a+=r){let o=n(t.slice(a,a+i)),l=o.length;for(let c=0,h=r;c<h;++c)e[a+c]=c>=l?t[a+c]:o[c]}return e})}function ym(n,t,e,i){let r=mm(n),s=mm(t);!r||!s||(ci(r,s,gm(e)),ci(s,r,gm(i)))}function gh(n,t,e){return function(i){let r,s;if(n.canWrapX()){let a=n.getExtent(),o=ds(a);i=i.slice(0),s=sm(i,n,o),s&&(i[0]=i[0]-s*o),i[0]=oh(i[0],a[0],a[2]),i[1]=oh(i[1],a[1],a[3]),r=e(i)}else r=e(i);return s&&t.canWrapX()&&(r[0]+=s*ds(t.getExtent())),r}}function ZE(){mo(ch),mo(hh),jE(hh,ch,om,lm)}ZE();var JE=null;function go(n){JE=n;let t=Object.keys(n.defs),e=t.length,i,r;for(i=0;i<e;++i){let s=t[i];if(!ar(s)){let a=n.defs(s),o=a.units;!o&&a.projName==="longlat"&&(o="degrees"),mh(new jn({code:s,axisOrientation:a.axis,metersPerUnit:a.to_meter,units:o}))}}for(i=0;i<e;++i){let s=t[i],a=ar(s);for(r=0;r<e;++r){let o=t[r],l=ar(o);if(!(!a||!l)&&!fh(s,o))if(n.defs(s)===n.defs(o))mo([a,l]);else{let c=n(s,o);ym(a,l,gh(a,l,c.forward),gh(l,a,c.inverse))}}}}var _h=class n{constructor(t,e){this._authority=t,this._code=e}static parse(t){let e=t.trim().split(":");if(e.length===2){let i=Number.parseInt(e[1]);return new n(e[0],i)}throw new Error("could not parse SRID")}get authority(){return this._authority}get code(){return this._code}toString(){return`${this._authority}:${this._code}`}isEpsg(t){return this._authority==="EPSG"&&this._code===t}tryGetEpsgCode(){return this._authority!=="EPSG"?null:this._code}},hi=_h;function vm(n){switch(n.name.toLowerCase()){case"deg":case"degree":case"degrees":return"\xB0";case"rad":case"radian":case"radians":return"rad";case"m":case"meter":case"metre":case"meters":case"metres":return"m";case"ft":case"foot":case"feet":case"us-ft":case"us survey feet":case"us survey foot":return"ft";default:return""}}var $t=class n{type="linear";constructor(t,e){this.name=t,this.metersPerUnit=e}getSymbol(){return vm(this)}static meters=new n("meters",1);static feet=new n("feet",.3048);static usSurveyFeet=new n("US Survey feet",.304800609601219);equals(t){return t.metersPerUnit===this.metersPerUnit}static isLinearUnit(t){return t?t.type==="linear":!1}},Mn=class n{type="angular";constructor(t,e){this.name=t,this.degreesPerUnit=e}getSymbol(){return vm(this)}static degrees=new n("degrees",1);static radians=new n("radians",57.29578);equals(t){return t.degreesPerUnit===this.degreesPerUnit}static isAngularUnit(t){return t?t.type==="angular":!1}};function xm(n){switch(n.trim().toLowerCase()){case"deg":case"degree":case"degrees":return Mn.degrees;case"rad":case"radian":case"radians":return Mn.radians;case"m":case"meter":case"meters":case"metre":case"metres":return $t.meters;case"ft":case"feet":case"foot":return $t.feet;case"us-ft":case"us survey feet":case"us survey foot":case"foot (us survey)":return $t.usSurveyFeet;default:return}}function bm(n){return new $t(n.name,n.convert)}function yh(n){let[t,e]=Object.entries(n)[0];return new hi(t,Number.parseInt(e))}function vh(n){return"name"in n&&typeof n.name=="string"?n.name:"<unknown>"}function Mm(n){let t=vh(n),e=bm(n.UNIT);if(n.AUTHORITY){let i=yh(n.AUTHORITY);return{name:t,srid:i,unit:e}}return{name:t,unit:e}}var Sm=class n{static epsg3857=new n({name:"WGS 84 / Pseudo-Mercator",srid:new hi("EPSG",3857),horizontal:{unit:$t.meters},vertical:{unit:$t.meters}});static epsg4326=new n({name:"WGS 84",srid:new hi("EPSG",4326),horizontal:{unit:Mn.degrees},vertical:{unit:$t.meters}});static epsg4978=new n({name:"WGS 84",srid:new hi("EPSG",4978),horizontal:{unit:$t.meters},vertical:{unit:$t.meters}});static epsg4979=new n({name:"WGS 84",srid:new hi("EPSG",4979),horizontal:{unit:Mn.degrees},vertical:{unit:$t.meters}});static equirectangular=new n({name:"equirectangular",horizontal:{unit:Mn.degrees}});static unknown=new n({name:"unknown"});static _registry=new Map([["EPSG:3857",n.epsg3857],["EPSG:4326",n.epsg4326],["EPSG:4978",n.epsg4978],["EPSG:4979",n.epsg4979],["equirectangular",n.equirectangular],["unknown",n.unknown]]);static register(t,e,i){if(this._registry.has(t))return this._registry.get(t);try{this.registerCRSWithProjAndOpenLayers(t,e)}catch(s){if(i?.throwIfFailedToRegisterWithProj===!0)throw s;console.warn(s)}let r=n.fromWkt(e,{id:t});return this._registry.set(t,r),r}static clearRegistry(){this._registry.clear(),this._registry.set("EPSG:3857",n.epsg3857),this._registry.set("EPSG:4326",n.epsg4326),this._registry.set("EPSG:4978",n.epsg4978),this._registry.set("EPSG:4979",n.epsg4979),this._registry.set("equirectangular",n.equirectangular),this._registry.set("unknown",n.unknown)}static registerCRSWithProjAndOpenLayers(t,e){if(!t||t==="")throw new Error("missing CRS name");if(!e||e==="")throw new Error("missing CRS PROJ string");try{je.defs(t,e)}catch(i){let r="";throw i instanceof Error&&(r=": "+i.message),new Error(`failed to register PROJ definition for ${t}${r}`)}try{go(je)}catch(i){let r="";throw i instanceof Error&&(r=": "+i.message),new Error(`failed to register PROJ definitions in OpenLayers${r}`)}}static get(t){let e=this._registry.get(t);if(e)return e;throw new Error(`coordinate system not found: ${t}`)}static fromWkt(t,e){try{let i;try{i=qn(t)}catch{i=Za(t)}if("ID"in i)return new n({id:e?.id,name:vh(i),srid:yh(i.ID),definition:t});if("PROJCS"in i){let r=Mm(i.PROJCS),s={id:e?.id,name:r.name,srid:r.srid,definition:t,horizontal:{unit:r.unit}};return"VERT_CS"in i&&(s.vertical={unit:bm(i.VERT_CS.UNIT)}),new n(s)}else if("type"in i&&i.type==="PROJCS"){let r=Mm(i);return new n({id:e?.id,name:r.name,srid:r.srid,definition:t,horizontal:{unit:r.unit}})}else{let r,s;return"AUTHORITY"in i&&typeof i.AUTHORITY=="object"&&i.AUTHORITY&&(r=yh(i.AUTHORITY)),"title"in i&&typeof i.title=="string"&&(r=hi.parse(i.title)),"units"in i&&typeof i.units=="string"&&(s=xm(i.units)),new n({id:e?.id,name:vh(i),srid:r,horizontal:s!=null?{unit:s}:void 0})}}catch(i){throw console.error(`Failed to parse wkt "${t}".`),i}}get id(){return typeof this._customId<"u"?this._customId:typeof this.srid<"u"?this.srid.toString():this.name}constructor(t){this.name=t.name,this.srid=t.srid,this._customId=t.id,typeof t.horizontal<"u"&&(this.horizontal=t.horizontal),typeof t.vertical<"u"&&(this.vertical=t.vertical),typeof t.definition<"u"&&(this.definition=t.definition)}isGeographic(){let t=this.horizontal?.unit;return!!Mn.isAngularUnit(t)}get metersPerHorizontalUnit(){let t=this.horizontal?.unit;return $t.isLinearUnit(t)?t.metersPerUnit:1}get metersPerVerticalUnit(){let t=this.vertical?.unit;return $t.isLinearUnit(t)?t.metersPerUnit:this.metersPerHorizontalUnit}isEpsg(t){return typeof this.srid<"u"?this.srid.isEpsg(t):!1}isEquirectangular(){return this.name==="equirectangular"}isUnknown(){return this.name==="unknown"&&typeof this.definition>"u"}equals(t){return this.id===t.id}};je.defs("EPSG:4978","+proj=geocent +datum=WGS84 +units=m +no_defs +type=crs");je.defs("EPSG:4979","+proj=longlat +datum=WGS84 +no_defs +type=crs");je.defs("equirectangular","+proj=longlat +datum=WGS84 +no_defs +type=crs");go(je);var uB=new nt;var fB=[new nt,new nt,new nt,new nt,new nt,new nt,new nt,new nt];var tT=1024,eT=1024*tT,MB=1024*eT;var Et=class n{constructor(t,e=!0){this.color=new et(t),this.visible=e}clone(){return new n(this.color.clone(),this.visible)}},Mt=new Array(256),xh=new Et(16744704);for(let n=0;n<Mt.length;n++)Mt[n]=xh.clone();Mt[0]=new Et("#858585");Mt[1]=new Et("#bfbfbf");Mt[2]=new Et("#834000");Mt[3]=new Et("#008100");Mt[4]=new Et("#00bf00");Mt[5]=new Et("#00ff00");Mt[6]=new Et("#0081c1");Mt[7]=new Et("#ff0000");Mt[8]=xh.clone();Mt[9]=new Et("#0000ff");Mt[10]=new Et("#606d73");Mt[11]=new Et("#858585");Mt[12]=xh.clone();Mt[13]=new Et("#ede440");Mt[14]=new Et("#ed6840");Mt[15]=new Et("#29fff8");Mt[16]=new Et("#5e441d");Mt[17]=new Et("#7992c7");Mt[18]=new Et("#cd27d6");var ZB=new nt;var e5=new et(0,0,0);var l5=new et(0,0,0),c5=new Gr;var T5=new et,A5=new et;var a6=new nt(256,256),o6=new C,l6=new Lc({colors:[new et("black"),new et("white")],min:0,max:1e3}),c6=new Ct,h6=new et("#d8eb34"),u6={empty:new et("grey"),hidden:new et("#fc4903"),loading:new et("#f5da8c"),displayed:new et("#8cf59b")};var _o=class extends Error{constructor(t){super(`attribute '${t}' is not supported in this source`)}};function Em(n,t,e,i){let r=n.pointCount,[s,a,o]=["Red","Green","Blue"].map(n.getter),l=new jr(e?new Uint8Array(r*3):new Uint16Array(r*3));l.length=0;let c=e?1/65536*256:1;for(let h=0;h<r;h+=t)if(Wa(i,h)){let u=s(h)*c,m=a(h)*c,d=o(h)*c;l.push(u,m,d)}return l.array.buffer}function Tm(n,t,e,i){let r=n.pointCount,[s,a,o]=["X","Y","Z"].map(n.getter),l=Math.floor(r/e)+r%e,c=new jr(new Float32Array(l*3));c.length=0;let h=1/0,u=1/0,m=1/0,d=-1/0,g=-1/0,y=-1/0;for(let v=0;v<r;v+=e)if(Wa(i,v)){let S=s(v)-t.x,w=a(v)-t.y,I=o(v)-t.z;h=Math.min(S,h),u=Math.min(w,u),m=Math.min(I,m),d=Math.max(S,d),g=Math.max(w,g),y=Math.max(I,y),c.push(S,w,I)}return c.trim(),{buffer:c.array.buffer,localBoundingBox:new Re(new C(h,u,m),new C(d,g,y))}}function uT(n,t,e,i,r){for(let s=0;s<t;s+=e)Wa(r,s)&&i.push(n(s))}function Am(n,t,e,i){let r=t.name,s;switch(t.type){case"float":s=ui(Float32Array);break;case"signed":switch(t.size){case 1:s=ui(Int8Array);break;case 2:s=ui(Int16Array);break;case 4:s=ui(Int32Array);break;default:throw new Error("invalid attribute size for signed values: "+t.size)}break;case"unsigned":switch(t.size){case 1:s=ui(Uint8Array);break;case 2:s=ui(Uint16Array);break;case 4:s=ui(Uint32Array);break;default:throw new Error("invalid attribute size for unsigned values: "+t.size)}break;default:throw new _o(r)}return s(r,n,e,i)}function ui(n){return(t,e,i,r)=>{let s=e.pointCount,a=new ad(s,o=>new n(o));return uT(e.getter(t),s,i,a,r),a.getArray().buffer}}async function Cm(n,t){let e=await Cc();return yo.Las.PointData.decompressChunk(new Uint8Array(n),t,e)}async function fT(n){let t=await Cc();return yo.Las.PointData.decompressFile(new Uint8Array(n),t)}function dT(n){Cm(n.payload.buffer,n.payload.metadata).then(t=>{let e={requestId:n.id,payload:t.buffer};postMessage(e,{transfer:[t.buffer]})}).catch(t=>{postMessage(Xi(n.id,t))})}function pT(n){fT(n.payload.buffer).then(t=>{let e={requestId:n.id,payload:t.buffer};postMessage(e,{transfer:[t.buffer]})}).catch(t=>{console.error(t),postMessage(Xi(n.id,t))})}function mT(n,t,e,i){let r=yo.Las.View.create(n,t,e,i);if(e){let s={};for(let[a,o]of Object.entries(r.dimensions)){let l=o,c=e.find(h=>h.name===a);c&&(c.type==="signed"||c.type==="unsigned")&&(typeof c.scale=="number"&&c.scale!==1||typeof c.offset=="number"&&c.offset!==0)&&(l={type:"float",size:4}),s[a]=l}r.dimensions=s}return r}function gT(n){let{view:t,filters:e,origin:i,attributes:r,compressColors:s}=n,a=n.stride??1,o=sd(e??[],t),l;if(n.position){let h=Tm(t,i,a,o),u=[h.localBoundingBox.min.x,h.localBoundingBox.min.y,h.localBoundingBox.min.z,h.localBoundingBox.max.x,h.localBoundingBox.max.y,h.localBoundingBox.max.z];l={buffer:h.buffer,localBoundingBox:u}}let c=r.map(h=>{switch(h.interpretation){case"color":return Em(t,a,s,o);case"classification":case"unknown":return Am(t,h,a,o)}});return{position:l,attributes:c}}function _T(n){let{buffer:t,metadata:e,header:i,eb:r,include:s}=n.payload;Cm(t,e).then(a=>{let o=mT(a,i,r,s),l=gT({...n.payload,view:o}),c={requestId:n.id,payload:l},h=[...l.attributes];l.position&&h.push(l.position.buffer),postMessage(c,{transfer:h})}).catch(a=>{console.error(a),postMessage(Xi(n.id,a))})}onmessage=n=>{let t=n.data;switch(t.type){case"DecodeLazChunk":dT(t);break;case"DecodeLazFile":pT(t);break;case"ReadView":_T(t);break;case"SetWasmBinary":rd(t.buffer);break}};export{mT as createLasView,gT as readView};