@florasync/leaflet-geokit 0.8.2 → 0.8.3

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.
@@ -1,7 +1,7 @@
1
- (function(ct,pt){typeof exports=="object"&&typeof module!="undefined"?pt(exports):typeof define=="function"&&define.amd?define(["exports"],pt):(ct=typeof globalThis!="undefined"?globalThis:ct||self,pt(ct.LeafletGeoKit={}))})(this,(function(ct){"use strict";var Ua=Object.defineProperty;var Za=(ct,pt,J)=>pt in ct?Ua(ct,pt,{enumerable:!0,configurable:!0,writable:!0,value:J}):ct[pt]=J;var k=(ct,pt,J)=>Za(ct,typeof pt!="symbol"?pt+"":pt,J);function pt(u,s){for(var n=0;n<s.length;n++){const l=s[n];if(typeof l!="string"&&!Array.isArray(l)){for(const i in l)if(i!=="default"&&!(i in u)){const r=Object.getOwnPropertyDescriptor(l,i);r&&Object.defineProperty(u,i,r.get?r:{enumerable:!0,get:()=>l[i]})}}}return Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}const J={Ready:"leaflet-draw:ready",Created:"leaflet-draw:created",Edited:"leaflet-draw:edited",Deleted:"leaflet-draw:deleted",Error:"leaflet-draw:error",Ingest:"leaflet-draw:ingest",Export:"leaflet-draw:export"},Le={Status:"leaflet-geokit:status",Diagnostic:"leaflet-geokit:diagnostic"},Ki={trace:10,debug:20,info:30,warn:40,error:50};function Bn(u,s){return u==="silent"?!1:Ki[s]>=Ki[u]}function Rn(){try{return new Date().toISOString()}catch{return""}}function be(u,s="debug",n=console){let l=s;const i=h=>(...d)=>{try{if(!Bn(l,h))return;const p=`[${Rn()}][${u}][${h.toUpperCase()}]`,m=n[h];typeof m=="function"?m(p,...d):n.log(p,...d)}catch{}};return{get level(){return l},setLevel(h){l=h},trace:i("trace"),debug:i("debug"),info:i("info"),warn:i("warn"),error:i("error"),child(h){return be(`${u}:${h}`,l,n)}}}function Nn(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var te={exports:{}};/* @preserve
1
+ (function(ct,pt){typeof exports=="object"&&typeof module!="undefined"?pt(exports):typeof define=="function"&&define.amd?define(["exports"],pt):(ct=typeof globalThis!="undefined"?globalThis:ct||self,pt(ct.LeafletGeoKit={}))})(this,(function(ct){"use strict";var Us=Object.defineProperty;var Zs=(ct,pt,J)=>pt in ct?Us(ct,pt,{enumerable:!0,configurable:!0,writable:!0,value:J}):ct[pt]=J;var k=(ct,pt,J)=>Zs(ct,typeof pt!="symbol"?pt+"":pt,J);function pt(u,a){for(var n=0;n<a.length;n++){const h=a[n];if(typeof h!="string"&&!Array.isArray(h)){for(const i in h)if(i!=="default"&&!(i in u)){const r=Object.getOwnPropertyDescriptor(h,i);r&&Object.defineProperty(u,i,r.get?r:{enumerable:!0,get:()=>h[i]})}}}return Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}const J={Ready:"leaflet-draw:ready",Created:"leaflet-draw:created",Edited:"leaflet-draw:edited",Deleted:"leaflet-draw:deleted",Error:"leaflet-draw:error",Ingest:"leaflet-draw:ingest",Export:"leaflet-draw:export"},Le={Status:"leaflet-geokit:status",Diagnostic:"leaflet-geokit:diagnostic"},Ki={trace:10,debug:20,info:30,warn:40,error:50};function Bn(u,a){return u==="silent"?!1:Ki[a]>=Ki[u]}function Rn(){try{return new Date().toISOString()}catch{return""}}function be(u,a="debug",n=console){let h=a;const i=l=>(...d)=>{try{if(!Bn(h,l))return;const p=`[${Rn()}][${u}][${l.toUpperCase()}]`,m=n[l];typeof m=="function"?m(p,...d):n.log(p,...d)}catch{}};return{get level(){return h},setLevel(l){h=l},trace:i("trace"),debug:i("debug"),info:i("info"),warn:i("warn"),error:i("error"),child(l){return be(`${u}:${l}`,h,n)}}}function Nn(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var te={exports:{}};/* @preserve
2
2
  * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
3
3
  * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
4
- */var Un=te.exports,Xi;function Qi(){return Xi||(Xi=1,(function(u,s){(function(n,l){l(s)})(Un,(function(n){var l="1.9.4";function i(t){var e,o,a,c;for(o=1,a=arguments.length;o<a;o++){c=arguments[o];for(e in c)t[e]=c[e]}return t}var r=Object.create||(function(){function t(){}return function(e){return t.prototype=e,new t}})();function h(t,e){var o=Array.prototype.slice;if(t.bind)return t.bind.apply(t,o.call(arguments,1));var a=o.call(arguments,2);return function(){return t.apply(e,a.length?a.concat(o.call(arguments)):arguments)}}var d=0;function p(t){return"_leaflet_id"in t||(t._leaflet_id=++d),t._leaflet_id}function m(t,e,o){var a,c,f,_;return _=function(){a=!1,c&&(f.apply(o,c),c=!1)},f=function(){a?c=arguments:(t.apply(o,arguments),setTimeout(_,e),a=!0)},f}function g(t,e,o){var a=e[1],c=e[0],f=a-c;return t===a&&o?t:((t-c)%f+f)%f+c}function y(){return!1}function w(t,e){if(e===!1)return t;var o=Math.pow(10,e===void 0?6:e);return Math.round(t*o)/o}function T(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function E(t){return T(t).split(/\s+/)}function A(t,e){Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?r(t.options):{});for(var o in e)t.options[o]=e[o];return t.options}function N(t,e,o){var a=[];for(var c in t)a.push(encodeURIComponent(o?c.toUpperCase():c)+"="+encodeURIComponent(t[c]));return(!e||e.indexOf("?")===-1?"?":"&")+a.join("&")}var F=/\{ *([\w_ -]+) *\}/g;function P(t,e){return t.replace(F,function(o,a){var c=e[a];if(c===void 0)throw new Error("No value provided for variable "+o);return typeof c=="function"&&(c=c(e)),c})}var I=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function G(t,e){for(var o=0;o<t.length;o++)if(t[o]===e)return o;return-1}var j="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function q(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var rt=0;function st(t){var e=+new Date,o=Math.max(0,16-(e-rt));return rt=e+o,window.setTimeout(t,o)}var Mt=window.requestAnimationFrame||q("RequestAnimationFrame")||st,Ie=window.cancelAnimationFrame||q("CancelAnimationFrame")||q("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function at(t,e,o){if(o&&Mt===st)t.call(e);else return Mt.call(window,h(t,e))}function lt(t){t&&Ie.call(window,t)}var De={__proto__:null,extend:i,create:r,bind:h,get lastId(){return d},stamp:p,throttle:m,wrapNum:g,falseFn:y,formatNum:w,trim:T,splitWords:E,setOptions:A,getParamString:N,template:P,isArray:I,indexOf:G,emptyImageUrl:j,requestFn:Mt,cancelFn:Ie,requestAnimFrame:at,cancelAnimFrame:lt};function _t(){}_t.extend=function(t){var e=function(){A(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,a=r(o);a.constructor=e,e.prototype=a;for(var c in this)Object.prototype.hasOwnProperty.call(this,c)&&c!=="prototype"&&c!=="__super__"&&(e[c]=this[c]);return t.statics&&i(e,t.statics),t.includes&&(ne(t.includes),i.apply(null,[a].concat(t.includes))),i(a,t),delete a.statics,delete a.includes,a.options&&(a.options=o.options?r(o.options):{},i(a.options,t.options)),a._initHooks=[],a.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var f=0,_=a._initHooks.length;f<_;f++)a._initHooks[f].call(this)}},e},_t.include=function(t){var e=this.prototype.options;return i(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},_t.mergeOptions=function(t){return i(this.prototype.options,t),this},_t.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),o=typeof t=="function"?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(o),this};function ne(t){if(!(typeof L=="undefined"||!L||!L.Mixin)){t=I(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var mt={on:function(t,e,o){if(typeof t=="object")for(var a in t)this._on(a,t[a],e);else{t=E(t);for(var c=0,f=t.length;c<f;c++)this._on(t[c],e,o)}return this},off:function(t,e,o){if(!arguments.length)delete this._events;else if(typeof t=="object")for(var a in t)this._off(a,t[a],e);else{t=E(t);for(var c=arguments.length===1,f=0,_=t.length;f<_;f++)c?this._off(t[f]):this._off(t[f],e,o)}return this},_on:function(t,e,o,a){if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}if(this._listens(t,e,o)===!1){o===this&&(o=void 0);var c={fn:e,ctx:o};a&&(c.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(c)}},_off:function(t,e,o){var a,c,f;if(this._events&&(a=this._events[t],!!a)){if(arguments.length===1){if(this._firingCount)for(c=0,f=a.length;c<f;c++)a[c].fn=y;delete this._events[t];return}if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}var _=this._listens(t,e,o);if(_!==!1){var v=a[_];this._firingCount&&(v.fn=y,this._events[t]=a=a.slice()),a.splice(_,1)}}},fire:function(t,e,o){if(!this.listens(t,o))return this;var a=i({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var c=this._events[t];if(c){this._firingCount=this._firingCount+1||1;for(var f=0,_=c.length;f<_;f++){var v=c[f],b=v.fn;v.once&&this.off(t,b,v.ctx),b.call(v.ctx||this,a)}this._firingCount--}}return o&&this._propagateEvent(a),this},listens:function(t,e,o,a){typeof t!="string"&&console.warn('"string" type argument expected');var c=e;typeof e!="function"&&(a=!!e,c=void 0,o=void 0);var f=this._events&&this._events[t];if(f&&f.length&&this._listens(t,c,o)!==!1)return!0;if(a){for(var _ in this._eventParents)if(this._eventParents[_].listens(t,e,o,a))return!0}return!1},_listens:function(t,e,o){if(!this._events)return!1;var a=this._events[t]||[];if(!e)return!!a.length;o===this&&(o=void 0);for(var c=0,f=a.length;c<f;c++)if(a[c].fn===e&&a[c].ctx===o)return c;return!1},once:function(t,e,o){if(typeof t=="object")for(var a in t)this._on(a,t[a],e,!0);else{t=E(t);for(var c=0,f=t.length;c<f;c++)this._on(t[c],e,o,!0)}return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[p(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[p(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)}};mt.addEventListener=mt.on,mt.removeEventListener=mt.clearAllEventListeners=mt.off,mt.addOneTimeEventListener=mt.once,mt.fireEvent=mt.fire,mt.hasEventListeners=mt.listens;var re=_t.extend(mt);function O(t,e,o){this.x=o?Math.round(t):t,this.y=o?Math.round(e):e}var ko=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};O.prototype={clone:function(){return new O(this.x,this.y)},add:function(t){return this.clone()._add(D(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(D(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new O(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new O(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ko(this.x),this.y=ko(this.y),this},distanceTo:function(t){t=D(t);var e=t.x-this.x,o=t.y-this.y;return Math.sqrt(e*e+o*o)},equals:function(t){return t=D(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=D(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+w(this.x)+", "+w(this.y)+")"}};function D(t,e,o){return t instanceof O?t:I(t)?new O(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new O(t.x,t.y):new O(t,e,o)}function Y(t,e){if(t)for(var o=e?[t,e]:t,a=0,c=o.length;a<c;a++)this.extend(o[a])}Y.prototype={extend:function(t){var e,o;if(!t)return this;if(t instanceof O||typeof t[0]=="number"||"x"in t)e=o=D(t);else if(t=dt(t),e=t.min,o=t.max,!e||!o)return this;return!this.min&&!this.max?(this.min=e.clone(),this.max=o.clone()):(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(o.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(o.y,this.max.y)),this},getCenter:function(t){return D((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return D(this.min.x,this.max.y)},getTopRight:function(){return D(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,o;return typeof t[0]=="number"||t instanceof O?t=D(t):t=dt(t),t instanceof Y?(e=t.min,o=t.max):e=o=t,e.x>=this.min.x&&o.x<=this.max.x&&e.y>=this.min.y&&o.y<=this.max.y},intersects:function(t){t=dt(t);var e=this.min,o=this.max,a=t.min,c=t.max,f=c.x>=e.x&&a.x<=o.x,_=c.y>=e.y&&a.y<=o.y;return f&&_},overlaps:function(t){t=dt(t);var e=this.min,o=this.max,a=t.min,c=t.max,f=c.x>e.x&&a.x<o.x,_=c.y>e.y&&a.y<o.y;return f&&_},isValid:function(){return!!(this.min&&this.max)},pad:function(t){var e=this.min,o=this.max,a=Math.abs(e.x-o.x)*t,c=Math.abs(e.y-o.y)*t;return dt(D(e.x-a,e.y-c),D(o.x+a,o.y+c))},equals:function(t){return t?(t=dt(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight())):!1}};function dt(t,e){return!t||t instanceof Y?t:new Y(t,e)}function ut(t,e){if(t)for(var o=e?[t,e]:t,a=0,c=o.length;a<c;a++)this.extend(o[a])}ut.prototype={extend:function(t){var e=this._southWest,o=this._northEast,a,c;if(t instanceof V)a=t,c=t;else if(t instanceof ut){if(a=t._southWest,c=t._northEast,!a||!c)return this}else return t?this.extend(U(t)||$(t)):this;return!e&&!o?(this._southWest=new V(a.lat,a.lng),this._northEast=new V(c.lat,c.lng)):(e.lat=Math.min(a.lat,e.lat),e.lng=Math.min(a.lng,e.lng),o.lat=Math.max(c.lat,o.lat),o.lng=Math.max(c.lng,o.lng)),this},pad:function(t){var e=this._southWest,o=this._northEast,a=Math.abs(e.lat-o.lat)*t,c=Math.abs(e.lng-o.lng)*t;return new ut(new V(e.lat-a,e.lng-c),new V(o.lat+a,o.lng+c))},getCenter:function(){return new V((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new V(this.getNorth(),this.getWest())},getSouthEast:function(){return new V(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){typeof t[0]=="number"||t instanceof V||"lat"in t?t=U(t):t=$(t);var e=this._southWest,o=this._northEast,a,c;return t instanceof ut?(a=t.getSouthWest(),c=t.getNorthEast()):a=c=t,a.lat>=e.lat&&c.lat<=o.lat&&a.lng>=e.lng&&c.lng<=o.lng},intersects:function(t){t=$(t);var e=this._southWest,o=this._northEast,a=t.getSouthWest(),c=t.getNorthEast(),f=c.lat>=e.lat&&a.lat<=o.lat,_=c.lng>=e.lng&&a.lng<=o.lng;return f&&_},overlaps:function(t){t=$(t);var e=this._southWest,o=this._northEast,a=t.getSouthWest(),c=t.getNorthEast(),f=c.lat>e.lat&&a.lat<o.lat,_=c.lng>e.lng&&a.lng<o.lng;return f&&_},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return t?(t=$(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function $(t,e){return t instanceof ut?t:new ut(t,e)}function V(t,e,o){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,o!==void 0&&(this.alt=+o)}V.prototype={equals:function(t,e){if(!t)return!1;t=U(t);var o=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return o<=(e===void 0?1e-9:e)},toString:function(t){return"LatLng("+w(this.lat,t)+", "+w(this.lng,t)+")"},distanceTo:function(t){return Dt.distance(this,U(t))},wrap:function(){return Dt.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,o=e/Math.cos(Math.PI/180*this.lat);return $([this.lat-e,this.lng-o],[this.lat+e,this.lng+o])},clone:function(){return new V(this.lat,this.lng,this.alt)}};function U(t,e,o){return t instanceof V?t:I(t)&&typeof t[0]!="object"?t.length===3?new V(t[0],t[1],t[2]):t.length===2?new V(t[0],t[1]):null:t==null?t:typeof t=="object"&&"lat"in t?new V(t.lat,"lng"in t?t.lng:t.lon,t.alt):e===void 0?null:new V(t,e,o)}var Et={latLngToPoint:function(t,e){var o=this.projection.project(t),a=this.scale(e);return this.transformation._transform(o,a)},pointToLatLng:function(t,e){var o=this.scale(e),a=this.transformation.untransform(t,o);return this.projection.unproject(a)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,o=this.scale(t),a=this.transformation.transform(e.min,o),c=this.transformation.transform(e.max,o);return new Y(a,c)},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?g(t.lng,this.wrapLng,!0):t.lng,o=this.wrapLat?g(t.lat,this.wrapLat,!0):t.lat,a=t.alt;return new V(o,e,a)},wrapLatLngBounds:function(t){var e=t.getCenter(),o=this.wrapLatLng(e),a=e.lat-o.lat,c=e.lng-o.lng;if(a===0&&c===0)return t;var f=t.getSouthWest(),_=t.getNorthEast(),v=new V(f.lat-a,f.lng-c),b=new V(_.lat-a,_.lng-c);return new ut(v,b)}},Dt=i({},Et,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var o=Math.PI/180,a=t.lat*o,c=e.lat*o,f=Math.sin((e.lat-t.lat)*o/2),_=Math.sin((e.lng-t.lng)*o/2),v=f*f+Math.cos(a)*Math.cos(c)*_*_,b=2*Math.atan2(Math.sqrt(v),Math.sqrt(1-v));return this.R*b}}),Ao=6378137,_i={R:Ao,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,o=this.MAX_LATITUDE,a=Math.max(Math.min(o,t.lat),-o),c=Math.sin(a*e);return new O(this.R*t.lng*e,this.R*Math.log((1+c)/(1-c))/2)},unproject:function(t){var e=180/Math.PI;return new V((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(function(){var t=Ao*Math.PI;return new Y([-t,-t],[t,t])})()};function gi(t,e,o,a){if(I(t)){this._a=t[0],this._b=t[1],this._c=t[2],this._d=t[3];return}this._a=t,this._b=e,this._c=o,this._d=a}gi.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new O((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};function se(t,e,o,a){return new gi(t,e,o,a)}var vi=i({},Dt,{code:"EPSG:3857",projection:_i,transformation:(function(){var t=.5/(Math.PI*_i.R);return se(t,.5,-t,.5)})()}),ms=i({},vi,{code:"EPSG:900913"});function Mo(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Eo(t,e){var o="",a,c,f,_,v,b;for(a=0,f=t.length;a<f;a++){for(v=t[a],c=0,_=v.length;c<_;c++)b=v[c],o+=(c?"L":"M")+b.x+" "+b.y;o+=e?C.svg?"z":"x":""}return o||"M0 0"}var yi=document.documentElement.style,Oe="ActiveXObject"in window,_s=Oe&&!document.addEventListener,To="msLaunchUri"in navigator&&!("documentMode"in document),Li=wt("webkit"),Co=wt("android"),Po=wt("android 2")||wt("android 3"),gs=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),vs=Co&&wt("Google")&&gs<537&&!("AudioNode"in window),bi=!!window.opera,So=!To&&wt("chrome"),Io=wt("gecko")&&!Li&&!bi&&!Oe,ys=!So&&wt("safari"),Do=wt("phantom"),Oo="OTransition"in yi,Ls=navigator.platform.indexOf("Win")===0,zo=Oe&&"transition"in yi,wi="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Po,Bo="MozPerspective"in yi,bs=!window.L_DISABLE_3D&&(zo||wi||Bo)&&!Oo&&!Do,ae=typeof orientation!="undefined"||wt("mobile"),ws=ae&&Li,xs=ae&&wi,Ro=!window.PointerEvent&&window.MSPointerEvent,No=!!(window.PointerEvent||Ro),Uo="ontouchstart"in window||!!window.TouchEvent,ks=!window.L_NO_TOUCH&&(Uo||No),As=ae&&bi,Ms=ae&&Io,Es=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Ts=(function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",y,e),window.removeEventListener("testPassiveEventSupport",y,e)}catch{}return t})(),Cs=(function(){return!!document.createElement("canvas").getContext})(),xi=!!(document.createElementNS&&Mo("svg").createSVGRect),Ps=!!xi&&(function(){var t=document.createElement("div");return t.innerHTML="<svg/>",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),Ss=!xi&&(function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&typeof e.adj=="object"}catch{return!1}})(),Is=navigator.platform.indexOf("Mac")===0,Ds=navigator.platform.indexOf("Linux")===0;function wt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var C={ie:Oe,ielt9:_s,edge:To,webkit:Li,android:Co,android23:Po,androidStock:vs,opera:bi,chrome:So,gecko:Io,safari:ys,phantom:Do,opera12:Oo,win:Ls,ie3d:zo,webkit3d:wi,gecko3d:Bo,any3d:bs,mobile:ae,mobileWebkit:ws,mobileWebkit3d:xs,msPointer:Ro,pointer:No,touch:ks,touchNative:Uo,mobileOpera:As,mobileGecko:Ms,retina:Es,passiveEvents:Ts,canvas:Cs,svg:xi,vml:Ss,inlineSvg:Ps,mac:Is,linux:Ds},Zo=C.msPointer?"MSPointerDown":"pointerdown",Ho=C.msPointer?"MSPointerMove":"pointermove",Fo=C.msPointer?"MSPointerUp":"pointerup",Go=C.msPointer?"MSPointerCancel":"pointercancel",ki={touchstart:Zo,touchmove:Ho,touchend:Fo,touchcancel:Go},Vo={touchstart:Us,touchmove:ze,touchend:ze,touchcancel:ze},Wt={},Wo=!1;function Os(t,e,o){return e==="touchstart"&&Ns(),Vo[e]?(o=Vo[e].bind(this,o),t.addEventListener(ki[e],o,!1),o):(console.warn("wrong event specified:",e),y)}function zs(t,e,o){if(!ki[e]){console.warn("wrong event specified:",e);return}t.removeEventListener(ki[e],o,!1)}function Bs(t){Wt[t.pointerId]=t}function Rs(t){Wt[t.pointerId]&&(Wt[t.pointerId]=t)}function Jo(t){delete Wt[t.pointerId]}function Ns(){Wo||(document.addEventListener(Zo,Bs,!0),document.addEventListener(Ho,Rs,!0),document.addEventListener(Fo,Jo,!0),document.addEventListener(Go,Jo,!0),Wo=!0)}function ze(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){e.touches=[];for(var o in Wt)e.touches.push(Wt[o]);e.changedTouches=[e],t(e)}}function Us(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&nt(e),ze(t,e)}function Zs(t){var e={},o,a;for(a in t)o=t[a],e[a]=o&&o.bind?o.bind(t):o;return t=e,e.type="dblclick",e.detail=2,e.isTrusted=!1,e._simulated=!0,e}var Hs=200;function Fs(t,e){t.addEventListener("dblclick",e);var o=0,a;function c(f){if(f.detail!==1){a=f.detail;return}if(!(f.pointerType==="mouse"||f.sourceCapabilities&&!f.sourceCapabilities.firesTouchEvents)){var _=Xo(f);if(!(_.some(function(b){return b instanceof HTMLLabelElement&&b.attributes.for})&&!_.some(function(b){return b instanceof HTMLInputElement||b instanceof HTMLSelectElement}))){var v=Date.now();v-o<=Hs?(a++,a===2&&e(Zs(f))):a=1,o=v}}}return t.addEventListener("click",c),{dblclick:e,simDblclick:c}}function Gs(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var Ai=Ne(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),le=Ne(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),jo=le==="webkitTransition"||le==="OTransition"?le+"End":"transitionend";function qo(t){return typeof t=="string"?document.getElementById(t):t}function he(t,e){var o=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!o||o==="auto")&&document.defaultView){var a=document.defaultView.getComputedStyle(t,null);o=a?a[e]:null}return o==="auto"?null:o}function H(t,e,o){var a=document.createElement(t);return a.className=e||"",o&&o.appendChild(a),a}function K(t){var e=t.parentNode;e&&e.removeChild(t)}function Be(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Jt(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function jt(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function Mi(t,e){if(t.classList!==void 0)return t.classList.contains(e);var o=Re(t);return o.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(o)}function B(t,e){if(t.classList!==void 0)for(var o=E(e),a=0,c=o.length;a<c;a++)t.classList.add(o[a]);else if(!Mi(t,e)){var f=Re(t);Ei(t,(f?f+" ":"")+e)}}function X(t,e){t.classList!==void 0?t.classList.remove(e):Ei(t,T((" "+Re(t)+" ").replace(" "+e+" "," ")))}function Ei(t,e){t.className.baseVal===void 0?t.className=e:t.className.baseVal=e}function Re(t){return t.correspondingElement&&(t=t.correspondingElement),t.className.baseVal===void 0?t.className:t.className.baseVal}function gt(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&Vs(t,e)}function Vs(t,e){var o=!1,a="DXImageTransform.Microsoft.Alpha";try{o=t.filters.item(a)}catch{if(e===1)return}e=Math.round(e*100),o?(o.Enabled=e!==100,o.Opacity=e):t.style.filter+=" progid:"+a+"(opacity="+e+")"}function Ne(t){for(var e=document.documentElement.style,o=0;o<t.length;o++)if(t[o]in e)return t[o];return!1}function Rt(t,e,o){var a=e||new O(0,0);t.style[Ai]=(C.ie3d?"translate("+a.x+"px,"+a.y+"px)":"translate3d("+a.x+"px,"+a.y+"px,0)")+(o?" scale("+o+")":"")}function tt(t,e){t._leaflet_pos=e,C.any3d?Rt(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Nt(t){return t._leaflet_pos||new O(0,0)}var ce,de,Ti;if("onselectstart"in document)ce=function(){z(window,"selectstart",nt)},de=function(){W(window,"selectstart",nt)};else{var ue=Ne(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ce=function(){if(ue){var t=document.documentElement.style;Ti=t[ue],t[ue]="none"}},de=function(){ue&&(document.documentElement.style[ue]=Ti,Ti=void 0)}}function Ci(){z(window,"dragstart",nt)}function Pi(){W(window,"dragstart",nt)}var Ue,Si;function Ii(t){for(;t.tabIndex===-1;)t=t.parentNode;t.style&&(Ze(),Ue=t,Si=t.style.outlineStyle,t.style.outlineStyle="none",z(window,"keydown",Ze))}function Ze(){Ue&&(Ue.style.outlineStyle=Si,Ue=void 0,Si=void 0,W(window,"keydown",Ze))}function Yo(t){do t=t.parentNode;while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function Di(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ws={__proto__:null,TRANSFORM:Ai,TRANSITION:le,TRANSITION_END:jo,get:qo,getStyle:he,create:H,remove:K,empty:Be,toFront:Jt,toBack:jt,hasClass:Mi,addClass:B,removeClass:X,setClass:Ei,getClass:Re,setOpacity:gt,testProp:Ne,setTransform:Rt,setPosition:tt,getPosition:Nt,get disableTextSelection(){return ce},get enableTextSelection(){return de},disableImageDrag:Ci,enableImageDrag:Pi,preventOutline:Ii,restoreOutline:Ze,getSizedParentNode:Yo,getScale:Di};function z(t,e,o,a){if(e&&typeof e=="object")for(var c in e)zi(t,c,e[c],o);else{e=E(e);for(var f=0,_=e.length;f<_;f++)zi(t,e[f],o,a)}return this}var xt="_leaflet_events";function W(t,e,o,a){if(arguments.length===1)Ko(t),delete t[xt];else if(e&&typeof e=="object")for(var c in e)Bi(t,c,e[c],o);else if(e=E(e),arguments.length===2)Ko(t,function(v){return G(e,v)!==-1});else for(var f=0,_=e.length;f<_;f++)Bi(t,e[f],o,a);return this}function Ko(t,e){for(var o in t[xt]){var a=o.split(/\d/)[0];(!e||e(a))&&Bi(t,a,null,null,o)}}var Oi={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function zi(t,e,o,a){var c=e+p(o)+(a?"_"+p(a):"");if(t[xt]&&t[xt][c])return this;var f=function(v){return o.call(a||t,v||window.event)},_=f;!C.touchNative&&C.pointer&&e.indexOf("touch")===0?f=Os(t,e,f):C.touch&&e==="dblclick"?f=Fs(t,f):"addEventListener"in t?e==="touchstart"||e==="touchmove"||e==="wheel"||e==="mousewheel"?t.addEventListener(Oi[e]||e,f,C.passiveEvents?{passive:!1}:!1):e==="mouseenter"||e==="mouseleave"?(f=function(v){v=v||window.event,Ni(t,v)&&_(v)},t.addEventListener(Oi[e],f,!1)):t.addEventListener(e,_,!1):t.attachEvent("on"+e,f),t[xt]=t[xt]||{},t[xt][c]=f}function Bi(t,e,o,a,c){c=c||e+p(o)+(a?"_"+p(a):"");var f=t[xt]&&t[xt][c];if(!f)return this;!C.touchNative&&C.pointer&&e.indexOf("touch")===0?zs(t,e,f):C.touch&&e==="dblclick"?Gs(t,f):"removeEventListener"in t?t.removeEventListener(Oi[e]||e,f,!1):t.detachEvent("on"+e,f),t[xt][c]=null}function Ut(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ri(t){return zi(t,"wheel",Ut),this}function fe(t){return z(t,"mousedown touchstart dblclick contextmenu",Ut),t._leaflet_disable_click=!0,this}function nt(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Zt(t){return nt(t),Ut(t),this}function Xo(t){if(t.composedPath)return t.composedPath();for(var e=[],o=t.target;o;)e.push(o),o=o.parentNode;return e}function Qo(t,e){if(!e)return new O(t.clientX,t.clientY);var o=Di(e),a=o.boundingClientRect;return new O((t.clientX-a.left)/o.x-e.clientLeft,(t.clientY-a.top)/o.y-e.clientTop)}var Js=C.linux&&C.chrome?window.devicePixelRatio:C.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function $o(t){return C.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/Js:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function Ni(t,e){var o=e.relatedTarget;if(!o)return!0;try{for(;o&&o!==t;)o=o.parentNode}catch{return!1}return o!==t}var js={__proto__:null,on:z,off:W,stopPropagation:Ut,disableScrollPropagation:Ri,disableClickPropagation:fe,preventDefault:nt,stop:Zt,getPropagationPath:Xo,getMousePosition:Qo,getWheelDelta:$o,isExternalTarget:Ni,addListener:z,removeListener:W},tn=re.extend({run:function(t,e,o,a){this.stop(),this._el=t,this._inProgress=!0,this._duration=o||.25,this._easeOutPower=1/Math.max(a||.5,.2),this._startPos=Nt(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=at(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,o=this._duration*1e3;e<o?this._runFrame(this._easeOut(e/o),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var o=this._startPos.add(this._offset.multiplyBy(t));e&&o._round(),tt(this._el,o),this.fire("step")},_complete:function(){lt(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Z=re.extend({options:{crs:vi,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=A(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=h(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.zoom!==void 0&&(this._zoom=this._limitZoom(e.zoom)),e.center&&e.zoom!==void 0&&this.setView(U(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=le&&C.any3d&&!C.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),z(this._proxy,jo,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,o){if(e=e===void 0?this._zoom:this._limitZoom(e),t=this._limitCenter(U(t),e,this.options.maxBounds),o=o||{},this._stop(),this._loaded&&!o.reset&&o!==!0){o.animate!==void 0&&(o.zoom=i({animate:o.animate},o.zoom),o.pan=i({animate:o.animate,duration:o.duration},o.pan));var a=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,o.zoom):this._tryAnimatedPan(t,o.pan);if(a)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e,o.pan&&o.pan.noMoveStart),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(C.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(C.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,o){var a=this.getZoomScale(e),c=this.getSize().divideBy(2),f=t instanceof O?t:this.latLngToContainerPoint(t),_=f.subtract(c).multiplyBy(1-1/a),v=this.containerPointToLatLng(c.add(_));return this.setView(v,e,{zoom:o})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():$(t);var o=D(e.paddingTopLeft||e.padding||[0,0]),a=D(e.paddingBottomRight||e.padding||[0,0]),c=this.getBoundsZoom(t,!1,o.add(a));if(c=typeof e.maxZoom=="number"?Math.min(e.maxZoom,c):c,c===1/0)return{center:t.getCenter(),zoom:c};var f=a.subtract(o).divideBy(2),_=this.project(t.getSouthWest(),c),v=this.project(t.getNorthEast(),c),b=this.unproject(_.add(v).divideBy(2).add(f),c);return{center:b,zoom:c}},fitBounds:function(t,e){if(t=$(t),!t.isValid())throw new Error("Bounds are not valid.");var o=this._getBoundsCenterZoom(t,e);return this.setView(o.center,o.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=D(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(e.animate!==!0&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new tn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){B(this._mapPane,"leaflet-pan-anim");var o=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,o,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,o){if(o=o||{},o.animate===!1||!C.any3d)return this.setView(t,e,o);this._stop();var a=this.project(this.getCenter()),c=this.project(t),f=this.getSize(),_=this._zoom;t=U(t),e=e===void 0?_:e;var v=Math.max(f.x,f.y),b=v*this.getZoomScale(_,e),x=c.distanceTo(a)||1,M=1.42,S=M*M;function R(et){var Qe=et?-1:1,za=et?b:v,Ba=b*b-v*v+Qe*S*S*x*x,Ra=2*za*S*x,Yi=Ba/Ra,zn=Math.sqrt(Yi*Yi+1)-Yi,Na=zn<1e-9?-18:Math.log(zn);return Na}function ht(et){return(Math.exp(et)-Math.exp(-et))/2}function it(et){return(Math.exp(et)+Math.exp(-et))/2}function yt(et){return ht(et)/it(et)}var ft=R(0);function $t(et){return v*(it(ft)/it(ft+M*et))}function Sa(et){return v*(it(ft)*yt(ft+M*et)-ht(ft))/S}function Ia(et){return 1-Math.pow(1-et,1.5)}var Da=Date.now(),Dn=(R(1)-ft)/M,Oa=o.duration?1e3*o.duration:1e3*Dn*.8;function On(){var et=(Date.now()-Da)/Oa,Qe=Ia(et)*Dn;et<=1?(this._flyToFrame=at(On,this),this._move(this.unproject(a.add(c.subtract(a).multiplyBy(Sa(Qe)/x)),_),this.getScaleZoom(v/$t(Qe),_),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,o.noMoveStart),On.call(this),this},flyToBounds:function(t,e){var o=this._getBoundsCenterZoom(t,e);return this.flyTo(o.center,o.zoom,e)},setMaxBounds:function(t){return t=$(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var o=this.getCenter(),a=this._limitCenter(o,this._zoom,$(t));return o.equals(a)||this.panTo(a,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var o=D(e.paddingTopLeft||e.padding||[0,0]),a=D(e.paddingBottomRight||e.padding||[0,0]),c=this.project(this.getCenter()),f=this.project(t),_=this.getPixelBounds(),v=dt([_.min.add(o),_.max.subtract(a)]),b=v.getSize();if(!v.contains(f)){this._enforcingBounds=!0;var x=f.subtract(v.getCenter()),M=v.extend(f).getSize().subtract(b);c.x+=x.x<0?-M.x:M.x,c.y+=x.y<0?-M.y:M.y,this.panTo(this.unproject(c),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),a=e.divideBy(2).round(),c=o.divideBy(2).round(),f=a.subtract(c);return!f.x&&!f.y?this:(t.animate&&t.pan?this.panBy(f):(t.pan&&this._rawPanBy(f),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(h(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:o}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=h(this._handleGeolocationResponse,this),o=h(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,o,t):navigator.geolocation.getCurrentPosition(e,o,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,o=t.message||(e===1?"permission denied":e===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+o+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=t.coords.latitude,o=t.coords.longitude,a=new V(e,o),c=a.toBounds(t.coords.accuracy*2),f=this._locateOptions;if(f.setView){var _=this.getBoundsZoom(c);this.setView(a,f.maxZoom?Math.min(_,f.maxZoom):_)}var v={latlng:a,bounds:c,timestamp:t.timestamp};for(var b in t.coords)typeof t.coords[b]=="number"&&(v[b]=t.coords[b]);this.fire("locationfound",v)}},addHandler:function(t,e){if(!e)return this;var o=this[t]=new e(this);return this._handlers.push(o),this.options[t]&&o.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),K(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(lt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)K(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var o="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),a=H("div",o,e||this._mapPane);return t&&(this._panes[t]=a),a},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),o=this.unproject(t.getTopRight());return new ut(e,o)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,o){t=$(t),o=D(o||[0,0]);var a=this.getZoom()||0,c=this.getMinZoom(),f=this.getMaxZoom(),_=t.getNorthWest(),v=t.getSouthEast(),b=this.getSize().subtract(o),x=dt(this.project(v,a),this.project(_,a)).getSize(),M=C.any3d?this.options.zoomSnap:1,S=b.x/x.x,R=b.y/x.y,ht=e?Math.max(S,R):Math.min(S,R);return a=this.getScaleZoom(ht,a),M&&(a=Math.round(a/(M/100))*(M/100),a=e?Math.ceil(a/M)*M:Math.floor(a/M)*M),Math.max(c,Math.min(f,a))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new O(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var o=this._getTopLeftPoint(t,e);return new Y(o,o.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var o=this.options.crs;return e=e===void 0?this._zoom:e,o.scale(t)/o.scale(e)},getScaleZoom:function(t,e){var o=this.options.crs;e=e===void 0?this._zoom:e;var a=o.zoom(t*o.scale(e));return isNaN(a)?1/0:a},project:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.latLngToPoint(U(t),e)},unproject:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.pointToLatLng(D(t),e)},layerPointToLatLng:function(t){var e=D(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(U(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(U(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds($(t))},distance:function(t,e){return this.options.crs.distance(U(t),U(e))},containerPointToLayerPoint:function(t){return D(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return D(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(D(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(U(t)))},mouseEventToContainerPoint:function(t){return Qo(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=qo(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");z(e,"scroll",this._onScroll,this),this._containerId=p(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&C.any3d,B(t,"leaflet-container"+(C.touch?" leaflet-touch":"")+(C.retina?" leaflet-retina":"")+(C.ielt9?" leaflet-oldie":"")+(C.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=he(t,"position");e!=="absolute"&&e!=="relative"&&e!=="fixed"&&e!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),tt(this._mapPane,new O(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(B(t.markerPane,"leaflet-zoom-hide"),B(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,o){tt(this._mapPane,new O(0,0));var a=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var c=this._zoom!==e;this._moveStart(c,o)._move(t,e)._moveEnd(c),this.fire("viewreset"),a&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,o,a){e===void 0&&(e=this._zoom);var c=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),a?o&&o.pinch&&this.fire("zoom",o):((c||o&&o.pinch)&&this.fire("zoom",o),this.fire("move",o)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return lt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){tt(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[p(this._container)]=this;var e=t?W:z;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),C.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){lt(this._resizeRequest),this._resizeRequest=at(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var o=[],a,c=e==="mouseout"||e==="mouseover",f=t.target||t.srcElement,_=!1;f;){if(a=this._targets[p(f)],a&&(e==="click"||e==="preclick")&&this._draggableMoved(a)){_=!0;break}if(a&&a.listens(e,!0)&&(c&&!Ni(f,t)||(o.push(a),c))||f===this._container)break;f=f.parentNode}return!o.length&&!_&&!c&&this.listens(e,!0)&&(o=[this]),o},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(e))){var o=t.type;o==="mousedown"&&Ii(e),this._fireDOMEvent(t,o)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,o){if(t.type==="click"){var a=i({},t);a.type="preclick",this._fireDOMEvent(a,a.type,o)}var c=this._findEventTargets(t,e);if(o){for(var f=[],_=0;_<o.length;_++)o[_].listens(e,!0)&&f.push(o[_]);c=f.concat(c)}if(c.length){e==="contextmenu"&&nt(t);var v=c[0],b={originalEvent:t};if(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"){var x=v.getLatLng&&(!v._radius||v._radius<=10);b.containerPoint=x?this.latLngToContainerPoint(v.getLatLng()):this.mouseEventToContainerPoint(t),b.layerPoint=this.containerPointToLayerPoint(b.containerPoint),b.latlng=x?v.getLatLng():this.layerPointToLatLng(b.layerPoint)}for(_=0;_<c.length;_++)if(c[_].fire(e,b,!0),b.originalEvent._stopped||c[_].options.bubblingMouseEvents===!1&&G(this._mouseEvents,e)!==-1)return}},_draggableMoved:function(t){return t=t.dragging&&t.dragging.enabled()?t:this,t.dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Nt(this._mapPane)||new O(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var o=t&&e!==void 0?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return o.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var o=this.getSize()._divideBy(2);return this.project(t,e)._subtract(o)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,o){var a=this._getNewPixelOrigin(o,e);return this.project(t,e)._subtract(a)},_latLngBoundsToNewLayerBounds:function(t,e,o){var a=this._getNewPixelOrigin(o,e);return dt([this.project(t.getSouthWest(),e)._subtract(a),this.project(t.getNorthWest(),e)._subtract(a),this.project(t.getSouthEast(),e)._subtract(a),this.project(t.getNorthEast(),e)._subtract(a)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,o){if(!o)return t;var a=this.project(t,e),c=this.getSize().divideBy(2),f=new Y(a.subtract(c),a.add(c)),_=this._getBoundsOffset(f,o,e);return Math.abs(_.x)<=1&&Math.abs(_.y)<=1?t:this.unproject(a.add(_),e)},_limitOffset:function(t,e){if(!e)return t;var o=this.getPixelBounds(),a=new Y(o.min.add(t),o.max.add(t));return t.add(this._getBoundsOffset(a,e))},_getBoundsOffset:function(t,e,o){var a=dt(this.project(e.getNorthEast(),o),this.project(e.getSouthWest(),o)),c=a.min.subtract(t.min),f=a.max.subtract(t.max),_=this._rebound(c.x,-f.x),v=this._rebound(c.y,-f.y);return new O(_,v)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),o=this.getMaxZoom(),a=C.any3d?this.options.zoomSnap:1;return a&&(t=Math.round(t/a)*a),Math.max(e,Math.min(o,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){X(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var o=this._getCenterOffset(t)._trunc();return(e&&e.animate)!==!0&&!this.getSize().contains(o)?!1:(this.panBy(o,e),!0)},_createAnimProxy:function(){var t=this._proxy=H("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var o=Ai,a=this._proxy.style[o];Rt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),a===this._proxy.style[o]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){K(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Rt(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,o){if(this._animatingZoom)return!0;if(o=o||{},!this._zoomAnimated||o.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var a=this.getZoomScale(e),c=this._getCenterOffset(t)._divideBy(1-1/a);return o.animate!==!0&&!this.getSize().contains(c)?!1:(at(function(){this._moveStart(!0,o.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,o,a){this._mapPane&&(o&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,B(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:a}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(h(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&X(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function qs(t,e){return new Z(t,e)}var Lt=_t.extend({options:{position:"topright"},initialize:function(t){A(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),o=this.getPosition(),a=t._controlCorners[o];return B(e,"leaflet-control"),o.indexOf("bottom")!==-1?a.insertBefore(e,a.firstChild):a.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(K(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),pe=function(t){return new Lt(t)};Z.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",o=this._controlContainer=H("div",e+"control-container",this._container);function a(c,f){var _=e+c+" "+e+f;t[c+f]=H("div",_,o)}a("top","left"),a("top","right"),a("bottom","left"),a("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)K(this._controlCorners[t]);K(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var en=Lt.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,o,a){return o<a?-1:a<o?1:0}},initialize:function(t,e,o){A(this,o),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var a in t)this._addLayer(t[a],a);for(a in e)this._addLayer(e[a],a,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Lt.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(p(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){B(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(B(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):X(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return X(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=H("div",t),o=this.options.collapsed;e.setAttribute("aria-haspopup",!0),fe(e),Ri(e);var a=this._section=H("section",t+"-list");o&&(this._map.on("click",this.collapse,this),z(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var c=this._layersLink=H("a",t+"-toggle",e);c.href="#",c.title="Layers",c.setAttribute("role","button"),z(c,{keydown:function(f){f.keyCode===13&&this._expandSafely()},click:function(f){nt(f),this._expandSafely()}},this),o||this.expand(),this._baseLayersList=H("div",t+"-base",a),this._separator=H("div",t+"-separator",a),this._overlaysList=H("div",t+"-overlays",a),e.appendChild(a)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&p(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,o){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:o}),this.options.sortLayers&&this._layers.sort(h(function(a,c){return this.options.sortFunction(a.layer,c.layer,a.name,c.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Be(this._baseLayersList),Be(this._overlaysList),this._layerControlInputs=[];var t,e,o,a,c=0;for(o=0;o<this._layers.length;o++)a=this._layers[o],this._addItem(a),e=e||a.overlay,t=t||!a.overlay,c+=a.overlay?0:1;return this.options.hideSingleBase&&(t=t&&c>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(p(t.target)),o=e.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;o&&this._map.fire(o,e)},_createRadioElement:function(t,e){var o='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",a=document.createElement("div");return a.innerHTML=o,a.firstChild},_addItem:function(t){var e=document.createElement("label"),o=this._map.hasLayer(t.layer),a;t.overlay?(a=document.createElement("input"),a.type="checkbox",a.className="leaflet-control-layers-selector",a.defaultChecked=o):a=this._createRadioElement("leaflet-base-layers_"+p(this),o),this._layerControlInputs.push(a),a.layerId=p(t.layer),z(a,"click",this._onInputClick,this);var c=document.createElement("span");c.innerHTML=" "+t.name;var f=document.createElement("span");e.appendChild(f),f.appendChild(a),f.appendChild(c);var _=t.overlay?this._overlaysList:this._baseLayersList;return _.appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,e,o,a=[],c=[];this._handlingClick=!0;for(var f=t.length-1;f>=0;f--)e=t[f],o=this._getLayer(e.layerId).layer,e.checked?a.push(o):e.checked||c.push(o);for(f=0;f<c.length;f++)this._map.hasLayer(c[f])&&this._map.removeLayer(c[f]);for(f=0;f<a.length;f++)this._map.hasLayer(a[f])||this._map.addLayer(a[f]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t=this._layerControlInputs,e,o,a=this._map.getZoom(),c=t.length-1;c>=0;c--)e=t[c],o=this._getLayer(e.layerId).layer,e.disabled=o.options.minZoom!==void 0&&a<o.options.minZoom||o.options.maxZoom!==void 0&&a>o.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,z(t,"click",nt),this.expand();var e=this;setTimeout(function(){W(t,"click",nt),e._preventClick=!1})}}),Ys=function(t,e,o){return new en(t,e,o)},Ui=Lt.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",o=H("div",e+" leaflet-bar"),a=this.options;return this._zoomInButton=this._createButton(a.zoomInText,a.zoomInTitle,e+"-in",o,this._zoomIn),this._zoomOutButton=this._createButton(a.zoomOutText,a.zoomOutTitle,e+"-out",o,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),o},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,o,a,c){var f=H("a",o,a);return f.innerHTML=t,f.href="#",f.title=e,f.setAttribute("role","button"),f.setAttribute("aria-label",e),fe(f),z(f,"click",Zt),z(f,"click",c,this),z(f,"click",this._refocusOnMap,this),f},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";X(this._zoomInButton,e),X(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(B(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(B(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});Z.mergeOptions({zoomControl:!0}),Z.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ui,this.addControl(this.zoomControl))});var Ks=function(t){return new Ui(t)},on=Lt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",o=H("div",e),a=this.options;return this._addScales(a,e+"-line",o),t.on(a.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),o},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,o){t.metric&&(this._mScale=H("div",e,o)),t.imperial&&(this._iScale=H("div",e,o))},_update:function(){var t=this._map,e=t.getSize().y/2,o=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(o)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),o=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,o,e/t)},_updateImperial:function(t){var e=t*3.2808399,o,a,c;e>5280?(o=e/5280,a=this._getRoundNum(o),this._updateScale(this._iScale,a+" mi",a/o)):(c=this._getRoundNum(e),this._updateScale(this._iScale,c+" ft",c/e))},_updateScale:function(t,e,o){t.style.width=Math.round(this.options.maxWidth*o)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),o=t/e;return o=o>=10?10:o>=5?5:o>=3?3:o>=2?2:1,e*o}}),Xs=function(t){return new on(t)},Qs='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',Zi=Lt.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(C.inlineSvg?Qs+" ":"")+"Leaflet</a>"},initialize:function(t){A(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=H("div","leaflet-control-attribution"),fe(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var o=[];this.options.prefix&&o.push(this.options.prefix),t.length&&o.push(t.join(", ")),this._container.innerHTML=o.join(' <span aria-hidden="true">|</span> ')}}});Z.mergeOptions({attributionControl:!0}),Z.addInitHook(function(){this.options.attributionControl&&new Zi().addTo(this)});var $s=function(t){return new Zi(t)};Lt.Layers=en,Lt.Zoom=Ui,Lt.Scale=on,Lt.Attribution=Zi,pe.layers=Ys,pe.zoom=Ks,pe.scale=Xs,pe.attribution=$s;var kt=_t.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});kt.addTo=function(t,e){return t.addHandler(e,this),this};var ta={Events:mt},nn=C.touch?"touchstart mousedown":"mousedown",Ot=re.extend({options:{clickTolerance:3},initialize:function(t,e,o,a){A(this,a),this._element=t,this._dragStartTarget=e||t,this._preventOutline=o},enable:function(){this._enabled||(z(this._dragStartTarget,nn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ot._dragging===this&&this.finishDrag(!0),W(this._dragStartTarget,nn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!Mi(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){Ot._dragging===this&&this.finishDrag();return}if(!(Ot._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(Ot._dragging=this,this._preventOutline&&Ii(this._element),Ci(),ce(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t,o=Yo(this._element);this._startPoint=new O(e.clientX,e.clientY),this._startPos=Nt(this._element),this._parentScale=Di(o);var a=t.type==="mousedown";z(document,a?"mousemove":"touchmove",this._onMove,this),z(document,a?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var e=t.touches&&t.touches.length===1?t.touches[0]:t,o=new O(e.clientX,e.clientY)._subtract(this._startPoint);!o.x&&!o.y||Math.abs(o.x)+Math.abs(o.y)<this.options.clickTolerance||(o.x/=this._parentScale.x,o.y/=this._parentScale.y,nt(t),this._moved||(this.fire("dragstart"),this._moved=!0,B(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),B(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(o),this._moving=!0,this._lastEvent=t,this._updatePosition())}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),tt(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){X(document.body,"leaflet-dragging"),this._lastTarget&&(X(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),W(document,"mousemove touchmove",this._onMove,this),W(document,"mouseup touchend touchcancel",this._onUp,this),Pi(),de();var e=this._moved&&this._moving;this._moving=!1,Ot._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function rn(t,e,o){var a,c=[1,4,2,8],f,_,v,b,x,M,S,R;for(f=0,M=t.length;f<M;f++)t[f]._code=Ht(t[f],e);for(v=0;v<4;v++){for(S=c[v],a=[],f=0,M=t.length,_=M-1;f<M;_=f++)b=t[f],x=t[_],b._code&S?x._code&S||(R=He(x,b,S,e,o),R._code=Ht(R,e),a.push(R)):(x._code&S&&(R=He(x,b,S,e,o),R._code=Ht(R,e),a.push(R)),a.push(b));t=a}return t}function sn(t,e){var o,a,c,f,_,v,b,x,M;if(!t||t.length===0)throw new Error("latlngs not passed");vt(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var S=U([0,0]),R=$(t),ht=R.getNorthWest().distanceTo(R.getSouthWest())*R.getNorthEast().distanceTo(R.getNorthWest());ht<1700&&(S=Hi(t));var it=t.length,yt=[];for(o=0;o<it;o++){var ft=U(t[o]);yt.push(e.project(U([ft.lat-S.lat,ft.lng-S.lng])))}for(v=b=x=0,o=0,a=it-1;o<it;a=o++)c=yt[o],f=yt[a],_=c.y*f.x-f.y*c.x,b+=(c.x+f.x)*_,x+=(c.y+f.y)*_,v+=_*3;v===0?M=yt[0]:M=[b/v,x/v];var $t=e.unproject(D(M));return U([$t.lat+S.lat,$t.lng+S.lng])}function Hi(t){for(var e=0,o=0,a=0,c=0;c<t.length;c++){var f=U(t[c]);e+=f.lat,o+=f.lng,a++}return U([e/a,o/a])}var ea={__proto__:null,clipPolygon:rn,polygonCenter:sn,centroid:Hi};function an(t,e){if(!e||!t.length)return t.slice();var o=e*e;return t=na(t,o),t=oa(t,o),t}function ln(t,e,o){return Math.sqrt(me(t,e,o,!0))}function ia(t,e,o){return me(t,e,o)}function oa(t,e){var o=t.length,a=typeof Uint8Array!="undefined"?Uint8Array:Array,c=new a(o);c[0]=c[o-1]=1,Fi(t,c,e,0,o-1);var f,_=[];for(f=0;f<o;f++)c[f]&&_.push(t[f]);return _}function Fi(t,e,o,a,c){var f=0,_,v,b;for(v=a+1;v<=c-1;v++)b=me(t[v],t[a],t[c],!0),b>f&&(_=v,f=b);f>o&&(e[_]=1,Fi(t,e,o,a,_),Fi(t,e,o,_,c))}function na(t,e){for(var o=[t[0]],a=1,c=0,f=t.length;a<f;a++)ra(t[a],t[c])>e&&(o.push(t[a]),c=a);return c<f-1&&o.push(t[f-1]),o}var hn;function cn(t,e,o,a,c){var f=a?hn:Ht(t,o),_=Ht(e,o),v,b,x;for(hn=_;;){if(!(f|_))return[t,e];if(f&_)return!1;v=f||_,b=He(t,e,v,o,c),x=Ht(b,o),v===f?(t=b,f=x):(e=b,_=x)}}function He(t,e,o,a,c){var f=e.x-t.x,_=e.y-t.y,v=a.min,b=a.max,x,M;return o&8?(x=t.x+f*(b.y-t.y)/_,M=b.y):o&4?(x=t.x+f*(v.y-t.y)/_,M=v.y):o&2?(x=b.x,M=t.y+_*(b.x-t.x)/f):o&1&&(x=v.x,M=t.y+_*(v.x-t.x)/f),new O(x,M,c)}function Ht(t,e){var o=0;return t.x<e.min.x?o|=1:t.x>e.max.x&&(o|=2),t.y<e.min.y?o|=4:t.y>e.max.y&&(o|=8),o}function ra(t,e){var o=e.x-t.x,a=e.y-t.y;return o*o+a*a}function me(t,e,o,a){var c=e.x,f=e.y,_=o.x-c,v=o.y-f,b=_*_+v*v,x;return b>0&&(x=((t.x-c)*_+(t.y-f)*v)/b,x>1?(c=o.x,f=o.y):x>0&&(c+=_*x,f+=v*x)),_=t.x-c,v=t.y-f,a?_*_+v*v:new O(c,f)}function vt(t){return!I(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]!="undefined"}function dn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),vt(t)}function un(t,e){var o,a,c,f,_,v,b,x;if(!t||t.length===0)throw new Error("latlngs not passed");vt(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var M=U([0,0]),S=$(t),R=S.getNorthWest().distanceTo(S.getSouthWest())*S.getNorthEast().distanceTo(S.getNorthWest());R<1700&&(M=Hi(t));var ht=t.length,it=[];for(o=0;o<ht;o++){var yt=U(t[o]);it.push(e.project(U([yt.lat-M.lat,yt.lng-M.lng])))}for(o=0,a=0;o<ht-1;o++)a+=it[o].distanceTo(it[o+1])/2;if(a===0)x=it[0];else for(o=0,f=0;o<ht-1;o++)if(_=it[o],v=it[o+1],c=_.distanceTo(v),f+=c,f>a){b=(f-a)/c,x=[v.x-b*(v.x-_.x),v.y-b*(v.y-_.y)];break}var ft=e.unproject(D(x));return U([ft.lat+M.lat,ft.lng+M.lng])}var sa={__proto__:null,simplify:an,pointToSegmentDistance:ln,closestPointOnSegment:ia,clipSegment:cn,_getEdgeIntersection:He,_getBitCode:Ht,_sqClosestPointOnSegment:me,isFlat:vt,_flat:dn,polylineCenter:un},Gi={project:function(t){return new O(t.lng,t.lat)},unproject:function(t){return new V(t.y,t.x)},bounds:new Y([-180,-90],[180,90])},Vi={R:6378137,R_MINOR:6356752314245179e-9,bounds:new Y([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var e=Math.PI/180,o=this.R,a=t.lat*e,c=this.R_MINOR/o,f=Math.sqrt(1-c*c),_=f*Math.sin(a),v=Math.tan(Math.PI/4-a/2)/Math.pow((1-_)/(1+_),f/2);return a=-o*Math.log(Math.max(v,1e-10)),new O(t.lng*e*o,a)},unproject:function(t){for(var e=180/Math.PI,o=this.R,a=this.R_MINOR/o,c=Math.sqrt(1-a*a),f=Math.exp(-t.y/o),_=Math.PI/2-2*Math.atan(f),v=0,b=.1,x;v<15&&Math.abs(b)>1e-7;v++)x=c*Math.sin(_),x=Math.pow((1-x)/(1+x),c/2),b=Math.PI/2-2*Math.atan(f*x)-_,_+=b;return new V(_*e,t.x*e/o)}},aa={__proto__:null,LonLat:Gi,Mercator:Vi,SphericalMercator:_i},la=i({},Dt,{code:"EPSG:3395",projection:Vi,transformation:(function(){var t=.5/(Math.PI*Vi.R);return se(t,.5,-t,.5)})()}),fn=i({},Dt,{code:"EPSG:4326",projection:Gi,transformation:se(1/180,1,-1/180,.5)}),ha=i({},Et,{projection:Gi,transformation:se(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var o=e.lng-t.lng,a=e.lat-t.lat;return Math.sqrt(o*o+a*a)},infinite:!0});Et.Earth=Dt,Et.EPSG3395=la,Et.EPSG3857=vi,Et.EPSG900913=ms,Et.EPSG4326=fn,Et.Simple=ha;var bt=re.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[p(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[p(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var o=this.getEvents();e.on(o,this),this.once("remove",function(){e.off(o,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});Z.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=p(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=p(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return p(t)in this._layers},eachLayer:function(t,e){for(var o in this._layers)t.call(e,this._layers[o]);return this},_addLayers:function(t){t=t?I(t)?t:[t]:[];for(var e=0,o=t.length;e<o;e++)this.addLayer(t[e])},_addZoomLimit:function(t){(!isNaN(t.options.maxZoom)||!isNaN(t.options.minZoom))&&(this._zoomBoundLayers[p(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=p(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,o=this._getZoomSpan();for(var a in this._zoomBoundLayers){var c=this._zoomBoundLayers[a].options;t=c.minZoom===void 0?t:Math.min(t,c.minZoom),e=c.maxZoom===void 0?e:Math.max(e,c.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,o!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var qt=bt.extend({initialize:function(t,e){A(this,e),this._layers={};var o,a;if(t)for(o=0,a=t.length;o<a;o++)this.addLayer(t[o])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){var e=typeof t=="number"?t:this.getLayerId(t);return e in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e=Array.prototype.slice.call(arguments,1),o,a;for(o in this._layers)a=this._layers[o],a[t]&&a[t].apply(a,e);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var o in this._layers)t.call(e,this._layers[o]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return p(t)}}),ca=function(t,e){return new qt(t,e)},Tt=qt.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),qt.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),qt.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new ut;for(var e in this._layers){var o=this._layers[e];t.extend(o.getBounds?o.getBounds():o.getLatLng())}return t}}),da=function(t,e){return new Tt(t,e)},Yt=_t.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){A(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var o=this._getIconUrl(t);if(!o){if(t==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var a=this._createImg(o,e&&e.tagName==="IMG"?e:null);return this._setIconStyles(a,t),(this.options.crossOrigin||this.options.crossOrigin==="")&&(a.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),a},_setIconStyles:function(t,e){var o=this.options,a=o[e+"Size"];typeof a=="number"&&(a=[a,a]);var c=D(a),f=D(e==="shadow"&&o.shadowAnchor||o.iconAnchor||c&&c.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(o.className||""),f&&(t.style.marginLeft=-f.x+"px",t.style.marginTop=-f.y+"px"),c&&(t.style.width=c.x+"px",t.style.height=c.y+"px")},_createImg:function(t,e){return e=e||document.createElement("img"),e.src=t,e},_getIconUrl:function(t){return C.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function ua(t){return new Yt(t)}var _e=Yt.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return typeof _e.imagePath!="string"&&(_e.imagePath=this._detectIconPath()),(this.options.imagePath||_e.imagePath)+Yt.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(o,a,c){var f=a.exec(o);return f&&f[c]};return t=e(t,/^url\((['"])?(.+)\1\)$/,2),t&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=H("div","leaflet-default-icon-path",document.body),e=he(t,"background-image")||he(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e),e)return e;var o=document.querySelector('link[href$="leaflet.css"]');return o?o.href.substring(0,o.href.length-11-1):""}}),pn=kt.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Ot(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),B(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&X(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,o=e._map,a=this._marker.options.autoPanSpeed,c=this._marker.options.autoPanPadding,f=Nt(e._icon),_=o.getPixelBounds(),v=o.getPixelOrigin(),b=dt(_.min._subtract(v).add(c),_.max._subtract(v).subtract(c));if(!b.contains(f)){var x=D((Math.max(b.max.x,f.x)-b.max.x)/(_.max.x-b.max.x)-(Math.min(b.min.x,f.x)-b.min.x)/(_.min.x-b.min.x),(Math.max(b.max.y,f.y)-b.max.y)/(_.max.y-b.max.y)-(Math.min(b.min.y,f.y)-b.min.y)/(_.min.y-b.min.y)).multiplyBy(a);o.panBy(x,{animate:!1}),this._draggable._newPos._add(x),this._draggable._startPos._add(x),tt(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=at(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(lt(this._panRequest),this._panRequest=at(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,o=e._shadow,a=Nt(e._icon),c=e._map.layerPointToLatLng(a);o&&tt(o,a),e._latlng=c,t.latlng=c,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){lt(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Fe=bt.extend({options:{icon:new _e,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){A(this,e),this._latlng=U(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=U(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),o=t.icon.createIcon(this._icon),a=!1;o!==this._icon&&(this._icon&&this._removeIcon(),a=!0,t.title&&(o.title=t.title),o.tagName==="IMG"&&(o.alt=t.alt||"")),B(o,e),t.keyboard&&(o.tabIndex="0",o.setAttribute("role","button")),this._icon=o,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&z(o,"focus",this._panOnFocus,this);var c=t.icon.createShadow(this._shadow),f=!1;c!==this._shadow&&(this._removeShadow(),f=!0),c&&(B(c,e),c.alt=""),this._shadow=c,t.opacity<1&&this._updateOpacity(),a&&this.getPane().appendChild(this._icon),this._initInteraction(),c&&f&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&W(this._icon,"focus",this._panOnFocus,this),K(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&K(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&tt(this._icon,t),this._shadow&&tt(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(B(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),pn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new pn(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&gt(this._icon,t),this._shadow&&gt(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,o=e.iconSize?D(e.iconSize):D(0,0),a=e.iconAnchor?D(e.iconAnchor):D(0,0);t.panInside(this._latlng,{paddingTopLeft:a,paddingBottomRight:o.subtract(a)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function fa(t,e){return new Fe(t,e)}var zt=bt.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return A(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Ge=zt.extend({options:{fill:!0,radius:10},initialize:function(t,e){A(this,e),this._latlng=U(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=U(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return zt.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,o=this._clickTolerance(),a=[t+o,e+o];this._pxBounds=new Y(this._point.subtract(a),this._point.add(a))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function pa(t,e){return new Ge(t,e)}var Wi=Ge.extend({initialize:function(t,e,o){if(typeof e=="number"&&(e=i({},o,{radius:e})),A(this,e),this._latlng=U(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new ut(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:zt.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,o=this._map,a=o.options.crs;if(a.distance===Dt.distance){var c=Math.PI/180,f=this._mRadius/Dt.R/c,_=o.project([e+f,t]),v=o.project([e-f,t]),b=_.add(v).divideBy(2),x=o.unproject(b).lat,M=Math.acos((Math.cos(f*c)-Math.sin(e*c)*Math.sin(x*c))/(Math.cos(e*c)*Math.cos(x*c)))/c;(isNaN(M)||M===0)&&(M=f/Math.cos(Math.PI/180*e)),this._point=b.subtract(o.getPixelOrigin()),this._radius=isNaN(M)?0:b.x-o.project([x,t-M]).x,this._radiusY=b.y-_.y}else{var S=a.unproject(a.project(this._latlng).subtract([this._mRadius,0]));this._point=o.latLngToLayerPoint(this._latlng),this._radius=this._point.x-o.latLngToLayerPoint(S).x}this._updateBounds()}});function ma(t,e,o){return new Wi(t,e,o)}var Ct=zt.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){A(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e=1/0,o=null,a=me,c,f,_=0,v=this._parts.length;_<v;_++)for(var b=this._parts[_],x=1,M=b.length;x<M;x++){c=b[x-1],f=b[x];var S=a(t,c,f,!0);S<e&&(e=S,o=a(t,c,f))}return o&&(o.distance=Math.sqrt(e)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return un(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=U(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new ut,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return vt(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],o=vt(t),a=0,c=t.length;a<c;a++)o?(e[a]=U(t[a]),this._bounds.extend(e[a])):e[a]=this._convertLatLngs(t[a]);return e},_project:function(){var t=new Y;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new O(t,t);this._rawPxBounds&&(this._pxBounds=new Y([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,o){var a=t[0]instanceof V,c=t.length,f,_;if(a){for(_=[],f=0;f<c;f++)_[f]=this._map.latLngToLayerPoint(t[f]),o.extend(_[f]);e.push(_)}else for(f=0;f<c;f++)this._projectLatlngs(t[f],e,o)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}var e=this._parts,o,a,c,f,_,v,b;for(o=0,c=0,f=this._rings.length;o<f;o++)for(b=this._rings[o],a=0,_=b.length;a<_-1;a++)v=cn(b[a],b[a+1],t,a,!0),v&&(e[c]=e[c]||[],e[c].push(v[0]),(v[1]!==b[a+1]||a===_-2)&&(e[c].push(v[1]),c++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,o=0,a=t.length;o<a;o++)t[o]=an(t[o],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var o,a,c,f,_,v,b=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,f=this._parts.length;o<f;o++)for(v=this._parts[o],a=0,_=v.length,c=_-1;a<_;c=a++)if(!(!e&&a===0)&&ln(t,v[c],v[a])<=b)return!0;return!1}});function _a(t,e){return new Ct(t,e)}Ct._flat=dn;var Kt=Ct.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return sn(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=Ct.prototype._convertLatLngs.call(this,t),o=e.length;return o>=2&&e[0]instanceof V&&e[0].equals(e[o-1])&&e.pop(),e},_setLatLngs:function(t){Ct.prototype._setLatLngs.call(this,t),vt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return vt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,o=new O(e,e);if(t=new Y(t.min.subtract(o),t.max.add(o)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var a=0,c=this._rings.length,f;a<c;a++)f=rn(this._rings[a],t,!0),f.length&&this._parts.push(f)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e=!1,o,a,c,f,_,v,b,x;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(f=0,b=this._parts.length;f<b;f++)for(o=this._parts[f],_=0,x=o.length,v=x-1;_<x;v=_++)a=o[_],c=o[v],a.y>t.y!=c.y>t.y&&t.x<(c.x-a.x)*(t.y-a.y)/(c.y-a.y)+a.x&&(e=!e);return e||Ct.prototype._containsPoint.call(this,t,!0)}});function ga(t,e){return new Kt(t,e)}var Pt=Tt.extend({initialize:function(t,e){A(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e=I(t)?t:t.features,o,a,c;if(e){for(o=0,a=e.length;o<a;o++)c=e[o],(c.geometries||c.geometry||c.features||c.coordinates)&&this.addData(c);return this}var f=this.options;if(f.filter&&!f.filter(t))return this;var _=Ve(t,f);return _?(_.feature=je(t),_.defaultOptions=_.options,this.resetStyle(_),f.onEachFeature&&f.onEachFeature(t,_),this.addLayer(_)):this},resetStyle:function(t){return t===void 0?this.eachLayer(this.resetStyle,this):(t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){t.setStyle&&(typeof e=="function"&&(e=e(t.feature)),t.setStyle(e))}});function Ve(t,e){var o=t.type==="Feature"?t.geometry:t,a=o?o.coordinates:null,c=[],f=e&&e.pointToLayer,_=e&&e.coordsToLatLng||Ji,v,b,x,M;if(!a&&!o)return null;switch(o.type){case"Point":return v=_(a),mn(f,t,v,e);case"MultiPoint":for(x=0,M=a.length;x<M;x++)v=_(a[x]),c.push(mn(f,t,v,e));return new Tt(c);case"LineString":case"MultiLineString":return b=We(a,o.type==="LineString"?0:1,_),new Ct(b,e);case"Polygon":case"MultiPolygon":return b=We(a,o.type==="Polygon"?1:2,_),new Kt(b,e);case"GeometryCollection":for(x=0,M=o.geometries.length;x<M;x++){var S=Ve({geometry:o.geometries[x],type:"Feature",properties:t.properties},e);S&&c.push(S)}return new Tt(c);case"FeatureCollection":for(x=0,M=o.features.length;x<M;x++){var R=Ve(o.features[x],e);R&&c.push(R)}return new Tt(c);default:throw new Error("Invalid GeoJSON object.")}}function mn(t,e,o,a){return t?t(e,o):new Fe(o,a&&a.markersInheritOptions&&a)}function Ji(t){return new V(t[1],t[0],t[2])}function We(t,e,o){for(var a=[],c=0,f=t.length,_;c<f;c++)_=e?We(t[c],e-1,o):(o||Ji)(t[c]),a.push(_);return a}function ji(t,e){return t=U(t),t.alt!==void 0?[w(t.lng,e),w(t.lat,e),w(t.alt,e)]:[w(t.lng,e),w(t.lat,e)]}function Je(t,e,o,a){for(var c=[],f=0,_=t.length;f<_;f++)c.push(e?Je(t[f],vt(t[f])?0:e-1,o,a):ji(t[f],a));return!e&&o&&c.length>0&&c.push(c[0].slice()),c}function Xt(t,e){return t.feature?i({},t.feature,{geometry:e}):je(e)}function je(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var qi={toGeoJSON:function(t){return Xt(this,{type:"Point",coordinates:ji(this.getLatLng(),t)})}};Fe.include(qi),Wi.include(qi),Ge.include(qi),Ct.include({toGeoJSON:function(t){var e=!vt(this._latlngs),o=Je(this._latlngs,e?1:0,!1,t);return Xt(this,{type:(e?"Multi":"")+"LineString",coordinates:o})}}),Kt.include({toGeoJSON:function(t){var e=!vt(this._latlngs),o=e&&!vt(this._latlngs[0]),a=Je(this._latlngs,o?2:e?1:0,!0,t);return e||(a=[a]),Xt(this,{type:(o?"Multi":"")+"Polygon",coordinates:a})}}),qt.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(o){e.push(o.toGeoJSON(t).geometry.coordinates)}),Xt(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(e==="MultiPoint")return this.toMultiPoint(t);var o=e==="GeometryCollection",a=[];return this.eachLayer(function(c){if(c.toGeoJSON){var f=c.toGeoJSON(t);if(o)a.push(f.geometry);else{var _=je(f);_.type==="FeatureCollection"?a.push.apply(a,_.features):a.push(_)}}}),o?Xt(this,{geometries:a,type:"GeometryCollection"}):{type:"FeatureCollection",features:a}}});function _n(t,e){return new Pt(t,e)}var va=_n,qe=bt.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,o){this._url=t,this._bounds=$(e),A(this,o)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(B(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){K(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&Jt(this._image),this},bringToBack:function(){return this._map&&jt(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=$(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",e=this._image=t?this._url:H("img");if(B(e,"leaflet-image-layer"),this._zoomAnimated&&B(e,"leaflet-zoom-animated"),this.options.className&&B(e,this.options.className),e.onselectstart=y,e.onmousemove=y,e.onload=h(this.fire,this,"load"),e.onerror=h(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(e.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=e.src;return}e.src=this._url,e.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),o=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Rt(this._image,o,e)},_reset:function(){var t=this._image,e=new Y(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),o=e.getSize();tt(t,e.min),t.style.width=o.x+"px",t.style.height=o.y+"px"},_updateOpacity:function(){gt(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),ya=function(t,e,o){return new qe(t,e,o)},gn=qe.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",e=this._image=t?this._url:H("video");if(B(e,"leaflet-image-layer"),this._zoomAnimated&&B(e,"leaflet-zoom-animated"),this.options.className&&B(e,this.options.className),e.onselectstart=y,e.onmousemove=y,e.onloadeddata=h(this.fire,this,"load"),t){for(var o=e.getElementsByTagName("source"),a=[],c=0;c<o.length;c++)a.push(o[c].src);this._url=o.length>0?a:[e.src];return}I(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var f=0;f<this._url.length;f++){var _=H("source");_.src=this._url[f],e.appendChild(_)}}});function La(t,e,o){return new gn(t,e,o)}var vn=qe.extend({_initImage:function(){var t=this._image=this._url;B(t,"leaflet-image-layer"),this._zoomAnimated&&B(t,"leaflet-zoom-animated"),this.options.className&&B(t,this.options.className),t.onselectstart=y,t.onmousemove=y}});function ba(t,e,o){return new vn(t,e,o)}var At=bt.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof V||I(t))?(this._latlng=U(t),A(this,e)):(A(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return t=arguments.length?t:this._source._map,t.hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&gt(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&gt(this._container,1),this.bringToFront(),this.options.interactive&&(B(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(gt(this._container,0),this._removeTimeout=setTimeout(h(K,void 0,this._container),200)):K(this._container),this.options.interactive&&(X(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=U(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&Jt(this._container),this},bringToBack:function(){return this._map&&jt(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Tt){e=null;var o=this._source._layers;for(var a in o)if(o[a]._map){e=o[a];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else if(e.getBounds)t=e.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof e=="string")t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=D(this.options.offset),o=this._getAnchor();this._zoomAnimated?tt(this._container,t.add(o)):e=e.add(t).add(o);var a=this._containerBottom=-e.y,c=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=a+"px",this._container.style.left=c+"px"}},_getAnchor:function(){return[0,0]}});Z.include({_initOverlay:function(t,e,o,a){var c=e;return c instanceof t||(c=new t(a).setContent(e)),o&&c.setLatLng(o),c}}),bt.include({_initOverlay:function(t,e,o,a){var c=o;return c instanceof t?(A(c,a),c._source=this):(c=e&&!a?e:new t(a,this),c.setContent(o)),c}});var Ye=At.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t=arguments.length?t:this._source._map,!t.hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,At.prototype.openOn.call(this,t)},onAdd:function(t){At.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof zt||this._source.on("preclick",Ut))},onRemove:function(t){At.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof zt||this._source.off("preclick",Ut))},getEvents:function(){var t=At.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=H("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),o=this._wrapper=H("div",t+"-content-wrapper",e);if(this._contentNode=H("div",t+"-content",o),fe(e),Ri(this._contentNode),z(e,"contextmenu",Ut),this._tipContainer=H("div",t+"-tip-container",e),this._tip=H("div",t+"-tip",this._tipContainer),this.options.closeButton){var a=this._closeButton=H("a",t+"-close-button",e);a.setAttribute("role","button"),a.setAttribute("aria-label","Close popup"),a.href="#close",a.innerHTML='<span aria-hidden="true">&#215;</span>',z(a,"click",function(c){nt(c),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var o=t.offsetWidth;o=Math.min(o,this.options.maxWidth),o=Math.max(o,this.options.minWidth),e.width=o+1+"px",e.whiteSpace="",e.height="";var a=t.offsetHeight,c=this.options.maxHeight,f="leaflet-popup-scrolled";c&&a>c?(e.height=c+"px",B(t,f)):X(t,f),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),o=this._getAnchor();tt(this._container,e.add(o))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,e=parseInt(he(this._container,"marginBottom"),10)||0,o=this._container.offsetHeight+e,a=this._containerWidth,c=new O(this._containerLeft,-o-this._containerBottom);c._add(Nt(this._container));var f=t.layerPointToContainerPoint(c),_=D(this.options.autoPanPadding),v=D(this.options.autoPanPaddingTopLeft||_),b=D(this.options.autoPanPaddingBottomRight||_),x=t.getSize(),M=0,S=0;f.x+a+b.x>x.x&&(M=f.x+a-x.x+b.x),f.x-M-v.x<0&&(M=f.x-v.x),f.y+o+b.y>x.y&&(S=f.y+o-x.y+b.y),f.y-S-v.y<0&&(S=f.y-v.y),(M||S)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([M,S]))}},_getAnchor:function(){return D(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),wa=function(t,e){return new Ye(t,e)};Z.mergeOptions({closePopupOnClick:!0}),Z.include({openPopup:function(t,e,o){return this._initOverlay(Ye,t,e,o).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),bt.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Ye,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Tt||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){Zt(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof zt)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=e,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var Ke=At.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){At.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){At.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=At.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",e=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=H("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+p(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,o,a=this._map,c=this._container,f=a.latLngToContainerPoint(a.getCenter()),_=a.layerPointToContainerPoint(t),v=this.options.direction,b=c.offsetWidth,x=c.offsetHeight,M=D(this.options.offset),S=this._getAnchor();v==="top"?(e=b/2,o=x):v==="bottom"?(e=b/2,o=0):v==="center"?(e=b/2,o=x/2):v==="right"?(e=0,o=x/2):v==="left"?(e=b,o=x/2):_.x<f.x?(v="right",e=0,o=x/2):(v="left",e=b+(M.x+S.x)*2,o=x/2),t=t.subtract(D(e,o,!0)).add(M).add(S),X(c,"leaflet-tooltip-right"),X(c,"leaflet-tooltip-left"),X(c,"leaflet-tooltip-top"),X(c,"leaflet-tooltip-bottom"),B(c,"leaflet-tooltip-"+v),tt(c,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&gt(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return D(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),xa=function(t,e){return new Ke(t,e)};Z.include({openTooltip:function(t,e,o){return this._initOverlay(Ke,t,e,o).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),bt.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ke,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(!(!t&&this._tooltipHandlersAdded)){var e=t?"off":"on",o={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?o.add=this._openTooltip:(o.mouseover=this._openTooltip,o.mouseout=this.closeTooltip,o.click=this._openTooltip,this._map?this._addFocusListeners():o.add=this._addFocusListeners),this._tooltip.options.sticky&&(o.mousemove=this._moveTooltip),this[e](o),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Tt||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e=typeof t.getElement=="function"&&t.getElement();e&&(z(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),z(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e=typeof t.getElement=="function"&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",function(){e._openOnceFlag=!1,e._openTooltip(t)});return}this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)}},_moveTooltip:function(t){var e=t.latlng,o,a;this._tooltip.options.sticky&&t.originalEvent&&(o=this._map.mouseEventToContainerPoint(t.originalEvent),a=this._map.containerPointToLayerPoint(o),e=this._map.layerPointToLatLng(a)),this._tooltip.setLatLng(e)}});var yn=Yt.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&t.tagName==="DIV"?t:document.createElement("div"),o=this.options;if(o.html instanceof Element?(Be(e),e.appendChild(o.html)):e.innerHTML=o.html!==!1?o.html:"",o.bgPos){var a=D(o.bgPos);e.style.backgroundPosition=-a.x+"px "+-a.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function ka(t){return new yn(t)}Yt.Default=_e;var ge=bt.extend({options:{tileSize:256,opacity:1,updateWhenIdle:C.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){A(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),K(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Jt(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(jt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=m(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof O?t:new O(t,t)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e=this.getPane().children,o=-t(-1/0,1/0),a=0,c=e.length,f;a<c;a++)f=e[a].style.zIndex,e[a]!==this._container&&f&&(o=t(o,+f));isFinite(o)&&(this.options.zIndex=o+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!C.ielt9){gt(this._container,this.options.opacity);var t=+new Date,e=!1,o=!1;for(var a in this._tiles){var c=this._tiles[a];if(!(!c.current||!c.loaded)){var f=Math.min(1,(t-c.loaded)/200);gt(c.el,f),f<1?e=!0:(c.active?o=!0:this._onOpaqueTile(c),c.active=!0)}}o&&!this._noPrune&&this._pruneTiles(),e&&(lt(this._fadeFrame),this._fadeFrame=at(this._updateOpacity,this))}},_onOpaqueTile:y,_initContainer:function(){this._container||(this._container=H("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(t!==void 0){for(var o in this._levels)o=Number(o),this._levels[o].el.children.length||o===t?(this._levels[o].el.style.zIndex=e-Math.abs(t-o),this._onUpdateLevel(o)):(K(this._levels[o].el),this._removeTilesAtZoom(o),this._onRemoveLevel(o),delete this._levels[o]);var a=this._levels[t],c=this._map;return a||(a=this._levels[t]={},a.el=H("div","leaflet-tile-container leaflet-zoom-animated",this._container),a.el.style.zIndex=e,a.origin=c.project(c.unproject(c.getPixelOrigin()),t).round(),a.zoom=t,this._setZoomTransform(a,c.getCenter(),c.getZoom()),y(a.el.offsetWidth),this._onCreateLevel(a)),this._level=a,a}},_onUpdateLevel:y,_onRemoveLevel:y,_onCreateLevel:y,_pruneTiles:function(){if(this._map){var t,e,o=this._map.getZoom();if(o>this.options.maxZoom||o<this.options.minZoom){this._removeAllTiles();return}for(t in this._tiles)e=this._tiles[t],e.retain=e.current;for(t in this._tiles)if(e=this._tiles[t],e.current&&!e.active){var a=e.coords;this._retainParent(a.x,a.y,a.z,a.z-5)||this._retainChildren(a.x,a.y,a.z,a.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)K(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,o,a){var c=Math.floor(t/2),f=Math.floor(e/2),_=o-1,v=new O(+c,+f);v.z=+_;var b=this._tileCoordsToKey(v),x=this._tiles[b];return x&&x.active?(x.retain=!0,!0):(x&&x.loaded&&(x.retain=!0),_>a?this._retainParent(c,f,_,a):!1)},_retainChildren:function(t,e,o,a){for(var c=2*t;c<2*t+2;c++)for(var f=2*e;f<2*e+2;f++){var _=new O(c,f);_.z=o+1;var v=this._tileCoordsToKey(_),b=this._tiles[v];if(b&&b.active){b.retain=!0;continue}else b&&b.loaded&&(b.retain=!0);o+1<a&&this._retainChildren(c,f,o+1,a)}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return e.minNativeZoom!==void 0&&t<e.minNativeZoom?e.minNativeZoom:e.maxNativeZoom!==void 0&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,o,a){var c=Math.round(e);this.options.maxZoom!==void 0&&c>this.options.maxZoom||this.options.minZoom!==void 0&&c<this.options.minZoom?c=void 0:c=this._clampZoom(c);var f=this.options.updateWhenZooming&&c!==this._tileZoom;(!a||f)&&(this._tileZoom=c,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),c!==void 0&&this._update(t),o||this._pruneTiles(),this._noPrune=!!o),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var o in this._levels)this._setZoomTransform(this._levels[o],t,e)},_setZoomTransform:function(t,e,o){var a=this._map.getZoomScale(o,t.zoom),c=t.origin.multiplyBy(a).subtract(this._map._getNewPixelOrigin(e,o)).round();C.any3d?Rt(t.el,c,a):tt(t.el,c)},_resetGrid:function(){var t=this._map,e=t.options.crs,o=this._tileSize=this.getTileSize(),a=this._tileZoom,c=this._map.getPixelWorldBounds(this._tileZoom);c&&(this._globalTileRange=this._pxBoundsToTileRange(c)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],a).x/o.x),Math.ceil(t.project([0,e.wrapLng[1]],a).x/o.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],a).y/o.x),Math.ceil(t.project([e.wrapLat[1],0],a).y/o.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(t){var e=this._map,o=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),a=e.getZoomScale(o,this._tileZoom),c=e.project(t,this._tileZoom).floor(),f=e.getSize().divideBy(a*2);return new Y(c.subtract(f),c.add(f))},_update:function(t){var e=this._map;if(e){var o=this._clampZoom(e.getZoom());if(t===void 0&&(t=e.getCenter()),this._tileZoom!==void 0){var a=this._getTiledPixelBounds(t),c=this._pxBoundsToTileRange(a),f=c.getCenter(),_=[],v=this.options.keepBuffer,b=new Y(c.getBottomLeft().subtract([v,-v]),c.getTopRight().add([v,-v]));if(!(isFinite(c.min.x)&&isFinite(c.min.y)&&isFinite(c.max.x)&&isFinite(c.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var x in this._tiles){var M=this._tiles[x].coords;(M.z!==this._tileZoom||!b.contains(new O(M.x,M.y)))&&(this._tiles[x].current=!1)}if(Math.abs(o-this._tileZoom)>1){this._setView(t,o);return}for(var S=c.min.y;S<=c.max.y;S++)for(var R=c.min.x;R<=c.max.x;R++){var ht=new O(R,S);if(ht.z=this._tileZoom,!!this._isValidTile(ht)){var it=this._tiles[this._tileCoordsToKey(ht)];it?it.current=!0:_.push(ht)}}if(_.sort(function(ft,$t){return ft.distanceTo(f)-$t.distanceTo(f)}),_.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var yt=document.createDocumentFragment();for(R=0;R<_.length;R++)this._addTile(_[R],yt);this._level.el.appendChild(yt)}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var o=this._globalTileRange;if(!e.wrapLng&&(t.x<o.min.x||t.x>o.max.x)||!e.wrapLat&&(t.y<o.min.y||t.y>o.max.y))return!1}if(!this.options.bounds)return!0;var a=this._tileCoordsToBounds(t);return $(this.options.bounds).overlaps(a)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,o=this.getTileSize(),a=t.scaleBy(o),c=a.add(o),f=e.unproject(a,t.z),_=e.unproject(c,t.z);return[f,_]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),o=new ut(e[0],e[1]);return this.options.noWrap||(o=this._map.wrapLatLngBounds(o)),o},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),o=new O(+e[0],+e[1]);return o.z=+e[2],o},_removeTile:function(t){var e=this._tiles[t];e&&(K(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){B(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=y,t.onmousemove=y,C.ielt9&&this.options.opacity<1&&gt(t,this.options.opacity)},_addTile:function(t,e){var o=this._getTilePos(t),a=this._tileCoordsToKey(t),c=this.createTile(this._wrapCoords(t),h(this._tileReady,this,t));this._initTile(c),this.createTile.length<2&&at(h(this._tileReady,this,t,null,c)),tt(c,o),this._tiles[a]={el:c,coords:t,current:!0},e.appendChild(c),this.fire("tileloadstart",{tile:c,coords:t})},_tileReady:function(t,e,o){e&&this.fire("tileerror",{error:e,tile:o,coords:t});var a=this._tileCoordsToKey(t);o=this._tiles[a],o&&(o.loaded=+new Date,this._map._fadeAnimated?(gt(o.el,0),lt(this._fadeFrame),this._fadeFrame=at(this._updateOpacity,this)):(o.active=!0,this._pruneTiles()),e||(B(o.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:o.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),C.ielt9||!this._map._fadeAnimated?at(this._pruneTiles,this):setTimeout(h(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new O(this._wrapX?g(t.x,this._wrapX):t.x,this._wrapY?g(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new Y(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Aa(t){return new ge(t)}var Qt=ge.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,e=A(this,e),e.detectRetina&&C.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),typeof e.subdomains=="string"&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&e===void 0&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var o=document.createElement("img");return z(o,"load",h(this._tileOnLoad,this,e,o)),z(o,"error",h(this._tileOnError,this,e,o)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(o.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(o.referrerPolicy=this.options.referrerPolicy),o.alt="",o.src=this.getTileUrl(t),o},getTileUrl:function(t){var e={r:C.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var o=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=o),e["-y"]=o}return P(this._url,i(e,this.options))},_tileOnLoad:function(t,e){C.ielt9?setTimeout(h(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,o){var a=this.options.errorTileUrl;a&&e.getAttribute("src")!==a&&(e.src=a),t(o,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,o=this.options.zoomReverse,a=this.options.zoomOffset;return o&&(t=e-t),t+a},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=y,e.onerror=y,!e.complete)){e.src=j;var o=this._tiles[t].coords;K(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:o})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",j),ge.prototype._removeTile.call(this,t)},_tileReady:function(t,e,o){if(!(!this._map||o&&o.getAttribute("src")===j))return ge.prototype._tileReady.call(this,t,e,o)}});function Ln(t,e){return new Qt(t,e)}var bn=Qt.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var o=i({},this.defaultWmsParams);for(var a in e)a in this.options||(o[a]=e[a]);e=A(this,e);var c=e.detectRetina&&C.retina?2:1,f=this.getTileSize();o.width=f.x*c,o.height=f.y*c,this.wmsParams=o},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Qt.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),o=this._crs,a=dt(o.project(e[0]),o.project(e[1])),c=a.min,f=a.max,_=(this._wmsVersion>=1.3&&this._crs===fn?[c.y,c.x,f.y,f.x]:[c.x,c.y,f.x,f.y]).join(","),v=Qt.prototype.getTileUrl.call(this,t);return v+N(this.wmsParams,v,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+_},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});function Ma(t,e){return new bn(t,e)}Qt.WMS=bn,Ln.wms=Ma;var St=bt.extend({options:{padding:.1},initialize:function(t){A(this,t),p(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),B(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var o=this._map.getZoomScale(e,this._zoom),a=this._map.getSize().multiplyBy(.5+this.options.padding),c=this._map.project(this._center,e),f=a.multiplyBy(-o).add(c).subtract(this._map._getNewPixelOrigin(t,e));C.any3d?Rt(this._container,f,o):tt(this._container,f)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),o=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new Y(o,o.add(e.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),wn=St.extend({options:{tolerance:0},getEvents:function(){var t=St.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){St.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");z(t,"mousemove",this._onMouseMove,this),z(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),z(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){lt(this._redrawRequest),delete this._ctx,K(this._container),W(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var e in this._layers)t=this._layers[e],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){St.prototype._update.call(this);var t=this._bounds,e=this._container,o=t.getSize(),a=C.retina?2:1;tt(e,t.min),e.width=a*o.x,e.height=a*o.y,e.style.width=o.x+"px",e.style.height=o.y+"px",C.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){St.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[p(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,o=e.next,a=e.prev;o?o.prev=a:this._drawLast=a,a?a.next=o:this._drawFirst=o,delete t._order,delete this._layers[p(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var e=t.options.dashArray.split(/[, ]+/),o=[],a,c;for(c=0;c<e.length;c++){if(a=Number(e[c]),isNaN(a))return;o.push(a)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||at(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new Y,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var o=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,o.x,o.y),this._ctx.clip()}this._drawing=!0;for(var a=this._drawFirst;a;a=a.next)t=a.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var o,a,c,f,_=t._parts,v=_.length,b=this._ctx;if(v){for(b.beginPath(),o=0;o<v;o++){for(a=0,c=_[o].length;a<c;a++)f=_[o][a],b[a?"lineTo":"moveTo"](f.x,f.y);e&&b.closePath()}this._fillStroke(b,t)}}},_updateCircle:function(t){if(!(!this._drawing||t._empty())){var e=t._point,o=this._ctx,a=Math.max(Math.round(t._radius),1),c=(Math.max(Math.round(t._radiusY),1)||a)/a;c!==1&&(o.save(),o.scale(1,c)),o.beginPath(),o.arc(e.x,e.y/c,a,0,Math.PI*2,!1),c!==1&&o.restore(),this._fillStroke(o,t)}},_fillStroke:function(t,e){var o=e.options;o.fill&&(t.globalAlpha=o.fillOpacity,t.fillStyle=o.fillColor||o.color,t.fill(o.fillRule||"evenodd")),o.stroke&&o.weight!==0&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=o.opacity,t.lineWidth=o.weight,t.strokeStyle=o.color,t.lineCap=o.lineCap,t.lineJoin=o.lineJoin,t.stroke())},_onClick:function(t){for(var e=this._map.mouseEventToLayerPoint(t),o,a,c=this._drawFirst;c;c=c.next)o=c.layer,o.options.interactive&&o._containsPoint(e)&&(!(t.type==="click"||t.type==="preclick")||!this._map._draggableMoved(o))&&(a=o);this._fireEvent(a?[a]:!1,t)},_onMouseMove:function(t){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(X(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var o,a,c=this._drawFirst;c;c=c.next)o=c.layer,o.options.interactive&&o._containsPoint(e)&&(a=o);a!==this._hoveredLayer&&(this._handleMouseOut(t),a&&(B(this._container,"leaflet-interactive"),this._fireEvent([a],t,"mouseover"),this._hoveredLayer=a)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,t),this._mouseHoverThrottled=!0,setTimeout(h(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,e,o){this._map._fireDOMEvent(e,o||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var o=e.next,a=e.prev;if(o)o.prev=a;else return;a?a.next=o:o&&(this._drawFirst=o),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t)}},_bringToBack:function(t){var e=t._order;if(e){var o=e.next,a=e.prev;if(a)a.next=o;else return;o?o.prev=a:a&&(this._drawLast=a),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t)}}});function xn(t){return C.canvas?new wn(t):null}var ve=(function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),Ea={_initContainer:function(){this._container=H("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(St.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=ve("shape");B(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=ve("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[p(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;K(e),t.removeInteractiveTarget(e),delete this._layers[p(t)]},_updateStyle:function(t){var e=t._stroke,o=t._fill,a=t.options,c=t._container;c.stroked=!!a.stroke,c.filled=!!a.fill,a.stroke?(e||(e=t._stroke=ve("stroke")),c.appendChild(e),e.weight=a.weight+"px",e.color=a.color,e.opacity=a.opacity,a.dashArray?e.dashStyle=I(a.dashArray)?a.dashArray.join(" "):a.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=a.lineCap.replace("butt","flat"),e.joinstyle=a.lineJoin):e&&(c.removeChild(e),t._stroke=null),a.fill?(o||(o=t._fill=ve("fill")),c.appendChild(o),o.color=a.fillColor||a.color,o.opacity=a.fillOpacity):o&&(c.removeChild(o),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),o=Math.round(t._radius),a=Math.round(t._radiusY||o);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+o+","+a+" 0,"+65535*360)},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){Jt(t._container)},_bringToBack:function(t){jt(t._container)}},Xe=C.vml?ve:Mo,ye=St.extend({_initContainer:function(){this._container=Xe("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Xe("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){K(this._container),W(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){St.prototype._update.call(this);var t=this._bounds,e=t.getSize(),o=this._container;(!this._svgSize||!this._svgSize.equals(e))&&(this._svgSize=e,o.setAttribute("width",e.x),o.setAttribute("height",e.y)),tt(o,t.min),o.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Xe("path");t.options.className&&B(e,t.options.className),t.options.interactive&&B(e,"leaflet-interactive"),this._updateStyle(t),this._layers[p(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){K(t._path),t.removeInteractiveTarget(t._path),delete this._layers[p(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,o=t.options;e&&(o.stroke?(e.setAttribute("stroke",o.color),e.setAttribute("stroke-opacity",o.opacity),e.setAttribute("stroke-width",o.weight),e.setAttribute("stroke-linecap",o.lineCap),e.setAttribute("stroke-linejoin",o.lineJoin),o.dashArray?e.setAttribute("stroke-dasharray",o.dashArray):e.removeAttribute("stroke-dasharray"),o.dashOffset?e.setAttribute("stroke-dashoffset",o.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),o.fill?(e.setAttribute("fill",o.fillColor||o.color),e.setAttribute("fill-opacity",o.fillOpacity),e.setAttribute("fill-rule",o.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,Eo(t._parts,e))},_updateCircle:function(t){var e=t._point,o=Math.max(Math.round(t._radius),1),a=Math.max(Math.round(t._radiusY),1)||o,c="a"+o+","+a+" 0 1,0 ",f=t._empty()?"M0 0":"M"+(e.x-o)+","+e.y+c+o*2+",0 "+c+-o*2+",0 ";this._setPath(t,f)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){Jt(t._path)},_bringToBack:function(t){jt(t._path)}});C.vml&&ye.include(Ea);function kn(t){return C.svg||C.vml?new ye(t):null}Z.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var e=this._paneRenderers[t];return e===void 0&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&xn(t)||kn(t)}});var An=Kt.extend({initialize:function(t,e){Kt.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=$(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Ta(t,e){return new An(t,e)}ye.create=Xe,ye.pointsToPath=Eo,Pt.geometryToLayer=Ve,Pt.coordsToLatLng=Ji,Pt.coordsToLatLngs=We,Pt.latLngToCoords=ji,Pt.latLngsToCoords=Je,Pt.getFeature=Xt,Pt.asFeature=je,Z.mergeOptions({boxZoom:!0});var Mn=kt.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){z(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){W(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){K(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),ce(),Ci(),this._startPoint=this._map.mouseEventToContainerPoint(t),z(document,{contextmenu:Zt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=H("div","leaflet-zoom-box",this._container),B(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new Y(this._point,this._startPoint),o=e.getSize();tt(this._box,e.min),this._box.style.width=o.x+"px",this._box.style.height=o.y+"px"},_finish:function(){this._moved&&(K(this._box),X(this._container,"leaflet-crosshair")),de(),Pi(),W(document,{contextmenu:Zt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(h(this._resetState,this),0);var e=new ut(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Z.addInitHook("addHandler","boxZoom",Mn),Z.mergeOptions({doubleClickZoom:!0});var En=kt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,o=e.getZoom(),a=e.options.zoomDelta,c=t.originalEvent.shiftKey?o-a:o+a;e.options.doubleClickZoom==="center"?e.setZoom(c):e.setZoomAround(t.containerPoint,c)}});Z.addInitHook("addHandler","doubleClickZoom",En),Z.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Tn=kt.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Ot(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}B(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){X(this._map._container,"leaflet-grab"),X(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=$(this._map.options.maxBounds);this._offsetLimit=dt(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,o=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(o),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),o=this._initialWorldOffset,a=this._draggable._newPos.x,c=(a-e+o)%t+e-o,f=(a+e+o)%t-e-o,_=Math.abs(c+o)<Math.abs(f+o)?c:f;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=_},_onDragEnd:function(t){var e=this._map,o=e.options,a=!o.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),a)e.fire("moveend");else{this._prunePositions(+new Date);var c=this._lastPos.subtract(this._positions[0]),f=(this._lastTime-this._times[0])/1e3,_=o.easeLinearity,v=c.multiplyBy(_/f),b=v.distanceTo([0,0]),x=Math.min(o.inertiaMaxSpeed,b),M=v.multiplyBy(x/b),S=x/(o.inertiaDeceleration*_),R=M.multiplyBy(-S/2).round();!R.x&&!R.y?e.fire("moveend"):(R=e._limitOffset(R,e.options.maxBounds),at(function(){e.panBy(R,{duration:S,easeLinearity:_,noMoveStart:!0,animate:!0})}))}}});Z.addInitHook("addHandler","dragging",Tn),Z.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Cn=kt.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),z(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),W(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,o=t.scrollTop||e.scrollTop,a=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(a,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e=this._panKeys={},o=this.keyCodes,a,c;for(a=0,c=o.left.length;a<c;a++)e[o.left[a]]=[-1*t,0];for(a=0,c=o.right.length;a<c;a++)e[o.right[a]]=[t,0];for(a=0,c=o.down.length;a<c;a++)e[o.down[a]]=[0,t];for(a=0,c=o.up.length;a<c;a++)e[o.up[a]]=[0,-1*t]},_setZoomDelta:function(t){var e=this._zoomKeys={},o=this.keyCodes,a,c;for(a=0,c=o.zoomIn.length;a<c;a++)e[o.zoomIn[a]]=t;for(a=0,c=o.zoomOut.length;a<c;a++)e[o.zoomOut[a]]=-t},_addHooks:function(){z(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){W(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=t.keyCode,o=this._map,a;if(e in this._panKeys){if(!o._panAnim||!o._panAnim._inProgress)if(a=this._panKeys[e],t.shiftKey&&(a=D(a).multiplyBy(3)),o.options.maxBounds&&(a=o._limitOffset(D(a),o.options.maxBounds)),o.options.worldCopyJump){var c=o.wrapLatLng(o.unproject(o.project(o.getCenter()).add(a)));o.panTo(c)}else o.panBy(a)}else if(e in this._zoomKeys)o.setZoom(o.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else if(e===27&&o._popup&&o._popup.options.closeOnEscapeKey)o.closePopup();else return;Zt(t)}}});Z.addInitHook("addHandler","keyboard",Cn),Z.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Pn=kt.extend({addHooks:function(){z(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){W(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=$o(t),o=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var a=Math.max(o-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(h(this._performZoom,this),a),Zt(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),o=this._map.options.zoomSnap||0;t._stop();var a=this._delta/(this._map.options.wheelPxPerZoomLevel*4),c=4*Math.log(2/(1+Math.exp(-Math.abs(a))))/Math.LN2,f=o?Math.ceil(c/o)*o:c,_=t._limitZoom(e+(this._delta>0?f:-f))-e;this._delta=0,this._startTime=null,_&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+_):t.setZoomAround(this._lastMousePos,e+_))}});Z.addInitHook("addHandler","scrollWheelZoom",Pn);var Ca=600;Z.mergeOptions({tapHold:C.touchNative&&C.safari&&C.mobile,tapTolerance:15});var Sn=kt.extend({addHooks:function(){z(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){W(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var e=t.touches[0];this._startPos=this._newPos=new O(e.clientX,e.clientY),this._holdTimeout=setTimeout(h(function(){this._cancel(),this._isTapValid()&&(z(document,"touchend",nt),z(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),Ca),z(document,"touchend touchcancel contextmenu",this._cancel,this),z(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){W(document,"touchend",nt),W(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),W(document,"touchend touchcancel contextmenu",this._cancel,this),W(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new O(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var o=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});o._simulated=!0,e.target.dispatchEvent(o)}});Z.addInitHook("addHandler","tapHold",Sn),Z.mergeOptions({touchZoom:C.touch,bounceAtZoomLimits:!0});var In=kt.extend({addHooks:function(){B(this._map._container,"leaflet-touch-zoom"),z(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){X(this._map._container,"leaflet-touch-zoom"),W(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(!(!t.touches||t.touches.length!==2||e._animatingZoom||this._zooming)){var o=e.mouseEventToContainerPoint(t.touches[0]),a=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),e.options.touchZoom!=="center"&&(this._pinchStartLatLng=e.containerPointToLatLng(o.add(a)._divideBy(2))),this._startDist=o.distanceTo(a),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),z(document,"touchmove",this._onTouchMove,this),z(document,"touchend touchcancel",this._onTouchEnd,this),nt(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var e=this._map,o=e.mouseEventToContainerPoint(t.touches[0]),a=e.mouseEventToContainerPoint(t.touches[1]),c=o.distanceTo(a)/this._startDist;if(this._zoom=e.getScaleZoom(c,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&c<1||this._zoom>e.getMaxZoom()&&c>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,c===1)return}else{var f=o._add(a)._divideBy(2)._subtract(this._centerPoint);if(c===1&&f.x===0&&f.y===0)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(f),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),lt(this._animRequest);var _=h(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=at(_,this,!0),nt(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,lt(this._animRequest),W(document,"touchmove",this._onTouchMove,this),W(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Z.addInitHook("addHandler","touchZoom",In),Z.BoxZoom=Mn,Z.DoubleClickZoom=En,Z.Drag=Tn,Z.Keyboard=Cn,Z.ScrollWheelZoom=Pn,Z.TapHold=Sn,Z.TouchZoom=In,n.Bounds=Y,n.Browser=C,n.CRS=Et,n.Canvas=wn,n.Circle=Wi,n.CircleMarker=Ge,n.Class=_t,n.Control=Lt,n.DivIcon=yn,n.DivOverlay=At,n.DomEvent=js,n.DomUtil=Ws,n.Draggable=Ot,n.Evented=re,n.FeatureGroup=Tt,n.GeoJSON=Pt,n.GridLayer=ge,n.Handler=kt,n.Icon=Yt,n.ImageOverlay=qe,n.LatLng=V,n.LatLngBounds=ut,n.Layer=bt,n.LayerGroup=qt,n.LineUtil=sa,n.Map=Z,n.Marker=Fe,n.Mixin=ta,n.Path=zt,n.Point=O,n.PolyUtil=ea,n.Polygon=Kt,n.Polyline=Ct,n.Popup=Ye,n.PosAnimation=tn,n.Projection=aa,n.Rectangle=An,n.Renderer=St,n.SVG=ye,n.SVGOverlay=vn,n.TileLayer=Qt,n.Tooltip=Ke,n.Transformation=gi,n.Util=De,n.VideoOverlay=gn,n.bind=h,n.bounds=dt,n.canvas=xn,n.circle=ma,n.circleMarker=pa,n.control=pe,n.divIcon=ka,n.extend=i,n.featureGroup=da,n.geoJSON=_n,n.geoJson=va,n.gridLayer=Aa,n.icon=ua,n.imageOverlay=ya,n.latLng=U,n.latLngBounds=$,n.layerGroup=ca,n.map=qs,n.marker=fa,n.point=D,n.polygon=ga,n.polyline=_a,n.popup=wa,n.rectangle=Ta,n.setOptions=A,n.stamp=p,n.svg=kn,n.svgOverlay=ba,n.tileLayer=Ln,n.tooltip=xa,n.transformation=se,n.version=l,n.videoOverlay=La;var Pa=window.L;n.noConflict=function(){return window.L=Pa,this},window.L=n}))})(te,te.exports)),te.exports}var Q=Qi();const we=pt({__proto__:null,default:Nn(Q)},[Q]),Zn='.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}',Hn=`.leaflet-draw-section{position:relative}.leaflet-draw-toolbar{margin-top:12px}.leaflet-draw-toolbar-top{margin-top:0}.leaflet-draw-toolbar-notop a:first-child{border-top-right-radius:0}.leaflet-draw-toolbar-nobottom a:last-child{border-bottom-right-radius:0}.leaflet-draw-toolbar a{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAAeCAYAAACWuCNnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAG7AAABuwBHnU4NQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAbvSURBVHic7dtdbBxXFQfw/9nZ3SRKwAP7UFFUQOoHqGnUoEAoNghX9tyxVcpD1X0J+WgiUQmpfUB5ACSgG1qJIKASqBIUIauqAbWseIlqb+bOWHVR6y0FKZBEqdIUQROIREGRx3FFvR/38ODZst3a3nE8Ywfv+T2t7hzdM3fle/bOnWtACCGEEEIIIYQQQgghhBBCCCGEEEIIIcRa0EbfgBDdFItFKwzDAa3175LuWylVAvBIR/MxrXUp6Vxx9dp4VyObVEdKKW591lonXgiVUg6AHzPzk9ls9meVSmUh6RzXkz179uQKhcIgM+8CACI6U6vVnp+enm6knXt4ePiuTCbzWQAwxlSDIHg57ZwroDAMnwKwz3XdBzzPG08hxzsTNprQG2lTjtd13WFmfghAP4A+AJcATFiW9YNKpfL3uP0kUliiX4SG1pqUUpx0wXJd9/PMXAGwPWq6yMyPz8/P/7xarf4nyVwt7QV4JWkU52i8YwBu6bh0wRhzJAiCF5POCQCDg4N2Pp//NYDRjkuTxph9QRCESeYrFov5ubm5R5n5AIAPtV1aYOb7BgYGTpZKJeO67lFmPsbM9/i+/8Ja8y6zylhOYquPXhsvAJRKpczMzMwTAIaJ6LFGo+HNzs5eKRQKNxPRAWb+CoAjWuvn4vS35skWFasxAAdbbUlOYqVUPwAPwI4lLr8J4KeWZT1eqVTmksoZ5d2QghUVKx/AlmVCFph5yPf9l5LMCwBKqUksFqszRHQcAJj5GwB2MfOE7/tfTDKf4zjHiejrAE4CuNhqZ+bf2rY9FYbhGBH92/O8o47j3Oj7/uUk86+3XhsvACilHmPmgW3btn3pxIkTVzuvj4yMfNoY85wxZiQIglPd+lvTZIuq5xiAQwCe6evr218ul5tr6bNd9GiiAbyvS+hFrfVHk8oLbEzBih4Dz+G9K6t3IaLXFhYWdib5eBh911UA8wBu1lq/CQBDQ0M3WJb1OoAdRPQZz/NeSSqnUuofAKpa6/vb26MfwacA7AdwFcCdWuu/JpU3yl1C91VHoquNXhvvyMjIx4wxr1iWtbNSqfxruTjHcR4AcMj3/bu79XnNe1hpFyvHcXYT0QS6FysASHR1tVEKhcIguhQrAGDm23K53BcATCWV27KsAWYGgPOtYgUAU1NT/1RKnQewxxjzOQCJFSwANwI4297QtmLfD+AtZr43m83OJ5iz3bGU+l1OT43XGFNk5mdXKlYAYNv2eBiG31dK3aS1vrRSbOZabqRYLFppFisAIKJxAB+MGf56krk30O64gZlMJnZsHMxsoo8fHxoauqHVHn3+BAAQUaxV57Xq2F54i5nvIaJXm81mYoX5etID491JRH/sFlQul5tEdMoYc3u32FUXrLYvObViBQDM/MQqwi8knX8jEJHpHrXIGJNo8WDm1spph2VZgeu6+5RSX7YsK8D/Xnb8Psmcnebm5h7G4uS9ysxutOH8VQC70sy7UTb7eImImTnWlgkzUyaT6fr3v6qC1fGL8EytVjuQRrECANu2fwHg1TixzPyXNO5hvTHz6VWE/znJ3L7vzxBRa9PzDmb+FYBfArgjajvd39+f9vGGKwACZh5te6mwmc8KburxMvO5TCbzqW5xxWLRArDbsqyu8z32HtZSxSrNM0Hlcrnpum6JmZ+NEb4pHglrtdrz+Xz+AoBbu4Ser9fra37d3YEBfBvAkq+XmfmbpVIp9grwWnie9zSAp9PMcT3Z7OPNZrO/aTQaf1BKfbd9X7RTGIaHmPlcnPNYsVZYSikOw7AB4CAzj/f19e1fjwOMnueVEeMxJJfLbYqCNT093TDGHAGw0qHYBQBH0vj+Pc+bYOb3HFRk5nHf9yeTzgfgMhF9uEvMTQD+71/vR3pqvJOTk28AeBJAeXR09P1LxbiuuxfA9wB8LU6fsVdYrUOhtm0fTusxcAlMRN+KziUt5SqAM3v37r00OZnGfFp/QRC86DjOUCaTGWPm2zoun8fiIbuZtPLX6/UH8/n8rQDuippertfrD6aRKyqOR5VS81ji8Z+IbmfmgwB+mEb+9dZr4wWA/v7+R6rV6k+azeYpx3EezeVyJ7dv335lfn7+lkajcZCZDzPzYd/3/xSnv9gFq3UuaR2LFQDA87xAKVUB8BEAZ6N9nrNEdEZr/TcArLVOPG8aJ9jj8n3/pcHBwZ1btmx5519zmPl0vV5/Ie2V7fT09Nujo6Nus9kcA4CtW7ce1lq/nUYu27a/Mzs7CyI6gMVX/u/CzJeZ+Ue2bcc9pb1aXc8lJZms18YLANE2wkOu694N4OFGo3E8DMMPAHiDiCaY+ZOb4YCsEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhEjYfwGO+b5dFNs4OgAAAABJRU5ErkJggg==);background-image:linear-gradient(transparent,transparent),url("data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20xmlns:dc='http://purl.org/dc/elements/1.1/'%20xmlns:cc='http://creativecommons.org/ns%23'%20xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23'%20xmlns:svg='http://www.w3.org/2000/svg'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'%20xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'%20viewBox='0%200%20600%2060'%20height='60'%20width='600'%20id='svg4225'%20version='1.1'%20inkscape:version='0.91%20r13725'%20sodipodi:docname='spritesheet.svg'%20inkscape:export-filename='/home/fpuga/development/upstream/icarto.Leaflet.draw/src/images/spritesheet-2x.png'%20inkscape:export-xdpi='90'%20inkscape:export-ydpi='90'%3e%3cmetadata%20id='metadata4258'%3e%3crdf:RDF%3e%3ccc:Work%20rdf:about=''%3e%3cdc:format%3eimage/svg+xml%3c/dc:format%3e%3cdc:type%20rdf:resource='http://purl.org/dc/dcmitype/StillImage'%20/%3e%3cdc:title%20/%3e%3c/cc:Work%3e%3c/rdf:RDF%3e%3c/metadata%3e%3cdefs%20id='defs4256'%20/%3e%3csodipodi:namedview%20pagecolor='%23ffffff'%20bordercolor='%23666666'%20borderopacity='1'%20objecttolerance='10'%20gridtolerance='10'%20guidetolerance='10'%20inkscape:pageopacity='0'%20inkscape:pageshadow='2'%20inkscape:window-width='1920'%20inkscape:window-height='1056'%20id='namedview4254'%20showgrid='false'%20inkscape:zoom='1.3101852'%20inkscape:cx='237.56928'%20inkscape:cy='7.2419621'%20inkscape:window-x='1920'%20inkscape:window-y='24'%20inkscape:window-maximized='1'%20inkscape:current-layer='svg4225'%20/%3e%3cg%20id='enabled'%20style='fill:%23464646;fill-opacity:1'%3e%3cg%20id='polyline'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%2018,36%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4229'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2036,18%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4231'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2023.142,39.145%20-2.285,-2.29%2016,-15.998%202.285,2.285%20z'%20id='path4233'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cpath%20id='polygon'%20d='M%20100,24.565%2097.904,39.395%2083.07,42%2076,28.773%2086.463,18%20Z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='rectangle'%20d='m%20140,20%2020,0%200,20%20-20,0%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='circle'%20d='m%20221,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='marker'%20d='m%20270,19%20c%20-4.971,0%20-9,4.029%20-9,9%200,4.971%205.001,12%209,14%204.001,-2%209,-9.029%209,-14%200,-4.971%20-4.029,-9%20-9,-9%20z%20m%200,12.5%20c%20-2.484,0%20-4.5,-2.014%20-4.5,-4.5%200,-2.484%202.016,-4.5%204.5,-4.5%202.485,0%204.5,2.016%204.5,4.5%200,2.486%20-2.015,4.5%20-4.5,4.5%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cg%20id='edit'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20337,30.156%200,0.407%200,5.604%20c%200,1.658%20-1.344,3%20-3,3%20l%20-10,0%20c%20-1.655,0%20-3,-1.342%20-3,-3%20l%200,-10%20c%200,-1.657%201.345,-3%203,-3%20l%206.345,0%203.19,-3.17%20-9.535,0%20c%20-3.313,0%20-6,2.687%20-6,6%20l%200,10%20c%200,3.313%202.687,6%206,6%20l%2010,0%20c%203.314,0%206,-2.687%206,-6%20l%200,-8.809%20-3,2.968'%20id='path4240'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.72,24.637%20-8.892,8.892%20-2.828,0%200,-2.829%208.89,-8.89%20z'%20id='path4242'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.697,17.826%204,0%200,4%20-4,0%20z'%20transform='matrix(-0.70698336,-0.70723018,0.70723018,-0.70698336,567.55917,274.78273)'%20id='path4244'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cg%20id='remove'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20381,42%2018,0%200,-18%20-18,0%200,18%20z%20m%2014,-16%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z'%20id='path4247'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20395,20%200,-4%20-10,0%200,4%20-6,0%200,2%2022,0%200,-2%20-6,0%20z%20m%20-2,0%20-6,0%200,-2%206,0%200,2%20z'%20id='path4249'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3c/g%3e%3cg%20id='disabled'%20transform='translate(120,0)'%20style='fill:%23bbbbbb'%3e%3cuse%20xlink:href='%23edit'%20id='edit-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3cuse%20xlink:href='%23remove'%20id='remove-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3c/g%3e%3cpath%20style='fill:none;stroke:%23464646;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1'%20id='circle-3'%20d='m%20581.65725,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20/%3e%3c/svg%3e");background-repeat:no-repeat;background-size:300px 30px;background-clip:padding-box}.leaflet-retina .leaflet-draw-toolbar a{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAA8CAYAAAC6nMS5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAA16SURBVHic7d1/jBxneQfw7zNzvotdn+9sVQkxoRKoammBqqpbk6uT5mLfvHPn42yn1VFRVCEhoFH5IYpoSaUCKi1NcGkcfrbCVRFKEwG2aHLn83pmLvY2CTqT1AmCOBE0EOT4B0nBPw/snb2dp3/sLr6s77i923dud/a+H8ny7tzMo8f3eud99p133gGIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiFYGaXYCRETUPMYYrWe/MAzZX2QQ27d5OpqdABFROxgZGVlz5cqVrzuOc18QBJPNzofsYvvSYrVcgTVftZ2l6npgYODXHMc5oKoHHcfZHQTB2WbnRETpGRkZWVMoFA6IyO2qutX3/R1Z64TnO8fWOwLSzti+mSKDg4M3l0qlnSJyG4CbAFwP4ByAlwE8paoPX3fddcH4+PjP00yk5QqsrDPGvAZAHsBrReRNqvpeY8x/iMg9QRCcaXJ6ZIHv+xtUdReAHQBej/IHGABOAnhORMY6OjoempiYONe0JC3zPM84jjOqqrfi6r/3RQCPAdgXhmHUvOyaa3R01L1w4cJBALdVNq1W1THP87woir7ZzNyocWzf7PA8b4uI7E6S5A9Frqknb6j8eZOIvKNQKPzU9/1/dhznvlwuV0gjn5YbFapW09Vqu/Z9K9u2bdsNruvmUe50axUAfMV13X/I5XInlzcze2x/28lCu1b19fWt7u7u/hCAvwGwboHdL6jq7unp6T1TU1OXlyG9VAwODv5mkiR7Ady6wK6Plkqldz/yyCPfX468bBkaGuqamZm5E8DbReQNANYscMiLIrI1CILnZ280xrwHwL+hck4VkacBDLTS6HVaIxWt/Blm+zauldu3atOmTas2bNjwWRG5s7LplKp+VUQOuq77/bVr17589uzZ9SKy0XGcAVUdFZE/qOx7zHXdXWn0yy31i6sMw/4MyF6BZYy5XlWPiMhvL7BrrKpfcxznE7Uf4ixYqQWW53kbATw060NZr28nSbJzcnLyRBp5pcnzvNtE5CEAvXUecg7ArjAMH00xLWuGhoZuKpVKEwB+p85DXnRd9/ZcLvcDAOjv778un88XAChwtRMWkW+jxTpfYOV1wGxfO1q1fav6+vpWr1u3blxVtwH4uar+/fT09OcW+mJrjBkBcC+AXwdwBoAJw/AZm7m1zC+uUlyNA9g6189buZH7+/t/tbOz8wiANy7isKKqftV13U8eOnToe2nlZttKLLAqJ+qjAF69xBAnZ2Zmbj58+PApm3mlqTJydRTXFldHAUxVXvcBuLnm5+dU9c1RFP1v2jk2YmhoqKtUKj2B+jvfE0mS3D45OflD4OqcHADPh2H4F6h0wp7nva1YLOby+fz5dDKnerB9Vwzxff8BVX0bgFMAdoZheKzeg4eHh9cXi8WvAfAAvOC67ptzudz/WUvOVqBGVO7OmBCR/vn2adWOuL+/v7ezs3MSwKYlhkgAHBSRjwdB8JTF1FKx0gqsymXBxwH8XoOh/ieO41vz+fwVG3mlzRjzKF55WfA8gD8LwzA3ez/P87aLyIMAeqrbVDUfRdHty5Pp0hhjPgDgM9X3qnq/iNwPYM5RCdd1T1RPvLM63+q/ce/sTpiaj+27Mvi+f6eq/iuAi67r9uVyuWcXG6NSjB8B0KeqE1EUvcVWfk3v3OYZuXosjuPt+Xx+ull51WNgYKBHRKIlXDaaS6Kq+6Mo+lMLsVKz0gosz/M+KiKfsBTub8MwvMdSrNQYYzwAYc3m7bXFVZXv+8OqemD2NlUdiKLokbRybJQx5lsANlfefi4Mww/UedyvADgI4I9mbxeRDwdB8C92s0yHrc9wK3922b6Na+X2BYD+/v61nZ2dz6M8cX00DMP9S421ffv2V83MzDwHoNfmucuxEWSpslxcjYyMrHEcZ8xScQUAjoj8vqVYZIHv+xtE5MMWQ941PDy83mK8VIjIW2s2HZ2vuAKAIAgmADyxQIxWM3uu5J56DhgZGVkDYBw1nS+ApwB82VJeZAfbt82tWrXqPSgXV481UlwBwMGDB3+sqncDgIh81EZ+QBMLrKwXV5Uh5NoPYqMyN+m9nanqHVj4bsHF6InjeKfFeKmoLMUw+/2Ct6KLyOM1m2x/NmxbW30RhuGPFtp5jstGVU+JiNdqE57rEYahzB6lWOz7Fsf2be/2hYj8SeXlvTbiFYvFLwK4DOAWY8z1NmI2pcDKcnE1OjraWSgU9uPaD2LDRKSlJwavQCO2A4rIDtsxU7BxsQeoau2Jeak3BDTDL72kUm/n63neaFoJUkPYvm3G9/0NKN9gc7mrq6t2OsOSVGqPSQCuiAzaiLnsBVaWiysAuHDhwn4AQ2nEVtUfpBGXluwNKcRcaBmPVpDMfiMiW+o4pnafZM69MmYxnW9lsj9lCNs3m1T1tSjXL89aXo39WCX+62wEW9YCK+vFVcXLKcbmJcLW8qoUYmZhZOfFmvc3e563fb6djTFvwdUJxfPFyJx6O1/f999a6Xz5ZIwMYftm2o2Vv60+HUVETldeLnoUfy7LVmC1SXEFVf0YgFSeX5QkCQus9tfyIzsicnSObQ/6vj9cu71SXP1nPTGyplAo5FDT+arqk3Ecb5s9J0dV2flmENs3u0REgTmnJjRkVjwrd2Iuy3+adimuACCKotPGmC8A+GvLoZOZmZkXLMekBojIaVX9DcthTy+8S3MlSTIuIu+q2dyjqgeMMU8A+CYAUdUtAOa8izZJkvG081wG19xN5jjO4ByLTLrLlRBZxfbNrjMAICI3LrTjIlVHrqyMjKU+gtVOxVVVHMf/hHkWrGvAiawsQrlSqOqiF61rRkzbOjo6AsxfCG4G8FcAPvhLlih5qVgsWpl42kIyezcZ1YXtmy0/QvlqwG9V1i6zZRMAiIiV+dCpFljtWFwBQOUbzqcth+XlwdZjfRRGRMZsx7St8mT5zzcQ4r52+LKgqp9S1U8B+GTtZSPKPrZvdlXaagrAalU1NmJWCrVtAEqO4xyyETO1S4TtWlxVXbp06b7u7u6/BHCTjXiqygKrxYjIQ6p6L2Y9BqZB51etWtXyBRYAuK77hVKp9H5cnUxarzOu634xjZyWWxRFdzU7B0oP2zfbVPUbIrLFcZwPAfivRuOJyPtUdbWq5m09jzCVEax2L64AYGpq6rKq/qOteI7jsMBqMUEQnFXV3bbiqerdExMT52zFS1Mul7soIovugETkI7lc7mIaORERVRWLxS8BeElVb/F9v6EnR/i+f6Oq3gUAjuPYejSavQLLGKPVP4VC4Wd4ZXF1pKura7Bdiquq3t7efwfwnKVwLLBa0PT09B5U1kZp0BPFYvGzFuIsmyAI7kf5uWz1OhgEwTV3FLaoX5yLKosWLknNsZcayohsYvu2uUo98TEAUNW9vu8vad3CoaGhLlX9BoBeAONBEByxleNyLNPwWBzHOywvBtYS9u3bV1LVj1sKxwKrBU1NTV12XXcXgFMNhDmpqndkcF6SisifAzhRx76n4jh+Byzd3rwMjldfqOqSV+xPkmT2yvzH592RlhvbdwUIw3AvgAcArFPVcHBwcFHPBvZ9f0OpVDqA8qrwL8Rx/E6b+VkvsGqfZ9ROlwXnEkXRfgDfajCMXrx48Yc28iH7crncSVXdrKpPLvZYEXk6SZItURS1/PIMcwmC4KzjOCMAam9dn+0SgJ35fP4ny5SWDQ/Mer3HGLPoTtgYMyIiv3gOmqpmZfRuJWD7rgwax/G7UH7EzcYkSf7bGHNXX1/f6oUO9H1/Z+WcPoDysgw7bJ/DUl8Hq52LqwoVkb9T1WiRx8UoX158RlWfnJqaupxCbmRJFEWn+/r6buvu7v4ggI9g4Ynv50XknkKh8JkMjly9wqFDh77j+/6oqo4BqD1xXRaRPw6CwMZl1GXjuu6XSqXSOwH8LoD1AMaMMecA1PtF53WV4wCUC+menp699jOlpWD7rhz5fP5Kf3//UFdX132q+l4Ad3d3d7/fGPN1EZlQ1e/19PS8dPbs2fWu694kIgOqOqqqm4Dy4rKlUumOw4cPN3KVYk7WVkE1xsx5aSBLT+duhDEmQrkSnssZlIeXnxWRY6p6PI7j41nveFeq4eHh9XEc7xSRnQBej6t3kp5EuWh+OI7jh+dYsDDTfN/frKrjAKpPmv9pkiS7JicnH29mXku1devWV3d0dBxAuRNeMhF5ulgsjqRxgk7DfOfqxWr1czvbtzGt3r5zGRwc7FPV3ap6y0L7ishPAHx63bp1e/bt2xenkQ8LLEuMMZtE5JCqfhfAMwCeSZLkO2vWrDk+NjbGyZHUFjzP2yginwcAVX1fVi99Vo2OjnaeP3/+3SLydgBvBNBd56GXAHxXVR/s7e3dm9YJOg0rqQNm+y5dFtp3HmKM2QxgF8qr9b8GwA0AzgH4MYBjIjJ28eLFkFeOiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIhWgv8Hnffz4dmwY9cAAAAASUVORK5CYII=);background-image:linear-gradient(transparent,transparent),url("data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20xmlns:dc='http://purl.org/dc/elements/1.1/'%20xmlns:cc='http://creativecommons.org/ns%23'%20xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23'%20xmlns:svg='http://www.w3.org/2000/svg'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'%20xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'%20viewBox='0%200%20600%2060'%20height='60'%20width='600'%20id='svg4225'%20version='1.1'%20inkscape:version='0.91%20r13725'%20sodipodi:docname='spritesheet.svg'%20inkscape:export-filename='/home/fpuga/development/upstream/icarto.Leaflet.draw/src/images/spritesheet-2x.png'%20inkscape:export-xdpi='90'%20inkscape:export-ydpi='90'%3e%3cmetadata%20id='metadata4258'%3e%3crdf:RDF%3e%3ccc:Work%20rdf:about=''%3e%3cdc:format%3eimage/svg+xml%3c/dc:format%3e%3cdc:type%20rdf:resource='http://purl.org/dc/dcmitype/StillImage'%20/%3e%3cdc:title%20/%3e%3c/cc:Work%3e%3c/rdf:RDF%3e%3c/metadata%3e%3cdefs%20id='defs4256'%20/%3e%3csodipodi:namedview%20pagecolor='%23ffffff'%20bordercolor='%23666666'%20borderopacity='1'%20objecttolerance='10'%20gridtolerance='10'%20guidetolerance='10'%20inkscape:pageopacity='0'%20inkscape:pageshadow='2'%20inkscape:window-width='1920'%20inkscape:window-height='1056'%20id='namedview4254'%20showgrid='false'%20inkscape:zoom='1.3101852'%20inkscape:cx='237.56928'%20inkscape:cy='7.2419621'%20inkscape:window-x='1920'%20inkscape:window-y='24'%20inkscape:window-maximized='1'%20inkscape:current-layer='svg4225'%20/%3e%3cg%20id='enabled'%20style='fill:%23464646;fill-opacity:1'%3e%3cg%20id='polyline'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%2018,36%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4229'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2036,18%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4231'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2023.142,39.145%20-2.285,-2.29%2016,-15.998%202.285,2.285%20z'%20id='path4233'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cpath%20id='polygon'%20d='M%20100,24.565%2097.904,39.395%2083.07,42%2076,28.773%2086.463,18%20Z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='rectangle'%20d='m%20140,20%2020,0%200,20%20-20,0%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='circle'%20d='m%20221,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='marker'%20d='m%20270,19%20c%20-4.971,0%20-9,4.029%20-9,9%200,4.971%205.001,12%209,14%204.001,-2%209,-9.029%209,-14%200,-4.971%20-4.029,-9%20-9,-9%20z%20m%200,12.5%20c%20-2.484,0%20-4.5,-2.014%20-4.5,-4.5%200,-2.484%202.016,-4.5%204.5,-4.5%202.485,0%204.5,2.016%204.5,4.5%200,2.486%20-2.015,4.5%20-4.5,4.5%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cg%20id='edit'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20337,30.156%200,0.407%200,5.604%20c%200,1.658%20-1.344,3%20-3,3%20l%20-10,0%20c%20-1.655,0%20-3,-1.342%20-3,-3%20l%200,-10%20c%200,-1.657%201.345,-3%203,-3%20l%206.345,0%203.19,-3.17%20-9.535,0%20c%20-3.313,0%20-6,2.687%20-6,6%20l%200,10%20c%200,3.313%202.687,6%206,6%20l%2010,0%20c%203.314,0%206,-2.687%206,-6%20l%200,-8.809%20-3,2.968'%20id='path4240'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.72,24.637%20-8.892,8.892%20-2.828,0%200,-2.829%208.89,-8.89%20z'%20id='path4242'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.697,17.826%204,0%200,4%20-4,0%20z'%20transform='matrix(-0.70698336,-0.70723018,0.70723018,-0.70698336,567.55917,274.78273)'%20id='path4244'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cg%20id='remove'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20381,42%2018,0%200,-18%20-18,0%200,18%20z%20m%2014,-16%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z'%20id='path4247'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20395,20%200,-4%20-10,0%200,4%20-6,0%200,2%2022,0%200,-2%20-6,0%20z%20m%20-2,0%20-6,0%200,-2%206,0%200,2%20z'%20id='path4249'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3c/g%3e%3cg%20id='disabled'%20transform='translate(120,0)'%20style='fill:%23bbbbbb'%3e%3cuse%20xlink:href='%23edit'%20id='edit-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3cuse%20xlink:href='%23remove'%20id='remove-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3c/g%3e%3cpath%20style='fill:none;stroke:%23464646;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1'%20id='circle-3'%20d='m%20581.65725,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20/%3e%3c/svg%3e")}.leaflet-draw a{display:block;text-align:center;text-decoration:none}.leaflet-draw a .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.leaflet-draw-actions{display:none;list-style:none;margin:0;padding:0;position:absolute;left:26px;top:0;white-space:nowrap}.leaflet-touch .leaflet-draw-actions{left:32px}.leaflet-right .leaflet-draw-actions{right:26px;left:auto}.leaflet-touch .leaflet-right .leaflet-draw-actions{right:32px;left:auto}.leaflet-draw-actions li{display:inline-block}.leaflet-draw-actions li:first-child a{border-left:0}.leaflet-draw-actions li:last-child a{-webkit-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.leaflet-right .leaflet-draw-actions li:last-child a{-webkit-border-radius:0;border-radius:0}.leaflet-right .leaflet-draw-actions li:first-child a{-webkit-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.leaflet-draw-actions a{background-color:#919187;border-left:1px solid #AAA;color:#fff;font:11px/19px Helvetica Neue,Arial,Helvetica,sans-serif;line-height:28px;text-decoration:none;padding-left:10px;padding-right:10px;height:28px}.leaflet-touch .leaflet-draw-actions a{font-size:12px;line-height:30px;height:30px}.leaflet-draw-actions-bottom{margin-top:0}.leaflet-draw-actions-top{margin-top:1px}.leaflet-draw-actions-top a,.leaflet-draw-actions-bottom a{height:27px;line-height:27px}.leaflet-draw-actions a:hover{background-color:#a0a098}.leaflet-draw-actions-top.leaflet-draw-actions-bottom a{height:26px;line-height:26px}.leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:-2px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:0 -1px}.leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-31px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-29px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-62px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-60px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-92px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-90px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-122px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-120px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-273px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-271px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-152px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-150px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-182px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-180px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-212px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-210px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-242px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-240px -2px}.leaflet-mouse-marker{background-color:#fff;cursor:crosshair}.leaflet-draw-tooltip{background:#363636;background:#00000080;border:1px solid transparent;-webkit-border-radius:4px;border-radius:4px;color:#fff;font:12px/18px Helvetica Neue,Arial,Helvetica,sans-serif;margin-left:20px;margin-top:-21px;padding:4px 8px;position:absolute;visibility:hidden;white-space:nowrap;z-index:6}.leaflet-draw-tooltip:before{border-right:6px solid black;border-right-color:#00000080;border-top:6px solid transparent;border-bottom:6px solid transparent;content:"";position:absolute;top:7px;left:-7px}.leaflet-error-draw-tooltip{background-color:#f2dede;border:1px solid #e6b6bd;color:#b94a48}.leaflet-error-draw-tooltip:before{border-right-color:#e6b6bd}.leaflet-draw-tooltip-single{margin-top:-12px}.leaflet-draw-tooltip-subtext{color:#f8d5e4}.leaflet-draw-guide-dash{font-size:1%;opacity:.6;position:absolute;width:5px;height:5px}.leaflet-edit-marker-selected{background-color:#fe57a11a;border:4px dashed rgba(254,87,161,.6);-webkit-border-radius:4px;border-radius:4px;box-sizing:content-box}.leaflet-edit-move{cursor:move}.leaflet-edit-resize{cursor:pointer}.leaflet-oldie .leaflet-draw-toolbar{border:1px solid #999}`,Fn=".leaflet-ruler{height:35px;width:35px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfhBQoMHg6McuYvAAABwklEQVQ4y43TP0jUYRgH8M/daQpqdujhnwShGiwyipCIoIgWxyIwrqEhnCQoGqKhpoYMg1qCQjg8TC2JCtSkjCgaKisIhyQUwpJssD9KZWRZg6d450/yGV54n/fzfd53eUOCaoNa5QpNGNPr9cKjUAatdsB++co0G1XiiHd+uqnTq8VzI874o9s2Ic1iiEpii9tmnJOdfkOldt/dU+HYolHnjdmpRNzbuVaNL86m4sXqNOrz3kMXHFKYMqd8VREGBToMifqLgwY1yNZirya5knaBqH16fJjNJiWEFSlxy4g980+pMuZkir/UJjLbrvNRPnINaLUygK/yQpuImHp47LOjuKJPOJA/1y4iZsAlyozLs8IO42L/4QlhGrSCy5oCeKH+dM59vVbL9sn6AP5MRzpnVKtN1viRxit1WRvEmVKFrQbTpoddNR3E+aYKuw1lPOapa0GcEf22KzOtejmcG1rkYdjEAn59KU5cDzjt+HI4BSZtVJTazfIsMQOmFAusLr/E53lniickJYIDNcaUL+JhMZPWBUdOeCCaweGOw5k0lFrv2uyRuBxPlLpoBtTK0p3mh+f+dKl6jX6LapRj6XrzD+1bmkFA/dTVAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTA1LTEwVDEyOjMwOjE0KzAyOjAwUNH5TAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0wNS0xMFQxMjozMDoxNCswMjowMCGMQfAAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-position:center}.leaflet-ruler:hover{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAACmAAAApgHdff84AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAn9QTFRF////AAAAAAAAAAAAAAAAAAAzABcXABQUABIkDhwrAA0aAAwYABUgABQfABIbABAZAA8fABUcABMaABMfABIeABEcABAbABQeABMdABIdABEbABIbABIbABEdABEcABIcBxsoABEdABIdABIdABEcABMbABMdFBwgERofAhIbEhsfAhIdBxUeEhsgEBofAhMbAhMdBRMdAhIbAhIdAhMdCRceARIcDBgfDBgfDBcfDBcfFhwgDBceDBceCxceFCs5HTdGAxMcDxofGTFAHDRDHDVDHDVEHTZFDRkfEBofERogCh0oERsgARIcEhsfEhsgCh4pDCEsDRkfDRkfEBofBhQdDSMvDRgfDBgfCBUeBxUeDyUyECYzUDktPTAqCRceCRYeChYeDxkfEBkgLCgmWj4wCBYdW0AwGh4hHCAiHSAiTDctBhUdBxYdEBkfLyonMConBhUdJiUkLCclLSgmLigmOzApPTEpDBgfBRQdDBgfERsgWT8wBBMdCBYeChceQjMrSzctZEUyBBMdERsgXUAxXkExY0QzglQ5AxUfBxolSjcthlU6hlY7h1Y7AxMcSDUsSjYsd042g1Q5hlY6jVo8AhIcAxMcBBQdLEpcOVpvARIcAhIcBhQdDSIuEhsgJ0NUNS0oNi0oO11yTTgtUXmSUnqUXEAxXUExYEIyZUUzaEYzb0o1cEo1dEw2i1g8jFk8jcfskFs9mdX9mmA/mtf/pmZCqGdCsWxEvnJHxHVJxnZJyHdJzHlK0XxM031M139N3IFO3YJO4INP5IVQ5YZQ5oZQ6ohR7IlS7opS74tS8ItT841T9I1T9o5U949U+ZBV+pBV/ZJW/pJW/5NWIYcOagAAAJt0Uk5TAAECAwQFCw0OEhQVGBkcHyEkKCkqLTAzNUZLVFZZW2RnanJzeHl8f4uMjY6Pj5KVl52eoKGprKytrq+vsLGytLu9vb/BwsLDxcXP0NDS09bf4uPk5OXl5ufo6enq7O3u7+/x8fHy8/P09PT09fX19fX29vb29vb29/j4+Pj5+fn5+fn6+vr6+vr7/Pz8/Pz9/f39/f39/v7+/v7Td3FlAAABgklEQVQoU2NggAMRJU1DTWURBlQgqhWUND11Tfr05GBdMYQws8a07j2XVx2/cnLl5T0T5+ixQsX5/RrWr70CA+s2NPoLgMUlciddvnLl3PbslMysmi2ngXKTc/iA4uwRC1dfudRT76UtJy5lMHvHlSsni82ZgBLWbZdOHCuPlARpForvBYszA9ky1WeunC8y5YCI9125cqrEnJlbnoHBZ/6mK+0eTAjxUgtmbl99Bt6Ksxd2pXGDxRPg4kZMDIqxV6406cDFT8PEGRwnHLlYJQwSTwSJ51tCxRmiVuw7VAsRP7zkIEKcofnAlb0hEPWXls9AiDNUHriyMxwoPgVoToEVQpwhdNHuY/2imOIMZq1nr2QUgsVtkMUZZOOuXOmYiinOwF63/8QVsDgLd0wnFwMCOM3dBhK3ZeGOXjzLHklCIu8oRDxs8eaNXYJIMuplJ0HigYs3b906UwFJgtGzxY6FLWDe0mXLli3wVoEAaZAMjxoLA6eDu5urq4uziTEEqAIAvamx163e5EoAAAAASUVORK5CYII=)}.leaflet-ruler-clicked{height:35px;width:35px;background-repeat:no-repeat;background-position:center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAACmAAAApgHdff84AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAn9QTFRF////AAAAAAAAAAAAAAAAAAAzABcXABQUABIkDhwrAA0aAAwYABUgABQfABIbABAZAA8fABUcABMaABMfABIeABEcABAbABQeABMdABIdABEbABIbABIbABEdABEcABIcBxsoABEdABIdABIdABEcABMbABMdFBwgERofAhIbEhsfAhIdBxUeEhsgEBofAhMbAhMdBRMdAhIbAhIdAhMdCRceARIcDBgfDBgfDBcfDBcfFhwgDBceDBceCxceFCs5HTdGAxMcDxofGTFAHDRDHDVDHDVEHTZFDRkfEBofERogCh0oERsgARIcEhsfEhsgCh4pDCEsDRkfDRkfEBofBhQdDSMvDRgfDBgfCBUeBxUeDyUyECYzUDktPTAqCRceCRYeChYeDxkfEBkgLCgmWj4wCBYdW0AwGh4hHCAiHSAiTDctBhUdBxYdEBkfLyonMConBhUdJiUkLCclLSgmLigmOzApPTEpDBgfBRQdDBgfERsgWT8wBBMdCBYeChceQjMrSzctZEUyBBMdERsgXUAxXkExY0QzglQ5AxUfBxolSjcthlU6hlY7h1Y7AxMcSDUsSjYsd042g1Q5hlY6jVo8AhIcAxMcBBQdLEpcOVpvARIcAhIcBhQdDSIuEhsgJ0NUNS0oNi0oO11yTTgtUXmSUnqUXEAxXUExYEIyZUUzaEYzb0o1cEo1dEw2i1g8jFk8jcfskFs9mdX9mmA/mtf/pmZCqGdCsWxEvnJHxHVJxnZJyHdJzHlK0XxM031M139N3IFO3YJO4INP5IVQ5YZQ5oZQ6ohR7IlS7opS74tS8ItT841T9I1T9o5U949U+ZBV+pBV/ZJW/pJW/5NWIYcOagAAAJt0Uk5TAAECAwQFCw0OEhQVGBkcHyEkKCkqLTAzNUZLVFZZW2RnanJzeHl8f4uMjY6Pj5KVl52eoKGprKytrq+vsLGytLu9vb/BwsLDxcXP0NDS09bf4uPk5OXl5ufo6enq7O3u7+/x8fHy8/P09PT09fX19fX29vb29vb29/j4+Pj5+fn5+fn6+vr6+vr7/Pz8/Pz9/f39/f39/v7+/v7Td3FlAAABgklEQVQoU2NggAMRJU1DTWURBlQgqhWUND11Tfr05GBdMYQws8a07j2XVx2/cnLl5T0T5+ixQsX5/RrWr70CA+s2NPoLgMUlciddvnLl3PbslMysmi2ngXKTc/iA4uwRC1dfudRT76UtJy5lMHvHlSsni82ZgBLWbZdOHCuPlARpForvBYszA9ky1WeunC8y5YCI9125cqrEnJlbnoHBZ/6mK+0eTAjxUgtmbl99Bt6Ksxd2pXGDxRPg4kZMDIqxV6406cDFT8PEGRwnHLlYJQwSTwSJ51tCxRmiVuw7VAsRP7zkIEKcofnAlb0hEPWXls9AiDNUHriyMxwoPgVoToEVQpwhdNHuY/2imOIMZq1nr2QUgsVtkMUZZOOuXOmYiinOwF63/8QVsDgLd0wnFwMCOM3dBhK3ZeGOXjzLHklCIu8oRDxs8eaNXYJIMuplJ0HigYs3b906UwFJgtGzxY6FLWDe0mXLli3wVoEAaZAMjxoLA6eDu5urq4uziTEEqAIAvamx163e5EoAAAAASUVORK5CYII=);border-color:#7fff00!important}.leaflet-bar{background-color:#fff}.leaflet-control{cursor:pointer}.result-tooltip{background-color:#fff;border-width:medium;border-color:#de0000;font-size:smaller}.moving-tooltip{background-color:#ffffffb3;background-clip:padding-box;opacity:.5;border:dotted;border-color:red;font-size:smaller}.plus-length{padding-left:45px}",Gn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",Vn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",Wn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",Jn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='430'%20height='430'%20style='width:100%25;height:100%25;transform:translate3d(0,0,0);content-visibility:visible'%20viewBox='0%200%20430%20430'%3e%3cdefs%3e%3cclipPath%20id='i'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='s'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='e'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='p'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='f'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='m'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='g'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='j'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='h'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cfilter%20id='t'%20width='300%25'%20height='300%25'%20x='-100%25'%20y='-100%25'%3e%3cfeGaussianBlur%20result='filter_result_0'/%3e%3c/filter%3e%3cfilter%20id='r'%20width='300%25'%20height='300%25'%20x='-100%25'%20y='-100%25'%3e%3cfeGaussianBlur%20result='filter_result_0'%20stdDeviation='52.5%2052.5'/%3e%3c/filter%3e%3cfilter%20id='n'%20width='300%25'%20height='300%25'%20x='-100%25'%20y='-100%25'%3e%3cfeGaussianBlur%20result='filter_result_0'/%3e%3c/filter%3e%3cfilter%20id='k'%20width='300%25'%20height='300%25'%20x='-100%25'%20y='-100%25'%3e%3cfeGaussianBlur%20result='filter_result_0'/%3e%3c/filter%3e%3cmask%20id='u'%20mask-type='alpha'%3e%3cuse%20xmlns:ns1='http://www.w3.org/1999/xlink'%20ns1:href='%23a'/%3e%3c/mask%3e%3cmask%20id='q'%20mask-type='alpha'%3e%3cuse%20xmlns:ns2='http://www.w3.org/1999/xlink'%20ns2:href='%23b'/%3e%3c/mask%3e%3cmask%20id='o'%20mask-type='alpha'%3e%3cuse%20xmlns:ns3='http://www.w3.org/1999/xlink'%20ns3:href='%23c'/%3e%3c/mask%3e%3cmask%20id='l'%20mask-type='alpha'%3e%3cuse%20xmlns:ns4='http://www.w3.org/1999/xlink'%20ns4:href='%23d'/%3e%3c/mask%3e%3cg%20id='a'%20fill-opacity='0'%20stroke-linecap='round'%20stroke-linejoin='round'%20clip-path='url(%23e)'%20style='display:none'%3e%3cpath%20class='secondary'%20style='display:none'/%3e%3cpath%20class='primary'%20style='display:none'/%3e%3c/g%3e%3cg%20id='b'%20fill-opacity='0'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='12'%20clip-path='url(%23f)'%20style='display:block'%3e%3cpath%20stroke='%2308A88A'%20d='M44.446-66.518a79.998%2079.998%200%200%200-101.012%209.952A79.998%2079.998%200%201%200%2056.569%2056.569%2080.005%2080.005%200%200%200%2073.91-30.615a80.001%2080.001%200%200%200-29.464-35.903z'%20class='secondary'%20style='display:block'%20transform='translate(215%20214)'/%3e%3cpath%20stroke='%23121331'%20d='m141.409%2025.241%208.727%205.041s0%200%200%200a22.3%2022.3%200%200%201%2010.411%2013.542%2022.32%2022.32%200%200%201-2.221%2016.937l-26.515%2045.924a22.325%2022.325%200%200%201-30.497%208.172l-8.754-5.059a143.414%20143.414%200%200%201-43.718%2025.286v10.108a22.302%2022.302%200%200%201-13.778%2020.612%2022.303%2022.303%200%200%201-8.539%201.696h-53.029a22.303%2022.303%200%200%201-15.779-6.531%2022.302%2022.302%200%200%201-6.537-15.777v-10.073a143.416%20143.416%200%200%201-43.719-25.285l-8.754%205.059a22.325%2022.325%200%200%201-30.497-8.172l-26.523-45.924a22.315%2022.315%200%200%201-2.238-16.943A22.31%2022.31%200%200%201-150.142%2030.3l8.727-5.041a145.097%20145.097%200%200%201%200-50.518l-8.727-5.041a22.294%2022.294%200%200%201-10.409-13.554%2022.306%2022.306%200%200%201%202.238-16.943l26.514-45.924a22.325%2022.325%200%200%201%2030.497-8.172l8.754%205.059a143.416%20143.416%200%200%201%2043.719-25.285v-10.073a22.302%2022.302%200%200%201%206.537-15.777%2022.3%2022.3%200%200%201%2015.779-6.531h53.02a22.307%2022.307%200%200%201%2022.317%2022.308v10.037a143.41%20143.41%200%200%201%2043.718%2025.285l8.754-5.059a22.325%2022.325%200%200%201%2030.497%208.172l26.515%2045.942a22.313%2022.313%200%200%201-1.618%2024.757%2022.294%2022.294%200%200%201-6.554%205.74l-8.727%205.041a145.097%20145.097%200%200%201%200%2050.518z'%20class='primary'%20style='display:block'%20transform='rotate(-120%20169.576%2045.095)'/%3e%3c/g%3e%3cg%20id='c'%20fill-opacity='0'%20stroke-linecap='round'%20stroke-linejoin='round'%20clip-path='url(%23g)'%20style='display:none'%3e%3cpath%20class='secondary'%20style='display:none'/%3e%3cpath%20class='primary'%20style='display:none'/%3e%3c/g%3e%3cg%20id='d'%20fill-opacity='0'%20stroke-linecap='round'%20stroke-linejoin='round'%20clip-path='url(%23h)'%20style='display:none'%3e%3cpath%20class='secondary'%20style='display:none'/%3e%3cpath%20class='primary'%20style='display:none'/%3e%3c/g%3e%3c/defs%3e%3cg%20clip-path='url(%23i)'%3e%3cg%20clip-path='url(%23j)'%20filter='url(%23k)'%20mask='url(%23l)'%20style='display:none'%3e%3cg%20class='design'%3e%3cpath%20class='primary'/%3e%3c/g%3e%3cg%20class='design'%3e%3cpath%20class='secondary'/%3e%3c/g%3e%3c/g%3e%3cg%20clip-path='url(%23m)'%20filter='url(%23n)'%20mask='url(%23o)'%20style='display:none'%3e%3cg%20class='design'%3e%3cpath%20class='primary'/%3e%3c/g%3e%3cg%20class='design'%3e%3cpath%20class='secondary'/%3e%3c/g%3e%3c/g%3e%3cg%20clip-path='url(%23p)'%20mask='url(%23q)'%20style='display:block'%3e%3cg%20filter='url(%23r)'%20transform='rotate(-94%20238.762%20-16.565)%20scale(2.4)'%3e%3cg%20class='design'%3e%3cpath%20fill='%234BE1EC'%20d='M0-250c137.975%200%20250%20112.025%20250%20250S137.975%20250%200%20250-250%20137.975-250%200-137.975-250%200-250z'%20class='primary'/%3e%3c/g%3e%3cg%20class='design'%3e%3cpath%20fill='%23CB5EEE'%20d='M113.242-295.384c97.478%200%20176.5%2079.022%20176.5%20176.5s-79.022%20176.5-176.5%20176.5c-43.948%200-74.396-34.057-105.29-60.631-37.631-32.369-71.21-62.338-71.21-115.869%200-97.478%2079.022-176.5%20176.5-176.5z'%20class='secondary'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cg%20clip-path='url(%23s)'%20filter='url(%23t)'%20mask='url(%23u)'%20style='display:none'%3e%3cg%20class='design'%3e%3cpath%20class='primary'/%3e%3c/g%3e%3cg%20class='design'%3e%3cpath%20class='secondary'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",$i="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%20-1.67%2047.336%2047.336'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group_42'%20data-name='Group%2042'%20transform='translate(-172.455%20-364.36)'%3e%3cpath%20id='Rectangle_17'%20data-name='Rectangle%2017'%20d='M4.351,0H40.984a4.351,4.351,0,0,1,4.351,4.351V22.117a1,1,0,0,1-1,1H1a1,1,0,0,1-1-1V4.351A4.351,4.351,0,0,1,4.351,0Z'%20transform='translate(173.455%20384.243)'%20fill='none'%20stroke='%23000000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3cpath%20id='Path_90'%20data-name='Path%2090'%20d='M218.79,390.249a3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.778,3.778,0,0,1-3.777-3.778'%20fill='none'%20stroke='%23000000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3cg%20id='Group_41'%20data-name='Group%2041'%3e%3cpath%20id='Rectangle_18'%20data-name='Rectangle%2018'%20d='M4.351,0H26.473a4.351,4.351,0,0,1,4.351,4.351V17.883a1,1,0,0,1-1,1H1a1,1,0,0,1-1-1V4.351A4.351,4.351,0,0,1,4.351,0Z'%20transform='translate(180.71%20365.36)'%20fill='none'%20stroke='%23000000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3cpath%20id='Path_91'%20data-name='Path%2091'%20d='M211.234,370.794a3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778'%20fill='none'%20stroke='%23000000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",jn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfhBQoMHg6McuYvAAABwklEQVQ4y43TP0jUYRgH8M/daQpqdujhnwShGiwyipCIoIgWxyIwrqEhnCQoGqKhpoYMg1qCQjg8TC2JCtSkjCgaKisIhyQUwpJssD9KZWRZg6d450/yGV54n/fzfd53eUOCaoNa5QpNGNPr9cKjUAatdsB++co0G1XiiHd+uqnTq8VzI874o9s2Ic1iiEpii9tmnJOdfkOldt/dU+HYolHnjdmpRNzbuVaNL86m4sXqNOrz3kMXHFKYMqd8VREGBToMifqLgwY1yNZirya5knaBqH16fJjNJiWEFSlxy4g980+pMuZkir/UJjLbrvNRPnINaLUygK/yQpuImHp47LOjuKJPOJA/1y4iZsAlyozLs8IO42L/4QlhGrSCy5oCeKH+dM59vVbL9sn6AP5MRzpnVKtN1viRxit1WRvEmVKFrQbTpoddNR3E+aYKuw1lPOapa0GcEf22KzOtejmcG1rkYdjEAn59KU5cDzjt+HI4BSZtVJTazfIsMQOmFAusLr/E53lniickJYIDNcaUL+JhMZPWBUdOeCCaweGOw5k0lFrv2uyRuBxPlLpoBtTK0p3mh+f+dKl6jX6LapRj6XrzD+1bmkFA/dTVAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTA1LTEwVDEyOjMwOjE0KzAyOjAwUNH5TAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0wNS0xMFQxMjozMDoxNCswMjowMCGMQfAAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC",qn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAACmAAAApgHdff84AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAn9QTFRF////AAAAAAAAAAAAAAAAAAAzABcXABQUABIkDhwrAA0aAAwYABUgABQfABIbABAZAA8fABUcABMaABMfABIeABEcABAbABQeABMdABIdABEbABIbABIbABEdABEcABIcBxsoABEdABIdABIdABEcABMbABMdFBwgERofAhIbEhsfAhIdBxUeEhsgEBofAhMbAhMdBRMdAhIbAhIdAhMdCRceARIcDBgfDBgfDBcfDBcfFhwgDBceDBceCxceFCs5HTdGAxMcDxofGTFAHDRDHDVDHDVEHTZFDRkfEBofERogCh0oERsgARIcEhsfEhsgCh4pDCEsDRkfDRkfEBofBhQdDSMvDRgfDBgfCBUeBxUeDyUyECYzUDktPTAqCRceCRYeChYeDxkfEBkgLCgmWj4wCBYdW0AwGh4hHCAiHSAiTDctBhUdBxYdEBkfLyonMConBhUdJiUkLCclLSgmLigmOzApPTEpDBgfBRQdDBgfERsgWT8wBBMdCBYeChceQjMrSzctZEUyBBMdERsgXUAxXkExY0QzglQ5AxUfBxolSjcthlU6hlY7h1Y7AxMcSDUsSjYsd042g1Q5hlY6jVo8AhIcAxMcBBQdLEpcOVpvARIcAhIcBhQdDSIuEhsgJ0NUNS0oNi0oO11yTTgtUXmSUnqUXEAxXUExYEIyZUUzaEYzb0o1cEo1dEw2i1g8jFk8jcfskFs9mdX9mmA/mtf/pmZCqGdCsWxEvnJHxHVJxnZJyHdJzHlK0XxM031M139N3IFO3YJO4INP5IVQ5YZQ5oZQ6ohR7IlS7opS74tS8ItT841T9I1T9o5U949U+ZBV+pBV/ZJW/pJW/5NWIYcOagAAAJt0Uk5TAAECAwQFCw0OEhQVGBkcHyEkKCkqLTAzNUZLVFZZW2RnanJzeHl8f4uMjY6Pj5KVl52eoKGprKytrq+vsLGytLu9vb/BwsLDxcXP0NDS09bf4uPk5OXl5ufo6enq7O3u7+/x8fHy8/P09PT09fX19fX29vb29vb29/j4+Pj5+fn5+fn6+vr6+vr7/Pz8/Pz9/f39/f39/v7+/v7Td3FlAAABgklEQVQoU2NggAMRJU1DTWURBlQgqhWUND11Tfr05GBdMYQws8a07j2XVx2/cnLl5T0T5+ixQsX5/RrWr70CA+s2NPoLgMUlciddvnLl3PbslMysmi2ngXKTc/iA4uwRC1dfudRT76UtJy5lMHvHlSsni82ZgBLWbZdOHCuPlARpForvBYszA9ky1WeunC8y5YCI9125cqrEnJlbnoHBZ/6mK+0eTAjxUgtmbl99Bt6Ksxd2pXGDxRPg4kZMDIqxV6406cDFT8PEGRwnHLlYJQwSTwSJ51tCxRmiVuw7VAsRP7zkIEKcofnAlb0hEPWXls9AiDNUHriyMxwoPgVoToEVQpwhdNHuY/2imOIMZq1nr2QUgsVtkMUZZOOuXOmYiinOwF63/8QVsDgLd0wnFwMCOM3dBhK3ZeGOXjzLHklCIu8oRDxs8eaNXYJIMuplJ0HigYs3b906UwFJgtGzxY6FLWDe0mXLli3wVoEAaZAMjxoLA6eDu5urq4uziTEEqAIAvamx163e5EoAAAAASUVORK5CYII=";function Yn(u){const s="data-leaflet-styles";if(u.querySelector(`style[${s}]`))return;const n=document.createElement("style");n.setAttribute(s,"true"),n.textContent=`
4
+ */var Un=te.exports,Xi;function Qi(){return Xi||(Xi=1,(function(u,a){(function(n,h){h(a)})(Un,(function(n){var h="1.9.4";function i(t){var e,o,s,c;for(o=1,s=arguments.length;o<s;o++){c=arguments[o];for(e in c)t[e]=c[e]}return t}var r=Object.create||(function(){function t(){}return function(e){return t.prototype=e,new t}})();function l(t,e){var o=Array.prototype.slice;if(t.bind)return t.bind.apply(t,o.call(arguments,1));var s=o.call(arguments,2);return function(){return t.apply(e,s.length?s.concat(o.call(arguments)):arguments)}}var d=0;function p(t){return"_leaflet_id"in t||(t._leaflet_id=++d),t._leaflet_id}function m(t,e,o){var s,c,f,g;return g=function(){s=!1,c&&(f.apply(o,c),c=!1)},f=function(){s?c=arguments:(t.apply(o,arguments),setTimeout(g,e),s=!0)},f}function _(t,e,o){var s=e[1],c=e[0],f=s-c;return t===s&&o?t:((t-c)%f+f)%f+c}function y(){return!1}function w(t,e){if(e===!1)return t;var o=Math.pow(10,e===void 0?6:e);return Math.round(t*o)/o}function T(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function E(t){return T(t).split(/\s+/)}function A(t,e){Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?r(t.options):{});for(var o in e)t.options[o]=e[o];return t.options}function N(t,e,o){var s=[];for(var c in t)s.push(encodeURIComponent(o?c.toUpperCase():c)+"="+encodeURIComponent(t[c]));return(!e||e.indexOf("?")===-1?"?":"&")+s.join("&")}var F=/\{ *([\w_ -]+) *\}/g;function P(t,e){return t.replace(F,function(o,s){var c=e[s];if(c===void 0)throw new Error("No value provided for variable "+o);return typeof c=="function"&&(c=c(e)),c})}var I=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function G(t,e){for(var o=0;o<t.length;o++)if(t[o]===e)return o;return-1}var j="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function q(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var rt=0;function at(t){var e=+new Date,o=Math.max(0,16-(e-rt));return rt=e+o,window.setTimeout(t,o)}var Mt=window.requestAnimationFrame||q("RequestAnimationFrame")||at,Se=window.cancelAnimationFrame||q("CancelAnimationFrame")||q("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function st(t,e,o){if(o&&Mt===at)t.call(e);else return Mt.call(window,l(t,e))}function lt(t){t&&Se.call(window,t)}var Ie={__proto__:null,extend:i,create:r,bind:l,get lastId(){return d},stamp:p,throttle:m,wrapNum:_,falseFn:y,formatNum:w,trim:T,splitWords:E,setOptions:A,getParamString:N,template:P,isArray:I,indexOf:G,emptyImageUrl:j,requestFn:Mt,cancelFn:Se,requestAnimFrame:st,cancelAnimFrame:lt};function gt(){}gt.extend=function(t){var e=function(){A(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,s=r(o);s.constructor=e,e.prototype=s;for(var c in this)Object.prototype.hasOwnProperty.call(this,c)&&c!=="prototype"&&c!=="__super__"&&(e[c]=this[c]);return t.statics&&i(e,t.statics),t.includes&&(ne(t.includes),i.apply(null,[s].concat(t.includes))),i(s,t),delete s.statics,delete s.includes,s.options&&(s.options=o.options?r(o.options):{},i(s.options,t.options)),s._initHooks=[],s.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var f=0,g=s._initHooks.length;f<g;f++)s._initHooks[f].call(this)}},e},gt.include=function(t){var e=this.prototype.options;return i(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},gt.mergeOptions=function(t){return i(this.prototype.options,t),this},gt.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),o=typeof t=="function"?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(o),this};function ne(t){if(!(typeof L=="undefined"||!L||!L.Mixin)){t=I(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var mt={on:function(t,e,o){if(typeof t=="object")for(var s in t)this._on(s,t[s],e);else{t=E(t);for(var c=0,f=t.length;c<f;c++)this._on(t[c],e,o)}return this},off:function(t,e,o){if(!arguments.length)delete this._events;else if(typeof t=="object")for(var s in t)this._off(s,t[s],e);else{t=E(t);for(var c=arguments.length===1,f=0,g=t.length;f<g;f++)c?this._off(t[f]):this._off(t[f],e,o)}return this},_on:function(t,e,o,s){if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}if(this._listens(t,e,o)===!1){o===this&&(o=void 0);var c={fn:e,ctx:o};s&&(c.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(c)}},_off:function(t,e,o){var s,c,f;if(this._events&&(s=this._events[t],!!s)){if(arguments.length===1){if(this._firingCount)for(c=0,f=s.length;c<f;c++)s[c].fn=y;delete this._events[t];return}if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}var g=this._listens(t,e,o);if(g!==!1){var v=s[g];this._firingCount&&(v.fn=y,this._events[t]=s=s.slice()),s.splice(g,1)}}},fire:function(t,e,o){if(!this.listens(t,o))return this;var s=i({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var c=this._events[t];if(c){this._firingCount=this._firingCount+1||1;for(var f=0,g=c.length;f<g;f++){var v=c[f],b=v.fn;v.once&&this.off(t,b,v.ctx),b.call(v.ctx||this,s)}this._firingCount--}}return o&&this._propagateEvent(s),this},listens:function(t,e,o,s){typeof t!="string"&&console.warn('"string" type argument expected');var c=e;typeof e!="function"&&(s=!!e,c=void 0,o=void 0);var f=this._events&&this._events[t];if(f&&f.length&&this._listens(t,c,o)!==!1)return!0;if(s){for(var g in this._eventParents)if(this._eventParents[g].listens(t,e,o,s))return!0}return!1},_listens:function(t,e,o){if(!this._events)return!1;var s=this._events[t]||[];if(!e)return!!s.length;o===this&&(o=void 0);for(var c=0,f=s.length;c<f;c++)if(s[c].fn===e&&s[c].ctx===o)return c;return!1},once:function(t,e,o){if(typeof t=="object")for(var s in t)this._on(s,t[s],e,!0);else{t=E(t);for(var c=0,f=t.length;c<f;c++)this._on(t[c],e,o,!0)}return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[p(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[p(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)}};mt.addEventListener=mt.on,mt.removeEventListener=mt.clearAllEventListeners=mt.off,mt.addOneTimeEventListener=mt.once,mt.fireEvent=mt.fire,mt.hasEventListeners=mt.listens;var re=gt.extend(mt);function O(t,e,o){this.x=o?Math.round(t):t,this.y=o?Math.round(e):e}var ko=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};O.prototype={clone:function(){return new O(this.x,this.y)},add:function(t){return this.clone()._add(D(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(D(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new O(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new O(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ko(this.x),this.y=ko(this.y),this},distanceTo:function(t){t=D(t);var e=t.x-this.x,o=t.y-this.y;return Math.sqrt(e*e+o*o)},equals:function(t){return t=D(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=D(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+w(this.x)+", "+w(this.y)+")"}};function D(t,e,o){return t instanceof O?t:I(t)?new O(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new O(t.x,t.y):new O(t,e,o)}function Y(t,e){if(t)for(var o=e?[t,e]:t,s=0,c=o.length;s<c;s++)this.extend(o[s])}Y.prototype={extend:function(t){var e,o;if(!t)return this;if(t instanceof O||typeof t[0]=="number"||"x"in t)e=o=D(t);else if(t=dt(t),e=t.min,o=t.max,!e||!o)return this;return!this.min&&!this.max?(this.min=e.clone(),this.max=o.clone()):(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(o.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(o.y,this.max.y)),this},getCenter:function(t){return D((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return D(this.min.x,this.max.y)},getTopRight:function(){return D(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,o;return typeof t[0]=="number"||t instanceof O?t=D(t):t=dt(t),t instanceof Y?(e=t.min,o=t.max):e=o=t,e.x>=this.min.x&&o.x<=this.max.x&&e.y>=this.min.y&&o.y<=this.max.y},intersects:function(t){t=dt(t);var e=this.min,o=this.max,s=t.min,c=t.max,f=c.x>=e.x&&s.x<=o.x,g=c.y>=e.y&&s.y<=o.y;return f&&g},overlaps:function(t){t=dt(t);var e=this.min,o=this.max,s=t.min,c=t.max,f=c.x>e.x&&s.x<o.x,g=c.y>e.y&&s.y<o.y;return f&&g},isValid:function(){return!!(this.min&&this.max)},pad:function(t){var e=this.min,o=this.max,s=Math.abs(e.x-o.x)*t,c=Math.abs(e.y-o.y)*t;return dt(D(e.x-s,e.y-c),D(o.x+s,o.y+c))},equals:function(t){return t?(t=dt(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight())):!1}};function dt(t,e){return!t||t instanceof Y?t:new Y(t,e)}function ut(t,e){if(t)for(var o=e?[t,e]:t,s=0,c=o.length;s<c;s++)this.extend(o[s])}ut.prototype={extend:function(t){var e=this._southWest,o=this._northEast,s,c;if(t instanceof V)s=t,c=t;else if(t instanceof ut){if(s=t._southWest,c=t._northEast,!s||!c)return this}else return t?this.extend(U(t)||$(t)):this;return!e&&!o?(this._southWest=new V(s.lat,s.lng),this._northEast=new V(c.lat,c.lng)):(e.lat=Math.min(s.lat,e.lat),e.lng=Math.min(s.lng,e.lng),o.lat=Math.max(c.lat,o.lat),o.lng=Math.max(c.lng,o.lng)),this},pad:function(t){var e=this._southWest,o=this._northEast,s=Math.abs(e.lat-o.lat)*t,c=Math.abs(e.lng-o.lng)*t;return new ut(new V(e.lat-s,e.lng-c),new V(o.lat+s,o.lng+c))},getCenter:function(){return new V((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new V(this.getNorth(),this.getWest())},getSouthEast:function(){return new V(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){typeof t[0]=="number"||t instanceof V||"lat"in t?t=U(t):t=$(t);var e=this._southWest,o=this._northEast,s,c;return t instanceof ut?(s=t.getSouthWest(),c=t.getNorthEast()):s=c=t,s.lat>=e.lat&&c.lat<=o.lat&&s.lng>=e.lng&&c.lng<=o.lng},intersects:function(t){t=$(t);var e=this._southWest,o=this._northEast,s=t.getSouthWest(),c=t.getNorthEast(),f=c.lat>=e.lat&&s.lat<=o.lat,g=c.lng>=e.lng&&s.lng<=o.lng;return f&&g},overlaps:function(t){t=$(t);var e=this._southWest,o=this._northEast,s=t.getSouthWest(),c=t.getNorthEast(),f=c.lat>e.lat&&s.lat<o.lat,g=c.lng>e.lng&&s.lng<o.lng;return f&&g},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return t?(t=$(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function $(t,e){return t instanceof ut?t:new ut(t,e)}function V(t,e,o){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,o!==void 0&&(this.alt=+o)}V.prototype={equals:function(t,e){if(!t)return!1;t=U(t);var o=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return o<=(e===void 0?1e-9:e)},toString:function(t){return"LatLng("+w(this.lat,t)+", "+w(this.lng,t)+")"},distanceTo:function(t){return Dt.distance(this,U(t))},wrap:function(){return Dt.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,o=e/Math.cos(Math.PI/180*this.lat);return $([this.lat-e,this.lng-o],[this.lat+e,this.lng+o])},clone:function(){return new V(this.lat,this.lng,this.alt)}};function U(t,e,o){return t instanceof V?t:I(t)&&typeof t[0]!="object"?t.length===3?new V(t[0],t[1],t[2]):t.length===2?new V(t[0],t[1]):null:t==null?t:typeof t=="object"&&"lat"in t?new V(t.lat,"lng"in t?t.lng:t.lon,t.alt):e===void 0?null:new V(t,e,o)}var Et={latLngToPoint:function(t,e){var o=this.projection.project(t),s=this.scale(e);return this.transformation._transform(o,s)},pointToLatLng:function(t,e){var o=this.scale(e),s=this.transformation.untransform(t,o);return this.projection.unproject(s)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,o=this.scale(t),s=this.transformation.transform(e.min,o),c=this.transformation.transform(e.max,o);return new Y(s,c)},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?_(t.lng,this.wrapLng,!0):t.lng,o=this.wrapLat?_(t.lat,this.wrapLat,!0):t.lat,s=t.alt;return new V(o,e,s)},wrapLatLngBounds:function(t){var e=t.getCenter(),o=this.wrapLatLng(e),s=e.lat-o.lat,c=e.lng-o.lng;if(s===0&&c===0)return t;var f=t.getSouthWest(),g=t.getNorthEast(),v=new V(f.lat-s,f.lng-c),b=new V(g.lat-s,g.lng-c);return new ut(v,b)}},Dt=i({},Et,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var o=Math.PI/180,s=t.lat*o,c=e.lat*o,f=Math.sin((e.lat-t.lat)*o/2),g=Math.sin((e.lng-t.lng)*o/2),v=f*f+Math.cos(s)*Math.cos(c)*g*g,b=2*Math.atan2(Math.sqrt(v),Math.sqrt(1-v));return this.R*b}}),Ao=6378137,gi={R:Ao,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,o=this.MAX_LATITUDE,s=Math.max(Math.min(o,t.lat),-o),c=Math.sin(s*e);return new O(this.R*t.lng*e,this.R*Math.log((1+c)/(1-c))/2)},unproject:function(t){var e=180/Math.PI;return new V((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(function(){var t=Ao*Math.PI;return new Y([-t,-t],[t,t])})()};function _i(t,e,o,s){if(I(t)){this._a=t[0],this._b=t[1],this._c=t[2],this._d=t[3];return}this._a=t,this._b=e,this._c=o,this._d=s}_i.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new O((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};function ae(t,e,o,s){return new _i(t,e,o,s)}var vi=i({},Dt,{code:"EPSG:3857",projection:gi,transformation:(function(){var t=.5/(Math.PI*gi.R);return ae(t,.5,-t,.5)})()}),ma=i({},vi,{code:"EPSG:900913"});function Mo(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Eo(t,e){var o="",s,c,f,g,v,b;for(s=0,f=t.length;s<f;s++){for(v=t[s],c=0,g=v.length;c<g;c++)b=v[c],o+=(c?"L":"M")+b.x+" "+b.y;o+=e?C.svg?"z":"x":""}return o||"M0 0"}var yi=document.documentElement.style,De="ActiveXObject"in window,ga=De&&!document.addEventListener,To="msLaunchUri"in navigator&&!("documentMode"in document),Li=wt("webkit"),Co=wt("android"),Po=wt("android 2")||wt("android 3"),_a=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),va=Co&&wt("Google")&&_a<537&&!("AudioNode"in window),bi=!!window.opera,So=!To&&wt("chrome"),Io=wt("gecko")&&!Li&&!bi&&!De,ya=!So&&wt("safari"),Do=wt("phantom"),Oo="OTransition"in yi,La=navigator.platform.indexOf("Win")===0,zo=De&&"transition"in yi,wi="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Po,Bo="MozPerspective"in yi,ba=!window.L_DISABLE_3D&&(zo||wi||Bo)&&!Oo&&!Do,se=typeof orientation!="undefined"||wt("mobile"),wa=se&&Li,xa=se&&wi,Ro=!window.PointerEvent&&window.MSPointerEvent,No=!!(window.PointerEvent||Ro),Uo="ontouchstart"in window||!!window.TouchEvent,ka=!window.L_NO_TOUCH&&(Uo||No),Aa=se&&bi,Ma=se&&Io,Ea=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Ta=(function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",y,e),window.removeEventListener("testPassiveEventSupport",y,e)}catch{}return t})(),Ca=(function(){return!!document.createElement("canvas").getContext})(),xi=!!(document.createElementNS&&Mo("svg").createSVGRect),Pa=!!xi&&(function(){var t=document.createElement("div");return t.innerHTML="<svg/>",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),Sa=!xi&&(function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&typeof e.adj=="object"}catch{return!1}})(),Ia=navigator.platform.indexOf("Mac")===0,Da=navigator.platform.indexOf("Linux")===0;function wt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var C={ie:De,ielt9:ga,edge:To,webkit:Li,android:Co,android23:Po,androidStock:va,opera:bi,chrome:So,gecko:Io,safari:ya,phantom:Do,opera12:Oo,win:La,ie3d:zo,webkit3d:wi,gecko3d:Bo,any3d:ba,mobile:se,mobileWebkit:wa,mobileWebkit3d:xa,msPointer:Ro,pointer:No,touch:ka,touchNative:Uo,mobileOpera:Aa,mobileGecko:Ma,retina:Ea,passiveEvents:Ta,canvas:Ca,svg:xi,vml:Sa,inlineSvg:Pa,mac:Ia,linux:Da},Zo=C.msPointer?"MSPointerDown":"pointerdown",Ho=C.msPointer?"MSPointerMove":"pointermove",Fo=C.msPointer?"MSPointerUp":"pointerup",Go=C.msPointer?"MSPointerCancel":"pointercancel",ki={touchstart:Zo,touchmove:Ho,touchend:Fo,touchcancel:Go},Vo={touchstart:Ua,touchmove:Oe,touchend:Oe,touchcancel:Oe},Wt={},Wo=!1;function Oa(t,e,o){return e==="touchstart"&&Na(),Vo[e]?(o=Vo[e].bind(this,o),t.addEventListener(ki[e],o,!1),o):(console.warn("wrong event specified:",e),y)}function za(t,e,o){if(!ki[e]){console.warn("wrong event specified:",e);return}t.removeEventListener(ki[e],o,!1)}function Ba(t){Wt[t.pointerId]=t}function Ra(t){Wt[t.pointerId]&&(Wt[t.pointerId]=t)}function Jo(t){delete Wt[t.pointerId]}function Na(){Wo||(document.addEventListener(Zo,Ba,!0),document.addEventListener(Ho,Ra,!0),document.addEventListener(Fo,Jo,!0),document.addEventListener(Go,Jo,!0),Wo=!0)}function Oe(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){e.touches=[];for(var o in Wt)e.touches.push(Wt[o]);e.changedTouches=[e],t(e)}}function Ua(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&nt(e),Oe(t,e)}function Za(t){var e={},o,s;for(s in t)o=t[s],e[s]=o&&o.bind?o.bind(t):o;return t=e,e.type="dblclick",e.detail=2,e.isTrusted=!1,e._simulated=!0,e}var Ha=200;function Fa(t,e){t.addEventListener("dblclick",e);var o=0,s;function c(f){if(f.detail!==1){s=f.detail;return}if(!(f.pointerType==="mouse"||f.sourceCapabilities&&!f.sourceCapabilities.firesTouchEvents)){var g=Xo(f);if(!(g.some(function(b){return b instanceof HTMLLabelElement&&b.attributes.for})&&!g.some(function(b){return b instanceof HTMLInputElement||b instanceof HTMLSelectElement}))){var v=Date.now();v-o<=Ha?(s++,s===2&&e(Za(f))):s=1,o=v}}}return t.addEventListener("click",c),{dblclick:e,simDblclick:c}}function Ga(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var Ai=Re(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),le=Re(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),jo=le==="webkitTransition"||le==="OTransition"?le+"End":"transitionend";function qo(t){return typeof t=="string"?document.getElementById(t):t}function he(t,e){var o=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!o||o==="auto")&&document.defaultView){var s=document.defaultView.getComputedStyle(t,null);o=s?s[e]:null}return o==="auto"?null:o}function H(t,e,o){var s=document.createElement(t);return s.className=e||"",o&&o.appendChild(s),s}function K(t){var e=t.parentNode;e&&e.removeChild(t)}function ze(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Jt(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function jt(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function Mi(t,e){if(t.classList!==void 0)return t.classList.contains(e);var o=Be(t);return o.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(o)}function B(t,e){if(t.classList!==void 0)for(var o=E(e),s=0,c=o.length;s<c;s++)t.classList.add(o[s]);else if(!Mi(t,e)){var f=Be(t);Ei(t,(f?f+" ":"")+e)}}function X(t,e){t.classList!==void 0?t.classList.remove(e):Ei(t,T((" "+Be(t)+" ").replace(" "+e+" "," ")))}function Ei(t,e){t.className.baseVal===void 0?t.className=e:t.className.baseVal=e}function Be(t){return t.correspondingElement&&(t=t.correspondingElement),t.className.baseVal===void 0?t.className:t.className.baseVal}function _t(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&Va(t,e)}function Va(t,e){var o=!1,s="DXImageTransform.Microsoft.Alpha";try{o=t.filters.item(s)}catch{if(e===1)return}e=Math.round(e*100),o?(o.Enabled=e!==100,o.Opacity=e):t.style.filter+=" progid:"+s+"(opacity="+e+")"}function Re(t){for(var e=document.documentElement.style,o=0;o<t.length;o++)if(t[o]in e)return t[o];return!1}function Rt(t,e,o){var s=e||new O(0,0);t.style[Ai]=(C.ie3d?"translate("+s.x+"px,"+s.y+"px)":"translate3d("+s.x+"px,"+s.y+"px,0)")+(o?" scale("+o+")":"")}function tt(t,e){t._leaflet_pos=e,C.any3d?Rt(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Nt(t){return t._leaflet_pos||new O(0,0)}var ce,de,Ti;if("onselectstart"in document)ce=function(){z(window,"selectstart",nt)},de=function(){W(window,"selectstart",nt)};else{var ue=Re(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ce=function(){if(ue){var t=document.documentElement.style;Ti=t[ue],t[ue]="none"}},de=function(){ue&&(document.documentElement.style[ue]=Ti,Ti=void 0)}}function Ci(){z(window,"dragstart",nt)}function Pi(){W(window,"dragstart",nt)}var Ne,Si;function Ii(t){for(;t.tabIndex===-1;)t=t.parentNode;t.style&&(Ue(),Ne=t,Si=t.style.outlineStyle,t.style.outlineStyle="none",z(window,"keydown",Ue))}function Ue(){Ne&&(Ne.style.outlineStyle=Si,Ne=void 0,Si=void 0,W(window,"keydown",Ue))}function Yo(t){do t=t.parentNode;while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function Di(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Wa={__proto__:null,TRANSFORM:Ai,TRANSITION:le,TRANSITION_END:jo,get:qo,getStyle:he,create:H,remove:K,empty:ze,toFront:Jt,toBack:jt,hasClass:Mi,addClass:B,removeClass:X,setClass:Ei,getClass:Be,setOpacity:_t,testProp:Re,setTransform:Rt,setPosition:tt,getPosition:Nt,get disableTextSelection(){return ce},get enableTextSelection(){return de},disableImageDrag:Ci,enableImageDrag:Pi,preventOutline:Ii,restoreOutline:Ue,getSizedParentNode:Yo,getScale:Di};function z(t,e,o,s){if(e&&typeof e=="object")for(var c in e)zi(t,c,e[c],o);else{e=E(e);for(var f=0,g=e.length;f<g;f++)zi(t,e[f],o,s)}return this}var xt="_leaflet_events";function W(t,e,o,s){if(arguments.length===1)Ko(t),delete t[xt];else if(e&&typeof e=="object")for(var c in e)Bi(t,c,e[c],o);else if(e=E(e),arguments.length===2)Ko(t,function(v){return G(e,v)!==-1});else for(var f=0,g=e.length;f<g;f++)Bi(t,e[f],o,s);return this}function Ko(t,e){for(var o in t[xt]){var s=o.split(/\d/)[0];(!e||e(s))&&Bi(t,s,null,null,o)}}var Oi={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function zi(t,e,o,s){var c=e+p(o)+(s?"_"+p(s):"");if(t[xt]&&t[xt][c])return this;var f=function(v){return o.call(s||t,v||window.event)},g=f;!C.touchNative&&C.pointer&&e.indexOf("touch")===0?f=Oa(t,e,f):C.touch&&e==="dblclick"?f=Fa(t,f):"addEventListener"in t?e==="touchstart"||e==="touchmove"||e==="wheel"||e==="mousewheel"?t.addEventListener(Oi[e]||e,f,C.passiveEvents?{passive:!1}:!1):e==="mouseenter"||e==="mouseleave"?(f=function(v){v=v||window.event,Ni(t,v)&&g(v)},t.addEventListener(Oi[e],f,!1)):t.addEventListener(e,g,!1):t.attachEvent("on"+e,f),t[xt]=t[xt]||{},t[xt][c]=f}function Bi(t,e,o,s,c){c=c||e+p(o)+(s?"_"+p(s):"");var f=t[xt]&&t[xt][c];if(!f)return this;!C.touchNative&&C.pointer&&e.indexOf("touch")===0?za(t,e,f):C.touch&&e==="dblclick"?Ga(t,f):"removeEventListener"in t?t.removeEventListener(Oi[e]||e,f,!1):t.detachEvent("on"+e,f),t[xt][c]=null}function Ut(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ri(t){return zi(t,"wheel",Ut),this}function fe(t){return z(t,"mousedown touchstart dblclick contextmenu",Ut),t._leaflet_disable_click=!0,this}function nt(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Zt(t){return nt(t),Ut(t),this}function Xo(t){if(t.composedPath)return t.composedPath();for(var e=[],o=t.target;o;)e.push(o),o=o.parentNode;return e}function Qo(t,e){if(!e)return new O(t.clientX,t.clientY);var o=Di(e),s=o.boundingClientRect;return new O((t.clientX-s.left)/o.x-e.clientLeft,(t.clientY-s.top)/o.y-e.clientTop)}var Ja=C.linux&&C.chrome?window.devicePixelRatio:C.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function $o(t){return C.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/Ja:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function Ni(t,e){var o=e.relatedTarget;if(!o)return!0;try{for(;o&&o!==t;)o=o.parentNode}catch{return!1}return o!==t}var ja={__proto__:null,on:z,off:W,stopPropagation:Ut,disableScrollPropagation:Ri,disableClickPropagation:fe,preventDefault:nt,stop:Zt,getPropagationPath:Xo,getMousePosition:Qo,getWheelDelta:$o,isExternalTarget:Ni,addListener:z,removeListener:W},tn=re.extend({run:function(t,e,o,s){this.stop(),this._el=t,this._inProgress=!0,this._duration=o||.25,this._easeOutPower=1/Math.max(s||.5,.2),this._startPos=Nt(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=st(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,o=this._duration*1e3;e<o?this._runFrame(this._easeOut(e/o),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var o=this._startPos.add(this._offset.multiplyBy(t));e&&o._round(),tt(this._el,o),this.fire("step")},_complete:function(){lt(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Z=re.extend({options:{crs:vi,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=A(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=l(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.zoom!==void 0&&(this._zoom=this._limitZoom(e.zoom)),e.center&&e.zoom!==void 0&&this.setView(U(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=le&&C.any3d&&!C.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),z(this._proxy,jo,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,o){if(e=e===void 0?this._zoom:this._limitZoom(e),t=this._limitCenter(U(t),e,this.options.maxBounds),o=o||{},this._stop(),this._loaded&&!o.reset&&o!==!0){o.animate!==void 0&&(o.zoom=i({animate:o.animate},o.zoom),o.pan=i({animate:o.animate,duration:o.duration},o.pan));var s=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,o.zoom):this._tryAnimatedPan(t,o.pan);if(s)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e,o.pan&&o.pan.noMoveStart),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(C.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(C.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,o){var s=this.getZoomScale(e),c=this.getSize().divideBy(2),f=t instanceof O?t:this.latLngToContainerPoint(t),g=f.subtract(c).multiplyBy(1-1/s),v=this.containerPointToLatLng(c.add(g));return this.setView(v,e,{zoom:o})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():$(t);var o=D(e.paddingTopLeft||e.padding||[0,0]),s=D(e.paddingBottomRight||e.padding||[0,0]),c=this.getBoundsZoom(t,!1,o.add(s));if(c=typeof e.maxZoom=="number"?Math.min(e.maxZoom,c):c,c===1/0)return{center:t.getCenter(),zoom:c};var f=s.subtract(o).divideBy(2),g=this.project(t.getSouthWest(),c),v=this.project(t.getNorthEast(),c),b=this.unproject(g.add(v).divideBy(2).add(f),c);return{center:b,zoom:c}},fitBounds:function(t,e){if(t=$(t),!t.isValid())throw new Error("Bounds are not valid.");var o=this._getBoundsCenterZoom(t,e);return this.setView(o.center,o.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=D(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(e.animate!==!0&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new tn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){B(this._mapPane,"leaflet-pan-anim");var o=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,o,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,o){if(o=o||{},o.animate===!1||!C.any3d)return this.setView(t,e,o);this._stop();var s=this.project(this.getCenter()),c=this.project(t),f=this.getSize(),g=this._zoom;t=U(t),e=e===void 0?g:e;var v=Math.max(f.x,f.y),b=v*this.getZoomScale(g,e),x=c.distanceTo(s)||1,M=1.42,S=M*M;function R(et){var Xe=et?-1:1,zs=et?b:v,Bs=b*b-v*v+Xe*S*S*x*x,Rs=2*zs*S*x,Yi=Bs/Rs,zn=Math.sqrt(Yi*Yi+1)-Yi,Ns=zn<1e-9?-18:Math.log(zn);return Ns}function ht(et){return(Math.exp(et)-Math.exp(-et))/2}function it(et){return(Math.exp(et)+Math.exp(-et))/2}function yt(et){return ht(et)/it(et)}var ft=R(0);function $t(et){return v*(it(ft)/it(ft+M*et))}function Ss(et){return v*(it(ft)*yt(ft+M*et)-ht(ft))/S}function Is(et){return 1-Math.pow(1-et,1.5)}var Ds=Date.now(),Dn=(R(1)-ft)/M,Os=o.duration?1e3*o.duration:1e3*Dn*.8;function On(){var et=(Date.now()-Ds)/Os,Xe=Is(et)*Dn;et<=1?(this._flyToFrame=st(On,this),this._move(this.unproject(s.add(c.subtract(s).multiplyBy(Ss(Xe)/x)),g),this.getScaleZoom(v/$t(Xe),g),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,o.noMoveStart),On.call(this),this},flyToBounds:function(t,e){var o=this._getBoundsCenterZoom(t,e);return this.flyTo(o.center,o.zoom,e)},setMaxBounds:function(t){return t=$(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var o=this.getCenter(),s=this._limitCenter(o,this._zoom,$(t));return o.equals(s)||this.panTo(s,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var o=D(e.paddingTopLeft||e.padding||[0,0]),s=D(e.paddingBottomRight||e.padding||[0,0]),c=this.project(this.getCenter()),f=this.project(t),g=this.getPixelBounds(),v=dt([g.min.add(o),g.max.subtract(s)]),b=v.getSize();if(!v.contains(f)){this._enforcingBounds=!0;var x=f.subtract(v.getCenter()),M=v.extend(f).getSize().subtract(b);c.x+=x.x<0?-M.x:M.x,c.y+=x.y<0?-M.y:M.y,this.panTo(this.unproject(c),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),s=e.divideBy(2).round(),c=o.divideBy(2).round(),f=s.subtract(c);return!f.x&&!f.y?this:(t.animate&&t.pan?this.panBy(f):(t.pan&&this._rawPanBy(f),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(l(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:o}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=l(this._handleGeolocationResponse,this),o=l(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,o,t):navigator.geolocation.getCurrentPosition(e,o,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,o=t.message||(e===1?"permission denied":e===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+o+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=t.coords.latitude,o=t.coords.longitude,s=new V(e,o),c=s.toBounds(t.coords.accuracy*2),f=this._locateOptions;if(f.setView){var g=this.getBoundsZoom(c);this.setView(s,f.maxZoom?Math.min(g,f.maxZoom):g)}var v={latlng:s,bounds:c,timestamp:t.timestamp};for(var b in t.coords)typeof t.coords[b]=="number"&&(v[b]=t.coords[b]);this.fire("locationfound",v)}},addHandler:function(t,e){if(!e)return this;var o=this[t]=new e(this);return this._handlers.push(o),this.options[t]&&o.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),K(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(lt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)K(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var o="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),s=H("div",o,e||this._mapPane);return t&&(this._panes[t]=s),s},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),o=this.unproject(t.getTopRight());return new ut(e,o)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,o){t=$(t),o=D(o||[0,0]);var s=this.getZoom()||0,c=this.getMinZoom(),f=this.getMaxZoom(),g=t.getNorthWest(),v=t.getSouthEast(),b=this.getSize().subtract(o),x=dt(this.project(v,s),this.project(g,s)).getSize(),M=C.any3d?this.options.zoomSnap:1,S=b.x/x.x,R=b.y/x.y,ht=e?Math.max(S,R):Math.min(S,R);return s=this.getScaleZoom(ht,s),M&&(s=Math.round(s/(M/100))*(M/100),s=e?Math.ceil(s/M)*M:Math.floor(s/M)*M),Math.max(c,Math.min(f,s))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new O(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var o=this._getTopLeftPoint(t,e);return new Y(o,o.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var o=this.options.crs;return e=e===void 0?this._zoom:e,o.scale(t)/o.scale(e)},getScaleZoom:function(t,e){var o=this.options.crs;e=e===void 0?this._zoom:e;var s=o.zoom(t*o.scale(e));return isNaN(s)?1/0:s},project:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.latLngToPoint(U(t),e)},unproject:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.pointToLatLng(D(t),e)},layerPointToLatLng:function(t){var e=D(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(U(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(U(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds($(t))},distance:function(t,e){return this.options.crs.distance(U(t),U(e))},containerPointToLayerPoint:function(t){return D(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return D(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(D(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(U(t)))},mouseEventToContainerPoint:function(t){return Qo(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=qo(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");z(e,"scroll",this._onScroll,this),this._containerId=p(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&C.any3d,B(t,"leaflet-container"+(C.touch?" leaflet-touch":"")+(C.retina?" leaflet-retina":"")+(C.ielt9?" leaflet-oldie":"")+(C.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=he(t,"position");e!=="absolute"&&e!=="relative"&&e!=="fixed"&&e!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),tt(this._mapPane,new O(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(B(t.markerPane,"leaflet-zoom-hide"),B(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,o){tt(this._mapPane,new O(0,0));var s=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var c=this._zoom!==e;this._moveStart(c,o)._move(t,e)._moveEnd(c),this.fire("viewreset"),s&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,o,s){e===void 0&&(e=this._zoom);var c=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),s?o&&o.pinch&&this.fire("zoom",o):((c||o&&o.pinch)&&this.fire("zoom",o),this.fire("move",o)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return lt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){tt(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[p(this._container)]=this;var e=t?W:z;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),C.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){lt(this._resizeRequest),this._resizeRequest=st(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var o=[],s,c=e==="mouseout"||e==="mouseover",f=t.target||t.srcElement,g=!1;f;){if(s=this._targets[p(f)],s&&(e==="click"||e==="preclick")&&this._draggableMoved(s)){g=!0;break}if(s&&s.listens(e,!0)&&(c&&!Ni(f,t)||(o.push(s),c))||f===this._container)break;f=f.parentNode}return!o.length&&!g&&!c&&this.listens(e,!0)&&(o=[this]),o},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(e))){var o=t.type;o==="mousedown"&&Ii(e),this._fireDOMEvent(t,o)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,o){if(t.type==="click"){var s=i({},t);s.type="preclick",this._fireDOMEvent(s,s.type,o)}var c=this._findEventTargets(t,e);if(o){for(var f=[],g=0;g<o.length;g++)o[g].listens(e,!0)&&f.push(o[g]);c=f.concat(c)}if(c.length){e==="contextmenu"&&nt(t);var v=c[0],b={originalEvent:t};if(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"){var x=v.getLatLng&&(!v._radius||v._radius<=10);b.containerPoint=x?this.latLngToContainerPoint(v.getLatLng()):this.mouseEventToContainerPoint(t),b.layerPoint=this.containerPointToLayerPoint(b.containerPoint),b.latlng=x?v.getLatLng():this.layerPointToLatLng(b.layerPoint)}for(g=0;g<c.length;g++)if(c[g].fire(e,b,!0),b.originalEvent._stopped||c[g].options.bubblingMouseEvents===!1&&G(this._mouseEvents,e)!==-1)return}},_draggableMoved:function(t){return t=t.dragging&&t.dragging.enabled()?t:this,t.dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Nt(this._mapPane)||new O(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var o=t&&e!==void 0?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return o.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var o=this.getSize()._divideBy(2);return this.project(t,e)._subtract(o)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,o){var s=this._getNewPixelOrigin(o,e);return this.project(t,e)._subtract(s)},_latLngBoundsToNewLayerBounds:function(t,e,o){var s=this._getNewPixelOrigin(o,e);return dt([this.project(t.getSouthWest(),e)._subtract(s),this.project(t.getNorthWest(),e)._subtract(s),this.project(t.getSouthEast(),e)._subtract(s),this.project(t.getNorthEast(),e)._subtract(s)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,o){if(!o)return t;var s=this.project(t,e),c=this.getSize().divideBy(2),f=new Y(s.subtract(c),s.add(c)),g=this._getBoundsOffset(f,o,e);return Math.abs(g.x)<=1&&Math.abs(g.y)<=1?t:this.unproject(s.add(g),e)},_limitOffset:function(t,e){if(!e)return t;var o=this.getPixelBounds(),s=new Y(o.min.add(t),o.max.add(t));return t.add(this._getBoundsOffset(s,e))},_getBoundsOffset:function(t,e,o){var s=dt(this.project(e.getNorthEast(),o),this.project(e.getSouthWest(),o)),c=s.min.subtract(t.min),f=s.max.subtract(t.max),g=this._rebound(c.x,-f.x),v=this._rebound(c.y,-f.y);return new O(g,v)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),o=this.getMaxZoom(),s=C.any3d?this.options.zoomSnap:1;return s&&(t=Math.round(t/s)*s),Math.max(e,Math.min(o,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){X(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var o=this._getCenterOffset(t)._trunc();return(e&&e.animate)!==!0&&!this.getSize().contains(o)?!1:(this.panBy(o,e),!0)},_createAnimProxy:function(){var t=this._proxy=H("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var o=Ai,s=this._proxy.style[o];Rt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),s===this._proxy.style[o]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){K(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Rt(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,o){if(this._animatingZoom)return!0;if(o=o||{},!this._zoomAnimated||o.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var s=this.getZoomScale(e),c=this._getCenterOffset(t)._divideBy(1-1/s);return o.animate!==!0&&!this.getSize().contains(c)?!1:(st(function(){this._moveStart(!0,o.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,o,s){this._mapPane&&(o&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,B(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:s}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(l(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&X(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function qa(t,e){return new Z(t,e)}var Lt=gt.extend({options:{position:"topright"},initialize:function(t){A(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),o=this.getPosition(),s=t._controlCorners[o];return B(e,"leaflet-control"),o.indexOf("bottom")!==-1?s.insertBefore(e,s.firstChild):s.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(K(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),pe=function(t){return new Lt(t)};Z.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",o=this._controlContainer=H("div",e+"control-container",this._container);function s(c,f){var g=e+c+" "+e+f;t[c+f]=H("div",g,o)}s("top","left"),s("top","right"),s("bottom","left"),s("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)K(this._controlCorners[t]);K(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var en=Lt.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,o,s){return o<s?-1:s<o?1:0}},initialize:function(t,e,o){A(this,o),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var s in t)this._addLayer(t[s],s);for(s in e)this._addLayer(e[s],s,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Lt.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(p(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){B(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(B(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):X(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return X(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=H("div",t),o=this.options.collapsed;e.setAttribute("aria-haspopup",!0),fe(e),Ri(e);var s=this._section=H("section",t+"-list");o&&(this._map.on("click",this.collapse,this),z(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var c=this._layersLink=H("a",t+"-toggle",e);c.href="#",c.title="Layers",c.setAttribute("role","button"),z(c,{keydown:function(f){f.keyCode===13&&this._expandSafely()},click:function(f){nt(f),this._expandSafely()}},this),o||this.expand(),this._baseLayersList=H("div",t+"-base",s),this._separator=H("div",t+"-separator",s),this._overlaysList=H("div",t+"-overlays",s),e.appendChild(s)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&p(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,o){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:o}),this.options.sortLayers&&this._layers.sort(l(function(s,c){return this.options.sortFunction(s.layer,c.layer,s.name,c.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ze(this._baseLayersList),ze(this._overlaysList),this._layerControlInputs=[];var t,e,o,s,c=0;for(o=0;o<this._layers.length;o++)s=this._layers[o],this._addItem(s),e=e||s.overlay,t=t||!s.overlay,c+=s.overlay?0:1;return this.options.hideSingleBase&&(t=t&&c>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(p(t.target)),o=e.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;o&&this._map.fire(o,e)},_createRadioElement:function(t,e){var o='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",s=document.createElement("div");return s.innerHTML=o,s.firstChild},_addItem:function(t){var e=document.createElement("label"),o=this._map.hasLayer(t.layer),s;t.overlay?(s=document.createElement("input"),s.type="checkbox",s.className="leaflet-control-layers-selector",s.defaultChecked=o):s=this._createRadioElement("leaflet-base-layers_"+p(this),o),this._layerControlInputs.push(s),s.layerId=p(t.layer),z(s,"click",this._onInputClick,this);var c=document.createElement("span");c.innerHTML=" "+t.name;var f=document.createElement("span");e.appendChild(f),f.appendChild(s),f.appendChild(c);var g=t.overlay?this._overlaysList:this._baseLayersList;return g.appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,e,o,s=[],c=[];this._handlingClick=!0;for(var f=t.length-1;f>=0;f--)e=t[f],o=this._getLayer(e.layerId).layer,e.checked?s.push(o):e.checked||c.push(o);for(f=0;f<c.length;f++)this._map.hasLayer(c[f])&&this._map.removeLayer(c[f]);for(f=0;f<s.length;f++)this._map.hasLayer(s[f])||this._map.addLayer(s[f]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t=this._layerControlInputs,e,o,s=this._map.getZoom(),c=t.length-1;c>=0;c--)e=t[c],o=this._getLayer(e.layerId).layer,e.disabled=o.options.minZoom!==void 0&&s<o.options.minZoom||o.options.maxZoom!==void 0&&s>o.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,z(t,"click",nt),this.expand();var e=this;setTimeout(function(){W(t,"click",nt),e._preventClick=!1})}}),Ya=function(t,e,o){return new en(t,e,o)},Ui=Lt.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",o=H("div",e+" leaflet-bar"),s=this.options;return this._zoomInButton=this._createButton(s.zoomInText,s.zoomInTitle,e+"-in",o,this._zoomIn),this._zoomOutButton=this._createButton(s.zoomOutText,s.zoomOutTitle,e+"-out",o,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),o},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,o,s,c){var f=H("a",o,s);return f.innerHTML=t,f.href="#",f.title=e,f.setAttribute("role","button"),f.setAttribute("aria-label",e),fe(f),z(f,"click",Zt),z(f,"click",c,this),z(f,"click",this._refocusOnMap,this),f},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";X(this._zoomInButton,e),X(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(B(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(B(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});Z.mergeOptions({zoomControl:!0}),Z.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ui,this.addControl(this.zoomControl))});var Ka=function(t){return new Ui(t)},on=Lt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",o=H("div",e),s=this.options;return this._addScales(s,e+"-line",o),t.on(s.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),o},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,o){t.metric&&(this._mScale=H("div",e,o)),t.imperial&&(this._iScale=H("div",e,o))},_update:function(){var t=this._map,e=t.getSize().y/2,o=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(o)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),o=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,o,e/t)},_updateImperial:function(t){var e=t*3.2808399,o,s,c;e>5280?(o=e/5280,s=this._getRoundNum(o),this._updateScale(this._iScale,s+" mi",s/o)):(c=this._getRoundNum(e),this._updateScale(this._iScale,c+" ft",c/e))},_updateScale:function(t,e,o){t.style.width=Math.round(this.options.maxWidth*o)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),o=t/e;return o=o>=10?10:o>=5?5:o>=3?3:o>=2?2:1,e*o}}),Xa=function(t){return new on(t)},Qa='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',Zi=Lt.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(C.inlineSvg?Qa+" ":"")+"Leaflet</a>"},initialize:function(t){A(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=H("div","leaflet-control-attribution"),fe(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var o=[];this.options.prefix&&o.push(this.options.prefix),t.length&&o.push(t.join(", ")),this._container.innerHTML=o.join(' <span aria-hidden="true">|</span> ')}}});Z.mergeOptions({attributionControl:!0}),Z.addInitHook(function(){this.options.attributionControl&&new Zi().addTo(this)});var $a=function(t){return new Zi(t)};Lt.Layers=en,Lt.Zoom=Ui,Lt.Scale=on,Lt.Attribution=Zi,pe.layers=Ya,pe.zoom=Ka,pe.scale=Xa,pe.attribution=$a;var kt=gt.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});kt.addTo=function(t,e){return t.addHandler(e,this),this};var ts={Events:mt},nn=C.touch?"touchstart mousedown":"mousedown",Ot=re.extend({options:{clickTolerance:3},initialize:function(t,e,o,s){A(this,s),this._element=t,this._dragStartTarget=e||t,this._preventOutline=o},enable:function(){this._enabled||(z(this._dragStartTarget,nn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ot._dragging===this&&this.finishDrag(!0),W(this._dragStartTarget,nn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!Mi(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){Ot._dragging===this&&this.finishDrag();return}if(!(Ot._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(Ot._dragging=this,this._preventOutline&&Ii(this._element),Ci(),ce(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t,o=Yo(this._element);this._startPoint=new O(e.clientX,e.clientY),this._startPos=Nt(this._element),this._parentScale=Di(o);var s=t.type==="mousedown";z(document,s?"mousemove":"touchmove",this._onMove,this),z(document,s?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var e=t.touches&&t.touches.length===1?t.touches[0]:t,o=new O(e.clientX,e.clientY)._subtract(this._startPoint);!o.x&&!o.y||Math.abs(o.x)+Math.abs(o.y)<this.options.clickTolerance||(o.x/=this._parentScale.x,o.y/=this._parentScale.y,nt(t),this._moved||(this.fire("dragstart"),this._moved=!0,B(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),B(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(o),this._moving=!0,this._lastEvent=t,this._updatePosition())}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),tt(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){X(document.body,"leaflet-dragging"),this._lastTarget&&(X(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),W(document,"mousemove touchmove",this._onMove,this),W(document,"mouseup touchend touchcancel",this._onUp,this),Pi(),de();var e=this._moved&&this._moving;this._moving=!1,Ot._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function rn(t,e,o){var s,c=[1,4,2,8],f,g,v,b,x,M,S,R;for(f=0,M=t.length;f<M;f++)t[f]._code=Ht(t[f],e);for(v=0;v<4;v++){for(S=c[v],s=[],f=0,M=t.length,g=M-1;f<M;g=f++)b=t[f],x=t[g],b._code&S?x._code&S||(R=Ze(x,b,S,e,o),R._code=Ht(R,e),s.push(R)):(x._code&S&&(R=Ze(x,b,S,e,o),R._code=Ht(R,e),s.push(R)),s.push(b));t=s}return t}function an(t,e){var o,s,c,f,g,v,b,x,M;if(!t||t.length===0)throw new Error("latlngs not passed");vt(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var S=U([0,0]),R=$(t),ht=R.getNorthWest().distanceTo(R.getSouthWest())*R.getNorthEast().distanceTo(R.getNorthWest());ht<1700&&(S=Hi(t));var it=t.length,yt=[];for(o=0;o<it;o++){var ft=U(t[o]);yt.push(e.project(U([ft.lat-S.lat,ft.lng-S.lng])))}for(v=b=x=0,o=0,s=it-1;o<it;s=o++)c=yt[o],f=yt[s],g=c.y*f.x-f.y*c.x,b+=(c.x+f.x)*g,x+=(c.y+f.y)*g,v+=g*3;v===0?M=yt[0]:M=[b/v,x/v];var $t=e.unproject(D(M));return U([$t.lat+S.lat,$t.lng+S.lng])}function Hi(t){for(var e=0,o=0,s=0,c=0;c<t.length;c++){var f=U(t[c]);e+=f.lat,o+=f.lng,s++}return U([e/s,o/s])}var es={__proto__:null,clipPolygon:rn,polygonCenter:an,centroid:Hi};function sn(t,e){if(!e||!t.length)return t.slice();var o=e*e;return t=ns(t,o),t=os(t,o),t}function ln(t,e,o){return Math.sqrt(me(t,e,o,!0))}function is(t,e,o){return me(t,e,o)}function os(t,e){var o=t.length,s=typeof Uint8Array!="undefined"?Uint8Array:Array,c=new s(o);c[0]=c[o-1]=1,Fi(t,c,e,0,o-1);var f,g=[];for(f=0;f<o;f++)c[f]&&g.push(t[f]);return g}function Fi(t,e,o,s,c){var f=0,g,v,b;for(v=s+1;v<=c-1;v++)b=me(t[v],t[s],t[c],!0),b>f&&(g=v,f=b);f>o&&(e[g]=1,Fi(t,e,o,s,g),Fi(t,e,o,g,c))}function ns(t,e){for(var o=[t[0]],s=1,c=0,f=t.length;s<f;s++)rs(t[s],t[c])>e&&(o.push(t[s]),c=s);return c<f-1&&o.push(t[f-1]),o}var hn;function cn(t,e,o,s,c){var f=s?hn:Ht(t,o),g=Ht(e,o),v,b,x;for(hn=g;;){if(!(f|g))return[t,e];if(f&g)return!1;v=f||g,b=Ze(t,e,v,o,c),x=Ht(b,o),v===f?(t=b,f=x):(e=b,g=x)}}function Ze(t,e,o,s,c){var f=e.x-t.x,g=e.y-t.y,v=s.min,b=s.max,x,M;return o&8?(x=t.x+f*(b.y-t.y)/g,M=b.y):o&4?(x=t.x+f*(v.y-t.y)/g,M=v.y):o&2?(x=b.x,M=t.y+g*(b.x-t.x)/f):o&1&&(x=v.x,M=t.y+g*(v.x-t.x)/f),new O(x,M,c)}function Ht(t,e){var o=0;return t.x<e.min.x?o|=1:t.x>e.max.x&&(o|=2),t.y<e.min.y?o|=4:t.y>e.max.y&&(o|=8),o}function rs(t,e){var o=e.x-t.x,s=e.y-t.y;return o*o+s*s}function me(t,e,o,s){var c=e.x,f=e.y,g=o.x-c,v=o.y-f,b=g*g+v*v,x;return b>0&&(x=((t.x-c)*g+(t.y-f)*v)/b,x>1?(c=o.x,f=o.y):x>0&&(c+=g*x,f+=v*x)),g=t.x-c,v=t.y-f,s?g*g+v*v:new O(c,f)}function vt(t){return!I(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]!="undefined"}function dn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),vt(t)}function un(t,e){var o,s,c,f,g,v,b,x;if(!t||t.length===0)throw new Error("latlngs not passed");vt(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var M=U([0,0]),S=$(t),R=S.getNorthWest().distanceTo(S.getSouthWest())*S.getNorthEast().distanceTo(S.getNorthWest());R<1700&&(M=Hi(t));var ht=t.length,it=[];for(o=0;o<ht;o++){var yt=U(t[o]);it.push(e.project(U([yt.lat-M.lat,yt.lng-M.lng])))}for(o=0,s=0;o<ht-1;o++)s+=it[o].distanceTo(it[o+1])/2;if(s===0)x=it[0];else for(o=0,f=0;o<ht-1;o++)if(g=it[o],v=it[o+1],c=g.distanceTo(v),f+=c,f>s){b=(f-s)/c,x=[v.x-b*(v.x-g.x),v.y-b*(v.y-g.y)];break}var ft=e.unproject(D(x));return U([ft.lat+M.lat,ft.lng+M.lng])}var as={__proto__:null,simplify:sn,pointToSegmentDistance:ln,closestPointOnSegment:is,clipSegment:cn,_getEdgeIntersection:Ze,_getBitCode:Ht,_sqClosestPointOnSegment:me,isFlat:vt,_flat:dn,polylineCenter:un},Gi={project:function(t){return new O(t.lng,t.lat)},unproject:function(t){return new V(t.y,t.x)},bounds:new Y([-180,-90],[180,90])},Vi={R:6378137,R_MINOR:6356752314245179e-9,bounds:new Y([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var e=Math.PI/180,o=this.R,s=t.lat*e,c=this.R_MINOR/o,f=Math.sqrt(1-c*c),g=f*Math.sin(s),v=Math.tan(Math.PI/4-s/2)/Math.pow((1-g)/(1+g),f/2);return s=-o*Math.log(Math.max(v,1e-10)),new O(t.lng*e*o,s)},unproject:function(t){for(var e=180/Math.PI,o=this.R,s=this.R_MINOR/o,c=Math.sqrt(1-s*s),f=Math.exp(-t.y/o),g=Math.PI/2-2*Math.atan(f),v=0,b=.1,x;v<15&&Math.abs(b)>1e-7;v++)x=c*Math.sin(g),x=Math.pow((1-x)/(1+x),c/2),b=Math.PI/2-2*Math.atan(f*x)-g,g+=b;return new V(g*e,t.x*e/o)}},ss={__proto__:null,LonLat:Gi,Mercator:Vi,SphericalMercator:gi},ls=i({},Dt,{code:"EPSG:3395",projection:Vi,transformation:(function(){var t=.5/(Math.PI*Vi.R);return ae(t,.5,-t,.5)})()}),fn=i({},Dt,{code:"EPSG:4326",projection:Gi,transformation:ae(1/180,1,-1/180,.5)}),hs=i({},Et,{projection:Gi,transformation:ae(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var o=e.lng-t.lng,s=e.lat-t.lat;return Math.sqrt(o*o+s*s)},infinite:!0});Et.Earth=Dt,Et.EPSG3395=ls,Et.EPSG3857=vi,Et.EPSG900913=ma,Et.EPSG4326=fn,Et.Simple=hs;var bt=re.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[p(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[p(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var o=this.getEvents();e.on(o,this),this.once("remove",function(){e.off(o,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});Z.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=p(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=p(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return p(t)in this._layers},eachLayer:function(t,e){for(var o in this._layers)t.call(e,this._layers[o]);return this},_addLayers:function(t){t=t?I(t)?t:[t]:[];for(var e=0,o=t.length;e<o;e++)this.addLayer(t[e])},_addZoomLimit:function(t){(!isNaN(t.options.maxZoom)||!isNaN(t.options.minZoom))&&(this._zoomBoundLayers[p(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=p(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,o=this._getZoomSpan();for(var s in this._zoomBoundLayers){var c=this._zoomBoundLayers[s].options;t=c.minZoom===void 0?t:Math.min(t,c.minZoom),e=c.maxZoom===void 0?e:Math.max(e,c.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,o!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var qt=bt.extend({initialize:function(t,e){A(this,e),this._layers={};var o,s;if(t)for(o=0,s=t.length;o<s;o++)this.addLayer(t[o])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){var e=typeof t=="number"?t:this.getLayerId(t);return e in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e=Array.prototype.slice.call(arguments,1),o,s;for(o in this._layers)s=this._layers[o],s[t]&&s[t].apply(s,e);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var o in this._layers)t.call(e,this._layers[o]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return p(t)}}),cs=function(t,e){return new qt(t,e)},Tt=qt.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),qt.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),qt.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new ut;for(var e in this._layers){var o=this._layers[e];t.extend(o.getBounds?o.getBounds():o.getLatLng())}return t}}),ds=function(t,e){return new Tt(t,e)},Yt=gt.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){A(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var o=this._getIconUrl(t);if(!o){if(t==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var s=this._createImg(o,e&&e.tagName==="IMG"?e:null);return this._setIconStyles(s,t),(this.options.crossOrigin||this.options.crossOrigin==="")&&(s.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),s},_setIconStyles:function(t,e){var o=this.options,s=o[e+"Size"];typeof s=="number"&&(s=[s,s]);var c=D(s),f=D(e==="shadow"&&o.shadowAnchor||o.iconAnchor||c&&c.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(o.className||""),f&&(t.style.marginLeft=-f.x+"px",t.style.marginTop=-f.y+"px"),c&&(t.style.width=c.x+"px",t.style.height=c.y+"px")},_createImg:function(t,e){return e=e||document.createElement("img"),e.src=t,e},_getIconUrl:function(t){return C.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function us(t){return new Yt(t)}var ge=Yt.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return typeof ge.imagePath!="string"&&(ge.imagePath=this._detectIconPath()),(this.options.imagePath||ge.imagePath)+Yt.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(o,s,c){var f=s.exec(o);return f&&f[c]};return t=e(t,/^url\((['"])?(.+)\1\)$/,2),t&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=H("div","leaflet-default-icon-path",document.body),e=he(t,"background-image")||he(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e),e)return e;var o=document.querySelector('link[href$="leaflet.css"]');return o?o.href.substring(0,o.href.length-11-1):""}}),pn=kt.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Ot(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),B(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&X(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,o=e._map,s=this._marker.options.autoPanSpeed,c=this._marker.options.autoPanPadding,f=Nt(e._icon),g=o.getPixelBounds(),v=o.getPixelOrigin(),b=dt(g.min._subtract(v).add(c),g.max._subtract(v).subtract(c));if(!b.contains(f)){var x=D((Math.max(b.max.x,f.x)-b.max.x)/(g.max.x-b.max.x)-(Math.min(b.min.x,f.x)-b.min.x)/(g.min.x-b.min.x),(Math.max(b.max.y,f.y)-b.max.y)/(g.max.y-b.max.y)-(Math.min(b.min.y,f.y)-b.min.y)/(g.min.y-b.min.y)).multiplyBy(s);o.panBy(x,{animate:!1}),this._draggable._newPos._add(x),this._draggable._startPos._add(x),tt(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=st(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(lt(this._panRequest),this._panRequest=st(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,o=e._shadow,s=Nt(e._icon),c=e._map.layerPointToLatLng(s);o&&tt(o,s),e._latlng=c,t.latlng=c,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){lt(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),He=bt.extend({options:{icon:new ge,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){A(this,e),this._latlng=U(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=U(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),o=t.icon.createIcon(this._icon),s=!1;o!==this._icon&&(this._icon&&this._removeIcon(),s=!0,t.title&&(o.title=t.title),o.tagName==="IMG"&&(o.alt=t.alt||"")),B(o,e),t.keyboard&&(o.tabIndex="0",o.setAttribute("role","button")),this._icon=o,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&z(o,"focus",this._panOnFocus,this);var c=t.icon.createShadow(this._shadow),f=!1;c!==this._shadow&&(this._removeShadow(),f=!0),c&&(B(c,e),c.alt=""),this._shadow=c,t.opacity<1&&this._updateOpacity(),s&&this.getPane().appendChild(this._icon),this._initInteraction(),c&&f&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&W(this._icon,"focus",this._panOnFocus,this),K(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&K(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&tt(this._icon,t),this._shadow&&tt(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(B(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),pn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new pn(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&_t(this._icon,t),this._shadow&&_t(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,o=e.iconSize?D(e.iconSize):D(0,0),s=e.iconAnchor?D(e.iconAnchor):D(0,0);t.panInside(this._latlng,{paddingTopLeft:s,paddingBottomRight:o.subtract(s)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function fs(t,e){return new He(t,e)}var zt=bt.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return A(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Fe=zt.extend({options:{fill:!0,radius:10},initialize:function(t,e){A(this,e),this._latlng=U(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=U(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return zt.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,o=this._clickTolerance(),s=[t+o,e+o];this._pxBounds=new Y(this._point.subtract(s),this._point.add(s))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function ps(t,e){return new Fe(t,e)}var Wi=Fe.extend({initialize:function(t,e,o){if(typeof e=="number"&&(e=i({},o,{radius:e})),A(this,e),this._latlng=U(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new ut(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:zt.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,o=this._map,s=o.options.crs;if(s.distance===Dt.distance){var c=Math.PI/180,f=this._mRadius/Dt.R/c,g=o.project([e+f,t]),v=o.project([e-f,t]),b=g.add(v).divideBy(2),x=o.unproject(b).lat,M=Math.acos((Math.cos(f*c)-Math.sin(e*c)*Math.sin(x*c))/(Math.cos(e*c)*Math.cos(x*c)))/c;(isNaN(M)||M===0)&&(M=f/Math.cos(Math.PI/180*e)),this._point=b.subtract(o.getPixelOrigin()),this._radius=isNaN(M)?0:b.x-o.project([x,t-M]).x,this._radiusY=b.y-g.y}else{var S=s.unproject(s.project(this._latlng).subtract([this._mRadius,0]));this._point=o.latLngToLayerPoint(this._latlng),this._radius=this._point.x-o.latLngToLayerPoint(S).x}this._updateBounds()}});function ms(t,e,o){return new Wi(t,e,o)}var Ct=zt.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){A(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e=1/0,o=null,s=me,c,f,g=0,v=this._parts.length;g<v;g++)for(var b=this._parts[g],x=1,M=b.length;x<M;x++){c=b[x-1],f=b[x];var S=s(t,c,f,!0);S<e&&(e=S,o=s(t,c,f))}return o&&(o.distance=Math.sqrt(e)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return un(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=U(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new ut,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return vt(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],o=vt(t),s=0,c=t.length;s<c;s++)o?(e[s]=U(t[s]),this._bounds.extend(e[s])):e[s]=this._convertLatLngs(t[s]);return e},_project:function(){var t=new Y;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new O(t,t);this._rawPxBounds&&(this._pxBounds=new Y([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,o){var s=t[0]instanceof V,c=t.length,f,g;if(s){for(g=[],f=0;f<c;f++)g[f]=this._map.latLngToLayerPoint(t[f]),o.extend(g[f]);e.push(g)}else for(f=0;f<c;f++)this._projectLatlngs(t[f],e,o)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}var e=this._parts,o,s,c,f,g,v,b;for(o=0,c=0,f=this._rings.length;o<f;o++)for(b=this._rings[o],s=0,g=b.length;s<g-1;s++)v=cn(b[s],b[s+1],t,s,!0),v&&(e[c]=e[c]||[],e[c].push(v[0]),(v[1]!==b[s+1]||s===g-2)&&(e[c].push(v[1]),c++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,o=0,s=t.length;o<s;o++)t[o]=sn(t[o],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var o,s,c,f,g,v,b=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,f=this._parts.length;o<f;o++)for(v=this._parts[o],s=0,g=v.length,c=g-1;s<g;c=s++)if(!(!e&&s===0)&&ln(t,v[c],v[s])<=b)return!0;return!1}});function gs(t,e){return new Ct(t,e)}Ct._flat=dn;var Kt=Ct.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return an(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=Ct.prototype._convertLatLngs.call(this,t),o=e.length;return o>=2&&e[0]instanceof V&&e[0].equals(e[o-1])&&e.pop(),e},_setLatLngs:function(t){Ct.prototype._setLatLngs.call(this,t),vt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return vt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,o=new O(e,e);if(t=new Y(t.min.subtract(o),t.max.add(o)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var s=0,c=this._rings.length,f;s<c;s++)f=rn(this._rings[s],t,!0),f.length&&this._parts.push(f)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e=!1,o,s,c,f,g,v,b,x;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(f=0,b=this._parts.length;f<b;f++)for(o=this._parts[f],g=0,x=o.length,v=x-1;g<x;v=g++)s=o[g],c=o[v],s.y>t.y!=c.y>t.y&&t.x<(c.x-s.x)*(t.y-s.y)/(c.y-s.y)+s.x&&(e=!e);return e||Ct.prototype._containsPoint.call(this,t,!0)}});function _s(t,e){return new Kt(t,e)}var Pt=Tt.extend({initialize:function(t,e){A(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e=I(t)?t:t.features,o,s,c;if(e){for(o=0,s=e.length;o<s;o++)c=e[o],(c.geometries||c.geometry||c.features||c.coordinates)&&this.addData(c);return this}var f=this.options;if(f.filter&&!f.filter(t))return this;var g=Ge(t,f);return g?(g.feature=Je(t),g.defaultOptions=g.options,this.resetStyle(g),f.onEachFeature&&f.onEachFeature(t,g),this.addLayer(g)):this},resetStyle:function(t){return t===void 0?this.eachLayer(this.resetStyle,this):(t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){t.setStyle&&(typeof e=="function"&&(e=e(t.feature)),t.setStyle(e))}});function Ge(t,e){var o=t.type==="Feature"?t.geometry:t,s=o?o.coordinates:null,c=[],f=e&&e.pointToLayer,g=e&&e.coordsToLatLng||Ji,v,b,x,M;if(!s&&!o)return null;switch(o.type){case"Point":return v=g(s),mn(f,t,v,e);case"MultiPoint":for(x=0,M=s.length;x<M;x++)v=g(s[x]),c.push(mn(f,t,v,e));return new Tt(c);case"LineString":case"MultiLineString":return b=Ve(s,o.type==="LineString"?0:1,g),new Ct(b,e);case"Polygon":case"MultiPolygon":return b=Ve(s,o.type==="Polygon"?1:2,g),new Kt(b,e);case"GeometryCollection":for(x=0,M=o.geometries.length;x<M;x++){var S=Ge({geometry:o.geometries[x],type:"Feature",properties:t.properties},e);S&&c.push(S)}return new Tt(c);case"FeatureCollection":for(x=0,M=o.features.length;x<M;x++){var R=Ge(o.features[x],e);R&&c.push(R)}return new Tt(c);default:throw new Error("Invalid GeoJSON object.")}}function mn(t,e,o,s){return t?t(e,o):new He(o,s&&s.markersInheritOptions&&s)}function Ji(t){return new V(t[1],t[0],t[2])}function Ve(t,e,o){for(var s=[],c=0,f=t.length,g;c<f;c++)g=e?Ve(t[c],e-1,o):(o||Ji)(t[c]),s.push(g);return s}function ji(t,e){return t=U(t),t.alt!==void 0?[w(t.lng,e),w(t.lat,e),w(t.alt,e)]:[w(t.lng,e),w(t.lat,e)]}function We(t,e,o,s){for(var c=[],f=0,g=t.length;f<g;f++)c.push(e?We(t[f],vt(t[f])?0:e-1,o,s):ji(t[f],s));return!e&&o&&c.length>0&&c.push(c[0].slice()),c}function Xt(t,e){return t.feature?i({},t.feature,{geometry:e}):Je(e)}function Je(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var qi={toGeoJSON:function(t){return Xt(this,{type:"Point",coordinates:ji(this.getLatLng(),t)})}};He.include(qi),Wi.include(qi),Fe.include(qi),Ct.include({toGeoJSON:function(t){var e=!vt(this._latlngs),o=We(this._latlngs,e?1:0,!1,t);return Xt(this,{type:(e?"Multi":"")+"LineString",coordinates:o})}}),Kt.include({toGeoJSON:function(t){var e=!vt(this._latlngs),o=e&&!vt(this._latlngs[0]),s=We(this._latlngs,o?2:e?1:0,!0,t);return e||(s=[s]),Xt(this,{type:(o?"Multi":"")+"Polygon",coordinates:s})}}),qt.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(o){e.push(o.toGeoJSON(t).geometry.coordinates)}),Xt(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(e==="MultiPoint")return this.toMultiPoint(t);var o=e==="GeometryCollection",s=[];return this.eachLayer(function(c){if(c.toGeoJSON){var f=c.toGeoJSON(t);if(o)s.push(f.geometry);else{var g=Je(f);g.type==="FeatureCollection"?s.push.apply(s,g.features):s.push(g)}}}),o?Xt(this,{geometries:s,type:"GeometryCollection"}):{type:"FeatureCollection",features:s}}});function gn(t,e){return new Pt(t,e)}var vs=gn,je=bt.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,o){this._url=t,this._bounds=$(e),A(this,o)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(B(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){K(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&Jt(this._image),this},bringToBack:function(){return this._map&&jt(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=$(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",e=this._image=t?this._url:H("img");if(B(e,"leaflet-image-layer"),this._zoomAnimated&&B(e,"leaflet-zoom-animated"),this.options.className&&B(e,this.options.className),e.onselectstart=y,e.onmousemove=y,e.onload=l(this.fire,this,"load"),e.onerror=l(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(e.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=e.src;return}e.src=this._url,e.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),o=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Rt(this._image,o,e)},_reset:function(){var t=this._image,e=new Y(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),o=e.getSize();tt(t,e.min),t.style.width=o.x+"px",t.style.height=o.y+"px"},_updateOpacity:function(){_t(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),ys=function(t,e,o){return new je(t,e,o)},_n=je.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",e=this._image=t?this._url:H("video");if(B(e,"leaflet-image-layer"),this._zoomAnimated&&B(e,"leaflet-zoom-animated"),this.options.className&&B(e,this.options.className),e.onselectstart=y,e.onmousemove=y,e.onloadeddata=l(this.fire,this,"load"),t){for(var o=e.getElementsByTagName("source"),s=[],c=0;c<o.length;c++)s.push(o[c].src);this._url=o.length>0?s:[e.src];return}I(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var f=0;f<this._url.length;f++){var g=H("source");g.src=this._url[f],e.appendChild(g)}}});function Ls(t,e,o){return new _n(t,e,o)}var vn=je.extend({_initImage:function(){var t=this._image=this._url;B(t,"leaflet-image-layer"),this._zoomAnimated&&B(t,"leaflet-zoom-animated"),this.options.className&&B(t,this.options.className),t.onselectstart=y,t.onmousemove=y}});function bs(t,e,o){return new vn(t,e,o)}var At=bt.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof V||I(t))?(this._latlng=U(t),A(this,e)):(A(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return t=arguments.length?t:this._source._map,t.hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&_t(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&_t(this._container,1),this.bringToFront(),this.options.interactive&&(B(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(_t(this._container,0),this._removeTimeout=setTimeout(l(K,void 0,this._container),200)):K(this._container),this.options.interactive&&(X(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=U(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&Jt(this._container),this},bringToBack:function(){return this._map&&jt(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Tt){e=null;var o=this._source._layers;for(var s in o)if(o[s]._map){e=o[s];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else if(e.getBounds)t=e.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof e=="string")t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=D(this.options.offset),o=this._getAnchor();this._zoomAnimated?tt(this._container,t.add(o)):e=e.add(t).add(o);var s=this._containerBottom=-e.y,c=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=s+"px",this._container.style.left=c+"px"}},_getAnchor:function(){return[0,0]}});Z.include({_initOverlay:function(t,e,o,s){var c=e;return c instanceof t||(c=new t(s).setContent(e)),o&&c.setLatLng(o),c}}),bt.include({_initOverlay:function(t,e,o,s){var c=o;return c instanceof t?(A(c,s),c._source=this):(c=e&&!s?e:new t(s,this),c.setContent(o)),c}});var qe=At.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t=arguments.length?t:this._source._map,!t.hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,At.prototype.openOn.call(this,t)},onAdd:function(t){At.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof zt||this._source.on("preclick",Ut))},onRemove:function(t){At.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof zt||this._source.off("preclick",Ut))},getEvents:function(){var t=At.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=H("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),o=this._wrapper=H("div",t+"-content-wrapper",e);if(this._contentNode=H("div",t+"-content",o),fe(e),Ri(this._contentNode),z(e,"contextmenu",Ut),this._tipContainer=H("div",t+"-tip-container",e),this._tip=H("div",t+"-tip",this._tipContainer),this.options.closeButton){var s=this._closeButton=H("a",t+"-close-button",e);s.setAttribute("role","button"),s.setAttribute("aria-label","Close popup"),s.href="#close",s.innerHTML='<span aria-hidden="true">&#215;</span>',z(s,"click",function(c){nt(c),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var o=t.offsetWidth;o=Math.min(o,this.options.maxWidth),o=Math.max(o,this.options.minWidth),e.width=o+1+"px",e.whiteSpace="",e.height="";var s=t.offsetHeight,c=this.options.maxHeight,f="leaflet-popup-scrolled";c&&s>c?(e.height=c+"px",B(t,f)):X(t,f),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),o=this._getAnchor();tt(this._container,e.add(o))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,e=parseInt(he(this._container,"marginBottom"),10)||0,o=this._container.offsetHeight+e,s=this._containerWidth,c=new O(this._containerLeft,-o-this._containerBottom);c._add(Nt(this._container));var f=t.layerPointToContainerPoint(c),g=D(this.options.autoPanPadding),v=D(this.options.autoPanPaddingTopLeft||g),b=D(this.options.autoPanPaddingBottomRight||g),x=t.getSize(),M=0,S=0;f.x+s+b.x>x.x&&(M=f.x+s-x.x+b.x),f.x-M-v.x<0&&(M=f.x-v.x),f.y+o+b.y>x.y&&(S=f.y+o-x.y+b.y),f.y-S-v.y<0&&(S=f.y-v.y),(M||S)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([M,S]))}},_getAnchor:function(){return D(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),ws=function(t,e){return new qe(t,e)};Z.mergeOptions({closePopupOnClick:!0}),Z.include({openPopup:function(t,e,o){return this._initOverlay(qe,t,e,o).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),bt.include({bindPopup:function(t,e){return this._popup=this._initOverlay(qe,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Tt||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){Zt(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof zt)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=e,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var Ye=At.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){At.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){At.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=At.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",e=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=H("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+p(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,o,s=this._map,c=this._container,f=s.latLngToContainerPoint(s.getCenter()),g=s.layerPointToContainerPoint(t),v=this.options.direction,b=c.offsetWidth,x=c.offsetHeight,M=D(this.options.offset),S=this._getAnchor();v==="top"?(e=b/2,o=x):v==="bottom"?(e=b/2,o=0):v==="center"?(e=b/2,o=x/2):v==="right"?(e=0,o=x/2):v==="left"?(e=b,o=x/2):g.x<f.x?(v="right",e=0,o=x/2):(v="left",e=b+(M.x+S.x)*2,o=x/2),t=t.subtract(D(e,o,!0)).add(M).add(S),X(c,"leaflet-tooltip-right"),X(c,"leaflet-tooltip-left"),X(c,"leaflet-tooltip-top"),X(c,"leaflet-tooltip-bottom"),B(c,"leaflet-tooltip-"+v),tt(c,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&_t(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return D(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),xs=function(t,e){return new Ye(t,e)};Z.include({openTooltip:function(t,e,o){return this._initOverlay(Ye,t,e,o).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),bt.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ye,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(!(!t&&this._tooltipHandlersAdded)){var e=t?"off":"on",o={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?o.add=this._openTooltip:(o.mouseover=this._openTooltip,o.mouseout=this.closeTooltip,o.click=this._openTooltip,this._map?this._addFocusListeners():o.add=this._addFocusListeners),this._tooltip.options.sticky&&(o.mousemove=this._moveTooltip),this[e](o),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Tt||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e=typeof t.getElement=="function"&&t.getElement();e&&(z(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),z(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e=typeof t.getElement=="function"&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",function(){e._openOnceFlag=!1,e._openTooltip(t)});return}this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)}},_moveTooltip:function(t){var e=t.latlng,o,s;this._tooltip.options.sticky&&t.originalEvent&&(o=this._map.mouseEventToContainerPoint(t.originalEvent),s=this._map.containerPointToLayerPoint(o),e=this._map.layerPointToLatLng(s)),this._tooltip.setLatLng(e)}});var yn=Yt.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&t.tagName==="DIV"?t:document.createElement("div"),o=this.options;if(o.html instanceof Element?(ze(e),e.appendChild(o.html)):e.innerHTML=o.html!==!1?o.html:"",o.bgPos){var s=D(o.bgPos);e.style.backgroundPosition=-s.x+"px "+-s.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function ks(t){return new yn(t)}Yt.Default=ge;var _e=bt.extend({options:{tileSize:256,opacity:1,updateWhenIdle:C.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){A(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),K(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Jt(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(jt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=m(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof O?t:new O(t,t)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e=this.getPane().children,o=-t(-1/0,1/0),s=0,c=e.length,f;s<c;s++)f=e[s].style.zIndex,e[s]!==this._container&&f&&(o=t(o,+f));isFinite(o)&&(this.options.zIndex=o+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!C.ielt9){_t(this._container,this.options.opacity);var t=+new Date,e=!1,o=!1;for(var s in this._tiles){var c=this._tiles[s];if(!(!c.current||!c.loaded)){var f=Math.min(1,(t-c.loaded)/200);_t(c.el,f),f<1?e=!0:(c.active?o=!0:this._onOpaqueTile(c),c.active=!0)}}o&&!this._noPrune&&this._pruneTiles(),e&&(lt(this._fadeFrame),this._fadeFrame=st(this._updateOpacity,this))}},_onOpaqueTile:y,_initContainer:function(){this._container||(this._container=H("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(t!==void 0){for(var o in this._levels)o=Number(o),this._levels[o].el.children.length||o===t?(this._levels[o].el.style.zIndex=e-Math.abs(t-o),this._onUpdateLevel(o)):(K(this._levels[o].el),this._removeTilesAtZoom(o),this._onRemoveLevel(o),delete this._levels[o]);var s=this._levels[t],c=this._map;return s||(s=this._levels[t]={},s.el=H("div","leaflet-tile-container leaflet-zoom-animated",this._container),s.el.style.zIndex=e,s.origin=c.project(c.unproject(c.getPixelOrigin()),t).round(),s.zoom=t,this._setZoomTransform(s,c.getCenter(),c.getZoom()),y(s.el.offsetWidth),this._onCreateLevel(s)),this._level=s,s}},_onUpdateLevel:y,_onRemoveLevel:y,_onCreateLevel:y,_pruneTiles:function(){if(this._map){var t,e,o=this._map.getZoom();if(o>this.options.maxZoom||o<this.options.minZoom){this._removeAllTiles();return}for(t in this._tiles)e=this._tiles[t],e.retain=e.current;for(t in this._tiles)if(e=this._tiles[t],e.current&&!e.active){var s=e.coords;this._retainParent(s.x,s.y,s.z,s.z-5)||this._retainChildren(s.x,s.y,s.z,s.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)K(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,o,s){var c=Math.floor(t/2),f=Math.floor(e/2),g=o-1,v=new O(+c,+f);v.z=+g;var b=this._tileCoordsToKey(v),x=this._tiles[b];return x&&x.active?(x.retain=!0,!0):(x&&x.loaded&&(x.retain=!0),g>s?this._retainParent(c,f,g,s):!1)},_retainChildren:function(t,e,o,s){for(var c=2*t;c<2*t+2;c++)for(var f=2*e;f<2*e+2;f++){var g=new O(c,f);g.z=o+1;var v=this._tileCoordsToKey(g),b=this._tiles[v];if(b&&b.active){b.retain=!0;continue}else b&&b.loaded&&(b.retain=!0);o+1<s&&this._retainChildren(c,f,o+1,s)}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return e.minNativeZoom!==void 0&&t<e.minNativeZoom?e.minNativeZoom:e.maxNativeZoom!==void 0&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,o,s){var c=Math.round(e);this.options.maxZoom!==void 0&&c>this.options.maxZoom||this.options.minZoom!==void 0&&c<this.options.minZoom?c=void 0:c=this._clampZoom(c);var f=this.options.updateWhenZooming&&c!==this._tileZoom;(!s||f)&&(this._tileZoom=c,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),c!==void 0&&this._update(t),o||this._pruneTiles(),this._noPrune=!!o),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var o in this._levels)this._setZoomTransform(this._levels[o],t,e)},_setZoomTransform:function(t,e,o){var s=this._map.getZoomScale(o,t.zoom),c=t.origin.multiplyBy(s).subtract(this._map._getNewPixelOrigin(e,o)).round();C.any3d?Rt(t.el,c,s):tt(t.el,c)},_resetGrid:function(){var t=this._map,e=t.options.crs,o=this._tileSize=this.getTileSize(),s=this._tileZoom,c=this._map.getPixelWorldBounds(this._tileZoom);c&&(this._globalTileRange=this._pxBoundsToTileRange(c)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],s).x/o.x),Math.ceil(t.project([0,e.wrapLng[1]],s).x/o.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],s).y/o.x),Math.ceil(t.project([e.wrapLat[1],0],s).y/o.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(t){var e=this._map,o=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),s=e.getZoomScale(o,this._tileZoom),c=e.project(t,this._tileZoom).floor(),f=e.getSize().divideBy(s*2);return new Y(c.subtract(f),c.add(f))},_update:function(t){var e=this._map;if(e){var o=this._clampZoom(e.getZoom());if(t===void 0&&(t=e.getCenter()),this._tileZoom!==void 0){var s=this._getTiledPixelBounds(t),c=this._pxBoundsToTileRange(s),f=c.getCenter(),g=[],v=this.options.keepBuffer,b=new Y(c.getBottomLeft().subtract([v,-v]),c.getTopRight().add([v,-v]));if(!(isFinite(c.min.x)&&isFinite(c.min.y)&&isFinite(c.max.x)&&isFinite(c.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var x in this._tiles){var M=this._tiles[x].coords;(M.z!==this._tileZoom||!b.contains(new O(M.x,M.y)))&&(this._tiles[x].current=!1)}if(Math.abs(o-this._tileZoom)>1){this._setView(t,o);return}for(var S=c.min.y;S<=c.max.y;S++)for(var R=c.min.x;R<=c.max.x;R++){var ht=new O(R,S);if(ht.z=this._tileZoom,!!this._isValidTile(ht)){var it=this._tiles[this._tileCoordsToKey(ht)];it?it.current=!0:g.push(ht)}}if(g.sort(function(ft,$t){return ft.distanceTo(f)-$t.distanceTo(f)}),g.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var yt=document.createDocumentFragment();for(R=0;R<g.length;R++)this._addTile(g[R],yt);this._level.el.appendChild(yt)}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var o=this._globalTileRange;if(!e.wrapLng&&(t.x<o.min.x||t.x>o.max.x)||!e.wrapLat&&(t.y<o.min.y||t.y>o.max.y))return!1}if(!this.options.bounds)return!0;var s=this._tileCoordsToBounds(t);return $(this.options.bounds).overlaps(s)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,o=this.getTileSize(),s=t.scaleBy(o),c=s.add(o),f=e.unproject(s,t.z),g=e.unproject(c,t.z);return[f,g]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),o=new ut(e[0],e[1]);return this.options.noWrap||(o=this._map.wrapLatLngBounds(o)),o},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),o=new O(+e[0],+e[1]);return o.z=+e[2],o},_removeTile:function(t){var e=this._tiles[t];e&&(K(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){B(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=y,t.onmousemove=y,C.ielt9&&this.options.opacity<1&&_t(t,this.options.opacity)},_addTile:function(t,e){var o=this._getTilePos(t),s=this._tileCoordsToKey(t),c=this.createTile(this._wrapCoords(t),l(this._tileReady,this,t));this._initTile(c),this.createTile.length<2&&st(l(this._tileReady,this,t,null,c)),tt(c,o),this._tiles[s]={el:c,coords:t,current:!0},e.appendChild(c),this.fire("tileloadstart",{tile:c,coords:t})},_tileReady:function(t,e,o){e&&this.fire("tileerror",{error:e,tile:o,coords:t});var s=this._tileCoordsToKey(t);o=this._tiles[s],o&&(o.loaded=+new Date,this._map._fadeAnimated?(_t(o.el,0),lt(this._fadeFrame),this._fadeFrame=st(this._updateOpacity,this)):(o.active=!0,this._pruneTiles()),e||(B(o.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:o.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),C.ielt9||!this._map._fadeAnimated?st(this._pruneTiles,this):setTimeout(l(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new O(this._wrapX?_(t.x,this._wrapX):t.x,this._wrapY?_(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new Y(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function As(t){return new _e(t)}var Qt=_e.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,e=A(this,e),e.detectRetina&&C.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),typeof e.subdomains=="string"&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&e===void 0&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var o=document.createElement("img");return z(o,"load",l(this._tileOnLoad,this,e,o)),z(o,"error",l(this._tileOnError,this,e,o)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(o.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(o.referrerPolicy=this.options.referrerPolicy),o.alt="",o.src=this.getTileUrl(t),o},getTileUrl:function(t){var e={r:C.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var o=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=o),e["-y"]=o}return P(this._url,i(e,this.options))},_tileOnLoad:function(t,e){C.ielt9?setTimeout(l(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,o){var s=this.options.errorTileUrl;s&&e.getAttribute("src")!==s&&(e.src=s),t(o,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,o=this.options.zoomReverse,s=this.options.zoomOffset;return o&&(t=e-t),t+s},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=y,e.onerror=y,!e.complete)){e.src=j;var o=this._tiles[t].coords;K(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:o})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",j),_e.prototype._removeTile.call(this,t)},_tileReady:function(t,e,o){if(!(!this._map||o&&o.getAttribute("src")===j))return _e.prototype._tileReady.call(this,t,e,o)}});function Ln(t,e){return new Qt(t,e)}var bn=Qt.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var o=i({},this.defaultWmsParams);for(var s in e)s in this.options||(o[s]=e[s]);e=A(this,e);var c=e.detectRetina&&C.retina?2:1,f=this.getTileSize();o.width=f.x*c,o.height=f.y*c,this.wmsParams=o},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Qt.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),o=this._crs,s=dt(o.project(e[0]),o.project(e[1])),c=s.min,f=s.max,g=(this._wmsVersion>=1.3&&this._crs===fn?[c.y,c.x,f.y,f.x]:[c.x,c.y,f.x,f.y]).join(","),v=Qt.prototype.getTileUrl.call(this,t);return v+N(this.wmsParams,v,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+g},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});function Ms(t,e){return new bn(t,e)}Qt.WMS=bn,Ln.wms=Ms;var St=bt.extend({options:{padding:.1},initialize:function(t){A(this,t),p(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),B(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var o=this._map.getZoomScale(e,this._zoom),s=this._map.getSize().multiplyBy(.5+this.options.padding),c=this._map.project(this._center,e),f=s.multiplyBy(-o).add(c).subtract(this._map._getNewPixelOrigin(t,e));C.any3d?Rt(this._container,f,o):tt(this._container,f)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),o=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new Y(o,o.add(e.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),wn=St.extend({options:{tolerance:0},getEvents:function(){var t=St.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){St.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");z(t,"mousemove",this._onMouseMove,this),z(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),z(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){lt(this._redrawRequest),delete this._ctx,K(this._container),W(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var e in this._layers)t=this._layers[e],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){St.prototype._update.call(this);var t=this._bounds,e=this._container,o=t.getSize(),s=C.retina?2:1;tt(e,t.min),e.width=s*o.x,e.height=s*o.y,e.style.width=o.x+"px",e.style.height=o.y+"px",C.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){St.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[p(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,o=e.next,s=e.prev;o?o.prev=s:this._drawLast=s,s?s.next=o:this._drawFirst=o,delete t._order,delete this._layers[p(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var e=t.options.dashArray.split(/[, ]+/),o=[],s,c;for(c=0;c<e.length;c++){if(s=Number(e[c]),isNaN(s))return;o.push(s)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||st(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new Y,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var o=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,o.x,o.y),this._ctx.clip()}this._drawing=!0;for(var s=this._drawFirst;s;s=s.next)t=s.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var o,s,c,f,g=t._parts,v=g.length,b=this._ctx;if(v){for(b.beginPath(),o=0;o<v;o++){for(s=0,c=g[o].length;s<c;s++)f=g[o][s],b[s?"lineTo":"moveTo"](f.x,f.y);e&&b.closePath()}this._fillStroke(b,t)}}},_updateCircle:function(t){if(!(!this._drawing||t._empty())){var e=t._point,o=this._ctx,s=Math.max(Math.round(t._radius),1),c=(Math.max(Math.round(t._radiusY),1)||s)/s;c!==1&&(o.save(),o.scale(1,c)),o.beginPath(),o.arc(e.x,e.y/c,s,0,Math.PI*2,!1),c!==1&&o.restore(),this._fillStroke(o,t)}},_fillStroke:function(t,e){var o=e.options;o.fill&&(t.globalAlpha=o.fillOpacity,t.fillStyle=o.fillColor||o.color,t.fill(o.fillRule||"evenodd")),o.stroke&&o.weight!==0&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=o.opacity,t.lineWidth=o.weight,t.strokeStyle=o.color,t.lineCap=o.lineCap,t.lineJoin=o.lineJoin,t.stroke())},_onClick:function(t){for(var e=this._map.mouseEventToLayerPoint(t),o,s,c=this._drawFirst;c;c=c.next)o=c.layer,o.options.interactive&&o._containsPoint(e)&&(!(t.type==="click"||t.type==="preclick")||!this._map._draggableMoved(o))&&(s=o);this._fireEvent(s?[s]:!1,t)},_onMouseMove:function(t){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(X(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var o,s,c=this._drawFirst;c;c=c.next)o=c.layer,o.options.interactive&&o._containsPoint(e)&&(s=o);s!==this._hoveredLayer&&(this._handleMouseOut(t),s&&(B(this._container,"leaflet-interactive"),this._fireEvent([s],t,"mouseover"),this._hoveredLayer=s)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,t),this._mouseHoverThrottled=!0,setTimeout(l(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,e,o){this._map._fireDOMEvent(e,o||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var o=e.next,s=e.prev;if(o)o.prev=s;else return;s?s.next=o:o&&(this._drawFirst=o),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t)}},_bringToBack:function(t){var e=t._order;if(e){var o=e.next,s=e.prev;if(s)s.next=o;else return;o?o.prev=s:s&&(this._drawLast=s),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t)}}});function xn(t){return C.canvas?new wn(t):null}var ve=(function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),Es={_initContainer:function(){this._container=H("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(St.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=ve("shape");B(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=ve("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[p(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;K(e),t.removeInteractiveTarget(e),delete this._layers[p(t)]},_updateStyle:function(t){var e=t._stroke,o=t._fill,s=t.options,c=t._container;c.stroked=!!s.stroke,c.filled=!!s.fill,s.stroke?(e||(e=t._stroke=ve("stroke")),c.appendChild(e),e.weight=s.weight+"px",e.color=s.color,e.opacity=s.opacity,s.dashArray?e.dashStyle=I(s.dashArray)?s.dashArray.join(" "):s.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=s.lineCap.replace("butt","flat"),e.joinstyle=s.lineJoin):e&&(c.removeChild(e),t._stroke=null),s.fill?(o||(o=t._fill=ve("fill")),c.appendChild(o),o.color=s.fillColor||s.color,o.opacity=s.fillOpacity):o&&(c.removeChild(o),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),o=Math.round(t._radius),s=Math.round(t._radiusY||o);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+o+","+s+" 0,"+65535*360)},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){Jt(t._container)},_bringToBack:function(t){jt(t._container)}},Ke=C.vml?ve:Mo,ye=St.extend({_initContainer:function(){this._container=Ke("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ke("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){K(this._container),W(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){St.prototype._update.call(this);var t=this._bounds,e=t.getSize(),o=this._container;(!this._svgSize||!this._svgSize.equals(e))&&(this._svgSize=e,o.setAttribute("width",e.x),o.setAttribute("height",e.y)),tt(o,t.min),o.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Ke("path");t.options.className&&B(e,t.options.className),t.options.interactive&&B(e,"leaflet-interactive"),this._updateStyle(t),this._layers[p(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){K(t._path),t.removeInteractiveTarget(t._path),delete this._layers[p(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,o=t.options;e&&(o.stroke?(e.setAttribute("stroke",o.color),e.setAttribute("stroke-opacity",o.opacity),e.setAttribute("stroke-width",o.weight),e.setAttribute("stroke-linecap",o.lineCap),e.setAttribute("stroke-linejoin",o.lineJoin),o.dashArray?e.setAttribute("stroke-dasharray",o.dashArray):e.removeAttribute("stroke-dasharray"),o.dashOffset?e.setAttribute("stroke-dashoffset",o.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),o.fill?(e.setAttribute("fill",o.fillColor||o.color),e.setAttribute("fill-opacity",o.fillOpacity),e.setAttribute("fill-rule",o.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,Eo(t._parts,e))},_updateCircle:function(t){var e=t._point,o=Math.max(Math.round(t._radius),1),s=Math.max(Math.round(t._radiusY),1)||o,c="a"+o+","+s+" 0 1,0 ",f=t._empty()?"M0 0":"M"+(e.x-o)+","+e.y+c+o*2+",0 "+c+-o*2+",0 ";this._setPath(t,f)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){Jt(t._path)},_bringToBack:function(t){jt(t._path)}});C.vml&&ye.include(Es);function kn(t){return C.svg||C.vml?new ye(t):null}Z.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var e=this._paneRenderers[t];return e===void 0&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&xn(t)||kn(t)}});var An=Kt.extend({initialize:function(t,e){Kt.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=$(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Ts(t,e){return new An(t,e)}ye.create=Ke,ye.pointsToPath=Eo,Pt.geometryToLayer=Ge,Pt.coordsToLatLng=Ji,Pt.coordsToLatLngs=Ve,Pt.latLngToCoords=ji,Pt.latLngsToCoords=We,Pt.getFeature=Xt,Pt.asFeature=Je,Z.mergeOptions({boxZoom:!0});var Mn=kt.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){z(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){W(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){K(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),ce(),Ci(),this._startPoint=this._map.mouseEventToContainerPoint(t),z(document,{contextmenu:Zt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=H("div","leaflet-zoom-box",this._container),B(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new Y(this._point,this._startPoint),o=e.getSize();tt(this._box,e.min),this._box.style.width=o.x+"px",this._box.style.height=o.y+"px"},_finish:function(){this._moved&&(K(this._box),X(this._container,"leaflet-crosshair")),de(),Pi(),W(document,{contextmenu:Zt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(l(this._resetState,this),0);var e=new ut(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Z.addInitHook("addHandler","boxZoom",Mn),Z.mergeOptions({doubleClickZoom:!0});var En=kt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,o=e.getZoom(),s=e.options.zoomDelta,c=t.originalEvent.shiftKey?o-s:o+s;e.options.doubleClickZoom==="center"?e.setZoom(c):e.setZoomAround(t.containerPoint,c)}});Z.addInitHook("addHandler","doubleClickZoom",En),Z.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Tn=kt.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Ot(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}B(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){X(this._map._container,"leaflet-grab"),X(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=$(this._map.options.maxBounds);this._offsetLimit=dt(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,o=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(o),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),o=this._initialWorldOffset,s=this._draggable._newPos.x,c=(s-e+o)%t+e-o,f=(s+e+o)%t-e-o,g=Math.abs(c+o)<Math.abs(f+o)?c:f;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=g},_onDragEnd:function(t){var e=this._map,o=e.options,s=!o.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),s)e.fire("moveend");else{this._prunePositions(+new Date);var c=this._lastPos.subtract(this._positions[0]),f=(this._lastTime-this._times[0])/1e3,g=o.easeLinearity,v=c.multiplyBy(g/f),b=v.distanceTo([0,0]),x=Math.min(o.inertiaMaxSpeed,b),M=v.multiplyBy(x/b),S=x/(o.inertiaDeceleration*g),R=M.multiplyBy(-S/2).round();!R.x&&!R.y?e.fire("moveend"):(R=e._limitOffset(R,e.options.maxBounds),st(function(){e.panBy(R,{duration:S,easeLinearity:g,noMoveStart:!0,animate:!0})}))}}});Z.addInitHook("addHandler","dragging",Tn),Z.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Cn=kt.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),z(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),W(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,o=t.scrollTop||e.scrollTop,s=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(s,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e=this._panKeys={},o=this.keyCodes,s,c;for(s=0,c=o.left.length;s<c;s++)e[o.left[s]]=[-1*t,0];for(s=0,c=o.right.length;s<c;s++)e[o.right[s]]=[t,0];for(s=0,c=o.down.length;s<c;s++)e[o.down[s]]=[0,t];for(s=0,c=o.up.length;s<c;s++)e[o.up[s]]=[0,-1*t]},_setZoomDelta:function(t){var e=this._zoomKeys={},o=this.keyCodes,s,c;for(s=0,c=o.zoomIn.length;s<c;s++)e[o.zoomIn[s]]=t;for(s=0,c=o.zoomOut.length;s<c;s++)e[o.zoomOut[s]]=-t},_addHooks:function(){z(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){W(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=t.keyCode,o=this._map,s;if(e in this._panKeys){if(!o._panAnim||!o._panAnim._inProgress)if(s=this._panKeys[e],t.shiftKey&&(s=D(s).multiplyBy(3)),o.options.maxBounds&&(s=o._limitOffset(D(s),o.options.maxBounds)),o.options.worldCopyJump){var c=o.wrapLatLng(o.unproject(o.project(o.getCenter()).add(s)));o.panTo(c)}else o.panBy(s)}else if(e in this._zoomKeys)o.setZoom(o.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else if(e===27&&o._popup&&o._popup.options.closeOnEscapeKey)o.closePopup();else return;Zt(t)}}});Z.addInitHook("addHandler","keyboard",Cn),Z.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Pn=kt.extend({addHooks:function(){z(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){W(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=$o(t),o=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var s=Math.max(o-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(l(this._performZoom,this),s),Zt(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),o=this._map.options.zoomSnap||0;t._stop();var s=this._delta/(this._map.options.wheelPxPerZoomLevel*4),c=4*Math.log(2/(1+Math.exp(-Math.abs(s))))/Math.LN2,f=o?Math.ceil(c/o)*o:c,g=t._limitZoom(e+(this._delta>0?f:-f))-e;this._delta=0,this._startTime=null,g&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+g):t.setZoomAround(this._lastMousePos,e+g))}});Z.addInitHook("addHandler","scrollWheelZoom",Pn);var Cs=600;Z.mergeOptions({tapHold:C.touchNative&&C.safari&&C.mobile,tapTolerance:15});var Sn=kt.extend({addHooks:function(){z(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){W(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var e=t.touches[0];this._startPos=this._newPos=new O(e.clientX,e.clientY),this._holdTimeout=setTimeout(l(function(){this._cancel(),this._isTapValid()&&(z(document,"touchend",nt),z(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),Cs),z(document,"touchend touchcancel contextmenu",this._cancel,this),z(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){W(document,"touchend",nt),W(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),W(document,"touchend touchcancel contextmenu",this._cancel,this),W(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new O(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var o=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});o._simulated=!0,e.target.dispatchEvent(o)}});Z.addInitHook("addHandler","tapHold",Sn),Z.mergeOptions({touchZoom:C.touch,bounceAtZoomLimits:!0});var In=kt.extend({addHooks:function(){B(this._map._container,"leaflet-touch-zoom"),z(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){X(this._map._container,"leaflet-touch-zoom"),W(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(!(!t.touches||t.touches.length!==2||e._animatingZoom||this._zooming)){var o=e.mouseEventToContainerPoint(t.touches[0]),s=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),e.options.touchZoom!=="center"&&(this._pinchStartLatLng=e.containerPointToLatLng(o.add(s)._divideBy(2))),this._startDist=o.distanceTo(s),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),z(document,"touchmove",this._onTouchMove,this),z(document,"touchend touchcancel",this._onTouchEnd,this),nt(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var e=this._map,o=e.mouseEventToContainerPoint(t.touches[0]),s=e.mouseEventToContainerPoint(t.touches[1]),c=o.distanceTo(s)/this._startDist;if(this._zoom=e.getScaleZoom(c,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&c<1||this._zoom>e.getMaxZoom()&&c>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,c===1)return}else{var f=o._add(s)._divideBy(2)._subtract(this._centerPoint);if(c===1&&f.x===0&&f.y===0)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(f),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),lt(this._animRequest);var g=l(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=st(g,this,!0),nt(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,lt(this._animRequest),W(document,"touchmove",this._onTouchMove,this),W(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Z.addInitHook("addHandler","touchZoom",In),Z.BoxZoom=Mn,Z.DoubleClickZoom=En,Z.Drag=Tn,Z.Keyboard=Cn,Z.ScrollWheelZoom=Pn,Z.TapHold=Sn,Z.TouchZoom=In,n.Bounds=Y,n.Browser=C,n.CRS=Et,n.Canvas=wn,n.Circle=Wi,n.CircleMarker=Fe,n.Class=gt,n.Control=Lt,n.DivIcon=yn,n.DivOverlay=At,n.DomEvent=ja,n.DomUtil=Wa,n.Draggable=Ot,n.Evented=re,n.FeatureGroup=Tt,n.GeoJSON=Pt,n.GridLayer=_e,n.Handler=kt,n.Icon=Yt,n.ImageOverlay=je,n.LatLng=V,n.LatLngBounds=ut,n.Layer=bt,n.LayerGroup=qt,n.LineUtil=as,n.Map=Z,n.Marker=He,n.Mixin=ts,n.Path=zt,n.Point=O,n.PolyUtil=es,n.Polygon=Kt,n.Polyline=Ct,n.Popup=qe,n.PosAnimation=tn,n.Projection=ss,n.Rectangle=An,n.Renderer=St,n.SVG=ye,n.SVGOverlay=vn,n.TileLayer=Qt,n.Tooltip=Ye,n.Transformation=_i,n.Util=Ie,n.VideoOverlay=_n,n.bind=l,n.bounds=dt,n.canvas=xn,n.circle=ms,n.circleMarker=ps,n.control=pe,n.divIcon=ks,n.extend=i,n.featureGroup=ds,n.geoJSON=gn,n.geoJson=vs,n.gridLayer=As,n.icon=us,n.imageOverlay=ys,n.latLng=U,n.latLngBounds=$,n.layerGroup=cs,n.map=qa,n.marker=fs,n.point=D,n.polygon=_s,n.polyline=gs,n.popup=ws,n.rectangle=Ts,n.setOptions=A,n.stamp=p,n.svg=kn,n.svgOverlay=bs,n.tileLayer=Ln,n.tooltip=xs,n.transformation=ae,n.version=h,n.videoOverlay=Ls;var Ps=window.L;n.noConflict=function(){return window.L=Ps,this},window.L=n}))})(te,te.exports)),te.exports}var Q=Qi();const we=pt({__proto__:null,default:Nn(Q)},[Q]),Zn='.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}',Hn=`.leaflet-draw-section{position:relative}.leaflet-draw-toolbar{margin-top:12px}.leaflet-draw-toolbar-top{margin-top:0}.leaflet-draw-toolbar-notop a:first-child{border-top-right-radius:0}.leaflet-draw-toolbar-nobottom a:last-child{border-bottom-right-radius:0}.leaflet-draw-toolbar a{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAAeCAYAAACWuCNnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAG7AAABuwBHnU4NQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAbvSURBVHic7dtdbBxXFQfw/9nZ3SRKwAP7UFFUQOoHqGnUoEAoNghX9tyxVcpD1X0J+WgiUQmpfUB5ACSgG1qJIKASqBIUIauqAbWseIlqb+bOWHVR6y0FKZBEqdIUQROIREGRx3FFvR/38ODZst3a3nE8Ywfv+T2t7hzdM3fle/bOnWtACCGEEEIIIYQQQgghhBBCCCGEEEIIIcRa0EbfgBDdFItFKwzDAa3175LuWylVAvBIR/MxrXUp6Vxx9dp4VyObVEdKKW591lonXgiVUg6AHzPzk9ls9meVSmUh6RzXkz179uQKhcIgM+8CACI6U6vVnp+enm6knXt4ePiuTCbzWQAwxlSDIHg57ZwroDAMnwKwz3XdBzzPG08hxzsTNprQG2lTjtd13WFmfghAP4A+AJcATFiW9YNKpfL3uP0kUliiX4SG1pqUUpx0wXJd9/PMXAGwPWq6yMyPz8/P/7xarf4nyVwt7QV4JWkU52i8YwBu6bh0wRhzJAiCF5POCQCDg4N2Pp//NYDRjkuTxph9QRCESeYrFov5ubm5R5n5AIAPtV1aYOb7BgYGTpZKJeO67lFmPsbM9/i+/8Ja8y6zylhOYquPXhsvAJRKpczMzMwTAIaJ6LFGo+HNzs5eKRQKNxPRAWb+CoAjWuvn4vS35skWFasxAAdbbUlOYqVUPwAPwI4lLr8J4KeWZT1eqVTmksoZ5d2QghUVKx/AlmVCFph5yPf9l5LMCwBKqUksFqszRHQcAJj5GwB2MfOE7/tfTDKf4zjHiejrAE4CuNhqZ+bf2rY9FYbhGBH92/O8o47j3Oj7/uUk86+3XhsvACilHmPmgW3btn3pxIkTVzuvj4yMfNoY85wxZiQIglPd+lvTZIuq5xiAQwCe6evr218ul5tr6bNd9GiiAbyvS+hFrfVHk8oLbEzBih4Dz+G9K6t3IaLXFhYWdib5eBh911UA8wBu1lq/CQBDQ0M3WJb1OoAdRPQZz/NeSSqnUuofAKpa6/vb26MfwacA7AdwFcCdWuu/JpU3yl1C91VHoquNXhvvyMjIx4wxr1iWtbNSqfxruTjHcR4AcMj3/bu79XnNe1hpFyvHcXYT0QS6FysASHR1tVEKhcIguhQrAGDm23K53BcATCWV27KsAWYGgPOtYgUAU1NT/1RKnQewxxjzOQCJFSwANwI4297QtmLfD+AtZr43m83OJ5iz3bGU+l1OT43XGFNk5mdXKlYAYNv2eBiG31dK3aS1vrRSbOZabqRYLFppFisAIKJxAB+MGf56krk30O64gZlMJnZsHMxsoo8fHxoauqHVHn3+BAAQUaxV57Xq2F54i5nvIaJXm81mYoX5etID491JRH/sFlQul5tEdMoYc3u32FUXrLYvObViBQDM/MQqwi8knX8jEJHpHrXIGJNo8WDm1spph2VZgeu6+5RSX7YsK8D/Xnb8Psmcnebm5h7G4uS9ysxutOH8VQC70sy7UTb7eImImTnWlgkzUyaT6fr3v6qC1fGL8EytVjuQRrECANu2fwHg1TixzPyXNO5hvTHz6VWE/znJ3L7vzxBRa9PzDmb+FYBfArgjajvd39+f9vGGKwACZh5te6mwmc8KburxMvO5TCbzqW5xxWLRArDbsqyu8z32HtZSxSrNM0Hlcrnpum6JmZ+NEb4pHglrtdrz+Xz+AoBbu4Ser9fra37d3YEBfBvAkq+XmfmbpVIp9grwWnie9zSAp9PMcT3Z7OPNZrO/aTQaf1BKfbd9X7RTGIaHmPlcnPNYsVZYSikOw7AB4CAzj/f19e1fjwOMnueVEeMxJJfLbYqCNT093TDGHAGw0qHYBQBH0vj+Pc+bYOb3HFRk5nHf9yeTzgfgMhF9uEvMTQD+71/vR3pqvJOTk28AeBJAeXR09P1LxbiuuxfA9wB8LU6fsVdYrUOhtm0fTusxcAlMRN+KziUt5SqAM3v37r00OZnGfFp/QRC86DjOUCaTGWPm2zoun8fiIbuZtPLX6/UH8/n8rQDuippertfrD6aRKyqOR5VS81ji8Z+IbmfmgwB+mEb+9dZr4wWA/v7+R6rV6k+azeYpx3EezeVyJ7dv335lfn7+lkajcZCZDzPzYd/3/xSnv9gFq3UuaR2LFQDA87xAKVUB8BEAZ6N9nrNEdEZr/TcArLVOPG8aJ9jj8n3/pcHBwZ1btmx5519zmPl0vV5/Ie2V7fT09Nujo6Nus9kcA4CtW7ce1lq/nUYu27a/Mzs7CyI6gMVX/u/CzJeZ+Ue2bcc9pb1aXc8lJZms18YLANE2wkOu694N4OFGo3E8DMMPAHiDiCaY+ZOb4YCsEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhEjYfwGO+b5dFNs4OgAAAABJRU5ErkJggg==);background-image:linear-gradient(transparent,transparent),url("data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20xmlns:dc='http://purl.org/dc/elements/1.1/'%20xmlns:cc='http://creativecommons.org/ns%23'%20xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23'%20xmlns:svg='http://www.w3.org/2000/svg'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'%20xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'%20viewBox='0%200%20600%2060'%20height='60'%20width='600'%20id='svg4225'%20version='1.1'%20inkscape:version='0.91%20r13725'%20sodipodi:docname='spritesheet.svg'%20inkscape:export-filename='/home/fpuga/development/upstream/icarto.Leaflet.draw/src/images/spritesheet-2x.png'%20inkscape:export-xdpi='90'%20inkscape:export-ydpi='90'%3e%3cmetadata%20id='metadata4258'%3e%3crdf:RDF%3e%3ccc:Work%20rdf:about=''%3e%3cdc:format%3eimage/svg+xml%3c/dc:format%3e%3cdc:type%20rdf:resource='http://purl.org/dc/dcmitype/StillImage'%20/%3e%3cdc:title%20/%3e%3c/cc:Work%3e%3c/rdf:RDF%3e%3c/metadata%3e%3cdefs%20id='defs4256'%20/%3e%3csodipodi:namedview%20pagecolor='%23ffffff'%20bordercolor='%23666666'%20borderopacity='1'%20objecttolerance='10'%20gridtolerance='10'%20guidetolerance='10'%20inkscape:pageopacity='0'%20inkscape:pageshadow='2'%20inkscape:window-width='1920'%20inkscape:window-height='1056'%20id='namedview4254'%20showgrid='false'%20inkscape:zoom='1.3101852'%20inkscape:cx='237.56928'%20inkscape:cy='7.2419621'%20inkscape:window-x='1920'%20inkscape:window-y='24'%20inkscape:window-maximized='1'%20inkscape:current-layer='svg4225'%20/%3e%3cg%20id='enabled'%20style='fill:%23464646;fill-opacity:1'%3e%3cg%20id='polyline'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%2018,36%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4229'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2036,18%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4231'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2023.142,39.145%20-2.285,-2.29%2016,-15.998%202.285,2.285%20z'%20id='path4233'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cpath%20id='polygon'%20d='M%20100,24.565%2097.904,39.395%2083.07,42%2076,28.773%2086.463,18%20Z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='rectangle'%20d='m%20140,20%2020,0%200,20%20-20,0%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='circle'%20d='m%20221,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='marker'%20d='m%20270,19%20c%20-4.971,0%20-9,4.029%20-9,9%200,4.971%205.001,12%209,14%204.001,-2%209,-9.029%209,-14%200,-4.971%20-4.029,-9%20-9,-9%20z%20m%200,12.5%20c%20-2.484,0%20-4.5,-2.014%20-4.5,-4.5%200,-2.484%202.016,-4.5%204.5,-4.5%202.485,0%204.5,2.016%204.5,4.5%200,2.486%20-2.015,4.5%20-4.5,4.5%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cg%20id='edit'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20337,30.156%200,0.407%200,5.604%20c%200,1.658%20-1.344,3%20-3,3%20l%20-10,0%20c%20-1.655,0%20-3,-1.342%20-3,-3%20l%200,-10%20c%200,-1.657%201.345,-3%203,-3%20l%206.345,0%203.19,-3.17%20-9.535,0%20c%20-3.313,0%20-6,2.687%20-6,6%20l%200,10%20c%200,3.313%202.687,6%206,6%20l%2010,0%20c%203.314,0%206,-2.687%206,-6%20l%200,-8.809%20-3,2.968'%20id='path4240'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.72,24.637%20-8.892,8.892%20-2.828,0%200,-2.829%208.89,-8.89%20z'%20id='path4242'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.697,17.826%204,0%200,4%20-4,0%20z'%20transform='matrix(-0.70698336,-0.70723018,0.70723018,-0.70698336,567.55917,274.78273)'%20id='path4244'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cg%20id='remove'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20381,42%2018,0%200,-18%20-18,0%200,18%20z%20m%2014,-16%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z'%20id='path4247'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20395,20%200,-4%20-10,0%200,4%20-6,0%200,2%2022,0%200,-2%20-6,0%20z%20m%20-2,0%20-6,0%200,-2%206,0%200,2%20z'%20id='path4249'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3c/g%3e%3cg%20id='disabled'%20transform='translate(120,0)'%20style='fill:%23bbbbbb'%3e%3cuse%20xlink:href='%23edit'%20id='edit-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3cuse%20xlink:href='%23remove'%20id='remove-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3c/g%3e%3cpath%20style='fill:none;stroke:%23464646;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1'%20id='circle-3'%20d='m%20581.65725,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20/%3e%3c/svg%3e");background-repeat:no-repeat;background-size:300px 30px;background-clip:padding-box}.leaflet-retina .leaflet-draw-toolbar a{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAA8CAYAAAC6nMS5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAA16SURBVHic7d1/jBxneQfw7zNzvotdn+9sVQkxoRKoammBqqpbk6uT5mLfvHPn42yn1VFRVCEhoFH5IYpoSaUCKi1NcGkcfrbCVRFKEwG2aHLn83pmLvY2CTqT1AmCOBE0EOT4B0nBPw/snb2dp3/sLr6s77i923dud/a+H8ny7tzMo8f3eud99p133gGIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiFYGaXYCRETUPMYYrWe/MAzZX2QQ27d5OpqdABFROxgZGVlz5cqVrzuOc18QBJPNzofsYvvSYrVcgTVftZ2l6npgYODXHMc5oKoHHcfZHQTB2WbnRETpGRkZWVMoFA6IyO2qutX3/R1Z64TnO8fWOwLSzti+mSKDg4M3l0qlnSJyG4CbAFwP4ByAlwE8paoPX3fddcH4+PjP00yk5QqsrDPGvAZAHsBrReRNqvpeY8x/iMg9QRCcaXJ6ZIHv+xtUdReAHQBej/IHGABOAnhORMY6OjoempiYONe0JC3zPM84jjOqqrfi6r/3RQCPAdgXhmHUvOyaa3R01L1w4cJBALdVNq1W1THP87woir7ZzNyocWzf7PA8b4uI7E6S5A9Frqknb6j8eZOIvKNQKPzU9/1/dhznvlwuV0gjn5YbFapW09Vqu/Z9K9u2bdsNruvmUe50axUAfMV13X/I5XInlzcze2x/28lCu1b19fWt7u7u/hCAvwGwboHdL6jq7unp6T1TU1OXlyG9VAwODv5mkiR7Ady6wK6Plkqldz/yyCPfX468bBkaGuqamZm5E8DbReQNANYscMiLIrI1CILnZ280xrwHwL+hck4VkacBDLTS6HVaIxWt/Blm+zauldu3atOmTas2bNjwWRG5s7LplKp+VUQOuq77/bVr17589uzZ9SKy0XGcAVUdFZE/qOx7zHXdXWn0yy31i6sMw/4MyF6BZYy5XlWPiMhvL7BrrKpfcxznE7Uf4ixYqQWW53kbATw060NZr28nSbJzcnLyRBp5pcnzvNtE5CEAvXUecg7ArjAMH00xLWuGhoZuKpVKEwB+p85DXnRd9/ZcLvcDAOjv778un88XAChwtRMWkW+jxTpfYOV1wGxfO1q1fav6+vpWr1u3blxVtwH4uar+/fT09OcW+mJrjBkBcC+AXwdwBoAJw/AZm7m1zC+uUlyNA9g6189buZH7+/t/tbOz8wiANy7isKKqftV13U8eOnToe2nlZttKLLAqJ+qjAF69xBAnZ2Zmbj58+PApm3mlqTJydRTXFldHAUxVXvcBuLnm5+dU9c1RFP1v2jk2YmhoqKtUKj2B+jvfE0mS3D45OflD4OqcHADPh2H4F6h0wp7nva1YLOby+fz5dDKnerB9Vwzxff8BVX0bgFMAdoZheKzeg4eHh9cXi8WvAfAAvOC67ptzudz/WUvOVqBGVO7OmBCR/vn2adWOuL+/v7ezs3MSwKYlhkgAHBSRjwdB8JTF1FKx0gqsymXBxwH8XoOh/ieO41vz+fwVG3mlzRjzKF55WfA8gD8LwzA3ez/P87aLyIMAeqrbVDUfRdHty5Pp0hhjPgDgM9X3qnq/iNwPYM5RCdd1T1RPvLM63+q/ce/sTpiaj+27Mvi+f6eq/iuAi67r9uVyuWcXG6NSjB8B0KeqE1EUvcVWfk3v3OYZuXosjuPt+Xx+ull51WNgYKBHRKIlXDaaS6Kq+6Mo+lMLsVKz0gosz/M+KiKfsBTub8MwvMdSrNQYYzwAYc3m7bXFVZXv+8OqemD2NlUdiKLokbRybJQx5lsANlfefi4Mww/UedyvADgI4I9mbxeRDwdB8C92s0yHrc9wK3922b6Na+X2BYD+/v61nZ2dz6M8cX00DMP9S421ffv2V83MzDwHoNfmucuxEWSpslxcjYyMrHEcZ8xScQUAjoj8vqVYZIHv+xtE5MMWQ941PDy83mK8VIjIW2s2HZ2vuAKAIAgmADyxQIxWM3uu5J56DhgZGVkDYBw1nS+ApwB82VJeZAfbt82tWrXqPSgXV481UlwBwMGDB3+sqncDgIh81EZ+QBMLrKwXV5Uh5NoPYqMyN+m9nanqHVj4bsHF6InjeKfFeKmoLMUw+/2Ct6KLyOM1m2x/NmxbW30RhuGPFtp5jstGVU+JiNdqE57rEYahzB6lWOz7Fsf2be/2hYj8SeXlvTbiFYvFLwK4DOAWY8z1NmI2pcDKcnE1OjraWSgU9uPaD2LDRKSlJwavQCO2A4rIDtsxU7BxsQeoau2Jeak3BDTDL72kUm/n63neaFoJUkPYvm3G9/0NKN9gc7mrq6t2OsOSVGqPSQCuiAzaiLnsBVaWiysAuHDhwn4AQ2nEVtUfpBGXluwNKcRcaBmPVpDMfiMiW+o4pnafZM69MmYxnW9lsj9lCNs3m1T1tSjXL89aXo39WCX+62wEW9YCK+vFVcXLKcbmJcLW8qoUYmZhZOfFmvc3e563fb6djTFvwdUJxfPFyJx6O1/f999a6Xz5ZIwMYftm2o2Vv60+HUVETldeLnoUfy7LVmC1SXEFVf0YgFSeX5QkCQus9tfyIzsicnSObQ/6vj9cu71SXP1nPTGyplAo5FDT+arqk3Ecb5s9J0dV2flmENs3u0REgTmnJjRkVjwrd2Iuy3+adimuACCKotPGmC8A+GvLoZOZmZkXLMekBojIaVX9DcthTy+8S3MlSTIuIu+q2dyjqgeMMU8A+CYAUdUtAOa8izZJkvG081wG19xN5jjO4ByLTLrLlRBZxfbNrjMAICI3LrTjIlVHrqyMjKU+gtVOxVVVHMf/hHkWrGvAiawsQrlSqOqiF61rRkzbOjo6AsxfCG4G8FcAPvhLlih5qVgsWpl42kIyezcZ1YXtmy0/QvlqwG9V1i6zZRMAiIiV+dCpFljtWFwBQOUbzqcth+XlwdZjfRRGRMZsx7St8mT5zzcQ4r52+LKgqp9S1U8B+GTtZSPKPrZvdlXaagrAalU1NmJWCrVtAEqO4xyyETO1S4TtWlxVXbp06b7u7u6/BHCTjXiqygKrxYjIQ6p6L2Y9BqZB51etWtXyBRYAuK77hVKp9H5cnUxarzOu634xjZyWWxRFdzU7B0oP2zfbVPUbIrLFcZwPAfivRuOJyPtUdbWq5m09jzCVEax2L64AYGpq6rKq/qOteI7jsMBqMUEQnFXV3bbiqerdExMT52zFS1Mul7soIovugETkI7lc7mIaORERVRWLxS8BeElVb/F9v6EnR/i+f6Oq3gUAjuPYejSavQLLGKPVP4VC4Wd4ZXF1pKura7Bdiquq3t7efwfwnKVwLLBa0PT09B5U1kZp0BPFYvGzFuIsmyAI7kf5uWz1OhgEwTV3FLaoX5yLKosWLknNsZcayohsYvu2uUo98TEAUNW9vu8vad3CoaGhLlX9BoBeAONBEByxleNyLNPwWBzHOywvBtYS9u3bV1LVj1sKxwKrBU1NTV12XXcXgFMNhDmpqndkcF6SisifAzhRx76n4jh+Byzd3rwMjldfqOqSV+xPkmT2yvzH592RlhvbdwUIw3AvgAcArFPVcHBwcFHPBvZ9f0OpVDqA8qrwL8Rx/E6b+VkvsGqfZ9ROlwXnEkXRfgDfajCMXrx48Yc28iH7crncSVXdrKpPLvZYEXk6SZItURS1/PIMcwmC4KzjOCMAam9dn+0SgJ35fP4ny5SWDQ/Mer3HGLPoTtgYMyIiv3gOmqpmZfRuJWD7rgwax/G7UH7EzcYkSf7bGHNXX1/f6oUO9H1/Z+WcPoDysgw7bJ/DUl8Hq52LqwoVkb9T1WiRx8UoX158RlWfnJqaupxCbmRJFEWn+/r6buvu7v4ggI9g4Ynv50XknkKh8JkMjly9wqFDh77j+/6oqo4BqD1xXRaRPw6CwMZl1GXjuu6XSqXSOwH8LoD1AMaMMecA1PtF53WV4wCUC+menp699jOlpWD7rhz5fP5Kf3//UFdX132q+l4Ad3d3d7/fGPN1EZlQ1e/19PS8dPbs2fWu694kIgOqOqqqm4Dy4rKlUumOw4cPN3KVYk7WVkE1xsx5aSBLT+duhDEmQrkSnssZlIeXnxWRY6p6PI7j41nveFeq4eHh9XEc7xSRnQBej6t3kp5EuWh+OI7jh+dYsDDTfN/frKrjAKpPmv9pkiS7JicnH29mXku1devWV3d0dBxAuRNeMhF5ulgsjqRxgk7DfOfqxWr1czvbtzGt3r5zGRwc7FPV3ap6y0L7ishPAHx63bp1e/bt2xenkQ8LLEuMMZtE5JCqfhfAMwCeSZLkO2vWrDk+NjbGyZHUFjzP2yginwcAVX1fVi99Vo2OjnaeP3/+3SLydgBvBNBd56GXAHxXVR/s7e3dm9YJOg0rqQNm+y5dFtp3HmKM2QxgF8qr9b8GwA0AzgH4MYBjIjJ28eLFkFeOiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIhWgv8Hnffz4dmwY9cAAAAASUVORK5CYII=);background-image:linear-gradient(transparent,transparent),url("data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20xmlns:dc='http://purl.org/dc/elements/1.1/'%20xmlns:cc='http://creativecommons.org/ns%23'%20xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23'%20xmlns:svg='http://www.w3.org/2000/svg'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'%20xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'%20viewBox='0%200%20600%2060'%20height='60'%20width='600'%20id='svg4225'%20version='1.1'%20inkscape:version='0.91%20r13725'%20sodipodi:docname='spritesheet.svg'%20inkscape:export-filename='/home/fpuga/development/upstream/icarto.Leaflet.draw/src/images/spritesheet-2x.png'%20inkscape:export-xdpi='90'%20inkscape:export-ydpi='90'%3e%3cmetadata%20id='metadata4258'%3e%3crdf:RDF%3e%3ccc:Work%20rdf:about=''%3e%3cdc:format%3eimage/svg+xml%3c/dc:format%3e%3cdc:type%20rdf:resource='http://purl.org/dc/dcmitype/StillImage'%20/%3e%3cdc:title%20/%3e%3c/cc:Work%3e%3c/rdf:RDF%3e%3c/metadata%3e%3cdefs%20id='defs4256'%20/%3e%3csodipodi:namedview%20pagecolor='%23ffffff'%20bordercolor='%23666666'%20borderopacity='1'%20objecttolerance='10'%20gridtolerance='10'%20guidetolerance='10'%20inkscape:pageopacity='0'%20inkscape:pageshadow='2'%20inkscape:window-width='1920'%20inkscape:window-height='1056'%20id='namedview4254'%20showgrid='false'%20inkscape:zoom='1.3101852'%20inkscape:cx='237.56928'%20inkscape:cy='7.2419621'%20inkscape:window-x='1920'%20inkscape:window-y='24'%20inkscape:window-maximized='1'%20inkscape:current-layer='svg4225'%20/%3e%3cg%20id='enabled'%20style='fill:%23464646;fill-opacity:1'%3e%3cg%20id='polyline'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%2018,36%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4229'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2036,18%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4231'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2023.142,39.145%20-2.285,-2.29%2016,-15.998%202.285,2.285%20z'%20id='path4233'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cpath%20id='polygon'%20d='M%20100,24.565%2097.904,39.395%2083.07,42%2076,28.773%2086.463,18%20Z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='rectangle'%20d='m%20140,20%2020,0%200,20%20-20,0%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='circle'%20d='m%20221,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='marker'%20d='m%20270,19%20c%20-4.971,0%20-9,4.029%20-9,9%200,4.971%205.001,12%209,14%204.001,-2%209,-9.029%209,-14%200,-4.971%20-4.029,-9%20-9,-9%20z%20m%200,12.5%20c%20-2.484,0%20-4.5,-2.014%20-4.5,-4.5%200,-2.484%202.016,-4.5%204.5,-4.5%202.485,0%204.5,2.016%204.5,4.5%200,2.486%20-2.015,4.5%20-4.5,4.5%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cg%20id='edit'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20337,30.156%200,0.407%200,5.604%20c%200,1.658%20-1.344,3%20-3,3%20l%20-10,0%20c%20-1.655,0%20-3,-1.342%20-3,-3%20l%200,-10%20c%200,-1.657%201.345,-3%203,-3%20l%206.345,0%203.19,-3.17%20-9.535,0%20c%20-3.313,0%20-6,2.687%20-6,6%20l%200,10%20c%200,3.313%202.687,6%206,6%20l%2010,0%20c%203.314,0%206,-2.687%206,-6%20l%200,-8.809%20-3,2.968'%20id='path4240'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.72,24.637%20-8.892,8.892%20-2.828,0%200,-2.829%208.89,-8.89%20z'%20id='path4242'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.697,17.826%204,0%200,4%20-4,0%20z'%20transform='matrix(-0.70698336,-0.70723018,0.70723018,-0.70698336,567.55917,274.78273)'%20id='path4244'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cg%20id='remove'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20381,42%2018,0%200,-18%20-18,0%200,18%20z%20m%2014,-16%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z'%20id='path4247'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20395,20%200,-4%20-10,0%200,4%20-6,0%200,2%2022,0%200,-2%20-6,0%20z%20m%20-2,0%20-6,0%200,-2%206,0%200,2%20z'%20id='path4249'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3c/g%3e%3cg%20id='disabled'%20transform='translate(120,0)'%20style='fill:%23bbbbbb'%3e%3cuse%20xlink:href='%23edit'%20id='edit-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3cuse%20xlink:href='%23remove'%20id='remove-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3c/g%3e%3cpath%20style='fill:none;stroke:%23464646;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1'%20id='circle-3'%20d='m%20581.65725,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20/%3e%3c/svg%3e")}.leaflet-draw a{display:block;text-align:center;text-decoration:none}.leaflet-draw a .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.leaflet-draw-actions{display:none;list-style:none;margin:0;padding:0;position:absolute;left:26px;top:0;white-space:nowrap}.leaflet-touch .leaflet-draw-actions{left:32px}.leaflet-right .leaflet-draw-actions{right:26px;left:auto}.leaflet-touch .leaflet-right .leaflet-draw-actions{right:32px;left:auto}.leaflet-draw-actions li{display:inline-block}.leaflet-draw-actions li:first-child a{border-left:0}.leaflet-draw-actions li:last-child a{-webkit-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.leaflet-right .leaflet-draw-actions li:last-child a{-webkit-border-radius:0;border-radius:0}.leaflet-right .leaflet-draw-actions li:first-child a{-webkit-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.leaflet-draw-actions a{background-color:#919187;border-left:1px solid #AAA;color:#fff;font:11px/19px Helvetica Neue,Arial,Helvetica,sans-serif;line-height:28px;text-decoration:none;padding-left:10px;padding-right:10px;height:28px}.leaflet-touch .leaflet-draw-actions a{font-size:12px;line-height:30px;height:30px}.leaflet-draw-actions-bottom{margin-top:0}.leaflet-draw-actions-top{margin-top:1px}.leaflet-draw-actions-top a,.leaflet-draw-actions-bottom a{height:27px;line-height:27px}.leaflet-draw-actions a:hover{background-color:#a0a098}.leaflet-draw-actions-top.leaflet-draw-actions-bottom a{height:26px;line-height:26px}.leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:-2px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:0 -1px}.leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-31px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-29px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-62px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-60px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-92px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-90px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-122px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-120px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-273px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-271px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-152px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-150px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-182px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-180px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-212px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-210px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-242px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-240px -2px}.leaflet-mouse-marker{background-color:#fff;cursor:crosshair}.leaflet-draw-tooltip{background:#363636;background:#00000080;border:1px solid transparent;-webkit-border-radius:4px;border-radius:4px;color:#fff;font:12px/18px Helvetica Neue,Arial,Helvetica,sans-serif;margin-left:20px;margin-top:-21px;padding:4px 8px;position:absolute;visibility:hidden;white-space:nowrap;z-index:6}.leaflet-draw-tooltip:before{border-right:6px solid black;border-right-color:#00000080;border-top:6px solid transparent;border-bottom:6px solid transparent;content:"";position:absolute;top:7px;left:-7px}.leaflet-error-draw-tooltip{background-color:#f2dede;border:1px solid #e6b6bd;color:#b94a48}.leaflet-error-draw-tooltip:before{border-right-color:#e6b6bd}.leaflet-draw-tooltip-single{margin-top:-12px}.leaflet-draw-tooltip-subtext{color:#f8d5e4}.leaflet-draw-guide-dash{font-size:1%;opacity:.6;position:absolute;width:5px;height:5px}.leaflet-edit-marker-selected{background-color:#fe57a11a;border:4px dashed rgba(254,87,161,.6);-webkit-border-radius:4px;border-radius:4px;box-sizing:content-box}.leaflet-edit-move{cursor:move}.leaflet-edit-resize{cursor:pointer}.leaflet-oldie .leaflet-draw-toolbar{border:1px solid #999}`,Fn=".leaflet-ruler{height:35px;width:35px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfhBQoMHg6McuYvAAABwklEQVQ4y43TP0jUYRgH8M/daQpqdujhnwShGiwyipCIoIgWxyIwrqEhnCQoGqKhpoYMg1qCQjg8TC2JCtSkjCgaKisIhyQUwpJssD9KZWRZg6d450/yGV54n/fzfd53eUOCaoNa5QpNGNPr9cKjUAatdsB++co0G1XiiHd+uqnTq8VzI874o9s2Ic1iiEpii9tmnJOdfkOldt/dU+HYolHnjdmpRNzbuVaNL86m4sXqNOrz3kMXHFKYMqd8VREGBToMifqLgwY1yNZirya5knaBqH16fJjNJiWEFSlxy4g980+pMuZkir/UJjLbrvNRPnINaLUygK/yQpuImHp47LOjuKJPOJA/1y4iZsAlyozLs8IO42L/4QlhGrSCy5oCeKH+dM59vVbL9sn6AP5MRzpnVKtN1viRxit1WRvEmVKFrQbTpoddNR3E+aYKuw1lPOapa0GcEf22KzOtejmcG1rkYdjEAn59KU5cDzjt+HI4BSZtVJTazfIsMQOmFAusLr/E53lniickJYIDNcaUL+JhMZPWBUdOeCCaweGOw5k0lFrv2uyRuBxPlLpoBtTK0p3mh+f+dKl6jX6LapRj6XrzD+1bmkFA/dTVAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTA1LTEwVDEyOjMwOjE0KzAyOjAwUNH5TAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0wNS0xMFQxMjozMDoxNCswMjowMCGMQfAAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-position:center}.leaflet-ruler:hover{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAACmAAAApgHdff84AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAn9QTFRF////AAAAAAAAAAAAAAAAAAAzABcXABQUABIkDhwrAA0aAAwYABUgABQfABIbABAZAA8fABUcABMaABMfABIeABEcABAbABQeABMdABIdABEbABIbABIbABEdABEcABIcBxsoABEdABIdABIdABEcABMbABMdFBwgERofAhIbEhsfAhIdBxUeEhsgEBofAhMbAhMdBRMdAhIbAhIdAhMdCRceARIcDBgfDBgfDBcfDBcfFhwgDBceDBceCxceFCs5HTdGAxMcDxofGTFAHDRDHDVDHDVEHTZFDRkfEBofERogCh0oERsgARIcEhsfEhsgCh4pDCEsDRkfDRkfEBofBhQdDSMvDRgfDBgfCBUeBxUeDyUyECYzUDktPTAqCRceCRYeChYeDxkfEBkgLCgmWj4wCBYdW0AwGh4hHCAiHSAiTDctBhUdBxYdEBkfLyonMConBhUdJiUkLCclLSgmLigmOzApPTEpDBgfBRQdDBgfERsgWT8wBBMdCBYeChceQjMrSzctZEUyBBMdERsgXUAxXkExY0QzglQ5AxUfBxolSjcthlU6hlY7h1Y7AxMcSDUsSjYsd042g1Q5hlY6jVo8AhIcAxMcBBQdLEpcOVpvARIcAhIcBhQdDSIuEhsgJ0NUNS0oNi0oO11yTTgtUXmSUnqUXEAxXUExYEIyZUUzaEYzb0o1cEo1dEw2i1g8jFk8jcfskFs9mdX9mmA/mtf/pmZCqGdCsWxEvnJHxHVJxnZJyHdJzHlK0XxM031M139N3IFO3YJO4INP5IVQ5YZQ5oZQ6ohR7IlS7opS74tS8ItT841T9I1T9o5U949U+ZBV+pBV/ZJW/pJW/5NWIYcOagAAAJt0Uk5TAAECAwQFCw0OEhQVGBkcHyEkKCkqLTAzNUZLVFZZW2RnanJzeHl8f4uMjY6Pj5KVl52eoKGprKytrq+vsLGytLu9vb/BwsLDxcXP0NDS09bf4uPk5OXl5ufo6enq7O3u7+/x8fHy8/P09PT09fX19fX29vb29vb29/j4+Pj5+fn5+fn6+vr6+vr7/Pz8/Pz9/f39/f39/v7+/v7Td3FlAAABgklEQVQoU2NggAMRJU1DTWURBlQgqhWUND11Tfr05GBdMYQws8a07j2XVx2/cnLl5T0T5+ixQsX5/RrWr70CA+s2NPoLgMUlciddvnLl3PbslMysmi2ngXKTc/iA4uwRC1dfudRT76UtJy5lMHvHlSsni82ZgBLWbZdOHCuPlARpForvBYszA9ky1WeunC8y5YCI9125cqrEnJlbnoHBZ/6mK+0eTAjxUgtmbl99Bt6Ksxd2pXGDxRPg4kZMDIqxV6406cDFT8PEGRwnHLlYJQwSTwSJ51tCxRmiVuw7VAsRP7zkIEKcofnAlb0hEPWXls9AiDNUHriyMxwoPgVoToEVQpwhdNHuY/2imOIMZq1nr2QUgsVtkMUZZOOuXOmYiinOwF63/8QVsDgLd0wnFwMCOM3dBhK3ZeGOXjzLHklCIu8oRDxs8eaNXYJIMuplJ0HigYs3b906UwFJgtGzxY6FLWDe0mXLli3wVoEAaZAMjxoLA6eDu5urq4uziTEEqAIAvamx163e5EoAAAAASUVORK5CYII=)}.leaflet-ruler-clicked{height:35px;width:35px;background-repeat:no-repeat;background-position:center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAACmAAAApgHdff84AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAn9QTFRF////AAAAAAAAAAAAAAAAAAAzABcXABQUABIkDhwrAA0aAAwYABUgABQfABIbABAZAA8fABUcABMaABMfABIeABEcABAbABQeABMdABIdABEbABIbABIbABEdABEcABIcBxsoABEdABIdABIdABEcABMbABMdFBwgERofAhIbEhsfAhIdBxUeEhsgEBofAhMbAhMdBRMdAhIbAhIdAhMdCRceARIcDBgfDBgfDBcfDBcfFhwgDBceDBceCxceFCs5HTdGAxMcDxofGTFAHDRDHDVDHDVEHTZFDRkfEBofERogCh0oERsgARIcEhsfEhsgCh4pDCEsDRkfDRkfEBofBhQdDSMvDRgfDBgfCBUeBxUeDyUyECYzUDktPTAqCRceCRYeChYeDxkfEBkgLCgmWj4wCBYdW0AwGh4hHCAiHSAiTDctBhUdBxYdEBkfLyonMConBhUdJiUkLCclLSgmLigmOzApPTEpDBgfBRQdDBgfERsgWT8wBBMdCBYeChceQjMrSzctZEUyBBMdERsgXUAxXkExY0QzglQ5AxUfBxolSjcthlU6hlY7h1Y7AxMcSDUsSjYsd042g1Q5hlY6jVo8AhIcAxMcBBQdLEpcOVpvARIcAhIcBhQdDSIuEhsgJ0NUNS0oNi0oO11yTTgtUXmSUnqUXEAxXUExYEIyZUUzaEYzb0o1cEo1dEw2i1g8jFk8jcfskFs9mdX9mmA/mtf/pmZCqGdCsWxEvnJHxHVJxnZJyHdJzHlK0XxM031M139N3IFO3YJO4INP5IVQ5YZQ5oZQ6ohR7IlS7opS74tS8ItT841T9I1T9o5U949U+ZBV+pBV/ZJW/pJW/5NWIYcOagAAAJt0Uk5TAAECAwQFCw0OEhQVGBkcHyEkKCkqLTAzNUZLVFZZW2RnanJzeHl8f4uMjY6Pj5KVl52eoKGprKytrq+vsLGytLu9vb/BwsLDxcXP0NDS09bf4uPk5OXl5ufo6enq7O3u7+/x8fHy8/P09PT09fX19fX29vb29vb29/j4+Pj5+fn5+fn6+vr6+vr7/Pz8/Pz9/f39/f39/v7+/v7Td3FlAAABgklEQVQoU2NggAMRJU1DTWURBlQgqhWUND11Tfr05GBdMYQws8a07j2XVx2/cnLl5T0T5+ixQsX5/RrWr70CA+s2NPoLgMUlciddvnLl3PbslMysmi2ngXKTc/iA4uwRC1dfudRT76UtJy5lMHvHlSsni82ZgBLWbZdOHCuPlARpForvBYszA9ky1WeunC8y5YCI9125cqrEnJlbnoHBZ/6mK+0eTAjxUgtmbl99Bt6Ksxd2pXGDxRPg4kZMDIqxV6406cDFT8PEGRwnHLlYJQwSTwSJ51tCxRmiVuw7VAsRP7zkIEKcofnAlb0hEPWXls9AiDNUHriyMxwoPgVoToEVQpwhdNHuY/2imOIMZq1nr2QUgsVtkMUZZOOuXOmYiinOwF63/8QVsDgLd0wnFwMCOM3dBhK3ZeGOXjzLHklCIu8oRDxs8eaNXYJIMuplJ0HigYs3b906UwFJgtGzxY6FLWDe0mXLli3wVoEAaZAMjxoLA6eDu5urq4uziTEEqAIAvamx163e5EoAAAAASUVORK5CYII=);border-color:#7fff00!important}.leaflet-bar{background-color:#fff}.leaflet-control{cursor:pointer}.result-tooltip{background-color:#fff;border-width:medium;border-color:#de0000;font-size:smaller}.moving-tooltip{background-color:#ffffffb3;background-clip:padding-box;opacity:.5;border:dotted;border-color:red;font-size:smaller}.plus-length{padding-left:45px}",Gn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",Vn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",Wn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",Jn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='430'%20height='430'%20style='width:100%25;height:100%25;transform:translate3d(0,0,0);content-visibility:visible'%20viewBox='0%200%20430%20430'%3e%3cdefs%3e%3cclipPath%20id='i'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='s'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='e'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='p'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='f'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='m'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='g'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='j'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='h'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cfilter%20id='t'%20width='300%25'%20height='300%25'%20x='-100%25'%20y='-100%25'%3e%3cfeGaussianBlur%20result='filter_result_0'/%3e%3c/filter%3e%3cfilter%20id='r'%20width='300%25'%20height='300%25'%20x='-100%25'%20y='-100%25'%3e%3cfeGaussianBlur%20result='filter_result_0'%20stdDeviation='52.5%2052.5'/%3e%3c/filter%3e%3cfilter%20id='n'%20width='300%25'%20height='300%25'%20x='-100%25'%20y='-100%25'%3e%3cfeGaussianBlur%20result='filter_result_0'/%3e%3c/filter%3e%3cfilter%20id='k'%20width='300%25'%20height='300%25'%20x='-100%25'%20y='-100%25'%3e%3cfeGaussianBlur%20result='filter_result_0'/%3e%3c/filter%3e%3cmask%20id='u'%20mask-type='alpha'%3e%3cuse%20xmlns:ns1='http://www.w3.org/1999/xlink'%20ns1:href='%23a'/%3e%3c/mask%3e%3cmask%20id='q'%20mask-type='alpha'%3e%3cuse%20xmlns:ns2='http://www.w3.org/1999/xlink'%20ns2:href='%23b'/%3e%3c/mask%3e%3cmask%20id='o'%20mask-type='alpha'%3e%3cuse%20xmlns:ns3='http://www.w3.org/1999/xlink'%20ns3:href='%23c'/%3e%3c/mask%3e%3cmask%20id='l'%20mask-type='alpha'%3e%3cuse%20xmlns:ns4='http://www.w3.org/1999/xlink'%20ns4:href='%23d'/%3e%3c/mask%3e%3cg%20id='a'%20fill-opacity='0'%20stroke-linecap='round'%20stroke-linejoin='round'%20clip-path='url(%23e)'%20style='display:none'%3e%3cpath%20class='secondary'%20style='display:none'/%3e%3cpath%20class='primary'%20style='display:none'/%3e%3c/g%3e%3cg%20id='b'%20fill-opacity='0'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='12'%20clip-path='url(%23f)'%20style='display:block'%3e%3cpath%20stroke='%2308A88A'%20d='M44.446-66.518a79.998%2079.998%200%200%200-101.012%209.952A79.998%2079.998%200%201%200%2056.569%2056.569%2080.005%2080.005%200%200%200%2073.91-30.615a80.001%2080.001%200%200%200-29.464-35.903z'%20class='secondary'%20style='display:block'%20transform='translate(215%20214)'/%3e%3cpath%20stroke='%23121331'%20d='m141.409%2025.241%208.727%205.041s0%200%200%200a22.3%2022.3%200%200%201%2010.411%2013.542%2022.32%2022.32%200%200%201-2.221%2016.937l-26.515%2045.924a22.325%2022.325%200%200%201-30.497%208.172l-8.754-5.059a143.414%20143.414%200%200%201-43.718%2025.286v10.108a22.302%2022.302%200%200%201-13.778%2020.612%2022.303%2022.303%200%200%201-8.539%201.696h-53.029a22.303%2022.303%200%200%201-15.779-6.531%2022.302%2022.302%200%200%201-6.537-15.777v-10.073a143.416%20143.416%200%200%201-43.719-25.285l-8.754%205.059a22.325%2022.325%200%200%201-30.497-8.172l-26.523-45.924a22.315%2022.315%200%200%201-2.238-16.943A22.31%2022.31%200%200%201-150.142%2030.3l8.727-5.041a145.097%20145.097%200%200%201%200-50.518l-8.727-5.041a22.294%2022.294%200%200%201-10.409-13.554%2022.306%2022.306%200%200%201%202.238-16.943l26.514-45.924a22.325%2022.325%200%200%201%2030.497-8.172l8.754%205.059a143.416%20143.416%200%200%201%2043.719-25.285v-10.073a22.302%2022.302%200%200%201%206.537-15.777%2022.3%2022.3%200%200%201%2015.779-6.531h53.02a22.307%2022.307%200%200%201%2022.317%2022.308v10.037a143.41%20143.41%200%200%201%2043.718%2025.285l8.754-5.059a22.325%2022.325%200%200%201%2030.497%208.172l26.515%2045.942a22.313%2022.313%200%200%201-1.618%2024.757%2022.294%2022.294%200%200%201-6.554%205.74l-8.727%205.041a145.097%20145.097%200%200%201%200%2050.518z'%20class='primary'%20style='display:block'%20transform='rotate(-120%20169.576%2045.095)'/%3e%3c/g%3e%3cg%20id='c'%20fill-opacity='0'%20stroke-linecap='round'%20stroke-linejoin='round'%20clip-path='url(%23g)'%20style='display:none'%3e%3cpath%20class='secondary'%20style='display:none'/%3e%3cpath%20class='primary'%20style='display:none'/%3e%3c/g%3e%3cg%20id='d'%20fill-opacity='0'%20stroke-linecap='round'%20stroke-linejoin='round'%20clip-path='url(%23h)'%20style='display:none'%3e%3cpath%20class='secondary'%20style='display:none'/%3e%3cpath%20class='primary'%20style='display:none'/%3e%3c/g%3e%3c/defs%3e%3cg%20clip-path='url(%23i)'%3e%3cg%20clip-path='url(%23j)'%20filter='url(%23k)'%20mask='url(%23l)'%20style='display:none'%3e%3cg%20class='design'%3e%3cpath%20class='primary'/%3e%3c/g%3e%3cg%20class='design'%3e%3cpath%20class='secondary'/%3e%3c/g%3e%3c/g%3e%3cg%20clip-path='url(%23m)'%20filter='url(%23n)'%20mask='url(%23o)'%20style='display:none'%3e%3cg%20class='design'%3e%3cpath%20class='primary'/%3e%3c/g%3e%3cg%20class='design'%3e%3cpath%20class='secondary'/%3e%3c/g%3e%3c/g%3e%3cg%20clip-path='url(%23p)'%20mask='url(%23q)'%20style='display:block'%3e%3cg%20filter='url(%23r)'%20transform='rotate(-94%20238.762%20-16.565)%20scale(2.4)'%3e%3cg%20class='design'%3e%3cpath%20fill='%234BE1EC'%20d='M0-250c137.975%200%20250%20112.025%20250%20250S137.975%20250%200%20250-250%20137.975-250%200-137.975-250%200-250z'%20class='primary'/%3e%3c/g%3e%3cg%20class='design'%3e%3cpath%20fill='%23CB5EEE'%20d='M113.242-295.384c97.478%200%20176.5%2079.022%20176.5%20176.5s-79.022%20176.5-176.5%20176.5c-43.948%200-74.396-34.057-105.29-60.631-37.631-32.369-71.21-62.338-71.21-115.869%200-97.478%2079.022-176.5%20176.5-176.5z'%20class='secondary'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cg%20clip-path='url(%23s)'%20filter='url(%23t)'%20mask='url(%23u)'%20style='display:none'%3e%3cg%20class='design'%3e%3cpath%20class='primary'/%3e%3c/g%3e%3cg%20class='design'%3e%3cpath%20class='secondary'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",$i="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%20-1.67%2047.336%2047.336'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group_42'%20data-name='Group%2042'%20transform='translate(-172.455%20-364.36)'%3e%3cpath%20id='Rectangle_17'%20data-name='Rectangle%2017'%20d='M4.351,0H40.984a4.351,4.351,0,0,1,4.351,4.351V22.117a1,1,0,0,1-1,1H1a1,1,0,0,1-1-1V4.351A4.351,4.351,0,0,1,4.351,0Z'%20transform='translate(173.455%20384.243)'%20fill='none'%20stroke='%23000000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3cpath%20id='Path_90'%20data-name='Path%2090'%20d='M218.79,390.249a3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.778,3.778,0,0,1-3.777-3.778'%20fill='none'%20stroke='%23000000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3cg%20id='Group_41'%20data-name='Group%2041'%3e%3cpath%20id='Rectangle_18'%20data-name='Rectangle%2018'%20d='M4.351,0H26.473a4.351,4.351,0,0,1,4.351,4.351V17.883a1,1,0,0,1-1,1H1a1,1,0,0,1-1-1V4.351A4.351,4.351,0,0,1,4.351,0Z'%20transform='translate(180.71%20365.36)'%20fill='none'%20stroke='%23000000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3cpath%20id='Path_91'%20data-name='Path%2091'%20d='M211.234,370.794a3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778'%20fill='none'%20stroke='%23000000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",jn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfhBQoMHg6McuYvAAABwklEQVQ4y43TP0jUYRgH8M/daQpqdujhnwShGiwyipCIoIgWxyIwrqEhnCQoGqKhpoYMg1qCQjg8TC2JCtSkjCgaKisIhyQUwpJssD9KZWRZg6d450/yGV54n/fzfd53eUOCaoNa5QpNGNPr9cKjUAatdsB++co0G1XiiHd+uqnTq8VzI874o9s2Ic1iiEpii9tmnJOdfkOldt/dU+HYolHnjdmpRNzbuVaNL86m4sXqNOrz3kMXHFKYMqd8VREGBToMifqLgwY1yNZirya5knaBqH16fJjNJiWEFSlxy4g980+pMuZkir/UJjLbrvNRPnINaLUygK/yQpuImHp47LOjuKJPOJA/1y4iZsAlyozLs8IO42L/4QlhGrSCy5oCeKH+dM59vVbL9sn6AP5MRzpnVKtN1viRxit1WRvEmVKFrQbTpoddNR3E+aYKuw1lPOapa0GcEf22KzOtejmcG1rkYdjEAn59KU5cDzjt+HI4BSZtVJTazfIsMQOmFAusLr/E53lniickJYIDNcaUL+JhMZPWBUdOeCCaweGOw5k0lFrv2uyRuBxPlLpoBtTK0p3mh+f+dKl6jX6LapRj6XrzD+1bmkFA/dTVAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTA1LTEwVDEyOjMwOjE0KzAyOjAwUNH5TAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0wNS0xMFQxMjozMDoxNCswMjowMCGMQfAAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC",qn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAACmAAAApgHdff84AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAn9QTFRF////AAAAAAAAAAAAAAAAAAAzABcXABQUABIkDhwrAA0aAAwYABUgABQfABIbABAZAA8fABUcABMaABMfABIeABEcABAbABQeABMdABIdABEbABIbABIbABEdABEcABIcBxsoABEdABIdABIdABEcABMbABMdFBwgERofAhIbEhsfAhIdBxUeEhsgEBofAhMbAhMdBRMdAhIbAhIdAhMdCRceARIcDBgfDBgfDBcfDBcfFhwgDBceDBceCxceFCs5HTdGAxMcDxofGTFAHDRDHDVDHDVEHTZFDRkfEBofERogCh0oERsgARIcEhsfEhsgCh4pDCEsDRkfDRkfEBofBhQdDSMvDRgfDBgfCBUeBxUeDyUyECYzUDktPTAqCRceCRYeChYeDxkfEBkgLCgmWj4wCBYdW0AwGh4hHCAiHSAiTDctBhUdBxYdEBkfLyonMConBhUdJiUkLCclLSgmLigmOzApPTEpDBgfBRQdDBgfERsgWT8wBBMdCBYeChceQjMrSzctZEUyBBMdERsgXUAxXkExY0QzglQ5AxUfBxolSjcthlU6hlY7h1Y7AxMcSDUsSjYsd042g1Q5hlY6jVo8AhIcAxMcBBQdLEpcOVpvARIcAhIcBhQdDSIuEhsgJ0NUNS0oNi0oO11yTTgtUXmSUnqUXEAxXUExYEIyZUUzaEYzb0o1cEo1dEw2i1g8jFk8jcfskFs9mdX9mmA/mtf/pmZCqGdCsWxEvnJHxHVJxnZJyHdJzHlK0XxM031M139N3IFO3YJO4INP5IVQ5YZQ5oZQ6ohR7IlS7opS74tS8ItT841T9I1T9o5U949U+ZBV+pBV/ZJW/pJW/5NWIYcOagAAAJt0Uk5TAAECAwQFCw0OEhQVGBkcHyEkKCkqLTAzNUZLVFZZW2RnanJzeHl8f4uMjY6Pj5KVl52eoKGprKytrq+vsLGytLu9vb/BwsLDxcXP0NDS09bf4uPk5OXl5ufo6enq7O3u7+/x8fHy8/P09PT09fX19fX29vb29vb29/j4+Pj5+fn5+fn6+vr6+vr7/Pz8/Pz9/f39/f39/v7+/v7Td3FlAAABgklEQVQoU2NggAMRJU1DTWURBlQgqhWUND11Tfr05GBdMYQws8a07j2XVx2/cnLl5T0T5+ixQsX5/RrWr70CA+s2NPoLgMUlciddvnLl3PbslMysmi2ngXKTc/iA4uwRC1dfudRT76UtJy5lMHvHlSsni82ZgBLWbZdOHCuPlARpForvBYszA9ky1WeunC8y5YCI9125cqrEnJlbnoHBZ/6mK+0eTAjxUgtmbl99Bt6Ksxd2pXGDxRPg4kZMDIqxV6406cDFT8PEGRwnHLlYJQwSTwSJ51tCxRmiVuw7VAsRP7zkIEKcofnAlb0hEPWXls9AiDNUHriyMxwoPgVoToEVQpwhdNHuY/2imOIMZq1nr2QUgsVtkMUZZOOuXOmYiinOwF63/8QVsDgLd0wnFwMCOM3dBhK3ZeGOXjzLHklCIu8oRDxs8eaNXYJIMuplJ0HigYs3b906UwFJgtGzxY6FLWDe0mXLli3wVoEAaZAMjxoLA6eDu5urq4uziTEEqAIAvamx163e5EoAAAAASUVORK5CYII=";function Yn(u){const a="data-leaflet-styles";if(u.querySelector(`style[${a}]`))return;const n=document.createElement("style");n.setAttribute(a,"true"),n.textContent=`
5
5
  /* --- Leaflet core CSS --- */
6
6
  ${Zn}
7
7
 
@@ -181,6 +181,54 @@ ${Fn}
181
181
  border-right-color: #8A2BE2 !important;
182
182
  }
183
183
 
184
+ /* --- Managed toolbar controls --- */
185
+ [data-geokit-map-container][data-geokit-default-toolbar-hidden] .leaflet-draw-toolbar,
186
+ [data-geokit-map-container][data-geokit-default-toolbar-hidden] .leaflet-ruler,
187
+ [data-geokit-map-container][data-geokit-default-toolbar-hidden] .leaflet-ruler-settings-control {
188
+ display: none !important;
189
+ }
190
+
191
+ .leaflet-geokit-toolbar-group {
192
+ display: flex !important;
193
+ flex-direction: column !important;
194
+ gap: 6px !important;
195
+ padding: 6px !important;
196
+ border: 1px solid rgba(15, 23, 18, 0.16) !important;
197
+ border-radius: 16px !important;
198
+ background: rgba(255, 255, 255, 0.94) !important;
199
+ backdrop-filter: blur(10px) !important;
200
+ }
201
+
202
+ .leaflet-geokit-toolbar-button {
203
+ width: 44px !important;
204
+ height: 44px !important;
205
+ border: 1px solid rgba(15, 23, 18, 0.18) !important;
206
+ border-radius: 12px !important;
207
+ background: #fff !important;
208
+ color: #1f5134 !important;
209
+ box-shadow: 0 10px 24px rgba(15, 23, 18, 0.16) !important;
210
+ transition:
211
+ background 160ms ease,
212
+ border-color 160ms ease,
213
+ box-shadow 160ms ease,
214
+ transform 160ms ease !important;
215
+ }
216
+
217
+ .leaflet-geokit-toolbar-button:hover,
218
+ .leaflet-geokit-toolbar-button:focus-visible {
219
+ background: #f0f8ed !important;
220
+ border-color: #2f8f5f !important;
221
+ box-shadow:
222
+ 0 0 0 1px rgba(47, 143, 95, 0.35),
223
+ 0 12px 26px rgba(15, 23, 18, 0.18) !important;
224
+ transform: translateY(-1px) !important;
225
+ }
226
+
227
+ .leaflet-geokit-toolbar-button:focus-visible {
228
+ outline: 2px solid #2f8f5f !important;
229
+ outline-offset: 2px !important;
230
+ }
231
+
184
232
  /* --- Move tool mode cursor styles --- */
185
233
  .leaflet-draw-move-mode {
186
234
  cursor: default !important;
@@ -193,7 +241,7 @@ ${Fn}
193
241
  .leaflet-draw-move-mode .leaflet-interactive:active {
194
242
  cursor: grabbing !important;
195
243
  }
196
- `,u.appendChild(n)}function Kn(u){const s="data-leaflet-custom-styles";if(u.querySelector(`style[${s}]`))return;const n=document.createElement("style");n.setAttribute(s,"true"),n.textContent=`
244
+ `,u.appendChild(n)}function Kn(u){const a="data-leaflet-custom-styles";if(u.querySelector(`style[${a}]`))return;const n=document.createElement("style");n.setAttribute(a,"true"),n.textContent=`
197
245
  /* Ensure Layer Cake toolbar icon uses project asset instead of draw sprite sheet */
198
246
  .leaflet-draw-toolbar a.leaflet-draw-draw-cake {
199
247
  background-image: url(${$i}) !important;
@@ -202,12 +250,12 @@ ${Fn}
202
250
  background-repeat: no-repeat !important;
203
251
  background-color: #fff;
204
252
  }
205
- `,u.appendChild(n)}function Xn(){var u,s;(s=(u=Q.Icon.Default).mergeOptions)==null||s.call(u,{iconRetinaUrl:Gn,iconUrl:Vn,shadowUrl:Wn})}function Qn(u){const{root:s,skipStyles:n}=u;try{n||(Yn(s),Xn()),Kn(s)}catch{}}(function(u,s,n){function l(i,r){for(;(i=i.parentElement)&&!i.classList.contains(r););return i}L.drawVersion="1.0.4",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(i,r){this._map=i,this._container=i._container,this._overlayPane=i._panes.overlayPane,this._popupPane=i._panes.popupPane,r&&r.shapeOptions&&(r.shapeOptions=L.Util.extend({},this.options.shapeOptions,r.shapeOptions)),L.setOptions(this,r);var h=L.version.split(".");parseInt(h[0],10)===1&&parseInt(h[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var i=this._map;i&&(L.DomUtil.disableTextSelection(),i.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(i){L.setOptions(this,i)},_fireCreatedEvent:function(i){this._map.fire(L.Draw.Event.CREATED,{layer:i,layerType:this.type})},_cancelDrawing:function(i){i.keyCode===27&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(i,r){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,r&&r.drawError&&(r.drawError=L.Util.extend({},this.options.drawError,r.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,i,r)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var i=this._markers.pop(),r=this._poly,h=r.getLatLngs(),d=h.splice(-1,1)[0];this._poly.setLatLngs(h),this._markerGroup.removeLayer(i),r.getLatLngs().length<2&&this._map.removeLayer(r),this._vertexChanged(d,!1)}},addVertex:function(i){if(this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(i))return void this._showErrorTooltip();this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(i)),this._poly.addLatLng(i),this._poly.getLatLngs().length===2&&this._map.addLayer(this._poly),this._vertexChanged(i,!0)},completeShape:function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var i=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),r=this._poly.newLatLngIntersects(i[i.length-1]);if(!this.options.allowIntersection&&r||!this._shapeIsValid())return void this._showErrorTooltip();this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_shapeIsValid:function(){return!0},_onZoomEnd:function(){this._markers!==null&&this._updateGuide()},_onMouseMove:function(i){var r=this._map.mouseEventToLayerPoint(i.originalEvent),h=this._map.layerPointToLatLng(r);this._currentLatLng=h,this._updateTooltip(h),this._updateGuide(r),this._mouseMarker.setLatLng(h),L.DomEvent.preventDefault(i.originalEvent)},_vertexChanged:function(i,r){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(i,r),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(i){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(i),this._clickHandled=!0,this._disableNewMarkers();var r=i.originalEvent,h=r.clientX,d=r.clientY;this._startPoint.call(this,h,d)}},_startPoint:function(i,r){this._mouseDownOrigin=L.point(i,r)},_onMouseUp:function(i){var r=i.originalEvent,h=r.clientX,d=r.clientY;this._endPoint.call(this,h,d,i),this._clickHandled=null},_endPoint:function(i,r,h){if(this._mouseDownOrigin){var d=L.point(i,r).distanceTo(this._mouseDownOrigin),p=this._calculateFinishDistance(h.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(h.latlng),this._finishShape()):p<10&&L.Browser.touch?this._finishShape():Math.abs(d)<9*(u.devicePixelRatio||1)&&this.addVertex(h.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(i){var r,h,d=i.originalEvent;!d.touches||!d.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(r=d.touches[0].clientX,h=d.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,r,h),this._endPoint.call(this,r,h,i),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(i){var r;if(this._markers.length>0){var h;if(this.type===L.Draw.Polyline.TYPE)h=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;h=this._markers[0]}var d=this._map.latLngToContainerPoint(h.getLatLng()),p=new L.Marker(i,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),m=this._map.latLngToContainerPoint(p.getLatLng());r=d.distanceTo(m)}else r=1/0;return r},_updateFinishHandler:function(){var i=this._markers.length;i>1&&this._markers[i-1].on("click",this._finishShape,this),i>2&&this._markers[i-2].off("click",this._finishShape,this)},_createMarker:function(i){var r=new L.Marker(i,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(r),r},_updateGuide:function(i){var r=this._markers?this._markers.length:0;r>0&&(i=i||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[r-1].getLatLng()),i))},_updateTooltip:function(i){var r=this._getTooltipText();i&&this._tooltip.updatePosition(i),this._errorShown||this._tooltip.updateContent(r)},_drawGuide:function(i,r){var h,d,p,m=Math.floor(Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2))),g=this.options.guidelineDistance,y=this.options.maxGuideLineLength,w=m>y?m-y:g;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));w<m;w+=this.options.guidelineDistance)h=w/m,d={x:Math.floor(i.x*(1-h)+h*r.x),y:Math.floor(i.y*(1-h)+h*r.y)},p=L.DomUtil.create("div","leaflet-draw-guide-dash",this._guidesContainer),p.style.backgroundColor=this._errorShown?this.options.drawError.color:this.options.shapeOptions.color,L.DomUtil.setPosition(p,d)},_updateGuideColor:function(i){if(this._guidesContainer)for(var r=0,h=this._guidesContainer.childNodes.length;r<h;r++)this._guidesContainer.childNodes[r].style.backgroundColor=i},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText:function(){var i,r,h=this.options.showLength;return this._markers.length===0?i={text:L.drawLocal.draw.handlers.polyline.tooltip.start}:(r=h?this._getMeasurementString():"",i=this._markers.length===1?{text:L.drawLocal.draw.handlers.polyline.tooltip.cont,subtext:r}:{text:L.drawLocal.draw.handlers.polyline.tooltip.end,subtext:r}),i},_updateRunningMeasure:function(i,r){var h,d,p=this._markers.length;this._markers.length===1?this._measurementRunningTotal=0:(h=p-(r?2:1),d=L.GeometryUtil.isVersion07x()?i.distanceTo(this._markers[h].getLatLng())*(this.options.factor||1):this._map.distance(i,this._markers[h].getLatLng())*(this.options.factor||1),this._measurementRunningTotal+=d*(r?1:-1))},_getMeasurementString:function(){var i,r=this._currentLatLng,h=this._markers[this._markers.length-1].getLatLng();return i=L.GeometryUtil.isVersion07x()?h&&r&&r.distanceTo?this._measurementRunningTotal+r.distanceTo(h)*(this.options.factor||1):this._measurementRunningTotal||0:h&&r?this._measurementRunningTotal+this._map.distance(r,h)*(this.options.factor||1):this._measurementRunningTotal||0,L.GeometryUtil.readableDistance(i,this.options.metric,this.options.feet,this.options.nautic,this.options.precision)},_showErrorTooltip:function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},_hideErrorTooltip:function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout(function(){this._disableMarkers=!1}.bind(this),50)},_cleanUpShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var i=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,i)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(i,r){L.Draw.Polyline.prototype.initialize.call(this,i,r),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var i=this._markers.length;i===1&&this._markers[0].on("click",this._finishShape,this),i>2&&(this._markers[i-1].on("dblclick",this._finishShape,this),i>3&&this._markers[i-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var i,r;return this._markers.length===0?i=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(i=L.drawLocal.draw.handlers.polygon.tooltip.cont,r=this._getMeasurementString()):(i=L.drawLocal.draw.handlers.polygon.tooltip.end,r=this._getMeasurementString()),{text:i,subtext:r}},_getMeasurementString:function(){var i=this._area,r="";return i||this.options.showLength?(this.options.showLength&&(r=L.Draw.Polyline.prototype._getMeasurementString.call(this)),i&&(r+="<br>"+L.GeometryUtil.readableArea(i,this.options.metric,this.options.precision)),r):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(i,r){var h;!this.options.allowIntersection&&this.options.showArea&&(h=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(h)),L.Draw.Polyline.prototype._vertexChanged.call(this,i,r)},_cleanUpShape:function(){var i=this._markers.length;i>0&&(this._markers[0].off("click",this._finishShape,this),i>2&&this._markers[i-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(i,r){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,i,r)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),s.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(s,"mouseup",this._onMouseUp,this),L.DomEvent.off(s,"touchend",this._onMouseUp,this),s.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(i){this._isDrawing=!0,this._startLatLng=i.latlng,L.DomEvent.on(s,"mouseup",this._onMouseUp,this).on(s,"touchend",this._onMouseUp,this).preventDefault(i.originalEvent)},_onMouseMove:function(i){var r=i.latlng;this._tooltip.updatePosition(r),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(r))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:function(i,r){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,i,r)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(i){if(!this._shape&&!this._isCurrentlyTwoClickDrawing)return void(this._isCurrentlyTwoClickDrawing=!0);this._isCurrentlyTwoClickDrawing&&!l(i.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this)},_drawShape:function(i){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,i)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,i),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var i=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,i)},_getTooltipText:function(){var i,r,h,d=L.Draw.SimpleShape.prototype._getTooltipText.call(this),p=this._shape,m=this.options.showArea;return p&&(i=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),r=L.GeometryUtil.geodesicArea(i),h=m?L.GeometryUtil.readableArea(r,this.options.metric):""),{text:d.text,subtext:h}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(i,r){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,i,r)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(i){var r=i.latlng;this._tooltip.updatePosition(r),this._mouseMarker.setLatLng(r),this._marker?(r=this._mouseMarker.getLatLng(),this._marker.setLatLng(r)):(this._marker=this._createMarker(r),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_createMarker:function(i){return new L.Marker(i,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(i){this._onMouseMove(i),this._onClick()},_fireCreatedEvent:function(){var i=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,i)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(i,r){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,i,r)},_fireCreatedEvent:function(){var i=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,i)},_createMarker:function(i){return new L.CircleMarker(i,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(i,r){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,i,r)},_drawShape:function(i){if(L.GeometryUtil.isVersion07x())var r=this._startLatLng.distanceTo(i);else var r=this._map.distance(this._startLatLng,i);this._shape?this._shape.setRadius(r):(this._shape=new L.Circle(this._startLatLng,r,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var i=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,i)},_onMouseMove:function(i){var r,h=i.latlng,d=this.options.showRadius,p=this.options.metric;if(this._tooltip.updatePosition(h),this._isDrawing){this._drawShape(h),r=this._shape.getRadius().toFixed(1);var m="";d&&(m=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(r,p,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:m})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(i,r){this._marker=i,L.setOptions(this,r)},addHooks:function(){var i=this._marker;i.dragging.enable(),i.on("dragend",this._onDragEnd,i),this._toggleMarkerHighlight()},removeHooks:function(){var i=this._marker;i.dragging.disable(),i.off("dragend",this._onDragEnd,i),this._toggleMarkerHighlight()},_onDragEnd:function(i){var r=i.target;r.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:r})},_toggleMarkerHighlight:function(){var i=this._marker._icon;i&&(i.style.display="none",L.DomUtil.hasClass(i,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(i,"leaflet-edit-marker-selected"),this._offsetMarker(i,-4)):(L.DomUtil.addClass(i,"leaflet-edit-marker-selected"),this._offsetMarker(i,4)),i.style.display="")},_offsetMarker:function(i,r){var h=parseInt(i.style.marginTop,10)-r,d=parseInt(i.style.marginLeft,10)-r;i.style.marginTop=h+"px",i.style.marginLeft=d+"px"}}),L.Marker.addInitHook(function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(i){this.latlngs=[i._latlngs],i._holes&&(this.latlngs=this.latlngs.concat(i._holes)),this._poly=i,this._poly.on("revert-edited",this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(i){for(var r=0;r<this._verticesHandlers.length;r++)i(this._verticesHandlers[r])},addHooks:function(){this._initHandlers(),this._eachVertexHandler(function(i){i.addHooks()})},removeHooks:function(){this._eachVertexHandler(function(i){i.removeHooks()})},updateMarkers:function(){this._eachVertexHandler(function(i){i.updateMarkers()})},_initHandlers:function(){this._verticesHandlers=[];for(var i=0;i<this.latlngs.length;i++)this._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly,this.latlngs[i],this._poly.options.poly))},_updateLatLngs:function(i){this.latlngs=[i.layer._latlngs],i.layer._holes&&(this.latlngs=this.latlngs.concat(i.layer._holes))}}),L.Edit.PolyVerticesEdit=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),drawError:{color:"#b00b00",timeout:1e3}},initialize:function(i,r,h){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this._poly=i,h&&h.drawError&&(h.drawError=L.Util.extend({},this.options.drawError,h.drawError)),this._latlngs=r,L.setOptions(this,h)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},addHooks:function(){var i=this._poly,r=i._path;i instanceof L.Polygon||(i.options.fill=!1,i.options.editing&&(i.options.editing.fill=!1)),r&&i.options.editing&&i.options.editing.className&&(i.options.original.className&&i.options.original.className.split(" ").forEach(function(h){L.DomUtil.removeClass(r,h)}),i.options.editing.className.split(" ").forEach(function(h){L.DomUtil.addClass(r,h)})),i.setStyle(i.options.editing),this._poly._map&&(this._map=this._poly._map,this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){var i=this._poly,r=i._path;r&&i.options.editing&&i.options.editing.className&&(i.options.editing.className.split(" ").forEach(function(h){L.DomUtil.removeClass(r,h)}),i.options.original.className&&i.options.original.className.split(" ").forEach(function(h){L.DomUtil.addClass(r,h)})),i.setStyle(i.options.original),i._map&&(i._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._markers=[];var i,r,h,d,p=this._defaultShape();for(i=0,h=p.length;i<h;i++)d=this._createMarker(p[i],i),d.on("click",this._onMarkerClick,this),d.on("contextmenu",this._onContextMenu,this),this._markers.push(d);var m,g;for(i=0,r=h-1;i<h;r=i++)(i!==0||L.Polygon&&this._poly instanceof L.Polygon)&&(m=this._markers[r],g=this._markers[i],this._createMiddleMarker(m,g),this._updatePrevNext(m,g))},_createMarker:function(i,r){var h=new L.Marker.Touch(i,{draggable:!0,icon:this.options.icon});return h._origLatLng=i,h._index=r,h.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._fireEdit,this).on("touchmove",this._onTouchMove,this).on("touchend",this._fireEdit,this).on("MSPointerMove",this._onTouchMove,this).on("MSPointerUp",this._fireEdit,this),this._markerGroup.addLayer(h),h},_onMarkerDragStart:function(){this._poly.fire("editstart")},_spliceLatLngs:function(){var i=this._defaultShape(),r=[].splice.apply(i,arguments);return this._poly._convertLatLngs(i,!0),this._poly.redraw(),r},_removeMarker:function(i){var r=i._index;this._markerGroup.removeLayer(i),this._markers.splice(r,1),this._spliceLatLngs(r,1),this._updateIndexes(r,-1),i.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._fireEdit,this).off("touchmove",this._onMarkerDrag,this).off("touchend",this._fireEdit,this).off("click",this._onMarkerClick,this).off("MSPointerMove",this._onTouchMove,this).off("MSPointerUp",this._fireEdit,this)},_fireEdit:function(){this._poly.edited=!0,this._poly.fire("edit"),this._poly._map.fire(L.Draw.Event.EDITVERTEX,{layers:this._markerGroup,poly:this._poly})},_onMarkerDrag:function(i){var r=i.target,h=this._poly,d=L.LatLngUtil.cloneLatLng(r._origLatLng);if(L.extend(r._origLatLng,r._latlng),h.options.poly){var p=h._map._editTooltip;if(!h.options.poly.allowIntersection&&h.intersects()){L.extend(r._origLatLng,d),r.setLatLng(d);var m=h.options.color;h.setStyle({color:this.options.drawError.color}),p&&p.updateContent({text:L.drawLocal.draw.handlers.polyline.error}),setTimeout(function(){h.setStyle({color:m}),p&&p.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext})},1e3)}}r._middleLeft&&r._middleLeft.setLatLng(this._getMiddleLatLng(r._prev,r)),r._middleRight&&r._middleRight.setLatLng(this._getMiddleLatLng(r,r._next)),this._poly._bounds._southWest=L.latLng(1/0,1/0),this._poly._bounds._northEast=L.latLng(-1/0,-1/0);var g=this._poly.getLatLngs();this._poly._convertLatLngs(g,!0),this._poly.redraw(),this._poly.fire("editdrag")},_onMarkerClick:function(i){var r=L.Polygon&&this._poly instanceof L.Polygon?4:3,h=i.target;this._defaultShape().length<r||(this._removeMarker(h),this._updatePrevNext(h._prev,h._next),h._middleLeft&&this._markerGroup.removeLayer(h._middleLeft),h._middleRight&&this._markerGroup.removeLayer(h._middleRight),h._prev&&h._next?this._createMiddleMarker(h._prev,h._next):h._prev?h._next||(h._prev._middleRight=null):h._next._middleLeft=null,this._fireEdit())},_onContextMenu:function(i){var r=i.target;this._poly,this._poly._map.fire(L.Draw.Event.MARKERCONTEXT,{marker:r,layers:this._markerGroup,poly:this._poly}),L.DomEvent.stopPropagation},_onTouchMove:function(i){var r=this._map.mouseEventToLayerPoint(i.originalEvent.touches[0]),h=this._map.layerPointToLatLng(r),d=i.target;L.extend(d._origLatLng,h),d._middleLeft&&d._middleLeft.setLatLng(this._getMiddleLatLng(d._prev,d)),d._middleRight&&d._middleRight.setLatLng(this._getMiddleLatLng(d,d._next)),this._poly.redraw(),this.updateMarkers()},_updateIndexes:function(i,r){this._markerGroup.eachLayer(function(h){h._index>i&&(h._index+=r)})},_createMiddleMarker:function(i,r){var h,d,p,m=this._getMiddleLatLng(i,r),g=this._createMarker(m);g.setOpacity(.6),i._middleRight=r._middleLeft=g,d=function(){g.off("touchmove",d,this);var y=r._index;g._index=y,g.off("click",h,this).on("click",this._onMarkerClick,this),m.lat=g.getLatLng().lat,m.lng=g.getLatLng().lng,this._spliceLatLngs(y,0,m),this._markers.splice(y,0,g),g.setOpacity(1),this._updateIndexes(y,1),r._index++,this._updatePrevNext(i,g),this._updatePrevNext(g,r),this._poly.fire("editstart")},p=function(){g.off("dragstart",d,this),g.off("dragend",p,this),g.off("touchmove",d,this),this._createMiddleMarker(i,g),this._createMiddleMarker(g,r)},h=function(){d.call(this),p.call(this),this._fireEdit()},g.on("click",h,this).on("dragstart",d,this).on("dragend",p,this).on("touchmove",d,this),this._markerGroup.addLayer(g)},_updatePrevNext:function(i,r){i&&(i._next=r),r&&(r._prev=i)},_getMiddleLatLng:function(i,r){var h=this._poly._map,d=h.project(i.getLatLng()),p=h.project(r.getLatLng());return h.unproject(d._add(p)._divideBy(2))}}),L.Polyline.addInitHook(function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))}),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(i,r){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=i,L.Util.setOptions(this,r)},addHooks:function(){var i=this._shape;this._shape._map&&(this._map=this._shape._map,i.setStyle(i.options.editing),i._map&&(this._map=i._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var i=this._shape;if(i.setStyle(i.options.original),i._map){this._unbindMarker(this._moveMarker);for(var r=0,h=this._resizeMarkers.length;r<h;r++)this._unbindMarker(this._resizeMarkers[r]);this._resizeMarkers=null,this._map.removeLayer(this._markerGroup),delete this._markerGroup}this._map=null},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},_createMoveMarker:function(){},_createResizeMarker:function(){},_createMarker:function(i,r){var h=new L.Marker.Touch(i,{draggable:!0,icon:r,zIndexOffset:10});return this._bindMarker(h),this._markerGroup.addLayer(h),h},_bindMarker:function(i){i.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._onMarkerDragEnd,this).on("touchstart",this._onTouchStart,this).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onTouchEnd,this).on("MSPointerUp",this._onTouchEnd,this)},_unbindMarker:function(i){i.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._onMarkerDragEnd,this).off("touchstart",this._onTouchStart,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onTouchEnd,this).off("MSPointerUp",this._onTouchEnd,this)},_onMarkerDragStart:function(i){i.target.setOpacity(0),this._shape.fire("editstart")},_fireEdit:function(){this._shape.edited=!0,this._shape.fire("edit")},_onMarkerDrag:function(i){var r=i.target,h=r.getLatLng();r===this._moveMarker?this._move(h):this._resize(h),this._shape.redraw(),this._shape.fire("editdrag")},_onMarkerDragEnd:function(i){i.target.setOpacity(1),this._fireEdit()},_onTouchStart:function(i){if(L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,i),typeof this._getCorners=="function"){var r=this._getCorners(),h=i.target,d=h._cornerIndex;h.setOpacity(0),this._oppositeCorner=r[(d+2)%4],this._toggleCornerMarkers(0,d)}this._shape.fire("editstart")},_onTouchMove:function(i){var r=this._map.mouseEventToLayerPoint(i.originalEvent.touches[0]),h=this._map.layerPointToLatLng(r);return i.target===this._moveMarker?this._move(h):this._resize(h),this._shape.redraw(),!1},_onTouchEnd:function(i){i.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var i=this._shape.getBounds(),r=i.getCenter();this._moveMarker=this._createMarker(r,this.options.moveIcon)},_createResizeMarker:function(){var i=this._getCorners();this._resizeMarkers=[];for(var r=0,h=i.length;r<h;r++)this._resizeMarkers.push(this._createMarker(i[r],this.options.resizeIcon)),this._resizeMarkers[r]._cornerIndex=r},_onMarkerDragStart:function(i){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,i);var r=this._getCorners(),h=i.target,d=h._cornerIndex;this._oppositeCorner=r[(d+2)%4],this._toggleCornerMarkers(0,d)},_onMarkerDragEnd:function(i){var r,h,d=i.target;d===this._moveMarker&&(r=this._shape.getBounds(),h=r.getCenter(),d.setLatLng(h)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,i)},_move:function(i){for(var r,h=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),d=this._shape.getBounds(),p=d.getCenter(),m=[],g=0,y=h.length;g<y;g++)r=[h[g].lat-p.lat,h[g].lng-p.lng],m.push([i.lat+r[0],i.lng+r[1]]);this._shape.setLatLngs(m),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(i){var r;this._shape.setBounds(L.latLngBounds(i,this._oppositeCorner)),r=this._shape.getBounds(),this._moveMarker.setLatLng(r.getCenter()),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},_getCorners:function(){var i=this._shape.getBounds();return[i.getNorthWest(),i.getNorthEast(),i.getSouthEast(),i.getSouthWest()]},_toggleCornerMarkers:function(i){for(var r=0,h=this._resizeMarkers.length;r<h;r++)this._resizeMarkers[r].setOpacity(i)},_repositionCornerMarkers:function(){for(var i=this._getCorners(),r=0,h=this._resizeMarkers.length;r<h;r++)this._resizeMarkers[r].setLatLng(i[r])}}),L.Rectangle.addInitHook(function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.CircleMarker=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var i=this._shape.getLatLng();this._moveMarker=this._createMarker(i,this.options.moveIcon)},_createResizeMarker:function(){this._resizeMarkers=[]},_move:function(i){if(this._resizeMarkers.length){var r=this._getResizeMarkerPoint(i);this._resizeMarkers[0].setLatLng(r)}this._shape.setLatLng(i),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})}}),L.CircleMarker.addInitHook(function(){L.Edit.CircleMarker&&(this.editing=new L.Edit.CircleMarker(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.CircleMarker.extend({_createResizeMarker:function(){var i=this._shape.getLatLng(),r=this._getResizeMarkerPoint(i);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(r,this.options.resizeIcon))},_getResizeMarkerPoint:function(i){var r=this._shape._radius*Math.cos(Math.PI/4),h=this._map.project(i);return this._map.unproject([h.x+r,h.y-r])},_resize:function(i){var r=this._moveMarker.getLatLng();L.GeometryUtil.isVersion07x()?radius=r.distanceTo(i):radius=this._map.distance(r,i),this._shape.setRadius(radius),this._map.editTooltip&&this._map._editTooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook(function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())}),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(i){this._map=i,this._container=i._container,this._pane=i._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.off(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.off(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave,this))},_touchEvent:function(i,r){var h={};if(i.touches!==void 0){if(!i.touches.length)return;h=i.touches[0]}else if(i.pointerType!=="touch"||(h=i,!this._filterClick(i)))return;var d=this._map.mouseEventToContainerPoint(h),p=this._map.mouseEventToLayerPoint(h),m=this._map.layerPointToLatLng(p);this._map.fire(r,{latlng:m,layerPoint:p,containerPoint:d,pageX:h.pageX,pageY:h.pageY,originalEvent:i})},_filterClick:function(i){var r=i.timeStamp||i.originalEvent.timeStamp,h=L.DomEvent._lastClick&&r-L.DomEvent._lastClick;return h&&h>100&&h<500||i.target._simulatedClick&&!i._simulated?(L.DomEvent.stop(i),!1):(L.DomEvent._lastClick=r,!0)},_onTouchStart:function(i){this._map._loaded&&this._touchEvent(i,"touchstart")},_onTouchEnd:function(i){this._map._loaded&&this._touchEvent(i,"touchend")},_onTouchCancel:function(i){if(this._map._loaded){var r="touchcancel";this._detectIE()&&(r="pointercancel"),this._touchEvent(i,r)}},_onTouchLeave:function(i){this._map._loaded&&this._touchEvent(i,"touchleave")},_onTouchMove:function(i){this._map._loaded&&this._touchEvent(i,"touchmove")},_detectIE:function(){var i=u.navigator.userAgent,r=i.indexOf("MSIE ");if(r>0)return parseInt(i.substring(r+5,i.indexOf(".",r)),10);if(i.indexOf("Trident/")>0){var h=i.indexOf("rv:");return parseInt(i.substring(h+3,i.indexOf(".",h)),10)}var d=i.indexOf("Edge/");return d>0&&parseInt(i.substring(d+5,i.indexOf(".",d)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var i=this._icon,r=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];this._detectIE?r.concat(["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]):r.concat(["touchcancel"]),L.DomUtil.addClass(i,"leaflet-clickable"),L.DomEvent.on(i,"click",this._onMouseClick,this),L.DomEvent.on(i,"keypress",this._onKeyPress,this);for(var h=0;h<r.length;h++)L.DomEvent.on(i,r[h],this._fireMouseEvent,this);L.Handler.MarkerDrag&&(this.dragging=new L.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_detectIE:function(){var i=u.navigator.userAgent,r=i.indexOf("MSIE ");if(r>0)return parseInt(i.substring(r+5,i.indexOf(".",r)),10);if(i.indexOf("Trident/")>0){var h=i.indexOf("rv:");return parseInt(i.substring(h+3,i.indexOf(".",h)),10)}var d=i.indexOf("Edge/");return d>0&&parseInt(i.substring(d+5,i.indexOf(".",d)),10)}}),L.LatLngUtil={cloneLatLngs:function(i){for(var r=[],h=0,d=i.length;h<d;h++)Array.isArray(i[h])?r.push(L.LatLngUtil.cloneLatLngs(i[h])):r.push(this.cloneLatLng(i[h]));return r},cloneLatLng:function(i){return L.latLng(i.lat,i.lng)}},(function(){var i={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2};L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:function(r){var h,d,p=r.length,m=0,g=Math.PI/180;if(p>2){for(var y=0;y<p;y++)h=r[y],d=r[(y+1)%p],m+=(d.lng-h.lng)*g*(2+Math.sin(h.lat*g)+Math.sin(d.lat*g));m=6378137*m*6378137/2}return Math.abs(m)},formattedNumber:function(r,h){var d=parseFloat(r).toFixed(h),p=L.drawLocal.format&&L.drawLocal.format.numeric,m=p&&p.delimiters,g=m&&m.thousands,y=m&&m.decimal;if(g||y){var w=d.split(".");d=g?w[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+g):w[0],y=y||".",w.length>1&&(d=d+y+w[1])}return d},readableArea:function(r,h,g){var p,m,g=L.Util.extend({},i,g);return h?(m=["ha","m"],type=typeof h,type==="string"?m=[h]:type!=="boolean"&&(m=h),p=r>=1e6&&m.indexOf("km")!==-1?L.GeometryUtil.formattedNumber(1e-6*r,g.km)+" km²":r>=1e4&&m.indexOf("ha")!==-1?L.GeometryUtil.formattedNumber(1e-4*r,g.ha)+" ha":L.GeometryUtil.formattedNumber(r,g.m)+" m²"):(r/=.836127,p=r>=3097600?L.GeometryUtil.formattedNumber(r/3097600,g.mi)+" mi²":r>=4840?L.GeometryUtil.formattedNumber(r/4840,g.ac)+" acres":L.GeometryUtil.formattedNumber(r,g.yd)+" yd²"),p},readableDistance:function(r,h,d,p,y){var g,y=L.Util.extend({},i,y);switch(h?typeof h=="string"?h:"metric":d?"feet":p?"nauticalMile":"yards"){case"metric":g=r>1e3?L.GeometryUtil.formattedNumber(r/1e3,y.km)+" km":L.GeometryUtil.formattedNumber(r,y.m)+" m";break;case"feet":r*=3.28083,g=L.GeometryUtil.formattedNumber(r,y.ft)+" ft";break;case"nauticalMile":r*=.53996,g=L.GeometryUtil.formattedNumber(r/1e3,y.nm)+" nm";break;case"yards":default:r*=1.09361,g=r>1760?L.GeometryUtil.formattedNumber(r/1760,y.mi)+" miles":L.GeometryUtil.formattedNumber(r,y.yd)+" yd"}return g},isVersion07x:function(){var r=L.version.split(".");return parseInt(r[0],10)===0&&parseInt(r[1],10)===7}})})(),L.Util.extend(L.LineUtil,{segmentsIntersect:function(i,r,h,d){return this._checkCounterclockwise(i,h,d)!==this._checkCounterclockwise(r,h,d)&&this._checkCounterclockwise(i,r,h)!==this._checkCounterclockwise(i,r,d)},_checkCounterclockwise:function(i,r,h){return(h.y-i.y)*(r.x-i.x)>(r.y-i.y)*(h.x-i.x)}}),L.Polyline.include({intersects:function(){var i,r,h,d=this._getProjectedPoints(),p=d?d.length:0;if(this._tooFewPointsForIntersection())return!1;for(i=p-1;i>=3;i--)if(r=d[i-1],h=d[i],this._lineSegmentsIntersectsRange(r,h,i-2))return!0;return!1},newLatLngIntersects:function(i,r){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(i),r)},newPointIntersects:function(i,r){var h=this._getProjectedPoints(),d=h?h.length:0,p=h?h[d-1]:null,m=d-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(p,i,m,r?1:0)},_tooFewPointsForIntersection:function(i){var r=this._getProjectedPoints(),h=r?r.length:0;return h+=i||0,!r||h<=3},_lineSegmentsIntersectsRange:function(i,r,h,d){var p,m,g=this._getProjectedPoints();d=d||0;for(var y=h;y>d;y--)if(p=g[y-1],m=g[y],L.LineUtil.segmentsIntersect(i,r,p,m))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var i=[],r=this._defaultShape(),h=0;h<r.length;h++)i.push(this._map.latLngToLayerPoint(r[h]));return i}}),L.Polygon.include({intersects:function(){var i,r,h,d,p=this._getProjectedPoints();return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||(i=p.length,r=p[0],h=p[i-1],d=i-2,this._lineSegmentsIntersectsRange(h,r,d,1)))}}),L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize:function(i){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");L.Control.prototype.initialize.call(this,i);var r;this._toolbars={},L.DrawToolbar&&this.options.draw&&(r=new L.DrawToolbar(this.options.draw),this._toolbars[L.DrawToolbar.TYPE]=r,this._toolbars[L.DrawToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.EditToolbar&&this.options.edit&&(r=new L.EditToolbar(this.options.edit),this._toolbars[L.EditToolbar.TYPE]=r,this._toolbars[L.EditToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.toolbar=this},onAdd:function(i){var r,h=L.DomUtil.create("div","leaflet-draw"),d=!1;for(var p in this._toolbars)this._toolbars.hasOwnProperty(p)&&(r=this._toolbars[p].addToolbar(i))&&(d||(L.DomUtil.hasClass(r,"leaflet-draw-toolbar-top")||L.DomUtil.addClass(r.childNodes[0],"leaflet-draw-toolbar-top"),d=!0),h.appendChild(r));return h},onRemove:function(){for(var i in this._toolbars)this._toolbars.hasOwnProperty(i)&&this._toolbars[i].removeToolbar()},setDrawingOptions:function(i){for(var r in this._toolbars)this._toolbars[r]instanceof L.DrawToolbar&&this._toolbars[r].setOptions(i)},_toolbarEnabled:function(i){var r=i.target;for(var h in this._toolbars)this._toolbars[h]!==r&&this._toolbars[h].disable()}}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook(function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))}),L.Toolbar=L.Class.extend({initialize:function(i){L.setOptions(this,i),this._modes={},this._actionButtons=[],this._activeMode=null;var r=L.version.split(".");parseInt(r[0],10)===1&&parseInt(r[1],10)>=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return this._activeMode!==null},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(i){var r,h=L.DomUtil.create("div","leaflet-draw-section"),d=0,p=this._toolbarClass||"",m=this.getModeHandlers(i);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=i,r=0;r<m.length;r++)m[r].enabled&&this._initModeHandler(m[r].handler,this._toolbarContainer,d++,p,m[r].title);if(d)return this._lastButtonIndex=--d,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),h.appendChild(this._toolbarContainer),h.appendChild(this._actionsContainer),h},removeToolbar:function(){for(var i in this._modes)this._modes.hasOwnProperty(i)&&(this._disposeButton(this._modes[i].button,this._modes[i].handler.enable,this._modes[i].handler),this._modes[i].handler.disable(),this._modes[i].handler.off("enabled",this._handlerActivated,this).off("disabled",this._handlerDeactivated,this));this._modes={};for(var r=0,h=this._actionButtons.length;r<h;r++)this._disposeButton(this._actionButtons[r].button,this._actionButtons[r].callback,this);this._actionButtons=[],this._actionsContainer=null},_initModeHandler:function(i,r,h,d,p){var m=i.type;this._modes[m]={},this._modes[m].handler=i,this._modes[m].button=this._createButton({type:m,title:p,className:d+"-"+m,container:r,callback:this._modes[m].handler.enable,context:this._modes[m].handler}),this._modes[m].buttonIndex=h,this._modes[m].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},_detectIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!u.MSStream},_createButton:function(i){var r=L.DomUtil.create("a",i.className||"",i.container),h=L.DomUtil.create("span","sr-only",i.container);r.href="#",r.appendChild(h),i.title&&(r.title=i.title,h.innerHTML=i.title),i.text&&(r.innerHTML=i.text,h.innerHTML=i.text);var d=this._detectIOS()?"touchstart":"click";return L.DomEvent.on(r,"click",L.DomEvent.stopPropagation).on(r,"mousedown",L.DomEvent.stopPropagation).on(r,"dblclick",L.DomEvent.stopPropagation).on(r,"touchstart",L.DomEvent.stopPropagation).on(r,"click",L.DomEvent.preventDefault).on(r,d,i.callback,i.context),r},_disposeButton:function(i,r){var h=this._detectIOS()?"touchstart":"click";L.DomEvent.off(i,"click",L.DomEvent.stopPropagation).off(i,"mousedown",L.DomEvent.stopPropagation).off(i,"dblclick",L.DomEvent.stopPropagation).off(i,"touchstart",L.DomEvent.stopPropagation).off(i,"click",L.DomEvent.preventDefault).off(i,h,r)},_handlerActivated:function(i){this.disable(),this._activeMode=this._modes[i.handler],L.DomUtil.addClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._showActionsToolbar(),this.fire("enable")},_handlerDeactivated:function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},_createActions:function(i){var r,h,d,p,m=this._actionsContainer,g=this.getActions(i),y=g.length;for(h=0,d=this._actionButtons.length;h<d;h++)this._disposeButton(this._actionButtons[h].button,this._actionButtons[h].callback);for(this._actionButtons=[];m.firstChild;)m.removeChild(m.firstChild);for(var w=0;w<y;w++)"enabled"in g[w]&&!g[w].enabled||(r=L.DomUtil.create("li","",m),p=this._createButton({title:g[w].title,text:g[w].text,container:r,callback:g[w].callback,context:g[w].context}),this._actionButtons.push({button:p,callback:g[w].callback}))},_showActionsToolbar:function(){var i=this._activeMode.buttonIndex,r=this._lastButtonIndex,h=this._activeMode.button.offsetTop-1;this._createActions(this._activeMode.handler),this._actionsContainer.style.top=h+"px",i===0&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-top")),i===r&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-bottom")),this._actionsContainer.style.display="block",this._map.fire(L.Draw.Event.TOOLBAROPENED)},_hideActionsToolbar:function(){this._actionsContainer.style.display="none",L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-top"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-bottom"),this._map.fire(L.Draw.Event.TOOLBARCLOSED)}}),L.Draw=L.Draw||{},L.Draw.Tooltip=L.Class.extend({initialize:function(i){this._map=i,this._popupPane=i._panes.popupPane,this._visible=!1,this._container=i.options.drawControlTooltips?L.DomUtil.create("div","leaflet-draw-tooltip",this._popupPane):null,this._singleLineLabel=!1,this._map.on("mouseout",this._onMouseOut,this)},dispose:function(){this._map.off("mouseout",this._onMouseOut,this),this._container&&(this._popupPane.removeChild(this._container),this._container=null)},updateContent:function(i){return this._container?(i.subtext=i.subtext||"",i.subtext.length!==0||this._singleLineLabel?i.subtext.length>0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(i.subtext.length>0?'<span class="leaflet-draw-tooltip-subtext">'+i.subtext+"</span><br />":"")+"<span>"+i.text+"</span>",i.text||i.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},updatePosition:function(i){var r=this._map.latLngToLayerPoint(i),h=this._container;return this._container&&(this._visible&&(h.style.visibility="inherit"),L.DomUtil.setPosition(h,r)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(i){for(var r in this.options)this.options.hasOwnProperty(r)&&i[r]&&(i[r]=L.extend({},this.options[r],i[r]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,i)},getModeHandlers:function(i){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(i,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(i,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(i,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(i,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(i,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(i,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(i){return[{enabled:i.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:i.completeShape,context:i},{enabled:i.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:i.deleteLastVertex,context:i},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(i){L.setOptions(this,i);for(var r in this._modes)this._modes.hasOwnProperty(r)&&i.hasOwnProperty(r)&&this._modes[r].handler.setOptions(i[r])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(i){i.edit&&(i.edit.selectedPathOptions===void 0&&(i.edit.selectedPathOptions=this.options.edit.selectedPathOptions),i.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,i.edit.selectedPathOptions)),i.remove&&(i.remove=L.extend({},this.options.remove,i.remove)),i.poly&&(i.poly=L.extend({},this.options.poly,i.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,i),this._selectedFeatureCount=0},getModeHandlers:function(i){var r=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(i,{featureGroup:r,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(i,{featureGroup:r}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(i){var r=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return i.removeAllLayers&&r.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),r},addToolbar:function(i){var r=L.Toolbar.prototype.addToolbar.call(this,i);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),r},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var i,r=this.options.featureGroup,h=r.getLayers().length!==0;this.options.edit&&(i=this._modes[L.EditToolbar.Edit.TYPE].button,h?L.DomUtil.removeClass(i,"leaflet-disabled"):L.DomUtil.addClass(i,"leaflet-disabled"),i.setAttribute("title",h?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(i=this._modes[L.EditToolbar.Delete.TYPE].button,h?L.DomUtil.removeClass(i,"leaflet-disabled"):L.DomUtil.addClass(i,"leaflet-disabled"),i.setAttribute("title",h?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(i,r){if(L.Handler.prototype.initialize.call(this,i),L.setOptions(this,r),this._featureGroup=r.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var h=L.version.split(".");parseInt(h[0],10)===1&&parseInt(h[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var i=this._map;i&&(i.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),i._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer(function(i){this._revertLayer(i)},this)},save:function(){var i=new L.LayerGroup;this._featureGroup.eachLayer(function(r){r.edited&&(i.addLayer(r),r.edited=!1)}),this._map.fire(L.Draw.Event.EDITED,{layers:i})},_backupLayer:function(i){var r=L.Util.stamp(i);this._uneditedLayerProps[r]||(i instanceof L.Polyline||i instanceof L.Polygon||i instanceof L.Rectangle?this._uneditedLayerProps[r]={latlngs:L.LatLngUtil.cloneLatLngs(i.getLatLngs())}:i instanceof L.Circle?this._uneditedLayerProps[r]={latlng:L.LatLngUtil.cloneLatLng(i.getLatLng()),radius:i.getRadius()}:(i instanceof L.Marker||i instanceof L.CircleMarker)&&(this._uneditedLayerProps[r]={latlng:L.LatLngUtil.cloneLatLng(i.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(i){var r=L.Util.stamp(i);i.edited=!1,this._uneditedLayerProps.hasOwnProperty(r)&&(i instanceof L.Polyline||i instanceof L.Polygon||i instanceof L.Rectangle?i.setLatLngs(this._uneditedLayerProps[r].latlngs):i instanceof L.Circle?(i.setLatLng(this._uneditedLayerProps[r].latlng),i.setRadius(this._uneditedLayerProps[r].radius)):(i instanceof L.Marker||i instanceof L.CircleMarker)&&i.setLatLng(this._uneditedLayerProps[r].latlng),i.fire("revert-edited",{layer:i}))},_enableLayerEdit:function(i){var r,h,d=i.layer||i.target||i;this._backupLayer(d),this.options.poly&&(h=L.Util.extend({},this.options.poly),d.options.poly=h),this.options.selectedPathOptions&&(r=L.Util.extend({},this.options.selectedPathOptions),r.maintainColor&&(r.color=d.options.color,r.fillColor=d.options.fillColor),d.options.original=L.extend({},d.options),d.options.editing=r),d instanceof L.Marker?(d.editing&&d.editing.enable(),d.dragging.enable(),d.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):d.editing.enable()},_disableLayerEdit:function(i){var r=i.layer||i.target||i;r.edited=!1,r.editing&&r.editing.disable(),delete r.options.editing,delete r.options.original,this._selectedPathOptions&&(r instanceof L.Marker?this._toggleMarkerHighlight(r):(r.setStyle(r.options.previousOptions),delete r.options.previousOptions)),r instanceof L.Marker?(r.dragging.disable(),r.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):r.editing.disable()},_onMouseMove:function(i){this._tooltip.updatePosition(i.latlng)},_onMarkerDragEnd:function(i){var r=i.target;r.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:r})},_onTouchMove:function(i){var r=i.originalEvent.changedTouches[0],h=this._map.mouseEventToLayerPoint(r),d=this._map.layerPointToLatLng(h);i.target.setLatLng(d)},_hasAvailableLayers:function(){return this._featureGroup.getLayers().length!==0}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(i,r){if(L.Handler.prototype.initialize.call(this,i),L.Util.setOptions(this,r),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var h=L.version.split(".");parseInt(h[0],10)===1&&parseInt(h[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var i=this._map;i&&(i.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer(function(i){this._deletableLayers.addLayer(i),i.fire("revert-deleted",{layer:i})},this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer(function(i){this._removeLayer({layer:i})},this),this.save()},_enableLayerDelete:function(i){(i.layer||i.target||i).on("click",this._removeLayer,this)},_disableLayerDelete:function(i){var r=i.layer||i.target||i;r.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(r)},_removeLayer:function(i){var r=i.layer||i.target||i;this._deletableLayers.removeLayer(r),this._deletedLayers.addLayer(r),r.fire("deleted")},_onMouseMove:function(i){this._tooltip.updatePosition(i.latlng)},_hasAvailableLayers:function(){return this._deletableLayers.getLayers().length!==0}})})(window,document);var $e={exports:{}},to;function $n(){return to||(to=1,(function(u,s){(function(n,l){u.exports=n(Qi()),typeof l!="undefined"&&l.L&&(l.L.Ruler=n(L))})(function(n){n.Control.Ruler=n.Control.extend({options:{position:"topright",circleMarker:{color:"red",radius:2},lineStyle:{color:"red",dashArray:"1,6"},lengthUnit:{display:"km",decimal:2,factor:null,label:"Distance:"},angleUnit:{display:"&deg;",decimal:2,factor:null,label:"Bearing:"}},onAdd:function(l){return this._map=l,this._container=n.DomUtil.create("div","leaflet-bar"),this._container.classList.add("leaflet-ruler"),n.DomEvent.disableClickPropagation(this._container),n.DomEvent.on(this._container,"click",this._toggleMeasure,this),this._choice=!1,this._defaultCursor=this._map._container.style.cursor,this._allLayers=n.layerGroup(),this._container},onRemove:function(){n.DomEvent.off(this._container,"click",this._toggleMeasure,this)},_toggleMeasure:function(){this._choice=!this._choice,this._clickedLatLong=null,this._clickedPoints=[],this._totalLength=0,this._choice?(this._map.doubleClickZoom.disable(),n.DomEvent.on(this._map._container,"keydown",this._escape,this),n.DomEvent.on(this._map._container,"dblclick",this._closePath,this),this._container.classList.add("leaflet-ruler-clicked"),this._clickCount=0,this._tempLine=n.featureGroup().addTo(this._allLayers),this._tempPoint=n.featureGroup().addTo(this._allLayers),this._pointLayer=n.featureGroup().addTo(this._allLayers),this._polylineLayer=n.featureGroup().addTo(this._allLayers),this._allLayers.addTo(this._map),this._map._container.style.cursor="crosshair",this._map.on("click",this._clicked,this),this._map.on("mousemove",this._moving,this)):(this._map.doubleClickZoom.enable(),n.DomEvent.off(this._map._container,"keydown",this._escape,this),n.DomEvent.off(this._map._container,"dblclick",this._closePath,this),this._container.classList.remove("leaflet-ruler-clicked"),this._map.removeLayer(this._allLayers),this._allLayers=n.layerGroup(),this._map._container.style.cursor=this._defaultCursor,this._map.off("click",this._clicked,this),this._map.off("mousemove",this._moving,this))},_clicked:function(l){if(this._clickedLatLong=l.latlng,this._clickedPoints.push(this._clickedLatLong),n.circleMarker(this._clickedLatLong,this.options.circleMarker).addTo(this._pointLayer),this._clickCount>0&&!l.latlng.equals(this._clickedPoints[this._clickedPoints.length-2])){this._movingLatLong&&n.polyline([this._clickedPoints[this._clickCount-1],this._movingLatLong],this.options.lineStyle).addTo(this._polylineLayer);var i;this._totalLength+=this._result.Distance,this._clickCount>1?i="<b>"+this.options.angleUnit.label+"</b>&nbsp;"+this._result.Bearing.toFixed(this.options.angleUnit.decimal)+"&nbsp;"+this.options.angleUnit.display+"<br><b>"+this.options.lengthUnit.label+"</b>&nbsp;"+this._totalLength.toFixed(this.options.lengthUnit.decimal)+"&nbsp;"+this.options.lengthUnit.display:i="<b>"+this.options.angleUnit.label+"</b>&nbsp;"+this._result.Bearing.toFixed(this.options.angleUnit.decimal)+"&nbsp;"+this.options.angleUnit.display+"<br><b>"+this.options.lengthUnit.label+"</b>&nbsp;"+this._result.Distance.toFixed(this.options.lengthUnit.decimal)+"&nbsp;"+this.options.lengthUnit.display,n.circleMarker(this._clickedLatLong,this.options.circleMarker).bindTooltip(i,{permanent:!0,className:"result-tooltip"}).addTo(this._pointLayer).openTooltip()}this._clickCount++},_moving:function(l){if(this._clickedLatLong){n.DomEvent.off(this._container,"click",this._toggleMeasure,this),this._movingLatLong=l.latlng,this._tempLine&&(this._map.removeLayer(this._tempLine),this._map.removeLayer(this._tempPoint));var i;this._addedLength=0,this._tempLine=n.featureGroup(),this._tempPoint=n.featureGroup(),this._tempLine.addTo(this._map),this._tempPoint.addTo(this._map),this._calculateBearingAndDistance(),this._addedLength=this._result.Distance+this._totalLength,n.polyline([this._clickedLatLong,this._movingLatLong],this.options.lineStyle).addTo(this._tempLine),this._clickCount>1?i="<b>"+this.options.angleUnit.label+"</b>&nbsp;"+this._result.Bearing.toFixed(this.options.angleUnit.decimal)+"&nbsp;"+this.options.angleUnit.display+"<br><b>"+this.options.lengthUnit.label+"</b>&nbsp;"+this._addedLength.toFixed(this.options.lengthUnit.decimal)+"&nbsp;"+this.options.lengthUnit.display+'<br><div class="plus-length">(+'+this._result.Distance.toFixed(this.options.lengthUnit.decimal)+")</div>":i="<b>"+this.options.angleUnit.label+"</b>&nbsp;"+this._result.Bearing.toFixed(this.options.angleUnit.decimal)+"&nbsp;"+this.options.angleUnit.display+"<br><b>"+this.options.lengthUnit.label+"</b>&nbsp;"+this._result.Distance.toFixed(this.options.lengthUnit.decimal)+"&nbsp;"+this.options.lengthUnit.display,n.circleMarker(this._movingLatLong,this.options.circleMarker).bindTooltip(i,{sticky:!0,offset:n.point(0,-40),className:"moving-tooltip"}).addTo(this._tempPoint).openTooltip()}},_escape:function(l){l.keyCode===27&&(this._clickCount>0?this._closePath():(this._choice=!0,this._toggleMeasure()))},_calculateBearingAndDistance:function(){var l=this._clickedLatLong.lat,i=this._clickedLatLong.lng,r=this._movingLatLong.lat,h=this._movingLatLong.lng,d=Math.PI/180,p=Math.sin((h-i)*d)*Math.cos(r*d),m=Math.cos(l*d)*Math.sin(r*d)-Math.sin(l*d)*Math.cos(r*d)*Math.cos((h-i)*d),g=Math.atan2(p,m)*((this.options.angleUnit.factor?this.options.angleUnit.factor/2:180)/Math.PI);g+=g<0?this.options.angleUnit.factor?this.options.angleUnit.factor:360:0;var y=this.options.lengthUnit.factor?6371*this.options.lengthUnit.factor:6371,w=(r-l)*d,T=(h-i)*d,E=Math.sin(w/2)*Math.sin(w/2)+Math.cos(l*d)*Math.cos(r*d)*Math.sin(T/2)*Math.sin(T/2),A=2*Math.atan2(Math.sqrt(E),Math.sqrt(1-E)),N=y*A;this._result={Bearing:g,Distance:N}},_closePath:function(){this._map.removeLayer(this._tempLine),this._map.removeLayer(this._tempPoint),this._clickCount<=1&&this._map.removeLayer(this._pointLayer),this._choice=!1,n.DomEvent.on(this._container,"click",this._toggleMeasure,this),this._toggleMeasure()}}),n.control.ruler=function(l){return new n.Control.Ruler(l)}},window)})($e)),$e.exports}$n();let xe;const tr=new Uint8Array(16);function er(){if(!xe&&(xe=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!xe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xe(tr)}const ot=[];for(let u=0;u<256;++u)ot.push((u+256).toString(16).slice(1));function ir(u,s=0){return ot[u[s+0]]+ot[u[s+1]]+ot[u[s+2]]+ot[u[s+3]]+"-"+ot[u[s+4]]+ot[u[s+5]]+"-"+ot[u[s+6]]+ot[u[s+7]]+"-"+ot[u[s+8]]+ot[u[s+9]]+"-"+ot[u[s+10]]+ot[u[s+11]]+ot[u[s+12]]+ot[u[s+13]]+ot[u[s+14]]+ot[u[s+15]]}const eo={randomUUID:typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ti(u,s,n){if(eo.randomUUID&&!u)return eo.randomUUID();u=u||{};const l=u.random||(u.rng||er)();return l[6]=l[6]&15|64,l[8]=l[8]&63|128,ir(l)}function ke(u){var n,l;const s=(l=u.id)!=null?l:(n=u.properties)==null?void 0:n.id;if(s!=null)return String(s)}const or=/^(.*)::(\d+)$/;function io(u){const s=ke(u);if(!s)return null;const n=or.exec(s);return n?{baseId:n[1],childIndex:Number(n[2]),feature:u}:null}function nr(u,s){const n=s&&typeof s=="object"?{...s}:{};return n.id=u,n}function rr(u,s){const n=[...s].sort((d,p)=>d.childIndex-p.childIndex),l=n[0].feature,i=nr(u,l.properties),r=n.map(d=>d.feature.geometry).filter(d=>d!=null);let h;return r.length===0?h={type:"GeometryCollection",geometries:[]}:r.length===1?h=r[0]:r.every(d=>d.type==="Point")?h={type:"MultiPoint",coordinates:r.map(d=>d.coordinates)}:r.every(d=>d.type==="LineString")?h={type:"MultiLineString",coordinates:r.map(d=>d.coordinates)}:r.every(d=>d.type==="Polygon")?h={type:"MultiPolygon",coordinates:r.map(d=>d.coordinates)}:h={type:"GeometryCollection",geometries:r},{type:"Feature",id:u,properties:i,geometry:h}}function sr(u,s){const n=l=>{switch(l.type){case"Point":s(l.coordinates);break;case"MultiPoint":case"LineString":for(const i of l.coordinates)s(i);break;case"MultiLineString":case"Polygon":for(const i of l.coordinates)for(const r of i)s(r);break;case"MultiPolygon":for(const i of l.coordinates)for(const r of i)for(const h of r)s(h);break;case"GeometryCollection":for(const i of l.geometries)n(i);break}};n(u)}function ar(u){const s=u.geometry;if(!s)return null;let n=1/0,l=1/0,i=-1/0,r=-1/0,h=!1;return sr(s,d=>{const[p,m]=d;typeof p!="number"||typeof m!="number"||(h=!0,p<n&&(n=p),m<l&&(l=m),p>i&&(i=p),m>r&&(r=m))}),h?[n,l,i,r]:null}function lr(u){let s=1/0,n=1/0,l=-1/0,i=-1/0,r=!1;for(const h of u.features){const d=ar(h);d&&(r=!0,s=Math.min(s,d[0]),n=Math.min(n,d[1]),l=Math.max(l,d[2]),i=Math.max(i,d[3]))}return r?[s,n,l,i]:null}function hr(u){const[s,n,l,i]=u;return[[n,s],[i,l]]}function cr(u){var n;const s=[];for(const l of u.features){if(!l||l.type!=="Feature")continue;const i=(n=l.properties)!=null?n:{},r=ke(l),h=(p,m)=>{const g=i&&typeof i=="object"?{...i}:{},y=r!==void 0?`${r}::${m}`:void 0;return y!==void 0&&(g.id=y),{type:"Feature",id:y,properties:g,geometry:p}},d=l.geometry;if(d)switch(d.type){case"MultiPolygon":for(const[p,m]of d.coordinates.entries())s.push(h({type:"Polygon",coordinates:m},p));break;case"MultiLineString":for(const[p,m]of d.coordinates.entries())s.push(h({type:"LineString",coordinates:m},p));break;case"MultiPoint":for(const[p,m]of d.coordinates.entries())s.push(h({type:"Point",coordinates:m},p));break;case"GeometryCollection":for(const[p,m]of d.geometries.entries())s.push(h(m,p));break;default:s.push(l);break}}return{type:"FeatureCollection",features:s}}function dr(u,s={}){var h;if(((h=s.adapter)!=null?h:"editing")!=="source")return u;const l=new Map;for(const d of u.features){const p=io(d);if(!p)continue;const m=l.get(p.baseId);m?m.push(p):l.set(p.baseId,[p])}if(l.size===0)return u;const i=new Set,r=[];for(const d of u.features){const p=io(d);if(!p){r.push(d);continue}i.has(p.baseId)||(i.add(p.baseId),r.push(rr(p.baseId,l.get(p.baseId))))}return{type:"FeatureCollection",features:r}}function oo(u){return(u==null?void 0:u.type)==="Polygon"}function no(u){return(u==null?void 0:u.type)==="MultiPolygon"}function ur(u){const s=u.geometry;return s?oo(s)?[s.coordinates]:no(s)?s.coordinates:[]:[]}function fr(u,s){var i,r;const n=[];for(const h of u){const d=ur(h);d.length>0&&n.push(...d)}if(n.length===0)return null;const l=(r=s!=null?s:(i=u[0])==null?void 0:i.properties)!=null?r:{};return n.length===1?{type:"Feature",properties:{...l},geometry:{type:"Polygon",coordinates:n[0]}}:{type:"Feature",properties:{...l},geometry:{type:"MultiPolygon",coordinates:n}}}class pr{constructor(s=be("feature-store","debug")){k(this,"log");k(this,"features");this.log=s,this.features=new Map}size(){return this.features.size}has(s){return this.features.has(s)}get(s){return this.features.get(s)}add(s){var r,h,d,p;const n=[],l=(h=(r=performance.now)==null?void 0:r.call(performance))!=null?h:Date.now();for(const m of s.features){const g=this.ensureId(m),y={...m,id:g};this.features.set(g,y),n.push(g)}const i=((p=(d=performance.now)==null?void 0:d.call(performance))!=null?p:Date.now())-l;return this.log.debug("add",{count:s.features.length,ids:n,elapsedMs:Math.round(i)}),n}update(s,n){if(!this.features.has(s)){this.log.warn("update:missing",{id:s});return}const l={...n,id:s};this.features.set(s,l),this.log.debug("update",{id:s})}remove(s){this.features.delete(s)?this.log.debug("remove",{id:s}):this.log.warn("remove:missing",{id:s})}clear(){const s=this.features.size;this.features.clear(),this.log.debug("clear",{count:s})}toFeatureCollection(){return{type:"FeatureCollection",features:Array.from(this.features.values())}}bounds(){const s=this.toFeatureCollection();if(s.features.length===0)return null;const n=lr(s);return n?hr(n):null}ensureId(s){const n=ke(s);if(n)return String(n);const l=ti();return s.id=l,s.properties&&typeof s.properties=="object"&&(s.properties.id=l),l}}const Ae={polygon:{selectors:["a.leaflet-draw-draw-polygon"],dataTool:"polygon"},polyline:{selectors:["a.leaflet-draw-draw-polyline"],dataTool:"polyline"},rectangle:{selectors:["a.leaflet-draw-draw-rectangle"],dataTool:"rectangle"},circle:{selectors:["a.leaflet-draw-draw-circle"],dataTool:"circle"},marker:{selectors:["a.leaflet-draw-draw-marker"],dataTool:"marker"},layerCake:{selectors:["a.leaflet-draw-draw-cake"],dataTool:"layer-cake"},move:{selectors:["a.leaflet-draw-draw-move"],dataTool:"move"},select:{selectors:[],dataTool:"select"},edit:{selectors:["a.leaflet-draw-edit-edit"],dataTool:"edit"},delete:{selectors:["a.leaflet-draw-edit-remove"],dataTool:"delete"},ruler:{selectors:[".leaflet-ruler","a.leaflet-ruler"],dataTool:"ruler"},measurementSettings:{selectors:[".leaflet-ruler-settings-button"],dataTool:"measurement-settings"},layerStyle:{selectors:[],dataTool:"layer-style"},save:{selectors:[],dataTool:"save"}},mr=Object.keys(Ae),ro="leaflet-geokit-tool-button-icon",so=".leaflet-geokit-cake-icon, .leaflet-geokit-move-icon",_r="[data-geokit-managed-toolbar='true']",gr="[data-geokit-tool-popover='true']",vr="[data-geokit-tool][aria-expanded='true']",ei=new WeakMap,ii=new WeakMap,oi=new WeakMap;function ni(u,s,n={}){ee(u);for(const l of mr){const i=Ae[l];for(const r of yr(u,i.selectors)){r.setAttribute("data-geokit-tool",i.dataTool),Lr(r);const h=s==null?void 0:s[l];h&&br(r,h,l),ho(r,l,{source:"leaflet-toolbar",activate:!1,onTrigger:n.onTrigger})}}Er(u,s,n)}function yr(u,s){const n=new Set;for(const l of s)u.querySelectorAll(l).forEach(i=>{n.add(i)});return[...n]}function Lr(u){const s=ei.get(u);s&&(u.removeEventListener("click",s),ei.delete(u)),delete u.__geokitToolButtonConfig;const n=Me(u.dataset.geokitToolButtonClass);n.length>0&&u.classList.remove(...n),delete u.dataset.geokitToolButtonClass,u.removeAttribute("data-geokit-custom-tool-button"),u.dataset.geokitOriginalTitle!==void 0&&ao(u,"title",u.dataset.geokitOriginalTitle),u.dataset.geokitOriginalAriaLabel!==void 0&&ao(u,"aria-label",u.dataset.geokitOriginalAriaLabel),u.dataset.geokitOriginalStyleBackgroundImage!==void 0&&ri(u,"background-image",u.dataset.geokitOriginalStyleBackgroundImage,u.dataset.geokitOriginalStyleBackgroundImagePriority),u.dataset.geokitOriginalStylePosition!==void 0&&ri(u,"position",u.dataset.geokitOriginalStylePosition,u.dataset.geokitOriginalStylePositionPriority),Array.from(u.children).forEach(l=>{l instanceof HTMLElement&&l.dataset.geokitToolButtonIcon==="true"&&l.remove()}),u.querySelectorAll(so).forEach(l=>{l.hidden=!1}),u.removeAttribute("aria-expanded")}function ao(u,s,n){n?u.setAttribute(s,n):u.removeAttribute(s)}function ri(u,s,n,l){n?u.style.setProperty(s,n,l):u.style.removeProperty(s)}function br(u,s,n){var r;wr(u),u.__geokitToolButtonConfig=s,u.setAttribute("data-geokit-custom-tool-button","true"),s.title&&u.setAttribute("title",s.title);const l=(r=s.ariaLabel)!=null?r:s.title;l&&u.setAttribute("aria-label",l);const i=Me(s.className);i.length>0&&(u.classList.add(...i),u.dataset.geokitToolButtonClass=i.join(" ")),s.iconUrl?Ee(u,s,{tool:n}):(s.iconHtml||s.renderIcon)&&Ee(u,s,{tool:n})}function wr(u){var s,n;u.dataset.geokitOriginalTitle===void 0&&(u.dataset.geokitOriginalTitle=(s=u.getAttribute("title"))!=null?s:""),u.dataset.geokitOriginalAriaLabel===void 0&&(u.dataset.geokitOriginalAriaLabel=(n=u.getAttribute("aria-label"))!=null?n:""),u.dataset.geokitOriginalStyleBackgroundImage===void 0&&(u.dataset.geokitOriginalStyleBackgroundImage=u.style.getPropertyValue("background-image"),u.dataset.geokitOriginalStyleBackgroundImagePriority=u.style.getPropertyPriority("background-image")),u.dataset.geokitOriginalStylePosition===void 0&&(u.dataset.geokitOriginalStylePosition=u.style.getPropertyValue("position"),u.dataset.geokitOriginalStylePositionPriority=u.style.getPropertyPriority("position"))}function Me(u){return u?u.split(/\s+/).map(s=>s.trim()).filter(Boolean):[]}function xr(u){return!!(u.iconUrl||u.iconHtml||u.renderIcon)}function Ee(u,s,n={}){var p,m;const[l,i]=kr(s.iconSize);u.style.setProperty("background-image","none","important"),u.style.setProperty("position","relative","important"),u.querySelectorAll(so).forEach(g=>{g.hidden=!0});const r=document.createElement("span");r.className=ro,r.dataset.geokitToolButtonIcon="true",r.setAttribute("aria-hidden","true"),r.style.setProperty("position","absolute","important"),r.style.setProperty("display","block","important"),r.style.setProperty("left","50%","important"),r.style.setProperty("top","50%","important"),r.style.setProperty("width",`${l}px`,"important"),r.style.setProperty("height",`${i}px`,"important"),r.style.setProperty("transform","translate(-50%, -50%)","important"),r.style.setProperty("pointer-events","none","important");const h=(m=s.renderIcon)==null?void 0:m.call(s,{tool:(p=n.tool)!=null?p:"polygon",groupId:n.groupId,button:u});if(h instanceof HTMLElement||typeof SVGElement!="undefined"&&h instanceof SVGElement)r.appendChild(h);else if(typeof h=="string"&&h.trim())r.innerHTML=h,lo(r);else if(s.iconHtml)r.innerHTML=s.iconHtml,lo(r);else if(s.iconUrl){const g=document.createElement("img");g.src=s.iconUrl,g.alt="",g.decoding="async",g.draggable=!1,g.style.setProperty("display","block","important"),g.style.setProperty("width","100%","important"),g.style.setProperty("height","100%","important"),g.style.setProperty("object-fit","contain","important"),r.appendChild(g)}u.appendChild(r)}function lo(u){const s=u.firstElementChild;s&&(s.style.setProperty("display","block","important"),s.style.setProperty("width","100%","important"),s.style.setProperty("height","100%","important"),s.style.setProperty("color","currentColor","important"))}function kr(u){const s=u==null?void 0:u[0],n=u==null?void 0:u[1];return typeof s=="number"&&Number.isFinite(s)&&s>0&&typeof n=="number"&&Number.isFinite(n)&&n>0?[s,n]:[18,18]}function ho(u,s,n){const l=i=>{var d;const r=Ar(u),h=Mr(u);r!=null&&r.popover?Sr(u,s,r,{container:h,groupId:n.groupId}):ee(h),(d=n.onTrigger)==null||d.call(n,s,{source:n.source,groupId:n.groupId,activate:n.activate}),n.activate&&(i.preventDefault(),i.stopPropagation())};u.addEventListener("click",l),ei.set(u,l)}function Ar(u){const s=u.__geokitToolButtonConfig;if(s)return s;const n=u.dataset.geokitToolButtonConfig;if(!n)return null;try{return JSON.parse(n)}catch{return null}}function Mr(u){var n;const s=u.closest("[data-geokit-map-container]");return(n=s!=null?s:u.parentElement)!=null?n:u}function Er(u,s,n){var r;u.setAttribute("data-geokit-map-container","true"),u.querySelectorAll(_r).forEach(h=>h.remove());const l=(r=n.toolbarGroups)!=null?r:[],i=l.some(h=>(h==null?void 0:h.hideDefaultToolbar)!==!1);Tr(u,i),l.forEach(h=>{var m;if(!(h!=null&&h.id)||!Array.isArray(h.tools)||h.tools.length===0)return;const d=document.createElement("div");d.dataset.geokitManagedToolbar="true",d.dataset.geokitToolbarGroup=h.id,d.className="leaflet-geokit-toolbar-group leaflet-bar",d.setAttribute("role","toolbar"),d.setAttribute("aria-label",(m=h.ariaLabel)!=null?m:h.id),Pr(d,h.position,h.offset);const p=Me(h.className);p.length>0&&d.classList.add(...p),h.tools.forEach((g,y)=>{const w=Cr(g,h,y,s==null?void 0:s[g]);ho(w,g,{source:"toolbar",activate:!0,groupId:h.id,onTrigger:n.onTrigger}),d.appendChild(w)}),u.appendChild(d)})}function Tr(u,s){u.toggleAttribute("data-geokit-default-toolbar-hidden",s),u.querySelectorAll(".leaflet-draw-toolbar, .leaflet-ruler, .leaflet-ruler-settings-control").forEach(n=>{s?(n.dataset.geokitOriginalDisplay===void 0&&(n.dataset.geokitOriginalDisplay=n.style.display,n.dataset.geokitOriginalDisplayPriority=n.style.getPropertyPriority("display")),n.style.setProperty("display","none","important")):n.dataset.geokitOriginalDisplay!==void 0&&(ri(n,"display",n.dataset.geokitOriginalDisplay,n.dataset.geokitOriginalDisplayPriority),delete n.dataset.geokitOriginalDisplay,delete n.dataset.geokitOriginalDisplayPriority)})}function Cr(u,s,n,l){var d,p,m,g,y;const i=document.createElement("button");i.type="button",i.dataset.geokitTool=(p=(d=Ae[u])==null?void 0:d.dataTool)!=null?p:u,i.dataset.geokitToolbarGroup=s.id,i.dataset.geokitToolbarPosition=(m=s.position)!=null?m:"topright",i.dataset.geokitToolInstance=zr(s.id,u,n),i.className="leaflet-geokit-toolbar-button",i.style.setProperty("display","block","important"),i.style.setProperty("width","34px","important"),i.style.setProperty("height","34px","important"),i.style.setProperty("padding","0","important"),i.style.setProperty("border","0","important"),i.style.setProperty("border-bottom","1px solid #ccc","important"),i.style.setProperty("background","#fff","important"),i.style.setProperty("cursor","pointer","important"),i.style.setProperty("position","relative","important");const r=(g=l==null?void 0:l.title)!=null?g:co(u);i.title=r,i.setAttribute("aria-label",(y=l==null?void 0:l.ariaLabel)!=null?y:r);const h=Me(l==null?void 0:l.className);if(h.length>0&&i.classList.add(...h),l&&(i.__geokitToolButtonConfig=l,xr(l)&&Ee(i,l,{tool:u,groupId:s.id})),!i.querySelector(`.${ro}`)){const w={iconHtml:Br(u),iconSize:[20,20]};Ee(i,w,{tool:u,groupId:s.id})}return i}function Pr(u,s="topright",n){const[l,i]=Rr(n);u.style.setProperty("position","absolute","important"),u.style.setProperty("z-index","1000","important"),u.style.setProperty("background","#fff","important"),u.style.setProperty("box-shadow","0 1px 5px rgba(0,0,0,0.35)","important");const[r,h]=s.startsWith("bottom")?["bottom",s.endsWith("right")?"right":"left"]:["top",s.endsWith("right")?"right":"left"];u.style.setProperty(r,`${i}px`,"important"),u.style.setProperty(h,`${l}px`,"important")}function Sr(u,s,n,l){var d,p,m,g,y,w,T,E;if(!n.popover)return;ee(l.container);const i=document.createElement("div");if(i.dataset.geokitToolPopover="true",i.dataset.geokitTool=(p=(d=Ae[s])==null?void 0:d.dataTool)!=null?p:s,u.dataset.geokitToolInstance&&(i.dataset.geokitToolInstance=u.dataset.geokitToolInstance),l.groupId&&(i.dataset.geokitToolbarGroup=l.groupId),i.setAttribute("role","dialog"),i.setAttribute("aria-label",(g=(m=n.popover.ariaLabel)!=null?m:n.popover.title)!=null?g:co(s)),i.style.setProperty("position","absolute","important"),i.style.setProperty("z-index","10001","important"),i.style.setProperty("max-width","260px","important"),i.style.setProperty("padding","10px 12px","important"),i.style.setProperty("border","1px solid rgba(0,0,0,0.22)","important"),i.style.setProperty("border-radius","8px","important"),i.style.setProperty("background","#fff","important"),i.style.setProperty("box-shadow","0 8px 24px rgba(0,0,0,0.24)","important"),i.style.setProperty("font","13px system-ui, sans-serif","important"),i.style.setProperty("line-height","1.35","important"),n.popover.title){const A=document.createElement("strong");A.textContent=n.popover.title,A.style.setProperty("display","block","important"),A.style.setProperty("margin-bottom","4px","important"),i.appendChild(A)}if(n.popover.body){const A=document.createElement("div");A.textContent=n.popover.body,i.appendChild(A)}if(n.popover.html){const A=document.createElement("div");A.innerHTML=n.popover.html,i.appendChild(A)}const r=(w=(y=n.popover).render)==null?void 0:w.call(y,{tool:s,groupId:l.groupId,button:u,popover:i}),h=typeof DocumentFragment!="undefined"&&r instanceof DocumentFragment;if(r instanceof HTMLElement||h)i.appendChild(r);else if(typeof r=="string"&&r.trim()){const A=document.createElement("div");A.innerHTML=r,i.appendChild(A)}l.container.appendChild(i),Ir(l.container,u,i),u.setAttribute("aria-expanded","true"),oi.set(i,{tool:s,groupId:l.groupId,button:u,config:n}),Dr(l.container,u,i),(E=(T=n.popover).onOpen)==null||E.call(T,{tool:s,groupId:l.groupId,button:u,popover:i})}function Ir(u,s,n){const l=u.getBoundingClientRect(),i=s.getBoundingClientRect(),r=Math.max(8,Math.min(i.left-l.left,l.width-n.offsetWidth-8)),h=Math.max(8,Math.min(i.bottom-l.top+8,l.height-n.offsetHeight-8));n.style.setProperty("left",`${r}px`,"important"),n.style.setProperty("top",`${h}px`,"important")}function Dr(u,s,n){const l=h=>{h.key==="Escape"&&ee(u)},i=h=>{const d=h.target;d instanceof Node&&(n.contains(d)||s.contains(d)||ee(u))};document.addEventListener("keydown",l,!0);const r=window.setTimeout(()=>{n.isConnected&&document.addEventListener("pointerdown",i,!0)},0);ii.set(n,{keydown:l,pointerdown:i,pointerdownTimer:r})}function ee(u){u.querySelectorAll(gr).forEach(s=>{var i,r,h;const n=oi.get(s);n==null||n.button.removeAttribute("aria-expanded"),n||(i=Or(u,s))==null||i.removeAttribute("aria-expanded");const l=ii.get(s);l&&(window.clearTimeout(l.pointerdownTimer),document.removeEventListener("keydown",l.keydown,!0),document.removeEventListener("pointerdown",l.pointerdown,!0),ii.delete(s)),s.remove(),n&&((h=(r=n.config.popover)==null?void 0:r.onClose)==null||h.call(r,{tool:n.tool,groupId:n.groupId,button:n.button,popover:s}),oi.delete(s))})}function Or(u,s){const n=u.querySelectorAll(vr);for(const l of n)if(s.dataset.geokitToolInstance&&l.dataset.geokitToolInstance===s.dataset.geokitToolInstance||l.dataset.geokitTool===s.dataset.geokitTool&&l.dataset.geokitToolbarGroup===s.dataset.geokitToolbarGroup)return l;return null}function zr(u,s,n){return`${u}:${s}:${n}`}function co(u){return{polygon:"Draw polygon",polyline:"Draw line",rectangle:"Draw rectangle",circle:"Draw circle",marker:"Place marker",layerCake:"Draw layer cake",move:"Move feature",select:"Select feature",edit:"Edit features",delete:"Delete features",ruler:"Measure distance",measurementSettings:"Measurement settings",layerStyle:"Layer style",save:"Save map geometry"}[u]}function Br(u){const s="currentColor",n="none";return{polygon:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${s}" stroke-width="1.8" stroke-linejoin="round"><path d="M5.5 7.2 9.2 4.8 18.5 8.3 16.1 18.2 6.3 15.7Z"/><circle cx="5.5" cy="7.2" r="1.2" fill="currentColor"/><circle cx="18.5" cy="8.3" r="1.2" fill="currentColor"/><circle cx="16.1" cy="18.2" r="1.2" fill="currentColor"/></svg>`,polyline:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${s}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4.8 16.7 9.2 9.5 14.4 13.1 19 6.1"/><circle cx="4.8" cy="16.7" r="1.3" fill="currentColor"/><circle cx="14.4" cy="13.1" r="1.3" fill="currentColor"/><circle cx="19" cy="6.1" r="1.3" fill="currentColor"/></svg>`,rectangle:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${s}" stroke-width="1.8"><rect x="5.5" y="6.5" width="13" height="11" rx="2"/><path d="M8.5 10h7"/></svg>`,circle:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${s}" stroke-width="1.8"><circle cx="12" cy="12" r="6.8"/><circle cx="12" cy="12" r="2" fill="currentColor"/></svg>`,marker:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${s}" stroke-width="1.7" stroke-linejoin="round"><path d="M12 3.4a6 6 0 0 0-6 6c0 4.2 4.5 9.4 5.6 10.5a.6.6 0 0 0 .8 0C13.5 18.8 18 13.6 18 9.4a6 6 0 0 0-6-6Z"/><circle cx="12" cy="9.5" r="2.1" fill="currentColor" stroke="none"/></svg>`,layerCake:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${s}" stroke-width="1.7" stroke-linecap="round"><ellipse cx="12" cy="7.6" rx="6.8" ry="2.7"/><path d="M5.2 11c1.3 1.2 3.8 2 6.8 2s5.5-.8 6.8-2M6.3 15c1.3.9 3.3 1.5 5.7 1.5s4.4-.6 5.7-1.5"/></svg>`,move:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${s}" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 4v16M4 12h16M12 4l-2 2M12 4l2 2M20 12l-2-2M20 12l-2 2M12 20l-2-2M12 20l2-2M4 12l2-2M4 12l2 2"/></svg>`,select:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${s}" stroke-width="1.8" stroke-linejoin="round"><path d="M6 4.8 18.5 12 13 13.4 10.2 19Z"/></svg>`,edit:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${s}" stroke-width="1.7" stroke-linejoin="round"><path d="m6 17.8 3.5-.7 7.7-7.7-2.8-2.8-7.7 7.7Z"/><path d="m12.9 7.9 2.8 2.8"/></svg>`,delete:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${s}" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M7.5 8.2h9l-.8 10a1.7 1.7 0 0 1-1.7 1.5h-4a1.7 1.7 0 0 1-1.7-1.5Z"/><path d="M9.5 8.2V6.8c0-.7.6-1.3 1.3-1.3h2.4c.7 0 1.3.6 1.3 1.3v1.4M10.5 11.5v4.8M13.5 11.5v4.8"/></svg>`,ruler:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${s}" stroke-width="1.7" stroke-linejoin="round"><path d="M5.2 17.8 17.8 5.2l1.7 1.7L6.9 19.5H5.2Z"/><path d="m12.2 8 1.5 1.5M9.9 10.3l1.5 1.5M7.6 12.6l1.5 1.5"/></svg>`,measurementSettings:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${s}" stroke-width="1.6" stroke-linecap="round"><circle cx="12" cy="12" r="3.2"/><path d="M12 4.8v2M12 17.2v2M4.8 12h2M17.2 12h2M7 7l1.4 1.4M15.6 15.6 17 17M17 7l-1.4 1.4M8.4 15.6 7 17"/></svg>`,layerStyle:'<svg viewBox="0 0 24 24" fill="none"><path d="M5 6h14v3H5z" fill="currentColor" opacity=".9"/><path d="M5 11h14v3H5z" fill="currentColor" opacity=".65"/><path d="M5 16h14v3H5z" fill="currentColor" opacity=".4"/></svg>',save:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${s}" stroke-width="1.8" stroke-linejoin="round" stroke-linecap="round"><path d="M5.5 4.8h11.2l1.8 1.8v12.6h-13Z"/><path d="M8 4.8v5h7v-5M8.2 19.2v-5.4h7.6v5.4"/><path d="M10 16.4h4"/></svg>`}[u]}function Rr(u){const s=u==null?void 0:u[0],n=u==null?void 0:u[1];return typeof s=="number"&&Number.isFinite(s)&&s>=0&&typeof n=="number"&&Number.isFinite(n)&&n>=0?[s,n]:[10,10]}const uo=new WeakSet;function Nr(u=we){var l;if(uo.has(u))return;const s=u.DrawToolbar;if(!((l=s==null?void 0:s.prototype)!=null&&l.getModeHandlers))return;const n=s.prototype.getModeHandlers;s.prototype.getModeHandlers=function(i){var h,d,p,m;const r=n.call(this,i);if((h=this.options)!=null&&h.cake){const g=(d=u.Draw)==null?void 0:d.Cake;if(!g)return r;r.push({enabled:!0,handler:new g(i,this.options.cake),title:"Draw Layer Cake (Subtractive Zones)"})}if((p=this.options)!=null&&p.move){const g=(m=u.Draw)==null?void 0:m.Move;if(!g)return r;r.push({enabled:!0,handler:new g(i,this.options.move),title:"Move/Translate Features"})}return r},uo.add(u)}const Pe=class Pe extends Q.Draw.Circle{constructor(s,n){super(s,n),this.type=Pe.TYPE}addHooks(){super.addHooks();const s=this._tooltip;s!=null&&s.updateContent&&s.updateContent({text:"Click and drag to draw the Layer Cake base",subtext:"Release mouse to finish base layer"})}};k(Pe,"TYPE","cake");let Te=Pe;Q.Draw.Cake=Te;function Ur(u){const s=u.Draw;if(!s||s.Cake)return;const l=class l extends s.Circle{constructor(r,h){super(r,h),this.type=l.TYPE}addHooks(){super.addHooks();const r=this._tooltip;r!=null&&r.updateContent&&r.updateContent({text:"Click and drag to draw the Layer Cake base",subtext:"Release mouse to finish base layer"})}};k(l,"TYPE","cake");let n=l;s.Cake=n}const Se=class Se extends Q.Draw.Feature{constructor(n,l){super(n,l);k(this,"_featureGroup");k(this,"_selectedLayer",null);k(this,"_originalLatLngs",null);k(this,"_dragStartLatLng",null);k(this,"_isDragging",!1);k(this,"_pendingMove",null);this.type=Se.TYPE,this._featureGroup=(l==null?void 0:l.featureGroup)||new Q.FeatureGroup}enable(){this._enabled||super.enable()}disable(){this._enabled&&(this._cleanupDragging(),super.disable())}addHooks(){const n=this._map;if(!n)return;Q.DomUtil.addClass(n.getContainer(),"leaflet-draw-move-mode"),this._featureGroup.eachLayer(i=>{this._enableLayerHover(i)});const l=this._tooltip;l!=null&&l.updateContent&&l.updateContent({text:"Click and drag a feature to move it",subtext:""})}removeHooks(){const n=this._map;n&&(Q.DomUtil.removeClass(n.getContainer(),"leaflet-draw-move-mode"),this._featureGroup.eachLayer(l=>{this._disableLayerHover(l)}),this._cleanupDragging())}_enableLayerHover(n){n.on&&(n.on("mouseover",this._onLayerMouseOver,this),n.on("mouseout",this._onLayerMouseOut,this),n.on("mousedown",this._onLayerMouseDown,this))}_disableLayerHover(n){n.off&&(n.off("mouseover",this._onLayerMouseOver,this),n.off("mouseout",this._onLayerMouseOut,this),n.off("mousedown",this._onLayerMouseDown,this))}_onLayerMouseOver(n){if(this._isDragging)return;const l=n.target;if(l.getElement){const i=l.getElement();i&&(i.style.cursor="grab")}else l._path&&(l._path.style.cursor="grab")}_onLayerMouseOut(n){if(this._isDragging)return;const l=n.target;if(l.getElement){const i=l.getElement();i&&(i.style.cursor="")}else l._path&&(l._path.style.cursor="")}_onLayerMouseDown(n){if(this._isDragging)return;Q.DomEvent.stopPropagation(n.originalEvent),Q.DomEvent.preventDefault(n.originalEvent);const l=n.target;if(this._selectedLayer=l,this._isDragging=!0,this._dragStartLatLng=n.latlng,this._storeOriginalLatLngs(l),l.getElement){const r=l.getElement();r&&(r.style.cursor="grabbing")}else l._path&&(l._path.style.cursor="grabbing");this._map.on("mousemove",this._onMouseMove,this),this._map.on("mouseup",this._onMouseUp,this);const i=l.toGeoJSON();this._pendingMove={layer:l,originalGeoJSON:i,newGeoJSON:i}}_storeOriginalLatLngs(n){n.getLatLng?this._originalLatLngs=n.getLatLng():n.getLatLngs&&(this._originalLatLngs=JSON.parse(JSON.stringify(n.getLatLngs())))}_onMouseMove(n){if(!this._isDragging||!this._selectedLayer||!this._dragStartLatLng)return;const l=this._selectedLayer,i={lat:n.latlng.lat-this._dragStartLatLng.lat,lng:n.latlng.lng-this._dragStartLatLng.lng};if(l.setLatLng){const r=Q.latLng(this._originalLatLngs.lat+i.lat,this._originalLatLngs.lng+i.lng);l.setLatLng(r)}else if(l.setLatLngs){const r=this._offsetLatLngs(this._originalLatLngs,i);l.setLatLngs(r)}}_offsetLatLngs(n,l){return n instanceof Q.LatLng||n.lat!==void 0&&n.lng!==void 0?Q.latLng(n.lat+l.lat,n.lng+l.lng):Array.isArray(n)?n.map(i=>this._offsetLatLngs(i,l)):n}_onMouseUp(n){var i,r;if(!this._isDragging||!this._selectedLayer)return;this._pendingMove&&(this._pendingMove.newGeoJSON=this._selectedLayer.toGeoJSON());const l=this._selectedLayer;if(l.getElement){const h=l.getElement();h&&(h.style.cursor="grab")}else l._path&&(l._path.style.cursor="grab");this._map.fire("draw:moveend",{layer:this._selectedLayer,originalGeoJSON:(i=this._pendingMove)==null?void 0:i.originalGeoJSON,newGeoJSON:(r=this._pendingMove)==null?void 0:r.newGeoJSON}),this._map.off("mousemove",this._onMouseMove,this),this._map.off("mouseup",this._onMouseUp,this),this._isDragging=!1}_cleanupDragging(){if(this._selectedLayer){const n=this._selectedLayer;if(n.getElement){const l=n.getElement();l&&(l.style.cursor="")}else n._path&&(n._path.style.cursor="")}this._map.off("mousemove",this._onMouseMove,this),this._map.off("mouseup",this._onMouseUp,this),this._selectedLayer=null,this._originalLatLngs=null,this._dragStartLatLng=null,this._isDragging=!1,this._pendingMove=null}confirmMove(){this._pendingMove&&(this._map.fire("draw:moveconfirmed",{layer:this._pendingMove.layer,originalGeoJSON:this._pendingMove.originalGeoJSON,newGeoJSON:this._pendingMove.newGeoJSON}),this._cleanupDragging())}cancelMove(){if(!this._pendingMove)return;const n=this._pendingMove.layer;n.setLatLng&&this._originalLatLngs?n.setLatLng(this._originalLatLngs):n.setLatLngs&&this._originalLatLngs&&n.setLatLngs(this._originalLatLngs),this._cleanupDragging()}hasPendingMove(){return this._pendingMove!==null}};k(Se,"TYPE","move");let si=Se;Q.Draw.Move=si;function Zr(u){const s=u.Draw;if(!s||s.Move)return;const l=class l extends s.Feature{constructor(h,d){super(h,d);k(this,"_featureGroup");k(this,"_selectedLayer",null);k(this,"_originalLatLngs",null);k(this,"_dragStartLatLng",null);k(this,"_isDragging",!1);k(this,"_pendingMove",null);this.type=l.TYPE,this._featureGroup=(d==null?void 0:d.featureGroup)||new Q.FeatureGroup}enable(){this._enabled||super.enable()}disable(){this._enabled&&(this._cleanupDragging(),super.disable())}addHooks(){const h=this._map;if(!h)return;u.DomUtil.addClass(h.getContainer(),"leaflet-draw-move-mode"),this._featureGroup.eachLayer(p=>{this._enableLayerHover(p)});const d=this._tooltip;d!=null&&d.updateContent&&d.updateContent({text:"Click and drag a feature to move it",subtext:""})}removeHooks(){const h=this._map;h&&(u.DomUtil.removeClass(h.getContainer(),"leaflet-draw-move-mode"),this._featureGroup.eachLayer(d=>{this._disableLayerHover(d)}),this._cleanupDragging())}_enableLayerHover(h){h.on&&(h.on("mouseover",this._onLayerMouseOver,this),h.on("mouseout",this._onLayerMouseOut,this),h.on("mousedown",this._onLayerMouseDown,this))}_disableLayerHover(h){h.off&&(h.off("mouseover",this._onLayerMouseOver,this),h.off("mouseout",this._onLayerMouseOut,this),h.off("mousedown",this._onLayerMouseDown,this))}_onLayerMouseOver(h){if(this._isDragging)return;const d=h.target;if(d.getElement){const p=d.getElement();p&&(p.style.cursor="grab")}else d._path&&(d._path.style.cursor="grab")}_onLayerMouseOut(h){if(this._isDragging)return;const d=h.target;if(d.getElement){const p=d.getElement();p&&(p.style.cursor="")}else d._path&&(d._path.style.cursor="")}_onLayerMouseDown(h){if(this._isDragging)return;u.DomEvent.stopPropagation(h.originalEvent),u.DomEvent.preventDefault(h.originalEvent);const d=h.target;if(this._selectedLayer=d,this._isDragging=!0,this._dragStartLatLng=h.latlng,this._storeOriginalLatLngs(d),d.getElement){const m=d.getElement();m&&(m.style.cursor="grabbing")}else d._path&&(d._path.style.cursor="grabbing");this._map.on("mousemove",this._onMouseMove,this),this._map.on("mouseup",this._onMouseUp,this);const p=d.toGeoJSON();this._pendingMove={layer:d,originalGeoJSON:p,newGeoJSON:p}}_storeOriginalLatLngs(h){h.getLatLng?this._originalLatLngs=h.getLatLng():h.getLatLngs&&(this._originalLatLngs=JSON.parse(JSON.stringify(h.getLatLngs())))}_onMouseMove(h){if(!this._isDragging||!this._selectedLayer||!this._dragStartLatLng)return;const d=this._selectedLayer,p={lat:h.latlng.lat-this._dragStartLatLng.lat,lng:h.latlng.lng-this._dragStartLatLng.lng};if(d.setLatLng){const m=u.latLng(this._originalLatLngs.lat+p.lat,this._originalLatLngs.lng+p.lng);d.setLatLng(m)}else if(d.setLatLngs){const m=this._offsetLatLngs(this._originalLatLngs,p);d.setLatLngs(m)}}_offsetLatLngs(h,d){return h instanceof u.LatLng||h.lat!==void 0&&h.lng!==void 0?u.latLng(h.lat+d.lat,h.lng+d.lng):Array.isArray(h)?h.map(p=>this._offsetLatLngs(p,d)):h}_onMouseUp(h){var p,m;if(!this._isDragging||!this._selectedLayer)return;this._pendingMove&&(this._pendingMove.newGeoJSON=this._selectedLayer.toGeoJSON());const d=this._selectedLayer;if(d.getElement){const g=d.getElement();g&&(g.style.cursor="grab")}else d._path&&(d._path.style.cursor="grab");this._map.fire("draw:moveend",{layer:this._selectedLayer,originalGeoJSON:(p=this._pendingMove)==null?void 0:p.originalGeoJSON,newGeoJSON:(m=this._pendingMove)==null?void 0:m.newGeoJSON}),this._map.off("mousemove",this._onMouseMove,this),this._map.off("mouseup",this._onMouseUp,this),this._isDragging=!1}_cleanupDragging(){if(this._selectedLayer){const h=this._selectedLayer;if(h.getElement){const d=h.getElement();d&&(d.style.cursor="")}else h._path&&(h._path.style.cursor="")}this._map.off("mousemove",this._onMouseMove,this),this._map.off("mouseup",this._onMouseUp,this),this._selectedLayer=null,this._originalLatLngs=null,this._dragStartLatLng=null,this._isDragging=!1,this._pendingMove=null}confirmMove(){this._pendingMove&&(this._map.fire("draw:moveconfirmed",{layer:this._pendingMove.layer,originalGeoJSON:this._pendingMove.originalGeoJSON,newGeoJSON:this._pendingMove.newGeoJSON}),this._cleanupDragging())}cancelMove(){if(!this._pendingMove)return;const h=this._pendingMove.layer;h.setLatLng&&this._originalLatLngs?h.setLatLng(this._originalLatLngs):h.setLatLngs&&this._originalLatLngs&&h.setLatLngs(this._originalLatLngs),this._cleanupDragging()}hasPendingMove(){return this._pendingMove!==null}};k(l,"TYPE","move");let n=l;s.Move=n}const Hr=63710088e-1;function ai(u){return u*Math.PI/180}function fo(u){return u*180/Math.PI}function Fr(u,s,n){const l=s/Hr,i=ai(n),r=ai(u.lat),h=ai(u.lng),d=Math.sin(r),p=Math.cos(r),m=Math.sin(l),g=Math.cos(l),y=d*g+p*m*Math.cos(i),w=Math.asin(y),T=Math.sin(i)*m*p,E=g-d*y,A=h+Math.atan2(T,E);return{lat:fo(w),lng:fo(A)}}function Gr(u){let s=0;for(let n=0;n<u.length-1;n++){const[l,i]=u[n],[r,h]=u[n+1];s+=l*h-r*i}return s/2}function li(u){const s=u[0],n=u.at(-1);return!s||!n||s[0]===n[0]&&s[1]===n[1]?u:[...u,s]}function hi(u,s){const n=li(u);if(Gr(n)<0===s)return n;const r=[...n].reverse();return li(r)}function ci(u,s,n){if(n<4)throw new Error("steps must be >= 4");const l=[];for(let i=0;i<n;i++){const r=i/n*360,h=Fr(u,s,r);l.push([h.lng,h.lat])}return li(l)}function Vr(u){const{id:s,center:n,radiusMeters:l,layerIndex:i,steps:r}=u,h=hi(ci(n,l,r),!1);return{type:"Feature",properties:{id:s,layer_index:i,radius_outer:l,type:"core",_meta:{lat:n.lat,lng:n.lng,radius:l}},geometry:{type:"Polygon",coordinates:[h]}}}function Wr(u){const{id:s,center:n,radiusOuterMeters:l,radiusInnerMeters:i,layerIndex:r,steps:h}=u,d=hi(ci(n,l,h),!1),p=hi(ci(n,i,h),!0);return{type:"Feature",properties:{id:s,layer_index:r,radius_outer:l,type:"ring",_meta:{lat:n.lat,lng:n.lng,radius:l}},geometry:{type:"Polygon",coordinates:[d,p]}}}function Jr(u){const{circles:s,steps:n=64}=u,l=[...s].sort((r,h)=>r.getRadius()-h.getRadius()),i=[];return l.forEach((r,h)=>{const d=r.getLatLng(),p=r.getRadius(),m=ti();if(h===0){i.push(Vr({id:m,center:d,radiusMeters:p,layerIndex:h,steps:n}));return}const y=l[h-1].getRadius();i.push(Wr({id:m,center:d,radiusOuterMeters:p,radiusInnerMeters:y,layerIndex:h,steps:n}))}),{type:"FeatureCollection",features:i}}function ie(u){u.preventDefault(),u.stopPropagation()}function jr(u){var m,g;const{root:s,addButtonId:n,saveButtonId:l,onAddRing:i,onSave:r}=u,h=(m=s.querySelector)==null?void 0:m.call(s,`#${n}`),d=(g=s.querySelector)==null?void 0:g.call(s,`#${l}`);if(!h||!d)return;const p="data-cake-controls-bound";if(!(h.hasAttribute(p)||d.hasAttribute(p))){h.setAttribute(p,"true"),d.setAttribute(p,"true");for(const y of[h,d])y.addEventListener("pointerdown",ie),y.addEventListener("mousedown",ie),y.addEventListener("touchstart",ie);h.addEventListener("click",y=>{ie(y),i()}),d.addEventListener("click",y=>{ie(y),r()})}}function qr(u){var n;const s=(n=u.options)!=null?n:{};s.original||(s.original={...s}),s.editing||(s.editing={...s})}function oe(u,s){if(s==="imperial"){const n=u*3.28084;return n>=5280?`${(n/5280).toFixed(2)} mi`:`${Math.round(n)} ft`}return u>=1e3?`${(u/1e3).toFixed(2)} km`:`${Math.round(u)} m`}class Yr{constructor(s,n,l,i="metric"){k(this,"map");k(this,"layers",[]);k(this,"controlsGroup");k(this,"onSave");k(this,"sessionId",ti().slice(0,8));k(this,"baseCircleOptions");k(this,"detachMapListeners",[]);k(this,"renderScheduled",!1);k(this,"measurementSystem");this.map=s,this.onSave=l,this.measurementSystem=i,this.controlsGroup=Q.layerGroup().addTo(s),this.baseCircleOptions={...n.options},delete this.baseCircleOptions.editing,delete this.baseCircleOptions.original,this.addLayer(n),this.installEditEventBridges(),this.renderControls()}installEditEventBridges(){var g,y,w,T,E,A,N,F;const s=we,n=(y=(g=s==null?void 0:s.Draw)==null?void 0:g.Event)==null?void 0:y.EDITMOVE,l=(T=(w=s==null?void 0:s.Draw)==null?void 0:w.Event)==null?void 0:T.EDITRESIZE,i=(A=(E=s==null?void 0:s.Draw)==null?void 0:E.Event)==null?void 0:A.EDITSTART,r=(F=(N=s==null?void 0:s.Draw)==null?void 0:N.Event)==null?void 0:F.EDITSTOP;if(!n||!l)return;const h=P=>{const I=P==null?void 0:P.layer;I&&this.layers.includes(I)&&this.syncCenters(I)},d=P=>{const I=P==null?void 0:P.layer;I&&this.layers.includes(I)&&(this.updateLabels(I),this.requestRenderControls())},p=P=>{var q;const I=P==null?void 0:P.layer;if(!I||!this.layers.includes(I))return;const G=I;((q=G.getTooltip)==null?void 0:q.call(G))&&this.updateLabels(G)},m=()=>{this.layers.forEach(P=>{var G;const I=(G=P.getTooltip)==null?void 0:G.call(P);I&&(P.setTooltipContent(oe(P.getRadius(),this.measurementSystem)),I.options.offset=[10,0],I.options.direction="right",P.closeTooltip(),P.openTooltip())})};this.map.on(n,h),this.map.on(l,d),i&&(this.map.on(i,p),this.detachMapListeners.push(()=>this.map.off(i,p))),r&&(this.map.on(r,m),this.detachMapListeners.push(()=>this.map.off(r,m))),this.detachMapListeners.push(()=>this.map.off(n,h)),this.detachMapListeners.push(()=>this.map.off(l,d))}requestRenderControls(){if(this.renderScheduled)return;this.renderScheduled=!0,(typeof requestAnimationFrame=="function"?requestAnimationFrame:n=>setTimeout(()=>n(0),0))(()=>{this.renderScheduled=!1,this.renderControls()})}addLayer(s){this.layers.push(s),s.addTo(this.map),s.bindTooltip(oe(s.getRadius(),this.measurementSystem),{permanent:!0,direction:"right",className:"cake-label",offset:[10,0]});const n=s.editing;setTimeout(()=>{var l,i,r,h,d;try{if((l=s.redraw)==null||l.call(s),qr(s),(i=n==null?void 0:n.enabled)!=null&&i.call(n)){(r=n.updateMarkers)==null||r.call(n),this.requestRenderControls();return}(h=n==null?void 0:n.enable)==null||h.call(n),(d=n==null?void 0:n.updateMarkers)==null||d.call(n),this.requestRenderControls()}catch{}},0)}addRing(){if(this.layers.length>=10)return;const s=this.getLargestCircle();if(!s)return;const n=s.getRadius()*1.5,l=Q.circle(s.getLatLng(),{...this.baseCircleOptions,radius:n});this.addLayer(l),this.renderControls()}save(){const s=Jr({circles:this.layers});this.onSave(s),this.destroy()}getLargestCircle(){return this.layers.length===0?null:this.layers.reduce((s,n)=>s.getRadius()>n.getRadius()?s:n)}syncCenters(s){const n=s.getLatLng();this.layers.forEach(l=>{var i,r,h;l!==s&&(l.setLatLng(n),(i=l.redraw)==null||i.call(l),(h=(r=l.editing)==null?void 0:r.updateMarkers)==null||h.call(r))}),this.requestRenderControls()}updateLabels(s){var h;const n=s.getRadius();let l=oe(n,this.measurementSystem);const i=this.layers.filter(d=>d!==s&&d.getRadius()<n);if(i.length>0){const d=i.reduce((g,y)=>g.getRadius()>y.getRadius()?g:y),p=n-d.getRadius(),m=oe(p,this.measurementSystem);l=`${oe(n,this.measurementSystem)} (+${m})`}const r=(h=s.getTooltip)==null?void 0:h.call(s);if(r){s.setTooltipContent(l);const p=s.getBounds().getSouthWest();p.lat=s.getLatLng().lat,r.options.direction="left",r.options.offset=[-10,0],r.setLatLng(p),s.closeTooltip(),s.openTooltip()}}renderControls(){this.controlsGroup.clearLayers();const s=this.getLargestCircle();if(!s)return;const l=s.getBounds().getNorthEast(),i=`cake-add-${this.sessionId}`,r=`cake-save-${this.sessionId}`,h=Q.divIcon({className:"layer-cake-controls",html:`
253
+ `,u.appendChild(n)}function Xn(){var u,a;(a=(u=Q.Icon.Default).mergeOptions)==null||a.call(u,{iconRetinaUrl:Gn,iconUrl:Vn,shadowUrl:Wn})}function Qn(u){const{root:a,skipStyles:n}=u;try{n||(Yn(a),Xn()),Kn(a)}catch{}}(function(u,a,n){function h(i,r){for(;(i=i.parentElement)&&!i.classList.contains(r););return i}L.drawVersion="1.0.4",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(i,r){this._map=i,this._container=i._container,this._overlayPane=i._panes.overlayPane,this._popupPane=i._panes.popupPane,r&&r.shapeOptions&&(r.shapeOptions=L.Util.extend({},this.options.shapeOptions,r.shapeOptions)),L.setOptions(this,r);var l=L.version.split(".");parseInt(l[0],10)===1&&parseInt(l[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var i=this._map;i&&(L.DomUtil.disableTextSelection(),i.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(i){L.setOptions(this,i)},_fireCreatedEvent:function(i){this._map.fire(L.Draw.Event.CREATED,{layer:i,layerType:this.type})},_cancelDrawing:function(i){i.keyCode===27&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(i,r){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,r&&r.drawError&&(r.drawError=L.Util.extend({},this.options.drawError,r.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,i,r)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var i=this._markers.pop(),r=this._poly,l=r.getLatLngs(),d=l.splice(-1,1)[0];this._poly.setLatLngs(l),this._markerGroup.removeLayer(i),r.getLatLngs().length<2&&this._map.removeLayer(r),this._vertexChanged(d,!1)}},addVertex:function(i){if(this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(i))return void this._showErrorTooltip();this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(i)),this._poly.addLatLng(i),this._poly.getLatLngs().length===2&&this._map.addLayer(this._poly),this._vertexChanged(i,!0)},completeShape:function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var i=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),r=this._poly.newLatLngIntersects(i[i.length-1]);if(!this.options.allowIntersection&&r||!this._shapeIsValid())return void this._showErrorTooltip();this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_shapeIsValid:function(){return!0},_onZoomEnd:function(){this._markers!==null&&this._updateGuide()},_onMouseMove:function(i){var r=this._map.mouseEventToLayerPoint(i.originalEvent),l=this._map.layerPointToLatLng(r);this._currentLatLng=l,this._updateTooltip(l),this._updateGuide(r),this._mouseMarker.setLatLng(l),L.DomEvent.preventDefault(i.originalEvent)},_vertexChanged:function(i,r){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(i,r),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(i){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(i),this._clickHandled=!0,this._disableNewMarkers();var r=i.originalEvent,l=r.clientX,d=r.clientY;this._startPoint.call(this,l,d)}},_startPoint:function(i,r){this._mouseDownOrigin=L.point(i,r)},_onMouseUp:function(i){var r=i.originalEvent,l=r.clientX,d=r.clientY;this._endPoint.call(this,l,d,i),this._clickHandled=null},_endPoint:function(i,r,l){if(this._mouseDownOrigin){var d=L.point(i,r).distanceTo(this._mouseDownOrigin),p=this._calculateFinishDistance(l.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(l.latlng),this._finishShape()):p<10&&L.Browser.touch?this._finishShape():Math.abs(d)<9*(u.devicePixelRatio||1)&&this.addVertex(l.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(i){var r,l,d=i.originalEvent;!d.touches||!d.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(r=d.touches[0].clientX,l=d.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,r,l),this._endPoint.call(this,r,l,i),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(i){var r;if(this._markers.length>0){var l;if(this.type===L.Draw.Polyline.TYPE)l=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;l=this._markers[0]}var d=this._map.latLngToContainerPoint(l.getLatLng()),p=new L.Marker(i,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),m=this._map.latLngToContainerPoint(p.getLatLng());r=d.distanceTo(m)}else r=1/0;return r},_updateFinishHandler:function(){var i=this._markers.length;i>1&&this._markers[i-1].on("click",this._finishShape,this),i>2&&this._markers[i-2].off("click",this._finishShape,this)},_createMarker:function(i){var r=new L.Marker(i,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(r),r},_updateGuide:function(i){var r=this._markers?this._markers.length:0;r>0&&(i=i||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[r-1].getLatLng()),i))},_updateTooltip:function(i){var r=this._getTooltipText();i&&this._tooltip.updatePosition(i),this._errorShown||this._tooltip.updateContent(r)},_drawGuide:function(i,r){var l,d,p,m=Math.floor(Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2))),_=this.options.guidelineDistance,y=this.options.maxGuideLineLength,w=m>y?m-y:_;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));w<m;w+=this.options.guidelineDistance)l=w/m,d={x:Math.floor(i.x*(1-l)+l*r.x),y:Math.floor(i.y*(1-l)+l*r.y)},p=L.DomUtil.create("div","leaflet-draw-guide-dash",this._guidesContainer),p.style.backgroundColor=this._errorShown?this.options.drawError.color:this.options.shapeOptions.color,L.DomUtil.setPosition(p,d)},_updateGuideColor:function(i){if(this._guidesContainer)for(var r=0,l=this._guidesContainer.childNodes.length;r<l;r++)this._guidesContainer.childNodes[r].style.backgroundColor=i},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText:function(){var i,r,l=this.options.showLength;return this._markers.length===0?i={text:L.drawLocal.draw.handlers.polyline.tooltip.start}:(r=l?this._getMeasurementString():"",i=this._markers.length===1?{text:L.drawLocal.draw.handlers.polyline.tooltip.cont,subtext:r}:{text:L.drawLocal.draw.handlers.polyline.tooltip.end,subtext:r}),i},_updateRunningMeasure:function(i,r){var l,d,p=this._markers.length;this._markers.length===1?this._measurementRunningTotal=0:(l=p-(r?2:1),d=L.GeometryUtil.isVersion07x()?i.distanceTo(this._markers[l].getLatLng())*(this.options.factor||1):this._map.distance(i,this._markers[l].getLatLng())*(this.options.factor||1),this._measurementRunningTotal+=d*(r?1:-1))},_getMeasurementString:function(){var i,r=this._currentLatLng,l=this._markers[this._markers.length-1].getLatLng();return i=L.GeometryUtil.isVersion07x()?l&&r&&r.distanceTo?this._measurementRunningTotal+r.distanceTo(l)*(this.options.factor||1):this._measurementRunningTotal||0:l&&r?this._measurementRunningTotal+this._map.distance(r,l)*(this.options.factor||1):this._measurementRunningTotal||0,L.GeometryUtil.readableDistance(i,this.options.metric,this.options.feet,this.options.nautic,this.options.precision)},_showErrorTooltip:function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},_hideErrorTooltip:function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout(function(){this._disableMarkers=!1}.bind(this),50)},_cleanUpShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var i=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,i)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(i,r){L.Draw.Polyline.prototype.initialize.call(this,i,r),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var i=this._markers.length;i===1&&this._markers[0].on("click",this._finishShape,this),i>2&&(this._markers[i-1].on("dblclick",this._finishShape,this),i>3&&this._markers[i-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var i,r;return this._markers.length===0?i=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(i=L.drawLocal.draw.handlers.polygon.tooltip.cont,r=this._getMeasurementString()):(i=L.drawLocal.draw.handlers.polygon.tooltip.end,r=this._getMeasurementString()),{text:i,subtext:r}},_getMeasurementString:function(){var i=this._area,r="";return i||this.options.showLength?(this.options.showLength&&(r=L.Draw.Polyline.prototype._getMeasurementString.call(this)),i&&(r+="<br>"+L.GeometryUtil.readableArea(i,this.options.metric,this.options.precision)),r):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(i,r){var l;!this.options.allowIntersection&&this.options.showArea&&(l=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(l)),L.Draw.Polyline.prototype._vertexChanged.call(this,i,r)},_cleanUpShape:function(){var i=this._markers.length;i>0&&(this._markers[0].off("click",this._finishShape,this),i>2&&this._markers[i-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(i,r){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,i,r)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),a.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(a,"mouseup",this._onMouseUp,this),L.DomEvent.off(a,"touchend",this._onMouseUp,this),a.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(i){this._isDrawing=!0,this._startLatLng=i.latlng,L.DomEvent.on(a,"mouseup",this._onMouseUp,this).on(a,"touchend",this._onMouseUp,this).preventDefault(i.originalEvent)},_onMouseMove:function(i){var r=i.latlng;this._tooltip.updatePosition(r),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(r))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:function(i,r){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,i,r)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(i){if(!this._shape&&!this._isCurrentlyTwoClickDrawing)return void(this._isCurrentlyTwoClickDrawing=!0);this._isCurrentlyTwoClickDrawing&&!h(i.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this)},_drawShape:function(i){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,i)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,i),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var i=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,i)},_getTooltipText:function(){var i,r,l,d=L.Draw.SimpleShape.prototype._getTooltipText.call(this),p=this._shape,m=this.options.showArea;return p&&(i=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),r=L.GeometryUtil.geodesicArea(i),l=m?L.GeometryUtil.readableArea(r,this.options.metric):""),{text:d.text,subtext:l}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(i,r){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,i,r)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(i){var r=i.latlng;this._tooltip.updatePosition(r),this._mouseMarker.setLatLng(r),this._marker?(r=this._mouseMarker.getLatLng(),this._marker.setLatLng(r)):(this._marker=this._createMarker(r),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_createMarker:function(i){return new L.Marker(i,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(i){this._onMouseMove(i),this._onClick()},_fireCreatedEvent:function(){var i=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,i)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(i,r){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,i,r)},_fireCreatedEvent:function(){var i=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,i)},_createMarker:function(i){return new L.CircleMarker(i,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(i,r){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,i,r)},_drawShape:function(i){if(L.GeometryUtil.isVersion07x())var r=this._startLatLng.distanceTo(i);else var r=this._map.distance(this._startLatLng,i);this._shape?this._shape.setRadius(r):(this._shape=new L.Circle(this._startLatLng,r,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var i=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,i)},_onMouseMove:function(i){var r,l=i.latlng,d=this.options.showRadius,p=this.options.metric;if(this._tooltip.updatePosition(l),this._isDrawing){this._drawShape(l),r=this._shape.getRadius().toFixed(1);var m="";d&&(m=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(r,p,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:m})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(i,r){this._marker=i,L.setOptions(this,r)},addHooks:function(){var i=this._marker;i.dragging.enable(),i.on("dragend",this._onDragEnd,i),this._toggleMarkerHighlight()},removeHooks:function(){var i=this._marker;i.dragging.disable(),i.off("dragend",this._onDragEnd,i),this._toggleMarkerHighlight()},_onDragEnd:function(i){var r=i.target;r.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:r})},_toggleMarkerHighlight:function(){var i=this._marker._icon;i&&(i.style.display="none",L.DomUtil.hasClass(i,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(i,"leaflet-edit-marker-selected"),this._offsetMarker(i,-4)):(L.DomUtil.addClass(i,"leaflet-edit-marker-selected"),this._offsetMarker(i,4)),i.style.display="")},_offsetMarker:function(i,r){var l=parseInt(i.style.marginTop,10)-r,d=parseInt(i.style.marginLeft,10)-r;i.style.marginTop=l+"px",i.style.marginLeft=d+"px"}}),L.Marker.addInitHook(function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(i){this.latlngs=[i._latlngs],i._holes&&(this.latlngs=this.latlngs.concat(i._holes)),this._poly=i,this._poly.on("revert-edited",this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(i){for(var r=0;r<this._verticesHandlers.length;r++)i(this._verticesHandlers[r])},addHooks:function(){this._initHandlers(),this._eachVertexHandler(function(i){i.addHooks()})},removeHooks:function(){this._eachVertexHandler(function(i){i.removeHooks()})},updateMarkers:function(){this._eachVertexHandler(function(i){i.updateMarkers()})},_initHandlers:function(){this._verticesHandlers=[];for(var i=0;i<this.latlngs.length;i++)this._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly,this.latlngs[i],this._poly.options.poly))},_updateLatLngs:function(i){this.latlngs=[i.layer._latlngs],i.layer._holes&&(this.latlngs=this.latlngs.concat(i.layer._holes))}}),L.Edit.PolyVerticesEdit=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),drawError:{color:"#b00b00",timeout:1e3}},initialize:function(i,r,l){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this._poly=i,l&&l.drawError&&(l.drawError=L.Util.extend({},this.options.drawError,l.drawError)),this._latlngs=r,L.setOptions(this,l)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},addHooks:function(){var i=this._poly,r=i._path;i instanceof L.Polygon||(i.options.fill=!1,i.options.editing&&(i.options.editing.fill=!1)),r&&i.options.editing&&i.options.editing.className&&(i.options.original.className&&i.options.original.className.split(" ").forEach(function(l){L.DomUtil.removeClass(r,l)}),i.options.editing.className.split(" ").forEach(function(l){L.DomUtil.addClass(r,l)})),i.setStyle(i.options.editing),this._poly._map&&(this._map=this._poly._map,this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){var i=this._poly,r=i._path;r&&i.options.editing&&i.options.editing.className&&(i.options.editing.className.split(" ").forEach(function(l){L.DomUtil.removeClass(r,l)}),i.options.original.className&&i.options.original.className.split(" ").forEach(function(l){L.DomUtil.addClass(r,l)})),i.setStyle(i.options.original),i._map&&(i._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._markers=[];var i,r,l,d,p=this._defaultShape();for(i=0,l=p.length;i<l;i++)d=this._createMarker(p[i],i),d.on("click",this._onMarkerClick,this),d.on("contextmenu",this._onContextMenu,this),this._markers.push(d);var m,_;for(i=0,r=l-1;i<l;r=i++)(i!==0||L.Polygon&&this._poly instanceof L.Polygon)&&(m=this._markers[r],_=this._markers[i],this._createMiddleMarker(m,_),this._updatePrevNext(m,_))},_createMarker:function(i,r){var l=new L.Marker.Touch(i,{draggable:!0,icon:this.options.icon});return l._origLatLng=i,l._index=r,l.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._fireEdit,this).on("touchmove",this._onTouchMove,this).on("touchend",this._fireEdit,this).on("MSPointerMove",this._onTouchMove,this).on("MSPointerUp",this._fireEdit,this),this._markerGroup.addLayer(l),l},_onMarkerDragStart:function(){this._poly.fire("editstart")},_spliceLatLngs:function(){var i=this._defaultShape(),r=[].splice.apply(i,arguments);return this._poly._convertLatLngs(i,!0),this._poly.redraw(),r},_removeMarker:function(i){var r=i._index;this._markerGroup.removeLayer(i),this._markers.splice(r,1),this._spliceLatLngs(r,1),this._updateIndexes(r,-1),i.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._fireEdit,this).off("touchmove",this._onMarkerDrag,this).off("touchend",this._fireEdit,this).off("click",this._onMarkerClick,this).off("MSPointerMove",this._onTouchMove,this).off("MSPointerUp",this._fireEdit,this)},_fireEdit:function(){this._poly.edited=!0,this._poly.fire("edit"),this._poly._map.fire(L.Draw.Event.EDITVERTEX,{layers:this._markerGroup,poly:this._poly})},_onMarkerDrag:function(i){var r=i.target,l=this._poly,d=L.LatLngUtil.cloneLatLng(r._origLatLng);if(L.extend(r._origLatLng,r._latlng),l.options.poly){var p=l._map._editTooltip;if(!l.options.poly.allowIntersection&&l.intersects()){L.extend(r._origLatLng,d),r.setLatLng(d);var m=l.options.color;l.setStyle({color:this.options.drawError.color}),p&&p.updateContent({text:L.drawLocal.draw.handlers.polyline.error}),setTimeout(function(){l.setStyle({color:m}),p&&p.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext})},1e3)}}r._middleLeft&&r._middleLeft.setLatLng(this._getMiddleLatLng(r._prev,r)),r._middleRight&&r._middleRight.setLatLng(this._getMiddleLatLng(r,r._next)),this._poly._bounds._southWest=L.latLng(1/0,1/0),this._poly._bounds._northEast=L.latLng(-1/0,-1/0);var _=this._poly.getLatLngs();this._poly._convertLatLngs(_,!0),this._poly.redraw(),this._poly.fire("editdrag")},_onMarkerClick:function(i){var r=L.Polygon&&this._poly instanceof L.Polygon?4:3,l=i.target;this._defaultShape().length<r||(this._removeMarker(l),this._updatePrevNext(l._prev,l._next),l._middleLeft&&this._markerGroup.removeLayer(l._middleLeft),l._middleRight&&this._markerGroup.removeLayer(l._middleRight),l._prev&&l._next?this._createMiddleMarker(l._prev,l._next):l._prev?l._next||(l._prev._middleRight=null):l._next._middleLeft=null,this._fireEdit())},_onContextMenu:function(i){var r=i.target;this._poly,this._poly._map.fire(L.Draw.Event.MARKERCONTEXT,{marker:r,layers:this._markerGroup,poly:this._poly}),L.DomEvent.stopPropagation},_onTouchMove:function(i){var r=this._map.mouseEventToLayerPoint(i.originalEvent.touches[0]),l=this._map.layerPointToLatLng(r),d=i.target;L.extend(d._origLatLng,l),d._middleLeft&&d._middleLeft.setLatLng(this._getMiddleLatLng(d._prev,d)),d._middleRight&&d._middleRight.setLatLng(this._getMiddleLatLng(d,d._next)),this._poly.redraw(),this.updateMarkers()},_updateIndexes:function(i,r){this._markerGroup.eachLayer(function(l){l._index>i&&(l._index+=r)})},_createMiddleMarker:function(i,r){var l,d,p,m=this._getMiddleLatLng(i,r),_=this._createMarker(m);_.setOpacity(.6),i._middleRight=r._middleLeft=_,d=function(){_.off("touchmove",d,this);var y=r._index;_._index=y,_.off("click",l,this).on("click",this._onMarkerClick,this),m.lat=_.getLatLng().lat,m.lng=_.getLatLng().lng,this._spliceLatLngs(y,0,m),this._markers.splice(y,0,_),_.setOpacity(1),this._updateIndexes(y,1),r._index++,this._updatePrevNext(i,_),this._updatePrevNext(_,r),this._poly.fire("editstart")},p=function(){_.off("dragstart",d,this),_.off("dragend",p,this),_.off("touchmove",d,this),this._createMiddleMarker(i,_),this._createMiddleMarker(_,r)},l=function(){d.call(this),p.call(this),this._fireEdit()},_.on("click",l,this).on("dragstart",d,this).on("dragend",p,this).on("touchmove",d,this),this._markerGroup.addLayer(_)},_updatePrevNext:function(i,r){i&&(i._next=r),r&&(r._prev=i)},_getMiddleLatLng:function(i,r){var l=this._poly._map,d=l.project(i.getLatLng()),p=l.project(r.getLatLng());return l.unproject(d._add(p)._divideBy(2))}}),L.Polyline.addInitHook(function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))}),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(i,r){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=i,L.Util.setOptions(this,r)},addHooks:function(){var i=this._shape;this._shape._map&&(this._map=this._shape._map,i.setStyle(i.options.editing),i._map&&(this._map=i._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var i=this._shape;if(i.setStyle(i.options.original),i._map){this._unbindMarker(this._moveMarker);for(var r=0,l=this._resizeMarkers.length;r<l;r++)this._unbindMarker(this._resizeMarkers[r]);this._resizeMarkers=null,this._map.removeLayer(this._markerGroup),delete this._markerGroup}this._map=null},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},_createMoveMarker:function(){},_createResizeMarker:function(){},_createMarker:function(i,r){var l=new L.Marker.Touch(i,{draggable:!0,icon:r,zIndexOffset:10});return this._bindMarker(l),this._markerGroup.addLayer(l),l},_bindMarker:function(i){i.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._onMarkerDragEnd,this).on("touchstart",this._onTouchStart,this).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onTouchEnd,this).on("MSPointerUp",this._onTouchEnd,this)},_unbindMarker:function(i){i.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._onMarkerDragEnd,this).off("touchstart",this._onTouchStart,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onTouchEnd,this).off("MSPointerUp",this._onTouchEnd,this)},_onMarkerDragStart:function(i){i.target.setOpacity(0),this._shape.fire("editstart")},_fireEdit:function(){this._shape.edited=!0,this._shape.fire("edit")},_onMarkerDrag:function(i){var r=i.target,l=r.getLatLng();r===this._moveMarker?this._move(l):this._resize(l),this._shape.redraw(),this._shape.fire("editdrag")},_onMarkerDragEnd:function(i){i.target.setOpacity(1),this._fireEdit()},_onTouchStart:function(i){if(L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,i),typeof this._getCorners=="function"){var r=this._getCorners(),l=i.target,d=l._cornerIndex;l.setOpacity(0),this._oppositeCorner=r[(d+2)%4],this._toggleCornerMarkers(0,d)}this._shape.fire("editstart")},_onTouchMove:function(i){var r=this._map.mouseEventToLayerPoint(i.originalEvent.touches[0]),l=this._map.layerPointToLatLng(r);return i.target===this._moveMarker?this._move(l):this._resize(l),this._shape.redraw(),!1},_onTouchEnd:function(i){i.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var i=this._shape.getBounds(),r=i.getCenter();this._moveMarker=this._createMarker(r,this.options.moveIcon)},_createResizeMarker:function(){var i=this._getCorners();this._resizeMarkers=[];for(var r=0,l=i.length;r<l;r++)this._resizeMarkers.push(this._createMarker(i[r],this.options.resizeIcon)),this._resizeMarkers[r]._cornerIndex=r},_onMarkerDragStart:function(i){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,i);var r=this._getCorners(),l=i.target,d=l._cornerIndex;this._oppositeCorner=r[(d+2)%4],this._toggleCornerMarkers(0,d)},_onMarkerDragEnd:function(i){var r,l,d=i.target;d===this._moveMarker&&(r=this._shape.getBounds(),l=r.getCenter(),d.setLatLng(l)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,i)},_move:function(i){for(var r,l=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),d=this._shape.getBounds(),p=d.getCenter(),m=[],_=0,y=l.length;_<y;_++)r=[l[_].lat-p.lat,l[_].lng-p.lng],m.push([i.lat+r[0],i.lng+r[1]]);this._shape.setLatLngs(m),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(i){var r;this._shape.setBounds(L.latLngBounds(i,this._oppositeCorner)),r=this._shape.getBounds(),this._moveMarker.setLatLng(r.getCenter()),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},_getCorners:function(){var i=this._shape.getBounds();return[i.getNorthWest(),i.getNorthEast(),i.getSouthEast(),i.getSouthWest()]},_toggleCornerMarkers:function(i){for(var r=0,l=this._resizeMarkers.length;r<l;r++)this._resizeMarkers[r].setOpacity(i)},_repositionCornerMarkers:function(){for(var i=this._getCorners(),r=0,l=this._resizeMarkers.length;r<l;r++)this._resizeMarkers[r].setLatLng(i[r])}}),L.Rectangle.addInitHook(function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.CircleMarker=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var i=this._shape.getLatLng();this._moveMarker=this._createMarker(i,this.options.moveIcon)},_createResizeMarker:function(){this._resizeMarkers=[]},_move:function(i){if(this._resizeMarkers.length){var r=this._getResizeMarkerPoint(i);this._resizeMarkers[0].setLatLng(r)}this._shape.setLatLng(i),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})}}),L.CircleMarker.addInitHook(function(){L.Edit.CircleMarker&&(this.editing=new L.Edit.CircleMarker(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.CircleMarker.extend({_createResizeMarker:function(){var i=this._shape.getLatLng(),r=this._getResizeMarkerPoint(i);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(r,this.options.resizeIcon))},_getResizeMarkerPoint:function(i){var r=this._shape._radius*Math.cos(Math.PI/4),l=this._map.project(i);return this._map.unproject([l.x+r,l.y-r])},_resize:function(i){var r=this._moveMarker.getLatLng();L.GeometryUtil.isVersion07x()?radius=r.distanceTo(i):radius=this._map.distance(r,i),this._shape.setRadius(radius),this._map.editTooltip&&this._map._editTooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook(function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())}),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(i){this._map=i,this._container=i._container,this._pane=i._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.off(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.off(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave,this))},_touchEvent:function(i,r){var l={};if(i.touches!==void 0){if(!i.touches.length)return;l=i.touches[0]}else if(i.pointerType!=="touch"||(l=i,!this._filterClick(i)))return;var d=this._map.mouseEventToContainerPoint(l),p=this._map.mouseEventToLayerPoint(l),m=this._map.layerPointToLatLng(p);this._map.fire(r,{latlng:m,layerPoint:p,containerPoint:d,pageX:l.pageX,pageY:l.pageY,originalEvent:i})},_filterClick:function(i){var r=i.timeStamp||i.originalEvent.timeStamp,l=L.DomEvent._lastClick&&r-L.DomEvent._lastClick;return l&&l>100&&l<500||i.target._simulatedClick&&!i._simulated?(L.DomEvent.stop(i),!1):(L.DomEvent._lastClick=r,!0)},_onTouchStart:function(i){this._map._loaded&&this._touchEvent(i,"touchstart")},_onTouchEnd:function(i){this._map._loaded&&this._touchEvent(i,"touchend")},_onTouchCancel:function(i){if(this._map._loaded){var r="touchcancel";this._detectIE()&&(r="pointercancel"),this._touchEvent(i,r)}},_onTouchLeave:function(i){this._map._loaded&&this._touchEvent(i,"touchleave")},_onTouchMove:function(i){this._map._loaded&&this._touchEvent(i,"touchmove")},_detectIE:function(){var i=u.navigator.userAgent,r=i.indexOf("MSIE ");if(r>0)return parseInt(i.substring(r+5,i.indexOf(".",r)),10);if(i.indexOf("Trident/")>0){var l=i.indexOf("rv:");return parseInt(i.substring(l+3,i.indexOf(".",l)),10)}var d=i.indexOf("Edge/");return d>0&&parseInt(i.substring(d+5,i.indexOf(".",d)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var i=this._icon,r=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];this._detectIE?r.concat(["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]):r.concat(["touchcancel"]),L.DomUtil.addClass(i,"leaflet-clickable"),L.DomEvent.on(i,"click",this._onMouseClick,this),L.DomEvent.on(i,"keypress",this._onKeyPress,this);for(var l=0;l<r.length;l++)L.DomEvent.on(i,r[l],this._fireMouseEvent,this);L.Handler.MarkerDrag&&(this.dragging=new L.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_detectIE:function(){var i=u.navigator.userAgent,r=i.indexOf("MSIE ");if(r>0)return parseInt(i.substring(r+5,i.indexOf(".",r)),10);if(i.indexOf("Trident/")>0){var l=i.indexOf("rv:");return parseInt(i.substring(l+3,i.indexOf(".",l)),10)}var d=i.indexOf("Edge/");return d>0&&parseInt(i.substring(d+5,i.indexOf(".",d)),10)}}),L.LatLngUtil={cloneLatLngs:function(i){for(var r=[],l=0,d=i.length;l<d;l++)Array.isArray(i[l])?r.push(L.LatLngUtil.cloneLatLngs(i[l])):r.push(this.cloneLatLng(i[l]));return r},cloneLatLng:function(i){return L.latLng(i.lat,i.lng)}},(function(){var i={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2};L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:function(r){var l,d,p=r.length,m=0,_=Math.PI/180;if(p>2){for(var y=0;y<p;y++)l=r[y],d=r[(y+1)%p],m+=(d.lng-l.lng)*_*(2+Math.sin(l.lat*_)+Math.sin(d.lat*_));m=6378137*m*6378137/2}return Math.abs(m)},formattedNumber:function(r,l){var d=parseFloat(r).toFixed(l),p=L.drawLocal.format&&L.drawLocal.format.numeric,m=p&&p.delimiters,_=m&&m.thousands,y=m&&m.decimal;if(_||y){var w=d.split(".");d=_?w[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+_):w[0],y=y||".",w.length>1&&(d=d+y+w[1])}return d},readableArea:function(r,l,_){var p,m,_=L.Util.extend({},i,_);return l?(m=["ha","m"],type=typeof l,type==="string"?m=[l]:type!=="boolean"&&(m=l),p=r>=1e6&&m.indexOf("km")!==-1?L.GeometryUtil.formattedNumber(1e-6*r,_.km)+" km²":r>=1e4&&m.indexOf("ha")!==-1?L.GeometryUtil.formattedNumber(1e-4*r,_.ha)+" ha":L.GeometryUtil.formattedNumber(r,_.m)+" m²"):(r/=.836127,p=r>=3097600?L.GeometryUtil.formattedNumber(r/3097600,_.mi)+" mi²":r>=4840?L.GeometryUtil.formattedNumber(r/4840,_.ac)+" acres":L.GeometryUtil.formattedNumber(r,_.yd)+" yd²"),p},readableDistance:function(r,l,d,p,y){var _,y=L.Util.extend({},i,y);switch(l?typeof l=="string"?l:"metric":d?"feet":p?"nauticalMile":"yards"){case"metric":_=r>1e3?L.GeometryUtil.formattedNumber(r/1e3,y.km)+" km":L.GeometryUtil.formattedNumber(r,y.m)+" m";break;case"feet":r*=3.28083,_=L.GeometryUtil.formattedNumber(r,y.ft)+" ft";break;case"nauticalMile":r*=.53996,_=L.GeometryUtil.formattedNumber(r/1e3,y.nm)+" nm";break;case"yards":default:r*=1.09361,_=r>1760?L.GeometryUtil.formattedNumber(r/1760,y.mi)+" miles":L.GeometryUtil.formattedNumber(r,y.yd)+" yd"}return _},isVersion07x:function(){var r=L.version.split(".");return parseInt(r[0],10)===0&&parseInt(r[1],10)===7}})})(),L.Util.extend(L.LineUtil,{segmentsIntersect:function(i,r,l,d){return this._checkCounterclockwise(i,l,d)!==this._checkCounterclockwise(r,l,d)&&this._checkCounterclockwise(i,r,l)!==this._checkCounterclockwise(i,r,d)},_checkCounterclockwise:function(i,r,l){return(l.y-i.y)*(r.x-i.x)>(r.y-i.y)*(l.x-i.x)}}),L.Polyline.include({intersects:function(){var i,r,l,d=this._getProjectedPoints(),p=d?d.length:0;if(this._tooFewPointsForIntersection())return!1;for(i=p-1;i>=3;i--)if(r=d[i-1],l=d[i],this._lineSegmentsIntersectsRange(r,l,i-2))return!0;return!1},newLatLngIntersects:function(i,r){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(i),r)},newPointIntersects:function(i,r){var l=this._getProjectedPoints(),d=l?l.length:0,p=l?l[d-1]:null,m=d-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(p,i,m,r?1:0)},_tooFewPointsForIntersection:function(i){var r=this._getProjectedPoints(),l=r?r.length:0;return l+=i||0,!r||l<=3},_lineSegmentsIntersectsRange:function(i,r,l,d){var p,m,_=this._getProjectedPoints();d=d||0;for(var y=l;y>d;y--)if(p=_[y-1],m=_[y],L.LineUtil.segmentsIntersect(i,r,p,m))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var i=[],r=this._defaultShape(),l=0;l<r.length;l++)i.push(this._map.latLngToLayerPoint(r[l]));return i}}),L.Polygon.include({intersects:function(){var i,r,l,d,p=this._getProjectedPoints();return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||(i=p.length,r=p[0],l=p[i-1],d=i-2,this._lineSegmentsIntersectsRange(l,r,d,1)))}}),L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize:function(i){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");L.Control.prototype.initialize.call(this,i);var r;this._toolbars={},L.DrawToolbar&&this.options.draw&&(r=new L.DrawToolbar(this.options.draw),this._toolbars[L.DrawToolbar.TYPE]=r,this._toolbars[L.DrawToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.EditToolbar&&this.options.edit&&(r=new L.EditToolbar(this.options.edit),this._toolbars[L.EditToolbar.TYPE]=r,this._toolbars[L.EditToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.toolbar=this},onAdd:function(i){var r,l=L.DomUtil.create("div","leaflet-draw"),d=!1;for(var p in this._toolbars)this._toolbars.hasOwnProperty(p)&&(r=this._toolbars[p].addToolbar(i))&&(d||(L.DomUtil.hasClass(r,"leaflet-draw-toolbar-top")||L.DomUtil.addClass(r.childNodes[0],"leaflet-draw-toolbar-top"),d=!0),l.appendChild(r));return l},onRemove:function(){for(var i in this._toolbars)this._toolbars.hasOwnProperty(i)&&this._toolbars[i].removeToolbar()},setDrawingOptions:function(i){for(var r in this._toolbars)this._toolbars[r]instanceof L.DrawToolbar&&this._toolbars[r].setOptions(i)},_toolbarEnabled:function(i){var r=i.target;for(var l in this._toolbars)this._toolbars[l]!==r&&this._toolbars[l].disable()}}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook(function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))}),L.Toolbar=L.Class.extend({initialize:function(i){L.setOptions(this,i),this._modes={},this._actionButtons=[],this._activeMode=null;var r=L.version.split(".");parseInt(r[0],10)===1&&parseInt(r[1],10)>=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return this._activeMode!==null},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(i){var r,l=L.DomUtil.create("div","leaflet-draw-section"),d=0,p=this._toolbarClass||"",m=this.getModeHandlers(i);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=i,r=0;r<m.length;r++)m[r].enabled&&this._initModeHandler(m[r].handler,this._toolbarContainer,d++,p,m[r].title);if(d)return this._lastButtonIndex=--d,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),l.appendChild(this._toolbarContainer),l.appendChild(this._actionsContainer),l},removeToolbar:function(){for(var i in this._modes)this._modes.hasOwnProperty(i)&&(this._disposeButton(this._modes[i].button,this._modes[i].handler.enable,this._modes[i].handler),this._modes[i].handler.disable(),this._modes[i].handler.off("enabled",this._handlerActivated,this).off("disabled",this._handlerDeactivated,this));this._modes={};for(var r=0,l=this._actionButtons.length;r<l;r++)this._disposeButton(this._actionButtons[r].button,this._actionButtons[r].callback,this);this._actionButtons=[],this._actionsContainer=null},_initModeHandler:function(i,r,l,d,p){var m=i.type;this._modes[m]={},this._modes[m].handler=i,this._modes[m].button=this._createButton({type:m,title:p,className:d+"-"+m,container:r,callback:this._modes[m].handler.enable,context:this._modes[m].handler}),this._modes[m].buttonIndex=l,this._modes[m].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},_detectIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!u.MSStream},_createButton:function(i){var r=L.DomUtil.create("a",i.className||"",i.container),l=L.DomUtil.create("span","sr-only",i.container);r.href="#",r.appendChild(l),i.title&&(r.title=i.title,l.innerHTML=i.title),i.text&&(r.innerHTML=i.text,l.innerHTML=i.text);var d=this._detectIOS()?"touchstart":"click";return L.DomEvent.on(r,"click",L.DomEvent.stopPropagation).on(r,"mousedown",L.DomEvent.stopPropagation).on(r,"dblclick",L.DomEvent.stopPropagation).on(r,"touchstart",L.DomEvent.stopPropagation).on(r,"click",L.DomEvent.preventDefault).on(r,d,i.callback,i.context),r},_disposeButton:function(i,r){var l=this._detectIOS()?"touchstart":"click";L.DomEvent.off(i,"click",L.DomEvent.stopPropagation).off(i,"mousedown",L.DomEvent.stopPropagation).off(i,"dblclick",L.DomEvent.stopPropagation).off(i,"touchstart",L.DomEvent.stopPropagation).off(i,"click",L.DomEvent.preventDefault).off(i,l,r)},_handlerActivated:function(i){this.disable(),this._activeMode=this._modes[i.handler],L.DomUtil.addClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._showActionsToolbar(),this.fire("enable")},_handlerDeactivated:function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},_createActions:function(i){var r,l,d,p,m=this._actionsContainer,_=this.getActions(i),y=_.length;for(l=0,d=this._actionButtons.length;l<d;l++)this._disposeButton(this._actionButtons[l].button,this._actionButtons[l].callback);for(this._actionButtons=[];m.firstChild;)m.removeChild(m.firstChild);for(var w=0;w<y;w++)"enabled"in _[w]&&!_[w].enabled||(r=L.DomUtil.create("li","",m),p=this._createButton({title:_[w].title,text:_[w].text,container:r,callback:_[w].callback,context:_[w].context}),this._actionButtons.push({button:p,callback:_[w].callback}))},_showActionsToolbar:function(){var i=this._activeMode.buttonIndex,r=this._lastButtonIndex,l=this._activeMode.button.offsetTop-1;this._createActions(this._activeMode.handler),this._actionsContainer.style.top=l+"px",i===0&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-top")),i===r&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-bottom")),this._actionsContainer.style.display="block",this._map.fire(L.Draw.Event.TOOLBAROPENED)},_hideActionsToolbar:function(){this._actionsContainer.style.display="none",L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-top"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-bottom"),this._map.fire(L.Draw.Event.TOOLBARCLOSED)}}),L.Draw=L.Draw||{},L.Draw.Tooltip=L.Class.extend({initialize:function(i){this._map=i,this._popupPane=i._panes.popupPane,this._visible=!1,this._container=i.options.drawControlTooltips?L.DomUtil.create("div","leaflet-draw-tooltip",this._popupPane):null,this._singleLineLabel=!1,this._map.on("mouseout",this._onMouseOut,this)},dispose:function(){this._map.off("mouseout",this._onMouseOut,this),this._container&&(this._popupPane.removeChild(this._container),this._container=null)},updateContent:function(i){return this._container?(i.subtext=i.subtext||"",i.subtext.length!==0||this._singleLineLabel?i.subtext.length>0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(i.subtext.length>0?'<span class="leaflet-draw-tooltip-subtext">'+i.subtext+"</span><br />":"")+"<span>"+i.text+"</span>",i.text||i.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},updatePosition:function(i){var r=this._map.latLngToLayerPoint(i),l=this._container;return this._container&&(this._visible&&(l.style.visibility="inherit"),L.DomUtil.setPosition(l,r)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(i){for(var r in this.options)this.options.hasOwnProperty(r)&&i[r]&&(i[r]=L.extend({},this.options[r],i[r]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,i)},getModeHandlers:function(i){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(i,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(i,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(i,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(i,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(i,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(i,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(i){return[{enabled:i.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:i.completeShape,context:i},{enabled:i.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:i.deleteLastVertex,context:i},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(i){L.setOptions(this,i);for(var r in this._modes)this._modes.hasOwnProperty(r)&&i.hasOwnProperty(r)&&this._modes[r].handler.setOptions(i[r])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(i){i.edit&&(i.edit.selectedPathOptions===void 0&&(i.edit.selectedPathOptions=this.options.edit.selectedPathOptions),i.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,i.edit.selectedPathOptions)),i.remove&&(i.remove=L.extend({},this.options.remove,i.remove)),i.poly&&(i.poly=L.extend({},this.options.poly,i.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,i),this._selectedFeatureCount=0},getModeHandlers:function(i){var r=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(i,{featureGroup:r,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(i,{featureGroup:r}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(i){var r=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return i.removeAllLayers&&r.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),r},addToolbar:function(i){var r=L.Toolbar.prototype.addToolbar.call(this,i);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),r},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var i,r=this.options.featureGroup,l=r.getLayers().length!==0;this.options.edit&&(i=this._modes[L.EditToolbar.Edit.TYPE].button,l?L.DomUtil.removeClass(i,"leaflet-disabled"):L.DomUtil.addClass(i,"leaflet-disabled"),i.setAttribute("title",l?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(i=this._modes[L.EditToolbar.Delete.TYPE].button,l?L.DomUtil.removeClass(i,"leaflet-disabled"):L.DomUtil.addClass(i,"leaflet-disabled"),i.setAttribute("title",l?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(i,r){if(L.Handler.prototype.initialize.call(this,i),L.setOptions(this,r),this._featureGroup=r.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var l=L.version.split(".");parseInt(l[0],10)===1&&parseInt(l[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var i=this._map;i&&(i.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),i._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer(function(i){this._revertLayer(i)},this)},save:function(){var i=new L.LayerGroup;this._featureGroup.eachLayer(function(r){r.edited&&(i.addLayer(r),r.edited=!1)}),this._map.fire(L.Draw.Event.EDITED,{layers:i})},_backupLayer:function(i){var r=L.Util.stamp(i);this._uneditedLayerProps[r]||(i instanceof L.Polyline||i instanceof L.Polygon||i instanceof L.Rectangle?this._uneditedLayerProps[r]={latlngs:L.LatLngUtil.cloneLatLngs(i.getLatLngs())}:i instanceof L.Circle?this._uneditedLayerProps[r]={latlng:L.LatLngUtil.cloneLatLng(i.getLatLng()),radius:i.getRadius()}:(i instanceof L.Marker||i instanceof L.CircleMarker)&&(this._uneditedLayerProps[r]={latlng:L.LatLngUtil.cloneLatLng(i.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(i){var r=L.Util.stamp(i);i.edited=!1,this._uneditedLayerProps.hasOwnProperty(r)&&(i instanceof L.Polyline||i instanceof L.Polygon||i instanceof L.Rectangle?i.setLatLngs(this._uneditedLayerProps[r].latlngs):i instanceof L.Circle?(i.setLatLng(this._uneditedLayerProps[r].latlng),i.setRadius(this._uneditedLayerProps[r].radius)):(i instanceof L.Marker||i instanceof L.CircleMarker)&&i.setLatLng(this._uneditedLayerProps[r].latlng),i.fire("revert-edited",{layer:i}))},_enableLayerEdit:function(i){var r,l,d=i.layer||i.target||i;this._backupLayer(d),this.options.poly&&(l=L.Util.extend({},this.options.poly),d.options.poly=l),this.options.selectedPathOptions&&(r=L.Util.extend({},this.options.selectedPathOptions),r.maintainColor&&(r.color=d.options.color,r.fillColor=d.options.fillColor),d.options.original=L.extend({},d.options),d.options.editing=r),d instanceof L.Marker?(d.editing&&d.editing.enable(),d.dragging.enable(),d.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):d.editing.enable()},_disableLayerEdit:function(i){var r=i.layer||i.target||i;r.edited=!1,r.editing&&r.editing.disable(),delete r.options.editing,delete r.options.original,this._selectedPathOptions&&(r instanceof L.Marker?this._toggleMarkerHighlight(r):(r.setStyle(r.options.previousOptions),delete r.options.previousOptions)),r instanceof L.Marker?(r.dragging.disable(),r.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):r.editing.disable()},_onMouseMove:function(i){this._tooltip.updatePosition(i.latlng)},_onMarkerDragEnd:function(i){var r=i.target;r.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:r})},_onTouchMove:function(i){var r=i.originalEvent.changedTouches[0],l=this._map.mouseEventToLayerPoint(r),d=this._map.layerPointToLatLng(l);i.target.setLatLng(d)},_hasAvailableLayers:function(){return this._featureGroup.getLayers().length!==0}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(i,r){if(L.Handler.prototype.initialize.call(this,i),L.Util.setOptions(this,r),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var l=L.version.split(".");parseInt(l[0],10)===1&&parseInt(l[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var i=this._map;i&&(i.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer(function(i){this._deletableLayers.addLayer(i),i.fire("revert-deleted",{layer:i})},this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer(function(i){this._removeLayer({layer:i})},this),this.save()},_enableLayerDelete:function(i){(i.layer||i.target||i).on("click",this._removeLayer,this)},_disableLayerDelete:function(i){var r=i.layer||i.target||i;r.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(r)},_removeLayer:function(i){var r=i.layer||i.target||i;this._deletableLayers.removeLayer(r),this._deletedLayers.addLayer(r),r.fire("deleted")},_onMouseMove:function(i){this._tooltip.updatePosition(i.latlng)},_hasAvailableLayers:function(){return this._deletableLayers.getLayers().length!==0}})})(window,document);var Qe={exports:{}},to;function $n(){return to||(to=1,(function(u,a){(function(n,h){u.exports=n(Qi()),typeof h!="undefined"&&h.L&&(h.L.Ruler=n(L))})(function(n){n.Control.Ruler=n.Control.extend({options:{position:"topright",circleMarker:{color:"red",radius:2},lineStyle:{color:"red",dashArray:"1,6"},lengthUnit:{display:"km",decimal:2,factor:null,label:"Distance:"},angleUnit:{display:"&deg;",decimal:2,factor:null,label:"Bearing:"}},onAdd:function(h){return this._map=h,this._container=n.DomUtil.create("div","leaflet-bar"),this._container.classList.add("leaflet-ruler"),n.DomEvent.disableClickPropagation(this._container),n.DomEvent.on(this._container,"click",this._toggleMeasure,this),this._choice=!1,this._defaultCursor=this._map._container.style.cursor,this._allLayers=n.layerGroup(),this._container},onRemove:function(){n.DomEvent.off(this._container,"click",this._toggleMeasure,this)},_toggleMeasure:function(){this._choice=!this._choice,this._clickedLatLong=null,this._clickedPoints=[],this._totalLength=0,this._choice?(this._map.doubleClickZoom.disable(),n.DomEvent.on(this._map._container,"keydown",this._escape,this),n.DomEvent.on(this._map._container,"dblclick",this._closePath,this),this._container.classList.add("leaflet-ruler-clicked"),this._clickCount=0,this._tempLine=n.featureGroup().addTo(this._allLayers),this._tempPoint=n.featureGroup().addTo(this._allLayers),this._pointLayer=n.featureGroup().addTo(this._allLayers),this._polylineLayer=n.featureGroup().addTo(this._allLayers),this._allLayers.addTo(this._map),this._map._container.style.cursor="crosshair",this._map.on("click",this._clicked,this),this._map.on("mousemove",this._moving,this)):(this._map.doubleClickZoom.enable(),n.DomEvent.off(this._map._container,"keydown",this._escape,this),n.DomEvent.off(this._map._container,"dblclick",this._closePath,this),this._container.classList.remove("leaflet-ruler-clicked"),this._map.removeLayer(this._allLayers),this._allLayers=n.layerGroup(),this._map._container.style.cursor=this._defaultCursor,this._map.off("click",this._clicked,this),this._map.off("mousemove",this._moving,this))},_clicked:function(h){if(this._clickedLatLong=h.latlng,this._clickedPoints.push(this._clickedLatLong),n.circleMarker(this._clickedLatLong,this.options.circleMarker).addTo(this._pointLayer),this._clickCount>0&&!h.latlng.equals(this._clickedPoints[this._clickedPoints.length-2])){this._movingLatLong&&n.polyline([this._clickedPoints[this._clickCount-1],this._movingLatLong],this.options.lineStyle).addTo(this._polylineLayer);var i;this._totalLength+=this._result.Distance,this._clickCount>1?i="<b>"+this.options.angleUnit.label+"</b>&nbsp;"+this._result.Bearing.toFixed(this.options.angleUnit.decimal)+"&nbsp;"+this.options.angleUnit.display+"<br><b>"+this.options.lengthUnit.label+"</b>&nbsp;"+this._totalLength.toFixed(this.options.lengthUnit.decimal)+"&nbsp;"+this.options.lengthUnit.display:i="<b>"+this.options.angleUnit.label+"</b>&nbsp;"+this._result.Bearing.toFixed(this.options.angleUnit.decimal)+"&nbsp;"+this.options.angleUnit.display+"<br><b>"+this.options.lengthUnit.label+"</b>&nbsp;"+this._result.Distance.toFixed(this.options.lengthUnit.decimal)+"&nbsp;"+this.options.lengthUnit.display,n.circleMarker(this._clickedLatLong,this.options.circleMarker).bindTooltip(i,{permanent:!0,className:"result-tooltip"}).addTo(this._pointLayer).openTooltip()}this._clickCount++},_moving:function(h){if(this._clickedLatLong){n.DomEvent.off(this._container,"click",this._toggleMeasure,this),this._movingLatLong=h.latlng,this._tempLine&&(this._map.removeLayer(this._tempLine),this._map.removeLayer(this._tempPoint));var i;this._addedLength=0,this._tempLine=n.featureGroup(),this._tempPoint=n.featureGroup(),this._tempLine.addTo(this._map),this._tempPoint.addTo(this._map),this._calculateBearingAndDistance(),this._addedLength=this._result.Distance+this._totalLength,n.polyline([this._clickedLatLong,this._movingLatLong],this.options.lineStyle).addTo(this._tempLine),this._clickCount>1?i="<b>"+this.options.angleUnit.label+"</b>&nbsp;"+this._result.Bearing.toFixed(this.options.angleUnit.decimal)+"&nbsp;"+this.options.angleUnit.display+"<br><b>"+this.options.lengthUnit.label+"</b>&nbsp;"+this._addedLength.toFixed(this.options.lengthUnit.decimal)+"&nbsp;"+this.options.lengthUnit.display+'<br><div class="plus-length">(+'+this._result.Distance.toFixed(this.options.lengthUnit.decimal)+")</div>":i="<b>"+this.options.angleUnit.label+"</b>&nbsp;"+this._result.Bearing.toFixed(this.options.angleUnit.decimal)+"&nbsp;"+this.options.angleUnit.display+"<br><b>"+this.options.lengthUnit.label+"</b>&nbsp;"+this._result.Distance.toFixed(this.options.lengthUnit.decimal)+"&nbsp;"+this.options.lengthUnit.display,n.circleMarker(this._movingLatLong,this.options.circleMarker).bindTooltip(i,{sticky:!0,offset:n.point(0,-40),className:"moving-tooltip"}).addTo(this._tempPoint).openTooltip()}},_escape:function(h){h.keyCode===27&&(this._clickCount>0?this._closePath():(this._choice=!0,this._toggleMeasure()))},_calculateBearingAndDistance:function(){var h=this._clickedLatLong.lat,i=this._clickedLatLong.lng,r=this._movingLatLong.lat,l=this._movingLatLong.lng,d=Math.PI/180,p=Math.sin((l-i)*d)*Math.cos(r*d),m=Math.cos(h*d)*Math.sin(r*d)-Math.sin(h*d)*Math.cos(r*d)*Math.cos((l-i)*d),_=Math.atan2(p,m)*((this.options.angleUnit.factor?this.options.angleUnit.factor/2:180)/Math.PI);_+=_<0?this.options.angleUnit.factor?this.options.angleUnit.factor:360:0;var y=this.options.lengthUnit.factor?6371*this.options.lengthUnit.factor:6371,w=(r-h)*d,T=(l-i)*d,E=Math.sin(w/2)*Math.sin(w/2)+Math.cos(h*d)*Math.cos(r*d)*Math.sin(T/2)*Math.sin(T/2),A=2*Math.atan2(Math.sqrt(E),Math.sqrt(1-E)),N=y*A;this._result={Bearing:_,Distance:N}},_closePath:function(){this._map.removeLayer(this._tempLine),this._map.removeLayer(this._tempPoint),this._clickCount<=1&&this._map.removeLayer(this._pointLayer),this._choice=!1,n.DomEvent.on(this._container,"click",this._toggleMeasure,this),this._toggleMeasure()}}),n.control.ruler=function(h){return new n.Control.Ruler(h)}},window)})(Qe)),Qe.exports}$n();const ot=[];for(let u=0;u<256;++u)ot.push((u+256).toString(16).slice(1));function tr(u,a=0){return(ot[u[a+0]]+ot[u[a+1]]+ot[u[a+2]]+ot[u[a+3]]+"-"+ot[u[a+4]]+ot[u[a+5]]+"-"+ot[u[a+6]]+ot[u[a+7]]+"-"+ot[u[a+8]]+ot[u[a+9]]+"-"+ot[u[a+10]]+ot[u[a+11]]+ot[u[a+12]]+ot[u[a+13]]+ot[u[a+14]]+ot[u[a+15]]).toLowerCase()}let $e;const er=new Uint8Array(16);function ir(){if(!$e){if(typeof crypto=="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");$e=crypto.getRandomValues.bind(crypto)}return $e(er)}const eo={randomUUID:typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ti(u,a,n){var i,r,l;if(eo.randomUUID&&!u)return eo.randomUUID();u=u||{};const h=(l=(r=u.random)!=null?r:(i=u.rng)==null?void 0:i.call(u))!=null?l:ir();if(h.length<16)throw new Error("Random bytes length must be >= 16");return h[6]=h[6]&15|64,h[8]=h[8]&63|128,tr(h)}function xe(u){var n,h;const a=(h=u.id)!=null?h:(n=u.properties)==null?void 0:n.id;if(a!=null)return String(a)}const or=/^(.*)::(\d+)$/;function io(u){const a=xe(u);if(!a)return null;const n=or.exec(a);return n?{baseId:n[1],childIndex:Number(n[2]),feature:u}:null}function nr(u,a){const n=a&&typeof a=="object"?{...a}:{};return n.id=u,n}function rr(u,a){const n=[...a].sort((d,p)=>d.childIndex-p.childIndex),h=n[0].feature,i=nr(u,h.properties),r=n.map(d=>d.feature.geometry).filter(d=>d!=null);let l;return r.length===0?l={type:"GeometryCollection",geometries:[]}:r.length===1?l=r[0]:r.every(d=>d.type==="Point")?l={type:"MultiPoint",coordinates:r.map(d=>d.coordinates)}:r.every(d=>d.type==="LineString")?l={type:"MultiLineString",coordinates:r.map(d=>d.coordinates)}:r.every(d=>d.type==="Polygon")?l={type:"MultiPolygon",coordinates:r.map(d=>d.coordinates)}:l={type:"GeometryCollection",geometries:r},{type:"Feature",id:u,properties:i,geometry:l}}function ar(u,a){const n=h=>{switch(h.type){case"Point":a(h.coordinates);break;case"MultiPoint":case"LineString":for(const i of h.coordinates)a(i);break;case"MultiLineString":case"Polygon":for(const i of h.coordinates)for(const r of i)a(r);break;case"MultiPolygon":for(const i of h.coordinates)for(const r of i)for(const l of r)a(l);break;case"GeometryCollection":for(const i of h.geometries)n(i);break}};n(u)}function sr(u){const a=u.geometry;if(!a)return null;let n=1/0,h=1/0,i=-1/0,r=-1/0,l=!1;return ar(a,d=>{const[p,m]=d;typeof p!="number"||typeof m!="number"||(l=!0,p<n&&(n=p),m<h&&(h=m),p>i&&(i=p),m>r&&(r=m))}),l?[n,h,i,r]:null}function lr(u){let a=1/0,n=1/0,h=-1/0,i=-1/0,r=!1;for(const l of u.features){const d=sr(l);d&&(r=!0,a=Math.min(a,d[0]),n=Math.min(n,d[1]),h=Math.max(h,d[2]),i=Math.max(i,d[3]))}return r?[a,n,h,i]:null}function hr(u){const[a,n,h,i]=u;return[[n,a],[i,h]]}function cr(u){var n;const a=[];for(const h of u.features){if(!h||h.type!=="Feature")continue;const i=(n=h.properties)!=null?n:{},r=xe(h),l=(p,m)=>{const _=i&&typeof i=="object"?{...i}:{},y=r!==void 0?`${r}::${m}`:void 0;return y!==void 0&&(_.id=y),{type:"Feature",id:y,properties:_,geometry:p}},d=h.geometry;if(d)switch(d.type){case"MultiPolygon":for(const[p,m]of d.coordinates.entries())a.push(l({type:"Polygon",coordinates:m},p));break;case"MultiLineString":for(const[p,m]of d.coordinates.entries())a.push(l({type:"LineString",coordinates:m},p));break;case"MultiPoint":for(const[p,m]of d.coordinates.entries())a.push(l({type:"Point",coordinates:m},p));break;case"GeometryCollection":for(const[p,m]of d.geometries.entries())a.push(l(m,p));break;default:a.push(h);break}}return{type:"FeatureCollection",features:a}}function dr(u,a={}){var l;if(((l=a.adapter)!=null?l:"editing")!=="source")return u;const h=new Map;for(const d of u.features){const p=io(d);if(!p)continue;const m=h.get(p.baseId);m?m.push(p):h.set(p.baseId,[p])}if(h.size===0)return u;const i=new Set,r=[];for(const d of u.features){const p=io(d);if(!p){r.push(d);continue}i.has(p.baseId)||(i.add(p.baseId),r.push(rr(p.baseId,h.get(p.baseId))))}return{type:"FeatureCollection",features:r}}function oo(u){return(u==null?void 0:u.type)==="Polygon"}function no(u){return(u==null?void 0:u.type)==="MultiPolygon"}function ur(u){const a=u.geometry;return a?oo(a)?[a.coordinates]:no(a)?a.coordinates:[]:[]}function fr(u,a){var i,r;const n=[];for(const l of u){const d=ur(l);d.length>0&&n.push(...d)}if(n.length===0)return null;const h=(r=a!=null?a:(i=u[0])==null?void 0:i.properties)!=null?r:{};return n.length===1?{type:"Feature",properties:{...h},geometry:{type:"Polygon",coordinates:n[0]}}:{type:"Feature",properties:{...h},geometry:{type:"MultiPolygon",coordinates:n}}}class pr{constructor(a=be("feature-store","debug")){k(this,"log");k(this,"features");this.log=a,this.features=new Map}size(){return this.features.size}has(a){return this.features.has(a)}get(a){return this.features.get(a)}add(a){var r,l,d,p;const n=[],h=(l=(r=performance.now)==null?void 0:r.call(performance))!=null?l:Date.now();for(const m of a.features){const _=this.ensureId(m),y={...m,id:_};this.features.set(_,y),n.push(_)}const i=((p=(d=performance.now)==null?void 0:d.call(performance))!=null?p:Date.now())-h;return this.log.debug("add",{count:a.features.length,ids:n,elapsedMs:Math.round(i)}),n}update(a,n){if(!this.features.has(a)){this.log.warn("update:missing",{id:a});return}const h={...n,id:a};this.features.set(a,h),this.log.debug("update",{id:a})}remove(a){this.features.delete(a)?this.log.debug("remove",{id:a}):this.log.warn("remove:missing",{id:a})}clear(){const a=this.features.size;this.features.clear(),this.log.debug("clear",{count:a})}toFeatureCollection(){return{type:"FeatureCollection",features:Array.from(this.features.values())}}bounds(){const a=this.toFeatureCollection();if(a.features.length===0)return null;const n=lr(a);return n?hr(n):null}ensureId(a){const n=xe(a);if(n)return String(n);const h=ti();return a.id=h,a.properties&&typeof a.properties=="object"&&(a.properties.id=h),h}}const ke={polygon:{selectors:["a.leaflet-draw-draw-polygon"],dataTool:"polygon"},polyline:{selectors:["a.leaflet-draw-draw-polyline"],dataTool:"polyline"},rectangle:{selectors:["a.leaflet-draw-draw-rectangle"],dataTool:"rectangle"},circle:{selectors:["a.leaflet-draw-draw-circle"],dataTool:"circle"},marker:{selectors:["a.leaflet-draw-draw-marker"],dataTool:"marker"},layerCake:{selectors:["a.leaflet-draw-draw-cake"],dataTool:"layer-cake"},move:{selectors:["a.leaflet-draw-draw-move"],dataTool:"move"},select:{selectors:[],dataTool:"select"},edit:{selectors:["a.leaflet-draw-edit-edit"],dataTool:"edit"},delete:{selectors:["a.leaflet-draw-edit-remove"],dataTool:"delete"},ruler:{selectors:[".leaflet-ruler","a.leaflet-ruler"],dataTool:"ruler"},measurementSettings:{selectors:[".leaflet-ruler-settings-button"],dataTool:"measurement-settings"},layerStyle:{selectors:[],dataTool:"layer-style"},save:{selectors:[],dataTool:"save"}},mr=Object.keys(ke),ro="leaflet-geokit-tool-button-icon",ao=".leaflet-geokit-cake-icon, .leaflet-geokit-move-icon",gr="[data-geokit-managed-toolbar='true']",_r="[data-geokit-tool-popover='true']",vr="[data-geokit-tool][aria-expanded='true']",ei=new WeakMap,ii=new WeakMap,oi=new WeakMap;function ni(u,a,n={}){ee(u);for(const h of mr){const i=ke[h];for(const r of yr(u,i.selectors)){r.setAttribute("data-geokit-tool",i.dataTool),Lr(r);const l=a==null?void 0:a[h];l&&br(r,l,h),ho(r,h,{source:"leaflet-toolbar",activate:!1,onTrigger:n.onTrigger})}}Er(u,a,n)}function yr(u,a){const n=new Set;for(const h of a)u.querySelectorAll(h).forEach(i=>{n.add(i)});return[...n]}function Lr(u){const a=ei.get(u);a&&(u.removeEventListener("click",a),ei.delete(u)),delete u.__geokitToolButtonConfig;const n=Ae(u.dataset.geokitToolButtonClass);n.length>0&&u.classList.remove(...n),delete u.dataset.geokitToolButtonClass,u.removeAttribute("data-geokit-custom-tool-button"),u.dataset.geokitOriginalTitle!==void 0&&so(u,"title",u.dataset.geokitOriginalTitle),u.dataset.geokitOriginalAriaLabel!==void 0&&so(u,"aria-label",u.dataset.geokitOriginalAriaLabel),u.dataset.geokitOriginalStyleBackgroundImage!==void 0&&ri(u,"background-image",u.dataset.geokitOriginalStyleBackgroundImage,u.dataset.geokitOriginalStyleBackgroundImagePriority),u.dataset.geokitOriginalStylePosition!==void 0&&ri(u,"position",u.dataset.geokitOriginalStylePosition,u.dataset.geokitOriginalStylePositionPriority),Array.from(u.children).forEach(h=>{h instanceof HTMLElement&&h.dataset.geokitToolButtonIcon==="true"&&h.remove()}),u.querySelectorAll(ao).forEach(h=>{h.hidden=!1}),u.removeAttribute("aria-expanded")}function so(u,a,n){n?u.setAttribute(a,n):u.removeAttribute(a)}function ri(u,a,n,h){n?u.style.setProperty(a,n,h):u.style.removeProperty(a)}function br(u,a,n){var r;wr(u),u.__geokitToolButtonConfig=a,u.setAttribute("data-geokit-custom-tool-button","true"),a.title&&u.setAttribute("title",a.title);const h=(r=a.ariaLabel)!=null?r:a.title;h&&u.setAttribute("aria-label",h);const i=Ae(a.className);i.length>0&&(u.classList.add(...i),u.dataset.geokitToolButtonClass=i.join(" ")),a.iconUrl?Me(u,a,{tool:n}):(a.iconHtml||a.renderIcon)&&Me(u,a,{tool:n})}function wr(u){var a,n;u.dataset.geokitOriginalTitle===void 0&&(u.dataset.geokitOriginalTitle=(a=u.getAttribute("title"))!=null?a:""),u.dataset.geokitOriginalAriaLabel===void 0&&(u.dataset.geokitOriginalAriaLabel=(n=u.getAttribute("aria-label"))!=null?n:""),u.dataset.geokitOriginalStyleBackgroundImage===void 0&&(u.dataset.geokitOriginalStyleBackgroundImage=u.style.getPropertyValue("background-image"),u.dataset.geokitOriginalStyleBackgroundImagePriority=u.style.getPropertyPriority("background-image")),u.dataset.geokitOriginalStylePosition===void 0&&(u.dataset.geokitOriginalStylePosition=u.style.getPropertyValue("position"),u.dataset.geokitOriginalStylePositionPriority=u.style.getPropertyPriority("position"))}function Ae(u){return u?u.split(/\s+/).map(a=>a.trim()).filter(Boolean):[]}function xr(u){return!!(u.iconUrl||u.iconHtml||u.renderIcon)}function Me(u,a,n={}){var p,m;const[h,i]=kr(a.iconSize);u.style.setProperty("background-image","none","important"),u.style.setProperty("position","relative","important"),u.querySelectorAll(ao).forEach(_=>{_.hidden=!0});const r=document.createElement("span");r.className=ro,r.dataset.geokitToolButtonIcon="true",r.setAttribute("aria-hidden","true"),r.style.setProperty("position","absolute","important"),r.style.setProperty("display","block","important"),r.style.setProperty("left","50%","important"),r.style.setProperty("top","50%","important"),r.style.setProperty("width",`${h}px`,"important"),r.style.setProperty("height",`${i}px`,"important"),r.style.setProperty("transform","translate(-50%, -50%)","important"),r.style.setProperty("pointer-events","none","important");const l=(m=a.renderIcon)==null?void 0:m.call(a,{tool:(p=n.tool)!=null?p:"polygon",groupId:n.groupId,button:u});if(l instanceof HTMLElement||typeof SVGElement!="undefined"&&l instanceof SVGElement)r.appendChild(l);else if(typeof l=="string"&&l.trim())r.innerHTML=l,lo(r);else if(a.iconHtml)r.innerHTML=a.iconHtml,lo(r);else if(a.iconUrl){const _=document.createElement("img");_.src=a.iconUrl,_.alt="",_.decoding="async",_.draggable=!1,_.style.setProperty("display","block","important"),_.style.setProperty("width","100%","important"),_.style.setProperty("height","100%","important"),_.style.setProperty("object-fit","contain","important"),r.appendChild(_)}u.appendChild(r)}function lo(u){const a=u.firstElementChild;a&&(a.style.setProperty("display","block","important"),a.style.setProperty("width","100%","important"),a.style.setProperty("height","100%","important"),a.style.setProperty("color","currentColor","important"))}function kr(u){const a=u==null?void 0:u[0],n=u==null?void 0:u[1];return typeof a=="number"&&Number.isFinite(a)&&a>0&&typeof n=="number"&&Number.isFinite(n)&&n>0?[a,n]:[18,18]}function ho(u,a,n){const h=i=>{var d;const r=Ar(u),l=Mr(u);r!=null&&r.popover?Sr(u,a,r,{container:l,groupId:n.groupId}):ee(l),(d=n.onTrigger)==null||d.call(n,a,{source:n.source,groupId:n.groupId,activate:n.activate}),n.activate&&(i.preventDefault(),i.stopPropagation())};u.addEventListener("click",h),ei.set(u,h)}function Ar(u){const a=u.__geokitToolButtonConfig;if(a)return a;const n=u.dataset.geokitToolButtonConfig;if(!n)return null;try{return JSON.parse(n)}catch{return null}}function Mr(u){var n;const a=u.closest("[data-geokit-map-container]");return(n=a!=null?a:u.parentElement)!=null?n:u}function Er(u,a,n){var r;u.setAttribute("data-geokit-map-container","true"),u.querySelectorAll(gr).forEach(l=>l.remove());const h=(r=n.toolbarGroups)!=null?r:[],i=h.some(l=>(l==null?void 0:l.hideDefaultToolbar)!==!1);Tr(u,i),h.forEach(l=>{var m;if(!(l!=null&&l.id)||!Array.isArray(l.tools)||l.tools.length===0)return;const d=document.createElement("div");d.dataset.geokitManagedToolbar="true",d.dataset.geokitToolbarGroup=l.id,d.className="leaflet-geokit-toolbar-group leaflet-bar",d.setAttribute("role","toolbar"),d.setAttribute("aria-label",(m=l.ariaLabel)!=null?m:l.id),Pr(d,l.position,l.offset);const p=Ae(l.className);p.length>0&&d.classList.add(...p),l.tools.forEach((_,y)=>{const w=Cr(_,l,y,a==null?void 0:a[_]);ho(w,_,{source:"toolbar",activate:!0,groupId:l.id,onTrigger:n.onTrigger}),d.appendChild(w)}),u.appendChild(d)})}function Tr(u,a){u.toggleAttribute("data-geokit-default-toolbar-hidden",a),u.querySelectorAll(".leaflet-draw-toolbar, .leaflet-ruler, .leaflet-ruler-settings-control").forEach(n=>{a?(n.dataset.geokitOriginalDisplay===void 0&&(n.dataset.geokitOriginalDisplay=n.style.display,n.dataset.geokitOriginalDisplayPriority=n.style.getPropertyPriority("display")),n.style.setProperty("display","none","important")):n.dataset.geokitOriginalDisplay!==void 0&&(ri(n,"display",n.dataset.geokitOriginalDisplay,n.dataset.geokitOriginalDisplayPriority),delete n.dataset.geokitOriginalDisplay,delete n.dataset.geokitOriginalDisplayPriority)})}function Cr(u,a,n,h){var d,p,m,_,y;const i=document.createElement("button");i.type="button",i.dataset.geokitTool=(p=(d=ke[u])==null?void 0:d.dataTool)!=null?p:u,i.dataset.geokitToolbarGroup=a.id,i.dataset.geokitToolbarPosition=(m=a.position)!=null?m:"topright",i.dataset.geokitToolInstance=zr(a.id,u,n),i.className="leaflet-geokit-toolbar-button",i.style.setProperty("display","block","important"),i.style.setProperty("width","34px","important"),i.style.setProperty("height","34px","important"),i.style.setProperty("padding","0","important"),i.style.setProperty("border","0","important"),i.style.setProperty("border-bottom","1px solid #ccc","important"),i.style.setProperty("background","#fff","important"),i.style.setProperty("cursor","pointer","important"),i.style.setProperty("position","relative","important");const r=(_=h==null?void 0:h.title)!=null?_:co(u);i.title=r,i.setAttribute("aria-label",(y=h==null?void 0:h.ariaLabel)!=null?y:r);const l=Ae(h==null?void 0:h.className);if(l.length>0&&i.classList.add(...l),h&&(i.__geokitToolButtonConfig=h,xr(h)&&Me(i,h,{tool:u,groupId:a.id})),!i.querySelector(`.${ro}`)){const w={iconHtml:Br(u),iconSize:[20,20]};Me(i,w,{tool:u,groupId:a.id})}return i}function Pr(u,a="topright",n){const[h,i]=Rr(n);u.style.setProperty("position","absolute","important"),u.style.setProperty("z-index","1000","important"),u.style.setProperty("background","#fff","important"),u.style.setProperty("box-shadow","0 1px 5px rgba(0,0,0,0.35)","important");const[r,l]=a.startsWith("bottom")?["bottom",a.endsWith("right")?"right":"left"]:["top",a.endsWith("right")?"right":"left"];u.style.setProperty(r,`${i}px`,"important"),u.style.setProperty(l,`${h}px`,"important")}function Sr(u,a,n,h){var d,p,m,_,y,w,T,E;if(!n.popover)return;ee(h.container);const i=document.createElement("div");if(i.dataset.geokitToolPopover="true",i.dataset.geokitTool=(p=(d=ke[a])==null?void 0:d.dataTool)!=null?p:a,u.dataset.geokitToolInstance&&(i.dataset.geokitToolInstance=u.dataset.geokitToolInstance),h.groupId&&(i.dataset.geokitToolbarGroup=h.groupId),i.setAttribute("role","dialog"),i.setAttribute("aria-label",(_=(m=n.popover.ariaLabel)!=null?m:n.popover.title)!=null?_:co(a)),i.style.setProperty("position","absolute","important"),i.style.setProperty("z-index","10001","important"),i.style.setProperty("max-width","260px","important"),i.style.setProperty("padding","10px 12px","important"),i.style.setProperty("border","1px solid rgba(0,0,0,0.22)","important"),i.style.setProperty("border-radius","8px","important"),i.style.setProperty("background","#fff","important"),i.style.setProperty("box-shadow","0 8px 24px rgba(0,0,0,0.24)","important"),i.style.setProperty("font","13px system-ui, sans-serif","important"),i.style.setProperty("line-height","1.35","important"),n.popover.title){const A=document.createElement("strong");A.textContent=n.popover.title,A.style.setProperty("display","block","important"),A.style.setProperty("margin-bottom","4px","important"),i.appendChild(A)}if(n.popover.body){const A=document.createElement("div");A.textContent=n.popover.body,i.appendChild(A)}if(n.popover.html){const A=document.createElement("div");A.innerHTML=n.popover.html,i.appendChild(A)}const r=(w=(y=n.popover).render)==null?void 0:w.call(y,{tool:a,groupId:h.groupId,button:u,popover:i}),l=typeof DocumentFragment!="undefined"&&r instanceof DocumentFragment;if(r instanceof HTMLElement||l)i.appendChild(r);else if(typeof r=="string"&&r.trim()){const A=document.createElement("div");A.innerHTML=r,i.appendChild(A)}h.container.appendChild(i),Ir(h.container,u,i),u.setAttribute("aria-expanded","true"),oi.set(i,{tool:a,groupId:h.groupId,button:u,config:n}),Dr(h.container,u,i),(E=(T=n.popover).onOpen)==null||E.call(T,{tool:a,groupId:h.groupId,button:u,popover:i})}function Ir(u,a,n){const h=u.getBoundingClientRect(),i=a.getBoundingClientRect(),r=Math.max(8,Math.min(i.left-h.left,h.width-n.offsetWidth-8)),l=Math.max(8,Math.min(i.bottom-h.top+8,h.height-n.offsetHeight-8));n.style.setProperty("left",`${r}px`,"important"),n.style.setProperty("top",`${l}px`,"important")}function Dr(u,a,n){const h=l=>{l.key==="Escape"&&ee(u)},i=l=>{const d=l.target;d instanceof Node&&(n.contains(d)||a.contains(d)||ee(u))};document.addEventListener("keydown",h,!0);const r=window.setTimeout(()=>{n.isConnected&&document.addEventListener("pointerdown",i,!0)},0);ii.set(n,{keydown:h,pointerdown:i,pointerdownTimer:r})}function ee(u){u.querySelectorAll(_r).forEach(a=>{var i,r,l;const n=oi.get(a);n==null||n.button.removeAttribute("aria-expanded"),n||(i=Or(u,a))==null||i.removeAttribute("aria-expanded");const h=ii.get(a);h&&(window.clearTimeout(h.pointerdownTimer),document.removeEventListener("keydown",h.keydown,!0),document.removeEventListener("pointerdown",h.pointerdown,!0),ii.delete(a)),a.remove(),n&&((l=(r=n.config.popover)==null?void 0:r.onClose)==null||l.call(r,{tool:n.tool,groupId:n.groupId,button:n.button,popover:a}),oi.delete(a))})}function Or(u,a){const n=u.querySelectorAll(vr);for(const h of n)if(a.dataset.geokitToolInstance&&h.dataset.geokitToolInstance===a.dataset.geokitToolInstance||h.dataset.geokitTool===a.dataset.geokitTool&&h.dataset.geokitToolbarGroup===a.dataset.geokitToolbarGroup)return h;return null}function zr(u,a,n){return`${u}:${a}:${n}`}function co(u){return{polygon:"Draw polygon",polyline:"Draw line",rectangle:"Draw rectangle",circle:"Draw circle",marker:"Place marker",layerCake:"Draw layer cake",move:"Move feature",select:"Select feature",edit:"Edit features",delete:"Delete features",ruler:"Measure distance",measurementSettings:"Measurement settings",layerStyle:"Layer style",save:"Save map geometry"}[u]}function Br(u){const a="currentColor",n="none";return{polygon:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.8" stroke-linejoin="round"><path d="M5.5 7.2 9.2 4.8 18.5 8.3 16.1 18.2 6.3 15.7Z"/><circle cx="5.5" cy="7.2" r="1.2" fill="currentColor"/><circle cx="18.5" cy="8.3" r="1.2" fill="currentColor"/><circle cx="16.1" cy="18.2" r="1.2" fill="currentColor"/></svg>`,polyline:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4.8 16.7 9.2 9.5 14.4 13.1 19 6.1"/><circle cx="4.8" cy="16.7" r="1.3" fill="currentColor"/><circle cx="14.4" cy="13.1" r="1.3" fill="currentColor"/><circle cx="19" cy="6.1" r="1.3" fill="currentColor"/></svg>`,rectangle:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.8"><rect x="5.5" y="6.5" width="13" height="11" rx="2"/><path d="M8.5 10h7"/></svg>`,circle:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.8"><circle cx="12" cy="12" r="6.8"/><circle cx="12" cy="12" r="2" fill="currentColor"/></svg>`,marker:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.7" stroke-linejoin="round"><path d="M12 3.4a6 6 0 0 0-6 6c0 4.2 4.5 9.4 5.6 10.5a.6.6 0 0 0 .8 0C13.5 18.8 18 13.6 18 9.4a6 6 0 0 0-6-6Z"/><circle cx="12" cy="9.5" r="2.1" fill="currentColor" stroke="none"/></svg>`,layerCake:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.7" stroke-linecap="round"><ellipse cx="12" cy="7.6" rx="6.8" ry="2.7"/><path d="M5.2 11c1.3 1.2 3.8 2 6.8 2s5.5-.8 6.8-2M6.3 15c1.3.9 3.3 1.5 5.7 1.5s4.4-.6 5.7-1.5"/></svg>`,move:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 4v16M4 12h16M12 4l-2 2M12 4l2 2M20 12l-2-2M20 12l-2 2M12 20l-2-2M12 20l2-2M4 12l2-2M4 12l2 2"/></svg>`,select:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.8" stroke-linejoin="round"><path d="M6 4.8 18.5 12 13 13.4 10.2 19Z"/></svg>`,edit:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.7" stroke-linejoin="round"><path d="m6 17.8 3.5-.7 7.7-7.7-2.8-2.8-7.7 7.7Z"/><path d="m12.9 7.9 2.8 2.8"/></svg>`,delete:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M7.5 8.2h9l-.8 10a1.7 1.7 0 0 1-1.7 1.5h-4a1.7 1.7 0 0 1-1.7-1.5Z"/><path d="M9.5 8.2V6.8c0-.7.6-1.3 1.3-1.3h2.4c.7 0 1.3.6 1.3 1.3v1.4M10.5 11.5v4.8M13.5 11.5v4.8"/></svg>`,ruler:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.7" stroke-linejoin="round"><path d="M5.2 17.8 17.8 5.2l1.7 1.7L6.9 19.5H5.2Z"/><path d="m12.2 8 1.5 1.5M9.9 10.3l1.5 1.5M7.6 12.6l1.5 1.5"/></svg>`,measurementSettings:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.6" stroke-linecap="round"><circle cx="12" cy="12" r="3.2"/><path d="M12 4.8v2M12 17.2v2M4.8 12h2M17.2 12h2M7 7l1.4 1.4M15.6 15.6 17 17M17 7l-1.4 1.4M8.4 15.6 7 17"/></svg>`,layerStyle:'<svg viewBox="0 0 24 24" fill="none"><path d="M5 6h14v3H5z" fill="currentColor" opacity=".9"/><path d="M5 11h14v3H5z" fill="currentColor" opacity=".65"/><path d="M5 16h14v3H5z" fill="currentColor" opacity=".4"/></svg>',save:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.8" stroke-linejoin="round" stroke-linecap="round"><path d="M5.5 4.8h11.2l1.8 1.8v12.6h-13Z"/><path d="M8 4.8v5h7v-5M8.2 19.2v-5.4h7.6v5.4"/><path d="M10 16.4h4"/></svg>`}[u]}function Rr(u){const a=u==null?void 0:u[0],n=u==null?void 0:u[1];return typeof a=="number"&&Number.isFinite(a)&&a>=0&&typeof n=="number"&&Number.isFinite(n)&&n>=0?[a,n]:[10,10]}const uo=new WeakSet;function Nr(u=we){var h;if(uo.has(u))return;const a=u.DrawToolbar;if(!((h=a==null?void 0:a.prototype)!=null&&h.getModeHandlers))return;const n=a.prototype.getModeHandlers;a.prototype.getModeHandlers=function(i){var l,d,p,m;const r=n.call(this,i);if((l=this.options)!=null&&l.cake){const _=(d=u.Draw)==null?void 0:d.Cake;if(!_)return r;r.push({enabled:!0,handler:new _(i,this.options.cake),title:"Draw Layer Cake (Subtractive Zones)"})}if((p=this.options)!=null&&p.move){const _=(m=u.Draw)==null?void 0:m.Move;if(!_)return r;r.push({enabled:!0,handler:new _(i,this.options.move),title:"Move/Translate Features"})}return r},uo.add(u)}const Ce=class Ce extends Q.Draw.Circle{constructor(a,n){super(a,n),this.type=Ce.TYPE}addHooks(){super.addHooks();const a=this._tooltip;a!=null&&a.updateContent&&a.updateContent({text:"Click and drag to draw the Layer Cake base",subtext:"Release mouse to finish base layer"})}};k(Ce,"TYPE","cake");let Ee=Ce;Q.Draw.Cake=Ee;function Ur(u){const a=u.Draw;if(!a||a.Cake)return;const h=class h extends a.Circle{constructor(r,l){super(r,l),this.type=h.TYPE}addHooks(){super.addHooks();const r=this._tooltip;r!=null&&r.updateContent&&r.updateContent({text:"Click and drag to draw the Layer Cake base",subtext:"Release mouse to finish base layer"})}};k(h,"TYPE","cake");let n=h;a.Cake=n}const Pe=class Pe extends Q.Draw.Feature{constructor(n,h){super(n,h);k(this,"_featureGroup");k(this,"_selectedLayer",null);k(this,"_originalLatLngs",null);k(this,"_dragStartLatLng",null);k(this,"_isDragging",!1);k(this,"_pendingMove",null);this.type=Pe.TYPE,this._featureGroup=(h==null?void 0:h.featureGroup)||new Q.FeatureGroup}enable(){this._enabled||super.enable()}disable(){this._enabled&&(this._cleanupDragging(),super.disable())}addHooks(){const n=this._map;if(!n)return;Q.DomUtil.addClass(n.getContainer(),"leaflet-draw-move-mode"),this._featureGroup.eachLayer(i=>{this._enableLayerHover(i)});const h=this._tooltip;h!=null&&h.updateContent&&h.updateContent({text:"Click and drag a feature to move it",subtext:""})}removeHooks(){const n=this._map;n&&(Q.DomUtil.removeClass(n.getContainer(),"leaflet-draw-move-mode"),this._featureGroup.eachLayer(h=>{this._disableLayerHover(h)}),this._cleanupDragging())}_enableLayerHover(n){n.on&&(n.on("mouseover",this._onLayerMouseOver,this),n.on("mouseout",this._onLayerMouseOut,this),n.on("mousedown",this._onLayerMouseDown,this))}_disableLayerHover(n){n.off&&(n.off("mouseover",this._onLayerMouseOver,this),n.off("mouseout",this._onLayerMouseOut,this),n.off("mousedown",this._onLayerMouseDown,this))}_onLayerMouseOver(n){if(this._isDragging)return;const h=n.target;if(h.getElement){const i=h.getElement();i&&(i.style.cursor="grab")}else h._path&&(h._path.style.cursor="grab")}_onLayerMouseOut(n){if(this._isDragging)return;const h=n.target;if(h.getElement){const i=h.getElement();i&&(i.style.cursor="")}else h._path&&(h._path.style.cursor="")}_onLayerMouseDown(n){if(this._isDragging)return;Q.DomEvent.stopPropagation(n.originalEvent),Q.DomEvent.preventDefault(n.originalEvent);const h=n.target;if(this._selectedLayer=h,this._isDragging=!0,this._dragStartLatLng=n.latlng,this._storeOriginalLatLngs(h),h.getElement){const r=h.getElement();r&&(r.style.cursor="grabbing")}else h._path&&(h._path.style.cursor="grabbing");this._map.on("mousemove",this._onMouseMove,this),this._map.on("mouseup",this._onMouseUp,this);const i=h.toGeoJSON();this._pendingMove={layer:h,originalGeoJSON:i,newGeoJSON:i}}_storeOriginalLatLngs(n){n.getLatLng?this._originalLatLngs=n.getLatLng():n.getLatLngs&&(this._originalLatLngs=JSON.parse(JSON.stringify(n.getLatLngs())))}_onMouseMove(n){if(!this._isDragging||!this._selectedLayer||!this._dragStartLatLng)return;const h=this._selectedLayer,i={lat:n.latlng.lat-this._dragStartLatLng.lat,lng:n.latlng.lng-this._dragStartLatLng.lng};if(h.setLatLng){const r=Q.latLng(this._originalLatLngs.lat+i.lat,this._originalLatLngs.lng+i.lng);h.setLatLng(r)}else if(h.setLatLngs){const r=this._offsetLatLngs(this._originalLatLngs,i);h.setLatLngs(r)}}_offsetLatLngs(n,h){return n instanceof Q.LatLng||n.lat!==void 0&&n.lng!==void 0?Q.latLng(n.lat+h.lat,n.lng+h.lng):Array.isArray(n)?n.map(i=>this._offsetLatLngs(i,h)):n}_onMouseUp(n){var i,r;if(!this._isDragging||!this._selectedLayer)return;this._pendingMove&&(this._pendingMove.newGeoJSON=this._selectedLayer.toGeoJSON());const h=this._selectedLayer;if(h.getElement){const l=h.getElement();l&&(l.style.cursor="grab")}else h._path&&(h._path.style.cursor="grab");this._map.fire("draw:moveend",{layer:this._selectedLayer,originalGeoJSON:(i=this._pendingMove)==null?void 0:i.originalGeoJSON,newGeoJSON:(r=this._pendingMove)==null?void 0:r.newGeoJSON}),this._map.off("mousemove",this._onMouseMove,this),this._map.off("mouseup",this._onMouseUp,this),this._isDragging=!1}_cleanupDragging(){if(this._selectedLayer){const n=this._selectedLayer;if(n.getElement){const h=n.getElement();h&&(h.style.cursor="")}else n._path&&(n._path.style.cursor="")}this._map.off("mousemove",this._onMouseMove,this),this._map.off("mouseup",this._onMouseUp,this),this._selectedLayer=null,this._originalLatLngs=null,this._dragStartLatLng=null,this._isDragging=!1,this._pendingMove=null}confirmMove(){this._pendingMove&&(this._map.fire("draw:moveconfirmed",{layer:this._pendingMove.layer,originalGeoJSON:this._pendingMove.originalGeoJSON,newGeoJSON:this._pendingMove.newGeoJSON}),this._cleanupDragging())}cancelMove(){if(!this._pendingMove)return;const n=this._pendingMove.layer;n.setLatLng&&this._originalLatLngs?n.setLatLng(this._originalLatLngs):n.setLatLngs&&this._originalLatLngs&&n.setLatLngs(this._originalLatLngs),this._cleanupDragging()}hasPendingMove(){return this._pendingMove!==null}};k(Pe,"TYPE","move");let ai=Pe;Q.Draw.Move=ai;function Zr(u){const a=u.Draw;if(!a||a.Move)return;const h=class h extends a.Feature{constructor(l,d){super(l,d);k(this,"_featureGroup");k(this,"_selectedLayer",null);k(this,"_originalLatLngs",null);k(this,"_dragStartLatLng",null);k(this,"_isDragging",!1);k(this,"_pendingMove",null);this.type=h.TYPE,this._featureGroup=(d==null?void 0:d.featureGroup)||new Q.FeatureGroup}enable(){this._enabled||super.enable()}disable(){this._enabled&&(this._cleanupDragging(),super.disable())}addHooks(){const l=this._map;if(!l)return;u.DomUtil.addClass(l.getContainer(),"leaflet-draw-move-mode"),this._featureGroup.eachLayer(p=>{this._enableLayerHover(p)});const d=this._tooltip;d!=null&&d.updateContent&&d.updateContent({text:"Click and drag a feature to move it",subtext:""})}removeHooks(){const l=this._map;l&&(u.DomUtil.removeClass(l.getContainer(),"leaflet-draw-move-mode"),this._featureGroup.eachLayer(d=>{this._disableLayerHover(d)}),this._cleanupDragging())}_enableLayerHover(l){l.on&&(l.on("mouseover",this._onLayerMouseOver,this),l.on("mouseout",this._onLayerMouseOut,this),l.on("mousedown",this._onLayerMouseDown,this))}_disableLayerHover(l){l.off&&(l.off("mouseover",this._onLayerMouseOver,this),l.off("mouseout",this._onLayerMouseOut,this),l.off("mousedown",this._onLayerMouseDown,this))}_onLayerMouseOver(l){if(this._isDragging)return;const d=l.target;if(d.getElement){const p=d.getElement();p&&(p.style.cursor="grab")}else d._path&&(d._path.style.cursor="grab")}_onLayerMouseOut(l){if(this._isDragging)return;const d=l.target;if(d.getElement){const p=d.getElement();p&&(p.style.cursor="")}else d._path&&(d._path.style.cursor="")}_onLayerMouseDown(l){if(this._isDragging)return;u.DomEvent.stopPropagation(l.originalEvent),u.DomEvent.preventDefault(l.originalEvent);const d=l.target;if(this._selectedLayer=d,this._isDragging=!0,this._dragStartLatLng=l.latlng,this._storeOriginalLatLngs(d),d.getElement){const m=d.getElement();m&&(m.style.cursor="grabbing")}else d._path&&(d._path.style.cursor="grabbing");this._map.on("mousemove",this._onMouseMove,this),this._map.on("mouseup",this._onMouseUp,this);const p=d.toGeoJSON();this._pendingMove={layer:d,originalGeoJSON:p,newGeoJSON:p}}_storeOriginalLatLngs(l){l.getLatLng?this._originalLatLngs=l.getLatLng():l.getLatLngs&&(this._originalLatLngs=JSON.parse(JSON.stringify(l.getLatLngs())))}_onMouseMove(l){if(!this._isDragging||!this._selectedLayer||!this._dragStartLatLng)return;const d=this._selectedLayer,p={lat:l.latlng.lat-this._dragStartLatLng.lat,lng:l.latlng.lng-this._dragStartLatLng.lng};if(d.setLatLng){const m=u.latLng(this._originalLatLngs.lat+p.lat,this._originalLatLngs.lng+p.lng);d.setLatLng(m)}else if(d.setLatLngs){const m=this._offsetLatLngs(this._originalLatLngs,p);d.setLatLngs(m)}}_offsetLatLngs(l,d){return l instanceof u.LatLng||l.lat!==void 0&&l.lng!==void 0?u.latLng(l.lat+d.lat,l.lng+d.lng):Array.isArray(l)?l.map(p=>this._offsetLatLngs(p,d)):l}_onMouseUp(l){var p,m;if(!this._isDragging||!this._selectedLayer)return;this._pendingMove&&(this._pendingMove.newGeoJSON=this._selectedLayer.toGeoJSON());const d=this._selectedLayer;if(d.getElement){const _=d.getElement();_&&(_.style.cursor="grab")}else d._path&&(d._path.style.cursor="grab");this._map.fire("draw:moveend",{layer:this._selectedLayer,originalGeoJSON:(p=this._pendingMove)==null?void 0:p.originalGeoJSON,newGeoJSON:(m=this._pendingMove)==null?void 0:m.newGeoJSON}),this._map.off("mousemove",this._onMouseMove,this),this._map.off("mouseup",this._onMouseUp,this),this._isDragging=!1}_cleanupDragging(){if(this._selectedLayer){const l=this._selectedLayer;if(l.getElement){const d=l.getElement();d&&(d.style.cursor="")}else l._path&&(l._path.style.cursor="")}this._map.off("mousemove",this._onMouseMove,this),this._map.off("mouseup",this._onMouseUp,this),this._selectedLayer=null,this._originalLatLngs=null,this._dragStartLatLng=null,this._isDragging=!1,this._pendingMove=null}confirmMove(){this._pendingMove&&(this._map.fire("draw:moveconfirmed",{layer:this._pendingMove.layer,originalGeoJSON:this._pendingMove.originalGeoJSON,newGeoJSON:this._pendingMove.newGeoJSON}),this._cleanupDragging())}cancelMove(){if(!this._pendingMove)return;const l=this._pendingMove.layer;l.setLatLng&&this._originalLatLngs?l.setLatLng(this._originalLatLngs):l.setLatLngs&&this._originalLatLngs&&l.setLatLngs(this._originalLatLngs),this._cleanupDragging()}hasPendingMove(){return this._pendingMove!==null}};k(h,"TYPE","move");let n=h;a.Move=n}const Hr=63710088e-1;function si(u){return u*Math.PI/180}function fo(u){return u*180/Math.PI}function Fr(u,a,n){const h=a/Hr,i=si(n),r=si(u.lat),l=si(u.lng),d=Math.sin(r),p=Math.cos(r),m=Math.sin(h),_=Math.cos(h),y=d*_+p*m*Math.cos(i),w=Math.asin(y),T=Math.sin(i)*m*p,E=_-d*y,A=l+Math.atan2(T,E);return{lat:fo(w),lng:fo(A)}}function Gr(u){let a=0;for(let n=0;n<u.length-1;n++){const[h,i]=u[n],[r,l]=u[n+1];a+=h*l-r*i}return a/2}function li(u){const a=u[0],n=u.at(-1);return!a||!n||a[0]===n[0]&&a[1]===n[1]?u:[...u,a]}function hi(u,a){const n=li(u);if(Gr(n)<0===a)return n;const r=[...n].reverse();return li(r)}function ci(u,a,n){if(n<4)throw new Error("steps must be >= 4");const h=[];for(let i=0;i<n;i++){const r=i/n*360,l=Fr(u,a,r);h.push([l.lng,l.lat])}return li(h)}function Vr(u){const{id:a,center:n,radiusMeters:h,layerIndex:i,steps:r}=u,l=hi(ci(n,h,r),!1);return{type:"Feature",properties:{id:a,layer_index:i,radius_outer:h,type:"core",_meta:{lat:n.lat,lng:n.lng,radius:h}},geometry:{type:"Polygon",coordinates:[l]}}}function Wr(u){const{id:a,center:n,radiusOuterMeters:h,radiusInnerMeters:i,layerIndex:r,steps:l}=u,d=hi(ci(n,h,l),!1),p=hi(ci(n,i,l),!0);return{type:"Feature",properties:{id:a,layer_index:r,radius_outer:h,type:"ring",_meta:{lat:n.lat,lng:n.lng,radius:h}},geometry:{type:"Polygon",coordinates:[d,p]}}}function Jr(u){const{circles:a,steps:n=64}=u,h=[...a].sort((r,l)=>r.getRadius()-l.getRadius()),i=[];return h.forEach((r,l)=>{const d=r.getLatLng(),p=r.getRadius(),m=ti();if(l===0){i.push(Vr({id:m,center:d,radiusMeters:p,layerIndex:l,steps:n}));return}const y=h[l-1].getRadius();i.push(Wr({id:m,center:d,radiusOuterMeters:p,radiusInnerMeters:y,layerIndex:l,steps:n}))}),{type:"FeatureCollection",features:i}}function ie(u){u.preventDefault(),u.stopPropagation()}function jr(u){var m,_;const{root:a,addButtonId:n,saveButtonId:h,onAddRing:i,onSave:r}=u,l=(m=a.querySelector)==null?void 0:m.call(a,`#${n}`),d=(_=a.querySelector)==null?void 0:_.call(a,`#${h}`);if(!l||!d)return;const p="data-cake-controls-bound";if(!(l.hasAttribute(p)||d.hasAttribute(p))){l.setAttribute(p,"true"),d.setAttribute(p,"true");for(const y of[l,d])y.addEventListener("pointerdown",ie),y.addEventListener("mousedown",ie),y.addEventListener("touchstart",ie);l.addEventListener("click",y=>{ie(y),i()}),d.addEventListener("click",y=>{ie(y),r()})}}function qr(u){var n;const a=(n=u.options)!=null?n:{};a.original||(a.original={...a}),a.editing||(a.editing={...a})}function oe(u,a){if(a==="imperial"){const n=u*3.28084;return n>=5280?`${(n/5280).toFixed(2)} mi`:`${Math.round(n)} ft`}return u>=1e3?`${(u/1e3).toFixed(2)} km`:`${Math.round(u)} m`}class Yr{constructor(a,n,h,i="metric"){k(this,"map");k(this,"layers",[]);k(this,"controlsGroup");k(this,"onSave");k(this,"sessionId",ti().slice(0,8));k(this,"baseCircleOptions");k(this,"detachMapListeners",[]);k(this,"renderScheduled",!1);k(this,"measurementSystem");this.map=a,this.onSave=h,this.measurementSystem=i,this.controlsGroup=Q.layerGroup().addTo(a),this.baseCircleOptions={...n.options},delete this.baseCircleOptions.editing,delete this.baseCircleOptions.original,this.addLayer(n),this.installEditEventBridges(),this.renderControls()}installEditEventBridges(){var _,y,w,T,E,A,N,F;const a=we,n=(y=(_=a==null?void 0:a.Draw)==null?void 0:_.Event)==null?void 0:y.EDITMOVE,h=(T=(w=a==null?void 0:a.Draw)==null?void 0:w.Event)==null?void 0:T.EDITRESIZE,i=(A=(E=a==null?void 0:a.Draw)==null?void 0:E.Event)==null?void 0:A.EDITSTART,r=(F=(N=a==null?void 0:a.Draw)==null?void 0:N.Event)==null?void 0:F.EDITSTOP;if(!n||!h)return;const l=P=>{const I=P==null?void 0:P.layer;I&&this.layers.includes(I)&&this.syncCenters(I)},d=P=>{const I=P==null?void 0:P.layer;I&&this.layers.includes(I)&&(this.updateLabels(I),this.requestRenderControls())},p=P=>{var q;const I=P==null?void 0:P.layer;if(!I||!this.layers.includes(I))return;const G=I;((q=G.getTooltip)==null?void 0:q.call(G))&&this.updateLabels(G)},m=()=>{this.layers.forEach(P=>{var G;const I=(G=P.getTooltip)==null?void 0:G.call(P);I&&(P.setTooltipContent(oe(P.getRadius(),this.measurementSystem)),I.options.offset=[10,0],I.options.direction="right",P.closeTooltip(),P.openTooltip())})};this.map.on(n,l),this.map.on(h,d),i&&(this.map.on(i,p),this.detachMapListeners.push(()=>this.map.off(i,p))),r&&(this.map.on(r,m),this.detachMapListeners.push(()=>this.map.off(r,m))),this.detachMapListeners.push(()=>this.map.off(n,l)),this.detachMapListeners.push(()=>this.map.off(h,d))}requestRenderControls(){if(this.renderScheduled)return;this.renderScheduled=!0,(typeof requestAnimationFrame=="function"?requestAnimationFrame:n=>setTimeout(()=>n(0),0))(()=>{this.renderScheduled=!1,this.renderControls()})}addLayer(a){this.layers.push(a),a.addTo(this.map),a.bindTooltip(oe(a.getRadius(),this.measurementSystem),{permanent:!0,direction:"right",className:"cake-label",offset:[10,0]});const n=a.editing;setTimeout(()=>{var h,i,r,l,d;try{if((h=a.redraw)==null||h.call(a),qr(a),(i=n==null?void 0:n.enabled)!=null&&i.call(n)){(r=n.updateMarkers)==null||r.call(n),this.requestRenderControls();return}(l=n==null?void 0:n.enable)==null||l.call(n),(d=n==null?void 0:n.updateMarkers)==null||d.call(n),this.requestRenderControls()}catch{}},0)}addRing(){if(this.layers.length>=10)return;const a=this.getLargestCircle();if(!a)return;const n=a.getRadius()*1.5,h=Q.circle(a.getLatLng(),{...this.baseCircleOptions,radius:n});this.addLayer(h),this.renderControls()}save(){const a=Jr({circles:this.layers});this.onSave(a),this.destroy()}getLargestCircle(){return this.layers.length===0?null:this.layers.reduce((a,n)=>a.getRadius()>n.getRadius()?a:n)}syncCenters(a){const n=a.getLatLng();this.layers.forEach(h=>{var i,r,l;h!==a&&(h.setLatLng(n),(i=h.redraw)==null||i.call(h),(l=(r=h.editing)==null?void 0:r.updateMarkers)==null||l.call(r))}),this.requestRenderControls()}updateLabels(a){var l;const n=a.getRadius();let h=oe(n,this.measurementSystem);const i=this.layers.filter(d=>d!==a&&d.getRadius()<n);if(i.length>0){const d=i.reduce((_,y)=>_.getRadius()>y.getRadius()?_:y),p=n-d.getRadius(),m=oe(p,this.measurementSystem);h=`${oe(n,this.measurementSystem)} (+${m})`}const r=(l=a.getTooltip)==null?void 0:l.call(a);if(r){a.setTooltipContent(h);const p=a.getBounds().getSouthWest();p.lat=a.getLatLng().lat,r.options.direction="left",r.options.offset=[-10,0],r.setLatLng(p),a.closeTooltip(),a.openTooltip()}}renderControls(){this.controlsGroup.clearLayers();const a=this.getLargestCircle();if(!a)return;const h=a.getBounds().getNorthEast(),i=`cake-add-${this.sessionId}`,r=`cake-save-${this.sessionId}`,l=Q.divIcon({className:"layer-cake-controls",html:`
206
254
  <div class="layer-cake-controls__container">
207
255
  <button id="${i}" type="button">➕ Ring</button>
208
256
  <button id="${r}" type="button" class="layer-cake-controls__save">💾 Save</button>
209
257
  </div>
210
- `,iconSize:[140,40],iconAnchor:[-10,20]});Q.marker(l,{icon:h,interactive:!0,keyboard:!1,bubblingMouseEvents:!1}).addTo(this.controlsGroup),setTimeout(()=>{const d=this.map.getContainer();jr({root:d,addButtonId:i,saveButtonId:r,onAddRing:()=>this.addRing(),onSave:()=>this.save()})},0)}destroy(){this.detachMapListeners.forEach(s=>{try{s()}catch{}}),this.detachMapListeners=[],this.layers.forEach(s=>this.map.removeLayer(s)),this.layers=[],this.controlsGroup.clearLayers(),this.map.removeLayer(this.controlsGroup)}}const Kr=`<?xml version="1.0" encoding="utf-8"?>
258
+ `,iconSize:[140,40],iconAnchor:[-10,20]});Q.marker(h,{icon:l,interactive:!0,keyboard:!1,bubblingMouseEvents:!1}).addTo(this.controlsGroup),setTimeout(()=>{const d=this.map.getContainer();jr({root:d,addButtonId:i,saveButtonId:r,onAddRing:()=>this.addRing(),onSave:()=>this.save()})},0)}destroy(){this.detachMapListeners.forEach(a=>{try{a()}catch{}}),this.detachMapListeners=[],this.layers.forEach(a=>this.map.removeLayer(a)),this.layers=[],this.controlsGroup.clearLayers(),this.map.removeLayer(this.controlsGroup)}}const Kr=`<?xml version="1.0" encoding="utf-8"?>
211
259
  \r<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
212
260
  <svg width="800px" height="800px" viewBox="0 -1.67 47.336 47.336" xmlns="http://www.w3.org/2000/svg">\r
213
261
  <g id="Group_42" data-name="Group 42" transform="translate(-172.455 -364.36)">\r
@@ -238,7 +286,7 @@ ${Fn}
238
286
  <path d="M22 12 L19 15"/>
239
287
  </g>
240
288
  </svg>
241
- `,po=6378137,Ft=6356752314245e-6,Bt=1/298.257223563,Qr=Math.PI/180,$r=180/Math.PI,Ce=1e9;function ts(u){const s=BigInt(Math.round(u*Ce));return Number(s)/Ce}function Gt(u){return ts(u)*Qr}function mo(u){const s=u*$r%360;return s<0?s+360:s}function di(u){const s=BigInt(Math.round(u*Ce));return Number(s)/Ce}function es(u,s,n,l){const i=is(u,s,n,l);if(i.converged)return{meters:di(i.distanceMeters),bearingDegrees:mo(i.bearingRad),algorithm:"vincenty",iterations:i.iterations};const r=os(u,s,n,l);return{meters:di(r.distanceMeters),bearingDegrees:mo(r.bearingRad),algorithm:"karney",iterations:i.iterations}}function is(u,s,n,l){const i=Gt(u),r=Gt(n),h=Gt(l-s),d=Math.atan((1-Bt)*Math.tan(i)),p=Math.atan((1-Bt)*Math.tan(r)),m=Math.sin(d),g=Math.cos(d),y=Math.sin(p),w=Math.cos(p);let T=h,E=0,A=0;const N=200;let F=0,P=0,I=0,G=0,j=0;for(;Math.abs(T-E)>1e-12&&A<N;){const lt=Math.sin(T),De=Math.cos(T);if(F=Math.sqrt((w*lt)**2+(g*y-m*w*De)**2),F===0)return{distanceMeters:0,bearingRad:0,iterations:A,converged:!0};P=m*y+g*w*De,I=Math.atan2(F,P);const _t=g*w*lt/F;G=1-_t**2,j=G===0?0:P-2*m*y/G;const ne=Bt/16*G*(4+Bt*(4-3*G));E=T,T=h+(1-ne)*Bt*_t*(I+ne*F*(j+ne*P*(-1+2*j**2))),A+=1}if(A>=N)return{distanceMeters:Number.NaN,bearingRad:0,iterations:A,converged:!1};const q=(po**2-Ft**2)/Ft**2*G,rt=1+q/16384*(4096+q*(-768+q*(320-175*q))),st=q/1024*(256+q*(-128+q*(74-47*q))),Mt=st*F*(j+st/4*(P*(-1+2*j**2)-st/6*j*(-3+4*F**2)*(-3+4*j**2))),Ie=Ft*rt*(I-Mt),at=Math.atan2(w*Math.sin(T),g*y-m*w*Math.cos(T));return{distanceMeters:Ie,bearingRad:at,iterations:A,converged:!0}}function os(u,s,n,l){const i=Gt(u),r=Gt(n),h=Gt(l-s),d=Math.atan((1-Bt)*Math.tan(i)),p=Math.atan((1-Bt)*Math.tan(r)),m=Math.sin(d),g=Math.cos(d),y=Math.sin(p),w=Math.cos(p),T=Math.sqrt((w*Math.sin(h))**2+(g*y-m*w*Math.cos(h))**2),E=m*y+g*w*Math.cos(h),A=Math.atan2(T,E);if(A===0)return{distanceMeters:0,bearingRad:0};const F=1-(g*w*Math.sin(h)/Math.sin(A))**2,P=F===0?0:E-2*m*y/F,I=(po**2-Ft**2)/Ft**2*F,G=1+I/16384*(4096+I*(-768+I*(320-175*I))),j=I/1024*(256+I*(-128+I*(74-47*I))),q=j*T*(P+j/4*(E*(-1+2*P**2)-j/6*P*(-3+4*T**2)*(-3+4*P**2))),rt=Ft*G*(A-q),st=Math.atan2(w*Math.sin(h),g*y-m*w*Math.cos(h));return{distanceMeters:rt,bearingRad:st}}const ns={position:"topleft",circleMarker:{color:"red",radius:2},lineStyle:{color:"red",dashArray:"1,6"},angleUnit:{display:"°",decimal:2,factor:null,label:"Bearing:"}},rs={display:"km",decimal:2,factor:null,label:"Distance (km):"},ss={display:"mi",decimal:2,factor:.621371,label:"Distance (mi):"};function as(u){const s=u==="imperial"?{...ss}:{...rs};return{...ns,lengthUnit:s}}const ls={metric:"Meters / Kilometers",imperial:"Feet / Miles"};function ui(u,s={}){var r,h;const n=!!((r=u==null?void 0:u.Control)!=null&&r.Draw),l=!!u.draw,i=n&&l;return i||(h=s.onError)==null||h.call(s,"Leaflet.draw is not available on the provided Leaflet instance"),i}let _o=!1;const hs={polygon:"tool:polygon:created",polyline:"tool:polyline:created",rectangle:"tool:rectangle:created",circle:"tool:circle:created",marker:"tool:marker:created"};class cs{constructor(s){k(this,"container");k(this,"logger");k(this,"options");k(this,"L");k(this,"store");k(this,"map",null);k(this,"tileLayer",null);k(this,"drawnItems",null);k(this,"drawControl",null);k(this,"rulerControl",null);k(this,"measurementControl",null);k(this,"measurementSystem","metric");k(this,"measurementModalOverlay",null);k(this,"measurementModalDialog",null);k(this,"measurementModalRadios",{});k(this,"measurementModalKeydownHandler",null);k(this,"detachPolygonFinishPatch",null);k(this,"vertexMenuEl",null);k(this,"vertexMenuCleanup",null);k(this,"vertexEditSurfaceCleanup",null);k(this,"activeCakeSession",null);k(this,"moveConfirmationUI",null);k(this,"activeMoveHandler",null);k(this,"markerIconConfig",null);k(this,"markerIcon",null);k(this,"toolButtonConfig",null);k(this,"toolbarGroups",null);var n,l,i,r;this.options=s,this.container=s.container,this.logger=((n=s.logger)!=null?n:be("controller","debug")).child("map"),this.L=this.resolveLeaflet(s),this.store=new pr(this.logger.child("store")),this.setMarkerIconConfig((l=s.markerIconConfig)!=null?l:null,{reapplyExistingLayers:!1,syncDrawControl:!1}),this.toolButtonConfig=(i=s.toolButtonConfig)!=null?i:null,this.toolbarGroups=(r=s.toolbarGroups)!=null?r:null,this.logger.debug("ctor",{config:s.map,controls:s.controls,readOnly:s.readOnly,useExternalLeaflet:s.useExternalLeaflet}),Ur(this.L),Zr(this.L),Nr(this.L)}emitToolEvent(s,n){var i,r;try{(r=(i=this.options.toolHooks)==null?void 0:i[s])==null||r.call(i,n)}catch(h){this._error(`tool hook failed: ${s}`,h)}const l=this.options.toolEventEmitter;if(l)try{if(typeof l.emit=="function"){l.emit(s,n);return}typeof l.dispatchEvent=="function"&&l.dispatchEvent(new CustomEvent(s,{detail:n}))}catch(h){this._error(`tool emitter failed: ${s}`,h)}}setToolObservers(s){this.options.toolHooks=s.toolHooks,this.options.toolEventEmitter=s.toolEventEmitter}setMarkerIconConfig(s,n={}){const{reapplyExistingLayers:l=!0,syncDrawControl:i=!0}=n;this.options.markerIconConfig=s,this.markerIconConfig=s,this.markerIcon=this.createMarkerIcon(s),i&&this.syncDrawMarkerOptions(),l&&this.reapplyMarkerIconsToExistingLayers()}setToolButtonConfig(s){this.options.toolButtonConfig=s!=null?s:null,this.toolButtonConfig=s!=null?s:null,this.applyToolButtonCustomizations()}setToolbarGroups(s){this.options.toolbarGroups=s!=null?s:null,this.toolbarGroups=s!=null?s:null,this.applyToolButtonCustomizations()}activateTool(s,n={}){var i,r,h;const l=(i=n.source)!=null?i:"api";try{if(s==="select")return this.deactivateTool({source:l,groupId:n.groupId});if(s==="save"){const p=this.store.toFeatureCollection();return(h=(r=this.options.callbacks)==null?void 0:r.onSaved)==null||h.call(r,{geoJSON:p,featureCount:p.features.length}),this.emitToolEvent("tool:save",{geoJSON:p,featureCount:p.features.length}),this.emitToolTrigger({tool:s,source:l,groupId:n.groupId,handled:!0}),!0}if(s==="layerStyle")return this.emitToolTrigger({tool:s,source:l,groupId:n.groupId,handled:!0}),!0;if(s==="measurementSettings")return this.toggleMeasurementModal(!0),this.emitToolTrigger({tool:s,source:l,groupId:n.groupId,handled:!0}),!0;if(s==="ruler"){const p=this.triggerRulerTool();return this.emitToolTrigger({tool:s,source:l,groupId:n.groupId,handled:p,error:p?void 0:"Ruler control is not available"}),p}const d=this.findLeafletDrawHandler(s);return!d||typeof d.enable!="function"?(this.emitToolTrigger({tool:s,source:l,groupId:n.groupId,handled:!1,error:`Tool "${s}" is not available on this map`}),!1):(d.enable(),this.emitToolTrigger({tool:s,source:l,groupId:n.groupId,handled:!0}),!0)}catch(d){const p=`Failed to activate tool "${s}"`;return this._error(p,d),this.emitToolTrigger({tool:s,source:l,groupId:n.groupId,handled:!1,error:d instanceof Error?d.message:p}),!1}}triggerTool(s,n={}){return this.activateTool(s,n)}deactivateTool(s={}){var l;const n=(l=s.source)!=null?l:"api";try{return this.disableActiveToolHandlers(),this.toggleMeasurementModal(!1),this.emitToolTrigger({tool:"select",source:n,groupId:s.groupId,handled:!0}),!0}catch(i){const r="Failed to deactivate active map tools";return this._error(r,i),this.emitToolTrigger({tool:"select",source:n,groupId:s.groupId,handled:!1,error:i instanceof Error?i.message:r}),!1}}resolveLeaflet(s){if(!s.useExternalLeaflet)return we;if(s.leaflet&&ui(s.leaflet))return this.logger.debug("leaflet-runtime:external-injected"),s.leaflet;const l=globalThis.L;return l&&ui(l)?(this.logger.debug("leaflet-runtime:external-global"),l):(this.logger.warn("leaflet-runtime:external-fallback-bundled",{message:"External Leaflet requested but Draw APIs were missing; falling back to bundled Leaflet/Draw"}),we)}async init(){var n,l,i,r,h,d;const s=(l=(n=performance.now)==null?void 0:n.call(performance))!=null?l:Date.now();try{await this.destroy();const{latitude:p,longitude:m,zoom:g,minZoom:y,maxZoom:w,tileUrl:T,tileAttribution:E,preferCanvas:A=!0,useExternalLeaflet:N}=this.options.map,F=[p,m],P=this.L;N&&ui(P,{onError:rt=>this.logger.warn("external-leaflet-missing-draw",{message:rt})}),this.map=P.map(this.container,{zoomControl:!0,minZoom:y,preferCanvas:A}).setView(F,g),this.setTileLayer({urlTemplate:T,attribution:E!=null?E:"",maxZoom:w},{onTileError:rt=>{var st,Mt;(Mt=(st=this.options.callbacks)==null?void 0:st.onTileError)==null||Mt.call(st,rt)}}),this.drawnItems=P.featureGroup().addTo(this.map);const I=this.buildDrawOptions(this.options.controls,!!this.options.readOnly),G=P.Control.Draw;this.drawControl=new G(I),this.map.addControl(this.drawControl),this.applyLayerCakeToolbarIcon(),this.applyMoveToolbarIcon(),this.restoreVisibleLayersFromStore(),this.options.controls.ruler&&(this.logger.debug("init:ruler",{available:typeof P.control.ruler=="function"}),typeof P.control.ruler=="function"?(this.addRulerControl(),this.installMeasurementSettingsControl()):this.logger.warn("init:ruler:missing",{msg:"L.control.ruler is not defined"})),this.applyToolButtonCustomizations(),this.patchLeafletDrawBugs(),this.installPolygonFinishPatch(),this.installVertexEditSurfaceMenu(),this.map.invalidateSize(),setTimeout(()=>{var rt;try{(rt=this.map)==null||rt.invalidateSize()}catch{}},0),this.bindDrawEvents();const j=((r=(i=performance.now)==null?void 0:i.call(performance))!=null?r:Date.now())-s;this.logger.debug("init:ready",{elapsedMs:Math.round(j)});const q=this.store.bounds();(d=(h=this.options.callbacks)==null?void 0:h.onReady)==null||d.call(h,q?{bounds:q}:{})}catch(p){this._error("Failed to initialize Leaflet map",p,{code:"map_init_failed",recoverable:!1})}}async destroy(){var s,n,l,i;try{ni(this.container,null,{toolbarGroups:null}),this.map&&(this.map.off(),this.map.remove())}catch(r){this._error("Failed to remove Leaflet map",r)}try{(s=this.detachPolygonFinishPatch)==null||s.call(this)}catch{}this.detachPolygonFinishPatch=null;try{(n=this.vertexMenuCleanup)==null||n.call(this)}catch{}this.vertexMenuEl=null,this.vertexMenuCleanup=null;try{(l=this.vertexEditSurfaceCleanup)==null||l.call(this)}catch{}this.vertexEditSurfaceCleanup=null;try{this.hideMoveConfirmationUI()}catch{}this.drawControl=null,this.rulerControl=null,this.measurementControl=null,this.removeMeasurementModal(),this.drawnItems=null,this.tileLayer=null;try{(i=this.activeCakeSession)==null||i.destroy()}catch{}this.activeCakeSession=null,this.map=null}async getGeoJSON(){return this.store.toFeatureCollection()}async exportGeoJSON(s={}){return dr(await this.getGeoJSON(),s)}async importGeoJSON(s,n={}){var d;if(!this.map||!this.drawnItems)return[];const l=(d=n.behavior)!=null?d:"replace";l==="replace"&&await this.clearLayers();const i=cr(s),r=this.store.add(i),h=this.createGeoJSONLayers(i);return this.addGeoJSONLayersToDrawnItems(h),this.logger.debug("importGeoJSON",{behavior:l,count:i.features.length,ids:r}),n.fitToData&&await this.fitBoundsToData(),r}async loadGeoJSON(s,n=!1){await this.importGeoJSON(s,{behavior:"replace",fitToData:n})}async clearLayers(){this.drawnItems&&this.drawnItems.clearLayers(),this.store.clear()}async addFeatures(s){return this.importGeoJSON(s,{behavior:"add"})}async updateFeature(s,n){if(!this.store.has(s)){this.logger.warn("updateFeature:missing",{id:s});return}if(this.store.update(s,n),!this.drawnItems)return;this.drawnItems.eachLayer(i=>{i._fid===s&&this.drawnItems.removeLayer(i)}),this.createGeoJSONLayers({type:"FeatureCollection",features:[{...n,id:s}]}).eachLayer(i=>{i._fid=s,this.drawnItems.addLayer(i),this.installVertexContextMenu(i)})}async removeFeature(s){this.drawnItems&&this.drawnItems.eachLayer(n=>{n._fid===s&&this.drawnItems.removeLayer(n)}),this.store.remove(s)}async fitBoundsToData(s=.05){if(!this.map)return;const n=this.store.bounds();if(!n)return;const l=n,i=this.L.latLngBounds(l);if(s>0){const r=i.getSouthWest(),h=i.getNorthEast(),d=(h.lat-r.lat)*s,p=(h.lng-r.lng)*s,m=this.L.latLngBounds(this.L.latLng(r.lat-d,r.lng-p),this.L.latLng(h.lat+d,h.lng+p));this.map.fitBounds(m)}else this.map.fitBounds(i)}async fitBounds(s,n=.05){if(!this.map)return;const l=this.L.latLngBounds(s);if(n>0){const i=l.getSouthWest(),r=l.getNorthEast(),h=(r.lat-i.lat)*n,d=(r.lng-i.lng)*n,p=this.L.latLngBounds(this.L.latLng(i.lat-h,i.lng-d),this.L.latLng(r.lat+h,r.lng+d));this.map.fitBounds(p)}else this.map.fitBounds(l)}async setView(s,n,l){this.map&&this.map.setView([s,n],l!=null?l:this.map.getZoom())}setTileLayer(s,n){if(!this.map){this.logger.warn("setTileLayer called before map initialization",{urlTemplate:s.urlTemplate});return}this.logger.debug("tile-layer:switch",{urlTemplate:s.urlTemplate,attribution:s.attribution,maxZoom:s.maxZoom,subdomains:s.subdomains}),this.tileLayer&&(this.map.removeLayer(this.tileLayer),this.tileLayer=null);const l={attribution:s.attribution,minZoom:this.options.map.minZoom,maxZoom:s.maxZoom};s.subdomains!==void 0?l.subdomains=s.subdomains:s.urlTemplate.includes("{s}")&&(l.subdomains=["a","b","c"]);const i=this.L.tileLayer(s.urlTemplate,l);let r=!1;i.on("tileerror",h=>{var d;this.logger.error("tile-layer:error",{error:h}),r||(r=!0,(d=n==null?void 0:n.onTileError)==null||d.call(n,h))}),i.addTo(this.map),this.tileLayer=i}async mergeVisiblePolygons(s){if(!this.map||!this.drawnItems)return null;const l=(await this.getGeoJSON()).features.filter(d=>{const p=d.geometry;return p&&(oo(p)||no(p))});if(l.length<=1){if(l.length===1){const d=l[0].id;return d?String(d):null}return null}const i=fr(l,s==null?void 0:s.properties);if(!i)return null;const r=[];for(const d of l){const p=d.id;p&&r.push(String(p))}for(const d of r)await this.removeFeature(d);const[h]=await this.addFeatures({type:"FeatureCollection",features:[i]});return h||null}setRulerUnits(s){if(this.measurementSystem===s)return;const n=this.measurementSystem;this.measurementSystem=s,this.logger.debug("ruler:units",{system:s}),this.emitToolEvent("tool:ruler:units-changed",{previous:n,current:s}),this.syncMeasurementModalState(),this.rebuildRulerControl()}buildDrawOptions(s,n){var r;const l={polygon:s.polygon?{allowIntersection:(r=this.options.map.polygonAllowIntersection)!=null?r:!1,showArea:!0,shapeOptions:{color:"#3388ff"}}:!1,polyline:s.polyline?{shapeOptions:{color:"#3388ff"}}:!1,rectangle:s.rectangle?{shapeOptions:{color:"#3388ff"}}:!1,circle:s.circle?{shapeOptions:{color:"#3388ff"}}:!1,cake:s.cake?{shapeOptions:{color:"#8A2BE2",fillOpacity:.2}}:!1,marker:s.marker?this.buildMarkerDrawOptions():!1,move:s.move?{featureGroup:this.drawnItems}:!1};let i={featureGroup:this.drawnItems};return s.edit?s.delete===!1&&(i.remove=!1):i=!1,n?{draw:!1,edit:!1}:{draw:l,edit:i}}buildMarkerDrawOptions(){return this.markerIcon?{icon:this.markerIcon}:{}}createMarkerIcon(s){return s?this.L.icon({iconUrl:s.iconUrl,iconRetinaUrl:s.iconRetinaUrl,shadowUrl:s.shadowUrl,iconSize:s.iconSize,iconAnchor:s.iconAnchor,popupAnchor:s.popupAnchor}):null}createDefaultMarkerIcon(){var n;const s=(n=this.L.Icon)==null?void 0:n.Default;return s?new s:null}createGeoJSONLayers(s){return this.L.geoJSON(s,{pointToLayer:(n,l)=>this.markerIcon?this.L.marker(l,{icon:this.markerIcon}):this.L.marker(l),onEachFeature:(n,l)=>{const i=ke(n);i&&(l._fid=i)}})}addGeoJSONLayersToDrawnItems(s){this.drawnItems&&s.eachLayer(n=>{this.drawnItems.addLayer(n),this.installVertexContextMenu(n)})}restoreVisibleLayersFromStore(){if(!this.drawnItems)return;const s=this.store.toFeatureCollection();if(s.features.length===0)return;const n=this.createGeoJSONLayers(s);this.addGeoJSONLayersToDrawnItems(n)}syncDrawMarkerOptions(){var l,i,r,h;const s=this.drawControl;if(!s)return;const n=this.buildMarkerDrawOptions();(l=s.options)!=null||(s.options={}),(r=(i=s.options).draw)!=null||(i.draw={}),s.options.draw.marker=n,(h=s.setDrawingOptions)==null||h.call(s,{marker:n})}reapplyMarkerIconsToExistingLayers(){if(!this.drawnItems)return;const s=this.markerIcon?null:this.createDefaultMarkerIcon();this.drawnItems.eachLayer(n=>{if(!(typeof(n==null?void 0:n.setIcon)!="function"||typeof(n==null?void 0:n.getLatLng)!="function")){if(this.markerIcon){n.setIcon(this.markerIcon);return}s&&n.setIcon(s)}})}applyToolButtonCustomizations(){ni(this.container,this.toolButtonConfig,{toolbarGroups:this.toolbarGroups,onTrigger:(s,n)=>{if(n.activate){this.activateTool(s,{source:n.source,groupId:n.groupId});return}this.emitToolTrigger({tool:s,source:n.source,groupId:n.groupId,handled:!0})}}),setTimeout(()=>{ni(this.container,this.toolButtonConfig,{toolbarGroups:this.toolbarGroups,onTrigger:(s,n)=>{if(n.activate){this.activateTool(s,{source:n.source,groupId:n.groupId});return}this.emitToolTrigger({tool:s,source:n.source,groupId:n.groupId,handled:!0})}})},0)}emitToolTrigger(s){var n,l;(l=(n=this.options.callbacks)==null?void 0:n.onToolTrigger)==null||l.call(n,{...s,timestamp:Date.now()})}findLeafletDrawHandler(s){var h,d,p,m,g,y,w,T,E,A;const n={polygon:"polygon",polyline:"polyline",rectangle:"rectangle",circle:"circle",marker:"marker",layerCake:"cake",move:"move"},l={edit:"edit",delete:"remove"},i=n[s];if(i)return(g=(m=(p=(d=(h=this.drawControl)==null?void 0:h._toolbars)==null?void 0:d.draw)==null?void 0:p._modes)==null?void 0:m[i])==null?void 0:g.handler;const r=l[s];return r?(A=(E=(T=(w=(y=this.drawControl)==null?void 0:y._toolbars)==null?void 0:w.edit)==null?void 0:T._modes)==null?void 0:E[r])==null?void 0:A.handler:null}disableActiveToolHandlers(){var n;const s=(n=this.drawControl)==null?void 0:n._toolbars;s&&Object.values(s).forEach(l=>{var i;Object.values((i=l==null?void 0:l._modes)!=null?i:{}).forEach(r=>{const h=r==null?void 0:r.handler;h&&typeof h.disable=="function"&&h.disable()})})}triggerRulerTool(){const s=this.rulerControl;if(typeof(s==null?void 0:s._toggleMeasure)=="function")return s._toggleMeasure(),!0;const n=this.container.querySelector(".leaflet-ruler");return n?(n.click(),!0):!1}applyLayerCakeToolbarIcon(){if(!this.container)return;const s=()=>{const n=this.container.querySelector("a.leaflet-draw-draw-cake");if(!n)return;n.style.setProperty("background-image","none","important"),n.style.setProperty("background-color","#fff","important"),n.style.setProperty("position","relative","important");let l=n.querySelector(".leaflet-geokit-cake-icon");l||(l=document.createElement("span"),l.className="leaflet-geokit-cake-icon",l.setAttribute("aria-hidden","true"),n.appendChild(l)),l.style.setProperty("position","absolute","important"),l.style.setProperty("display","block","important"),l.style.setProperty("left","50%","important"),l.style.setProperty("top","50%","important"),l.style.setProperty("width","18px","important"),l.style.setProperty("height","18px","important"),l.style.setProperty("transform","translate(-50%, -50%)","important"),l.style.setProperty("pointer-events","none","important"),l.firstElementChild||(l.innerHTML=Kr);const i=l.firstElementChild;i&&(i.style.setProperty("width","100%","important"),i.style.setProperty("height","100%","important"),i.style.setProperty("display","block","important"))};s(),setTimeout(s,0)}applyMoveToolbarIcon(){if(!this.container)return;const s=()=>{const n=this.container.querySelector("a.leaflet-draw-draw-move");if(!n)return;n.style.setProperty("background-image","none","important"),n.style.setProperty("background-color","#fff","important"),n.style.setProperty("position","relative","important");let l=n.querySelector(".leaflet-geokit-move-icon");l||(l=document.createElement("span"),l.className="leaflet-geokit-move-icon",l.setAttribute("aria-hidden","true"),n.appendChild(l)),l.style.setProperty("position","absolute","important"),l.style.setProperty("display","block","important"),l.style.setProperty("left","50%","important"),l.style.setProperty("top","50%","important"),l.style.setProperty("width","18px","important"),l.style.setProperty("height","18px","important"),l.style.setProperty("transform","translate(-50%, -50%)","important"),l.style.setProperty("pointer-events","none","important"),l.firstElementChild||(l.innerHTML=Xr);const i=l.firstElementChild;i&&(i.style.setProperty("width","100%","important"),i.style.setProperty("height","100%","important"),i.style.setProperty("display","block","important"))};s(),setTimeout(s,0)}addRulerControl(){if(!this.map)return;this.installRulerPrecisionPatch();const s=as(this.measurementSystem);this.rulerControl=this.L.control.ruler(s),this.map.addControl(this.rulerControl)}installRulerPrecisionPatch(){if(_o)return;const s=this.L.Control.Ruler;if(!s||typeof s!="function")return;const n=s.prototype,l=n._calculateBearingAndDistance;if(typeof l!="function")return;const i=this.logger;n._calculateBearingAndDistance=function(){var h,d,p;l.call(this);try{const m=this._clickedLatLong,g=(h=this._movingLatLong)!=null?h:this._clickedLatLong;if(!m||!g)return;const{meters:y,bearingDegrees:w}=es(m.lat,m.lng,g.lat,g.lng),T=y/1e3,E=typeof((p=(d=this.options)==null?void 0:d.lengthUnit)==null?void 0:p.factor)=="number"?this.options.lengthUnit.factor:1,A=di(T*E);this._result=this._result||{},this._result.Distance=A,this._result.Bearing=w,this._result.meters=y}catch(m){i==null||i.warn("ruler:precision-patch",m)}},_o=!0}rebuildRulerControl(){if(!(!this.map||!this.options.controls.ruler)){if(this.rulerControl){try{this.map.removeControl(this.rulerControl)}catch(s){this.logger.warn("ruler:remove-failed",s)}this.rulerControl=null}this.addRulerControl()}}installMeasurementSettingsControl(){if(!this.map||this.measurementControl)return;const s=this,n=this.L.Control.extend({options:{position:"topleft"},onAdd(){const l=s.L.DomUtil.create("div","leaflet-bar leaflet-ruler-settings-control"),i=s.L.DomUtil.create("button","leaflet-ruler-settings-button",l);return i.type="button",i.title="Measurement settings",i.setAttribute("aria-label","Measurement settings"),i.addEventListener("click",r=>{r.preventDefault(),r.stopPropagation(),s.toggleMeasurementModal(!0)}),s.L.DomEvent.disableClickPropagation(l),s.L.DomEvent.disableScrollPropagation(l),l}});this.measurementControl=new n,this.map.addControl(this.measurementControl)}ensureMeasurementModal(){if(this.measurementModalOverlay)return this.measurementModalOverlay;if(typeof document=="undefined")throw new Error("Measurement modal requires a browser environment");const s=document.createElement("div");s.className="leaflet-ruler-modal-overlay",s.setAttribute("aria-hidden","true");const n=document.createElement("div");n.className="leaflet-ruler-modal",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.tabIndex=-1,s.addEventListener("click",p=>{p.target===s&&this.toggleMeasurementModal(!1)});const l=document.createElement("h2");l.className="leaflet-ruler-modal-title",l.textContent="Measurement Units",n.appendChild(l);const i=document.createElement("p");i.className="leaflet-ruler-modal-description",i.textContent="Choose how the measurement tool reports distances.",n.appendChild(i);const r=document.createElement("div");r.className="leaflet-ruler-modal-options",n.appendChild(r),["metric","imperial"].forEach(p=>{const m=document.createElement("label");m.className="leaflet-ruler-modal-option";const g=document.createElement("input");g.type="radio",g.name="leaflet-ruler-units",g.value=p,g.addEventListener("change",()=>{g.checked&&this.setRulerUnits(p)});const y=document.createElement("span");y.textContent=ls[p],m.appendChild(g),m.appendChild(y),r.appendChild(m),this.measurementModalRadios[p]=g});const h=document.createElement("div");h.className="leaflet-ruler-modal-actions";const d=document.createElement("button");return d.type="button",d.className="leaflet-ruler-modal-close",d.textContent="Close",d.addEventListener("click",()=>this.toggleMeasurementModal(!1)),h.appendChild(d),n.appendChild(h),s.appendChild(n),this.container.appendChild(s),this.measurementModalOverlay=s,this.measurementModalDialog=n,this.syncMeasurementModalState(),s}toggleMeasurementModal(s){var l;if(!s){this.measurementModalOverlay&&(this.measurementModalOverlay.classList.remove("is-open"),this.measurementModalOverlay.setAttribute("aria-hidden","true")),this.detachMeasurementModalKeydown();return}const n=this.ensureMeasurementModal();n.classList.add("is-open"),n.setAttribute("aria-hidden","false"),this.syncMeasurementModalState(),this.attachMeasurementModalKeydown(),(l=this.measurementModalDialog)==null||l.focus()}syncMeasurementModalState(){for(const[s,n]of Object.entries(this.measurementModalRadios))n&&(n.checked=s===this.measurementSystem)}removeMeasurementModal(){this.measurementModalOverlay&&this.measurementModalOverlay.remove(),this.measurementModalOverlay=null,this.measurementModalDialog=null,this.measurementModalRadios={},this.detachMeasurementModalKeydown()}attachMeasurementModalKeydown(){this.measurementModalKeydownHandler||typeof document=="undefined"||(this.measurementModalKeydownHandler=s=>{s.key==="Escape"&&this.toggleMeasurementModal(!1)},document.addEventListener("keydown",this.measurementModalKeydownHandler))}detachMeasurementModalKeydown(){!this.measurementModalKeydownHandler||typeof document=="undefined"||(document.removeEventListener("keydown",this.measurementModalKeydownHandler),this.measurementModalKeydownHandler=null)}installPolygonFinishPatch(){var h,d,p,m,g;if(!this.map||!this.drawControl)return;try{(h=this.detachPolygonFinishPatch)==null||h.call(this)}catch{}this.detachPolygonFinishPatch=null;const s=this.map,n=(p=(d=this.drawControl)==null?void 0:d._toolbars)==null?void 0:p.draw;if(!n||!!!((g=(m=n._modes)==null?void 0:m.polygon)!=null&&g.handler))return;const i=10,r=y=>{var w,T,E,A,N,F,P,I;try{const G=(T=(w=n._modes)==null?void 0:w.polygon)==null?void 0:T.handler;if(!G||!G._enabled)return;const j=G._markers;if(!Array.isArray(j)||j.length<3)return;const q=(A=(E=j[0])==null?void 0:E.getLatLng)==null?void 0:A.call(E);if(!q)return;const rt=s.latLngToContainerPoint(q),st=s.latLngToContainerPoint(y.latlng);Math.hypot(rt.x-st.x,rt.y-st.y)<=i&&typeof G._finishShape=="function"&&((F=(N=y.originalEvent)==null?void 0:N.preventDefault)==null||F.call(N),(I=(P=y.originalEvent)==null?void 0:P.stopPropagation)==null||I.call(P),G._finishShape())}catch(G){this._error("polygon-finish-patch",G)}};s.on("click",r),this.detachPolygonFinishPatch=()=>{try{s.off("click",r)}catch{}}}patchLeafletDrawBugs(){var s,n,l,i,r;try{const h=this.L,d=h.GeometryUtil;if(!d)return;const p={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2},m=(n=(s=d.formattedNumber)==null?void 0:s.bind(d))!=null?n:((g,y)=>Number(g).toFixed(y));d.readableArea=(g,y,w)=>{var A;const T=(A=h.Util)!=null&&A.extend?h.Util.extend({},p,w||{}):{...p,...w||{}};let E;if(y){let N=["ha","m"];const F=typeof y;F==="string"?N=[y]:F!=="boolean"&&(N=Array.isArray(y)?y:N),g>=1e6&&N.indexOf("km")!==-1?E=`${m(1e-6*g,T.km)} km²`:g>=1e4&&N.indexOf("ha")!==-1?E=`${m(1e-4*g,T.ha)} ha`:E=`${m(g,T.m)} m²`}else g=g/.836127,g>=3097600?E=`${m(g/3097600,T.mi)} mi²`:g>=4840?E=`${m(g/4840,T.ac)} acres`:E=`${m(g,T.yd)} yd²`;return E}}catch(h){this.logger.warn("leaflet-draw-patch:readableArea",h)}try{const h=this.L,d=(l=h.Edit)==null?void 0:l.Circle,p=(i=h.Draw)==null?void 0:i.Event,m=h.GeometryUtil;if(!((r=d==null?void 0:d.prototype)!=null&&r._resize)||!p||!m)return;d.prototype._resize=function(y){var E,A,N;const w=this._moveMarker.getLatLng(),T=m.isVersion07x()?w.distanceTo(y):this._map.distance(w,y);this._shape.setRadius(T);try{(E=this._map)!=null&&E.editTooltip&&((N=(A=this._map)==null?void 0:A._editTooltip)!=null&&N.updateContent)&&this._map._editTooltip.updateContent({text:h.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+h.drawLocal.edit.handlers.edit.tooltip.text,subtext:h.drawLocal.draw.handlers.circle.radius+": "+m.readableDistance(T,!0,this.options.feet,this.options.nautic)})}catch{}this._map.fire(p.EDITRESIZE,{layer:this._shape})}}catch(h){this.logger.warn("leaflet-draw-patch:circle-resize",h)}}bindDrawEvents(){!this.map||!this.drawnItems||(this.map.on(this.L.Draw.Event.CREATED,s=>{var n,l,i;try{const{layer:r,layerType:h}=s;if(h===Te.TYPE){try{(n=this.activeCakeSession)==null||n.destroy()}catch{}this.activeCakeSession=new Yr(this.map,r,y=>{if(!this.drawnItems)return;const w=this.store.add(y),T=this.L.geoJSON(y);let E=0;T.eachLayer(A=>{var F,P,I;const N=(F=w[E])!=null?F:w[w.length-1];A._fid=N,this.drawnItems.addLayer(A),this.installVertexContextMenu(A),(I=(P=this.options.callbacks)==null?void 0:P.onCreated)==null||I.call(P,{id:N,layerType:"polygon",geoJSON:A.toGeoJSON()}),E++}),this.activeCakeSession=null,this.emitToolEvent("tool:layer-cake:saved",{featureCollection:y})},this.measurementSystem),this.emitToolEvent("tool:layer-cake:session-started",{center:r.getLatLng(),radius:r.getRadius()});return}this.drawnItems.addLayer(r);const d=r.toGeoJSON(),m=this.store.add({type:"FeatureCollection",features:[d]})[0];r._fid=m,this.installVertexContextMenu(r),(i=(l=this.options.callbacks)==null?void 0:l.onCreated)==null||i.call(l,{id:m,layerType:h,geoJSON:d});const g=hs[h];g&&this.emitToolEvent(g,{id:m,geoJSON:d})}catch(r){this._error("onCreated handler failed",r)}}),this.map.on(this.L.Draw.Event.EDITED,s=>{var n,l;try{const i=[];s.layers.eachLayer(d=>{const p=d.toGeoJSON(),m=d._fid;if(m)this.store.update(m,p),i.push(m);else{const g=this.store.add({type:"FeatureCollection",features:[p]})[0];d._fid=g,i.push(g)}});const h=this.store.toFeatureCollection();(l=(n=this.options.callbacks)==null?void 0:n.onEdited)==null||l.call(n,{ids:i,geoJSON:h}),this.emitToolEvent("tool:edit:applied",{ids:i,geoJSON:h})}catch(i){this._error("onEdited handler failed",i)}}),this.map.on(this.L.Draw.Event.DELETED,s=>{var n,l;try{const i=[];s.layers.eachLayer(d=>{const p=d._fid;p&&(i.push(p),this.store.remove(p))});const h=this.store.toFeatureCollection();(l=(n=this.options.callbacks)==null?void 0:n.onDeleted)==null||l.call(n,{ids:i,geoJSON:h}),this.emitToolEvent("tool:delete:applied",{ids:i,geoJSON:h})}catch(i){this._error("onDeleted handler failed",i)}}),this.map.on("draw:moveend",s=>{var n;try{this.emitToolEvent("tool:move:pending",{layerId:(n=s==null?void 0:s.layer)==null?void 0:n._fid,originalGeoJSON:s==null?void 0:s.originalGeoJSON,newGeoJSON:s==null?void 0:s.newGeoJSON}),this.showMoveConfirmationUI(s.layer)}catch(l){this._error("draw:moveend handler failed",l)}}),this.map.on("draw:moveconfirmed",s=>{var n,l,i;try{this.emitToolEvent("tool:move:confirmed",{layerId:(n=s==null?void 0:s.layer)==null?void 0:n._fid,originalGeoJSON:s==null?void 0:s.originalGeoJSON,newGeoJSON:s==null?void 0:s.newGeoJSON});const r=s.layer,h=r._fid;if(h){const d=r.toGeoJSON();this.store.update(h,d),(i=(l=this.options.callbacks)==null?void 0:l.onEdited)==null||i.call(l,{ids:[h],geoJSON:this.store.toFeatureCollection()})}this.hideMoveConfirmationUI()}catch(r){this._error("draw:moveconfirmed handler failed",r)}}))}_error(s,n,l){var r,h,d,p;const i={code:(r=l==null?void 0:l.code)!=null?r:"controller_error",message:s,recoverable:(h=l==null?void 0:l.recoverable)!=null?h:!0,cause:n,timestamp:Date.now()};this.logger.error("error",i),(p=(d=this.options.callbacks)==null?void 0:d.onError)==null||p.call(d,i)}installVertexEditSurfaceMenu(){var i;if(!this.map)return;try{(i=this.vertexEditSurfaceCleanup)==null||i.call(this)}catch{}const s=this.map.getContainer(),n=r=>{this.openNearestEditableVertexMenuFromDomEvent(r)},l=r=>{(r.ctrlKey||r.metaKey)&&this.openNearestEditableVertexMenuFromDomEvent(r)};s.addEventListener("contextmenu",n,{capture:!0}),s.addEventListener("click",l,{capture:!0}),this.vertexEditSurfaceCleanup=()=>{s.removeEventListener("contextmenu",n,{capture:!0}),s.removeEventListener("click",l,{capture:!0})}}openNearestEditableVertexMenuFromDomEvent(s){try{if(!this.map||!this.drawnItems)return;const n=this.map.mouseEventToContainerPoint(s),l=this.map.containerPointToLatLng(n);let i=null;if(this.drawnItems.eachLayer(r=>{if(i)return;const h=r.editing;if(!(h&&typeof h.enabled=="function"&&h.enabled()))return;const p=this.findNearestVertex(r,l,16);p&&(i={layer:r,...p})}),!i)return;s.preventDefault(),s.stopPropagation(),this.showVertexMenu(n,async()=>{await this.deleteVertex(i.layer,i.pathIndex,i.vertexIndex)})}catch(n){this._error("openNearestEditableVertexMenuFromDomEvent",n)}}installVertexContextMenu(s){if(!s||typeof s.on!="function")return;const n=i=>{var r,h,d,p;try{(h=(r=i==null?void 0:i.originalEvent)==null?void 0:r.preventDefault)==null||h.call(r),(p=(d=i==null?void 0:i.originalEvent)==null?void 0:d.stopPropagation)==null||p.call(d)}catch{}this.openVertexMenu(s,i)},l=i=>{const r=i==null?void 0:i.originalEvent;r&&(r.ctrlKey||r.metaKey)&&this.openVertexMenu(s,i)};try{s.on("contextmenu",n),s.on("click",l)}catch{}}openVertexMenu(s,n){try{if(!this.map||!(typeof s.getLatLngs=="function"&&(s instanceof this.L.Polygon||s instanceof this.L.Polyline)))return;const i=s.editing;if(!i||typeof i.enabled!="function"||!i.enabled())return;const r=n==null?void 0:n.latlng,h=this.map.latLngToContainerPoint(r),d=this.findNearestVertex(s,r,12);if(!d)return;this.showVertexMenu(h,async()=>{await this.deleteVertex(s,d.pathIndex,d.vertexIndex)})}catch(l){this._error("openVertexMenu",l)}}showVertexMenu(s,n){var l;try{try{(l=this.vertexMenuCleanup)==null||l.call(this)}catch{}if(this.vertexMenuCleanup=null,!this.container)return;const i=document.createElement("div");i.style.position="absolute",i.style.top=`${s.y}px`,i.style.left=`${s.x}px`,i.style.transform="translate(-50%, -100%)",i.style.background="#fff",i.style.border="1px solid rgba(0,0,0,0.15)",i.style.borderRadius="6px",i.style.boxShadow="0 4px 12px rgba(0,0,0,0.15)",i.style.padding="6px",i.style.zIndex="10000",i.style.fontSize="12px",i.style.userSelect="none";const r=document.createElement("button");r.textContent="Delete vertex",r.style.padding="6px 10px",r.style.border="none",r.style.background="#da1e28",r.style.color="#fff",r.style.borderRadius="4px",r.style.cursor="pointer",r.addEventListener("click",p=>{p.stopPropagation(),p.preventDefault();try{n()}finally{h()}}),i.appendChild(r);const h=()=>{try{window.removeEventListener("pointerdown",d),this.container.removeEventListener("scroll",h,!0),i.remove()}catch{}this.vertexMenuEl=null,this.vertexMenuCleanup=null},d=p=>{!(typeof p.composedPath=="function"?p.composedPath():[]).includes(i)&&!i.contains(p.target)&&h()};window.addEventListener("pointerdown",d,{capture:!0}),this.container.addEventListener("scroll",h,!0),this.container.appendChild(i),this.vertexMenuEl=i,this.vertexMenuCleanup=h}catch(i){this._error("showVertexMenu",i)}}findNearestVertex(s,n,l){if(!this.map)return null;const i=w=>this.map.latLngToContainerPoint(w),r=(w,T)=>Math.hypot(w.x-T.x,w.y-T.y),h=i(n);let d=1/0,p=-1,m=-1;const g=s.getLatLngs();return(Array.isArray(g[0])?g:[g]).forEach((w,T)=>{w.forEach((E,A)=>{const N=i(E),F=r(N,h);F<d&&(d=F,p=T,m=A)})}),p===-1||d>l?null:{pathIndex:p,vertexIndex:m}}async deleteVertex(s,n,l){var i,r,h;try{if(!(typeof s.getLatLngs=="function"&&(s instanceof this.L.Polygon||s instanceof this.L.Polyline)))return;const p=s.getLatLngs(),m=Array.isArray(p[0])?p:[p],g=m[n];if(!g)return;const w=s instanceof this.L.Polygon?3:2;if(g.length<=w)return;if(g.splice(l,1),m.length===1)s.setLatLngs(g);else{const E=m.map((A,N)=>N===n?g:A);s.setLatLngs(E)}(i=s.redraw)==null||i.call(s);const T=s._fid;if(T){const E=s.toGeoJSON();this.store.update(T,E),(h=(r=this.options.callbacks)==null?void 0:r.onEdited)==null||h.call(r,{ids:[T],geoJSON:this.store.toFeatureCollection()})}}catch(d){this._error("deleteVertex",d)}}showMoveConfirmationUI(s){var n,l;try{if(this.hideMoveConfirmationUI(),!this.container||!this.map)return;const i=this.drawControl;if(!i)return;const r=(n=i==null?void 0:i._toolbars)==null?void 0:n.draw;if(!r)return;const h=r._modes||{};let d=null;for(const y in h){const w=h[y];if(((l=w==null?void 0:w.handler)==null?void 0:l.type)==="move"){d=w.handler;break}}this.activeMoveHandler=d;const p=document.createElement("div");p.style.position="absolute",p.style.bottom="60px",p.style.left="50%",p.style.transform="translateX(-50%)",p.style.display="flex",p.style.gap="8px",p.style.background="#fff",p.style.border="2px solid #3388ff",p.style.borderRadius="8px",p.style.padding="12px 16px",p.style.boxShadow="0 4px 12px rgba(0,0,0,0.2)",p.style.zIndex="10000",p.style.fontSize="14px",p.style.fontFamily="system-ui, sans-serif";const m=document.createElement("button");m.textContent="✓ Save",m.style.padding="8px 16px",m.style.border="none",m.style.background="#28a745",m.style.color="#fff",m.style.borderRadius="4px",m.style.cursor="pointer",m.style.fontWeight="600",m.style.fontSize="14px",m.addEventListener("click",y=>{y.stopPropagation(),y.preventDefault(),d!=null&&d.confirmMove&&d.confirmMove()});const g=document.createElement("button");g.textContent="✕ Cancel",g.style.padding="8px 16px",g.style.border="1px solid #ccc",g.style.background="#fff",g.style.color="#333",g.style.borderRadius="4px",g.style.cursor="pointer",g.style.fontWeight="600",g.style.fontSize="14px",g.addEventListener("click",y=>{y.stopPropagation(),y.preventDefault(),this.emitToolEvent("tool:move:cancelled",{layerId:s==null?void 0:s._fid}),d!=null&&d.cancelMove&&d.cancelMove(),this.hideMoveConfirmationUI()}),p.appendChild(m),p.appendChild(g),this.container.appendChild(p),this.moveConfirmationUI=p,this.logger.debug("showMoveConfirmationUI",{layerId:s._fid})}catch(i){this._error("showMoveConfirmationUI",i)}}hideMoveConfirmationUI(){try{this.moveConfirmationUI&&(this.moveConfirmationUI.remove(),this.moveConfirmationUI=null),this.activeMoveHandler=null}catch(s){this._error("hideMoveConfirmationUI",s)}}}const go=[25,41],vo=[12,41],yo=[1,-34];function Vt(u,s){var l,i,r,h;if(u==null)return null;const n=typeof u=="string"?u.trim():"";if(!n)return(l=s.reportError)==null||l.call(s,s.errorMessage,s.cause),null;try{return new URL(n,(i=s.baseUrl)!=null?i:document.baseURI).toString()}catch(d){return(h=s.reportError)==null||h.call(s,s.errorMessage,(r=s.cause)!=null?r:d),null}}function fi(u,s,n){var p,m;if(u==null)return[...s];if(!Array.isArray(u)||u.length!==2)return(p=n.reportError)==null||p.call(n,n.errorMessage,n.cause),[...s];const[l,i]=u,r=Number(l),h=Number(i);return Number.isFinite(r)&&Number.isFinite(h)&&(!n.positiveOnly||r>0&&h>0)?[r,h]:((m=n.reportError)==null||m.call(n,n.errorMessage,n.cause),[...s])}function pi(u,s,n){var p,m,g,y,w;if(u==null)return[...s];const l=typeof u=="string"?u.trim():"";if(!l)return(p=n.reportError)==null||p.call(n,n.errorMessage,n.cause),[...s];const i=l.split(",");if(i.length!==2)return(m=n.reportError)==null||m.call(n,n.errorMessage,n.cause),[...s];const r=Number((g=i[0])==null?void 0:g.trim()),h=Number((y=i[1])==null?void 0:y.trim());return Number.isFinite(r)&&Number.isFinite(h)&&(!n.positiveOnly||r>0&&h>0)?[r,h]:((w=n.reportError)==null||w.call(n,n.errorMessage,n.cause),[...s])}function ds(u,s={}){var r,h;if(!u||typeof u!="object")return null;const n=Vt(u.iconUrl,{...s,errorMessage:"Invalid marker icon config: iconUrl must be a valid URL",cause:{field:"iconUrl",value:u.iconUrl}});if(!n)return null;const l=(r=Vt(u.iconRetinaUrl,{...s,errorMessage:"Invalid marker icon config: iconRetinaUrl must be a valid URL",cause:{field:"iconRetinaUrl",value:u.iconRetinaUrl}}))!=null?r:n,i=(h=Vt(u.shadowUrl,{...s,errorMessage:"Invalid marker icon config: shadowUrl must be a valid URL",cause:{field:"shadowUrl",value:u.shadowUrl}}))!=null?h:void 0;return{iconUrl:n,iconRetinaUrl:l,shadowUrl:i,iconSize:fi(u.iconSize,go,{...s,positiveOnly:!0,errorMessage:"Invalid marker icon config: iconSize must be a [width, height] tuple of positive finite numbers",cause:{field:"iconSize",value:u.iconSize}}),iconAnchor:fi(u.iconAnchor,vo,{...s,errorMessage:"Invalid marker icon config: iconAnchor must be a [x, y] tuple of finite numbers",cause:{field:"iconAnchor",value:u.iconAnchor}}),popupAnchor:fi(u.popupAnchor,yo,{...s,errorMessage:"Invalid marker icon config: popupAnchor must be a [x, y] tuple of finite numbers",cause:{field:"popupAnchor",value:u.popupAnchor}})}}function us(u,s={}){var r,h;const n=Vt(u.iconUrl,{...s,errorMessage:'Invalid "marker-icon-url" attribute; falling back to default markers',cause:{attribute:"marker-icon-url",value:u.iconUrl}});if(!n)return null;const l=(r=Vt(u.iconRetinaUrl,{...s,errorMessage:'Invalid "marker-icon-retina-url" attribute; using "marker-icon-url" instead',cause:{attribute:"marker-icon-retina-url",value:u.iconRetinaUrl}}))!=null?r:n,i=(h=Vt(u.shadowUrl,{...s,errorMessage:'Invalid "marker-shadow-url" attribute; dropping the custom marker shadow',cause:{attribute:"marker-shadow-url",value:u.shadowUrl}}))!=null?h:void 0;return{iconUrl:n,iconRetinaUrl:l,shadowUrl:i,iconSize:pi(u.iconSize,go,{...s,positiveOnly:!0,errorMessage:'Invalid "marker-icon-size" attribute; using the default marker size',cause:{attribute:"marker-icon-size",value:u.iconSize}}),iconAnchor:pi(u.iconAnchor,vo,{...s,errorMessage:'Invalid "marker-icon-anchor" attribute; using the default marker anchor',cause:{attribute:"marker-icon-anchor",value:u.iconAnchor}}),popupAnchor:pi(u.popupAnchor,yo,{...s,errorMessage:'Invalid "marker-popup-anchor" attribute; using the default popup anchor',cause:{attribute:"marker-popup-anchor",value:u.popupAnchor}})}}const It={osm:{urlTemplate:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',maxZoom:19,subdomains:["a","b","c"]},here:{styles:{"lite.day":"lite.day","normal.day":"normal.day","satellite.day":"satellite.day"},defaultStyle:"lite.day",attribution:'Map Tiles &copy; <a href="https://www.here.com">HERE</a>',maxZoom:20}};function Lo(u){return typeof u=="string"?u.trim().toLowerCase():""}function bo(u){if(typeof u!="string")return;const s=u.trim();return s.length>0?s:void 0}function fs(u){const{style:s,attribution:n}=u,l=Lo(u.provider),i=bo(u.apiKey);switch(l){case"osm":return{urlTemplate:It.osm.urlTemplate,attribution:n||It.osm.attribution,maxZoom:It.osm.maxZoom,subdomains:[...It.osm.subdomains]};case"here":{if(!i)throw new Error("HERE Maps requires an API key");const r=typeof s=="string"?s.trim():"",h=r&&r in It.here.styles?r:It.here.defaultStyle;return{urlTemplate:`https://maps.hereapi.com/v3/base/mc/{z}/{x}/{y}/png8?style=${encodeURIComponent(h)}&apiKey=${encodeURIComponent(i)}`,attribution:n||It.here.attribution,maxZoom:It.here.maxZoom,subdomains:void 0}}default:throw new Error(`Unknown tile provider: ${u.provider}`)}}function ps(u){const s=Lo(u.provider),n=bo(u.apiKey);return s?s==="here"&&!n?{valid:!1,error:"HERE Maps requires an API key"}:{valid:!0}:{valid:!1,error:"Provider is required"}}class mi extends HTMLElement{constructor(){super();k(this,"_root");k(this,"_container");k(this,"_logger",be("component:leaflet-geokit","debug"));k(this,"_latitude",0);k(this,"_longitude",0);k(this,"_zoom",2);k(this,"_minZoom");k(this,"_maxZoom");k(this,"_tileUrl","https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png");k(this,"_tileAttribution");k(this,"_tileProvider");k(this,"_tileStyle");k(this,"_apiKey");k(this,"_activeTileProvider","tile-url");k(this,"_readOnly",!1);k(this,"_logLevel","debug");k(this,"_devOverlay",!1);k(this,"_polygonAllowIntersection",!1);k(this,"_preferCanvas",!0);k(this,"_themeUrl");k(this,"_themeCss","");k(this,"_themeLinkEl",null);k(this,"_themeStyleEl",null);k(this,"_controller",null);k(this,"_useExternalLeaflet",!1);k(this,"_skipLeafletStyles",!1);k(this,"_leafletInstance");k(this,"_toolHooks");k(this,"_toolEventEmitter");k(this,"_markerIconConfig");k(this,"_toolButtonConfig");k(this,"_toolbarGroups");k(this,"_status",{state:"uninitialized",ready:!1,busy:!1,featureCount:0,timestamp:Date.now()});k(this,"_externalToolTriggerListener",n=>{var i,r;const l=n.detail;if((l==null?void 0:l.action)==="deactivate"||(l==null?void 0:l.active)===!1){this.deactivateTool({source:(i=l.source)!=null?i:"event",groupId:l.groupId});return}l!=null&&l.tool&&this.activateTool(l.tool,{source:(r=l.source)!=null?r:"event",groupId:l.groupId})});k(this,"_externalToolDeactivateListener",n=>{var i;const l=n.detail;this.deactivateTool({source:(i=l==null?void 0:l.source)!=null?i:"event",groupId:l==null?void 0:l.groupId})});this._root=this.attachShadow({mode:"open"}),this._root.innerHTML=`
289
+ `,po=6378137,Ft=6356752314245e-6,Bt=1/298.257223563,Qr=Math.PI/180,$r=180/Math.PI,Te=1e9;function ta(u){const a=BigInt(Math.round(u*Te));return Number(a)/Te}function Gt(u){return ta(u)*Qr}function mo(u){const a=u*$r%360;return a<0?a+360:a}function di(u){const a=BigInt(Math.round(u*Te));return Number(a)/Te}function ea(u,a,n,h){const i=ia(u,a,n,h);if(i.converged)return{meters:di(i.distanceMeters),bearingDegrees:mo(i.bearingRad),algorithm:"vincenty",iterations:i.iterations};const r=oa(u,a,n,h);return{meters:di(r.distanceMeters),bearingDegrees:mo(r.bearingRad),algorithm:"karney",iterations:i.iterations}}function ia(u,a,n,h){const i=Gt(u),r=Gt(n),l=Gt(h-a),d=Math.atan((1-Bt)*Math.tan(i)),p=Math.atan((1-Bt)*Math.tan(r)),m=Math.sin(d),_=Math.cos(d),y=Math.sin(p),w=Math.cos(p);let T=l,E=0,A=0;const N=200;let F=0,P=0,I=0,G=0,j=0;for(;Math.abs(T-E)>1e-12&&A<N;){const lt=Math.sin(T),Ie=Math.cos(T);if(F=Math.sqrt((w*lt)**2+(_*y-m*w*Ie)**2),F===0)return{distanceMeters:0,bearingRad:0,iterations:A,converged:!0};P=m*y+_*w*Ie,I=Math.atan2(F,P);const gt=_*w*lt/F;G=1-gt**2,j=G===0?0:P-2*m*y/G;const ne=Bt/16*G*(4+Bt*(4-3*G));E=T,T=l+(1-ne)*Bt*gt*(I+ne*F*(j+ne*P*(-1+2*j**2))),A+=1}if(A>=N)return{distanceMeters:Number.NaN,bearingRad:0,iterations:A,converged:!1};const q=(po**2-Ft**2)/Ft**2*G,rt=1+q/16384*(4096+q*(-768+q*(320-175*q))),at=q/1024*(256+q*(-128+q*(74-47*q))),Mt=at*F*(j+at/4*(P*(-1+2*j**2)-at/6*j*(-3+4*F**2)*(-3+4*j**2))),Se=Ft*rt*(I-Mt),st=Math.atan2(w*Math.sin(T),_*y-m*w*Math.cos(T));return{distanceMeters:Se,bearingRad:st,iterations:A,converged:!0}}function oa(u,a,n,h){const i=Gt(u),r=Gt(n),l=Gt(h-a),d=Math.atan((1-Bt)*Math.tan(i)),p=Math.atan((1-Bt)*Math.tan(r)),m=Math.sin(d),_=Math.cos(d),y=Math.sin(p),w=Math.cos(p),T=Math.sqrt((w*Math.sin(l))**2+(_*y-m*w*Math.cos(l))**2),E=m*y+_*w*Math.cos(l),A=Math.atan2(T,E);if(A===0)return{distanceMeters:0,bearingRad:0};const F=1-(_*w*Math.sin(l)/Math.sin(A))**2,P=F===0?0:E-2*m*y/F,I=(po**2-Ft**2)/Ft**2*F,G=1+I/16384*(4096+I*(-768+I*(320-175*I))),j=I/1024*(256+I*(-128+I*(74-47*I))),q=j*T*(P+j/4*(E*(-1+2*P**2)-j/6*P*(-3+4*T**2)*(-3+4*P**2))),rt=Ft*G*(A-q),at=Math.atan2(w*Math.sin(l),_*y-m*w*Math.cos(l));return{distanceMeters:rt,bearingRad:at}}const na={position:"topleft",circleMarker:{color:"red",radius:2},lineStyle:{color:"red",dashArray:"1,6"},angleUnit:{display:"°",decimal:2,factor:null,label:"Bearing:"}},ra={display:"km",decimal:2,factor:null,label:"Distance (km):"},aa={display:"mi",decimal:2,factor:.621371,label:"Distance (mi):"};function sa(u){const a=u==="imperial"?{...aa}:{...ra};return{...na,lengthUnit:a}}const la={metric:"Meters / Kilometers",imperial:"Feet / Miles"};function ui(u,a={}){var r,l;const n=!!((r=u==null?void 0:u.Control)!=null&&r.Draw),h=!!u.draw,i=n&&h;return i||(l=a.onError)==null||l.call(a,"Leaflet.draw is not available on the provided Leaflet instance"),i}let go=!1;const ha={polygon:"tool:polygon:created",polyline:"tool:polyline:created",rectangle:"tool:rectangle:created",circle:"tool:circle:created",marker:"tool:marker:created"};class ca{constructor(a){k(this,"container");k(this,"logger");k(this,"options");k(this,"L");k(this,"store");k(this,"map",null);k(this,"tileLayer",null);k(this,"drawnItems",null);k(this,"drawControl",null);k(this,"rulerControl",null);k(this,"measurementControl",null);k(this,"measurementSystem","metric");k(this,"measurementModalOverlay",null);k(this,"measurementModalDialog",null);k(this,"measurementModalRadios",{});k(this,"measurementModalKeydownHandler",null);k(this,"detachPolygonFinishPatch",null);k(this,"vertexMenuEl",null);k(this,"vertexMenuCleanup",null);k(this,"vertexEditSurfaceCleanup",null);k(this,"activeCakeSession",null);k(this,"moveConfirmationUI",null);k(this,"activeMoveHandler",null);k(this,"markerIconConfig",null);k(this,"markerIcon",null);k(this,"toolButtonConfig",null);k(this,"toolbarGroups",null);var n,h,i,r;this.options=a,this.container=a.container,this.logger=((n=a.logger)!=null?n:be("controller","debug")).child("map"),this.L=this.resolveLeaflet(a),this.store=new pr(this.logger.child("store")),this.setMarkerIconConfig((h=a.markerIconConfig)!=null?h:null,{reapplyExistingLayers:!1,syncDrawControl:!1}),this.toolButtonConfig=(i=a.toolButtonConfig)!=null?i:null,this.toolbarGroups=(r=a.toolbarGroups)!=null?r:null,this.logger.debug("ctor",{config:a.map,controls:a.controls,readOnly:a.readOnly,useExternalLeaflet:a.useExternalLeaflet}),Ur(this.L),Zr(this.L),Nr(this.L)}emitToolEvent(a,n){var i,r;try{(r=(i=this.options.toolHooks)==null?void 0:i[a])==null||r.call(i,n)}catch(l){this._error(`tool hook failed: ${a}`,l)}const h=this.options.toolEventEmitter;if(h)try{if(typeof h.emit=="function"){h.emit(a,n);return}typeof h.dispatchEvent=="function"&&h.dispatchEvent(new CustomEvent(a,{detail:n}))}catch(l){this._error(`tool emitter failed: ${a}`,l)}}setToolObservers(a){this.options.toolHooks=a.toolHooks,this.options.toolEventEmitter=a.toolEventEmitter}setMarkerIconConfig(a,n={}){const{reapplyExistingLayers:h=!0,syncDrawControl:i=!0}=n;this.options.markerIconConfig=a,this.markerIconConfig=a,this.markerIcon=this.createMarkerIcon(a),i&&this.syncDrawMarkerOptions(),h&&this.reapplyMarkerIconsToExistingLayers()}setToolButtonConfig(a){this.options.toolButtonConfig=a!=null?a:null,this.toolButtonConfig=a!=null?a:null,this.applyToolButtonCustomizations()}setToolbarGroups(a){this.options.toolbarGroups=a!=null?a:null,this.toolbarGroups=a!=null?a:null,this.applyToolButtonCustomizations()}activateTool(a,n={}){var i,r,l;const h=(i=n.source)!=null?i:"api";try{if(a==="select")return this.deactivateTool({source:h,groupId:n.groupId});if(a==="save"){const p=this.store.toFeatureCollection();return(l=(r=this.options.callbacks)==null?void 0:r.onSaved)==null||l.call(r,{geoJSON:p,featureCount:p.features.length}),this.emitToolEvent("tool:save",{geoJSON:p,featureCount:p.features.length}),this.emitToolTrigger({tool:a,source:h,groupId:n.groupId,handled:!0}),!0}if(a==="layerStyle")return this.emitToolTrigger({tool:a,source:h,groupId:n.groupId,handled:!0}),!0;if(a==="measurementSettings")return this.toggleMeasurementModal(!0),this.emitToolTrigger({tool:a,source:h,groupId:n.groupId,handled:!0}),!0;if(a==="ruler"){const p=this.triggerRulerTool();return this.emitToolTrigger({tool:a,source:h,groupId:n.groupId,handled:p,error:p?void 0:"Ruler control is not available"}),p}const d=this.findLeafletDrawHandler(a);return!d||typeof d.enable!="function"?(this.emitToolTrigger({tool:a,source:h,groupId:n.groupId,handled:!1,error:`Tool "${a}" is not available on this map`}),!1):(d.enable(),this.emitToolTrigger({tool:a,source:h,groupId:n.groupId,handled:!0}),!0)}catch(d){const p=`Failed to activate tool "${a}"`;return this._error(p,d),this.emitToolTrigger({tool:a,source:h,groupId:n.groupId,handled:!1,error:d instanceof Error?d.message:p}),!1}}triggerTool(a,n={}){return this.activateTool(a,n)}deactivateTool(a={}){var h;const n=(h=a.source)!=null?h:"api";try{return this.disableActiveToolHandlers(),this.toggleMeasurementModal(!1),this.emitToolTrigger({tool:"select",source:n,groupId:a.groupId,handled:!0}),!0}catch(i){const r="Failed to deactivate active map tools";return this._error(r,i),this.emitToolTrigger({tool:"select",source:n,groupId:a.groupId,handled:!1,error:i instanceof Error?i.message:r}),!1}}resolveLeaflet(a){if(!a.useExternalLeaflet)return we;if(a.leaflet&&ui(a.leaflet))return this.logger.debug("leaflet-runtime:external-injected"),a.leaflet;const h=globalThis.L;return h&&ui(h)?(this.logger.debug("leaflet-runtime:external-global"),h):(this.logger.warn("leaflet-runtime:external-fallback-bundled",{message:"External Leaflet requested but Draw APIs were missing; falling back to bundled Leaflet/Draw"}),we)}async init(){var n,h,i,r,l,d;const a=(h=(n=performance.now)==null?void 0:n.call(performance))!=null?h:Date.now();try{await this.destroy();const{latitude:p,longitude:m,zoom:_,minZoom:y,maxZoom:w,tileUrl:T,tileAttribution:E,preferCanvas:A=!0,useExternalLeaflet:N}=this.options.map,F=[p,m],P=this.L;N&&ui(P,{onError:rt=>this.logger.warn("external-leaflet-missing-draw",{message:rt})}),this.map=P.map(this.container,{zoomControl:!0,minZoom:y,preferCanvas:A}).setView(F,_),this.setTileLayer({urlTemplate:T,attribution:E!=null?E:"",maxZoom:w},{onTileError:rt=>{var at,Mt;(Mt=(at=this.options.callbacks)==null?void 0:at.onTileError)==null||Mt.call(at,rt)}}),this.drawnItems=P.featureGroup().addTo(this.map);const I=this.buildDrawOptions(this.options.controls,!!this.options.readOnly),G=P.Control.Draw;this.drawControl=new G(I),this.map.addControl(this.drawControl),this.applyLayerCakeToolbarIcon(),this.applyMoveToolbarIcon(),this.restoreVisibleLayersFromStore(),this.options.controls.ruler&&(this.logger.debug("init:ruler",{available:typeof P.control.ruler=="function"}),typeof P.control.ruler=="function"?(this.addRulerControl(),this.installMeasurementSettingsControl()):this.logger.warn("init:ruler:missing",{msg:"L.control.ruler is not defined"})),this.applyToolButtonCustomizations(),this.patchLeafletDrawBugs(),this.installPolygonFinishPatch(),this.installVertexEditSurfaceMenu(),this.map.invalidateSize(),setTimeout(()=>{var rt;try{(rt=this.map)==null||rt.invalidateSize()}catch{}},0),this.bindDrawEvents();const j=((r=(i=performance.now)==null?void 0:i.call(performance))!=null?r:Date.now())-a;this.logger.debug("init:ready",{elapsedMs:Math.round(j)});const q=this.store.bounds();(d=(l=this.options.callbacks)==null?void 0:l.onReady)==null||d.call(l,q?{bounds:q}:{})}catch(p){this._error("Failed to initialize Leaflet map",p,{code:"map_init_failed",recoverable:!1})}}async destroy(){var a,n,h,i;try{ni(this.container,null,{toolbarGroups:null}),this.map&&(this.map.off(),this.map.remove())}catch(r){this._error("Failed to remove Leaflet map",r)}try{(a=this.detachPolygonFinishPatch)==null||a.call(this)}catch{}this.detachPolygonFinishPatch=null;try{(n=this.vertexMenuCleanup)==null||n.call(this)}catch{}this.vertexMenuEl=null,this.vertexMenuCleanup=null;try{(h=this.vertexEditSurfaceCleanup)==null||h.call(this)}catch{}this.vertexEditSurfaceCleanup=null;try{this.hideMoveConfirmationUI()}catch{}this.drawControl=null,this.rulerControl=null,this.measurementControl=null,this.removeMeasurementModal(),this.drawnItems=null,this.tileLayer=null;try{(i=this.activeCakeSession)==null||i.destroy()}catch{}this.activeCakeSession=null,this.map=null}async getGeoJSON(){return this.store.toFeatureCollection()}async exportGeoJSON(a={}){return dr(await this.getGeoJSON(),a)}async importGeoJSON(a,n={}){var d;if(!this.map||!this.drawnItems)return[];const h=(d=n.behavior)!=null?d:"replace";h==="replace"&&await this.clearLayers();const i=cr(a),r=this.store.add(i),l=this.createGeoJSONLayers(i);return this.addGeoJSONLayersToDrawnItems(l),this.logger.debug("importGeoJSON",{behavior:h,count:i.features.length,ids:r}),n.fitToData&&await this.fitBoundsToData(),r}async loadGeoJSON(a,n=!1){await this.importGeoJSON(a,{behavior:"replace",fitToData:n})}async clearLayers(){this.drawnItems&&this.drawnItems.clearLayers(),this.store.clear()}async addFeatures(a){return this.importGeoJSON(a,{behavior:"add"})}async updateFeature(a,n){if(!this.store.has(a)){this.logger.warn("updateFeature:missing",{id:a});return}if(this.store.update(a,n),!this.drawnItems)return;this.drawnItems.eachLayer(i=>{i._fid===a&&this.drawnItems.removeLayer(i)}),this.createGeoJSONLayers({type:"FeatureCollection",features:[{...n,id:a}]}).eachLayer(i=>{i._fid=a,this.drawnItems.addLayer(i),this.installVertexContextMenu(i)})}async removeFeature(a){this.drawnItems&&this.drawnItems.eachLayer(n=>{n._fid===a&&this.drawnItems.removeLayer(n)}),this.store.remove(a)}async fitBoundsToData(a=.05){if(!this.map)return;const n=this.store.bounds();if(!n)return;const h=n,i=this.L.latLngBounds(h);if(a>0){const r=i.getSouthWest(),l=i.getNorthEast(),d=(l.lat-r.lat)*a,p=(l.lng-r.lng)*a,m=this.L.latLngBounds(this.L.latLng(r.lat-d,r.lng-p),this.L.latLng(l.lat+d,l.lng+p));this.map.fitBounds(m)}else this.map.fitBounds(i)}async fitBounds(a,n=.05){if(!this.map)return;const h=this.L.latLngBounds(a);if(n>0){const i=h.getSouthWest(),r=h.getNorthEast(),l=(r.lat-i.lat)*n,d=(r.lng-i.lng)*n,p=this.L.latLngBounds(this.L.latLng(i.lat-l,i.lng-d),this.L.latLng(r.lat+l,r.lng+d));this.map.fitBounds(p)}else this.map.fitBounds(h)}async setView(a,n,h){this.map&&this.map.setView([a,n],h!=null?h:this.map.getZoom())}setTileLayer(a,n){if(!this.map){this.logger.warn("setTileLayer called before map initialization",{urlTemplate:a.urlTemplate});return}this.logger.debug("tile-layer:switch",{urlTemplate:a.urlTemplate,attribution:a.attribution,maxZoom:a.maxZoom,subdomains:a.subdomains}),this.tileLayer&&(this.map.removeLayer(this.tileLayer),this.tileLayer=null);const h={attribution:a.attribution,minZoom:this.options.map.minZoom,maxZoom:a.maxZoom};a.subdomains!==void 0?h.subdomains=a.subdomains:a.urlTemplate.includes("{s}")&&(h.subdomains=["a","b","c"]);const i=this.L.tileLayer(a.urlTemplate,h);let r=!1;i.on("tileerror",l=>{var d;this.logger.error("tile-layer:error",{error:l}),r||(r=!0,(d=n==null?void 0:n.onTileError)==null||d.call(n,l))}),i.addTo(this.map),this.tileLayer=i}async mergeVisiblePolygons(a){if(!this.map||!this.drawnItems)return null;const h=(await this.getGeoJSON()).features.filter(d=>{const p=d.geometry;return p&&(oo(p)||no(p))});if(h.length<=1){if(h.length===1){const d=h[0].id;return d?String(d):null}return null}const i=fr(h,a==null?void 0:a.properties);if(!i)return null;const r=[];for(const d of h){const p=d.id;p&&r.push(String(p))}for(const d of r)await this.removeFeature(d);const[l]=await this.addFeatures({type:"FeatureCollection",features:[i]});return l||null}setRulerUnits(a){if(this.measurementSystem===a)return;const n=this.measurementSystem;this.measurementSystem=a,this.logger.debug("ruler:units",{system:a}),this.emitToolEvent("tool:ruler:units-changed",{previous:n,current:a}),this.syncMeasurementModalState(),this.rebuildRulerControl()}buildDrawOptions(a,n){var r;const h={polygon:a.polygon?{allowIntersection:(r=this.options.map.polygonAllowIntersection)!=null?r:!1,showArea:!0,shapeOptions:{color:"#3388ff"}}:!1,polyline:a.polyline?{shapeOptions:{color:"#3388ff"}}:!1,rectangle:a.rectangle?{shapeOptions:{color:"#3388ff"}}:!1,circle:a.circle?{shapeOptions:{color:"#3388ff"}}:!1,cake:a.cake?{shapeOptions:{color:"#8A2BE2",fillOpacity:.2}}:!1,marker:a.marker?this.buildMarkerDrawOptions():!1,move:a.move?{featureGroup:this.drawnItems}:!1};let i={featureGroup:this.drawnItems};return a.edit?a.delete===!1&&(i.remove=!1):i=!1,n?{draw:!1,edit:!1}:{draw:h,edit:i}}buildMarkerDrawOptions(){return this.markerIcon?{icon:this.markerIcon}:{}}createMarkerIcon(a){return a?this.L.icon({iconUrl:a.iconUrl,iconRetinaUrl:a.iconRetinaUrl,shadowUrl:a.shadowUrl,iconSize:a.iconSize,iconAnchor:a.iconAnchor,popupAnchor:a.popupAnchor}):null}createDefaultMarkerIcon(){var n;const a=(n=this.L.Icon)==null?void 0:n.Default;return a?new a:null}createGeoJSONLayers(a){return this.L.geoJSON(a,{pointToLayer:(n,h)=>this.markerIcon?this.L.marker(h,{icon:this.markerIcon}):this.L.marker(h),onEachFeature:(n,h)=>{const i=xe(n);i&&(h._fid=i)}})}addGeoJSONLayersToDrawnItems(a){this.drawnItems&&a.eachLayer(n=>{this.drawnItems.addLayer(n),this.installVertexContextMenu(n)})}restoreVisibleLayersFromStore(){if(!this.drawnItems)return;const a=this.store.toFeatureCollection();if(a.features.length===0)return;const n=this.createGeoJSONLayers(a);this.addGeoJSONLayersToDrawnItems(n)}syncDrawMarkerOptions(){var h,i,r,l;const a=this.drawControl;if(!a)return;const n=this.buildMarkerDrawOptions();(h=a.options)!=null||(a.options={}),(r=(i=a.options).draw)!=null||(i.draw={}),a.options.draw.marker=n,(l=a.setDrawingOptions)==null||l.call(a,{marker:n})}reapplyMarkerIconsToExistingLayers(){if(!this.drawnItems)return;const a=this.markerIcon?null:this.createDefaultMarkerIcon();this.drawnItems.eachLayer(n=>{if(!(typeof(n==null?void 0:n.setIcon)!="function"||typeof(n==null?void 0:n.getLatLng)!="function")){if(this.markerIcon){n.setIcon(this.markerIcon);return}a&&n.setIcon(a)}})}applyToolButtonCustomizations(){ni(this.container,this.toolButtonConfig,{toolbarGroups:this.toolbarGroups,onTrigger:(a,n)=>{if(n.activate){this.activateTool(a,{source:n.source,groupId:n.groupId});return}this.emitToolTrigger({tool:a,source:n.source,groupId:n.groupId,handled:!0})}}),setTimeout(()=>{ni(this.container,this.toolButtonConfig,{toolbarGroups:this.toolbarGroups,onTrigger:(a,n)=>{if(n.activate){this.activateTool(a,{source:n.source,groupId:n.groupId});return}this.emitToolTrigger({tool:a,source:n.source,groupId:n.groupId,handled:!0})}})},0)}emitToolTrigger(a){var n,h;(h=(n=this.options.callbacks)==null?void 0:n.onToolTrigger)==null||h.call(n,{...a,timestamp:Date.now()})}findLeafletDrawHandler(a){var l,d,p,m,_,y,w,T,E,A;const n={polygon:"polygon",polyline:"polyline",rectangle:"rectangle",circle:"circle",marker:"marker",layerCake:"cake",move:"move"},h={edit:"edit",delete:"remove"},i=n[a];if(i)return(_=(m=(p=(d=(l=this.drawControl)==null?void 0:l._toolbars)==null?void 0:d.draw)==null?void 0:p._modes)==null?void 0:m[i])==null?void 0:_.handler;const r=h[a];return r?(A=(E=(T=(w=(y=this.drawControl)==null?void 0:y._toolbars)==null?void 0:w.edit)==null?void 0:T._modes)==null?void 0:E[r])==null?void 0:A.handler:null}disableActiveToolHandlers(){var n;const a=(n=this.drawControl)==null?void 0:n._toolbars;a&&Object.values(a).forEach(h=>{var i;Object.values((i=h==null?void 0:h._modes)!=null?i:{}).forEach(r=>{const l=r==null?void 0:r.handler;l&&typeof l.disable=="function"&&l.disable()})})}triggerRulerTool(){const a=this.rulerControl;if(typeof(a==null?void 0:a._toggleMeasure)=="function")return a._toggleMeasure(),!0;const n=this.container.querySelector(".leaflet-ruler");return n?(n.click(),!0):!1}applyLayerCakeToolbarIcon(){if(!this.container)return;const a=()=>{const n=this.container.querySelector("a.leaflet-draw-draw-cake");if(!n)return;n.style.setProperty("background-image","none","important"),n.style.setProperty("background-color","#fff","important"),n.style.setProperty("position","relative","important");let h=n.querySelector(".leaflet-geokit-cake-icon");h||(h=document.createElement("span"),h.className="leaflet-geokit-cake-icon",h.setAttribute("aria-hidden","true"),n.appendChild(h)),h.style.setProperty("position","absolute","important"),h.style.setProperty("display","block","important"),h.style.setProperty("left","50%","important"),h.style.setProperty("top","50%","important"),h.style.setProperty("width","18px","important"),h.style.setProperty("height","18px","important"),h.style.setProperty("transform","translate(-50%, -50%)","important"),h.style.setProperty("pointer-events","none","important"),h.firstElementChild||(h.innerHTML=Kr);const i=h.firstElementChild;i&&(i.style.setProperty("width","100%","important"),i.style.setProperty("height","100%","important"),i.style.setProperty("display","block","important"))};a(),setTimeout(a,0)}applyMoveToolbarIcon(){if(!this.container)return;const a=()=>{const n=this.container.querySelector("a.leaflet-draw-draw-move");if(!n)return;n.style.setProperty("background-image","none","important"),n.style.setProperty("background-color","#fff","important"),n.style.setProperty("position","relative","important");let h=n.querySelector(".leaflet-geokit-move-icon");h||(h=document.createElement("span"),h.className="leaflet-geokit-move-icon",h.setAttribute("aria-hidden","true"),n.appendChild(h)),h.style.setProperty("position","absolute","important"),h.style.setProperty("display","block","important"),h.style.setProperty("left","50%","important"),h.style.setProperty("top","50%","important"),h.style.setProperty("width","18px","important"),h.style.setProperty("height","18px","important"),h.style.setProperty("transform","translate(-50%, -50%)","important"),h.style.setProperty("pointer-events","none","important"),h.firstElementChild||(h.innerHTML=Xr);const i=h.firstElementChild;i&&(i.style.setProperty("width","100%","important"),i.style.setProperty("height","100%","important"),i.style.setProperty("display","block","important"))};a(),setTimeout(a,0)}addRulerControl(){if(!this.map)return;this.installRulerPrecisionPatch();const a=sa(this.measurementSystem);this.rulerControl=this.L.control.ruler(a),this.map.addControl(this.rulerControl)}installRulerPrecisionPatch(){if(go)return;const a=this.L.Control.Ruler;if(!a||typeof a!="function")return;const n=a.prototype,h=n._calculateBearingAndDistance;if(typeof h!="function")return;const i=this.logger;n._calculateBearingAndDistance=function(){var l,d,p;h.call(this);try{const m=this._clickedLatLong,_=(l=this._movingLatLong)!=null?l:this._clickedLatLong;if(!m||!_)return;const{meters:y,bearingDegrees:w}=ea(m.lat,m.lng,_.lat,_.lng),T=y/1e3,E=typeof((p=(d=this.options)==null?void 0:d.lengthUnit)==null?void 0:p.factor)=="number"?this.options.lengthUnit.factor:1,A=di(T*E);this._result=this._result||{},this._result.Distance=A,this._result.Bearing=w,this._result.meters=y}catch(m){i==null||i.warn("ruler:precision-patch",m)}},go=!0}rebuildRulerControl(){if(!(!this.map||!this.options.controls.ruler)){if(this.rulerControl){try{this.map.removeControl(this.rulerControl)}catch(a){this.logger.warn("ruler:remove-failed",a)}this.rulerControl=null}this.addRulerControl()}}installMeasurementSettingsControl(){if(!this.map||this.measurementControl)return;const a=this,n=this.L.Control.extend({options:{position:"topleft"},onAdd(){const h=a.L.DomUtil.create("div","leaflet-bar leaflet-ruler-settings-control"),i=a.L.DomUtil.create("button","leaflet-ruler-settings-button",h);return i.type="button",i.title="Measurement settings",i.setAttribute("aria-label","Measurement settings"),i.addEventListener("click",r=>{r.preventDefault(),r.stopPropagation(),a.toggleMeasurementModal(!0)}),a.L.DomEvent.disableClickPropagation(h),a.L.DomEvent.disableScrollPropagation(h),h}});this.measurementControl=new n,this.map.addControl(this.measurementControl)}ensureMeasurementModal(){if(this.measurementModalOverlay)return this.measurementModalOverlay;if(typeof document=="undefined")throw new Error("Measurement modal requires a browser environment");const a=document.createElement("div");a.className="leaflet-ruler-modal-overlay",a.setAttribute("aria-hidden","true");const n=document.createElement("div");n.className="leaflet-ruler-modal",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.tabIndex=-1,a.addEventListener("click",p=>{p.target===a&&this.toggleMeasurementModal(!1)});const h=document.createElement("h2");h.className="leaflet-ruler-modal-title",h.textContent="Measurement Units",n.appendChild(h);const i=document.createElement("p");i.className="leaflet-ruler-modal-description",i.textContent="Choose how the measurement tool reports distances.",n.appendChild(i);const r=document.createElement("div");r.className="leaflet-ruler-modal-options",n.appendChild(r),["metric","imperial"].forEach(p=>{const m=document.createElement("label");m.className="leaflet-ruler-modal-option";const _=document.createElement("input");_.type="radio",_.name="leaflet-ruler-units",_.value=p,_.addEventListener("change",()=>{_.checked&&this.setRulerUnits(p)});const y=document.createElement("span");y.textContent=la[p],m.appendChild(_),m.appendChild(y),r.appendChild(m),this.measurementModalRadios[p]=_});const l=document.createElement("div");l.className="leaflet-ruler-modal-actions";const d=document.createElement("button");return d.type="button",d.className="leaflet-ruler-modal-close",d.textContent="Close",d.addEventListener("click",()=>this.toggleMeasurementModal(!1)),l.appendChild(d),n.appendChild(l),a.appendChild(n),this.container.appendChild(a),this.measurementModalOverlay=a,this.measurementModalDialog=n,this.syncMeasurementModalState(),a}toggleMeasurementModal(a){var h;if(!a){this.measurementModalOverlay&&(this.measurementModalOverlay.classList.remove("is-open"),this.measurementModalOverlay.setAttribute("aria-hidden","true")),this.detachMeasurementModalKeydown();return}const n=this.ensureMeasurementModal();n.classList.add("is-open"),n.setAttribute("aria-hidden","false"),this.syncMeasurementModalState(),this.attachMeasurementModalKeydown(),(h=this.measurementModalDialog)==null||h.focus()}syncMeasurementModalState(){for(const[a,n]of Object.entries(this.measurementModalRadios))n&&(n.checked=a===this.measurementSystem)}removeMeasurementModal(){this.measurementModalOverlay&&this.measurementModalOverlay.remove(),this.measurementModalOverlay=null,this.measurementModalDialog=null,this.measurementModalRadios={},this.detachMeasurementModalKeydown()}attachMeasurementModalKeydown(){this.measurementModalKeydownHandler||typeof document=="undefined"||(this.measurementModalKeydownHandler=a=>{a.key==="Escape"&&this.toggleMeasurementModal(!1)},document.addEventListener("keydown",this.measurementModalKeydownHandler))}detachMeasurementModalKeydown(){!this.measurementModalKeydownHandler||typeof document=="undefined"||(document.removeEventListener("keydown",this.measurementModalKeydownHandler),this.measurementModalKeydownHandler=null)}installPolygonFinishPatch(){var l,d,p,m,_;if(!this.map||!this.drawControl)return;try{(l=this.detachPolygonFinishPatch)==null||l.call(this)}catch{}this.detachPolygonFinishPatch=null;const a=this.map,n=(p=(d=this.drawControl)==null?void 0:d._toolbars)==null?void 0:p.draw;if(!n||!!!((_=(m=n._modes)==null?void 0:m.polygon)!=null&&_.handler))return;const i=10,r=y=>{var w,T,E,A,N,F,P,I;try{const G=(T=(w=n._modes)==null?void 0:w.polygon)==null?void 0:T.handler;if(!G||!G._enabled)return;const j=G._markers;if(!Array.isArray(j)||j.length<3)return;const q=(A=(E=j[0])==null?void 0:E.getLatLng)==null?void 0:A.call(E);if(!q)return;const rt=a.latLngToContainerPoint(q),at=a.latLngToContainerPoint(y.latlng);Math.hypot(rt.x-at.x,rt.y-at.y)<=i&&typeof G._finishShape=="function"&&((F=(N=y.originalEvent)==null?void 0:N.preventDefault)==null||F.call(N),(I=(P=y.originalEvent)==null?void 0:P.stopPropagation)==null||I.call(P),G._finishShape())}catch(G){this._error("polygon-finish-patch",G)}};a.on("click",r),this.detachPolygonFinishPatch=()=>{try{a.off("click",r)}catch{}}}patchLeafletDrawBugs(){var a,n,h,i,r;try{const l=this.L,d=l.GeometryUtil;if(!d)return;const p={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2},m=(n=(a=d.formattedNumber)==null?void 0:a.bind(d))!=null?n:((_,y)=>Number(_).toFixed(y));d.readableArea=(_,y,w)=>{var A;const T=(A=l.Util)!=null&&A.extend?l.Util.extend({},p,w||{}):{...p,...w||{}};let E;if(y){let N=["ha","m"];const F=typeof y;F==="string"?N=[y]:F!=="boolean"&&(N=Array.isArray(y)?y:N),_>=1e6&&N.indexOf("km")!==-1?E=`${m(1e-6*_,T.km)} km²`:_>=1e4&&N.indexOf("ha")!==-1?E=`${m(1e-4*_,T.ha)} ha`:E=`${m(_,T.m)} m²`}else _=_/.836127,_>=3097600?E=`${m(_/3097600,T.mi)} mi²`:_>=4840?E=`${m(_/4840,T.ac)} acres`:E=`${m(_,T.yd)} yd²`;return E}}catch(l){this.logger.warn("leaflet-draw-patch:readableArea",l)}try{const l=this.L,d=(h=l.Edit)==null?void 0:h.Circle,p=(i=l.Draw)==null?void 0:i.Event,m=l.GeometryUtil;if(!((r=d==null?void 0:d.prototype)!=null&&r._resize)||!p||!m)return;d.prototype._resize=function(y){var E,A,N;const w=this._moveMarker.getLatLng(),T=m.isVersion07x()?w.distanceTo(y):this._map.distance(w,y);this._shape.setRadius(T);try{(E=this._map)!=null&&E.editTooltip&&((N=(A=this._map)==null?void 0:A._editTooltip)!=null&&N.updateContent)&&this._map._editTooltip.updateContent({text:l.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+l.drawLocal.edit.handlers.edit.tooltip.text,subtext:l.drawLocal.draw.handlers.circle.radius+": "+m.readableDistance(T,!0,this.options.feet,this.options.nautic)})}catch{}this._map.fire(p.EDITRESIZE,{layer:this._shape})}}catch(l){this.logger.warn("leaflet-draw-patch:circle-resize",l)}}bindDrawEvents(){!this.map||!this.drawnItems||(this.map.on(this.L.Draw.Event.CREATED,a=>{var n,h,i;try{const{layer:r,layerType:l}=a;if(l===Ee.TYPE){try{(n=this.activeCakeSession)==null||n.destroy()}catch{}this.activeCakeSession=new Yr(this.map,r,y=>{if(!this.drawnItems)return;const w=this.store.add(y),T=this.L.geoJSON(y);let E=0;T.eachLayer(A=>{var F,P,I;const N=(F=w[E])!=null?F:w[w.length-1];A._fid=N,this.drawnItems.addLayer(A),this.installVertexContextMenu(A),(I=(P=this.options.callbacks)==null?void 0:P.onCreated)==null||I.call(P,{id:N,layerType:"polygon",geoJSON:A.toGeoJSON()}),E++}),this.activeCakeSession=null,this.emitToolEvent("tool:layer-cake:saved",{featureCollection:y})},this.measurementSystem),this.emitToolEvent("tool:layer-cake:session-started",{center:r.getLatLng(),radius:r.getRadius()});return}this.drawnItems.addLayer(r);const d=r.toGeoJSON(),m=this.store.add({type:"FeatureCollection",features:[d]})[0];r._fid=m,this.installVertexContextMenu(r),(i=(h=this.options.callbacks)==null?void 0:h.onCreated)==null||i.call(h,{id:m,layerType:l,geoJSON:d});const _=ha[l];_&&this.emitToolEvent(_,{id:m,geoJSON:d})}catch(r){this._error("onCreated handler failed",r)}}),this.map.on(this.L.Draw.Event.EDITED,a=>{var n,h;try{const i=[];a.layers.eachLayer(d=>{const p=d.toGeoJSON(),m=d._fid;if(m)this.store.update(m,p),i.push(m);else{const _=this.store.add({type:"FeatureCollection",features:[p]})[0];d._fid=_,i.push(_)}});const l=this.store.toFeatureCollection();(h=(n=this.options.callbacks)==null?void 0:n.onEdited)==null||h.call(n,{ids:i,geoJSON:l}),this.emitToolEvent("tool:edit:applied",{ids:i,geoJSON:l})}catch(i){this._error("onEdited handler failed",i)}}),this.map.on(this.L.Draw.Event.DELETED,a=>{var n,h;try{const i=[];a.layers.eachLayer(d=>{const p=d._fid;p&&(i.push(p),this.store.remove(p))});const l=this.store.toFeatureCollection();(h=(n=this.options.callbacks)==null?void 0:n.onDeleted)==null||h.call(n,{ids:i,geoJSON:l}),this.emitToolEvent("tool:delete:applied",{ids:i,geoJSON:l})}catch(i){this._error("onDeleted handler failed",i)}}),this.map.on("draw:moveend",a=>{var n;try{this.emitToolEvent("tool:move:pending",{layerId:(n=a==null?void 0:a.layer)==null?void 0:n._fid,originalGeoJSON:a==null?void 0:a.originalGeoJSON,newGeoJSON:a==null?void 0:a.newGeoJSON}),this.showMoveConfirmationUI(a.layer)}catch(h){this._error("draw:moveend handler failed",h)}}),this.map.on("draw:moveconfirmed",a=>{var n,h,i;try{this.emitToolEvent("tool:move:confirmed",{layerId:(n=a==null?void 0:a.layer)==null?void 0:n._fid,originalGeoJSON:a==null?void 0:a.originalGeoJSON,newGeoJSON:a==null?void 0:a.newGeoJSON});const r=a.layer,l=r._fid;if(l){const d=r.toGeoJSON();this.store.update(l,d),(i=(h=this.options.callbacks)==null?void 0:h.onEdited)==null||i.call(h,{ids:[l],geoJSON:this.store.toFeatureCollection()})}this.hideMoveConfirmationUI()}catch(r){this._error("draw:moveconfirmed handler failed",r)}}))}_error(a,n,h){var r,l,d,p;const i={code:(r=h==null?void 0:h.code)!=null?r:"controller_error",message:a,recoverable:(l=h==null?void 0:h.recoverable)!=null?l:!0,cause:n,timestamp:Date.now()};this.logger.error("error",i),(p=(d=this.options.callbacks)==null?void 0:d.onError)==null||p.call(d,i)}installVertexEditSurfaceMenu(){var i;if(!this.map)return;try{(i=this.vertexEditSurfaceCleanup)==null||i.call(this)}catch{}const a=this.map.getContainer(),n=r=>{this.openNearestEditableVertexMenuFromDomEvent(r)},h=r=>{(r.ctrlKey||r.metaKey)&&this.openNearestEditableVertexMenuFromDomEvent(r)};a.addEventListener("contextmenu",n,{capture:!0}),a.addEventListener("click",h,{capture:!0}),this.vertexEditSurfaceCleanup=()=>{a.removeEventListener("contextmenu",n,{capture:!0}),a.removeEventListener("click",h,{capture:!0})}}openNearestEditableVertexMenuFromDomEvent(a){try{if(!this.map||!this.drawnItems)return;const n=this.map.mouseEventToContainerPoint(a),h=this.map.containerPointToLatLng(n);let i=null;if(this.drawnItems.eachLayer(r=>{if(i)return;const l=r.editing;if(!(l&&typeof l.enabled=="function"&&l.enabled()))return;const p=this.findNearestVertex(r,h,16);p&&(i={layer:r,...p})}),!i)return;a.preventDefault(),a.stopPropagation(),this.showVertexMenu(n,async()=>{await this.deleteVertex(i.layer,i.pathIndex,i.vertexIndex)})}catch(n){this._error("openNearestEditableVertexMenuFromDomEvent",n)}}installVertexContextMenu(a){if(!a||typeof a.on!="function")return;const n=i=>{var r,l,d,p;try{(l=(r=i==null?void 0:i.originalEvent)==null?void 0:r.preventDefault)==null||l.call(r),(p=(d=i==null?void 0:i.originalEvent)==null?void 0:d.stopPropagation)==null||p.call(d)}catch{}this.openVertexMenu(a,i)},h=i=>{const r=i==null?void 0:i.originalEvent;r&&(r.ctrlKey||r.metaKey)&&this.openVertexMenu(a,i)};try{a.on("contextmenu",n),a.on("click",h)}catch{}}openVertexMenu(a,n){try{if(!this.map||!(typeof a.getLatLngs=="function"&&(a instanceof this.L.Polygon||a instanceof this.L.Polyline)))return;const i=a.editing;if(!i||typeof i.enabled!="function"||!i.enabled())return;const r=n==null?void 0:n.latlng,l=this.map.latLngToContainerPoint(r),d=this.findNearestVertex(a,r,12);if(!d)return;this.showVertexMenu(l,async()=>{await this.deleteVertex(a,d.pathIndex,d.vertexIndex)})}catch(h){this._error("openVertexMenu",h)}}showVertexMenu(a,n){var h;try{try{(h=this.vertexMenuCleanup)==null||h.call(this)}catch{}if(this.vertexMenuCleanup=null,!this.container)return;const i=document.createElement("div");i.style.position="absolute",i.style.top=`${a.y}px`,i.style.left=`${a.x}px`,i.style.transform="translate(-50%, -100%)",i.style.background="#fff",i.style.border="1px solid rgba(0,0,0,0.15)",i.style.borderRadius="6px",i.style.boxShadow="0 4px 12px rgba(0,0,0,0.15)",i.style.padding="6px",i.style.zIndex="10000",i.style.fontSize="12px",i.style.userSelect="none";const r=document.createElement("button");r.textContent="Delete vertex",r.style.padding="6px 10px",r.style.border="none",r.style.background="#da1e28",r.style.color="#fff",r.style.borderRadius="4px",r.style.cursor="pointer",r.addEventListener("click",p=>{p.stopPropagation(),p.preventDefault();try{n()}finally{l()}}),i.appendChild(r);const l=()=>{try{window.removeEventListener("pointerdown",d),this.container.removeEventListener("scroll",l,!0),i.remove()}catch{}this.vertexMenuEl=null,this.vertexMenuCleanup=null},d=p=>{!(typeof p.composedPath=="function"?p.composedPath():[]).includes(i)&&!i.contains(p.target)&&l()};window.addEventListener("pointerdown",d,{capture:!0}),this.container.addEventListener("scroll",l,!0),this.container.appendChild(i),this.vertexMenuEl=i,this.vertexMenuCleanup=l}catch(i){this._error("showVertexMenu",i)}}findNearestVertex(a,n,h){if(!this.map)return null;const i=w=>this.map.latLngToContainerPoint(w),r=(w,T)=>Math.hypot(w.x-T.x,w.y-T.y),l=i(n);let d=1/0,p=-1,m=-1;const _=a.getLatLngs();return(Array.isArray(_[0])?_:[_]).forEach((w,T)=>{w.forEach((E,A)=>{const N=i(E),F=r(N,l);F<d&&(d=F,p=T,m=A)})}),p===-1||d>h?null:{pathIndex:p,vertexIndex:m}}async deleteVertex(a,n,h){var i,r,l;try{if(!(typeof a.getLatLngs=="function"&&(a instanceof this.L.Polygon||a instanceof this.L.Polyline)))return;const p=a.getLatLngs(),m=Array.isArray(p[0])?p:[p],_=m[n];if(!_)return;const w=a instanceof this.L.Polygon?3:2;if(_.length<=w)return;if(_.splice(h,1),m.length===1)a.setLatLngs(_);else{const E=m.map((A,N)=>N===n?_:A);a.setLatLngs(E)}(i=a.redraw)==null||i.call(a);const T=a._fid;if(T){const E=a.toGeoJSON();this.store.update(T,E),(l=(r=this.options.callbacks)==null?void 0:r.onEdited)==null||l.call(r,{ids:[T],geoJSON:this.store.toFeatureCollection()})}}catch(d){this._error("deleteVertex",d)}}showMoveConfirmationUI(a){var n,h;try{if(this.hideMoveConfirmationUI(),!this.container||!this.map)return;const i=this.drawControl;if(!i)return;const r=(n=i==null?void 0:i._toolbars)==null?void 0:n.draw;if(!r)return;const l=r._modes||{};let d=null;for(const y in l){const w=l[y];if(((h=w==null?void 0:w.handler)==null?void 0:h.type)==="move"){d=w.handler;break}}this.activeMoveHandler=d;const p=document.createElement("div");p.style.position="absolute",p.style.bottom="60px",p.style.left="50%",p.style.transform="translateX(-50%)",p.style.display="flex",p.style.gap="8px",p.style.background="#fff",p.style.border="2px solid #3388ff",p.style.borderRadius="8px",p.style.padding="12px 16px",p.style.boxShadow="0 4px 12px rgba(0,0,0,0.2)",p.style.zIndex="10000",p.style.fontSize="14px",p.style.fontFamily="system-ui, sans-serif";const m=document.createElement("button");m.textContent="✓ Save",m.style.padding="8px 16px",m.style.border="none",m.style.background="#28a745",m.style.color="#fff",m.style.borderRadius="4px",m.style.cursor="pointer",m.style.fontWeight="600",m.style.fontSize="14px",m.addEventListener("click",y=>{y.stopPropagation(),y.preventDefault(),d!=null&&d.confirmMove&&d.confirmMove()});const _=document.createElement("button");_.textContent="✕ Cancel",_.style.padding="8px 16px",_.style.border="1px solid #ccc",_.style.background="#fff",_.style.color="#333",_.style.borderRadius="4px",_.style.cursor="pointer",_.style.fontWeight="600",_.style.fontSize="14px",_.addEventListener("click",y=>{y.stopPropagation(),y.preventDefault(),this.emitToolEvent("tool:move:cancelled",{layerId:a==null?void 0:a._fid}),d!=null&&d.cancelMove&&d.cancelMove(),this.hideMoveConfirmationUI()}),p.appendChild(m),p.appendChild(_),this.container.appendChild(p),this.moveConfirmationUI=p,this.logger.debug("showMoveConfirmationUI",{layerId:a._fid})}catch(i){this._error("showMoveConfirmationUI",i)}}hideMoveConfirmationUI(){try{this.moveConfirmationUI&&(this.moveConfirmationUI.remove(),this.moveConfirmationUI=null),this.activeMoveHandler=null}catch(a){this._error("hideMoveConfirmationUI",a)}}}const _o=[25,41],vo=[12,41],yo=[1,-34];function Vt(u,a){var h,i,r,l;if(u==null)return null;const n=typeof u=="string"?u.trim():"";if(!n)return(h=a.reportError)==null||h.call(a,a.errorMessage,a.cause),null;try{return new URL(n,(i=a.baseUrl)!=null?i:document.baseURI).toString()}catch(d){return(l=a.reportError)==null||l.call(a,a.errorMessage,(r=a.cause)!=null?r:d),null}}function fi(u,a,n){var p,m;if(u==null)return[...a];if(!Array.isArray(u)||u.length!==2)return(p=n.reportError)==null||p.call(n,n.errorMessage,n.cause),[...a];const[h,i]=u,r=Number(h),l=Number(i);return Number.isFinite(r)&&Number.isFinite(l)&&(!n.positiveOnly||r>0&&l>0)?[r,l]:((m=n.reportError)==null||m.call(n,n.errorMessage,n.cause),[...a])}function pi(u,a,n){var p,m,_,y,w;if(u==null)return[...a];const h=typeof u=="string"?u.trim():"";if(!h)return(p=n.reportError)==null||p.call(n,n.errorMessage,n.cause),[...a];const i=h.split(",");if(i.length!==2)return(m=n.reportError)==null||m.call(n,n.errorMessage,n.cause),[...a];const r=Number((_=i[0])==null?void 0:_.trim()),l=Number((y=i[1])==null?void 0:y.trim());return Number.isFinite(r)&&Number.isFinite(l)&&(!n.positiveOnly||r>0&&l>0)?[r,l]:((w=n.reportError)==null||w.call(n,n.errorMessage,n.cause),[...a])}function da(u,a={}){var r,l;if(!u||typeof u!="object")return null;const n=Vt(u.iconUrl,{...a,errorMessage:"Invalid marker icon config: iconUrl must be a valid URL",cause:{field:"iconUrl",value:u.iconUrl}});if(!n)return null;const h=(r=Vt(u.iconRetinaUrl,{...a,errorMessage:"Invalid marker icon config: iconRetinaUrl must be a valid URL",cause:{field:"iconRetinaUrl",value:u.iconRetinaUrl}}))!=null?r:n,i=(l=Vt(u.shadowUrl,{...a,errorMessage:"Invalid marker icon config: shadowUrl must be a valid URL",cause:{field:"shadowUrl",value:u.shadowUrl}}))!=null?l:void 0;return{iconUrl:n,iconRetinaUrl:h,shadowUrl:i,iconSize:fi(u.iconSize,_o,{...a,positiveOnly:!0,errorMessage:"Invalid marker icon config: iconSize must be a [width, height] tuple of positive finite numbers",cause:{field:"iconSize",value:u.iconSize}}),iconAnchor:fi(u.iconAnchor,vo,{...a,errorMessage:"Invalid marker icon config: iconAnchor must be a [x, y] tuple of finite numbers",cause:{field:"iconAnchor",value:u.iconAnchor}}),popupAnchor:fi(u.popupAnchor,yo,{...a,errorMessage:"Invalid marker icon config: popupAnchor must be a [x, y] tuple of finite numbers",cause:{field:"popupAnchor",value:u.popupAnchor}})}}function ua(u,a={}){var r,l;const n=Vt(u.iconUrl,{...a,errorMessage:'Invalid "marker-icon-url" attribute; falling back to default markers',cause:{attribute:"marker-icon-url",value:u.iconUrl}});if(!n)return null;const h=(r=Vt(u.iconRetinaUrl,{...a,errorMessage:'Invalid "marker-icon-retina-url" attribute; using "marker-icon-url" instead',cause:{attribute:"marker-icon-retina-url",value:u.iconRetinaUrl}}))!=null?r:n,i=(l=Vt(u.shadowUrl,{...a,errorMessage:'Invalid "marker-shadow-url" attribute; dropping the custom marker shadow',cause:{attribute:"marker-shadow-url",value:u.shadowUrl}}))!=null?l:void 0;return{iconUrl:n,iconRetinaUrl:h,shadowUrl:i,iconSize:pi(u.iconSize,_o,{...a,positiveOnly:!0,errorMessage:'Invalid "marker-icon-size" attribute; using the default marker size',cause:{attribute:"marker-icon-size",value:u.iconSize}}),iconAnchor:pi(u.iconAnchor,vo,{...a,errorMessage:'Invalid "marker-icon-anchor" attribute; using the default marker anchor',cause:{attribute:"marker-icon-anchor",value:u.iconAnchor}}),popupAnchor:pi(u.popupAnchor,yo,{...a,errorMessage:'Invalid "marker-popup-anchor" attribute; using the default popup anchor',cause:{attribute:"marker-popup-anchor",value:u.popupAnchor}})}}const It={osm:{urlTemplate:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',maxZoom:19,subdomains:["a","b","c"]},here:{styles:{"lite.day":"lite.day","normal.day":"normal.day","satellite.day":"satellite.day"},defaultStyle:"lite.day",attribution:'Map Tiles &copy; <a href="https://www.here.com">HERE</a>',maxZoom:20}};function Lo(u){return typeof u=="string"?u.trim().toLowerCase():""}function bo(u){if(typeof u!="string")return;const a=u.trim();return a.length>0?a:void 0}function fa(u){const{style:a,attribution:n}=u,h=Lo(u.provider),i=bo(u.apiKey);switch(h){case"osm":return{urlTemplate:It.osm.urlTemplate,attribution:n||It.osm.attribution,maxZoom:It.osm.maxZoom,subdomains:[...It.osm.subdomains]};case"here":{if(!i)throw new Error("HERE Maps requires an API key");const r=typeof a=="string"?a.trim():"",l=r&&r in It.here.styles?r:It.here.defaultStyle;return{urlTemplate:`https://maps.hereapi.com/v3/base/mc/{z}/{x}/{y}/png8?style=${encodeURIComponent(l)}&apiKey=${encodeURIComponent(i)}`,attribution:n||It.here.attribution,maxZoom:It.here.maxZoom,subdomains:void 0}}default:throw new Error(`Unknown tile provider: ${u.provider}`)}}function pa(u){const a=Lo(u.provider),n=bo(u.apiKey);return a?a==="here"&&!n?{valid:!1,error:"HERE Maps requires an API key"}:{valid:!0}:{valid:!1,error:"Provider is required"}}class mi extends HTMLElement{constructor(){super();k(this,"_root");k(this,"_container");k(this,"_logger",be("component:leaflet-geokit","debug"));k(this,"_latitude",0);k(this,"_longitude",0);k(this,"_zoom",2);k(this,"_minZoom");k(this,"_maxZoom");k(this,"_tileUrl","https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png");k(this,"_tileAttribution");k(this,"_tileProvider");k(this,"_tileStyle");k(this,"_apiKey");k(this,"_activeTileProvider","tile-url");k(this,"_readOnly",!1);k(this,"_logLevel","debug");k(this,"_devOverlay",!1);k(this,"_polygonAllowIntersection",!1);k(this,"_preferCanvas",!0);k(this,"_themeUrl");k(this,"_themeCss","");k(this,"_themeLinkEl",null);k(this,"_themeStyleEl",null);k(this,"_controller",null);k(this,"_useExternalLeaflet",!1);k(this,"_skipLeafletStyles",!1);k(this,"_leafletInstance");k(this,"_toolHooks");k(this,"_toolEventEmitter");k(this,"_markerIconConfig");k(this,"_toolButtonConfig");k(this,"_toolbarGroups");k(this,"_status",{state:"uninitialized",ready:!1,busy:!1,featureCount:0,timestamp:Date.now()});k(this,"_externalToolTriggerListener",n=>{var i,r;const h=n.detail;if((h==null?void 0:h.action)==="deactivate"||(h==null?void 0:h.active)===!1){this.deactivateTool({source:(i=h.source)!=null?i:"event",groupId:h.groupId});return}h!=null&&h.tool&&this.activateTool(h.tool,{source:(r=h.source)!=null?r:"event",groupId:h.groupId})});k(this,"_externalToolDeactivateListener",n=>{var i;const h=n.detail;this.deactivateTool({source:(i=h==null?void 0:h.source)!=null?i:"event",groupId:h==null?void 0:h.groupId})});this._root=this.attachShadow({mode:"open"}),this._root.innerHTML=`
242
290
  <style>
243
291
  :host {
244
292
  display: block;
@@ -251,5 +299,5 @@ ${Fn}
251
299
  }
252
300
  </style>
253
301
  <div class="map-container" part="map"></div>
254
- `;const n=this._root.querySelector(".map-container");if(!(n instanceof HTMLDivElement))throw new Error("Failed to initialize map container");this._container=n;const l=this.getAttribute("log-level");l&&(this._logLevel=l,this._logger.setLevel(l))}_controlsFromAttributes(){return{polygon:this.hasAttribute("draw-polygon"),polyline:this.hasAttribute("draw-polyline"),rectangle:this.hasAttribute("draw-rectangle"),circle:this.hasAttribute("draw-circle"),cake:this.hasAttribute("draw-layer-cake"),marker:this.hasAttribute("draw-marker"),move:this.hasAttribute("draw-move"),edit:this.hasAttribute("edit-features"),delete:this.hasAttribute("delete-features"),ruler:this.hasAttribute("draw-ruler")}}_mapConfig(){return{latitude:this._latitude,longitude:this._longitude,zoom:this._zoom,minZoom:this._minZoom,maxZoom:this._maxZoom,tileUrl:this._tileUrl,tileAttribution:this._tileAttribution,readOnly:this._readOnly,fitToDataOnLoad:!1,logLevel:this._logLevel,devOverlay:this._devOverlay,polygonAllowIntersection:this._polygonAllowIntersection,preferCanvas:this._preferCanvas,useExternalLeaflet:this._useExternalLeaflet,skipLeafletStyles:this._skipLeafletStyles}}async connectedCallback(){var n;this._logger.debug("connectedCallback",this._currentConfig()),this._setStatus({state:"initializing",ready:!1,busy:!0,featureCount:0,lastEvent:"connected",lastError:null}),Qn({root:this._root,skipStyles:this._skipLeafletStyles}),this._applyThemeStyles(),this._controller=new cs({container:this._container,map:this._mapConfig(),controls:this._controlsFromAttributes(),readOnly:this._readOnly,logger:this._logger.child("controller"),callbacks:{onReady:l=>{this.dispatchEvent(new CustomEvent(J.Ready,{detail:l})),this._syncStatusFromController({state:"ready",ready:!0,busy:!1,lastEvent:J.Ready,clearLastError:!0})},onCreated:l=>{this.dispatchEvent(new CustomEvent(J.Created,{detail:l})),this._setStatus({state:"ready",ready:!0,busy:!1,featureCount:this._status.featureCount+1,lastEvent:J.Created,lastError:null})},onEdited:l=>{this.dispatchEvent(new CustomEvent(J.Edited,{detail:l})),this._setStatus({state:"ready",ready:!0,busy:!1,featureCount:l.geoJSON.features.length,lastEvent:J.Edited,lastError:null})},onDeleted:l=>{this.dispatchEvent(new CustomEvent(J.Deleted,{detail:l})),this._setStatus({state:"ready",ready:!0,busy:!1,featureCount:l.geoJSON.features.length,lastEvent:J.Deleted,lastError:null})},onError:l=>{this._emitError(l,{state:l.recoverable?this._status.ready?"ready":this._status.state:"error",lastEvent:J.Error})},onTileError:l=>{if(this._tileProvider)return;const i=this._describeTileLayerError(l,"tile-url");this._handleTileProviderError("tile_load_failed",i,"tile-url")},onToolTrigger:l=>{this._emitToolTriggerResult(l)},onSaved:l=>{this.dispatchEvent(new CustomEvent(J.Export,{detail:{geoJSON:l.geoJSON,featureCount:l.featureCount,adapter:"editing"}})),this._setStatus({state:"ready",ready:!0,busy:!1,featureCount:l.featureCount,lastEvent:J.Export,lastError:null})}},leaflet:(n=this._leafletInstance)!=null?n:void 0,useExternalLeaflet:this._useExternalLeaflet,toolHooks:this._toolHooks,toolEventEmitter:this._toolEventEmitter,markerIconConfig:this._effectiveMarkerIconConfig(),toolButtonConfig:this._effectiveToolButtonConfig(),toolbarGroups:this._effectiveToolbarGroups()}),this.addEventListener("leaflet-geokit:trigger-tool",this._externalToolTriggerListener),this.addEventListener("leaflet-geokit:activate-tool",this._externalToolTriggerListener),this.addEventListener("leaflet-geokit:deactivate-tool",this._externalToolDeactivateListener),await this._controller.init(),this._status.state!=="error"&&this._tileProvider&&this._updateTileLayer()}async disconnectedCallback(){this._logger.debug("disconnectedCallback"),this._controller&&(await this._controller.destroy(),this._controller=null),this.removeEventListener("leaflet-geokit:trigger-tool",this._externalToolTriggerListener),this.removeEventListener("leaflet-geokit:activate-tool",this._externalToolTriggerListener),this.removeEventListener("leaflet-geokit:deactivate-tool",this._externalToolDeactivateListener),this._setStatus({state:"uninitialized",ready:!1,busy:!1,featureCount:0,lastEvent:"disconnected",lastError:null})}static get observedAttributes(){return["latitude","longitude","zoom","min-zoom","max-zoom","tile-url","tile-attribution","tile-provider","tile-style","api-key","here-api-key","read-only","log-level","dev-overlay","prefer-canvas","use-external-leaflet","skip-leaflet-styles","marker-icon-url","marker-icon-retina-url","marker-shadow-url","marker-icon-size","marker-icon-anchor","marker-popup-anchor","tool-button-config","toolbar-groups","theme-url","draw-polygon","draw-polyline","draw-rectangle","draw-circle","draw-layer-cake","draw-marker","draw-move","draw-ruler","edit-features","delete-features","polygon-allow-intersection"]}attributeChangedCallback(n,l,i){switch(this._logger.debug("attributeChanged",{name:n,value:i}),n){case"latitude":this._latitude=this._coerceNumber(i,0);break;case"longitude":this._longitude=this._coerceNumber(i,0);break;case"zoom":this._zoom=this._coerceNumber(i,2);break;case"min-zoom":this._minZoom=i!=null?this._coerceNumber(i):void 0;break;case"max-zoom":this._maxZoom=i!=null?this._coerceNumber(i):void 0;break;case"tile-url":this._tileUrl=i!=null?i:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",this._controller&&this._updateTileLayer();break;case"tile-attribution":this._tileAttribution=i!=null?i:void 0,this._controller&&this._updateTileLayer();break;case"tile-provider":this._tileProvider=this._normalizeText(i,{lowercase:!0}),this._controller&&this._updateTileLayer();break;case"tile-style":this._tileStyle=this._normalizeText(i),this._controller&&this._updateTileLayer();break;case"api-key":case"here-api-key":this._syncApiKeyFromAttributes(),this._controller&&this._updateTileLayer();break;case"theme-url":this._themeUrl=i!=null?i:void 0,this.isConnected&&this._applyThemeStyles();break;case"read-only":this._readOnly=i!==null;break;case"log-level":this._logLevel=i!=null?i:this._logLevel,this._logger.setLevel(this._logLevel);break;case"dev-overlay":this._devOverlay=i!==null;break;case"polygon-allow-intersection":this._polygonAllowIntersection=i!==null;break;case"prefer-canvas":this._preferCanvas=i!==null;break;case"use-external-leaflet":this._useExternalLeaflet=i!==null;break;case"skip-leaflet-styles":this._skipLeafletStyles=i!==null;break}this._controller&&(n==="latitude"||n==="longitude"||n==="zoom"?this._controller.setView(this._latitude,this._longitude,this._zoom):this._isMarkerIconAttribute(n)?this._syncMarkerIconConfig():n==="tool-button-config"?this._syncToolButtonConfig():n==="toolbar-groups"?this._syncToolbarGroups():(n==="min-zoom"||n==="max-zoom"||n==="read-only"||n==="dev-overlay"||n==="log-level"||n==="prefer-canvas"||n==="use-external-leaflet"||n==="skip-leaflet-styles"||n.startsWith("draw-")||n==="edit-features"||n==="delete-features")&&this._controller.destroy().then(()=>this._controller.init()))}_updateTileLayer(){var l,i,r,h;if(!this._controller)return;const n=this._controller;if(typeof n.setTileLayer!="function"){this._logger.warn("setTileLayer is not available on MapController yet");return}try{if(this._tileProvider){const d=this._tileProvider,p={provider:d,style:this._tileStyle,apiKey:this._apiKey,attribution:this._tileAttribution},m=ps(p);if(!m.valid){const w=(l=m.error)!=null&&l.toLowerCase().includes("api key")?"missing_api_key":"tile_load_failed";this._handleTileProviderError(w,(i=m.error)!=null?i:"Invalid tile provider configuration",d);return}const g=fs(p),y=this._activeTileProvider;n.setTileLayer(g,{onTileError:w=>{if(this._tileProvider!==d)return;const T=this._describeTileLayerError(w,d),E=d==="here"?this._resolveHereTileLayerErrorCode(T):"tile_load_failed";this._handleTileProviderError(E,T,d)}}),this._activeTileProvider=d,this._emitTileProviderChanged(d,this._tileStyle,y);return}n.setTileLayer({urlTemplate:this._tileUrl,attribution:(r=this._tileAttribution)!=null?r:"",maxZoom:this._maxZoom,subdomains:["a","b","c"]},{onTileError:d=>{const p=this._describeTileLayerError(d,"tile-url");this._handleTileProviderError("tile_load_failed",p,"tile-url")}}),this._activeTileProvider="tile-url"}catch(d){const p=this._resolveTileProviderErrorCode(d);this._logger.error("Failed to update tile layer",{error:d,code:p}),this._handleTileProviderError(p,d instanceof Error?d.message:"Unknown tile layer error",(h=this._tileProvider)!=null?h:"unknown")}}_handleTileProviderError(n,l,i){this._logger.error(`Tile provider error (${n}): ${l}`);const r=Date.now();this.dispatchEvent(new CustomEvent("tile-provider-error",{bubbles:!0,detail:{code:n,message:l,provider:i,timestamp:r}})),this._emitDiagnostic({code:n,message:l,recoverable:!0,severity:"warn",timestamp:r},{state:this._status.ready?"ready":this._status.state,lastEvent:"tile-provider-error"});const h=this._controller;typeof h.setTileLayer=="function"&&(h.setTileLayer({urlTemplate:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',maxZoom:19,subdomains:["a","b","c"]}),this._activeTileProvider="osm")}_emitTileProviderChanged(n,l,i){this.dispatchEvent(new CustomEvent("tile-provider-changed",{bubbles:!0,detail:{provider:n,style:l,previousProvider:i,timestamp:Date.now()}}))}_isMarkerIconAttribute(n){return n==="marker-icon-url"||n==="marker-icon-retina-url"||n==="marker-shadow-url"||n==="marker-icon-size"||n==="marker-icon-anchor"||n==="marker-popup-anchor"}_effectiveMarkerIconConfig(){const n=(i,r)=>{this._emitError({code:"invalid_marker_icon_config",message:i,recoverable:!0,cause:r},{state:this._status.ready?"ready":this._status.state})};if(this._markerIconConfig===null)return null;if(this._markerIconConfig!==void 0)return ds(this._markerIconConfig,{reportError:n});const l=this.getAttribute("marker-icon-url");return l==null?null:us({iconUrl:l,iconRetinaUrl:this.getAttribute("marker-icon-retina-url"),shadowUrl:this.getAttribute("marker-shadow-url"),iconSize:this.getAttribute("marker-icon-size"),iconAnchor:this.getAttribute("marker-icon-anchor"),popupAnchor:this.getAttribute("marker-popup-anchor")},{reportError:n})}_syncMarkerIconConfig(){const n=this._controller;typeof(n==null?void 0:n.setMarkerIconConfig)=="function"&&n.setMarkerIconConfig(this._effectiveMarkerIconConfig())}_effectiveToolButtonConfig(){if(this._toolButtonConfig!==void 0)return this._toolButtonConfig;const n=this.getAttribute("tool-button-config");if(n==null||n.trim()==="")return null;try{const l=JSON.parse(n);if(!l||typeof l!="object"||Array.isArray(l))throw new Error("tool-button-config must be a JSON object");return l}catch(l){return this._emitError({code:"invalid_tool_button_config",message:"Failed to parse tool-button-config",recoverable:!0,cause:l},{state:this._status.ready?"ready":this._status.state}),null}}_syncToolButtonConfig(){const n=this._controller;typeof(n==null?void 0:n.setToolButtonConfig)=="function"&&n.setToolButtonConfig(this._effectiveToolButtonConfig())}_effectiveToolbarGroups(){if(this._toolbarGroups!==void 0)return this._toolbarGroups;const n=this.getAttribute("toolbar-groups");if(n==null||n.trim()==="")return null;try{const l=JSON.parse(n);if(!Array.isArray(l))throw new Error("toolbar-groups must be a JSON array");return l}catch(l){return this._emitError({code:"invalid_toolbar_groups",message:"Failed to parse toolbar-groups",recoverable:!0,cause:l},{state:this._status.ready?"ready":this._status.state}),null}}_syncToolbarGroups(){const n=this._controller;typeof(n==null?void 0:n.setToolbarGroups)=="function"&&n.setToolbarGroups(this._effectiveToolbarGroups())}get latitude(){return this._latitude}set latitude(n){this._latitude=Number(n),this._reflect("latitude",String(this._latitude))}get longitude(){return this._longitude}set longitude(n){this._longitude=Number(n),this._reflect("longitude",String(this._longitude))}get zoom(){return this._zoom}set zoom(n){this._zoom=Number(n),this._reflect("zoom",String(this._zoom))}get minZoom(){return this._minZoom}set minZoom(n){this._minZoom=n,this._reflect("min-zoom",n!=null?String(n):null)}get maxZoom(){return this._maxZoom}set maxZoom(n){this._maxZoom=n,this._reflect("max-zoom",n!=null?String(n):null)}get tileUrl(){return this._tileUrl}set tileUrl(n){this._tileUrl=n,this._reflect("tile-url",n),this._controller&&this._updateTileLayer()}get tileProvider(){return this._tileProvider}set tileProvider(n){var l;this._tileProvider=this._normalizeText(n!=null?n:null,{lowercase:!0}),this._reflect("tile-provider",(l=this._tileProvider)!=null?l:null),this._controller&&this._updateTileLayer()}get tileStyle(){return this._tileStyle}set tileStyle(n){var l;this._tileStyle=this._normalizeText(n!=null?n:null),this._reflect("tile-style",(l=this._tileStyle)!=null?l:null),this._controller&&this._updateTileLayer()}get apiKey(){return this._apiKey}set apiKey(n){var l;this._apiKey=this._normalizeText(n!=null?n:null),this._reflect("api-key",(l=this._apiKey)!=null?l:null),this.hasAttribute("here-api-key")&&this.removeAttribute("here-api-key"),this._controller&&this._updateTileLayer()}get status(){return this._cloneStatus(this._status)}get tileAttribution(){return this._tileAttribution}set tileAttribution(n){this._tileAttribution=n,this._reflect("tile-attribution",n!=null?n:null),this._controller&&this._updateTileLayer()}get readOnly(){return this._readOnly}set readOnly(n){this._readOnly=!!n,this._booleanReflect("read-only",this._readOnly)}get logLevel(){return this._logLevel}set logLevel(n){this._logLevel=n,this._logger.setLevel(n),this._reflect("log-level",n)}get devOverlay(){return this._devOverlay}set devOverlay(n){this._devOverlay=!!n,this._booleanReflect("dev-overlay",this._devOverlay)}get preferCanvas(){return this._preferCanvas}set preferCanvas(n){this._preferCanvas=!!n,this._booleanReflect("prefer-canvas",this._preferCanvas)}get useExternalLeaflet(){return this._useExternalLeaflet}set useExternalLeaflet(n){this._useExternalLeaflet=!!n,this._booleanReflect("use-external-leaflet",this._useExternalLeaflet)}get skipLeafletStyles(){return this._skipLeafletStyles}set skipLeafletStyles(n){this._skipLeafletStyles=!!n,this._booleanReflect("skip-leaflet-styles",this._skipLeafletStyles)}get markerIconConfig(){return this._markerIconConfig}set markerIconConfig(n){this._markerIconConfig=n,this._syncMarkerIconConfig()}get toolButtonConfig(){return this._toolButtonConfig}set toolButtonConfig(n){this._toolButtonConfig=n,this._syncToolButtonConfig()}get toolbarGroups(){return this._toolbarGroups}set toolbarGroups(n){this._toolbarGroups=n,this._syncToolbarGroups()}get leafletInstance(){return this._leafletInstance}set leafletInstance(n){this._leafletInstance=n}get toolHooks(){return this._toolHooks}set toolHooks(n){this._toolHooks=n;const l=this._controller;typeof(l==null?void 0:l.setToolObservers)=="function"&&l.setToolObservers({toolHooks:this._toolHooks,toolEventEmitter:this._toolEventEmitter})}get toolEventEmitter(){return this._toolEventEmitter}set toolEventEmitter(n){this._toolEventEmitter=n;const l=this._controller;typeof(l==null?void 0:l.setToolObservers)=="function"&&l.setToolObservers({toolHooks:this._toolHooks,toolEventEmitter:this._toolEventEmitter})}get themeCss(){return this._themeCss}set themeCss(n){this._themeCss=typeof n=="string"?n:"",this.isConnected&&this._applyThemeStyles()}async getGeoJSON(){return this._logger.debug("getGeoJSON"),this._controller?this._controller.getGeoJSON():{type:"FeatureCollection",features:[]}}async importGeoJSON(n,l={}){var h,d,p,m;const i=(h=l.behavior)!=null?h:"replace";if(this._logger.debug("importGeoJSON",{behavior:i,fitToData:(d=l.fitToData)!=null?d:!1,features:(m=(p=n==null?void 0:n.features)==null?void 0:p.length)!=null?m:0}),!this._controller)return[];const r=this.status;return this._setImportLoadingStatus(r),this._performImport(n,l,r,i==="add"?"Failed to add GeoJSON features to the map":"Failed to load GeoJSON into the map")}async loadGeoJSON(n){var l,i;this._logger.debug("loadGeoJSON",{features:(i=(l=n==null?void 0:n.features)==null?void 0:l.length)!=null?i:0}),await this.importGeoJSON(n,{behavior:"replace"})}async clearLayers(){this._logger.debug("clearLayers"),this._controller&&(await this._controller.clearLayers(),this._setStatus({state:"ready",ready:!0,busy:!1,featureCount:0,lastEvent:"clearLayers",lastError:null}))}async addFeatures(n){var l,i;return this._logger.debug("addFeatures",{count:(i=(l=n==null?void 0:n.features)==null?void 0:l.length)!=null?i:0}),this.importGeoJSON(n,{behavior:"add"})}async updateFeature(n,l){this._logger.debug("updateFeature",{id:n}),this._controller&&await this._controller.updateFeature(n,l)}async removeFeature(n){this._logger.debug("removeFeature",{id:n}),this._controller&&(await this._controller.removeFeature(n),await this._syncStatusFromController({state:"ready",ready:!0,busy:!1,lastEvent:"removeFeature",clearLastError:!0}))}async fitBoundsToData(n){this._logger.debug("fitBoundsToData",{padding:n}),this._controller&&await this._controller.fitBoundsToData(typeof n=="number"?n:.05)}async fitBounds(n,l){this._logger.debug("fitBounds",{bounds:n,padding:l}),this._controller&&await this._controller.fitBounds(n,typeof l=="number"?l:.05)}async setView(n,l,i){this._logger.debug("setView",{lat:n,lng:l,zoom:i}),this.latitude=n,this.longitude=l,typeof i=="number"&&(this.zoom=i),this._controller&&await this._controller.setView(n,l,i)}async exportGeoJSON(n={}){var h;const l=(h=n.adapter)!=null?h:"editing";if(this._logger.debug("exportGeoJSON",{adapter:l}),!this._controller)return{type:"FeatureCollection",features:[]};const i=await this._exportWithController(n),r={geoJSON:i,featureCount:i.features.length,adapter:l};return this.dispatchEvent(new CustomEvent(J.Export,{detail:r})),i}async mergePolygons(n){if(this._logger.debug("mergePolygons"),!this._controller)return null;const i=(await this._controller.getGeoJSON()).features.length,r=await this._controller.mergeVisiblePolygons(n);if(r){const h=await this._controller.getGeoJSON(),d={id:r,mergedFeatureCount:i-h.features.length+1,geoJSON:h};this.dispatchEvent(new CustomEvent("leaflet-draw:merged",{detail:d})),this._setStatus({state:"ready",ready:!0,busy:!1,featureCount:h.features.length,lastEvent:"leaflet-draw:merged",lastError:null})}return r}async setMeasurementUnits(n){this._logger.debug("setMeasurementUnits",{system:n}),this._controller&&this._controller.setRulerUnits(n)}async activateTool(n,l={}){var d,p;const i=(d=l.source)!=null?d:"api";if(this.dispatchEvent(new CustomEvent("leaflet-geokit:tool-trigger-requested",{bubbles:!0,composed:!0,detail:{tool:n,source:i,groupId:l.groupId,handled:!1,timestamp:Date.now()}})),!this._controller)return this._emitToolTriggerResult({tool:n,source:i,groupId:l.groupId,handled:!1,timestamp:Date.now(),error:"Map controller is not initialized"}),!1;const r=this._controller,h=typeof r.activateTool=="function"?r.activateTool.bind(r):(p=r.triggerTool)==null?void 0:p.bind(r);return h?h(n,{source:i,groupId:l.groupId}):(this._emitToolTriggerResult({tool:n,source:i,groupId:l.groupId,handled:!1,timestamp:Date.now(),error:"Map controller cannot activate tools"}),!1)}async triggerTool(n,l={}){return this.activateTool(n,l)}async deactivateTool(n={}){var h,d;const l=(h=n.source)!=null?h:"api";if(this.dispatchEvent(new CustomEvent("leaflet-geokit:tool-trigger-requested",{bubbles:!0,composed:!0,detail:{tool:"select",source:l,groupId:n.groupId,handled:!1,timestamp:Date.now()}})),!this._controller)return this._emitToolTriggerResult({tool:"select",source:l,groupId:n.groupId,handled:!1,timestamp:Date.now(),error:"Map controller is not initialized"}),!1;const i=this._controller;if(typeof i.deactivateTool=="function")return i.deactivateTool({source:l,groupId:n.groupId});const r=typeof i.activateTool=="function"?i.activateTool.bind(i):(d=i.triggerTool)==null?void 0:d.bind(i);return r?r("select",{source:l,groupId:n.groupId}):(this._emitToolTriggerResult({tool:"select",source:l,groupId:n.groupId,handled:!1,timestamp:Date.now(),error:"Map controller cannot deactivate tools"}),!1)}async loadGeoJSONFromUrl(n,l={}){var p,m,g;const i=(p=l.behavior)!=null?p:"replace";if(this._logger.debug("loadGeoJSONFromUrl",{url:n,behavior:i,fitToData:(m=l.fitToData)!=null?m:!0}),!this._controller)return;const r=this.status;this._setImportLoadingStatus(r);let h;try{h=await fetch(n,{headers:{Accept:"application/json"}})}catch(y){const w=new Error(`Failed to fetch GeoJSON from ${n}`);throw this._emitError({code:"data_fetch_failed",message:w.message,recoverable:!0,cause:y},{state:r.ready?"ready":r.state,featureCount:r.featureCount}),w}if(!h.ok){const y=new Error(`Failed to fetch GeoJSON from ${n}: ${h.status} ${h.statusText}`);throw this._emitError({code:"data_fetch_failed",message:y.message,recoverable:!0,cause:y},{state:r.ready?"ready":r.state,featureCount:r.featureCount}),y}let d;try{d=await h.json()}catch(y){const w=new Error(`Failed to parse GeoJSON from ${n}`);throw this._emitError({code:"data_parse_failed",message:w.message,recoverable:!0,cause:y},{state:r.ready?"ready":r.state,featureCount:r.featureCount}),w}await this._performImport(d,{behavior:i,fitToData:(g=l.fitToData)!=null?g:!0},r,i==="add"?`Failed to add GeoJSON from ${n}`:`Failed to load GeoJSON from ${n}`)}async loadGeoJSONFromText(n,l={}){var d,p,m,g;const i=(d=l.behavior)!=null?d:"replace";if(this._logger.debug("loadGeoJSONFromText",{behavior:i,fitToData:(p=l.fitToData)!=null?p:!0,length:(m=n==null?void 0:n.length)!=null?m:0}),!this._controller)return;const r=this.status;this._setImportLoadingStatus(r);let h;try{h=JSON.parse(n)}catch(y){const w=new Error("Failed to parse GeoJSON text");throw this._emitError({code:"data_parse_failed",message:w.message,recoverable:!0,cause:y},{state:r.ready?"ready":r.state,featureCount:r.featureCount}),w}await this._performImport(h,{behavior:i,fitToData:(g=l.fitToData)!=null?g:!0},r,i==="add"?"Failed to add parsed GeoJSON into the map":"Failed to load parsed GeoJSON into the map")}_setImportLoadingStatus(n){this._setStatus({state:"loading",ready:n.ready,busy:!0,featureCount:n.featureCount,lastEvent:J.Ingest,lastError:null})}async _performImport(n,l,i,r){var m,g;const h=(m=l.behavior)!=null?m:"replace",d={fc:n,mode:h==="add"?"add":"load"};this.dispatchEvent(new CustomEvent(J.Ingest,{detail:d}));const p=d.fc&&d.fc.type==="FeatureCollection"?d.fc:n;try{const y=await this._importWithController(p,{behavior:h,fitToData:(g=l.fitToData)!=null?g:!1});return await this._syncStatusFromController({state:"ready",ready:!0,busy:!1,lastEvent:J.Ingest,clearLastError:!0}),y}catch(y){throw this._emitError({code:h==="add"?"data_add_failed":"data_load_failed",message:r,recoverable:!0,cause:y},{state:i.ready?"ready":i.state,featureCount:i.featureCount}),y}}async _importWithController(n,l){var d,p;if(!this._controller)return[];const i=(d=l.behavior)!=null?d:"replace",r=(p=l.fitToData)!=null?p:!1,h=this._controller;return typeof h.importGeoJSON=="function"?h.importGeoJSON(n,{behavior:i,fitToData:r}):i==="add"?h.addFeatures(n):(await h.loadGeoJSON(n,r),[])}async _exportWithController(n){if(!this._controller)return{type:"FeatureCollection",features:[]};const l=this._controller;return typeof l.exportGeoJSON=="function"?l.exportGeoJSON(n):l.getGeoJSON()}_currentConfig(){return{latitude:this._latitude,longitude:this._longitude,zoom:this._zoom,minZoom:this._minZoom,maxZoom:this._maxZoom,tileUrl:this._tileUrl,tileAttribution:this._tileAttribution,readOnly:this._readOnly,fitToDataOnLoad:!1,logLevel:this._logLevel,devOverlay:this._devOverlay,polygonAllowIntersection:this._polygonAllowIntersection,preferCanvas:this._preferCanvas,useExternalLeaflet:this._useExternalLeaflet,skipLeafletStyles:this._skipLeafletStyles}}_applyThemeStyles(){var i;const n=(i=this._themeUrl)==null?void 0:i.trim();if(n){if(!this._themeLinkEl){const r=document.createElement("link");r.setAttribute("rel","stylesheet"),r.setAttribute("data-geokit-theme-url","true"),this._root.appendChild(r),this._themeLinkEl=r}this._themeLinkEl.getAttribute("href")!==n&&this._themeLinkEl.setAttribute("href",n)}else this._themeLinkEl&&(this._themeLinkEl.remove(),this._themeLinkEl=null);const l=this._themeCss;if(l.trim().length>0){if(!this._themeStyleEl){const r=document.createElement("style");r.setAttribute("data-geokit-theme-css","true"),this._root.appendChild(r),this._themeStyleEl=r}this._themeStyleEl.textContent!==l&&(this._themeStyleEl.textContent=l)}else this._themeStyleEl&&(this._themeStyleEl.remove(),this._themeStyleEl=null)}_emitToolTriggerResult(n){this.dispatchEvent(new CustomEvent(n.handled?"leaflet-geokit:tool-triggered":"leaflet-geokit:tool-trigger-failed",{bubbles:!0,composed:!0,detail:n}))}_syncStatusFromController(n){const l=this._controller;return!l||typeof l.getGeoJSON!="function"?(this._setStatus({state:n.state,ready:n.ready,busy:n.busy,featureCount:this._status.featureCount,lastEvent:n.lastEvent,lastError:n.clearLastError?null:void 0}),Promise.resolve()):l.getGeoJSON().then(i=>{this._setStatus({state:n.state,ready:n.ready,busy:n.busy,featureCount:i.features.length,lastEvent:n.lastEvent,lastError:n.clearLastError?null:void 0})}).catch(()=>{this._setStatus({state:n.state,ready:n.ready,busy:n.busy,lastEvent:n.lastEvent,lastError:n.clearLastError?null:void 0})})}_emitError(n,l){var r;const i={...n,timestamp:Date.now()};return this.dispatchEvent(new CustomEvent(J.Error,{detail:i})),this._emitDiagnostic({code:i.code,message:i.message,recoverable:i.recoverable,severity:i.recoverable?"warn":"error",cause:i.cause,timestamp:i.timestamp},{state:l.state,featureCount:l.featureCount,lastEvent:(r=l.lastEvent)!=null?r:J.Error}),i}_emitDiagnostic(n,l){var r,h;const i={...n,state:l.state};return this.dispatchEvent(new CustomEvent(Le.Diagnostic,{detail:i})),this._setStatus({state:l.state,ready:l.state==="ready",busy:l.state==="initializing"||l.state==="loading",featureCount:(r=l.featureCount)!=null?r:this._status.featureCount,lastEvent:(h=l.lastEvent)!=null?h:Le.Diagnostic,lastError:{code:i.code,message:i.message,recoverable:i.recoverable,timestamp:i.timestamp}}),i}_setStatus(n){const l={...this._status,...n,lastError:n.lastError===null?void 0:n.lastError!==void 0?{...n.lastError}:this._status.lastError?{...this._status.lastError}:void 0,timestamp:Date.now()};this._status=l,this.dispatchEvent(new CustomEvent(Le.Status,{detail:this._cloneStatus(l)}))}_cloneStatus(n){return{...n,lastError:n.lastError?{...n.lastError}:void 0}}_syncApiKeyFromAttributes(){const n=this._normalizeText(this.getAttribute("api-key")),l=this._normalizeText(this.getAttribute("here-api-key"));this._apiKey=n!=null?n:l}_normalizeText(n,l){if(typeof n!="string")return;const i=n.trim();if(i)return l!=null&&l.lowercase?i.toLowerCase():i}_resolveTileProviderErrorCode(n){return n instanceof Error&&n.message.toLowerCase().includes("unknown tile provider")?"unknown_provider":"tile_load_failed"}_resolveHereTileLayerErrorCode(n){const l=n.toLowerCase();return l.includes("permission")||l.includes("forbidden")||l.includes("403")||l.includes("unauthorized")||l.includes("not authorized")||l.includes("not authorised")||l.includes("access denied")?"permission_denied":"invalid_api_key"}_describeTileLayerError(n,l){if(n&&typeof n=="object"&&"error"in n&&n.error instanceof Error)return n.error.message;if(n instanceof Error&&n.message)return n.message;if(n&&typeof n=="object"&&"message"in n&&typeof n.message=="string"){const i=n.message.trim();if(i.length>0)return i}return l==="here"?`Failed to load HERE tiles; verify API key, project permissions, and allowed localhost origin/referrer.${this._tileStyle==="satellite.day"?" If satellite.day fails, try lite.day.":""}`:"Failed to load tile layer"}_reflect(n,l){l===null?this.removeAttribute(n):this.getAttribute(n)!==l&&this.setAttribute(n,l)}_booleanReflect(n,l){l?this.hasAttribute(n)||this.setAttribute(n,""):this.hasAttribute(n)&&this.removeAttribute(n)}_coerceNumber(n,l){if(n==null)return l!=null?l:NaN;const i=Number(n);return Number.isFinite(i)?i:l!=null?l:NaN}}const wo="leaflet-geokit";customElements.get(wo)||customElements.define(wo,mi);const xo="leaflet-draw-map";if(!customElements.get(xo)){class u extends mi{}customElements.define(xo,u)}ct.DrawEvent=J,ct.GeoKitEvent=Le,ct.LeafletDrawMapElement=mi,Object.defineProperty(ct,Symbol.toStringTag,{value:"Module"})}));
302
+ `;const n=this._root.querySelector(".map-container");if(!(n instanceof HTMLDivElement))throw new Error("Failed to initialize map container");this._container=n;const h=this.getAttribute("log-level");h&&(this._logLevel=h,this._logger.setLevel(h))}_controlsFromAttributes(){return{polygon:this.hasAttribute("draw-polygon"),polyline:this.hasAttribute("draw-polyline"),rectangle:this.hasAttribute("draw-rectangle"),circle:this.hasAttribute("draw-circle"),cake:this.hasAttribute("draw-layer-cake"),marker:this.hasAttribute("draw-marker"),move:this.hasAttribute("draw-move"),edit:this.hasAttribute("edit-features"),delete:this.hasAttribute("delete-features"),ruler:this.hasAttribute("draw-ruler")}}_mapConfig(){return{latitude:this._latitude,longitude:this._longitude,zoom:this._zoom,minZoom:this._minZoom,maxZoom:this._maxZoom,tileUrl:this._tileUrl,tileAttribution:this._tileAttribution,readOnly:this._readOnly,fitToDataOnLoad:!1,logLevel:this._logLevel,devOverlay:this._devOverlay,polygonAllowIntersection:this._polygonAllowIntersection,preferCanvas:this._preferCanvas,useExternalLeaflet:this._useExternalLeaflet,skipLeafletStyles:this._skipLeafletStyles}}async connectedCallback(){var n;this._logger.debug("connectedCallback",this._currentConfig()),this._setStatus({state:"initializing",ready:!1,busy:!0,featureCount:0,lastEvent:"connected",lastError:null}),Qn({root:this._root,skipStyles:this._skipLeafletStyles}),this._applyThemeStyles(),this._controller=new ca({container:this._container,map:this._mapConfig(),controls:this._controlsFromAttributes(),readOnly:this._readOnly,logger:this._logger.child("controller"),callbacks:{onReady:h=>{this.dispatchEvent(new CustomEvent(J.Ready,{detail:h})),this._syncStatusFromController({state:"ready",ready:!0,busy:!1,lastEvent:J.Ready,clearLastError:!0})},onCreated:h=>{this.dispatchEvent(new CustomEvent(J.Created,{detail:h})),this._setStatus({state:"ready",ready:!0,busy:!1,featureCount:this._status.featureCount+1,lastEvent:J.Created,lastError:null})},onEdited:h=>{this.dispatchEvent(new CustomEvent(J.Edited,{detail:h})),this._setStatus({state:"ready",ready:!0,busy:!1,featureCount:h.geoJSON.features.length,lastEvent:J.Edited,lastError:null})},onDeleted:h=>{this.dispatchEvent(new CustomEvent(J.Deleted,{detail:h})),this._setStatus({state:"ready",ready:!0,busy:!1,featureCount:h.geoJSON.features.length,lastEvent:J.Deleted,lastError:null})},onError:h=>{this._emitError(h,{state:h.recoverable?this._status.ready?"ready":this._status.state:"error",lastEvent:J.Error})},onTileError:h=>{if(this._tileProvider)return;const i=this._describeTileLayerError(h,"tile-url");this._handleTileProviderError("tile_load_failed",i,"tile-url")},onToolTrigger:h=>{this._emitToolTriggerResult(h)},onSaved:h=>{this.dispatchEvent(new CustomEvent(J.Export,{detail:{geoJSON:h.geoJSON,featureCount:h.featureCount,adapter:"editing"}})),this._setStatus({state:"ready",ready:!0,busy:!1,featureCount:h.featureCount,lastEvent:J.Export,lastError:null})}},leaflet:(n=this._leafletInstance)!=null?n:void 0,useExternalLeaflet:this._useExternalLeaflet,toolHooks:this._toolHooks,toolEventEmitter:this._toolEventEmitter,markerIconConfig:this._effectiveMarkerIconConfig(),toolButtonConfig:this._effectiveToolButtonConfig(),toolbarGroups:this._effectiveToolbarGroups()}),this.addEventListener("leaflet-geokit:trigger-tool",this._externalToolTriggerListener),this.addEventListener("leaflet-geokit:activate-tool",this._externalToolTriggerListener),this.addEventListener("leaflet-geokit:deactivate-tool",this._externalToolDeactivateListener),await this._controller.init(),this._status.state!=="error"&&this._tileProvider&&this._updateTileLayer()}async disconnectedCallback(){this._logger.debug("disconnectedCallback"),this._controller&&(await this._controller.destroy(),this._controller=null),this.removeEventListener("leaflet-geokit:trigger-tool",this._externalToolTriggerListener),this.removeEventListener("leaflet-geokit:activate-tool",this._externalToolTriggerListener),this.removeEventListener("leaflet-geokit:deactivate-tool",this._externalToolDeactivateListener),this._setStatus({state:"uninitialized",ready:!1,busy:!1,featureCount:0,lastEvent:"disconnected",lastError:null})}static get observedAttributes(){return["latitude","longitude","zoom","min-zoom","max-zoom","tile-url","tile-attribution","tile-provider","tile-style","api-key","here-api-key","read-only","log-level","dev-overlay","prefer-canvas","use-external-leaflet","skip-leaflet-styles","marker-icon-url","marker-icon-retina-url","marker-shadow-url","marker-icon-size","marker-icon-anchor","marker-popup-anchor","tool-button-config","toolbar-groups","theme-url","draw-polygon","draw-polyline","draw-rectangle","draw-circle","draw-layer-cake","draw-marker","draw-move","draw-ruler","edit-features","delete-features","polygon-allow-intersection"]}attributeChangedCallback(n,h,i){switch(this._logger.debug("attributeChanged",{name:n,value:i}),n){case"latitude":this._latitude=this._coerceNumber(i,0);break;case"longitude":this._longitude=this._coerceNumber(i,0);break;case"zoom":this._zoom=this._coerceNumber(i,2);break;case"min-zoom":this._minZoom=i!=null?this._coerceNumber(i):void 0;break;case"max-zoom":this._maxZoom=i!=null?this._coerceNumber(i):void 0;break;case"tile-url":this._tileUrl=i!=null?i:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",this._controller&&this._updateTileLayer();break;case"tile-attribution":this._tileAttribution=i!=null?i:void 0,this._controller&&this._updateTileLayer();break;case"tile-provider":this._tileProvider=this._normalizeText(i,{lowercase:!0}),this._controller&&this._updateTileLayer();break;case"tile-style":this._tileStyle=this._normalizeText(i),this._controller&&this._updateTileLayer();break;case"api-key":case"here-api-key":this._syncApiKeyFromAttributes(),this._controller&&this._updateTileLayer();break;case"theme-url":this._themeUrl=i!=null?i:void 0,this.isConnected&&this._applyThemeStyles();break;case"read-only":this._readOnly=i!==null;break;case"log-level":this._logLevel=i!=null?i:this._logLevel,this._logger.setLevel(this._logLevel);break;case"dev-overlay":this._devOverlay=i!==null;break;case"polygon-allow-intersection":this._polygonAllowIntersection=i!==null;break;case"prefer-canvas":this._preferCanvas=i!==null;break;case"use-external-leaflet":this._useExternalLeaflet=i!==null;break;case"skip-leaflet-styles":this._skipLeafletStyles=i!==null;break}this._controller&&(n==="latitude"||n==="longitude"||n==="zoom"?this._controller.setView(this._latitude,this._longitude,this._zoom):this._isMarkerIconAttribute(n)?this._syncMarkerIconConfig():n==="tool-button-config"?this._syncToolButtonConfig():n==="toolbar-groups"?this._syncToolbarGroups():(n==="min-zoom"||n==="max-zoom"||n==="read-only"||n==="dev-overlay"||n==="log-level"||n==="prefer-canvas"||n==="use-external-leaflet"||n==="skip-leaflet-styles"||n.startsWith("draw-")||n==="edit-features"||n==="delete-features")&&this._controller.destroy().then(()=>this._controller.init()))}_updateTileLayer(){var h,i,r,l;if(!this._controller)return;const n=this._controller;if(typeof n.setTileLayer!="function"){this._logger.warn("setTileLayer is not available on MapController yet");return}try{if(this._tileProvider){const d=this._tileProvider,p={provider:d,style:this._tileStyle,apiKey:this._apiKey,attribution:this._tileAttribution},m=pa(p);if(!m.valid){const w=(h=m.error)!=null&&h.toLowerCase().includes("api key")?"missing_api_key":"tile_load_failed";this._handleTileProviderError(w,(i=m.error)!=null?i:"Invalid tile provider configuration",d);return}const _=fa(p),y=this._activeTileProvider;n.setTileLayer(_,{onTileError:w=>{if(this._tileProvider!==d)return;const T=this._describeTileLayerError(w,d),E=d==="here"?this._resolveHereTileLayerErrorCode(T):"tile_load_failed";this._handleTileProviderError(E,T,d)}}),this._activeTileProvider=d,this._emitTileProviderChanged(d,this._tileStyle,y);return}n.setTileLayer({urlTemplate:this._tileUrl,attribution:(r=this._tileAttribution)!=null?r:"",maxZoom:this._maxZoom,subdomains:["a","b","c"]},{onTileError:d=>{const p=this._describeTileLayerError(d,"tile-url");this._handleTileProviderError("tile_load_failed",p,"tile-url")}}),this._activeTileProvider="tile-url"}catch(d){const p=this._resolveTileProviderErrorCode(d);this._logger.error("Failed to update tile layer",{error:d,code:p}),this._handleTileProviderError(p,d instanceof Error?d.message:"Unknown tile layer error",(l=this._tileProvider)!=null?l:"unknown")}}_handleTileProviderError(n,h,i){this._logger.error(`Tile provider error (${n}): ${h}`);const r=Date.now();this.dispatchEvent(new CustomEvent("tile-provider-error",{bubbles:!0,detail:{code:n,message:h,provider:i,timestamp:r}})),this._emitDiagnostic({code:n,message:h,recoverable:!0,severity:"warn",timestamp:r},{state:this._status.ready?"ready":this._status.state,lastEvent:"tile-provider-error"});const l=this._controller;typeof l.setTileLayer=="function"&&(l.setTileLayer({urlTemplate:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',maxZoom:19,subdomains:["a","b","c"]}),this._activeTileProvider="osm")}_emitTileProviderChanged(n,h,i){this.dispatchEvent(new CustomEvent("tile-provider-changed",{bubbles:!0,detail:{provider:n,style:h,previousProvider:i,timestamp:Date.now()}}))}_isMarkerIconAttribute(n){return n==="marker-icon-url"||n==="marker-icon-retina-url"||n==="marker-shadow-url"||n==="marker-icon-size"||n==="marker-icon-anchor"||n==="marker-popup-anchor"}_effectiveMarkerIconConfig(){const n=(i,r)=>{this._emitError({code:"invalid_marker_icon_config",message:i,recoverable:!0,cause:r},{state:this._status.ready?"ready":this._status.state})};if(this._markerIconConfig===null)return null;if(this._markerIconConfig!==void 0)return da(this._markerIconConfig,{reportError:n});const h=this.getAttribute("marker-icon-url");return h==null?null:ua({iconUrl:h,iconRetinaUrl:this.getAttribute("marker-icon-retina-url"),shadowUrl:this.getAttribute("marker-shadow-url"),iconSize:this.getAttribute("marker-icon-size"),iconAnchor:this.getAttribute("marker-icon-anchor"),popupAnchor:this.getAttribute("marker-popup-anchor")},{reportError:n})}_syncMarkerIconConfig(){const n=this._controller;typeof(n==null?void 0:n.setMarkerIconConfig)=="function"&&n.setMarkerIconConfig(this._effectiveMarkerIconConfig())}_effectiveToolButtonConfig(){if(this._toolButtonConfig!==void 0)return this._toolButtonConfig;const n=this.getAttribute("tool-button-config");if(n==null||n.trim()==="")return null;try{const h=JSON.parse(n);if(!h||typeof h!="object"||Array.isArray(h))throw new Error("tool-button-config must be a JSON object");return h}catch(h){return this._emitError({code:"invalid_tool_button_config",message:"Failed to parse tool-button-config",recoverable:!0,cause:h},{state:this._status.ready?"ready":this._status.state}),null}}_syncToolButtonConfig(){const n=this._controller;typeof(n==null?void 0:n.setToolButtonConfig)=="function"&&n.setToolButtonConfig(this._effectiveToolButtonConfig())}_effectiveToolbarGroups(){if(this._toolbarGroups!==void 0)return this._toolbarGroups;const n=this.getAttribute("toolbar-groups");if(n==null||n.trim()==="")return null;try{const h=JSON.parse(n);if(!Array.isArray(h))throw new Error("toolbar-groups must be a JSON array");return h}catch(h){return this._emitError({code:"invalid_toolbar_groups",message:"Failed to parse toolbar-groups",recoverable:!0,cause:h},{state:this._status.ready?"ready":this._status.state}),null}}_syncToolbarGroups(){const n=this._controller;typeof(n==null?void 0:n.setToolbarGroups)=="function"&&n.setToolbarGroups(this._effectiveToolbarGroups())}get latitude(){return this._latitude}set latitude(n){this._latitude=Number(n),this._reflect("latitude",String(this._latitude))}get longitude(){return this._longitude}set longitude(n){this._longitude=Number(n),this._reflect("longitude",String(this._longitude))}get zoom(){return this._zoom}set zoom(n){this._zoom=Number(n),this._reflect("zoom",String(this._zoom))}get minZoom(){return this._minZoom}set minZoom(n){this._minZoom=n,this._reflect("min-zoom",n!=null?String(n):null)}get maxZoom(){return this._maxZoom}set maxZoom(n){this._maxZoom=n,this._reflect("max-zoom",n!=null?String(n):null)}get tileUrl(){return this._tileUrl}set tileUrl(n){this._tileUrl=n,this._reflect("tile-url",n),this._controller&&this._updateTileLayer()}get tileProvider(){return this._tileProvider}set tileProvider(n){var h;this._tileProvider=this._normalizeText(n!=null?n:null,{lowercase:!0}),this._reflect("tile-provider",(h=this._tileProvider)!=null?h:null),this._controller&&this._updateTileLayer()}get tileStyle(){return this._tileStyle}set tileStyle(n){var h;this._tileStyle=this._normalizeText(n!=null?n:null),this._reflect("tile-style",(h=this._tileStyle)!=null?h:null),this._controller&&this._updateTileLayer()}get apiKey(){return this._apiKey}set apiKey(n){var h;this._apiKey=this._normalizeText(n!=null?n:null),this._reflect("api-key",(h=this._apiKey)!=null?h:null),this.hasAttribute("here-api-key")&&this.removeAttribute("here-api-key"),this._controller&&this._updateTileLayer()}get status(){return this._cloneStatus(this._status)}get tileAttribution(){return this._tileAttribution}set tileAttribution(n){this._tileAttribution=n,this._reflect("tile-attribution",n!=null?n:null),this._controller&&this._updateTileLayer()}get readOnly(){return this._readOnly}set readOnly(n){this._readOnly=!!n,this._booleanReflect("read-only",this._readOnly)}get logLevel(){return this._logLevel}set logLevel(n){this._logLevel=n,this._logger.setLevel(n),this._reflect("log-level",n)}get devOverlay(){return this._devOverlay}set devOverlay(n){this._devOverlay=!!n,this._booleanReflect("dev-overlay",this._devOverlay)}get preferCanvas(){return this._preferCanvas}set preferCanvas(n){this._preferCanvas=!!n,this._booleanReflect("prefer-canvas",this._preferCanvas)}get useExternalLeaflet(){return this._useExternalLeaflet}set useExternalLeaflet(n){this._useExternalLeaflet=!!n,this._booleanReflect("use-external-leaflet",this._useExternalLeaflet)}get skipLeafletStyles(){return this._skipLeafletStyles}set skipLeafletStyles(n){this._skipLeafletStyles=!!n,this._booleanReflect("skip-leaflet-styles",this._skipLeafletStyles)}get markerIconConfig(){return this._markerIconConfig}set markerIconConfig(n){this._markerIconConfig=n,this._syncMarkerIconConfig()}get toolButtonConfig(){return this._toolButtonConfig}set toolButtonConfig(n){this._toolButtonConfig=n,this._syncToolButtonConfig()}get toolbarGroups(){return this._toolbarGroups}set toolbarGroups(n){this._toolbarGroups=n,this._syncToolbarGroups()}get leafletInstance(){return this._leafletInstance}set leafletInstance(n){this._leafletInstance=n}get toolHooks(){return this._toolHooks}set toolHooks(n){this._toolHooks=n;const h=this._controller;typeof(h==null?void 0:h.setToolObservers)=="function"&&h.setToolObservers({toolHooks:this._toolHooks,toolEventEmitter:this._toolEventEmitter})}get toolEventEmitter(){return this._toolEventEmitter}set toolEventEmitter(n){this._toolEventEmitter=n;const h=this._controller;typeof(h==null?void 0:h.setToolObservers)=="function"&&h.setToolObservers({toolHooks:this._toolHooks,toolEventEmitter:this._toolEventEmitter})}get themeCss(){return this._themeCss}set themeCss(n){this._themeCss=typeof n=="string"?n:"",this.isConnected&&this._applyThemeStyles()}async getGeoJSON(){return this._logger.debug("getGeoJSON"),this._controller?this._controller.getGeoJSON():{type:"FeatureCollection",features:[]}}async importGeoJSON(n,h={}){var l,d,p,m;const i=(l=h.behavior)!=null?l:"replace";if(this._logger.debug("importGeoJSON",{behavior:i,fitToData:(d=h.fitToData)!=null?d:!1,features:(m=(p=n==null?void 0:n.features)==null?void 0:p.length)!=null?m:0}),!this._controller)return[];const r=this.status;return this._setImportLoadingStatus(r),this._performImport(n,h,r,i==="add"?"Failed to add GeoJSON features to the map":"Failed to load GeoJSON into the map")}async loadGeoJSON(n){var h,i;this._logger.debug("loadGeoJSON",{features:(i=(h=n==null?void 0:n.features)==null?void 0:h.length)!=null?i:0}),await this.importGeoJSON(n,{behavior:"replace"})}async clearLayers(){this._logger.debug("clearLayers"),this._controller&&(await this._controller.clearLayers(),this._setStatus({state:"ready",ready:!0,busy:!1,featureCount:0,lastEvent:"clearLayers",lastError:null}))}async addFeatures(n){var h,i;return this._logger.debug("addFeatures",{count:(i=(h=n==null?void 0:n.features)==null?void 0:h.length)!=null?i:0}),this.importGeoJSON(n,{behavior:"add"})}async updateFeature(n,h){this._logger.debug("updateFeature",{id:n}),this._controller&&await this._controller.updateFeature(n,h)}async removeFeature(n){this._logger.debug("removeFeature",{id:n}),this._controller&&(await this._controller.removeFeature(n),await this._syncStatusFromController({state:"ready",ready:!0,busy:!1,lastEvent:"removeFeature",clearLastError:!0}))}async fitBoundsToData(n){this._logger.debug("fitBoundsToData",{padding:n}),this._controller&&await this._controller.fitBoundsToData(typeof n=="number"?n:.05)}async fitBounds(n,h){this._logger.debug("fitBounds",{bounds:n,padding:h}),this._controller&&await this._controller.fitBounds(n,typeof h=="number"?h:.05)}async setView(n,h,i){this._logger.debug("setView",{lat:n,lng:h,zoom:i}),this.latitude=n,this.longitude=h,typeof i=="number"&&(this.zoom=i),this._controller&&await this._controller.setView(n,h,i)}async exportGeoJSON(n={}){var l;const h=(l=n.adapter)!=null?l:"editing";if(this._logger.debug("exportGeoJSON",{adapter:h}),!this._controller)return{type:"FeatureCollection",features:[]};const i=await this._exportWithController(n),r={geoJSON:i,featureCount:i.features.length,adapter:h};return this.dispatchEvent(new CustomEvent(J.Export,{detail:r})),i}async mergePolygons(n){if(this._logger.debug("mergePolygons"),!this._controller)return null;const i=(await this._controller.getGeoJSON()).features.length,r=await this._controller.mergeVisiblePolygons(n);if(r){const l=await this._controller.getGeoJSON(),d={id:r,mergedFeatureCount:i-l.features.length+1,geoJSON:l};this.dispatchEvent(new CustomEvent("leaflet-draw:merged",{detail:d})),this._setStatus({state:"ready",ready:!0,busy:!1,featureCount:l.features.length,lastEvent:"leaflet-draw:merged",lastError:null})}return r}async setMeasurementUnits(n){this._logger.debug("setMeasurementUnits",{system:n}),this._controller&&this._controller.setRulerUnits(n)}async activateTool(n,h={}){var d,p;const i=(d=h.source)!=null?d:"api";if(this.dispatchEvent(new CustomEvent("leaflet-geokit:tool-trigger-requested",{bubbles:!0,composed:!0,detail:{tool:n,source:i,groupId:h.groupId,handled:!1,timestamp:Date.now()}})),!this._controller)return this._emitToolTriggerResult({tool:n,source:i,groupId:h.groupId,handled:!1,timestamp:Date.now(),error:"Map controller is not initialized"}),!1;const r=this._controller,l=typeof r.activateTool=="function"?r.activateTool.bind(r):(p=r.triggerTool)==null?void 0:p.bind(r);return l?l(n,{source:i,groupId:h.groupId}):(this._emitToolTriggerResult({tool:n,source:i,groupId:h.groupId,handled:!1,timestamp:Date.now(),error:"Map controller cannot activate tools"}),!1)}async triggerTool(n,h={}){return this.activateTool(n,h)}async deactivateTool(n={}){var l,d;const h=(l=n.source)!=null?l:"api";if(this.dispatchEvent(new CustomEvent("leaflet-geokit:tool-trigger-requested",{bubbles:!0,composed:!0,detail:{tool:"select",source:h,groupId:n.groupId,handled:!1,timestamp:Date.now()}})),!this._controller)return this._emitToolTriggerResult({tool:"select",source:h,groupId:n.groupId,handled:!1,timestamp:Date.now(),error:"Map controller is not initialized"}),!1;const i=this._controller;if(typeof i.deactivateTool=="function")return i.deactivateTool({source:h,groupId:n.groupId});const r=typeof i.activateTool=="function"?i.activateTool.bind(i):(d=i.triggerTool)==null?void 0:d.bind(i);return r?r("select",{source:h,groupId:n.groupId}):(this._emitToolTriggerResult({tool:"select",source:h,groupId:n.groupId,handled:!1,timestamp:Date.now(),error:"Map controller cannot deactivate tools"}),!1)}async loadGeoJSONFromUrl(n,h={}){var p,m,_;const i=(p=h.behavior)!=null?p:"replace";if(this._logger.debug("loadGeoJSONFromUrl",{url:n,behavior:i,fitToData:(m=h.fitToData)!=null?m:!0}),!this._controller)return;const r=this.status;this._setImportLoadingStatus(r);let l;try{l=await fetch(n,{headers:{Accept:"application/json"}})}catch(y){const w=new Error(`Failed to fetch GeoJSON from ${n}`);throw this._emitError({code:"data_fetch_failed",message:w.message,recoverable:!0,cause:y},{state:r.ready?"ready":r.state,featureCount:r.featureCount}),w}if(!l.ok){const y=new Error(`Failed to fetch GeoJSON from ${n}: ${l.status} ${l.statusText}`);throw this._emitError({code:"data_fetch_failed",message:y.message,recoverable:!0,cause:y},{state:r.ready?"ready":r.state,featureCount:r.featureCount}),y}let d;try{d=await l.json()}catch(y){const w=new Error(`Failed to parse GeoJSON from ${n}`);throw this._emitError({code:"data_parse_failed",message:w.message,recoverable:!0,cause:y},{state:r.ready?"ready":r.state,featureCount:r.featureCount}),w}await this._performImport(d,{behavior:i,fitToData:(_=h.fitToData)!=null?_:!0},r,i==="add"?`Failed to add GeoJSON from ${n}`:`Failed to load GeoJSON from ${n}`)}async loadGeoJSONFromText(n,h={}){var d,p,m,_;const i=(d=h.behavior)!=null?d:"replace";if(this._logger.debug("loadGeoJSONFromText",{behavior:i,fitToData:(p=h.fitToData)!=null?p:!0,length:(m=n==null?void 0:n.length)!=null?m:0}),!this._controller)return;const r=this.status;this._setImportLoadingStatus(r);let l;try{l=JSON.parse(n)}catch(y){const w=new Error("Failed to parse GeoJSON text");throw this._emitError({code:"data_parse_failed",message:w.message,recoverable:!0,cause:y},{state:r.ready?"ready":r.state,featureCount:r.featureCount}),w}await this._performImport(l,{behavior:i,fitToData:(_=h.fitToData)!=null?_:!0},r,i==="add"?"Failed to add parsed GeoJSON into the map":"Failed to load parsed GeoJSON into the map")}_setImportLoadingStatus(n){this._setStatus({state:"loading",ready:n.ready,busy:!0,featureCount:n.featureCount,lastEvent:J.Ingest,lastError:null})}async _performImport(n,h,i,r){var m,_;const l=(m=h.behavior)!=null?m:"replace",d={fc:n,mode:l==="add"?"add":"load"};this.dispatchEvent(new CustomEvent(J.Ingest,{detail:d}));const p=d.fc&&d.fc.type==="FeatureCollection"?d.fc:n;try{const y=await this._importWithController(p,{behavior:l,fitToData:(_=h.fitToData)!=null?_:!1});return await this._syncStatusFromController({state:"ready",ready:!0,busy:!1,lastEvent:J.Ingest,clearLastError:!0}),y}catch(y){throw this._emitError({code:l==="add"?"data_add_failed":"data_load_failed",message:r,recoverable:!0,cause:y},{state:i.ready?"ready":i.state,featureCount:i.featureCount}),y}}async _importWithController(n,h){var d,p;if(!this._controller)return[];const i=(d=h.behavior)!=null?d:"replace",r=(p=h.fitToData)!=null?p:!1,l=this._controller;return typeof l.importGeoJSON=="function"?l.importGeoJSON(n,{behavior:i,fitToData:r}):i==="add"?l.addFeatures(n):(await l.loadGeoJSON(n,r),[])}async _exportWithController(n){if(!this._controller)return{type:"FeatureCollection",features:[]};const h=this._controller;return typeof h.exportGeoJSON=="function"?h.exportGeoJSON(n):h.getGeoJSON()}_currentConfig(){return{latitude:this._latitude,longitude:this._longitude,zoom:this._zoom,minZoom:this._minZoom,maxZoom:this._maxZoom,tileUrl:this._tileUrl,tileAttribution:this._tileAttribution,readOnly:this._readOnly,fitToDataOnLoad:!1,logLevel:this._logLevel,devOverlay:this._devOverlay,polygonAllowIntersection:this._polygonAllowIntersection,preferCanvas:this._preferCanvas,useExternalLeaflet:this._useExternalLeaflet,skipLeafletStyles:this._skipLeafletStyles}}_applyThemeStyles(){var i;const n=(i=this._themeUrl)==null?void 0:i.trim();if(n){if(!this._themeLinkEl){const r=document.createElement("link");r.setAttribute("rel","stylesheet"),r.setAttribute("data-geokit-theme-url","true"),this._root.appendChild(r),this._themeLinkEl=r}this._themeLinkEl.getAttribute("href")!==n&&this._themeLinkEl.setAttribute("href",n)}else this._themeLinkEl&&(this._themeLinkEl.remove(),this._themeLinkEl=null);const h=this._themeCss;if(h.trim().length>0){if(!this._themeStyleEl){const r=document.createElement("style");r.setAttribute("data-geokit-theme-css","true"),this._root.appendChild(r),this._themeStyleEl=r}this._themeStyleEl.textContent!==h&&(this._themeStyleEl.textContent=h)}else this._themeStyleEl&&(this._themeStyleEl.remove(),this._themeStyleEl=null)}_emitToolTriggerResult(n){this.dispatchEvent(new CustomEvent(n.handled?"leaflet-geokit:tool-triggered":"leaflet-geokit:tool-trigger-failed",{bubbles:!0,composed:!0,detail:n}))}_syncStatusFromController(n){const h=this._controller;return!h||typeof h.getGeoJSON!="function"?(this._setStatus({state:n.state,ready:n.ready,busy:n.busy,featureCount:this._status.featureCount,lastEvent:n.lastEvent,lastError:n.clearLastError?null:void 0}),Promise.resolve()):h.getGeoJSON().then(i=>{this._setStatus({state:n.state,ready:n.ready,busy:n.busy,featureCount:i.features.length,lastEvent:n.lastEvent,lastError:n.clearLastError?null:void 0})}).catch(()=>{this._setStatus({state:n.state,ready:n.ready,busy:n.busy,lastEvent:n.lastEvent,lastError:n.clearLastError?null:void 0})})}_emitError(n,h){var r;const i={...n,timestamp:Date.now()};return this.dispatchEvent(new CustomEvent(J.Error,{detail:i})),this._emitDiagnostic({code:i.code,message:i.message,recoverable:i.recoverable,severity:i.recoverable?"warn":"error",cause:i.cause,timestamp:i.timestamp},{state:h.state,featureCount:h.featureCount,lastEvent:(r=h.lastEvent)!=null?r:J.Error}),i}_emitDiagnostic(n,h){var r,l;const i={...n,state:h.state};return this.dispatchEvent(new CustomEvent(Le.Diagnostic,{detail:i})),this._setStatus({state:h.state,ready:h.state==="ready",busy:h.state==="initializing"||h.state==="loading",featureCount:(r=h.featureCount)!=null?r:this._status.featureCount,lastEvent:(l=h.lastEvent)!=null?l:Le.Diagnostic,lastError:{code:i.code,message:i.message,recoverable:i.recoverable,timestamp:i.timestamp}}),i}_setStatus(n){const h={...this._status,...n,lastError:n.lastError===null?void 0:n.lastError!==void 0?{...n.lastError}:this._status.lastError?{...this._status.lastError}:void 0,timestamp:Date.now()};this._status=h,this.dispatchEvent(new CustomEvent(Le.Status,{detail:this._cloneStatus(h)}))}_cloneStatus(n){return{...n,lastError:n.lastError?{...n.lastError}:void 0}}_syncApiKeyFromAttributes(){const n=this._normalizeText(this.getAttribute("api-key")),h=this._normalizeText(this.getAttribute("here-api-key"));this._apiKey=n!=null?n:h}_normalizeText(n,h){if(typeof n!="string")return;const i=n.trim();if(i)return h!=null&&h.lowercase?i.toLowerCase():i}_resolveTileProviderErrorCode(n){return n instanceof Error&&n.message.toLowerCase().includes("unknown tile provider")?"unknown_provider":"tile_load_failed"}_resolveHereTileLayerErrorCode(n){const h=n.toLowerCase();return h.includes("permission")||h.includes("forbidden")||h.includes("403")||h.includes("unauthorized")||h.includes("not authorized")||h.includes("not authorised")||h.includes("access denied")?"permission_denied":"invalid_api_key"}_describeTileLayerError(n,h){if(n&&typeof n=="object"&&"error"in n&&n.error instanceof Error)return n.error.message;if(n instanceof Error&&n.message)return n.message;if(n&&typeof n=="object"&&"message"in n&&typeof n.message=="string"){const i=n.message.trim();if(i.length>0)return i}return h==="here"?`Failed to load HERE tiles; verify API key, project permissions, and allowed localhost origin/referrer.${this._tileStyle==="satellite.day"?" If satellite.day fails, try lite.day.":""}`:"Failed to load tile layer"}_reflect(n,h){h===null?this.removeAttribute(n):this.getAttribute(n)!==h&&this.setAttribute(n,h)}_booleanReflect(n,h){h?this.hasAttribute(n)||this.setAttribute(n,""):this.hasAttribute(n)&&this.removeAttribute(n)}_coerceNumber(n,h){if(n==null)return h!=null?h:NaN;const i=Number(n);return Number.isFinite(i)?i:h!=null?h:NaN}}const wo="leaflet-geokit";customElements.get(wo)||customElements.define(wo,mi);const xo="leaflet-draw-map";if(!customElements.get(xo)){class u extends mi{}customElements.define(xo,u)}ct.DrawEvent=J,ct.GeoKitEvent=Le,ct.LeafletDrawMapElement=mi,Object.defineProperty(ct,Symbol.toStringTag,{value:"Module"})}));
255
303
  //# sourceMappingURL=leaflet-geokit.umd.js.map