!function(t){var o,i;if("function"==typeof define&&define.amd)define(["leaflet","proj4"],t);else if("object"==typeof module&&"object"==typeof module.exports)o=require("leaflet"),i=require("proj4"),module.exports=t(o,i);else{if(void 0===window.L||void 0===window.proj4)throw"Leaflet and proj4 must be loaded first";t(window.L,window.proj4)}}(function(t,o){return o.__esModule&&o.default&&(o=o.default),t.Proj={},t.Proj._isProj4Obj=function(t){return void 0!==t.inverse&&void 0!==t.forward},t.Proj.Projection=t.Class.extend({initialize:function(o,i,e){var s=t.Proj._isProj4Obj(o);this._proj=s?o:this._projFromCodeDef(o,i),this.bounds=s?i:e},project:function(o){var i=this._proj.forward([o.lng,o.lat]);return new t.Point(i[0],i[1])},unproject:function(o,i){var e=this._proj.inverse([o.x,o.y]);return new t.LatLng(e[1],e[0],i)},_projFromCodeDef:function(t,i){if(i)o.defs(t,i);else if(void 0===o.defs[t]){var e=t.split(":");if(e.length>3&&(t=e[e.length-3]+":"+e[e.length-1]),void 0===o.defs[t])throw"No projection definition for code "+t}return o(t)}}),t.Proj.CRS=t.Class.extend({includes:t.CRS,options:{transformation:new t.Transformation(1,0,-1,0)},initialize:function(o,i,e){var s,n,r,a;if(t.Proj._isProj4Obj(o)?(s=(n=o).srsCode,a=i||{},this.projection=new t.Proj.Projection(n,a.bounds)):(s=o,r=i,a=e||{},this.projection=new t.Proj.Projection(s,r,a.bounds)),t.Util.setOptions(this,a),this.code=s,this.transformation=this.options.transformation,this.options.origin&&(this.transformation=new t.Transformation(1,-this.options.origin[0],-1,this.options.origin[1])),this.options.scales)this._scales=this.options.scales;else if(this.options.resolutions){this._scales=[];for(var l=this.options.resolutions.length-1;l>=0;l--)this.options.resolutions[l]&&(this._scales[l]=1/this.options.resolutions[l])}this.infinite=!this.options.bounds},scale:function(t){var o,i,e,s,n=Math.floor(t);return t===n?this._scales[t]:(o=this._scales[n],i=this._scales[n+1],e=i-o,s=t-n,o+e*s)},zoom:function(t){var o,i,e,s=this._closestElement(this._scales,t),n=this._scales.indexOf(s);return t===s?n:void 0===s?-1/0:(i=n+1,void 0===(o=this._scales[i])?1/0:(e=o-s,(t-s)/e+n))},distance:t.CRS.Earth.distance,R:t.CRS.Earth.R,_closestElement:function(t,o){for(var i,e=t.length;e--;)t[e]<=o&&(void 0===i||i