@swissgeo/coordinates 1.0.0 → 1.0.2
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.
- package/README.md +10 -3
- package/dist/{registerProj4-BuUOcPpF.cjs → index-D7Gdk-1d.cjs} +6 -6
- package/dist/{registerProj4-CwR_kPOz.js → index-DZ4q3KlK.js} +1932 -1987
- package/dist/index.cjs +5 -5
- package/dist/index.js +605 -551
- package/dist/ol.cjs +1 -1
- package/dist/ol.d.ts +2 -4
- package/dist/ol.js +480 -3988
- package/package.json +1 -1
- package/src/DevApp.vue +10 -3
- package/src/ol.ts +7 -14
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";function cv(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var i=1;i<=60;++i)t("EPSG:"+(32600+i),"+proj=utm +zone="+i+" +datum=WGS84 +units=m"),t("EPSG:"+(32700+i),"+proj=utm +zone="+i+" +south +datum=WGS84 +units=m");t("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"),t("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"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}var yi=1,pi=2,Yi=3,_v=4,Ja=5,Z0=6378137,gv=6356752314e-3,V0=.0066943799901413165,Rn=484813681109536e-20,O=Math.PI/2,vv=.16666666666666666,dv=.04722222222222222,Mv=.022156084656084655,B=1e-10,yt=.017453292519943295,Yt=57.29577951308232,ot=Math.PI/4,Fn=Math.PI*2,Et=3.14159265359,Kt={};Kt.greenwich=0;Kt.lisbon=-9.131906111111;Kt.paris=2.337229166667;Kt.bogota=-74.080916666667;Kt.madrid=-3.687938888889;Kt.rome=12.452333333333;Kt.bern=7.439583333333;Kt.jakarta=106.807719444444;Kt.ferro=-17.666666666667;Kt.brussels=4.367975;Kt.stockholm=18.058277777778;Kt.athens=23.7163375;Kt.oslo=10.722916666667;const mv={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 j0=/[\s_\-\/\(\)]/g;function ii(t,i){if(t[i])return t[i];for(var n=Object.keys(t),s=i.toLowerCase().replace(j0,""),o=-1,h,f;++o<n.length;)if(h=n[o],f=h.toLowerCase().replace(j0,""),f===s)return t[h]}function Za(t){var i={},n=t.split("+").map(function(u){return u.trim()}).filter(function(u){return u}).reduce(function(u,c){var g=c.split("=");return g.push(!0),u[g[0].toLowerCase()]=g[1],u},{}),s,o,h,f={proj:"projName",datum:"datumCode",rf:function(u){i.rf=parseFloat(u)},lat_0:function(u){i.lat0=u*yt},lat_1:function(u){i.lat1=u*yt},lat_2:function(u){i.lat2=u*yt},lat_ts:function(u){i.lat_ts=u*yt},lon_0:function(u){i.long0=u*yt},lon_1:function(u){i.long1=u*yt},lon_2:function(u){i.long2=u*yt},alpha:function(u){i.alpha=parseFloat(u)*yt},gamma:function(u){i.rectified_grid_angle=parseFloat(u)*yt},lonc:function(u){i.longc=u*yt},x_0:function(u){i.x0=parseFloat(u)},y_0:function(u){i.y0=parseFloat(u)},k_0:function(u){i.k0=parseFloat(u)},k:function(u){i.k0=parseFloat(u)},a:function(u){i.a=parseFloat(u)},b:function(u){i.b=parseFloat(u)},r:function(u){i.a=i.b=parseFloat(u)},r_a:function(){i.R_A=!0},zone:function(u){i.zone=parseInt(u,10)},south:function(){i.utmSouth=!0},towgs84:function(u){i.datum_params=u.split(",").map(function(c){return parseFloat(c)})},to_meter:function(u){i.to_meter=parseFloat(u)},units:function(u){i.units=u;var c=ii(mv,u);c&&(i.to_meter=c.to_meter)},from_greenwich:function(u){i.from_greenwich=u*yt},pm:function(u){var c=ii(Kt,u);i.from_greenwich=(c||parseFloat(u))*yt},nadgrids:function(u){u==="@null"?i.datumCode="none":i.nadgrids=u},axis:function(u){var c="ewnsud";u.length===3&&c.indexOf(u.substr(0,1))!==-1&&c.indexOf(u.substr(1,1))!==-1&&c.indexOf(u.substr(2,1))!==-1&&(i.axis=u)},approx:function(){i.approx=!0},over:function(){i.over=!0}};for(s in n)o=n[s],s in f?(h=f[s],typeof h=="function"?h(o):i[h]=o):i[s]=o;return typeof i.datumCode=="string"&&i.datumCode!=="WGS84"&&(i.datumCode=i.datumCode.toLowerCase()),i.projStr=t,i}class Ou{static getId(i){const n=i.find(s=>Array.isArray(s)&&s[0]==="ID");return n&&n.length>=3?{authority:n[1],code:parseInt(n[2],10)}:null}static convertUnit(i,n="unit"){if(!i||i.length<3)return{type:n,name:"unknown",conversion_factor:null};const s=i[1],o=parseFloat(i[2])||null,h=i.find(u=>Array.isArray(u)&&u[0]==="ID"),f=h?{authority:h[1],code:parseInt(h[2],10)}:null;return{type:n,name:s,conversion_factor:o,id:f}}static convertAxis(i){const n=i[1]||"Unknown";let s;const o=n.match(/^\((.)\)$/);if(o){const g=o[1].toUpperCase();if(g==="E")s="east";else if(g==="N")s="north";else if(g==="U")s="up";else throw new Error(`Unknown axis abbreviation: ${g}`)}else s=i[2]?i[2].toLowerCase():"unknown";const h=i.find(g=>Array.isArray(g)&&g[0]==="ORDER"),f=h?parseInt(h[1],10):null,u=i.find(g=>Array.isArray(g)&&(g[0]==="LENGTHUNIT"||g[0]==="ANGLEUNIT"||g[0]==="SCALEUNIT")),c=this.convertUnit(u);return{name:n,direction:s,unit:c,order:f}}static extractAxes(i){return i.filter(n=>Array.isArray(n)&&n[0]==="AXIS").map(n=>this.convertAxis(n)).sort((n,s)=>(n.order||0)-(s.order||0))}static convert(i,n={}){switch(i[0]){case"PROJCRS":n.type="ProjectedCRS",n.name=i[1],n.base_crs=i.find(v=>Array.isArray(v)&&v[0]==="BASEGEOGCRS")?this.convert(i.find(v=>Array.isArray(v)&&v[0]==="BASEGEOGCRS")):null,n.conversion=i.find(v=>Array.isArray(v)&&v[0]==="CONVERSION")?this.convert(i.find(v=>Array.isArray(v)&&v[0]==="CONVERSION")):null;const s=i.find(v=>Array.isArray(v)&&v[0]==="CS");s&&(n.coordinate_system={type:s[1],axis:this.extractAxes(i)});const o=i.find(v=>Array.isArray(v)&&v[0]==="LENGTHUNIT");if(o){const v=this.convertUnit(o);n.coordinate_system.unit=v}n.id=this.getId(i);break;case"BASEGEOGCRS":case"GEOGCRS":n.type="GeographicCRS",n.name=i[1];const h=i.find(v=>Array.isArray(v)&&(v[0]==="DATUM"||v[0]==="ENSEMBLE"));if(h){const v=this.convert(h);h[0]==="ENSEMBLE"?n.datum_ensemble=v:n.datum=v;const E=i.find(x=>Array.isArray(x)&&x[0]==="PRIMEM");E&&E[1]!=="Greenwich"&&(v.prime_meridian={name:E[1],longitude:parseFloat(E[2])})}n.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(i)},n.id=this.getId(i);break;case"DATUM":n.type="GeodeticReferenceFrame",n.name=i[1],n.ellipsoid=i.find(v=>Array.isArray(v)&&v[0]==="ELLIPSOID")?this.convert(i.find(v=>Array.isArray(v)&&v[0]==="ELLIPSOID")):null;break;case"ENSEMBLE":n.type="DatumEnsemble",n.name=i[1],n.members=i.filter(v=>Array.isArray(v)&&v[0]==="MEMBER").map(v=>({type:"DatumEnsembleMember",name:v[1],id:this.getId(v)}));const f=i.find(v=>Array.isArray(v)&&v[0]==="ENSEMBLEACCURACY");f&&(n.accuracy=parseFloat(f[1]));const u=i.find(v=>Array.isArray(v)&&v[0]==="ELLIPSOID");u&&(n.ellipsoid=this.convert(u)),n.id=this.getId(i);break;case"ELLIPSOID":n.type="Ellipsoid",n.name=i[1],n.semi_major_axis=parseFloat(i[2]),n.inverse_flattening=parseFloat(i[3]),i.find(v=>Array.isArray(v)&&v[0]==="LENGTHUNIT")&&this.convert(i.find(v=>Array.isArray(v)&&v[0]==="LENGTHUNIT"),n);break;case"CONVERSION":n.type="Conversion",n.name=i[1],n.method=i.find(v=>Array.isArray(v)&&v[0]==="METHOD")?this.convert(i.find(v=>Array.isArray(v)&&v[0]==="METHOD")):null,n.parameters=i.filter(v=>Array.isArray(v)&&v[0]==="PARAMETER").map(v=>this.convert(v));break;case"METHOD":n.type="Method",n.name=i[1],n.id=this.getId(i);break;case"PARAMETER":n.type="Parameter",n.name=i[1],n.value=parseFloat(i[2]),n.unit=this.convertUnit(i.find(v=>Array.isArray(v)&&(v[0]==="LENGTHUNIT"||v[0]==="ANGLEUNIT"||v[0]==="SCALEUNIT"))),n.id=this.getId(i);break;case"BOUNDCRS":n.type="BoundCRS";const c=i.find(v=>Array.isArray(v)&&v[0]==="SOURCECRS");if(c){const v=c.find(E=>Array.isArray(E));n.source_crs=v?this.convert(v):null}const g=i.find(v=>Array.isArray(v)&&v[0]==="TARGETCRS");if(g){const v=g.find(E=>Array.isArray(E));n.target_crs=v?this.convert(v):null}const y=i.find(v=>Array.isArray(v)&&v[0]==="ABRIDGEDTRANSFORMATION");y?n.transformation=this.convert(y):n.transformation=null;break;case"ABRIDGEDTRANSFORMATION":if(n.type="Transformation",n.name=i[1],n.method=i.find(v=>Array.isArray(v)&&v[0]==="METHOD")?this.convert(i.find(v=>Array.isArray(v)&&v[0]==="METHOD")):null,n.parameters=i.filter(v=>Array.isArray(v)&&(v[0]==="PARAMETER"||v[0]==="PARAMETERFILE")).map(v=>{if(v[0]==="PARAMETER")return this.convert(v);if(v[0]==="PARAMETERFILE")return{name:v[1],value:v[2],id:{authority:"EPSG",code:8656}}}),n.parameters.length===7){const v=n.parameters[6];v.name==="Scale difference"&&(v.value=Math.round((v.value-1)*1e12)/1e6)}n.id=this.getId(i);break;case"AXIS":n.coordinate_system||(n.coordinate_system={type:"unspecified",axis:[]}),n.coordinate_system.axis.push(this.convertAxis(i));break;case"LENGTHUNIT":const M=this.convertUnit(i,"LinearUnit");n.coordinate_system&&n.coordinate_system.axis&&n.coordinate_system.axis.forEach(v=>{v.unit||(v.unit=M)}),M.conversion_factor&&M.conversion_factor!==1&&n.semi_major_axis&&(n.semi_major_axis={value:n.semi_major_axis,unit:M});break;default:n.keyword=i[0];break}return n}}class yv extends Ou{static convert(i,n={}){return super.convert(i,n),n.coordinate_system&&n.coordinate_system.subtype==="Cartesian"&&delete n.coordinate_system,n.usage&&delete n.usage,n}}class pv extends Ou{static convert(i,n={}){super.convert(i,n);const s=i.find(h=>Array.isArray(h)&&h[0]==="CS");s&&(n.coordinate_system={subtype:s[1],axis:this.extractAxes(i)});const o=i.find(h=>Array.isArray(h)&&h[0]==="USAGE");if(o){const h=o.find(c=>Array.isArray(c)&&c[0]==="SCOPE"),f=o.find(c=>Array.isArray(c)&&c[0]==="AREA"),u=o.find(c=>Array.isArray(c)&&c[0]==="BBOX");n.usage={},h&&(n.usage.scope=h[1]),f&&(n.usage.area=f[1]),u&&(n.usage.bbox=u.slice(1))}return n}}function wv(t){return t.find(i=>Array.isArray(i)&&i[0]==="USAGE")?"2019":(t.find(i=>Array.isArray(i)&&i[0]==="CS")||t[0]==="BOUNDCRS"||t[0]==="PROJCRS"||t[0]==="GEOGCRS","2015")}function Ev(t){return(wv(t)==="2019"?pv:yv).convert(t)}function xv(t){const i=t.toUpperCase();return i.includes("PROJCRS")||i.includes("GEOGCRS")||i.includes("BOUNDCRS")||i.includes("VERTCRS")||i.includes("LENGTHUNIT")||i.includes("ANGLEUNIT")||i.includes("SCALEUNIT")?"WKT2":(i.includes("PROJCS")||i.includes("GEOGCS")||i.includes("LOCAL_CS")||i.includes("VERT_CS")||i.includes("UNIT"),"WKT1")}var qn=1,Tu=2,Bu=3,as=4,Fu=5,ro=-1,Sv=/\s/,Pv=/[A-Za-z]/,bv=/[A-Za-z84_]/,gs=/[,\]]/,qu=/[\d\.E\-\+]/;function ze(t){if(typeof t!="string")throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=qn}ze.prototype.readCharicter=function(){var t=this.text[this.place++];if(this.state!==as)for(;Sv.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case qn:return this.neutral(t);case Tu:return this.keyword(t);case as:return this.quoted(t);case Fu:return this.afterquote(t);case Bu:return this.number(t);case ro:return}};ze.prototype.afterquote=function(t){if(t==='"'){this.word+='"',this.state=as;return}if(gs.test(t)){this.word=this.word.trim(),this.afterItem(t);return}throw new Error(`havn't handled "`+t+'" in afterquote yet, index '+this.place)};ze.prototype.afterItem=function(t){if(t===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=qn;return}if(t==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=qn,this.currentObject=this.stack.pop(),this.currentObject||(this.state=ro);return}};ze.prototype.number=function(t){if(qu.test(t)){this.word+=t;return}if(gs.test(t)){this.word=parseFloat(this.word),this.afterItem(t);return}throw new Error(`havn't handled "`+t+'" in number yet, index '+this.place)};ze.prototype.quoted=function(t){if(t==='"'){this.state=Fu;return}this.word+=t};ze.prototype.keyword=function(t){if(bv.test(t)){this.word+=t;return}if(t==="["){var i=[];i.push(this.word),this.level++,this.root===null?this.root=i:this.currentObject.push(i),this.stack.push(this.currentObject),this.currentObject=i,this.state=qn;return}if(gs.test(t)){this.afterItem(t);return}throw new Error(`havn't handled "`+t+'" in keyword yet, index '+this.place)};ze.prototype.neutral=function(t){if(Pv.test(t)){this.word=t,this.state=Tu;return}if(t==='"'){this.word="",this.state=as;return}if(qu.test(t)){this.word=t,this.state=Bu;return}if(gs.test(t)){this.afterItem(t);return}throw new Error(`havn't handled "`+t+'" in neutral yet, index '+this.place)};ze.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===ro)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function Av(t){var i=new ze(t);return i.output()}function Wa(t,i,n){Array.isArray(i)&&(n.unshift(i),i=null);var s=i?{}:t,o=n.reduce(function(h,f){return $i(f,h),h},s);i&&(t[i]=o)}function $i(t,i){if(!Array.isArray(t)){i[t]=!0;return}var n=t.shift();if(n==="PARAMETER"&&(n=t.shift()),t.length===1){if(Array.isArray(t[0])){i[n]={},$i(t[0],i[n]);return}i[n]=t[0];return}if(!t.length){i[n]=!0;return}if(n==="TOWGS84"){i[n]=t;return}if(n==="AXIS"){n in i||(i[n]=[]),i[n].push(t);return}Array.isArray(n)||(i[n]={});var s;switch(n){case"UNIT":case"PRIMEM":case"VERT_DATUM":i[n]={name:t[0].toLowerCase(),convert:t[1]},t.length===3&&$i(t[2],i[n]);return;case"SPHEROID":case"ELLIPSOID":i[n]={name:t[0],a:t[1],rf:t[2]},t.length===4&&$i(t[3],i[n]);return;case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":t[0]=["name",t[0]],Wa(i,n,t);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":t[0]=["name",t[0]],Wa(i,n,t),i[n].type=n;return;default:for(s=-1;++s<t.length;)if(!Array.isArray(t[s]))return $i(t,i[n]);return Wa(i,n,t)}}var Gv=.017453292519943295;function ye(t){return t*Gv}function Du(t){const i=(t.projName||"").toLowerCase().replace(/_/g," ");!t.long0&&t.longc&&(i==="albers conic equal area"||i==="lambert azimuthal equal area")&&(t.long0=t.longc),!t.lat_ts&&t.lat1&&(i==="stereographic south pole"||i==="polar stereographic (variant b)")?(t.lat0=ye(t.lat1>0?90:-90),t.lat_ts=t.lat1,delete t.lat1):!t.lat_ts&&t.lat0&&(i==="polar stereographic"||i==="polar stereographic (variant a)")&&(t.lat_ts=t.lat0,t.lat0=ye(t.lat0>0?90:-90),delete t.lat1)}function tu(t){let i={units:null,to_meter:void 0};return typeof t=="string"?(i.units=t.toLowerCase(),i.units==="metre"&&(i.units="meter"),i.units==="meter"&&(i.to_meter=1)):t&&t.name&&(i.units=t.name.toLowerCase(),i.units==="metre"&&(i.units="meter"),i.to_meter=t.conversion_factor),i}function eu(t){return typeof t=="object"?t.value*t.unit.conversion_factor:t}function iu(t,i){t.ellipsoid.radius?(i.a=t.ellipsoid.radius,i.rf=0):(i.a=eu(t.ellipsoid.semi_major_axis),t.ellipsoid.inverse_flattening!==void 0?i.rf=t.ellipsoid.inverse_flattening:t.ellipsoid.semi_major_axis!==void 0&&t.ellipsoid.semi_minor_axis!==void 0&&(i.rf=i.a/(i.a-eu(t.ellipsoid.semi_minor_axis))))}function os(t,i={}){return!t||typeof t!="object"?t:t.type==="BoundCRS"?(os(t.source_crs,i),t.transformation&&(t.transformation.method&&t.transformation.method.name==="NTv2"?i.nadgrids=t.transformation.parameters[0].value:i.datum_params=t.transformation.parameters.map(n=>n.value)),i):(Object.keys(t).forEach(n=>{const s=t[n];if(s!==null)switch(n){case"name":if(i.srsCode)break;i.name=s,i.srsCode=s;break;case"type":s==="GeographicCRS"?i.projName="longlat":s==="ProjectedCRS"&&t.conversion&&t.conversion.method&&(i.projName=t.conversion.method.name);break;case"datum":case"datum_ensemble":s.ellipsoid&&(i.ellps=s.ellipsoid.name,iu(s,i)),s.prime_meridian&&(i.from_greenwich=s.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":i.ellps=s.name,iu(s,i);break;case"prime_meridian":i.long0=(s.longitude||0)*Math.PI/180;break;case"coordinate_system":if(s.axis){if(i.axis=s.axis.map(o=>{const h=o.direction;if(h==="east")return"e";if(h==="north")return"n";if(h==="west")return"w";if(h==="south")return"s";throw new Error(`Unknown axis direction: ${h}`)}).join("")+"u",s.unit){const{units:o,to_meter:h}=tu(s.unit);i.units=o,i.to_meter=h}else if(s.axis[0]&&s.axis[0].unit){const{units:o,to_meter:h}=tu(s.axis[0].unit);i.units=o,i.to_meter=h}}break;case"id":s.authority&&s.code&&(i.title=s.authority+":"+s.code);break;case"conversion":s.method&&s.method.name&&(i.projName=s.method.name),s.parameters&&s.parameters.forEach(o=>{const h=o.name.toLowerCase().replace(/\s+/g,"_"),f=o.value;o.unit&&o.unit.conversion_factor?i[h]=f*o.unit.conversion_factor:o.unit==="degree"?i[h]=f*Math.PI/180:i[h]=f});break;case"unit":s.name&&(i.units=s.name.toLowerCase(),i.units==="metre"&&(i.units="meter")),s.conversion_factor&&(i.to_meter=s.conversion_factor);break;case"base_crs":os(s,i),i.datumCode=s.id?s.id.authority+"_"+s.id.code:s.name;break}}),i.latitude_of_false_origin!==void 0&&(i.lat0=i.latitude_of_false_origin),i.longitude_of_false_origin!==void 0&&(i.long0=i.longitude_of_false_origin),i.latitude_of_standard_parallel!==void 0&&(i.lat0=i.latitude_of_standard_parallel,i.lat1=i.latitude_of_standard_parallel),i.latitude_of_1st_standard_parallel!==void 0&&(i.lat1=i.latitude_of_1st_standard_parallel),i.latitude_of_2nd_standard_parallel!==void 0&&(i.lat2=i.latitude_of_2nd_standard_parallel),i.latitude_of_projection_centre!==void 0&&(i.lat0=i.latitude_of_projection_centre),i.longitude_of_projection_centre!==void 0&&(i.longc=i.longitude_of_projection_centre),i.easting_at_false_origin!==void 0&&(i.x0=i.easting_at_false_origin),i.northing_at_false_origin!==void 0&&(i.y0=i.northing_at_false_origin),i.latitude_of_natural_origin!==void 0&&(i.lat0=i.latitude_of_natural_origin),i.longitude_of_natural_origin!==void 0&&(i.long0=i.longitude_of_natural_origin),i.longitude_of_origin!==void 0&&(i.long0=i.longitude_of_origin),i.false_easting!==void 0&&(i.x0=i.false_easting),i.easting_at_projection_centre&&(i.x0=i.easting_at_projection_centre),i.false_northing!==void 0&&(i.y0=i.false_northing),i.northing_at_projection_centre&&(i.y0=i.northing_at_projection_centre),i.standard_parallel_1!==void 0&&(i.lat1=i.standard_parallel_1),i.standard_parallel_2!==void 0&&(i.lat2=i.standard_parallel_2),i.scale_factor_at_natural_origin!==void 0&&(i.k0=i.scale_factor_at_natural_origin),i.scale_factor_at_projection_centre!==void 0&&(i.k0=i.scale_factor_at_projection_centre),i.scale_factor_on_pseudo_standard_parallel!==void 0&&(i.k0=i.scale_factor_on_pseudo_standard_parallel),i.azimuth!==void 0&&(i.alpha=i.azimuth),i.azimuth_at_projection_centre!==void 0&&(i.alpha=i.azimuth_at_projection_centre),i.angle_from_rectified_to_skew_grid&&(i.rectified_grid_angle=i.angle_from_rectified_to_skew_grid),Du(i),i)}var Iv=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Cv(t,i){var n=i[0],s=i[1];!(n in t)&&s in t&&(t[n]=t[s],i.length===3&&(t[n]=i[2](t[n])))}function Uu(t){for(var i=Object.keys(t),n=0,s=i.length;n<s;++n){var o=i[n];Iv.indexOf(o)!==-1&&Nv(t[o]),typeof t[o]=="object"&&Uu(t[o])}}function Nv(t){if(t.AUTHORITY){var i=Object.keys(t.AUTHORITY)[0];i&&i in t.AUTHORITY&&(t.title=i+":"+t.AUTHORITY[i])}if(t.type==="GEOGCS"?t.projName="longlat":t.type==="LOCAL_CS"?(t.projName="identity",t.local=!0):typeof t.PROJECTION=="object"?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var n="",s=0,o=t.AXIS.length;s<o;++s){var h=[t.AXIS[s][0].toLowerCase(),t.AXIS[s][1].toLowerCase()];h[0].indexOf("north")!==-1||(h[0]==="y"||h[0]==="lat")&&h[1]==="north"?n+="n":h[0].indexOf("south")!==-1||(h[0]==="y"||h[0]==="lat")&&h[1]==="south"?n+="s":h[0].indexOf("east")!==-1||(h[0]==="x"||h[0]==="lon")&&h[1]==="east"?n+="e":(h[0].indexOf("west")!==-1||(h[0]==="x"||h[0]==="lon")&&h[1]==="west")&&(n+="w")}n.length===2&&(n+="u"),n.length===3&&(t.axis=n)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),t.units==="metre"&&(t.units="meter"),t.UNIT.convert&&(t.type==="GEOGCS"?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var f=t.GEOGCS;t.type==="GEOGCS"&&(f=t),f&&(f.DATUM?t.datumCode=f.DATUM.name.toLowerCase():t.datumCode=f.name.toLowerCase(),t.datumCode.slice(0,2)==="d_"&&(t.datumCode=t.datumCode.slice(2)),t.datumCode==="new_zealand_1949"&&(t.datumCode="nzgd49"),(t.datumCode==="wgs_1984"||t.datumCode==="world_geodetic_system_1984")&&(t.PROJECTION==="Mercator_Auxiliary_Sphere"&&(t.sphere=!0),t.datumCode="wgs84"),t.datumCode==="belge_1972"&&(t.datumCode="rnb72"),f.DATUM&&f.DATUM.SPHEROID&&(t.ellps=f.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),t.ellps.toLowerCase().slice(0,13)==="international"&&(t.ellps="intl"),t.a=f.DATUM.SPHEROID.a,t.rf=parseFloat(f.DATUM.SPHEROID.rf,10)),f.DATUM&&f.DATUM.TOWGS84&&(t.datum_params=f.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),t.datumCode==="ch1903+"&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),t.rectified_grid_angle&&(t.rectified_grid_angle=ye(t.rectified_grid_angle));function u(y){var M=t.to_meter||1;return y*M}var c=function(y){return Cv(t,y)},g=[["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",ye],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",ye],["x0","false_easting",u],["y0","false_northing",u],["long0","central_meridian",ye],["lat0","latitude_of_origin",ye],["lat0","standard_parallel_1",ye],["lat1","standard_parallel_1",ye],["lat2","standard_parallel_2",ye],["azimuth","Azimuth"],["alpha","azimuth",ye],["srsCode","name"]];g.forEach(c),Du(t)}function hs(t){if(typeof t=="object")return os(t);const i=xv(t);var n=Av(t);if(i==="WKT2"){const h=Ev(n);return os(h)}var s=n[0],o={};return $i(n,o),Uu(o),o[s]}function Ct(t){var i=this;if(arguments.length===2){var n=arguments[1];typeof n=="string"?n.charAt(0)==="+"?Ct[t]=Za(arguments[1]):Ct[t]=hs(arguments[1]):n&&typeof n=="object"&&!("projName"in n)?Ct[t]=hs(arguments[1]):(Ct[t]=n,n||delete Ct[t])}else if(arguments.length===1){if(Array.isArray(t))return t.map(function(s){return Array.isArray(s)?Ct.apply(i,s):Ct(s)});if(typeof t=="string"){if(t in Ct)return Ct[t]}else"EPSG"in t?Ct["EPSG:"+t.EPSG]=t:"ESRI"in t?Ct["ESRI:"+t.ESRI]=t:"IAU2000"in t?Ct["IAU2000:"+t.IAU2000]=t:console.log(t);return}}cv(Ct);function Rv(t){return typeof t=="string"}function Lv(t){return t in Ct}function Ov(t){return t.indexOf("+")!==0&&t.indexOf("[")!==-1||typeof t=="object"&&!("srsCode"in t)}var Tv=["3857","900913","3785","102113"];function Bv(t){var i=ii(t,"authority");if(i){var n=ii(i,"epsg");return n&&Tv.indexOf(n)>-1}}function Fv(t){var i=ii(t,"extension");if(i)return ii(i,"proj4")}function qv(t){return t[0]==="+"}function Dv(t){if(Rv(t)){if(Lv(t))return Ct[t];if(Ov(t)){var i=hs(t);if(Bv(i))return Ct["EPSG:3857"];var n=Fv(i);return n?Za(n):i}if(qv(t))return Za(t)}else return"projName"in t?t:hs(t)}function nu(t,i){t=t||{};var n,s;if(!i)return t;for(s in i)n=i[s],n!==void 0&&(t[s]=n);return t}function Ae(t,i,n){var s=t*i;return n/Math.sqrt(1-s*s)}function Xn(t){return t<0?-1:1}function q(t,i){return i||Math.abs(t)<=Et?t:t-Xn(t)*Fn}function we(t,i,n){var s=t*n,o=.5*t;return s=Math.pow((1-s)/(1+s),o),Math.tan(.5*(O-i))/s}function Dn(t,i){for(var n=.5*t,s,o,h=O-2*Math.atan(i),f=0;f<=15;f++)if(s=t*Math.sin(h),o=O-2*Math.atan(i*Math.pow((1-s)/(1+s),n))-h,h+=o,Math.abs(o)<=1e-10)return h;return-9999}function Uv(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=Ae(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function Wv(t){var i=t.x,n=t.y;if(n*Yt>90&&n*Yt<-90&&i*Yt>180&&i*Yt<-180)return null;var s,o;if(Math.abs(Math.abs(n)-O)<=B)return null;if(this.sphere)s=this.x0+this.a*this.k0*q(i-this.long0,this.over),o=this.y0+this.a*this.k0*Math.log(Math.tan(ot+.5*n));else{var h=Math.sin(n),f=we(this.e,n,h);s=this.x0+this.a*this.k0*q(i-this.long0,this.over),o=this.y0-this.a*this.k0*Math.log(f)}return t.x=s,t.y=o,t}function $v(t){var i=t.x-this.x0,n=t.y-this.y0,s,o;if(this.sphere)o=O-2*Math.atan(Math.exp(-n/(this.a*this.k0)));else{var h=Math.exp(-n/(this.a*this.k0));if(o=Dn(this.e,h),o===-9999)return null}return s=q(this.long0+i/(this.a*this.k0),this.over),t.x=s,t.y=o,t}var zv=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"];const Xv={init:Uv,forward:Wv,inverse:$v,names:zv};function kv(){}function ru(t){return t}var Wu=["longlat","identity"];const Hv={init:kv,forward:ru,inverse:ru,names:Wu};var Yv=[Xv,Hv],vi={},zi=[];function $u(t,i){var n=zi.length;return t.names?(zi[n]=t,t.names.forEach(function(s){vi[s.toLowerCase()]=n}),this):(console.log(i),!0)}function zu(t){return t.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}function Kv(t){if(!t)return!1;var i=t.toLowerCase();if(typeof vi[i]<"u"&&zi[vi[i]]||(i=zu(i),i in vi&&zi[vi[i]]))return zi[vi[i]]}function Qv(){Yv.forEach($u)}const Jv={start:Qv,add:$u,get:Kv};var Xu={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,rf: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)"}};const Zv=Xu.WGS84;function Vv(t,i,n,s){var o=t*t,h=i*i,f=(o-h)/o,u=0;s?(t*=1-f*(vv+f*(dv+f*Mv)),o=t*t,f=0):u=Math.sqrt(f);var c=(o-h)/h;return{es:f,e:u,ep2:c}}function jv(t,i,n,s,o){if(!t){var h=ii(Xu,s);h||(h=Zv),t=h.a,i=h.b,n=h.rf}return n&&!i&&(i=(1-1/n)*t),(n===0||Math.abs(t-i)<B)&&(o=!0,i=t),{a:t,b:i,rf:n,sphere:o}}var es={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:"clark80",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.0276,-0.2167,0.2147,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,-1.91514,1.60363,-9.09546,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.243649,-1.158827,-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,32.39344,-153.25684,-96.2266,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,-8.393,0.749,-10.276,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,1.25033e-7,4.6785e-8,5.6529e-8,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:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},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:"374,150,588"},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"}};for(var td in es){var $a=es[td];$a.datumName&&(es[$a.datumName]=$a)}function ed(t,i,n,s,o,h,f){var u={};return t===void 0||t==="none"?u.datum_type=Ja:u.datum_type=_v,i&&(u.datum_params=i.map(parseFloat),(u.datum_params[0]!==0||u.datum_params[1]!==0||u.datum_params[2]!==0)&&(u.datum_type=yi),u.datum_params.length>3&&(u.datum_params[3]!==0||u.datum_params[4]!==0||u.datum_params[5]!==0||u.datum_params[6]!==0)&&(u.datum_type=pi,u.datum_params[3]*=Rn,u.datum_params[4]*=Rn,u.datum_params[5]*=Rn,u.datum_params[6]=u.datum_params[6]/1e6+1)),f&&(u.datum_type=Yi,u.grids=f),u.a=n,u.b=s,u.es=o,u.ep2=h,u}var so={};function id(t,i,n){return i instanceof ArrayBuffer?nd(t,i,n):{ready:rd(t,i)}}function nd(t,i,n){var s=!0;n!==void 0&&n.includeErrorFields===!1&&(s=!1);var o=new DataView(i),h=od(o),f=hd(o,h),u=ud(o,f,h,s),c={header:f,subgrids:u};return so[t]=c,c}async function rd(t,i){for(var n=[],s=await i.getImageCount(),o=s-1;o>=0;o--){var h=await i.getImage(o),f=await h.readRasters(),u=f,c=[h.getWidth(),h.getHeight()],g=h.getBoundingBox().map(su),y=[h.fileDirectory.ModelPixelScale[0],h.fileDirectory.ModelPixelScale[1]].map(su),M=g[0]+(c[0]-1)*y[0],v=g[3]-(c[1]-1)*y[1],E=u[0],x=u[1],b=[];for(let T=c[1]-1;T>=0;T--)for(let F=c[0]-1;F>=0;F--){var A=T*c[0]+F;b.push([-ti(x[A]),ti(E[A])])}n.push({del:y,lim:c,ll:[-M,v],cvs:b})}var C={header:{nSubgrids:s},subgrids:n};return so[t]=C,C}function sd(t){if(t===void 0)return null;var i=t.split(",");return i.map(ad)}function ad(t){if(t.length===0)return null;var i=t[0]==="@";return i&&(t=t.slice(1)),t==="null"?{name:"null",mandatory:!i,grid:null,isNull:!0}:{name:t,mandatory:!i,grid:so[t]||null,isNull:!1}}function su(t){return t*Math.PI/180}function ti(t){return t/3600*Math.PI/180}function od(t){var i=t.getInt32(8,!1);return i===11?!1:(i=t.getInt32(8,!0),i!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function hd(t,i){return{nFields:t.getInt32(8,i),nSubgridFields:t.getInt32(24,i),nSubgrids:t.getInt32(40,i),shiftType:Va(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,i),fromSemiMinorAxis:t.getFloat64(136,i),toSemiMajorAxis:t.getFloat64(152,i),toSemiMinorAxis:t.getFloat64(168,i)}}function Va(t,i,n){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(i,n)))}function ud(t,i,n,s){for(var o=176,h=[],f=0;f<i.nSubgrids;f++){var u=ld(t,o,n),c=cd(t,o,u,n,s),g=Math.round(1+(u.upperLongitude-u.lowerLongitude)/u.longitudeInterval),y=Math.round(1+(u.upperLatitude-u.lowerLatitude)/u.latitudeInterval);h.push({ll:[ti(u.lowerLongitude),ti(u.lowerLatitude)],del:[ti(u.longitudeInterval),ti(u.latitudeInterval)],lim:[g,y],count:u.gridNodeCount,cvs:fd(c)});var M=16;s===!1&&(M=8),o+=176+u.gridNodeCount*M}return h}function fd(t){return t.map(function(i){return[ti(i.longitudeShift),ti(i.latitudeShift)]})}function ld(t,i,n){return{name:Va(t,i+8,i+16).trim(),parent:Va(t,i+24,i+24+8).trim(),lowerLatitude:t.getFloat64(i+72,n),upperLatitude:t.getFloat64(i+88,n),lowerLongitude:t.getFloat64(i+104,n),upperLongitude:t.getFloat64(i+120,n),latitudeInterval:t.getFloat64(i+136,n),longitudeInterval:t.getFloat64(i+152,n),gridNodeCount:t.getInt32(i+168,n)}}function cd(t,i,n,s,o){var h=i+176,f=16;o===!1&&(f=8);for(var u=[],c=0;c<n.gridNodeCount;c++){var g={latitudeShift:t.getFloat32(h+c*f,s),longitudeShift:t.getFloat32(h+c*f+4,s)};o!==!1&&(g.latitudeAccuracy=t.getFloat32(h+c*f+8,s),g.longitudeAccuracy=t.getFloat32(h+c*f+12,s)),u.push(g)}return u}function le(t,i){if(!(this instanceof le))return new le(t);this.forward=null,this.inverse=null,this.init=null,this.name,this.names=null,this.title,i=i||function(g){if(g)throw g};var n=Dv(t);if(typeof n!="object"){i("Could not parse to valid json: "+t);return}var s=le.projections.get(n.projName);if(!s){i("Could not get projection name from: "+t);return}if(n.datumCode&&n.datumCode!=="none"){var o=ii(es,n.datumCode);o&&(n.datum_params=n.datum_params||(o.towgs84?o.towgs84.split(","):null),n.ellps=o.ellipse,n.datumName=o.datumName?o.datumName:n.datumCode)}n.k0=n.k0||1,n.axis=n.axis||"enu",n.ellps=n.ellps||"wgs84",n.lat1=n.lat1||n.lat0;var h=jv(n.a,n.b,n.rf,n.ellps,n.sphere),f=Vv(h.a,h.b,h.rf,n.R_A),u=sd(n.nadgrids),c=n.datum||ed(n.datumCode,n.datum_params,h.a,h.b,f.es,f.ep2,u);nu(this,n),nu(this,s),this.a=h.a,this.b=h.b,this.rf=h.rf,this.sphere=h.sphere,this.es=f.es,this.e=f.e,this.ep2=f.ep2,this.datum=c,"init"in this&&typeof this.init=="function"&&this.init(),i(null,this)}le.projections=Jv;le.projections.start();function _d(t,i){return t.datum_type!==i.datum_type||t.a!==i.a||Math.abs(t.es-i.es)>5e-11?!1:t.datum_type===yi?t.datum_params[0]===i.datum_params[0]&&t.datum_params[1]===i.datum_params[1]&&t.datum_params[2]===i.datum_params[2]:t.datum_type===pi?t.datum_params[0]===i.datum_params[0]&&t.datum_params[1]===i.datum_params[1]&&t.datum_params[2]===i.datum_params[2]&&t.datum_params[3]===i.datum_params[3]&&t.datum_params[4]===i.datum_params[4]&&t.datum_params[5]===i.datum_params[5]&&t.datum_params[6]===i.datum_params[6]:!0}function ku(t,i,n){var s=t.x,o=t.y,h=t.z?t.z:0,f,u,c,g;if(o<-O&&o>-1.001*O)o=-O;else if(o>O&&o<1.001*O)o=O;else{if(o<-O)return{x:-1/0,y:-1/0,z:t.z};if(o>O)return{x:1/0,y:1/0,z:t.z}}return s>Math.PI&&(s-=2*Math.PI),u=Math.sin(o),g=Math.cos(o),c=u*u,f=n/Math.sqrt(1-i*c),{x:(f+h)*g*Math.cos(s),y:(f+h)*g*Math.sin(s),z:(f*(1-i)+h)*u}}function Hu(t,i,n,s){var o=1e-12,h=o*o,f=30,u,c,g,y,M,v,E,x,b,A,C,T,F,W=t.x,$=t.y,X=t.z?t.z:0,K,j,rt;if(u=Math.sqrt(W*W+$*$),c=Math.sqrt(W*W+$*$+X*X),u/n<o){if(K=0,c/n<o)return j=O,rt=-s,{x:t.x,y:t.y,z:t.z}}else K=Math.atan2($,W);g=X/c,y=u/c,M=1/Math.sqrt(1-i*(2-i)*y*y),x=y*(1-i)*M,b=g*M,F=0;do F++,E=n/Math.sqrt(1-i*b*b),rt=u*x+X*b-E*(1-i*b*b),v=i*E/(E+rt),M=1/Math.sqrt(1-v*(2-v)*y*y),A=y*(1-v)*M,C=g*M,T=C*x-A*b,x=A,b=C;while(T*T>h&&F<f);return j=Math.atan(C/Math.abs(A)),{x:K,y:j,z:rt}}function gd(t,i,n){if(i===yi)return{x:t.x+n[0],y:t.y+n[1],z:t.z+n[2]};if(i===pi){var s=n[0],o=n[1],h=n[2],f=n[3],u=n[4],c=n[5],g=n[6];return{x:g*(t.x-c*t.y+u*t.z)+s,y:g*(c*t.x+t.y-f*t.z)+o,z:g*(-u*t.x+f*t.y+t.z)+h}}}function vd(t,i,n){if(i===yi)return{x:t.x-n[0],y:t.y-n[1],z:t.z-n[2]};if(i===pi){var s=n[0],o=n[1],h=n[2],f=n[3],u=n[4],c=n[5],g=n[6],y=(t.x-s)/g,M=(t.y-o)/g,v=(t.z-h)/g;return{x:y+c*M-u*v,y:-c*y+M+f*v,z:u*y-f*M+v}}}function Xr(t){return t===yi||t===pi}function dd(t,i,n){if(_d(t,i)||t.datum_type===Ja||i.datum_type===Ja)return n;var s=t.a,o=t.es;if(t.datum_type===Yi){var h=au(t,!1,n);if(h!==0)return;s=Z0,o=V0}var f=i.a,u=i.b,c=i.es;if(i.datum_type===Yi&&(f=Z0,u=gv,c=V0),o===c&&s===f&&!Xr(t.datum_type)&&!Xr(i.datum_type))return n;if(n=ku(n,o,s),Xr(t.datum_type)&&(n=gd(n,t.datum_type,t.datum_params)),Xr(i.datum_type)&&(n=vd(n,i.datum_type,i.datum_params)),n=Hu(n,c,f,u),i.datum_type===Yi){var g=au(i,!0,n);if(g!==0)return}return n}function au(t,i,n){if(t.grids===null||t.grids.length===0)return console.log("Grid shift grids not found"),-1;var s={x:-n.x,y:n.y},o={x:Number.NaN,y:Number.NaN},h=[];t:for(var f=0;f<t.grids.length;f++){var u=t.grids[f];if(h.push(u.name),u.isNull){o=s;break}if(u.grid===null){if(u.mandatory)return console.log("Unable to find mandatory grid '"+u.name+"'"),-1;continue}for(var c=u.grid.subgrids,g=0,y=c.length;g<y;g++){var M=c[g],v=(Math.abs(M.del[1])+Math.abs(M.del[0]))/1e4,E=M.ll[0]-v,x=M.ll[1]-v,b=M.ll[0]+(M.lim[0]-1)*M.del[0]+v,A=M.ll[1]+(M.lim[1]-1)*M.del[1]+v;if(!(x>s.y||E>s.x||A<s.y||b<s.x)&&(o=Md(s,i,M),!isNaN(o.x)))break t}}return isNaN(o.x)?(console.log("Failed to find a grid shift table for location '"+-s.x*Yt+" "+s.y*Yt+" tried: '"+h+"'"),-1):(n.x=-o.x,n.y=o.y,0)}function Md(t,i,n){var s={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return s;var o={x:t.x,y:t.y};o.x-=n.ll[0],o.y-=n.ll[1],o.x=q(o.x-Math.PI)+Math.PI;var h=ou(o,n);if(i){if(isNaN(h.x))return s;h.x=o.x-h.x,h.y=o.y-h.y;var f=9,u=1e-12,c,g;do{if(g=ou(h,n),isNaN(g.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}c={x:o.x-(g.x+h.x),y:o.y-(g.y+h.y)},h.x+=c.x,h.y+=c.y}while(f--&&Math.abs(c.x)>u&&Math.abs(c.y)>u);if(f<0)return console.log("Inverse grid shift iterator failed to converge."),s;s.x=q(h.x+n.ll[0]),s.y=h.y+n.ll[1]}else isNaN(h.x)||(s.x=t.x+h.x,s.y=t.y+h.y);return s}function ou(t,i){var n={x:t.x/i.del[0],y:t.y/i.del[1]},s={x:Math.floor(n.x),y:Math.floor(n.y)},o={x:n.x-1*s.x,y:n.y-1*s.y},h={x:Number.NaN,y:Number.NaN},f;if(s.x<0||s.x>=i.lim[0]||s.y<0||s.y>=i.lim[1])return h;f=s.y*i.lim[0]+s.x;var u={x:i.cvs[f][0],y:i.cvs[f][1]};f++;var c={x:i.cvs[f][0],y:i.cvs[f][1]};f+=i.lim[0];var g={x:i.cvs[f][0],y:i.cvs[f][1]};f--;var y={x:i.cvs[f][0],y:i.cvs[f][1]},M=o.x*o.y,v=o.x*(1-o.y),E=(1-o.x)*(1-o.y),x=(1-o.x)*o.y;return h.x=E*u.x+v*c.x+x*y.x+M*g.x,h.y=E*u.y+v*c.y+x*y.y+M*g.y,h}function hu(t,i,n){var s=n.x,o=n.y,h=n.z||0,f,u,c,g={};for(c=0;c<3;c++)if(!(i&&c===2&&n.z===void 0))switch(c===0?(f=s,"ew".indexOf(t.axis[c])!==-1?u="x":u="y"):c===1?(f=o,"ns".indexOf(t.axis[c])!==-1?u="y":u="x"):(f=h,u="z"),t.axis[c]){case"e":g[u]=f;break;case"w":g[u]=-f;break;case"n":g[u]=f;break;case"s":g[u]=-f;break;case"u":n[u]!==void 0&&(g.z=f);break;case"d":n[u]!==void 0&&(g.z=-f);break;default:return null}return g}function Yu(t){var i={x:t[0],y:t[1]};return t.length>2&&(i.z=t[2]),t.length>3&&(i.m=t[3]),i}function md(t){uu(t.x),uu(t.y)}function uu(t){if(typeof Number.isFinite=="function"){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if(typeof t!="number"||t!==t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function yd(t,i){return(t.datum.datum_type===yi||t.datum.datum_type===pi||t.datum.datum_type===Yi)&&i.datumCode!=="WGS84"||(i.datum.datum_type===yi||i.datum.datum_type===pi||i.datum.datum_type===Yi)&&t.datumCode!=="WGS84"}function us(t,i,n,s){var o;Array.isArray(n)?n=Yu(n):n={x:n.x,y:n.y,z:n.z,m:n.m};var h=n.z!==void 0;if(md(n),t.datum&&i.datum&&yd(t,i)&&(o=new le("WGS84"),n=us(t,o,n,s),t=o),s&&t.axis!=="enu"&&(n=hu(t,!1,n)),t.projName==="longlat")n={x:n.x*yt,y:n.y*yt,z:n.z||0};else if(t.to_meter&&(n={x:n.x*t.to_meter,y:n.y*t.to_meter,z:n.z||0}),n=t.inverse(n),!n)return;if(t.from_greenwich&&(n.x+=t.from_greenwich),n=dd(t.datum,i.datum,n),!!n)return n=n,i.from_greenwich&&(n={x:n.x-i.from_greenwich,y:n.y,z:n.z||0}),i.projName==="longlat"?n={x:n.x*Yt,y:n.y*Yt,z:n.z||0}:(n=i.forward(n),i.to_meter&&(n={x:n.x/i.to_meter,y:n.y/i.to_meter,z:n.z||0})),s&&i.axis!=="enu"?hu(i,!0,n):(n&&!h&&delete n.z,n)}var fu=le("WGS84");function za(t,i,n,s){var o,h,f;return Array.isArray(n)?(o=us(t,i,n,s)||{x:NaN,y:NaN},n.length>2?typeof t.name<"u"&&t.name==="geocent"||typeof i.name<"u"&&i.name==="geocent"?typeof o.z=="number"?[o.x,o.y,o.z].concat(n.slice(3)):[o.x,o.y,n[2]].concat(n.slice(3)):[o.x,o.y].concat(n.slice(2)):[o.x,o.y]):(h=us(t,i,n,s),f=Object.keys(n),f.length===2||f.forEach(function(u){if(typeof t.name<"u"&&t.name==="geocent"||typeof i.name<"u"&&i.name==="geocent"){if(u==="x"||u==="y"||u==="z")return}else if(u==="x"||u==="y")return;h[u]=n[u]}),h)}function kr(t){return t instanceof le?t:typeof t=="object"&&"oProj"in t?t.oProj:le(t)}function pd(t,i,n){var s,o,h=!1,f;return typeof i>"u"?(o=kr(t),s=fu,h=!0):(typeof i.x<"u"||Array.isArray(i))&&(n=i,o=kr(t),s=fu,h=!0),s||(s=kr(t)),o||(o=kr(i)),n?za(s,o,n):(f={forward:function(u,c){return za(s,o,u,c)},inverse:function(u,c){return za(o,s,u,c)}},h&&(f.oProj=o),f)}var lu=6,Ku="AJSAJS",Qu="AFAFAF",Xi=65,kt=73,fe=79,bn=86,An=90;const wd={forward:Ju,inverse:Ed,toPoint:Zu};function Ju(t,i){return i=i||5,Pd(xd({lat:t[1],lon:t[0]}),i)}function Ed(t){var i=ao(ju(t.toUpperCase()));return i.lat&&i.lon?[i.lon,i.lat,i.lon,i.lat]:[i.left,i.bottom,i.right,i.top]}function Zu(t){var i=ao(ju(t.toUpperCase()));return i.lat&&i.lon?[i.lon,i.lat]:[(i.left+i.right)/2,(i.top+i.bottom)/2]}function Xa(t){return t*(Math.PI/180)}function cu(t){return 180*(t/Math.PI)}function xd(t){var i=t.lat,n=t.lon,s=6378137,o=.00669438,h=.9996,f,u,c,g,y,M,v,E=Xa(i),x=Xa(n),b,A;A=Math.floor((n+180)/6)+1,n===180&&(A=60),i>=56&&i<64&&n>=3&&n<12&&(A=32),i>=72&&i<84&&(n>=0&&n<9?A=31:n>=9&&n<21?A=33:n>=21&&n<33?A=35:n>=33&&n<42&&(A=37)),f=(A-1)*6-180+3,b=Xa(f),u=o/(1-o),c=s/Math.sqrt(1-o*Math.sin(E)*Math.sin(E)),g=Math.tan(E)*Math.tan(E),y=u*Math.cos(E)*Math.cos(E),M=Math.cos(E)*(x-b),v=s*((1-o/4-3*o*o/64-5*o*o*o/256)*E-(3*o/8+3*o*o/32+45*o*o*o/1024)*Math.sin(2*E)+(15*o*o/256+45*o*o*o/1024)*Math.sin(4*E)-35*o*o*o/3072*Math.sin(6*E));var C=h*c*(M+(1-g+y)*M*M*M/6+(5-18*g+g*g+72*y-58*u)*M*M*M*M*M/120)+5e5,T=h*(v+c*Math.tan(E)*(M*M/2+(5-g+9*y+4*y*y)*M*M*M*M/24+(61-58*g+g*g+600*y-330*u)*M*M*M*M*M*M/720));return i<0&&(T+=1e7),{northing:Math.round(T),easting:Math.round(C),zoneNumber:A,zoneLetter:Sd(i)}}function ao(t){var i=t.northing,n=t.easting,s=t.zoneLetter,o=t.zoneNumber;if(o<0||o>60)return null;var h=.9996,f=6378137,u=.00669438,c,g=(1-Math.sqrt(1-u))/(1+Math.sqrt(1-u)),y,M,v,E,x,b,A,C,T,F=n-5e5,W=i;s<"N"&&(W-=1e7),A=(o-1)*6-180+3,c=u/(1-u),b=W/h,C=b/(f*(1-u/4-3*u*u/64-5*u*u*u/256)),T=C+(3*g/2-27*g*g*g/32)*Math.sin(2*C)+(21*g*g/16-55*g*g*g*g/32)*Math.sin(4*C)+151*g*g*g/96*Math.sin(6*C),y=f/Math.sqrt(1-u*Math.sin(T)*Math.sin(T)),M=Math.tan(T)*Math.tan(T),v=c*Math.cos(T)*Math.cos(T),E=f*(1-u)/Math.pow(1-u*Math.sin(T)*Math.sin(T),1.5),x=F/(y*h);var $=T-y*Math.tan(T)/E*(x*x/2-(5+3*M+10*v-4*v*v-9*c)*x*x*x*x/24+(61+90*M+298*v+45*M*M-252*c-3*v*v)*x*x*x*x*x*x/720);$=cu($);var X=(x-(1+2*M+v)*x*x*x/6+(5-2*v+28*M-3*v*v+8*c+24*M*M)*x*x*x*x*x/120)/Math.cos(T);X=A+cu(X);var K;if(t.accuracy){var j=ao({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});K={top:j.lat,right:j.lon,bottom:$,left:X}}else K={lat:$,lon:X};return K}function Sd(t){var i="Z";return 84>=t&&t>=72?i="X":72>t&&t>=64?i="W":64>t&&t>=56?i="V":56>t&&t>=48?i="U":48>t&&t>=40?i="T":40>t&&t>=32?i="S":32>t&&t>=24?i="R":24>t&&t>=16?i="Q":16>t&&t>=8?i="P":8>t&&t>=0?i="N":0>t&&t>=-8?i="M":-8>t&&t>=-16?i="L":-16>t&&t>=-24?i="K":-24>t&&t>=-32?i="J":-32>t&&t>=-40?i="H":-40>t&&t>=-48?i="G":-48>t&&t>=-56?i="F":-56>t&&t>=-64?i="E":-64>t&&t>=-72?i="D":-72>t&&t>=-80&&(i="C"),i}function Pd(t,i){var n="00000"+t.easting,s="00000"+t.northing;return t.zoneNumber+t.zoneLetter+bd(t.easting,t.northing,t.zoneNumber)+n.substr(n.length-5,i)+s.substr(s.length-5,i)}function bd(t,i,n){var s=Vu(n),o=Math.floor(t/1e5),h=Math.floor(i/1e5)%20;return Ad(o,h,s)}function Vu(t){var i=t%lu;return i===0&&(i=lu),i}function Ad(t,i,n){var s=n-1,o=Ku.charCodeAt(s),h=Qu.charCodeAt(s),f=o+t-1,u=h+i,c=!1;f>An&&(f=f-An+Xi-1,c=!0),(f===kt||o<kt&&f>kt||(f>kt||o<kt)&&c)&&f++,(f===fe||o<fe&&f>fe||(f>fe||o<fe)&&c)&&(f++,f===kt&&f++),f>An&&(f=f-An+Xi-1),u>bn?(u=u-bn+Xi-1,c=!0):c=!1,(u===kt||h<kt&&u>kt||(u>kt||h<kt)&&c)&&u++,(u===fe||h<fe&&u>fe||(u>fe||h<fe)&&c)&&(u++,u===kt&&u++),u>bn&&(u=u-bn+Xi-1);var g=String.fromCharCode(f)+String.fromCharCode(u);return g}function ju(t){if(t&&t.length===0)throw"MGRSPoint coverting from nothing";for(var i=t.length,n=null,s="",o,h=0;!/[A-Z]/.test(o=t.charAt(h));){if(h>=2)throw"MGRSPoint bad conversion from: "+t;s+=o,h++}var f=parseInt(s,10);if(h===0||h+3>i)throw"MGRSPoint bad conversion from: "+t;var u=t.charAt(h++);if(u<="A"||u==="B"||u==="Y"||u>="Z"||u==="I"||u==="O")throw"MGRSPoint zone letter "+u+" not handled: "+t;n=t.substring(h,h+=2);for(var c=Vu(f),g=Gd(n.charAt(0),c),y=Id(n.charAt(1),c);y<Cd(u);)y+=2e6;var M=i-h;if(M%2!==0)throw`MGRSPoint has to have an even number
|
|
1
|
+
"use strict";function uv(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var i=1;i<=60;++i)t("EPSG:"+(32600+i),"+proj=utm +zone="+i+" +datum=WGS84 +units=m"),t("EPSG:"+(32700+i),"+proj=utm +zone="+i+" +south +datum=WGS84 +units=m");t("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"),t("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"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}var yi=1,pi=2,Yi=3,fv=4,ka=5,Q0=6378137,lv=6356752314e-3,J0=.0066943799901413165,Rn=484813681109536e-20,O=Math.PI/2,cv=.16666666666666666,_v=.04722222222222222,gv=.022156084656084655,B=1e-10,yt=.017453292519943295,Yt=57.29577951308232,ot=Math.PI/4,Fn=Math.PI*2,Et=3.14159265359,Kt={};Kt.greenwich=0;Kt.lisbon=-9.131906111111;Kt.paris=2.337229166667;Kt.bogota=-74.080916666667;Kt.madrid=-3.687938888889;Kt.rome=12.452333333333;Kt.bern=7.439583333333;Kt.jakarta=106.807719444444;Kt.ferro=-17.666666666667;Kt.brussels=4.367975;Kt.stockholm=18.058277777778;Kt.athens=23.7163375;Kt.oslo=10.722916666667;const vv={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 Z0=/[\s_\-\/\(\)]/g;function ii(t,i){if(t[i])return t[i];for(var n=Object.keys(t),s=i.toLowerCase().replace(Z0,""),o=-1,h,f;++o<n.length;)if(h=n[o],f=h.toLowerCase().replace(Z0,""),f===s)return t[h]}function Ha(t){var i={},n=t.split("+").map(function(u){return u.trim()}).filter(function(u){return u}).reduce(function(u,c){var g=c.split("=");return g.push(!0),u[g[0].toLowerCase()]=g[1],u},{}),s,o,h,f={proj:"projName",datum:"datumCode",rf:function(u){i.rf=parseFloat(u)},lat_0:function(u){i.lat0=u*yt},lat_1:function(u){i.lat1=u*yt},lat_2:function(u){i.lat2=u*yt},lat_ts:function(u){i.lat_ts=u*yt},lon_0:function(u){i.long0=u*yt},lon_1:function(u){i.long1=u*yt},lon_2:function(u){i.long2=u*yt},alpha:function(u){i.alpha=parseFloat(u)*yt},gamma:function(u){i.rectified_grid_angle=parseFloat(u)*yt},lonc:function(u){i.longc=u*yt},x_0:function(u){i.x0=parseFloat(u)},y_0:function(u){i.y0=parseFloat(u)},k_0:function(u){i.k0=parseFloat(u)},k:function(u){i.k0=parseFloat(u)},a:function(u){i.a=parseFloat(u)},b:function(u){i.b=parseFloat(u)},r:function(u){i.a=i.b=parseFloat(u)},r_a:function(){i.R_A=!0},zone:function(u){i.zone=parseInt(u,10)},south:function(){i.utmSouth=!0},towgs84:function(u){i.datum_params=u.split(",").map(function(c){return parseFloat(c)})},to_meter:function(u){i.to_meter=parseFloat(u)},units:function(u){i.units=u;var c=ii(vv,u);c&&(i.to_meter=c.to_meter)},from_greenwich:function(u){i.from_greenwich=u*yt},pm:function(u){var c=ii(Kt,u);i.from_greenwich=(c||parseFloat(u))*yt},nadgrids:function(u){u==="@null"?i.datumCode="none":i.nadgrids=u},axis:function(u){var c="ewnsud";u.length===3&&c.indexOf(u.substr(0,1))!==-1&&c.indexOf(u.substr(1,1))!==-1&&c.indexOf(u.substr(2,1))!==-1&&(i.axis=u)},approx:function(){i.approx=!0},over:function(){i.over=!0}};for(s in n)o=n[s],s in f?(h=f[s],typeof h=="function"?h(o):i[h]=o):i[s]=o;return typeof i.datumCode=="string"&&i.datumCode!=="WGS84"&&(i.datumCode=i.datumCode.toLowerCase()),i.projStr=t,i}class Ru{static getId(i){const n=i.find(s=>Array.isArray(s)&&s[0]==="ID");return n&&n.length>=3?{authority:n[1],code:parseInt(n[2],10)}:null}static convertUnit(i,n="unit"){if(!i||i.length<3)return{type:n,name:"unknown",conversion_factor:null};const s=i[1],o=parseFloat(i[2])||null,h=i.find(u=>Array.isArray(u)&&u[0]==="ID"),f=h?{authority:h[1],code:parseInt(h[2],10)}:null;return{type:n,name:s,conversion_factor:o,id:f}}static convertAxis(i){const n=i[1]||"Unknown";let s;const o=n.match(/^\((.)\)$/);if(o){const g=o[1].toUpperCase();if(g==="E")s="east";else if(g==="N")s="north";else if(g==="U")s="up";else throw new Error(`Unknown axis abbreviation: ${g}`)}else s=i[2]?i[2].toLowerCase():"unknown";const h=i.find(g=>Array.isArray(g)&&g[0]==="ORDER"),f=h?parseInt(h[1],10):null,u=i.find(g=>Array.isArray(g)&&(g[0]==="LENGTHUNIT"||g[0]==="ANGLEUNIT"||g[0]==="SCALEUNIT")),c=this.convertUnit(u);return{name:n,direction:s,unit:c,order:f}}static extractAxes(i){return i.filter(n=>Array.isArray(n)&&n[0]==="AXIS").map(n=>this.convertAxis(n)).sort((n,s)=>(n.order||0)-(s.order||0))}static convert(i,n={}){switch(i[0]){case"PROJCRS":n.type="ProjectedCRS",n.name=i[1],n.base_crs=i.find(v=>Array.isArray(v)&&v[0]==="BASEGEOGCRS")?this.convert(i.find(v=>Array.isArray(v)&&v[0]==="BASEGEOGCRS")):null,n.conversion=i.find(v=>Array.isArray(v)&&v[0]==="CONVERSION")?this.convert(i.find(v=>Array.isArray(v)&&v[0]==="CONVERSION")):null;const s=i.find(v=>Array.isArray(v)&&v[0]==="CS");s&&(n.coordinate_system={type:s[1],axis:this.extractAxes(i)});const o=i.find(v=>Array.isArray(v)&&v[0]==="LENGTHUNIT");if(o){const v=this.convertUnit(o);n.coordinate_system.unit=v}n.id=this.getId(i);break;case"BASEGEOGCRS":case"GEOGCRS":n.type="GeographicCRS",n.name=i[1];const h=i.find(v=>Array.isArray(v)&&(v[0]==="DATUM"||v[0]==="ENSEMBLE"));if(h){const v=this.convert(h);h[0]==="ENSEMBLE"?n.datum_ensemble=v:n.datum=v;const E=i.find(x=>Array.isArray(x)&&x[0]==="PRIMEM");E&&E[1]!=="Greenwich"&&(v.prime_meridian={name:E[1],longitude:parseFloat(E[2])})}n.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(i)},n.id=this.getId(i);break;case"DATUM":n.type="GeodeticReferenceFrame",n.name=i[1],n.ellipsoid=i.find(v=>Array.isArray(v)&&v[0]==="ELLIPSOID")?this.convert(i.find(v=>Array.isArray(v)&&v[0]==="ELLIPSOID")):null;break;case"ENSEMBLE":n.type="DatumEnsemble",n.name=i[1],n.members=i.filter(v=>Array.isArray(v)&&v[0]==="MEMBER").map(v=>({type:"DatumEnsembleMember",name:v[1],id:this.getId(v)}));const f=i.find(v=>Array.isArray(v)&&v[0]==="ENSEMBLEACCURACY");f&&(n.accuracy=parseFloat(f[1]));const u=i.find(v=>Array.isArray(v)&&v[0]==="ELLIPSOID");u&&(n.ellipsoid=this.convert(u)),n.id=this.getId(i);break;case"ELLIPSOID":n.type="Ellipsoid",n.name=i[1],n.semi_major_axis=parseFloat(i[2]),n.inverse_flattening=parseFloat(i[3]),i.find(v=>Array.isArray(v)&&v[0]==="LENGTHUNIT")&&this.convert(i.find(v=>Array.isArray(v)&&v[0]==="LENGTHUNIT"),n);break;case"CONVERSION":n.type="Conversion",n.name=i[1],n.method=i.find(v=>Array.isArray(v)&&v[0]==="METHOD")?this.convert(i.find(v=>Array.isArray(v)&&v[0]==="METHOD")):null,n.parameters=i.filter(v=>Array.isArray(v)&&v[0]==="PARAMETER").map(v=>this.convert(v));break;case"METHOD":n.type="Method",n.name=i[1],n.id=this.getId(i);break;case"PARAMETER":n.type="Parameter",n.name=i[1],n.value=parseFloat(i[2]),n.unit=this.convertUnit(i.find(v=>Array.isArray(v)&&(v[0]==="LENGTHUNIT"||v[0]==="ANGLEUNIT"||v[0]==="SCALEUNIT"))),n.id=this.getId(i);break;case"BOUNDCRS":n.type="BoundCRS";const c=i.find(v=>Array.isArray(v)&&v[0]==="SOURCECRS");if(c){const v=c.find(E=>Array.isArray(E));n.source_crs=v?this.convert(v):null}const g=i.find(v=>Array.isArray(v)&&v[0]==="TARGETCRS");if(g){const v=g.find(E=>Array.isArray(E));n.target_crs=v?this.convert(v):null}const y=i.find(v=>Array.isArray(v)&&v[0]==="ABRIDGEDTRANSFORMATION");y?n.transformation=this.convert(y):n.transformation=null;break;case"ABRIDGEDTRANSFORMATION":if(n.type="Transformation",n.name=i[1],n.method=i.find(v=>Array.isArray(v)&&v[0]==="METHOD")?this.convert(i.find(v=>Array.isArray(v)&&v[0]==="METHOD")):null,n.parameters=i.filter(v=>Array.isArray(v)&&(v[0]==="PARAMETER"||v[0]==="PARAMETERFILE")).map(v=>{if(v[0]==="PARAMETER")return this.convert(v);if(v[0]==="PARAMETERFILE")return{name:v[1],value:v[2],id:{authority:"EPSG",code:8656}}}),n.parameters.length===7){const v=n.parameters[6];v.name==="Scale difference"&&(v.value=Math.round((v.value-1)*1e12)/1e6)}n.id=this.getId(i);break;case"AXIS":n.coordinate_system||(n.coordinate_system={type:"unspecified",axis:[]}),n.coordinate_system.axis.push(this.convertAxis(i));break;case"LENGTHUNIT":const M=this.convertUnit(i,"LinearUnit");n.coordinate_system&&n.coordinate_system.axis&&n.coordinate_system.axis.forEach(v=>{v.unit||(v.unit=M)}),M.conversion_factor&&M.conversion_factor!==1&&n.semi_major_axis&&(n.semi_major_axis={value:n.semi_major_axis,unit:M});break;default:n.keyword=i[0];break}return n}}class dv extends Ru{static convert(i,n={}){return super.convert(i,n),n.coordinate_system&&n.coordinate_system.subtype==="Cartesian"&&delete n.coordinate_system,n.usage&&delete n.usage,n}}class Mv extends Ru{static convert(i,n={}){super.convert(i,n);const s=i.find(h=>Array.isArray(h)&&h[0]==="CS");s&&(n.coordinate_system={subtype:s[1],axis:this.extractAxes(i)});const o=i.find(h=>Array.isArray(h)&&h[0]==="USAGE");if(o){const h=o.find(c=>Array.isArray(c)&&c[0]==="SCOPE"),f=o.find(c=>Array.isArray(c)&&c[0]==="AREA"),u=o.find(c=>Array.isArray(c)&&c[0]==="BBOX");n.usage={},h&&(n.usage.scope=h[1]),f&&(n.usage.area=f[1]),u&&(n.usage.bbox=u.slice(1))}return n}}function mv(t){return t.find(i=>Array.isArray(i)&&i[0]==="USAGE")?"2019":(t.find(i=>Array.isArray(i)&&i[0]==="CS")||t[0]==="BOUNDCRS"||t[0]==="PROJCRS"||t[0]==="GEOGCRS","2015")}function yv(t){return(mv(t)==="2019"?Mv:dv).convert(t)}function pv(t){const i=t.toUpperCase();return i.includes("PROJCRS")||i.includes("GEOGCRS")||i.includes("BOUNDCRS")||i.includes("VERTCRS")||i.includes("LENGTHUNIT")||i.includes("ANGLEUNIT")||i.includes("SCALEUNIT")?"WKT2":(i.includes("PROJCS")||i.includes("GEOGCS")||i.includes("LOCAL_CS")||i.includes("VERT_CS")||i.includes("UNIT"),"WKT1")}var qn=1,Lu=2,Ou=3,rs=4,Tu=5,ja=-1,wv=/\s/,Ev=/[A-Za-z]/,xv=/[A-Za-z84_]/,cs=/[,\]]/,Bu=/[\d\.E\-\+]/;function ze(t){if(typeof t!="string")throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=qn}ze.prototype.readCharicter=function(){var t=this.text[this.place++];if(this.state!==rs)for(;wv.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case qn:return this.neutral(t);case Lu:return this.keyword(t);case rs:return this.quoted(t);case Tu:return this.afterquote(t);case Ou:return this.number(t);case ja:return}};ze.prototype.afterquote=function(t){if(t==='"'){this.word+='"',this.state=rs;return}if(cs.test(t)){this.word=this.word.trim(),this.afterItem(t);return}throw new Error(`havn't handled "`+t+'" in afterquote yet, index '+this.place)};ze.prototype.afterItem=function(t){if(t===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=qn;return}if(t==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=qn,this.currentObject=this.stack.pop(),this.currentObject||(this.state=ja);return}};ze.prototype.number=function(t){if(Bu.test(t)){this.word+=t;return}if(cs.test(t)){this.word=parseFloat(this.word),this.afterItem(t);return}throw new Error(`havn't handled "`+t+'" in number yet, index '+this.place)};ze.prototype.quoted=function(t){if(t==='"'){this.state=Tu;return}this.word+=t};ze.prototype.keyword=function(t){if(xv.test(t)){this.word+=t;return}if(t==="["){var i=[];i.push(this.word),this.level++,this.root===null?this.root=i:this.currentObject.push(i),this.stack.push(this.currentObject),this.currentObject=i,this.state=qn;return}if(cs.test(t)){this.afterItem(t);return}throw new Error(`havn't handled "`+t+'" in keyword yet, index '+this.place)};ze.prototype.neutral=function(t){if(Ev.test(t)){this.word=t,this.state=Lu;return}if(t==='"'){this.word="",this.state=rs;return}if(Bu.test(t)){this.word=t,this.state=Ou;return}if(cs.test(t)){this.afterItem(t);return}throw new Error(`havn't handled "`+t+'" in neutral yet, index '+this.place)};ze.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===ja)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function Sv(t){var i=new ze(t);return i.output()}function Ba(t,i,n){Array.isArray(i)&&(n.unshift(i),i=null);var s=i?{}:t,o=n.reduce(function(h,f){return $i(f,h),h},s);i&&(t[i]=o)}function $i(t,i){if(!Array.isArray(t)){i[t]=!0;return}var n=t.shift();if(n==="PARAMETER"&&(n=t.shift()),t.length===1){if(Array.isArray(t[0])){i[n]={},$i(t[0],i[n]);return}i[n]=t[0];return}if(!t.length){i[n]=!0;return}if(n==="TOWGS84"){i[n]=t;return}if(n==="AXIS"){n in i||(i[n]=[]),i[n].push(t);return}Array.isArray(n)||(i[n]={});var s;switch(n){case"UNIT":case"PRIMEM":case"VERT_DATUM":i[n]={name:t[0].toLowerCase(),convert:t[1]},t.length===3&&$i(t[2],i[n]);return;case"SPHEROID":case"ELLIPSOID":i[n]={name:t[0],a:t[1],rf:t[2]},t.length===4&&$i(t[3],i[n]);return;case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":t[0]=["name",t[0]],Ba(i,n,t);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":t[0]=["name",t[0]],Ba(i,n,t),i[n].type=n;return;default:for(s=-1;++s<t.length;)if(!Array.isArray(t[s]))return $i(t,i[n]);return Ba(i,n,t)}}var Pv=.017453292519943295;function ye(t){return t*Pv}function Fu(t){const i=(t.projName||"").toLowerCase().replace(/_/g," ");!t.long0&&t.longc&&(i==="albers conic equal area"||i==="lambert azimuthal equal area")&&(t.long0=t.longc),!t.lat_ts&&t.lat1&&(i==="stereographic south pole"||i==="polar stereographic (variant b)")?(t.lat0=ye(t.lat1>0?90:-90),t.lat_ts=t.lat1,delete t.lat1):!t.lat_ts&&t.lat0&&(i==="polar stereographic"||i==="polar stereographic (variant a)")&&(t.lat_ts=t.lat0,t.lat0=ye(t.lat0>0?90:-90),delete t.lat1)}function V0(t){let i={units:null,to_meter:void 0};return typeof t=="string"?(i.units=t.toLowerCase(),i.units==="metre"&&(i.units="meter"),i.units==="meter"&&(i.to_meter=1)):t&&t.name&&(i.units=t.name.toLowerCase(),i.units==="metre"&&(i.units="meter"),i.to_meter=t.conversion_factor),i}function j0(t){return typeof t=="object"?t.value*t.unit.conversion_factor:t}function tu(t,i){t.ellipsoid.radius?(i.a=t.ellipsoid.radius,i.rf=0):(i.a=j0(t.ellipsoid.semi_major_axis),t.ellipsoid.inverse_flattening!==void 0?i.rf=t.ellipsoid.inverse_flattening:t.ellipsoid.semi_major_axis!==void 0&&t.ellipsoid.semi_minor_axis!==void 0&&(i.rf=i.a/(i.a-j0(t.ellipsoid.semi_minor_axis))))}function ss(t,i={}){return!t||typeof t!="object"?t:t.type==="BoundCRS"?(ss(t.source_crs,i),t.transformation&&(t.transformation.method&&t.transformation.method.name==="NTv2"?i.nadgrids=t.transformation.parameters[0].value:i.datum_params=t.transformation.parameters.map(n=>n.value)),i):(Object.keys(t).forEach(n=>{const s=t[n];if(s!==null)switch(n){case"name":if(i.srsCode)break;i.name=s,i.srsCode=s;break;case"type":s==="GeographicCRS"?i.projName="longlat":s==="ProjectedCRS"&&t.conversion&&t.conversion.method&&(i.projName=t.conversion.method.name);break;case"datum":case"datum_ensemble":s.ellipsoid&&(i.ellps=s.ellipsoid.name,tu(s,i)),s.prime_meridian&&(i.from_greenwich=s.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":i.ellps=s.name,tu(s,i);break;case"prime_meridian":i.long0=(s.longitude||0)*Math.PI/180;break;case"coordinate_system":if(s.axis){if(i.axis=s.axis.map(o=>{const h=o.direction;if(h==="east")return"e";if(h==="north")return"n";if(h==="west")return"w";if(h==="south")return"s";throw new Error(`Unknown axis direction: ${h}`)}).join("")+"u",s.unit){const{units:o,to_meter:h}=V0(s.unit);i.units=o,i.to_meter=h}else if(s.axis[0]&&s.axis[0].unit){const{units:o,to_meter:h}=V0(s.axis[0].unit);i.units=o,i.to_meter=h}}break;case"id":s.authority&&s.code&&(i.title=s.authority+":"+s.code);break;case"conversion":s.method&&s.method.name&&(i.projName=s.method.name),s.parameters&&s.parameters.forEach(o=>{const h=o.name.toLowerCase().replace(/\s+/g,"_"),f=o.value;o.unit&&o.unit.conversion_factor?i[h]=f*o.unit.conversion_factor:o.unit==="degree"?i[h]=f*Math.PI/180:i[h]=f});break;case"unit":s.name&&(i.units=s.name.toLowerCase(),i.units==="metre"&&(i.units="meter")),s.conversion_factor&&(i.to_meter=s.conversion_factor);break;case"base_crs":ss(s,i),i.datumCode=s.id?s.id.authority+"_"+s.id.code:s.name;break}}),i.latitude_of_false_origin!==void 0&&(i.lat0=i.latitude_of_false_origin),i.longitude_of_false_origin!==void 0&&(i.long0=i.longitude_of_false_origin),i.latitude_of_standard_parallel!==void 0&&(i.lat0=i.latitude_of_standard_parallel,i.lat1=i.latitude_of_standard_parallel),i.latitude_of_1st_standard_parallel!==void 0&&(i.lat1=i.latitude_of_1st_standard_parallel),i.latitude_of_2nd_standard_parallel!==void 0&&(i.lat2=i.latitude_of_2nd_standard_parallel),i.latitude_of_projection_centre!==void 0&&(i.lat0=i.latitude_of_projection_centre),i.longitude_of_projection_centre!==void 0&&(i.longc=i.longitude_of_projection_centre),i.easting_at_false_origin!==void 0&&(i.x0=i.easting_at_false_origin),i.northing_at_false_origin!==void 0&&(i.y0=i.northing_at_false_origin),i.latitude_of_natural_origin!==void 0&&(i.lat0=i.latitude_of_natural_origin),i.longitude_of_natural_origin!==void 0&&(i.long0=i.longitude_of_natural_origin),i.longitude_of_origin!==void 0&&(i.long0=i.longitude_of_origin),i.false_easting!==void 0&&(i.x0=i.false_easting),i.easting_at_projection_centre&&(i.x0=i.easting_at_projection_centre),i.false_northing!==void 0&&(i.y0=i.false_northing),i.northing_at_projection_centre&&(i.y0=i.northing_at_projection_centre),i.standard_parallel_1!==void 0&&(i.lat1=i.standard_parallel_1),i.standard_parallel_2!==void 0&&(i.lat2=i.standard_parallel_2),i.scale_factor_at_natural_origin!==void 0&&(i.k0=i.scale_factor_at_natural_origin),i.scale_factor_at_projection_centre!==void 0&&(i.k0=i.scale_factor_at_projection_centre),i.scale_factor_on_pseudo_standard_parallel!==void 0&&(i.k0=i.scale_factor_on_pseudo_standard_parallel),i.azimuth!==void 0&&(i.alpha=i.azimuth),i.azimuth_at_projection_centre!==void 0&&(i.alpha=i.azimuth_at_projection_centre),i.angle_from_rectified_to_skew_grid&&(i.rectified_grid_angle=i.angle_from_rectified_to_skew_grid),Fu(i),i)}var bv=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Av(t,i){var n=i[0],s=i[1];!(n in t)&&s in t&&(t[n]=t[s],i.length===3&&(t[n]=i[2](t[n])))}function qu(t){for(var i=Object.keys(t),n=0,s=i.length;n<s;++n){var o=i[n];bv.indexOf(o)!==-1&&Gv(t[o]),typeof t[o]=="object"&&qu(t[o])}}function Gv(t){if(t.AUTHORITY){var i=Object.keys(t.AUTHORITY)[0];i&&i in t.AUTHORITY&&(t.title=i+":"+t.AUTHORITY[i])}if(t.type==="GEOGCS"?t.projName="longlat":t.type==="LOCAL_CS"?(t.projName="identity",t.local=!0):typeof t.PROJECTION=="object"?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var n="",s=0,o=t.AXIS.length;s<o;++s){var h=[t.AXIS[s][0].toLowerCase(),t.AXIS[s][1].toLowerCase()];h[0].indexOf("north")!==-1||(h[0]==="y"||h[0]==="lat")&&h[1]==="north"?n+="n":h[0].indexOf("south")!==-1||(h[0]==="y"||h[0]==="lat")&&h[1]==="south"?n+="s":h[0].indexOf("east")!==-1||(h[0]==="x"||h[0]==="lon")&&h[1]==="east"?n+="e":(h[0].indexOf("west")!==-1||(h[0]==="x"||h[0]==="lon")&&h[1]==="west")&&(n+="w")}n.length===2&&(n+="u"),n.length===3&&(t.axis=n)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),t.units==="metre"&&(t.units="meter"),t.UNIT.convert&&(t.type==="GEOGCS"?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var f=t.GEOGCS;t.type==="GEOGCS"&&(f=t),f&&(f.DATUM?t.datumCode=f.DATUM.name.toLowerCase():t.datumCode=f.name.toLowerCase(),t.datumCode.slice(0,2)==="d_"&&(t.datumCode=t.datumCode.slice(2)),t.datumCode==="new_zealand_1949"&&(t.datumCode="nzgd49"),(t.datumCode==="wgs_1984"||t.datumCode==="world_geodetic_system_1984")&&(t.PROJECTION==="Mercator_Auxiliary_Sphere"&&(t.sphere=!0),t.datumCode="wgs84"),t.datumCode==="belge_1972"&&(t.datumCode="rnb72"),f.DATUM&&f.DATUM.SPHEROID&&(t.ellps=f.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),t.ellps.toLowerCase().slice(0,13)==="international"&&(t.ellps="intl"),t.a=f.DATUM.SPHEROID.a,t.rf=parseFloat(f.DATUM.SPHEROID.rf,10)),f.DATUM&&f.DATUM.TOWGS84&&(t.datum_params=f.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),t.datumCode==="ch1903+"&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),t.rectified_grid_angle&&(t.rectified_grid_angle=ye(t.rectified_grid_angle));function u(y){var M=t.to_meter||1;return y*M}var c=function(y){return Av(t,y)},g=[["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",ye],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",ye],["x0","false_easting",u],["y0","false_northing",u],["long0","central_meridian",ye],["lat0","latitude_of_origin",ye],["lat0","standard_parallel_1",ye],["lat1","standard_parallel_1",ye],["lat2","standard_parallel_2",ye],["azimuth","Azimuth"],["alpha","azimuth",ye],["srsCode","name"]];g.forEach(c),Fu(t)}function as(t){if(typeof t=="object")return ss(t);const i=pv(t);var n=Sv(t);if(i==="WKT2"){const h=yv(n);return ss(h)}var s=n[0],o={};return $i(n,o),qu(o),o[s]}function Ct(t){var i=this;if(arguments.length===2){var n=arguments[1];typeof n=="string"?n.charAt(0)==="+"?Ct[t]=Ha(arguments[1]):Ct[t]=as(arguments[1]):n&&typeof n=="object"&&!("projName"in n)?Ct[t]=as(arguments[1]):(Ct[t]=n,n||delete Ct[t])}else if(arguments.length===1){if(Array.isArray(t))return t.map(function(s){return Array.isArray(s)?Ct.apply(i,s):Ct(s)});if(typeof t=="string"){if(t in Ct)return Ct[t]}else"EPSG"in t?Ct["EPSG:"+t.EPSG]=t:"ESRI"in t?Ct["ESRI:"+t.ESRI]=t:"IAU2000"in t?Ct["IAU2000:"+t.IAU2000]=t:console.log(t);return}}uv(Ct);function Iv(t){return typeof t=="string"}function Cv(t){return t in Ct}function Nv(t){return t.indexOf("+")!==0&&t.indexOf("[")!==-1||typeof t=="object"&&!("srsCode"in t)}var Rv=["3857","900913","3785","102113"];function Lv(t){var i=ii(t,"authority");if(i){var n=ii(i,"epsg");return n&&Rv.indexOf(n)>-1}}function Ov(t){var i=ii(t,"extension");if(i)return ii(i,"proj4")}function Tv(t){return t[0]==="+"}function Bv(t){if(Iv(t)){if(Cv(t))return Ct[t];if(Nv(t)){var i=as(t);if(Lv(i))return Ct["EPSG:3857"];var n=Ov(i);return n?Ha(n):i}if(Tv(t))return Ha(t)}else return"projName"in t?t:as(t)}function eu(t,i){t=t||{};var n,s;if(!i)return t;for(s in i)n=i[s],n!==void 0&&(t[s]=n);return t}function Ae(t,i,n){var s=t*i;return n/Math.sqrt(1-s*s)}function Xn(t){return t<0?-1:1}function q(t,i){return i||Math.abs(t)<=Et?t:t-Xn(t)*Fn}function we(t,i,n){var s=t*n,o=.5*t;return s=Math.pow((1-s)/(1+s),o),Math.tan(.5*(O-i))/s}function Dn(t,i){for(var n=.5*t,s,o,h=O-2*Math.atan(i),f=0;f<=15;f++)if(s=t*Math.sin(h),o=O-2*Math.atan(i*Math.pow((1-s)/(1+s),n))-h,h+=o,Math.abs(o)<=1e-10)return h;return-9999}function Fv(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=Ae(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function qv(t){var i=t.x,n=t.y;if(n*Yt>90&&n*Yt<-90&&i*Yt>180&&i*Yt<-180)return null;var s,o;if(Math.abs(Math.abs(n)-O)<=B)return null;if(this.sphere)s=this.x0+this.a*this.k0*q(i-this.long0,this.over),o=this.y0+this.a*this.k0*Math.log(Math.tan(ot+.5*n));else{var h=Math.sin(n),f=we(this.e,n,h);s=this.x0+this.a*this.k0*q(i-this.long0,this.over),o=this.y0-this.a*this.k0*Math.log(f)}return t.x=s,t.y=o,t}function Dv(t){var i=t.x-this.x0,n=t.y-this.y0,s,o;if(this.sphere)o=O-2*Math.atan(Math.exp(-n/(this.a*this.k0)));else{var h=Math.exp(-n/(this.a*this.k0));if(o=Dn(this.e,h),o===-9999)return null}return s=q(this.long0+i/(this.a*this.k0),this.over),t.x=s,t.y=o,t}var Uv=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"];const Wv={init:Fv,forward:qv,inverse:Dv,names:Uv};function $v(){}function iu(t){return t}var Du=["longlat","identity"];const zv={init:$v,forward:iu,inverse:iu,names:Du};var Xv=[Wv,zv],vi={},zi=[];function Uu(t,i){var n=zi.length;return t.names?(zi[n]=t,t.names.forEach(function(s){vi[s.toLowerCase()]=n}),this):(console.log(i),!0)}function Wu(t){return t.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}function kv(t){if(!t)return!1;var i=t.toLowerCase();if(typeof vi[i]<"u"&&zi[vi[i]]||(i=Wu(i),i in vi&&zi[vi[i]]))return zi[vi[i]]}function Hv(){Xv.forEach(Uu)}const Yv={start:Hv,add:Uu,get:kv};var $u={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,rf: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)"}};const Kv=$u.WGS84;function Qv(t,i,n,s){var o=t*t,h=i*i,f=(o-h)/o,u=0;s?(t*=1-f*(cv+f*(_v+f*gv)),o=t*t,f=0):u=Math.sqrt(f);var c=(o-h)/h;return{es:f,e:u,ep2:c}}function Jv(t,i,n,s,o){if(!t){var h=ii($u,s);h||(h=Kv),t=h.a,i=h.b,n=h.rf}return n&&!i&&(i=(1-1/n)*t),(n===0||Math.abs(t-i)<B)&&(o=!0,i=t),{a:t,b:i,rf:n,sphere:o}}var jr={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:"clark80",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.0276,-0.2167,0.2147,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,-1.91514,1.60363,-9.09546,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.243649,-1.158827,-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,32.39344,-153.25684,-96.2266,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,-8.393,0.749,-10.276,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,1.25033e-7,4.6785e-8,5.6529e-8,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:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},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:"374,150,588"},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"}};for(var Zv in jr){var Fa=jr[Zv];Fa.datumName&&(jr[Fa.datumName]=Fa)}function Vv(t,i,n,s,o,h,f){var u={};return t===void 0||t==="none"?u.datum_type=ka:u.datum_type=fv,i&&(u.datum_params=i.map(parseFloat),(u.datum_params[0]!==0||u.datum_params[1]!==0||u.datum_params[2]!==0)&&(u.datum_type=yi),u.datum_params.length>3&&(u.datum_params[3]!==0||u.datum_params[4]!==0||u.datum_params[5]!==0||u.datum_params[6]!==0)&&(u.datum_type=pi,u.datum_params[3]*=Rn,u.datum_params[4]*=Rn,u.datum_params[5]*=Rn,u.datum_params[6]=u.datum_params[6]/1e6+1)),f&&(u.datum_type=Yi,u.grids=f),u.a=n,u.b=s,u.es=o,u.ep2=h,u}var to={};function jv(t,i,n){return i instanceof ArrayBuffer?td(t,i,n):{ready:ed(t,i)}}function td(t,i,n){var s=!0;n!==void 0&&n.includeErrorFields===!1&&(s=!1);var o=new DataView(i),h=rd(o),f=sd(o,h),u=ad(o,f,h,s),c={header:f,subgrids:u};return to[t]=c,c}async function ed(t,i){for(var n=[],s=await i.getImageCount(),o=s-1;o>=0;o--){var h=await i.getImage(o),f=await h.readRasters(),u=f,c=[h.getWidth(),h.getHeight()],g=h.getBoundingBox().map(nu),y=[h.fileDirectory.ModelPixelScale[0],h.fileDirectory.ModelPixelScale[1]].map(nu),M=g[0]+(c[0]-1)*y[0],v=g[3]-(c[1]-1)*y[1],E=u[0],x=u[1],b=[];for(let T=c[1]-1;T>=0;T--)for(let F=c[0]-1;F>=0;F--){var A=T*c[0]+F;b.push([-ti(x[A]),ti(E[A])])}n.push({del:y,lim:c,ll:[-M,v],cvs:b})}var C={header:{nSubgrids:s},subgrids:n};return to[t]=C,C}function id(t){if(t===void 0)return null;var i=t.split(",");return i.map(nd)}function nd(t){if(t.length===0)return null;var i=t[0]==="@";return i&&(t=t.slice(1)),t==="null"?{name:"null",mandatory:!i,grid:null,isNull:!0}:{name:t,mandatory:!i,grid:to[t]||null,isNull:!1}}function nu(t){return t*Math.PI/180}function ti(t){return t/3600*Math.PI/180}function rd(t){var i=t.getInt32(8,!1);return i===11?!1:(i=t.getInt32(8,!0),i!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function sd(t,i){return{nFields:t.getInt32(8,i),nSubgridFields:t.getInt32(24,i),nSubgrids:t.getInt32(40,i),shiftType:Ya(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,i),fromSemiMinorAxis:t.getFloat64(136,i),toSemiMajorAxis:t.getFloat64(152,i),toSemiMinorAxis:t.getFloat64(168,i)}}function Ya(t,i,n){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(i,n)))}function ad(t,i,n,s){for(var o=176,h=[],f=0;f<i.nSubgrids;f++){var u=hd(t,o,n),c=ud(t,o,u,n,s),g=Math.round(1+(u.upperLongitude-u.lowerLongitude)/u.longitudeInterval),y=Math.round(1+(u.upperLatitude-u.lowerLatitude)/u.latitudeInterval);h.push({ll:[ti(u.lowerLongitude),ti(u.lowerLatitude)],del:[ti(u.longitudeInterval),ti(u.latitudeInterval)],lim:[g,y],count:u.gridNodeCount,cvs:od(c)});var M=16;s===!1&&(M=8),o+=176+u.gridNodeCount*M}return h}function od(t){return t.map(function(i){return[ti(i.longitudeShift),ti(i.latitudeShift)]})}function hd(t,i,n){return{name:Ya(t,i+8,i+16).trim(),parent:Ya(t,i+24,i+24+8).trim(),lowerLatitude:t.getFloat64(i+72,n),upperLatitude:t.getFloat64(i+88,n),lowerLongitude:t.getFloat64(i+104,n),upperLongitude:t.getFloat64(i+120,n),latitudeInterval:t.getFloat64(i+136,n),longitudeInterval:t.getFloat64(i+152,n),gridNodeCount:t.getInt32(i+168,n)}}function ud(t,i,n,s,o){var h=i+176,f=16;o===!1&&(f=8);for(var u=[],c=0;c<n.gridNodeCount;c++){var g={latitudeShift:t.getFloat32(h+c*f,s),longitudeShift:t.getFloat32(h+c*f+4,s)};o!==!1&&(g.latitudeAccuracy=t.getFloat32(h+c*f+8,s),g.longitudeAccuracy=t.getFloat32(h+c*f+12,s)),u.push(g)}return u}function le(t,i){if(!(this instanceof le))return new le(t);this.forward=null,this.inverse=null,this.init=null,this.name,this.names=null,this.title,i=i||function(g){if(g)throw g};var n=Bv(t);if(typeof n!="object"){i("Could not parse to valid json: "+t);return}var s=le.projections.get(n.projName);if(!s){i("Could not get projection name from: "+t);return}if(n.datumCode&&n.datumCode!=="none"){var o=ii(jr,n.datumCode);o&&(n.datum_params=n.datum_params||(o.towgs84?o.towgs84.split(","):null),n.ellps=o.ellipse,n.datumName=o.datumName?o.datumName:n.datumCode)}n.k0=n.k0||1,n.axis=n.axis||"enu",n.ellps=n.ellps||"wgs84",n.lat1=n.lat1||n.lat0;var h=Jv(n.a,n.b,n.rf,n.ellps,n.sphere),f=Qv(h.a,h.b,h.rf,n.R_A),u=id(n.nadgrids),c=n.datum||Vv(n.datumCode,n.datum_params,h.a,h.b,f.es,f.ep2,u);eu(this,n),eu(this,s),this.a=h.a,this.b=h.b,this.rf=h.rf,this.sphere=h.sphere,this.es=f.es,this.e=f.e,this.ep2=f.ep2,this.datum=c,"init"in this&&typeof this.init=="function"&&this.init(),i(null,this)}le.projections=Yv;le.projections.start();function fd(t,i){return t.datum_type!==i.datum_type||t.a!==i.a||Math.abs(t.es-i.es)>5e-11?!1:t.datum_type===yi?t.datum_params[0]===i.datum_params[0]&&t.datum_params[1]===i.datum_params[1]&&t.datum_params[2]===i.datum_params[2]:t.datum_type===pi?t.datum_params[0]===i.datum_params[0]&&t.datum_params[1]===i.datum_params[1]&&t.datum_params[2]===i.datum_params[2]&&t.datum_params[3]===i.datum_params[3]&&t.datum_params[4]===i.datum_params[4]&&t.datum_params[5]===i.datum_params[5]&&t.datum_params[6]===i.datum_params[6]:!0}function zu(t,i,n){var s=t.x,o=t.y,h=t.z?t.z:0,f,u,c,g;if(o<-O&&o>-1.001*O)o=-O;else if(o>O&&o<1.001*O)o=O;else{if(o<-O)return{x:-1/0,y:-1/0,z:t.z};if(o>O)return{x:1/0,y:1/0,z:t.z}}return s>Math.PI&&(s-=2*Math.PI),u=Math.sin(o),g=Math.cos(o),c=u*u,f=n/Math.sqrt(1-i*c),{x:(f+h)*g*Math.cos(s),y:(f+h)*g*Math.sin(s),z:(f*(1-i)+h)*u}}function Xu(t,i,n,s){var o=1e-12,h=o*o,f=30,u,c,g,y,M,v,E,x,b,A,C,T,F,W=t.x,$=t.y,X=t.z?t.z:0,K,j,rt;if(u=Math.sqrt(W*W+$*$),c=Math.sqrt(W*W+$*$+X*X),u/n<o){if(K=0,c/n<o)return j=O,rt=-s,{x:t.x,y:t.y,z:t.z}}else K=Math.atan2($,W);g=X/c,y=u/c,M=1/Math.sqrt(1-i*(2-i)*y*y),x=y*(1-i)*M,b=g*M,F=0;do F++,E=n/Math.sqrt(1-i*b*b),rt=u*x+X*b-E*(1-i*b*b),v=i*E/(E+rt),M=1/Math.sqrt(1-v*(2-v)*y*y),A=y*(1-v)*M,C=g*M,T=C*x-A*b,x=A,b=C;while(T*T>h&&F<f);return j=Math.atan(C/Math.abs(A)),{x:K,y:j,z:rt}}function ld(t,i,n){if(i===yi)return{x:t.x+n[0],y:t.y+n[1],z:t.z+n[2]};if(i===pi){var s=n[0],o=n[1],h=n[2],f=n[3],u=n[4],c=n[5],g=n[6];return{x:g*(t.x-c*t.y+u*t.z)+s,y:g*(c*t.x+t.y-f*t.z)+o,z:g*(-u*t.x+f*t.y+t.z)+h}}}function cd(t,i,n){if(i===yi)return{x:t.x-n[0],y:t.y-n[1],z:t.z-n[2]};if(i===pi){var s=n[0],o=n[1],h=n[2],f=n[3],u=n[4],c=n[5],g=n[6],y=(t.x-s)/g,M=(t.y-o)/g,v=(t.z-h)/g;return{x:y+c*M-u*v,y:-c*y+M+f*v,z:u*y-f*M+v}}}function Xr(t){return t===yi||t===pi}function _d(t,i,n){if(fd(t,i)||t.datum_type===ka||i.datum_type===ka)return n;var s=t.a,o=t.es;if(t.datum_type===Yi){var h=ru(t,!1,n);if(h!==0)return;s=Q0,o=J0}var f=i.a,u=i.b,c=i.es;if(i.datum_type===Yi&&(f=Q0,u=lv,c=J0),o===c&&s===f&&!Xr(t.datum_type)&&!Xr(i.datum_type))return n;if(n=zu(n,o,s),Xr(t.datum_type)&&(n=ld(n,t.datum_type,t.datum_params)),Xr(i.datum_type)&&(n=cd(n,i.datum_type,i.datum_params)),n=Xu(n,c,f,u),i.datum_type===Yi){var g=ru(i,!0,n);if(g!==0)return}return n}function ru(t,i,n){if(t.grids===null||t.grids.length===0)return console.log("Grid shift grids not found"),-1;var s={x:-n.x,y:n.y},o={x:Number.NaN,y:Number.NaN},h=[];t:for(var f=0;f<t.grids.length;f++){var u=t.grids[f];if(h.push(u.name),u.isNull){o=s;break}if(u.grid===null){if(u.mandatory)return console.log("Unable to find mandatory grid '"+u.name+"'"),-1;continue}for(var c=u.grid.subgrids,g=0,y=c.length;g<y;g++){var M=c[g],v=(Math.abs(M.del[1])+Math.abs(M.del[0]))/1e4,E=M.ll[0]-v,x=M.ll[1]-v,b=M.ll[0]+(M.lim[0]-1)*M.del[0]+v,A=M.ll[1]+(M.lim[1]-1)*M.del[1]+v;if(!(x>s.y||E>s.x||A<s.y||b<s.x)&&(o=gd(s,i,M),!isNaN(o.x)))break t}}return isNaN(o.x)?(console.log("Failed to find a grid shift table for location '"+-s.x*Yt+" "+s.y*Yt+" tried: '"+h+"'"),-1):(n.x=-o.x,n.y=o.y,0)}function gd(t,i,n){var s={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return s;var o={x:t.x,y:t.y};o.x-=n.ll[0],o.y-=n.ll[1],o.x=q(o.x-Math.PI)+Math.PI;var h=su(o,n);if(i){if(isNaN(h.x))return s;h.x=o.x-h.x,h.y=o.y-h.y;var f=9,u=1e-12,c,g;do{if(g=su(h,n),isNaN(g.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}c={x:o.x-(g.x+h.x),y:o.y-(g.y+h.y)},h.x+=c.x,h.y+=c.y}while(f--&&Math.abs(c.x)>u&&Math.abs(c.y)>u);if(f<0)return console.log("Inverse grid shift iterator failed to converge."),s;s.x=q(h.x+n.ll[0]),s.y=h.y+n.ll[1]}else isNaN(h.x)||(s.x=t.x+h.x,s.y=t.y+h.y);return s}function su(t,i){var n={x:t.x/i.del[0],y:t.y/i.del[1]},s={x:Math.floor(n.x),y:Math.floor(n.y)},o={x:n.x-1*s.x,y:n.y-1*s.y},h={x:Number.NaN,y:Number.NaN},f;if(s.x<0||s.x>=i.lim[0]||s.y<0||s.y>=i.lim[1])return h;f=s.y*i.lim[0]+s.x;var u={x:i.cvs[f][0],y:i.cvs[f][1]};f++;var c={x:i.cvs[f][0],y:i.cvs[f][1]};f+=i.lim[0];var g={x:i.cvs[f][0],y:i.cvs[f][1]};f--;var y={x:i.cvs[f][0],y:i.cvs[f][1]},M=o.x*o.y,v=o.x*(1-o.y),E=(1-o.x)*(1-o.y),x=(1-o.x)*o.y;return h.x=E*u.x+v*c.x+x*y.x+M*g.x,h.y=E*u.y+v*c.y+x*y.y+M*g.y,h}function au(t,i,n){var s=n.x,o=n.y,h=n.z||0,f,u,c,g={};for(c=0;c<3;c++)if(!(i&&c===2&&n.z===void 0))switch(c===0?(f=s,"ew".indexOf(t.axis[c])!==-1?u="x":u="y"):c===1?(f=o,"ns".indexOf(t.axis[c])!==-1?u="y":u="x"):(f=h,u="z"),t.axis[c]){case"e":g[u]=f;break;case"w":g[u]=-f;break;case"n":g[u]=f;break;case"s":g[u]=-f;break;case"u":n[u]!==void 0&&(g.z=f);break;case"d":n[u]!==void 0&&(g.z=-f);break;default:return null}return g}function ku(t){var i={x:t[0],y:t[1]};return t.length>2&&(i.z=t[2]),t.length>3&&(i.m=t[3]),i}function vd(t){ou(t.x),ou(t.y)}function ou(t){if(typeof Number.isFinite=="function"){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if(typeof t!="number"||t!==t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function dd(t,i){return(t.datum.datum_type===yi||t.datum.datum_type===pi||t.datum.datum_type===Yi)&&i.datumCode!=="WGS84"||(i.datum.datum_type===yi||i.datum.datum_type===pi||i.datum.datum_type===Yi)&&t.datumCode!=="WGS84"}function os(t,i,n,s){var o;Array.isArray(n)?n=ku(n):n={x:n.x,y:n.y,z:n.z,m:n.m};var h=n.z!==void 0;if(vd(n),t.datum&&i.datum&&dd(t,i)&&(o=new le("WGS84"),n=os(t,o,n,s),t=o),s&&t.axis!=="enu"&&(n=au(t,!1,n)),t.projName==="longlat")n={x:n.x*yt,y:n.y*yt,z:n.z||0};else if(t.to_meter&&(n={x:n.x*t.to_meter,y:n.y*t.to_meter,z:n.z||0}),n=t.inverse(n),!n)return;if(t.from_greenwich&&(n.x+=t.from_greenwich),n=_d(t.datum,i.datum,n),!!n)return n=n,i.from_greenwich&&(n={x:n.x-i.from_greenwich,y:n.y,z:n.z||0}),i.projName==="longlat"?n={x:n.x*Yt,y:n.y*Yt,z:n.z||0}:(n=i.forward(n),i.to_meter&&(n={x:n.x/i.to_meter,y:n.y/i.to_meter,z:n.z||0})),s&&i.axis!=="enu"?au(i,!0,n):(n&&!h&&delete n.z,n)}var hu=le("WGS84");function qa(t,i,n,s){var o,h,f;return Array.isArray(n)?(o=os(t,i,n,s)||{x:NaN,y:NaN},n.length>2?typeof t.name<"u"&&t.name==="geocent"||typeof i.name<"u"&&i.name==="geocent"?typeof o.z=="number"?[o.x,o.y,o.z].concat(n.slice(3)):[o.x,o.y,n[2]].concat(n.slice(3)):[o.x,o.y].concat(n.slice(2)):[o.x,o.y]):(h=os(t,i,n,s),f=Object.keys(n),f.length===2||f.forEach(function(u){if(typeof t.name<"u"&&t.name==="geocent"||typeof i.name<"u"&&i.name==="geocent"){if(u==="x"||u==="y"||u==="z")return}else if(u==="x"||u==="y")return;h[u]=n[u]}),h)}function kr(t){return t instanceof le?t:typeof t=="object"&&"oProj"in t?t.oProj:le(t)}function Md(t,i,n){var s,o,h=!1,f;return typeof i>"u"?(o=kr(t),s=hu,h=!0):(typeof i.x<"u"||Array.isArray(i))&&(n=i,o=kr(t),s=hu,h=!0),s||(s=kr(t)),o||(o=kr(i)),n?qa(s,o,n):(f={forward:function(u,c){return qa(s,o,u,c)},inverse:function(u,c){return qa(o,s,u,c)}},h&&(f.oProj=o),f)}var uu=6,Hu="AJSAJS",Yu="AFAFAF",Xi=65,kt=73,fe=79,bn=86,An=90;const md={forward:Ku,inverse:yd,toPoint:Qu};function Ku(t,i){return i=i||5,Ed(pd({lat:t[1],lon:t[0]}),i)}function yd(t){var i=eo(Zu(t.toUpperCase()));return i.lat&&i.lon?[i.lon,i.lat,i.lon,i.lat]:[i.left,i.bottom,i.right,i.top]}function Qu(t){var i=eo(Zu(t.toUpperCase()));return i.lat&&i.lon?[i.lon,i.lat]:[(i.left+i.right)/2,(i.top+i.bottom)/2]}function Da(t){return t*(Math.PI/180)}function fu(t){return 180*(t/Math.PI)}function pd(t){var i=t.lat,n=t.lon,s=6378137,o=.00669438,h=.9996,f,u,c,g,y,M,v,E=Da(i),x=Da(n),b,A;A=Math.floor((n+180)/6)+1,n===180&&(A=60),i>=56&&i<64&&n>=3&&n<12&&(A=32),i>=72&&i<84&&(n>=0&&n<9?A=31:n>=9&&n<21?A=33:n>=21&&n<33?A=35:n>=33&&n<42&&(A=37)),f=(A-1)*6-180+3,b=Da(f),u=o/(1-o),c=s/Math.sqrt(1-o*Math.sin(E)*Math.sin(E)),g=Math.tan(E)*Math.tan(E),y=u*Math.cos(E)*Math.cos(E),M=Math.cos(E)*(x-b),v=s*((1-o/4-3*o*o/64-5*o*o*o/256)*E-(3*o/8+3*o*o/32+45*o*o*o/1024)*Math.sin(2*E)+(15*o*o/256+45*o*o*o/1024)*Math.sin(4*E)-35*o*o*o/3072*Math.sin(6*E));var C=h*c*(M+(1-g+y)*M*M*M/6+(5-18*g+g*g+72*y-58*u)*M*M*M*M*M/120)+5e5,T=h*(v+c*Math.tan(E)*(M*M/2+(5-g+9*y+4*y*y)*M*M*M*M/24+(61-58*g+g*g+600*y-330*u)*M*M*M*M*M*M/720));return i<0&&(T+=1e7),{northing:Math.round(T),easting:Math.round(C),zoneNumber:A,zoneLetter:wd(i)}}function eo(t){var i=t.northing,n=t.easting,s=t.zoneLetter,o=t.zoneNumber;if(o<0||o>60)return null;var h=.9996,f=6378137,u=.00669438,c,g=(1-Math.sqrt(1-u))/(1+Math.sqrt(1-u)),y,M,v,E,x,b,A,C,T,F=n-5e5,W=i;s<"N"&&(W-=1e7),A=(o-1)*6-180+3,c=u/(1-u),b=W/h,C=b/(f*(1-u/4-3*u*u/64-5*u*u*u/256)),T=C+(3*g/2-27*g*g*g/32)*Math.sin(2*C)+(21*g*g/16-55*g*g*g*g/32)*Math.sin(4*C)+151*g*g*g/96*Math.sin(6*C),y=f/Math.sqrt(1-u*Math.sin(T)*Math.sin(T)),M=Math.tan(T)*Math.tan(T),v=c*Math.cos(T)*Math.cos(T),E=f*(1-u)/Math.pow(1-u*Math.sin(T)*Math.sin(T),1.5),x=F/(y*h);var $=T-y*Math.tan(T)/E*(x*x/2-(5+3*M+10*v-4*v*v-9*c)*x*x*x*x/24+(61+90*M+298*v+45*M*M-252*c-3*v*v)*x*x*x*x*x*x/720);$=fu($);var X=(x-(1+2*M+v)*x*x*x/6+(5-2*v+28*M-3*v*v+8*c+24*M*M)*x*x*x*x*x/120)/Math.cos(T);X=A+fu(X);var K;if(t.accuracy){var j=eo({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});K={top:j.lat,right:j.lon,bottom:$,left:X}}else K={lat:$,lon:X};return K}function wd(t){var i="Z";return 84>=t&&t>=72?i="X":72>t&&t>=64?i="W":64>t&&t>=56?i="V":56>t&&t>=48?i="U":48>t&&t>=40?i="T":40>t&&t>=32?i="S":32>t&&t>=24?i="R":24>t&&t>=16?i="Q":16>t&&t>=8?i="P":8>t&&t>=0?i="N":0>t&&t>=-8?i="M":-8>t&&t>=-16?i="L":-16>t&&t>=-24?i="K":-24>t&&t>=-32?i="J":-32>t&&t>=-40?i="H":-40>t&&t>=-48?i="G":-48>t&&t>=-56?i="F":-56>t&&t>=-64?i="E":-64>t&&t>=-72?i="D":-72>t&&t>=-80&&(i="C"),i}function Ed(t,i){var n="00000"+t.easting,s="00000"+t.northing;return t.zoneNumber+t.zoneLetter+xd(t.easting,t.northing,t.zoneNumber)+n.substr(n.length-5,i)+s.substr(s.length-5,i)}function xd(t,i,n){var s=Ju(n),o=Math.floor(t/1e5),h=Math.floor(i/1e5)%20;return Sd(o,h,s)}function Ju(t){var i=t%uu;return i===0&&(i=uu),i}function Sd(t,i,n){var s=n-1,o=Hu.charCodeAt(s),h=Yu.charCodeAt(s),f=o+t-1,u=h+i,c=!1;f>An&&(f=f-An+Xi-1,c=!0),(f===kt||o<kt&&f>kt||(f>kt||o<kt)&&c)&&f++,(f===fe||o<fe&&f>fe||(f>fe||o<fe)&&c)&&(f++,f===kt&&f++),f>An&&(f=f-An+Xi-1),u>bn?(u=u-bn+Xi-1,c=!0):c=!1,(u===kt||h<kt&&u>kt||(u>kt||h<kt)&&c)&&u++,(u===fe||h<fe&&u>fe||(u>fe||h<fe)&&c)&&(u++,u===kt&&u++),u>bn&&(u=u-bn+Xi-1);var g=String.fromCharCode(f)+String.fromCharCode(u);return g}function Zu(t){if(t&&t.length===0)throw"MGRSPoint coverting from nothing";for(var i=t.length,n=null,s="",o,h=0;!/[A-Z]/.test(o=t.charAt(h));){if(h>=2)throw"MGRSPoint bad conversion from: "+t;s+=o,h++}var f=parseInt(s,10);if(h===0||h+3>i)throw"MGRSPoint bad conversion from: "+t;var u=t.charAt(h++);if(u<="A"||u==="B"||u==="Y"||u>="Z"||u==="I"||u==="O")throw"MGRSPoint zone letter "+u+" not handled: "+t;n=t.substring(h,h+=2);for(var c=Ju(f),g=Pd(n.charAt(0),c),y=bd(n.charAt(1),c);y<Ad(u);)y+=2e6;var M=i-h;if(M%2!==0)throw`MGRSPoint has to have an even number
|
|
2
2
|
of digits after the zone letter and two 100km letters - front
|
|
3
3
|
half for easting meters, second half for
|
|
4
|
-
northing meters`+t;var v=M/2,E=0,x=0,b,A,C,T,F;return v>0&&(b=1e5/Math.pow(10,v),A=t.substring(h,h+v),E=parseFloat(A)*b,C=t.substring(h+v),x=parseFloat(C)*b),T=E+g,F=x+y,{easting:T,northing:F,zoneLetter:u,zoneNumber:f,accuracy:b}}function Gd(t,i){for(var n=Ku.charCodeAt(i-1),s=1e5,o=!1;n!==t.charCodeAt(0);){if(n++,n===kt&&n++,n===fe&&n++,n>An){if(o)throw"Bad character: "+t;n=Xi,o=!0}s+=1e5}return s}function Id(t,i){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var n=Qu.charCodeAt(i-1),s=0,o=!1;n!==t.charCodeAt(0);){if(n++,n===kt&&n++,n===fe&&n++,n>bn){if(o)throw"Bad character: "+t;n=Xi,o=!0}s+=1e5}return s}function Cd(t){var i;switch(t){case"C":i=11e5;break;case"D":i=2e6;break;case"E":i=28e5;break;case"F":i=37e5;break;case"G":i=46e5;break;case"H":i=55e5;break;case"J":i=64e5;break;case"K":i=73e5;break;case"L":i=82e5;break;case"M":i=91e5;break;case"N":i=0;break;case"P":i=8e5;break;case"Q":i=17e5;break;case"R":i=26e5;break;case"S":i=35e5;break;case"T":i=44e5;break;case"U":i=53e5;break;case"V":i=62e5;break;case"W":i=7e6;break;case"X":i=79e5;break;default:i=-1}if(i>=0)return i;throw"Invalid zone letter: "+t}function Ji(t,i,n){if(!(this instanceof Ji))return new Ji(t,i,n);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if(typeof t=="object")this.x=t.x,this.y=t.y,this.z=t.z||0;else if(typeof t=="string"&&typeof i>"u"){var s=t.split(",");this.x=parseFloat(s[0]),this.y=parseFloat(s[1]),this.z=parseFloat(s[2])||0}else this.x=t,this.y=i,this.z=n||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Ji.fromMGRS=function(t){return new Ji(Zu(t))};Ji.prototype.toMGRS=function(t){return Ju([this.x,this.y],t)};var Nd=1,Rd=.25,_u=.046875,gu=.01953125,vu=.01068115234375,Ld=.75,Od=.46875,Td=.013020833333333334,Bd=.007120768229166667,Fd=.3645833333333333,qd=.005696614583333333,Dd=.3076171875;function oo(t){var i=[];i[0]=Nd-t*(Rd+t*(_u+t*(gu+t*vu))),i[1]=t*(Ld-t*(_u+t*(gu+t*vu)));var n=t*t;return i[2]=n*(Od-t*(Td+t*Bd)),n*=t,i[3]=n*(Fd-t*qd),i[4]=n*t*Dd,i}function Vi(t,i,n,s){return n*=i,i*=i,s[0]*t-n*(s[1]+i*(s[2]+i*(s[3]+i*s[4])))}var Ud=20;function ho(t,i,n){for(var s=1/(1-i),o=t,h=Ud;h;--h){var f=Math.sin(o),u=1-i*f*f;if(u=(Vi(o,f,Math.cos(o),n)-t)*(u*Math.sqrt(u))*s,o-=u,Math.abs(u)<B)return o}return o}function Wd(){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=oo(this.es),this.ml0=Vi(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function $d(t){var i=t.x,n=t.y,s=q(i-this.long0,this.over),o,h,f,u=Math.sin(n),c=Math.cos(n);if(this.es){var y=c*s,M=Math.pow(y,2),v=this.ep2*Math.pow(c,2),E=Math.pow(v,2),x=Math.abs(c)>B?Math.tan(n):0,b=Math.pow(x,2),A=Math.pow(b,2);o=1-this.es*Math.pow(u,2),y=y/Math.sqrt(o);var C=Vi(n,u,c,this.en);h=this.a*(this.k0*y*(1+M/6*(1-b+v+M/20*(5-18*b+A+14*v-58*b*v+M/42*(61+179*A-A*b-479*b)))))+this.x0,f=this.a*(this.k0*(C-this.ml0+u*s*y/2*(1+M/12*(5-b+9*v+4*E+M/30*(61+A-58*b+270*v-330*b*v+M/56*(1385+543*A-A*b-3111*b))))))+this.y0}else{var g=c*Math.sin(s);if(Math.abs(Math.abs(g)-1)<B)return 93;if(h=.5*this.a*this.k0*Math.log((1+g)/(1-g))+this.x0,f=c*Math.cos(s)/Math.sqrt(1-Math.pow(g,2)),g=Math.abs(f),g>=1){if(g-1>B)return 93;f=0}else f=Math.acos(f);n<0&&(f=-f),f=this.a*this.k0*(f-this.lat0)+this.y0}return t.x=h,t.y=f,t}function zd(t){var i,n,s,o,h=(t.x-this.x0)*(1/this.a),f=(t.y-this.y0)*(1/this.a);if(this.es)if(i=this.ml0+f/this.k0,n=ho(i,this.es,this.en),Math.abs(n)<O){var M=Math.sin(n),v=Math.cos(n),E=Math.abs(v)>B?Math.tan(n):0,x=this.ep2*Math.pow(v,2),b=Math.pow(x,2),A=Math.pow(E,2),C=Math.pow(A,2);i=1-this.es*Math.pow(M,2);var T=h*Math.sqrt(i)/this.k0,F=Math.pow(T,2);i=i*E,s=n-i*F/(1-this.es)*.5*(1-F/12*(5+3*A-9*x*A+x-4*b-F/30*(61+90*A-252*x*A+45*C+46*x-F/56*(1385+3633*A+4095*C+1574*C*A)))),o=q(this.long0+T*(1-F/6*(1+2*A+x-F/20*(5+28*A+24*C+8*x*A+6*x-F/42*(61+662*A+1320*C+720*C*A))))/v,this.over)}else s=O*Xn(f),o=0;else{var u=Math.exp(h/this.k0),c=.5*(u-1/u),g=this.lat0+f/this.k0,y=Math.cos(g);i=Math.sqrt((1-Math.pow(y,2))/(1+Math.pow(c,2))),s=Math.asin(i),f<0&&(s=-s),c===0&&y===0?o=0:o=q(Math.atan2(c,y)+this.long0,this.over)}return t.x=o,t.y=s,t}var Xd=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const is={init:Wd,forward:$d,inverse:zd,names:Xd};function tf(t){var i=Math.exp(t);return i=(i-1/i)/2,i}function Ht(t,i){t=Math.abs(t),i=Math.abs(i);var n=Math.max(t,i),s=Math.min(t,i)/(n||1);return n*Math.sqrt(1+Math.pow(s,2))}function kd(t){var i=1+t,n=i-1;return n===0?t:t*Math.log(i)/n}function Hd(t){var i=Math.abs(t);return i=kd(i*(1+i/(Ht(1,i)+1))),t<0?-i:i}function uo(t,i){for(var n=2*Math.cos(2*i),s=t.length-1,o=t[s],h=0,f;--s>=0;)f=-h+n*o+t[s],h=o,o=f;return i+f*Math.sin(2*i)}function Yd(t,i){for(var n=2*Math.cos(i),s=t.length-1,o=t[s],h=0,f;--s>=0;)f=-h+n*o+t[s],h=o,o=f;return Math.sin(i)*f}function Kd(t){var i=Math.exp(t);return i=(i+1/i)/2,i}function ef(t,i,n){for(var s=Math.sin(i),o=Math.cos(i),h=tf(n),f=Kd(n),u=2*o*f,c=-2*s*h,g=t.length-1,y=t[g],M=0,v=0,E=0,x,b;--g>=0;)x=v,b=M,v=y,M=E,y=-x+u*v-c*M+t[g],E=-b+c*v+u*M;return u=s*f,c=o*h,[u*y-c*E,u*E+c*y]}function Qd(){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&&(is.init.apply(this),this.forward=is.forward,this.inverse=is.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.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),i=t/(2-t),n=i;this.cgb[0]=i*(2+i*(-2/3+i*(-2+i*(116/45+i*(26/45+i*(-2854/675)))))),this.cbg[0]=i*(-2+i*(2/3+i*(4/3+i*(-82/45+i*(32/45+i*(4642/4725)))))),n=n*i,this.cgb[1]=n*(7/3+i*(-8/5+i*(-227/45+i*(2704/315+i*(2323/945))))),this.cbg[1]=n*(5/3+i*(-16/15+i*(-13/9+i*(904/315+i*(-1522/945))))),n=n*i,this.cgb[2]=n*(56/15+i*(-136/35+i*(-1262/105+i*(73814/2835)))),this.cbg[2]=n*(-26/15+i*(34/21+i*(8/5+i*(-12686/2835)))),n=n*i,this.cgb[3]=n*(4279/630+i*(-332/35+i*(-399572/14175))),this.cbg[3]=n*(1237/630+i*(-12/5+i*(-24832/14175))),n=n*i,this.cgb[4]=n*(4174/315+i*(-144838/6237)),this.cbg[4]=n*(-734/315+i*(109598/31185)),n=n*i,this.cgb[5]=n*(601676/22275),this.cbg[5]=n*(444337/155925),n=Math.pow(i,2),this.Qn=this.k0/(1+i)*(1+n*(1/4+n*(1/64+n/256))),this.utg[0]=i*(-.5+i*(2/3+i*(-37/96+i*(1/360+i*(81/512+i*(-96199/604800)))))),this.gtu[0]=i*(.5+i*(-2/3+i*(5/16+i*(41/180+i*(-127/288+i*(7891/37800)))))),this.utg[1]=n*(-1/48+i*(-1/15+i*(437/1440+i*(-46/105+i*(1118711/3870720))))),this.gtu[1]=n*(13/48+i*(-3/5+i*(557/1440+i*(281/630+i*(-1983433/1935360))))),n=n*i,this.utg[2]=n*(-17/480+i*(37/840+i*(209/4480+i*(-5569/90720)))),this.gtu[2]=n*(61/240+i*(-103/140+i*(15061/26880+i*(167603/181440)))),n=n*i,this.utg[3]=n*(-4397/161280+i*(11/504+i*(830251/7257600))),this.gtu[3]=n*(49561/161280+i*(-179/168+i*(6601661/7257600))),n=n*i,this.utg[4]=n*(-4583/161280+i*(108847/3991680)),this.gtu[4]=n*(34729/80640+i*(-3418889/1995840)),n=n*i,this.utg[5]=n*(-20648693/638668800),this.gtu[5]=n*(212378941/319334400);var s=uo(this.cbg,this.lat0);this.Zb=-this.Qn*(s+Yd(this.gtu,2*s))}function Jd(t){var i=q(t.x-this.long0,this.over),n=t.y;n=uo(this.cbg,n);var s=Math.sin(n),o=Math.cos(n),h=Math.sin(i),f=Math.cos(i);n=Math.atan2(s,f*o),i=Math.atan2(h*o,Ht(s,o*f)),i=Hd(Math.tan(i));var u=ef(this.gtu,2*n,2*i);n=n+u[0],i=i+u[1];var c,g;return Math.abs(i)<=2.623395162778?(c=this.a*(this.Qn*i)+this.x0,g=this.a*(this.Qn*n+this.Zb)+this.y0):(c=1/0,g=1/0),t.x=c,t.y=g,t}function Zd(t){var i=(t.x-this.x0)*(1/this.a),n=(t.y-this.y0)*(1/this.a);n=(n-this.Zb)/this.Qn,i=i/this.Qn;var s,o;if(Math.abs(i)<=2.623395162778){var h=ef(this.utg,2*n,2*i);n=n+h[0],i=i+h[1],i=Math.atan(tf(i));var f=Math.sin(n),u=Math.cos(n),c=Math.sin(i),g=Math.cos(i);n=Math.atan2(f*g,Ht(c,g*u)),i=Math.atan2(c,g*u),s=q(i+this.long0,this.over),o=uo(this.cgb,n)}else s=1/0,o=1/0;return t.x=s,t.y=o,t}var Vd=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const ns={init:Qd,forward:Jd,inverse:Zd,names:Vd};function jd(t,i){if(t===void 0){if(t=Math.floor((q(i)+Math.PI)*30/Math.PI)+1,t<0)return 0;if(t>60)return 60}return t}var t3="etmerc";function e3(){var t=jd(this.zone,this.long0);if(t===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*yt,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,ns.init.apply(this),this.forward=ns.forward,this.inverse=ns.inverse}var i3=["Universal Transverse Mercator System","utm"];const n3={init:e3,names:i3,dependsOn:t3};function fo(t,i){return Math.pow((1-t)/(1+t),i)}var r3=20;function s3(){var t=Math.sin(this.lat0),i=Math.cos(this.lat0);i*=i,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*i*i/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+ot)/(Math.pow(Math.tan(.5*this.lat0+ot),this.C)*fo(this.e*t,this.ratexp))}function a3(t){var i=t.x,n=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*n+ot),this.C)*fo(this.e*Math.sin(n),this.ratexp))-O,t.x=this.C*i,t}function o3(t){for(var i=1e-14,n=t.x/this.C,s=t.y,o=Math.pow(Math.tan(.5*s+ot)/this.K,1/this.C),h=r3;h>0&&(s=2*Math.atan(o*fo(this.e*Math.sin(t.y),-.5*this.e))-O,!(Math.abs(s-t.y)<i));--h)t.y=s;return h?(t.x=n,t.y=s,t):null}const lo={init:s3,forward:a3,inverse:o3};function h3(){lo.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 u3(t){var i,n,s,o;return t.x=q(t.x-this.long0,this.over),lo.forward.apply(this,[t]),i=Math.sin(t.y),n=Math.cos(t.y),s=Math.cos(t.x),o=this.k0*this.R2/(1+this.sinc0*i+this.cosc0*n*s),t.x=o*n*Math.sin(t.x),t.y=o*(this.cosc0*i-this.sinc0*n*s),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function f3(t){var i,n,s,o,h;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,h=Ht(t.x,t.y)){var f=2*Math.atan2(h,this.R2);i=Math.sin(f),n=Math.cos(f),o=Math.asin(n*this.sinc0+t.y*i*this.cosc0/h),s=Math.atan2(t.x*i,h*this.cosc0*n-t.y*this.sinc0*i)}else o=this.phic0,s=0;return t.x=s,t.y=o,lo.inverse.apply(this,[t]),t.x=q(t.x+this.long0,this.over),t}var l3=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const c3={init:h3,forward:u3,inverse:f3,names:l3};function co(t,i,n){return i*=n,Math.tan(.5*(O+t))*Math.pow((1-i)/(1+i),.5*n)}function _3(){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?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=B&&(this.k0=.5*(1+Xn(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=B&&(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)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=B&&Math.abs(Math.cos(this.lat_ts))>B&&(this.k0=.5*this.cons*Ae(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/we(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Ae(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(co(this.lat0,this.sinlat0,this.e))-O,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function g3(t){var i=t.x,n=t.y,s=Math.sin(n),o=Math.cos(n),h,f,u,c,g,y,M=q(i-this.long0,this.over);return Math.abs(Math.abs(i-this.long0)-Math.PI)<=B&&Math.abs(n+this.lat0)<=B?(t.x=NaN,t.y=NaN,t):this.sphere?(h=2*this.k0/(1+this.sinlat0*s+this.coslat0*o*Math.cos(M)),t.x=this.a*h*o*Math.sin(M)+this.x0,t.y=this.a*h*(this.coslat0*s-this.sinlat0*o*Math.cos(M))+this.y0,t):(f=2*Math.atan(co(n,s,this.e))-O,c=Math.cos(f),u=Math.sin(f),Math.abs(this.coslat0)<=B?(g=we(this.e,n*this.con,this.con*s),y=2*this.a*this.k0*g/this.cons,t.x=this.x0+y*Math.sin(i-this.long0),t.y=this.y0-this.con*y*Math.cos(i-this.long0),t):(Math.abs(this.sinlat0)<B?(h=2*this.a*this.k0/(1+c*Math.cos(M)),t.y=h*u):(h=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*u+this.cosX0*c*Math.cos(M))),t.y=h*(this.cosX0*u-this.sinX0*c*Math.cos(M))+this.y0),t.x=h*c*Math.sin(M)+this.x0,t))}function v3(t){t.x-=this.x0,t.y-=this.y0;var i,n,s,o,h,f=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var u=2*Math.atan(f/(2*this.a*this.k0));return i=this.long0,n=this.lat0,f<=B?(t.x=i,t.y=n,t):(n=Math.asin(Math.cos(u)*this.sinlat0+t.y*Math.sin(u)*this.coslat0/f),Math.abs(this.coslat0)<B?this.lat0>0?i=q(this.long0+Math.atan2(t.x,-1*t.y),this.over):i=q(this.long0+Math.atan2(t.x,t.y),this.over):i=q(this.long0+Math.atan2(t.x*Math.sin(u),f*this.coslat0*Math.cos(u)-t.y*this.sinlat0*Math.sin(u)),this.over),t.x=i,t.y=n,t)}else if(Math.abs(this.coslat0)<=B){if(f<=B)return n=this.lat0,i=this.long0,t.x=i,t.y=n,t;t.x*=this.con,t.y*=this.con,s=f*this.cons/(2*this.a*this.k0),n=this.con*Dn(this.e,s),i=this.con*q(this.con*this.long0+Math.atan2(t.x,-1*t.y),this.over)}else o=2*Math.atan(f*this.cosX0/(2*this.a*this.k0*this.ms1)),i=this.long0,f<=B?h=this.X0:(h=Math.asin(Math.cos(o)*this.sinX0+t.y*Math.sin(o)*this.cosX0/f),i=q(this.long0+Math.atan2(t.x*Math.sin(o),f*this.cosX0*Math.cos(o)-t.y*this.sinX0*Math.sin(o)),this.over)),n=-1*Dn(this.e,Math.tan(.5*(O+h)));return t.x=i,t.y=n,t}var d3=["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"];const M3={init:_3,forward:g3,inverse:v3,names:d3,ssfn_:co};function m3(){var t=this.lat0;this.lambda0=this.long0;var i=Math.sin(t),n=this.a,s=this.rf,o=1/s,h=2*o-Math.pow(o,2),f=this.e=Math.sqrt(h);this.R=this.k0*n*Math.sqrt(1-h)/(1-h*Math.pow(i,2)),this.alpha=Math.sqrt(1+h/(1-h)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(i/this.alpha);var u=Math.log(Math.tan(Math.PI/4+this.b0/2)),c=Math.log(Math.tan(Math.PI/4+t/2)),g=Math.log((1+f*i)/(1-f*i));this.K=u-this.alpha*c+this.alpha*f/2*g}function y3(t){var i=Math.log(Math.tan(Math.PI/4-t.y/2)),n=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),s=-this.alpha*(i+n)+this.K,o=2*(Math.atan(Math.exp(s))-Math.PI/4),h=this.alpha*(t.x-this.lambda0),f=Math.atan(Math.sin(h)/(Math.sin(this.b0)*Math.tan(o)+Math.cos(this.b0)*Math.cos(h))),u=Math.asin(Math.cos(this.b0)*Math.sin(o)-Math.sin(this.b0)*Math.cos(o)*Math.cos(h));return t.y=this.R/2*Math.log((1+Math.sin(u))/(1-Math.sin(u)))+this.y0,t.x=this.R*f+this.x0,t}function p3(t){for(var i=t.x-this.x0,n=t.y-this.y0,s=i/this.R,o=2*(Math.atan(Math.exp(n/this.R))-Math.PI/4),h=Math.asin(Math.cos(this.b0)*Math.sin(o)+Math.sin(this.b0)*Math.cos(o)*Math.cos(s)),f=Math.atan(Math.sin(s)/(Math.cos(this.b0)*Math.cos(s)-Math.sin(this.b0)*Math.tan(o))),u=this.lambda0+f/this.alpha,c=0,g=h,y=-1e3,M=0;Math.abs(g-y)>1e-7;){if(++M>20)return;c=1/this.alpha*(Math.log(Math.tan(Math.PI/4+h/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(g))/2)),y=g,g=2*Math.atan(Math.exp(c))-Math.PI/2}return t.x=u,t.y=g,t}var w3=["somerc"];const E3={init:m3,forward:y3,inverse:p3,names:w3};var Ui=1e-7;function x3(t){var i=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],n=typeof t.projName=="object"?Object.keys(t.projName)[0]:t.projName;return"no_uoff"in t||"no_off"in t||i.indexOf(n)!==-1||i.indexOf(zu(n))!==-1}function S3(){var t,i,n,s,o,h,f,u,c,g,y=0,M,v=0,E=0,x=0,b=0,A=0,C=0;this.no_off=x3(this),this.no_rot="no_rot"in this;var T=!1;"alpha"in this&&(T=!0);var F=!1;if("rectified_grid_angle"in this&&(F=!0),T&&(C=this.alpha),F&&(y=this.rectified_grid_angle),T||F)v=this.longc;else if(E=this.long1,b=this.lat1,x=this.long2,A=this.lat2,Math.abs(b-A)<=Ui||(t=Math.abs(b))<=Ui||Math.abs(t-O)<=Ui||Math.abs(Math.abs(this.lat0)-O)<=Ui||Math.abs(Math.abs(A)-O)<=Ui)throw new Error;var W=1-this.es;i=Math.sqrt(W),Math.abs(this.lat0)>B?(u=Math.sin(this.lat0),n=Math.cos(this.lat0),t=1-this.es*u*u,this.B=n*n,this.B=Math.sqrt(1+this.es*this.B*this.B/W),this.A=this.B*this.k0*i/t,s=this.B*i/(n*Math.sqrt(t)),o=s*s-1,o<=0?o=0:(o=Math.sqrt(o),this.lat0<0&&(o=-o)),this.E=o+=s,this.E*=Math.pow(we(this.e,this.lat0,u),this.B)):(this.B=1/i,this.A=this.k0,this.E=s=o=1),T||F?(T?(M=Math.asin(Math.sin(C)/s),F||(y=C)):(M=y,C=Math.asin(s*Math.sin(M))),this.lam0=v-Math.asin(.5*(o-1/o)*Math.tan(M))/this.B):(h=Math.pow(we(this.e,b,Math.sin(b)),this.B),f=Math.pow(we(this.e,A,Math.sin(A)),this.B),o=this.E/h,c=(f-h)/(f+h),g=this.E*this.E,g=(g-f*h)/(g+f*h),t=E-x,t<-Math.PI?x-=Fn:t>Math.PI&&(x+=Fn),this.lam0=q(.5*(E+x)-Math.atan(g*Math.tan(.5*this.B*(E-x))/c)/this.B,this.over),M=Math.atan(2*Math.sin(this.B*q(E-this.lam0,this.over))/(o-1/o)),y=C=Math.asin(s*Math.sin(M))),this.singam=Math.sin(M),this.cosgam=Math.cos(M),this.sinrot=Math.sin(y),this.cosrot=Math.cos(y),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(s*s-1)/Math.cos(C))),this.lat0<0&&(this.u_0=-this.u_0)),o=.5*M,this.v_pole_n=this.ArB*Math.log(Math.tan(ot-o)),this.v_pole_s=this.ArB*Math.log(Math.tan(ot+o))}function P3(t){var i={},n,s,o,h,f,u,c,g;if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-O)>B){if(f=this.E/Math.pow(we(this.e,t.y,Math.sin(t.y)),this.B),u=1/f,n=.5*(f-u),s=.5*(f+u),h=Math.sin(this.B*t.x),o=(n*this.singam-h*this.cosgam)/s,Math.abs(Math.abs(o)-1)<B)throw new Error;g=.5*this.ArB*Math.log((1-o)/(1+o)),u=Math.cos(this.B*t.x),Math.abs(u)<Ui?c=this.A*t.x:c=this.ArB*Math.atan2(n*this.cosgam+h*this.singam,u)}else g=t.y>0?this.v_pole_n:this.v_pole_s,c=this.ArB*t.y;return this.no_rot?(i.x=c,i.y=g):(c-=this.u_0,i.x=g*this.cosrot+c*this.sinrot,i.y=c*this.cosrot-g*this.sinrot),i.x=this.a*i.x+this.x0,i.y=this.a*i.y+this.y0,i}function b3(t){var i,n,s,o,h,f,u,c={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(n=t.y,i=t.x):(n=t.x*this.cosrot-t.y*this.sinrot,i=t.y*this.cosrot+t.x*this.sinrot+this.u_0),s=Math.exp(-this.BrA*n),o=.5*(s-1/s),h=.5*(s+1/s),f=Math.sin(this.BrA*i),u=(f*this.cosgam+o*this.singam)/h,Math.abs(Math.abs(u)-1)<B)c.x=0,c.y=u<0?-O:O;else{if(c.y=this.E/Math.sqrt((1+u)/(1-u)),c.y=Dn(this.e,Math.pow(c.y,1/this.B)),c.y===1/0)throw new Error;c.x=-this.rB*Math.atan2(o*this.cosgam-f*this.singam,Math.cos(this.BrA*i))}return c.x+=this.lam0,c}var A3=["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"];const G3={init:S3,forward:P3,inverse:b3,names:A3};function I3(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<B)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var i=Math.sin(this.lat1),n=Math.cos(this.lat1),s=Ae(this.e,i,n),o=we(this.e,this.lat1,i),h=Math.sin(this.lat2),f=Math.cos(this.lat2),u=Ae(this.e,h,f),c=we(this.e,this.lat2,h),g=Math.abs(Math.abs(this.lat0)-O)<B?0:we(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>B?this.ns=Math.log(s/u)/Math.log(o/c):this.ns=i,isNaN(this.ns)&&(this.ns=i),this.f0=s/(this.ns*Math.pow(o,this.ns)),this.rh=this.a*this.f0*Math.pow(g,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function C3(t){var i=t.x,n=t.y;Math.abs(2*Math.abs(n)-Math.PI)<=B&&(n=Xn(n)*(O-2*B));var s=Math.abs(Math.abs(n)-O),o,h;if(s>B)o=we(this.e,n,Math.sin(n)),h=this.a*this.f0*Math.pow(o,this.ns);else{if(s=n*this.ns,s<=0)return null;h=0}var f=this.ns*q(i-this.long0,this.over);return t.x=this.k0*(h*Math.sin(f))+this.x0,t.y=this.k0*(this.rh-h*Math.cos(f))+this.y0,t}function N3(t){var i,n,s,o,h,f=(t.x-this.x0)/this.k0,u=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(i=Math.sqrt(f*f+u*u),n=1):(i=-Math.sqrt(f*f+u*u),n=-1);var c=0;if(i!==0&&(c=Math.atan2(n*f,n*u)),i!==0||this.ns>0){if(n=1/this.ns,s=Math.pow(i/(this.a*this.f0),n),o=Dn(this.e,s),o===-9999)return null}else o=-O;return h=q(c/this.ns+this.long0,this.over),t.x=h,t.y=o,t}var R3=["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)"];const L3={init:I3,forward:C3,inverse:N3,names:R3};function O3(){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 T3(t){var i,n,s,o,h,f,u,c=t.x,g=t.y,y=q(c-this.long0,this.over);return i=Math.pow((1+this.e*Math.sin(g))/(1-this.e*Math.sin(g)),this.alfa*this.e/2),n=2*(Math.atan(this.k*Math.pow(Math.tan(g/2+this.s45),this.alfa)/i)-this.s45),s=-y*this.alfa,o=Math.asin(Math.cos(this.ad)*Math.sin(n)+Math.sin(this.ad)*Math.cos(n)*Math.cos(s)),h=Math.asin(Math.cos(n)*Math.sin(s)/Math.cos(o)),f=this.n*h,u=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(o/2+this.s45),this.n),t.y=u*Math.cos(f)/1,t.x=u*Math.sin(f)/1,this.czech||(t.y*=-1,t.x*=-1),t}function B3(t){var i,n,s,o,h,f,u,c,g=t.x;t.x=t.y,t.y=g,this.czech||(t.y*=-1,t.x*=-1),f=Math.sqrt(t.x*t.x+t.y*t.y),h=Math.atan2(t.y,t.x),o=h/Math.sin(this.s0),s=2*(Math.atan(Math.pow(this.ro0/f,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),i=Math.asin(Math.cos(this.ad)*Math.sin(s)-Math.sin(this.ad)*Math.cos(s)*Math.cos(o)),n=Math.asin(Math.cos(s)*Math.sin(o)/Math.cos(i)),t.x=this.long0-n/this.alfa,u=i,c=0;var y=0;do t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(i/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.e/2))-this.s45),Math.abs(u-t.y)<1e-10&&(c=1),u=t.y,y+=1;while(c===0&&y<15);return y>=15?null:t}var F3=["Krovak","krovak"];const q3={init:O3,forward:T3,inverse:B3,names:F3};function Ut(t,i,n,s,o){return t*o-i*Math.sin(2*o)+n*Math.sin(4*o)-s*Math.sin(6*o)}function kn(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function Hn(t){return .375*t*(1+.25*t*(1+.46875*t))}function Yn(t){return .05859375*t*t*(1+.75*t)}function Kn(t){return t*t*t*(35/3072)}function _o(t,i,n){var s=i*n;return t/Math.sqrt(1-s*s)}function ri(t){return Math.abs(t)<O?t:t-Xn(t)*Math.PI}function fs(t,i,n,s,o){var h,f;h=t/i;for(var u=0;u<15;u++)if(f=(t-(i*h-n*Math.sin(2*h)+s*Math.sin(4*h)-o*Math.sin(6*h)))/(i-2*n*Math.cos(2*h)+4*s*Math.cos(4*h)-6*o*Math.cos(6*h)),h+=f,Math.abs(f)<=1e-10)return h;return NaN}function D3(){this.sphere||(this.e0=kn(this.es),this.e1=Hn(this.es),this.e2=Yn(this.es),this.e3=Kn(this.es),this.ml0=this.a*Ut(this.e0,this.e1,this.e2,this.e3,this.lat0))}function U3(t){var i,n,s=t.x,o=t.y;if(s=q(s-this.long0,this.over),this.sphere)i=this.a*Math.asin(Math.cos(o)*Math.sin(s)),n=this.a*(Math.atan2(Math.tan(o),Math.cos(s))-this.lat0);else{var h=Math.sin(o),f=Math.cos(o),u=_o(this.a,this.e,h),c=Math.tan(o)*Math.tan(o),g=s*Math.cos(o),y=g*g,M=this.es*f*f/(1-this.es),v=this.a*Ut(this.e0,this.e1,this.e2,this.e3,o);i=u*g*(1-y*c*(1/6-(8-c+8*M)*y/120)),n=v-this.ml0+u*h/f*y*(.5+(5-c+6*M)*y/24)}return t.x=i+this.x0,t.y=n+this.y0,t}function W3(t){t.x-=this.x0,t.y-=this.y0;var i=t.x/this.a,n=t.y/this.a,s,o;if(this.sphere){var h=n+this.lat0;s=Math.asin(Math.sin(h)*Math.cos(i)),o=Math.atan2(Math.tan(i),Math.cos(h))}else{var f=this.ml0/this.a+n,u=fs(f,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(u)-O)<=B)return t.x=this.long0,t.y=O,n<0&&(t.y*=-1),t;var c=_o(this.a,this.e,Math.sin(u)),g=c*c*c/this.a/this.a*(1-this.es),y=Math.pow(Math.tan(u),2),M=i*this.a/c,v=M*M;s=u-c*Math.tan(u)/g*M*M*(.5-(1+3*y)*M*M/24),o=M*(1-v*(y/3+(1+3*y)*y*v/15))/Math.cos(u)}return t.x=q(o+this.long0,this.over),t.y=ri(s),t}var $3=["Cassini","Cassini_Soldner","cass"];const z3={init:D3,forward:U3,inverse:W3,names:$3};function ei(t,i){var n;return t>1e-7?(n=t*i,(1-t*t)*(i/(1-n*n)-.5/t*Math.log((1-n)/(1+n)))):2*i}var ja=1,to=2,eo=3,rs=4;function X3(){var t=Math.abs(this.lat0);if(Math.abs(t-O)<B?this.mode=this.lat0<0?ja:to:Math.abs(t)<B?this.mode=eo:this.mode=rs,this.es>0){var i;switch(this.qp=ei(this.e,1),this.mmf=.5/(1-this.es),this.apa=j3(this.es),this.mode){case to:this.dd=1;break;case ja:this.dd=1;break;case eo:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case rs:this.rq=Math.sqrt(.5*this.qp),i=Math.sin(this.lat0),this.sinb1=ei(this.e,i)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*i*i)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===rs&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function k3(t){var i,n,s,o,h,f,u,c,g,y,M=t.x,v=t.y;if(M=q(M-this.long0,this.over),this.sphere){if(h=Math.sin(v),y=Math.cos(v),s=Math.cos(M),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(n=this.mode===this.EQUIT?1+y*s:1+this.sinph0*h+this.cosph0*y*s,n<=B)return null;n=Math.sqrt(2/n),i=n*y*Math.sin(M),n*=this.mode===this.EQUIT?h:this.cosph0*h-this.sinph0*y*s}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(s=-s),Math.abs(v+this.lat0)<B)return null;n=ot-v*.5,n=2*(this.mode===this.S_POLE?Math.cos(n):Math.sin(n)),i=n*Math.sin(M),n*=s}}else{switch(u=0,c=0,g=0,s=Math.cos(M),o=Math.sin(M),h=Math.sin(v),f=ei(this.e,h),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(u=f/this.qp,c=Math.sqrt(1-u*u)),this.mode){case this.OBLIQ:g=1+this.sinb1*u+this.cosb1*c*s;break;case this.EQUIT:g=1+c*s;break;case this.N_POLE:g=O+v,f=this.qp-f;break;case this.S_POLE:g=v-O,f=this.qp+f;break}if(Math.abs(g)<B)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:g=Math.sqrt(2/g),this.mode===this.OBLIQ?n=this.ymf*g*(this.cosb1*u-this.sinb1*c*s):n=(g=Math.sqrt(2/(1+c*s)))*u*this.ymf,i=this.xmf*g*c*o;break;case this.N_POLE:case this.S_POLE:f>=0?(i=(g=Math.sqrt(f))*o,n=s*(this.mode===this.S_POLE?g:-g)):i=n=0;break}}return t.x=this.a*i+this.x0,t.y=this.a*n+this.y0,t}function H3(t){t.x-=this.x0,t.y-=this.y0;var i=t.x/this.a,n=t.y/this.a,s,o,h,f,u,c,g;if(this.sphere){var y=0,M,v=0;if(M=Math.sqrt(i*i+n*n),o=M*.5,o>1)return null;switch(o=2*Math.asin(o),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(v=Math.sin(o),y=Math.cos(o)),this.mode){case this.EQUIT:o=Math.abs(M)<=B?0:Math.asin(n*v/M),i*=v,n=y*M;break;case this.OBLIQ:o=Math.abs(M)<=B?this.lat0:Math.asin(y*this.sinph0+n*v*this.cosph0/M),i*=v*this.cosph0,n=(y-Math.sin(o)*this.sinph0)*M;break;case this.N_POLE:n=-n,o=O-o;break;case this.S_POLE:o-=O;break}s=n===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(i,n)}else{if(g=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(i/=this.dd,n*=this.dd,c=Math.sqrt(i*i+n*n),c<B)return t.x=this.long0,t.y=this.lat0,t;f=2*Math.asin(.5*c/this.rq),h=Math.cos(f),i*=f=Math.sin(f),this.mode===this.OBLIQ?(g=h*this.sinb1+n*f*this.cosb1/c,u=this.qp*g,n=c*this.cosb1*h-n*this.sinb1*f):(g=n*f/c,u=this.qp*g,n=c*h)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),u=i*i+n*n,!u)return t.x=this.long0,t.y=this.lat0,t;g=1-u/this.qp,this.mode===this.S_POLE&&(g=-g)}s=Math.atan2(i,n),o=t8(Math.asin(g),this.apa)}return t.x=q(this.long0+s,this.over),t.y=o,t}var Y3=.3333333333333333,K3=.17222222222222222,Q3=.10257936507936508,J3=.06388888888888888,Z3=.0664021164021164,V3=.016415012942191543;function j3(t){var i,n=[];return n[0]=t*Y3,i=t*t,n[0]+=i*K3,n[1]=i*J3,i*=t,n[0]+=i*Q3,n[1]+=i*Z3,n[2]=i*V3,n}function t8(t,i){var n=t+t;return t+i[0]*Math.sin(n)+i[1]*Math.sin(n+n)+i[2]*Math.sin(n+n+n)}var e8=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const i8={init:X3,forward:k3,inverse:H3,names:e8,S_POLE:ja,N_POLE:to,EQUIT:eo,OBLIQ:rs};function ni(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)}function n8(){Math.abs(this.lat1+this.lat2)<B||(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=Ae(this.e3,this.sin_po,this.cos_po),this.qs1=ei(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=Ae(this.e3,this.sin_po,this.cos_po),this.qs2=ei(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=ei(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>B?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 r8(t){var i=t.x,n=t.y;this.sin_phi=Math.sin(n),this.cos_phi=Math.cos(n);var s=ei(this.e3,this.sin_phi),o=this.a*Math.sqrt(this.c-this.ns0*s)/this.ns0,h=this.ns0*q(i-this.long0,this.over),f=o*Math.sin(h)+this.x0,u=this.rh-o*Math.cos(h)+this.y0;return t.x=f,t.y=u,t}function s8(t){var i,n,s,o,h,f;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),s=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),s=-1),o=0,i!==0&&(o=Math.atan2(s*t.x,s*t.y)),s=i*this.ns0/this.a,this.sphere?f=Math.asin((this.c-s*s)/(2*this.ns0)):(n=(this.c-s*s)/this.ns0,f=this.phi1z(this.e3,n)),h=q(o/this.ns0+this.long0,this.over),t.x=h,t.y=f,t}function a8(t,i){var n,s,o,h,f,u=ni(.5*i);if(t<B)return u;for(var c=t*t,g=1;g<=25;g++)if(n=Math.sin(u),s=Math.cos(u),o=t*n,h=1-o*o,f=.5*h*h/s*(i/(1-c)-n/h+.5/t*Math.log((1-o)/(1+o))),u=u+f,Math.abs(f)<=1e-7)return u;return null}var o8=["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"];const h8={init:n8,forward:r8,inverse:s8,names:o8,phi1z:a8};function u8(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function f8(t){var i,n,s,o,h,f,u,c,g=t.x,y=t.y;return s=q(g-this.long0,this.over),i=Math.sin(y),n=Math.cos(y),o=Math.cos(s),f=this.sin_p14*i+this.cos_p14*n*o,h=1,f>0||Math.abs(f)<=B?(u=this.x0+this.a*h*n*Math.sin(s)/f,c=this.y0+this.a*h*(this.cos_p14*i-this.sin_p14*n*o)/f):(u=this.x0+this.infinity_dist*n*Math.sin(s),c=this.y0+this.infinity_dist*(this.cos_p14*i-this.sin_p14*n*o)),t.x=u,t.y=c,t}function l8(t){var i,n,s,o,h,f;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(i=Math.sqrt(t.x*t.x+t.y*t.y))?(o=Math.atan2(i,this.rc),n=Math.sin(o),s=Math.cos(o),f=ni(s*this.sin_p14+t.y*n*this.cos_p14/i),h=Math.atan2(t.x*n,i*this.cos_p14*s-t.y*this.sin_p14*n),h=q(this.long0+h,this.over)):(f=this.phic0,h=0),t.x=h,t.y=f,t}var c8=["gnom"];const _8={init:u8,forward:f8,inverse:l8,names:c8};function g8(t,i){var n=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(i)-n)<1e-6)return i<0?-1*O:O;for(var s=Math.asin(.5*i),o,h,f,u,c=0;c<30;c++)if(h=Math.sin(s),f=Math.cos(s),u=t*h,o=Math.pow(1-u*u,2)/(2*f)*(i/(1-t*t)-h/(1-u*u)+.5/t*Math.log((1-u)/(1+u))),s+=o,Math.abs(o)<=1e-10)return s;return NaN}function v8(){this.sphere||(this.k0=Ae(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function d8(t){var i=t.x,n=t.y,s,o,h=q(i-this.long0,this.over);if(this.sphere)s=this.x0+this.a*h*Math.cos(this.lat_ts),o=this.y0+this.a*Math.sin(n)/Math.cos(this.lat_ts);else{var f=ei(this.e,Math.sin(n));s=this.x0+this.a*this.k0*h,o=this.y0+this.a*f*.5/this.k0}return t.x=s,t.y=o,t}function M8(t){t.x-=this.x0,t.y-=this.y0;var i,n;return this.sphere?(i=q(this.long0+t.x/this.a/Math.cos(this.lat_ts),this.over),n=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(n=g8(this.e,2*t.y*this.k0/this.a),i=q(this.long0+t.x/(this.a*this.k0),this.over)),t.x=i,t.y=n,t}var m8=["cea"];const y8={init:v8,forward:d8,inverse:M8,names:m8};function p8(){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 w8(t){var i=t.x,n=t.y,s=q(i-this.long0,this.over),o=ri(n-this.lat0);return t.x=this.x0+this.a*s*this.rc,t.y=this.y0+this.a*o,t}function E8(t){var i=t.x,n=t.y;return t.x=q(this.long0+(i-this.x0)/(this.a*this.rc),this.over),t.y=ri(this.lat0+(n-this.y0)/this.a),t}var x8=["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"];const S8={init:p8,forward:w8,inverse:E8,names:x8};var du=20;function P8(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=kn(this.es),this.e1=Hn(this.es),this.e2=Yn(this.es),this.e3=Kn(this.es),this.ml0=this.a*Ut(this.e0,this.e1,this.e2,this.e3,this.lat0)}function b8(t){var i=t.x,n=t.y,s,o,h,f=q(i-this.long0,this.over);if(h=f*Math.sin(n),this.sphere)Math.abs(n)<=B?(s=this.a*f,o=-1*this.a*this.lat0):(s=this.a*Math.sin(h)/Math.tan(n),o=this.a*(ri(n-this.lat0)+(1-Math.cos(h))/Math.tan(n)));else if(Math.abs(n)<=B)s=this.a*f,o=-1*this.ml0;else{var u=_o(this.a,this.e,Math.sin(n))/Math.tan(n);s=u*Math.sin(h),o=this.a*Ut(this.e0,this.e1,this.e2,this.e3,n)-this.ml0+u*(1-Math.cos(h))}return t.x=s+this.x0,t.y=o+this.y0,t}function A8(t){var i,n,s,o,h,f,u,c,g;if(s=t.x-this.x0,o=t.y-this.y0,this.sphere)if(Math.abs(o+this.a*this.lat0)<=B)i=q(s/this.a+this.long0,this.over),n=0;else{f=this.lat0+o/this.a,u=s*s/this.a/this.a+f*f,c=f;var y;for(h=du;h;--h)if(y=Math.tan(c),g=-1*(f*(c*y+1)-c-.5*(c*c+u)*y)/((c-f)/y-1),c+=g,Math.abs(g)<=B){n=c;break}i=q(this.long0+Math.asin(s*Math.tan(c)/this.a)/Math.sin(n),this.over)}else if(Math.abs(o+this.ml0)<=B)n=0,i=q(this.long0+s/this.a,this.over);else{f=(this.ml0+o)/this.a,u=s*s/this.a/this.a+f*f,c=f;var M,v,E,x,b;for(h=du;h;--h)if(b=this.e*Math.sin(c),M=Math.sqrt(1-b*b)*Math.tan(c),v=this.a*Ut(this.e0,this.e1,this.e2,this.e3,c),E=this.e0-2*this.e1*Math.cos(2*c)+4*this.e2*Math.cos(4*c)-6*this.e3*Math.cos(6*c),x=v/this.a,g=(f*(M*x+1)-x-.5*M*(x*x+u))/(this.es*Math.sin(2*c)*(x*x+u-2*f*x)/(4*M)+(f-x)*(M*E-2/Math.sin(2*c))-E),c-=g,Math.abs(g)<=B){n=c;break}M=Math.sqrt(1-this.es*Math.pow(Math.sin(n),2))*Math.tan(n),i=q(this.long0+Math.asin(s*M/this.a)/Math.sin(n),this.over)}return t.x=i,t.y=n,t}var G8=["Polyconic","American_Polyconic","poly"];const I8={init:P8,forward:b8,inverse:A8,names:G8};function C8(){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 N8(t){var i,n=t.x,s=t.y,o=s-this.lat0,h=n-this.long0,f=o/Rn*1e-5,u=h,c=1,g=0;for(i=1;i<=10;i++)c=c*f,g=g+this.A[i]*c;var y=g,M=u,v=1,E=0,x,b,A=0,C=0;for(i=1;i<=6;i++)x=v*y-E*M,b=E*y+v*M,v=x,E=b,A=A+this.B_re[i]*v-this.B_im[i]*E,C=C+this.B_im[i]*v+this.B_re[i]*E;return t.x=C*this.a+this.x0,t.y=A*this.a+this.y0,t}function R8(t){var i,n=t.x,s=t.y,o=n-this.x0,h=s-this.y0,f=h/this.a,u=o/this.a,c=1,g=0,y,M,v=0,E=0;for(i=1;i<=6;i++)y=c*f-g*u,M=g*f+c*u,c=y,g=M,v=v+this.C_re[i]*c-this.C_im[i]*g,E=E+this.C_im[i]*c+this.C_re[i]*g;for(var x=0;x<this.iterations;x++){var b=v,A=E,C,T,F=f,W=u;for(i=2;i<=6;i++)C=b*v-A*E,T=A*v+b*E,b=C,A=T,F=F+(i-1)*(this.B_re[i]*b-this.B_im[i]*A),W=W+(i-1)*(this.B_im[i]*b+this.B_re[i]*A);b=1,A=0;var $=this.B_re[1],X=this.B_im[1];for(i=2;i<=6;i++)C=b*v-A*E,T=A*v+b*E,b=C,A=T,$=$+i*(this.B_re[i]*b-this.B_im[i]*A),X=X+i*(this.B_im[i]*b+this.B_re[i]*A);var K=$*$+X*X;v=(F*$+W*X)/K,E=(W*$-F*X)/K}var j=v,rt=E,Mt=1,lt=0;for(i=1;i<=9;i++)Mt=Mt*j,lt=lt+this.D[i]*Mt;var xt=this.lat0+lt*Rn*1e5,bt=this.long0+rt;return t.x=bt,t.y=xt,t}var L8=["New_Zealand_Map_Grid","nzmg"];const O8={init:C8,forward:N8,inverse:R8,names:L8};function T8(){}function B8(t){var i=t.x,n=t.y,s=q(i-this.long0,this.over),o=this.x0+this.a*s,h=this.y0+this.a*Math.log(Math.tan(Math.PI/4+n/2.5))*1.25;return t.x=o,t.y=h,t}function F8(t){t.x-=this.x0,t.y-=this.y0;var i=q(this.long0+t.x/this.a,this.over),n=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=i,t.y=n,t}var q8=["Miller_Cylindrical","mill"];const D8={init:T8,forward:B8,inverse:F8,names:q8};var U8=20;function W8(){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=oo(this.es)}function $8(t){var i,n,s=t.x,o=t.y;if(s=q(s-this.long0,this.over),this.sphere){if(!this.m)o=this.n!==1?Math.asin(this.n*Math.sin(o)):o;else for(var h=this.n*Math.sin(o),f=U8;f;--f){var u=(this.m*o+Math.sin(o)-h)/(this.m+Math.cos(o));if(o-=u,Math.abs(u)<B)break}i=this.a*this.C_x*s*(this.m+Math.cos(o)),n=this.a*this.C_y*o}else{var c=Math.sin(o),g=Math.cos(o);n=this.a*Vi(o,c,g,this.en),i=this.a*s*g/Math.sqrt(1-this.es*c*c)}return t.x=i,t.y=n,t}function z8(t){var i,n,s,o;return t.x-=this.x0,s=t.x/this.a,t.y-=this.y0,i=t.y/this.a,this.sphere?(i/=this.C_y,s=s/(this.C_x*(this.m+Math.cos(i))),this.m?i=ni((this.m*i+Math.sin(i))/this.n):this.n!==1&&(i=ni(Math.sin(i)/this.n)),s=q(s+this.long0,this.over),i=ri(i)):(i=ho(t.y/this.a,this.es,this.en),o=Math.abs(i),o<O?(o=Math.sin(i),n=this.long0+t.x*Math.sqrt(1-this.es*o*o)/(this.a*Math.cos(i)),s=q(n,this.over)):o-B<O&&(s=this.long0)),t.x=s,t.y=i,t}var X8=["Sinusoidal","sinu"];const k8={init:W8,forward:$8,inverse:z8,names:X8};function H8(){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 Y8(t){for(var i=t.x,n=t.y,s=q(i-this.long0,this.over),o=n,h=Math.PI*Math.sin(n);;){var f=-(o+Math.sin(o)-h)/(1+Math.cos(o));if(o+=f,Math.abs(f)<B)break}o/=2,Math.PI/2-Math.abs(n)<B&&(s=0);var u=.900316316158*this.a*s*Math.cos(o)+this.x0,c=1.4142135623731*this.a*Math.sin(o)+this.y0;return t.x=u,t.y=c,t}function K8(t){var i,n;t.x-=this.x0,t.y-=this.y0,n=t.y/(1.4142135623731*this.a),Math.abs(n)>.999999999999&&(n=.999999999999),i=Math.asin(n);var s=q(this.long0+t.x/(.900316316158*this.a*Math.cos(i)),this.over);s<-Math.PI&&(s=-Math.PI),s>Math.PI&&(s=Math.PI),n=(2*i+Math.sin(2*i))/Math.PI,Math.abs(n)>1&&(n=1);var o=Math.asin(n);return t.x=s,t.y=o,t}var Q8=["Mollweide","moll"];const J8={init:H8,forward:Y8,inverse:K8,names:Q8};function Z8(){Math.abs(this.lat1+this.lat2)<B||(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=kn(this.es),this.e1=Hn(this.es),this.e2=Yn(this.es),this.e3=Kn(this.es),this.sin_phi=Math.sin(this.lat1),this.cos_phi=Math.cos(this.lat1),this.ms1=Ae(this.e,this.sin_phi,this.cos_phi),this.ml1=Ut(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<B?this.ns=this.sin_phi:(this.sin_phi=Math.sin(this.lat2),this.cos_phi=Math.cos(this.lat2),this.ms2=Ae(this.e,this.sin_phi,this.cos_phi),this.ml2=Ut(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=Ut(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function V8(t){var i=t.x,n=t.y,s;if(this.sphere)s=this.a*(this.g-n);else{var o=Ut(this.e0,this.e1,this.e2,this.e3,n);s=this.a*(this.g-o)}var h=this.ns*q(i-this.long0,this.over),f=this.x0+s*Math.sin(h),u=this.y0+this.rh-s*Math.cos(h);return t.x=f,t.y=u,t}function j8(t){t.x-=this.x0,t.y=this.rh-t.y+this.y0;var i,n,s,o;this.ns>=0?(n=Math.sqrt(t.x*t.x+t.y*t.y),i=1):(n=-Math.sqrt(t.x*t.x+t.y*t.y),i=-1);var h=0;if(n!==0&&(h=Math.atan2(i*t.x,i*t.y)),this.sphere)return o=q(this.long0+h/this.ns,this.over),s=ri(this.g-n/this.a),t.x=o,t.y=s,t;var f=this.g-n/this.a;return s=fs(f,this.e0,this.e1,this.e2,this.e3),o=q(this.long0+h/this.ns,this.over),t.x=o,t.y=s,t}var tM=["Equidistant_Conic","eqdc"];const eM={init:Z8,forward:V8,inverse:j8,names:tM};function iM(){this.R=this.a}function nM(t){var i=t.x,n=t.y,s=q(i-this.long0,this.over),o,h;Math.abs(n)<=B&&(o=this.x0+this.R*s,h=this.y0);var f=ni(2*Math.abs(n/Math.PI));(Math.abs(s)<=B||Math.abs(Math.abs(n)-O)<=B)&&(o=this.x0,n>=0?h=this.y0+Math.PI*this.R*Math.tan(.5*f):h=this.y0+Math.PI*this.R*-Math.tan(.5*f));var u=.5*Math.abs(Math.PI/s-s/Math.PI),c=u*u,g=Math.sin(f),y=Math.cos(f),M=y/(g+y-1),v=M*M,E=M*(2/g-1),x=E*E,b=Math.PI*this.R*(u*(M-x)+Math.sqrt(c*(M-x)*(M-x)-(x+c)*(v-x)))/(x+c);s<0&&(b=-b),o=this.x0+b;var A=c+M;return b=Math.PI*this.R*(E*A-u*Math.sqrt((x+c)*(c+1)-A*A))/(x+c),n>=0?h=this.y0+b:h=this.y0-b,t.x=o,t.y=h,t}function rM(t){var i,n,s,o,h,f,u,c,g,y,M,v,E;return t.x-=this.x0,t.y-=this.y0,M=Math.PI*this.R,s=t.x/M,o=t.y/M,h=s*s+o*o,f=-Math.abs(o)*(1+h),u=f-2*o*o+s*s,c=-2*f+1+2*o*o+h*h,E=o*o/c+(2*u*u*u/c/c/c-9*f*u/c/c)/27,g=(f-u*u/3/c)/c,y=2*Math.sqrt(-g/3),M=3*E/g/y,Math.abs(M)>1&&(M>=0?M=1:M=-1),v=Math.acos(M)/3,t.y>=0?n=(-y*Math.cos(v+Math.PI/3)-u/3/c)*Math.PI:n=-(-y*Math.cos(v+Math.PI/3)-u/3/c)*Math.PI,Math.abs(s)<B?i=this.long0:i=q(this.long0+Math.PI*(h-1+Math.sqrt(1+2*(s*s-o*o)+h*h))/2/s,this.over),t.x=i,t.y=n,t}var sM=["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"];const aM={init:iM,forward:nM,inverse:rM,names:sM};function oM(t,i,n,s,o,h){const f=s-i,u=Math.atan((1-h)*Math.tan(t)),c=Math.atan((1-h)*Math.tan(n)),g=Math.sin(u),y=Math.cos(u),M=Math.sin(c),v=Math.cos(c);let E=f,x,b=100,A,C,T,F,W,$,X,K,j,rt,Mt,lt,xt,bt;do{if(A=Math.sin(E),C=Math.cos(E),T=Math.sqrt(v*A*(v*A)+(y*M-g*v*C)*(y*M-g*v*C)),T===0)return{azi1:0,s12:0};F=g*M+y*v*C,W=Math.atan2(T,F),$=y*v*A/T,X=1-$*$,K=X!==0?F-2*g*M/X:0,j=h/16*X*(4+h*(4-3*X)),x=E,E=f+(1-j)*h*$*(W+j*T*(K+j*F*(-1+2*K*K)))}while(Math.abs(E-x)>1e-12&&--b>0);return b===0?{azi1:NaN,s12:NaN}:(rt=X*(o*o-o*(1-h)*(o*(1-h)))/(o*(1-h)*(o*(1-h))),Mt=1+rt/16384*(4096+rt*(-768+rt*(320-175*rt))),lt=rt/1024*(256+rt*(-128+rt*(74-47*rt))),xt=lt*T*(K+lt/4*(F*(-1+2*K*K)-lt/6*K*(-3+4*T*T)*(-3+4*K*K))),bt=o*(1-h)*Mt*(W-xt),{azi1:Math.atan2(v*A,y*M-g*v*C),s12:bt})}function hM(t,i,n,s,o,h){const f=Math.atan((1-h)*Math.tan(t)),u=Math.sin(f),c=Math.cos(f),g=Math.sin(n),y=Math.cos(n),M=Math.atan2(u,c*y),v=c*g,E=1-v*v,x=E*(o*o-o*(1-h)*(o*(1-h)))/(o*(1-h)*(o*(1-h))),b=1+x/16384*(4096+x*(-768+x*(320-175*x))),A=x/1024*(256+x*(-128+x*(74-47*x)));let C=s/(o*(1-h)*b),T,F=100,W,$,X,K;do W=Math.cos(2*M+C),$=Math.sin(C),X=Math.cos(C),K=A*$*(W+A/4*(X*(-1+2*W*W)-A/6*W*(-3+4*$*$)*(-3+4*W*W))),T=C,C=s/(o*(1-h)*b)+K;while(Math.abs(C-T)>1e-12&&--F>0);if(F===0)return{lat2:NaN,lon2:NaN};const j=u*$-c*X*y,rt=Math.atan2(u*X+c*$*y,(1-h)*Math.sqrt(v*v+j*j)),Mt=Math.atan2($*g,c*X-u*$*y),lt=h/16*E*(4+h*(4-3*E)),xt=Mt-(1-lt)*h*v*(C+lt*$*(W+lt*X*(-1+2*W*W))),bt=i+xt;return{lat2:rt,lon2:bt}}function uM(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.f=this.es/(1+Math.sqrt(1-this.es))}function fM(t){var i=t.x,n=t.y,s=Math.sin(t.y),o=Math.cos(t.y),h=q(i-this.long0,this.over),f,u,c,g,y,M,v,E,x,b,A;return this.sphere?Math.abs(this.sin_p12-1)<=B?(t.x=this.x0+this.a*(O-n)*Math.sin(h),t.y=this.y0-this.a*(O-n)*Math.cos(h),t):Math.abs(this.sin_p12+1)<=B?(t.x=this.x0+this.a*(O+n)*Math.sin(h),t.y=this.y0+this.a*(O+n)*Math.cos(h),t):(x=this.sin_p12*s+this.cos_p12*o*Math.cos(h),v=Math.acos(x),E=v?v/Math.sin(v):1,t.x=this.x0+this.a*E*o*Math.sin(h),t.y=this.y0+this.a*E*(this.cos_p12*s-this.sin_p12*o*Math.cos(h)),t):(f=kn(this.es),u=Hn(this.es),c=Yn(this.es),g=Kn(this.es),Math.abs(this.sin_p12-1)<=B?(y=this.a*Ut(f,u,c,g,O),M=this.a*Ut(f,u,c,g,n),t.x=this.x0+(y-M)*Math.sin(h),t.y=this.y0-(y-M)*Math.cos(h),t):Math.abs(this.sin_p12+1)<=B?(y=this.a*Ut(f,u,c,g,O),M=this.a*Ut(f,u,c,g,n),t.x=this.x0+(y+M)*Math.sin(h),t.y=this.y0+(y+M)*Math.cos(h),t):Math.abs(i)<B&&Math.abs(n-this.lat0)<B?(t.x=t.y=0,t):(b=oM(this.lat0,this.long0,n,i,this.a,this.f),A=b.azi1,t.x=b.s12*Math.sin(A),t.y=b.s12*Math.cos(A),t))}function lM(t){t.x-=this.x0,t.y-=this.y0;var i,n,s,o,h,f,u,c,g,y,M,v,E,x,b,A;return this.sphere?(i=Math.sqrt(t.x*t.x+t.y*t.y),i>2*O*this.a?void 0:(n=i/this.a,s=Math.sin(n),o=Math.cos(n),h=this.long0,Math.abs(i)<=B?f=this.lat0:(f=ni(o*this.sin_p12+t.y*s*this.cos_p12/i),u=Math.abs(this.lat0)-O,Math.abs(u)<=B?this.lat0>=0?h=q(this.long0+Math.atan2(t.x,-t.y),this.over):h=q(this.long0-Math.atan2(-t.x,t.y),this.over):h=q(this.long0+Math.atan2(t.x*s,i*this.cos_p12*o-t.y*this.sin_p12*s),this.over)),t.x=h,t.y=f,t)):(c=kn(this.es),g=Hn(this.es),y=Yn(this.es),M=Kn(this.es),Math.abs(this.sin_p12-1)<=B?(v=this.a*Ut(c,g,y,M,O),i=Math.sqrt(t.x*t.x+t.y*t.y),E=v-i,f=fs(E/this.a,c,g,y,M),h=q(this.long0+Math.atan2(t.x,-1*t.y),this.over),t.x=h,t.y=f,t):Math.abs(this.sin_p12+1)<=B?(v=this.a*Ut(c,g,y,M,O),i=Math.sqrt(t.x*t.x+t.y*t.y),E=i-v,f=fs(E/this.a,c,g,y,M),h=q(this.long0+Math.atan2(t.x,t.y),this.over),t.x=h,t.y=f,t):(x=Math.atan2(t.x,t.y),b=Math.sqrt(t.x*t.x+t.y*t.y),A=hM(this.lat0,this.long0,x,b,this.a,this.f),t.x=A.lon2,t.y=A.lat2,t))}var cM=["Azimuthal_Equidistant","aeqd"];const _M={init:uM,forward:fM,inverse:lM,names:cM};function gM(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function vM(t){var i,n,s,o,h,f,u,c,g=t.x,y=t.y;return s=q(g-this.long0,this.over),i=Math.sin(y),n=Math.cos(y),o=Math.cos(s),f=this.sin_p14*i+this.cos_p14*n*o,h=1,(f>0||Math.abs(f)<=B)&&(u=this.a*h*n*Math.sin(s),c=this.y0+this.a*h*(this.cos_p14*i-this.sin_p14*n*o)),t.x=u,t.y=c,t}function dM(t){var i,n,s,o,h,f,u;return t.x-=this.x0,t.y-=this.y0,i=Math.sqrt(t.x*t.x+t.y*t.y),n=ni(i/this.a),s=Math.sin(n),o=Math.cos(n),f=this.long0,Math.abs(i)<=B?(u=this.lat0,t.x=f,t.y=u,t):(u=ni(o*this.sin_p14+t.y*s*this.cos_p14/i),h=Math.abs(this.lat0)-O,Math.abs(h)<=B?(this.lat0>=0?f=q(this.long0+Math.atan2(t.x,-t.y),this.over):f=q(this.long0-Math.atan2(-t.x,t.y),this.over),t.x=f,t.y=u,t):(f=q(this.long0+Math.atan2(t.x*s,i*this.cos_p14*o-t.y*this.sin_p14*s),this.over),t.x=f,t.y=u,t))}var MM=["ortho"];const mM={init:gM,forward:vM,inverse:dM,names:MM};var dt={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},ht={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function yM(){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>=O-ot/2?this.face=dt.TOP:this.lat0<=-(O-ot/2)?this.face=dt.BOTTOM:Math.abs(this.long0)<=ot?this.face=dt.FRONT:Math.abs(this.long0)<=O+ot?this.face=this.long0>0?dt.RIGHT:dt.LEFT:this.face=dt.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 pM(t){var i={x:0,y:0},n,s,o,h,f,u,c={value:0};if(t.x-=this.long0,this.es!==0?n=Math.atan(this.one_minus_f_squared*Math.tan(t.y)):n=t.y,s=t.x,this.face===dt.TOP)h=O-n,s>=ot&&s<=O+ot?(c.value=ht.AREA_0,o=s-O):s>O+ot||s<=-(O+ot)?(c.value=ht.AREA_1,o=s>0?s-Et:s+Et):s>-(O+ot)&&s<=-ot?(c.value=ht.AREA_2,o=s+O):(c.value=ht.AREA_3,o=s);else if(this.face===dt.BOTTOM)h=O+n,s>=ot&&s<=O+ot?(c.value=ht.AREA_0,o=-s+O):s<ot&&s>=-ot?(c.value=ht.AREA_1,o=-s):s<-ot&&s>=-(O+ot)?(c.value=ht.AREA_2,o=-s-O):(c.value=ht.AREA_3,o=s>0?-s+Et:-s-Et);else{var g,y,M,v,E,x,b;this.face===dt.RIGHT?s=Ki(s,+O):this.face===dt.BACK?s=Ki(s,+Et):this.face===dt.LEFT&&(s=Ki(s,-O)),v=Math.sin(n),E=Math.cos(n),x=Math.sin(s),b=Math.cos(s),g=E*b,y=E*x,M=v,this.face===dt.FRONT?(h=Math.acos(g),o=Hr(h,M,y,c)):this.face===dt.RIGHT?(h=Math.acos(y),o=Hr(h,M,-g,c)):this.face===dt.BACK?(h=Math.acos(-g),o=Hr(h,M,-y,c)):this.face===dt.LEFT?(h=Math.acos(-y),o=Hr(h,M,g,c)):(h=o=0,c.value=ht.AREA_0)}return u=Math.atan(12/Et*(o+Math.acos(Math.sin(o)*Math.cos(ot))-O)),f=Math.sqrt((1-Math.cos(h))/(Math.cos(u)*Math.cos(u))/(1-Math.cos(Math.atan(1/Math.cos(o))))),c.value===ht.AREA_1?u+=O:c.value===ht.AREA_2?u+=Et:c.value===ht.AREA_3&&(u+=1.5*Et),i.x=f*Math.cos(u),i.y=f*Math.sin(u),i.x=i.x*this.a+this.x0,i.y=i.y*this.a+this.y0,t.x=i.x,t.y=i.y,t}function wM(t){var i={lam:0,phi:0},n,s,o,h,f,u,c,g,y,M={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,s=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),n=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?M.value=ht.AREA_0:t.y>=0&&t.y>=Math.abs(t.x)?(M.value=ht.AREA_1,n-=O):t.x<0&&-t.x>=Math.abs(t.y)?(M.value=ht.AREA_2,n=n<0?n+Et:n-Et):(M.value=ht.AREA_3,n+=O),y=Et/12*Math.tan(n),f=Math.sin(y)/(Math.cos(y)-1/Math.sqrt(2)),u=Math.atan(f),o=Math.cos(n),h=Math.tan(s),c=1-o*o*h*h*(1-Math.cos(Math.atan(1/Math.cos(u)))),c<-1?c=-1:c>1&&(c=1),this.face===dt.TOP)g=Math.acos(c),i.phi=O-g,M.value===ht.AREA_0?i.lam=u+O:M.value===ht.AREA_1?i.lam=u<0?u+Et:u-Et:M.value===ht.AREA_2?i.lam=u-O:i.lam=u;else if(this.face===dt.BOTTOM)g=Math.acos(c),i.phi=g-O,M.value===ht.AREA_0?i.lam=-u+O:M.value===ht.AREA_1?i.lam=-u:M.value===ht.AREA_2?i.lam=-u-O:i.lam=u<0?-u-Et:-u+Et;else{var v,E,x;v=c,y=v*v,y>=1?x=0:x=Math.sqrt(1-y)*Math.sin(u),y+=x*x,y>=1?E=0:E=Math.sqrt(1-y),M.value===ht.AREA_1?(y=E,E=-x,x=y):M.value===ht.AREA_2?(E=-E,x=-x):M.value===ht.AREA_3&&(y=E,E=x,x=-y),this.face===dt.RIGHT?(y=v,v=-E,E=y):this.face===dt.BACK?(v=-v,E=-E):this.face===dt.LEFT&&(y=v,v=E,E=-y),i.phi=Math.acos(-x)-O,i.lam=Math.atan2(E,v),this.face===dt.RIGHT?i.lam=Ki(i.lam,-O):this.face===dt.BACK?i.lam=Ki(i.lam,-Et):this.face===dt.LEFT&&(i.lam=Ki(i.lam,+O))}if(this.es!==0){var b,A,C;b=i.phi<0?1:0,A=Math.tan(i.phi),C=this.b/Math.sqrt(A*A+this.one_minus_f_squared),i.phi=Math.atan(Math.sqrt(this.a*this.a-C*C)/(this.one_minus_f*C)),b&&(i.phi=-i.phi)}return i.lam+=this.long0,t.x=i.lam,t.y=i.phi,t}function Hr(t,i,n,s){var o;return t<B?(s.value=ht.AREA_0,o=0):(o=Math.atan2(i,n),Math.abs(o)<=ot?s.value=ht.AREA_0:o>ot&&o<=O+ot?(s.value=ht.AREA_1,o-=O):o>O+ot||o<=-(O+ot)?(s.value=ht.AREA_2,o=o>=0?o-Et:o+Et):(s.value=ht.AREA_3,o+=O)),o}function Ki(t,i){var n=t+i;return n<-Et?n+=Fn:n>+Et&&(n-=Fn),n}var EM=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const xM={init:yM,forward:pM,inverse:wM,names:EM};var io=[[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]],Gn=[[-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]],nf=.8487,rf=1.3523,sf=Yt/5,SM=1/sf,ki=18,ls=function(t,i){return t[0]+i*(t[1]+i*(t[2]+i*t[3]))},PM=function(t,i){return t[1]+i*(2*t[2]+i*3*t[3])};function bM(t,i,n,s){for(var o=i;s;--s){var h=t(o);if(o-=h,Math.abs(h)<n)break}return o}function AM(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function GM(t){var i=q(t.x-this.long0,this.over),n=Math.abs(t.y),s=Math.floor(n*sf);s<0?s=0:s>=ki&&(s=ki-1),n=Yt*(n-SM*s);var o={x:ls(io[s],n)*i,y:ls(Gn[s],n)};return t.y<0&&(o.y=-o.y),o.x=o.x*this.a*nf+this.x0,o.y=o.y*this.a*rf+this.y0,o}function IM(t){var i={x:(t.x-this.x0)/(this.a*nf),y:Math.abs(t.y-this.y0)/(this.a*rf)};if(i.y>=1)i.x/=io[ki][0],i.y=t.y<0?-O:O;else{var n=Math.floor(i.y*ki);for(n<0?n=0:n>=ki&&(n=ki-1);;)if(Gn[n][0]>i.y)--n;else if(Gn[n+1][0]<=i.y)++n;else break;var s=Gn[n],o=5*(i.y-s[0])/(Gn[n+1][0]-s[0]);o=bM(function(h){return(ls(s,h)-i.y)/PM(s,h)},o,B,100),i.x/=ls(io[n],o),i.y=(5*n+o)*yt,t.y<0&&(i.y=-i.y)}return i.x=q(i.x+this.long0,this.over),i}var CM=["Robinson","robin"];const NM={init:AM,forward:GM,inverse:IM,names:CM};function RM(){this.name="geocent"}function LM(t){var i=ku(t,this.es,this.a);return i}function OM(t){var i=Hu(t,this.es,this.a,this.b);return i}var TM=["Geocentric","geocentric","geocent","Geocent"];const BM={init:RM,forward:LM,inverse:OM,names:TM};var Ot={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},xn={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 FM(){if(Object.keys(xn).forEach((function(n){if(typeof this[n]>"u")this[n]=xn[n].def;else{if(xn[n].num&&isNaN(this[n]))throw new Error("Invalid parameter value, must be numeric "+n+" = "+this[n]);xn[n].num&&(this[n]=parseFloat(this[n]))}xn[n].degrees&&(this[n]=this[n]*yt)}).bind(this)),Math.abs(Math.abs(this.lat0)-O)<B?this.mode=this.lat0<0?Ot.S_POLE:Ot.N_POLE:Math.abs(this.lat0)<B?this.mode=Ot.EQUIT:(this.mode=Ot.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 t=this.tilt,i=this.azi;this.cg=Math.cos(i),this.sg=Math.sin(i),this.cw=Math.cos(t),this.sw=Math.sin(t)}function qM(t){t.x-=this.long0;var i=Math.sin(t.y),n=Math.cos(t.y),s=Math.cos(t.x),o,h;switch(this.mode){case Ot.OBLIQ:h=this.sinph0*i+this.cosph0*n*s;break;case Ot.EQUIT:h=n*s;break;case Ot.S_POLE:h=-i;break;case Ot.N_POLE:h=i;break}switch(h=this.pn1/(this.p-h),o=h*n*Math.sin(t.x),this.mode){case Ot.OBLIQ:h*=this.cosph0*i-this.sinph0*n*s;break;case Ot.EQUIT:h*=i;break;case Ot.N_POLE:h*=-(n*s);break;case Ot.S_POLE:h*=n*s;break}var f,u;return f=h*this.cg+o*this.sg,u=1/(f*this.sw*this.h1+this.cw),o=(o*this.cg-h*this.sg)*this.cw*u,h=f*u,t.x=o*this.a,t.y=h*this.a,t}function DM(t){t.x/=this.a,t.y/=this.a;var i={x:t.x,y:t.y},n,s,o;o=1/(this.pn1-t.y*this.sw),n=this.pn1*t.x*o,s=this.pn1*t.y*this.cw*o,t.x=n*this.cg+s*this.sg,t.y=s*this.cg-n*this.sg;var h=Ht(t.x,t.y);if(Math.abs(h)<B)i.x=0,i.y=t.y;else{var f,u;switch(u=1-h*h*this.pfact,u=(this.p-Math.sqrt(u))/(this.pn1/h+h/this.pn1),f=Math.sqrt(1-u*u),this.mode){case Ot.OBLIQ:i.y=Math.asin(f*this.sinph0+t.y*u*this.cosph0/h),t.y=(f-this.sinph0*Math.sin(i.y))*h,t.x*=u*this.cosph0;break;case Ot.EQUIT:i.y=Math.asin(t.y*u/h),t.y=f*h,t.x*=u;break;case Ot.N_POLE:i.y=Math.asin(f),t.y=-t.y;break;case Ot.S_POLE:i.y=-Math.asin(f);break}i.x=Math.atan2(t.x,t.y)}return t.x=i.x+this.long0,t.y=i.y,t}var UM=["Tilted_Perspective","tpers"];const WM={init:FM,forward:qM,inverse:DM,names:UM};function $M(){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 t=1-this.es,i=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=i,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 zM(t){var i=t.x,n=t.y,s,o,h,f;if(i=i-this.long0,this.shape==="ellipse"){n=Math.atan(this.radius_p2*Math.tan(n));var u=this.radius_p/Ht(this.radius_p*Math.cos(n),Math.sin(n));if(o=u*Math.cos(i)*Math.cos(n),h=u*Math.sin(i)*Math.cos(n),f=u*Math.sin(n),(this.radius_g-o)*o-h*h-f*f*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;s=this.radius_g-o,this.flip_axis?(t.x=this.radius_g_1*Math.atan(h/Ht(f,s)),t.y=this.radius_g_1*Math.atan(f/s)):(t.x=this.radius_g_1*Math.atan(h/s),t.y=this.radius_g_1*Math.atan(f/Ht(h,s)))}else this.shape==="sphere"&&(s=Math.cos(n),o=Math.cos(i)*s,h=Math.sin(i)*s,f=Math.sin(n),s=this.radius_g-o,this.flip_axis?(t.x=this.radius_g_1*Math.atan(h/Ht(f,s)),t.y=this.radius_g_1*Math.atan(f/s)):(t.x=this.radius_g_1*Math.atan(h/s),t.y=this.radius_g_1*Math.atan(f/Ht(h,s))));return t.x=t.x*this.a,t.y=t.y*this.a,t}function XM(t){var i=-1,n=0,s=0,o,h,f,u;if(t.x=t.x/this.a,t.y=t.y/this.a,this.shape==="ellipse"){this.flip_axis?(s=Math.tan(t.y/this.radius_g_1),n=Math.tan(t.x/this.radius_g_1)*Ht(1,s)):(n=Math.tan(t.x/this.radius_g_1),s=Math.tan(t.y/this.radius_g_1)*Ht(1,n));var c=s/this.radius_p;if(o=n*n+c*c+i*i,h=2*this.radius_g*i,f=h*h-4*o*this.C,f<0)return t.x=Number.NaN,t.y=Number.NaN,t;u=(-h-Math.sqrt(f))/(2*o),i=this.radius_g+u*i,n*=u,s*=u,t.x=Math.atan2(n,i),t.y=Math.atan(s*Math.cos(t.x)/i),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if(this.shape==="sphere"){if(this.flip_axis?(s=Math.tan(t.y/this.radius_g_1),n=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+s*s)):(n=Math.tan(t.x/this.radius_g_1),s=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+n*n)),o=n*n+s*s+i*i,h=2*this.radius_g*i,f=h*h-4*o*this.C,f<0)return t.x=Number.NaN,t.y=Number.NaN,t;u=(-h-Math.sqrt(f))/(2*o),i=this.radius_g+u*i,n*=u,s*=u,t.x=Math.atan2(n,i),t.y=Math.atan(s*Math.cos(t.x)/i)}return t.x=t.x+this.long0,t}var kM=["Geostationary Satellite View","Geostationary_Satellite","geos"];const HM={init:$M,forward:zM,inverse:XM,names:kM};var Ln=1.340264,On=-.081106,Tn=893e-6,Bn=.003796,cs=Math.sqrt(3)/2;function YM(){this.es=0,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}function KM(t){var i=q(t.x-this.long0,this.over),n=t.y,s=Math.asin(cs*Math.sin(n)),o=s*s,h=o*o*o;return t.x=i*Math.cos(s)/(cs*(Ln+3*On*o+h*(7*Tn+9*Bn*o))),t.y=s*(Ln+On*o+h*(Tn+Bn*o)),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function QM(t){t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a;var i=1e-9,n=12,s=t.y,o,h,f,u,c,g;for(g=0;g<n&&(o=s*s,h=o*o*o,f=s*(Ln+On*o+h*(Tn+Bn*o))-t.y,u=Ln+3*On*o+h*(7*Tn+9*Bn*o),s-=c=f/u,!(Math.abs(c)<i));++g);return o=s*s,h=o*o*o,t.x=cs*t.x*(Ln+3*On*o+h*(7*Tn+9*Bn*o))/Math.cos(s),t.y=Math.asin(Math.sin(s)/cs),t.x=q(t.x+this.long0,this.over),t}var JM=["eqearth","Equal Earth","Equal_Earth"];const ZM={init:YM,forward:KM,inverse:QM,names:JM};var Un=1e-10;function VM(){var t;if(this.phi1=this.lat1,Math.abs(this.phi1)<Un)throw new Error;this.es?(this.en=oo(this.es),this.m1=Vi(this.phi1,this.am1=Math.sin(this.phi1),t=Math.cos(this.phi1),this.en),this.am1=t/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=tm,this.forward=jM):(Math.abs(this.phi1)+Un>=O?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=im,this.forward=em)}function jM(t){var i=q(t.x-(this.long0||0),this.over),n=t.y,s,o,h;return s=this.am1+this.m1-Vi(n,o=Math.sin(n),h=Math.cos(n),this.en),o=h*i/(s*Math.sqrt(1-this.es*o*o)),t.x=s*Math.sin(o),t.y=this.am1-s*Math.cos(o),t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function tm(t){t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var i,n,s,o;if(n=Ht(t.x,t.y=this.am1-t.y),o=ho(this.am1+this.m1-n,this.es,this.en),(i=Math.abs(o))<O)i=Math.sin(o),s=n*Math.atan2(t.x,t.y)*Math.sqrt(1-this.es*i*i)/Math.cos(o);else if(Math.abs(i-O)<=Un)s=0;else throw new Error;return t.x=q(s+(this.long0||0),this.over),t.y=ri(o),t}function em(t){var i=q(t.x-(this.long0||0),this.over),n=t.y,s,o;return o=this.cphi1+this.phi1-n,Math.abs(o)>Un?(t.x=o*Math.sin(s=i*Math.cos(n)/o),t.y=this.cphi1-o*Math.cos(s)):t.x=t.y=0,t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function im(t){t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var i,n,s=Ht(t.x,t.y=this.cphi1-t.y);if(n=this.cphi1+this.phi1-s,Math.abs(n)>O)throw new Error;return Math.abs(Math.abs(n)-O)<=Un?i=0:i=s*Math.atan2(t.x,t.y)/Math.cos(n),t.x=q(i+(this.long0||0),this.over),t.y=ri(n),t}var nm=["bonne","Bonne (Werner lat_1=90)"];const rm={init:VM,names:nm},Mu={OBLIQUE:{forward:um,inverse:lm},TRANSVERSE:{forward:fm,inverse:cm}},_s={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 sm(){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=Wu.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);const t=this.projStr.replace("+proj=ob_tran","").replace("+o_proj=","+proj=").trim(),i=le(t);if(!i)throw new Error("Invalid parameter: o_proj. Unknown projection "+this.o_proj);i.long0=0,this.obliqueProjection=i;let n;const s=Object.keys(_s),o=u=>{if(typeof this[u]>"u")return;const c=parseFloat(this[u])*yt;if(isNaN(c))throw new Error("Invalid value for "+u+": "+this[u]);return c};for(let u=0;u<s.length;u++){const c=s[u],g=_s[c],y=Object.entries(g);if(y.some(([v])=>typeof this[v]<"u")){n=g;for(let v=0;v<y.length;v++){const[E,x]=y[v],b=o(E);if(typeof b>"u")throw new Error("Missing parameter: "+E+".");this[x]=b}break}}if(!n)throw new Error("No valid parameters provided for ob_tran projection.");const{lamp:h,phip:f}=hm(this,n);this.lamp=h,Math.abs(f)>B?(this.cphip=Math.cos(f),this.sphip=Math.sin(f),this.projectionType=Mu.OBLIQUE):this.projectionType=Mu.TRANSVERSE}function am(t){return this.projectionType.forward(this,t)}function om(t){return this.projectionType.inverse(this,t)}function hm(t,i){let n,s;if(i===_s.ROTATE){let o=t.oLongC,h=t.oLatC,f=t.oAlpha;if(Math.abs(Math.abs(h)-O)<=B)throw new Error("Invalid value for o_lat_c: "+t.o_lat_c+" should be < 90°");s=o+Math.atan2(-1*Math.cos(f),-1*Math.sin(f)*Math.sin(h)),n=Math.asin(Math.cos(h)*Math.sin(f))}else if(i===_s.NEW_POLE)s=t.oLongP,n=t.oLatP;else{let o=t.oLong1,h=t.oLat1,f=t.oLong2,u=t.oLat2,c=Math.abs(h);if(Math.abs(h)>O-B)throw new Error("Invalid value for o_lat_1: "+t.o_lat_1+" should be < 90°");if(Math.abs(u)>O-B)throw new Error("Invalid value for o_lat_2: "+t.o_lat_2+" should be < 90°");if(Math.abs(h-u)<B)throw new Error("Invalid value for o_lat_1 and o_lat_2: o_lat_1 should be different from o_lat_2");if(c<B)throw new Error("Invalid value for o_lat_1: o_lat_1 should be different from zero");s=Math.atan2(Math.cos(h)*Math.sin(u)*Math.cos(o)-Math.sin(h)*Math.cos(u)*Math.cos(f),Math.sin(h)*Math.cos(u)*Math.sin(f)-Math.cos(h)*Math.sin(u)*Math.sin(o)),n=Math.atan(-1*Math.cos(s-o)/Math.tan(h))}return{lamp:s,phip:n}}function um(t,i){let{x:n,y:s}=i;n+=t.long0;const o=Math.cos(n),h=Math.sin(s),f=Math.cos(s);i.x=q(Math.atan2(f*Math.sin(n),t.sphip*f*o+t.cphip*h)+t.lamp),i.y=Math.asin(t.sphip*h-t.cphip*f*o);const u=t.obliqueProjection.forward(i);return t.isIdentity&&(u.x*=Yt,u.y*=Yt),u}function fm(t,i){let{x:n,y:s}=i;n+=t.long0;const o=Math.cos(s),h=Math.cos(n);i.x=q(Math.atan2(o*Math.sin(n),Math.sin(s))+t.lamp),i.y=Math.asin(-1*o*h);const f=t.obliqueProjection.forward(i);return t.isIdentity&&(f.x*=Yt,f.y*=Yt),f}function lm(t,i){t.isIdentity&&(i.x*=yt,i.y*=yt);const n=t.obliqueProjection.inverse(i);let{x:s,y:o}=n;if(s<Number.MAX_VALUE){s-=t.lamp;const h=Math.cos(s),f=Math.sin(o),u=Math.cos(o);i.x=Math.atan2(u*Math.sin(s),t.sphip*u*h-t.cphip*f),i.y=Math.asin(t.sphip*f+t.cphip*u*h)}return i.x=q(i.x+t.long0),i}function cm(t,i){t.isIdentity&&(i.x*=yt,i.y*=yt);const n=t.obliqueProjection.inverse(i);let{x:s,y:o}=n;if(s<Number.MAX_VALUE){const h=Math.cos(o);s-=t.lamp,i.x=Math.atan2(h*Math.sin(s),-1*Math.sin(o)),i.y=Math.asin(h*Math.cos(s))}return i.x=q(i.x+t.long0),i}var _m=["General Oblique Transformation","General_Oblique_Transformation","ob_tran"];const gm={init:sm,forward:am,inverse:om,names:_m};function vm(t){t.Proj.projections.add(is),t.Proj.projections.add(ns),t.Proj.projections.add(n3),t.Proj.projections.add(c3),t.Proj.projections.add(M3),t.Proj.projections.add(E3),t.Proj.projections.add(G3),t.Proj.projections.add(L3),t.Proj.projections.add(q3),t.Proj.projections.add(z3),t.Proj.projections.add(i8),t.Proj.projections.add(h8),t.Proj.projections.add(_8),t.Proj.projections.add(y8),t.Proj.projections.add(S8),t.Proj.projections.add(I8),t.Proj.projections.add(O8),t.Proj.projections.add(D8),t.Proj.projections.add(k8),t.Proj.projections.add(J8),t.Proj.projections.add(eM),t.Proj.projections.add(aM),t.Proj.projections.add(_M),t.Proj.projections.add(mM),t.Proj.projections.add(xM),t.Proj.projections.add(NM),t.Proj.projections.add(BM),t.Proj.projections.add(WM),t.Proj.projections.add(HM),t.Proj.projections.add(ZM),t.Proj.projections.add(rm),t.Proj.projections.add(gm)}const mi=Object.assign(pd,{defaultDatum:"WGS84",Proj:le,WGS84:new le("WGS84"),Point:Ji,toPoint:Yu,defs:Ct,nadgrid:id,transform:us,mgrs:wd,version:"__VERSION__"});vm(mi);function wi(t,i=0){if(!af(t))return Number.NaN;if(i===0)return Math.round(t);const n=Math.pow(10,i);return Math.round(t*n)/n}function dm(t,i){if(Array.isArray(i)&&i.length>2){const n=i.map(h=>Math.abs(t-h)),s=n.reduce((h,f)=>h>f?f:h),o=n.indexOf(s);return typeof i[o]!="number"||isNaN(i[o])?t:i[o]}return t}function af(t){return t!=null&&!Number.isNaN(Number(t))&&(typeof t!="string"||t.length!==0)}const Mm=/\B(?=(\d{3})+(?!\d))/g;function mm(t,i="'"){const n=".",s=`${t}`.split(n);return typeof s[0]!="string"||s[0].length===0?`${t}`:(s[0]=s[0].replace(Mm,i),s.join(n))}var Dt=63710088e-1,of={centimeters:Dt*100,centimetres:Dt*100,degrees:360/(2*Math.PI),feet:Dt*3.28084,inches:Dt*39.37,kilometers:Dt/1e3,kilometres:Dt/1e3,meters:Dt,metres:Dt,miles:Dt/1609.344,millimeters:Dt*1e3,millimetres:Dt*1e3,nauticalmiles:Dt/1852,radians:1,yards:Dt*1.0936};function Ge(t,i,n={}){const s={type:"Feature"};return(n.id===0||n.id)&&(s.id=n.id),n.bbox&&(s.bbox=n.bbox),s.properties=i||{},s.geometry=t,s}function Mi(t,i,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!yu(t[0])||!yu(t[1]))throw new Error("coordinates must contain numbers");return Ge({type:"Point",coordinates:t},i,n)}function ym(t,i,n={}){return ce(t.map(s=>Mi(s,i)),n)}function hf(t,i,n={}){for(const o of t){if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(o[o.length-1].length!==o[0].length)throw new Error("First and last Position are not equivalent.");for(let h=0;h<o[o.length-1].length;h++)if(o[o.length-1][h]!==o[0][h])throw new Error("First and last Position are not equivalent.")}return Ge({type:"Polygon",coordinates:t},i,n)}function Wn(t,i,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return Ge({type:"LineString",coordinates:t},i,n)}function ce(t,i={}){const n={type:"FeatureCollection"};return i.id&&(n.id=i.id),i.bbox&&(n.bbox=i.bbox),n.features=t,n}function pm(t,i,n={}){return Ge({type:"MultiLineString",coordinates:t},i,n)}function wm(t,i,n={}){return Ge({type:"MultiPolygon",coordinates:t},i,n)}function uf(t,i="kilometers"){const n=of[i];if(!n)throw new Error(i+" units is invalid");return t*n}function Em(t,i="kilometers"){const n=of[i];if(!n)throw new Error(i+" units is invalid");return t/n}function mu(t){return t%(2*Math.PI)*180/Math.PI}function Hi(t){return t%360*Math.PI/180}function yu(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function xm(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function We(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return[...t.geometry.coordinates];if(t.type==="Point")return[...t.coordinates]}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return[...t];throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Qi(t){if(Array.isArray(t))return t;if(t.type==="Feature"){if(t.geometry!==null)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function ff(t){return t.type==="Feature"?t.geometry:t}function pu(t,i){return t.type==="FeatureCollection"?"FeatureCollection":t.type==="GeometryCollection"?"GeometryCollection":t.type==="Feature"&&t.geometry!==null?t.geometry.type:t.type}function ss(t,i,n={}){var s=We(t),o=We(i),h=Hi(o[1]-s[1]),f=Hi(o[0]-s[0]),u=Hi(s[1]),c=Hi(o[1]),g=Math.pow(Math.sin(h/2),2)+Math.pow(Math.sin(f/2),2)*Math.cos(u)*Math.cos(c);return uf(2*Math.atan2(Math.sqrt(g),Math.sqrt(1-g)),n.units)}function go(t,i,n){if(t!==null)for(var s,o,h,f,u,c,g,y=0,M=0,v,E=t.type,x=E==="FeatureCollection",b=E==="Feature",A=x?t.features.length:1,C=0;C<A;C++){g=x?t.features[C].geometry:b?t.geometry:t,v=g?g.type==="GeometryCollection":!1,u=v?g.geometries.length:1;for(var T=0;T<u;T++){var F=0,W=0;if(f=v?g.geometries[T]:g,f!==null){c=f.coordinates;var $=f.type;switch(y=0,$){case null:break;case"Point":if(i(c,M,C,F,W)===!1)return!1;M++,F++;break;case"LineString":case"MultiPoint":for(s=0;s<c.length;s++){if(i(c[s],M,C,F,W)===!1)return!1;M++,$==="MultiPoint"&&F++}$==="LineString"&&F++;break;case"Polygon":case"MultiLineString":for(s=0;s<c.length;s++){for(o=0;o<c[s].length-y;o++){if(i(c[s][o],M,C,F,W)===!1)return!1;M++}$==="MultiLineString"&&F++,$==="Polygon"&&W++}$==="Polygon"&&F++;break;case"MultiPolygon":for(s=0;s<c.length;s++){for(W=0,o=0;o<c[s].length;o++){for(h=0;h<c[s][o].length-y;h++){if(i(c[s][o][h],M,C,F,W)===!1)return!1;M++}W++}F++}break;case"GeometryCollection":for(s=0;s<f.geometries.length;s++)if(go(f.geometries[s],i)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Qn(t,i){if(t.type==="Feature")i(t,0);else if(t.type==="FeatureCollection")for(var n=0;n<t.features.length&&i(t.features[n],n)!==!1;n++);}function Sm(t,i,n){var s=n;return Qn(t,function(o,h){h===0&&n===void 0?s=o:s=i(s,o,h)}),s}function lf(t,i){var n,s,o,h,f,u,c,g,y,M,v=0,E=t.type==="FeatureCollection",x=t.type==="Feature",b=E?t.features.length:1;for(n=0;n<b;n++){for(u=E?t.features[n].geometry:x?t.geometry:t,g=E?t.features[n].properties:x?t.properties:{},y=E?t.features[n].bbox:x?t.bbox:void 0,M=E?t.features[n].id:x?t.id:void 0,c=u?u.type==="GeometryCollection":!1,f=c?u.geometries.length:1,o=0;o<f;o++){if(h=c?u.geometries[o]:u,h===null){if(i(null,v,g,y,M)===!1)return!1;continue}switch(h.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(i(h,v,g,y,M)===!1)return!1;break}case"GeometryCollection":{for(s=0;s<h.geometries.length;s++)if(i(h.geometries[s],v,g,y,M)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}v++}}function vo(t,i){lf(t,function(n,s,o,h,f){var u=n===null?null:n.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return i(Ge(n,o,{bbox:h,id:f}),s,0)===!1?!1:void 0}var c;switch(u){case"MultiPoint":c="Point";break;case"MultiLineString":c="LineString";break;case"MultiPolygon":c="Polygon";break}for(var g=0;g<n.coordinates.length;g++){var y=n.coordinates[g],M={type:c,coordinates:y};if(i(Ge(M,o),s,g)===!1)return!1}})}function di(t,i={}){if(t.bbox!=null&&i.recompute!==!0)return t.bbox;const n=[1/0,1/0,-1/0,-1/0];return go(t,s=>{n[0]>s[0]&&(n[0]=s[0]),n[1]>s[1]&&(n[1]=s[1]),n[2]<s[0]&&(n[2]=s[0]),n[3]<s[1]&&(n[3]=s[1])}),n}function cf(t,i={}){const n=Number(t[0]),s=Number(t[1]),o=Number(t[2]),h=Number(t[3]);if(t.length===6)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");const f=[n,s];return hf([[f,[o,s],[o,h],[n,h],f]],i.properties,{bbox:t,id:i.id})}const $e=11102230246251565e-32,Lt=134217729,Pm=(3+8*$e)*$e;function ka(t,i,n,s,o){let h,f,u,c,g=i[0],y=s[0],M=0,v=0;y>g==y>-g?(h=g,g=i[++M]):(h=y,y=s[++v]);let E=0;if(M<t&&v<n)for(y>g==y>-g?(f=g+h,u=h-(f-g),g=i[++M]):(f=y+h,u=h-(f-y),y=s[++v]),h=f,u!==0&&(o[E++]=u);M<t&&v<n;)y>g==y>-g?(f=h+g,c=f-h,u=h-(f-c)+(g-c),g=i[++M]):(f=h+y,c=f-h,u=h-(f-c)+(y-c),y=s[++v]),h=f,u!==0&&(o[E++]=u);for(;M<t;)f=h+g,c=f-h,u=h-(f-c)+(g-c),g=i[++M],h=f,u!==0&&(o[E++]=u);for(;v<n;)f=h+y,c=f-h,u=h-(f-c)+(y-c),y=s[++v],h=f,u!==0&&(o[E++]=u);return(h!==0||E===0)&&(o[E++]=h),E}function bm(t,i){let n=i[0];for(let s=1;s<t;s++)n+=i[s];return n}function Jn(t){return new Float64Array(t)}const Am=(3+16*$e)*$e,Gm=(2+12*$e)*$e,Im=(9+64*$e)*$e*$e,qi=Jn(4),wu=Jn(8),Eu=Jn(12),xu=Jn(16),qt=Jn(4);function Cm(t,i,n,s,o,h,f){let u,c,g,y,M,v,E,x,b,A,C,T,F,W,$,X,K,j;const rt=t-o,Mt=n-o,lt=i-h,xt=s-h;W=rt*xt,v=Lt*rt,E=v-(v-rt),x=rt-E,v=Lt*xt,b=v-(v-xt),A=xt-b,$=x*A-(W-E*b-x*b-E*A),X=lt*Mt,v=Lt*lt,E=v-(v-lt),x=lt-E,v=Lt*Mt,b=v-(v-Mt),A=Mt-b,K=x*A-(X-E*b-x*b-E*A),C=$-K,M=$-C,qi[0]=$-(C+M)+(M-K),T=W+C,M=T-W,F=W-(T-M)+(C-M),C=F-X,M=F-C,qi[1]=F-(C+M)+(M-X),j=T+C,M=j-T,qi[2]=T-(j-M)+(C-M),qi[3]=j;let bt=bm(4,qi),Ie=Gm*f;if(bt>=Ie||-bt>=Ie||(M=t-rt,u=t-(rt+M)+(M-o),M=n-Mt,g=n-(Mt+M)+(M-o),M=i-lt,c=i-(lt+M)+(M-h),M=s-xt,y=s-(xt+M)+(M-h),u===0&&c===0&&g===0&&y===0)||(Ie=Im*f+Pm*Math.abs(bt),bt+=rt*y+xt*u-(lt*g+Mt*c),bt>=Ie||-bt>=Ie))return bt;W=u*xt,v=Lt*u,E=v-(v-u),x=u-E,v=Lt*xt,b=v-(v-xt),A=xt-b,$=x*A-(W-E*b-x*b-E*A),X=c*Mt,v=Lt*c,E=v-(v-c),x=c-E,v=Lt*Mt,b=v-(v-Mt),A=Mt-b,K=x*A-(X-E*b-x*b-E*A),C=$-K,M=$-C,qt[0]=$-(C+M)+(M-K),T=W+C,M=T-W,F=W-(T-M)+(C-M),C=F-X,M=F-C,qt[1]=F-(C+M)+(M-X),j=T+C,M=j-T,qt[2]=T-(j-M)+(C-M),qt[3]=j;const ms=ka(4,qi,4,qt,wu);W=rt*y,v=Lt*rt,E=v-(v-rt),x=rt-E,v=Lt*y,b=v-(v-y),A=y-b,$=x*A-(W-E*b-x*b-E*A),X=lt*g,v=Lt*lt,E=v-(v-lt),x=lt-E,v=Lt*g,b=v-(v-g),A=g-b,K=x*A-(X-E*b-x*b-E*A),C=$-K,M=$-C,qt[0]=$-(C+M)+(M-K),T=W+C,M=T-W,F=W-(T-M)+(C-M),C=F-X,M=F-C,qt[1]=F-(C+M)+(M-X),j=T+C,M=j-T,qt[2]=T-(j-M)+(C-M),qt[3]=j;const ys=ka(ms,wu,4,qt,Eu);W=u*y,v=Lt*u,E=v-(v-u),x=u-E,v=Lt*y,b=v-(v-y),A=y-b,$=x*A-(W-E*b-x*b-E*A),X=c*g,v=Lt*c,E=v-(v-c),x=c-E,v=Lt*g,b=v-(v-g),A=g-b,K=x*A-(X-E*b-x*b-E*A),C=$-K,M=$-C,qt[0]=$-(C+M)+(M-K),T=W+C,M=T-W,F=W-(T-M)+(C-M),C=F-X,M=F-C,qt[1]=F-(C+M)+(M-X),j=T+C,M=j-T,qt[2]=T-(j-M)+(C-M),qt[3]=j;const Ce=ka(ys,Eu,4,qt,xu);return xu[Ce-1]}function Nm(t,i,n,s,o,h){const f=(i-h)*(n-o),u=(t-o)*(s-h),c=f-u,g=Math.abs(f+u);return Math.abs(c)>=Am*g?c:-Cm(t,i,n,s,o,h,g)}function Rm(t,i){var n,s,o=0,h,f,u,c,g,y,M,v=t[0],E=t[1],x=i.length;for(n=0;n<x;n++){s=0;var b=i[n],A=b.length-1;if(y=b[0],y[0]!==b[A][0]&&y[1]!==b[A][1])throw new Error("First and last coordinates in a ring must be the same");for(f=y[0]-v,u=y[1]-E,s;s<A;s++){if(M=b[s+1],c=M[0]-v,g=M[1]-E,u===0&&g===0){if(c<=0&&f>=0||f<=0&&c>=0)return 0}else if(g>=0&&u<=0||g<=0&&u>=0){if(h=Nm(f,c,u,g,0,0),h===0)return 0;(h>0&&g>0&&u<=0||h<0&&g<=0&&u>0)&&o++}y=M,u=g,f=c}}return o%2!==0}function Lm(t,i,n={}){if(!t)throw new Error("point is required");if(!i)throw new Error("polygon is required");const s=We(t),o=ff(i),h=o.type,f=i.bbox;let u=o.coordinates;if(f&&Om(s,f)===!1)return!1;h==="Polygon"&&(u=[u]);let c=!1;for(var g=0;g<u.length;++g){const y=Rm(s,u[g]);if(y===0)return!n.ignoreBoundary;y&&(c=!0)}return c}function Om(t,i){return i[0]<=t[0]&&i[1]<=t[1]&&i[2]>=t[0]&&i[3]>=t[1]}class _f{constructor(i=[],n=Tm){if(this.data=i,this.length=this.data.length,this.compare=n,this.length>0)for(let s=(this.length>>1)-1;s>=0;s--)this._down(s)}push(i){this.data.push(i),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const i=this.data[0],n=this.data.pop();return this.length--,this.length>0&&(this.data[0]=n,this._down(0)),i}peek(){return this.data[0]}_up(i){const{data:n,compare:s}=this,o=n[i];for(;i>0;){const h=i-1>>1,f=n[h];if(s(o,f)>=0)break;n[i]=f,i=h}n[i]=o}_down(i){const{data:n,compare:s}=this,o=this.length>>1,h=n[i];for(;i<o;){let f=(i<<1)+1,u=n[f];const c=f+1;if(c<this.length&&s(n[c],u)<0&&(f=c,u=n[c]),s(u,h)>=0)break;n[i]=u,i=f}n[i]=h}}function Tm(t,i){return t<i?-1:t>i?1:0}function gf(t,i){return t.p.x>i.p.x?1:t.p.x<i.p.x?-1:t.p.y!==i.p.y?t.p.y>i.p.y?1:-1:1}function Bm(t,i){return t.rightSweepEvent.p.x>i.rightSweepEvent.p.x?1:t.rightSweepEvent.p.x<i.rightSweepEvent.p.x?-1:t.rightSweepEvent.p.y!==i.rightSweepEvent.p.y?t.rightSweepEvent.p.y<i.rightSweepEvent.p.y?1:-1:1}class Su{constructor(i,n,s,o){this.p={x:i[0],y:i[1]},this.featureId=n,this.ringId=s,this.eventId=o,this.otherEvent=null,this.isLeftEndpoint=null}isSamePoint(i){return this.p.x===i.p.x&&this.p.y===i.p.y}}function Fm(t,i){if(t.type==="FeatureCollection"){const n=t.features;for(let s=0;s<n.length;s++)Pu(n[s],i)}else Pu(t,i)}let Yr=0,Kr=0,Qr=0;function Pu(t,i){const n=t.type==="Feature"?t.geometry:t;let s=n.coordinates;(n.type==="Polygon"||n.type==="MultiLineString")&&(s=[s]),n.type==="LineString"&&(s=[[s]]);for(let o=0;o<s.length;o++)for(let h=0;h<s[o].length;h++){let f=s[o][h][0],u=null;Kr=Kr+1;for(let c=0;c<s[o][h].length-1;c++){u=s[o][h][c+1];const g=new Su(f,Yr,Kr,Qr),y=new Su(u,Yr,Kr,Qr+1);g.otherEvent=y,y.otherEvent=g,gf(g,y)>0?(y.isLeftEndpoint=!0,g.isLeftEndpoint=!1):(g.isLeftEndpoint=!0,y.isLeftEndpoint=!1),i.push(g),i.push(y),f=u,Qr=Qr+1}}Yr=Yr+1}class qm{constructor(i){this.leftSweepEvent=i,this.rightSweepEvent=i.otherEvent}}function Dm(t,i){if(t===null||i===null||t.leftSweepEvent.ringId===i.leftSweepEvent.ringId&&(t.rightSweepEvent.isSamePoint(i.leftSweepEvent)||t.rightSweepEvent.isSamePoint(i.leftSweepEvent)||t.rightSweepEvent.isSamePoint(i.rightSweepEvent)||t.leftSweepEvent.isSamePoint(i.leftSweepEvent)||t.leftSweepEvent.isSamePoint(i.rightSweepEvent)))return!1;const n=t.leftSweepEvent.p.x,s=t.leftSweepEvent.p.y,o=t.rightSweepEvent.p.x,h=t.rightSweepEvent.p.y,f=i.leftSweepEvent.p.x,u=i.leftSweepEvent.p.y,c=i.rightSweepEvent.p.x,g=i.rightSweepEvent.p.y,y=(g-u)*(o-n)-(c-f)*(h-s),M=(c-f)*(s-u)-(g-u)*(n-f),v=(o-n)*(s-u)-(h-s)*(n-f);if(y===0)return!1;const E=M/y,x=v/y;if(E>=0&&E<=1&&x>=0&&x<=1){const b=n+E*(o-n),A=s+E*(h-s);return[b,A]}return!1}function Um(t,i){i=i||!1;const n=[],s=new _f([],Bm);for(;t.length;){const o=t.pop();if(o.isLeftEndpoint){const h=new qm(o);for(let f=0;f<s.data.length;f++){const u=s.data[f];if(i&&u.leftSweepEvent.featureId===o.featureId)continue;const c=Dm(h,u);c!==!1&&n.push(c)}s.push(h)}else o.isLeftEndpoint===!1&&s.pop()}return n}function Wm(t,i){const n=new _f([],gf);return Fm(t,n),Um(n,i)}var $m=Wm;function zm(t,i,n={}){const{removeDuplicates:s=!0,ignoreSelfIntersections:o=!0}=n;let h=[];t.type==="FeatureCollection"?h=h.concat(t.features):t.type==="Feature"?h.push(t):(t.type==="LineString"||t.type==="Polygon"||t.type==="MultiLineString"||t.type==="MultiPolygon")&&h.push(Ge(t)),i.type==="FeatureCollection"?h=h.concat(i.features):i.type==="Feature"?h.push(i):(i.type==="LineString"||i.type==="Polygon"||i.type==="MultiLineString"||i.type==="MultiPolygon")&&h.push(Ge(i));const f=$m(ce(h),o);let u=[];if(s){const c={};f.forEach(g=>{const y=g.join(",");c[y]||(c[y]=!0,u.push(g))})}else u=f;return ce(u.map(c=>Mi(c)))}function Xm(t,i,n,s,o){vf(t,i,n||0,s||t.length-1,o||km)}function vf(t,i,n,s,o){for(;s>n;){if(s-n>600){var h=s-n+1,f=i-n+1,u=Math.log(h),c=.5*Math.exp(2*u/3),g=.5*Math.sqrt(u*c*(h-c)/h)*(f-h/2<0?-1:1),y=Math.max(n,Math.floor(i-f*c/h+g)),M=Math.min(s,Math.floor(i+(h-f)*c/h+g));vf(t,i,y,M,o)}var v=t[i],E=n,x=s;for(Sn(t,n,i),o(t[s],v)>0&&Sn(t,n,s);E<x;){for(Sn(t,E,x),E++,x--;o(t[E],v)<0;)E++;for(;o(t[x],v)>0;)x--}o(t[n],v)===0?Sn(t,n,x):(x++,Sn(t,x,s)),x<=i&&(n=x+1),i<=x&&(s=x-1)}}function Sn(t,i,n){var s=t[i];t[i]=t[n],t[n]=s}function km(t,i){return t<i?-1:t>i?1:0}class be{constructor(i=9){this._maxEntries=Math.max(4,i),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(i){let n=this.data;const s=[];if(!Zr(i,n))return s;const o=this.toBBox,h=[];for(;n;){for(let f=0;f<n.children.length;f++){const u=n.children[f],c=n.leaf?o(u):u;Zr(i,c)&&(n.leaf?s.push(u):Ya(i,c)?this._all(u,s):h.push(u))}n=h.pop()}return s}collides(i){let n=this.data;if(!Zr(i,n))return!1;const s=[];for(;n;){for(let o=0;o<n.children.length;o++){const h=n.children[o],f=n.leaf?this.toBBox(h):h;if(Zr(i,f)){if(n.leaf||Ya(i,f))return!0;s.push(h)}}n=s.pop()}return!1}load(i){if(!(i&&i.length))return this;if(i.length<this._minEntries){for(let s=0;s<i.length;s++)this.insert(i[s]);return this}let n=this._build(i.slice(),0,i.length-1,0);if(!this.data.children.length)this.data=n;else if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){const s=this.data;this.data=n,n=s}this._insert(n,this.data.height-n.height-1,!0)}return this}insert(i){return i&&this._insert(i,this.data.height-1),this}clear(){return this.data=Wi([]),this}remove(i,n){if(!i)return this;let s=this.data;const o=this.toBBox(i),h=[],f=[];let u,c,g;for(;s||h.length;){if(s||(s=h.pop(),c=h[h.length-1],u=f.pop(),g=!0),s.leaf){const y=Hm(i,s.children,n);if(y!==-1)return s.children.splice(y,1),h.push(s),this._condense(h),this}!g&&!s.leaf&&Ya(s,o)?(h.push(s),f.push(u),u=0,c=s,s=s.children[0]):c?(u++,s=c.children[u],g=!1):s=null}return this}toBBox(i){return i}compareMinX(i,n){return i.minX-n.minX}compareMinY(i,n){return i.minY-n.minY}toJSON(){return this.data}fromJSON(i){return this.data=i,this}_all(i,n){const s=[];for(;i;)i.leaf?n.push(...i.children):s.push(...i.children),i=s.pop();return n}_build(i,n,s,o){const h=s-n+1;let f=this._maxEntries,u;if(h<=f)return u=Wi(i.slice(n,s+1)),Di(u,this.toBBox),u;o||(o=Math.ceil(Math.log(h)/Math.log(f)),f=Math.ceil(h/Math.pow(f,o-1))),u=Wi([]),u.leaf=!1,u.height=o;const c=Math.ceil(h/f),g=c*Math.ceil(Math.sqrt(f));bu(i,n,s,g,this.compareMinX);for(let y=n;y<=s;y+=g){const M=Math.min(y+g-1,s);bu(i,y,M,c,this.compareMinY);for(let v=y;v<=M;v+=c){const E=Math.min(v+c-1,M);u.children.push(this._build(i,v,E,o-1))}}return Di(u,this.toBBox),u}_chooseSubtree(i,n,s,o){for(;o.push(n),!(n.leaf||o.length-1===s);){let h=1/0,f=1/0,u;for(let c=0;c<n.children.length;c++){const g=n.children[c],y=Ha(g),M=Qm(i,g)-y;M<f?(f=M,h=y<h?y:h,u=g):M===f&&y<h&&(h=y,u=g)}n=u||n.children[0]}return n}_insert(i,n,s){const o=s?i:this.toBBox(i),h=[],f=this._chooseSubtree(o,this.data,n,h);for(f.children.push(i),Cn(f,o);n>=0&&h[n].children.length>this._maxEntries;)this._split(h,n),n--;this._adjustParentBBoxes(o,h,n)}_split(i,n){const s=i[n],o=s.children.length,h=this._minEntries;this._chooseSplitAxis(s,h,o);const f=this._chooseSplitIndex(s,h,o),u=Wi(s.children.splice(f,s.children.length-f));u.height=s.height,u.leaf=s.leaf,Di(s,this.toBBox),Di(u,this.toBBox),n?i[n-1].children.push(u):this._splitRoot(s,u)}_splitRoot(i,n){this.data=Wi([i,n]),this.data.height=i.height+1,this.data.leaf=!1,Di(this.data,this.toBBox)}_chooseSplitIndex(i,n,s){let o,h=1/0,f=1/0;for(let u=n;u<=s-n;u++){const c=In(i,0,u,this.toBBox),g=In(i,u,s,this.toBBox),y=Jm(c,g),M=Ha(c)+Ha(g);y<h?(h=y,o=u,f=M<f?M:f):y===h&&M<f&&(f=M,o=u)}return o||s-n}_chooseSplitAxis(i,n,s){const o=i.leaf?this.compareMinX:Ym,h=i.leaf?this.compareMinY:Km,f=this._allDistMargin(i,n,s,o),u=this._allDistMargin(i,n,s,h);f<u&&i.children.sort(o)}_allDistMargin(i,n,s,o){i.children.sort(o);const h=this.toBBox,f=In(i,0,n,h),u=In(i,s-n,s,h);let c=Jr(f)+Jr(u);for(let g=n;g<s-n;g++){const y=i.children[g];Cn(f,i.leaf?h(y):y),c+=Jr(f)}for(let g=s-n-1;g>=n;g--){const y=i.children[g];Cn(u,i.leaf?h(y):y),c+=Jr(u)}return c}_adjustParentBBoxes(i,n,s){for(let o=s;o>=0;o--)Cn(n[o],i)}_condense(i){for(let n=i.length-1,s;n>=0;n--)i[n].children.length===0?n>0?(s=i[n-1].children,s.splice(s.indexOf(i[n]),1)):this.clear():Di(i[n],this.toBBox)}}function Hm(t,i,n){if(!n)return i.indexOf(t);for(let s=0;s<i.length;s++)if(n(t,i[s]))return s;return-1}function Di(t,i){In(t,0,t.children.length,i,t)}function In(t,i,n,s,o){o||(o=Wi(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let h=i;h<n;h++){const f=t.children[h];Cn(o,t.leaf?s(f):f)}return o}function Cn(t,i){return t.minX=Math.min(t.minX,i.minX),t.minY=Math.min(t.minY,i.minY),t.maxX=Math.max(t.maxX,i.maxX),t.maxY=Math.max(t.maxY,i.maxY),t}function Ym(t,i){return t.minX-i.minX}function Km(t,i){return t.minY-i.minY}function Ha(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function Jr(t){return t.maxX-t.minX+(t.maxY-t.minY)}function Qm(t,i){return(Math.max(i.maxX,t.maxX)-Math.min(i.minX,t.minX))*(Math.max(i.maxY,t.maxY)-Math.min(i.minY,t.minY))}function Jm(t,i){const n=Math.max(t.minX,i.minX),s=Math.max(t.minY,i.minY),o=Math.min(t.maxX,i.maxX),h=Math.min(t.maxY,i.maxY);return Math.max(0,o-n)*Math.max(0,h-s)}function Ya(t,i){return t.minX<=i.minX&&t.minY<=i.minY&&i.maxX<=t.maxX&&i.maxY<=t.maxY}function Zr(t,i){return i.minX<=t.maxX&&i.minY<=t.maxY&&i.maxX>=t.minX&&i.maxY>=t.minY}function Wi(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function bu(t,i,n,s,o){const h=[i,n];for(;h.length;){if(n=h.pop(),i=h.pop(),n-i<=s)continue;const f=i+Math.ceil((n-i)/s/2)*s;Xm(t,f,i,n,o),h.push(i,f,f,n)}}function df(t){var i=new be(t);return i.insert=function(n){if(n.type!=="Feature")throw new Error("invalid feature");return n.bbox=n.bbox?n.bbox:di(n),be.prototype.insert.call(this,n)},i.load=function(n){var s=[];return Array.isArray(n)?n.forEach(function(o){if(o.type!=="Feature")throw new Error("invalid features");o.bbox=o.bbox?o.bbox:di(o),s.push(o)}):Qn(n,function(o){if(o.type!=="Feature")throw new Error("invalid features");o.bbox=o.bbox?o.bbox:di(o),s.push(o)}),be.prototype.load.call(this,s)},i.remove=function(n,s){if(n.type!=="Feature")throw new Error("invalid feature");return n.bbox=n.bbox?n.bbox:di(n),be.prototype.remove.call(this,n,s)},i.clear=function(){return be.prototype.clear.call(this)},i.search=function(n){var s=be.prototype.search.call(this,this.toBBox(n));return ce(s)},i.collides=function(n){return be.prototype.collides.call(this,this.toBBox(n))},i.all=function(){var n=be.prototype.all.call(this);return ce(n)},i.toJSON=function(){return be.prototype.toJSON.call(this)},i.fromJSON=function(n){return be.prototype.fromJSON.call(this,n)},i.toBBox=function(n){var s;if(n.bbox)s=n.bbox;else if(Array.isArray(n)&&n.length===4)s=n;else if(Array.isArray(n)&&n.length===6)s=[n[0],n[1],n[3],n[4]];else if(n.type==="Feature")s=di(n);else if(n.type==="FeatureCollection")s=di(n);else throw new Error("invalid geojson");return{minX:s[0],minY:s[1],maxX:s[2],maxY:s[3]}},i}function Zm(t){if(!t)throw new Error("geojson is required");const i=[];return vo(t,n=>{Vm(n,i)}),ce(i)}function Vm(t,i){let n=[];const s=t.geometry;if(s!==null){switch(s.type){case"Polygon":n=Qi(s);break;case"LineString":n=[Qi(s)]}n.forEach(o=>{jm(o,t.properties).forEach(f=>{f.id=i.length,i.push(f)})})}}function jm(t,i){const n=[];return t.reduce((s,o)=>{const h=Wn([s,o],i);return h.bbox=t6(s,o),n.push(h),o}),n}function t6(t,i){const n=t[0],s=t[1],o=i[0],h=i[1],f=n<o?n:o,u=s<h?s:h,c=n>o?n:o,g=s>h?s:h;return[f,u,c,g]}var e6=Object.defineProperty,i6=Object.defineProperties,n6=Object.getOwnPropertyDescriptors,Au=Object.getOwnPropertySymbols,r6=Object.prototype.hasOwnProperty,s6=Object.prototype.propertyIsEnumerable,Gu=(t,i,n)=>i in t?e6(t,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[i]=n,Iu=(t,i)=>{for(var n in i||(i={}))r6.call(i,n)&&Gu(t,n,i[n]);if(Au)for(var n of Au(i))s6.call(i,n)&&Gu(t,n,i[n]);return t},Cu=(t,i)=>i6(t,n6(i));function a6(t,i,n={}){if(!t||!i)throw new Error("lines and pt are required arguments");const s=We(i);let o=Mi([1/0,1/0],{dist:1/0,index:-1,multiFeatureIndex:-1,location:-1}),h=0;return vo(t,function(f,u,c){const g=Qi(f);for(let y=0;y<g.length-1;y++){const M=Mi(g[y]),v=We(M),E=Mi(g[y+1]),x=We(E),b=ss(M,E,n);let A,C;x[0]===s[0]&&x[1]===s[1]?[A,C]=[x,!0]:v[0]===s[0]&&v[1]===s[1]?[A,C]=[v,!1]:[A,C]=u6(v,x,s);const T=Mi(A,{dist:ss(i,A,n),multiFeatureIndex:c,location:h+ss(M,A,n)});T.properties.dist<o.properties.dist&&(o=Cu(Iu({},T),{properties:Cu(Iu({},T.properties),{index:C?y+1:y})})),h+=b}}),o}function gi(t,i){const[n,s,o]=t,[h,f,u]=i;return n*h+s*f+o*u}function Pn(t,i){const[n,s,o]=t,[h,f,u]=i;return[s*u-o*f,o*h-n*u,n*f-s*h]}function o6(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2))}function Nu(t){const i=o6(t);return[t[0]/i,t[1]/i,t[2]/i]}function Ka(t){const i=Hi(t[1]),n=Hi(t[0]);return[Math.cos(i)*Math.cos(n),Math.cos(i)*Math.sin(n),Math.sin(i)]}function h6(t){const[i,n,s]=t,o=Math.min(Math.max(s,-1),1),h=mu(Math.asin(o));return[mu(Math.atan2(n,i)),h]}function u6(t,i,n){const s=Ka(t),o=Ka(i),h=Ka(n),f=Pn(s,o);if(f[0]===0&&f[1]===0&&f[2]===0)return gi(s,o)>0?[[...i],!0]:[[...n],!1];const u=Pn(f,h);if(u[0]===0&&u[1]===0&&u[2]===0)return[[...i],!0];const c=Pn(u,f),g=Nu(c),y=[-g[0],-g[1],-g[2]],M=gi(h,g)>gi(h,y)?g:y,v=Nu(f),E=gi(Pn(s,M),v),x=gi(Pn(M,o),v);return E>=0&&x>=0?[h6(M),!1]:gi(s,h)>gi(o,h)?[[...t],!1]:[[...i],!0]}var Vr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function f6(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function l6(t,i){if(i=i??{},!xm(i))throw new Error("options is invalid");var n=i.precision,s=i.coordinates,o=i.mutate;if(n=n==null||isNaN(n)?6:n,s=s==null||isNaN(s)?3:s,!t)throw new Error("<geojson> is required");if(typeof n!="number")throw new Error("<precision> must be a number");if(typeof s!="number")throw new Error("<coordinates> must be a number");(o===!1||o===void 0)&&(t=JSON.parse(JSON.stringify(t)));var h=Math.pow(10,n);return go(t,function(f){c6(f,h,s)}),t}function c6(t,i,n){t.length>n&&t.splice(n,t.length);for(var s=0;s<t.length;s++)t[s]=Math.round(t[s]*i)/i;return t}function _6(t,i){if(!t)throw new Error("line is required");if(!i)throw new Error("splitter is required");var n=pu(t),s=pu(i);if(n!=="LineString")throw new Error("line must be LineString");if(s==="FeatureCollection")throw new Error("splitter cannot be a FeatureCollection");if(s==="GeometryCollection")throw new Error("splitter cannot be a GeometryCollection");var o=l6(i,{precision:7});switch(s){case"Point":return no(t,o);case"MultiPoint":return Ru(t,o);case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":return Ru(t,zm(t,o,{ignoreSelfIntersections:!0}))}}function Ru(t,i){var n=[],s=df();return vo(i,function(o){if(n.forEach(function(u,c){u.id=c}),!n.length)n=no(t,o).features,s.load(ce(n));else{var h=s.search(o);if(h.features.length){var f=Mf(o,h);n=n.filter(function(u){return u.id!==f.id}),s.remove(f),Qn(no(f,o),function(u){n.push(u),s.insert(u)})}}}),ce(n)}function no(t,i){var n=[],s=Qi(t)[0],o=Qi(t)[t.geometry.coordinates.length-1];if(Qa(s,We(i))||Qa(o,We(i)))return ce([t]);var h=df(),f=Zm(t);h.load(f);var u=h.search(i);if(!u.features.length)return ce([t]);var c=Mf(i,u),g=[s],y=Sm(f,function(M,v,E){var x=Qi(v)[1],b=We(i);return E===c.id?(M.push(b),n.push(Wn(M)),Qa(b,x)?[b]:[b,x]):(M.push(x),M)},g);return y.length>1&&n.push(Wn(y)),ce(n)}function Mf(t,i){if(!i.features.length)throw new Error("lines must contain features");if(i.features.length===1)return i.features[0];var n,s=1/0;return Qn(i,function(o){var h=a6(o,t),f=h.properties.dist;f<s&&(n=o,s=f)}),n}function Qa(t,i){return t[0]===i[0]&&t[1]===i[1]}var Nn={exports:{}};var g6=Nn.exports,Lu;function v6(){return Lu||(Lu=1,function(t,i){(function(){var n,s="4.17.21",o=200,h="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",f="Expected a function",u="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",g=500,y="__lodash_placeholder__",M=1,v=2,E=4,x=1,b=2,A=1,C=2,T=4,F=8,W=16,$=32,X=64,K=128,j=256,rt=512,Mt=30,lt="...",xt=800,bt=16,Ie=1,ms=2,ys=3,Ce=1/0,Xe=9007199254740991,xf=17976931348623157e292,Zn=NaN,Ee=4294967295,Sf=Ee-1,Pf=Ee>>>1,bf=[["ary",K],["bind",A],["bindKey",C],["curry",F],["curryRight",W],["flip",rt],["partial",$],["partialRight",X],["rearg",j]],Ei="[object Arguments]",Vn="[object Array]",Af="[object AsyncFunction]",tn="[object Boolean]",en="[object Date]",Gf="[object DOMException]",jn="[object Error]",tr="[object Function]",po="[object GeneratorFunction]",_e="[object Map]",nn="[object Number]",If="[object Null]",Ne="[object Object]",wo="[object Promise]",Cf="[object Proxy]",rn="[object RegExp]",ge="[object Set]",sn="[object String]",er="[object Symbol]",Nf="[object Undefined]",an="[object WeakMap]",Rf="[object WeakSet]",on="[object ArrayBuffer]",xi="[object DataView]",ps="[object Float32Array]",ws="[object Float64Array]",Es="[object Int8Array]",xs="[object Int16Array]",Ss="[object Int32Array]",Ps="[object Uint8Array]",bs="[object Uint8ClampedArray]",As="[object Uint16Array]",Gs="[object Uint32Array]",Lf=/\b__p \+= '';/g,Of=/\b(__p \+=) '' \+/g,Tf=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Eo=/&(?:amp|lt|gt|quot|#39);/g,xo=/[&<>"']/g,Bf=RegExp(Eo.source),Ff=RegExp(xo.source),qf=/<%-([\s\S]+?)%>/g,Df=/<%([\s\S]+?)%>/g,So=/<%=([\s\S]+?)%>/g,Uf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wf=/^\w*$/,$f=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Is=/[\\^$.*+?()[\]{}|]/g,zf=RegExp(Is.source),Cs=/^\s+/,Xf=/\s/,kf=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Hf=/\{\n\/\* \[wrapped with (.+)\] \*/,Yf=/,? & /,Kf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Qf=/[()=,{}\[\]\/\s]/,Jf=/\\(\\)?/g,Zf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Po=/\w*$/,Vf=/^[-+]0x[0-9a-f]+$/i,jf=/^0b[01]+$/i,tl=/^\[object .+?Constructor\]$/,el=/^0o[0-7]+$/i,il=/^(?:0|[1-9]\d*)$/,nl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ir=/($^)/,rl=/['\n\r\u2028\u2029\\]/g,nr="\\ud800-\\udfff",sl="\\u0300-\\u036f",al="\\ufe20-\\ufe2f",ol="\\u20d0-\\u20ff",bo=sl+al+ol,Ao="\\u2700-\\u27bf",Go="a-z\\xdf-\\xf6\\xf8-\\xff",hl="\\xac\\xb1\\xd7\\xf7",ul="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",fl="\\u2000-\\u206f",ll=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Io="A-Z\\xc0-\\xd6\\xd8-\\xde",Co="\\ufe0e\\ufe0f",No=hl+ul+fl+ll,Ns="['’]",cl="["+nr+"]",Ro="["+No+"]",rr="["+bo+"]",Lo="\\d+",_l="["+Ao+"]",Oo="["+Go+"]",To="[^"+nr+No+Lo+Ao+Go+Io+"]",Rs="\\ud83c[\\udffb-\\udfff]",gl="(?:"+rr+"|"+Rs+")",Bo="[^"+nr+"]",Ls="(?:\\ud83c[\\udde6-\\uddff]){2}",Os="[\\ud800-\\udbff][\\udc00-\\udfff]",Si="["+Io+"]",Fo="\\u200d",qo="(?:"+Oo+"|"+To+")",vl="(?:"+Si+"|"+To+")",Do="(?:"+Ns+"(?:d|ll|m|re|s|t|ve))?",Uo="(?:"+Ns+"(?:D|LL|M|RE|S|T|VE))?",Wo=gl+"?",$o="["+Co+"]?",dl="(?:"+Fo+"(?:"+[Bo,Ls,Os].join("|")+")"+$o+Wo+")*",Ml="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ml="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",zo=$o+Wo+dl,yl="(?:"+[_l,Ls,Os].join("|")+")"+zo,pl="(?:"+[Bo+rr+"?",rr,Ls,Os,cl].join("|")+")",wl=RegExp(Ns,"g"),El=RegExp(rr,"g"),Ts=RegExp(Rs+"(?="+Rs+")|"+pl+zo,"g"),xl=RegExp([Si+"?"+Oo+"+"+Do+"(?="+[Ro,Si,"$"].join("|")+")",vl+"+"+Uo+"(?="+[Ro,Si+qo,"$"].join("|")+")",Si+"?"+qo+"+"+Do,Si+"+"+Uo,ml,Ml,Lo,yl].join("|"),"g"),Sl=RegExp("["+Fo+nr+bo+Co+"]"),Pl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,bl=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Al=-1,_t={};_t[ps]=_t[ws]=_t[Es]=_t[xs]=_t[Ss]=_t[Ps]=_t[bs]=_t[As]=_t[Gs]=!0,_t[Ei]=_t[Vn]=_t[on]=_t[tn]=_t[xi]=_t[en]=_t[jn]=_t[tr]=_t[_e]=_t[nn]=_t[Ne]=_t[rn]=_t[ge]=_t[sn]=_t[an]=!1;var ct={};ct[Ei]=ct[Vn]=ct[on]=ct[xi]=ct[tn]=ct[en]=ct[ps]=ct[ws]=ct[Es]=ct[xs]=ct[Ss]=ct[_e]=ct[nn]=ct[Ne]=ct[rn]=ct[ge]=ct[sn]=ct[er]=ct[Ps]=ct[bs]=ct[As]=ct[Gs]=!0,ct[jn]=ct[tr]=ct[an]=!1;var Gl={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Il={"&":"&","<":"<",">":">",'"':""","'":"'"},Cl={"&":"&","<":"<",">":">",""":'"',"'":"'"},Nl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Rl=parseFloat,Ll=parseInt,Xo=typeof Vr=="object"&&Vr&&Vr.Object===Object&&Vr,Ol=typeof self=="object"&&self&&self.Object===Object&&self,Gt=Xo||Ol||Function("return this")(),Bs=i&&!i.nodeType&&i,si=Bs&&!0&&t&&!t.nodeType&&t,ko=si&&si.exports===Bs,Fs=ko&&Xo.process,ee=function(){try{var S=si&&si.require&&si.require("util").types;return S||Fs&&Fs.binding&&Fs.binding("util")}catch{}}(),Ho=ee&&ee.isArrayBuffer,Yo=ee&&ee.isDate,Ko=ee&&ee.isMap,Qo=ee&&ee.isRegExp,Jo=ee&&ee.isSet,Zo=ee&&ee.isTypedArray;function Qt(S,I,G){switch(G.length){case 0:return S.call(I);case 1:return S.call(I,G[0]);case 2:return S.call(I,G[0],G[1]);case 3:return S.call(I,G[0],G[1],G[2])}return S.apply(I,G)}function Tl(S,I,G,U){for(var Q=-1,st=S==null?0:S.length;++Q<st;){var St=S[Q];I(U,St,G(St),S)}return U}function ie(S,I){for(var G=-1,U=S==null?0:S.length;++G<U&&I(S[G],G,S)!==!1;);return S}function Bl(S,I){for(var G=S==null?0:S.length;G--&&I(S[G],G,S)!==!1;);return S}function Vo(S,I){for(var G=-1,U=S==null?0:S.length;++G<U;)if(!I(S[G],G,S))return!1;return!0}function ke(S,I){for(var G=-1,U=S==null?0:S.length,Q=0,st=[];++G<U;){var St=S[G];I(St,G,S)&&(st[Q++]=St)}return st}function sr(S,I){var G=S==null?0:S.length;return!!G&&Pi(S,I,0)>-1}function qs(S,I,G){for(var U=-1,Q=S==null?0:S.length;++U<Q;)if(G(I,S[U]))return!0;return!1}function gt(S,I){for(var G=-1,U=S==null?0:S.length,Q=Array(U);++G<U;)Q[G]=I(S[G],G,S);return Q}function He(S,I){for(var G=-1,U=I.length,Q=S.length;++G<U;)S[Q+G]=I[G];return S}function Ds(S,I,G,U){var Q=-1,st=S==null?0:S.length;for(U&&st&&(G=S[++Q]);++Q<st;)G=I(G,S[Q],Q,S);return G}function Fl(S,I,G,U){var Q=S==null?0:S.length;for(U&&Q&&(G=S[--Q]);Q--;)G=I(G,S[Q],Q,S);return G}function Us(S,I){for(var G=-1,U=S==null?0:S.length;++G<U;)if(I(S[G],G,S))return!0;return!1}var ql=Ws("length");function Dl(S){return S.split("")}function Ul(S){return S.match(Kf)||[]}function jo(S,I,G){var U;return G(S,function(Q,st,St){if(I(Q,st,St))return U=st,!1}),U}function ar(S,I,G,U){for(var Q=S.length,st=G+(U?1:-1);U?st--:++st<Q;)if(I(S[st],st,S))return st;return-1}function Pi(S,I,G){return I===I?Vl(S,I,G):ar(S,th,G)}function Wl(S,I,G,U){for(var Q=G-1,st=S.length;++Q<st;)if(U(S[Q],I))return Q;return-1}function th(S){return S!==S}function eh(S,I){var G=S==null?0:S.length;return G?zs(S,I)/G:Zn}function Ws(S){return function(I){return I==null?n:I[S]}}function $s(S){return function(I){return S==null?n:S[I]}}function ih(S,I,G,U,Q){return Q(S,function(st,St,ft){G=U?(U=!1,st):I(G,st,St,ft)}),G}function $l(S,I){var G=S.length;for(S.sort(I);G--;)S[G]=S[G].value;return S}function zs(S,I){for(var G,U=-1,Q=S.length;++U<Q;){var st=I(S[U]);st!==n&&(G=G===n?st:G+st)}return G}function Xs(S,I){for(var G=-1,U=Array(S);++G<S;)U[G]=I(G);return U}function zl(S,I){return gt(I,function(G){return[G,S[G]]})}function nh(S){return S&&S.slice(0,oh(S)+1).replace(Cs,"")}function Jt(S){return function(I){return S(I)}}function ks(S,I){return gt(I,function(G){return S[G]})}function hn(S,I){return S.has(I)}function rh(S,I){for(var G=-1,U=S.length;++G<U&&Pi(I,S[G],0)>-1;);return G}function sh(S,I){for(var G=S.length;G--&&Pi(I,S[G],0)>-1;);return G}function Xl(S,I){for(var G=S.length,U=0;G--;)S[G]===I&&++U;return U}var kl=$s(Gl),Hl=$s(Il);function Yl(S){return"\\"+Nl[S]}function Kl(S,I){return S==null?n:S[I]}function bi(S){return Sl.test(S)}function Ql(S){return Pl.test(S)}function Jl(S){for(var I,G=[];!(I=S.next()).done;)G.push(I.value);return G}function Hs(S){var I=-1,G=Array(S.size);return S.forEach(function(U,Q){G[++I]=[Q,U]}),G}function ah(S,I){return function(G){return S(I(G))}}function Ye(S,I){for(var G=-1,U=S.length,Q=0,st=[];++G<U;){var St=S[G];(St===I||St===y)&&(S[G]=y,st[Q++]=G)}return st}function or(S){var I=-1,G=Array(S.size);return S.forEach(function(U){G[++I]=U}),G}function Zl(S){var I=-1,G=Array(S.size);return S.forEach(function(U){G[++I]=[U,U]}),G}function Vl(S,I,G){for(var U=G-1,Q=S.length;++U<Q;)if(S[U]===I)return U;return-1}function jl(S,I,G){for(var U=G+1;U--;)if(S[U]===I)return U;return U}function Ai(S){return bi(S)?e1(S):ql(S)}function ve(S){return bi(S)?i1(S):Dl(S)}function oh(S){for(var I=S.length;I--&&Xf.test(S.charAt(I)););return I}var t1=$s(Cl);function e1(S){for(var I=Ts.lastIndex=0;Ts.test(S);)++I;return I}function i1(S){return S.match(Ts)||[]}function n1(S){return S.match(xl)||[]}var r1=function S(I){I=I==null?Gt:Gi.defaults(Gt.Object(),I,Gi.pick(Gt,bl));var G=I.Array,U=I.Date,Q=I.Error,st=I.Function,St=I.Math,ft=I.Object,Ys=I.RegExp,s1=I.String,ne=I.TypeError,hr=G.prototype,a1=st.prototype,Ii=ft.prototype,ur=I["__core-js_shared__"],fr=a1.toString,ut=Ii.hasOwnProperty,o1=0,hh=function(){var e=/[^.]+$/.exec(ur&&ur.keys&&ur.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),lr=Ii.toString,h1=fr.call(ft),u1=Gt._,f1=Ys("^"+fr.call(ut).replace(Is,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),cr=ko?I.Buffer:n,Ke=I.Symbol,_r=I.Uint8Array,uh=cr?cr.allocUnsafe:n,gr=ah(ft.getPrototypeOf,ft),fh=ft.create,lh=Ii.propertyIsEnumerable,vr=hr.splice,ch=Ke?Ke.isConcatSpreadable:n,un=Ke?Ke.iterator:n,ai=Ke?Ke.toStringTag:n,dr=function(){try{var e=li(ft,"defineProperty");return e({},"",{}),e}catch{}}(),l1=I.clearTimeout!==Gt.clearTimeout&&I.clearTimeout,c1=U&&U.now!==Gt.Date.now&&U.now,_1=I.setTimeout!==Gt.setTimeout&&I.setTimeout,Mr=St.ceil,mr=St.floor,Ks=ft.getOwnPropertySymbols,g1=cr?cr.isBuffer:n,_h=I.isFinite,v1=hr.join,d1=ah(ft.keys,ft),Pt=St.max,Nt=St.min,M1=U.now,m1=I.parseInt,gh=St.random,y1=hr.reverse,Qs=li(I,"DataView"),fn=li(I,"Map"),Js=li(I,"Promise"),Ci=li(I,"Set"),ln=li(I,"WeakMap"),cn=li(ft,"create"),yr=ln&&new ln,Ni={},p1=ci(Qs),w1=ci(fn),E1=ci(Js),x1=ci(Ci),S1=ci(ln),pr=Ke?Ke.prototype:n,_n=pr?pr.valueOf:n,vh=pr?pr.toString:n;function d(e){if(mt(e)&&!J(e)&&!(e instanceof it)){if(e instanceof re)return e;if(ut.call(e,"__wrapped__"))return d0(e)}return new re(e)}var Ri=function(){function e(){}return function(r){if(!vt(r))return{};if(fh)return fh(r);e.prototype=r;var a=new e;return e.prototype=n,a}}();function wr(){}function re(e,r){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!r,this.__index__=0,this.__values__=n}d.templateSettings={escape:qf,evaluate:Df,interpolate:So,variable:"",imports:{_:d}},d.prototype=wr.prototype,d.prototype.constructor=d,re.prototype=Ri(wr.prototype),re.prototype.constructor=re;function it(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ee,this.__views__=[]}function P1(){var e=new it(this.__wrapped__);return e.__actions__=Wt(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Wt(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Wt(this.__views__),e}function b1(){if(this.__filtered__){var e=new it(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function A1(){var e=this.__wrapped__.value(),r=this.__dir__,a=J(e),l=r<0,_=a?e.length:0,m=Dc(0,_,this.__views__),p=m.start,w=m.end,P=w-p,N=l?w:p-1,R=this.__iteratees__,L=R.length,D=0,z=Nt(P,this.__takeCount__);if(!a||!l&&_==P&&z==P)return Dh(e,this.__actions__);var H=[];t:for(;P--&&D<z;){N+=r;for(var V=-1,Y=e[N];++V<L;){var et=R[V],nt=et.iteratee,jt=et.type,Ft=nt(Y);if(jt==ms)Y=Ft;else if(!Ft){if(jt==Ie)continue t;break t}}H[D++]=Y}return H}it.prototype=Ri(wr.prototype),it.prototype.constructor=it;function oi(e){var r=-1,a=e==null?0:e.length;for(this.clear();++r<a;){var l=e[r];this.set(l[0],l[1])}}function G1(){this.__data__=cn?cn(null):{},this.size=0}function I1(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}function C1(e){var r=this.__data__;if(cn){var a=r[e];return a===c?n:a}return ut.call(r,e)?r[e]:n}function N1(e){var r=this.__data__;return cn?r[e]!==n:ut.call(r,e)}function R1(e,r){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=cn&&r===n?c:r,this}oi.prototype.clear=G1,oi.prototype.delete=I1,oi.prototype.get=C1,oi.prototype.has=N1,oi.prototype.set=R1;function Re(e){var r=-1,a=e==null?0:e.length;for(this.clear();++r<a;){var l=e[r];this.set(l[0],l[1])}}function L1(){this.__data__=[],this.size=0}function O1(e){var r=this.__data__,a=Er(r,e);if(a<0)return!1;var l=r.length-1;return a==l?r.pop():vr.call(r,a,1),--this.size,!0}function T1(e){var r=this.__data__,a=Er(r,e);return a<0?n:r[a][1]}function B1(e){return Er(this.__data__,e)>-1}function F1(e,r){var a=this.__data__,l=Er(a,e);return l<0?(++this.size,a.push([e,r])):a[l][1]=r,this}Re.prototype.clear=L1,Re.prototype.delete=O1,Re.prototype.get=T1,Re.prototype.has=B1,Re.prototype.set=F1;function Le(e){var r=-1,a=e==null?0:e.length;for(this.clear();++r<a;){var l=e[r];this.set(l[0],l[1])}}function q1(){this.size=0,this.__data__={hash:new oi,map:new(fn||Re),string:new oi}}function D1(e){var r=Or(this,e).delete(e);return this.size-=r?1:0,r}function U1(e){return Or(this,e).get(e)}function W1(e){return Or(this,e).has(e)}function $1(e,r){var a=Or(this,e),l=a.size;return a.set(e,r),this.size+=a.size==l?0:1,this}Le.prototype.clear=q1,Le.prototype.delete=D1,Le.prototype.get=U1,Le.prototype.has=W1,Le.prototype.set=$1;function hi(e){var r=-1,a=e==null?0:e.length;for(this.__data__=new Le;++r<a;)this.add(e[r])}function z1(e){return this.__data__.set(e,c),this}function X1(e){return this.__data__.has(e)}hi.prototype.add=hi.prototype.push=z1,hi.prototype.has=X1;function de(e){var r=this.__data__=new Re(e);this.size=r.size}function k1(){this.__data__=new Re,this.size=0}function H1(e){var r=this.__data__,a=r.delete(e);return this.size=r.size,a}function Y1(e){return this.__data__.get(e)}function K1(e){return this.__data__.has(e)}function Q1(e,r){var a=this.__data__;if(a instanceof Re){var l=a.__data__;if(!fn||l.length<o-1)return l.push([e,r]),this.size=++a.size,this;a=this.__data__=new Le(l)}return a.set(e,r),this.size=a.size,this}de.prototype.clear=k1,de.prototype.delete=H1,de.prototype.get=Y1,de.prototype.has=K1,de.prototype.set=Q1;function dh(e,r){var a=J(e),l=!a&&_i(e),_=!a&&!l&&je(e),m=!a&&!l&&!_&&Bi(e),p=a||l||_||m,w=p?Xs(e.length,s1):[],P=w.length;for(var N in e)(r||ut.call(e,N))&&!(p&&(N=="length"||_&&(N=="offset"||N=="parent")||m&&(N=="buffer"||N=="byteLength"||N=="byteOffset")||Fe(N,P)))&&w.push(N);return w}function Mh(e){var r=e.length;return r?e[oa(0,r-1)]:n}function J1(e,r){return Tr(Wt(e),ui(r,0,e.length))}function Z1(e){return Tr(Wt(e))}function Zs(e,r,a){(a!==n&&!Me(e[r],a)||a===n&&!(r in e))&&Oe(e,r,a)}function gn(e,r,a){var l=e[r];(!(ut.call(e,r)&&Me(l,a))||a===n&&!(r in e))&&Oe(e,r,a)}function Er(e,r){for(var a=e.length;a--;)if(Me(e[a][0],r))return a;return-1}function V1(e,r,a,l){return Qe(e,function(_,m,p){r(l,_,a(_),p)}),l}function mh(e,r){return e&&Se(r,At(r),e)}function j1(e,r){return e&&Se(r,zt(r),e)}function Oe(e,r,a){r=="__proto__"&&dr?dr(e,r,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[r]=a}function Vs(e,r){for(var a=-1,l=r.length,_=G(l),m=e==null;++a<l;)_[a]=m?n:Ra(e,r[a]);return _}function ui(e,r,a){return e===e&&(a!==n&&(e=e<=a?e:a),r!==n&&(e=e>=r?e:r)),e}function se(e,r,a,l,_,m){var p,w=r&M,P=r&v,N=r&E;if(a&&(p=_?a(e,l,_,m):a(e)),p!==n)return p;if(!vt(e))return e;var R=J(e);if(R){if(p=Wc(e),!w)return Wt(e,p)}else{var L=Rt(e),D=L==tr||L==po;if(je(e))return $h(e,w);if(L==Ne||L==Ei||D&&!_){if(p=P||D?{}:o0(e),!w)return P?Cc(e,j1(p,e)):Ic(e,mh(p,e))}else{if(!ct[L])return _?e:{};p=$c(e,L,w)}}m||(m=new de);var z=m.get(e);if(z)return z;m.set(e,p),B0(e)?e.forEach(function(Y){p.add(se(Y,r,a,Y,e,m))}):O0(e)&&e.forEach(function(Y,et){p.set(et,se(Y,r,a,et,e,m))});var H=N?P?ma:Ma:P?zt:At,V=R?n:H(e);return ie(V||e,function(Y,et){V&&(et=Y,Y=e[et]),gn(p,et,se(Y,r,a,et,e,m))}),p}function tc(e){var r=At(e);return function(a){return yh(a,e,r)}}function yh(e,r,a){var l=a.length;if(e==null)return!l;for(e=ft(e);l--;){var _=a[l],m=r[_],p=e[_];if(p===n&&!(_ in e)||!m(p))return!1}return!0}function ph(e,r,a){if(typeof e!="function")throw new ne(f);return wn(function(){e.apply(n,a)},r)}function vn(e,r,a,l){var _=-1,m=sr,p=!0,w=e.length,P=[],N=r.length;if(!w)return P;a&&(r=gt(r,Jt(a))),l?(m=qs,p=!1):r.length>=o&&(m=hn,p=!1,r=new hi(r));t:for(;++_<w;){var R=e[_],L=a==null?R:a(R);if(R=l||R!==0?R:0,p&&L===L){for(var D=N;D--;)if(r[D]===L)continue t;P.push(R)}else m(r,L,l)||P.push(R)}return P}var Qe=Yh(xe),wh=Yh(ta,!0);function ec(e,r){var a=!0;return Qe(e,function(l,_,m){return a=!!r(l,_,m),a}),a}function xr(e,r,a){for(var l=-1,_=e.length;++l<_;){var m=e[l],p=r(m);if(p!=null&&(w===n?p===p&&!Vt(p):a(p,w)))var w=p,P=m}return P}function ic(e,r,a,l){var _=e.length;for(a=Z(a),a<0&&(a=-a>_?0:_+a),l=l===n||l>_?_:Z(l),l<0&&(l+=_),l=a>l?0:q0(l);a<l;)e[a++]=r;return e}function Eh(e,r){var a=[];return Qe(e,function(l,_,m){r(l,_,m)&&a.push(l)}),a}function It(e,r,a,l,_){var m=-1,p=e.length;for(a||(a=Xc),_||(_=[]);++m<p;){var w=e[m];r>0&&a(w)?r>1?It(w,r-1,a,l,_):He(_,w):l||(_[_.length]=w)}return _}var js=Kh(),xh=Kh(!0);function xe(e,r){return e&&js(e,r,At)}function ta(e,r){return e&&xh(e,r,At)}function Sr(e,r){return ke(r,function(a){return qe(e[a])})}function fi(e,r){r=Ze(r,e);for(var a=0,l=r.length;e!=null&&a<l;)e=e[Pe(r[a++])];return a&&a==l?e:n}function Sh(e,r,a){var l=r(e);return J(e)?l:He(l,a(e))}function Tt(e){return e==null?e===n?Nf:If:ai&&ai in ft(e)?qc(e):Zc(e)}function ea(e,r){return e>r}function nc(e,r){return e!=null&&ut.call(e,r)}function rc(e,r){return e!=null&&r in ft(e)}function sc(e,r,a){return e>=Nt(r,a)&&e<Pt(r,a)}function ia(e,r,a){for(var l=a?qs:sr,_=e[0].length,m=e.length,p=m,w=G(m),P=1/0,N=[];p--;){var R=e[p];p&&r&&(R=gt(R,Jt(r))),P=Nt(R.length,P),w[p]=!a&&(r||_>=120&&R.length>=120)?new hi(p&&R):n}R=e[0];var L=-1,D=w[0];t:for(;++L<_&&N.length<P;){var z=R[L],H=r?r(z):z;if(z=a||z!==0?z:0,!(D?hn(D,H):l(N,H,a))){for(p=m;--p;){var V=w[p];if(!(V?hn(V,H):l(e[p],H,a)))continue t}D&&D.push(H),N.push(z)}}return N}function ac(e,r,a,l){return xe(e,function(_,m,p){r(l,a(_),m,p)}),l}function dn(e,r,a){r=Ze(r,e),e=l0(e,r);var l=e==null?e:e[Pe(oe(r))];return l==null?n:Qt(l,e,a)}function Ph(e){return mt(e)&&Tt(e)==Ei}function oc(e){return mt(e)&&Tt(e)==on}function hc(e){return mt(e)&&Tt(e)==en}function Mn(e,r,a,l,_){return e===r?!0:e==null||r==null||!mt(e)&&!mt(r)?e!==e&&r!==r:uc(e,r,a,l,Mn,_)}function uc(e,r,a,l,_,m){var p=J(e),w=J(r),P=p?Vn:Rt(e),N=w?Vn:Rt(r);P=P==Ei?Ne:P,N=N==Ei?Ne:N;var R=P==Ne,L=N==Ne,D=P==N;if(D&&je(e)){if(!je(r))return!1;p=!0,R=!1}if(D&&!R)return m||(m=new de),p||Bi(e)?r0(e,r,a,l,_,m):Bc(e,r,P,a,l,_,m);if(!(a&x)){var z=R&&ut.call(e,"__wrapped__"),H=L&&ut.call(r,"__wrapped__");if(z||H){var V=z?e.value():e,Y=H?r.value():r;return m||(m=new de),_(V,Y,a,l,m)}}return D?(m||(m=new de),Fc(e,r,a,l,_,m)):!1}function fc(e){return mt(e)&&Rt(e)==_e}function na(e,r,a,l){var _=a.length,m=_,p=!l;if(e==null)return!m;for(e=ft(e);_--;){var w=a[_];if(p&&w[2]?w[1]!==e[w[0]]:!(w[0]in e))return!1}for(;++_<m;){w=a[_];var P=w[0],N=e[P],R=w[1];if(p&&w[2]){if(N===n&&!(P in e))return!1}else{var L=new de;if(l)var D=l(N,R,P,e,r,L);if(!(D===n?Mn(R,N,x|b,l,L):D))return!1}}return!0}function bh(e){if(!vt(e)||Hc(e))return!1;var r=qe(e)?f1:tl;return r.test(ci(e))}function lc(e){return mt(e)&&Tt(e)==rn}function cc(e){return mt(e)&&Rt(e)==ge}function _c(e){return mt(e)&&Wr(e.length)&&!!_t[Tt(e)]}function Ah(e){return typeof e=="function"?e:e==null?Xt:typeof e=="object"?J(e)?Ch(e[0],e[1]):Ih(e):Q0(e)}function ra(e){if(!pn(e))return d1(e);var r=[];for(var a in ft(e))ut.call(e,a)&&a!="constructor"&&r.push(a);return r}function gc(e){if(!vt(e))return Jc(e);var r=pn(e),a=[];for(var l in e)l=="constructor"&&(r||!ut.call(e,l))||a.push(l);return a}function sa(e,r){return e<r}function Gh(e,r){var a=-1,l=$t(e)?G(e.length):[];return Qe(e,function(_,m,p){l[++a]=r(_,m,p)}),l}function Ih(e){var r=pa(e);return r.length==1&&r[0][2]?u0(r[0][0],r[0][1]):function(a){return a===e||na(a,e,r)}}function Ch(e,r){return Ea(e)&&h0(r)?u0(Pe(e),r):function(a){var l=Ra(a,e);return l===n&&l===r?La(a,e):Mn(r,l,x|b)}}function Pr(e,r,a,l,_){e!==r&&js(r,function(m,p){if(_||(_=new de),vt(m))vc(e,r,p,a,Pr,l,_);else{var w=l?l(Sa(e,p),m,p+"",e,r,_):n;w===n&&(w=m),Zs(e,p,w)}},zt)}function vc(e,r,a,l,_,m,p){var w=Sa(e,a),P=Sa(r,a),N=p.get(P);if(N){Zs(e,a,N);return}var R=m?m(w,P,a+"",e,r,p):n,L=R===n;if(L){var D=J(P),z=!D&&je(P),H=!D&&!z&&Bi(P);R=P,D||z||H?J(w)?R=w:pt(w)?R=Wt(w):z?(L=!1,R=$h(P,!0)):H?(L=!1,R=zh(P,!0)):R=[]:En(P)||_i(P)?(R=w,_i(w)?R=D0(w):(!vt(w)||qe(w))&&(R=o0(P))):L=!1}L&&(p.set(P,R),_(R,P,l,m,p),p.delete(P)),Zs(e,a,R)}function Nh(e,r){var a=e.length;if(a)return r+=r<0?a:0,Fe(r,a)?e[r]:n}function Rh(e,r,a){r.length?r=gt(r,function(m){return J(m)?function(p){return fi(p,m.length===1?m[0]:m)}:m}):r=[Xt];var l=-1;r=gt(r,Jt(k()));var _=Gh(e,function(m,p,w){var P=gt(r,function(N){return N(m)});return{criteria:P,index:++l,value:m}});return $l(_,function(m,p){return Gc(m,p,a)})}function dc(e,r){return Lh(e,r,function(a,l){return La(e,l)})}function Lh(e,r,a){for(var l=-1,_=r.length,m={};++l<_;){var p=r[l],w=fi(e,p);a(w,p)&&mn(m,Ze(p,e),w)}return m}function Mc(e){return function(r){return fi(r,e)}}function aa(e,r,a,l){var _=l?Wl:Pi,m=-1,p=r.length,w=e;for(e===r&&(r=Wt(r)),a&&(w=gt(e,Jt(a)));++m<p;)for(var P=0,N=r[m],R=a?a(N):N;(P=_(w,R,P,l))>-1;)w!==e&&vr.call(w,P,1),vr.call(e,P,1);return e}function Oh(e,r){for(var a=e?r.length:0,l=a-1;a--;){var _=r[a];if(a==l||_!==m){var m=_;Fe(_)?vr.call(e,_,1):fa(e,_)}}return e}function oa(e,r){return e+mr(gh()*(r-e+1))}function mc(e,r,a,l){for(var _=-1,m=Pt(Mr((r-e)/(a||1)),0),p=G(m);m--;)p[l?m:++_]=e,e+=a;return p}function ha(e,r){var a="";if(!e||r<1||r>Xe)return a;do r%2&&(a+=e),r=mr(r/2),r&&(e+=e);while(r);return a}function tt(e,r){return Pa(f0(e,r,Xt),e+"")}function yc(e){return Mh(Fi(e))}function pc(e,r){var a=Fi(e);return Tr(a,ui(r,0,a.length))}function mn(e,r,a,l){if(!vt(e))return e;r=Ze(r,e);for(var _=-1,m=r.length,p=m-1,w=e;w!=null&&++_<m;){var P=Pe(r[_]),N=a;if(P==="__proto__"||P==="constructor"||P==="prototype")return e;if(_!=p){var R=w[P];N=l?l(R,P,w):n,N===n&&(N=vt(R)?R:Fe(r[_+1])?[]:{})}gn(w,P,N),w=w[P]}return e}var Th=yr?function(e,r){return yr.set(e,r),e}:Xt,wc=dr?function(e,r){return dr(e,"toString",{configurable:!0,enumerable:!1,value:Ta(r),writable:!0})}:Xt;function Ec(e){return Tr(Fi(e))}function ae(e,r,a){var l=-1,_=e.length;r<0&&(r=-r>_?0:_+r),a=a>_?_:a,a<0&&(a+=_),_=r>a?0:a-r>>>0,r>>>=0;for(var m=G(_);++l<_;)m[l]=e[l+r];return m}function xc(e,r){var a;return Qe(e,function(l,_,m){return a=r(l,_,m),!a}),!!a}function br(e,r,a){var l=0,_=e==null?l:e.length;if(typeof r=="number"&&r===r&&_<=Pf){for(;l<_;){var m=l+_>>>1,p=e[m];p!==null&&!Vt(p)&&(a?p<=r:p<r)?l=m+1:_=m}return _}return ua(e,r,Xt,a)}function ua(e,r,a,l){var _=0,m=e==null?0:e.length;if(m===0)return 0;r=a(r);for(var p=r!==r,w=r===null,P=Vt(r),N=r===n;_<m;){var R=mr((_+m)/2),L=a(e[R]),D=L!==n,z=L===null,H=L===L,V=Vt(L);if(p)var Y=l||H;else N?Y=H&&(l||D):w?Y=H&&D&&(l||!z):P?Y=H&&D&&!z&&(l||!V):z||V?Y=!1:Y=l?L<=r:L<r;Y?_=R+1:m=R}return Nt(m,Sf)}function Bh(e,r){for(var a=-1,l=e.length,_=0,m=[];++a<l;){var p=e[a],w=r?r(p):p;if(!a||!Me(w,P)){var P=w;m[_++]=p===0?0:p}}return m}function Fh(e){return typeof e=="number"?e:Vt(e)?Zn:+e}function Zt(e){if(typeof e=="string")return e;if(J(e))return gt(e,Zt)+"";if(Vt(e))return vh?vh.call(e):"";var r=e+"";return r=="0"&&1/e==-Ce?"-0":r}function Je(e,r,a){var l=-1,_=sr,m=e.length,p=!0,w=[],P=w;if(a)p=!1,_=qs;else if(m>=o){var N=r?null:Oc(e);if(N)return or(N);p=!1,_=hn,P=new hi}else P=r?[]:w;t:for(;++l<m;){var R=e[l],L=r?r(R):R;if(R=a||R!==0?R:0,p&&L===L){for(var D=P.length;D--;)if(P[D]===L)continue t;r&&P.push(L),w.push(R)}else _(P,L,a)||(P!==w&&P.push(L),w.push(R))}return w}function fa(e,r){return r=Ze(r,e),e=l0(e,r),e==null||delete e[Pe(oe(r))]}function qh(e,r,a,l){return mn(e,r,a(fi(e,r)),l)}function Ar(e,r,a,l){for(var _=e.length,m=l?_:-1;(l?m--:++m<_)&&r(e[m],m,e););return a?ae(e,l?0:m,l?m+1:_):ae(e,l?m+1:0,l?_:m)}function Dh(e,r){var a=e;return a instanceof it&&(a=a.value()),Ds(r,function(l,_){return _.func.apply(_.thisArg,He([l],_.args))},a)}function la(e,r,a){var l=e.length;if(l<2)return l?Je(e[0]):[];for(var _=-1,m=G(l);++_<l;)for(var p=e[_],w=-1;++w<l;)w!=_&&(m[_]=vn(m[_]||p,e[w],r,a));return Je(It(m,1),r,a)}function Uh(e,r,a){for(var l=-1,_=e.length,m=r.length,p={};++l<_;){var w=l<m?r[l]:n;a(p,e[l],w)}return p}function ca(e){return pt(e)?e:[]}function _a(e){return typeof e=="function"?e:Xt}function Ze(e,r){return J(e)?e:Ea(e,r)?[e]:v0(at(e))}var Sc=tt;function Ve(e,r,a){var l=e.length;return a=a===n?l:a,!r&&a>=l?e:ae(e,r,a)}var Wh=l1||function(e){return Gt.clearTimeout(e)};function $h(e,r){if(r)return e.slice();var a=e.length,l=uh?uh(a):new e.constructor(a);return e.copy(l),l}function ga(e){var r=new e.constructor(e.byteLength);return new _r(r).set(new _r(e)),r}function Pc(e,r){var a=r?ga(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.byteLength)}function bc(e){var r=new e.constructor(e.source,Po.exec(e));return r.lastIndex=e.lastIndex,r}function Ac(e){return _n?ft(_n.call(e)):{}}function zh(e,r){var a=r?ga(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.length)}function Xh(e,r){if(e!==r){var a=e!==n,l=e===null,_=e===e,m=Vt(e),p=r!==n,w=r===null,P=r===r,N=Vt(r);if(!w&&!N&&!m&&e>r||m&&p&&P&&!w&&!N||l&&p&&P||!a&&P||!_)return 1;if(!l&&!m&&!N&&e<r||N&&a&&_&&!l&&!m||w&&a&&_||!p&&_||!P)return-1}return 0}function Gc(e,r,a){for(var l=-1,_=e.criteria,m=r.criteria,p=_.length,w=a.length;++l<p;){var P=Xh(_[l],m[l]);if(P){if(l>=w)return P;var N=a[l];return P*(N=="desc"?-1:1)}}return e.index-r.index}function kh(e,r,a,l){for(var _=-1,m=e.length,p=a.length,w=-1,P=r.length,N=Pt(m-p,0),R=G(P+N),L=!l;++w<P;)R[w]=r[w];for(;++_<p;)(L||_<m)&&(R[a[_]]=e[_]);for(;N--;)R[w++]=e[_++];return R}function Hh(e,r,a,l){for(var _=-1,m=e.length,p=-1,w=a.length,P=-1,N=r.length,R=Pt(m-w,0),L=G(R+N),D=!l;++_<R;)L[_]=e[_];for(var z=_;++P<N;)L[z+P]=r[P];for(;++p<w;)(D||_<m)&&(L[z+a[p]]=e[_++]);return L}function Wt(e,r){var a=-1,l=e.length;for(r||(r=G(l));++a<l;)r[a]=e[a];return r}function Se(e,r,a,l){var _=!a;a||(a={});for(var m=-1,p=r.length;++m<p;){var w=r[m],P=l?l(a[w],e[w],w,a,e):n;P===n&&(P=e[w]),_?Oe(a,w,P):gn(a,w,P)}return a}function Ic(e,r){return Se(e,wa(e),r)}function Cc(e,r){return Se(e,s0(e),r)}function Gr(e,r){return function(a,l){var _=J(a)?Tl:V1,m=r?r():{};return _(a,e,k(l,2),m)}}function Li(e){return tt(function(r,a){var l=-1,_=a.length,m=_>1?a[_-1]:n,p=_>2?a[2]:n;for(m=e.length>3&&typeof m=="function"?(_--,m):n,p&&Bt(a[0],a[1],p)&&(m=_<3?n:m,_=1),r=ft(r);++l<_;){var w=a[l];w&&e(r,w,l,m)}return r})}function Yh(e,r){return function(a,l){if(a==null)return a;if(!$t(a))return e(a,l);for(var _=a.length,m=r?_:-1,p=ft(a);(r?m--:++m<_)&&l(p[m],m,p)!==!1;);return a}}function Kh(e){return function(r,a,l){for(var _=-1,m=ft(r),p=l(r),w=p.length;w--;){var P=p[e?w:++_];if(a(m[P],P,m)===!1)break}return r}}function Nc(e,r,a){var l=r&A,_=yn(e);function m(){var p=this&&this!==Gt&&this instanceof m?_:e;return p.apply(l?a:this,arguments)}return m}function Qh(e){return function(r){r=at(r);var a=bi(r)?ve(r):n,l=a?a[0]:r.charAt(0),_=a?Ve(a,1).join(""):r.slice(1);return l[e]()+_}}function Oi(e){return function(r){return Ds(Y0(H0(r).replace(wl,"")),e,"")}}function yn(e){return function(){var r=arguments;switch(r.length){case 0:return new e;case 1:return new e(r[0]);case 2:return new e(r[0],r[1]);case 3:return new e(r[0],r[1],r[2]);case 4:return new e(r[0],r[1],r[2],r[3]);case 5:return new e(r[0],r[1],r[2],r[3],r[4]);case 6:return new e(r[0],r[1],r[2],r[3],r[4],r[5]);case 7:return new e(r[0],r[1],r[2],r[3],r[4],r[5],r[6])}var a=Ri(e.prototype),l=e.apply(a,r);return vt(l)?l:a}}function Rc(e,r,a){var l=yn(e);function _(){for(var m=arguments.length,p=G(m),w=m,P=Ti(_);w--;)p[w]=arguments[w];var N=m<3&&p[0]!==P&&p[m-1]!==P?[]:Ye(p,P);if(m-=N.length,m<a)return t0(e,r,Ir,_.placeholder,n,p,N,n,n,a-m);var R=this&&this!==Gt&&this instanceof _?l:e;return Qt(R,this,p)}return _}function Jh(e){return function(r,a,l){var _=ft(r);if(!$t(r)){var m=k(a,3);r=At(r),a=function(w){return m(_[w],w,_)}}var p=e(r,a,l);return p>-1?_[m?r[p]:p]:n}}function Zh(e){return Be(function(r){var a=r.length,l=a,_=re.prototype.thru;for(e&&r.reverse();l--;){var m=r[l];if(typeof m!="function")throw new ne(f);if(_&&!p&&Lr(m)=="wrapper")var p=new re([],!0)}for(l=p?l:a;++l<a;){m=r[l];var w=Lr(m),P=w=="wrapper"?ya(m):n;P&&xa(P[0])&&P[1]==(K|F|$|j)&&!P[4].length&&P[9]==1?p=p[Lr(P[0])].apply(p,P[3]):p=m.length==1&&xa(m)?p[w]():p.thru(m)}return function(){var N=arguments,R=N[0];if(p&&N.length==1&&J(R))return p.plant(R).value();for(var L=0,D=a?r[L].apply(this,N):R;++L<a;)D=r[L].call(this,D);return D}})}function Ir(e,r,a,l,_,m,p,w,P,N){var R=r&K,L=r&A,D=r&C,z=r&(F|W),H=r&rt,V=D?n:yn(e);function Y(){for(var et=arguments.length,nt=G(et),jt=et;jt--;)nt[jt]=arguments[jt];if(z)var Ft=Ti(Y),te=Xl(nt,Ft);if(l&&(nt=kh(nt,l,_,z)),m&&(nt=Hh(nt,m,p,z)),et-=te,z&&et<N){var wt=Ye(nt,Ft);return t0(e,r,Ir,Y.placeholder,a,nt,wt,w,P,N-et)}var me=L?a:this,Ue=D?me[e]:e;return et=nt.length,w?nt=Vc(nt,w):H&&et>1&&nt.reverse(),R&&P<et&&(nt.length=P),this&&this!==Gt&&this instanceof Y&&(Ue=V||yn(Ue)),Ue.apply(me,nt)}return Y}function Vh(e,r){return function(a,l){return ac(a,e,r(l),{})}}function Cr(e,r){return function(a,l){var _;if(a===n&&l===n)return r;if(a!==n&&(_=a),l!==n){if(_===n)return l;typeof a=="string"||typeof l=="string"?(a=Zt(a),l=Zt(l)):(a=Fh(a),l=Fh(l)),_=e(a,l)}return _}}function va(e){return Be(function(r){return r=gt(r,Jt(k())),tt(function(a){var l=this;return e(r,function(_){return Qt(_,l,a)})})})}function Nr(e,r){r=r===n?" ":Zt(r);var a=r.length;if(a<2)return a?ha(r,e):r;var l=ha(r,Mr(e/Ai(r)));return bi(r)?Ve(ve(l),0,e).join(""):l.slice(0,e)}function Lc(e,r,a,l){var _=r&A,m=yn(e);function p(){for(var w=-1,P=arguments.length,N=-1,R=l.length,L=G(R+P),D=this&&this!==Gt&&this instanceof p?m:e;++N<R;)L[N]=l[N];for(;P--;)L[N++]=arguments[++w];return Qt(D,_?a:this,L)}return p}function jh(e){return function(r,a,l){return l&&typeof l!="number"&&Bt(r,a,l)&&(a=l=n),r=De(r),a===n?(a=r,r=0):a=De(a),l=l===n?r<a?1:-1:De(l),mc(r,a,l,e)}}function Rr(e){return function(r,a){return typeof r=="string"&&typeof a=="string"||(r=he(r),a=he(a)),e(r,a)}}function t0(e,r,a,l,_,m,p,w,P,N){var R=r&F,L=R?p:n,D=R?n:p,z=R?m:n,H=R?n:m;r|=R?$:X,r&=~(R?X:$),r&T||(r&=-4);var V=[e,r,_,z,L,H,D,w,P,N],Y=a.apply(n,V);return xa(e)&&c0(Y,V),Y.placeholder=l,_0(Y,e,r)}function da(e){var r=St[e];return function(a,l){if(a=he(a),l=l==null?0:Nt(Z(l),292),l&&_h(a)){var _=(at(a)+"e").split("e"),m=r(_[0]+"e"+(+_[1]+l));return _=(at(m)+"e").split("e"),+(_[0]+"e"+(+_[1]-l))}return r(a)}}var Oc=Ci&&1/or(new Ci([,-0]))[1]==Ce?function(e){return new Ci(e)}:qa;function e0(e){return function(r){var a=Rt(r);return a==_e?Hs(r):a==ge?Zl(r):zl(r,e(r))}}function Te(e,r,a,l,_,m,p,w){var P=r&C;if(!P&&typeof e!="function")throw new ne(f);var N=l?l.length:0;if(N||(r&=-97,l=_=n),p=p===n?p:Pt(Z(p),0),w=w===n?w:Z(w),N-=_?_.length:0,r&X){var R=l,L=_;l=_=n}var D=P?n:ya(e),z=[e,r,a,l,_,R,L,m,p,w];if(D&&Qc(z,D),e=z[0],r=z[1],a=z[2],l=z[3],_=z[4],w=z[9]=z[9]===n?P?0:e.length:Pt(z[9]-N,0),!w&&r&(F|W)&&(r&=-25),!r||r==A)var H=Nc(e,r,a);else r==F||r==W?H=Rc(e,r,w):(r==$||r==(A|$))&&!_.length?H=Lc(e,r,a,l):H=Ir.apply(n,z);var V=D?Th:c0;return _0(V(H,z),e,r)}function i0(e,r,a,l){return e===n||Me(e,Ii[a])&&!ut.call(l,a)?r:e}function n0(e,r,a,l,_,m){return vt(e)&&vt(r)&&(m.set(r,e),Pr(e,r,n,n0,m),m.delete(r)),e}function Tc(e){return En(e)?n:e}function r0(e,r,a,l,_,m){var p=a&x,w=e.length,P=r.length;if(w!=P&&!(p&&P>w))return!1;var N=m.get(e),R=m.get(r);if(N&&R)return N==r&&R==e;var L=-1,D=!0,z=a&b?new hi:n;for(m.set(e,r),m.set(r,e);++L<w;){var H=e[L],V=r[L];if(l)var Y=p?l(V,H,L,r,e,m):l(H,V,L,e,r,m);if(Y!==n){if(Y)continue;D=!1;break}if(z){if(!Us(r,function(et,nt){if(!hn(z,nt)&&(H===et||_(H,et,a,l,m)))return z.push(nt)})){D=!1;break}}else if(!(H===V||_(H,V,a,l,m))){D=!1;break}}return m.delete(e),m.delete(r),D}function Bc(e,r,a,l,_,m,p){switch(a){case xi:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case on:return!(e.byteLength!=r.byteLength||!m(new _r(e),new _r(r)));case tn:case en:case nn:return Me(+e,+r);case jn:return e.name==r.name&&e.message==r.message;case rn:case sn:return e==r+"";case _e:var w=Hs;case ge:var P=l&x;if(w||(w=or),e.size!=r.size&&!P)return!1;var N=p.get(e);if(N)return N==r;l|=b,p.set(e,r);var R=r0(w(e),w(r),l,_,m,p);return p.delete(e),R;case er:if(_n)return _n.call(e)==_n.call(r)}return!1}function Fc(e,r,a,l,_,m){var p=a&x,w=Ma(e),P=w.length,N=Ma(r),R=N.length;if(P!=R&&!p)return!1;for(var L=P;L--;){var D=w[L];if(!(p?D in r:ut.call(r,D)))return!1}var z=m.get(e),H=m.get(r);if(z&&H)return z==r&&H==e;var V=!0;m.set(e,r),m.set(r,e);for(var Y=p;++L<P;){D=w[L];var et=e[D],nt=r[D];if(l)var jt=p?l(nt,et,D,r,e,m):l(et,nt,D,e,r,m);if(!(jt===n?et===nt||_(et,nt,a,l,m):jt)){V=!1;break}Y||(Y=D=="constructor")}if(V&&!Y){var Ft=e.constructor,te=r.constructor;Ft!=te&&"constructor"in e&&"constructor"in r&&!(typeof Ft=="function"&&Ft instanceof Ft&&typeof te=="function"&&te instanceof te)&&(V=!1)}return m.delete(e),m.delete(r),V}function Be(e){return Pa(f0(e,n,y0),e+"")}function Ma(e){return Sh(e,At,wa)}function ma(e){return Sh(e,zt,s0)}var ya=yr?function(e){return yr.get(e)}:qa;function Lr(e){for(var r=e.name+"",a=Ni[r],l=ut.call(Ni,r)?a.length:0;l--;){var _=a[l],m=_.func;if(m==null||m==e)return _.name}return r}function Ti(e){var r=ut.call(d,"placeholder")?d:e;return r.placeholder}function k(){var e=d.iteratee||Ba;return e=e===Ba?Ah:e,arguments.length?e(arguments[0],arguments[1]):e}function Or(e,r){var a=e.__data__;return kc(r)?a[typeof r=="string"?"string":"hash"]:a.map}function pa(e){for(var r=At(e),a=r.length;a--;){var l=r[a],_=e[l];r[a]=[l,_,h0(_)]}return r}function li(e,r){var a=Kl(e,r);return bh(a)?a:n}function qc(e){var r=ut.call(e,ai),a=e[ai];try{e[ai]=n;var l=!0}catch{}var _=lr.call(e);return l&&(r?e[ai]=a:delete e[ai]),_}var wa=Ks?function(e){return e==null?[]:(e=ft(e),ke(Ks(e),function(r){return lh.call(e,r)}))}:Da,s0=Ks?function(e){for(var r=[];e;)He(r,wa(e)),e=gr(e);return r}:Da,Rt=Tt;(Qs&&Rt(new Qs(new ArrayBuffer(1)))!=xi||fn&&Rt(new fn)!=_e||Js&&Rt(Js.resolve())!=wo||Ci&&Rt(new Ci)!=ge||ln&&Rt(new ln)!=an)&&(Rt=function(e){var r=Tt(e),a=r==Ne?e.constructor:n,l=a?ci(a):"";if(l)switch(l){case p1:return xi;case w1:return _e;case E1:return wo;case x1:return ge;case S1:return an}return r});function Dc(e,r,a){for(var l=-1,_=a.length;++l<_;){var m=a[l],p=m.size;switch(m.type){case"drop":e+=p;break;case"dropRight":r-=p;break;case"take":r=Nt(r,e+p);break;case"takeRight":e=Pt(e,r-p);break}}return{start:e,end:r}}function Uc(e){var r=e.match(Hf);return r?r[1].split(Yf):[]}function a0(e,r,a){r=Ze(r,e);for(var l=-1,_=r.length,m=!1;++l<_;){var p=Pe(r[l]);if(!(m=e!=null&&a(e,p)))break;e=e[p]}return m||++l!=_?m:(_=e==null?0:e.length,!!_&&Wr(_)&&Fe(p,_)&&(J(e)||_i(e)))}function Wc(e){var r=e.length,a=new e.constructor(r);return r&&typeof e[0]=="string"&&ut.call(e,"index")&&(a.index=e.index,a.input=e.input),a}function o0(e){return typeof e.constructor=="function"&&!pn(e)?Ri(gr(e)):{}}function $c(e,r,a){var l=e.constructor;switch(r){case on:return ga(e);case tn:case en:return new l(+e);case xi:return Pc(e,a);case ps:case ws:case Es:case xs:case Ss:case Ps:case bs:case As:case Gs:return zh(e,a);case _e:return new l;case nn:case sn:return new l(e);case rn:return bc(e);case ge:return new l;case er:return Ac(e)}}function zc(e,r){var a=r.length;if(!a)return e;var l=a-1;return r[l]=(a>1?"& ":"")+r[l],r=r.join(a>2?", ":" "),e.replace(kf,`{
|
|
4
|
+
northing meters`+t;var v=M/2,E=0,x=0,b,A,C,T,F;return v>0&&(b=1e5/Math.pow(10,v),A=t.substring(h,h+v),E=parseFloat(A)*b,C=t.substring(h+v),x=parseFloat(C)*b),T=E+g,F=x+y,{easting:T,northing:F,zoneLetter:u,zoneNumber:f,accuracy:b}}function Pd(t,i){for(var n=Hu.charCodeAt(i-1),s=1e5,o=!1;n!==t.charCodeAt(0);){if(n++,n===kt&&n++,n===fe&&n++,n>An){if(o)throw"Bad character: "+t;n=Xi,o=!0}s+=1e5}return s}function bd(t,i){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var n=Yu.charCodeAt(i-1),s=0,o=!1;n!==t.charCodeAt(0);){if(n++,n===kt&&n++,n===fe&&n++,n>bn){if(o)throw"Bad character: "+t;n=Xi,o=!0}s+=1e5}return s}function Ad(t){var i;switch(t){case"C":i=11e5;break;case"D":i=2e6;break;case"E":i=28e5;break;case"F":i=37e5;break;case"G":i=46e5;break;case"H":i=55e5;break;case"J":i=64e5;break;case"K":i=73e5;break;case"L":i=82e5;break;case"M":i=91e5;break;case"N":i=0;break;case"P":i=8e5;break;case"Q":i=17e5;break;case"R":i=26e5;break;case"S":i=35e5;break;case"T":i=44e5;break;case"U":i=53e5;break;case"V":i=62e5;break;case"W":i=7e6;break;case"X":i=79e5;break;default:i=-1}if(i>=0)return i;throw"Invalid zone letter: "+t}function Ji(t,i,n){if(!(this instanceof Ji))return new Ji(t,i,n);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if(typeof t=="object")this.x=t.x,this.y=t.y,this.z=t.z||0;else if(typeof t=="string"&&typeof i>"u"){var s=t.split(",");this.x=parseFloat(s[0]),this.y=parseFloat(s[1]),this.z=parseFloat(s[2])||0}else this.x=t,this.y=i,this.z=n||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Ji.fromMGRS=function(t){return new Ji(Qu(t))};Ji.prototype.toMGRS=function(t){return Ku([this.x,this.y],t)};var Gd=1,Id=.25,lu=.046875,cu=.01953125,_u=.01068115234375,Cd=.75,Nd=.46875,Rd=.013020833333333334,Ld=.007120768229166667,Od=.3645833333333333,Td=.005696614583333333,Bd=.3076171875;function io(t){var i=[];i[0]=Gd-t*(Id+t*(lu+t*(cu+t*_u))),i[1]=t*(Cd-t*(lu+t*(cu+t*_u)));var n=t*t;return i[2]=n*(Nd-t*(Rd+t*Ld)),n*=t,i[3]=n*(Od-t*Td),i[4]=n*t*Bd,i}function Vi(t,i,n,s){return n*=i,i*=i,s[0]*t-n*(s[1]+i*(s[2]+i*(s[3]+i*s[4])))}var Fd=20;function no(t,i,n){for(var s=1/(1-i),o=t,h=Fd;h;--h){var f=Math.sin(o),u=1-i*f*f;if(u=(Vi(o,f,Math.cos(o),n)-t)*(u*Math.sqrt(u))*s,o-=u,Math.abs(u)<B)return o}return o}function qd(){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=io(this.es),this.ml0=Vi(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function Dd(t){var i=t.x,n=t.y,s=q(i-this.long0,this.over),o,h,f,u=Math.sin(n),c=Math.cos(n);if(this.es){var y=c*s,M=Math.pow(y,2),v=this.ep2*Math.pow(c,2),E=Math.pow(v,2),x=Math.abs(c)>B?Math.tan(n):0,b=Math.pow(x,2),A=Math.pow(b,2);o=1-this.es*Math.pow(u,2),y=y/Math.sqrt(o);var C=Vi(n,u,c,this.en);h=this.a*(this.k0*y*(1+M/6*(1-b+v+M/20*(5-18*b+A+14*v-58*b*v+M/42*(61+179*A-A*b-479*b)))))+this.x0,f=this.a*(this.k0*(C-this.ml0+u*s*y/2*(1+M/12*(5-b+9*v+4*E+M/30*(61+A-58*b+270*v-330*b*v+M/56*(1385+543*A-A*b-3111*b))))))+this.y0}else{var g=c*Math.sin(s);if(Math.abs(Math.abs(g)-1)<B)return 93;if(h=.5*this.a*this.k0*Math.log((1+g)/(1-g))+this.x0,f=c*Math.cos(s)/Math.sqrt(1-Math.pow(g,2)),g=Math.abs(f),g>=1){if(g-1>B)return 93;f=0}else f=Math.acos(f);n<0&&(f=-f),f=this.a*this.k0*(f-this.lat0)+this.y0}return t.x=h,t.y=f,t}function Ud(t){var i,n,s,o,h=(t.x-this.x0)*(1/this.a),f=(t.y-this.y0)*(1/this.a);if(this.es)if(i=this.ml0+f/this.k0,n=no(i,this.es,this.en),Math.abs(n)<O){var M=Math.sin(n),v=Math.cos(n),E=Math.abs(v)>B?Math.tan(n):0,x=this.ep2*Math.pow(v,2),b=Math.pow(x,2),A=Math.pow(E,2),C=Math.pow(A,2);i=1-this.es*Math.pow(M,2);var T=h*Math.sqrt(i)/this.k0,F=Math.pow(T,2);i=i*E,s=n-i*F/(1-this.es)*.5*(1-F/12*(5+3*A-9*x*A+x-4*b-F/30*(61+90*A-252*x*A+45*C+46*x-F/56*(1385+3633*A+4095*C+1574*C*A)))),o=q(this.long0+T*(1-F/6*(1+2*A+x-F/20*(5+28*A+24*C+8*x*A+6*x-F/42*(61+662*A+1320*C+720*C*A))))/v,this.over)}else s=O*Xn(f),o=0;else{var u=Math.exp(h/this.k0),c=.5*(u-1/u),g=this.lat0+f/this.k0,y=Math.cos(g);i=Math.sqrt((1-Math.pow(y,2))/(1+Math.pow(c,2))),s=Math.asin(i),f<0&&(s=-s),c===0&&y===0?o=0:o=q(Math.atan2(c,y)+this.long0,this.over)}return t.x=o,t.y=s,t}var Wd=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const ts={init:qd,forward:Dd,inverse:Ud,names:Wd};function Vu(t){var i=Math.exp(t);return i=(i-1/i)/2,i}function Ht(t,i){t=Math.abs(t),i=Math.abs(i);var n=Math.max(t,i),s=Math.min(t,i)/(n||1);return n*Math.sqrt(1+Math.pow(s,2))}function $d(t){var i=1+t,n=i-1;return n===0?t:t*Math.log(i)/n}function zd(t){var i=Math.abs(t);return i=$d(i*(1+i/(Ht(1,i)+1))),t<0?-i:i}function ro(t,i){for(var n=2*Math.cos(2*i),s=t.length-1,o=t[s],h=0,f;--s>=0;)f=-h+n*o+t[s],h=o,o=f;return i+f*Math.sin(2*i)}function Xd(t,i){for(var n=2*Math.cos(i),s=t.length-1,o=t[s],h=0,f;--s>=0;)f=-h+n*o+t[s],h=o,o=f;return Math.sin(i)*f}function kd(t){var i=Math.exp(t);return i=(i+1/i)/2,i}function ju(t,i,n){for(var s=Math.sin(i),o=Math.cos(i),h=Vu(n),f=kd(n),u=2*o*f,c=-2*s*h,g=t.length-1,y=t[g],M=0,v=0,E=0,x,b;--g>=0;)x=v,b=M,v=y,M=E,y=-x+u*v-c*M+t[g],E=-b+c*v+u*M;return u=s*f,c=o*h,[u*y-c*E,u*E+c*y]}function Hd(){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&&(ts.init.apply(this),this.forward=ts.forward,this.inverse=ts.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.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),i=t/(2-t),n=i;this.cgb[0]=i*(2+i*(-2/3+i*(-2+i*(116/45+i*(26/45+i*(-2854/675)))))),this.cbg[0]=i*(-2+i*(2/3+i*(4/3+i*(-82/45+i*(32/45+i*(4642/4725)))))),n=n*i,this.cgb[1]=n*(7/3+i*(-8/5+i*(-227/45+i*(2704/315+i*(2323/945))))),this.cbg[1]=n*(5/3+i*(-16/15+i*(-13/9+i*(904/315+i*(-1522/945))))),n=n*i,this.cgb[2]=n*(56/15+i*(-136/35+i*(-1262/105+i*(73814/2835)))),this.cbg[2]=n*(-26/15+i*(34/21+i*(8/5+i*(-12686/2835)))),n=n*i,this.cgb[3]=n*(4279/630+i*(-332/35+i*(-399572/14175))),this.cbg[3]=n*(1237/630+i*(-12/5+i*(-24832/14175))),n=n*i,this.cgb[4]=n*(4174/315+i*(-144838/6237)),this.cbg[4]=n*(-734/315+i*(109598/31185)),n=n*i,this.cgb[5]=n*(601676/22275),this.cbg[5]=n*(444337/155925),n=Math.pow(i,2),this.Qn=this.k0/(1+i)*(1+n*(1/4+n*(1/64+n/256))),this.utg[0]=i*(-.5+i*(2/3+i*(-37/96+i*(1/360+i*(81/512+i*(-96199/604800)))))),this.gtu[0]=i*(.5+i*(-2/3+i*(5/16+i*(41/180+i*(-127/288+i*(7891/37800)))))),this.utg[1]=n*(-1/48+i*(-1/15+i*(437/1440+i*(-46/105+i*(1118711/3870720))))),this.gtu[1]=n*(13/48+i*(-3/5+i*(557/1440+i*(281/630+i*(-1983433/1935360))))),n=n*i,this.utg[2]=n*(-17/480+i*(37/840+i*(209/4480+i*(-5569/90720)))),this.gtu[2]=n*(61/240+i*(-103/140+i*(15061/26880+i*(167603/181440)))),n=n*i,this.utg[3]=n*(-4397/161280+i*(11/504+i*(830251/7257600))),this.gtu[3]=n*(49561/161280+i*(-179/168+i*(6601661/7257600))),n=n*i,this.utg[4]=n*(-4583/161280+i*(108847/3991680)),this.gtu[4]=n*(34729/80640+i*(-3418889/1995840)),n=n*i,this.utg[5]=n*(-20648693/638668800),this.gtu[5]=n*(212378941/319334400);var s=ro(this.cbg,this.lat0);this.Zb=-this.Qn*(s+Xd(this.gtu,2*s))}function Yd(t){var i=q(t.x-this.long0,this.over),n=t.y;n=ro(this.cbg,n);var s=Math.sin(n),o=Math.cos(n),h=Math.sin(i),f=Math.cos(i);n=Math.atan2(s,f*o),i=Math.atan2(h*o,Ht(s,o*f)),i=zd(Math.tan(i));var u=ju(this.gtu,2*n,2*i);n=n+u[0],i=i+u[1];var c,g;return Math.abs(i)<=2.623395162778?(c=this.a*(this.Qn*i)+this.x0,g=this.a*(this.Qn*n+this.Zb)+this.y0):(c=1/0,g=1/0),t.x=c,t.y=g,t}function Kd(t){var i=(t.x-this.x0)*(1/this.a),n=(t.y-this.y0)*(1/this.a);n=(n-this.Zb)/this.Qn,i=i/this.Qn;var s,o;if(Math.abs(i)<=2.623395162778){var h=ju(this.utg,2*n,2*i);n=n+h[0],i=i+h[1],i=Math.atan(Vu(i));var f=Math.sin(n),u=Math.cos(n),c=Math.sin(i),g=Math.cos(i);n=Math.atan2(f*g,Ht(c,g*u)),i=Math.atan2(c,g*u),s=q(i+this.long0,this.over),o=ro(this.cgb,n)}else s=1/0,o=1/0;return t.x=s,t.y=o,t}var Qd=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const es={init:Hd,forward:Yd,inverse:Kd,names:Qd};function Jd(t,i){if(t===void 0){if(t=Math.floor((q(i)+Math.PI)*30/Math.PI)+1,t<0)return 0;if(t>60)return 60}return t}var Zd="etmerc";function Vd(){var t=Jd(this.zone,this.long0);if(t===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*yt,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,es.init.apply(this),this.forward=es.forward,this.inverse=es.inverse}var jd=["Universal Transverse Mercator System","utm"];const t3={init:Vd,names:jd,dependsOn:Zd};function so(t,i){return Math.pow((1-t)/(1+t),i)}var e3=20;function i3(){var t=Math.sin(this.lat0),i=Math.cos(this.lat0);i*=i,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*i*i/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+ot)/(Math.pow(Math.tan(.5*this.lat0+ot),this.C)*so(this.e*t,this.ratexp))}function n3(t){var i=t.x,n=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*n+ot),this.C)*so(this.e*Math.sin(n),this.ratexp))-O,t.x=this.C*i,t}function r3(t){for(var i=1e-14,n=t.x/this.C,s=t.y,o=Math.pow(Math.tan(.5*s+ot)/this.K,1/this.C),h=e3;h>0&&(s=2*Math.atan(o*so(this.e*Math.sin(t.y),-.5*this.e))-O,!(Math.abs(s-t.y)<i));--h)t.y=s;return h?(t.x=n,t.y=s,t):null}const ao={init:i3,forward:n3,inverse:r3};function s3(){ao.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 a3(t){var i,n,s,o;return t.x=q(t.x-this.long0,this.over),ao.forward.apply(this,[t]),i=Math.sin(t.y),n=Math.cos(t.y),s=Math.cos(t.x),o=this.k0*this.R2/(1+this.sinc0*i+this.cosc0*n*s),t.x=o*n*Math.sin(t.x),t.y=o*(this.cosc0*i-this.sinc0*n*s),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function o3(t){var i,n,s,o,h;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,h=Ht(t.x,t.y)){var f=2*Math.atan2(h,this.R2);i=Math.sin(f),n=Math.cos(f),o=Math.asin(n*this.sinc0+t.y*i*this.cosc0/h),s=Math.atan2(t.x*i,h*this.cosc0*n-t.y*this.sinc0*i)}else o=this.phic0,s=0;return t.x=s,t.y=o,ao.inverse.apply(this,[t]),t.x=q(t.x+this.long0,this.over),t}var h3=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const u3={init:s3,forward:a3,inverse:o3,names:h3};function oo(t,i,n){return i*=n,Math.tan(.5*(O+t))*Math.pow((1-i)/(1+i),.5*n)}function f3(){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?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=B&&(this.k0=.5*(1+Xn(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=B&&(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)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=B&&Math.abs(Math.cos(this.lat_ts))>B&&(this.k0=.5*this.cons*Ae(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/we(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Ae(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(oo(this.lat0,this.sinlat0,this.e))-O,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function l3(t){var i=t.x,n=t.y,s=Math.sin(n),o=Math.cos(n),h,f,u,c,g,y,M=q(i-this.long0,this.over);return Math.abs(Math.abs(i-this.long0)-Math.PI)<=B&&Math.abs(n+this.lat0)<=B?(t.x=NaN,t.y=NaN,t):this.sphere?(h=2*this.k0/(1+this.sinlat0*s+this.coslat0*o*Math.cos(M)),t.x=this.a*h*o*Math.sin(M)+this.x0,t.y=this.a*h*(this.coslat0*s-this.sinlat0*o*Math.cos(M))+this.y0,t):(f=2*Math.atan(oo(n,s,this.e))-O,c=Math.cos(f),u=Math.sin(f),Math.abs(this.coslat0)<=B?(g=we(this.e,n*this.con,this.con*s),y=2*this.a*this.k0*g/this.cons,t.x=this.x0+y*Math.sin(i-this.long0),t.y=this.y0-this.con*y*Math.cos(i-this.long0),t):(Math.abs(this.sinlat0)<B?(h=2*this.a*this.k0/(1+c*Math.cos(M)),t.y=h*u):(h=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*u+this.cosX0*c*Math.cos(M))),t.y=h*(this.cosX0*u-this.sinX0*c*Math.cos(M))+this.y0),t.x=h*c*Math.sin(M)+this.x0,t))}function c3(t){t.x-=this.x0,t.y-=this.y0;var i,n,s,o,h,f=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var u=2*Math.atan(f/(2*this.a*this.k0));return i=this.long0,n=this.lat0,f<=B?(t.x=i,t.y=n,t):(n=Math.asin(Math.cos(u)*this.sinlat0+t.y*Math.sin(u)*this.coslat0/f),Math.abs(this.coslat0)<B?this.lat0>0?i=q(this.long0+Math.atan2(t.x,-1*t.y),this.over):i=q(this.long0+Math.atan2(t.x,t.y),this.over):i=q(this.long0+Math.atan2(t.x*Math.sin(u),f*this.coslat0*Math.cos(u)-t.y*this.sinlat0*Math.sin(u)),this.over),t.x=i,t.y=n,t)}else if(Math.abs(this.coslat0)<=B){if(f<=B)return n=this.lat0,i=this.long0,t.x=i,t.y=n,t;t.x*=this.con,t.y*=this.con,s=f*this.cons/(2*this.a*this.k0),n=this.con*Dn(this.e,s),i=this.con*q(this.con*this.long0+Math.atan2(t.x,-1*t.y),this.over)}else o=2*Math.atan(f*this.cosX0/(2*this.a*this.k0*this.ms1)),i=this.long0,f<=B?h=this.X0:(h=Math.asin(Math.cos(o)*this.sinX0+t.y*Math.sin(o)*this.cosX0/f),i=q(this.long0+Math.atan2(t.x*Math.sin(o),f*this.cosX0*Math.cos(o)-t.y*this.sinX0*Math.sin(o)),this.over)),n=-1*Dn(this.e,Math.tan(.5*(O+h)));return t.x=i,t.y=n,t}var _3=["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"];const g3={init:f3,forward:l3,inverse:c3,names:_3,ssfn_:oo};function v3(){var t=this.lat0;this.lambda0=this.long0;var i=Math.sin(t),n=this.a,s=this.rf,o=1/s,h=2*o-Math.pow(o,2),f=this.e=Math.sqrt(h);this.R=this.k0*n*Math.sqrt(1-h)/(1-h*Math.pow(i,2)),this.alpha=Math.sqrt(1+h/(1-h)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(i/this.alpha);var u=Math.log(Math.tan(Math.PI/4+this.b0/2)),c=Math.log(Math.tan(Math.PI/4+t/2)),g=Math.log((1+f*i)/(1-f*i));this.K=u-this.alpha*c+this.alpha*f/2*g}function d3(t){var i=Math.log(Math.tan(Math.PI/4-t.y/2)),n=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),s=-this.alpha*(i+n)+this.K,o=2*(Math.atan(Math.exp(s))-Math.PI/4),h=this.alpha*(t.x-this.lambda0),f=Math.atan(Math.sin(h)/(Math.sin(this.b0)*Math.tan(o)+Math.cos(this.b0)*Math.cos(h))),u=Math.asin(Math.cos(this.b0)*Math.sin(o)-Math.sin(this.b0)*Math.cos(o)*Math.cos(h));return t.y=this.R/2*Math.log((1+Math.sin(u))/(1-Math.sin(u)))+this.y0,t.x=this.R*f+this.x0,t}function M3(t){for(var i=t.x-this.x0,n=t.y-this.y0,s=i/this.R,o=2*(Math.atan(Math.exp(n/this.R))-Math.PI/4),h=Math.asin(Math.cos(this.b0)*Math.sin(o)+Math.sin(this.b0)*Math.cos(o)*Math.cos(s)),f=Math.atan(Math.sin(s)/(Math.cos(this.b0)*Math.cos(s)-Math.sin(this.b0)*Math.tan(o))),u=this.lambda0+f/this.alpha,c=0,g=h,y=-1e3,M=0;Math.abs(g-y)>1e-7;){if(++M>20)return;c=1/this.alpha*(Math.log(Math.tan(Math.PI/4+h/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(g))/2)),y=g,g=2*Math.atan(Math.exp(c))-Math.PI/2}return t.x=u,t.y=g,t}var m3=["somerc"];const y3={init:v3,forward:d3,inverse:M3,names:m3};var Ui=1e-7;function p3(t){var i=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],n=typeof t.projName=="object"?Object.keys(t.projName)[0]:t.projName;return"no_uoff"in t||"no_off"in t||i.indexOf(n)!==-1||i.indexOf(Wu(n))!==-1}function w3(){var t,i,n,s,o,h,f,u,c,g,y=0,M,v=0,E=0,x=0,b=0,A=0,C=0;this.no_off=p3(this),this.no_rot="no_rot"in this;var T=!1;"alpha"in this&&(T=!0);var F=!1;if("rectified_grid_angle"in this&&(F=!0),T&&(C=this.alpha),F&&(y=this.rectified_grid_angle),T||F)v=this.longc;else if(E=this.long1,b=this.lat1,x=this.long2,A=this.lat2,Math.abs(b-A)<=Ui||(t=Math.abs(b))<=Ui||Math.abs(t-O)<=Ui||Math.abs(Math.abs(this.lat0)-O)<=Ui||Math.abs(Math.abs(A)-O)<=Ui)throw new Error;var W=1-this.es;i=Math.sqrt(W),Math.abs(this.lat0)>B?(u=Math.sin(this.lat0),n=Math.cos(this.lat0),t=1-this.es*u*u,this.B=n*n,this.B=Math.sqrt(1+this.es*this.B*this.B/W),this.A=this.B*this.k0*i/t,s=this.B*i/(n*Math.sqrt(t)),o=s*s-1,o<=0?o=0:(o=Math.sqrt(o),this.lat0<0&&(o=-o)),this.E=o+=s,this.E*=Math.pow(we(this.e,this.lat0,u),this.B)):(this.B=1/i,this.A=this.k0,this.E=s=o=1),T||F?(T?(M=Math.asin(Math.sin(C)/s),F||(y=C)):(M=y,C=Math.asin(s*Math.sin(M))),this.lam0=v-Math.asin(.5*(o-1/o)*Math.tan(M))/this.B):(h=Math.pow(we(this.e,b,Math.sin(b)),this.B),f=Math.pow(we(this.e,A,Math.sin(A)),this.B),o=this.E/h,c=(f-h)/(f+h),g=this.E*this.E,g=(g-f*h)/(g+f*h),t=E-x,t<-Math.PI?x-=Fn:t>Math.PI&&(x+=Fn),this.lam0=q(.5*(E+x)-Math.atan(g*Math.tan(.5*this.B*(E-x))/c)/this.B,this.over),M=Math.atan(2*Math.sin(this.B*q(E-this.lam0,this.over))/(o-1/o)),y=C=Math.asin(s*Math.sin(M))),this.singam=Math.sin(M),this.cosgam=Math.cos(M),this.sinrot=Math.sin(y),this.cosrot=Math.cos(y),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(s*s-1)/Math.cos(C))),this.lat0<0&&(this.u_0=-this.u_0)),o=.5*M,this.v_pole_n=this.ArB*Math.log(Math.tan(ot-o)),this.v_pole_s=this.ArB*Math.log(Math.tan(ot+o))}function E3(t){var i={},n,s,o,h,f,u,c,g;if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-O)>B){if(f=this.E/Math.pow(we(this.e,t.y,Math.sin(t.y)),this.B),u=1/f,n=.5*(f-u),s=.5*(f+u),h=Math.sin(this.B*t.x),o=(n*this.singam-h*this.cosgam)/s,Math.abs(Math.abs(o)-1)<B)throw new Error;g=.5*this.ArB*Math.log((1-o)/(1+o)),u=Math.cos(this.B*t.x),Math.abs(u)<Ui?c=this.A*t.x:c=this.ArB*Math.atan2(n*this.cosgam+h*this.singam,u)}else g=t.y>0?this.v_pole_n:this.v_pole_s,c=this.ArB*t.y;return this.no_rot?(i.x=c,i.y=g):(c-=this.u_0,i.x=g*this.cosrot+c*this.sinrot,i.y=c*this.cosrot-g*this.sinrot),i.x=this.a*i.x+this.x0,i.y=this.a*i.y+this.y0,i}function x3(t){var i,n,s,o,h,f,u,c={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(n=t.y,i=t.x):(n=t.x*this.cosrot-t.y*this.sinrot,i=t.y*this.cosrot+t.x*this.sinrot+this.u_0),s=Math.exp(-this.BrA*n),o=.5*(s-1/s),h=.5*(s+1/s),f=Math.sin(this.BrA*i),u=(f*this.cosgam+o*this.singam)/h,Math.abs(Math.abs(u)-1)<B)c.x=0,c.y=u<0?-O:O;else{if(c.y=this.E/Math.sqrt((1+u)/(1-u)),c.y=Dn(this.e,Math.pow(c.y,1/this.B)),c.y===1/0)throw new Error;c.x=-this.rB*Math.atan2(o*this.cosgam-f*this.singam,Math.cos(this.BrA*i))}return c.x+=this.lam0,c}var S3=["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"];const P3={init:w3,forward:E3,inverse:x3,names:S3};function b3(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<B)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var i=Math.sin(this.lat1),n=Math.cos(this.lat1),s=Ae(this.e,i,n),o=we(this.e,this.lat1,i),h=Math.sin(this.lat2),f=Math.cos(this.lat2),u=Ae(this.e,h,f),c=we(this.e,this.lat2,h),g=Math.abs(Math.abs(this.lat0)-O)<B?0:we(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>B?this.ns=Math.log(s/u)/Math.log(o/c):this.ns=i,isNaN(this.ns)&&(this.ns=i),this.f0=s/(this.ns*Math.pow(o,this.ns)),this.rh=this.a*this.f0*Math.pow(g,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function A3(t){var i=t.x,n=t.y;Math.abs(2*Math.abs(n)-Math.PI)<=B&&(n=Xn(n)*(O-2*B));var s=Math.abs(Math.abs(n)-O),o,h;if(s>B)o=we(this.e,n,Math.sin(n)),h=this.a*this.f0*Math.pow(o,this.ns);else{if(s=n*this.ns,s<=0)return null;h=0}var f=this.ns*q(i-this.long0,this.over);return t.x=this.k0*(h*Math.sin(f))+this.x0,t.y=this.k0*(this.rh-h*Math.cos(f))+this.y0,t}function G3(t){var i,n,s,o,h,f=(t.x-this.x0)/this.k0,u=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(i=Math.sqrt(f*f+u*u),n=1):(i=-Math.sqrt(f*f+u*u),n=-1);var c=0;if(i!==0&&(c=Math.atan2(n*f,n*u)),i!==0||this.ns>0){if(n=1/this.ns,s=Math.pow(i/(this.a*this.f0),n),o=Dn(this.e,s),o===-9999)return null}else o=-O;return h=q(c/this.ns+this.long0,this.over),t.x=h,t.y=o,t}var I3=["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)"];const C3={init:b3,forward:A3,inverse:G3,names:I3};function N3(){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 R3(t){var i,n,s,o,h,f,u,c=t.x,g=t.y,y=q(c-this.long0,this.over);return i=Math.pow((1+this.e*Math.sin(g))/(1-this.e*Math.sin(g)),this.alfa*this.e/2),n=2*(Math.atan(this.k*Math.pow(Math.tan(g/2+this.s45),this.alfa)/i)-this.s45),s=-y*this.alfa,o=Math.asin(Math.cos(this.ad)*Math.sin(n)+Math.sin(this.ad)*Math.cos(n)*Math.cos(s)),h=Math.asin(Math.cos(n)*Math.sin(s)/Math.cos(o)),f=this.n*h,u=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(o/2+this.s45),this.n),t.y=u*Math.cos(f)/1,t.x=u*Math.sin(f)/1,this.czech||(t.y*=-1,t.x*=-1),t}function L3(t){var i,n,s,o,h,f,u,c,g=t.x;t.x=t.y,t.y=g,this.czech||(t.y*=-1,t.x*=-1),f=Math.sqrt(t.x*t.x+t.y*t.y),h=Math.atan2(t.y,t.x),o=h/Math.sin(this.s0),s=2*(Math.atan(Math.pow(this.ro0/f,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),i=Math.asin(Math.cos(this.ad)*Math.sin(s)-Math.sin(this.ad)*Math.cos(s)*Math.cos(o)),n=Math.asin(Math.cos(s)*Math.sin(o)/Math.cos(i)),t.x=this.long0-n/this.alfa,u=i,c=0;var y=0;do t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(i/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.e/2))-this.s45),Math.abs(u-t.y)<1e-10&&(c=1),u=t.y,y+=1;while(c===0&&y<15);return y>=15?null:t}var O3=["Krovak","krovak"];const T3={init:N3,forward:R3,inverse:L3,names:O3};function Ut(t,i,n,s,o){return t*o-i*Math.sin(2*o)+n*Math.sin(4*o)-s*Math.sin(6*o)}function kn(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function Hn(t){return .375*t*(1+.25*t*(1+.46875*t))}function Yn(t){return .05859375*t*t*(1+.75*t)}function Kn(t){return t*t*t*(35/3072)}function ho(t,i,n){var s=i*n;return t/Math.sqrt(1-s*s)}function ri(t){return Math.abs(t)<O?t:t-Xn(t)*Math.PI}function hs(t,i,n,s,o){var h,f;h=t/i;for(var u=0;u<15;u++)if(f=(t-(i*h-n*Math.sin(2*h)+s*Math.sin(4*h)-o*Math.sin(6*h)))/(i-2*n*Math.cos(2*h)+4*s*Math.cos(4*h)-6*o*Math.cos(6*h)),h+=f,Math.abs(f)<=1e-10)return h;return NaN}function B3(){this.sphere||(this.e0=kn(this.es),this.e1=Hn(this.es),this.e2=Yn(this.es),this.e3=Kn(this.es),this.ml0=this.a*Ut(this.e0,this.e1,this.e2,this.e3,this.lat0))}function F3(t){var i,n,s=t.x,o=t.y;if(s=q(s-this.long0,this.over),this.sphere)i=this.a*Math.asin(Math.cos(o)*Math.sin(s)),n=this.a*(Math.atan2(Math.tan(o),Math.cos(s))-this.lat0);else{var h=Math.sin(o),f=Math.cos(o),u=ho(this.a,this.e,h),c=Math.tan(o)*Math.tan(o),g=s*Math.cos(o),y=g*g,M=this.es*f*f/(1-this.es),v=this.a*Ut(this.e0,this.e1,this.e2,this.e3,o);i=u*g*(1-y*c*(1/6-(8-c+8*M)*y/120)),n=v-this.ml0+u*h/f*y*(.5+(5-c+6*M)*y/24)}return t.x=i+this.x0,t.y=n+this.y0,t}function q3(t){t.x-=this.x0,t.y-=this.y0;var i=t.x/this.a,n=t.y/this.a,s,o;if(this.sphere){var h=n+this.lat0;s=Math.asin(Math.sin(h)*Math.cos(i)),o=Math.atan2(Math.tan(i),Math.cos(h))}else{var f=this.ml0/this.a+n,u=hs(f,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(u)-O)<=B)return t.x=this.long0,t.y=O,n<0&&(t.y*=-1),t;var c=ho(this.a,this.e,Math.sin(u)),g=c*c*c/this.a/this.a*(1-this.es),y=Math.pow(Math.tan(u),2),M=i*this.a/c,v=M*M;s=u-c*Math.tan(u)/g*M*M*(.5-(1+3*y)*M*M/24),o=M*(1-v*(y/3+(1+3*y)*y*v/15))/Math.cos(u)}return t.x=q(o+this.long0,this.over),t.y=ri(s),t}var D3=["Cassini","Cassini_Soldner","cass"];const U3={init:B3,forward:F3,inverse:q3,names:D3};function ei(t,i){var n;return t>1e-7?(n=t*i,(1-t*t)*(i/(1-n*n)-.5/t*Math.log((1-n)/(1+n)))):2*i}var Ka=1,Qa=2,Ja=3,is=4;function W3(){var t=Math.abs(this.lat0);if(Math.abs(t-O)<B?this.mode=this.lat0<0?Ka:Qa:Math.abs(t)<B?this.mode=Ja:this.mode=is,this.es>0){var i;switch(this.qp=ei(this.e,1),this.mmf=.5/(1-this.es),this.apa=J3(this.es),this.mode){case Qa:this.dd=1;break;case Ka:this.dd=1;break;case Ja:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case is:this.rq=Math.sqrt(.5*this.qp),i=Math.sin(this.lat0),this.sinb1=ei(this.e,i)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*i*i)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===is&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function $3(t){var i,n,s,o,h,f,u,c,g,y,M=t.x,v=t.y;if(M=q(M-this.long0,this.over),this.sphere){if(h=Math.sin(v),y=Math.cos(v),s=Math.cos(M),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(n=this.mode===this.EQUIT?1+y*s:1+this.sinph0*h+this.cosph0*y*s,n<=B)return null;n=Math.sqrt(2/n),i=n*y*Math.sin(M),n*=this.mode===this.EQUIT?h:this.cosph0*h-this.sinph0*y*s}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(s=-s),Math.abs(v+this.lat0)<B)return null;n=ot-v*.5,n=2*(this.mode===this.S_POLE?Math.cos(n):Math.sin(n)),i=n*Math.sin(M),n*=s}}else{switch(u=0,c=0,g=0,s=Math.cos(M),o=Math.sin(M),h=Math.sin(v),f=ei(this.e,h),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(u=f/this.qp,c=Math.sqrt(1-u*u)),this.mode){case this.OBLIQ:g=1+this.sinb1*u+this.cosb1*c*s;break;case this.EQUIT:g=1+c*s;break;case this.N_POLE:g=O+v,f=this.qp-f;break;case this.S_POLE:g=v-O,f=this.qp+f;break}if(Math.abs(g)<B)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:g=Math.sqrt(2/g),this.mode===this.OBLIQ?n=this.ymf*g*(this.cosb1*u-this.sinb1*c*s):n=(g=Math.sqrt(2/(1+c*s)))*u*this.ymf,i=this.xmf*g*c*o;break;case this.N_POLE:case this.S_POLE:f>=0?(i=(g=Math.sqrt(f))*o,n=s*(this.mode===this.S_POLE?g:-g)):i=n=0;break}}return t.x=this.a*i+this.x0,t.y=this.a*n+this.y0,t}function z3(t){t.x-=this.x0,t.y-=this.y0;var i=t.x/this.a,n=t.y/this.a,s,o,h,f,u,c,g;if(this.sphere){var y=0,M,v=0;if(M=Math.sqrt(i*i+n*n),o=M*.5,o>1)return null;switch(o=2*Math.asin(o),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(v=Math.sin(o),y=Math.cos(o)),this.mode){case this.EQUIT:o=Math.abs(M)<=B?0:Math.asin(n*v/M),i*=v,n=y*M;break;case this.OBLIQ:o=Math.abs(M)<=B?this.lat0:Math.asin(y*this.sinph0+n*v*this.cosph0/M),i*=v*this.cosph0,n=(y-Math.sin(o)*this.sinph0)*M;break;case this.N_POLE:n=-n,o=O-o;break;case this.S_POLE:o-=O;break}s=n===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(i,n)}else{if(g=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(i/=this.dd,n*=this.dd,c=Math.sqrt(i*i+n*n),c<B)return t.x=this.long0,t.y=this.lat0,t;f=2*Math.asin(.5*c/this.rq),h=Math.cos(f),i*=f=Math.sin(f),this.mode===this.OBLIQ?(g=h*this.sinb1+n*f*this.cosb1/c,u=this.qp*g,n=c*this.cosb1*h-n*this.sinb1*f):(g=n*f/c,u=this.qp*g,n=c*h)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),u=i*i+n*n,!u)return t.x=this.long0,t.y=this.lat0,t;g=1-u/this.qp,this.mode===this.S_POLE&&(g=-g)}s=Math.atan2(i,n),o=Z3(Math.asin(g),this.apa)}return t.x=q(this.long0+s,this.over),t.y=o,t}var X3=.3333333333333333,k3=.17222222222222222,H3=.10257936507936508,Y3=.06388888888888888,K3=.0664021164021164,Q3=.016415012942191543;function J3(t){var i,n=[];return n[0]=t*X3,i=t*t,n[0]+=i*k3,n[1]=i*Y3,i*=t,n[0]+=i*H3,n[1]+=i*K3,n[2]=i*Q3,n}function Z3(t,i){var n=t+t;return t+i[0]*Math.sin(n)+i[1]*Math.sin(n+n)+i[2]*Math.sin(n+n+n)}var V3=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const j3={init:W3,forward:$3,inverse:z3,names:V3,S_POLE:Ka,N_POLE:Qa,EQUIT:Ja,OBLIQ:is};function ni(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)}function t8(){Math.abs(this.lat1+this.lat2)<B||(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=Ae(this.e3,this.sin_po,this.cos_po),this.qs1=ei(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=Ae(this.e3,this.sin_po,this.cos_po),this.qs2=ei(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=ei(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>B?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 e8(t){var i=t.x,n=t.y;this.sin_phi=Math.sin(n),this.cos_phi=Math.cos(n);var s=ei(this.e3,this.sin_phi),o=this.a*Math.sqrt(this.c-this.ns0*s)/this.ns0,h=this.ns0*q(i-this.long0,this.over),f=o*Math.sin(h)+this.x0,u=this.rh-o*Math.cos(h)+this.y0;return t.x=f,t.y=u,t}function i8(t){var i,n,s,o,h,f;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),s=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),s=-1),o=0,i!==0&&(o=Math.atan2(s*t.x,s*t.y)),s=i*this.ns0/this.a,this.sphere?f=Math.asin((this.c-s*s)/(2*this.ns0)):(n=(this.c-s*s)/this.ns0,f=this.phi1z(this.e3,n)),h=q(o/this.ns0+this.long0,this.over),t.x=h,t.y=f,t}function n8(t,i){var n,s,o,h,f,u=ni(.5*i);if(t<B)return u;for(var c=t*t,g=1;g<=25;g++)if(n=Math.sin(u),s=Math.cos(u),o=t*n,h=1-o*o,f=.5*h*h/s*(i/(1-c)-n/h+.5/t*Math.log((1-o)/(1+o))),u=u+f,Math.abs(f)<=1e-7)return u;return null}var r8=["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"];const s8={init:t8,forward:e8,inverse:i8,names:r8,phi1z:n8};function a8(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function o8(t){var i,n,s,o,h,f,u,c,g=t.x,y=t.y;return s=q(g-this.long0,this.over),i=Math.sin(y),n=Math.cos(y),o=Math.cos(s),f=this.sin_p14*i+this.cos_p14*n*o,h=1,f>0||Math.abs(f)<=B?(u=this.x0+this.a*h*n*Math.sin(s)/f,c=this.y0+this.a*h*(this.cos_p14*i-this.sin_p14*n*o)/f):(u=this.x0+this.infinity_dist*n*Math.sin(s),c=this.y0+this.infinity_dist*(this.cos_p14*i-this.sin_p14*n*o)),t.x=u,t.y=c,t}function h8(t){var i,n,s,o,h,f;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(i=Math.sqrt(t.x*t.x+t.y*t.y))?(o=Math.atan2(i,this.rc),n=Math.sin(o),s=Math.cos(o),f=ni(s*this.sin_p14+t.y*n*this.cos_p14/i),h=Math.atan2(t.x*n,i*this.cos_p14*s-t.y*this.sin_p14*n),h=q(this.long0+h,this.over)):(f=this.phic0,h=0),t.x=h,t.y=f,t}var u8=["gnom"];const f8={init:a8,forward:o8,inverse:h8,names:u8};function l8(t,i){var n=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(i)-n)<1e-6)return i<0?-1*O:O;for(var s=Math.asin(.5*i),o,h,f,u,c=0;c<30;c++)if(h=Math.sin(s),f=Math.cos(s),u=t*h,o=Math.pow(1-u*u,2)/(2*f)*(i/(1-t*t)-h/(1-u*u)+.5/t*Math.log((1-u)/(1+u))),s+=o,Math.abs(o)<=1e-10)return s;return NaN}function c8(){this.sphere||(this.k0=Ae(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function _8(t){var i=t.x,n=t.y,s,o,h=q(i-this.long0,this.over);if(this.sphere)s=this.x0+this.a*h*Math.cos(this.lat_ts),o=this.y0+this.a*Math.sin(n)/Math.cos(this.lat_ts);else{var f=ei(this.e,Math.sin(n));s=this.x0+this.a*this.k0*h,o=this.y0+this.a*f*.5/this.k0}return t.x=s,t.y=o,t}function g8(t){t.x-=this.x0,t.y-=this.y0;var i,n;return this.sphere?(i=q(this.long0+t.x/this.a/Math.cos(this.lat_ts),this.over),n=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(n=l8(this.e,2*t.y*this.k0/this.a),i=q(this.long0+t.x/(this.a*this.k0),this.over)),t.x=i,t.y=n,t}var v8=["cea"];const d8={init:c8,forward:_8,inverse:g8,names:v8};function M8(){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 m8(t){var i=t.x,n=t.y,s=q(i-this.long0,this.over),o=ri(n-this.lat0);return t.x=this.x0+this.a*s*this.rc,t.y=this.y0+this.a*o,t}function y8(t){var i=t.x,n=t.y;return t.x=q(this.long0+(i-this.x0)/(this.a*this.rc),this.over),t.y=ri(this.lat0+(n-this.y0)/this.a),t}var p8=["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"];const w8={init:M8,forward:m8,inverse:y8,names:p8};var gu=20;function E8(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=kn(this.es),this.e1=Hn(this.es),this.e2=Yn(this.es),this.e3=Kn(this.es),this.ml0=this.a*Ut(this.e0,this.e1,this.e2,this.e3,this.lat0)}function x8(t){var i=t.x,n=t.y,s,o,h,f=q(i-this.long0,this.over);if(h=f*Math.sin(n),this.sphere)Math.abs(n)<=B?(s=this.a*f,o=-1*this.a*this.lat0):(s=this.a*Math.sin(h)/Math.tan(n),o=this.a*(ri(n-this.lat0)+(1-Math.cos(h))/Math.tan(n)));else if(Math.abs(n)<=B)s=this.a*f,o=-1*this.ml0;else{var u=ho(this.a,this.e,Math.sin(n))/Math.tan(n);s=u*Math.sin(h),o=this.a*Ut(this.e0,this.e1,this.e2,this.e3,n)-this.ml0+u*(1-Math.cos(h))}return t.x=s+this.x0,t.y=o+this.y0,t}function S8(t){var i,n,s,o,h,f,u,c,g;if(s=t.x-this.x0,o=t.y-this.y0,this.sphere)if(Math.abs(o+this.a*this.lat0)<=B)i=q(s/this.a+this.long0,this.over),n=0;else{f=this.lat0+o/this.a,u=s*s/this.a/this.a+f*f,c=f;var y;for(h=gu;h;--h)if(y=Math.tan(c),g=-1*(f*(c*y+1)-c-.5*(c*c+u)*y)/((c-f)/y-1),c+=g,Math.abs(g)<=B){n=c;break}i=q(this.long0+Math.asin(s*Math.tan(c)/this.a)/Math.sin(n),this.over)}else if(Math.abs(o+this.ml0)<=B)n=0,i=q(this.long0+s/this.a,this.over);else{f=(this.ml0+o)/this.a,u=s*s/this.a/this.a+f*f,c=f;var M,v,E,x,b;for(h=gu;h;--h)if(b=this.e*Math.sin(c),M=Math.sqrt(1-b*b)*Math.tan(c),v=this.a*Ut(this.e0,this.e1,this.e2,this.e3,c),E=this.e0-2*this.e1*Math.cos(2*c)+4*this.e2*Math.cos(4*c)-6*this.e3*Math.cos(6*c),x=v/this.a,g=(f*(M*x+1)-x-.5*M*(x*x+u))/(this.es*Math.sin(2*c)*(x*x+u-2*f*x)/(4*M)+(f-x)*(M*E-2/Math.sin(2*c))-E),c-=g,Math.abs(g)<=B){n=c;break}M=Math.sqrt(1-this.es*Math.pow(Math.sin(n),2))*Math.tan(n),i=q(this.long0+Math.asin(s*M/this.a)/Math.sin(n),this.over)}return t.x=i,t.y=n,t}var P8=["Polyconic","American_Polyconic","poly"];const b8={init:E8,forward:x8,inverse:S8,names:P8};function A8(){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 G8(t){var i,n=t.x,s=t.y,o=s-this.lat0,h=n-this.long0,f=o/Rn*1e-5,u=h,c=1,g=0;for(i=1;i<=10;i++)c=c*f,g=g+this.A[i]*c;var y=g,M=u,v=1,E=0,x,b,A=0,C=0;for(i=1;i<=6;i++)x=v*y-E*M,b=E*y+v*M,v=x,E=b,A=A+this.B_re[i]*v-this.B_im[i]*E,C=C+this.B_im[i]*v+this.B_re[i]*E;return t.x=C*this.a+this.x0,t.y=A*this.a+this.y0,t}function I8(t){var i,n=t.x,s=t.y,o=n-this.x0,h=s-this.y0,f=h/this.a,u=o/this.a,c=1,g=0,y,M,v=0,E=0;for(i=1;i<=6;i++)y=c*f-g*u,M=g*f+c*u,c=y,g=M,v=v+this.C_re[i]*c-this.C_im[i]*g,E=E+this.C_im[i]*c+this.C_re[i]*g;for(var x=0;x<this.iterations;x++){var b=v,A=E,C,T,F=f,W=u;for(i=2;i<=6;i++)C=b*v-A*E,T=A*v+b*E,b=C,A=T,F=F+(i-1)*(this.B_re[i]*b-this.B_im[i]*A),W=W+(i-1)*(this.B_im[i]*b+this.B_re[i]*A);b=1,A=0;var $=this.B_re[1],X=this.B_im[1];for(i=2;i<=6;i++)C=b*v-A*E,T=A*v+b*E,b=C,A=T,$=$+i*(this.B_re[i]*b-this.B_im[i]*A),X=X+i*(this.B_im[i]*b+this.B_re[i]*A);var K=$*$+X*X;v=(F*$+W*X)/K,E=(W*$-F*X)/K}var j=v,rt=E,Mt=1,lt=0;for(i=1;i<=9;i++)Mt=Mt*j,lt=lt+this.D[i]*Mt;var xt=this.lat0+lt*Rn*1e5,bt=this.long0+rt;return t.x=bt,t.y=xt,t}var C8=["New_Zealand_Map_Grid","nzmg"];const N8={init:A8,forward:G8,inverse:I8,names:C8};function R8(){}function L8(t){var i=t.x,n=t.y,s=q(i-this.long0,this.over),o=this.x0+this.a*s,h=this.y0+this.a*Math.log(Math.tan(Math.PI/4+n/2.5))*1.25;return t.x=o,t.y=h,t}function O8(t){t.x-=this.x0,t.y-=this.y0;var i=q(this.long0+t.x/this.a,this.over),n=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=i,t.y=n,t}var T8=["Miller_Cylindrical","mill"];const B8={init:R8,forward:L8,inverse:O8,names:T8};var F8=20;function q8(){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=io(this.es)}function D8(t){var i,n,s=t.x,o=t.y;if(s=q(s-this.long0,this.over),this.sphere){if(!this.m)o=this.n!==1?Math.asin(this.n*Math.sin(o)):o;else for(var h=this.n*Math.sin(o),f=F8;f;--f){var u=(this.m*o+Math.sin(o)-h)/(this.m+Math.cos(o));if(o-=u,Math.abs(u)<B)break}i=this.a*this.C_x*s*(this.m+Math.cos(o)),n=this.a*this.C_y*o}else{var c=Math.sin(o),g=Math.cos(o);n=this.a*Vi(o,c,g,this.en),i=this.a*s*g/Math.sqrt(1-this.es*c*c)}return t.x=i,t.y=n,t}function U8(t){var i,n,s,o;return t.x-=this.x0,s=t.x/this.a,t.y-=this.y0,i=t.y/this.a,this.sphere?(i/=this.C_y,s=s/(this.C_x*(this.m+Math.cos(i))),this.m?i=ni((this.m*i+Math.sin(i))/this.n):this.n!==1&&(i=ni(Math.sin(i)/this.n)),s=q(s+this.long0,this.over),i=ri(i)):(i=no(t.y/this.a,this.es,this.en),o=Math.abs(i),o<O?(o=Math.sin(i),n=this.long0+t.x*Math.sqrt(1-this.es*o*o)/(this.a*Math.cos(i)),s=q(n,this.over)):o-B<O&&(s=this.long0)),t.x=s,t.y=i,t}var W8=["Sinusoidal","sinu"];const $8={init:q8,forward:D8,inverse:U8,names:W8};function z8(){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 X8(t){for(var i=t.x,n=t.y,s=q(i-this.long0,this.over),o=n,h=Math.PI*Math.sin(n);;){var f=-(o+Math.sin(o)-h)/(1+Math.cos(o));if(o+=f,Math.abs(f)<B)break}o/=2,Math.PI/2-Math.abs(n)<B&&(s=0);var u=.900316316158*this.a*s*Math.cos(o)+this.x0,c=1.4142135623731*this.a*Math.sin(o)+this.y0;return t.x=u,t.y=c,t}function k8(t){var i,n;t.x-=this.x0,t.y-=this.y0,n=t.y/(1.4142135623731*this.a),Math.abs(n)>.999999999999&&(n=.999999999999),i=Math.asin(n);var s=q(this.long0+t.x/(.900316316158*this.a*Math.cos(i)),this.over);s<-Math.PI&&(s=-Math.PI),s>Math.PI&&(s=Math.PI),n=(2*i+Math.sin(2*i))/Math.PI,Math.abs(n)>1&&(n=1);var o=Math.asin(n);return t.x=s,t.y=o,t}var H8=["Mollweide","moll"];const Y8={init:z8,forward:X8,inverse:k8,names:H8};function K8(){Math.abs(this.lat1+this.lat2)<B||(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=kn(this.es),this.e1=Hn(this.es),this.e2=Yn(this.es),this.e3=Kn(this.es),this.sin_phi=Math.sin(this.lat1),this.cos_phi=Math.cos(this.lat1),this.ms1=Ae(this.e,this.sin_phi,this.cos_phi),this.ml1=Ut(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<B?this.ns=this.sin_phi:(this.sin_phi=Math.sin(this.lat2),this.cos_phi=Math.cos(this.lat2),this.ms2=Ae(this.e,this.sin_phi,this.cos_phi),this.ml2=Ut(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=Ut(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function Q8(t){var i=t.x,n=t.y,s;if(this.sphere)s=this.a*(this.g-n);else{var o=Ut(this.e0,this.e1,this.e2,this.e3,n);s=this.a*(this.g-o)}var h=this.ns*q(i-this.long0,this.over),f=this.x0+s*Math.sin(h),u=this.y0+this.rh-s*Math.cos(h);return t.x=f,t.y=u,t}function J8(t){t.x-=this.x0,t.y=this.rh-t.y+this.y0;var i,n,s,o;this.ns>=0?(n=Math.sqrt(t.x*t.x+t.y*t.y),i=1):(n=-Math.sqrt(t.x*t.x+t.y*t.y),i=-1);var h=0;if(n!==0&&(h=Math.atan2(i*t.x,i*t.y)),this.sphere)return o=q(this.long0+h/this.ns,this.over),s=ri(this.g-n/this.a),t.x=o,t.y=s,t;var f=this.g-n/this.a;return s=hs(f,this.e0,this.e1,this.e2,this.e3),o=q(this.long0+h/this.ns,this.over),t.x=o,t.y=s,t}var Z8=["Equidistant_Conic","eqdc"];const V8={init:K8,forward:Q8,inverse:J8,names:Z8};function j8(){this.R=this.a}function tM(t){var i=t.x,n=t.y,s=q(i-this.long0,this.over),o,h;Math.abs(n)<=B&&(o=this.x0+this.R*s,h=this.y0);var f=ni(2*Math.abs(n/Math.PI));(Math.abs(s)<=B||Math.abs(Math.abs(n)-O)<=B)&&(o=this.x0,n>=0?h=this.y0+Math.PI*this.R*Math.tan(.5*f):h=this.y0+Math.PI*this.R*-Math.tan(.5*f));var u=.5*Math.abs(Math.PI/s-s/Math.PI),c=u*u,g=Math.sin(f),y=Math.cos(f),M=y/(g+y-1),v=M*M,E=M*(2/g-1),x=E*E,b=Math.PI*this.R*(u*(M-x)+Math.sqrt(c*(M-x)*(M-x)-(x+c)*(v-x)))/(x+c);s<0&&(b=-b),o=this.x0+b;var A=c+M;return b=Math.PI*this.R*(E*A-u*Math.sqrt((x+c)*(c+1)-A*A))/(x+c),n>=0?h=this.y0+b:h=this.y0-b,t.x=o,t.y=h,t}function eM(t){var i,n,s,o,h,f,u,c,g,y,M,v,E;return t.x-=this.x0,t.y-=this.y0,M=Math.PI*this.R,s=t.x/M,o=t.y/M,h=s*s+o*o,f=-Math.abs(o)*(1+h),u=f-2*o*o+s*s,c=-2*f+1+2*o*o+h*h,E=o*o/c+(2*u*u*u/c/c/c-9*f*u/c/c)/27,g=(f-u*u/3/c)/c,y=2*Math.sqrt(-g/3),M=3*E/g/y,Math.abs(M)>1&&(M>=0?M=1:M=-1),v=Math.acos(M)/3,t.y>=0?n=(-y*Math.cos(v+Math.PI/3)-u/3/c)*Math.PI:n=-(-y*Math.cos(v+Math.PI/3)-u/3/c)*Math.PI,Math.abs(s)<B?i=this.long0:i=q(this.long0+Math.PI*(h-1+Math.sqrt(1+2*(s*s-o*o)+h*h))/2/s,this.over),t.x=i,t.y=n,t}var iM=["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"];const nM={init:j8,forward:tM,inverse:eM,names:iM};function rM(t,i,n,s,o,h){const f=s-i,u=Math.atan((1-h)*Math.tan(t)),c=Math.atan((1-h)*Math.tan(n)),g=Math.sin(u),y=Math.cos(u),M=Math.sin(c),v=Math.cos(c);let E=f,x,b=100,A,C,T,F,W,$,X,K,j,rt,Mt,lt,xt,bt;do{if(A=Math.sin(E),C=Math.cos(E),T=Math.sqrt(v*A*(v*A)+(y*M-g*v*C)*(y*M-g*v*C)),T===0)return{azi1:0,s12:0};F=g*M+y*v*C,W=Math.atan2(T,F),$=y*v*A/T,X=1-$*$,K=X!==0?F-2*g*M/X:0,j=h/16*X*(4+h*(4-3*X)),x=E,E=f+(1-j)*h*$*(W+j*T*(K+j*F*(-1+2*K*K)))}while(Math.abs(E-x)>1e-12&&--b>0);return b===0?{azi1:NaN,s12:NaN}:(rt=X*(o*o-o*(1-h)*(o*(1-h)))/(o*(1-h)*(o*(1-h))),Mt=1+rt/16384*(4096+rt*(-768+rt*(320-175*rt))),lt=rt/1024*(256+rt*(-128+rt*(74-47*rt))),xt=lt*T*(K+lt/4*(F*(-1+2*K*K)-lt/6*K*(-3+4*T*T)*(-3+4*K*K))),bt=o*(1-h)*Mt*(W-xt),{azi1:Math.atan2(v*A,y*M-g*v*C),s12:bt})}function sM(t,i,n,s,o,h){const f=Math.atan((1-h)*Math.tan(t)),u=Math.sin(f),c=Math.cos(f),g=Math.sin(n),y=Math.cos(n),M=Math.atan2(u,c*y),v=c*g,E=1-v*v,x=E*(o*o-o*(1-h)*(o*(1-h)))/(o*(1-h)*(o*(1-h))),b=1+x/16384*(4096+x*(-768+x*(320-175*x))),A=x/1024*(256+x*(-128+x*(74-47*x)));let C=s/(o*(1-h)*b),T,F=100,W,$,X,K;do W=Math.cos(2*M+C),$=Math.sin(C),X=Math.cos(C),K=A*$*(W+A/4*(X*(-1+2*W*W)-A/6*W*(-3+4*$*$)*(-3+4*W*W))),T=C,C=s/(o*(1-h)*b)+K;while(Math.abs(C-T)>1e-12&&--F>0);if(F===0)return{lat2:NaN,lon2:NaN};const j=u*$-c*X*y,rt=Math.atan2(u*X+c*$*y,(1-h)*Math.sqrt(v*v+j*j)),Mt=Math.atan2($*g,c*X-u*$*y),lt=h/16*E*(4+h*(4-3*E)),xt=Mt-(1-lt)*h*v*(C+lt*$*(W+lt*X*(-1+2*W*W))),bt=i+xt;return{lat2:rt,lon2:bt}}function aM(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.f=this.es/(1+Math.sqrt(1-this.es))}function oM(t){var i=t.x,n=t.y,s=Math.sin(t.y),o=Math.cos(t.y),h=q(i-this.long0,this.over),f,u,c,g,y,M,v,E,x,b,A;return this.sphere?Math.abs(this.sin_p12-1)<=B?(t.x=this.x0+this.a*(O-n)*Math.sin(h),t.y=this.y0-this.a*(O-n)*Math.cos(h),t):Math.abs(this.sin_p12+1)<=B?(t.x=this.x0+this.a*(O+n)*Math.sin(h),t.y=this.y0+this.a*(O+n)*Math.cos(h),t):(x=this.sin_p12*s+this.cos_p12*o*Math.cos(h),v=Math.acos(x),E=v?v/Math.sin(v):1,t.x=this.x0+this.a*E*o*Math.sin(h),t.y=this.y0+this.a*E*(this.cos_p12*s-this.sin_p12*o*Math.cos(h)),t):(f=kn(this.es),u=Hn(this.es),c=Yn(this.es),g=Kn(this.es),Math.abs(this.sin_p12-1)<=B?(y=this.a*Ut(f,u,c,g,O),M=this.a*Ut(f,u,c,g,n),t.x=this.x0+(y-M)*Math.sin(h),t.y=this.y0-(y-M)*Math.cos(h),t):Math.abs(this.sin_p12+1)<=B?(y=this.a*Ut(f,u,c,g,O),M=this.a*Ut(f,u,c,g,n),t.x=this.x0+(y+M)*Math.sin(h),t.y=this.y0+(y+M)*Math.cos(h),t):Math.abs(i)<B&&Math.abs(n-this.lat0)<B?(t.x=t.y=0,t):(b=rM(this.lat0,this.long0,n,i,this.a,this.f),A=b.azi1,t.x=b.s12*Math.sin(A),t.y=b.s12*Math.cos(A),t))}function hM(t){t.x-=this.x0,t.y-=this.y0;var i,n,s,o,h,f,u,c,g,y,M,v,E,x,b,A;return this.sphere?(i=Math.sqrt(t.x*t.x+t.y*t.y),i>2*O*this.a?void 0:(n=i/this.a,s=Math.sin(n),o=Math.cos(n),h=this.long0,Math.abs(i)<=B?f=this.lat0:(f=ni(o*this.sin_p12+t.y*s*this.cos_p12/i),u=Math.abs(this.lat0)-O,Math.abs(u)<=B?this.lat0>=0?h=q(this.long0+Math.atan2(t.x,-t.y),this.over):h=q(this.long0-Math.atan2(-t.x,t.y),this.over):h=q(this.long0+Math.atan2(t.x*s,i*this.cos_p12*o-t.y*this.sin_p12*s),this.over)),t.x=h,t.y=f,t)):(c=kn(this.es),g=Hn(this.es),y=Yn(this.es),M=Kn(this.es),Math.abs(this.sin_p12-1)<=B?(v=this.a*Ut(c,g,y,M,O),i=Math.sqrt(t.x*t.x+t.y*t.y),E=v-i,f=hs(E/this.a,c,g,y,M),h=q(this.long0+Math.atan2(t.x,-1*t.y),this.over),t.x=h,t.y=f,t):Math.abs(this.sin_p12+1)<=B?(v=this.a*Ut(c,g,y,M,O),i=Math.sqrt(t.x*t.x+t.y*t.y),E=i-v,f=hs(E/this.a,c,g,y,M),h=q(this.long0+Math.atan2(t.x,t.y),this.over),t.x=h,t.y=f,t):(x=Math.atan2(t.x,t.y),b=Math.sqrt(t.x*t.x+t.y*t.y),A=sM(this.lat0,this.long0,x,b,this.a,this.f),t.x=A.lon2,t.y=A.lat2,t))}var uM=["Azimuthal_Equidistant","aeqd"];const fM={init:aM,forward:oM,inverse:hM,names:uM};function lM(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function cM(t){var i,n,s,o,h,f,u,c,g=t.x,y=t.y;return s=q(g-this.long0,this.over),i=Math.sin(y),n=Math.cos(y),o=Math.cos(s),f=this.sin_p14*i+this.cos_p14*n*o,h=1,(f>0||Math.abs(f)<=B)&&(u=this.a*h*n*Math.sin(s),c=this.y0+this.a*h*(this.cos_p14*i-this.sin_p14*n*o)),t.x=u,t.y=c,t}function _M(t){var i,n,s,o,h,f,u;return t.x-=this.x0,t.y-=this.y0,i=Math.sqrt(t.x*t.x+t.y*t.y),n=ni(i/this.a),s=Math.sin(n),o=Math.cos(n),f=this.long0,Math.abs(i)<=B?(u=this.lat0,t.x=f,t.y=u,t):(u=ni(o*this.sin_p14+t.y*s*this.cos_p14/i),h=Math.abs(this.lat0)-O,Math.abs(h)<=B?(this.lat0>=0?f=q(this.long0+Math.atan2(t.x,-t.y),this.over):f=q(this.long0-Math.atan2(-t.x,t.y),this.over),t.x=f,t.y=u,t):(f=q(this.long0+Math.atan2(t.x*s,i*this.cos_p14*o-t.y*this.sin_p14*s),this.over),t.x=f,t.y=u,t))}var gM=["ortho"];const vM={init:lM,forward:cM,inverse:_M,names:gM};var dt={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},ht={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function dM(){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>=O-ot/2?this.face=dt.TOP:this.lat0<=-(O-ot/2)?this.face=dt.BOTTOM:Math.abs(this.long0)<=ot?this.face=dt.FRONT:Math.abs(this.long0)<=O+ot?this.face=this.long0>0?dt.RIGHT:dt.LEFT:this.face=dt.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 MM(t){var i={x:0,y:0},n,s,o,h,f,u,c={value:0};if(t.x-=this.long0,this.es!==0?n=Math.atan(this.one_minus_f_squared*Math.tan(t.y)):n=t.y,s=t.x,this.face===dt.TOP)h=O-n,s>=ot&&s<=O+ot?(c.value=ht.AREA_0,o=s-O):s>O+ot||s<=-(O+ot)?(c.value=ht.AREA_1,o=s>0?s-Et:s+Et):s>-(O+ot)&&s<=-ot?(c.value=ht.AREA_2,o=s+O):(c.value=ht.AREA_3,o=s);else if(this.face===dt.BOTTOM)h=O+n,s>=ot&&s<=O+ot?(c.value=ht.AREA_0,o=-s+O):s<ot&&s>=-ot?(c.value=ht.AREA_1,o=-s):s<-ot&&s>=-(O+ot)?(c.value=ht.AREA_2,o=-s-O):(c.value=ht.AREA_3,o=s>0?-s+Et:-s-Et);else{var g,y,M,v,E,x,b;this.face===dt.RIGHT?s=Ki(s,+O):this.face===dt.BACK?s=Ki(s,+Et):this.face===dt.LEFT&&(s=Ki(s,-O)),v=Math.sin(n),E=Math.cos(n),x=Math.sin(s),b=Math.cos(s),g=E*b,y=E*x,M=v,this.face===dt.FRONT?(h=Math.acos(g),o=Hr(h,M,y,c)):this.face===dt.RIGHT?(h=Math.acos(y),o=Hr(h,M,-g,c)):this.face===dt.BACK?(h=Math.acos(-g),o=Hr(h,M,-y,c)):this.face===dt.LEFT?(h=Math.acos(-y),o=Hr(h,M,g,c)):(h=o=0,c.value=ht.AREA_0)}return u=Math.atan(12/Et*(o+Math.acos(Math.sin(o)*Math.cos(ot))-O)),f=Math.sqrt((1-Math.cos(h))/(Math.cos(u)*Math.cos(u))/(1-Math.cos(Math.atan(1/Math.cos(o))))),c.value===ht.AREA_1?u+=O:c.value===ht.AREA_2?u+=Et:c.value===ht.AREA_3&&(u+=1.5*Et),i.x=f*Math.cos(u),i.y=f*Math.sin(u),i.x=i.x*this.a+this.x0,i.y=i.y*this.a+this.y0,t.x=i.x,t.y=i.y,t}function mM(t){var i={lam:0,phi:0},n,s,o,h,f,u,c,g,y,M={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,s=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),n=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?M.value=ht.AREA_0:t.y>=0&&t.y>=Math.abs(t.x)?(M.value=ht.AREA_1,n-=O):t.x<0&&-t.x>=Math.abs(t.y)?(M.value=ht.AREA_2,n=n<0?n+Et:n-Et):(M.value=ht.AREA_3,n+=O),y=Et/12*Math.tan(n),f=Math.sin(y)/(Math.cos(y)-1/Math.sqrt(2)),u=Math.atan(f),o=Math.cos(n),h=Math.tan(s),c=1-o*o*h*h*(1-Math.cos(Math.atan(1/Math.cos(u)))),c<-1?c=-1:c>1&&(c=1),this.face===dt.TOP)g=Math.acos(c),i.phi=O-g,M.value===ht.AREA_0?i.lam=u+O:M.value===ht.AREA_1?i.lam=u<0?u+Et:u-Et:M.value===ht.AREA_2?i.lam=u-O:i.lam=u;else if(this.face===dt.BOTTOM)g=Math.acos(c),i.phi=g-O,M.value===ht.AREA_0?i.lam=-u+O:M.value===ht.AREA_1?i.lam=-u:M.value===ht.AREA_2?i.lam=-u-O:i.lam=u<0?-u-Et:-u+Et;else{var v,E,x;v=c,y=v*v,y>=1?x=0:x=Math.sqrt(1-y)*Math.sin(u),y+=x*x,y>=1?E=0:E=Math.sqrt(1-y),M.value===ht.AREA_1?(y=E,E=-x,x=y):M.value===ht.AREA_2?(E=-E,x=-x):M.value===ht.AREA_3&&(y=E,E=x,x=-y),this.face===dt.RIGHT?(y=v,v=-E,E=y):this.face===dt.BACK?(v=-v,E=-E):this.face===dt.LEFT&&(y=v,v=E,E=-y),i.phi=Math.acos(-x)-O,i.lam=Math.atan2(E,v),this.face===dt.RIGHT?i.lam=Ki(i.lam,-O):this.face===dt.BACK?i.lam=Ki(i.lam,-Et):this.face===dt.LEFT&&(i.lam=Ki(i.lam,+O))}if(this.es!==0){var b,A,C;b=i.phi<0?1:0,A=Math.tan(i.phi),C=this.b/Math.sqrt(A*A+this.one_minus_f_squared),i.phi=Math.atan(Math.sqrt(this.a*this.a-C*C)/(this.one_minus_f*C)),b&&(i.phi=-i.phi)}return i.lam+=this.long0,t.x=i.lam,t.y=i.phi,t}function Hr(t,i,n,s){var o;return t<B?(s.value=ht.AREA_0,o=0):(o=Math.atan2(i,n),Math.abs(o)<=ot?s.value=ht.AREA_0:o>ot&&o<=O+ot?(s.value=ht.AREA_1,o-=O):o>O+ot||o<=-(O+ot)?(s.value=ht.AREA_2,o=o>=0?o-Et:o+Et):(s.value=ht.AREA_3,o+=O)),o}function Ki(t,i){var n=t+i;return n<-Et?n+=Fn:n>+Et&&(n-=Fn),n}var yM=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const pM={init:dM,forward:MM,inverse:mM,names:yM};var Za=[[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]],Gn=[[-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]],tf=.8487,ef=1.3523,nf=Yt/5,wM=1/nf,ki=18,us=function(t,i){return t[0]+i*(t[1]+i*(t[2]+i*t[3]))},EM=function(t,i){return t[1]+i*(2*t[2]+i*3*t[3])};function xM(t,i,n,s){for(var o=i;s;--s){var h=t(o);if(o-=h,Math.abs(h)<n)break}return o}function SM(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function PM(t){var i=q(t.x-this.long0,this.over),n=Math.abs(t.y),s=Math.floor(n*nf);s<0?s=0:s>=ki&&(s=ki-1),n=Yt*(n-wM*s);var o={x:us(Za[s],n)*i,y:us(Gn[s],n)};return t.y<0&&(o.y=-o.y),o.x=o.x*this.a*tf+this.x0,o.y=o.y*this.a*ef+this.y0,o}function bM(t){var i={x:(t.x-this.x0)/(this.a*tf),y:Math.abs(t.y-this.y0)/(this.a*ef)};if(i.y>=1)i.x/=Za[ki][0],i.y=t.y<0?-O:O;else{var n=Math.floor(i.y*ki);for(n<0?n=0:n>=ki&&(n=ki-1);;)if(Gn[n][0]>i.y)--n;else if(Gn[n+1][0]<=i.y)++n;else break;var s=Gn[n],o=5*(i.y-s[0])/(Gn[n+1][0]-s[0]);o=xM(function(h){return(us(s,h)-i.y)/EM(s,h)},o,B,100),i.x/=us(Za[n],o),i.y=(5*n+o)*yt,t.y<0&&(i.y=-i.y)}return i.x=q(i.x+this.long0,this.over),i}var AM=["Robinson","robin"];const GM={init:SM,forward:PM,inverse:bM,names:AM};function IM(){this.name="geocent"}function CM(t){var i=zu(t,this.es,this.a);return i}function NM(t){var i=Xu(t,this.es,this.a,this.b);return i}var RM=["Geocentric","geocentric","geocent","Geocent"];const LM={init:IM,forward:CM,inverse:NM,names:RM};var Ot={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},xn={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 OM(){if(Object.keys(xn).forEach((function(n){if(typeof this[n]>"u")this[n]=xn[n].def;else{if(xn[n].num&&isNaN(this[n]))throw new Error("Invalid parameter value, must be numeric "+n+" = "+this[n]);xn[n].num&&(this[n]=parseFloat(this[n]))}xn[n].degrees&&(this[n]=this[n]*yt)}).bind(this)),Math.abs(Math.abs(this.lat0)-O)<B?this.mode=this.lat0<0?Ot.S_POLE:Ot.N_POLE:Math.abs(this.lat0)<B?this.mode=Ot.EQUIT:(this.mode=Ot.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 t=this.tilt,i=this.azi;this.cg=Math.cos(i),this.sg=Math.sin(i),this.cw=Math.cos(t),this.sw=Math.sin(t)}function TM(t){t.x-=this.long0;var i=Math.sin(t.y),n=Math.cos(t.y),s=Math.cos(t.x),o,h;switch(this.mode){case Ot.OBLIQ:h=this.sinph0*i+this.cosph0*n*s;break;case Ot.EQUIT:h=n*s;break;case Ot.S_POLE:h=-i;break;case Ot.N_POLE:h=i;break}switch(h=this.pn1/(this.p-h),o=h*n*Math.sin(t.x),this.mode){case Ot.OBLIQ:h*=this.cosph0*i-this.sinph0*n*s;break;case Ot.EQUIT:h*=i;break;case Ot.N_POLE:h*=-(n*s);break;case Ot.S_POLE:h*=n*s;break}var f,u;return f=h*this.cg+o*this.sg,u=1/(f*this.sw*this.h1+this.cw),o=(o*this.cg-h*this.sg)*this.cw*u,h=f*u,t.x=o*this.a,t.y=h*this.a,t}function BM(t){t.x/=this.a,t.y/=this.a;var i={x:t.x,y:t.y},n,s,o;o=1/(this.pn1-t.y*this.sw),n=this.pn1*t.x*o,s=this.pn1*t.y*this.cw*o,t.x=n*this.cg+s*this.sg,t.y=s*this.cg-n*this.sg;var h=Ht(t.x,t.y);if(Math.abs(h)<B)i.x=0,i.y=t.y;else{var f,u;switch(u=1-h*h*this.pfact,u=(this.p-Math.sqrt(u))/(this.pn1/h+h/this.pn1),f=Math.sqrt(1-u*u),this.mode){case Ot.OBLIQ:i.y=Math.asin(f*this.sinph0+t.y*u*this.cosph0/h),t.y=(f-this.sinph0*Math.sin(i.y))*h,t.x*=u*this.cosph0;break;case Ot.EQUIT:i.y=Math.asin(t.y*u/h),t.y=f*h,t.x*=u;break;case Ot.N_POLE:i.y=Math.asin(f),t.y=-t.y;break;case Ot.S_POLE:i.y=-Math.asin(f);break}i.x=Math.atan2(t.x,t.y)}return t.x=i.x+this.long0,t.y=i.y,t}var FM=["Tilted_Perspective","tpers"];const qM={init:OM,forward:TM,inverse:BM,names:FM};function DM(){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 t=1-this.es,i=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=i,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 UM(t){var i=t.x,n=t.y,s,o,h,f;if(i=i-this.long0,this.shape==="ellipse"){n=Math.atan(this.radius_p2*Math.tan(n));var u=this.radius_p/Ht(this.radius_p*Math.cos(n),Math.sin(n));if(o=u*Math.cos(i)*Math.cos(n),h=u*Math.sin(i)*Math.cos(n),f=u*Math.sin(n),(this.radius_g-o)*o-h*h-f*f*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;s=this.radius_g-o,this.flip_axis?(t.x=this.radius_g_1*Math.atan(h/Ht(f,s)),t.y=this.radius_g_1*Math.atan(f/s)):(t.x=this.radius_g_1*Math.atan(h/s),t.y=this.radius_g_1*Math.atan(f/Ht(h,s)))}else this.shape==="sphere"&&(s=Math.cos(n),o=Math.cos(i)*s,h=Math.sin(i)*s,f=Math.sin(n),s=this.radius_g-o,this.flip_axis?(t.x=this.radius_g_1*Math.atan(h/Ht(f,s)),t.y=this.radius_g_1*Math.atan(f/s)):(t.x=this.radius_g_1*Math.atan(h/s),t.y=this.radius_g_1*Math.atan(f/Ht(h,s))));return t.x=t.x*this.a,t.y=t.y*this.a,t}function WM(t){var i=-1,n=0,s=0,o,h,f,u;if(t.x=t.x/this.a,t.y=t.y/this.a,this.shape==="ellipse"){this.flip_axis?(s=Math.tan(t.y/this.radius_g_1),n=Math.tan(t.x/this.radius_g_1)*Ht(1,s)):(n=Math.tan(t.x/this.radius_g_1),s=Math.tan(t.y/this.radius_g_1)*Ht(1,n));var c=s/this.radius_p;if(o=n*n+c*c+i*i,h=2*this.radius_g*i,f=h*h-4*o*this.C,f<0)return t.x=Number.NaN,t.y=Number.NaN,t;u=(-h-Math.sqrt(f))/(2*o),i=this.radius_g+u*i,n*=u,s*=u,t.x=Math.atan2(n,i),t.y=Math.atan(s*Math.cos(t.x)/i),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if(this.shape==="sphere"){if(this.flip_axis?(s=Math.tan(t.y/this.radius_g_1),n=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+s*s)):(n=Math.tan(t.x/this.radius_g_1),s=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+n*n)),o=n*n+s*s+i*i,h=2*this.radius_g*i,f=h*h-4*o*this.C,f<0)return t.x=Number.NaN,t.y=Number.NaN,t;u=(-h-Math.sqrt(f))/(2*o),i=this.radius_g+u*i,n*=u,s*=u,t.x=Math.atan2(n,i),t.y=Math.atan(s*Math.cos(t.x)/i)}return t.x=t.x+this.long0,t}var $M=["Geostationary Satellite View","Geostationary_Satellite","geos"];const zM={init:DM,forward:UM,inverse:WM,names:$M};var Ln=1.340264,On=-.081106,Tn=893e-6,Bn=.003796,fs=Math.sqrt(3)/2;function XM(){this.es=0,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}function kM(t){var i=q(t.x-this.long0,this.over),n=t.y,s=Math.asin(fs*Math.sin(n)),o=s*s,h=o*o*o;return t.x=i*Math.cos(s)/(fs*(Ln+3*On*o+h*(7*Tn+9*Bn*o))),t.y=s*(Ln+On*o+h*(Tn+Bn*o)),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function HM(t){t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a;var i=1e-9,n=12,s=t.y,o,h,f,u,c,g;for(g=0;g<n&&(o=s*s,h=o*o*o,f=s*(Ln+On*o+h*(Tn+Bn*o))-t.y,u=Ln+3*On*o+h*(7*Tn+9*Bn*o),s-=c=f/u,!(Math.abs(c)<i));++g);return o=s*s,h=o*o*o,t.x=fs*t.x*(Ln+3*On*o+h*(7*Tn+9*Bn*o))/Math.cos(s),t.y=Math.asin(Math.sin(s)/fs),t.x=q(t.x+this.long0,this.over),t}var YM=["eqearth","Equal Earth","Equal_Earth"];const KM={init:XM,forward:kM,inverse:HM,names:YM};var Un=1e-10;function QM(){var t;if(this.phi1=this.lat1,Math.abs(this.phi1)<Un)throw new Error;this.es?(this.en=io(this.es),this.m1=Vi(this.phi1,this.am1=Math.sin(this.phi1),t=Math.cos(this.phi1),this.en),this.am1=t/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=ZM,this.forward=JM):(Math.abs(this.phi1)+Un>=O?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=jM,this.forward=VM)}function JM(t){var i=q(t.x-(this.long0||0),this.over),n=t.y,s,o,h;return s=this.am1+this.m1-Vi(n,o=Math.sin(n),h=Math.cos(n),this.en),o=h*i/(s*Math.sqrt(1-this.es*o*o)),t.x=s*Math.sin(o),t.y=this.am1-s*Math.cos(o),t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function ZM(t){t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var i,n,s,o;if(n=Ht(t.x,t.y=this.am1-t.y),o=no(this.am1+this.m1-n,this.es,this.en),(i=Math.abs(o))<O)i=Math.sin(o),s=n*Math.atan2(t.x,t.y)*Math.sqrt(1-this.es*i*i)/Math.cos(o);else if(Math.abs(i-O)<=Un)s=0;else throw new Error;return t.x=q(s+(this.long0||0),this.over),t.y=ri(o),t}function VM(t){var i=q(t.x-(this.long0||0),this.over),n=t.y,s,o;return o=this.cphi1+this.phi1-n,Math.abs(o)>Un?(t.x=o*Math.sin(s=i*Math.cos(n)/o),t.y=this.cphi1-o*Math.cos(s)):t.x=t.y=0,t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function jM(t){t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var i,n,s=Ht(t.x,t.y=this.cphi1-t.y);if(n=this.cphi1+this.phi1-s,Math.abs(n)>O)throw new Error;return Math.abs(Math.abs(n)-O)<=Un?i=0:i=s*Math.atan2(t.x,t.y)/Math.cos(n),t.x=q(i+(this.long0||0),this.over),t.y=ri(n),t}var tm=["bonne","Bonne (Werner lat_1=90)"];const em={init:QM,names:tm},vu={OBLIQUE:{forward:am,inverse:hm},TRANSVERSE:{forward:om,inverse:um}},ls={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 im(){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=Du.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);const t=this.projStr.replace("+proj=ob_tran","").replace("+o_proj=","+proj=").trim(),i=le(t);if(!i)throw new Error("Invalid parameter: o_proj. Unknown projection "+this.o_proj);i.long0=0,this.obliqueProjection=i;let n;const s=Object.keys(ls),o=u=>{if(typeof this[u]>"u")return;const c=parseFloat(this[u])*yt;if(isNaN(c))throw new Error("Invalid value for "+u+": "+this[u]);return c};for(let u=0;u<s.length;u++){const c=s[u],g=ls[c],y=Object.entries(g);if(y.some(([v])=>typeof this[v]<"u")){n=g;for(let v=0;v<y.length;v++){const[E,x]=y[v],b=o(E);if(typeof b>"u")throw new Error("Missing parameter: "+E+".");this[x]=b}break}}if(!n)throw new Error("No valid parameters provided for ob_tran projection.");const{lamp:h,phip:f}=sm(this,n);this.lamp=h,Math.abs(f)>B?(this.cphip=Math.cos(f),this.sphip=Math.sin(f),this.projectionType=vu.OBLIQUE):this.projectionType=vu.TRANSVERSE}function nm(t){return this.projectionType.forward(this,t)}function rm(t){return this.projectionType.inverse(this,t)}function sm(t,i){let n,s;if(i===ls.ROTATE){let o=t.oLongC,h=t.oLatC,f=t.oAlpha;if(Math.abs(Math.abs(h)-O)<=B)throw new Error("Invalid value for o_lat_c: "+t.o_lat_c+" should be < 90°");s=o+Math.atan2(-1*Math.cos(f),-1*Math.sin(f)*Math.sin(h)),n=Math.asin(Math.cos(h)*Math.sin(f))}else if(i===ls.NEW_POLE)s=t.oLongP,n=t.oLatP;else{let o=t.oLong1,h=t.oLat1,f=t.oLong2,u=t.oLat2,c=Math.abs(h);if(Math.abs(h)>O-B)throw new Error("Invalid value for o_lat_1: "+t.o_lat_1+" should be < 90°");if(Math.abs(u)>O-B)throw new Error("Invalid value for o_lat_2: "+t.o_lat_2+" should be < 90°");if(Math.abs(h-u)<B)throw new Error("Invalid value for o_lat_1 and o_lat_2: o_lat_1 should be different from o_lat_2");if(c<B)throw new Error("Invalid value for o_lat_1: o_lat_1 should be different from zero");s=Math.atan2(Math.cos(h)*Math.sin(u)*Math.cos(o)-Math.sin(h)*Math.cos(u)*Math.cos(f),Math.sin(h)*Math.cos(u)*Math.sin(f)-Math.cos(h)*Math.sin(u)*Math.sin(o)),n=Math.atan(-1*Math.cos(s-o)/Math.tan(h))}return{lamp:s,phip:n}}function am(t,i){let{x:n,y:s}=i;n+=t.long0;const o=Math.cos(n),h=Math.sin(s),f=Math.cos(s);i.x=q(Math.atan2(f*Math.sin(n),t.sphip*f*o+t.cphip*h)+t.lamp),i.y=Math.asin(t.sphip*h-t.cphip*f*o);const u=t.obliqueProjection.forward(i);return t.isIdentity&&(u.x*=Yt,u.y*=Yt),u}function om(t,i){let{x:n,y:s}=i;n+=t.long0;const o=Math.cos(s),h=Math.cos(n);i.x=q(Math.atan2(o*Math.sin(n),Math.sin(s))+t.lamp),i.y=Math.asin(-1*o*h);const f=t.obliqueProjection.forward(i);return t.isIdentity&&(f.x*=Yt,f.y*=Yt),f}function hm(t,i){t.isIdentity&&(i.x*=yt,i.y*=yt);const n=t.obliqueProjection.inverse(i);let{x:s,y:o}=n;if(s<Number.MAX_VALUE){s-=t.lamp;const h=Math.cos(s),f=Math.sin(o),u=Math.cos(o);i.x=Math.atan2(u*Math.sin(s),t.sphip*u*h-t.cphip*f),i.y=Math.asin(t.sphip*f+t.cphip*u*h)}return i.x=q(i.x+t.long0),i}function um(t,i){t.isIdentity&&(i.x*=yt,i.y*=yt);const n=t.obliqueProjection.inverse(i);let{x:s,y:o}=n;if(s<Number.MAX_VALUE){const h=Math.cos(o);s-=t.lamp,i.x=Math.atan2(h*Math.sin(s),-1*Math.sin(o)),i.y=Math.asin(h*Math.cos(s))}return i.x=q(i.x+t.long0),i}var fm=["General Oblique Transformation","General_Oblique_Transformation","ob_tran"];const lm={init:im,forward:nm,inverse:rm,names:fm};function cm(t){t.Proj.projections.add(ts),t.Proj.projections.add(es),t.Proj.projections.add(t3),t.Proj.projections.add(u3),t.Proj.projections.add(g3),t.Proj.projections.add(y3),t.Proj.projections.add(P3),t.Proj.projections.add(C3),t.Proj.projections.add(T3),t.Proj.projections.add(U3),t.Proj.projections.add(j3),t.Proj.projections.add(s8),t.Proj.projections.add(f8),t.Proj.projections.add(d8),t.Proj.projections.add(w8),t.Proj.projections.add(b8),t.Proj.projections.add(N8),t.Proj.projections.add(B8),t.Proj.projections.add($8),t.Proj.projections.add(Y8),t.Proj.projections.add(V8),t.Proj.projections.add(nM),t.Proj.projections.add(fM),t.Proj.projections.add(vM),t.Proj.projections.add(pM),t.Proj.projections.add(GM),t.Proj.projections.add(LM),t.Proj.projections.add(qM),t.Proj.projections.add(zM),t.Proj.projections.add(KM),t.Proj.projections.add(em),t.Proj.projections.add(lm)}const mi=Object.assign(Md,{defaultDatum:"WGS84",Proj:le,WGS84:new le("WGS84"),Point:Ji,toPoint:ku,defs:Ct,nadgrid:jv,transform:os,mgrs:md,version:"__VERSION__"});cm(mi);function wi(t,i=0){if(!rf(t))return Number.NaN;if(i===0)return Math.round(t);const n=Math.pow(10,i);return Math.round(t*n)/n}function _m(t,i){if(Array.isArray(i)&&i.length>2){const n=i.map(h=>Math.abs(t-h)),s=n.reduce((h,f)=>h>f?f:h),o=n.indexOf(s);return typeof i[o]!="number"||isNaN(i[o])?t:i[o]}return t}function rf(t){return t!=null&&!Number.isNaN(Number(t))&&(typeof t!="string"||t.length!==0)}const gm=/\B(?=(\d{3})+(?!\d))/g;function vm(t,i="'"){const n=".",s=`${t}`.split(n);return typeof s[0]!="string"||s[0].length===0?`${t}`:(s[0]=s[0].replace(gm,i),s.join(n))}var Dt=63710088e-1,sf={centimeters:Dt*100,centimetres:Dt*100,degrees:360/(2*Math.PI),feet:Dt*3.28084,inches:Dt*39.37,kilometers:Dt/1e3,kilometres:Dt/1e3,meters:Dt,metres:Dt,miles:Dt/1609.344,millimeters:Dt*1e3,millimetres:Dt*1e3,nauticalmiles:Dt/1852,radians:1,yards:Dt*1.0936};function Ge(t,i,n={}){const s={type:"Feature"};return(n.id===0||n.id)&&(s.id=n.id),n.bbox&&(s.bbox=n.bbox),s.properties=i||{},s.geometry=t,s}function Mi(t,i,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Mu(t[0])||!Mu(t[1]))throw new Error("coordinates must contain numbers");return Ge({type:"Point",coordinates:t},i,n)}function dm(t,i,n={}){return ce(t.map(s=>Mi(s,i)),n)}function af(t,i,n={}){for(const o of t){if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(o[o.length-1].length!==o[0].length)throw new Error("First and last Position are not equivalent.");for(let h=0;h<o[o.length-1].length;h++)if(o[o.length-1][h]!==o[0][h])throw new Error("First and last Position are not equivalent.")}return Ge({type:"Polygon",coordinates:t},i,n)}function Wn(t,i,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return Ge({type:"LineString",coordinates:t},i,n)}function ce(t,i={}){const n={type:"FeatureCollection"};return i.id&&(n.id=i.id),i.bbox&&(n.bbox=i.bbox),n.features=t,n}function Mm(t,i,n={}){return Ge({type:"MultiLineString",coordinates:t},i,n)}function mm(t,i,n={}){return Ge({type:"MultiPolygon",coordinates:t},i,n)}function of(t,i="kilometers"){const n=sf[i];if(!n)throw new Error(i+" units is invalid");return t*n}function ym(t,i="kilometers"){const n=sf[i];if(!n)throw new Error(i+" units is invalid");return t/n}function du(t){return t%(2*Math.PI)*180/Math.PI}function Hi(t){return t%360*Math.PI/180}function Mu(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function pm(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function We(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return[...t.geometry.coordinates];if(t.type==="Point")return[...t.coordinates]}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return[...t];throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Qi(t){if(Array.isArray(t))return t;if(t.type==="Feature"){if(t.geometry!==null)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function hf(t){return t.type==="Feature"?t.geometry:t}function mu(t,i){return t.type==="FeatureCollection"?"FeatureCollection":t.type==="GeometryCollection"?"GeometryCollection":t.type==="Feature"&&t.geometry!==null?t.geometry.type:t.type}function ns(t,i,n={}){var s=We(t),o=We(i),h=Hi(o[1]-s[1]),f=Hi(o[0]-s[0]),u=Hi(s[1]),c=Hi(o[1]),g=Math.pow(Math.sin(h/2),2)+Math.pow(Math.sin(f/2),2)*Math.cos(u)*Math.cos(c);return of(2*Math.atan2(Math.sqrt(g),Math.sqrt(1-g)),n.units)}function uo(t,i,n){if(t!==null)for(var s,o,h,f,u,c,g,y=0,M=0,v,E=t.type,x=E==="FeatureCollection",b=E==="Feature",A=x?t.features.length:1,C=0;C<A;C++){g=x?t.features[C].geometry:b?t.geometry:t,v=g?g.type==="GeometryCollection":!1,u=v?g.geometries.length:1;for(var T=0;T<u;T++){var F=0,W=0;if(f=v?g.geometries[T]:g,f!==null){c=f.coordinates;var $=f.type;switch(y=0,$){case null:break;case"Point":if(i(c,M,C,F,W)===!1)return!1;M++,F++;break;case"LineString":case"MultiPoint":for(s=0;s<c.length;s++){if(i(c[s],M,C,F,W)===!1)return!1;M++,$==="MultiPoint"&&F++}$==="LineString"&&F++;break;case"Polygon":case"MultiLineString":for(s=0;s<c.length;s++){for(o=0;o<c[s].length-y;o++){if(i(c[s][o],M,C,F,W)===!1)return!1;M++}$==="MultiLineString"&&F++,$==="Polygon"&&W++}$==="Polygon"&&F++;break;case"MultiPolygon":for(s=0;s<c.length;s++){for(W=0,o=0;o<c[s].length;o++){for(h=0;h<c[s][o].length-y;h++){if(i(c[s][o][h],M,C,F,W)===!1)return!1;M++}W++}F++}break;case"GeometryCollection":for(s=0;s<f.geometries.length;s++)if(uo(f.geometries[s],i)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Qn(t,i){if(t.type==="Feature")i(t,0);else if(t.type==="FeatureCollection")for(var n=0;n<t.features.length&&i(t.features[n],n)!==!1;n++);}function wm(t,i,n){var s=n;return Qn(t,function(o,h){h===0&&n===void 0?s=o:s=i(s,o,h)}),s}function uf(t,i){var n,s,o,h,f,u,c,g,y,M,v=0,E=t.type==="FeatureCollection",x=t.type==="Feature",b=E?t.features.length:1;for(n=0;n<b;n++){for(u=E?t.features[n].geometry:x?t.geometry:t,g=E?t.features[n].properties:x?t.properties:{},y=E?t.features[n].bbox:x?t.bbox:void 0,M=E?t.features[n].id:x?t.id:void 0,c=u?u.type==="GeometryCollection":!1,f=c?u.geometries.length:1,o=0;o<f;o++){if(h=c?u.geometries[o]:u,h===null){if(i(null,v,g,y,M)===!1)return!1;continue}switch(h.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(i(h,v,g,y,M)===!1)return!1;break}case"GeometryCollection":{for(s=0;s<h.geometries.length;s++)if(i(h.geometries[s],v,g,y,M)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}v++}}function fo(t,i){uf(t,function(n,s,o,h,f){var u=n===null?null:n.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return i(Ge(n,o,{bbox:h,id:f}),s,0)===!1?!1:void 0}var c;switch(u){case"MultiPoint":c="Point";break;case"MultiLineString":c="LineString";break;case"MultiPolygon":c="Polygon";break}for(var g=0;g<n.coordinates.length;g++){var y=n.coordinates[g],M={type:c,coordinates:y};if(i(Ge(M,o),s,g)===!1)return!1}})}function di(t,i={}){if(t.bbox!=null&&i.recompute!==!0)return t.bbox;const n=[1/0,1/0,-1/0,-1/0];return uo(t,s=>{n[0]>s[0]&&(n[0]=s[0]),n[1]>s[1]&&(n[1]=s[1]),n[2]<s[0]&&(n[2]=s[0]),n[3]<s[1]&&(n[3]=s[1])}),n}function ff(t,i={}){const n=Number(t[0]),s=Number(t[1]),o=Number(t[2]),h=Number(t[3]);if(t.length===6)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");const f=[n,s];return af([[f,[o,s],[o,h],[n,h],f]],i.properties,{bbox:t,id:i.id})}const $e=11102230246251565e-32,Lt=134217729,Em=(3+8*$e)*$e;function Ua(t,i,n,s,o){let h,f,u,c,g=i[0],y=s[0],M=0,v=0;y>g==y>-g?(h=g,g=i[++M]):(h=y,y=s[++v]);let E=0;if(M<t&&v<n)for(y>g==y>-g?(f=g+h,u=h-(f-g),g=i[++M]):(f=y+h,u=h-(f-y),y=s[++v]),h=f,u!==0&&(o[E++]=u);M<t&&v<n;)y>g==y>-g?(f=h+g,c=f-h,u=h-(f-c)+(g-c),g=i[++M]):(f=h+y,c=f-h,u=h-(f-c)+(y-c),y=s[++v]),h=f,u!==0&&(o[E++]=u);for(;M<t;)f=h+g,c=f-h,u=h-(f-c)+(g-c),g=i[++M],h=f,u!==0&&(o[E++]=u);for(;v<n;)f=h+y,c=f-h,u=h-(f-c)+(y-c),y=s[++v],h=f,u!==0&&(o[E++]=u);return(h!==0||E===0)&&(o[E++]=h),E}function xm(t,i){let n=i[0];for(let s=1;s<t;s++)n+=i[s];return n}function Jn(t){return new Float64Array(t)}const Sm=(3+16*$e)*$e,Pm=(2+12*$e)*$e,bm=(9+64*$e)*$e*$e,qi=Jn(4),yu=Jn(8),pu=Jn(12),wu=Jn(16),qt=Jn(4);function Am(t,i,n,s,o,h,f){let u,c,g,y,M,v,E,x,b,A,C,T,F,W,$,X,K,j;const rt=t-o,Mt=n-o,lt=i-h,xt=s-h;W=rt*xt,v=Lt*rt,E=v-(v-rt),x=rt-E,v=Lt*xt,b=v-(v-xt),A=xt-b,$=x*A-(W-E*b-x*b-E*A),X=lt*Mt,v=Lt*lt,E=v-(v-lt),x=lt-E,v=Lt*Mt,b=v-(v-Mt),A=Mt-b,K=x*A-(X-E*b-x*b-E*A),C=$-K,M=$-C,qi[0]=$-(C+M)+(M-K),T=W+C,M=T-W,F=W-(T-M)+(C-M),C=F-X,M=F-C,qi[1]=F-(C+M)+(M-X),j=T+C,M=j-T,qi[2]=T-(j-M)+(C-M),qi[3]=j;let bt=xm(4,qi),Ie=Pm*f;if(bt>=Ie||-bt>=Ie||(M=t-rt,u=t-(rt+M)+(M-o),M=n-Mt,g=n-(Mt+M)+(M-o),M=i-lt,c=i-(lt+M)+(M-h),M=s-xt,y=s-(xt+M)+(M-h),u===0&&c===0&&g===0&&y===0)||(Ie=bm*f+Em*Math.abs(bt),bt+=rt*y+xt*u-(lt*g+Mt*c),bt>=Ie||-bt>=Ie))return bt;W=u*xt,v=Lt*u,E=v-(v-u),x=u-E,v=Lt*xt,b=v-(v-xt),A=xt-b,$=x*A-(W-E*b-x*b-E*A),X=c*Mt,v=Lt*c,E=v-(v-c),x=c-E,v=Lt*Mt,b=v-(v-Mt),A=Mt-b,K=x*A-(X-E*b-x*b-E*A),C=$-K,M=$-C,qt[0]=$-(C+M)+(M-K),T=W+C,M=T-W,F=W-(T-M)+(C-M),C=F-X,M=F-C,qt[1]=F-(C+M)+(M-X),j=T+C,M=j-T,qt[2]=T-(j-M)+(C-M),qt[3]=j;const _s=Ua(4,qi,4,qt,yu);W=rt*y,v=Lt*rt,E=v-(v-rt),x=rt-E,v=Lt*y,b=v-(v-y),A=y-b,$=x*A-(W-E*b-x*b-E*A),X=lt*g,v=Lt*lt,E=v-(v-lt),x=lt-E,v=Lt*g,b=v-(v-g),A=g-b,K=x*A-(X-E*b-x*b-E*A),C=$-K,M=$-C,qt[0]=$-(C+M)+(M-K),T=W+C,M=T-W,F=W-(T-M)+(C-M),C=F-X,M=F-C,qt[1]=F-(C+M)+(M-X),j=T+C,M=j-T,qt[2]=T-(j-M)+(C-M),qt[3]=j;const gs=Ua(_s,yu,4,qt,pu);W=u*y,v=Lt*u,E=v-(v-u),x=u-E,v=Lt*y,b=v-(v-y),A=y-b,$=x*A-(W-E*b-x*b-E*A),X=c*g,v=Lt*c,E=v-(v-c),x=c-E,v=Lt*g,b=v-(v-g),A=g-b,K=x*A-(X-E*b-x*b-E*A),C=$-K,M=$-C,qt[0]=$-(C+M)+(M-K),T=W+C,M=T-W,F=W-(T-M)+(C-M),C=F-X,M=F-C,qt[1]=F-(C+M)+(M-X),j=T+C,M=j-T,qt[2]=T-(j-M)+(C-M),qt[3]=j;const Ce=Ua(gs,pu,4,qt,wu);return wu[Ce-1]}function Gm(t,i,n,s,o,h){const f=(i-h)*(n-o),u=(t-o)*(s-h),c=f-u,g=Math.abs(f+u);return Math.abs(c)>=Sm*g?c:-Am(t,i,n,s,o,h,g)}function Im(t,i){var n,s,o=0,h,f,u,c,g,y,M,v=t[0],E=t[1],x=i.length;for(n=0;n<x;n++){s=0;var b=i[n],A=b.length-1;if(y=b[0],y[0]!==b[A][0]&&y[1]!==b[A][1])throw new Error("First and last coordinates in a ring must be the same");for(f=y[0]-v,u=y[1]-E,s;s<A;s++){if(M=b[s+1],c=M[0]-v,g=M[1]-E,u===0&&g===0){if(c<=0&&f>=0||f<=0&&c>=0)return 0}else if(g>=0&&u<=0||g<=0&&u>=0){if(h=Gm(f,c,u,g,0,0),h===0)return 0;(h>0&&g>0&&u<=0||h<0&&g<=0&&u>0)&&o++}y=M,u=g,f=c}}return o%2!==0}function Cm(t,i,n={}){if(!t)throw new Error("point is required");if(!i)throw new Error("polygon is required");const s=We(t),o=hf(i),h=o.type,f=i.bbox;let u=o.coordinates;if(f&&Nm(s,f)===!1)return!1;h==="Polygon"&&(u=[u]);let c=!1;for(var g=0;g<u.length;++g){const y=Im(s,u[g]);if(y===0)return!n.ignoreBoundary;y&&(c=!0)}return c}function Nm(t,i){return i[0]<=t[0]&&i[1]<=t[1]&&i[2]>=t[0]&&i[3]>=t[1]}class lf{constructor(i=[],n=Rm){if(this.data=i,this.length=this.data.length,this.compare=n,this.length>0)for(let s=(this.length>>1)-1;s>=0;s--)this._down(s)}push(i){this.data.push(i),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const i=this.data[0],n=this.data.pop();return this.length--,this.length>0&&(this.data[0]=n,this._down(0)),i}peek(){return this.data[0]}_up(i){const{data:n,compare:s}=this,o=n[i];for(;i>0;){const h=i-1>>1,f=n[h];if(s(o,f)>=0)break;n[i]=f,i=h}n[i]=o}_down(i){const{data:n,compare:s}=this,o=this.length>>1,h=n[i];for(;i<o;){let f=(i<<1)+1,u=n[f];const c=f+1;if(c<this.length&&s(n[c],u)<0&&(f=c,u=n[c]),s(u,h)>=0)break;n[i]=u,i=f}n[i]=h}}function Rm(t,i){return t<i?-1:t>i?1:0}function cf(t,i){return t.p.x>i.p.x?1:t.p.x<i.p.x?-1:t.p.y!==i.p.y?t.p.y>i.p.y?1:-1:1}function Lm(t,i){return t.rightSweepEvent.p.x>i.rightSweepEvent.p.x?1:t.rightSweepEvent.p.x<i.rightSweepEvent.p.x?-1:t.rightSweepEvent.p.y!==i.rightSweepEvent.p.y?t.rightSweepEvent.p.y<i.rightSweepEvent.p.y?1:-1:1}class Eu{constructor(i,n,s,o){this.p={x:i[0],y:i[1]},this.featureId=n,this.ringId=s,this.eventId=o,this.otherEvent=null,this.isLeftEndpoint=null}isSamePoint(i){return this.p.x===i.p.x&&this.p.y===i.p.y}}function Om(t,i){if(t.type==="FeatureCollection"){const n=t.features;for(let s=0;s<n.length;s++)xu(n[s],i)}else xu(t,i)}let Yr=0,Kr=0,Qr=0;function xu(t,i){const n=t.type==="Feature"?t.geometry:t;let s=n.coordinates;(n.type==="Polygon"||n.type==="MultiLineString")&&(s=[s]),n.type==="LineString"&&(s=[[s]]);for(let o=0;o<s.length;o++)for(let h=0;h<s[o].length;h++){let f=s[o][h][0],u=null;Kr=Kr+1;for(let c=0;c<s[o][h].length-1;c++){u=s[o][h][c+1];const g=new Eu(f,Yr,Kr,Qr),y=new Eu(u,Yr,Kr,Qr+1);g.otherEvent=y,y.otherEvent=g,cf(g,y)>0?(y.isLeftEndpoint=!0,g.isLeftEndpoint=!1):(g.isLeftEndpoint=!0,y.isLeftEndpoint=!1),i.push(g),i.push(y),f=u,Qr=Qr+1}}Yr=Yr+1}class Tm{constructor(i){this.leftSweepEvent=i,this.rightSweepEvent=i.otherEvent}}function Bm(t,i){if(t===null||i===null||t.leftSweepEvent.ringId===i.leftSweepEvent.ringId&&(t.rightSweepEvent.isSamePoint(i.leftSweepEvent)||t.rightSweepEvent.isSamePoint(i.leftSweepEvent)||t.rightSweepEvent.isSamePoint(i.rightSweepEvent)||t.leftSweepEvent.isSamePoint(i.leftSweepEvent)||t.leftSweepEvent.isSamePoint(i.rightSweepEvent)))return!1;const n=t.leftSweepEvent.p.x,s=t.leftSweepEvent.p.y,o=t.rightSweepEvent.p.x,h=t.rightSweepEvent.p.y,f=i.leftSweepEvent.p.x,u=i.leftSweepEvent.p.y,c=i.rightSweepEvent.p.x,g=i.rightSweepEvent.p.y,y=(g-u)*(o-n)-(c-f)*(h-s),M=(c-f)*(s-u)-(g-u)*(n-f),v=(o-n)*(s-u)-(h-s)*(n-f);if(y===0)return!1;const E=M/y,x=v/y;if(E>=0&&E<=1&&x>=0&&x<=1){const b=n+E*(o-n),A=s+E*(h-s);return[b,A]}return!1}function Fm(t,i){i=i||!1;const n=[],s=new lf([],Lm);for(;t.length;){const o=t.pop();if(o.isLeftEndpoint){const h=new Tm(o);for(let f=0;f<s.data.length;f++){const u=s.data[f];if(i&&u.leftSweepEvent.featureId===o.featureId)continue;const c=Bm(h,u);c!==!1&&n.push(c)}s.push(h)}else o.isLeftEndpoint===!1&&s.pop()}return n}function qm(t,i){const n=new lf([],cf);return Om(t,n),Fm(n,i)}var Dm=qm;function Um(t,i,n={}){const{removeDuplicates:s=!0,ignoreSelfIntersections:o=!0}=n;let h=[];t.type==="FeatureCollection"?h=h.concat(t.features):t.type==="Feature"?h.push(t):(t.type==="LineString"||t.type==="Polygon"||t.type==="MultiLineString"||t.type==="MultiPolygon")&&h.push(Ge(t)),i.type==="FeatureCollection"?h=h.concat(i.features):i.type==="Feature"?h.push(i):(i.type==="LineString"||i.type==="Polygon"||i.type==="MultiLineString"||i.type==="MultiPolygon")&&h.push(Ge(i));const f=Dm(ce(h),o);let u=[];if(s){const c={};f.forEach(g=>{const y=g.join(",");c[y]||(c[y]=!0,u.push(g))})}else u=f;return ce(u.map(c=>Mi(c)))}function Wm(t,i,n,s,o){_f(t,i,n||0,s||t.length-1,o||$m)}function _f(t,i,n,s,o){for(;s>n;){if(s-n>600){var h=s-n+1,f=i-n+1,u=Math.log(h),c=.5*Math.exp(2*u/3),g=.5*Math.sqrt(u*c*(h-c)/h)*(f-h/2<0?-1:1),y=Math.max(n,Math.floor(i-f*c/h+g)),M=Math.min(s,Math.floor(i+(h-f)*c/h+g));_f(t,i,y,M,o)}var v=t[i],E=n,x=s;for(Sn(t,n,i),o(t[s],v)>0&&Sn(t,n,s);E<x;){for(Sn(t,E,x),E++,x--;o(t[E],v)<0;)E++;for(;o(t[x],v)>0;)x--}o(t[n],v)===0?Sn(t,n,x):(x++,Sn(t,x,s)),x<=i&&(n=x+1),i<=x&&(s=x-1)}}function Sn(t,i,n){var s=t[i];t[i]=t[n],t[n]=s}function $m(t,i){return t<i?-1:t>i?1:0}class be{constructor(i=9){this._maxEntries=Math.max(4,i),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(i){let n=this.data;const s=[];if(!Zr(i,n))return s;const o=this.toBBox,h=[];for(;n;){for(let f=0;f<n.children.length;f++){const u=n.children[f],c=n.leaf?o(u):u;Zr(i,c)&&(n.leaf?s.push(u):$a(i,c)?this._all(u,s):h.push(u))}n=h.pop()}return s}collides(i){let n=this.data;if(!Zr(i,n))return!1;const s=[];for(;n;){for(let o=0;o<n.children.length;o++){const h=n.children[o],f=n.leaf?this.toBBox(h):h;if(Zr(i,f)){if(n.leaf||$a(i,f))return!0;s.push(h)}}n=s.pop()}return!1}load(i){if(!(i&&i.length))return this;if(i.length<this._minEntries){for(let s=0;s<i.length;s++)this.insert(i[s]);return this}let n=this._build(i.slice(),0,i.length-1,0);if(!this.data.children.length)this.data=n;else if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){const s=this.data;this.data=n,n=s}this._insert(n,this.data.height-n.height-1,!0)}return this}insert(i){return i&&this._insert(i,this.data.height-1),this}clear(){return this.data=Wi([]),this}remove(i,n){if(!i)return this;let s=this.data;const o=this.toBBox(i),h=[],f=[];let u,c,g;for(;s||h.length;){if(s||(s=h.pop(),c=h[h.length-1],u=f.pop(),g=!0),s.leaf){const y=zm(i,s.children,n);if(y!==-1)return s.children.splice(y,1),h.push(s),this._condense(h),this}!g&&!s.leaf&&$a(s,o)?(h.push(s),f.push(u),u=0,c=s,s=s.children[0]):c?(u++,s=c.children[u],g=!1):s=null}return this}toBBox(i){return i}compareMinX(i,n){return i.minX-n.minX}compareMinY(i,n){return i.minY-n.minY}toJSON(){return this.data}fromJSON(i){return this.data=i,this}_all(i,n){const s=[];for(;i;)i.leaf?n.push(...i.children):s.push(...i.children),i=s.pop();return n}_build(i,n,s,o){const h=s-n+1;let f=this._maxEntries,u;if(h<=f)return u=Wi(i.slice(n,s+1)),Di(u,this.toBBox),u;o||(o=Math.ceil(Math.log(h)/Math.log(f)),f=Math.ceil(h/Math.pow(f,o-1))),u=Wi([]),u.leaf=!1,u.height=o;const c=Math.ceil(h/f),g=c*Math.ceil(Math.sqrt(f));Su(i,n,s,g,this.compareMinX);for(let y=n;y<=s;y+=g){const M=Math.min(y+g-1,s);Su(i,y,M,c,this.compareMinY);for(let v=y;v<=M;v+=c){const E=Math.min(v+c-1,M);u.children.push(this._build(i,v,E,o-1))}}return Di(u,this.toBBox),u}_chooseSubtree(i,n,s,o){for(;o.push(n),!(n.leaf||o.length-1===s);){let h=1/0,f=1/0,u;for(let c=0;c<n.children.length;c++){const g=n.children[c],y=Wa(g),M=Hm(i,g)-y;M<f?(f=M,h=y<h?y:h,u=g):M===f&&y<h&&(h=y,u=g)}n=u||n.children[0]}return n}_insert(i,n,s){const o=s?i:this.toBBox(i),h=[],f=this._chooseSubtree(o,this.data,n,h);for(f.children.push(i),Cn(f,o);n>=0&&h[n].children.length>this._maxEntries;)this._split(h,n),n--;this._adjustParentBBoxes(o,h,n)}_split(i,n){const s=i[n],o=s.children.length,h=this._minEntries;this._chooseSplitAxis(s,h,o);const f=this._chooseSplitIndex(s,h,o),u=Wi(s.children.splice(f,s.children.length-f));u.height=s.height,u.leaf=s.leaf,Di(s,this.toBBox),Di(u,this.toBBox),n?i[n-1].children.push(u):this._splitRoot(s,u)}_splitRoot(i,n){this.data=Wi([i,n]),this.data.height=i.height+1,this.data.leaf=!1,Di(this.data,this.toBBox)}_chooseSplitIndex(i,n,s){let o,h=1/0,f=1/0;for(let u=n;u<=s-n;u++){const c=In(i,0,u,this.toBBox),g=In(i,u,s,this.toBBox),y=Ym(c,g),M=Wa(c)+Wa(g);y<h?(h=y,o=u,f=M<f?M:f):y===h&&M<f&&(f=M,o=u)}return o||s-n}_chooseSplitAxis(i,n,s){const o=i.leaf?this.compareMinX:Xm,h=i.leaf?this.compareMinY:km,f=this._allDistMargin(i,n,s,o),u=this._allDistMargin(i,n,s,h);f<u&&i.children.sort(o)}_allDistMargin(i,n,s,o){i.children.sort(o);const h=this.toBBox,f=In(i,0,n,h),u=In(i,s-n,s,h);let c=Jr(f)+Jr(u);for(let g=n;g<s-n;g++){const y=i.children[g];Cn(f,i.leaf?h(y):y),c+=Jr(f)}for(let g=s-n-1;g>=n;g--){const y=i.children[g];Cn(u,i.leaf?h(y):y),c+=Jr(u)}return c}_adjustParentBBoxes(i,n,s){for(let o=s;o>=0;o--)Cn(n[o],i)}_condense(i){for(let n=i.length-1,s;n>=0;n--)i[n].children.length===0?n>0?(s=i[n-1].children,s.splice(s.indexOf(i[n]),1)):this.clear():Di(i[n],this.toBBox)}}function zm(t,i,n){if(!n)return i.indexOf(t);for(let s=0;s<i.length;s++)if(n(t,i[s]))return s;return-1}function Di(t,i){In(t,0,t.children.length,i,t)}function In(t,i,n,s,o){o||(o=Wi(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let h=i;h<n;h++){const f=t.children[h];Cn(o,t.leaf?s(f):f)}return o}function Cn(t,i){return t.minX=Math.min(t.minX,i.minX),t.minY=Math.min(t.minY,i.minY),t.maxX=Math.max(t.maxX,i.maxX),t.maxY=Math.max(t.maxY,i.maxY),t}function Xm(t,i){return t.minX-i.minX}function km(t,i){return t.minY-i.minY}function Wa(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function Jr(t){return t.maxX-t.minX+(t.maxY-t.minY)}function Hm(t,i){return(Math.max(i.maxX,t.maxX)-Math.min(i.minX,t.minX))*(Math.max(i.maxY,t.maxY)-Math.min(i.minY,t.minY))}function Ym(t,i){const n=Math.max(t.minX,i.minX),s=Math.max(t.minY,i.minY),o=Math.min(t.maxX,i.maxX),h=Math.min(t.maxY,i.maxY);return Math.max(0,o-n)*Math.max(0,h-s)}function $a(t,i){return t.minX<=i.minX&&t.minY<=i.minY&&i.maxX<=t.maxX&&i.maxY<=t.maxY}function Zr(t,i){return i.minX<=t.maxX&&i.minY<=t.maxY&&i.maxX>=t.minX&&i.maxY>=t.minY}function Wi(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Su(t,i,n,s,o){const h=[i,n];for(;h.length;){if(n=h.pop(),i=h.pop(),n-i<=s)continue;const f=i+Math.ceil((n-i)/s/2)*s;Wm(t,f,i,n,o),h.push(i,f,f,n)}}function gf(t){var i=new be(t);return i.insert=function(n){if(n.type!=="Feature")throw new Error("invalid feature");return n.bbox=n.bbox?n.bbox:di(n),be.prototype.insert.call(this,n)},i.load=function(n){var s=[];return Array.isArray(n)?n.forEach(function(o){if(o.type!=="Feature")throw new Error("invalid features");o.bbox=o.bbox?o.bbox:di(o),s.push(o)}):Qn(n,function(o){if(o.type!=="Feature")throw new Error("invalid features");o.bbox=o.bbox?o.bbox:di(o),s.push(o)}),be.prototype.load.call(this,s)},i.remove=function(n,s){if(n.type!=="Feature")throw new Error("invalid feature");return n.bbox=n.bbox?n.bbox:di(n),be.prototype.remove.call(this,n,s)},i.clear=function(){return be.prototype.clear.call(this)},i.search=function(n){var s=be.prototype.search.call(this,this.toBBox(n));return ce(s)},i.collides=function(n){return be.prototype.collides.call(this,this.toBBox(n))},i.all=function(){var n=be.prototype.all.call(this);return ce(n)},i.toJSON=function(){return be.prototype.toJSON.call(this)},i.fromJSON=function(n){return be.prototype.fromJSON.call(this,n)},i.toBBox=function(n){var s;if(n.bbox)s=n.bbox;else if(Array.isArray(n)&&n.length===4)s=n;else if(Array.isArray(n)&&n.length===6)s=[n[0],n[1],n[3],n[4]];else if(n.type==="Feature")s=di(n);else if(n.type==="FeatureCollection")s=di(n);else throw new Error("invalid geojson");return{minX:s[0],minY:s[1],maxX:s[2],maxY:s[3]}},i}function Km(t){if(!t)throw new Error("geojson is required");const i=[];return fo(t,n=>{Qm(n,i)}),ce(i)}function Qm(t,i){let n=[];const s=t.geometry;if(s!==null){switch(s.type){case"Polygon":n=Qi(s);break;case"LineString":n=[Qi(s)]}n.forEach(o=>{Jm(o,t.properties).forEach(f=>{f.id=i.length,i.push(f)})})}}function Jm(t,i){const n=[];return t.reduce((s,o)=>{const h=Wn([s,o],i);return h.bbox=Zm(s,o),n.push(h),o}),n}function Zm(t,i){const n=t[0],s=t[1],o=i[0],h=i[1],f=n<o?n:o,u=s<h?s:h,c=n>o?n:o,g=s>h?s:h;return[f,u,c,g]}var Vm=Object.defineProperty,jm=Object.defineProperties,t6=Object.getOwnPropertyDescriptors,Pu=Object.getOwnPropertySymbols,e6=Object.prototype.hasOwnProperty,i6=Object.prototype.propertyIsEnumerable,bu=(t,i,n)=>i in t?Vm(t,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[i]=n,Au=(t,i)=>{for(var n in i||(i={}))e6.call(i,n)&&bu(t,n,i[n]);if(Pu)for(var n of Pu(i))i6.call(i,n)&&bu(t,n,i[n]);return t},Gu=(t,i)=>jm(t,t6(i));function n6(t,i,n={}){if(!t||!i)throw new Error("lines and pt are required arguments");const s=We(i);let o=Mi([1/0,1/0],{dist:1/0,index:-1,multiFeatureIndex:-1,location:-1}),h=0;return fo(t,function(f,u,c){const g=Qi(f);for(let y=0;y<g.length-1;y++){const M=Mi(g[y]),v=We(M),E=Mi(g[y+1]),x=We(E),b=ns(M,E,n);let A,C;x[0]===s[0]&&x[1]===s[1]?[A,C]=[x,!0]:v[0]===s[0]&&v[1]===s[1]?[A,C]=[v,!1]:[A,C]=a6(v,x,s);const T=Mi(A,{dist:ns(i,A,n),multiFeatureIndex:c,location:h+ns(M,A,n)});T.properties.dist<o.properties.dist&&(o=Gu(Au({},T),{properties:Gu(Au({},T.properties),{index:C?y+1:y})})),h+=b}}),o}function gi(t,i){const[n,s,o]=t,[h,f,u]=i;return n*h+s*f+o*u}function Pn(t,i){const[n,s,o]=t,[h,f,u]=i;return[s*u-o*f,o*h-n*u,n*f-s*h]}function r6(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2))}function Iu(t){const i=r6(t);return[t[0]/i,t[1]/i,t[2]/i]}function za(t){const i=Hi(t[1]),n=Hi(t[0]);return[Math.cos(i)*Math.cos(n),Math.cos(i)*Math.sin(n),Math.sin(i)]}function s6(t){const[i,n,s]=t,o=Math.min(Math.max(s,-1),1),h=du(Math.asin(o));return[du(Math.atan2(n,i)),h]}function a6(t,i,n){const s=za(t),o=za(i),h=za(n),f=Pn(s,o);if(f[0]===0&&f[1]===0&&f[2]===0)return gi(s,o)>0?[[...i],!0]:[[...n],!1];const u=Pn(f,h);if(u[0]===0&&u[1]===0&&u[2]===0)return[[...i],!0];const c=Pn(u,f),g=Iu(c),y=[-g[0],-g[1],-g[2]],M=gi(h,g)>gi(h,y)?g:y,v=Iu(f),E=gi(Pn(s,M),v),x=gi(Pn(M,o),v);return E>=0&&x>=0?[s6(M),!1]:gi(s,h)>gi(o,h)?[[...t],!1]:[[...i],!0]}var Vr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function o6(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function h6(t,i){if(i=i??{},!pm(i))throw new Error("options is invalid");var n=i.precision,s=i.coordinates,o=i.mutate;if(n=n==null||isNaN(n)?6:n,s=s==null||isNaN(s)?3:s,!t)throw new Error("<geojson> is required");if(typeof n!="number")throw new Error("<precision> must be a number");if(typeof s!="number")throw new Error("<coordinates> must be a number");(o===!1||o===void 0)&&(t=JSON.parse(JSON.stringify(t)));var h=Math.pow(10,n);return uo(t,function(f){u6(f,h,s)}),t}function u6(t,i,n){t.length>n&&t.splice(n,t.length);for(var s=0;s<t.length;s++)t[s]=Math.round(t[s]*i)/i;return t}function f6(t,i){if(!t)throw new Error("line is required");if(!i)throw new Error("splitter is required");var n=mu(t),s=mu(i);if(n!=="LineString")throw new Error("line must be LineString");if(s==="FeatureCollection")throw new Error("splitter cannot be a FeatureCollection");if(s==="GeometryCollection")throw new Error("splitter cannot be a GeometryCollection");var o=h6(i,{precision:7});switch(s){case"Point":return Va(t,o);case"MultiPoint":return Cu(t,o);case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":return Cu(t,Um(t,o,{ignoreSelfIntersections:!0}))}}function Cu(t,i){var n=[],s=gf();return fo(i,function(o){if(n.forEach(function(u,c){u.id=c}),!n.length)n=Va(t,o).features,s.load(ce(n));else{var h=s.search(o);if(h.features.length){var f=vf(o,h);n=n.filter(function(u){return u.id!==f.id}),s.remove(f),Qn(Va(f,o),function(u){n.push(u),s.insert(u)})}}}),ce(n)}function Va(t,i){var n=[],s=Qi(t)[0],o=Qi(t)[t.geometry.coordinates.length-1];if(Xa(s,We(i))||Xa(o,We(i)))return ce([t]);var h=gf(),f=Km(t);h.load(f);var u=h.search(i);if(!u.features.length)return ce([t]);var c=vf(i,u),g=[s],y=wm(f,function(M,v,E){var x=Qi(v)[1],b=We(i);return E===c.id?(M.push(b),n.push(Wn(M)),Xa(b,x)?[b]:[b,x]):(M.push(x),M)},g);return y.length>1&&n.push(Wn(y)),ce(n)}function vf(t,i){if(!i.features.length)throw new Error("lines must contain features");if(i.features.length===1)return i.features[0];var n,s=1/0;return Qn(i,function(o){var h=n6(o,t),f=h.properties.dist;f<s&&(n=o,s=f)}),n}function Xa(t,i){return t[0]===i[0]&&t[1]===i[1]}var Nn={exports:{}};var l6=Nn.exports,Nu;function c6(){return Nu||(Nu=1,function(t,i){(function(){var n,s="4.17.21",o=200,h="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",f="Expected a function",u="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",g=500,y="__lodash_placeholder__",M=1,v=2,E=4,x=1,b=2,A=1,C=2,T=4,F=8,W=16,$=32,X=64,K=128,j=256,rt=512,Mt=30,lt="...",xt=800,bt=16,Ie=1,_s=2,gs=3,Ce=1/0,Xe=9007199254740991,pf=17976931348623157e292,Zn=NaN,Ee=4294967295,wf=Ee-1,Ef=Ee>>>1,xf=[["ary",K],["bind",A],["bindKey",C],["curry",F],["curryRight",W],["flip",rt],["partial",$],["partialRight",X],["rearg",j]],Ei="[object Arguments]",Vn="[object Array]",Sf="[object AsyncFunction]",tn="[object Boolean]",en="[object Date]",Pf="[object DOMException]",jn="[object Error]",tr="[object Function]",mo="[object GeneratorFunction]",_e="[object Map]",nn="[object Number]",bf="[object Null]",Ne="[object Object]",yo="[object Promise]",Af="[object Proxy]",rn="[object RegExp]",ge="[object Set]",sn="[object String]",er="[object Symbol]",Gf="[object Undefined]",an="[object WeakMap]",If="[object WeakSet]",on="[object ArrayBuffer]",xi="[object DataView]",vs="[object Float32Array]",ds="[object Float64Array]",Ms="[object Int8Array]",ms="[object Int16Array]",ys="[object Int32Array]",ps="[object Uint8Array]",ws="[object Uint8ClampedArray]",Es="[object Uint16Array]",xs="[object Uint32Array]",Cf=/\b__p \+= '';/g,Nf=/\b(__p \+=) '' \+/g,Rf=/(__e\(.*?\)|\b__t\)) \+\n'';/g,po=/&(?:amp|lt|gt|quot|#39);/g,wo=/[&<>"']/g,Lf=RegExp(po.source),Of=RegExp(wo.source),Tf=/<%-([\s\S]+?)%>/g,Bf=/<%([\s\S]+?)%>/g,Eo=/<%=([\s\S]+?)%>/g,Ff=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qf=/^\w*$/,Df=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ss=/[\\^$.*+?()[\]{}|]/g,Uf=RegExp(Ss.source),Ps=/^\s+/,Wf=/\s/,$f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,zf=/\{\n\/\* \[wrapped with (.+)\] \*/,Xf=/,? & /,kf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Hf=/[()=,{}\[\]\/\s]/,Yf=/\\(\\)?/g,Kf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,xo=/\w*$/,Qf=/^[-+]0x[0-9a-f]+$/i,Jf=/^0b[01]+$/i,Zf=/^\[object .+?Constructor\]$/,Vf=/^0o[0-7]+$/i,jf=/^(?:0|[1-9]\d*)$/,tl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ir=/($^)/,el=/['\n\r\u2028\u2029\\]/g,nr="\\ud800-\\udfff",il="\\u0300-\\u036f",nl="\\ufe20-\\ufe2f",rl="\\u20d0-\\u20ff",So=il+nl+rl,Po="\\u2700-\\u27bf",bo="a-z\\xdf-\\xf6\\xf8-\\xff",sl="\\xac\\xb1\\xd7\\xf7",al="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ol="\\u2000-\\u206f",hl=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ao="A-Z\\xc0-\\xd6\\xd8-\\xde",Go="\\ufe0e\\ufe0f",Io=sl+al+ol+hl,bs="['’]",ul="["+nr+"]",Co="["+Io+"]",rr="["+So+"]",No="\\d+",fl="["+Po+"]",Ro="["+bo+"]",Lo="[^"+nr+Io+No+Po+bo+Ao+"]",As="\\ud83c[\\udffb-\\udfff]",ll="(?:"+rr+"|"+As+")",Oo="[^"+nr+"]",Gs="(?:\\ud83c[\\udde6-\\uddff]){2}",Is="[\\ud800-\\udbff][\\udc00-\\udfff]",Si="["+Ao+"]",To="\\u200d",Bo="(?:"+Ro+"|"+Lo+")",cl="(?:"+Si+"|"+Lo+")",Fo="(?:"+bs+"(?:d|ll|m|re|s|t|ve))?",qo="(?:"+bs+"(?:D|LL|M|RE|S|T|VE))?",Do=ll+"?",Uo="["+Go+"]?",_l="(?:"+To+"(?:"+[Oo,Gs,Is].join("|")+")"+Uo+Do+")*",gl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wo=Uo+Do+_l,dl="(?:"+[fl,Gs,Is].join("|")+")"+Wo,Ml="(?:"+[Oo+rr+"?",rr,Gs,Is,ul].join("|")+")",ml=RegExp(bs,"g"),yl=RegExp(rr,"g"),Cs=RegExp(As+"(?="+As+")|"+Ml+Wo,"g"),pl=RegExp([Si+"?"+Ro+"+"+Fo+"(?="+[Co,Si,"$"].join("|")+")",cl+"+"+qo+"(?="+[Co,Si+Bo,"$"].join("|")+")",Si+"?"+Bo+"+"+Fo,Si+"+"+qo,vl,gl,No,dl].join("|"),"g"),wl=RegExp("["+To+nr+So+Go+"]"),El=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,xl=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Sl=-1,_t={};_t[vs]=_t[ds]=_t[Ms]=_t[ms]=_t[ys]=_t[ps]=_t[ws]=_t[Es]=_t[xs]=!0,_t[Ei]=_t[Vn]=_t[on]=_t[tn]=_t[xi]=_t[en]=_t[jn]=_t[tr]=_t[_e]=_t[nn]=_t[Ne]=_t[rn]=_t[ge]=_t[sn]=_t[an]=!1;var ct={};ct[Ei]=ct[Vn]=ct[on]=ct[xi]=ct[tn]=ct[en]=ct[vs]=ct[ds]=ct[Ms]=ct[ms]=ct[ys]=ct[_e]=ct[nn]=ct[Ne]=ct[rn]=ct[ge]=ct[sn]=ct[er]=ct[ps]=ct[ws]=ct[Es]=ct[xs]=!0,ct[jn]=ct[tr]=ct[an]=!1;var Pl={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},bl={"&":"&","<":"<",">":">",'"':""","'":"'"},Al={"&":"&","<":"<",">":">",""":'"',"'":"'"},Gl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Il=parseFloat,Cl=parseInt,$o=typeof Vr=="object"&&Vr&&Vr.Object===Object&&Vr,Nl=typeof self=="object"&&self&&self.Object===Object&&self,Gt=$o||Nl||Function("return this")(),Ns=i&&!i.nodeType&&i,si=Ns&&!0&&t&&!t.nodeType&&t,zo=si&&si.exports===Ns,Rs=zo&&$o.process,ee=function(){try{var S=si&&si.require&&si.require("util").types;return S||Rs&&Rs.binding&&Rs.binding("util")}catch{}}(),Xo=ee&&ee.isArrayBuffer,ko=ee&&ee.isDate,Ho=ee&&ee.isMap,Yo=ee&&ee.isRegExp,Ko=ee&&ee.isSet,Qo=ee&&ee.isTypedArray;function Qt(S,I,G){switch(G.length){case 0:return S.call(I);case 1:return S.call(I,G[0]);case 2:return S.call(I,G[0],G[1]);case 3:return S.call(I,G[0],G[1],G[2])}return S.apply(I,G)}function Rl(S,I,G,U){for(var Q=-1,st=S==null?0:S.length;++Q<st;){var St=S[Q];I(U,St,G(St),S)}return U}function ie(S,I){for(var G=-1,U=S==null?0:S.length;++G<U&&I(S[G],G,S)!==!1;);return S}function Ll(S,I){for(var G=S==null?0:S.length;G--&&I(S[G],G,S)!==!1;);return S}function Jo(S,I){for(var G=-1,U=S==null?0:S.length;++G<U;)if(!I(S[G],G,S))return!1;return!0}function ke(S,I){for(var G=-1,U=S==null?0:S.length,Q=0,st=[];++G<U;){var St=S[G];I(St,G,S)&&(st[Q++]=St)}return st}function sr(S,I){var G=S==null?0:S.length;return!!G&&Pi(S,I,0)>-1}function Ls(S,I,G){for(var U=-1,Q=S==null?0:S.length;++U<Q;)if(G(I,S[U]))return!0;return!1}function gt(S,I){for(var G=-1,U=S==null?0:S.length,Q=Array(U);++G<U;)Q[G]=I(S[G],G,S);return Q}function He(S,I){for(var G=-1,U=I.length,Q=S.length;++G<U;)S[Q+G]=I[G];return S}function Os(S,I,G,U){var Q=-1,st=S==null?0:S.length;for(U&&st&&(G=S[++Q]);++Q<st;)G=I(G,S[Q],Q,S);return G}function Ol(S,I,G,U){var Q=S==null?0:S.length;for(U&&Q&&(G=S[--Q]);Q--;)G=I(G,S[Q],Q,S);return G}function Ts(S,I){for(var G=-1,U=S==null?0:S.length;++G<U;)if(I(S[G],G,S))return!0;return!1}var Tl=Bs("length");function Bl(S){return S.split("")}function Fl(S){return S.match(kf)||[]}function Zo(S,I,G){var U;return G(S,function(Q,st,St){if(I(Q,st,St))return U=st,!1}),U}function ar(S,I,G,U){for(var Q=S.length,st=G+(U?1:-1);U?st--:++st<Q;)if(I(S[st],st,S))return st;return-1}function Pi(S,I,G){return I===I?Ql(S,I,G):ar(S,Vo,G)}function ql(S,I,G,U){for(var Q=G-1,st=S.length;++Q<st;)if(U(S[Q],I))return Q;return-1}function Vo(S){return S!==S}function jo(S,I){var G=S==null?0:S.length;return G?qs(S,I)/G:Zn}function Bs(S){return function(I){return I==null?n:I[S]}}function Fs(S){return function(I){return S==null?n:S[I]}}function th(S,I,G,U,Q){return Q(S,function(st,St,ft){G=U?(U=!1,st):I(G,st,St,ft)}),G}function Dl(S,I){var G=S.length;for(S.sort(I);G--;)S[G]=S[G].value;return S}function qs(S,I){for(var G,U=-1,Q=S.length;++U<Q;){var st=I(S[U]);st!==n&&(G=G===n?st:G+st)}return G}function Ds(S,I){for(var G=-1,U=Array(S);++G<S;)U[G]=I(G);return U}function Ul(S,I){return gt(I,function(G){return[G,S[G]]})}function eh(S){return S&&S.slice(0,sh(S)+1).replace(Ps,"")}function Jt(S){return function(I){return S(I)}}function Us(S,I){return gt(I,function(G){return S[G]})}function hn(S,I){return S.has(I)}function ih(S,I){for(var G=-1,U=S.length;++G<U&&Pi(I,S[G],0)>-1;);return G}function nh(S,I){for(var G=S.length;G--&&Pi(I,S[G],0)>-1;);return G}function Wl(S,I){for(var G=S.length,U=0;G--;)S[G]===I&&++U;return U}var $l=Fs(Pl),zl=Fs(bl);function Xl(S){return"\\"+Gl[S]}function kl(S,I){return S==null?n:S[I]}function bi(S){return wl.test(S)}function Hl(S){return El.test(S)}function Yl(S){for(var I,G=[];!(I=S.next()).done;)G.push(I.value);return G}function Ws(S){var I=-1,G=Array(S.size);return S.forEach(function(U,Q){G[++I]=[Q,U]}),G}function rh(S,I){return function(G){return S(I(G))}}function Ye(S,I){for(var G=-1,U=S.length,Q=0,st=[];++G<U;){var St=S[G];(St===I||St===y)&&(S[G]=y,st[Q++]=G)}return st}function or(S){var I=-1,G=Array(S.size);return S.forEach(function(U){G[++I]=U}),G}function Kl(S){var I=-1,G=Array(S.size);return S.forEach(function(U){G[++I]=[U,U]}),G}function Ql(S,I,G){for(var U=G-1,Q=S.length;++U<Q;)if(S[U]===I)return U;return-1}function Jl(S,I,G){for(var U=G+1;U--;)if(S[U]===I)return U;return U}function Ai(S){return bi(S)?Vl(S):Tl(S)}function ve(S){return bi(S)?jl(S):Bl(S)}function sh(S){for(var I=S.length;I--&&Wf.test(S.charAt(I)););return I}var Zl=Fs(Al);function Vl(S){for(var I=Cs.lastIndex=0;Cs.test(S);)++I;return I}function jl(S){return S.match(Cs)||[]}function t1(S){return S.match(pl)||[]}var e1=function S(I){I=I==null?Gt:Gi.defaults(Gt.Object(),I,Gi.pick(Gt,xl));var G=I.Array,U=I.Date,Q=I.Error,st=I.Function,St=I.Math,ft=I.Object,$s=I.RegExp,i1=I.String,ne=I.TypeError,hr=G.prototype,n1=st.prototype,Ii=ft.prototype,ur=I["__core-js_shared__"],fr=n1.toString,ut=Ii.hasOwnProperty,r1=0,ah=function(){var e=/[^.]+$/.exec(ur&&ur.keys&&ur.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),lr=Ii.toString,s1=fr.call(ft),a1=Gt._,o1=$s("^"+fr.call(ut).replace(Ss,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),cr=zo?I.Buffer:n,Ke=I.Symbol,_r=I.Uint8Array,oh=cr?cr.allocUnsafe:n,gr=rh(ft.getPrototypeOf,ft),hh=ft.create,uh=Ii.propertyIsEnumerable,vr=hr.splice,fh=Ke?Ke.isConcatSpreadable:n,un=Ke?Ke.iterator:n,ai=Ke?Ke.toStringTag:n,dr=function(){try{var e=li(ft,"defineProperty");return e({},"",{}),e}catch{}}(),h1=I.clearTimeout!==Gt.clearTimeout&&I.clearTimeout,u1=U&&U.now!==Gt.Date.now&&U.now,f1=I.setTimeout!==Gt.setTimeout&&I.setTimeout,Mr=St.ceil,mr=St.floor,zs=ft.getOwnPropertySymbols,l1=cr?cr.isBuffer:n,lh=I.isFinite,c1=hr.join,_1=rh(ft.keys,ft),Pt=St.max,Nt=St.min,g1=U.now,v1=I.parseInt,ch=St.random,d1=hr.reverse,Xs=li(I,"DataView"),fn=li(I,"Map"),ks=li(I,"Promise"),Ci=li(I,"Set"),ln=li(I,"WeakMap"),cn=li(ft,"create"),yr=ln&&new ln,Ni={},M1=ci(Xs),m1=ci(fn),y1=ci(ks),p1=ci(Ci),w1=ci(ln),pr=Ke?Ke.prototype:n,_n=pr?pr.valueOf:n,_h=pr?pr.toString:n;function d(e){if(mt(e)&&!J(e)&&!(e instanceof it)){if(e instanceof re)return e;if(ut.call(e,"__wrapped__"))return g0(e)}return new re(e)}var Ri=function(){function e(){}return function(r){if(!vt(r))return{};if(hh)return hh(r);e.prototype=r;var a=new e;return e.prototype=n,a}}();function wr(){}function re(e,r){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!r,this.__index__=0,this.__values__=n}d.templateSettings={escape:Tf,evaluate:Bf,interpolate:Eo,variable:"",imports:{_:d}},d.prototype=wr.prototype,d.prototype.constructor=d,re.prototype=Ri(wr.prototype),re.prototype.constructor=re;function it(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ee,this.__views__=[]}function E1(){var e=new it(this.__wrapped__);return e.__actions__=Wt(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Wt(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Wt(this.__views__),e}function x1(){if(this.__filtered__){var e=new it(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function S1(){var e=this.__wrapped__.value(),r=this.__dir__,a=J(e),l=r<0,_=a?e.length:0,m=Bc(0,_,this.__views__),p=m.start,w=m.end,P=w-p,N=l?w:p-1,R=this.__iteratees__,L=R.length,D=0,z=Nt(P,this.__takeCount__);if(!a||!l&&_==P&&z==P)return Fh(e,this.__actions__);var H=[];t:for(;P--&&D<z;){N+=r;for(var V=-1,Y=e[N];++V<L;){var et=R[V],nt=et.iteratee,jt=et.type,Ft=nt(Y);if(jt==_s)Y=Ft;else if(!Ft){if(jt==Ie)continue t;break t}}H[D++]=Y}return H}it.prototype=Ri(wr.prototype),it.prototype.constructor=it;function oi(e){var r=-1,a=e==null?0:e.length;for(this.clear();++r<a;){var l=e[r];this.set(l[0],l[1])}}function P1(){this.__data__=cn?cn(null):{},this.size=0}function b1(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}function A1(e){var r=this.__data__;if(cn){var a=r[e];return a===c?n:a}return ut.call(r,e)?r[e]:n}function G1(e){var r=this.__data__;return cn?r[e]!==n:ut.call(r,e)}function I1(e,r){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=cn&&r===n?c:r,this}oi.prototype.clear=P1,oi.prototype.delete=b1,oi.prototype.get=A1,oi.prototype.has=G1,oi.prototype.set=I1;function Re(e){var r=-1,a=e==null?0:e.length;for(this.clear();++r<a;){var l=e[r];this.set(l[0],l[1])}}function C1(){this.__data__=[],this.size=0}function N1(e){var r=this.__data__,a=Er(r,e);if(a<0)return!1;var l=r.length-1;return a==l?r.pop():vr.call(r,a,1),--this.size,!0}function R1(e){var r=this.__data__,a=Er(r,e);return a<0?n:r[a][1]}function L1(e){return Er(this.__data__,e)>-1}function O1(e,r){var a=this.__data__,l=Er(a,e);return l<0?(++this.size,a.push([e,r])):a[l][1]=r,this}Re.prototype.clear=C1,Re.prototype.delete=N1,Re.prototype.get=R1,Re.prototype.has=L1,Re.prototype.set=O1;function Le(e){var r=-1,a=e==null?0:e.length;for(this.clear();++r<a;){var l=e[r];this.set(l[0],l[1])}}function T1(){this.size=0,this.__data__={hash:new oi,map:new(fn||Re),string:new oi}}function B1(e){var r=Or(this,e).delete(e);return this.size-=r?1:0,r}function F1(e){return Or(this,e).get(e)}function q1(e){return Or(this,e).has(e)}function D1(e,r){var a=Or(this,e),l=a.size;return a.set(e,r),this.size+=a.size==l?0:1,this}Le.prototype.clear=T1,Le.prototype.delete=B1,Le.prototype.get=F1,Le.prototype.has=q1,Le.prototype.set=D1;function hi(e){var r=-1,a=e==null?0:e.length;for(this.__data__=new Le;++r<a;)this.add(e[r])}function U1(e){return this.__data__.set(e,c),this}function W1(e){return this.__data__.has(e)}hi.prototype.add=hi.prototype.push=U1,hi.prototype.has=W1;function de(e){var r=this.__data__=new Re(e);this.size=r.size}function $1(){this.__data__=new Re,this.size=0}function z1(e){var r=this.__data__,a=r.delete(e);return this.size=r.size,a}function X1(e){return this.__data__.get(e)}function k1(e){return this.__data__.has(e)}function H1(e,r){var a=this.__data__;if(a instanceof Re){var l=a.__data__;if(!fn||l.length<o-1)return l.push([e,r]),this.size=++a.size,this;a=this.__data__=new Le(l)}return a.set(e,r),this.size=a.size,this}de.prototype.clear=$1,de.prototype.delete=z1,de.prototype.get=X1,de.prototype.has=k1,de.prototype.set=H1;function gh(e,r){var a=J(e),l=!a&&_i(e),_=!a&&!l&&je(e),m=!a&&!l&&!_&&Bi(e),p=a||l||_||m,w=p?Ds(e.length,i1):[],P=w.length;for(var N in e)(r||ut.call(e,N))&&!(p&&(N=="length"||_&&(N=="offset"||N=="parent")||m&&(N=="buffer"||N=="byteLength"||N=="byteOffset")||Fe(N,P)))&&w.push(N);return w}function vh(e){var r=e.length;return r?e[ia(0,r-1)]:n}function Y1(e,r){return Tr(Wt(e),ui(r,0,e.length))}function K1(e){return Tr(Wt(e))}function Hs(e,r,a){(a!==n&&!Me(e[r],a)||a===n&&!(r in e))&&Oe(e,r,a)}function gn(e,r,a){var l=e[r];(!(ut.call(e,r)&&Me(l,a))||a===n&&!(r in e))&&Oe(e,r,a)}function Er(e,r){for(var a=e.length;a--;)if(Me(e[a][0],r))return a;return-1}function Q1(e,r,a,l){return Qe(e,function(_,m,p){r(l,_,a(_),p)}),l}function dh(e,r){return e&&Se(r,At(r),e)}function J1(e,r){return e&&Se(r,zt(r),e)}function Oe(e,r,a){r=="__proto__"&&dr?dr(e,r,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[r]=a}function Ys(e,r){for(var a=-1,l=r.length,_=G(l),m=e==null;++a<l;)_[a]=m?n:Aa(e,r[a]);return _}function ui(e,r,a){return e===e&&(a!==n&&(e=e<=a?e:a),r!==n&&(e=e>=r?e:r)),e}function se(e,r,a,l,_,m){var p,w=r&M,P=r&v,N=r&E;if(a&&(p=_?a(e,l,_,m):a(e)),p!==n)return p;if(!vt(e))return e;var R=J(e);if(R){if(p=qc(e),!w)return Wt(e,p)}else{var L=Rt(e),D=L==tr||L==mo;if(je(e))return Uh(e,w);if(L==Ne||L==Ei||D&&!_){if(p=P||D?{}:s0(e),!w)return P?Ac(e,J1(p,e)):bc(e,dh(p,e))}else{if(!ct[L])return _?e:{};p=Dc(e,L,w)}}m||(m=new de);var z=m.get(e);if(z)return z;m.set(e,p),O0(e)?e.forEach(function(Y){p.add(se(Y,r,a,Y,e,m))}):R0(e)&&e.forEach(function(Y,et){p.set(et,se(Y,r,a,et,e,m))});var H=N?P?_a:ca:P?zt:At,V=R?n:H(e);return ie(V||e,function(Y,et){V&&(et=Y,Y=e[et]),gn(p,et,se(Y,r,a,et,e,m))}),p}function Z1(e){var r=At(e);return function(a){return Mh(a,e,r)}}function Mh(e,r,a){var l=a.length;if(e==null)return!l;for(e=ft(e);l--;){var _=a[l],m=r[_],p=e[_];if(p===n&&!(_ in e)||!m(p))return!1}return!0}function mh(e,r,a){if(typeof e!="function")throw new ne(f);return wn(function(){e.apply(n,a)},r)}function vn(e,r,a,l){var _=-1,m=sr,p=!0,w=e.length,P=[],N=r.length;if(!w)return P;a&&(r=gt(r,Jt(a))),l?(m=Ls,p=!1):r.length>=o&&(m=hn,p=!1,r=new hi(r));t:for(;++_<w;){var R=e[_],L=a==null?R:a(R);if(R=l||R!==0?R:0,p&&L===L){for(var D=N;D--;)if(r[D]===L)continue t;P.push(R)}else m(r,L,l)||P.push(R)}return P}var Qe=kh(xe),yh=kh(Qs,!0);function V1(e,r){var a=!0;return Qe(e,function(l,_,m){return a=!!r(l,_,m),a}),a}function xr(e,r,a){for(var l=-1,_=e.length;++l<_;){var m=e[l],p=r(m);if(p!=null&&(w===n?p===p&&!Vt(p):a(p,w)))var w=p,P=m}return P}function j1(e,r,a,l){var _=e.length;for(a=Z(a),a<0&&(a=-a>_?0:_+a),l=l===n||l>_?_:Z(l),l<0&&(l+=_),l=a>l?0:B0(l);a<l;)e[a++]=r;return e}function ph(e,r){var a=[];return Qe(e,function(l,_,m){r(l,_,m)&&a.push(l)}),a}function It(e,r,a,l,_){var m=-1,p=e.length;for(a||(a=Wc),_||(_=[]);++m<p;){var w=e[m];r>0&&a(w)?r>1?It(w,r-1,a,l,_):He(_,w):l||(_[_.length]=w)}return _}var Ks=Hh(),wh=Hh(!0);function xe(e,r){return e&&Ks(e,r,At)}function Qs(e,r){return e&&wh(e,r,At)}function Sr(e,r){return ke(r,function(a){return qe(e[a])})}function fi(e,r){r=Ze(r,e);for(var a=0,l=r.length;e!=null&&a<l;)e=e[Pe(r[a++])];return a&&a==l?e:n}function Eh(e,r,a){var l=r(e);return J(e)?l:He(l,a(e))}function Tt(e){return e==null?e===n?Gf:bf:ai&&ai in ft(e)?Tc(e):Kc(e)}function Js(e,r){return e>r}function tc(e,r){return e!=null&&ut.call(e,r)}function ec(e,r){return e!=null&&r in ft(e)}function ic(e,r,a){return e>=Nt(r,a)&&e<Pt(r,a)}function Zs(e,r,a){for(var l=a?Ls:sr,_=e[0].length,m=e.length,p=m,w=G(m),P=1/0,N=[];p--;){var R=e[p];p&&r&&(R=gt(R,Jt(r))),P=Nt(R.length,P),w[p]=!a&&(r||_>=120&&R.length>=120)?new hi(p&&R):n}R=e[0];var L=-1,D=w[0];t:for(;++L<_&&N.length<P;){var z=R[L],H=r?r(z):z;if(z=a||z!==0?z:0,!(D?hn(D,H):l(N,H,a))){for(p=m;--p;){var V=w[p];if(!(V?hn(V,H):l(e[p],H,a)))continue t}D&&D.push(H),N.push(z)}}return N}function nc(e,r,a,l){return xe(e,function(_,m,p){r(l,a(_),m,p)}),l}function dn(e,r,a){r=Ze(r,e),e=u0(e,r);var l=e==null?e:e[Pe(oe(r))];return l==null?n:Qt(l,e,a)}function xh(e){return mt(e)&&Tt(e)==Ei}function rc(e){return mt(e)&&Tt(e)==on}function sc(e){return mt(e)&&Tt(e)==en}function Mn(e,r,a,l,_){return e===r?!0:e==null||r==null||!mt(e)&&!mt(r)?e!==e&&r!==r:ac(e,r,a,l,Mn,_)}function ac(e,r,a,l,_,m){var p=J(e),w=J(r),P=p?Vn:Rt(e),N=w?Vn:Rt(r);P=P==Ei?Ne:P,N=N==Ei?Ne:N;var R=P==Ne,L=N==Ne,D=P==N;if(D&&je(e)){if(!je(r))return!1;p=!0,R=!1}if(D&&!R)return m||(m=new de),p||Bi(e)?i0(e,r,a,l,_,m):Lc(e,r,P,a,l,_,m);if(!(a&x)){var z=R&&ut.call(e,"__wrapped__"),H=L&&ut.call(r,"__wrapped__");if(z||H){var V=z?e.value():e,Y=H?r.value():r;return m||(m=new de),_(V,Y,a,l,m)}}return D?(m||(m=new de),Oc(e,r,a,l,_,m)):!1}function oc(e){return mt(e)&&Rt(e)==_e}function Vs(e,r,a,l){var _=a.length,m=_,p=!l;if(e==null)return!m;for(e=ft(e);_--;){var w=a[_];if(p&&w[2]?w[1]!==e[w[0]]:!(w[0]in e))return!1}for(;++_<m;){w=a[_];var P=w[0],N=e[P],R=w[1];if(p&&w[2]){if(N===n&&!(P in e))return!1}else{var L=new de;if(l)var D=l(N,R,P,e,r,L);if(!(D===n?Mn(R,N,x|b,l,L):D))return!1}}return!0}function Sh(e){if(!vt(e)||zc(e))return!1;var r=qe(e)?o1:Zf;return r.test(ci(e))}function hc(e){return mt(e)&&Tt(e)==rn}function uc(e){return mt(e)&&Rt(e)==ge}function fc(e){return mt(e)&&Wr(e.length)&&!!_t[Tt(e)]}function Ph(e){return typeof e=="function"?e:e==null?Xt:typeof e=="object"?J(e)?Gh(e[0],e[1]):Ah(e):Y0(e)}function js(e){if(!pn(e))return _1(e);var r=[];for(var a in ft(e))ut.call(e,a)&&a!="constructor"&&r.push(a);return r}function lc(e){if(!vt(e))return Yc(e);var r=pn(e),a=[];for(var l in e)l=="constructor"&&(r||!ut.call(e,l))||a.push(l);return a}function ta(e,r){return e<r}function bh(e,r){var a=-1,l=$t(e)?G(e.length):[];return Qe(e,function(_,m,p){l[++a]=r(_,m,p)}),l}function Ah(e){var r=va(e);return r.length==1&&r[0][2]?o0(r[0][0],r[0][1]):function(a){return a===e||Vs(a,e,r)}}function Gh(e,r){return Ma(e)&&a0(r)?o0(Pe(e),r):function(a){var l=Aa(a,e);return l===n&&l===r?Ga(a,e):Mn(r,l,x|b)}}function Pr(e,r,a,l,_){e!==r&&Ks(r,function(m,p){if(_||(_=new de),vt(m))cc(e,r,p,a,Pr,l,_);else{var w=l?l(ya(e,p),m,p+"",e,r,_):n;w===n&&(w=m),Hs(e,p,w)}},zt)}function cc(e,r,a,l,_,m,p){var w=ya(e,a),P=ya(r,a),N=p.get(P);if(N){Hs(e,a,N);return}var R=m?m(w,P,a+"",e,r,p):n,L=R===n;if(L){var D=J(P),z=!D&&je(P),H=!D&&!z&&Bi(P);R=P,D||z||H?J(w)?R=w:pt(w)?R=Wt(w):z?(L=!1,R=Uh(P,!0)):H?(L=!1,R=Wh(P,!0)):R=[]:En(P)||_i(P)?(R=w,_i(w)?R=F0(w):(!vt(w)||qe(w))&&(R=s0(P))):L=!1}L&&(p.set(P,R),_(R,P,l,m,p),p.delete(P)),Hs(e,a,R)}function Ih(e,r){var a=e.length;if(a)return r+=r<0?a:0,Fe(r,a)?e[r]:n}function Ch(e,r,a){r.length?r=gt(r,function(m){return J(m)?function(p){return fi(p,m.length===1?m[0]:m)}:m}):r=[Xt];var l=-1;r=gt(r,Jt(k()));var _=bh(e,function(m,p,w){var P=gt(r,function(N){return N(m)});return{criteria:P,index:++l,value:m}});return Dl(_,function(m,p){return Pc(m,p,a)})}function _c(e,r){return Nh(e,r,function(a,l){return Ga(e,l)})}function Nh(e,r,a){for(var l=-1,_=r.length,m={};++l<_;){var p=r[l],w=fi(e,p);a(w,p)&&mn(m,Ze(p,e),w)}return m}function gc(e){return function(r){return fi(r,e)}}function ea(e,r,a,l){var _=l?ql:Pi,m=-1,p=r.length,w=e;for(e===r&&(r=Wt(r)),a&&(w=gt(e,Jt(a)));++m<p;)for(var P=0,N=r[m],R=a?a(N):N;(P=_(w,R,P,l))>-1;)w!==e&&vr.call(w,P,1),vr.call(e,P,1);return e}function Rh(e,r){for(var a=e?r.length:0,l=a-1;a--;){var _=r[a];if(a==l||_!==m){var m=_;Fe(_)?vr.call(e,_,1):sa(e,_)}}return e}function ia(e,r){return e+mr(ch()*(r-e+1))}function vc(e,r,a,l){for(var _=-1,m=Pt(Mr((r-e)/(a||1)),0),p=G(m);m--;)p[l?m:++_]=e,e+=a;return p}function na(e,r){var a="";if(!e||r<1||r>Xe)return a;do r%2&&(a+=e),r=mr(r/2),r&&(e+=e);while(r);return a}function tt(e,r){return pa(h0(e,r,Xt),e+"")}function dc(e){return vh(Fi(e))}function Mc(e,r){var a=Fi(e);return Tr(a,ui(r,0,a.length))}function mn(e,r,a,l){if(!vt(e))return e;r=Ze(r,e);for(var _=-1,m=r.length,p=m-1,w=e;w!=null&&++_<m;){var P=Pe(r[_]),N=a;if(P==="__proto__"||P==="constructor"||P==="prototype")return e;if(_!=p){var R=w[P];N=l?l(R,P,w):n,N===n&&(N=vt(R)?R:Fe(r[_+1])?[]:{})}gn(w,P,N),w=w[P]}return e}var Lh=yr?function(e,r){return yr.set(e,r),e}:Xt,mc=dr?function(e,r){return dr(e,"toString",{configurable:!0,enumerable:!1,value:Ca(r),writable:!0})}:Xt;function yc(e){return Tr(Fi(e))}function ae(e,r,a){var l=-1,_=e.length;r<0&&(r=-r>_?0:_+r),a=a>_?_:a,a<0&&(a+=_),_=r>a?0:a-r>>>0,r>>>=0;for(var m=G(_);++l<_;)m[l]=e[l+r];return m}function pc(e,r){var a;return Qe(e,function(l,_,m){return a=r(l,_,m),!a}),!!a}function br(e,r,a){var l=0,_=e==null?l:e.length;if(typeof r=="number"&&r===r&&_<=Ef){for(;l<_;){var m=l+_>>>1,p=e[m];p!==null&&!Vt(p)&&(a?p<=r:p<r)?l=m+1:_=m}return _}return ra(e,r,Xt,a)}function ra(e,r,a,l){var _=0,m=e==null?0:e.length;if(m===0)return 0;r=a(r);for(var p=r!==r,w=r===null,P=Vt(r),N=r===n;_<m;){var R=mr((_+m)/2),L=a(e[R]),D=L!==n,z=L===null,H=L===L,V=Vt(L);if(p)var Y=l||H;else N?Y=H&&(l||D):w?Y=H&&D&&(l||!z):P?Y=H&&D&&!z&&(l||!V):z||V?Y=!1:Y=l?L<=r:L<r;Y?_=R+1:m=R}return Nt(m,wf)}function Oh(e,r){for(var a=-1,l=e.length,_=0,m=[];++a<l;){var p=e[a],w=r?r(p):p;if(!a||!Me(w,P)){var P=w;m[_++]=p===0?0:p}}return m}function Th(e){return typeof e=="number"?e:Vt(e)?Zn:+e}function Zt(e){if(typeof e=="string")return e;if(J(e))return gt(e,Zt)+"";if(Vt(e))return _h?_h.call(e):"";var r=e+"";return r=="0"&&1/e==-Ce?"-0":r}function Je(e,r,a){var l=-1,_=sr,m=e.length,p=!0,w=[],P=w;if(a)p=!1,_=Ls;else if(m>=o){var N=r?null:Nc(e);if(N)return or(N);p=!1,_=hn,P=new hi}else P=r?[]:w;t:for(;++l<m;){var R=e[l],L=r?r(R):R;if(R=a||R!==0?R:0,p&&L===L){for(var D=P.length;D--;)if(P[D]===L)continue t;r&&P.push(L),w.push(R)}else _(P,L,a)||(P!==w&&P.push(L),w.push(R))}return w}function sa(e,r){return r=Ze(r,e),e=u0(e,r),e==null||delete e[Pe(oe(r))]}function Bh(e,r,a,l){return mn(e,r,a(fi(e,r)),l)}function Ar(e,r,a,l){for(var _=e.length,m=l?_:-1;(l?m--:++m<_)&&r(e[m],m,e););return a?ae(e,l?0:m,l?m+1:_):ae(e,l?m+1:0,l?_:m)}function Fh(e,r){var a=e;return a instanceof it&&(a=a.value()),Os(r,function(l,_){return _.func.apply(_.thisArg,He([l],_.args))},a)}function aa(e,r,a){var l=e.length;if(l<2)return l?Je(e[0]):[];for(var _=-1,m=G(l);++_<l;)for(var p=e[_],w=-1;++w<l;)w!=_&&(m[_]=vn(m[_]||p,e[w],r,a));return Je(It(m,1),r,a)}function qh(e,r,a){for(var l=-1,_=e.length,m=r.length,p={};++l<_;){var w=l<m?r[l]:n;a(p,e[l],w)}return p}function oa(e){return pt(e)?e:[]}function ha(e){return typeof e=="function"?e:Xt}function Ze(e,r){return J(e)?e:Ma(e,r)?[e]:_0(at(e))}var wc=tt;function Ve(e,r,a){var l=e.length;return a=a===n?l:a,!r&&a>=l?e:ae(e,r,a)}var Dh=h1||function(e){return Gt.clearTimeout(e)};function Uh(e,r){if(r)return e.slice();var a=e.length,l=oh?oh(a):new e.constructor(a);return e.copy(l),l}function ua(e){var r=new e.constructor(e.byteLength);return new _r(r).set(new _r(e)),r}function Ec(e,r){var a=r?ua(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.byteLength)}function xc(e){var r=new e.constructor(e.source,xo.exec(e));return r.lastIndex=e.lastIndex,r}function Sc(e){return _n?ft(_n.call(e)):{}}function Wh(e,r){var a=r?ua(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.length)}function $h(e,r){if(e!==r){var a=e!==n,l=e===null,_=e===e,m=Vt(e),p=r!==n,w=r===null,P=r===r,N=Vt(r);if(!w&&!N&&!m&&e>r||m&&p&&P&&!w&&!N||l&&p&&P||!a&&P||!_)return 1;if(!l&&!m&&!N&&e<r||N&&a&&_&&!l&&!m||w&&a&&_||!p&&_||!P)return-1}return 0}function Pc(e,r,a){for(var l=-1,_=e.criteria,m=r.criteria,p=_.length,w=a.length;++l<p;){var P=$h(_[l],m[l]);if(P){if(l>=w)return P;var N=a[l];return P*(N=="desc"?-1:1)}}return e.index-r.index}function zh(e,r,a,l){for(var _=-1,m=e.length,p=a.length,w=-1,P=r.length,N=Pt(m-p,0),R=G(P+N),L=!l;++w<P;)R[w]=r[w];for(;++_<p;)(L||_<m)&&(R[a[_]]=e[_]);for(;N--;)R[w++]=e[_++];return R}function Xh(e,r,a,l){for(var _=-1,m=e.length,p=-1,w=a.length,P=-1,N=r.length,R=Pt(m-w,0),L=G(R+N),D=!l;++_<R;)L[_]=e[_];for(var z=_;++P<N;)L[z+P]=r[P];for(;++p<w;)(D||_<m)&&(L[z+a[p]]=e[_++]);return L}function Wt(e,r){var a=-1,l=e.length;for(r||(r=G(l));++a<l;)r[a]=e[a];return r}function Se(e,r,a,l){var _=!a;a||(a={});for(var m=-1,p=r.length;++m<p;){var w=r[m],P=l?l(a[w],e[w],w,a,e):n;P===n&&(P=e[w]),_?Oe(a,w,P):gn(a,w,P)}return a}function bc(e,r){return Se(e,da(e),r)}function Ac(e,r){return Se(e,n0(e),r)}function Gr(e,r){return function(a,l){var _=J(a)?Rl:Q1,m=r?r():{};return _(a,e,k(l,2),m)}}function Li(e){return tt(function(r,a){var l=-1,_=a.length,m=_>1?a[_-1]:n,p=_>2?a[2]:n;for(m=e.length>3&&typeof m=="function"?(_--,m):n,p&&Bt(a[0],a[1],p)&&(m=_<3?n:m,_=1),r=ft(r);++l<_;){var w=a[l];w&&e(r,w,l,m)}return r})}function kh(e,r){return function(a,l){if(a==null)return a;if(!$t(a))return e(a,l);for(var _=a.length,m=r?_:-1,p=ft(a);(r?m--:++m<_)&&l(p[m],m,p)!==!1;);return a}}function Hh(e){return function(r,a,l){for(var _=-1,m=ft(r),p=l(r),w=p.length;w--;){var P=p[e?w:++_];if(a(m[P],P,m)===!1)break}return r}}function Gc(e,r,a){var l=r&A,_=yn(e);function m(){var p=this&&this!==Gt&&this instanceof m?_:e;return p.apply(l?a:this,arguments)}return m}function Yh(e){return function(r){r=at(r);var a=bi(r)?ve(r):n,l=a?a[0]:r.charAt(0),_=a?Ve(a,1).join(""):r.slice(1);return l[e]()+_}}function Oi(e){return function(r){return Os(k0(X0(r).replace(ml,"")),e,"")}}function yn(e){return function(){var r=arguments;switch(r.length){case 0:return new e;case 1:return new e(r[0]);case 2:return new e(r[0],r[1]);case 3:return new e(r[0],r[1],r[2]);case 4:return new e(r[0],r[1],r[2],r[3]);case 5:return new e(r[0],r[1],r[2],r[3],r[4]);case 6:return new e(r[0],r[1],r[2],r[3],r[4],r[5]);case 7:return new e(r[0],r[1],r[2],r[3],r[4],r[5],r[6])}var a=Ri(e.prototype),l=e.apply(a,r);return vt(l)?l:a}}function Ic(e,r,a){var l=yn(e);function _(){for(var m=arguments.length,p=G(m),w=m,P=Ti(_);w--;)p[w]=arguments[w];var N=m<3&&p[0]!==P&&p[m-1]!==P?[]:Ye(p,P);if(m-=N.length,m<a)return Vh(e,r,Ir,_.placeholder,n,p,N,n,n,a-m);var R=this&&this!==Gt&&this instanceof _?l:e;return Qt(R,this,p)}return _}function Kh(e){return function(r,a,l){var _=ft(r);if(!$t(r)){var m=k(a,3);r=At(r),a=function(w){return m(_[w],w,_)}}var p=e(r,a,l);return p>-1?_[m?r[p]:p]:n}}function Qh(e){return Be(function(r){var a=r.length,l=a,_=re.prototype.thru;for(e&&r.reverse();l--;){var m=r[l];if(typeof m!="function")throw new ne(f);if(_&&!p&&Lr(m)=="wrapper")var p=new re([],!0)}for(l=p?l:a;++l<a;){m=r[l];var w=Lr(m),P=w=="wrapper"?ga(m):n;P&&ma(P[0])&&P[1]==(K|F|$|j)&&!P[4].length&&P[9]==1?p=p[Lr(P[0])].apply(p,P[3]):p=m.length==1&&ma(m)?p[w]():p.thru(m)}return function(){var N=arguments,R=N[0];if(p&&N.length==1&&J(R))return p.plant(R).value();for(var L=0,D=a?r[L].apply(this,N):R;++L<a;)D=r[L].call(this,D);return D}})}function Ir(e,r,a,l,_,m,p,w,P,N){var R=r&K,L=r&A,D=r&C,z=r&(F|W),H=r&rt,V=D?n:yn(e);function Y(){for(var et=arguments.length,nt=G(et),jt=et;jt--;)nt[jt]=arguments[jt];if(z)var Ft=Ti(Y),te=Wl(nt,Ft);if(l&&(nt=zh(nt,l,_,z)),m&&(nt=Xh(nt,m,p,z)),et-=te,z&&et<N){var wt=Ye(nt,Ft);return Vh(e,r,Ir,Y.placeholder,a,nt,wt,w,P,N-et)}var me=L?a:this,Ue=D?me[e]:e;return et=nt.length,w?nt=Qc(nt,w):H&&et>1&&nt.reverse(),R&&P<et&&(nt.length=P),this&&this!==Gt&&this instanceof Y&&(Ue=V||yn(Ue)),Ue.apply(me,nt)}return Y}function Jh(e,r){return function(a,l){return nc(a,e,r(l),{})}}function Cr(e,r){return function(a,l){var _;if(a===n&&l===n)return r;if(a!==n&&(_=a),l!==n){if(_===n)return l;typeof a=="string"||typeof l=="string"?(a=Zt(a),l=Zt(l)):(a=Th(a),l=Th(l)),_=e(a,l)}return _}}function fa(e){return Be(function(r){return r=gt(r,Jt(k())),tt(function(a){var l=this;return e(r,function(_){return Qt(_,l,a)})})})}function Nr(e,r){r=r===n?" ":Zt(r);var a=r.length;if(a<2)return a?na(r,e):r;var l=na(r,Mr(e/Ai(r)));return bi(r)?Ve(ve(l),0,e).join(""):l.slice(0,e)}function Cc(e,r,a,l){var _=r&A,m=yn(e);function p(){for(var w=-1,P=arguments.length,N=-1,R=l.length,L=G(R+P),D=this&&this!==Gt&&this instanceof p?m:e;++N<R;)L[N]=l[N];for(;P--;)L[N++]=arguments[++w];return Qt(D,_?a:this,L)}return p}function Zh(e){return function(r,a,l){return l&&typeof l!="number"&&Bt(r,a,l)&&(a=l=n),r=De(r),a===n?(a=r,r=0):a=De(a),l=l===n?r<a?1:-1:De(l),vc(r,a,l,e)}}function Rr(e){return function(r,a){return typeof r=="string"&&typeof a=="string"||(r=he(r),a=he(a)),e(r,a)}}function Vh(e,r,a,l,_,m,p,w,P,N){var R=r&F,L=R?p:n,D=R?n:p,z=R?m:n,H=R?n:m;r|=R?$:X,r&=~(R?X:$),r&T||(r&=-4);var V=[e,r,_,z,L,H,D,w,P,N],Y=a.apply(n,V);return ma(e)&&f0(Y,V),Y.placeholder=l,l0(Y,e,r)}function la(e){var r=St[e];return function(a,l){if(a=he(a),l=l==null?0:Nt(Z(l),292),l&&lh(a)){var _=(at(a)+"e").split("e"),m=r(_[0]+"e"+(+_[1]+l));return _=(at(m)+"e").split("e"),+(_[0]+"e"+(+_[1]-l))}return r(a)}}var Nc=Ci&&1/or(new Ci([,-0]))[1]==Ce?function(e){return new Ci(e)}:La;function jh(e){return function(r){var a=Rt(r);return a==_e?Ws(r):a==ge?Kl(r):Ul(r,e(r))}}function Te(e,r,a,l,_,m,p,w){var P=r&C;if(!P&&typeof e!="function")throw new ne(f);var N=l?l.length:0;if(N||(r&=-97,l=_=n),p=p===n?p:Pt(Z(p),0),w=w===n?w:Z(w),N-=_?_.length:0,r&X){var R=l,L=_;l=_=n}var D=P?n:ga(e),z=[e,r,a,l,_,R,L,m,p,w];if(D&&Hc(z,D),e=z[0],r=z[1],a=z[2],l=z[3],_=z[4],w=z[9]=z[9]===n?P?0:e.length:Pt(z[9]-N,0),!w&&r&(F|W)&&(r&=-25),!r||r==A)var H=Gc(e,r,a);else r==F||r==W?H=Ic(e,r,w):(r==$||r==(A|$))&&!_.length?H=Cc(e,r,a,l):H=Ir.apply(n,z);var V=D?Lh:f0;return l0(V(H,z),e,r)}function t0(e,r,a,l){return e===n||Me(e,Ii[a])&&!ut.call(l,a)?r:e}function e0(e,r,a,l,_,m){return vt(e)&&vt(r)&&(m.set(r,e),Pr(e,r,n,e0,m),m.delete(r)),e}function Rc(e){return En(e)?n:e}function i0(e,r,a,l,_,m){var p=a&x,w=e.length,P=r.length;if(w!=P&&!(p&&P>w))return!1;var N=m.get(e),R=m.get(r);if(N&&R)return N==r&&R==e;var L=-1,D=!0,z=a&b?new hi:n;for(m.set(e,r),m.set(r,e);++L<w;){var H=e[L],V=r[L];if(l)var Y=p?l(V,H,L,r,e,m):l(H,V,L,e,r,m);if(Y!==n){if(Y)continue;D=!1;break}if(z){if(!Ts(r,function(et,nt){if(!hn(z,nt)&&(H===et||_(H,et,a,l,m)))return z.push(nt)})){D=!1;break}}else if(!(H===V||_(H,V,a,l,m))){D=!1;break}}return m.delete(e),m.delete(r),D}function Lc(e,r,a,l,_,m,p){switch(a){case xi:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case on:return!(e.byteLength!=r.byteLength||!m(new _r(e),new _r(r)));case tn:case en:case nn:return Me(+e,+r);case jn:return e.name==r.name&&e.message==r.message;case rn:case sn:return e==r+"";case _e:var w=Ws;case ge:var P=l&x;if(w||(w=or),e.size!=r.size&&!P)return!1;var N=p.get(e);if(N)return N==r;l|=b,p.set(e,r);var R=i0(w(e),w(r),l,_,m,p);return p.delete(e),R;case er:if(_n)return _n.call(e)==_n.call(r)}return!1}function Oc(e,r,a,l,_,m){var p=a&x,w=ca(e),P=w.length,N=ca(r),R=N.length;if(P!=R&&!p)return!1;for(var L=P;L--;){var D=w[L];if(!(p?D in r:ut.call(r,D)))return!1}var z=m.get(e),H=m.get(r);if(z&&H)return z==r&&H==e;var V=!0;m.set(e,r),m.set(r,e);for(var Y=p;++L<P;){D=w[L];var et=e[D],nt=r[D];if(l)var jt=p?l(nt,et,D,r,e,m):l(et,nt,D,e,r,m);if(!(jt===n?et===nt||_(et,nt,a,l,m):jt)){V=!1;break}Y||(Y=D=="constructor")}if(V&&!Y){var Ft=e.constructor,te=r.constructor;Ft!=te&&"constructor"in e&&"constructor"in r&&!(typeof Ft=="function"&&Ft instanceof Ft&&typeof te=="function"&&te instanceof te)&&(V=!1)}return m.delete(e),m.delete(r),V}function Be(e){return pa(h0(e,n,M0),e+"")}function ca(e){return Eh(e,At,da)}function _a(e){return Eh(e,zt,n0)}var ga=yr?function(e){return yr.get(e)}:La;function Lr(e){for(var r=e.name+"",a=Ni[r],l=ut.call(Ni,r)?a.length:0;l--;){var _=a[l],m=_.func;if(m==null||m==e)return _.name}return r}function Ti(e){var r=ut.call(d,"placeholder")?d:e;return r.placeholder}function k(){var e=d.iteratee||Na;return e=e===Na?Ph:e,arguments.length?e(arguments[0],arguments[1]):e}function Or(e,r){var a=e.__data__;return $c(r)?a[typeof r=="string"?"string":"hash"]:a.map}function va(e){for(var r=At(e),a=r.length;a--;){var l=r[a],_=e[l];r[a]=[l,_,a0(_)]}return r}function li(e,r){var a=kl(e,r);return Sh(a)?a:n}function Tc(e){var r=ut.call(e,ai),a=e[ai];try{e[ai]=n;var l=!0}catch{}var _=lr.call(e);return l&&(r?e[ai]=a:delete e[ai]),_}var da=zs?function(e){return e==null?[]:(e=ft(e),ke(zs(e),function(r){return uh.call(e,r)}))}:Oa,n0=zs?function(e){for(var r=[];e;)He(r,da(e)),e=gr(e);return r}:Oa,Rt=Tt;(Xs&&Rt(new Xs(new ArrayBuffer(1)))!=xi||fn&&Rt(new fn)!=_e||ks&&Rt(ks.resolve())!=yo||Ci&&Rt(new Ci)!=ge||ln&&Rt(new ln)!=an)&&(Rt=function(e){var r=Tt(e),a=r==Ne?e.constructor:n,l=a?ci(a):"";if(l)switch(l){case M1:return xi;case m1:return _e;case y1:return yo;case p1:return ge;case w1:return an}return r});function Bc(e,r,a){for(var l=-1,_=a.length;++l<_;){var m=a[l],p=m.size;switch(m.type){case"drop":e+=p;break;case"dropRight":r-=p;break;case"take":r=Nt(r,e+p);break;case"takeRight":e=Pt(e,r-p);break}}return{start:e,end:r}}function Fc(e){var r=e.match(zf);return r?r[1].split(Xf):[]}function r0(e,r,a){r=Ze(r,e);for(var l=-1,_=r.length,m=!1;++l<_;){var p=Pe(r[l]);if(!(m=e!=null&&a(e,p)))break;e=e[p]}return m||++l!=_?m:(_=e==null?0:e.length,!!_&&Wr(_)&&Fe(p,_)&&(J(e)||_i(e)))}function qc(e){var r=e.length,a=new e.constructor(r);return r&&typeof e[0]=="string"&&ut.call(e,"index")&&(a.index=e.index,a.input=e.input),a}function s0(e){return typeof e.constructor=="function"&&!pn(e)?Ri(gr(e)):{}}function Dc(e,r,a){var l=e.constructor;switch(r){case on:return ua(e);case tn:case en:return new l(+e);case xi:return Ec(e,a);case vs:case ds:case Ms:case ms:case ys:case ps:case ws:case Es:case xs:return Wh(e,a);case _e:return new l;case nn:case sn:return new l(e);case rn:return xc(e);case ge:return new l;case er:return Sc(e)}}function Uc(e,r){var a=r.length;if(!a)return e;var l=a-1;return r[l]=(a>1?"& ":"")+r[l],r=r.join(a>2?", ":" "),e.replace($f,`{
|
|
5
5
|
/* [wrapped with `+r+`] */
|
|
6
|
-
`)}function Xc(e){return J(e)||_i(e)||!!(ch&&e&&e[ch])}function Fe(e,r){var a=typeof e;return r=r??Xe,!!r&&(a=="number"||a!="symbol"&&il.test(e))&&e>-1&&e%1==0&&e<r}function Bt(e,r,a){if(!vt(a))return!1;var l=typeof r;return(l=="number"?$t(a)&&Fe(r,a.length):l=="string"&&r in a)?Me(a[r],e):!1}function Ea(e,r){if(J(e))return!1;var a=typeof e;return a=="number"||a=="symbol"||a=="boolean"||e==null||Vt(e)?!0:Wf.test(e)||!Uf.test(e)||r!=null&&e in ft(r)}function kc(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function xa(e){var r=Lr(e),a=d[r];if(typeof a!="function"||!(r in it.prototype))return!1;if(e===a)return!0;var l=ya(a);return!!l&&e===l[0]}function Hc(e){return!!hh&&hh in e}var Yc=ur?qe:Ua;function pn(e){var r=e&&e.constructor,a=typeof r=="function"&&r.prototype||Ii;return e===a}function h0(e){return e===e&&!vt(e)}function u0(e,r){return function(a){return a==null?!1:a[e]===r&&(r!==n||e in ft(a))}}function Kc(e){var r=Dr(e,function(l){return a.size===g&&a.clear(),l}),a=r.cache;return r}function Qc(e,r){var a=e[1],l=r[1],_=a|l,m=_<(A|C|K),p=l==K&&a==F||l==K&&a==j&&e[7].length<=r[8]||l==(K|j)&&r[7].length<=r[8]&&a==F;if(!(m||p))return e;l&A&&(e[2]=r[2],_|=a&A?0:T);var w=r[3];if(w){var P=e[3];e[3]=P?kh(P,w,r[4]):w,e[4]=P?Ye(e[3],y):r[4]}return w=r[5],w&&(P=e[5],e[5]=P?Hh(P,w,r[6]):w,e[6]=P?Ye(e[5],y):r[6]),w=r[7],w&&(e[7]=w),l&K&&(e[8]=e[8]==null?r[8]:Nt(e[8],r[8])),e[9]==null&&(e[9]=r[9]),e[0]=r[0],e[1]=_,e}function Jc(e){var r=[];if(e!=null)for(var a in ft(e))r.push(a);return r}function Zc(e){return lr.call(e)}function f0(e,r,a){return r=Pt(r===n?e.length-1:r,0),function(){for(var l=arguments,_=-1,m=Pt(l.length-r,0),p=G(m);++_<m;)p[_]=l[r+_];_=-1;for(var w=G(r+1);++_<r;)w[_]=l[_];return w[r]=a(p),Qt(e,this,w)}}function l0(e,r){return r.length<2?e:fi(e,ae(r,0,-1))}function Vc(e,r){for(var a=e.length,l=Nt(r.length,a),_=Wt(e);l--;){var m=r[l];e[l]=Fe(m,a)?_[m]:n}return e}function Sa(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}var c0=g0(Th),wn=_1||function(e,r){return Gt.setTimeout(e,r)},Pa=g0(wc);function _0(e,r,a){var l=r+"";return Pa(e,zc(l,jc(Uc(l),a)))}function g0(e){var r=0,a=0;return function(){var l=M1(),_=bt-(l-a);if(a=l,_>0){if(++r>=xt)return arguments[0]}else r=0;return e.apply(n,arguments)}}function Tr(e,r){var a=-1,l=e.length,_=l-1;for(r=r===n?l:r;++a<r;){var m=oa(a,_),p=e[m];e[m]=e[a],e[a]=p}return e.length=r,e}var v0=Kc(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace($f,function(a,l,_,m){r.push(_?m.replace(Jf,"$1"):l||a)}),r});function Pe(e){if(typeof e=="string"||Vt(e))return e;var r=e+"";return r=="0"&&1/e==-Ce?"-0":r}function ci(e){if(e!=null){try{return fr.call(e)}catch{}try{return e+""}catch{}}return""}function jc(e,r){return ie(bf,function(a){var l="_."+a[0];r&a[1]&&!sr(e,l)&&e.push(l)}),e.sort()}function d0(e){if(e instanceof it)return e.clone();var r=new re(e.__wrapped__,e.__chain__);return r.__actions__=Wt(e.__actions__),r.__index__=e.__index__,r.__values__=e.__values__,r}function t2(e,r,a){(a?Bt(e,r,a):r===n)?r=1:r=Pt(Z(r),0);var l=e==null?0:e.length;if(!l||r<1)return[];for(var _=0,m=0,p=G(Mr(l/r));_<l;)p[m++]=ae(e,_,_+=r);return p}function e2(e){for(var r=-1,a=e==null?0:e.length,l=0,_=[];++r<a;){var m=e[r];m&&(_[l++]=m)}return _}function i2(){var e=arguments.length;if(!e)return[];for(var r=G(e-1),a=arguments[0],l=e;l--;)r[l-1]=arguments[l];return He(J(a)?Wt(a):[a],It(r,1))}var n2=tt(function(e,r){return pt(e)?vn(e,It(r,1,pt,!0)):[]}),r2=tt(function(e,r){var a=oe(r);return pt(a)&&(a=n),pt(e)?vn(e,It(r,1,pt,!0),k(a,2)):[]}),s2=tt(function(e,r){var a=oe(r);return pt(a)&&(a=n),pt(e)?vn(e,It(r,1,pt,!0),n,a):[]});function a2(e,r,a){var l=e==null?0:e.length;return l?(r=a||r===n?1:Z(r),ae(e,r<0?0:r,l)):[]}function o2(e,r,a){var l=e==null?0:e.length;return l?(r=a||r===n?1:Z(r),r=l-r,ae(e,0,r<0?0:r)):[]}function h2(e,r){return e&&e.length?Ar(e,k(r,3),!0,!0):[]}function u2(e,r){return e&&e.length?Ar(e,k(r,3),!0):[]}function f2(e,r,a,l){var _=e==null?0:e.length;return _?(a&&typeof a!="number"&&Bt(e,r,a)&&(a=0,l=_),ic(e,r,a,l)):[]}function M0(e,r,a){var l=e==null?0:e.length;if(!l)return-1;var _=a==null?0:Z(a);return _<0&&(_=Pt(l+_,0)),ar(e,k(r,3),_)}function m0(e,r,a){var l=e==null?0:e.length;if(!l)return-1;var _=l-1;return a!==n&&(_=Z(a),_=a<0?Pt(l+_,0):Nt(_,l-1)),ar(e,k(r,3),_,!0)}function y0(e){var r=e==null?0:e.length;return r?It(e,1):[]}function l2(e){var r=e==null?0:e.length;return r?It(e,Ce):[]}function c2(e,r){var a=e==null?0:e.length;return a?(r=r===n?1:Z(r),It(e,r)):[]}function _2(e){for(var r=-1,a=e==null?0:e.length,l={};++r<a;){var _=e[r];l[_[0]]=_[1]}return l}function p0(e){return e&&e.length?e[0]:n}function g2(e,r,a){var l=e==null?0:e.length;if(!l)return-1;var _=a==null?0:Z(a);return _<0&&(_=Pt(l+_,0)),Pi(e,r,_)}function v2(e){var r=e==null?0:e.length;return r?ae(e,0,-1):[]}var d2=tt(function(e){var r=gt(e,ca);return r.length&&r[0]===e[0]?ia(r):[]}),M2=tt(function(e){var r=oe(e),a=gt(e,ca);return r===oe(a)?r=n:a.pop(),a.length&&a[0]===e[0]?ia(a,k(r,2)):[]}),m2=tt(function(e){var r=oe(e),a=gt(e,ca);return r=typeof r=="function"?r:n,r&&a.pop(),a.length&&a[0]===e[0]?ia(a,n,r):[]});function y2(e,r){return e==null?"":v1.call(e,r)}function oe(e){var r=e==null?0:e.length;return r?e[r-1]:n}function p2(e,r,a){var l=e==null?0:e.length;if(!l)return-1;var _=l;return a!==n&&(_=Z(a),_=_<0?Pt(l+_,0):Nt(_,l-1)),r===r?jl(e,r,_):ar(e,th,_,!0)}function w2(e,r){return e&&e.length?Nh(e,Z(r)):n}var E2=tt(w0);function w0(e,r){return e&&e.length&&r&&r.length?aa(e,r):e}function x2(e,r,a){return e&&e.length&&r&&r.length?aa(e,r,k(a,2)):e}function S2(e,r,a){return e&&e.length&&r&&r.length?aa(e,r,n,a):e}var P2=Be(function(e,r){var a=e==null?0:e.length,l=Vs(e,r);return Oh(e,gt(r,function(_){return Fe(_,a)?+_:_}).sort(Xh)),l});function b2(e,r){var a=[];if(!(e&&e.length))return a;var l=-1,_=[],m=e.length;for(r=k(r,3);++l<m;){var p=e[l];r(p,l,e)&&(a.push(p),_.push(l))}return Oh(e,_),a}function ba(e){return e==null?e:y1.call(e)}function A2(e,r,a){var l=e==null?0:e.length;return l?(a&&typeof a!="number"&&Bt(e,r,a)?(r=0,a=l):(r=r==null?0:Z(r),a=a===n?l:Z(a)),ae(e,r,a)):[]}function G2(e,r){return br(e,r)}function I2(e,r,a){return ua(e,r,k(a,2))}function C2(e,r){var a=e==null?0:e.length;if(a){var l=br(e,r);if(l<a&&Me(e[l],r))return l}return-1}function N2(e,r){return br(e,r,!0)}function R2(e,r,a){return ua(e,r,k(a,2),!0)}function L2(e,r){var a=e==null?0:e.length;if(a){var l=br(e,r,!0)-1;if(Me(e[l],r))return l}return-1}function O2(e){return e&&e.length?Bh(e):[]}function T2(e,r){return e&&e.length?Bh(e,k(r,2)):[]}function B2(e){var r=e==null?0:e.length;return r?ae(e,1,r):[]}function F2(e,r,a){return e&&e.length?(r=a||r===n?1:Z(r),ae(e,0,r<0?0:r)):[]}function q2(e,r,a){var l=e==null?0:e.length;return l?(r=a||r===n?1:Z(r),r=l-r,ae(e,r<0?0:r,l)):[]}function D2(e,r){return e&&e.length?Ar(e,k(r,3),!1,!0):[]}function U2(e,r){return e&&e.length?Ar(e,k(r,3)):[]}var W2=tt(function(e){return Je(It(e,1,pt,!0))}),$2=tt(function(e){var r=oe(e);return pt(r)&&(r=n),Je(It(e,1,pt,!0),k(r,2))}),z2=tt(function(e){var r=oe(e);return r=typeof r=="function"?r:n,Je(It(e,1,pt,!0),n,r)});function X2(e){return e&&e.length?Je(e):[]}function k2(e,r){return e&&e.length?Je(e,k(r,2)):[]}function H2(e,r){return r=typeof r=="function"?r:n,e&&e.length?Je(e,n,r):[]}function Aa(e){if(!(e&&e.length))return[];var r=0;return e=ke(e,function(a){if(pt(a))return r=Pt(a.length,r),!0}),Xs(r,function(a){return gt(e,Ws(a))})}function E0(e,r){if(!(e&&e.length))return[];var a=Aa(e);return r==null?a:gt(a,function(l){return Qt(r,n,l)})}var Y2=tt(function(e,r){return pt(e)?vn(e,r):[]}),K2=tt(function(e){return la(ke(e,pt))}),Q2=tt(function(e){var r=oe(e);return pt(r)&&(r=n),la(ke(e,pt),k(r,2))}),J2=tt(function(e){var r=oe(e);return r=typeof r=="function"?r:n,la(ke(e,pt),n,r)}),Z2=tt(Aa);function V2(e,r){return Uh(e||[],r||[],gn)}function j2(e,r){return Uh(e||[],r||[],mn)}var t_=tt(function(e){var r=e.length,a=r>1?e[r-1]:n;return a=typeof a=="function"?(e.pop(),a):n,E0(e,a)});function x0(e){var r=d(e);return r.__chain__=!0,r}function e_(e,r){return r(e),e}function Br(e,r){return r(e)}var i_=Be(function(e){var r=e.length,a=r?e[0]:0,l=this.__wrapped__,_=function(m){return Vs(m,e)};return r>1||this.__actions__.length||!(l instanceof it)||!Fe(a)?this.thru(_):(l=l.slice(a,+a+(r?1:0)),l.__actions__.push({func:Br,args:[_],thisArg:n}),new re(l,this.__chain__).thru(function(m){return r&&!m.length&&m.push(n),m}))});function n_(){return x0(this)}function r_(){return new re(this.value(),this.__chain__)}function s_(){this.__values__===n&&(this.__values__=F0(this.value()));var e=this.__index__>=this.__values__.length,r=e?n:this.__values__[this.__index__++];return{done:e,value:r}}function a_(){return this}function o_(e){for(var r,a=this;a instanceof wr;){var l=d0(a);l.__index__=0,l.__values__=n,r?_.__wrapped__=l:r=l;var _=l;a=a.__wrapped__}return _.__wrapped__=e,r}function h_(){var e=this.__wrapped__;if(e instanceof it){var r=e;return this.__actions__.length&&(r=new it(this)),r=r.reverse(),r.__actions__.push({func:Br,args:[ba],thisArg:n}),new re(r,this.__chain__)}return this.thru(ba)}function u_(){return Dh(this.__wrapped__,this.__actions__)}var f_=Gr(function(e,r,a){ut.call(e,a)?++e[a]:Oe(e,a,1)});function l_(e,r,a){var l=J(e)?Vo:ec;return a&&Bt(e,r,a)&&(r=n),l(e,k(r,3))}function c_(e,r){var a=J(e)?ke:Eh;return a(e,k(r,3))}var __=Jh(M0),g_=Jh(m0);function v_(e,r){return It(Fr(e,r),1)}function d_(e,r){return It(Fr(e,r),Ce)}function M_(e,r,a){return a=a===n?1:Z(a),It(Fr(e,r),a)}function S0(e,r){var a=J(e)?ie:Qe;return a(e,k(r,3))}function P0(e,r){var a=J(e)?Bl:wh;return a(e,k(r,3))}var m_=Gr(function(e,r,a){ut.call(e,a)?e[a].push(r):Oe(e,a,[r])});function y_(e,r,a,l){e=$t(e)?e:Fi(e),a=a&&!l?Z(a):0;var _=e.length;return a<0&&(a=Pt(_+a,0)),$r(e)?a<=_&&e.indexOf(r,a)>-1:!!_&&Pi(e,r,a)>-1}var p_=tt(function(e,r,a){var l=-1,_=typeof r=="function",m=$t(e)?G(e.length):[];return Qe(e,function(p){m[++l]=_?Qt(r,p,a):dn(p,r,a)}),m}),w_=Gr(function(e,r,a){Oe(e,a,r)});function Fr(e,r){var a=J(e)?gt:Gh;return a(e,k(r,3))}function E_(e,r,a,l){return e==null?[]:(J(r)||(r=r==null?[]:[r]),a=l?n:a,J(a)||(a=a==null?[]:[a]),Rh(e,r,a))}var x_=Gr(function(e,r,a){e[a?0:1].push(r)},function(){return[[],[]]});function S_(e,r,a){var l=J(e)?Ds:ih,_=arguments.length<3;return l(e,k(r,4),a,_,Qe)}function P_(e,r,a){var l=J(e)?Fl:ih,_=arguments.length<3;return l(e,k(r,4),a,_,wh)}function b_(e,r){var a=J(e)?ke:Eh;return a(e,Ur(k(r,3)))}function A_(e){var r=J(e)?Mh:yc;return r(e)}function G_(e,r,a){(a?Bt(e,r,a):r===n)?r=1:r=Z(r);var l=J(e)?J1:pc;return l(e,r)}function I_(e){var r=J(e)?Z1:Ec;return r(e)}function C_(e){if(e==null)return 0;if($t(e))return $r(e)?Ai(e):e.length;var r=Rt(e);return r==_e||r==ge?e.size:ra(e).length}function N_(e,r,a){var l=J(e)?Us:xc;return a&&Bt(e,r,a)&&(r=n),l(e,k(r,3))}var R_=tt(function(e,r){if(e==null)return[];var a=r.length;return a>1&&Bt(e,r[0],r[1])?r=[]:a>2&&Bt(r[0],r[1],r[2])&&(r=[r[0]]),Rh(e,It(r,1),[])}),qr=c1||function(){return Gt.Date.now()};function L_(e,r){if(typeof r!="function")throw new ne(f);return e=Z(e),function(){if(--e<1)return r.apply(this,arguments)}}function b0(e,r,a){return r=a?n:r,r=e&&r==null?e.length:r,Te(e,K,n,n,n,n,r)}function A0(e,r){var a;if(typeof r!="function")throw new ne(f);return e=Z(e),function(){return--e>0&&(a=r.apply(this,arguments)),e<=1&&(r=n),a}}var Ga=tt(function(e,r,a){var l=A;if(a.length){var _=Ye(a,Ti(Ga));l|=$}return Te(e,l,r,a,_)}),G0=tt(function(e,r,a){var l=A|C;if(a.length){var _=Ye(a,Ti(G0));l|=$}return Te(r,l,e,a,_)});function I0(e,r,a){r=a?n:r;var l=Te(e,F,n,n,n,n,n,r);return l.placeholder=I0.placeholder,l}function C0(e,r,a){r=a?n:r;var l=Te(e,W,n,n,n,n,n,r);return l.placeholder=C0.placeholder,l}function N0(e,r,a){var l,_,m,p,w,P,N=0,R=!1,L=!1,D=!0;if(typeof e!="function")throw new ne(f);r=he(r)||0,vt(a)&&(R=!!a.leading,L="maxWait"in a,m=L?Pt(he(a.maxWait)||0,r):m,D="trailing"in a?!!a.trailing:D);function z(wt){var me=l,Ue=_;return l=_=n,N=wt,p=e.apply(Ue,me),p}function H(wt){return N=wt,w=wn(et,r),R?z(wt):p}function V(wt){var me=wt-P,Ue=wt-N,J0=r-me;return L?Nt(J0,m-Ue):J0}function Y(wt){var me=wt-P,Ue=wt-N;return P===n||me>=r||me<0||L&&Ue>=m}function et(){var wt=qr();if(Y(wt))return nt(wt);w=wn(et,V(wt))}function nt(wt){return w=n,D&&l?z(wt):(l=_=n,p)}function jt(){w!==n&&Wh(w),N=0,l=P=_=w=n}function Ft(){return w===n?p:nt(qr())}function te(){var wt=qr(),me=Y(wt);if(l=arguments,_=this,P=wt,me){if(w===n)return H(P);if(L)return Wh(w),w=wn(et,r),z(P)}return w===n&&(w=wn(et,r)),p}return te.cancel=jt,te.flush=Ft,te}var O_=tt(function(e,r){return ph(e,1,r)}),T_=tt(function(e,r,a){return ph(e,he(r)||0,a)});function B_(e){return Te(e,rt)}function Dr(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new ne(f);var a=function(){var l=arguments,_=r?r.apply(this,l):l[0],m=a.cache;if(m.has(_))return m.get(_);var p=e.apply(this,l);return a.cache=m.set(_,p)||m,p};return a.cache=new(Dr.Cache||Le),a}Dr.Cache=Le;function Ur(e){if(typeof e!="function")throw new ne(f);return function(){var r=arguments;switch(r.length){case 0:return!e.call(this);case 1:return!e.call(this,r[0]);case 2:return!e.call(this,r[0],r[1]);case 3:return!e.call(this,r[0],r[1],r[2])}return!e.apply(this,r)}}function F_(e){return A0(2,e)}var q_=Sc(function(e,r){r=r.length==1&&J(r[0])?gt(r[0],Jt(k())):gt(It(r,1),Jt(k()));var a=r.length;return tt(function(l){for(var _=-1,m=Nt(l.length,a);++_<m;)l[_]=r[_].call(this,l[_]);return Qt(e,this,l)})}),Ia=tt(function(e,r){var a=Ye(r,Ti(Ia));return Te(e,$,n,r,a)}),R0=tt(function(e,r){var a=Ye(r,Ti(R0));return Te(e,X,n,r,a)}),D_=Be(function(e,r){return Te(e,j,n,n,n,r)});function U_(e,r){if(typeof e!="function")throw new ne(f);return r=r===n?r:Z(r),tt(e,r)}function W_(e,r){if(typeof e!="function")throw new ne(f);return r=r==null?0:Pt(Z(r),0),tt(function(a){var l=a[r],_=Ve(a,0,r);return l&&He(_,l),Qt(e,this,_)})}function $_(e,r,a){var l=!0,_=!0;if(typeof e!="function")throw new ne(f);return vt(a)&&(l="leading"in a?!!a.leading:l,_="trailing"in a?!!a.trailing:_),N0(e,r,{leading:l,maxWait:r,trailing:_})}function z_(e){return b0(e,1)}function X_(e,r){return Ia(_a(r),e)}function k_(){if(!arguments.length)return[];var e=arguments[0];return J(e)?e:[e]}function H_(e){return se(e,E)}function Y_(e,r){return r=typeof r=="function"?r:n,se(e,E,r)}function K_(e){return se(e,M|E)}function Q_(e,r){return r=typeof r=="function"?r:n,se(e,M|E,r)}function J_(e,r){return r==null||yh(e,r,At(r))}function Me(e,r){return e===r||e!==e&&r!==r}var Z_=Rr(ea),V_=Rr(function(e,r){return e>=r}),_i=Ph(function(){return arguments}())?Ph:function(e){return mt(e)&&ut.call(e,"callee")&&!lh.call(e,"callee")},J=G.isArray,j_=Ho?Jt(Ho):oc;function $t(e){return e!=null&&Wr(e.length)&&!qe(e)}function pt(e){return mt(e)&&$t(e)}function tg(e){return e===!0||e===!1||mt(e)&&Tt(e)==tn}var je=g1||Ua,eg=Yo?Jt(Yo):hc;function ig(e){return mt(e)&&e.nodeType===1&&!En(e)}function ng(e){if(e==null)return!0;if($t(e)&&(J(e)||typeof e=="string"||typeof e.splice=="function"||je(e)||Bi(e)||_i(e)))return!e.length;var r=Rt(e);if(r==_e||r==ge)return!e.size;if(pn(e))return!ra(e).length;for(var a in e)if(ut.call(e,a))return!1;return!0}function rg(e,r){return Mn(e,r)}function sg(e,r,a){a=typeof a=="function"?a:n;var l=a?a(e,r):n;return l===n?Mn(e,r,n,a):!!l}function Ca(e){if(!mt(e))return!1;var r=Tt(e);return r==jn||r==Gf||typeof e.message=="string"&&typeof e.name=="string"&&!En(e)}function ag(e){return typeof e=="number"&&_h(e)}function qe(e){if(!vt(e))return!1;var r=Tt(e);return r==tr||r==po||r==Af||r==Cf}function L0(e){return typeof e=="number"&&e==Z(e)}function Wr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Xe}function vt(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}function mt(e){return e!=null&&typeof e=="object"}var O0=Ko?Jt(Ko):fc;function og(e,r){return e===r||na(e,r,pa(r))}function hg(e,r,a){return a=typeof a=="function"?a:n,na(e,r,pa(r),a)}function ug(e){return T0(e)&&e!=+e}function fg(e){if(Yc(e))throw new Q(h);return bh(e)}function lg(e){return e===null}function cg(e){return e==null}function T0(e){return typeof e=="number"||mt(e)&&Tt(e)==nn}function En(e){if(!mt(e)||Tt(e)!=Ne)return!1;var r=gr(e);if(r===null)return!0;var a=ut.call(r,"constructor")&&r.constructor;return typeof a=="function"&&a instanceof a&&fr.call(a)==h1}var Na=Qo?Jt(Qo):lc;function _g(e){return L0(e)&&e>=-Xe&&e<=Xe}var B0=Jo?Jt(Jo):cc;function $r(e){return typeof e=="string"||!J(e)&&mt(e)&&Tt(e)==sn}function Vt(e){return typeof e=="symbol"||mt(e)&&Tt(e)==er}var Bi=Zo?Jt(Zo):_c;function gg(e){return e===n}function vg(e){return mt(e)&&Rt(e)==an}function dg(e){return mt(e)&&Tt(e)==Rf}var Mg=Rr(sa),mg=Rr(function(e,r){return e<=r});function F0(e){if(!e)return[];if($t(e))return $r(e)?ve(e):Wt(e);if(un&&e[un])return Jl(e[un]());var r=Rt(e),a=r==_e?Hs:r==ge?or:Fi;return a(e)}function De(e){if(!e)return e===0?e:0;if(e=he(e),e===Ce||e===-Ce){var r=e<0?-1:1;return r*xf}return e===e?e:0}function Z(e){var r=De(e),a=r%1;return r===r?a?r-a:r:0}function q0(e){return e?ui(Z(e),0,Ee):0}function he(e){if(typeof e=="number")return e;if(Vt(e))return Zn;if(vt(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=vt(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=nh(e);var a=jf.test(e);return a||el.test(e)?Ll(e.slice(2),a?2:8):Vf.test(e)?Zn:+e}function D0(e){return Se(e,zt(e))}function yg(e){return e?ui(Z(e),-Xe,Xe):e===0?e:0}function at(e){return e==null?"":Zt(e)}var pg=Li(function(e,r){if(pn(r)||$t(r)){Se(r,At(r),e);return}for(var a in r)ut.call(r,a)&&gn(e,a,r[a])}),U0=Li(function(e,r){Se(r,zt(r),e)}),zr=Li(function(e,r,a,l){Se(r,zt(r),e,l)}),wg=Li(function(e,r,a,l){Se(r,At(r),e,l)}),Eg=Be(Vs);function xg(e,r){var a=Ri(e);return r==null?a:mh(a,r)}var Sg=tt(function(e,r){e=ft(e);var a=-1,l=r.length,_=l>2?r[2]:n;for(_&&Bt(r[0],r[1],_)&&(l=1);++a<l;)for(var m=r[a],p=zt(m),w=-1,P=p.length;++w<P;){var N=p[w],R=e[N];(R===n||Me(R,Ii[N])&&!ut.call(e,N))&&(e[N]=m[N])}return e}),Pg=tt(function(e){return e.push(n,n0),Qt(W0,n,e)});function bg(e,r){return jo(e,k(r,3),xe)}function Ag(e,r){return jo(e,k(r,3),ta)}function Gg(e,r){return e==null?e:js(e,k(r,3),zt)}function Ig(e,r){return e==null?e:xh(e,k(r,3),zt)}function Cg(e,r){return e&&xe(e,k(r,3))}function Ng(e,r){return e&&ta(e,k(r,3))}function Rg(e){return e==null?[]:Sr(e,At(e))}function Lg(e){return e==null?[]:Sr(e,zt(e))}function Ra(e,r,a){var l=e==null?n:fi(e,r);return l===n?a:l}function Og(e,r){return e!=null&&a0(e,r,nc)}function La(e,r){return e!=null&&a0(e,r,rc)}var Tg=Vh(function(e,r,a){r!=null&&typeof r.toString!="function"&&(r=lr.call(r)),e[r]=a},Ta(Xt)),Bg=Vh(function(e,r,a){r!=null&&typeof r.toString!="function"&&(r=lr.call(r)),ut.call(e,r)?e[r].push(a):e[r]=[a]},k),Fg=tt(dn);function At(e){return $t(e)?dh(e):ra(e)}function zt(e){return $t(e)?dh(e,!0):gc(e)}function qg(e,r){var a={};return r=k(r,3),xe(e,function(l,_,m){Oe(a,r(l,_,m),l)}),a}function Dg(e,r){var a={};return r=k(r,3),xe(e,function(l,_,m){Oe(a,_,r(l,_,m))}),a}var Ug=Li(function(e,r,a){Pr(e,r,a)}),W0=Li(function(e,r,a,l){Pr(e,r,a,l)}),Wg=Be(function(e,r){var a={};if(e==null)return a;var l=!1;r=gt(r,function(m){return m=Ze(m,e),l||(l=m.length>1),m}),Se(e,ma(e),a),l&&(a=se(a,M|v|E,Tc));for(var _=r.length;_--;)fa(a,r[_]);return a});function $g(e,r){return $0(e,Ur(k(r)))}var zg=Be(function(e,r){return e==null?{}:dc(e,r)});function $0(e,r){if(e==null)return{};var a=gt(ma(e),function(l){return[l]});return r=k(r),Lh(e,a,function(l,_){return r(l,_[0])})}function Xg(e,r,a){r=Ze(r,e);var l=-1,_=r.length;for(_||(_=1,e=n);++l<_;){var m=e==null?n:e[Pe(r[l])];m===n&&(l=_,m=a),e=qe(m)?m.call(e):m}return e}function kg(e,r,a){return e==null?e:mn(e,r,a)}function Hg(e,r,a,l){return l=typeof l=="function"?l:n,e==null?e:mn(e,r,a,l)}var z0=e0(At),X0=e0(zt);function Yg(e,r,a){var l=J(e),_=l||je(e)||Bi(e);if(r=k(r,4),a==null){var m=e&&e.constructor;_?a=l?new m:[]:vt(e)?a=qe(m)?Ri(gr(e)):{}:a={}}return(_?ie:xe)(e,function(p,w,P){return r(a,p,w,P)}),a}function Kg(e,r){return e==null?!0:fa(e,r)}function Qg(e,r,a){return e==null?e:qh(e,r,_a(a))}function Jg(e,r,a,l){return l=typeof l=="function"?l:n,e==null?e:qh(e,r,_a(a),l)}function Fi(e){return e==null?[]:ks(e,At(e))}function Zg(e){return e==null?[]:ks(e,zt(e))}function Vg(e,r,a){return a===n&&(a=r,r=n),a!==n&&(a=he(a),a=a===a?a:0),r!==n&&(r=he(r),r=r===r?r:0),ui(he(e),r,a)}function jg(e,r,a){return r=De(r),a===n?(a=r,r=0):a=De(a),e=he(e),sc(e,r,a)}function t4(e,r,a){if(a&&typeof a!="boolean"&&Bt(e,r,a)&&(r=a=n),a===n&&(typeof r=="boolean"?(a=r,r=n):typeof e=="boolean"&&(a=e,e=n)),e===n&&r===n?(e=0,r=1):(e=De(e),r===n?(r=e,e=0):r=De(r)),e>r){var l=e;e=r,r=l}if(a||e%1||r%1){var _=gh();return Nt(e+_*(r-e+Rl("1e-"+((_+"").length-1))),r)}return oa(e,r)}var e4=Oi(function(e,r,a){return r=r.toLowerCase(),e+(a?k0(r):r)});function k0(e){return Oa(at(e).toLowerCase())}function H0(e){return e=at(e),e&&e.replace(nl,kl).replace(El,"")}function i4(e,r,a){e=at(e),r=Zt(r);var l=e.length;a=a===n?l:ui(Z(a),0,l);var _=a;return a-=r.length,a>=0&&e.slice(a,_)==r}function n4(e){return e=at(e),e&&Ff.test(e)?e.replace(xo,Hl):e}function r4(e){return e=at(e),e&&zf.test(e)?e.replace(Is,"\\$&"):e}var s4=Oi(function(e,r,a){return e+(a?"-":"")+r.toLowerCase()}),a4=Oi(function(e,r,a){return e+(a?" ":"")+r.toLowerCase()}),o4=Qh("toLowerCase");function h4(e,r,a){e=at(e),r=Z(r);var l=r?Ai(e):0;if(!r||l>=r)return e;var _=(r-l)/2;return Nr(mr(_),a)+e+Nr(Mr(_),a)}function u4(e,r,a){e=at(e),r=Z(r);var l=r?Ai(e):0;return r&&l<r?e+Nr(r-l,a):e}function f4(e,r,a){e=at(e),r=Z(r);var l=r?Ai(e):0;return r&&l<r?Nr(r-l,a)+e:e}function l4(e,r,a){return a||r==null?r=0:r&&(r=+r),m1(at(e).replace(Cs,""),r||0)}function c4(e,r,a){return(a?Bt(e,r,a):r===n)?r=1:r=Z(r),ha(at(e),r)}function _4(){var e=arguments,r=at(e[0]);return e.length<3?r:r.replace(e[1],e[2])}var g4=Oi(function(e,r,a){return e+(a?"_":"")+r.toLowerCase()});function v4(e,r,a){return a&&typeof a!="number"&&Bt(e,r,a)&&(r=a=n),a=a===n?Ee:a>>>0,a?(e=at(e),e&&(typeof r=="string"||r!=null&&!Na(r))&&(r=Zt(r),!r&&bi(e))?Ve(ve(e),0,a):e.split(r,a)):[]}var d4=Oi(function(e,r,a){return e+(a?" ":"")+Oa(r)});function M4(e,r,a){return e=at(e),a=a==null?0:ui(Z(a),0,e.length),r=Zt(r),e.slice(a,a+r.length)==r}function m4(e,r,a){var l=d.templateSettings;a&&Bt(e,r,a)&&(r=n),e=at(e),r=zr({},r,l,i0);var _=zr({},r.imports,l.imports,i0),m=At(_),p=ks(_,m),w,P,N=0,R=r.interpolate||ir,L="__p += '",D=Ys((r.escape||ir).source+"|"+R.source+"|"+(R===So?Zf:ir).source+"|"+(r.evaluate||ir).source+"|$","g"),z="//# sourceURL="+(ut.call(r,"sourceURL")?(r.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Al+"]")+`
|
|
7
|
-
`;e.replace(D,function(Y,et,nt,jt,Ft,te){return nt||(nt=jt),L+=e.slice(N,te).replace(
|
|
6
|
+
`)}function Wc(e){return J(e)||_i(e)||!!(fh&&e&&e[fh])}function Fe(e,r){var a=typeof e;return r=r??Xe,!!r&&(a=="number"||a!="symbol"&&jf.test(e))&&e>-1&&e%1==0&&e<r}function Bt(e,r,a){if(!vt(a))return!1;var l=typeof r;return(l=="number"?$t(a)&&Fe(r,a.length):l=="string"&&r in a)?Me(a[r],e):!1}function Ma(e,r){if(J(e))return!1;var a=typeof e;return a=="number"||a=="symbol"||a=="boolean"||e==null||Vt(e)?!0:qf.test(e)||!Ff.test(e)||r!=null&&e in ft(r)}function $c(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function ma(e){var r=Lr(e),a=d[r];if(typeof a!="function"||!(r in it.prototype))return!1;if(e===a)return!0;var l=ga(a);return!!l&&e===l[0]}function zc(e){return!!ah&&ah in e}var Xc=ur?qe:Ta;function pn(e){var r=e&&e.constructor,a=typeof r=="function"&&r.prototype||Ii;return e===a}function a0(e){return e===e&&!vt(e)}function o0(e,r){return function(a){return a==null?!1:a[e]===r&&(r!==n||e in ft(a))}}function kc(e){var r=Dr(e,function(l){return a.size===g&&a.clear(),l}),a=r.cache;return r}function Hc(e,r){var a=e[1],l=r[1],_=a|l,m=_<(A|C|K),p=l==K&&a==F||l==K&&a==j&&e[7].length<=r[8]||l==(K|j)&&r[7].length<=r[8]&&a==F;if(!(m||p))return e;l&A&&(e[2]=r[2],_|=a&A?0:T);var w=r[3];if(w){var P=e[3];e[3]=P?zh(P,w,r[4]):w,e[4]=P?Ye(e[3],y):r[4]}return w=r[5],w&&(P=e[5],e[5]=P?Xh(P,w,r[6]):w,e[6]=P?Ye(e[5],y):r[6]),w=r[7],w&&(e[7]=w),l&K&&(e[8]=e[8]==null?r[8]:Nt(e[8],r[8])),e[9]==null&&(e[9]=r[9]),e[0]=r[0],e[1]=_,e}function Yc(e){var r=[];if(e!=null)for(var a in ft(e))r.push(a);return r}function Kc(e){return lr.call(e)}function h0(e,r,a){return r=Pt(r===n?e.length-1:r,0),function(){for(var l=arguments,_=-1,m=Pt(l.length-r,0),p=G(m);++_<m;)p[_]=l[r+_];_=-1;for(var w=G(r+1);++_<r;)w[_]=l[_];return w[r]=a(p),Qt(e,this,w)}}function u0(e,r){return r.length<2?e:fi(e,ae(r,0,-1))}function Qc(e,r){for(var a=e.length,l=Nt(r.length,a),_=Wt(e);l--;){var m=r[l];e[l]=Fe(m,a)?_[m]:n}return e}function ya(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}var f0=c0(Lh),wn=f1||function(e,r){return Gt.setTimeout(e,r)},pa=c0(mc);function l0(e,r,a){var l=r+"";return pa(e,Uc(l,Jc(Fc(l),a)))}function c0(e){var r=0,a=0;return function(){var l=g1(),_=bt-(l-a);if(a=l,_>0){if(++r>=xt)return arguments[0]}else r=0;return e.apply(n,arguments)}}function Tr(e,r){var a=-1,l=e.length,_=l-1;for(r=r===n?l:r;++a<r;){var m=ia(a,_),p=e[m];e[m]=e[a],e[a]=p}return e.length=r,e}var _0=kc(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(Df,function(a,l,_,m){r.push(_?m.replace(Yf,"$1"):l||a)}),r});function Pe(e){if(typeof e=="string"||Vt(e))return e;var r=e+"";return r=="0"&&1/e==-Ce?"-0":r}function ci(e){if(e!=null){try{return fr.call(e)}catch{}try{return e+""}catch{}}return""}function Jc(e,r){return ie(xf,function(a){var l="_."+a[0];r&a[1]&&!sr(e,l)&&e.push(l)}),e.sort()}function g0(e){if(e instanceof it)return e.clone();var r=new re(e.__wrapped__,e.__chain__);return r.__actions__=Wt(e.__actions__),r.__index__=e.__index__,r.__values__=e.__values__,r}function Zc(e,r,a){(a?Bt(e,r,a):r===n)?r=1:r=Pt(Z(r),0);var l=e==null?0:e.length;if(!l||r<1)return[];for(var _=0,m=0,p=G(Mr(l/r));_<l;)p[m++]=ae(e,_,_+=r);return p}function Vc(e){for(var r=-1,a=e==null?0:e.length,l=0,_=[];++r<a;){var m=e[r];m&&(_[l++]=m)}return _}function jc(){var e=arguments.length;if(!e)return[];for(var r=G(e-1),a=arguments[0],l=e;l--;)r[l-1]=arguments[l];return He(J(a)?Wt(a):[a],It(r,1))}var t2=tt(function(e,r){return pt(e)?vn(e,It(r,1,pt,!0)):[]}),e2=tt(function(e,r){var a=oe(r);return pt(a)&&(a=n),pt(e)?vn(e,It(r,1,pt,!0),k(a,2)):[]}),i2=tt(function(e,r){var a=oe(r);return pt(a)&&(a=n),pt(e)?vn(e,It(r,1,pt,!0),n,a):[]});function n2(e,r,a){var l=e==null?0:e.length;return l?(r=a||r===n?1:Z(r),ae(e,r<0?0:r,l)):[]}function r2(e,r,a){var l=e==null?0:e.length;return l?(r=a||r===n?1:Z(r),r=l-r,ae(e,0,r<0?0:r)):[]}function s2(e,r){return e&&e.length?Ar(e,k(r,3),!0,!0):[]}function a2(e,r){return e&&e.length?Ar(e,k(r,3),!0):[]}function o2(e,r,a,l){var _=e==null?0:e.length;return _?(a&&typeof a!="number"&&Bt(e,r,a)&&(a=0,l=_),j1(e,r,a,l)):[]}function v0(e,r,a){var l=e==null?0:e.length;if(!l)return-1;var _=a==null?0:Z(a);return _<0&&(_=Pt(l+_,0)),ar(e,k(r,3),_)}function d0(e,r,a){var l=e==null?0:e.length;if(!l)return-1;var _=l-1;return a!==n&&(_=Z(a),_=a<0?Pt(l+_,0):Nt(_,l-1)),ar(e,k(r,3),_,!0)}function M0(e){var r=e==null?0:e.length;return r?It(e,1):[]}function h2(e){var r=e==null?0:e.length;return r?It(e,Ce):[]}function u2(e,r){var a=e==null?0:e.length;return a?(r=r===n?1:Z(r),It(e,r)):[]}function f2(e){for(var r=-1,a=e==null?0:e.length,l={};++r<a;){var _=e[r];l[_[0]]=_[1]}return l}function m0(e){return e&&e.length?e[0]:n}function l2(e,r,a){var l=e==null?0:e.length;if(!l)return-1;var _=a==null?0:Z(a);return _<0&&(_=Pt(l+_,0)),Pi(e,r,_)}function c2(e){var r=e==null?0:e.length;return r?ae(e,0,-1):[]}var _2=tt(function(e){var r=gt(e,oa);return r.length&&r[0]===e[0]?Zs(r):[]}),g2=tt(function(e){var r=oe(e),a=gt(e,oa);return r===oe(a)?r=n:a.pop(),a.length&&a[0]===e[0]?Zs(a,k(r,2)):[]}),v2=tt(function(e){var r=oe(e),a=gt(e,oa);return r=typeof r=="function"?r:n,r&&a.pop(),a.length&&a[0]===e[0]?Zs(a,n,r):[]});function d2(e,r){return e==null?"":c1.call(e,r)}function oe(e){var r=e==null?0:e.length;return r?e[r-1]:n}function M2(e,r,a){var l=e==null?0:e.length;if(!l)return-1;var _=l;return a!==n&&(_=Z(a),_=_<0?Pt(l+_,0):Nt(_,l-1)),r===r?Jl(e,r,_):ar(e,Vo,_,!0)}function m2(e,r){return e&&e.length?Ih(e,Z(r)):n}var y2=tt(y0);function y0(e,r){return e&&e.length&&r&&r.length?ea(e,r):e}function p2(e,r,a){return e&&e.length&&r&&r.length?ea(e,r,k(a,2)):e}function w2(e,r,a){return e&&e.length&&r&&r.length?ea(e,r,n,a):e}var E2=Be(function(e,r){var a=e==null?0:e.length,l=Ys(e,r);return Rh(e,gt(r,function(_){return Fe(_,a)?+_:_}).sort($h)),l});function x2(e,r){var a=[];if(!(e&&e.length))return a;var l=-1,_=[],m=e.length;for(r=k(r,3);++l<m;){var p=e[l];r(p,l,e)&&(a.push(p),_.push(l))}return Rh(e,_),a}function wa(e){return e==null?e:d1.call(e)}function S2(e,r,a){var l=e==null?0:e.length;return l?(a&&typeof a!="number"&&Bt(e,r,a)?(r=0,a=l):(r=r==null?0:Z(r),a=a===n?l:Z(a)),ae(e,r,a)):[]}function P2(e,r){return br(e,r)}function b2(e,r,a){return ra(e,r,k(a,2))}function A2(e,r){var a=e==null?0:e.length;if(a){var l=br(e,r);if(l<a&&Me(e[l],r))return l}return-1}function G2(e,r){return br(e,r,!0)}function I2(e,r,a){return ra(e,r,k(a,2),!0)}function C2(e,r){var a=e==null?0:e.length;if(a){var l=br(e,r,!0)-1;if(Me(e[l],r))return l}return-1}function N2(e){return e&&e.length?Oh(e):[]}function R2(e,r){return e&&e.length?Oh(e,k(r,2)):[]}function L2(e){var r=e==null?0:e.length;return r?ae(e,1,r):[]}function O2(e,r,a){return e&&e.length?(r=a||r===n?1:Z(r),ae(e,0,r<0?0:r)):[]}function T2(e,r,a){var l=e==null?0:e.length;return l?(r=a||r===n?1:Z(r),r=l-r,ae(e,r<0?0:r,l)):[]}function B2(e,r){return e&&e.length?Ar(e,k(r,3),!1,!0):[]}function F2(e,r){return e&&e.length?Ar(e,k(r,3)):[]}var q2=tt(function(e){return Je(It(e,1,pt,!0))}),D2=tt(function(e){var r=oe(e);return pt(r)&&(r=n),Je(It(e,1,pt,!0),k(r,2))}),U2=tt(function(e){var r=oe(e);return r=typeof r=="function"?r:n,Je(It(e,1,pt,!0),n,r)});function W2(e){return e&&e.length?Je(e):[]}function $2(e,r){return e&&e.length?Je(e,k(r,2)):[]}function z2(e,r){return r=typeof r=="function"?r:n,e&&e.length?Je(e,n,r):[]}function Ea(e){if(!(e&&e.length))return[];var r=0;return e=ke(e,function(a){if(pt(a))return r=Pt(a.length,r),!0}),Ds(r,function(a){return gt(e,Bs(a))})}function p0(e,r){if(!(e&&e.length))return[];var a=Ea(e);return r==null?a:gt(a,function(l){return Qt(r,n,l)})}var X2=tt(function(e,r){return pt(e)?vn(e,r):[]}),k2=tt(function(e){return aa(ke(e,pt))}),H2=tt(function(e){var r=oe(e);return pt(r)&&(r=n),aa(ke(e,pt),k(r,2))}),Y2=tt(function(e){var r=oe(e);return r=typeof r=="function"?r:n,aa(ke(e,pt),n,r)}),K2=tt(Ea);function Q2(e,r){return qh(e||[],r||[],gn)}function J2(e,r){return qh(e||[],r||[],mn)}var Z2=tt(function(e){var r=e.length,a=r>1?e[r-1]:n;return a=typeof a=="function"?(e.pop(),a):n,p0(e,a)});function w0(e){var r=d(e);return r.__chain__=!0,r}function V2(e,r){return r(e),e}function Br(e,r){return r(e)}var j2=Be(function(e){var r=e.length,a=r?e[0]:0,l=this.__wrapped__,_=function(m){return Ys(m,e)};return r>1||this.__actions__.length||!(l instanceof it)||!Fe(a)?this.thru(_):(l=l.slice(a,+a+(r?1:0)),l.__actions__.push({func:Br,args:[_],thisArg:n}),new re(l,this.__chain__).thru(function(m){return r&&!m.length&&m.push(n),m}))});function t_(){return w0(this)}function e_(){return new re(this.value(),this.__chain__)}function i_(){this.__values__===n&&(this.__values__=T0(this.value()));var e=this.__index__>=this.__values__.length,r=e?n:this.__values__[this.__index__++];return{done:e,value:r}}function n_(){return this}function r_(e){for(var r,a=this;a instanceof wr;){var l=g0(a);l.__index__=0,l.__values__=n,r?_.__wrapped__=l:r=l;var _=l;a=a.__wrapped__}return _.__wrapped__=e,r}function s_(){var e=this.__wrapped__;if(e instanceof it){var r=e;return this.__actions__.length&&(r=new it(this)),r=r.reverse(),r.__actions__.push({func:Br,args:[wa],thisArg:n}),new re(r,this.__chain__)}return this.thru(wa)}function a_(){return Fh(this.__wrapped__,this.__actions__)}var o_=Gr(function(e,r,a){ut.call(e,a)?++e[a]:Oe(e,a,1)});function h_(e,r,a){var l=J(e)?Jo:V1;return a&&Bt(e,r,a)&&(r=n),l(e,k(r,3))}function u_(e,r){var a=J(e)?ke:ph;return a(e,k(r,3))}var f_=Kh(v0),l_=Kh(d0);function c_(e,r){return It(Fr(e,r),1)}function __(e,r){return It(Fr(e,r),Ce)}function g_(e,r,a){return a=a===n?1:Z(a),It(Fr(e,r),a)}function E0(e,r){var a=J(e)?ie:Qe;return a(e,k(r,3))}function x0(e,r){var a=J(e)?Ll:yh;return a(e,k(r,3))}var v_=Gr(function(e,r,a){ut.call(e,a)?e[a].push(r):Oe(e,a,[r])});function d_(e,r,a,l){e=$t(e)?e:Fi(e),a=a&&!l?Z(a):0;var _=e.length;return a<0&&(a=Pt(_+a,0)),$r(e)?a<=_&&e.indexOf(r,a)>-1:!!_&&Pi(e,r,a)>-1}var M_=tt(function(e,r,a){var l=-1,_=typeof r=="function",m=$t(e)?G(e.length):[];return Qe(e,function(p){m[++l]=_?Qt(r,p,a):dn(p,r,a)}),m}),m_=Gr(function(e,r,a){Oe(e,a,r)});function Fr(e,r){var a=J(e)?gt:bh;return a(e,k(r,3))}function y_(e,r,a,l){return e==null?[]:(J(r)||(r=r==null?[]:[r]),a=l?n:a,J(a)||(a=a==null?[]:[a]),Ch(e,r,a))}var p_=Gr(function(e,r,a){e[a?0:1].push(r)},function(){return[[],[]]});function w_(e,r,a){var l=J(e)?Os:th,_=arguments.length<3;return l(e,k(r,4),a,_,Qe)}function E_(e,r,a){var l=J(e)?Ol:th,_=arguments.length<3;return l(e,k(r,4),a,_,yh)}function x_(e,r){var a=J(e)?ke:ph;return a(e,Ur(k(r,3)))}function S_(e){var r=J(e)?vh:dc;return r(e)}function P_(e,r,a){(a?Bt(e,r,a):r===n)?r=1:r=Z(r);var l=J(e)?Y1:Mc;return l(e,r)}function b_(e){var r=J(e)?K1:yc;return r(e)}function A_(e){if(e==null)return 0;if($t(e))return $r(e)?Ai(e):e.length;var r=Rt(e);return r==_e||r==ge?e.size:js(e).length}function G_(e,r,a){var l=J(e)?Ts:pc;return a&&Bt(e,r,a)&&(r=n),l(e,k(r,3))}var I_=tt(function(e,r){if(e==null)return[];var a=r.length;return a>1&&Bt(e,r[0],r[1])?r=[]:a>2&&Bt(r[0],r[1],r[2])&&(r=[r[0]]),Ch(e,It(r,1),[])}),qr=u1||function(){return Gt.Date.now()};function C_(e,r){if(typeof r!="function")throw new ne(f);return e=Z(e),function(){if(--e<1)return r.apply(this,arguments)}}function S0(e,r,a){return r=a?n:r,r=e&&r==null?e.length:r,Te(e,K,n,n,n,n,r)}function P0(e,r){var a;if(typeof r!="function")throw new ne(f);return e=Z(e),function(){return--e>0&&(a=r.apply(this,arguments)),e<=1&&(r=n),a}}var xa=tt(function(e,r,a){var l=A;if(a.length){var _=Ye(a,Ti(xa));l|=$}return Te(e,l,r,a,_)}),b0=tt(function(e,r,a){var l=A|C;if(a.length){var _=Ye(a,Ti(b0));l|=$}return Te(r,l,e,a,_)});function A0(e,r,a){r=a?n:r;var l=Te(e,F,n,n,n,n,n,r);return l.placeholder=A0.placeholder,l}function G0(e,r,a){r=a?n:r;var l=Te(e,W,n,n,n,n,n,r);return l.placeholder=G0.placeholder,l}function I0(e,r,a){var l,_,m,p,w,P,N=0,R=!1,L=!1,D=!0;if(typeof e!="function")throw new ne(f);r=he(r)||0,vt(a)&&(R=!!a.leading,L="maxWait"in a,m=L?Pt(he(a.maxWait)||0,r):m,D="trailing"in a?!!a.trailing:D);function z(wt){var me=l,Ue=_;return l=_=n,N=wt,p=e.apply(Ue,me),p}function H(wt){return N=wt,w=wn(et,r),R?z(wt):p}function V(wt){var me=wt-P,Ue=wt-N,K0=r-me;return L?Nt(K0,m-Ue):K0}function Y(wt){var me=wt-P,Ue=wt-N;return P===n||me>=r||me<0||L&&Ue>=m}function et(){var wt=qr();if(Y(wt))return nt(wt);w=wn(et,V(wt))}function nt(wt){return w=n,D&&l?z(wt):(l=_=n,p)}function jt(){w!==n&&Dh(w),N=0,l=P=_=w=n}function Ft(){return w===n?p:nt(qr())}function te(){var wt=qr(),me=Y(wt);if(l=arguments,_=this,P=wt,me){if(w===n)return H(P);if(L)return Dh(w),w=wn(et,r),z(P)}return w===n&&(w=wn(et,r)),p}return te.cancel=jt,te.flush=Ft,te}var N_=tt(function(e,r){return mh(e,1,r)}),R_=tt(function(e,r,a){return mh(e,he(r)||0,a)});function L_(e){return Te(e,rt)}function Dr(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new ne(f);var a=function(){var l=arguments,_=r?r.apply(this,l):l[0],m=a.cache;if(m.has(_))return m.get(_);var p=e.apply(this,l);return a.cache=m.set(_,p)||m,p};return a.cache=new(Dr.Cache||Le),a}Dr.Cache=Le;function Ur(e){if(typeof e!="function")throw new ne(f);return function(){var r=arguments;switch(r.length){case 0:return!e.call(this);case 1:return!e.call(this,r[0]);case 2:return!e.call(this,r[0],r[1]);case 3:return!e.call(this,r[0],r[1],r[2])}return!e.apply(this,r)}}function O_(e){return P0(2,e)}var T_=wc(function(e,r){r=r.length==1&&J(r[0])?gt(r[0],Jt(k())):gt(It(r,1),Jt(k()));var a=r.length;return tt(function(l){for(var _=-1,m=Nt(l.length,a);++_<m;)l[_]=r[_].call(this,l[_]);return Qt(e,this,l)})}),Sa=tt(function(e,r){var a=Ye(r,Ti(Sa));return Te(e,$,n,r,a)}),C0=tt(function(e,r){var a=Ye(r,Ti(C0));return Te(e,X,n,r,a)}),B_=Be(function(e,r){return Te(e,j,n,n,n,r)});function F_(e,r){if(typeof e!="function")throw new ne(f);return r=r===n?r:Z(r),tt(e,r)}function q_(e,r){if(typeof e!="function")throw new ne(f);return r=r==null?0:Pt(Z(r),0),tt(function(a){var l=a[r],_=Ve(a,0,r);return l&&He(_,l),Qt(e,this,_)})}function D_(e,r,a){var l=!0,_=!0;if(typeof e!="function")throw new ne(f);return vt(a)&&(l="leading"in a?!!a.leading:l,_="trailing"in a?!!a.trailing:_),I0(e,r,{leading:l,maxWait:r,trailing:_})}function U_(e){return S0(e,1)}function W_(e,r){return Sa(ha(r),e)}function $_(){if(!arguments.length)return[];var e=arguments[0];return J(e)?e:[e]}function z_(e){return se(e,E)}function X_(e,r){return r=typeof r=="function"?r:n,se(e,E,r)}function k_(e){return se(e,M|E)}function H_(e,r){return r=typeof r=="function"?r:n,se(e,M|E,r)}function Y_(e,r){return r==null||Mh(e,r,At(r))}function Me(e,r){return e===r||e!==e&&r!==r}var K_=Rr(Js),Q_=Rr(function(e,r){return e>=r}),_i=xh(function(){return arguments}())?xh:function(e){return mt(e)&&ut.call(e,"callee")&&!uh.call(e,"callee")},J=G.isArray,J_=Xo?Jt(Xo):rc;function $t(e){return e!=null&&Wr(e.length)&&!qe(e)}function pt(e){return mt(e)&&$t(e)}function Z_(e){return e===!0||e===!1||mt(e)&&Tt(e)==tn}var je=l1||Ta,V_=ko?Jt(ko):sc;function j_(e){return mt(e)&&e.nodeType===1&&!En(e)}function tg(e){if(e==null)return!0;if($t(e)&&(J(e)||typeof e=="string"||typeof e.splice=="function"||je(e)||Bi(e)||_i(e)))return!e.length;var r=Rt(e);if(r==_e||r==ge)return!e.size;if(pn(e))return!js(e).length;for(var a in e)if(ut.call(e,a))return!1;return!0}function eg(e,r){return Mn(e,r)}function ig(e,r,a){a=typeof a=="function"?a:n;var l=a?a(e,r):n;return l===n?Mn(e,r,n,a):!!l}function Pa(e){if(!mt(e))return!1;var r=Tt(e);return r==jn||r==Pf||typeof e.message=="string"&&typeof e.name=="string"&&!En(e)}function ng(e){return typeof e=="number"&&lh(e)}function qe(e){if(!vt(e))return!1;var r=Tt(e);return r==tr||r==mo||r==Sf||r==Af}function N0(e){return typeof e=="number"&&e==Z(e)}function Wr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Xe}function vt(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}function mt(e){return e!=null&&typeof e=="object"}var R0=Ho?Jt(Ho):oc;function rg(e,r){return e===r||Vs(e,r,va(r))}function sg(e,r,a){return a=typeof a=="function"?a:n,Vs(e,r,va(r),a)}function ag(e){return L0(e)&&e!=+e}function og(e){if(Xc(e))throw new Q(h);return Sh(e)}function hg(e){return e===null}function ug(e){return e==null}function L0(e){return typeof e=="number"||mt(e)&&Tt(e)==nn}function En(e){if(!mt(e)||Tt(e)!=Ne)return!1;var r=gr(e);if(r===null)return!0;var a=ut.call(r,"constructor")&&r.constructor;return typeof a=="function"&&a instanceof a&&fr.call(a)==s1}var ba=Yo?Jt(Yo):hc;function fg(e){return N0(e)&&e>=-Xe&&e<=Xe}var O0=Ko?Jt(Ko):uc;function $r(e){return typeof e=="string"||!J(e)&&mt(e)&&Tt(e)==sn}function Vt(e){return typeof e=="symbol"||mt(e)&&Tt(e)==er}var Bi=Qo?Jt(Qo):fc;function lg(e){return e===n}function cg(e){return mt(e)&&Rt(e)==an}function _g(e){return mt(e)&&Tt(e)==If}var gg=Rr(ta),vg=Rr(function(e,r){return e<=r});function T0(e){if(!e)return[];if($t(e))return $r(e)?ve(e):Wt(e);if(un&&e[un])return Yl(e[un]());var r=Rt(e),a=r==_e?Ws:r==ge?or:Fi;return a(e)}function De(e){if(!e)return e===0?e:0;if(e=he(e),e===Ce||e===-Ce){var r=e<0?-1:1;return r*pf}return e===e?e:0}function Z(e){var r=De(e),a=r%1;return r===r?a?r-a:r:0}function B0(e){return e?ui(Z(e),0,Ee):0}function he(e){if(typeof e=="number")return e;if(Vt(e))return Zn;if(vt(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=vt(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=eh(e);var a=Jf.test(e);return a||Vf.test(e)?Cl(e.slice(2),a?2:8):Qf.test(e)?Zn:+e}function F0(e){return Se(e,zt(e))}function dg(e){return e?ui(Z(e),-Xe,Xe):e===0?e:0}function at(e){return e==null?"":Zt(e)}var Mg=Li(function(e,r){if(pn(r)||$t(r)){Se(r,At(r),e);return}for(var a in r)ut.call(r,a)&&gn(e,a,r[a])}),q0=Li(function(e,r){Se(r,zt(r),e)}),zr=Li(function(e,r,a,l){Se(r,zt(r),e,l)}),mg=Li(function(e,r,a,l){Se(r,At(r),e,l)}),yg=Be(Ys);function pg(e,r){var a=Ri(e);return r==null?a:dh(a,r)}var wg=tt(function(e,r){e=ft(e);var a=-1,l=r.length,_=l>2?r[2]:n;for(_&&Bt(r[0],r[1],_)&&(l=1);++a<l;)for(var m=r[a],p=zt(m),w=-1,P=p.length;++w<P;){var N=p[w],R=e[N];(R===n||Me(R,Ii[N])&&!ut.call(e,N))&&(e[N]=m[N])}return e}),Eg=tt(function(e){return e.push(n,e0),Qt(D0,n,e)});function xg(e,r){return Zo(e,k(r,3),xe)}function Sg(e,r){return Zo(e,k(r,3),Qs)}function Pg(e,r){return e==null?e:Ks(e,k(r,3),zt)}function bg(e,r){return e==null?e:wh(e,k(r,3),zt)}function Ag(e,r){return e&&xe(e,k(r,3))}function Gg(e,r){return e&&Qs(e,k(r,3))}function Ig(e){return e==null?[]:Sr(e,At(e))}function Cg(e){return e==null?[]:Sr(e,zt(e))}function Aa(e,r,a){var l=e==null?n:fi(e,r);return l===n?a:l}function Ng(e,r){return e!=null&&r0(e,r,tc)}function Ga(e,r){return e!=null&&r0(e,r,ec)}var Rg=Jh(function(e,r,a){r!=null&&typeof r.toString!="function"&&(r=lr.call(r)),e[r]=a},Ca(Xt)),Lg=Jh(function(e,r,a){r!=null&&typeof r.toString!="function"&&(r=lr.call(r)),ut.call(e,r)?e[r].push(a):e[r]=[a]},k),Og=tt(dn);function At(e){return $t(e)?gh(e):js(e)}function zt(e){return $t(e)?gh(e,!0):lc(e)}function Tg(e,r){var a={};return r=k(r,3),xe(e,function(l,_,m){Oe(a,r(l,_,m),l)}),a}function Bg(e,r){var a={};return r=k(r,3),xe(e,function(l,_,m){Oe(a,_,r(l,_,m))}),a}var Fg=Li(function(e,r,a){Pr(e,r,a)}),D0=Li(function(e,r,a,l){Pr(e,r,a,l)}),qg=Be(function(e,r){var a={};if(e==null)return a;var l=!1;r=gt(r,function(m){return m=Ze(m,e),l||(l=m.length>1),m}),Se(e,_a(e),a),l&&(a=se(a,M|v|E,Rc));for(var _=r.length;_--;)sa(a,r[_]);return a});function Dg(e,r){return U0(e,Ur(k(r)))}var Ug=Be(function(e,r){return e==null?{}:_c(e,r)});function U0(e,r){if(e==null)return{};var a=gt(_a(e),function(l){return[l]});return r=k(r),Nh(e,a,function(l,_){return r(l,_[0])})}function Wg(e,r,a){r=Ze(r,e);var l=-1,_=r.length;for(_||(_=1,e=n);++l<_;){var m=e==null?n:e[Pe(r[l])];m===n&&(l=_,m=a),e=qe(m)?m.call(e):m}return e}function $g(e,r,a){return e==null?e:mn(e,r,a)}function zg(e,r,a,l){return l=typeof l=="function"?l:n,e==null?e:mn(e,r,a,l)}var W0=jh(At),$0=jh(zt);function Xg(e,r,a){var l=J(e),_=l||je(e)||Bi(e);if(r=k(r,4),a==null){var m=e&&e.constructor;_?a=l?new m:[]:vt(e)?a=qe(m)?Ri(gr(e)):{}:a={}}return(_?ie:xe)(e,function(p,w,P){return r(a,p,w,P)}),a}function kg(e,r){return e==null?!0:sa(e,r)}function Hg(e,r,a){return e==null?e:Bh(e,r,ha(a))}function Yg(e,r,a,l){return l=typeof l=="function"?l:n,e==null?e:Bh(e,r,ha(a),l)}function Fi(e){return e==null?[]:Us(e,At(e))}function Kg(e){return e==null?[]:Us(e,zt(e))}function Qg(e,r,a){return a===n&&(a=r,r=n),a!==n&&(a=he(a),a=a===a?a:0),r!==n&&(r=he(r),r=r===r?r:0),ui(he(e),r,a)}function Jg(e,r,a){return r=De(r),a===n?(a=r,r=0):a=De(a),e=he(e),ic(e,r,a)}function Zg(e,r,a){if(a&&typeof a!="boolean"&&Bt(e,r,a)&&(r=a=n),a===n&&(typeof r=="boolean"?(a=r,r=n):typeof e=="boolean"&&(a=e,e=n)),e===n&&r===n?(e=0,r=1):(e=De(e),r===n?(r=e,e=0):r=De(r)),e>r){var l=e;e=r,r=l}if(a||e%1||r%1){var _=ch();return Nt(e+_*(r-e+Il("1e-"+((_+"").length-1))),r)}return ia(e,r)}var Vg=Oi(function(e,r,a){return r=r.toLowerCase(),e+(a?z0(r):r)});function z0(e){return Ia(at(e).toLowerCase())}function X0(e){return e=at(e),e&&e.replace(tl,$l).replace(yl,"")}function jg(e,r,a){e=at(e),r=Zt(r);var l=e.length;a=a===n?l:ui(Z(a),0,l);var _=a;return a-=r.length,a>=0&&e.slice(a,_)==r}function t4(e){return e=at(e),e&&Of.test(e)?e.replace(wo,zl):e}function e4(e){return e=at(e),e&&Uf.test(e)?e.replace(Ss,"\\$&"):e}var i4=Oi(function(e,r,a){return e+(a?"-":"")+r.toLowerCase()}),n4=Oi(function(e,r,a){return e+(a?" ":"")+r.toLowerCase()}),r4=Yh("toLowerCase");function s4(e,r,a){e=at(e),r=Z(r);var l=r?Ai(e):0;if(!r||l>=r)return e;var _=(r-l)/2;return Nr(mr(_),a)+e+Nr(Mr(_),a)}function a4(e,r,a){e=at(e),r=Z(r);var l=r?Ai(e):0;return r&&l<r?e+Nr(r-l,a):e}function o4(e,r,a){e=at(e),r=Z(r);var l=r?Ai(e):0;return r&&l<r?Nr(r-l,a)+e:e}function h4(e,r,a){return a||r==null?r=0:r&&(r=+r),v1(at(e).replace(Ps,""),r||0)}function u4(e,r,a){return(a?Bt(e,r,a):r===n)?r=1:r=Z(r),na(at(e),r)}function f4(){var e=arguments,r=at(e[0]);return e.length<3?r:r.replace(e[1],e[2])}var l4=Oi(function(e,r,a){return e+(a?"_":"")+r.toLowerCase()});function c4(e,r,a){return a&&typeof a!="number"&&Bt(e,r,a)&&(r=a=n),a=a===n?Ee:a>>>0,a?(e=at(e),e&&(typeof r=="string"||r!=null&&!ba(r))&&(r=Zt(r),!r&&bi(e))?Ve(ve(e),0,a):e.split(r,a)):[]}var _4=Oi(function(e,r,a){return e+(a?" ":"")+Ia(r)});function g4(e,r,a){return e=at(e),a=a==null?0:ui(Z(a),0,e.length),r=Zt(r),e.slice(a,a+r.length)==r}function v4(e,r,a){var l=d.templateSettings;a&&Bt(e,r,a)&&(r=n),e=at(e),r=zr({},r,l,t0);var _=zr({},r.imports,l.imports,t0),m=At(_),p=Us(_,m),w,P,N=0,R=r.interpolate||ir,L="__p += '",D=$s((r.escape||ir).source+"|"+R.source+"|"+(R===Eo?Kf:ir).source+"|"+(r.evaluate||ir).source+"|$","g"),z="//# sourceURL="+(ut.call(r,"sourceURL")?(r.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Sl+"]")+`
|
|
7
|
+
`;e.replace(D,function(Y,et,nt,jt,Ft,te){return nt||(nt=jt),L+=e.slice(N,te).replace(el,Xl),et&&(w=!0,L+=`' +
|
|
8
8
|
__e(`+et+`) +
|
|
9
9
|
'`),Ft&&(P=!0,L+=`';
|
|
10
10
|
`+Ft+`;
|
|
@@ -14,10 +14,10 @@ __p += '`),nt&&(L+=`' +
|
|
|
14
14
|
`;var H=ut.call(r,"variable")&&r.variable;if(!H)L=`with (obj) {
|
|
15
15
|
`+L+`
|
|
16
16
|
}
|
|
17
|
-
`;else if(
|
|
17
|
+
`;else if(Hf.test(H))throw new Q(u);L=(P?L.replace(Cf,""):L).replace(Nf,"$1").replace(Rf,"$1;"),L="function("+(H||"obj")+`) {
|
|
18
18
|
`+(H?"":`obj || (obj = {});
|
|
19
19
|
`)+"var __t, __p = ''"+(w?", __e = _.escape":"")+(P?`, __j = Array.prototype.join;
|
|
20
20
|
function print() { __p += __j.call(arguments, '') }
|
|
21
21
|
`:`;
|
|
22
22
|
`)+L+`return __p
|
|
23
|
-
}`;var V=K0(function(){return st(m,z+"return "+L).apply(n,p)});if(V.source=L,Ca(V))throw V;return V}function y4(e){return at(e).toLowerCase()}function p4(e){return at(e).toUpperCase()}function w4(e,r,a){if(e=at(e),e&&(a||r===n))return nh(e);if(!e||!(r=Zt(r)))return e;var l=ve(e),_=ve(r),m=rh(l,_),p=sh(l,_)+1;return Ve(l,m,p).join("")}function E4(e,r,a){if(e=at(e),e&&(a||r===n))return e.slice(0,oh(e)+1);if(!e||!(r=Zt(r)))return e;var l=ve(e),_=sh(l,ve(r))+1;return Ve(l,0,_).join("")}function x4(e,r,a){if(e=at(e),e&&(a||r===n))return e.replace(Cs,"");if(!e||!(r=Zt(r)))return e;var l=ve(e),_=rh(l,ve(r));return Ve(l,_).join("")}function S4(e,r){var a=Mt,l=lt;if(vt(r)){var _="separator"in r?r.separator:_;a="length"in r?Z(r.length):a,l="omission"in r?Zt(r.omission):l}e=at(e);var m=e.length;if(bi(e)){var p=ve(e);m=p.length}if(a>=m)return e;var w=a-Ai(l);if(w<1)return l;var P=p?Ve(p,0,w).join(""):e.slice(0,w);if(_===n)return P+l;if(p&&(w+=P.length-w),Na(_)){if(e.slice(w).search(_)){var N,R=P;for(_.global||(_=Ys(_.source,at(Po.exec(_))+"g")),_.lastIndex=0;N=_.exec(R);)var L=N.index;P=P.slice(0,L===n?w:L)}}else if(e.indexOf(Zt(_),w)!=w){var D=P.lastIndexOf(_);D>-1&&(P=P.slice(0,D))}return P+l}function P4(e){return e=at(e),e&&Bf.test(e)?e.replace(Eo,t1):e}var b4=Oi(function(e,r,a){return e+(a?" ":"")+r.toUpperCase()}),Oa=Qh("toUpperCase");function Y0(e,r,a){return e=at(e),r=a?n:r,r===n?Ql(e)?n1(e):Ul(e):e.match(r)||[]}var K0=tt(function(e,r){try{return Qt(e,n,r)}catch(a){return Ca(a)?a:new Q(a)}}),A4=Be(function(e,r){return ie(r,function(a){a=Pe(a),Oe(e,a,Ga(e[a],e))}),e});function G4(e){var r=e==null?0:e.length,a=k();return e=r?gt(e,function(l){if(typeof l[1]!="function")throw new ne(f);return[a(l[0]),l[1]]}):[],tt(function(l){for(var _=-1;++_<r;){var m=e[_];if(Qt(m[0],this,l))return Qt(m[1],this,l)}})}function I4(e){return tc(se(e,M))}function Ta(e){return function(){return e}}function C4(e,r){return e==null||e!==e?r:e}var N4=Zh(),R4=Zh(!0);function Xt(e){return e}function Ba(e){return Ah(typeof e=="function"?e:se(e,M))}function L4(e){return Ih(se(e,M))}function O4(e,r){return Ch(e,se(r,M))}var T4=tt(function(e,r){return function(a){return dn(a,e,r)}}),B4=tt(function(e,r){return function(a){return dn(e,a,r)}});function Fa(e,r,a){var l=At(r),_=Sr(r,l);a==null&&!(vt(r)&&(_.length||!l.length))&&(a=r,r=e,e=this,_=Sr(r,At(r)));var m=!(vt(a)&&"chain"in a)||!!a.chain,p=qe(e);return ie(_,function(w){var P=r[w];e[w]=P,p&&(e.prototype[w]=function(){var N=this.__chain__;if(m||N){var R=e(this.__wrapped__),L=R.__actions__=Wt(this.__actions__);return L.push({func:P,args:arguments,thisArg:e}),R.__chain__=N,R}return P.apply(e,He([this.value()],arguments))})}),e}function F4(){return Gt._===this&&(Gt._=u1),this}function qa(){}function q4(e){return e=Z(e),tt(function(r){return Nh(r,e)})}var D4=va(gt),U4=va(Vo),W4=va(Us);function Q0(e){return Ea(e)?Ws(Pe(e)):Mc(e)}function $4(e){return function(r){return e==null?n:fi(e,r)}}var z4=jh(),X4=jh(!0);function Da(){return[]}function Ua(){return!1}function k4(){return{}}function H4(){return""}function Y4(){return!0}function K4(e,r){if(e=Z(e),e<1||e>Xe)return[];var a=Ee,l=Nt(e,Ee);r=k(r),e-=Ee;for(var _=Xs(l,r);++a<e;)r(a);return _}function Q4(e){return J(e)?gt(e,Pe):Vt(e)?[e]:Wt(v0(at(e)))}function J4(e){var r=++o1;return at(e)+r}var Z4=Cr(function(e,r){return e+r},0),V4=da("ceil"),j4=Cr(function(e,r){return e/r},1),tv=da("floor");function ev(e){return e&&e.length?xr(e,Xt,ea):n}function iv(e,r){return e&&e.length?xr(e,k(r,2),ea):n}function nv(e){return eh(e,Xt)}function rv(e,r){return eh(e,k(r,2))}function sv(e){return e&&e.length?xr(e,Xt,sa):n}function av(e,r){return e&&e.length?xr(e,k(r,2),sa):n}var ov=Cr(function(e,r){return e*r},1),hv=da("round"),uv=Cr(function(e,r){return e-r},0);function fv(e){return e&&e.length?zs(e,Xt):0}function lv(e,r){return e&&e.length?zs(e,k(r,2)):0}return d.after=L_,d.ary=b0,d.assign=pg,d.assignIn=U0,d.assignInWith=zr,d.assignWith=wg,d.at=Eg,d.before=A0,d.bind=Ga,d.bindAll=A4,d.bindKey=G0,d.castArray=k_,d.chain=x0,d.chunk=t2,d.compact=e2,d.concat=i2,d.cond=G4,d.conforms=I4,d.constant=Ta,d.countBy=f_,d.create=xg,d.curry=I0,d.curryRight=C0,d.debounce=N0,d.defaults=Sg,d.defaultsDeep=Pg,d.defer=O_,d.delay=T_,d.difference=n2,d.differenceBy=r2,d.differenceWith=s2,d.drop=a2,d.dropRight=o2,d.dropRightWhile=h2,d.dropWhile=u2,d.fill=f2,d.filter=c_,d.flatMap=v_,d.flatMapDeep=d_,d.flatMapDepth=M_,d.flatten=y0,d.flattenDeep=l2,d.flattenDepth=c2,d.flip=B_,d.flow=N4,d.flowRight=R4,d.fromPairs=_2,d.functions=Rg,d.functionsIn=Lg,d.groupBy=m_,d.initial=v2,d.intersection=d2,d.intersectionBy=M2,d.intersectionWith=m2,d.invert=Tg,d.invertBy=Bg,d.invokeMap=p_,d.iteratee=Ba,d.keyBy=w_,d.keys=At,d.keysIn=zt,d.map=Fr,d.mapKeys=qg,d.mapValues=Dg,d.matches=L4,d.matchesProperty=O4,d.memoize=Dr,d.merge=Ug,d.mergeWith=W0,d.method=T4,d.methodOf=B4,d.mixin=Fa,d.negate=Ur,d.nthArg=q4,d.omit=Wg,d.omitBy=$g,d.once=F_,d.orderBy=E_,d.over=D4,d.overArgs=q_,d.overEvery=U4,d.overSome=W4,d.partial=Ia,d.partialRight=R0,d.partition=x_,d.pick=zg,d.pickBy=$0,d.property=Q0,d.propertyOf=$4,d.pull=E2,d.pullAll=w0,d.pullAllBy=x2,d.pullAllWith=S2,d.pullAt=P2,d.range=z4,d.rangeRight=X4,d.rearg=D_,d.reject=b_,d.remove=b2,d.rest=U_,d.reverse=ba,d.sampleSize=G_,d.set=kg,d.setWith=Hg,d.shuffle=I_,d.slice=A2,d.sortBy=R_,d.sortedUniq=O2,d.sortedUniqBy=T2,d.split=v4,d.spread=W_,d.tail=B2,d.take=F2,d.takeRight=q2,d.takeRightWhile=D2,d.takeWhile=U2,d.tap=e_,d.throttle=$_,d.thru=Br,d.toArray=F0,d.toPairs=z0,d.toPairsIn=X0,d.toPath=Q4,d.toPlainObject=D0,d.transform=Yg,d.unary=z_,d.union=W2,d.unionBy=$2,d.unionWith=z2,d.uniq=X2,d.uniqBy=k2,d.uniqWith=H2,d.unset=Kg,d.unzip=Aa,d.unzipWith=E0,d.update=Qg,d.updateWith=Jg,d.values=Fi,d.valuesIn=Zg,d.without=Y2,d.words=Y0,d.wrap=X_,d.xor=K2,d.xorBy=Q2,d.xorWith=J2,d.zip=Z2,d.zipObject=V2,d.zipObjectDeep=j2,d.zipWith=t_,d.entries=z0,d.entriesIn=X0,d.extend=U0,d.extendWith=zr,Fa(d,d),d.add=Z4,d.attempt=K0,d.camelCase=e4,d.capitalize=k0,d.ceil=V4,d.clamp=Vg,d.clone=H_,d.cloneDeep=K_,d.cloneDeepWith=Q_,d.cloneWith=Y_,d.conformsTo=J_,d.deburr=H0,d.defaultTo=C4,d.divide=j4,d.endsWith=i4,d.eq=Me,d.escape=n4,d.escapeRegExp=r4,d.every=l_,d.find=__,d.findIndex=M0,d.findKey=bg,d.findLast=g_,d.findLastIndex=m0,d.findLastKey=Ag,d.floor=tv,d.forEach=S0,d.forEachRight=P0,d.forIn=Gg,d.forInRight=Ig,d.forOwn=Cg,d.forOwnRight=Ng,d.get=Ra,d.gt=Z_,d.gte=V_,d.has=Og,d.hasIn=La,d.head=p0,d.identity=Xt,d.includes=y_,d.indexOf=g2,d.inRange=jg,d.invoke=Fg,d.isArguments=_i,d.isArray=J,d.isArrayBuffer=j_,d.isArrayLike=$t,d.isArrayLikeObject=pt,d.isBoolean=tg,d.isBuffer=je,d.isDate=eg,d.isElement=ig,d.isEmpty=ng,d.isEqual=rg,d.isEqualWith=sg,d.isError=Ca,d.isFinite=ag,d.isFunction=qe,d.isInteger=L0,d.isLength=Wr,d.isMap=O0,d.isMatch=og,d.isMatchWith=hg,d.isNaN=ug,d.isNative=fg,d.isNil=cg,d.isNull=lg,d.isNumber=T0,d.isObject=vt,d.isObjectLike=mt,d.isPlainObject=En,d.isRegExp=Na,d.isSafeInteger=_g,d.isSet=B0,d.isString=$r,d.isSymbol=Vt,d.isTypedArray=Bi,d.isUndefined=gg,d.isWeakMap=vg,d.isWeakSet=dg,d.join=y2,d.kebabCase=s4,d.last=oe,d.lastIndexOf=p2,d.lowerCase=a4,d.lowerFirst=o4,d.lt=Mg,d.lte=mg,d.max=ev,d.maxBy=iv,d.mean=nv,d.meanBy=rv,d.min=sv,d.minBy=av,d.stubArray=Da,d.stubFalse=Ua,d.stubObject=k4,d.stubString=H4,d.stubTrue=Y4,d.multiply=ov,d.nth=w2,d.noConflict=F4,d.noop=qa,d.now=qr,d.pad=h4,d.padEnd=u4,d.padStart=f4,d.parseInt=l4,d.random=t4,d.reduce=S_,d.reduceRight=P_,d.repeat=c4,d.replace=_4,d.result=Xg,d.round=hv,d.runInContext=S,d.sample=A_,d.size=C_,d.snakeCase=g4,d.some=N_,d.sortedIndex=G2,d.sortedIndexBy=I2,d.sortedIndexOf=C2,d.sortedLastIndex=N2,d.sortedLastIndexBy=R2,d.sortedLastIndexOf=L2,d.startCase=d4,d.startsWith=M4,d.subtract=uv,d.sum=fv,d.sumBy=lv,d.template=m4,d.times=K4,d.toFinite=De,d.toInteger=Z,d.toLength=q0,d.toLower=y4,d.toNumber=he,d.toSafeInteger=yg,d.toString=at,d.toUpper=p4,d.trim=w4,d.trimEnd=E4,d.trimStart=x4,d.truncate=S4,d.unescape=P4,d.uniqueId=J4,d.upperCase=b4,d.upperFirst=Oa,d.each=S0,d.eachRight=P0,d.first=p0,Fa(d,function(){var e={};return xe(d,function(r,a){ut.call(d.prototype,a)||(e[a]=r)}),e}(),{chain:!1}),d.VERSION=s,ie(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){d[e].placeholder=d}),ie(["drop","take"],function(e,r){it.prototype[e]=function(a){a=a===n?1:Pt(Z(a),0);var l=this.__filtered__&&!r?new it(this):this.clone();return l.__filtered__?l.__takeCount__=Nt(a,l.__takeCount__):l.__views__.push({size:Nt(a,Ee),type:e+(l.__dir__<0?"Right":"")}),l},it.prototype[e+"Right"]=function(a){return this.reverse()[e](a).reverse()}}),ie(["filter","map","takeWhile"],function(e,r){var a=r+1,l=a==Ie||a==ys;it.prototype[e]=function(_){var m=this.clone();return m.__iteratees__.push({iteratee:k(_,3),type:a}),m.__filtered__=m.__filtered__||l,m}}),ie(["head","last"],function(e,r){var a="take"+(r?"Right":"");it.prototype[e]=function(){return this[a](1).value()[0]}}),ie(["initial","tail"],function(e,r){var a="drop"+(r?"":"Right");it.prototype[e]=function(){return this.__filtered__?new it(this):this[a](1)}}),it.prototype.compact=function(){return this.filter(Xt)},it.prototype.find=function(e){return this.filter(e).head()},it.prototype.findLast=function(e){return this.reverse().find(e)},it.prototype.invokeMap=tt(function(e,r){return typeof e=="function"?new it(this):this.map(function(a){return dn(a,e,r)})}),it.prototype.reject=function(e){return this.filter(Ur(k(e)))},it.prototype.slice=function(e,r){e=Z(e);var a=this;return a.__filtered__&&(e>0||r<0)?new it(a):(e<0?a=a.takeRight(-e):e&&(a=a.drop(e)),r!==n&&(r=Z(r),a=r<0?a.dropRight(-r):a.take(r-e)),a)},it.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},it.prototype.toArray=function(){return this.take(Ee)},xe(it.prototype,function(e,r){var a=/^(?:filter|find|map|reject)|While$/.test(r),l=/^(?:head|last)$/.test(r),_=d[l?"take"+(r=="last"?"Right":""):r],m=l||/^find/.test(r);_&&(d.prototype[r]=function(){var p=this.__wrapped__,w=l?[1]:arguments,P=p instanceof it,N=w[0],R=P||J(p),L=function(et){var nt=_.apply(d,He([et],w));return l&&D?nt[0]:nt};R&&a&&typeof N=="function"&&N.length!=1&&(P=R=!1);var D=this.__chain__,z=!!this.__actions__.length,H=m&&!D,V=P&&!z;if(!m&&R){p=V?p:new it(this);var Y=e.apply(p,w);return Y.__actions__.push({func:Br,args:[L],thisArg:n}),new re(Y,D)}return H&&V?e.apply(this,w):(Y=this.thru(L),H?l?Y.value()[0]:Y.value():Y)})}),ie(["pop","push","shift","sort","splice","unshift"],function(e){var r=hr[e],a=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",l=/^(?:pop|shift)$/.test(e);d.prototype[e]=function(){var _=arguments;if(l&&!this.__chain__){var m=this.value();return r.apply(J(m)?m:[],_)}return this[a](function(p){return r.apply(J(p)?p:[],_)})}}),xe(it.prototype,function(e,r){var a=d[r];if(a){var l=a.name+"";ut.call(Ni,l)||(Ni[l]=[]),Ni[l].push({name:r,func:a})}}),Ni[Ir(n,C).name]=[{name:"wrapper",func:n}],it.prototype.clone=P1,it.prototype.reverse=b1,it.prototype.value=A1,d.prototype.at=i_,d.prototype.chain=n_,d.prototype.commit=r_,d.prototype.next=s_,d.prototype.plant=o_,d.prototype.reverse=h_,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=u_,d.prototype.first=d.prototype.head,un&&(d.prototype[un]=a_),d},Gi=r1();si?((si.exports=Gi)._=Gi,Bs._=Gi):Gt._=Gi}).call(g6)}(Nn,Nn.exports)),Nn.exports}var d6=v6();function M6(t,i){let n=i.features;const s=[];for(;n.length>0;){n=d6.sortBy(n,f=>{if(f.geometry&&f.geometry.coordinates&&f.geometry.coordinates[0])return ss(t,f.geometry.coordinates[0]);throw new Error("Feature missing geometry")});const o=n.shift(),h=o.geometry.coordinates[o.geometry.coordinates.length-1];h&&(t=h),s.push(o)}return s}class ji{lowerX;upperX;lowerY;upperY;customCenter;bottomLeft;bottomRight;topLeft;topRight;center;flatten;constructor(i){const{lowerX:n,upperX:s,lowerY:o,upperY:h,customCenter:f}=i;this.lowerX=n,this.upperX=s,this.lowerY=o,this.upperY=h,this.customCenter=f,this.bottomLeft=[this.lowerX,this.lowerY],this.bottomRight=[this.upperX,this.lowerY],this.topLeft=[this.lowerX,this.upperY],this.topRight=[this.upperX,this.upperY],this.center=this.customCenter??[(this.lowerX+this.upperX)/2,(this.lowerY+this.upperY)/2],this.flatten=[this.lowerX,this.lowerY,this.upperX,this.upperY]}isInBounds(i,n){return typeof i=="number"?i>=this.lowerX&&i<=this.upperX&&n>=this.lowerY&&n<=this.upperY:this.isInBounds(i[0],i[1])}splitIfOutOfBounds(i){if(!(!Array.isArray(i)||i.length<=1)&&!i.find(n=>n.length!==2)){if(i.find(n=>!this.isInBounds(n))){const n=cf(this.flatten),s=_6(Wn(i),n);return i[0]&&(s.features=M6(i[0],s)),s.features.map(o=>({coordinates:o.geometry.coordinates,isWithinBounds:ym(o.geometry.coordinates).features.every(h=>Lm(h,n))}))}return[{coordinates:i,isWithinBounds:!0}]}}}const Zi=15.5,mf=8,$n=2*Math.PI*Dt/256;class Mo{epsgNumber;epsg;label;technicalName;proj4transformationMatrix;bounds;usesMercatorPyramid;constructor(i){const{epsgNumber:n,label:s,proj4transformationMatrix:o,bounds:h,technicalName:f,usesMercatorPyramid:u=!1}=i;this.epsgNumber=n,this.epsg=`EPSG:${n}`,this.label=s,this.proj4transformationMatrix=o,this.bounds=h,this.technicalName=f,this.usesMercatorPyramid=u}getBoundsAs(i){if(this.bounds){if(i.epsg===this.epsg)return this.bounds;const n=mi(this.epsg,i.epsg,this.bounds.bottomLeft),s=mi(this.epsg,i.epsg,this.bounds.topRight);let o;return this.bounds.customCenter&&(o=mi(this.epsg,i.epsg,this.bounds.customCenter)),new ji({lowerX:n[0],lowerY:n[1],upperX:s[0],upperY:s[1],customCenter:o})}}isInBounds(i,n){return this.bounds?typeof i=="number"?this.bounds.isInBounds(i,n):this.bounds.isInBounds(i[0],i[1]):!1}roundZoomLevel(i){return wi(i,3)}getResolutionSteps(i){if(!this.bounds)return[];const n=$n,s=[],o=(i??0)*Math.PI/180;for(let h=0;h<21;++h)s.push({resolution:n*Math.cos(o)/Math.pow(2,h),zoom:h});return s}getTileOrigin(){return this.bounds?.topLeft??[0,0]}getMatrixIds(){const i=[];for(let n=0;n<this.getResolutionSteps().length;++n)i[n]=n;return i}}class yf extends Mo{constructor(i){super(i)}getTileOrigin(){return this.bounds.topLeft}}const pe=[650,500,250,100,50,20,10,5,2.5,2,1,.5,.25,.1],pf=[4e3,3750,3500,3250,3e3,2750,2500,2250,2e3,1750,1500,1250,1e3,750,...pe.slice(0,10),1.5,...pe.slice(10)],ue=[7.35,7.75,8.75,10,11,12.5,13.5,14.5,Zi,15.75,16.7,17.75,18.75,20,21],m6=["1:2'500'000","1:2'500'000","1:1'000'000","1:1'000'000","1:500'000","1:200'000","1:100'000","1:50'000","1:25'000","1:25'000","1:10'000","1:10'000","1:10'000","1:10'000","1:10'000"],y6=ue.map((t,i)=>i);class mo extends yf{getResolutionSteps(){return pf.map(i=>{const n=pe.indexOf(i)??void 0;let s;return n&&(s=m6[n]),{zoom:n,label:s,resolution:i}})}get1_25000ZoomLevel(){return mf}getDefaultZoom(){return 1}transformStandardZoomLevelToCustom(i){return typeof ue[0]=="number"&&typeof ue[14]=="number"&&i>=ue[0]&&i<=ue[14]?ue.filter(n=>n<i).length:typeof ue[0]=="number"&&i<ue[0]?0:typeof ue[14]=="number"&&i>ue[14]?14:this.get1_25000ZoomLevel()}transformCustomZoomLevelToStandard(i){const n=Math.floor(i);return ue.length-1>=n?ue[n]??Zi:Zi}getResolutionForZoomAndCenter(i){const n=Math.round(i);return typeof pe[n]!="number"?0:pe[n]}getZoomForResolutionAndCenter(i){const n=pe.find(o=>o<=i);if(n)return pe.indexOf(n);const s=pe.slice(-1)[0];return s&&s>i?pe.indexOf(s):0}roundCoordinateValue(i){return wi(i,2)}roundZoomLevel(i,n=!1){return n?dm(i,y6):super.roundZoomLevel(i)}}class p6 extends mo{constructor(){super({epsgNumber:21781,label:"CH1903 / LV03",technicalName:"LV03",proj4transformationMatrix:"+proj=somerc +lat_0=46.9524055555556 +lon_0=7.43958333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs +type=crs",bounds:new ji({lowerX:485071.58,upperX:837119.8,lowerY:74261.72,upperY:299941.79}),usesMercatorPyramid:!1})}}class w6 extends mo{constructor(){super({epsgNumber:2056,label:"CH1903+ / LV95",technicalName:"LV95",proj4transformationMatrix:"+proj=somerc +lat_0=46.9524055555556 +lon_0=7.43958333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs +type=crs",bounds:new ji({lowerX:242e4,upperX:29e5,lowerY:103e4,upperY:135e4}),usesMercatorPyramid:!1})}}class yo extends Mo{get1_25000ZoomLevel(){return Zi}getDefaultZoom(){return Zi}}class E6 extends yo{constructor(){super({epsgNumber:3857,label:"WebMercator",proj4transformationMatrix:"+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=proj",bounds:new ji({lowerX:-20037508342789244e-9,upperX:20037508342789244e-9,lowerY:-20037508342789244e-9,upperY:20037508342789244e-9,customCenter:[917209.87,591473743e-2]}),usesMercatorPyramid:!0})}roundCoordinateValue(i){return wi(i,2)}getResolutionForZoomAndCenter(i,n){const s=mi(this.epsg,zn.epsg,n).map(o=>o*Math.PI/180);return typeof s[1]!="number"?0:wi(Math.abs($n*Math.cos(s[1])/Math.pow(2,i)),2)}getZoomForResolutionAndCenter(i,n){const s=mi(this.epsg,zn.epsg,n).map(o=>o*Math.PI/180);return typeof s[1]!="number"?0:Math.abs(Math.log2(i/$n/Math.cos(s[1])))}}class x6 extends yo{constructor(){super({epsgNumber:4326,label:"WGS 84 (lat/lon)",proj4transformationMatrix:"+proj=longlat +datum=WGS84 +no_defs +type=proj",bounds:new ji({lowerX:-180,upperX:180,lowerY:-90,upperY:90,customCenter:[8.239436,46.832259]}),usesMercatorPyramid:!0})}roundCoordinateValue(i){return wi(i,6)}getResolutionForZoomAndCenter(i,n){return wi(Math.abs($n*Math.cos(n[1]*Math.PI/180)/Math.pow(2,i)),2)}getExtentInOrderXY(i){return i[0]>i[1]?[i[1],i[0],i[3],i[2]]:i}getZoomForResolutionAndCenter(i,n){return Math.abs(Math.log2(i/$n/Math.cos(n[1]*Math.PI/180)))}}const vs=new w6,ds=new p6,zn=new x6,Ms=new E6,wf=[vs,ds,zn,Ms],S6={STANDARD_ZOOM_LEVEL_1_25000_MAP:Zi,SWISS_ZOOM_LEVEL_1_25000_MAP:mf,LV95_RESOLUTIONS:pe,SWISSTOPO_TILEGRID_RESOLUTIONS:pf},P6={LV95:vs,LV03:ds,WGS84:zn,WEBMERCATOR:Ms,allCoordinateSystems:wf};function b6(t){return`color: #000; font-weight: bold; background-color: ${t}; padding: 2px 4px; border-radius: 4px;`}function jr(t){return t.flatMap(i=>{if(i&&typeof i=="object"&&"messages"in i&&Array.isArray(i.messages)){const n=[];if("title"in i&&typeof i.title=="string"){n.push(`%c[${i.title}]%c`);let s="oklch(55.4% 0.046 257.417)";"titleColor"in i&&typeof i.titleColor=="string"&&(s=i.titleColor),n.push(b6(s)),n.push("")}return n.push(...i.messages),n}return i})}function ts(t,i){if(Ef.wantedLevels.includes(t))switch(t){case 0:console.error(...jr(i));break;case 1:console.warn(...jr(i));break;case 2:console.info(...jr(i));break;case 3:console.debug(...jr(i));break}}const Ef={wantedLevels:[0,1],error:(...t)=>ts(0,t),warn:(...t)=>ts(1,t),info:(...t)=>ts(2,t),debug:(...t)=>ts(3,t)},A6=(t,i=[Ms,vs,ds])=>{i.filter(n=>n.proj4transformationMatrix).forEach(n=>{try{t.defs(n.epsg,n.proj4transformationMatrix)}catch(s){const o=s||new Error("Unknown error");throw Ef.error("Error while setting up projection in proj4",n.epsg,o),o}})};exports.CoordinateSystem=Mo;exports.CoordinateSystemBounds=ji;exports.CustomCoordinateSystem=yf;exports.LV03=ds;exports.LV95=vs;exports.LV95_RESOLUTIONS=pe;exports.StandardCoordinateSystem=yo;exports.SwissCoordinateSystem=mo;exports.WEBMERCATOR=Ms;exports.WGS84=zn;exports.allCoordinateSystems=wf;exports.bbox=di;exports.bboxPolygon=cf;exports.constants=S6;exports.crs=P6;exports.d=mm;exports.earthRadius=Dt;exports.feature=Ge;exports.featureCollection=ce;exports.featureEach=Qn;exports.geomEach=lf;exports.getDefaultExportFromCjs=f6;exports.getGeom=ff;exports.i=af;exports.lengthToRadians=Em;exports.lineString=Wn;exports.multiLineString=pm;exports.multiPolygon=wm;exports.point=Mi;exports.polygon=hf;exports.proj4=mi;exports.radiansToLength=uf;exports.registerProj4=A6;exports.s=wi;
|
|
23
|
+
}`;var V=H0(function(){return st(m,z+"return "+L).apply(n,p)});if(V.source=L,Pa(V))throw V;return V}function d4(e){return at(e).toLowerCase()}function M4(e){return at(e).toUpperCase()}function m4(e,r,a){if(e=at(e),e&&(a||r===n))return eh(e);if(!e||!(r=Zt(r)))return e;var l=ve(e),_=ve(r),m=ih(l,_),p=nh(l,_)+1;return Ve(l,m,p).join("")}function y4(e,r,a){if(e=at(e),e&&(a||r===n))return e.slice(0,sh(e)+1);if(!e||!(r=Zt(r)))return e;var l=ve(e),_=nh(l,ve(r))+1;return Ve(l,0,_).join("")}function p4(e,r,a){if(e=at(e),e&&(a||r===n))return e.replace(Ps,"");if(!e||!(r=Zt(r)))return e;var l=ve(e),_=ih(l,ve(r));return Ve(l,_).join("")}function w4(e,r){var a=Mt,l=lt;if(vt(r)){var _="separator"in r?r.separator:_;a="length"in r?Z(r.length):a,l="omission"in r?Zt(r.omission):l}e=at(e);var m=e.length;if(bi(e)){var p=ve(e);m=p.length}if(a>=m)return e;var w=a-Ai(l);if(w<1)return l;var P=p?Ve(p,0,w).join(""):e.slice(0,w);if(_===n)return P+l;if(p&&(w+=P.length-w),ba(_)){if(e.slice(w).search(_)){var N,R=P;for(_.global||(_=$s(_.source,at(xo.exec(_))+"g")),_.lastIndex=0;N=_.exec(R);)var L=N.index;P=P.slice(0,L===n?w:L)}}else if(e.indexOf(Zt(_),w)!=w){var D=P.lastIndexOf(_);D>-1&&(P=P.slice(0,D))}return P+l}function E4(e){return e=at(e),e&&Lf.test(e)?e.replace(po,Zl):e}var x4=Oi(function(e,r,a){return e+(a?" ":"")+r.toUpperCase()}),Ia=Yh("toUpperCase");function k0(e,r,a){return e=at(e),r=a?n:r,r===n?Hl(e)?t1(e):Fl(e):e.match(r)||[]}var H0=tt(function(e,r){try{return Qt(e,n,r)}catch(a){return Pa(a)?a:new Q(a)}}),S4=Be(function(e,r){return ie(r,function(a){a=Pe(a),Oe(e,a,xa(e[a],e))}),e});function P4(e){var r=e==null?0:e.length,a=k();return e=r?gt(e,function(l){if(typeof l[1]!="function")throw new ne(f);return[a(l[0]),l[1]]}):[],tt(function(l){for(var _=-1;++_<r;){var m=e[_];if(Qt(m[0],this,l))return Qt(m[1],this,l)}})}function b4(e){return Z1(se(e,M))}function Ca(e){return function(){return e}}function A4(e,r){return e==null||e!==e?r:e}var G4=Qh(),I4=Qh(!0);function Xt(e){return e}function Na(e){return Ph(typeof e=="function"?e:se(e,M))}function C4(e){return Ah(se(e,M))}function N4(e,r){return Gh(e,se(r,M))}var R4=tt(function(e,r){return function(a){return dn(a,e,r)}}),L4=tt(function(e,r){return function(a){return dn(e,a,r)}});function Ra(e,r,a){var l=At(r),_=Sr(r,l);a==null&&!(vt(r)&&(_.length||!l.length))&&(a=r,r=e,e=this,_=Sr(r,At(r)));var m=!(vt(a)&&"chain"in a)||!!a.chain,p=qe(e);return ie(_,function(w){var P=r[w];e[w]=P,p&&(e.prototype[w]=function(){var N=this.__chain__;if(m||N){var R=e(this.__wrapped__),L=R.__actions__=Wt(this.__actions__);return L.push({func:P,args:arguments,thisArg:e}),R.__chain__=N,R}return P.apply(e,He([this.value()],arguments))})}),e}function O4(){return Gt._===this&&(Gt._=a1),this}function La(){}function T4(e){return e=Z(e),tt(function(r){return Ih(r,e)})}var B4=fa(gt),F4=fa(Jo),q4=fa(Ts);function Y0(e){return Ma(e)?Bs(Pe(e)):gc(e)}function D4(e){return function(r){return e==null?n:fi(e,r)}}var U4=Zh(),W4=Zh(!0);function Oa(){return[]}function Ta(){return!1}function $4(){return{}}function z4(){return""}function X4(){return!0}function k4(e,r){if(e=Z(e),e<1||e>Xe)return[];var a=Ee,l=Nt(e,Ee);r=k(r),e-=Ee;for(var _=Ds(l,r);++a<e;)r(a);return _}function H4(e){return J(e)?gt(e,Pe):Vt(e)?[e]:Wt(_0(at(e)))}function Y4(e){var r=++r1;return at(e)+r}var K4=Cr(function(e,r){return e+r},0),Q4=la("ceil"),J4=Cr(function(e,r){return e/r},1),Z4=la("floor");function V4(e){return e&&e.length?xr(e,Xt,Js):n}function j4(e,r){return e&&e.length?xr(e,k(r,2),Js):n}function tv(e){return jo(e,Xt)}function ev(e,r){return jo(e,k(r,2))}function iv(e){return e&&e.length?xr(e,Xt,ta):n}function nv(e,r){return e&&e.length?xr(e,k(r,2),ta):n}var rv=Cr(function(e,r){return e*r},1),sv=la("round"),av=Cr(function(e,r){return e-r},0);function ov(e){return e&&e.length?qs(e,Xt):0}function hv(e,r){return e&&e.length?qs(e,k(r,2)):0}return d.after=C_,d.ary=S0,d.assign=Mg,d.assignIn=q0,d.assignInWith=zr,d.assignWith=mg,d.at=yg,d.before=P0,d.bind=xa,d.bindAll=S4,d.bindKey=b0,d.castArray=$_,d.chain=w0,d.chunk=Zc,d.compact=Vc,d.concat=jc,d.cond=P4,d.conforms=b4,d.constant=Ca,d.countBy=o_,d.create=pg,d.curry=A0,d.curryRight=G0,d.debounce=I0,d.defaults=wg,d.defaultsDeep=Eg,d.defer=N_,d.delay=R_,d.difference=t2,d.differenceBy=e2,d.differenceWith=i2,d.drop=n2,d.dropRight=r2,d.dropRightWhile=s2,d.dropWhile=a2,d.fill=o2,d.filter=u_,d.flatMap=c_,d.flatMapDeep=__,d.flatMapDepth=g_,d.flatten=M0,d.flattenDeep=h2,d.flattenDepth=u2,d.flip=L_,d.flow=G4,d.flowRight=I4,d.fromPairs=f2,d.functions=Ig,d.functionsIn=Cg,d.groupBy=v_,d.initial=c2,d.intersection=_2,d.intersectionBy=g2,d.intersectionWith=v2,d.invert=Rg,d.invertBy=Lg,d.invokeMap=M_,d.iteratee=Na,d.keyBy=m_,d.keys=At,d.keysIn=zt,d.map=Fr,d.mapKeys=Tg,d.mapValues=Bg,d.matches=C4,d.matchesProperty=N4,d.memoize=Dr,d.merge=Fg,d.mergeWith=D0,d.method=R4,d.methodOf=L4,d.mixin=Ra,d.negate=Ur,d.nthArg=T4,d.omit=qg,d.omitBy=Dg,d.once=O_,d.orderBy=y_,d.over=B4,d.overArgs=T_,d.overEvery=F4,d.overSome=q4,d.partial=Sa,d.partialRight=C0,d.partition=p_,d.pick=Ug,d.pickBy=U0,d.property=Y0,d.propertyOf=D4,d.pull=y2,d.pullAll=y0,d.pullAllBy=p2,d.pullAllWith=w2,d.pullAt=E2,d.range=U4,d.rangeRight=W4,d.rearg=B_,d.reject=x_,d.remove=x2,d.rest=F_,d.reverse=wa,d.sampleSize=P_,d.set=$g,d.setWith=zg,d.shuffle=b_,d.slice=S2,d.sortBy=I_,d.sortedUniq=N2,d.sortedUniqBy=R2,d.split=c4,d.spread=q_,d.tail=L2,d.take=O2,d.takeRight=T2,d.takeRightWhile=B2,d.takeWhile=F2,d.tap=V2,d.throttle=D_,d.thru=Br,d.toArray=T0,d.toPairs=W0,d.toPairsIn=$0,d.toPath=H4,d.toPlainObject=F0,d.transform=Xg,d.unary=U_,d.union=q2,d.unionBy=D2,d.unionWith=U2,d.uniq=W2,d.uniqBy=$2,d.uniqWith=z2,d.unset=kg,d.unzip=Ea,d.unzipWith=p0,d.update=Hg,d.updateWith=Yg,d.values=Fi,d.valuesIn=Kg,d.without=X2,d.words=k0,d.wrap=W_,d.xor=k2,d.xorBy=H2,d.xorWith=Y2,d.zip=K2,d.zipObject=Q2,d.zipObjectDeep=J2,d.zipWith=Z2,d.entries=W0,d.entriesIn=$0,d.extend=q0,d.extendWith=zr,Ra(d,d),d.add=K4,d.attempt=H0,d.camelCase=Vg,d.capitalize=z0,d.ceil=Q4,d.clamp=Qg,d.clone=z_,d.cloneDeep=k_,d.cloneDeepWith=H_,d.cloneWith=X_,d.conformsTo=Y_,d.deburr=X0,d.defaultTo=A4,d.divide=J4,d.endsWith=jg,d.eq=Me,d.escape=t4,d.escapeRegExp=e4,d.every=h_,d.find=f_,d.findIndex=v0,d.findKey=xg,d.findLast=l_,d.findLastIndex=d0,d.findLastKey=Sg,d.floor=Z4,d.forEach=E0,d.forEachRight=x0,d.forIn=Pg,d.forInRight=bg,d.forOwn=Ag,d.forOwnRight=Gg,d.get=Aa,d.gt=K_,d.gte=Q_,d.has=Ng,d.hasIn=Ga,d.head=m0,d.identity=Xt,d.includes=d_,d.indexOf=l2,d.inRange=Jg,d.invoke=Og,d.isArguments=_i,d.isArray=J,d.isArrayBuffer=J_,d.isArrayLike=$t,d.isArrayLikeObject=pt,d.isBoolean=Z_,d.isBuffer=je,d.isDate=V_,d.isElement=j_,d.isEmpty=tg,d.isEqual=eg,d.isEqualWith=ig,d.isError=Pa,d.isFinite=ng,d.isFunction=qe,d.isInteger=N0,d.isLength=Wr,d.isMap=R0,d.isMatch=rg,d.isMatchWith=sg,d.isNaN=ag,d.isNative=og,d.isNil=ug,d.isNull=hg,d.isNumber=L0,d.isObject=vt,d.isObjectLike=mt,d.isPlainObject=En,d.isRegExp=ba,d.isSafeInteger=fg,d.isSet=O0,d.isString=$r,d.isSymbol=Vt,d.isTypedArray=Bi,d.isUndefined=lg,d.isWeakMap=cg,d.isWeakSet=_g,d.join=d2,d.kebabCase=i4,d.last=oe,d.lastIndexOf=M2,d.lowerCase=n4,d.lowerFirst=r4,d.lt=gg,d.lte=vg,d.max=V4,d.maxBy=j4,d.mean=tv,d.meanBy=ev,d.min=iv,d.minBy=nv,d.stubArray=Oa,d.stubFalse=Ta,d.stubObject=$4,d.stubString=z4,d.stubTrue=X4,d.multiply=rv,d.nth=m2,d.noConflict=O4,d.noop=La,d.now=qr,d.pad=s4,d.padEnd=a4,d.padStart=o4,d.parseInt=h4,d.random=Zg,d.reduce=w_,d.reduceRight=E_,d.repeat=u4,d.replace=f4,d.result=Wg,d.round=sv,d.runInContext=S,d.sample=S_,d.size=A_,d.snakeCase=l4,d.some=G_,d.sortedIndex=P2,d.sortedIndexBy=b2,d.sortedIndexOf=A2,d.sortedLastIndex=G2,d.sortedLastIndexBy=I2,d.sortedLastIndexOf=C2,d.startCase=_4,d.startsWith=g4,d.subtract=av,d.sum=ov,d.sumBy=hv,d.template=v4,d.times=k4,d.toFinite=De,d.toInteger=Z,d.toLength=B0,d.toLower=d4,d.toNumber=he,d.toSafeInteger=dg,d.toString=at,d.toUpper=M4,d.trim=m4,d.trimEnd=y4,d.trimStart=p4,d.truncate=w4,d.unescape=E4,d.uniqueId=Y4,d.upperCase=x4,d.upperFirst=Ia,d.each=E0,d.eachRight=x0,d.first=m0,Ra(d,function(){var e={};return xe(d,function(r,a){ut.call(d.prototype,a)||(e[a]=r)}),e}(),{chain:!1}),d.VERSION=s,ie(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){d[e].placeholder=d}),ie(["drop","take"],function(e,r){it.prototype[e]=function(a){a=a===n?1:Pt(Z(a),0);var l=this.__filtered__&&!r?new it(this):this.clone();return l.__filtered__?l.__takeCount__=Nt(a,l.__takeCount__):l.__views__.push({size:Nt(a,Ee),type:e+(l.__dir__<0?"Right":"")}),l},it.prototype[e+"Right"]=function(a){return this.reverse()[e](a).reverse()}}),ie(["filter","map","takeWhile"],function(e,r){var a=r+1,l=a==Ie||a==gs;it.prototype[e]=function(_){var m=this.clone();return m.__iteratees__.push({iteratee:k(_,3),type:a}),m.__filtered__=m.__filtered__||l,m}}),ie(["head","last"],function(e,r){var a="take"+(r?"Right":"");it.prototype[e]=function(){return this[a](1).value()[0]}}),ie(["initial","tail"],function(e,r){var a="drop"+(r?"":"Right");it.prototype[e]=function(){return this.__filtered__?new it(this):this[a](1)}}),it.prototype.compact=function(){return this.filter(Xt)},it.prototype.find=function(e){return this.filter(e).head()},it.prototype.findLast=function(e){return this.reverse().find(e)},it.prototype.invokeMap=tt(function(e,r){return typeof e=="function"?new it(this):this.map(function(a){return dn(a,e,r)})}),it.prototype.reject=function(e){return this.filter(Ur(k(e)))},it.prototype.slice=function(e,r){e=Z(e);var a=this;return a.__filtered__&&(e>0||r<0)?new it(a):(e<0?a=a.takeRight(-e):e&&(a=a.drop(e)),r!==n&&(r=Z(r),a=r<0?a.dropRight(-r):a.take(r-e)),a)},it.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},it.prototype.toArray=function(){return this.take(Ee)},xe(it.prototype,function(e,r){var a=/^(?:filter|find|map|reject)|While$/.test(r),l=/^(?:head|last)$/.test(r),_=d[l?"take"+(r=="last"?"Right":""):r],m=l||/^find/.test(r);_&&(d.prototype[r]=function(){var p=this.__wrapped__,w=l?[1]:arguments,P=p instanceof it,N=w[0],R=P||J(p),L=function(et){var nt=_.apply(d,He([et],w));return l&&D?nt[0]:nt};R&&a&&typeof N=="function"&&N.length!=1&&(P=R=!1);var D=this.__chain__,z=!!this.__actions__.length,H=m&&!D,V=P&&!z;if(!m&&R){p=V?p:new it(this);var Y=e.apply(p,w);return Y.__actions__.push({func:Br,args:[L],thisArg:n}),new re(Y,D)}return H&&V?e.apply(this,w):(Y=this.thru(L),H?l?Y.value()[0]:Y.value():Y)})}),ie(["pop","push","shift","sort","splice","unshift"],function(e){var r=hr[e],a=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",l=/^(?:pop|shift)$/.test(e);d.prototype[e]=function(){var _=arguments;if(l&&!this.__chain__){var m=this.value();return r.apply(J(m)?m:[],_)}return this[a](function(p){return r.apply(J(p)?p:[],_)})}}),xe(it.prototype,function(e,r){var a=d[r];if(a){var l=a.name+"";ut.call(Ni,l)||(Ni[l]=[]),Ni[l].push({name:r,func:a})}}),Ni[Ir(n,C).name]=[{name:"wrapper",func:n}],it.prototype.clone=E1,it.prototype.reverse=x1,it.prototype.value=S1,d.prototype.at=j2,d.prototype.chain=t_,d.prototype.commit=e_,d.prototype.next=i_,d.prototype.plant=r_,d.prototype.reverse=s_,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=a_,d.prototype.first=d.prototype.head,un&&(d.prototype[un]=n_),d},Gi=e1();si?((si.exports=Gi)._=Gi,Ns._=Gi):Gt._=Gi}).call(l6)}(Nn,Nn.exports)),Nn.exports}var _6=c6();function g6(t,i){let n=i.features;const s=[];for(;n.length>0;){n=_6.sortBy(n,f=>{if(f.geometry&&f.geometry.coordinates&&f.geometry.coordinates[0])return ns(t,f.geometry.coordinates[0]);throw new Error("Feature missing geometry")});const o=n.shift(),h=o.geometry.coordinates[o.geometry.coordinates.length-1];h&&(t=h),s.push(o)}return s}class ji{lowerX;upperX;lowerY;upperY;customCenter;bottomLeft;bottomRight;topLeft;topRight;center;flatten;constructor(i){const{lowerX:n,upperX:s,lowerY:o,upperY:h,customCenter:f}=i;this.lowerX=n,this.upperX=s,this.lowerY=o,this.upperY=h,this.customCenter=f,this.bottomLeft=[this.lowerX,this.lowerY],this.bottomRight=[this.upperX,this.lowerY],this.topLeft=[this.lowerX,this.upperY],this.topRight=[this.upperX,this.upperY],this.center=this.customCenter??[(this.lowerX+this.upperX)/2,(this.lowerY+this.upperY)/2],this.flatten=[this.lowerX,this.lowerY,this.upperX,this.upperY]}isInBounds(i,n){return typeof i=="number"?i>=this.lowerX&&i<=this.upperX&&n>=this.lowerY&&n<=this.upperY:this.isInBounds(i[0],i[1])}splitIfOutOfBounds(i){if(!(!Array.isArray(i)||i.length<=1)&&!i.find(n=>n.length!==2)){if(i.find(n=>!this.isInBounds(n))){const n=ff(this.flatten),s=f6(Wn(i),n);return i[0]&&(s.features=g6(i[0],s)),s.features.map(o=>({coordinates:o.geometry.coordinates,isWithinBounds:dm(o.geometry.coordinates).features.every(h=>Cm(h,n))}))}return[{coordinates:i,isWithinBounds:!0}]}}}const Zi=15.5,df=8,$n=2*Math.PI*Dt/256;class lo{epsgNumber;epsg;label;technicalName;proj4transformationMatrix;bounds;usesMercatorPyramid;constructor(i){const{epsgNumber:n,label:s,proj4transformationMatrix:o,bounds:h,technicalName:f,usesMercatorPyramid:u=!1}=i;this.epsgNumber=n,this.epsg=`EPSG:${n}`,this.label=s,this.proj4transformationMatrix=o,this.bounds=h,this.technicalName=f,this.usesMercatorPyramid=u}getBoundsAs(i){if(this.bounds){if(i.epsg===this.epsg)return this.bounds;const n=mi(this.epsg,i.epsg,this.bounds.bottomLeft),s=mi(this.epsg,i.epsg,this.bounds.topRight);let o;return this.bounds.customCenter&&(o=mi(this.epsg,i.epsg,this.bounds.customCenter)),new ji({lowerX:n[0],lowerY:n[1],upperX:s[0],upperY:s[1],customCenter:o})}}isInBounds(i,n){return this.bounds?typeof i=="number"?this.bounds.isInBounds(i,n):this.bounds.isInBounds(i[0],i[1]):!1}roundZoomLevel(i){return wi(i,3)}getResolutionSteps(i){if(!this.bounds)return[];const n=$n,s=[],o=(i??0)*Math.PI/180;for(let h=0;h<21;++h)s.push({resolution:n*Math.cos(o)/Math.pow(2,h),zoom:h});return s}getTileOrigin(){return this.bounds?.topLeft??[0,0]}getMatrixIds(){const i=[];for(let n=0;n<this.getResolutionSteps().length;++n)i[n]=n;return i}}class Mf extends lo{constructor(i){super(i)}getTileOrigin(){return this.bounds.topLeft}}const pe=[650,500,250,100,50,20,10,5,2.5,2,1,.5,.25,.1],mf=[4e3,3750,3500,3250,3e3,2750,2500,2250,2e3,1750,1500,1250,1e3,750,...pe.slice(0,10),1.5,...pe.slice(10)],ue=[7.35,7.75,8.75,10,11,12.5,13.5,14.5,Zi,15.75,16.7,17.75,18.75,20,21],v6=["1:2'500'000","1:2'500'000","1:1'000'000","1:1'000'000","1:500'000","1:200'000","1:100'000","1:50'000","1:25'000","1:25'000","1:10'000","1:10'000","1:10'000","1:10'000","1:10'000"],d6=ue.map((t,i)=>i);class co extends Mf{getResolutionSteps(){return mf.map(i=>{const n=pe.indexOf(i)??void 0;let s;return n&&(s=v6[n]),{zoom:n,label:s,resolution:i}})}get1_25000ZoomLevel(){return df}getDefaultZoom(){return 1}transformStandardZoomLevelToCustom(i){return typeof ue[0]=="number"&&typeof ue[14]=="number"&&i>=ue[0]&&i<=ue[14]?ue.filter(n=>n<i).length:typeof ue[0]=="number"&&i<ue[0]?0:typeof ue[14]=="number"&&i>ue[14]?14:this.get1_25000ZoomLevel()}transformCustomZoomLevelToStandard(i){const n=Math.floor(i);return ue.length-1>=n?ue[n]??Zi:Zi}getResolutionForZoomAndCenter(i){const n=Math.round(i);return typeof pe[n]!="number"?0:pe[n]}getZoomForResolutionAndCenter(i){const n=pe.find(o=>o<=i);if(n)return pe.indexOf(n);const s=pe.slice(-1)[0];return s&&s>i?pe.indexOf(s):0}roundCoordinateValue(i){return wi(i,2)}roundZoomLevel(i,n=!1){return n?_m(i,d6):super.roundZoomLevel(i)}}class M6 extends co{constructor(){super({epsgNumber:21781,label:"CH1903 / LV03",technicalName:"LV03",proj4transformationMatrix:"+proj=somerc +lat_0=46.9524055555556 +lon_0=7.43958333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs +type=crs",bounds:new ji({lowerX:485071.58,upperX:837119.8,lowerY:74261.72,upperY:299941.79}),usesMercatorPyramid:!1})}}class m6 extends co{constructor(){super({epsgNumber:2056,label:"CH1903+ / LV95",technicalName:"LV95",proj4transformationMatrix:"+proj=somerc +lat_0=46.9524055555556 +lon_0=7.43958333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs +type=crs",bounds:new ji({lowerX:242e4,upperX:29e5,lowerY:103e4,upperY:135e4}),usesMercatorPyramid:!1})}}class _o extends lo{get1_25000ZoomLevel(){return Zi}getDefaultZoom(){return Zi}}class y6 extends _o{constructor(){super({epsgNumber:3857,label:"WebMercator",proj4transformationMatrix:"+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=proj",bounds:new ji({lowerX:-20037508342789244e-9,upperX:20037508342789244e-9,lowerY:-20037508342789244e-9,upperY:20037508342789244e-9,customCenter:[917209.87,591473743e-2]}),usesMercatorPyramid:!0})}roundCoordinateValue(i){return wi(i,2)}getResolutionForZoomAndCenter(i,n){const s=mi(this.epsg,zn.epsg,n).map(o=>o*Math.PI/180);return typeof s[1]!="number"?0:wi(Math.abs($n*Math.cos(s[1])/Math.pow(2,i)),2)}getZoomForResolutionAndCenter(i,n){const s=mi(this.epsg,zn.epsg,n).map(o=>o*Math.PI/180);return typeof s[1]!="number"?0:Math.abs(Math.log2(i/$n/Math.cos(s[1])))}}class p6 extends _o{constructor(){super({epsgNumber:4326,label:"WGS 84 (lat/lon)",proj4transformationMatrix:"+proj=longlat +datum=WGS84 +no_defs +type=proj",bounds:new ji({lowerX:-180,upperX:180,lowerY:-90,upperY:90,customCenter:[8.239436,46.832259]}),usesMercatorPyramid:!0})}roundCoordinateValue(i){return wi(i,6)}getResolutionForZoomAndCenter(i,n){return wi(Math.abs($n*Math.cos(n[1]*Math.PI/180)/Math.pow(2,i)),2)}getExtentInOrderXY(i){return i[0]>i[1]?[i[1],i[0],i[3],i[2]]:i}getZoomForResolutionAndCenter(i,n){return Math.abs(Math.log2(i/$n/Math.cos(n[1]*Math.PI/180)))}}const go=new m6,vo=new M6,zn=new p6,Mo=new y6,yf=[go,vo,zn,Mo],w6={STANDARD_ZOOM_LEVEL_1_25000_MAP:Zi,SWISS_ZOOM_LEVEL_1_25000_MAP:df,LV95_RESOLUTIONS:pe,SWISSTOPO_TILEGRID_RESOLUTIONS:mf},E6={LV95:go,LV03:vo,WGS84:zn,WEBMERCATOR:Mo,allCoordinateSystems:yf};exports.CoordinateSystem=lo;exports.CoordinateSystemBounds=ji;exports.CustomCoordinateSystem=Mf;exports.LV03=vo;exports.LV95=go;exports.LV95_RESOLUTIONS=pe;exports.StandardCoordinateSystem=_o;exports.SwissCoordinateSystem=co;exports.WEBMERCATOR=Mo;exports.WGS84=zn;exports.allCoordinateSystems=yf;exports.bbox=di;exports.bboxPolygon=ff;exports.constants=w6;exports.crs=E6;exports.d=vm;exports.earthRadius=Dt;exports.feature=Ge;exports.featureCollection=ce;exports.featureEach=Qn;exports.geomEach=uf;exports.getDefaultExportFromCjs=o6;exports.getGeom=hf;exports.i=rf;exports.lengthToRadians=ym;exports.lineString=Wn;exports.multiLineString=Mm;exports.multiPolygon=mm;exports.point=Mi;exports.polygon=af;exports.proj4=mi;exports.radiansToLength=of;exports.s=wi;
|