@florasync/leaflet-geokit 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +362 -58
  3. package/dist/django/index.js +5335 -3723
  4. package/dist/django/index.js.map +1 -1
  5. package/dist/leaflet-geokit.es.js +5196 -3595
  6. package/dist/leaflet-geokit.es.js.map +1 -1
  7. package/dist/leaflet-geokit.external.es.js +2719 -1118
  8. package/dist/leaflet-geokit.external.es.js.map +1 -1
  9. package/dist/leaflet-geokit.umd.js +17 -17
  10. package/dist/leaflet-geokit.umd.js.map +1 -1
  11. package/dist/preact/{index-CudTfo4O.js → index-DCGBWrrm.js} +2671 -1057
  12. package/dist/preact/index-DCGBWrrm.js.map +1 -0
  13. package/dist/preact/index.js +34 -32
  14. package/dist/preact/index.js.map +1 -1
  15. package/dist/preact-bundled/index.js +5326 -3710
  16. package/dist/preact-bundled/index.js.map +1 -1
  17. package/dist/react/{index-CudTfo4O.js → index-DCGBWrrm.js} +2671 -1057
  18. package/dist/react/index-DCGBWrrm.js.map +1 -0
  19. package/dist/react/index.js +35 -33
  20. package/dist/react/index.js.map +1 -1
  21. package/dist/react-bundled/index.js +5326 -3710
  22. package/dist/react-bundled/index.js.map +1 -1
  23. package/dist/types/{src/components → components}/LeafletDrawMapElement.d.ts +40 -5
  24. package/dist/types/{src/django → django}/index.d.ts +2 -2
  25. package/dist/types/external.d.ts +4 -0
  26. package/dist/types/index.d.ts +4 -0
  27. package/dist/types/{src/lib → lib}/FeatureStore.d.ts +2 -2
  28. package/dist/types/{src/lib → lib}/MapController.d.ts +48 -6
  29. package/dist/types/{src/lib → lib}/layer-cake/LayerCakeManager.d.ts +1 -1
  30. package/dist/types/lib/marker-icons.d.ts +27 -0
  31. package/dist/types/lib/tool-buttons.d.ts +11 -0
  32. package/dist/types/{src/preact → preact}/core.d.ts +6 -2
  33. package/dist/types/{src/preact → preact}/index.d.ts +1 -1
  34. package/dist/types/{src/preact-bundled → preact-bundled}/index.d.ts +3 -3
  35. package/dist/types/{src/react → react}/core.d.ts +6 -2
  36. package/dist/types/{src/react → react}/index.d.ts +1 -1
  37. package/dist/types/{src/react-bundled → react-bundled}/index.d.ts +3 -3
  38. package/dist/types/{src/types → types}/events.d.ts +34 -6
  39. package/dist/types/{src/types → types}/public.d.ts +130 -5
  40. package/dist/types/{src/utils → utils}/geojson.d.ts +10 -0
  41. package/package.json +6 -3
  42. package/dist/preact/index-CudTfo4O.js.map +0 -1
  43. package/dist/react/index-CudTfo4O.js.map +0 -1
  44. package/dist/types/e2e/component.spec.d.ts +0 -1
  45. package/dist/types/e2e/dummy.spec.d.ts +0 -1
  46. package/dist/types/e2e/tool-events-harness.spec.d.ts +0 -1
  47. package/dist/types/e2e/tool-hooks.spec.d.ts +0 -1
  48. package/dist/types/src/external.d.ts +0 -4
  49. package/dist/types/src/index.d.ts +0 -4
  50. package/dist/types/tests/bbox-more.spec.d.ts +0 -1
  51. package/dist/types/tests/component-api-more.spec.d.ts +0 -1
  52. package/dist/types/tests/component-branch-coverage.spec.d.ts +0 -1
  53. package/dist/types/tests/component-delegation.spec.d.ts +0 -1
  54. package/dist/types/tests/component-events.spec.d.ts +0 -1
  55. package/dist/types/tests/component-io.spec.d.ts +0 -1
  56. package/dist/types/tests/component-tile-provider.spec.d.ts +0 -1
  57. package/dist/types/tests/django-shim.spec.d.ts +0 -1
  58. package/dist/types/tests/draw-cake.spec.d.ts +0 -1
  59. package/dist/types/tests/draw-move.spec.d.ts +0 -1
  60. package/dist/types/tests/eachcoord.spec.d.ts +0 -1
  61. package/dist/types/tests/element.spec.d.ts +0 -1
  62. package/dist/types/tests/ensure-element.spec.d.ts +0 -1
  63. package/dist/types/tests/external-entry.spec.d.ts +0 -1
  64. package/dist/types/tests/featureStore-more.spec.d.ts +0 -1
  65. package/dist/types/tests/featureStore.spec.d.ts +0 -1
  66. package/dist/types/tests/framework-runtime-externalization.spec.d.ts +0 -1
  67. package/dist/types/tests/geodesic.spec.d.ts +0 -1
  68. package/dist/types/tests/geojson-merge.spec.d.ts +0 -1
  69. package/dist/types/tests/geojson-more.spec.d.ts +0 -1
  70. package/dist/types/tests/geojson.spec.d.ts +0 -1
  71. package/dist/types/tests/layer-cake-baker.spec.d.ts +0 -1
  72. package/dist/types/tests/layer-cake-controls.spec.d.ts +0 -1
  73. package/dist/types/tests/layer-cake-editing.spec.d.ts +0 -1
  74. package/dist/types/tests/layer-cake-manager.spec.d.ts +0 -1
  75. package/dist/types/tests/leaflet-assets.spec.d.ts +0 -1
  76. package/dist/types/tests/leaflet-draw-circle-resize-patch.spec.d.ts +0 -1
  77. package/dist/types/tests/leaflet-guards.spec.d.ts +0 -1
  78. package/dist/types/tests/logger-more.spec.d.ts +0 -1
  79. package/dist/types/tests/logger.spec.d.ts +0 -1
  80. package/dist/types/tests/map-controller.spec.d.ts +0 -1
  81. package/dist/types/tests/mapcontroller-merge.spec.d.ts +0 -1
  82. package/dist/types/tests/preact-bundled-shim.spec.d.ts +0 -1
  83. package/dist/types/tests/preact-shim.spec.d.ts +0 -1
  84. package/dist/types/tests/react-bundled-shim.spec.d.ts +0 -1
  85. package/dist/types/tests/react-shim.spec.d.ts +0 -1
  86. package/dist/types/tests/ruler.spec.d.ts +0 -1
  87. package/dist/types/tests/tile-provider-factory.spec.d.ts +0 -1
  88. package/dist/types/vite.config.d.ts +0 -2
  89. package/dist/types/vite.config.external.d.ts +0 -2
  90. package/dist/types/vite.config.preact-bundled.d.ts +0 -2
  91. package/dist/types/vite.config.preact.d.ts +0 -2
  92. package/dist/types/vite.config.react-bundled.d.ts +0 -2
  93. package/dist/types/vite.config.react.d.ts +0 -2
  94. /package/dist/types/{src/lib → lib}/TileProviderFactory.d.ts +0 -0
  95. /package/dist/types/{src/lib → lib}/draw/L.Draw.Cake.d.ts +0 -0
  96. /package/dist/types/{src/lib → lib}/draw/L.Draw.Move.d.ts +0 -0
  97. /package/dist/types/{src/lib → lib}/draw/toolbar-patch.d.ts +0 -0
  98. /package/dist/types/{src/lib → lib}/layer-cake/CakeBaker.d.ts +0 -0
  99. /package/dist/types/{src/lib → lib}/layer-cake/bindCakeControls.d.ts +0 -0
  100. /package/dist/types/{src/lib → lib}/layer-cake/ensureCircleEditable.d.ts +0 -0
  101. /package/dist/types/{src/lib → lib}/leaflet-assets.d.ts +0 -0
  102. /package/dist/types/{src/shims → shims}/ensure-element.d.ts +0 -0
  103. /package/dist/types/{src/state → state}/types.d.ts +0 -0
  104. /package/dist/types/{src/utils → utils}/geodesic.d.ts +0 -0
  105. /package/dist/types/{src/utils → utils}/leaflet-guards.d.ts +0 -0
  106. /package/dist/types/{src/utils → utils}/logger.d.ts +0 -0
  107. /package/dist/types/{src/utils → utils}/ruler.d.ts +0 -0
@@ -1,27 +1,27 @@
1
- (function(dt,ut){typeof exports=="object"&&typeof module!="undefined"?ut(exports):typeof define=="function"&&define.amd?define(["exports"],ut):(dt=typeof globalThis!="undefined"?globalThis:dt||self,ut(dt.LeafletGeoKit={}))})(this,(function(dt){"use strict";var Hs=Object.defineProperty;var Fs=(dt,ut,zt)=>ut in dt?Hs(dt,ut,{enumerable:!0,configurable:!0,writable:!0,value:zt}):dt[ut]=zt;var k=(dt,ut,zt)=>Fs(dt,typeof ut!="symbol"?ut+"":ut,zt);function ut(m,h){for(var s=0;s<h.length;s++){const c=h[s];if(typeof c!="string"&&!Array.isArray(c)){for(const n in c)if(n!=="default"&&!(n in m)){const r=Object.getOwnPropertyDescriptor(c,n);r&&Object.defineProperty(m,n,r.get?r:{enumerable:!0,get:()=>c[n]})}}}return Object.freeze(Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}))}const zt={trace:10,debug:20,info:30,warn:40,error:50};function uo(m,h){return m==="silent"?!1:zt[h]>=zt[m]}function fo(){try{return new Date().toISOString()}catch{return""}}function ve(m,h="debug",s=console){let c=h;const n=a=>(...d)=>{try{if(!uo(c,a))return;const f=`[${fo()}][${m}][${a.toUpperCase()}]`,_=s[a];typeof _=="function"?_(f,...d):s.log(f,...d)}catch{}};return{get level(){return c},setLevel(a){c=a},trace:n("trace"),debug:n("debug"),info:n("info"),warn:n("warn"),error:n("error"),child(a){return ve(`${m}:${a}`,c,s)}}}function po(m){return m&&m.__esModule&&Object.prototype.hasOwnProperty.call(m,"default")?m.default:m}var $t={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 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
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 mo=$t.exports,Bi;function Ri(){return Bi||(Bi=1,(function(m,h){(function(s,c){c(h)})(mo,(function(s){var c="1.9.4";function n(t){var e,i,o,l;for(i=1,o=arguments.length;i<o;i++){l=arguments[i];for(e in l)t[e]=l[e]}return t}var r=Object.create||(function(){function t(){}return function(e){return t.prototype=e,new t}})();function a(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var o=i.call(arguments,2);return function(){return t.apply(e,o.length?o.concat(i.call(arguments)):arguments)}}var d=0;function f(t){return"_leaflet_id"in t||(t._leaflet_id=++d),t._leaflet_id}function _(t,e,i){var o,l,u,p;return p=function(){o=!1,l&&(u.apply(i,l),l=!1)},u=function(){o?l=arguments:(t.apply(i,arguments),setTimeout(p,e),o=!0)},u}function g(t,e,i){var o=e[1],l=e[0],u=o-l;return t===o&&i?t:((t-l)%u+u)%u+l}function w(){return!1}function x(t,e){if(e===!1)return t;var i=Math.pow(10,e===void 0?6:e);return Math.round(t*i)/i}function T(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function P(t){return T(t).split(/\s+/)}function M(t,e){Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?r(t.options):{});for(var i in e)t.options[i]=e[i];return t.options}function U(t,e,i){var o=[];for(var l in t)o.push(encodeURIComponent(i?l.toUpperCase():l)+"="+encodeURIComponent(t[l]));return(!e||e.indexOf("?")===-1?"?":"&")+o.join("&")}var F=/\{ *([\w_ -]+) *\}/g;function C(t,e){return t.replace(F,function(i,o){var l=e[o];if(l===void 0)throw new Error("No value provided for variable "+i);return typeof l=="function"&&(l=l(e)),l})}var D=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function G(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var Y="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function q(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var at=0;function vt(t){var e=+new Date,i=Math.max(0,16-(e-at));return at=e+i,window.setTimeout(t,i)}var Gt=window.requestAnimationFrame||q("RequestAnimationFrame")||vt,Ae=window.cancelAnimationFrame||q("CancelAnimationFrame")||q("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function ot(t,e,i){if(i&&Gt===vt)t.call(e);else return Gt.call(window,a(t,e))}function rt(t){t&&Ae.call(window,t)}var Me={__proto__:null,extend:n,create:r,bind:a,get lastId(){return d},stamp:f,throttle:_,wrapNum:g,falseFn:w,formatNum:x,trim:T,splitWords:P,setOptions:M,getParamString:U,template:C,isArray:D,indexOf:G,emptyImageUrl:Y,requestFn:Gt,cancelFn:Ae,requestAnimFrame:ot,cancelAnimFrame:rt};function pt(){}pt.extend=function(t){var e=function(){M(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=e.__super__=this.prototype,o=r(i);o.constructor=e,e.prototype=o;for(var l in this)Object.prototype.hasOwnProperty.call(this,l)&&l!=="prototype"&&l!=="__super__"&&(e[l]=this[l]);return t.statics&&n(e,t.statics),t.includes&&(ie(t.includes),n.apply(null,[o].concat(t.includes))),n(o,t),delete o.statics,delete o.includes,o.options&&(o.options=i.options?r(i.options):{},n(o.options,t.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var u=0,p=o._initHooks.length;u<p;u++)o._initHooks[u].call(this)}},e},pt.include=function(t){var e=this.prototype.options;return n(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},pt.mergeOptions=function(t){return n(this.prototype.options,t),this},pt.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i=typeof t=="function"?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};function ie(t){if(!(typeof L=="undefined"||!L||!L.Mixin)){t=D(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 ft={on:function(t,e,i){if(typeof t=="object")for(var o in t)this._on(o,t[o],e);else{t=P(t);for(var l=0,u=t.length;l<u;l++)this._on(t[l],e,i)}return this},off:function(t,e,i){if(!arguments.length)delete this._events;else if(typeof t=="object")for(var o in t)this._off(o,t[o],e);else{t=P(t);for(var l=arguments.length===1,u=0,p=t.length;u<p;u++)l?this._off(t[u]):this._off(t[u],e,i)}return this},_on:function(t,e,i,o){if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}if(this._listens(t,e,i)===!1){i===this&&(i=void 0);var l={fn:e,ctx:i};o&&(l.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(l)}},_off:function(t,e,i){var o,l,u;if(this._events&&(o=this._events[t],!!o)){if(arguments.length===1){if(this._firingCount)for(l=0,u=o.length;l<u;l++)o[l].fn=w;delete this._events[t];return}if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}var p=this._listens(t,e,i);if(p!==!1){var v=o[p];this._firingCount&&(v.fn=w,this._events[t]=o=o.slice()),o.splice(p,1)}}},fire:function(t,e,i){if(!this.listens(t,i))return this;var o=n({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var l=this._events[t];if(l){this._firingCount=this._firingCount+1||1;for(var u=0,p=l.length;u<p;u++){var v=l[u],y=v.fn;v.once&&this.off(t,y,v.ctx),y.call(v.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e,i,o){typeof t!="string"&&console.warn('"string" type argument expected');var l=e;typeof e!="function"&&(o=!!e,l=void 0,i=void 0);var u=this._events&&this._events[t];if(u&&u.length&&this._listens(t,l,i)!==!1)return!0;if(o){for(var p in this._eventParents)if(this._eventParents[p].listens(t,e,i,o))return!0}return!1},_listens:function(t,e,i){if(!this._events)return!1;var o=this._events[t]||[];if(!e)return!!o.length;i===this&&(i=void 0);for(var l=0,u=o.length;l<u;l++)if(o[l].fn===e&&o[l].ctx===i)return l;return!1},once:function(t,e,i){if(typeof t=="object")for(var o in t)this._on(o,t[o],e,!0);else{t=P(t);for(var l=0,u=t.length;l<u;l++)this._on(t[l],e,i,!0)}return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[f(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[f(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,n({layer:t.target,propagatedFrom:t.target},t),!0)}};ft.addEventListener=ft.on,ft.removeEventListener=ft.clearAllEventListeners=ft.off,ft.addOneTimeEventListener=ft.once,ft.fireEvent=ft.fire,ft.hasEventListeners=ft.listens;var ne=pt.extend(ft);function z(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var $i=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};z.prototype={clone:function(){return new z(this.x,this.y)},add:function(t){return this.clone()._add(I(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(I(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 z(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new z(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=$i(this.x),this.y=$i(this.y),this},distanceTo:function(t){t=I(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=I(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=I(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+x(this.x)+", "+x(this.y)+")"}};function I(t,e,i){return t instanceof z?t:D(t)?new z(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new z(t.x,t.y):new z(t,e,i)}function j(t,e){if(t)for(var i=e?[t,e]:t,o=0,l=i.length;o<l;o++)this.extend(i[o])}j.prototype={extend:function(t){var e,i;if(!t)return this;if(t instanceof z||typeof t[0]=="number"||"x"in t)e=i=I(t);else if(t=lt(t),e=t.min,i=t.max,!e||!i)return this;return!this.min&&!this.max?(this.min=e.clone(),this.max=i.clone()):(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(i.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(i.y,this.max.y)),this},getCenter:function(t){return I((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return I(this.min.x,this.max.y)},getTopRight:function(){return I(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,i;return typeof t[0]=="number"||t instanceof z?t=I(t):t=lt(t),t instanceof j?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=lt(t);var e=this.min,i=this.max,o=t.min,l=t.max,u=l.x>=e.x&&o.x<=i.x,p=l.y>=e.y&&o.y<=i.y;return u&&p},overlaps:function(t){t=lt(t);var e=this.min,i=this.max,o=t.min,l=t.max,u=l.x>e.x&&o.x<i.x,p=l.y>e.y&&o.y<i.y;return u&&p},isValid:function(){return!!(this.min&&this.max)},pad:function(t){var e=this.min,i=this.max,o=Math.abs(e.x-i.x)*t,l=Math.abs(e.y-i.y)*t;return lt(I(e.x-o,e.y-l),I(i.x+o,i.y+l))},equals:function(t){return t?(t=lt(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight())):!1}};function lt(t,e){return!t||t instanceof j?t:new j(t,e)}function ht(t,e){if(t)for(var i=e?[t,e]:t,o=0,l=i.length;o<l;o++)this.extend(i[o])}ht.prototype={extend:function(t){var e=this._southWest,i=this._northEast,o,l;if(t instanceof V)o=t,l=t;else if(t instanceof ht){if(o=t._southWest,l=t._northEast,!o||!l)return this}else return t?this.extend(N(t)||Q(t)):this;return!e&&!i?(this._southWest=new V(o.lat,o.lng),this._northEast=new V(l.lat,l.lng)):(e.lat=Math.min(o.lat,e.lat),e.lng=Math.min(o.lng,e.lng),i.lat=Math.max(l.lat,i.lat),i.lng=Math.max(l.lng,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,o=Math.abs(e.lat-i.lat)*t,l=Math.abs(e.lng-i.lng)*t;return new ht(new V(e.lat-o,e.lng-l),new V(i.lat+o,i.lng+l))},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=N(t):t=Q(t);var e=this._southWest,i=this._northEast,o,l;return t instanceof ht?(o=t.getSouthWest(),l=t.getNorthEast()):o=l=t,o.lat>=e.lat&&l.lat<=i.lat&&o.lng>=e.lng&&l.lng<=i.lng},intersects:function(t){t=Q(t);var e=this._southWest,i=this._northEast,o=t.getSouthWest(),l=t.getNorthEast(),u=l.lat>=e.lat&&o.lat<=i.lat,p=l.lng>=e.lng&&o.lng<=i.lng;return u&&p},overlaps:function(t){t=Q(t);var e=this._southWest,i=this._northEast,o=t.getSouthWest(),l=t.getNorthEast(),u=l.lat>e.lat&&o.lat<i.lat,p=l.lng>e.lng&&o.lng<i.lng;return u&&p},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return t?(t=Q(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function Q(t,e){return t instanceof ht?t:new ht(t,e)}function V(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,i!==void 0&&(this.alt=+i)}V.prototype={equals:function(t,e){if(!t)return!1;t=N(t);var i=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return i<=(e===void 0?1e-9:e)},toString:function(t){return"LatLng("+x(this.lat,t)+", "+x(this.lng,t)+")"},distanceTo:function(t){return St.distance(this,N(t))},wrap:function(){return St.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return Q([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new V(this.lat,this.lng,this.alt)}};function N(t,e,i){return t instanceof V?t:D(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,i)}var At={latLngToPoint:function(t,e){var i=this.projection.project(t),o=this.scale(e);return this.transformation._transform(i,o)},pointToLatLng:function(t,e){var i=this.scale(e),o=this.transformation.untransform(t,i);return this.projection.unproject(o)},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,i=this.scale(t),o=this.transformation.transform(e.min,i),l=this.transformation.transform(e.max,i);return new j(o,l)},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?g(t.lng,this.wrapLng,!0):t.lng,i=this.wrapLat?g(t.lat,this.wrapLat,!0):t.lat,o=t.alt;return new V(i,e,o)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),o=e.lat-i.lat,l=e.lng-i.lng;if(o===0&&l===0)return t;var u=t.getSouthWest(),p=t.getNorthEast(),v=new V(u.lat-o,u.lng-l),y=new V(p.lat-o,p.lng-l);return new ht(v,y)}},St=n({},At,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,o=t.lat*i,l=e.lat*i,u=Math.sin((e.lat-t.lat)*i/2),p=Math.sin((e.lng-t.lng)*i/2),v=u*u+Math.cos(o)*Math.cos(l)*p*p,y=2*Math.atan2(Math.sqrt(v),Math.sqrt(1-v));return this.R*y}}),tn=6378137,ii={R:tn,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,o=Math.max(Math.min(i,t.lat),-i),l=Math.sin(o*e);return new z(this.R*t.lng*e,this.R*Math.log((1+l)/(1-l))/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=tn*Math.PI;return new j([-t,-t],[t,t])})()};function ni(t,e,i,o){if(D(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=i,this._d=o}ni.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 z((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};function oe(t,e,i,o){return new ni(t,e,i,o)}var oi=n({},St,{code:"EPSG:3857",projection:ii,transformation:(function(){var t=.5/(Math.PI*ii.R);return oe(t,.5,-t,.5)})()}),gr=n({},oi,{code:"EPSG:900913"});function en(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function nn(t,e){var i="",o,l,u,p,v,y;for(o=0,u=t.length;o<u;o++){for(v=t[o],l=0,p=v.length;l<p;l++)y=v[l],i+=(l?"L":"M")+y.x+" "+y.y;i+=e?E.svg?"z":"x":""}return i||"M0 0"}var ri=document.documentElement.style,Ee="ActiveXObject"in window,vr=Ee&&!document.addEventListener,on="msLaunchUri"in navigator&&!("documentMode"in document),si=wt("webkit"),rn=wt("android"),sn=wt("android 2")||wt("android 3"),yr=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Lr=rn&&wt("Google")&&yr<537&&!("AudioNode"in window),ai=!!window.opera,an=!on&&wt("chrome"),ln=wt("gecko")&&!si&&!ai&&!Ee,wr=!an&&wt("safari"),hn=wt("phantom"),cn="OTransition"in ri,br=navigator.platform.indexOf("Win")===0,dn=Ee&&"transition"in ri,li="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!sn,un="MozPerspective"in ri,xr=!window.L_DISABLE_3D&&(dn||li||un)&&!cn&&!hn,re=typeof orientation!="undefined"||wt("mobile"),kr=re&&si,Ar=re&&li,fn=!window.PointerEvent&&window.MSPointerEvent,pn=!!(window.PointerEvent||fn),mn="ontouchstart"in window||!!window.TouchEvent,Mr=!window.L_NO_TOUCH&&(mn||pn),Er=re&&ai,Pr=re&&ln,Tr=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Cr=(function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",w,e),window.removeEventListener("testPassiveEventSupport",w,e)}catch{}return t})(),Sr=(function(){return!!document.createElement("canvas").getContext})(),hi=!!(document.createElementNS&&en("svg").createSVGRect),Dr=!!hi&&(function(){var t=document.createElement("div");return t.innerHTML="<svg/>",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),Ir=!hi&&(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}})(),zr=navigator.platform.indexOf("Mac")===0,Or=navigator.platform.indexOf("Linux")===0;function wt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var E={ie:Ee,ielt9:vr,edge:on,webkit:si,android:rn,android23:sn,androidStock:Lr,opera:ai,chrome:an,gecko:ln,safari:wr,phantom:hn,opera12:cn,win:br,ie3d:dn,webkit3d:li,gecko3d:un,any3d:xr,mobile:re,mobileWebkit:kr,mobileWebkit3d:Ar,msPointer:fn,pointer:pn,touch:Mr,touchNative:mn,mobileOpera:Er,mobileGecko:Pr,retina:Tr,passiveEvents:Cr,canvas:Sr,svg:hi,vml:Ir,inlineSvg:Dr,mac:zr,linux:Or},_n=E.msPointer?"MSPointerDown":"pointerdown",gn=E.msPointer?"MSPointerMove":"pointermove",vn=E.msPointer?"MSPointerUp":"pointerup",yn=E.msPointer?"MSPointerCancel":"pointercancel",ci={touchstart:_n,touchmove:gn,touchend:vn,touchcancel:yn},Ln={touchstart:Hr,touchmove:Pe,touchend:Pe,touchcancel:Pe},Vt={},wn=!1;function Br(t,e,i){return e==="touchstart"&&Zr(),Ln[e]?(i=Ln[e].bind(this,i),t.addEventListener(ci[e],i,!1),i):(console.warn("wrong event specified:",e),w)}function Rr(t,e,i){if(!ci[e]){console.warn("wrong event specified:",e);return}t.removeEventListener(ci[e],i,!1)}function Ur(t){Vt[t.pointerId]=t}function Nr(t){Vt[t.pointerId]&&(Vt[t.pointerId]=t)}function bn(t){delete Vt[t.pointerId]}function Zr(){wn||(document.addEventListener(_n,Ur,!0),document.addEventListener(gn,Nr,!0),document.addEventListener(vn,bn,!0),document.addEventListener(yn,bn,!0),wn=!0)}function Pe(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){e.touches=[];for(var i in Vt)e.touches.push(Vt[i]);e.changedTouches=[e],t(e)}}function Hr(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&nt(e),Pe(t,e)}function Fr(t){var e={},i,o;for(o in t)i=t[o],e[o]=i&&i.bind?i.bind(t):i;return t=e,e.type="dblclick",e.detail=2,e.isTrusted=!1,e._simulated=!0,e}var Gr=200;function Vr(t,e){t.addEventListener("dblclick",e);var i=0,o;function l(u){if(u.detail!==1){o=u.detail;return}if(!(u.pointerType==="mouse"||u.sourceCapabilities&&!u.sourceCapabilities.firesTouchEvents)){var p=En(u);if(!(p.some(function(y){return y instanceof HTMLLabelElement&&y.attributes.for})&&!p.some(function(y){return y instanceof HTMLInputElement||y instanceof HTMLSelectElement}))){var v=Date.now();v-i<=Gr?(o++,o===2&&e(Fr(u))):o=1,i=v}}}return t.addEventListener("click",l),{dblclick:e,simDblclick:l}}function Wr(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var di=Se(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),se=Se(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),xn=se==="webkitTransition"||se==="OTransition"?se+"End":"transitionend";function kn(t){return typeof t=="string"?document.getElementById(t):t}function ae(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||i==="auto")&&document.defaultView){var o=document.defaultView.getComputedStyle(t,null);i=o?o[e]:null}return i==="auto"?null:i}function H(t,e,i){var o=document.createElement(t);return o.className=e||"",i&&i.appendChild(o),o}function J(t){var e=t.parentNode;e&&e.removeChild(t)}function Te(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Wt(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function Yt(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ui(t,e){if(t.classList!==void 0)return t.classList.contains(e);var i=Ce(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function B(t,e){if(t.classList!==void 0)for(var i=P(e),o=0,l=i.length;o<l;o++)t.classList.add(i[o]);else if(!ui(t,e)){var u=Ce(t);fi(t,(u?u+" ":"")+e)}}function K(t,e){t.classList!==void 0?t.classList.remove(e):fi(t,T((" "+Ce(t)+" ").replace(" "+e+" "," ")))}function fi(t,e){t.className.baseVal===void 0?t.className=e:t.className.baseVal=e}function Ce(t){return t.correspondingElement&&(t=t.correspondingElement),t.className.baseVal===void 0?t.className:t.className.baseVal}function mt(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&Yr(t,e)}function Yr(t,e){var i=!1,o="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(o)}catch{if(e===1)return}e=Math.round(e*100),i?(i.Enabled=e!==100,i.Opacity=e):t.style.filter+=" progid:"+o+"(opacity="+e+")"}function Se(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function Bt(t,e,i){var o=e||new z(0,0);t.style[di]=(E.ie3d?"translate("+o.x+"px,"+o.y+"px)":"translate3d("+o.x+"px,"+o.y+"px,0)")+(i?" scale("+i+")":"")}function $(t,e){t._leaflet_pos=e,E.any3d?Bt(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Rt(t){return t._leaflet_pos||new z(0,0)}var le,he,pi;if("onselectstart"in document)le=function(){O(window,"selectstart",nt)},he=function(){W(window,"selectstart",nt)};else{var ce=Se(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);le=function(){if(ce){var t=document.documentElement.style;pi=t[ce],t[ce]="none"}},he=function(){ce&&(document.documentElement.style[ce]=pi,pi=void 0)}}function mi(){O(window,"dragstart",nt)}function _i(){W(window,"dragstart",nt)}var De,gi;function vi(t){for(;t.tabIndex===-1;)t=t.parentNode;t.style&&(Ie(),De=t,gi=t.style.outlineStyle,t.style.outlineStyle="none",O(window,"keydown",Ie))}function Ie(){De&&(De.style.outlineStyle=gi,De=void 0,gi=void 0,W(window,"keydown",Ie))}function An(t){do t=t.parentNode;while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function yi(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var qr={__proto__:null,TRANSFORM:di,TRANSITION:se,TRANSITION_END:xn,get:kn,getStyle:ae,create:H,remove:J,empty:Te,toFront:Wt,toBack:Yt,hasClass:ui,addClass:B,removeClass:K,setClass:fi,getClass:Ce,setOpacity:mt,testProp:Se,setTransform:Bt,setPosition:$,getPosition:Rt,get disableTextSelection(){return le},get enableTextSelection(){return he},disableImageDrag:mi,enableImageDrag:_i,preventOutline:vi,restoreOutline:Ie,getSizedParentNode:An,getScale:yi};function O(t,e,i,o){if(e&&typeof e=="object")for(var l in e)wi(t,l,e[l],i);else{e=P(e);for(var u=0,p=e.length;u<p;u++)wi(t,e[u],i,o)}return this}var bt="_leaflet_events";function W(t,e,i,o){if(arguments.length===1)Mn(t),delete t[bt];else if(e&&typeof e=="object")for(var l in e)bi(t,l,e[l],i);else if(e=P(e),arguments.length===2)Mn(t,function(v){return G(e,v)!==-1});else for(var u=0,p=e.length;u<p;u++)bi(t,e[u],i,o);return this}function Mn(t,e){for(var i in t[bt]){var o=i.split(/\d/)[0];(!e||e(o))&&bi(t,o,null,null,i)}}var Li={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function wi(t,e,i,o){var l=e+f(i)+(o?"_"+f(o):"");if(t[bt]&&t[bt][l])return this;var u=function(v){return i.call(o||t,v||window.event)},p=u;!E.touchNative&&E.pointer&&e.indexOf("touch")===0?u=Br(t,e,u):E.touch&&e==="dblclick"?u=Vr(t,u):"addEventListener"in t?e==="touchstart"||e==="touchmove"||e==="wheel"||e==="mousewheel"?t.addEventListener(Li[e]||e,u,E.passiveEvents?{passive:!1}:!1):e==="mouseenter"||e==="mouseleave"?(u=function(v){v=v||window.event,ki(t,v)&&p(v)},t.addEventListener(Li[e],u,!1)):t.addEventListener(e,p,!1):t.attachEvent("on"+e,u),t[bt]=t[bt]||{},t[bt][l]=u}function bi(t,e,i,o,l){l=l||e+f(i)+(o?"_"+f(o):"");var u=t[bt]&&t[bt][l];if(!u)return this;!E.touchNative&&E.pointer&&e.indexOf("touch")===0?Rr(t,e,u):E.touch&&e==="dblclick"?Wr(t,u):"removeEventListener"in t?t.removeEventListener(Li[e]||e,u,!1):t.detachEvent("on"+e,u),t[bt][l]=null}function Ut(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function xi(t){return wi(t,"wheel",Ut),this}function de(t){return O(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 Nt(t){return nt(t),Ut(t),this}function En(t){if(t.composedPath)return t.composedPath();for(var e=[],i=t.target;i;)e.push(i),i=i.parentNode;return e}function Pn(t,e){if(!e)return new z(t.clientX,t.clientY);var i=yi(e),o=i.boundingClientRect;return new z((t.clientX-o.left)/i.x-e.clientLeft,(t.clientY-o.top)/i.y-e.clientTop)}var jr=E.linux&&E.chrome?window.devicePixelRatio:E.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Tn(t){return E.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/jr: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 ki(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch{return!1}return i!==t}var Jr={__proto__:null,on:O,off:W,stopPropagation:Ut,disableScrollPropagation:xi,disableClickPropagation:de,preventDefault:nt,stop:Nt,getPropagationPath:En,getMousePosition:Pn,getWheelDelta:Tn,isExternalTarget:ki,addListener:O,removeListener:W},Cn=ne.extend({run:function(t,e,i,o){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(o||.5,.2),this._startPos=Rt(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=ot(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=this._duration*1e3;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),$(this._el,i),this.fire("step")},_complete:function(){rt(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Z=ne.extend({options:{crs:oi,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=M(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=a(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(N(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=se&&E.any3d&&!E.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),O(this._proxy,xn,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){if(e=e===void 0?this._zoom:this._limitZoom(e),t=this._limitCenter(N(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&i!==!0){i.animate!==void 0&&(i.zoom=n({animate:i.animate},i.zoom),i.pan=n({animate:i.animate,duration:i.duration},i.pan));var o=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan);if(o)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e,i.pan&&i.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||(E.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(E.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var o=this.getZoomScale(e),l=this.getSize().divideBy(2),u=t instanceof z?t:this.latLngToContainerPoint(t),p=u.subtract(l).multiplyBy(1-1/o),v=this.containerPointToLatLng(l.add(p));return this.setView(v,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():Q(t);var i=I(e.paddingTopLeft||e.padding||[0,0]),o=I(e.paddingBottomRight||e.padding||[0,0]),l=this.getBoundsZoom(t,!1,i.add(o));if(l=typeof e.maxZoom=="number"?Math.min(e.maxZoom,l):l,l===1/0)return{center:t.getCenter(),zoom:l};var u=o.subtract(i).divideBy(2),p=this.project(t.getSouthWest(),l),v=this.project(t.getNorthEast(),l),y=this.unproject(p.add(v).divideBy(2).add(u),l);return{center:y,zoom:l}},fitBounds:function(t,e){if(t=Q(t),!t.isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.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=I(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 Cn,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 i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,i){if(i=i||{},i.animate===!1||!E.any3d)return this.setView(t,e,i);this._stop();var o=this.project(this.getCenter()),l=this.project(t),u=this.getSize(),p=this._zoom;t=N(t),e=e===void 0?p:e;var v=Math.max(u.x,u.y),y=v*this.getZoomScale(p,e),b=l.distanceTo(o)||1,A=1.42,S=A*A;function R(tt){var We=tt?-1:1,Rs=tt?y:v,Us=y*y-v*v+We*S*S*b*b,Ns=2*Rs*S*b,Oi=Us/Ns,co=Math.sqrt(Oi*Oi+1)-Oi,Zs=co<1e-9?-18:Math.log(co);return Zs}function st(tt){return(Math.exp(tt)-Math.exp(-tt))/2}function et(tt){return(Math.exp(tt)+Math.exp(-tt))/2}function gt(tt){return st(tt)/et(tt)}var ct=R(0);function Qt(tt){return v*(et(ct)/et(ct+A*tt))}function Is(tt){return v*(et(ct)*gt(ct+A*tt)-st(ct))/S}function zs(tt){return 1-Math.pow(1-tt,1.5)}var Os=Date.now(),lo=(R(1)-ct)/A,Bs=i.duration?1e3*i.duration:1e3*lo*.8;function ho(){var tt=(Date.now()-Os)/Bs,We=zs(tt)*lo;tt<=1?(this._flyToFrame=ot(ho,this),this._move(this.unproject(o.add(l.subtract(o).multiplyBy(Is(We)/b)),p),this.getScaleZoom(v/Qt(We),p),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,i.noMoveStart),ho.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return t=Q(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 i=this.getCenter(),o=this._limitCenter(i,this._zoom,Q(t));return i.equals(o)||this.panTo(o,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var i=I(e.paddingTopLeft||e.padding||[0,0]),o=I(e.paddingBottomRight||e.padding||[0,0]),l=this.project(this.getCenter()),u=this.project(t),p=this.getPixelBounds(),v=lt([p.min.add(i),p.max.subtract(o)]),y=v.getSize();if(!v.contains(u)){this._enforcingBounds=!0;var b=u.subtract(v.getCenter()),A=v.extend(u).getSize().subtract(y);l.x+=b.x<0?-A.x:A.x,l.y+=b.y<0?-A.y:A.y,this.panTo(this.unproject(l),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),o=e.divideBy(2).round(),l=i.divideBy(2).round(),u=o.subtract(l);return!u.x&&!u.y?this:(t.animate&&t.pan?this.panBy(u):(t.pan&&this._rawPanBy(u),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=a(this._handleGeolocationResponse,this),i=a(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,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,i=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: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=t.coords.latitude,i=t.coords.longitude,o=new V(e,i),l=o.toBounds(t.coords.accuracy*2),u=this._locateOptions;if(u.setView){var p=this.getBoundsZoom(l);this.setView(o,u.maxZoom?Math.min(p,u.maxZoom):p)}var v={latlng:o,bounds:l,timestamp:t.timestamp};for(var y in t.coords)typeof t.coords[y]=="number"&&(v[y]=t.coords[y]);this.fire("locationfound",v)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.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(),J(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(rt(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)J(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),o=H("div",i,e||this._mapPane);return t&&(this._panes[t]=o),o},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()),i=this.unproject(t.getTopRight());return new ht(e,i)},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,i){t=Q(t),i=I(i||[0,0]);var o=this.getZoom()||0,l=this.getMinZoom(),u=this.getMaxZoom(),p=t.getNorthWest(),v=t.getSouthEast(),y=this.getSize().subtract(i),b=lt(this.project(v,o),this.project(p,o)).getSize(),A=E.any3d?this.options.zoomSnap:1,S=y.x/b.x,R=y.y/b.y,st=e?Math.max(S,R):Math.min(S,R);return o=this.getScaleZoom(st,o),A&&(o=Math.round(o/(A/100))*(A/100),o=e?Math.ceil(o/A)*A:Math.floor(o/A)*A),Math.max(l,Math.min(u,o))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new z(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new j(i,i.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 i=this.options.crs;return e=e===void 0?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=e===void 0?this._zoom:e;var o=i.zoom(t*i.scale(e));return isNaN(o)?1/0:o},project:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.latLngToPoint(N(t),e)},unproject:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.pointToLatLng(I(t),e)},layerPointToLatLng:function(t){var e=I(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(N(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(N(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(Q(t))},distance:function(t,e){return this.options.crs.distance(N(t),N(e))},containerPointToLayerPoint:function(t){return I(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return I(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(I(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(N(t)))},mouseEventToContainerPoint:function(t){return Pn(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=kn(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");O(e,"scroll",this._onScroll,this),this._containerId=f(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&E.any3d,B(t,"leaflet-container"+(E.touch?" leaflet-touch":"")+(E.retina?" leaflet-retina":"")+(E.ielt9?" leaflet-oldie":"")+(E.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ae(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),$(this._mapPane,new z(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,i){$(this._mapPane,new z(0,0));var o=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var l=this._zoom!==e;this._moveStart(l,i)._move(t,e)._moveEnd(l),this.fire("viewreset"),o&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,o){e===void 0&&(e=this._zoom);var l=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),o?i&&i.pinch&&this.fire("zoom",i):((l||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return rt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){$(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[f(this._container)]=this;var e=t?W:O;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),E.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){rt(this._resizeRequest),this._resizeRequest=ot(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 i=[],o,l=e==="mouseout"||e==="mouseover",u=t.target||t.srcElement,p=!1;u;){if(o=this._targets[f(u)],o&&(e==="click"||e==="preclick")&&this._draggableMoved(o)){p=!0;break}if(o&&o.listens(e,!0)&&(l&&!ki(u,t)||(i.push(o),l))||u===this._container)break;u=u.parentNode}return!i.length&&!p&&!l&&this.listens(e,!0)&&(i=[this]),i},_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 i=t.type;i==="mousedown"&&vi(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if(t.type==="click"){var o=n({},t);o.type="preclick",this._fireDOMEvent(o,o.type,i)}var l=this._findEventTargets(t,e);if(i){for(var u=[],p=0;p<i.length;p++)i[p].listens(e,!0)&&u.push(i[p]);l=u.concat(l)}if(l.length){e==="contextmenu"&&nt(t);var v=l[0],y={originalEvent:t};if(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"){var b=v.getLatLng&&(!v._radius||v._radius<=10);y.containerPoint=b?this.latLngToContainerPoint(v.getLatLng()):this.mouseEventToContainerPoint(t),y.layerPoint=this.containerPointToLayerPoint(y.containerPoint),y.latlng=b?v.getLatLng():this.layerPointToLatLng(y.layerPoint)}for(p=0;p<l.length;p++)if(l[p].fire(e,y,!0),y.originalEvent._stopped||l[p].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 Rt(this._mapPane)||new z(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var i=t&&e!==void 0?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return i.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var o=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(o)},_latLngBoundsToNewLayerBounds:function(t,e,i){var o=this._getNewPixelOrigin(i,e);return lt([this.project(t.getSouthWest(),e)._subtract(o),this.project(t.getNorthWest(),e)._subtract(o),this.project(t.getSouthEast(),e)._subtract(o),this.project(t.getNorthEast(),e)._subtract(o)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var o=this.project(t,e),l=this.getSize().divideBy(2),u=new j(o.subtract(l),o.add(l)),p=this._getBoundsOffset(u,i,e);return Math.abs(p.x)<=1&&Math.abs(p.y)<=1?t:this.unproject(o.add(p),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),o=new j(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(o,e))},_getBoundsOffset:function(t,e,i){var o=lt(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),l=o.min.subtract(t.min),u=o.max.subtract(t.max),p=this._rebound(l.x,-u.x),v=this._rebound(l.y,-u.y);return new z(p,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(),i=this.getMaxZoom(),o=E.any3d?this.options.zoomSnap:1;return o&&(t=Math.round(t/o)*o),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){K(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return(e&&e.animate)!==!0&&!this.getSize().contains(i)?!1:(this.panBy(i,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 i=di,o=this._proxy.style[i];Bt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),o===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){J(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Bt(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,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var o=this.getZoomScale(e),l=this._getCenterOffset(t)._divideBy(1-1/o);return i.animate!==!0&&!this.getSize().contains(l)?!1:(ot(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,o){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,B(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:o}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&K(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 Kr(t,e){return new Z(t,e)}var yt=pt.extend({options:{position:"topright"},initialize:function(t){M(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),i=this.getPosition(),o=t._controlCorners[i];return B(e,"leaflet-control"),i.indexOf("bottom")!==-1?o.insertBefore(e,o.firstChild):o.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(J(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()}}),ue=function(t){return new yt(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-",i=this._controlContainer=H("div",e+"control-container",this._container);function o(l,u){var p=e+l+" "+e+u;t[l+u]=H("div",p,i)}o("top","left"),o("top","right"),o("bottom","left"),o("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)J(this._controlCorners[t]);J(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Sn=yt.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,o){return i<o?-1:o<i?1:0}},initialize:function(t,e,i){M(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var o in t)this._addLayer(t[o],o);for(o in e)this._addLayer(e[o],o,!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 yt.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(f(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"):K(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return K(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=H("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),de(e),xi(e);var o=this._section=H("section",t+"-list");i&&(this._map.on("click",this.collapse,this),O(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var l=this._layersLink=H("a",t+"-toggle",e);l.href="#",l.title="Layers",l.setAttribute("role","button"),O(l,{keydown:function(u){u.keyCode===13&&this._expandSafely()},click:function(u){nt(u),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=H("div",t+"-base",o),this._separator=H("div",t+"-separator",o),this._overlaysList=H("div",t+"-overlays",o),e.appendChild(o)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&f(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(a(function(o,l){return this.options.sortFunction(o.layer,l.layer,o.name,l.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Te(this._baseLayersList),Te(this._overlaysList),this._layerControlInputs=[];var t,e,i,o,l=0;for(i=0;i<this._layers.length;i++)o=this._layers[i],this._addItem(o),e=e||o.overlay,t=t||!o.overlay,l+=o.overlay?0:1;return this.options.hideSingleBase&&(t=t&&l>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(f(t.target)),i=e.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",o=document.createElement("div");return o.innerHTML=i,o.firstChild},_addItem:function(t){var e=document.createElement("label"),i=this._map.hasLayer(t.layer),o;t.overlay?(o=document.createElement("input"),o.type="checkbox",o.className="leaflet-control-layers-selector",o.defaultChecked=i):o=this._createRadioElement("leaflet-base-layers_"+f(this),i),this._layerControlInputs.push(o),o.layerId=f(t.layer),O(o,"click",this._onInputClick,this);var l=document.createElement("span");l.innerHTML=" "+t.name;var u=document.createElement("span");e.appendChild(u),u.appendChild(o),u.appendChild(l);var p=t.overlay?this._overlaysList:this._baseLayersList;return p.appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,e,i,o=[],l=[];this._handlingClick=!0;for(var u=t.length-1;u>=0;u--)e=t[u],i=this._getLayer(e.layerId).layer,e.checked?o.push(i):e.checked||l.push(i);for(u=0;u<l.length;u++)this._map.hasLayer(l[u])&&this._map.removeLayer(l[u]);for(u=0;u<o.length;u++)this._map.hasLayer(o[u])||this._map.addLayer(o[u]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t=this._layerControlInputs,e,i,o=this._map.getZoom(),l=t.length-1;l>=0;l--)e=t[l],i=this._getLayer(e.layerId).layer,e.disabled=i.options.minZoom!==void 0&&o<i.options.minZoom||i.options.maxZoom!==void 0&&o>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,O(t,"click",nt),this.expand();var e=this;setTimeout(function(){W(t,"click",nt),e._preventClick=!1})}}),Xr=function(t,e,i){return new Sn(t,e,i)},Ai=yt.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",i=H("div",e+" leaflet-bar"),o=this.options;return this._zoomInButton=this._createButton(o.zoomInText,o.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(o.zoomOutText,o.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},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,i,o,l){var u=H("a",i,o);return u.innerHTML=t,u.href="#",u.title=e,u.setAttribute("role","button"),u.setAttribute("aria-label",e),de(u),O(u,"click",Nt),O(u,"click",l,this),O(u,"click",this._refocusOnMap,this),u},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";K(this._zoomInButton,e),K(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 Ai,this.addControl(this.zoomControl))});var Qr=function(t){return new Ai(t)},Dn=yt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=H("div",e),o=this.options;return this._addScales(o,e+"-line",i),t.on(o.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=H("div",e,i)),t.imperial&&(this._iScale=H("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_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),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e=t*3.2808399,i,o,l;e>5280?(i=e/5280,o=this._getRoundNum(i),this._updateScale(this._iScale,o+" mi",o/i)):(l=this._getRoundNum(e),this._updateScale(this._iScale,l+" ft",l/e))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),$r=function(t){return new Dn(t)},ts='<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>',Mi=yt.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(E.inlineSvg?ts+" ":"")+"Leaflet</a>"},initialize:function(t){M(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=H("div","leaflet-control-attribution"),de(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 i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' <span aria-hidden="true">|</span> ')}}});Z.mergeOptions({attributionControl:!0}),Z.addInitHook(function(){this.options.attributionControl&&new Mi().addTo(this)});var es=function(t){return new Mi(t)};yt.Layers=Sn,yt.Zoom=Ai,yt.Scale=Dn,yt.Attribution=Mi,ue.layers=Xr,ue.zoom=Qr,ue.scale=$r,ue.attribution=es;var xt=pt.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}});xt.addTo=function(t,e){return t.addHandler(e,this),this};var is={Events:ft},In=E.touch?"touchstart mousedown":"mousedown",Dt=ne.extend({options:{clickTolerance:3},initialize:function(t,e,i,o){M(this,o),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(O(this._dragStartTarget,In,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Dt._dragging===this&&this.finishDrag(!0),W(this._dragStartTarget,In,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!ui(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){Dt._dragging===this&&this.finishDrag();return}if(!(Dt._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(Dt._dragging=this,this._preventOutline&&vi(this._element),mi(),le(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t,i=An(this._element);this._startPoint=new z(e.clientX,e.clientY),this._startPos=Rt(this._element),this._parentScale=yi(i);var o=t.type==="mousedown";O(document,o?"mousemove":"touchmove",this._onMove,this),O(document,o?"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,i=new z(e.clientX,e.clientY)._subtract(this._startPoint);!i.x&&!i.y||Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance||(i.x/=this._parentScale.x,i.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(i),this._moving=!0,this._lastEvent=t,this._updatePosition())}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),$(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){K(document.body,"leaflet-dragging"),this._lastTarget&&(K(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),W(document,"mousemove touchmove",this._onMove,this),W(document,"mouseup touchend touchcancel",this._onUp,this),_i(),he();var e=this._moved&&this._moving;this._moving=!1,Dt._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function zn(t,e,i){var o,l=[1,4,2,8],u,p,v,y,b,A,S,R;for(u=0,A=t.length;u<A;u++)t[u]._code=Zt(t[u],e);for(v=0;v<4;v++){for(S=l[v],o=[],u=0,A=t.length,p=A-1;u<A;p=u++)y=t[u],b=t[p],y._code&S?b._code&S||(R=ze(b,y,S,e,i),R._code=Zt(R,e),o.push(R)):(b._code&S&&(R=ze(b,y,S,e,i),R._code=Zt(R,e),o.push(R)),o.push(y));t=o}return t}function On(t,e){var i,o,l,u,p,v,y,b,A;if(!t||t.length===0)throw new Error("latlngs not passed");_t(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var S=N([0,0]),R=Q(t),st=R.getNorthWest().distanceTo(R.getSouthWest())*R.getNorthEast().distanceTo(R.getNorthWest());st<1700&&(S=Ei(t));var et=t.length,gt=[];for(i=0;i<et;i++){var ct=N(t[i]);gt.push(e.project(N([ct.lat-S.lat,ct.lng-S.lng])))}for(v=y=b=0,i=0,o=et-1;i<et;o=i++)l=gt[i],u=gt[o],p=l.y*u.x-u.y*l.x,y+=(l.x+u.x)*p,b+=(l.y+u.y)*p,v+=p*3;v===0?A=gt[0]:A=[y/v,b/v];var Qt=e.unproject(I(A));return N([Qt.lat+S.lat,Qt.lng+S.lng])}function Ei(t){for(var e=0,i=0,o=0,l=0;l<t.length;l++){var u=N(t[l]);e+=u.lat,i+=u.lng,o++}return N([e/o,i/o])}var ns={__proto__:null,clipPolygon:zn,polygonCenter:On,centroid:Ei};function Bn(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=ss(t,i),t=rs(t,i),t}function Rn(t,e,i){return Math.sqrt(fe(t,e,i,!0))}function os(t,e,i){return fe(t,e,i)}function rs(t,e){var i=t.length,o=typeof Uint8Array!="undefined"?Uint8Array:Array,l=new o(i);l[0]=l[i-1]=1,Pi(t,l,e,0,i-1);var u,p=[];for(u=0;u<i;u++)l[u]&&p.push(t[u]);return p}function Pi(t,e,i,o,l){var u=0,p,v,y;for(v=o+1;v<=l-1;v++)y=fe(t[v],t[o],t[l],!0),y>u&&(p=v,u=y);u>i&&(e[p]=1,Pi(t,e,i,o,p),Pi(t,e,i,p,l))}function ss(t,e){for(var i=[t[0]],o=1,l=0,u=t.length;o<u;o++)as(t[o],t[l])>e&&(i.push(t[o]),l=o);return l<u-1&&i.push(t[u-1]),i}var Un;function Nn(t,e,i,o,l){var u=o?Un:Zt(t,i),p=Zt(e,i),v,y,b;for(Un=p;;){if(!(u|p))return[t,e];if(u&p)return!1;v=u||p,y=ze(t,e,v,i,l),b=Zt(y,i),v===u?(t=y,u=b):(e=y,p=b)}}function ze(t,e,i,o,l){var u=e.x-t.x,p=e.y-t.y,v=o.min,y=o.max,b,A;return i&8?(b=t.x+u*(y.y-t.y)/p,A=y.y):i&4?(b=t.x+u*(v.y-t.y)/p,A=v.y):i&2?(b=y.x,A=t.y+p*(y.x-t.x)/u):i&1&&(b=v.x,A=t.y+p*(v.x-t.x)/u),new z(b,A,l)}function Zt(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function as(t,e){var i=e.x-t.x,o=e.y-t.y;return i*i+o*o}function fe(t,e,i,o){var l=e.x,u=e.y,p=i.x-l,v=i.y-u,y=p*p+v*v,b;return y>0&&(b=((t.x-l)*p+(t.y-u)*v)/y,b>1?(l=i.x,u=i.y):b>0&&(l+=p*b,u+=v*b)),p=t.x-l,v=t.y-u,o?p*p+v*v:new z(l,u)}function _t(t){return!D(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]!="undefined"}function Zn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),_t(t)}function Hn(t,e){var i,o,l,u,p,v,y,b;if(!t||t.length===0)throw new Error("latlngs not passed");_t(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var A=N([0,0]),S=Q(t),R=S.getNorthWest().distanceTo(S.getSouthWest())*S.getNorthEast().distanceTo(S.getNorthWest());R<1700&&(A=Ei(t));var st=t.length,et=[];for(i=0;i<st;i++){var gt=N(t[i]);et.push(e.project(N([gt.lat-A.lat,gt.lng-A.lng])))}for(i=0,o=0;i<st-1;i++)o+=et[i].distanceTo(et[i+1])/2;if(o===0)b=et[0];else for(i=0,u=0;i<st-1;i++)if(p=et[i],v=et[i+1],l=p.distanceTo(v),u+=l,u>o){y=(u-o)/l,b=[v.x-y*(v.x-p.x),v.y-y*(v.y-p.y)];break}var ct=e.unproject(I(b));return N([ct.lat+A.lat,ct.lng+A.lng])}var ls={__proto__:null,simplify:Bn,pointToSegmentDistance:Rn,closestPointOnSegment:os,clipSegment:Nn,_getEdgeIntersection:ze,_getBitCode:Zt,_sqClosestPointOnSegment:fe,isFlat:_t,_flat:Zn,polylineCenter:Hn},Ti={project:function(t){return new z(t.lng,t.lat)},unproject:function(t){return new V(t.y,t.x)},bounds:new j([-180,-90],[180,90])},Ci={R:6378137,R_MINOR:6356752314245179e-9,bounds:new j([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var e=Math.PI/180,i=this.R,o=t.lat*e,l=this.R_MINOR/i,u=Math.sqrt(1-l*l),p=u*Math.sin(o),v=Math.tan(Math.PI/4-o/2)/Math.pow((1-p)/(1+p),u/2);return o=-i*Math.log(Math.max(v,1e-10)),new z(t.lng*e*i,o)},unproject:function(t){for(var e=180/Math.PI,i=this.R,o=this.R_MINOR/i,l=Math.sqrt(1-o*o),u=Math.exp(-t.y/i),p=Math.PI/2-2*Math.atan(u),v=0,y=.1,b;v<15&&Math.abs(y)>1e-7;v++)b=l*Math.sin(p),b=Math.pow((1-b)/(1+b),l/2),y=Math.PI/2-2*Math.atan(u*b)-p,p+=y;return new V(p*e,t.x*e/i)}},hs={__proto__:null,LonLat:Ti,Mercator:Ci,SphericalMercator:ii},cs=n({},St,{code:"EPSG:3395",projection:Ci,transformation:(function(){var t=.5/(Math.PI*Ci.R);return oe(t,.5,-t,.5)})()}),Fn=n({},St,{code:"EPSG:4326",projection:Ti,transformation:oe(1/180,1,-1/180,.5)}),ds=n({},At,{projection:Ti,transformation:oe(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 i=e.lng-t.lng,o=e.lat-t.lat;return Math.sqrt(i*i+o*o)},infinite:!0});At.Earth=St,At.EPSG3395=cs,At.EPSG3857=oi,At.EPSG900913=gr,At.EPSG4326=Fn,At.Simple=ds;var Lt=ne.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[f(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[f(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 i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,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=f(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=f(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 f(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?D(t)?t:[t]:[];for(var e=0,i=t.length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){(!isNaN(t.options.maxZoom)||!isNaN(t.options.minZoom))&&(this._zoomBoundLayers[f(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=f(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var o in this._zoomBoundLayers){var l=this._zoomBoundLayers[o].options;t=l.minZoom===void 0?t:Math.min(t,l.minZoom),e=l.maxZoom===void 0?e:Math.max(e,l.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,i!==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=Lt.extend({initialize:function(t,e){M(this,e),this._layers={};var i,o;if(t)for(i=0,o=t.length;i<o;i++)this.addLayer(t[i])},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),i,o;for(i in this._layers)o=this._layers[i],o[t]&&o[t].apply(o,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 i in this._layers)t.call(e,this._layers[i]);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 f(t)}}),us=function(t,e){return new qt(t,e)},Mt=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 ht;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),fs=function(t,e){return new Mt(t,e)},jt=pt.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){M(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if(t==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var o=this._createImg(i,e&&e.tagName==="IMG"?e:null);return this._setIconStyles(o,t),(this.options.crossOrigin||this.options.crossOrigin==="")&&(o.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),o},_setIconStyles:function(t,e){var i=this.options,o=i[e+"Size"];typeof o=="number"&&(o=[o,o]);var l=I(o),u=I(e==="shadow"&&i.shadowAnchor||i.iconAnchor||l&&l.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),u&&(t.style.marginLeft=-u.x+"px",t.style.marginTop=-u.y+"px"),l&&(t.style.width=l.x+"px",t.style.height=l.y+"px")},_createImg:function(t,e){return e=e||document.createElement("img"),e.src=t,e},_getIconUrl:function(t){return E.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function ps(t){return new jt(t)}var pe=jt.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 pe.imagePath!="string"&&(pe.imagePath=this._detectIconPath()),(this.options.imagePath||pe.imagePath)+jt.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(i,o,l){var u=o.exec(i);return u&&u[l]};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=ae(t,"background-image")||ae(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e),e)return e;var i=document.querySelector('link[href$="leaflet.css"]');return i?i.href.substring(0,i.href.length-11-1):""}}),Gn=xt.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Dt(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&&K(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,o=this._marker.options.autoPanSpeed,l=this._marker.options.autoPanPadding,u=Rt(e._icon),p=i.getPixelBounds(),v=i.getPixelOrigin(),y=lt(p.min._subtract(v).add(l),p.max._subtract(v).subtract(l));if(!y.contains(u)){var b=I((Math.max(y.max.x,u.x)-y.max.x)/(p.max.x-y.max.x)-(Math.min(y.min.x,u.x)-y.min.x)/(p.min.x-y.min.x),(Math.max(y.max.y,u.y)-y.max.y)/(p.max.y-y.max.y)-(Math.min(y.min.y,u.y)-y.min.y)/(p.min.y-y.min.y)).multiplyBy(o);i.panBy(b,{animate:!1}),this._draggable._newPos._add(b),this._draggable._startPos._add(b),$(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=ot(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&&(rt(this._panRequest),this._panRequest=ot(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,o=Rt(e._icon),l=e._map.layerPointToLatLng(o);i&&$(i,o),e._latlng=l,t.latlng=l,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){rt(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Oe=Lt.extend({options:{icon:new pe,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){M(this,e),this._latlng=N(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=N(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"),i=t.icon.createIcon(this._icon),o=!1;i!==this._icon&&(this._icon&&this._removeIcon(),o=!0,t.title&&(i.title=t.title),i.tagName==="IMG"&&(i.alt=t.alt||"")),B(i,e),t.keyboard&&(i.tabIndex="0",i.setAttribute("role","button")),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&O(i,"focus",this._panOnFocus,this);var l=t.icon.createShadow(this._shadow),u=!1;l!==this._shadow&&(this._removeShadow(),u=!0),l&&(B(l,e),l.alt=""),this._shadow=l,t.opacity<1&&this._updateOpacity(),o&&this.getPane().appendChild(this._icon),this._initInteraction(),l&&u&&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),J(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&J(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&$(this._icon,t),this._shadow&&$(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),Gn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Gn(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&&mt(this._icon,t),this._shadow&&mt(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,i=e.iconSize?I(e.iconSize):I(0,0),o=e.iconAnchor?I(e.iconAnchor):I(0,0);t.panInside(this._latlng,{paddingTopLeft:o,paddingBottomRight:i.subtract(o)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function ms(t,e){return new Oe(t,e)}var It=Lt.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 M(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)}}),Be=It.extend({options:{fill:!0,radius:10},initialize:function(t,e){M(this,e),this._latlng=N(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=N(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 It.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,i=this._clickTolerance(),o=[t+i,e+i];this._pxBounds=new j(this._point.subtract(o),this._point.add(o))},_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 _s(t,e){return new Be(t,e)}var Si=Be.extend({initialize:function(t,e,i){if(typeof e=="number"&&(e=n({},i,{radius:e})),M(this,e),this._latlng=N(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 ht(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:It.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,o=i.options.crs;if(o.distance===St.distance){var l=Math.PI/180,u=this._mRadius/St.R/l,p=i.project([e+u,t]),v=i.project([e-u,t]),y=p.add(v).divideBy(2),b=i.unproject(y).lat,A=Math.acos((Math.cos(u*l)-Math.sin(e*l)*Math.sin(b*l))/(Math.cos(e*l)*Math.cos(b*l)))/l;(isNaN(A)||A===0)&&(A=u/Math.cos(Math.PI/180*e)),this._point=y.subtract(i.getPixelOrigin()),this._radius=isNaN(A)?0:y.x-i.project([b,t-A]).x,this._radiusY=y.y-p.y}else{var S=o.unproject(o.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(S).x}this._updateBounds()}});function gs(t,e,i){return new Si(t,e,i)}var Et=It.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){M(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,i=null,o=fe,l,u,p=0,v=this._parts.length;p<v;p++)for(var y=this._parts[p],b=1,A=y.length;b<A;b++){l=y[b-1],u=y[b];var S=o(t,l,u,!0);S<e&&(e=S,i=o(t,l,u))}return i&&(i.distance=Math.sqrt(e)),i},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Hn(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=N(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new ht,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return _t(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=_t(t),o=0,l=t.length;o<l;o++)i?(e[o]=N(t[o]),this._bounds.extend(e[o])):e[o]=this._convertLatLngs(t[o]);return e},_project:function(){var t=new j;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 z(t,t);this._rawPxBounds&&(this._pxBounds=new j([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,i){var o=t[0]instanceof V,l=t.length,u,p;if(o){for(p=[],u=0;u<l;u++)p[u]=this._map.latLngToLayerPoint(t[u]),i.extend(p[u]);e.push(p)}else for(u=0;u<l;u++)this._projectLatlngs(t[u],e,i)},_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,i,o,l,u,p,v,y;for(i=0,l=0,u=this._rings.length;i<u;i++)for(y=this._rings[i],o=0,p=y.length;o<p-1;o++)v=Nn(y[o],y[o+1],t,o,!0),v&&(e[l]=e[l]||[],e[l].push(v[0]),(v[1]!==y[o+1]||o===p-2)&&(e[l].push(v[1]),l++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,o=t.length;i<o;i++)t[i]=Bn(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,o,l,u,p,v,y=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,u=this._parts.length;i<u;i++)for(v=this._parts[i],o=0,p=v.length,l=p-1;o<p;l=o++)if(!(!e&&o===0)&&Rn(t,v[l],v[o])<=y)return!0;return!1}});function vs(t,e){return new Et(t,e)}Et._flat=Zn;var Jt=Et.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 On(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=Et.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof V&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){Et.prototype._setLatLngs.call(this,t),_t(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return _t(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new z(e,e);if(t=new j(t.min.subtract(i),t.max.add(i)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var o=0,l=this._rings.length,u;o<l;o++)u=zn(this._rings[o],t,!0),u.length&&this._parts.push(u)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e=!1,i,o,l,u,p,v,y,b;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(u=0,y=this._parts.length;u<y;u++)for(i=this._parts[u],p=0,b=i.length,v=b-1;p<b;v=p++)o=i[p],l=i[v],o.y>t.y!=l.y>t.y&&t.x<(l.x-o.x)*(t.y-o.y)/(l.y-o.y)+o.x&&(e=!e);return e||Et.prototype._containsPoint.call(this,t,!0)}});function ys(t,e){return new Jt(t,e)}var Pt=Mt.extend({initialize:function(t,e){M(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e=D(t)?t:t.features,i,o,l;if(e){for(i=0,o=e.length;i<o;i++)l=e[i],(l.geometries||l.geometry||l.features||l.coordinates)&&this.addData(l);return this}var u=this.options;if(u.filter&&!u.filter(t))return this;var p=Re(t,u);return p?(p.feature=Ze(t),p.defaultOptions=p.options,this.resetStyle(p),u.onEachFeature&&u.onEachFeature(t,p),this.addLayer(p)):this},resetStyle:function(t){return t===void 0?this.eachLayer(this.resetStyle,this):(t.options=n({},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 Re(t,e){var i=t.type==="Feature"?t.geometry:t,o=i?i.coordinates:null,l=[],u=e&&e.pointToLayer,p=e&&e.coordsToLatLng||Di,v,y,b,A;if(!o&&!i)return null;switch(i.type){case"Point":return v=p(o),Vn(u,t,v,e);case"MultiPoint":for(b=0,A=o.length;b<A;b++)v=p(o[b]),l.push(Vn(u,t,v,e));return new Mt(l);case"LineString":case"MultiLineString":return y=Ue(o,i.type==="LineString"?0:1,p),new Et(y,e);case"Polygon":case"MultiPolygon":return y=Ue(o,i.type==="Polygon"?1:2,p),new Jt(y,e);case"GeometryCollection":for(b=0,A=i.geometries.length;b<A;b++){var S=Re({geometry:i.geometries[b],type:"Feature",properties:t.properties},e);S&&l.push(S)}return new Mt(l);case"FeatureCollection":for(b=0,A=i.features.length;b<A;b++){var R=Re(i.features[b],e);R&&l.push(R)}return new Mt(l);default:throw new Error("Invalid GeoJSON object.")}}function Vn(t,e,i,o){return t?t(e,i):new Oe(i,o&&o.markersInheritOptions&&o)}function Di(t){return new V(t[1],t[0],t[2])}function Ue(t,e,i){for(var o=[],l=0,u=t.length,p;l<u;l++)p=e?Ue(t[l],e-1,i):(i||Di)(t[l]),o.push(p);return o}function Ii(t,e){return t=N(t),t.alt!==void 0?[x(t.lng,e),x(t.lat,e),x(t.alt,e)]:[x(t.lng,e),x(t.lat,e)]}function Ne(t,e,i,o){for(var l=[],u=0,p=t.length;u<p;u++)l.push(e?Ne(t[u],_t(t[u])?0:e-1,i,o):Ii(t[u],o));return!e&&i&&l.length>0&&l.push(l[0].slice()),l}function Kt(t,e){return t.feature?n({},t.feature,{geometry:e}):Ze(e)}function Ze(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var zi={toGeoJSON:function(t){return Kt(this,{type:"Point",coordinates:Ii(this.getLatLng(),t)})}};Oe.include(zi),Si.include(zi),Be.include(zi),Et.include({toGeoJSON:function(t){var e=!_t(this._latlngs),i=Ne(this._latlngs,e?1:0,!1,t);return Kt(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}}),Jt.include({toGeoJSON:function(t){var e=!_t(this._latlngs),i=e&&!_t(this._latlngs[0]),o=Ne(this._latlngs,i?2:e?1:0,!0,t);return e||(o=[o]),Kt(this,{type:(i?"Multi":"")+"Polygon",coordinates:o})}}),qt.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),Kt(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 i=e==="GeometryCollection",o=[];return this.eachLayer(function(l){if(l.toGeoJSON){var u=l.toGeoJSON(t);if(i)o.push(u.geometry);else{var p=Ze(u);p.type==="FeatureCollection"?o.push.apply(o,p.features):o.push(p)}}}),i?Kt(this,{geometries:o,type:"GeometryCollection"}):{type:"FeatureCollection",features:o}}});function Wn(t,e){return new Pt(t,e)}var Ls=Wn,He=Lt.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=Q(e),M(this,i)},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(){J(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&&Wt(this._image),this},bringToBack:function(){return this._map&&Yt(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=Q(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=w,e.onmousemove=w,e.onload=a(this.fire,this,"load"),e.onerror=a(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),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Bt(this._image,i,e)},_reset:function(){var t=this._image,e=new j(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();$(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){mt(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()}}),ws=function(t,e,i){return new He(t,e,i)},Yn=He.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=w,e.onmousemove=w,e.onloadeddata=a(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),o=[],l=0;l<i.length;l++)o.push(i[l].src);this._url=i.length>0?o:[e.src];return}D(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 u=0;u<this._url.length;u++){var p=H("source");p.src=this._url[u],e.appendChild(p)}}});function bs(t,e,i){return new Yn(t,e,i)}var qn=He.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=w,t.onmousemove=w}});function xs(t,e,i){return new qn(t,e,i)}var kt=Lt.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof V||D(t))?(this._latlng=N(t),M(this,e)):(M(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&&mt(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&mt(this._container,1),this.bringToFront(),this.options.interactive&&(B(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(mt(this._container,0),this._removeTimeout=setTimeout(a(J,void 0,this._container),200)):J(this._container),this.options.interactive&&(K(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=N(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&&Wt(this._container),this},bringToBack:function(){return this._map&&Yt(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Mt){e=null;var i=this._source._layers;for(var o in i)if(i[o]._map){e=i[o];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=I(this.options.offset),i=this._getAnchor();this._zoomAnimated?$(this._container,t.add(i)):e=e.add(t).add(i);var o=this._containerBottom=-e.y,l=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=o+"px",this._container.style.left=l+"px"}},_getAnchor:function(){return[0,0]}});Z.include({_initOverlay:function(t,e,i,o){var l=e;return l instanceof t||(l=new t(o).setContent(e)),i&&l.setLatLng(i),l}}),Lt.include({_initOverlay:function(t,e,i,o){var l=i;return l instanceof t?(M(l,o),l._source=this):(l=e&&!o?e:new t(o,this),l.setContent(i)),l}});var Fe=kt.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,kt.prototype.openOn.call(this,t)},onAdd:function(t){kt.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof It||this._source.on("preclick",Ut))},onRemove:function(t){kt.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof It||this._source.off("preclick",Ut))},getEvents:function(){var t=kt.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"),i=this._wrapper=H("div",t+"-content-wrapper",e);if(this._contentNode=H("div",t+"-content",i),de(e),xi(this._contentNode),O(e,"contextmenu",Ut),this._tipContainer=H("div",t+"-tip-container",e),this._tip=H("div",t+"-tip",this._tipContainer),this.options.closeButton){var o=this._closeButton=H("a",t+"-close-button",e);o.setAttribute("role","button"),o.setAttribute("aria-label","Close popup"),o.href="#close",o.innerHTML='<span aria-hidden="true">&#215;</span>',O(o,"click",function(l){nt(l),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var o=t.offsetHeight,l=this.options.maxHeight,u="leaflet-popup-scrolled";l&&o>l?(e.height=l+"px",B(t,u)):K(t,u),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();$(this._container,e.add(i))},_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(ae(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,o=this._containerWidth,l=new z(this._containerLeft,-i-this._containerBottom);l._add(Rt(this._container));var u=t.layerPointToContainerPoint(l),p=I(this.options.autoPanPadding),v=I(this.options.autoPanPaddingTopLeft||p),y=I(this.options.autoPanPaddingBottomRight||p),b=t.getSize(),A=0,S=0;u.x+o+y.x>b.x&&(A=u.x+o-b.x+y.x),u.x-A-v.x<0&&(A=u.x-v.x),u.y+i+y.y>b.y&&(S=u.y+i-b.y+y.y),u.y-S-v.y<0&&(S=u.y-v.y),(A||S)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([A,S]))}},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),ks=function(t,e){return new Fe(t,e)};Z.mergeOptions({closePopupOnClick:!0}),Z.include({openPopup:function(t,e,i){return this._initOverlay(Fe,t,e,i).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),Lt.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Fe,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 Mt||(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)){Nt(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof It)){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 Ge=kt.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){kt.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){kt.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=kt.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-"+f(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,o=this._map,l=this._container,u=o.latLngToContainerPoint(o.getCenter()),p=o.layerPointToContainerPoint(t),v=this.options.direction,y=l.offsetWidth,b=l.offsetHeight,A=I(this.options.offset),S=this._getAnchor();v==="top"?(e=y/2,i=b):v==="bottom"?(e=y/2,i=0):v==="center"?(e=y/2,i=b/2):v==="right"?(e=0,i=b/2):v==="left"?(e=y,i=b/2):p.x<u.x?(v="right",e=0,i=b/2):(v="left",e=y+(A.x+S.x)*2,i=b/2),t=t.subtract(I(e,i,!0)).add(A).add(S),K(l,"leaflet-tooltip-right"),K(l,"leaflet-tooltip-left"),K(l,"leaflet-tooltip-top"),K(l,"leaflet-tooltip-bottom"),B(l,"leaflet-tooltip-"+v),$(l,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&mt(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return I(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),As=function(t,e){return new Ge(t,e)};Z.include({openTooltip:function(t,e,i){return this._initOverlay(Ge,t,e,i).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Lt.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ge,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",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,i.click=this._openTooltip,this._map?this._addFocusListeners():i.add=this._addFocusListeners),this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),this[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Mt||(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&&(O(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),O(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,i,o;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.mouseEventToContainerPoint(t.originalEvent),o=this._map.containerPointToLayerPoint(i),e=this._map.layerPointToLatLng(o)),this._tooltip.setLatLng(e)}});var jn=jt.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"),i=this.options;if(i.html instanceof Element?(Te(e),e.appendChild(i.html)):e.innerHTML=i.html!==!1?i.html:"",i.bgPos){var o=I(i.bgPos);e.style.backgroundPosition=-o.x+"px "+-o.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function Ms(t){return new jn(t)}jt.Default=pe;var me=Lt.extend({options:{tileSize:256,opacity:1,updateWhenIdle:E.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){M(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),J(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Wt(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Yt(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=_(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 z?t:new z(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,i=-t(-1/0,1/0),o=0,l=e.length,u;o<l;o++)u=e[o].style.zIndex,e[o]!==this._container&&u&&(i=t(i,+u));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!E.ielt9){mt(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var o in this._tiles){var l=this._tiles[o];if(!(!l.current||!l.loaded)){var u=Math.min(1,(t-l.loaded)/200);mt(l.el,u),u<1?e=!0:(l.active?i=!0:this._onOpaqueTile(l),l.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(rt(this._fadeFrame),this._fadeFrame=ot(this._updateOpacity,this))}},_onOpaqueTile:w,_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 i in this._levels)i=Number(i),this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(J(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var o=this._levels[t],l=this._map;return o||(o=this._levels[t]={},o.el=H("div","leaflet-tile-container leaflet-zoom-animated",this._container),o.el.style.zIndex=e,o.origin=l.project(l.unproject(l.getPixelOrigin()),t).round(),o.zoom=t,this._setZoomTransform(o,l.getCenter(),l.getZoom()),w(o.el.offsetWidth),this._onCreateLevel(o)),this._level=o,o}},_onUpdateLevel:w,_onRemoveLevel:w,_onCreateLevel:w,_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<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 o=e.coords;this._retainParent(o.x,o.y,o.z,o.z-5)||this._retainChildren(o.x,o.y,o.z,o.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)J(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,o){var l=Math.floor(t/2),u=Math.floor(e/2),p=i-1,v=new z(+l,+u);v.z=+p;var y=this._tileCoordsToKey(v),b=this._tiles[y];return b&&b.active?(b.retain=!0,!0):(b&&b.loaded&&(b.retain=!0),p>o?this._retainParent(l,u,p,o):!1)},_retainChildren:function(t,e,i,o){for(var l=2*t;l<2*t+2;l++)for(var u=2*e;u<2*e+2;u++){var p=new z(l,u);p.z=i+1;var v=this._tileCoordsToKey(p),y=this._tiles[v];if(y&&y.active){y.retain=!0;continue}else y&&y.loaded&&(y.retain=!0);i+1<o&&this._retainChildren(l,u,i+1,o)}},_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,i,o){var l=Math.round(e);this.options.maxZoom!==void 0&&l>this.options.maxZoom||this.options.minZoom!==void 0&&l<this.options.minZoom?l=void 0:l=this._clampZoom(l);var u=this.options.updateWhenZooming&&l!==this._tileZoom;(!o||u)&&(this._tileZoom=l,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),l!==void 0&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var o=this._map.getZoomScale(i,t.zoom),l=t.origin.multiplyBy(o).subtract(this._map._getNewPixelOrigin(e,i)).round();E.any3d?Bt(t.el,l,o):$(t.el,l)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),o=this._tileZoom,l=this._map.getPixelWorldBounds(this._tileZoom);l&&(this._globalTileRange=this._pxBoundsToTileRange(l)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],o).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],o).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],o).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],o).y/i.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),o=e.getZoomScale(i,this._tileZoom),l=e.project(t,this._tileZoom).floor(),u=e.getSize().divideBy(o*2);return new j(l.subtract(u),l.add(u))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(t===void 0&&(t=e.getCenter()),this._tileZoom!==void 0){var o=this._getTiledPixelBounds(t),l=this._pxBoundsToTileRange(o),u=l.getCenter(),p=[],v=this.options.keepBuffer,y=new j(l.getBottomLeft().subtract([v,-v]),l.getTopRight().add([v,-v]));if(!(isFinite(l.min.x)&&isFinite(l.min.y)&&isFinite(l.max.x)&&isFinite(l.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var b in this._tiles){var A=this._tiles[b].coords;(A.z!==this._tileZoom||!y.contains(new z(A.x,A.y)))&&(this._tiles[b].current=!1)}if(Math.abs(i-this._tileZoom)>1){this._setView(t,i);return}for(var S=l.min.y;S<=l.max.y;S++)for(var R=l.min.x;R<=l.max.x;R++){var st=new z(R,S);if(st.z=this._tileZoom,!!this._isValidTile(st)){var et=this._tiles[this._tileCoordsToKey(st)];et?et.current=!0:p.push(st)}}if(p.sort(function(ct,Qt){return ct.distanceTo(u)-Qt.distanceTo(u)}),p.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var gt=document.createDocumentFragment();for(R=0;R<p.length;R++)this._addTile(p[R],gt);this._level.el.appendChild(gt)}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var o=this._tileCoordsToBounds(t);return Q(this.options.bounds).overlaps(o)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),o=t.scaleBy(i),l=o.add(i),u=e.unproject(o,t.z),p=e.unproject(l,t.z);return[u,p]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new ht(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new z(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(J(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=w,t.onmousemove=w,E.ielt9&&this.options.opacity<1&&mt(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),o=this._tileCoordsToKey(t),l=this.createTile(this._wrapCoords(t),a(this._tileReady,this,t));this._initTile(l),this.createTile.length<2&&ot(a(this._tileReady,this,t,null,l)),$(l,i),this._tiles[o]={el:l,coords:t,current:!0},e.appendChild(l),this.fire("tileloadstart",{tile:l,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var o=this._tileCoordsToKey(t);i=this._tiles[o],i&&(i.loaded=+new Date,this._map._fadeAnimated?(mt(i.el,0),rt(this._fadeFrame),this._fadeFrame=ot(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(B(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),E.ielt9||!this._map._fadeAnimated?ot(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new z(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 j(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 Es(t){return new me(t)}var Xt=me.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=M(this,e),e.detectRetina&&E.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 i=document.createElement("img");return O(i,"load",a(this._tileOnLoad,this,e,i)),O(i,"error",a(this._tileOnError,this,e,i)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(i.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:E.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return C(this._url,n(e,this.options))},_tileOnLoad:function(t,e){E.ielt9?setTimeout(a(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var o=this.options.errorTileUrl;o&&e.getAttribute("src")!==o&&(e.src=o),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,o=this.options.zoomOffset;return i&&(t=e-t),t+o},_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=w,e.onerror=w,!e.complete)){e.src=Y;var i=this._tiles[t].coords;J(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",Y),me.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(!(!this._map||i&&i.getAttribute("src")===Y))return me.prototype._tileReady.call(this,t,e,i)}});function Jn(t,e){return new Xt(t,e)}var Kn=Xt.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 i=n({},this.defaultWmsParams);for(var o in e)o in this.options||(i[o]=e[o]);e=M(this,e);var l=e.detectRetina&&E.retina?2:1,u=this.getTileSize();i.width=u.x*l,i.height=u.y*l,this.wmsParams=i},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,Xt.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,o=lt(i.project(e[0]),i.project(e[1])),l=o.min,u=o.max,p=(this._wmsVersion>=1.3&&this._crs===Fn?[l.y,l.x,u.y,u.x]:[l.x,l.y,u.x,u.y]).join(","),v=Xt.prototype.getTileUrl.call(this,t);return v+U(this.wmsParams,v,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+p},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});function Ps(t,e){return new Kn(t,e)}Xt.WMS=Kn,Jn.wms=Ps;var Tt=Lt.extend({options:{padding:.1},initialize:function(t){M(this,t),f(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 i=this._map.getZoomScale(e,this._zoom),o=this._map.getSize().multiplyBy(.5+this.options.padding),l=this._map.project(this._center,e),u=o.multiplyBy(-i).add(l).subtract(this._map._getNewPixelOrigin(t,e));E.any3d?Bt(this._container,u,i):$(this._container,u)},_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(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new j(i,i.add(e.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Xn=Tt.extend({options:{tolerance:0},getEvents:function(){var t=Tt.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Tt.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");O(t,"mousemove",this._onMouseMove,this),O(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),O(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){rt(this._redrawRequest),delete this._ctx,J(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)){Tt.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),o=E.retina?2:1;$(e,t.min),e.width=o*i.x,e.height=o*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",E.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Tt.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[f(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,i=e.next,o=e.prev;i?i.prev=o:this._drawLast=o,o?o.next=i:this._drawFirst=i,delete t._order,delete this._layers[f(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(/[, ]+/),i=[],o,l;for(l=0;l<e.length;l++){if(o=Number(e[l]),isNaN(o))return;i.push(o)}t.options._dashArray=i}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||ot(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new j,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 i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var o=this._drawFirst;o;o=o.next)t=o.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,o,l,u,p=t._parts,v=p.length,y=this._ctx;if(v){for(y.beginPath(),i=0;i<v;i++){for(o=0,l=p[i].length;o<l;o++)u=p[i][o],y[o?"lineTo":"moveTo"](u.x,u.y);e&&y.closePath()}this._fillStroke(y,t)}}},_updateCircle:function(t){if(!(!this._drawing||t._empty())){var e=t._point,i=this._ctx,o=Math.max(Math.round(t._radius),1),l=(Math.max(Math.round(t._radiusY),1)||o)/o;l!==1&&(i.save(),i.scale(1,l)),i.beginPath(),i.arc(e.x,e.y/l,o,0,Math.PI*2,!1),l!==1&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&i.weight!==0&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e=this._map.mouseEventToLayerPoint(t),i,o,l=this._drawFirst;l;l=l.next)i=l.layer,i.options.interactive&&i._containsPoint(e)&&(!(t.type==="click"||t.type==="preclick")||!this._map._draggableMoved(i))&&(o=i);this._fireEvent(o?[o]:!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&&(K(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var i,o,l=this._drawFirst;l;l=l.next)i=l.layer,i.options.interactive&&i._containsPoint(e)&&(o=i);o!==this._hoveredLayer&&(this._handleMouseOut(t),o&&(B(this._container,"leaflet-interactive"),this._fireEvent([o],t,"mouseover"),this._hoveredLayer=o)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,t),this._mouseHoverThrottled=!0,setTimeout(a(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var i=e.next,o=e.prev;if(i)i.prev=o;else return;o?o.next=i:i&&(this._drawFirst=i),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 i=e.next,o=e.prev;if(o)o.next=i;else return;i?i.prev=o:o&&(this._drawLast=o),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t)}}});function Qn(t){return E.canvas?new Xn(t):null}var _e=(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">')}})(),Ts={_initContainer:function(){this._container=H("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Tt.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=_e("shape");B(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=_e("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[f(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;J(e),t.removeInteractiveTarget(e),delete this._layers[f(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,o=t.options,l=t._container;l.stroked=!!o.stroke,l.filled=!!o.fill,o.stroke?(e||(e=t._stroke=_e("stroke")),l.appendChild(e),e.weight=o.weight+"px",e.color=o.color,e.opacity=o.opacity,o.dashArray?e.dashStyle=D(o.dashArray)?o.dashArray.join(" "):o.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=o.lineCap.replace("butt","flat"),e.joinstyle=o.lineJoin):e&&(l.removeChild(e),t._stroke=null),o.fill?(i||(i=t._fill=_e("fill")),l.appendChild(i),i.color=o.fillColor||o.color,i.opacity=o.fillOpacity):i&&(l.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),o=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+o+" 0,"+65535*360)},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){Wt(t._container)},_bringToBack:function(t){Yt(t._container)}},Ve=E.vml?_e:en,ge=Tt.extend({_initContainer:function(){this._container=Ve("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ve("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){J(this._container),W(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Tt.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;(!this._svgSize||!this._svgSize.equals(e))&&(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),$(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Ve("path");t.options.className&&B(e,t.options.className),t.options.interactive&&B(e,"leaflet-interactive"),this._updateStyle(t),this._layers[f(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){J(t._path),t.removeInteractiveTarget(t._path),delete this._layers[f(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,nn(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),o=Math.max(Math.round(t._radiusY),1)||i,l="a"+i+","+o+" 0 1,0 ",u=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+l+i*2+",0 "+l+-i*2+",0 ";this._setPath(t,u)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){Wt(t._path)},_bringToBack:function(t){Yt(t._path)}});E.vml&&ge.include(Ts);function $n(t){return E.svg||E.vml?new ge(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&&Qn(t)||$n(t)}});var to=Jt.extend({initialize:function(t,e){Jt.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=Q(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Cs(t,e){return new to(t,e)}ge.create=Ve,ge.pointsToPath=nn,Pt.geometryToLayer=Re,Pt.coordsToLatLng=Di,Pt.coordsToLatLngs=Ue,Pt.latLngToCoords=Ii,Pt.latLngsToCoords=Ne,Pt.getFeature=Kt,Pt.asFeature=Ze,Z.mergeOptions({boxZoom:!0});var eo=xt.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(){O(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){W(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){J(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(),le(),mi(),this._startPoint=this._map.mouseEventToContainerPoint(t),O(document,{contextmenu:Nt,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 j(this._point,this._startPoint),i=e.getSize();$(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(J(this._box),K(this._container,"leaflet-crosshair")),he(),_i(),W(document,{contextmenu:Nt,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(a(this._resetState,this),0);var e=new ht(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",eo),Z.mergeOptions({doubleClickZoom:!0});var io=xt.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,i=e.getZoom(),o=e.options.zoomDelta,l=t.originalEvent.shiftKey?i-o:i+o;e.options.doubleClickZoom==="center"?e.setZoom(l):e.setZoomAround(t.containerPoint,l)}});Z.addInitHook("addHandler","doubleClickZoom",io),Z.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var no=xt.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Dt(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(){K(this._map._container,"leaflet-grab"),K(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=Q(this._map.options.maxBounds);this._offsetLimit=lt(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,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),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),i=this._initialWorldOffset,o=this._draggable._newPos.x,l=(o-e+i)%t+e-i,u=(o+e+i)%t-e-i,p=Math.abs(l+i)<Math.abs(u+i)?l:u;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=p},_onDragEnd:function(t){var e=this._map,i=e.options,o=!i.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),o)e.fire("moveend");else{this._prunePositions(+new Date);var l=this._lastPos.subtract(this._positions[0]),u=(this._lastTime-this._times[0])/1e3,p=i.easeLinearity,v=l.multiplyBy(p/u),y=v.distanceTo([0,0]),b=Math.min(i.inertiaMaxSpeed,y),A=v.multiplyBy(b/y),S=b/(i.inertiaDeceleration*p),R=A.multiplyBy(-S/2).round();!R.x&&!R.y?e.fire("moveend"):(R=e._limitOffset(R,e.options.maxBounds),ot(function(){e.panBy(R,{duration:S,easeLinearity:p,noMoveStart:!0,animate:!0})}))}}});Z.addInitHook("addHandler","dragging",no),Z.mergeOptions({keyboard:!0,keyboardPanDelta:80});var oo=xt.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"),O(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,i=t.scrollTop||e.scrollTop,o=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(o,i)}},_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={},i=this.keyCodes,o,l;for(o=0,l=i.left.length;o<l;o++)e[i.left[o]]=[-1*t,0];for(o=0,l=i.right.length;o<l;o++)e[i.right[o]]=[t,0];for(o=0,l=i.down.length;o<l;o++)e[i.down[o]]=[0,t];for(o=0,l=i.up.length;o<l;o++)e[i.up[o]]=[0,-1*t]},_setZoomDelta:function(t){var e=this._zoomKeys={},i=this.keyCodes,o,l;for(o=0,l=i.zoomIn.length;o<l;o++)e[i.zoomIn[o]]=t;for(o=0,l=i.zoomOut.length;o<l;o++)e[i.zoomOut[o]]=-t},_addHooks:function(){O(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,i=this._map,o;if(e in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress)if(o=this._panKeys[e],t.shiftKey&&(o=I(o).multiplyBy(3)),i.options.maxBounds&&(o=i._limitOffset(I(o),i.options.maxBounds)),i.options.worldCopyJump){var l=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(o)));i.panTo(l)}else i.panBy(o)}else if(e in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else if(e===27&&i._popup&&i._popup.options.closeOnEscapeKey)i.closePopup();else return;Nt(t)}}});Z.addInitHook("addHandler","keyboard",oo),Z.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var ro=xt.extend({addHooks:function(){O(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=Tn(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var o=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(a(this._performZoom,this),o),Nt(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var o=this._delta/(this._map.options.wheelPxPerZoomLevel*4),l=4*Math.log(2/(1+Math.exp(-Math.abs(o))))/Math.LN2,u=i?Math.ceil(l/i)*i:l,p=t._limitZoom(e+(this._delta>0?u:-u))-e;this._delta=0,this._startTime=null,p&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+p):t.setZoomAround(this._lastMousePos,e+p))}});Z.addInitHook("addHandler","scrollWheelZoom",ro);var Ss=600;Z.mergeOptions({tapHold:E.touchNative&&E.safari&&E.mobile,tapTolerance:15});var so=xt.extend({addHooks:function(){O(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 z(e.clientX,e.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(O(document,"touchend",nt),O(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),Ss),O(document,"touchend touchcancel contextmenu",this._cancel,this),O(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 z(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});Z.addInitHook("addHandler","tapHold",so),Z.mergeOptions({touchZoom:E.touch,bounceAtZoomLimits:!0});var ao=xt.extend({addHooks:function(){B(this._map._container,"leaflet-touch-zoom"),O(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){K(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 i=e.mouseEventToContainerPoint(t.touches[0]),o=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(i.add(o)._divideBy(2))),this._startDist=i.distanceTo(o),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),O(document,"touchmove",this._onTouchMove,this),O(document,"touchend touchcancel",this._onTouchEnd,this),nt(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),o=e.mouseEventToContainerPoint(t.touches[1]),l=i.distanceTo(o)/this._startDist;if(this._zoom=e.getScaleZoom(l,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&l<1||this._zoom>e.getMaxZoom()&&l>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,l===1)return}else{var u=i._add(o)._divideBy(2)._subtract(this._centerPoint);if(l===1&&u.x===0&&u.y===0)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(u),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),rt(this._animRequest);var p=a(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=ot(p,this,!0),nt(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,rt(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",ao),Z.BoxZoom=eo,Z.DoubleClickZoom=io,Z.Drag=no,Z.Keyboard=oo,Z.ScrollWheelZoom=ro,Z.TapHold=so,Z.TouchZoom=ao,s.Bounds=j,s.Browser=E,s.CRS=At,s.Canvas=Xn,s.Circle=Si,s.CircleMarker=Be,s.Class=pt,s.Control=yt,s.DivIcon=jn,s.DivOverlay=kt,s.DomEvent=Jr,s.DomUtil=qr,s.Draggable=Dt,s.Evented=ne,s.FeatureGroup=Mt,s.GeoJSON=Pt,s.GridLayer=me,s.Handler=xt,s.Icon=jt,s.ImageOverlay=He,s.LatLng=V,s.LatLngBounds=ht,s.Layer=Lt,s.LayerGroup=qt,s.LineUtil=ls,s.Map=Z,s.Marker=Oe,s.Mixin=is,s.Path=It,s.Point=z,s.PolyUtil=ns,s.Polygon=Jt,s.Polyline=Et,s.Popup=Fe,s.PosAnimation=Cn,s.Projection=hs,s.Rectangle=to,s.Renderer=Tt,s.SVG=ge,s.SVGOverlay=qn,s.TileLayer=Xt,s.Tooltip=Ge,s.Transformation=ni,s.Util=Me,s.VideoOverlay=Yn,s.bind=a,s.bounds=lt,s.canvas=Qn,s.circle=gs,s.circleMarker=_s,s.control=ue,s.divIcon=Ms,s.extend=n,s.featureGroup=fs,s.geoJSON=Wn,s.geoJson=Ls,s.gridLayer=Es,s.icon=ps,s.imageOverlay=ws,s.latLng=N,s.latLngBounds=Q,s.layerGroup=us,s.map=Kr,s.marker=ms,s.point=I,s.polygon=ys,s.polyline=vs,s.popup=ks,s.rectangle=Cs,s.setOptions=M,s.stamp=f,s.svg=$n,s.svgOverlay=xs,s.tileLayer=Jn,s.tooltip=As,s.transformation=oe,s.version=c,s.videoOverlay=bs;var Ds=window.L;s.noConflict=function(){return window.L=Ds,this},window.L=s}))})($t,$t.exports)),$t.exports}var X=Ri();const ye=ut({__proto__:null,default:po(X)},[X]),_o='.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}}',go=`.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}`,vo=".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}",yo="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==",Lo="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=",wo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",bo="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",Ui="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",xo="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",ko="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 Ao(m){const h="data-leaflet-styles";if(m.querySelector(`style[${h}]`))return;const s=document.createElement("style");s.setAttribute(h,"true"),s.textContent=`
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=`
5
5
  /* --- Leaflet core CSS --- */
6
- ${_o}
6
+ ${Zn}
7
7
 
8
8
  /* --- Leaflet.draw CSS --- */
9
- ${go}
9
+ ${Hn}
10
10
 
11
11
  /* --- Leaflet.ruler CSS --- */
12
- ${vo}
12
+ ${Fn}
13
13
 
14
14
  /* --- Fix Leaflet.ruler icons (broken relative paths in inlined CSS) --- */
15
15
  .leaflet-ruler {
16
16
  width: 30px !important; /* Match Leaflet Draw default size approx */
17
17
  height: 30px !important;
18
18
  background-color: #fff; /* Ensure visibility */
19
- background-image: url(${xo}) !important;
19
+ background-image: url(${jn}) !important;
20
20
  background-size: 16px 16px; /* Scale icon to fit */
21
21
  }
22
22
  .leaflet-ruler:hover,
23
23
  .leaflet-ruler-clicked {
24
- background-image: url(${ko}) !important;
24
+ background-image: url(${qn}) !important;
25
25
  }
26
26
 
27
27
  /* --- Custom overrides for marker/handle sizes --- */
@@ -51,7 +51,7 @@ ${vo}
51
51
  padding: 0;
52
52
  border-radius: 4px;
53
53
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
54
- background-image: url(${bo});
54
+ background-image: url(${Jn});
55
55
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
56
56
  }
57
57
  .leaflet-ruler-settings-button:hover {
@@ -135,7 +135,7 @@ ${vo}
135
135
 
136
136
  /* --- Layer Cake draw tool icon + manager UI --- */
137
137
  .leaflet-draw-toolbar a.leaflet-draw-draw-cake {
138
- background-image: url(${Ui}) !important;
138
+ background-image: url(${$i}) !important;
139
139
  background-size: 18px 18px !important;
140
140
  background-position: 50% 50% !important;
141
141
  background-repeat: no-repeat !important;
@@ -193,21 +193,21 @@ ${vo}
193
193
  .leaflet-draw-move-mode .leaflet-interactive:active {
194
194
  cursor: grabbing !important;
195
195
  }
196
- `,m.appendChild(s)}function Mo(m){const h="data-leaflet-custom-styles";if(m.querySelector(`style[${h}]`))return;const s=document.createElement("style");s.setAttribute(h,"true"),s.textContent=`
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=`
197
197
  /* Ensure Layer Cake toolbar icon uses project asset instead of draw sprite sheet */
198
198
  .leaflet-draw-toolbar a.leaflet-draw-draw-cake {
199
- background-image: url(${Ui}) !important;
199
+ background-image: url(${$i}) !important;
200
200
  background-size: 18px 18px !important;
201
201
  background-position: 50% 50% !important;
202
202
  background-repeat: no-repeat !important;
203
203
  background-color: #fff;
204
204
  }
205
- `,m.appendChild(s)}function Eo(){var m,h;(h=(m=X.Icon.Default).mergeOptions)==null||h.call(m,{iconRetinaUrl:yo,iconUrl:Lo,shadowUrl:wo})}function Po(m){const{root:h,skipStyles:s}=m;try{s||(Ao(h),Eo()),Mo(h)}catch{}}(function(m,h,s){function c(n,r){for(;(n=n.parentElement)&&!n.classList.contains(r););return n}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(n,r){this._map=n,this._container=n._container,this._overlayPane=n._panes.overlayPane,this._popupPane=n._panes.popupPane,r&&r.shapeOptions&&(r.shapeOptions=L.Util.extend({},this.options.shapeOptions,r.shapeOptions)),L.setOptions(this,r);var a=L.version.split(".");parseInt(a[0],10)===1&&parseInt(a[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 n=this._map;n&&(L.DomUtil.disableTextSelection(),n.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(n){L.setOptions(this,n)},_fireCreatedEvent:function(n){this._map.fire(L.Draw.Event.CREATED,{layer:n,layerType:this.type})},_cancelDrawing:function(n){n.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(n,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,n,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 n=this._markers.pop(),r=this._poly,a=r.getLatLngs(),d=a.splice(-1,1)[0];this._poly.setLatLngs(a),this._markerGroup.removeLayer(n),r.getLatLngs().length<2&&this._map.removeLayer(r),this._vertexChanged(d,!1)}},addVertex:function(n){if(this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(n))return void this._showErrorTooltip();this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(n)),this._poly.addLatLng(n),this._poly.getLatLngs().length===2&&this._map.addLayer(this._poly),this._vertexChanged(n,!0)},completeShape:function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var n=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),r=this._poly.newLatLngIntersects(n[n.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(n){var r=this._map.mouseEventToLayerPoint(n.originalEvent),a=this._map.layerPointToLatLng(r);this._currentLatLng=a,this._updateTooltip(a),this._updateGuide(r),this._mouseMarker.setLatLng(a),L.DomEvent.preventDefault(n.originalEvent)},_vertexChanged:function(n,r){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(n,r),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(n){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(n),this._clickHandled=!0,this._disableNewMarkers();var r=n.originalEvent,a=r.clientX,d=r.clientY;this._startPoint.call(this,a,d)}},_startPoint:function(n,r){this._mouseDownOrigin=L.point(n,r)},_onMouseUp:function(n){var r=n.originalEvent,a=r.clientX,d=r.clientY;this._endPoint.call(this,a,d,n),this._clickHandled=null},_endPoint:function(n,r,a){if(this._mouseDownOrigin){var d=L.point(n,r).distanceTo(this._mouseDownOrigin),f=this._calculateFinishDistance(a.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(a.latlng),this._finishShape()):f<10&&L.Browser.touch?this._finishShape():Math.abs(d)<9*(m.devicePixelRatio||1)&&this.addVertex(a.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(n){var r,a,d=n.originalEvent;!d.touches||!d.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(r=d.touches[0].clientX,a=d.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,r,a),this._endPoint.call(this,r,a,n),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(n){var r;if(this._markers.length>0){var a;if(this.type===L.Draw.Polyline.TYPE)a=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;a=this._markers[0]}var d=this._map.latLngToContainerPoint(a.getLatLng()),f=new L.Marker(n,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),_=this._map.latLngToContainerPoint(f.getLatLng());r=d.distanceTo(_)}else r=1/0;return r},_updateFinishHandler:function(){var n=this._markers.length;n>1&&this._markers[n-1].on("click",this._finishShape,this),n>2&&this._markers[n-2].off("click",this._finishShape,this)},_createMarker:function(n){var r=new L.Marker(n,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(r),r},_updateGuide:function(n){var r=this._markers?this._markers.length:0;r>0&&(n=n||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[r-1].getLatLng()),n))},_updateTooltip:function(n){var r=this._getTooltipText();n&&this._tooltip.updatePosition(n),this._errorShown||this._tooltip.updateContent(r)},_drawGuide:function(n,r){var a,d,f,_=Math.floor(Math.sqrt(Math.pow(r.x-n.x,2)+Math.pow(r.y-n.y,2))),g=this.options.guidelineDistance,w=this.options.maxGuideLineLength,x=_>w?_-w:g;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));x<_;x+=this.options.guidelineDistance)a=x/_,d={x:Math.floor(n.x*(1-a)+a*r.x),y:Math.floor(n.y*(1-a)+a*r.y)},f=L.DomUtil.create("div","leaflet-draw-guide-dash",this._guidesContainer),f.style.backgroundColor=this._errorShown?this.options.drawError.color:this.options.shapeOptions.color,L.DomUtil.setPosition(f,d)},_updateGuideColor:function(n){if(this._guidesContainer)for(var r=0,a=this._guidesContainer.childNodes.length;r<a;r++)this._guidesContainer.childNodes[r].style.backgroundColor=n},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText:function(){var n,r,a=this.options.showLength;return this._markers.length===0?n={text:L.drawLocal.draw.handlers.polyline.tooltip.start}:(r=a?this._getMeasurementString():"",n=this._markers.length===1?{text:L.drawLocal.draw.handlers.polyline.tooltip.cont,subtext:r}:{text:L.drawLocal.draw.handlers.polyline.tooltip.end,subtext:r}),n},_updateRunningMeasure:function(n,r){var a,d,f=this._markers.length;this._markers.length===1?this._measurementRunningTotal=0:(a=f-(r?2:1),d=L.GeometryUtil.isVersion07x()?n.distanceTo(this._markers[a].getLatLng())*(this.options.factor||1):this._map.distance(n,this._markers[a].getLatLng())*(this.options.factor||1),this._measurementRunningTotal+=d*(r?1:-1))},_getMeasurementString:function(){var n,r=this._currentLatLng,a=this._markers[this._markers.length-1].getLatLng();return n=L.GeometryUtil.isVersion07x()?a&&r&&r.distanceTo?this._measurementRunningTotal+r.distanceTo(a)*(this.options.factor||1):this._measurementRunningTotal||0:a&&r?this._measurementRunningTotal+this._map.distance(r,a)*(this.options.factor||1):this._measurementRunningTotal||0,L.GeometryUtil.readableDistance(n,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 n=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,n)}}),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(n,r){L.Draw.Polyline.prototype.initialize.call(this,n,r),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var n=this._markers.length;n===1&&this._markers[0].on("click",this._finishShape,this),n>2&&(this._markers[n-1].on("dblclick",this._finishShape,this),n>3&&this._markers[n-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var n,r;return this._markers.length===0?n=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(n=L.drawLocal.draw.handlers.polygon.tooltip.cont,r=this._getMeasurementString()):(n=L.drawLocal.draw.handlers.polygon.tooltip.end,r=this._getMeasurementString()),{text:n,subtext:r}},_getMeasurementString:function(){var n=this._area,r="";return n||this.options.showLength?(this.options.showLength&&(r=L.Draw.Polyline.prototype._getMeasurementString.call(this)),n&&(r+="<br>"+L.GeometryUtil.readableArea(n,this.options.metric,this.options.precision)),r):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(n,r){var a;!this.options.allowIntersection&&this.options.showArea&&(a=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(a)),L.Draw.Polyline.prototype._vertexChanged.call(this,n,r)},_cleanUpShape:function(){var n=this._markers.length;n>0&&(this._markers[0].off("click",this._finishShape,this),n>2&&this._markers[n-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(n,r){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,n,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),h.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(h,"mouseup",this._onMouseUp,this),L.DomEvent.off(h,"touchend",this._onMouseUp,this),h.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(n){this._isDrawing=!0,this._startLatLng=n.latlng,L.DomEvent.on(h,"mouseup",this._onMouseUp,this).on(h,"touchend",this._onMouseUp,this).preventDefault(n.originalEvent)},_onMouseMove:function(n){var r=n.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(n,r){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,n,r)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(n){if(!this._shape&&!this._isCurrentlyTwoClickDrawing)return void(this._isCurrentlyTwoClickDrawing=!0);this._isCurrentlyTwoClickDrawing&&!c(n.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this)},_drawShape:function(n){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,n)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,n),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var n=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,n)},_getTooltipText:function(){var n,r,a,d=L.Draw.SimpleShape.prototype._getTooltipText.call(this),f=this._shape,_=this.options.showArea;return f&&(n=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),r=L.GeometryUtil.geodesicArea(n),a=_?L.GeometryUtil.readableArea(r,this.options.metric):""),{text:d.text,subtext:a}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(n,r){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,n,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(n){var r=n.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(n){return new L.Marker(n,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(n){this._onMouseMove(n),this._onClick()},_fireCreatedEvent:function(){var n=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,n)}}),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(n,r){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,n,r)},_fireCreatedEvent:function(){var n=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,n)},_createMarker:function(n){return new L.CircleMarker(n,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(n,r){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,n,r)},_drawShape:function(n){if(L.GeometryUtil.isVersion07x())var r=this._startLatLng.distanceTo(n);else var r=this._map.distance(this._startLatLng,n);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 n=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,n)},_onMouseMove:function(n){var r,a=n.latlng,d=this.options.showRadius,f=this.options.metric;if(this._tooltip.updatePosition(a),this._isDrawing){this._drawShape(a),r=this._shape.getRadius().toFixed(1);var _="";d&&(_=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(r,f,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:_})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(n,r){this._marker=n,L.setOptions(this,r)},addHooks:function(){var n=this._marker;n.dragging.enable(),n.on("dragend",this._onDragEnd,n),this._toggleMarkerHighlight()},removeHooks:function(){var n=this._marker;n.dragging.disable(),n.off("dragend",this._onDragEnd,n),this._toggleMarkerHighlight()},_onDragEnd:function(n){var r=n.target;r.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:r})},_toggleMarkerHighlight:function(){var n=this._marker._icon;n&&(n.style.display="none",L.DomUtil.hasClass(n,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(n,"leaflet-edit-marker-selected"),this._offsetMarker(n,-4)):(L.DomUtil.addClass(n,"leaflet-edit-marker-selected"),this._offsetMarker(n,4)),n.style.display="")},_offsetMarker:function(n,r){var a=parseInt(n.style.marginTop,10)-r,d=parseInt(n.style.marginLeft,10)-r;n.style.marginTop=a+"px",n.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(n){this.latlngs=[n._latlngs],n._holes&&(this.latlngs=this.latlngs.concat(n._holes)),this._poly=n,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(n){for(var r=0;r<this._verticesHandlers.length;r++)n(this._verticesHandlers[r])},addHooks:function(){this._initHandlers(),this._eachVertexHandler(function(n){n.addHooks()})},removeHooks:function(){this._eachVertexHandler(function(n){n.removeHooks()})},updateMarkers:function(){this._eachVertexHandler(function(n){n.updateMarkers()})},_initHandlers:function(){this._verticesHandlers=[];for(var n=0;n<this.latlngs.length;n++)this._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly,this.latlngs[n],this._poly.options.poly))},_updateLatLngs:function(n){this.latlngs=[n.layer._latlngs],n.layer._holes&&(this.latlngs=this.latlngs.concat(n.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(n,r,a){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this._poly=n,a&&a.drawError&&(a.drawError=L.Util.extend({},this.options.drawError,a.drawError)),this._latlngs=r,L.setOptions(this,a)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},addHooks:function(){var n=this._poly,r=n._path;n instanceof L.Polygon||(n.options.fill=!1,n.options.editing&&(n.options.editing.fill=!1)),r&&n.options.editing&&n.options.editing.className&&(n.options.original.className&&n.options.original.className.split(" ").forEach(function(a){L.DomUtil.removeClass(r,a)}),n.options.editing.className.split(" ").forEach(function(a){L.DomUtil.addClass(r,a)})),n.setStyle(n.options.editing),this._poly._map&&(this._map=this._poly._map,this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){var n=this._poly,r=n._path;r&&n.options.editing&&n.options.editing.className&&(n.options.editing.className.split(" ").forEach(function(a){L.DomUtil.removeClass(r,a)}),n.options.original.className&&n.options.original.className.split(" ").forEach(function(a){L.DomUtil.addClass(r,a)})),n.setStyle(n.options.original),n._map&&(n._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 n,r,a,d,f=this._defaultShape();for(n=0,a=f.length;n<a;n++)d=this._createMarker(f[n],n),d.on("click",this._onMarkerClick,this),d.on("contextmenu",this._onContextMenu,this),this._markers.push(d);var _,g;for(n=0,r=a-1;n<a;r=n++)(n!==0||L.Polygon&&this._poly instanceof L.Polygon)&&(_=this._markers[r],g=this._markers[n],this._createMiddleMarker(_,g),this._updatePrevNext(_,g))},_createMarker:function(n,r){var a=new L.Marker.Touch(n,{draggable:!0,icon:this.options.icon});return a._origLatLng=n,a._index=r,a.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(a),a},_onMarkerDragStart:function(){this._poly.fire("editstart")},_spliceLatLngs:function(){var n=this._defaultShape(),r=[].splice.apply(n,arguments);return this._poly._convertLatLngs(n,!0),this._poly.redraw(),r},_removeMarker:function(n){var r=n._index;this._markerGroup.removeLayer(n),this._markers.splice(r,1),this._spliceLatLngs(r,1),this._updateIndexes(r,-1),n.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(n){var r=n.target,a=this._poly,d=L.LatLngUtil.cloneLatLng(r._origLatLng);if(L.extend(r._origLatLng,r._latlng),a.options.poly){var f=a._map._editTooltip;if(!a.options.poly.allowIntersection&&a.intersects()){L.extend(r._origLatLng,d),r.setLatLng(d);var _=a.options.color;a.setStyle({color:this.options.drawError.color}),f&&f.updateContent({text:L.drawLocal.draw.handlers.polyline.error}),setTimeout(function(){a.setStyle({color:_}),f&&f.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(n){var r=L.Polygon&&this._poly instanceof L.Polygon?4:3,a=n.target;this._defaultShape().length<r||(this._removeMarker(a),this._updatePrevNext(a._prev,a._next),a._middleLeft&&this._markerGroup.removeLayer(a._middleLeft),a._middleRight&&this._markerGroup.removeLayer(a._middleRight),a._prev&&a._next?this._createMiddleMarker(a._prev,a._next):a._prev?a._next||(a._prev._middleRight=null):a._next._middleLeft=null,this._fireEdit())},_onContextMenu:function(n){var r=n.target;this._poly,this._poly._map.fire(L.Draw.Event.MARKERCONTEXT,{marker:r,layers:this._markerGroup,poly:this._poly}),L.DomEvent.stopPropagation},_onTouchMove:function(n){var r=this._map.mouseEventToLayerPoint(n.originalEvent.touches[0]),a=this._map.layerPointToLatLng(r),d=n.target;L.extend(d._origLatLng,a),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(n,r){this._markerGroup.eachLayer(function(a){a._index>n&&(a._index+=r)})},_createMiddleMarker:function(n,r){var a,d,f,_=this._getMiddleLatLng(n,r),g=this._createMarker(_);g.setOpacity(.6),n._middleRight=r._middleLeft=g,d=function(){g.off("touchmove",d,this);var w=r._index;g._index=w,g.off("click",a,this).on("click",this._onMarkerClick,this),_.lat=g.getLatLng().lat,_.lng=g.getLatLng().lng,this._spliceLatLngs(w,0,_),this._markers.splice(w,0,g),g.setOpacity(1),this._updateIndexes(w,1),r._index++,this._updatePrevNext(n,g),this._updatePrevNext(g,r),this._poly.fire("editstart")},f=function(){g.off("dragstart",d,this),g.off("dragend",f,this),g.off("touchmove",d,this),this._createMiddleMarker(n,g),this._createMiddleMarker(g,r)},a=function(){d.call(this),f.call(this),this._fireEdit()},g.on("click",a,this).on("dragstart",d,this).on("dragend",f,this).on("touchmove",d,this),this._markerGroup.addLayer(g)},_updatePrevNext:function(n,r){n&&(n._next=r),r&&(r._prev=n)},_getMiddleLatLng:function(n,r){var a=this._poly._map,d=a.project(n.getLatLng()),f=a.project(r.getLatLng());return a.unproject(d._add(f)._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(n,r){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=n,L.Util.setOptions(this,r)},addHooks:function(){var n=this._shape;this._shape._map&&(this._map=this._shape._map,n.setStyle(n.options.editing),n._map&&(this._map=n._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var n=this._shape;if(n.setStyle(n.options.original),n._map){this._unbindMarker(this._moveMarker);for(var r=0,a=this._resizeMarkers.length;r<a;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(n,r){var a=new L.Marker.Touch(n,{draggable:!0,icon:r,zIndexOffset:10});return this._bindMarker(a),this._markerGroup.addLayer(a),a},_bindMarker:function(n){n.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(n){n.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(n){n.target.setOpacity(0),this._shape.fire("editstart")},_fireEdit:function(){this._shape.edited=!0,this._shape.fire("edit")},_onMarkerDrag:function(n){var r=n.target,a=r.getLatLng();r===this._moveMarker?this._move(a):this._resize(a),this._shape.redraw(),this._shape.fire("editdrag")},_onMarkerDragEnd:function(n){n.target.setOpacity(1),this._fireEdit()},_onTouchStart:function(n){if(L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,n),typeof this._getCorners=="function"){var r=this._getCorners(),a=n.target,d=a._cornerIndex;a.setOpacity(0),this._oppositeCorner=r[(d+2)%4],this._toggleCornerMarkers(0,d)}this._shape.fire("editstart")},_onTouchMove:function(n){var r=this._map.mouseEventToLayerPoint(n.originalEvent.touches[0]),a=this._map.layerPointToLatLng(r);return n.target===this._moveMarker?this._move(a):this._resize(a),this._shape.redraw(),!1},_onTouchEnd:function(n){n.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 n=this._shape.getBounds(),r=n.getCenter();this._moveMarker=this._createMarker(r,this.options.moveIcon)},_createResizeMarker:function(){var n=this._getCorners();this._resizeMarkers=[];for(var r=0,a=n.length;r<a;r++)this._resizeMarkers.push(this._createMarker(n[r],this.options.resizeIcon)),this._resizeMarkers[r]._cornerIndex=r},_onMarkerDragStart:function(n){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,n);var r=this._getCorners(),a=n.target,d=a._cornerIndex;this._oppositeCorner=r[(d+2)%4],this._toggleCornerMarkers(0,d)},_onMarkerDragEnd:function(n){var r,a,d=n.target;d===this._moveMarker&&(r=this._shape.getBounds(),a=r.getCenter(),d.setLatLng(a)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,n)},_move:function(n){for(var r,a=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),d=this._shape.getBounds(),f=d.getCenter(),_=[],g=0,w=a.length;g<w;g++)r=[a[g].lat-f.lat,a[g].lng-f.lng],_.push([n.lat+r[0],n.lng+r[1]]);this._shape.setLatLngs(_),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(n){var r;this._shape.setBounds(L.latLngBounds(n,this._oppositeCorner)),r=this._shape.getBounds(),this._moveMarker.setLatLng(r.getCenter()),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},_getCorners:function(){var n=this._shape.getBounds();return[n.getNorthWest(),n.getNorthEast(),n.getSouthEast(),n.getSouthWest()]},_toggleCornerMarkers:function(n){for(var r=0,a=this._resizeMarkers.length;r<a;r++)this._resizeMarkers[r].setOpacity(n)},_repositionCornerMarkers:function(){for(var n=this._getCorners(),r=0,a=this._resizeMarkers.length;r<a;r++)this._resizeMarkers[r].setLatLng(n[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 n=this._shape.getLatLng();this._moveMarker=this._createMarker(n,this.options.moveIcon)},_createResizeMarker:function(){this._resizeMarkers=[]},_move:function(n){if(this._resizeMarkers.length){var r=this._getResizeMarkerPoint(n);this._resizeMarkers[0].setLatLng(r)}this._shape.setLatLng(n),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 n=this._shape.getLatLng(),r=this._getResizeMarkerPoint(n);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(r,this.options.resizeIcon))},_getResizeMarkerPoint:function(n){var r=this._shape._radius*Math.cos(Math.PI/4),a=this._map.project(n);return this._map.unproject([a.x+r,a.y-r])},_resize:function(n){var r=this._moveMarker.getLatLng();L.GeometryUtil.isVersion07x()?radius=r.distanceTo(n):radius=this._map.distance(r,n),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(n){this._map=n,this._container=n._container,this._pane=n._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(n,r){var a={};if(n.touches!==void 0){if(!n.touches.length)return;a=n.touches[0]}else if(n.pointerType!=="touch"||(a=n,!this._filterClick(n)))return;var d=this._map.mouseEventToContainerPoint(a),f=this._map.mouseEventToLayerPoint(a),_=this._map.layerPointToLatLng(f);this._map.fire(r,{latlng:_,layerPoint:f,containerPoint:d,pageX:a.pageX,pageY:a.pageY,originalEvent:n})},_filterClick:function(n){var r=n.timeStamp||n.originalEvent.timeStamp,a=L.DomEvent._lastClick&&r-L.DomEvent._lastClick;return a&&a>100&&a<500||n.target._simulatedClick&&!n._simulated?(L.DomEvent.stop(n),!1):(L.DomEvent._lastClick=r,!0)},_onTouchStart:function(n){this._map._loaded&&this._touchEvent(n,"touchstart")},_onTouchEnd:function(n){this._map._loaded&&this._touchEvent(n,"touchend")},_onTouchCancel:function(n){if(this._map._loaded){var r="touchcancel";this._detectIE()&&(r="pointercancel"),this._touchEvent(n,r)}},_onTouchLeave:function(n){this._map._loaded&&this._touchEvent(n,"touchleave")},_onTouchMove:function(n){this._map._loaded&&this._touchEvent(n,"touchmove")},_detectIE:function(){var n=m.navigator.userAgent,r=n.indexOf("MSIE ");if(r>0)return parseInt(n.substring(r+5,n.indexOf(".",r)),10);if(n.indexOf("Trident/")>0){var a=n.indexOf("rv:");return parseInt(n.substring(a+3,n.indexOf(".",a)),10)}var d=n.indexOf("Edge/");return d>0&&parseInt(n.substring(d+5,n.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 n=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(n,"leaflet-clickable"),L.DomEvent.on(n,"click",this._onMouseClick,this),L.DomEvent.on(n,"keypress",this._onKeyPress,this);for(var a=0;a<r.length;a++)L.DomEvent.on(n,r[a],this._fireMouseEvent,this);L.Handler.MarkerDrag&&(this.dragging=new L.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_detectIE:function(){var n=m.navigator.userAgent,r=n.indexOf("MSIE ");if(r>0)return parseInt(n.substring(r+5,n.indexOf(".",r)),10);if(n.indexOf("Trident/")>0){var a=n.indexOf("rv:");return parseInt(n.substring(a+3,n.indexOf(".",a)),10)}var d=n.indexOf("Edge/");return d>0&&parseInt(n.substring(d+5,n.indexOf(".",d)),10)}}),L.LatLngUtil={cloneLatLngs:function(n){for(var r=[],a=0,d=n.length;a<d;a++)Array.isArray(n[a])?r.push(L.LatLngUtil.cloneLatLngs(n[a])):r.push(this.cloneLatLng(n[a]));return r},cloneLatLng:function(n){return L.latLng(n.lat,n.lng)}},(function(){var n={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 a,d,f=r.length,_=0,g=Math.PI/180;if(f>2){for(var w=0;w<f;w++)a=r[w],d=r[(w+1)%f],_+=(d.lng-a.lng)*g*(2+Math.sin(a.lat*g)+Math.sin(d.lat*g));_=6378137*_*6378137/2}return Math.abs(_)},formattedNumber:function(r,a){var d=parseFloat(r).toFixed(a),f=L.drawLocal.format&&L.drawLocal.format.numeric,_=f&&f.delimiters,g=_&&_.thousands,w=_&&_.decimal;if(g||w){var x=d.split(".");d=g?x[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+g):x[0],w=w||".",x.length>1&&(d=d+w+x[1])}return d},readableArea:function(r,a,g){var f,_,g=L.Util.extend({},n,g);return a?(_=["ha","m"],type=typeof a,type==="string"?_=[a]:type!=="boolean"&&(_=a),f=r>=1e6&&_.indexOf("km")!==-1?L.GeometryUtil.formattedNumber(1e-6*r,g.km)+" km²":r>=1e4&&_.indexOf("ha")!==-1?L.GeometryUtil.formattedNumber(1e-4*r,g.ha)+" ha":L.GeometryUtil.formattedNumber(r,g.m)+" m²"):(r/=.836127,f=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²"),f},readableDistance:function(r,a,d,f,w){var g,w=L.Util.extend({},n,w);switch(a?typeof a=="string"?a:"metric":d?"feet":f?"nauticalMile":"yards"){case"metric":g=r>1e3?L.GeometryUtil.formattedNumber(r/1e3,w.km)+" km":L.GeometryUtil.formattedNumber(r,w.m)+" m";break;case"feet":r*=3.28083,g=L.GeometryUtil.formattedNumber(r,w.ft)+" ft";break;case"nauticalMile":r*=.53996,g=L.GeometryUtil.formattedNumber(r/1e3,w.nm)+" nm";break;case"yards":default:r*=1.09361,g=r>1760?L.GeometryUtil.formattedNumber(r/1760,w.mi)+" miles":L.GeometryUtil.formattedNumber(r,w.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(n,r,a,d){return this._checkCounterclockwise(n,a,d)!==this._checkCounterclockwise(r,a,d)&&this._checkCounterclockwise(n,r,a)!==this._checkCounterclockwise(n,r,d)},_checkCounterclockwise:function(n,r,a){return(a.y-n.y)*(r.x-n.x)>(r.y-n.y)*(a.x-n.x)}}),L.Polyline.include({intersects:function(){var n,r,a,d=this._getProjectedPoints(),f=d?d.length:0;if(this._tooFewPointsForIntersection())return!1;for(n=f-1;n>=3;n--)if(r=d[n-1],a=d[n],this._lineSegmentsIntersectsRange(r,a,n-2))return!0;return!1},newLatLngIntersects:function(n,r){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(n),r)},newPointIntersects:function(n,r){var a=this._getProjectedPoints(),d=a?a.length:0,f=a?a[d-1]:null,_=d-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(f,n,_,r?1:0)},_tooFewPointsForIntersection:function(n){var r=this._getProjectedPoints(),a=r?r.length:0;return a+=n||0,!r||a<=3},_lineSegmentsIntersectsRange:function(n,r,a,d){var f,_,g=this._getProjectedPoints();d=d||0;for(var w=a;w>d;w--)if(f=g[w-1],_=g[w],L.LineUtil.segmentsIntersect(n,r,f,_))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var n=[],r=this._defaultShape(),a=0;a<r.length;a++)n.push(this._map.latLngToLayerPoint(r[a]));return n}}),L.Polygon.include({intersects:function(){var n,r,a,d,f=this._getProjectedPoints();return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||(n=f.length,r=f[0],a=f[n-1],d=n-2,this._lineSegmentsIntersectsRange(a,r,d,1)))}}),L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize:function(n){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,n);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(n){var r,a=L.DomUtil.create("div","leaflet-draw"),d=!1;for(var f in this._toolbars)this._toolbars.hasOwnProperty(f)&&(r=this._toolbars[f].addToolbar(n))&&(d||(L.DomUtil.hasClass(r,"leaflet-draw-toolbar-top")||L.DomUtil.addClass(r.childNodes[0],"leaflet-draw-toolbar-top"),d=!0),a.appendChild(r));return a},onRemove:function(){for(var n in this._toolbars)this._toolbars.hasOwnProperty(n)&&this._toolbars[n].removeToolbar()},setDrawingOptions:function(n){for(var r in this._toolbars)this._toolbars[r]instanceof L.DrawToolbar&&this._toolbars[r].setOptions(n)},_toolbarEnabled:function(n){var r=n.target;for(var a in this._toolbars)this._toolbars[a]!==r&&this._toolbars[a].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(n){L.setOptions(this,n),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(n){var r,a=L.DomUtil.create("div","leaflet-draw-section"),d=0,f=this._toolbarClass||"",_=this.getModeHandlers(n);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=n,r=0;r<_.length;r++)_[r].enabled&&this._initModeHandler(_[r].handler,this._toolbarContainer,d++,f,_[r].title);if(d)return this._lastButtonIndex=--d,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),a.appendChild(this._toolbarContainer),a.appendChild(this._actionsContainer),a},removeToolbar:function(){for(var n in this._modes)this._modes.hasOwnProperty(n)&&(this._disposeButton(this._modes[n].button,this._modes[n].handler.enable,this._modes[n].handler),this._modes[n].handler.disable(),this._modes[n].handler.off("enabled",this._handlerActivated,this).off("disabled",this._handlerDeactivated,this));this._modes={};for(var r=0,a=this._actionButtons.length;r<a;r++)this._disposeButton(this._actionButtons[r].button,this._actionButtons[r].callback,this);this._actionButtons=[],this._actionsContainer=null},_initModeHandler:function(n,r,a,d,f){var _=n.type;this._modes[_]={},this._modes[_].handler=n,this._modes[_].button=this._createButton({type:_,title:f,className:d+"-"+_,container:r,callback:this._modes[_].handler.enable,context:this._modes[_].handler}),this._modes[_].buttonIndex=a,this._modes[_].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},_detectIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!m.MSStream},_createButton:function(n){var r=L.DomUtil.create("a",n.className||"",n.container),a=L.DomUtil.create("span","sr-only",n.container);r.href="#",r.appendChild(a),n.title&&(r.title=n.title,a.innerHTML=n.title),n.text&&(r.innerHTML=n.text,a.innerHTML=n.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,n.callback,n.context),r},_disposeButton:function(n,r){var a=this._detectIOS()?"touchstart":"click";L.DomEvent.off(n,"click",L.DomEvent.stopPropagation).off(n,"mousedown",L.DomEvent.stopPropagation).off(n,"dblclick",L.DomEvent.stopPropagation).off(n,"touchstart",L.DomEvent.stopPropagation).off(n,"click",L.DomEvent.preventDefault).off(n,a,r)},_handlerActivated:function(n){this.disable(),this._activeMode=this._modes[n.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(n){var r,a,d,f,_=this._actionsContainer,g=this.getActions(n),w=g.length;for(a=0,d=this._actionButtons.length;a<d;a++)this._disposeButton(this._actionButtons[a].button,this._actionButtons[a].callback);for(this._actionButtons=[];_.firstChild;)_.removeChild(_.firstChild);for(var x=0;x<w;x++)"enabled"in g[x]&&!g[x].enabled||(r=L.DomUtil.create("li","",_),f=this._createButton({title:g[x].title,text:g[x].text,container:r,callback:g[x].callback,context:g[x].context}),this._actionButtons.push({button:f,callback:g[x].callback}))},_showActionsToolbar:function(){var n=this._activeMode.buttonIndex,r=this._lastButtonIndex,a=this._activeMode.button.offsetTop-1;this._createActions(this._activeMode.handler),this._actionsContainer.style.top=a+"px",n===0&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-top")),n===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(n){this._map=n,this._popupPane=n._panes.popupPane,this._visible=!1,this._container=n.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(n){return this._container?(n.subtext=n.subtext||"",n.subtext.length!==0||this._singleLineLabel?n.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=(n.subtext.length>0?'<span class="leaflet-draw-tooltip-subtext">'+n.subtext+"</span><br />":"")+"<span>"+n.text+"</span>",n.text||n.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},updatePosition:function(n){var r=this._map.latLngToLayerPoint(n),a=this._container;return this._container&&(this._visible&&(a.style.visibility="inherit"),L.DomUtil.setPosition(a,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(n){for(var r in this.options)this.options.hasOwnProperty(r)&&n[r]&&(n[r]=L.extend({},this.options[r],n[r]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,n)},getModeHandlers:function(n){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(n,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(n,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(n,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(n,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(n,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(n,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(n){return[{enabled:n.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:n.completeShape,context:n},{enabled:n.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:n.deleteLastVertex,context:n},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(n){L.setOptions(this,n);for(var r in this._modes)this._modes.hasOwnProperty(r)&&n.hasOwnProperty(r)&&this._modes[r].handler.setOptions(n[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(n){n.edit&&(n.edit.selectedPathOptions===void 0&&(n.edit.selectedPathOptions=this.options.edit.selectedPathOptions),n.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,n.edit.selectedPathOptions)),n.remove&&(n.remove=L.extend({},this.options.remove,n.remove)),n.poly&&(n.poly=L.extend({},this.options.poly,n.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,n),this._selectedFeatureCount=0},getModeHandlers:function(n){var r=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(n,{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(n,{featureGroup:r}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(n){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 n.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(n){var r=L.Toolbar.prototype.addToolbar.call(this,n);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 n,r=this.options.featureGroup,a=r.getLayers().length!==0;this.options.edit&&(n=this._modes[L.EditToolbar.Edit.TYPE].button,a?L.DomUtil.removeClass(n,"leaflet-disabled"):L.DomUtil.addClass(n,"leaflet-disabled"),n.setAttribute("title",a?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(n=this._modes[L.EditToolbar.Delete.TYPE].button,a?L.DomUtil.removeClass(n,"leaflet-disabled"):L.DomUtil.addClass(n,"leaflet-disabled"),n.setAttribute("title",a?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(n,r){if(L.Handler.prototype.initialize.call(this,n),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 a=L.version.split(".");parseInt(a[0],10)===1&&parseInt(a[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 n=this._map;n&&(n.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}),n._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(n){this._revertLayer(n)},this)},save:function(){var n=new L.LayerGroup;this._featureGroup.eachLayer(function(r){r.edited&&(n.addLayer(r),r.edited=!1)}),this._map.fire(L.Draw.Event.EDITED,{layers:n})},_backupLayer:function(n){var r=L.Util.stamp(n);this._uneditedLayerProps[r]||(n instanceof L.Polyline||n instanceof L.Polygon||n instanceof L.Rectangle?this._uneditedLayerProps[r]={latlngs:L.LatLngUtil.cloneLatLngs(n.getLatLngs())}:n instanceof L.Circle?this._uneditedLayerProps[r]={latlng:L.LatLngUtil.cloneLatLng(n.getLatLng()),radius:n.getRadius()}:(n instanceof L.Marker||n instanceof L.CircleMarker)&&(this._uneditedLayerProps[r]={latlng:L.LatLngUtil.cloneLatLng(n.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(n){var r=L.Util.stamp(n);n.edited=!1,this._uneditedLayerProps.hasOwnProperty(r)&&(n instanceof L.Polyline||n instanceof L.Polygon||n instanceof L.Rectangle?n.setLatLngs(this._uneditedLayerProps[r].latlngs):n instanceof L.Circle?(n.setLatLng(this._uneditedLayerProps[r].latlng),n.setRadius(this._uneditedLayerProps[r].radius)):(n instanceof L.Marker||n instanceof L.CircleMarker)&&n.setLatLng(this._uneditedLayerProps[r].latlng),n.fire("revert-edited",{layer:n}))},_enableLayerEdit:function(n){var r,a,d=n.layer||n.target||n;this._backupLayer(d),this.options.poly&&(a=L.Util.extend({},this.options.poly),d.options.poly=a),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(n){var r=n.layer||n.target||n;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(n){this._tooltip.updatePosition(n.latlng)},_onMarkerDragEnd:function(n){var r=n.target;r.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:r})},_onTouchMove:function(n){var r=n.originalEvent.changedTouches[0],a=this._map.mouseEventToLayerPoint(r),d=this._map.layerPointToLatLng(a);n.target.setLatLng(d)},_hasAvailableLayers:function(){return this._featureGroup.getLayers().length!==0}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(n,r){if(L.Handler.prototype.initialize.call(this,n),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 a=L.version.split(".");parseInt(a[0],10)===1&&parseInt(a[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 n=this._map;n&&(n.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(n){this._deletableLayers.addLayer(n),n.fire("revert-deleted",{layer:n})},this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer(function(n){this._removeLayer({layer:n})},this),this.save()},_enableLayerDelete:function(n){(n.layer||n.target||n).on("click",this._removeLayer,this)},_disableLayerDelete:function(n){var r=n.layer||n.target||n;r.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(r)},_removeLayer:function(n){var r=n.layer||n.target||n;this._deletableLayers.removeLayer(r),this._deletedLayers.addLayer(r),r.fire("deleted")},_onMouseMove:function(n){this._tooltip.updatePosition(n.latlng)},_hasAvailableLayers:function(){return this._deletableLayers.getLayers().length!==0}})})(window,document);var Ye={exports:{}},Ni;function To(){return Ni||(Ni=1,(function(m,h){(function(s,c){m.exports=s(Ri()),typeof c!="undefined"&&c.L&&(c.L.Ruler=s(L))})(function(s){s.Control.Ruler=s.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(c){return this._map=c,this._container=s.DomUtil.create("div","leaflet-bar"),this._container.classList.add("leaflet-ruler"),s.DomEvent.disableClickPropagation(this._container),s.DomEvent.on(this._container,"click",this._toggleMeasure,this),this._choice=!1,this._defaultCursor=this._map._container.style.cursor,this._allLayers=s.layerGroup(),this._container},onRemove:function(){s.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(),s.DomEvent.on(this._map._container,"keydown",this._escape,this),s.DomEvent.on(this._map._container,"dblclick",this._closePath,this),this._container.classList.add("leaflet-ruler-clicked"),this._clickCount=0,this._tempLine=s.featureGroup().addTo(this._allLayers),this._tempPoint=s.featureGroup().addTo(this._allLayers),this._pointLayer=s.featureGroup().addTo(this._allLayers),this._polylineLayer=s.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(),s.DomEvent.off(this._map._container,"keydown",this._escape,this),s.DomEvent.off(this._map._container,"dblclick",this._closePath,this),this._container.classList.remove("leaflet-ruler-clicked"),this._map.removeLayer(this._allLayers),this._allLayers=s.layerGroup(),this._map._container.style.cursor=this._defaultCursor,this._map.off("click",this._clicked,this),this._map.off("mousemove",this._moving,this))},_clicked:function(c){if(this._clickedLatLong=c.latlng,this._clickedPoints.push(this._clickedLatLong),s.circleMarker(this._clickedLatLong,this.options.circleMarker).addTo(this._pointLayer),this._clickCount>0&&!c.latlng.equals(this._clickedPoints[this._clickedPoints.length-2])){this._movingLatLong&&s.polyline([this._clickedPoints[this._clickCount-1],this._movingLatLong],this.options.lineStyle).addTo(this._polylineLayer);var n;this._totalLength+=this._result.Distance,this._clickCount>1?n="<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:n="<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,s.circleMarker(this._clickedLatLong,this.options.circleMarker).bindTooltip(n,{permanent:!0,className:"result-tooltip"}).addTo(this._pointLayer).openTooltip()}this._clickCount++},_moving:function(c){if(this._clickedLatLong){s.DomEvent.off(this._container,"click",this._toggleMeasure,this),this._movingLatLong=c.latlng,this._tempLine&&(this._map.removeLayer(this._tempLine),this._map.removeLayer(this._tempPoint));var n;this._addedLength=0,this._tempLine=s.featureGroup(),this._tempPoint=s.featureGroup(),this._tempLine.addTo(this._map),this._tempPoint.addTo(this._map),this._calculateBearingAndDistance(),this._addedLength=this._result.Distance+this._totalLength,s.polyline([this._clickedLatLong,this._movingLatLong],this.options.lineStyle).addTo(this._tempLine),this._clickCount>1?n="<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>":n="<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,s.circleMarker(this._movingLatLong,this.options.circleMarker).bindTooltip(n,{sticky:!0,offset:s.point(0,-40),className:"moving-tooltip"}).addTo(this._tempPoint).openTooltip()}},_escape:function(c){c.keyCode===27&&(this._clickCount>0?this._closePath():(this._choice=!0,this._toggleMeasure()))},_calculateBearingAndDistance:function(){var c=this._clickedLatLong.lat,n=this._clickedLatLong.lng,r=this._movingLatLong.lat,a=this._movingLatLong.lng,d=Math.PI/180,f=Math.sin((a-n)*d)*Math.cos(r*d),_=Math.cos(c*d)*Math.sin(r*d)-Math.sin(c*d)*Math.cos(r*d)*Math.cos((a-n)*d),g=Math.atan2(f,_)*((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 w=this.options.lengthUnit.factor?6371*this.options.lengthUnit.factor:6371,x=(r-c)*d,T=(a-n)*d,P=Math.sin(x/2)*Math.sin(x/2)+Math.cos(c*d)*Math.cos(r*d)*Math.sin(T/2)*Math.sin(T/2),M=2*Math.atan2(Math.sqrt(P),Math.sqrt(1-P)),U=w*M;this._result={Bearing:g,Distance:U}},_closePath:function(){this._map.removeLayer(this._tempLine),this._map.removeLayer(this._tempPoint),this._clickCount<=1&&this._map.removeLayer(this._pointLayer),this._choice=!1,s.DomEvent.on(this._container,"click",this._toggleMeasure,this),this._toggleMeasure()}}),s.control.ruler=function(c){return new s.Control.Ruler(c)}},window)})(Ye)),Ye.exports}To();let Le;const Co=new Uint8Array(16);function So(){if(!Le&&(Le=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Le))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Le(Co)}const it=[];for(let m=0;m<256;++m)it.push((m+256).toString(16).slice(1));function Do(m,h=0){return it[m[h+0]]+it[m[h+1]]+it[m[h+2]]+it[m[h+3]]+"-"+it[m[h+4]]+it[m[h+5]]+"-"+it[m[h+6]]+it[m[h+7]]+"-"+it[m[h+8]]+it[m[h+9]]+"-"+it[m[h+10]]+it[m[h+11]]+it[m[h+12]]+it[m[h+13]]+it[m[h+14]]+it[m[h+15]]}const Zi={randomUUID:typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function qe(m,h,s){if(Zi.randomUUID&&!m)return Zi.randomUUID();m=m||{};const c=m.random||(m.rng||So)();return c[6]=c[6]&15|64,c[8]=c[8]&63|128,Do(c)}function Io(m){var s,c;const h=(c=m.id)!=null?c:(s=m.properties)==null?void 0:s.id;if(h!=null)return String(h)}function zo(m,h){const s=c=>{switch(c.type){case"Point":h(c.coordinates);break;case"MultiPoint":case"LineString":for(const n of c.coordinates)h(n);break;case"MultiLineString":case"Polygon":for(const n of c.coordinates)for(const r of n)h(r);break;case"MultiPolygon":for(const n of c.coordinates)for(const r of n)for(const a of r)h(a);break;case"GeometryCollection":for(const n of c.geometries)s(n);break}};s(m)}function Oo(m){const h=m.geometry;if(!h)return null;let s=1/0,c=1/0,n=-1/0,r=-1/0,a=!1;return zo(h,d=>{const[f,_]=d;typeof f!="number"||typeof _!="number"||(a=!0,f<s&&(s=f),_<c&&(c=_),f>n&&(n=f),_>r&&(r=_))}),a?[s,c,n,r]:null}function Bo(m){let h=1/0,s=1/0,c=-1/0,n=-1/0,r=!1;for(const a of m.features){const d=Oo(a);d&&(r=!0,h=Math.min(h,d[0]),s=Math.min(s,d[1]),c=Math.max(c,d[2]),n=Math.max(n,d[3]))}return r?[h,s,c,n]:null}function Ro(m){const[h,s,c,n]=m;return[[s,h],[n,c]]}function Hi(m){var s;const h=[];for(const c of m.features){if(!c||c.type!=="Feature")continue;const n=(s=c.properties)!=null?s:{},r=c.geometry;if(r)switch(r.type){case"MultiPolygon":for(const a of r.coordinates)h.push({type:"Feature",properties:{...n},geometry:{type:"Polygon",coordinates:a}});break;case"MultiLineString":for(const a of r.coordinates)h.push({type:"Feature",properties:{...n},geometry:{type:"LineString",coordinates:a}});break;case"MultiPoint":for(const a of r.coordinates)h.push({type:"Feature",properties:{...n},geometry:{type:"Point",coordinates:a}});break;case"GeometryCollection":for(const a of r.geometries)h.push({type:"Feature",properties:{...n},geometry:a});break;default:h.push(c);break}}return{type:"FeatureCollection",features:h}}function Fi(m){return(m==null?void 0:m.type)==="Polygon"}function Gi(m){return(m==null?void 0:m.type)==="MultiPolygon"}function Uo(m){const h=m.geometry;return h?Fi(h)?[h.coordinates]:Gi(h)?h.coordinates:[]:[]}function No(m,h){var n,r;const s=[];for(const a of m){const d=Uo(a);d.length>0&&s.push(...d)}if(s.length===0)return null;const c=(r=h!=null?h:(n=m[0])==null?void 0:n.properties)!=null?r:{};return s.length===1?{type:"Feature",properties:{...c},geometry:{type:"Polygon",coordinates:s[0]}}:{type:"Feature",properties:{...c},geometry:{type:"MultiPolygon",coordinates:s}}}class Zo{constructor(h=ve("feature-store","debug")){k(this,"log");k(this,"features");this.log=h,this.features=new Map}size(){return this.features.size}has(h){return this.features.has(h)}get(h){return this.features.get(h)}add(h){var r,a,d,f;const s=[],c=(a=(r=performance.now)==null?void 0:r.call(performance))!=null?a:Date.now();for(const _ of h.features){const g=this.ensureId(_),w={..._,id:g};this.features.set(g,w),s.push(g)}const n=((f=(d=performance.now)==null?void 0:d.call(performance))!=null?f:Date.now())-c;return this.log.debug("add",{count:h.features.length,ids:s,elapsedMs:Math.round(n)}),s}update(h,s){if(!this.features.has(h)){this.log.warn("update:missing",{id:h});return}const c={...s,id:h};this.features.set(h,c),this.log.debug("update",{id:h})}remove(h){this.features.delete(h)?this.log.debug("remove",{id:h}):this.log.warn("remove:missing",{id:h})}clear(){const h=this.features.size;this.features.clear(),this.log.debug("clear",{count:h})}toFeatureCollection(){return{type:"FeatureCollection",features:Array.from(this.features.values())}}bounds(){const h=this.toFeatureCollection();if(h.features.length===0)return null;const s=Bo(h);return s?Ro(s):null}ensureId(h){const s=Io(h);if(s)return String(s);const c=qe();return h.id=c,h.properties&&typeof h.properties=="object"&&(h.properties.id=c),c}}const Vi=new WeakSet;function Ho(m=ye){var c;if(Vi.has(m))return;const h=m.DrawToolbar;if(!((c=h==null?void 0:h.prototype)!=null&&c.getModeHandlers))return;const s=h.prototype.getModeHandlers;h.prototype.getModeHandlers=function(n){var a,d,f,_;const r=s.call(this,n);if((a=this.options)!=null&&a.cake){const g=(d=m.Draw)==null?void 0:d.Cake;if(!g)return r;r.push({enabled:!0,handler:new g(n,this.options.cake),title:"Draw Layer Cake (Subtractive Zones)"})}if((f=this.options)!=null&&f.move){const g=(_=m.Draw)==null?void 0:_.Move;if(!g)return r;r.push({enabled:!0,handler:new g(n,this.options.move),title:"Move/Translate Features"})}return r},Vi.add(m)}const xe=class xe extends X.Draw.Circle{constructor(h,s){super(h,s),this.type=xe.TYPE}addHooks(){super.addHooks();const h=this._tooltip;h!=null&&h.updateContent&&h.updateContent({text:"Click and drag to draw the Layer Cake base",subtext:"Release mouse to finish base layer"})}};k(xe,"TYPE","cake");let we=xe;X.Draw.Cake=we;function Fo(m){const h=m.Draw;if(!h||h.Cake)return;const c=class c extends h.Circle{constructor(r,a){super(r,a),this.type=c.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(c,"TYPE","cake");let s=c;h.Cake=s}const ke=class ke extends X.Draw.Feature{constructor(s,c){super(s,c);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=ke.TYPE,this._featureGroup=(c==null?void 0:c.featureGroup)||new X.FeatureGroup}enable(){this._enabled||super.enable()}disable(){this._enabled&&(this._cleanupDragging(),super.disable())}addHooks(){const s=this._map;if(!s)return;X.DomUtil.addClass(s.getContainer(),"leaflet-draw-move-mode"),this._featureGroup.eachLayer(n=>{this._enableLayerHover(n)});const c=this._tooltip;c!=null&&c.updateContent&&c.updateContent({text:"Click and drag a feature to move it",subtext:""})}removeHooks(){const s=this._map;s&&(X.DomUtil.removeClass(s.getContainer(),"leaflet-draw-move-mode"),this._featureGroup.eachLayer(c=>{this._disableLayerHover(c)}),this._cleanupDragging())}_enableLayerHover(s){s.on&&(s.on("mouseover",this._onLayerMouseOver,this),s.on("mouseout",this._onLayerMouseOut,this),s.on("mousedown",this._onLayerMouseDown,this))}_disableLayerHover(s){s.off&&(s.off("mouseover",this._onLayerMouseOver,this),s.off("mouseout",this._onLayerMouseOut,this),s.off("mousedown",this._onLayerMouseDown,this))}_onLayerMouseOver(s){if(this._isDragging)return;const c=s.target;if(c.getElement){const n=c.getElement();n&&(n.style.cursor="grab")}else c._path&&(c._path.style.cursor="grab")}_onLayerMouseOut(s){if(this._isDragging)return;const c=s.target;if(c.getElement){const n=c.getElement();n&&(n.style.cursor="")}else c._path&&(c._path.style.cursor="")}_onLayerMouseDown(s){if(this._isDragging)return;X.DomEvent.stopPropagation(s.originalEvent),X.DomEvent.preventDefault(s.originalEvent);const c=s.target;if(this._selectedLayer=c,this._isDragging=!0,this._dragStartLatLng=s.latlng,this._storeOriginalLatLngs(c),c.getElement){const r=c.getElement();r&&(r.style.cursor="grabbing")}else c._path&&(c._path.style.cursor="grabbing");this._map.on("mousemove",this._onMouseMove,this),this._map.on("mouseup",this._onMouseUp,this);const n=c.toGeoJSON();this._pendingMove={layer:c,originalGeoJSON:n,newGeoJSON:n}}_storeOriginalLatLngs(s){s.getLatLng?this._originalLatLngs=s.getLatLng():s.getLatLngs&&(this._originalLatLngs=JSON.parse(JSON.stringify(s.getLatLngs())))}_onMouseMove(s){if(!this._isDragging||!this._selectedLayer||!this._dragStartLatLng)return;const c=this._selectedLayer,n={lat:s.latlng.lat-this._dragStartLatLng.lat,lng:s.latlng.lng-this._dragStartLatLng.lng};if(c.setLatLng){const r=X.latLng(this._originalLatLngs.lat+n.lat,this._originalLatLngs.lng+n.lng);c.setLatLng(r)}else if(c.setLatLngs){const r=this._offsetLatLngs(this._originalLatLngs,n);c.setLatLngs(r)}}_offsetLatLngs(s,c){return s instanceof X.LatLng||s.lat!==void 0&&s.lng!==void 0?X.latLng(s.lat+c.lat,s.lng+c.lng):Array.isArray(s)?s.map(n=>this._offsetLatLngs(n,c)):s}_onMouseUp(s){var n,r;if(!this._isDragging||!this._selectedLayer)return;this._pendingMove&&(this._pendingMove.newGeoJSON=this._selectedLayer.toGeoJSON());const c=this._selectedLayer;if(c.getElement){const a=c.getElement();a&&(a.style.cursor="grab")}else c._path&&(c._path.style.cursor="grab");this._map.fire("draw:moveend",{layer:this._selectedLayer,originalGeoJSON:(n=this._pendingMove)==null?void 0:n.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 s=this._selectedLayer;if(s.getElement){const c=s.getElement();c&&(c.style.cursor="")}else s._path&&(s._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 s=this._pendingMove.layer;s.setLatLng&&this._originalLatLngs?s.setLatLng(this._originalLatLngs):s.setLatLngs&&this._originalLatLngs&&s.setLatLngs(this._originalLatLngs),this._cleanupDragging()}hasPendingMove(){return this._pendingMove!==null}};k(ke,"TYPE","move");let je=ke;X.Draw.Move=je;function Go(m){const h=m.Draw;if(!h||h.Move)return;const c=class c extends h.Feature{constructor(a,d){super(a,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=c.TYPE,this._featureGroup=(d==null?void 0:d.featureGroup)||new X.FeatureGroup}enable(){this._enabled||super.enable()}disable(){this._enabled&&(this._cleanupDragging(),super.disable())}addHooks(){const a=this._map;if(!a)return;m.DomUtil.addClass(a.getContainer(),"leaflet-draw-move-mode"),this._featureGroup.eachLayer(f=>{this._enableLayerHover(f)});const d=this._tooltip;d!=null&&d.updateContent&&d.updateContent({text:"Click and drag a feature to move it",subtext:""})}removeHooks(){const a=this._map;a&&(m.DomUtil.removeClass(a.getContainer(),"leaflet-draw-move-mode"),this._featureGroup.eachLayer(d=>{this._disableLayerHover(d)}),this._cleanupDragging())}_enableLayerHover(a){a.on&&(a.on("mouseover",this._onLayerMouseOver,this),a.on("mouseout",this._onLayerMouseOut,this),a.on("mousedown",this._onLayerMouseDown,this))}_disableLayerHover(a){a.off&&(a.off("mouseover",this._onLayerMouseOver,this),a.off("mouseout",this._onLayerMouseOut,this),a.off("mousedown",this._onLayerMouseDown,this))}_onLayerMouseOver(a){if(this._isDragging)return;const d=a.target;if(d.getElement){const f=d.getElement();f&&(f.style.cursor="grab")}else d._path&&(d._path.style.cursor="grab")}_onLayerMouseOut(a){if(this._isDragging)return;const d=a.target;if(d.getElement){const f=d.getElement();f&&(f.style.cursor="")}else d._path&&(d._path.style.cursor="")}_onLayerMouseDown(a){if(this._isDragging)return;m.DomEvent.stopPropagation(a.originalEvent),m.DomEvent.preventDefault(a.originalEvent);const d=a.target;if(this._selectedLayer=d,this._isDragging=!0,this._dragStartLatLng=a.latlng,this._storeOriginalLatLngs(d),d.getElement){const _=d.getElement();_&&(_.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 f=d.toGeoJSON();this._pendingMove={layer:d,originalGeoJSON:f,newGeoJSON:f}}_storeOriginalLatLngs(a){a.getLatLng?this._originalLatLngs=a.getLatLng():a.getLatLngs&&(this._originalLatLngs=JSON.parse(JSON.stringify(a.getLatLngs())))}_onMouseMove(a){if(!this._isDragging||!this._selectedLayer||!this._dragStartLatLng)return;const d=this._selectedLayer,f={lat:a.latlng.lat-this._dragStartLatLng.lat,lng:a.latlng.lng-this._dragStartLatLng.lng};if(d.setLatLng){const _=m.latLng(this._originalLatLngs.lat+f.lat,this._originalLatLngs.lng+f.lng);d.setLatLng(_)}else if(d.setLatLngs){const _=this._offsetLatLngs(this._originalLatLngs,f);d.setLatLngs(_)}}_offsetLatLngs(a,d){return a instanceof m.LatLng||a.lat!==void 0&&a.lng!==void 0?m.latLng(a.lat+d.lat,a.lng+d.lng):Array.isArray(a)?a.map(f=>this._offsetLatLngs(f,d)):a}_onMouseUp(a){var f,_;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:(f=this._pendingMove)==null?void 0:f.originalGeoJSON,newGeoJSON:(_=this._pendingMove)==null?void 0:_.newGeoJSON}),this._map.off("mousemove",this._onMouseMove,this),this._map.off("mouseup",this._onMouseUp,this),this._isDragging=!1}_cleanupDragging(){if(this._selectedLayer){const a=this._selectedLayer;if(a.getElement){const d=a.getElement();d&&(d.style.cursor="")}else a._path&&(a._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 a=this._pendingMove.layer;a.setLatLng&&this._originalLatLngs?a.setLatLng(this._originalLatLngs):a.setLatLngs&&this._originalLatLngs&&a.setLatLngs(this._originalLatLngs),this._cleanupDragging()}hasPendingMove(){return this._pendingMove!==null}};k(c,"TYPE","move");let s=c;h.Move=s}const Vo=63710088e-1;function Je(m){return m*Math.PI/180}function Wi(m){return m*180/Math.PI}function Wo(m,h,s){const c=h/Vo,n=Je(s),r=Je(m.lat),a=Je(m.lng),d=Math.sin(r),f=Math.cos(r),_=Math.sin(c),g=Math.cos(c),w=d*g+f*_*Math.cos(n),x=Math.asin(w),T=Math.sin(n)*_*f,P=g-d*w,M=a+Math.atan2(T,P);return{lat:Wi(x),lng:Wi(M)}}function Yo(m){let h=0;for(let s=0;s<m.length-1;s++){const[c,n]=m[s],[r,a]=m[s+1];h+=c*a-r*n}return h/2}function Ke(m){const h=m[0],s=m.at(-1);return!h||!s||h[0]===s[0]&&h[1]===s[1]?m:[...m,h]}function Xe(m,h){const s=Ke(m);if(Yo(s)<0===h)return s;const r=[...s].reverse();return Ke(r)}function Qe(m,h,s){if(s<4)throw new Error("steps must be >= 4");const c=[];for(let n=0;n<s;n++){const r=n/s*360,a=Wo(m,h,r);c.push([a.lng,a.lat])}return Ke(c)}function qo(m){const{id:h,center:s,radiusMeters:c,layerIndex:n,steps:r}=m,a=Xe(Qe(s,c,r),!1);return{type:"Feature",properties:{id:h,layer_index:n,radius_outer:c,type:"core",_meta:{lat:s.lat,lng:s.lng,radius:c}},geometry:{type:"Polygon",coordinates:[a]}}}function jo(m){const{id:h,center:s,radiusOuterMeters:c,radiusInnerMeters:n,layerIndex:r,steps:a}=m,d=Xe(Qe(s,c,a),!1),f=Xe(Qe(s,n,a),!0);return{type:"Feature",properties:{id:h,layer_index:r,radius_outer:c,type:"ring",_meta:{lat:s.lat,lng:s.lng,radius:c}},geometry:{type:"Polygon",coordinates:[d,f]}}}function Jo(m){const{circles:h,steps:s=64}=m,c=[...h].sort((r,a)=>r.getRadius()-a.getRadius()),n=[];return c.forEach((r,a)=>{const d=r.getLatLng(),f=r.getRadius(),_=qe();if(a===0){n.push(qo({id:_,center:d,radiusMeters:f,layerIndex:a,steps:s}));return}const w=c[a-1].getRadius();n.push(jo({id:_,center:d,radiusOuterMeters:f,radiusInnerMeters:w,layerIndex:a,steps:s}))}),{type:"FeatureCollection",features:n}}function te(m){m.preventDefault(),m.stopPropagation()}function Ko(m){var _,g;const{root:h,addButtonId:s,saveButtonId:c,onAddRing:n,onSave:r}=m,a=(_=h.querySelector)==null?void 0:_.call(h,`#${s}`),d=(g=h.querySelector)==null?void 0:g.call(h,`#${c}`);if(!a||!d)return;const f="data-cake-controls-bound";if(!(a.hasAttribute(f)||d.hasAttribute(f))){a.setAttribute(f,"true"),d.setAttribute(f,"true");for(const w of[a,d])w.addEventListener("pointerdown",te),w.addEventListener("mousedown",te),w.addEventListener("touchstart",te);a.addEventListener("click",w=>{te(w),n()}),d.addEventListener("click",w=>{te(w),r()})}}function Xo(m){var s;const h=(s=m.options)!=null?s:{};h.original||(h.original={...h}),h.editing||(h.editing={...h})}function ee(m,h){if(h==="imperial"){const s=m*3.28084;return s>=5280?`${(s/5280).toFixed(2)} mi`:`${Math.round(s)} ft`}return m>=1e3?`${(m/1e3).toFixed(2)} km`:`${Math.round(m)} m`}class Qo{constructor(h,s,c,n="metric"){k(this,"map");k(this,"layers",[]);k(this,"controlsGroup");k(this,"onSave");k(this,"sessionId",qe().slice(0,8));k(this,"baseCircleOptions");k(this,"detachMapListeners",[]);k(this,"renderScheduled",!1);k(this,"measurementSystem");this.map=h,this.onSave=c,this.measurementSystem=n,this.controlsGroup=X.layerGroup().addTo(h),this.baseCircleOptions={...s.options},delete this.baseCircleOptions.editing,delete this.baseCircleOptions.original,this.addLayer(s),this.installEditEventBridges(),this.renderControls()}installEditEventBridges(){var g,w,x,T,P,M,U,F;const h=ye,s=(w=(g=h==null?void 0:h.Draw)==null?void 0:g.Event)==null?void 0:w.EDITMOVE,c=(T=(x=h==null?void 0:h.Draw)==null?void 0:x.Event)==null?void 0:T.EDITRESIZE,n=(M=(P=h==null?void 0:h.Draw)==null?void 0:P.Event)==null?void 0:M.EDITSTART,r=(F=(U=h==null?void 0:h.Draw)==null?void 0:U.Event)==null?void 0:F.EDITSTOP;if(!s||!c)return;const a=C=>{const D=C==null?void 0:C.layer;D&&this.layers.includes(D)&&this.syncCenters(D)},d=C=>{const D=C==null?void 0:C.layer;D&&this.layers.includes(D)&&(this.updateLabels(D),this.requestRenderControls())},f=C=>{var q;const D=C==null?void 0:C.layer;if(!D||!this.layers.includes(D))return;const G=D;((q=G.getTooltip)==null?void 0:q.call(G))&&this.updateLabels(G)},_=()=>{this.layers.forEach(C=>{var G;const D=(G=C.getTooltip)==null?void 0:G.call(C);D&&(C.setTooltipContent(ee(C.getRadius(),this.measurementSystem)),D.options.offset=[10,0],D.options.direction="right",C.closeTooltip(),C.openTooltip())})};this.map.on(s,a),this.map.on(c,d),n&&(this.map.on(n,f),this.detachMapListeners.push(()=>this.map.off(n,f))),r&&(this.map.on(r,_),this.detachMapListeners.push(()=>this.map.off(r,_))),this.detachMapListeners.push(()=>this.map.off(s,a)),this.detachMapListeners.push(()=>this.map.off(c,d))}requestRenderControls(){if(this.renderScheduled)return;this.renderScheduled=!0,(typeof requestAnimationFrame=="function"?requestAnimationFrame:s=>setTimeout(()=>s(0),0))(()=>{this.renderScheduled=!1,this.renderControls()})}addLayer(h){this.layers.push(h),h.addTo(this.map),h.bindTooltip(ee(h.getRadius(),this.measurementSystem),{permanent:!0,direction:"right",className:"cake-label",offset:[10,0]});const s=h.editing;setTimeout(()=>{var c,n,r,a,d;try{if((c=h.redraw)==null||c.call(h),Xo(h),(n=s==null?void 0:s.enabled)!=null&&n.call(s)){(r=s.updateMarkers)==null||r.call(s),this.requestRenderControls();return}(a=s==null?void 0:s.enable)==null||a.call(s),(d=s==null?void 0:s.updateMarkers)==null||d.call(s),this.requestRenderControls()}catch{}},0)}addRing(){if(this.layers.length>=10)return;const h=this.getLargestCircle();if(!h)return;const s=h.getRadius()*1.5,c=X.circle(h.getLatLng(),{...this.baseCircleOptions,radius:s});this.addLayer(c),this.renderControls()}save(){const h=Jo({circles:this.layers});this.onSave(h),this.destroy()}getLargestCircle(){return this.layers.length===0?null:this.layers.reduce((h,s)=>h.getRadius()>s.getRadius()?h:s)}syncCenters(h){const s=h.getLatLng();this.layers.forEach(c=>{var n,r,a;c!==h&&(c.setLatLng(s),(n=c.redraw)==null||n.call(c),(a=(r=c.editing)==null?void 0:r.updateMarkers)==null||a.call(r))}),this.requestRenderControls()}updateLabels(h){var a;const s=h.getRadius();let c=ee(s,this.measurementSystem);const n=this.layers.filter(d=>d!==h&&d.getRadius()<s);if(n.length>0){const d=n.reduce((g,w)=>g.getRadius()>w.getRadius()?g:w),f=s-d.getRadius(),_=ee(f,this.measurementSystem);c=`${ee(s,this.measurementSystem)} (+${_})`}const r=(a=h.getTooltip)==null?void 0:a.call(h);if(r){h.setTooltipContent(c);const f=h.getBounds().getSouthWest();f.lat=h.getLatLng().lat,r.options.direction="left",r.options.offset=[-10,0],r.setLatLng(f),h.closeTooltip(),h.openTooltip()}}renderControls(){this.controlsGroup.clearLayers();const h=this.getLargestCircle();if(!h)return;const c=h.getBounds().getNorthEast(),n=`cake-add-${this.sessionId}`,r=`cake-save-${this.sessionId}`,a=X.divIcon({className:"layer-cake-controls",html:`
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:`
206
206
  <div class="layer-cake-controls__container">
207
- <button id="${n}" type="button">➕ Ring</button>
207
+ <button id="${i}" type="button">➕ Ring</button>
208
208
  <button id="${r}" type="button" class="layer-cake-controls__save">💾 Save</button>
209
209
  </div>
210
- `,iconSize:[140,40],iconAnchor:[-10,20]});X.marker(c,{icon:a,interactive:!0,keyboard:!1,bubblingMouseEvents:!1}).addTo(this.controlsGroup),setTimeout(()=>{const d=this.map.getContainer();Ko({root:d,addButtonId:n,saveButtonId:r,onAddRing:()=>this.addRing(),onSave:()=>this.save()})},0)}destroy(){this.detachMapListeners.forEach(h=>{try{h()}catch{}}),this.detachMapListeners=[],this.layers.forEach(h=>this.map.removeLayer(h)),this.layers=[],this.controlsGroup.clearLayers(),this.map.removeLayer(this.controlsGroup)}}const $o=`<?xml version="1.0" encoding="utf-8"?>
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"?>
211
211
  \r<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
212
212
  <svg width="800px" height="800px" viewBox="0 -1.67 47.336 47.336" xmlns="http://www.w3.org/2000/svg">\r
213
213
  <g id="Group_42" data-name="Group 42" transform="translate(-172.455 -364.36)">\r
@@ -218,7 +218,7 @@ ${vo}
218
218
  <path id="Path_91" data-name="Path 91" d="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" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>\r
219
219
  </g>\r
220
220
  </g>\r
221
- </svg>`,tr=`<?xml version="1.0" encoding="utf-8"?>
221
+ </svg>`,Xr=`<?xml version="1.0" encoding="utf-8"?>
222
222
  <!-- Four-way directional arrow icon for move tool -->
223
223
  <svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
224
224
  <g fill="none" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
@@ -238,7 +238,7 @@ ${vo}
238
238
  <path d="M22 12 L19 15"/>
239
239
  </g>
240
240
  </svg>
241
- `,Yi=6378137,Ht=6356752314245e-6,Ot=1/298.257223563,er=Math.PI/180,ir=180/Math.PI,be=1e9;function nr(m){const h=BigInt(Math.round(m*be));return Number(h)/be}function Ft(m){return nr(m)*er}function qi(m){const h=m*ir%360;return h<0?h+360:h}function $e(m){const h=BigInt(Math.round(m*be));return Number(h)/be}function or(m,h,s,c){const n=rr(m,h,s,c);if(n.converged)return{meters:$e(n.distanceMeters),bearingDegrees:qi(n.bearingRad),algorithm:"vincenty",iterations:n.iterations};const r=sr(m,h,s,c);return{meters:$e(r.distanceMeters),bearingDegrees:qi(r.bearingRad),algorithm:"karney",iterations:n.iterations}}function rr(m,h,s,c){const n=Ft(m),r=Ft(s),a=Ft(c-h),d=Math.atan((1-Ot)*Math.tan(n)),f=Math.atan((1-Ot)*Math.tan(r)),_=Math.sin(d),g=Math.cos(d),w=Math.sin(f),x=Math.cos(f);let T=a,P=0,M=0;const U=200;let F=0,C=0,D=0,G=0,Y=0;for(;Math.abs(T-P)>1e-12&&M<U;){const rt=Math.sin(T),Me=Math.cos(T);if(F=Math.sqrt((x*rt)**2+(g*w-_*x*Me)**2),F===0)return{distanceMeters:0,bearingRad:0,iterations:M,converged:!0};C=_*w+g*x*Me,D=Math.atan2(F,C);const pt=g*x*rt/F;G=1-pt**2,Y=G===0?0:C-2*_*w/G;const ie=Ot/16*G*(4+Ot*(4-3*G));P=T,T=a+(1-ie)*Ot*pt*(D+ie*F*(Y+ie*C*(-1+2*Y**2))),M+=1}if(M>=U)return{distanceMeters:Number.NaN,bearingRad:0,iterations:M,converged:!1};const q=(Yi**2-Ht**2)/Ht**2*G,at=1+q/16384*(4096+q*(-768+q*(320-175*q))),vt=q/1024*(256+q*(-128+q*(74-47*q))),Gt=vt*F*(Y+vt/4*(C*(-1+2*Y**2)-vt/6*Y*(-3+4*F**2)*(-3+4*Y**2))),Ae=Ht*at*(D-Gt),ot=Math.atan2(x*Math.sin(T),g*w-_*x*Math.cos(T));return{distanceMeters:Ae,bearingRad:ot,iterations:M,converged:!0}}function sr(m,h,s,c){const n=Ft(m),r=Ft(s),a=Ft(c-h),d=Math.atan((1-Ot)*Math.tan(n)),f=Math.atan((1-Ot)*Math.tan(r)),_=Math.sin(d),g=Math.cos(d),w=Math.sin(f),x=Math.cos(f),T=Math.sqrt((x*Math.sin(a))**2+(g*w-_*x*Math.cos(a))**2),P=_*w+g*x*Math.cos(a),M=Math.atan2(T,P);if(M===0)return{distanceMeters:0,bearingRad:0};const F=1-(g*x*Math.sin(a)/Math.sin(M))**2,C=F===0?0:P-2*_*w/F,D=(Yi**2-Ht**2)/Ht**2*F,G=1+D/16384*(4096+D*(-768+D*(320-175*D))),Y=D/1024*(256+D*(-128+D*(74-47*D))),q=Y*T*(C+Y/4*(P*(-1+2*C**2)-Y/6*C*(-3+4*T**2)*(-3+4*C**2))),at=Ht*G*(M-q),vt=Math.atan2(x*Math.sin(a),g*w-_*x*Math.cos(a));return{distanceMeters:at,bearingRad:vt}}const ar={position:"topleft",circleMarker:{color:"red",radius:2},lineStyle:{color:"red",dashArray:"1,6"},angleUnit:{display:"°",decimal:2,factor:null,label:"Bearing:"}},lr={display:"km",decimal:2,factor:null,label:"Distance (km):"},hr={display:"mi",decimal:2,factor:.621371,label:"Distance (mi):"};function cr(m){const h=m==="imperial"?{...hr}:{...lr};return{...ar,lengthUnit:h}}const dr={metric:"Meters / Kilometers",imperial:"Feet / Miles"};function ti(m,h={}){var r,a;const s=!!((r=m==null?void 0:m.Control)!=null&&r.Draw),c=!!m.draw,n=s&&c;return n||(a=h.onError)==null||a.call(h,"Leaflet.draw is not available on the provided Leaflet instance"),n}let ji=!1;const ur={polygon:"tool:polygon:created",polyline:"tool:polyline:created",rectangle:"tool:rectangle:created",circle:"tool:circle:created",marker:"tool:marker:created"};class fr{constructor(h){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,"activeCakeSession",null);k(this,"moveConfirmationUI",null);k(this,"activeMoveHandler",null);var s;this.options=h,this.container=h.container,this.logger=((s=h.logger)!=null?s:ve("controller","debug")).child("map"),this.L=this.resolveLeaflet(h),this.store=new Zo(this.logger.child("store")),this.logger.debug("ctor",{config:h.map,controls:h.controls,readOnly:h.readOnly,useExternalLeaflet:h.useExternalLeaflet}),Fo(this.L),Go(this.L),Ho(this.L)}emitToolEvent(h,s){var n,r;try{(r=(n=this.options.toolHooks)==null?void 0:n[h])==null||r.call(n,s)}catch(a){this._error(`tool hook failed: ${h}`,a)}const c=this.options.toolEventEmitter;if(c)try{if(typeof c.emit=="function"){c.emit(h,s);return}typeof c.dispatchEvent=="function"&&c.dispatchEvent(new CustomEvent(h,{detail:s}))}catch(a){this._error(`tool emitter failed: ${h}`,a)}}setToolObservers(h){this.options.toolHooks=h.toolHooks,this.options.toolEventEmitter=h.toolEventEmitter}resolveLeaflet(h){if(!h.useExternalLeaflet)return ye;if(h.leaflet&&ti(h.leaflet))return this.logger.debug("leaflet-runtime:external-injected"),h.leaflet;const c=globalThis.L;return c&&ti(c)?(this.logger.debug("leaflet-runtime:external-global"),c):(this.logger.warn("leaflet-runtime:external-fallback-bundled",{message:"External Leaflet requested but Draw APIs were missing; falling back to bundled Leaflet/Draw"}),ye)}async init(){var s,c,n,r,a,d;const h=(c=(s=performance.now)==null?void 0:s.call(performance))!=null?c:Date.now();try{await this.destroy();const{latitude:f,longitude:_,zoom:g,minZoom:w,maxZoom:x,tileUrl:T,tileAttribution:P,preferCanvas:M=!0,useExternalLeaflet:U}=this.options.map,F=[f,_],C=this.L;U&&ti(C,{onError:at=>this.logger.warn("external-leaflet-missing-draw",{message:at})}),this.map=C.map(this.container,{zoomControl:!0,preferCanvas:M}).setView(F,g),this.setTileLayer({urlTemplate:T,attribution:P!=null?P:"",maxZoom:x}),this.drawnItems=C.featureGroup().addTo(this.map);const D=this.buildDrawOptions(this.options.controls,!!this.options.readOnly),G=C.Control.Draw;this.drawControl=new G(D),this.map.addControl(this.drawControl),this.applyLayerCakeToolbarIcon(),this.applyMoveToolbarIcon(),this.options.controls.ruler&&(this.logger.debug("init:ruler",{available:typeof C.control.ruler=="function"}),typeof C.control.ruler=="function"?(this.addRulerControl(),this.installMeasurementSettingsControl()):this.logger.warn("init:ruler:missing",{msg:"L.control.ruler is not defined"})),this.patchLeafletDrawBugs(),this.installPolygonFinishPatch(),this.map.invalidateSize(),setTimeout(()=>{var at;try{(at=this.map)==null||at.invalidateSize()}catch{}},0),this.bindDrawEvents();const Y=((r=(n=performance.now)==null?void 0:n.call(performance))!=null?r:Date.now())-h;this.logger.debug("init:ready",{elapsedMs:Math.round(Y)});const q=this.store.bounds();(d=(a=this.options.callbacks)==null?void 0:a.onReady)==null||d.call(a,q?{bounds:q}:{})}catch(f){this._error("Failed to initialize Leaflet map",f)}}async destroy(){var h,s,c;try{this.map&&(this.map.off(),this.map.remove())}catch(n){this._error("Failed to remove Leaflet map",n)}try{(h=this.detachPolygonFinishPatch)==null||h.call(this)}catch{}this.detachPolygonFinishPatch=null;try{(s=this.vertexMenuCleanup)==null||s.call(this)}catch{}this.vertexMenuEl=null,this.vertexMenuCleanup=null;try{this.hideMoveConfirmationUI()}catch{}this.drawControl=null,this.rulerControl=null,this.measurementControl=null,this.removeMeasurementModal(),this.drawnItems=null,this.tileLayer=null;try{(c=this.activeCakeSession)==null||c.destroy()}catch{}this.activeCakeSession=null,this.map=null}async getGeoJSON(){return this.store.toFeatureCollection()}async loadGeoJSON(h,s=!1){if(!this.map||!this.drawnItems)return;await this.clearLayers();const c=Hi(h),n=this.store.add(c),r=this.L.geoJSON(c);let a=0;r.eachLayer(d=>{var f;d._fid=(f=n[a])!=null?f:n[n.length-1],this.drawnItems.addLayer(d),this.installVertexContextMenu(d),a++}),this.logger.debug("loadGeoJSON",{count:c.features.length,ids:n}),s&&await this.fitBoundsToData()}async clearLayers(){this.drawnItems&&this.drawnItems.clearLayers(),this.store.clear()}async addFeatures(h){if(!this.map||!this.drawnItems)return[];const s=Hi(h),c=this.store.add(s),n=this.L.geoJSON(s);let r=0;return n.eachLayer(a=>{var d;a._fid=(d=c[r])!=null?d:c[c.length-1],this.drawnItems.addLayer(a),this.installVertexContextMenu(a),r++}),c}async updateFeature(h,s){this.store.update(h,s)}async removeFeature(h){this.drawnItems&&this.drawnItems.eachLayer(s=>{s._fid===h&&this.drawnItems.removeLayer(s)}),this.store.remove(h)}async fitBoundsToData(h=.05){if(!this.map)return;const s=this.store.bounds();if(!s)return;const c=s,n=this.L.latLngBounds(c);if(h>0){const r=n.getSouthWest(),a=n.getNorthEast(),d=(a.lat-r.lat)*h,f=(a.lng-r.lng)*h,_=this.L.latLngBounds(this.L.latLng(r.lat-d,r.lng-f),this.L.latLng(a.lat+d,a.lng+f));this.map.fitBounds(_)}else this.map.fitBounds(n)}async fitBounds(h,s=.05){if(!this.map)return;const c=this.L.latLngBounds(h);if(s>0){const n=c.getSouthWest(),r=c.getNorthEast(),a=(r.lat-n.lat)*s,d=(r.lng-n.lng)*s,f=this.L.latLngBounds(this.L.latLng(n.lat-a,n.lng-d),this.L.latLng(r.lat+a,r.lng+d));this.map.fitBounds(f)}else this.map.fitBounds(c)}async setView(h,s,c){this.map&&this.map.setView([h,s],c!=null?c:this.map.getZoom())}setTileLayer(h,s){if(!this.map){this.logger.warn("setTileLayer called before map initialization",{urlTemplate:h.urlTemplate});return}this.logger.debug("tile-layer:switch",{urlTemplate:h.urlTemplate,attribution:h.attribution,maxZoom:h.maxZoom,subdomains:h.subdomains}),this.tileLayer&&(this.map.removeLayer(this.tileLayer),this.tileLayer=null);const c={attribution:h.attribution,minZoom:this.options.map.minZoom,maxZoom:h.maxZoom};h.subdomains!==void 0?c.subdomains=h.subdomains:h.urlTemplate.includes("{s}")&&(c.subdomains=["a","b","c"]);const n=this.L.tileLayer(h.urlTemplate,c);let r=!1;n.on("tileerror",a=>{var d;this.logger.error("tile-layer:error",{error:a}),r||(r=!0,(d=s==null?void 0:s.onTileError)==null||d.call(s,a))}),n.addTo(this.map),this.tileLayer=n}async mergeVisiblePolygons(h){if(!this.map||!this.drawnItems)return null;const c=(await this.getGeoJSON()).features.filter(d=>{const f=d.geometry;return f&&(Fi(f)||Gi(f))});if(c.length<=1){if(c.length===1){const d=c[0].id;return d?String(d):null}return null}const n=No(c,h==null?void 0:h.properties);if(!n)return null;const r=[];for(const d of c){const f=d.id;f&&r.push(String(f))}for(const d of r)await this.removeFeature(d);const[a]=await this.addFeatures({type:"FeatureCollection",features:[n]});return a||null}setRulerUnits(h){if(this.measurementSystem===h)return;const s=this.measurementSystem;this.measurementSystem=h,this.logger.debug("ruler:units",{system:h}),this.emitToolEvent("tool:ruler:units-changed",{previous:s,current:h}),this.syncMeasurementModalState(),this.rebuildRulerControl()}buildDrawOptions(h,s){var r;const c={polygon:h.polygon?{allowIntersection:(r=this.options.map.polygonAllowIntersection)!=null?r:!1,showArea:!0,shapeOptions:{color:"#3388ff"}}:!1,polyline:h.polyline?{shapeOptions:{color:"#3388ff"}}:!1,rectangle:h.rectangle?{shapeOptions:{color:"#3388ff"}}:!1,circle:h.circle?{shapeOptions:{color:"#3388ff"}}:!1,cake:h.cake?{shapeOptions:{color:"#8A2BE2",fillOpacity:.2}}:!1,marker:h.marker?{}:!1,move:h.move?{featureGroup:this.drawnItems}:!1};let n={featureGroup:this.drawnItems};return h.edit?h.delete===!1&&(n.remove=!1):n=!1,s?{draw:!1,edit:!1}:{draw:c,edit:n}}applyLayerCakeToolbarIcon(){if(!this.container)return;const h=()=>{const s=this.container.querySelector("a.leaflet-draw-draw-cake");if(!s)return;s.style.setProperty("background-image","none","important"),s.style.setProperty("background-color","#fff","important"),s.style.setProperty("position","relative","important");let c=s.querySelector(".leaflet-geokit-cake-icon");c||(c=document.createElement("span"),c.className="leaflet-geokit-cake-icon",c.setAttribute("aria-hidden","true"),s.appendChild(c)),c.style.setProperty("position","absolute","important"),c.style.setProperty("display","block","important"),c.style.setProperty("left","50%","important"),c.style.setProperty("top","50%","important"),c.style.setProperty("width","18px","important"),c.style.setProperty("height","18px","important"),c.style.setProperty("transform","translate(-50%, -50%)","important"),c.style.setProperty("pointer-events","none","important"),c.firstElementChild||(c.innerHTML=$o);const n=c.firstElementChild;n&&(n.style.setProperty("width","100%","important"),n.style.setProperty("height","100%","important"),n.style.setProperty("display","block","important"))};h(),setTimeout(h,0)}applyMoveToolbarIcon(){if(!this.container)return;const h=()=>{const s=this.container.querySelector("a.leaflet-draw-draw-move");if(!s)return;s.style.setProperty("background-image","none","important"),s.style.setProperty("background-color","#fff","important"),s.style.setProperty("position","relative","important");let c=s.querySelector(".leaflet-geokit-move-icon");c||(c=document.createElement("span"),c.className="leaflet-geokit-move-icon",c.setAttribute("aria-hidden","true"),s.appendChild(c)),c.style.setProperty("position","absolute","important"),c.style.setProperty("display","block","important"),c.style.setProperty("left","50%","important"),c.style.setProperty("top","50%","important"),c.style.setProperty("width","18px","important"),c.style.setProperty("height","18px","important"),c.style.setProperty("transform","translate(-50%, -50%)","important"),c.style.setProperty("pointer-events","none","important"),c.firstElementChild||(c.innerHTML=tr);const n=c.firstElementChild;n&&(n.style.setProperty("width","100%","important"),n.style.setProperty("height","100%","important"),n.style.setProperty("display","block","important"))};h(),setTimeout(h,0)}addRulerControl(){if(!this.map)return;this.installRulerPrecisionPatch();const h=cr(this.measurementSystem);this.rulerControl=this.L.control.ruler(h),this.map.addControl(this.rulerControl)}installRulerPrecisionPatch(){if(ji)return;const h=this.L.Control.Ruler;if(!h||typeof h!="function")return;const s=h.prototype,c=s._calculateBearingAndDistance;if(typeof c!="function")return;const n=this.logger;s._calculateBearingAndDistance=function(){var a,d,f;c.call(this);try{const _=this._clickedLatLong,g=(a=this._movingLatLong)!=null?a:this._clickedLatLong;if(!_||!g)return;const{meters:w,bearingDegrees:x}=or(_.lat,_.lng,g.lat,g.lng),T=w/1e3,P=typeof((f=(d=this.options)==null?void 0:d.lengthUnit)==null?void 0:f.factor)=="number"?this.options.lengthUnit.factor:1,M=$e(T*P);this._result=this._result||{},this._result.Distance=M,this._result.Bearing=x,this._result.meters=w}catch(_){n==null||n.warn("ruler:precision-patch",_)}},ji=!0}rebuildRulerControl(){if(!(!this.map||!this.options.controls.ruler)){if(this.rulerControl){try{this.map.removeControl(this.rulerControl)}catch(h){this.logger.warn("ruler:remove-failed",h)}this.rulerControl=null}this.addRulerControl()}}installMeasurementSettingsControl(){if(!this.map||this.measurementControl)return;const h=this,s=this.L.Control.extend({options:{position:"topleft"},onAdd(){const c=h.L.DomUtil.create("div","leaflet-bar leaflet-ruler-settings-control"),n=h.L.DomUtil.create("button","leaflet-ruler-settings-button",c);return n.type="button",n.title="Measurement settings",n.setAttribute("aria-label","Measurement settings"),n.addEventListener("click",r=>{r.preventDefault(),r.stopPropagation(),h.toggleMeasurementModal(!0)}),h.L.DomEvent.disableClickPropagation(c),h.L.DomEvent.disableScrollPropagation(c),c}});this.measurementControl=new s,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 h=document.createElement("div");h.className="leaflet-ruler-modal-overlay",h.setAttribute("aria-hidden","true");const s=document.createElement("div");s.className="leaflet-ruler-modal",s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),s.tabIndex=-1,h.addEventListener("click",f=>{f.target===h&&this.toggleMeasurementModal(!1)});const c=document.createElement("h2");c.className="leaflet-ruler-modal-title",c.textContent="Measurement Units",s.appendChild(c);const n=document.createElement("p");n.className="leaflet-ruler-modal-description",n.textContent="Choose how the measurement tool reports distances.",s.appendChild(n);const r=document.createElement("div");r.className="leaflet-ruler-modal-options",s.appendChild(r),["metric","imperial"].forEach(f=>{const _=document.createElement("label");_.className="leaflet-ruler-modal-option";const g=document.createElement("input");g.type="radio",g.name="leaflet-ruler-units",g.value=f,g.addEventListener("change",()=>{g.checked&&this.setRulerUnits(f)});const w=document.createElement("span");w.textContent=dr[f],_.appendChild(g),_.appendChild(w),r.appendChild(_),this.measurementModalRadios[f]=g});const a=document.createElement("div");a.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)),a.appendChild(d),s.appendChild(a),h.appendChild(s),this.container.appendChild(h),this.measurementModalOverlay=h,this.measurementModalDialog=s,this.syncMeasurementModalState(),h}toggleMeasurementModal(h){var c;if(!h){this.measurementModalOverlay&&(this.measurementModalOverlay.classList.remove("is-open"),this.measurementModalOverlay.setAttribute("aria-hidden","true")),this.detachMeasurementModalKeydown();return}const s=this.ensureMeasurementModal();s.classList.add("is-open"),s.setAttribute("aria-hidden","false"),this.syncMeasurementModalState(),this.attachMeasurementModalKeydown(),(c=this.measurementModalDialog)==null||c.focus()}syncMeasurementModalState(){for(const[h,s]of Object.entries(this.measurementModalRadios))s&&(s.checked=h===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=h=>{h.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 a,d,f,_,g;if(!this.map||!this.drawControl)return;try{(a=this.detachPolygonFinishPatch)==null||a.call(this)}catch{}this.detachPolygonFinishPatch=null;const h=this.map,s=(f=(d=this.drawControl)==null?void 0:d._toolbars)==null?void 0:f.draw;if(!s||!!!((g=(_=s._modes)==null?void 0:_.polygon)!=null&&g.handler))return;const n=10,r=w=>{var x,T,P,M,U,F,C,D;try{const G=(T=(x=s._modes)==null?void 0:x.polygon)==null?void 0:T.handler;if(!G||!G._enabled)return;const Y=G._markers;if(!Array.isArray(Y)||Y.length<4)return;const q=(M=(P=Y[0])==null?void 0:P.getLatLng)==null?void 0:M.call(P);if(!q)return;const at=h.latLngToContainerPoint(q),vt=h.latLngToContainerPoint(w.latlng);Math.hypot(at.x-vt.x,at.y-vt.y)<=n&&typeof G._finishShape=="function"&&((F=(U=w.originalEvent)==null?void 0:U.preventDefault)==null||F.call(U),(D=(C=w.originalEvent)==null?void 0:C.stopPropagation)==null||D.call(C),G._finishShape())}catch(G){this._error("polygon-finish-patch",G)}};h.on("click",r),this.detachPolygonFinishPatch=()=>{try{h.off("click",r)}catch{}}}patchLeafletDrawBugs(){var h,s,c,n,r;try{const a=this.L,d=a.GeometryUtil;if(!d)return;const f={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2},_=(s=(h=d.formattedNumber)==null?void 0:h.bind(d))!=null?s:((g,w)=>Number(g).toFixed(w));d.readableArea=(g,w,x)=>{var M;const T=(M=a.Util)!=null&&M.extend?a.Util.extend({},f,x||{}):{...f,...x||{}};let P;if(w){let U=["ha","m"];const F=typeof w;F==="string"?U=[w]:F!=="boolean"&&(U=Array.isArray(w)?w:U),g>=1e6&&U.indexOf("km")!==-1?P=`${_(1e-6*g,T.km)} km²`:g>=1e4&&U.indexOf("ha")!==-1?P=`${_(1e-4*g,T.ha)} ha`:P=`${_(g,T.m)} m²`}else g=g/.836127,g>=3097600?P=`${_(g/3097600,T.mi)} mi²`:g>=4840?P=`${_(g/4840,T.ac)} acres`:P=`${_(g,T.yd)} yd²`;return P}}catch(a){this.logger.warn("leaflet-draw-patch:readableArea",a)}try{const a=this.L,d=(c=a.Edit)==null?void 0:c.Circle,f=(n=a.Draw)==null?void 0:n.Event,_=a.GeometryUtil;if(!((r=d==null?void 0:d.prototype)!=null&&r._resize)||!f||!_)return;d.prototype._resize=function(w){var P,M,U;const x=this._moveMarker.getLatLng(),T=_.isVersion07x()?x.distanceTo(w):this._map.distance(x,w);this._shape.setRadius(T);try{(P=this._map)!=null&&P.editTooltip&&((U=(M=this._map)==null?void 0:M._editTooltip)!=null&&U.updateContent)&&this._map._editTooltip.updateContent({text:a.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+a.drawLocal.edit.handlers.edit.tooltip.text,subtext:a.drawLocal.draw.handlers.circle.radius+": "+_.readableDistance(T,!0,this.options.feet,this.options.nautic)})}catch{}this._map.fire(f.EDITRESIZE,{layer:this._shape})}}catch(a){this.logger.warn("leaflet-draw-patch:circle-resize",a)}}bindDrawEvents(){!this.map||!this.drawnItems||(this.map.on(this.L.Draw.Event.CREATED,h=>{var s,c,n;try{const{layer:r,layerType:a}=h;if(a===we.TYPE){try{(s=this.activeCakeSession)==null||s.destroy()}catch{}this.activeCakeSession=new Qo(this.map,r,w=>{if(!this.drawnItems)return;const x=this.store.add(w),T=this.L.geoJSON(w);let P=0;T.eachLayer(M=>{var F,C,D;const U=(F=x[P])!=null?F:x[x.length-1];M._fid=U,this.drawnItems.addLayer(M),this.installVertexContextMenu(M),(D=(C=this.options.callbacks)==null?void 0:C.onCreated)==null||D.call(C,{id:U,layerType:"polygon",geoJSON:M.toGeoJSON()}),P++}),this.activeCakeSession=null,this.emitToolEvent("tool:layer-cake:saved",{featureCollection:w})},this.measurementSystem),this.emitToolEvent("tool:layer-cake:session-started",{center:r.getLatLng(),radius:r.getRadius()});return}this.drawnItems.addLayer(r);const d=r.toGeoJSON(),_=this.store.add({type:"FeatureCollection",features:[d]})[0];r._fid=_,this.installVertexContextMenu(r),(n=(c=this.options.callbacks)==null?void 0:c.onCreated)==null||n.call(c,{id:_,layerType:a,geoJSON:d});const g=ur[a];g&&this.emitToolEvent(g,{id:_,geoJSON:d})}catch(r){this._error("onCreated handler failed",r)}}),this.map.on(this.L.Draw.Event.EDITED,h=>{var s,c;try{const n=[];h.layers.eachLayer(d=>{const f=d.toGeoJSON(),_=d._fid;if(_)this.store.update(_,f),n.push(_);else{const g=this.store.add({type:"FeatureCollection",features:[f]})[0];d._fid=g,n.push(g)}});const a=this.store.toFeatureCollection();(c=(s=this.options.callbacks)==null?void 0:s.onEdited)==null||c.call(s,{ids:n,geoJSON:a}),this.emitToolEvent("tool:edit:applied",{ids:n,geoJSON:a})}catch(n){this._error("onEdited handler failed",n)}}),this.map.on(this.L.Draw.Event.DELETED,h=>{var s,c;try{const n=[];h.layers.eachLayer(d=>{const f=d._fid;f&&(n.push(f),this.store.remove(f))});const a=this.store.toFeatureCollection();(c=(s=this.options.callbacks)==null?void 0:s.onDeleted)==null||c.call(s,{ids:n,geoJSON:a}),this.emitToolEvent("tool:delete:applied",{ids:n,geoJSON:a})}catch(n){this._error("onDeleted handler failed",n)}}),this.map.on("draw:moveend",h=>{var s;try{this.emitToolEvent("tool:move:pending",{layerId:(s=h==null?void 0:h.layer)==null?void 0:s._fid,originalGeoJSON:h==null?void 0:h.originalGeoJSON,newGeoJSON:h==null?void 0:h.newGeoJSON}),this.showMoveConfirmationUI(h.layer)}catch(c){this._error("draw:moveend handler failed",c)}}),this.map.on("draw:moveconfirmed",h=>{var s,c,n;try{this.emitToolEvent("tool:move:confirmed",{layerId:(s=h==null?void 0:h.layer)==null?void 0:s._fid,originalGeoJSON:h==null?void 0:h.originalGeoJSON,newGeoJSON:h==null?void 0:h.newGeoJSON});const r=h.layer,a=r._fid;if(a){const d=r.toGeoJSON();this.store.update(a,d),(n=(c=this.options.callbacks)==null?void 0:c.onEdited)==null||n.call(c,{ids:[a],geoJSON:this.store.toFeatureCollection()})}this.hideMoveConfirmationUI()}catch(r){this._error("draw:moveconfirmed handler failed",r)}}))}_error(h,s){var c,n;this.logger.error("error",{message:h,cause:s}),(n=(c=this.options.callbacks)==null?void 0:c.onError)==null||n.call(c,{message:h,cause:s})}installVertexContextMenu(h){if(!h||typeof h.on!="function")return;const s=n=>{var r,a,d,f;try{(a=(r=n==null?void 0:n.originalEvent)==null?void 0:r.preventDefault)==null||a.call(r),(f=(d=n==null?void 0:n.originalEvent)==null?void 0:d.stopPropagation)==null||f.call(d)}catch{}this.openVertexMenu(h,n)},c=n=>{const r=n==null?void 0:n.originalEvent;r&&(r.ctrlKey||r.metaKey)&&this.openVertexMenu(h,n)};try{h.on("contextmenu",s),h.on("click",c)}catch{}}openVertexMenu(h,s){try{if(!this.map||!(typeof h.getLatLngs=="function"&&(h instanceof this.L.Polygon||h instanceof this.L.Polyline)))return;const n=h.editing;if(!n||typeof n.enabled!="function"||!n.enabled())return;const r=s==null?void 0:s.latlng,a=this.map.latLngToContainerPoint(r),d=this.findNearestVertex(h,r,12);if(!d)return;this.showVertexMenu(a,async()=>{await this.deleteVertex(h,d.pathIndex,d.vertexIndex)})}catch(c){this._error("openVertexMenu",c)}}showVertexMenu(h,s){var c;try{try{(c=this.vertexMenuCleanup)==null||c.call(this)}catch{}if(this.vertexMenuCleanup=null,!this.container)return;const n=document.createElement("div");n.style.position="absolute",n.style.top=`${h.y}px`,n.style.left=`${h.x}px`,n.style.transform="translate(-50%, -100%)",n.style.background="#fff",n.style.border="1px solid rgba(0,0,0,0.15)",n.style.borderRadius="6px",n.style.boxShadow="0 4px 12px rgba(0,0,0,0.15)",n.style.padding="6px",n.style.zIndex="10000",n.style.fontSize="12px",n.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",f=>{f.stopPropagation(),f.preventDefault();try{s()}finally{a()}}),n.appendChild(r);const a=()=>{try{window.removeEventListener("pointerdown",d),this.container.removeEventListener("scroll",a,!0),n.remove()}catch{}this.vertexMenuEl=null,this.vertexMenuCleanup=null},d=f=>{n.contains(f.target)||a()};window.addEventListener("pointerdown",d,{capture:!0}),this.container.addEventListener("scroll",a,!0),this.container.appendChild(n),this.vertexMenuEl=n,this.vertexMenuCleanup=a}catch(n){this._error("showVertexMenu",n)}}findNearestVertex(h,s,c){if(!this.map)return null;const n=x=>this.map.latLngToContainerPoint(x),r=(x,T)=>Math.hypot(x.x-T.x,x.y-T.y),a=n(s);let d=1/0,f=-1,_=-1;const g=h.getLatLngs();return(Array.isArray(g[0])?g:[g]).forEach((x,T)=>{x.forEach((P,M)=>{const U=n(P),F=r(U,a);F<d&&(d=F,f=T,_=M)})}),f===-1||d>c?null:{pathIndex:f,vertexIndex:_}}async deleteVertex(h,s,c){var n,r,a;try{if(!(typeof h.getLatLngs=="function"&&(h instanceof this.L.Polygon||h instanceof this.L.Polyline)))return;const f=h.getLatLngs(),_=Array.isArray(f[0])?f:[f],g=_[s];if(!g)return;const x=h instanceof this.L.Polygon?3:2;if(g.length<=x)return;if(g.splice(c,1),_.length===1)h.setLatLngs(g);else{const P=_.map((M,U)=>U===s?g:M);h.setLatLngs(P)}(n=h.redraw)==null||n.call(h);const T=h._fid;if(T){const P=h.toGeoJSON();this.store.update(T,P),(a=(r=this.options.callbacks)==null?void 0:r.onEdited)==null||a.call(r,{ids:[T],geoJSON:this.store.toFeatureCollection()})}}catch(d){this._error("deleteVertex",d)}}showMoveConfirmationUI(h){var s,c;try{if(this.hideMoveConfirmationUI(),!this.container||!this.map)return;const n=this.drawControl;if(!n)return;const r=(s=n==null?void 0:n._toolbars)==null?void 0:s.draw;if(!r)return;const a=r._modes||{};let d=null;for(const w in a){const x=a[w];if(((c=x==null?void 0:x.handler)==null?void 0:c.type)==="move"){d=x.handler;break}}this.activeMoveHandler=d;const f=document.createElement("div");f.style.position="absolute",f.style.bottom="60px",f.style.left="50%",f.style.transform="translateX(-50%)",f.style.display="flex",f.style.gap="8px",f.style.background="#fff",f.style.border="2px solid #3388ff",f.style.borderRadius="8px",f.style.padding="12px 16px",f.style.boxShadow="0 4px 12px rgba(0,0,0,0.2)",f.style.zIndex="10000",f.style.fontSize="14px",f.style.fontFamily="system-ui, sans-serif";const _=document.createElement("button");_.textContent="✓ Save",_.style.padding="8px 16px",_.style.border="none",_.style.background="#28a745",_.style.color="#fff",_.style.borderRadius="4px",_.style.cursor="pointer",_.style.fontWeight="600",_.style.fontSize="14px",_.addEventListener("click",w=>{w.stopPropagation(),w.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",w=>{w.stopPropagation(),w.preventDefault(),this.emitToolEvent("tool:move:cancelled",{layerId:h==null?void 0:h._fid}),d!=null&&d.cancelMove&&d.cancelMove(),this.hideMoveConfirmationUI()}),f.appendChild(_),f.appendChild(g),this.container.appendChild(f),this.moveConfirmationUI=f,this.logger.debug("showMoveConfirmationUI",{layerId:h._fid})}catch(n){this._error("showMoveConfirmationUI",n)}}hideMoveConfirmationUI(){try{this.moveConfirmationUI&&(this.moveConfirmationUI.remove(),this.moveConfirmationUI=null),this.activeMoveHandler=null}catch(h){this._error("hideMoveConfirmationUI",h)}}}const Ct={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 Ji(m){return typeof m=="string"?m.trim().toLowerCase():""}function Ki(m){if(typeof m!="string")return;const h=m.trim();return h.length>0?h:void 0}function pr(m){const{style:h,attribution:s}=m,c=Ji(m.provider),n=Ki(m.apiKey);switch(c){case"osm":return{urlTemplate:Ct.osm.urlTemplate,attribution:s||Ct.osm.attribution,maxZoom:Ct.osm.maxZoom,subdomains:[...Ct.osm.subdomains]};case"here":{if(!n)throw new Error("HERE Maps requires an API key");const r=typeof h=="string"?h.trim():"",a=r&&r in Ct.here.styles?r:Ct.here.defaultStyle;return{urlTemplate:`https://maps.hereapi.com/v3/base/mc/{z}/{x}/{y}/png8?style=${encodeURIComponent(a)}&apiKey=${encodeURIComponent(n)}`,attribution:s||Ct.here.attribution,maxZoom:Ct.here.maxZoom,subdomains:void 0}}default:throw new Error(`Unknown tile provider: ${m.provider}`)}}function mr(m){const h=Ji(m.provider),s=Ki(m.apiKey);return h?h==="here"&&!s?{valid:!1,error:"HERE Maps requires an API key"}:{valid:!0}:{valid:!1,error:"Provider is required"}}class ei extends HTMLElement{constructor(){super();k(this,"_root");k(this,"_container");k(this,"_logger",ve("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");this._root=this.attachShadow({mode:"open"}),this._root.innerHTML=`
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=`
242
242
  <style>
243
243
  :host {
244
244
  display: block;
@@ -251,5 +251,5 @@ ${vo}
251
251
  }
252
252
  </style>
253
253
  <div class="map-container" part="map"></div>
254
- `;const s=this._root.querySelector(".map-container");if(!(s instanceof HTMLDivElement))throw new Error("Failed to initialize map container");this._container=s;const c=this.getAttribute("log-level");c&&(this._logLevel=c,this._logger.setLevel(c))}_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 s;this._logger.debug("connectedCallback",this._currentConfig()),Po({root:this._root,skipStyles:this._skipLeafletStyles}),this._applyThemeStyles(),this._controller=new fr({container:this._container,map:this._mapConfig(),controls:this._controlsFromAttributes(),readOnly:this._readOnly,logger:this._logger.child("controller"),callbacks:{onReady:c=>{this.dispatchEvent(new CustomEvent("leaflet-draw:ready",{detail:c}))},onCreated:c=>{this.dispatchEvent(new CustomEvent("leaflet-draw:created",{detail:c}))},onEdited:c=>{this.dispatchEvent(new CustomEvent("leaflet-draw:edited",{detail:c}))},onDeleted:c=>{this.dispatchEvent(new CustomEvent("leaflet-draw:deleted",{detail:c}))},onError:c=>{this.dispatchEvent(new CustomEvent("leaflet-draw:error",{detail:c}))}},leaflet:(s=this._leafletInstance)!=null?s:void 0,useExternalLeaflet:this._useExternalLeaflet,toolHooks:this._toolHooks,toolEventEmitter:this._toolEventEmitter}),await this._controller.init(),this._tileProvider&&this._updateTileLayer()}async disconnectedCallback(){this._logger.debug("disconnectedCallback"),this._controller&&(await this._controller.destroy(),this._controller=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","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(s,c,n){switch(this._logger.debug("attributeChanged",{name:s,value:n}),s){case"latitude":this._latitude=this._coerceNumber(n,0);break;case"longitude":this._longitude=this._coerceNumber(n,0);break;case"zoom":this._zoom=this._coerceNumber(n,2);break;case"min-zoom":this._minZoom=n!=null?this._coerceNumber(n):void 0;break;case"max-zoom":this._maxZoom=n!=null?this._coerceNumber(n):void 0;break;case"tile-url":this._tileUrl=n!=null?n:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",this._controller&&this._updateTileLayer();break;case"tile-attribution":this._tileAttribution=n!=null?n:void 0,this._controller&&this._updateTileLayer();break;case"tile-provider":this._tileProvider=this._normalizeText(n,{lowercase:!0}),this._controller&&this._updateTileLayer();break;case"tile-style":this._tileStyle=this._normalizeText(n),this._controller&&this._updateTileLayer();break;case"api-key":case"here-api-key":this._syncApiKeyFromAttributes(),this._controller&&this._updateTileLayer();break;case"theme-url":this._themeUrl=n!=null?n:void 0,this.isConnected&&this._applyThemeStyles();break;case"read-only":this._readOnly=n!==null;break;case"log-level":this._logLevel=n!=null?n:this._logLevel,this._logger.setLevel(this._logLevel);break;case"dev-overlay":this._devOverlay=n!==null;break;case"polygon-allow-intersection":this._polygonAllowIntersection=n!==null;break;case"prefer-canvas":this._preferCanvas=n!==null;break;case"use-external-leaflet":this._useExternalLeaflet=n!==null;break;case"skip-leaflet-styles":this._skipLeafletStyles=n!==null;break}this._controller&&(s==="latitude"||s==="longitude"||s==="zoom"?this._controller.setView(this._latitude,this._longitude,this._zoom):(s==="min-zoom"||s==="max-zoom"||s==="read-only"||s==="dev-overlay"||s==="log-level"||s==="prefer-canvas"||s==="use-external-leaflet"||s==="skip-leaflet-styles"||s.startsWith("draw-")||s==="edit-features"||s==="delete-features")&&this._controller.destroy().then(()=>this._controller.init()))}_updateTileLayer(){var c,n,r,a;if(!this._controller)return;const s=this._controller;if(typeof s.setTileLayer!="function"){this._logger.warn("setTileLayer is not available on MapController yet");return}try{if(this._tileProvider){const d=this._tileProvider,f={provider:d,style:this._tileStyle,apiKey:this._apiKey,attribution:this._tileAttribution},_=mr(f);if(!_.valid){const x=(c=_.error)!=null&&c.toLowerCase().includes("api key")?"missing_api_key":"tile_load_failed";this._handleTileProviderError(x,(n=_.error)!=null?n:"Invalid tile provider configuration",d);return}const g=pr(f),w=this._activeTileProvider;s.setTileLayer(g,{onTileError:x=>{if(this._tileProvider!==d)return;const T=this._describeTileLayerError(x,d),P=d==="here"?this._resolveHereTileLayerErrorCode(T):"tile_load_failed";this._handleTileProviderError(P,T,d)}}),this._activeTileProvider=d,this._emitTileProviderChanged(d,this._tileStyle,w);return}s.setTileLayer({urlTemplate:this._tileUrl,attribution:(r=this._tileAttribution)!=null?r:"",maxZoom:this._maxZoom,subdomains:["a","b","c"]}),this._activeTileProvider="tile-url"}catch(d){const f=this._resolveTileProviderErrorCode(d);this._logger.error("Failed to update tile layer",{error:d,code:f}),this._handleTileProviderError(f,d instanceof Error?d.message:"Unknown tile layer error",(a=this._tileProvider)!=null?a:"unknown")}}_handleTileProviderError(s,c,n){this._logger.error(`Tile provider error (${s}): ${c}`),this.dispatchEvent(new CustomEvent("tile-provider-error",{bubbles:!0,detail:{code:s,message:c,provider:n,timestamp:Date.now()}}));const r=this._controller;typeof r.setTileLayer=="function"&&(r.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(s,c,n){this.dispatchEvent(new CustomEvent("tile-provider-changed",{bubbles:!0,detail:{provider:s,style:c,previousProvider:n,timestamp:Date.now()}}))}get latitude(){return this._latitude}set latitude(s){this._latitude=Number(s),this._reflect("latitude",String(this._latitude))}get longitude(){return this._longitude}set longitude(s){this._longitude=Number(s),this._reflect("longitude",String(this._longitude))}get zoom(){return this._zoom}set zoom(s){this._zoom=Number(s),this._reflect("zoom",String(this._zoom))}get minZoom(){return this._minZoom}set minZoom(s){this._minZoom=s,this._reflect("min-zoom",s!=null?String(s):null)}get maxZoom(){return this._maxZoom}set maxZoom(s){this._maxZoom=s,this._reflect("max-zoom",s!=null?String(s):null)}get tileUrl(){return this._tileUrl}set tileUrl(s){this._tileUrl=s,this._reflect("tile-url",s),this._controller&&this._updateTileLayer()}get tileProvider(){return this._tileProvider}set tileProvider(s){var c;this._tileProvider=this._normalizeText(s!=null?s:null,{lowercase:!0}),this._reflect("tile-provider",(c=this._tileProvider)!=null?c:null),this._controller&&this._updateTileLayer()}get tileStyle(){return this._tileStyle}set tileStyle(s){var c;this._tileStyle=this._normalizeText(s!=null?s:null),this._reflect("tile-style",(c=this._tileStyle)!=null?c:null),this._controller&&this._updateTileLayer()}get apiKey(){return this._apiKey}set apiKey(s){var c;this._apiKey=this._normalizeText(s!=null?s:null),this._reflect("api-key",(c=this._apiKey)!=null?c:null),this.hasAttribute("here-api-key")&&this.removeAttribute("here-api-key"),this._controller&&this._updateTileLayer()}get tileAttribution(){return this._tileAttribution}set tileAttribution(s){this._tileAttribution=s,this._reflect("tile-attribution",s!=null?s:null),this._controller&&this._updateTileLayer()}get readOnly(){return this._readOnly}set readOnly(s){this._readOnly=!!s,this._booleanReflect("read-only",this._readOnly)}get logLevel(){return this._logLevel}set logLevel(s){this._logLevel=s,this._logger.setLevel(s),this._reflect("log-level",s)}get devOverlay(){return this._devOverlay}set devOverlay(s){this._devOverlay=!!s,this._booleanReflect("dev-overlay",this._devOverlay)}get preferCanvas(){return this._preferCanvas}set preferCanvas(s){this._preferCanvas=!!s,this._booleanReflect("prefer-canvas",this._preferCanvas)}get useExternalLeaflet(){return this._useExternalLeaflet}set useExternalLeaflet(s){this._useExternalLeaflet=!!s,this._booleanReflect("use-external-leaflet",this._useExternalLeaflet)}get skipLeafletStyles(){return this._skipLeafletStyles}set skipLeafletStyles(s){this._skipLeafletStyles=!!s,this._booleanReflect("skip-leaflet-styles",this._skipLeafletStyles)}get leafletInstance(){return this._leafletInstance}set leafletInstance(s){this._leafletInstance=s}get toolHooks(){return this._toolHooks}set toolHooks(s){this._toolHooks=s;const c=this._controller;typeof(c==null?void 0:c.setToolObservers)=="function"&&c.setToolObservers({toolHooks:this._toolHooks,toolEventEmitter:this._toolEventEmitter})}get toolEventEmitter(){return this._toolEventEmitter}set toolEventEmitter(s){this._toolEventEmitter=s;const c=this._controller;typeof(c==null?void 0:c.setToolObservers)=="function"&&c.setToolObservers({toolHooks:this._toolHooks,toolEventEmitter:this._toolEventEmitter})}get themeCss(){return this._themeCss}set themeCss(s){this._themeCss=typeof s=="string"?s:"",this.isConnected&&this._applyThemeStyles()}async getGeoJSON(){return this._logger.debug("getGeoJSON"),this._controller?this._controller.getGeoJSON():{type:"FeatureCollection",features:[]}}async loadGeoJSON(s){var r,a;if(this._logger.debug("loadGeoJSON",{features:(a=(r=s==null?void 0:s.features)==null?void 0:r.length)!=null?a:0}),!this._controller)return;const c={fc:s,mode:"load"};this.dispatchEvent(new CustomEvent("leaflet-draw:ingest",{detail:c}));const n=c.fc&&c.fc.type==="FeatureCollection"?c.fc:s;await this._controller.loadGeoJSON(n,!1)}async clearLayers(){this._logger.debug("clearLayers"),this._controller&&await this._controller.clearLayers()}async addFeatures(s){var r,a;if(this._logger.debug("addFeatures",{count:(a=(r=s==null?void 0:s.features)==null?void 0:r.length)!=null?a:0}),!this._controller)return[];const c={fc:s,mode:"add"};this.dispatchEvent(new CustomEvent("leaflet-draw:ingest",{detail:c}));const n=c.fc&&c.fc.type==="FeatureCollection"?c.fc:s;return this._controller.addFeatures(n)}async updateFeature(s,c){this._logger.debug("updateFeature",{id:s}),this._controller&&await this._controller.updateFeature(s,c)}async removeFeature(s){this._logger.debug("removeFeature",{id:s}),this._controller&&await this._controller.removeFeature(s)}async fitBoundsToData(s){this._logger.debug("fitBoundsToData",{padding:s}),this._controller&&await this._controller.fitBoundsToData(typeof s=="number"?s:.05)}async fitBounds(s,c){this._logger.debug("fitBounds",{bounds:s,padding:c}),this._controller&&await this._controller.fitBounds(s,typeof c=="number"?c:.05)}async setView(s,c,n){this._logger.debug("setView",{lat:s,lng:c,zoom:n}),this.latitude=s,this.longitude=c,typeof n=="number"&&(this.zoom=n),this._controller&&await this._controller.setView(s,c,n)}async exportGeoJSON(){if(this._logger.debug("exportGeoJSON"),!this._controller)return{type:"FeatureCollection",features:[]};const s=await this._controller.getGeoJSON(),c={geoJSON:s,featureCount:s.features.length};return this.dispatchEvent(new CustomEvent("leaflet-draw:export",{detail:c})),s}async mergePolygons(s){if(this._logger.debug("mergePolygons"),!this._controller)return null;const n=(await this._controller.getGeoJSON()).features.length,r=await this._controller.mergeVisiblePolygons(s);if(r){const a=await this._controller.getGeoJSON(),d={id:r,mergedFeatureCount:n-a.features.length+1,geoJSON:a};this.dispatchEvent(new CustomEvent("leaflet-draw:merged",{detail:d}))}return r}async setMeasurementUnits(s){this._logger.debug("setMeasurementUnits",{system:s}),this._controller&&this._controller.setRulerUnits(s)}async loadGeoJSONFromUrl(s){if(this._logger.debug("loadGeoJSONFromUrl",{url:s}),!this._controller)return;const c=await fetch(s,{headers:{Accept:"application/json"}});if(!c.ok){const d=new Error(`Failed to fetch GeoJSON from ${s}: ${c.status} ${c.statusText}`);throw this.dispatchEvent(new CustomEvent("leaflet-draw:error",{detail:{message:d.message,cause:d}})),d}const n=await c.json(),r={fc:n,mode:"load"};this.dispatchEvent(new CustomEvent("leaflet-draw:ingest",{detail:r}));const a=r.fc&&r.fc.type==="FeatureCollection"?r.fc:n;await this._controller.loadGeoJSON(a,!0)}async loadGeoJSONFromText(s){var a;if(this._logger.debug("loadGeoJSONFromText",{length:(a=s==null?void 0:s.length)!=null?a:0}),!this._controller)return;let c;try{c=JSON.parse(s)}catch(d){const f=new Error("Failed to parse GeoJSON text");throw this.dispatchEvent(new CustomEvent("leaflet-draw:error",{detail:{message:f.message,cause:d}})),f}const n={fc:c,mode:"load"};this.dispatchEvent(new CustomEvent("leaflet-draw:ingest",{detail:n}));const r=n.fc&&n.fc.type==="FeatureCollection"?n.fc:c;await this._controller.loadGeoJSON(r,!0)}_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 n;const s=(n=this._themeUrl)==null?void 0:n.trim();if(s){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")!==s&&this._themeLinkEl.setAttribute("href",s)}else this._themeLinkEl&&(this._themeLinkEl.remove(),this._themeLinkEl=null);const c=this._themeCss;if(c.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!==c&&(this._themeStyleEl.textContent=c)}else this._themeStyleEl&&(this._themeStyleEl.remove(),this._themeStyleEl=null)}_syncApiKeyFromAttributes(){const s=this._normalizeText(this.getAttribute("api-key")),c=this._normalizeText(this.getAttribute("here-api-key"));this._apiKey=s!=null?s:c}_normalizeText(s,c){if(typeof s!="string")return;const n=s.trim();if(n)return c!=null&&c.lowercase?n.toLowerCase():n}_resolveTileProviderErrorCode(s){return s instanceof Error&&s.message.toLowerCase().includes("unknown tile provider")?"unknown_provider":"tile_load_failed"}_resolveHereTileLayerErrorCode(s){const c=s.toLowerCase();return c.includes("permission")||c.includes("forbidden")||c.includes("403")||c.includes("unauthorized")||c.includes("not authorized")||c.includes("not authorised")||c.includes("access denied")?"permission_denied":"invalid_api_key"}_describeTileLayerError(s,c){if(s&&typeof s=="object"&&"error"in s&&s.error instanceof Error)return s.error.message;if(s instanceof Error&&s.message)return s.message;if(s&&typeof s=="object"&&"message"in s&&typeof s.message=="string"){const n=s.message.trim();if(n.length>0)return n}return c==="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(s,c){c===null?this.removeAttribute(s):this.getAttribute(s)!==c&&this.setAttribute(s,c)}_booleanReflect(s,c){c?this.hasAttribute(s)||this.setAttribute(s,""):this.hasAttribute(s)&&this.removeAttribute(s)}_coerceNumber(s,c){if(s==null)return c!=null?c:NaN;const n=Number(s);return Number.isFinite(n)?n:c!=null?c:NaN}}const _r={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",DrawStart:"leaflet-draw:drawstart",DrawStop:"leaflet-draw:drawstop",EditStart:"leaflet-draw:editstart",EditStop:"leaflet-draw:editstop"},Xi="leaflet-geokit";customElements.get(Xi)||customElements.define(Xi,ei);const Qi="leaflet-draw-map";if(!customElements.get(Qi)){class m extends ei{}customElements.define(Qi,m)}dt.DrawEvent=_r,dt.LeafletDrawMapElement=ei,Object.defineProperty(dt,Symbol.toStringTag,{value:"Module"})}));
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"})}));
255
255
  //# sourceMappingURL=leaflet-geokit.umd.js.map