@florasync/leaflet-geokit 0.9.0 → 0.10.0

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 (61) hide show
  1. package/ARCHITECTURE.md +195 -0
  2. package/CHANGELOG.md +5 -0
  3. package/README.md +7 -1
  4. package/custom-toolbar.html +165 -0
  5. package/dist/django/index.js +734 -734
  6. package/dist/django/index.js.map +1 -1
  7. package/dist/leaflet-geokit.es.js +1704 -1704
  8. package/dist/leaflet-geokit.es.js.map +1 -1
  9. package/dist/leaflet-geokit.external.es.js +1501 -1496
  10. package/dist/leaflet-geokit.external.es.js.map +1 -1
  11. package/dist/leaflet-geokit.umd.js +11 -14
  12. package/dist/leaflet-geokit.umd.js.map +1 -1
  13. package/dist/preact/{index-DCKj0r6a.js → index-Z22Un5Tg.js} +474 -469
  14. package/dist/preact/index-Z22Un5Tg.js.map +1 -0
  15. package/dist/preact/index.js +1 -1
  16. package/dist/preact-bundled/index.js +731 -731
  17. package/dist/preact-bundled/index.js.map +1 -1
  18. package/dist/react/{index-DCKj0r6a.js → index-Z22Un5Tg.js} +474 -469
  19. package/dist/react/index-Z22Un5Tg.js.map +1 -0
  20. package/dist/react/index.js +1 -1
  21. package/dist/react-bundled/index.js +731 -731
  22. package/dist/react-bundled/index.js.map +1 -1
  23. package/dist/types/components/LeafletDrawMapElement.d.ts +6 -6
  24. package/dist/types/django/index.d.ts +2 -2
  25. package/dist/types/external.d.ts +9 -9
  26. package/dist/types/index.d.ts +9 -9
  27. package/dist/types/lib/FeatureStore.d.ts +2 -2
  28. package/dist/types/lib/LayerRegistry.d.ts +1 -1
  29. package/dist/types/lib/MapController.d.ts +8 -8
  30. package/dist/types/lib/layer-cake/LayerCakeManager.d.ts +2 -2
  31. package/dist/types/lib/layer-style-panel.d.ts +1 -1
  32. package/dist/types/lib/marker-icons.d.ts +1 -1
  33. package/dist/types/lib/providers.d.ts +1 -1
  34. package/dist/types/lib/snapping.d.ts +1 -1
  35. package/dist/types/lib/tool-buttons.d.ts +1 -1
  36. package/dist/types/lib/tool-capabilities.d.ts +1 -1
  37. package/dist/types/lib/toolbar-layout.d.ts +1 -1
  38. package/dist/types/preact/core.d.ts +2 -2
  39. package/dist/types/preact/index.d.ts +2 -2
  40. package/dist/types/preact-bundled/index.d.ts +3 -3
  41. package/dist/types/react/core.d.ts +2 -2
  42. package/dist/types/react/index.d.ts +2 -2
  43. package/dist/types/react-bundled/index.d.ts +3 -3
  44. package/dist/types/types/events.d.ts +1 -1
  45. package/dist/types/types/public.d.ts +6 -6
  46. package/dist/types/utils/geojson-pipeline.d.ts +1 -1
  47. package/dist/types/utils/geojson.d.ts +1 -1
  48. package/docs/api-reference.md +249 -0
  49. package/docs/custom-toolbar.md +168 -0
  50. package/docs/diagnostics.md +216 -0
  51. package/docs/grower-measurement.md +23 -0
  52. package/docs/integration-recipes.md +301 -0
  53. package/docs/release-verification.md +75 -0
  54. package/docs/shims/django.md +102 -0
  55. package/docs/shims/preact.md +98 -0
  56. package/docs/shims/react.md +98 -0
  57. package/docs/toolbar-layout.md +158 -0
  58. package/docs/toolbar-styling.md +2 -2
  59. package/package.json +15 -4
  60. package/dist/preact/index-DCKj0r6a.js.map +0 -1
  61. package/dist/react/index-DCKj0r6a.js.map +0 -1
@@ -81,10 +81,6 @@ function xl(l) {
81
81
  return l && l.__esModule && Object.prototype.hasOwnProperty.call(l, "default") ? l.default : l;
82
82
  }
83
83
  var Ge = { exports: {} };
84
- /* @preserve
85
- * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
86
- * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
87
- */
88
84
  var El = Ge.exports, yr;
89
85
  function ha() {
90
86
  return yr || (yr = 1, (function(l, o) {
@@ -122,11 +118,11 @@ function ha() {
122
118
  return "_leaflet_id" in t || (t._leaflet_id = ++c), t._leaflet_id;
123
119
  }
124
120
  function p(t, n, h) {
125
- var u, f, _, w;
126
- return w = function() {
121
+ var u, f, _, k;
122
+ return k = function() {
127
123
  u = !1, f && (_.apply(h, f), f = !1);
128
124
  }, _ = function() {
129
- u ? f = arguments : (t.apply(h, arguments), setTimeout(w, n), u = !0);
125
+ u ? f = arguments : (t.apply(h, arguments), setTimeout(k, n), u = !0);
130
126
  }, _;
131
127
  }
132
128
  function g(t, n, h) {
@@ -142,19 +138,19 @@ function ha() {
142
138
  var h = Math.pow(10, n === void 0 ? 6 : n);
143
139
  return Math.round(t * h) / h;
144
140
  }
145
- function b(t) {
141
+ function v(t) {
146
142
  return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, "");
147
143
  }
148
- function k(t) {
149
- return b(t).split(/\s+/);
144
+ function x(t) {
145
+ return v(t).split(/\s+/);
150
146
  }
151
- function v(t, n) {
147
+ function b(t, n) {
152
148
  Object.prototype.hasOwnProperty.call(t, "options") || (t.options = t.options ? a(t.options) : {});
153
149
  for (var h in n)
154
150
  t.options[h] = n[h];
155
151
  return t.options;
156
152
  }
157
- function x(t, n, h) {
153
+ function w(t, n, h) {
158
154
  var u = [];
159
155
  for (var f in t)
160
156
  u.push(encodeURIComponent(h ? f.toUpperCase() : f) + "=" + encodeURIComponent(t[f]));
@@ -169,7 +165,7 @@ function ha() {
169
165
  return typeof f == "function" && (f = f(n)), f;
170
166
  });
171
167
  }
172
- var A = Array.isArray || function(t) {
168
+ var M = Array.isArray || function(t) {
173
169
  return Object.prototype.toString.call(t) === "[object Array]";
174
170
  };
175
171
  function S(t, n) {
@@ -182,16 +178,16 @@ function ha() {
182
178
  function O(t) {
183
179
  return window["webkit" + t] || window["moz" + t] || window["ms" + t];
184
180
  }
185
- var B = 0;
186
- function D(t) {
187
- var n = +/* @__PURE__ */ new Date(), h = Math.max(0, 16 - (n - B));
188
- return B = n + h, window.setTimeout(t, h);
181
+ var D = 0;
182
+ function z(t) {
183
+ var n = +/* @__PURE__ */ new Date(), h = Math.max(0, 16 - (n - D));
184
+ return D = n + h, window.setTimeout(t, h);
189
185
  }
190
- var U = window.requestAnimationFrame || O("RequestAnimationFrame") || D, Z = window.cancelAnimationFrame || O("CancelAnimationFrame") || O("CancelRequestAnimationFrame") || function(t) {
186
+ var U = window.requestAnimationFrame || O("RequestAnimationFrame") || z, Z = window.cancelAnimationFrame || O("CancelAnimationFrame") || O("CancelRequestAnimationFrame") || function(t) {
191
187
  window.clearTimeout(t);
192
188
  };
193
189
  function R(t, n, h) {
194
- if (h && U === D)
190
+ if (h && U === z)
195
191
  t.call(n);
196
192
  else
197
193
  return U.call(window, s(t, n));
@@ -212,12 +208,12 @@ function ha() {
212
208
  wrapNum: g,
213
209
  falseFn: m,
214
210
  formatNum: y,
215
- trim: b,
216
- splitWords: k,
217
- setOptions: v,
218
- getParamString: x,
211
+ trim: v,
212
+ splitWords: x,
213
+ setOptions: b,
214
+ getParamString: w,
219
215
  template: T,
220
- isArray: A,
216
+ isArray: M,
221
217
  indexOf: S,
222
218
  emptyImageUrl: I,
223
219
  requestFn: U,
@@ -229,7 +225,7 @@ function ha() {
229
225
  }
230
226
  K.extend = function(t) {
231
227
  var n = function() {
232
- v(this), this.initialize && this.initialize.apply(this, arguments), this.callInitHooks();
228
+ b(this), this.initialize && this.initialize.apply(this, arguments), this.callInitHooks();
233
229
  }, h = n.__super__ = this.prototype, u = a(h);
234
230
  u.constructor = n, n.prototype = u;
235
231
  for (var f in this)
@@ -237,7 +233,7 @@ function ha() {
237
233
  return t.statics && i(n, t.statics), t.includes && (vt(t.includes), i.apply(null, [u].concat(t.includes))), i(u, t), delete u.statics, delete u.includes, u.options && (u.options = h.options ? a(h.options) : {}, i(u.options, t.options)), u._initHooks = [], u.callInitHooks = function() {
238
234
  if (!this._initHooksCalled) {
239
235
  h.callInitHooks && h.callInitHooks.call(this), this._initHooksCalled = !0;
240
- for (var _ = 0, w = u._initHooks.length; _ < w; _++)
236
+ for (var _ = 0, k = u._initHooks.length; _ < k; _++)
241
237
  u._initHooks[_].call(this);
242
238
  }
243
239
  }, n;
@@ -254,7 +250,7 @@ function ha() {
254
250
  };
255
251
  function vt(t) {
256
252
  if (!(typeof L == "undefined" || !L || !L.Mixin)) {
257
- t = A(t) ? t : [t];
253
+ t = M(t) ? t : [t];
258
254
  for (var n = 0; n < t.length; n++)
259
255
  t[n] === 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);
260
256
  }
@@ -272,7 +268,7 @@ function ha() {
272
268
  for (var u in t)
273
269
  this._on(u, t[u], n);
274
270
  else {
275
- t = k(t);
271
+ t = x(t);
276
272
  for (var f = 0, _ = t.length; f < _; f++)
277
273
  this._on(t[f], n, h);
278
274
  }
@@ -296,8 +292,8 @@ function ha() {
296
292
  for (var u in t)
297
293
  this._off(u, t[u], n);
298
294
  else {
299
- t = k(t);
300
- for (var f = arguments.length === 1, _ = 0, w = t.length; _ < w; _++)
295
+ t = x(t);
296
+ for (var f = arguments.length === 1, _ = 0, k = t.length; _ < k; _++)
301
297
  f ? this._off(t[_]) : this._off(t[_], n, h);
302
298
  }
303
299
  return this;
@@ -328,10 +324,10 @@ function ha() {
328
324
  console.warn("wrong listener type: " + typeof n);
329
325
  return;
330
326
  }
331
- var w = this._listens(t, n, h);
332
- if (w !== !1) {
333
- var M = u[w];
334
- this._firingCount && (M.fn = m, this._events[t] = u = u.slice()), u.splice(w, 1);
327
+ var k = this._listens(t, n, h);
328
+ if (k !== !1) {
329
+ var A = u[k];
330
+ this._firingCount && (A.fn = m, this._events[t] = u = u.slice()), u.splice(k, 1);
335
331
  }
336
332
  }
337
333
  },
@@ -351,9 +347,9 @@ function ha() {
351
347
  var f = this._events[t];
352
348
  if (f) {
353
349
  this._firingCount = this._firingCount + 1 || 1;
354
- for (var _ = 0, w = f.length; _ < w; _++) {
355
- var M = f[_], C = M.fn;
356
- M.once && this.off(t, C, M.ctx), C.call(M.ctx || this, u);
350
+ for (var _ = 0, k = f.length; _ < k; _++) {
351
+ var A = f[_], C = A.fn;
352
+ A.once && this.off(t, C, A.ctx), C.call(A.ctx || this, u);
357
353
  }
358
354
  this._firingCount--;
359
355
  }
@@ -372,8 +368,8 @@ function ha() {
372
368
  if (_ && _.length && this._listens(t, f, h) !== !1)
373
369
  return !0;
374
370
  if (u) {
375
- for (var w in this._eventParents)
376
- if (this._eventParents[w].listens(t, n, h, u))
371
+ for (var k in this._eventParents)
372
+ if (this._eventParents[k].listens(t, n, h, u))
377
373
  return !0;
378
374
  }
379
375
  return !1;
@@ -398,7 +394,7 @@ function ha() {
398
394
  for (var u in t)
399
395
  this._on(u, t[u], n, !0);
400
396
  else {
401
- t = k(t);
397
+ t = x(t);
402
398
  for (var f = 0, _ = t.length; f < _; f++)
403
399
  this._on(t[f], n, h, !0);
404
400
  }
@@ -538,7 +534,7 @@ function ha() {
538
534
  }
539
535
  };
540
536
  function V(t, n, h) {
541
- return t instanceof q ? t : A(t) ? new q(t[0], t[1]) : t == null ? t : typeof t == "object" && "x" in t && "y" in t ? new q(t.x, t.y) : new q(t, n, h);
537
+ return t instanceof q ? t : M(t) ? new q(t[0], t[1]) : t == null ? t : typeof t == "object" && "x" in t && "y" in t ? new q(t.x, t.y) : new q(t, n, h);
542
538
  }
543
539
  function it(t, n) {
544
540
  if (t)
@@ -609,16 +605,16 @@ function ha() {
609
605
  // intersect if they have at least one point in common.
610
606
  intersects: function(t) {
611
607
  t = bt(t);
612
- var n = this.min, h = this.max, u = t.min, f = t.max, _ = f.x >= n.x && u.x <= h.x, w = f.y >= n.y && u.y <= h.y;
613
- return _ && w;
608
+ var n = this.min, h = this.max, u = t.min, f = t.max, _ = f.x >= n.x && u.x <= h.x, k = f.y >= n.y && u.y <= h.y;
609
+ return _ && k;
614
610
  },
615
611
  // @method overlaps(otherBounds: Bounds): Boolean
616
612
  // Returns `true` if the rectangle overlaps the given bounds. Two bounds
617
613
  // overlap if their intersection is an area.
618
614
  overlaps: function(t) {
619
615
  t = bt(t);
620
- var n = this.min, h = this.max, u = t.min, f = t.max, _ = f.x > n.x && u.x < h.x, w = f.y > n.y && u.y < h.y;
621
- return _ && w;
616
+ var n = this.min, h = this.max, u = t.min, f = t.max, _ = f.x > n.x && u.x < h.x, k = f.y > n.y && u.y < h.y;
617
+ return _ && k;
622
618
  },
623
619
  // @method isValid(): Boolean
624
620
  // Returns `true` if the bounds are properly initialized.
@@ -740,15 +736,15 @@ function ha() {
740
736
  // Returns `true` if the rectangle intersects the given bounds. Two bounds intersect if they have at least one point in common.
741
737
  intersects: function(t) {
742
738
  t = st(t);
743
- var n = this._southWest, h = this._northEast, u = t.getSouthWest(), f = t.getNorthEast(), _ = f.lat >= n.lat && u.lat <= h.lat, w = f.lng >= n.lng && u.lng <= h.lng;
744
- return _ && w;
739
+ var n = this._southWest, h = this._northEast, u = t.getSouthWest(), f = t.getNorthEast(), _ = f.lat >= n.lat && u.lat <= h.lat, k = f.lng >= n.lng && u.lng <= h.lng;
740
+ return _ && k;
745
741
  },
746
742
  // @method overlaps(otherBounds: LatLngBounds): Boolean
747
743
  // Returns `true` if the rectangle overlaps the given bounds. Two bounds overlap if their intersection is an area.
748
744
  overlaps: function(t) {
749
745
  t = st(t);
750
- var n = this._southWest, h = this._northEast, u = t.getSouthWest(), f = t.getNorthEast(), _ = f.lat > n.lat && u.lat < h.lat, w = f.lng > n.lng && u.lng < h.lng;
751
- return _ && w;
746
+ var n = this._southWest, h = this._northEast, u = t.getSouthWest(), f = t.getNorthEast(), _ = f.lat > n.lat && u.lat < h.lat, k = f.lng > n.lng && u.lng < h.lng;
747
+ return _ && k;
752
748
  },
753
749
  // @method toBBoxString(): String
754
750
  // Returns a string with bounding box coordinates in a 'southwest_lng,southwest_lat,northeast_lng,northeast_lat' format. Useful for sending requests to web services that return geo data.
@@ -816,7 +812,7 @@ function ha() {
816
812
  }
817
813
  };
818
814
  function X(t, n, h) {
819
- return t instanceof tt ? t : A(t) && typeof t[0] != "object" ? t.length === 3 ? new tt(t[0], t[1], t[2]) : t.length === 2 ? new tt(t[0], t[1]) : null : t == null ? t : typeof t == "object" && "lat" in t ? new tt(t.lat, "lng" in t ? t.lng : t.lon, t.alt) : n === void 0 ? null : new tt(t, n, h);
815
+ return t instanceof tt ? t : M(t) && typeof t[0] != "object" ? t.length === 3 ? new tt(t[0], t[1], t[2]) : t.length === 2 ? new tt(t[0], t[1]) : null : t == null ? t : typeof t == "object" && "lat" in t ? new tt(t.lat, "lng" in t ? t.lng : t.lon, t.alt) : n === void 0 ? null : new tt(t, n, h);
820
816
  }
821
817
  var zt = {
822
818
  // @method latLngToPoint(latlng: LatLng, zoom: Number): Point
@@ -897,8 +893,8 @@ function ha() {
897
893
  var n = t.getCenter(), h = this.wrapLatLng(n), u = n.lat - h.lat, f = n.lng - h.lng;
898
894
  if (u === 0 && f === 0)
899
895
  return t;
900
- var _ = t.getSouthWest(), w = t.getNorthEast(), M = new tt(_.lat - u, _.lng - f), C = new tt(w.lat - u, w.lng - f);
901
- return new Lt(M, C);
896
+ var _ = t.getSouthWest(), k = t.getNorthEast(), A = new tt(_.lat - u, _.lng - f), C = new tt(k.lat - u, k.lng - f);
897
+ return new Lt(A, C);
902
898
  }
903
899
  }, Jt = i({}, zt, {
904
900
  wrapLng: [-180, 180],
@@ -908,7 +904,7 @@ function ha() {
908
904
  R: 6371e3,
909
905
  // distance between two geographical points using spherical law of cosines approximation
910
906
  distance: function(t, n) {
911
- var h = Math.PI / 180, u = t.lat * h, f = n.lat * h, _ = Math.sin((n.lat - t.lat) * h / 2), w = Math.sin((n.lng - t.lng) * h / 2), M = _ * _ + Math.cos(u) * Math.cos(f) * w * w, C = 2 * Math.atan2(Math.sqrt(M), Math.sqrt(1 - M));
907
+ var h = Math.PI / 180, u = t.lat * h, f = n.lat * h, _ = Math.sin((n.lat - t.lat) * h / 2), k = Math.sin((n.lng - t.lng) * h / 2), A = _ * _ + Math.cos(u) * Math.cos(f) * k * k, C = 2 * Math.atan2(Math.sqrt(A), Math.sqrt(1 - A));
912
908
  return this.R * C;
913
909
  }
914
910
  }), sn = 6378137, Ni = {
@@ -934,7 +930,7 @@ function ha() {
934
930
  })()
935
931
  };
936
932
  function Ui(t, n, h, u) {
937
- if (A(t)) {
933
+ if (M(t)) {
938
934
  this._a = t[0], this._b = t[1], this._c = t[2], this._d = t[3];
939
935
  return;
940
936
  }
@@ -978,10 +974,10 @@ function ha() {
978
974
  return document.createElementNS("http://www.w3.org/2000/svg", t);
979
975
  }
980
976
  function hn(t, n) {
981
- var h = "", u, f, _, w, M, C;
977
+ var h = "", u, f, _, k, A, C;
982
978
  for (u = 0, _ = t.length; u < _; u++) {
983
- for (M = t[u], f = 0, w = M.length; f < w; f++)
984
- C = M[f], h += (f ? "L" : "M") + C.x + " " + C.y;
979
+ for (A = t[u], f = 0, k = A.length; f < k; f++)
980
+ C = A[f], h += (f ? "L" : "M") + C.x + " " + C.y;
985
981
  h += n ? F.svg ? "z" : "x" : "";
986
982
  }
987
983
  return h || "M0 0";
@@ -1112,14 +1108,14 @@ function ha() {
1112
1108
  return;
1113
1109
  }
1114
1110
  if (!(_.pointerType === "mouse" || _.sourceCapabilities && !_.sourceCapabilities.firesTouchEvents)) {
1115
- var w = On(_);
1116
- if (!(w.some(function(C) {
1111
+ var k = On(_);
1112
+ if (!(k.some(function(C) {
1117
1113
  return C instanceof HTMLLabelElement && C.attributes.for;
1118
- }) && !w.some(function(C) {
1114
+ }) && !k.some(function(C) {
1119
1115
  return C instanceof HTMLInputElement || C instanceof HTMLSelectElement;
1120
1116
  }))) {
1121
- var M = Date.now();
1122
- M - h <= _s ? (u++, u === 2 && n(gs(_))) : u = 1, h = M;
1117
+ var A = Date.now();
1118
+ A - h <= _s ? (u++, u === 2 && n(gs(_))) : u = 1, h = A;
1123
1119
  }
1124
1120
  }
1125
1121
  }
@@ -1175,7 +1171,7 @@ function ha() {
1175
1171
  }
1176
1172
  function j(t, n) {
1177
1173
  if (t.classList !== void 0)
1178
- for (var h = k(n), u = 0, f = h.length; u < f; u++)
1174
+ for (var h = x(n), u = 0, f = h.length; u < f; u++)
1179
1175
  t.classList.add(h[u]);
1180
1176
  else if (!ji(t, n)) {
1181
1177
  var _ = ii(t);
@@ -1183,7 +1179,7 @@ function ha() {
1183
1179
  }
1184
1180
  }
1185
1181
  function nt(t, n) {
1186
- t.classList !== void 0 ? t.classList.remove(n) : Yi(t, b((" " + ii(t) + " ").replace(" " + n + " ", " ")));
1182
+ t.classList !== void 0 ? t.classList.remove(n) : Yi(t, v((" " + ii(t) + " ").replace(" " + n + " ", " ")));
1187
1183
  }
1188
1184
  function Yi(t, n) {
1189
1185
  t.className.baseVal === void 0 ? t.className = n : t.className.baseVal = n;
@@ -1309,8 +1305,8 @@ function ha() {
1309
1305
  for (var f in n)
1310
1306
  oo(t, f, n[f], h);
1311
1307
  else {
1312
- n = k(n);
1313
- for (var _ = 0, w = n.length; _ < w; _++)
1308
+ n = x(n);
1309
+ for (var _ = 0, k = n.length; _ < k; _++)
1314
1310
  oo(t, n[_], h, u);
1315
1311
  }
1316
1312
  return this;
@@ -1322,12 +1318,12 @@ function ha() {
1322
1318
  else if (n && typeof n == "object")
1323
1319
  for (var f in n)
1324
1320
  no(t, f, n[f], h);
1325
- else if (n = k(n), arguments.length === 2)
1326
- In(t, function(M) {
1327
- return S(n, M) !== -1;
1321
+ else if (n = x(n), arguments.length === 2)
1322
+ In(t, function(A) {
1323
+ return S(n, A) !== -1;
1328
1324
  });
1329
1325
  else
1330
- for (var _ = 0, w = n.length; _ < w; _++)
1326
+ for (var _ = 0, k = n.length; _ < k; _++)
1331
1327
  no(t, n[_], h, u);
1332
1328
  return this;
1333
1329
  }
@@ -1346,12 +1342,12 @@ function ha() {
1346
1342
  var f = n + d(h) + (u ? "_" + d(u) : "");
1347
1343
  if (t[Ct] && t[Ct][f])
1348
1344
  return this;
1349
- var _ = function(M) {
1350
- return h.call(u || t, M || window.event);
1351
- }, w = _;
1352
- !F.touchNative && F.pointer && n.indexOf("touch") === 0 ? _ = cs(t, n, _) : F.touch && n === "dblclick" ? _ = ys(t, _) : "addEventListener" in t ? n === "touchstart" || n === "touchmove" || n === "wheel" || n === "mousewheel" ? t.addEventListener(io[n] || n, _, F.passiveEvents ? { passive: !1 } : !1) : n === "mouseenter" || n === "mouseleave" ? (_ = function(M) {
1353
- M = M || window.event, ao(t, M) && w(M);
1354
- }, t.addEventListener(io[n], _, !1)) : t.addEventListener(n, w, !1) : t.attachEvent("on" + n, _), t[Ct] = t[Ct] || {}, t[Ct][f] = _;
1345
+ var _ = function(A) {
1346
+ return h.call(u || t, A || window.event);
1347
+ }, k = _;
1348
+ !F.touchNative && F.pointer && n.indexOf("touch") === 0 ? _ = cs(t, n, _) : F.touch && n === "dblclick" ? _ = ys(t, _) : "addEventListener" in t ? n === "touchstart" || n === "touchmove" || n === "wheel" || n === "mousewheel" ? t.addEventListener(io[n] || n, _, F.passiveEvents ? { passive: !1 } : !1) : n === "mouseenter" || n === "mouseleave" ? (_ = function(A) {
1349
+ A = A || window.event, ao(t, A) && k(A);
1350
+ }, t.addEventListener(io[n], _, !1)) : t.addEventListener(n, k, !1) : t.attachEvent("on" + n, _), t[Ct] = t[Ct] || {}, t[Ct][f] = _;
1355
1351
  }
1356
1352
  function no(t, n, h, u, f) {
1357
1353
  f = f || n + d(h) + (u ? "_" + d(u) : "");
@@ -1557,7 +1553,7 @@ function ha() {
1557
1553
  trackResize: !0
1558
1554
  },
1559
1555
  initialize: function(t, n) {
1560
- n = v(this, n), this._handlers = [], this._layers = {}, this._zoomBoundLayers = {}, this._sizeChanged = !0, this._initContainer(t), this._initLayout(), this._onResize = s(this._onResize, this), this._initEvents(), n.maxBounds && this.setMaxBounds(n.maxBounds), n.zoom !== void 0 && (this._zoom = this._limitZoom(n.zoom)), n.center && n.zoom !== void 0 && this.setView(X(n.center), n.zoom, { reset: !0 }), this.callInitHooks(), this._zoomAnimated = Ae && F.any3d && !F.mobileOpera && this.options.zoomAnimation, this._zoomAnimated && (this._createAnimProxy(), J(this._proxy, Cn, this._catchTransitionEnd, this)), this._addLayers(this.options.layers);
1556
+ n = b(this, n), this._handlers = [], this._layers = {}, this._zoomBoundLayers = {}, this._sizeChanged = !0, this._initContainer(t), this._initLayout(), this._onResize = s(this._onResize, this), this._initEvents(), n.maxBounds && this.setMaxBounds(n.maxBounds), n.zoom !== void 0 && (this._zoom = this._limitZoom(n.zoom)), n.center && n.zoom !== void 0 && this.setView(X(n.center), n.zoom, { reset: !0 }), this.callInitHooks(), this._zoomAnimated = Ae && F.any3d && !F.mobileOpera && this.options.zoomAnimation, this._zoomAnimated && (this._createAnimProxy(), J(this._proxy, Cn, this._catchTransitionEnd, this)), this._addLayers(this.options.layers);
1561
1557
  },
1562
1558
  // @section Methods for modifying map state
1563
1559
  // @method setView(center: LatLng, zoom: Number, options?: Zoom/pan options): this
@@ -1594,8 +1590,8 @@ function ha() {
1594
1590
  // @method setZoomAround(offset: Point, zoom: Number, options: Zoom options): this
1595
1591
  // Zooms the map while keeping a specified pixel on the map (relative to the top-left corner) stationary.
1596
1592
  setZoomAround: function(t, n, h) {
1597
- var u = this.getZoomScale(n), f = this.getSize().divideBy(2), _ = t instanceof q ? t : this.latLngToContainerPoint(t), w = _.subtract(f).multiplyBy(1 - 1 / u), M = this.containerPointToLatLng(f.add(w));
1598
- return this.setView(M, n, { zoom: h });
1593
+ var u = this.getZoomScale(n), f = this.getSize().divideBy(2), _ = t instanceof q ? t : this.latLngToContainerPoint(t), k = _.subtract(f).multiplyBy(1 - 1 / u), A = this.containerPointToLatLng(f.add(k));
1594
+ return this.setView(A, n, { zoom: h });
1599
1595
  },
1600
1596
  _getBoundsCenterZoom: function(t, n) {
1601
1597
  n = n || {}, t = t.getBounds ? t.getBounds() : st(t);
@@ -1605,7 +1601,7 @@ function ha() {
1605
1601
  center: t.getCenter(),
1606
1602
  zoom: f
1607
1603
  };
1608
- var _ = u.subtract(h).divideBy(2), w = this.project(t.getSouthWest(), f), M = this.project(t.getNorthEast(), f), C = this.unproject(w.add(M).divideBy(2).add(_), f);
1604
+ var _ = u.subtract(h).divideBy(2), k = this.project(t.getSouthWest(), f), A = this.project(t.getNorthEast(), f), C = this.unproject(k.add(A).divideBy(2).add(_), f);
1609
1605
  return {
1610
1606
  center: C,
1611
1607
  zoom: f
@@ -1656,11 +1652,11 @@ function ha() {
1656
1652
  if (h = h || {}, h.animate === !1 || !F.any3d)
1657
1653
  return this.setView(t, n, h);
1658
1654
  this._stop();
1659
- var u = this.project(this.getCenter()), f = this.project(t), _ = this.getSize(), w = this._zoom;
1660
- t = X(t), n = n === void 0 ? w : n;
1661
- var M = Math.max(_.x, _.y), C = M * this.getZoomScale(w, n), z = f.distanceTo(u) || 1, N = 1.42, H = N * N;
1655
+ var u = this.project(this.getCenter()), f = this.project(t), _ = this.getSize(), k = this._zoom;
1656
+ t = X(t), n = n === void 0 ? k : n;
1657
+ var A = Math.max(_.x, _.y), C = A * this.getZoomScale(k, n), B = f.distanceTo(u) || 1, N = 1.42, H = N * N;
1662
1658
  function Y(ht) {
1663
- var _i = ht ? -1 : 1, ul = ht ? C : M, dl = C * C - M * M + _i * H * H * z * z, fl = 2 * ul * H * z, yo = dl / fl, gr = Math.sqrt(yo * yo + 1) - yo, pl = gr < 1e-9 ? -18 : Math.log(gr);
1659
+ var _i = ht ? -1 : 1, ul = ht ? C : A, dl = C * C - A * A + _i * H * H * B * B, fl = 2 * ul * H * B, yo = dl / fl, gr = Math.sqrt(yo * yo + 1) - yo, pl = gr < 1e-9 ? -18 : Math.log(gr);
1664
1660
  return pl;
1665
1661
  }
1666
1662
  function gt(ht) {
@@ -1674,10 +1670,10 @@ function ha() {
1674
1670
  }
1675
1671
  var wt = Y(0);
1676
1672
  function me(ht) {
1677
- return M * (ct(wt) / ct(wt + N * ht));
1673
+ return A * (ct(wt) / ct(wt + N * ht));
1678
1674
  }
1679
1675
  function sl(ht) {
1680
- return M * (ct(wt) * Et(wt + N * ht) - gt(wt)) / H;
1676
+ return A * (ct(wt) * Et(wt + N * ht) - gt(wt)) / H;
1681
1677
  }
1682
1678
  function ll(ht) {
1683
1679
  return 1 - Math.pow(1 - ht, 1.5);
@@ -1686,8 +1682,8 @@ function ha() {
1686
1682
  function mr() {
1687
1683
  var ht = (Date.now() - hl) / cl, _i = ll(ht) * pr;
1688
1684
  ht <= 1 ? (this._flyToFrame = R(mr, this), this._move(
1689
- this.unproject(u.add(f.subtract(u).multiplyBy(sl(_i) / z)), w),
1690
- this.getScaleZoom(M / me(_i), w),
1685
+ this.unproject(u.add(f.subtract(u).multiplyBy(sl(_i) / B)), k),
1686
+ this.getScaleZoom(A / me(_i), k),
1691
1687
  { flyTo: !0 }
1692
1688
  )) : this._move(t, n)._moveEnd(!0);
1693
1689
  }
@@ -1731,11 +1727,11 @@ function ha() {
1731
1727
  // the map will not be panned.
1732
1728
  panInside: function(t, n) {
1733
1729
  n = n || {};
1734
- var h = V(n.paddingTopLeft || n.padding || [0, 0]), u = V(n.paddingBottomRight || n.padding || [0, 0]), f = this.project(this.getCenter()), _ = this.project(t), w = this.getPixelBounds(), M = bt([w.min.add(h), w.max.subtract(u)]), C = M.getSize();
1735
- if (!M.contains(_)) {
1730
+ var h = V(n.paddingTopLeft || n.padding || [0, 0]), u = V(n.paddingBottomRight || n.padding || [0, 0]), f = this.project(this.getCenter()), _ = this.project(t), k = this.getPixelBounds(), A = bt([k.min.add(h), k.max.subtract(u)]), C = A.getSize();
1731
+ if (!A.contains(_)) {
1736
1732
  this._enforcingBounds = !0;
1737
- var z = _.subtract(M.getCenter()), N = M.extend(_).getSize().subtract(C);
1738
- f.x += z.x < 0 ? -N.x : N.x, f.y += z.y < 0 ? -N.y : N.y, this.panTo(this.unproject(f), n), this._enforcingBounds = !1;
1733
+ var B = _.subtract(A.getCenter()), N = A.extend(_).getSize().subtract(C);
1734
+ f.x += B.x < 0 ? -N.x : N.x, f.y += B.y < 0 ? -N.y : N.y, this.panTo(this.unproject(f), n), this._enforcingBounds = !1;
1739
1735
  }
1740
1736
  return this;
1741
1737
  },
@@ -1817,17 +1813,17 @@ function ha() {
1817
1813
  if (this._container._leaflet_id) {
1818
1814
  var n = t.coords.latitude, h = t.coords.longitude, u = new tt(n, h), f = u.toBounds(t.coords.accuracy * 2), _ = this._locateOptions;
1819
1815
  if (_.setView) {
1820
- var w = this.getBoundsZoom(f);
1821
- this.setView(u, _.maxZoom ? Math.min(w, _.maxZoom) : w);
1816
+ var k = this.getBoundsZoom(f);
1817
+ this.setView(u, _.maxZoom ? Math.min(k, _.maxZoom) : k);
1822
1818
  }
1823
- var M = {
1819
+ var A = {
1824
1820
  latlng: u,
1825
1821
  bounds: f,
1826
1822
  timestamp: t.timestamp
1827
1823
  };
1828
1824
  for (var C in t.coords)
1829
- typeof t.coords[C] == "number" && (M[C] = t.coords[C]);
1830
- this.fire("locationfound", M);
1825
+ typeof t.coords[C] == "number" && (A[C] = t.coords[C]);
1826
+ this.fire("locationfound", A);
1831
1827
  }
1832
1828
  },
1833
1829
  // TODO Appropriate docs section?
@@ -1901,7 +1897,7 @@ function ha() {
1901
1897
  // the given bounds in its entirety.
1902
1898
  getBoundsZoom: function(t, n, h) {
1903
1899
  t = st(t), h = V(h || [0, 0]);
1904
- var u = this.getZoom() || 0, f = this.getMinZoom(), _ = this.getMaxZoom(), w = t.getNorthWest(), M = t.getSouthEast(), C = this.getSize().subtract(h), z = bt(this.project(M, u), this.project(w, u)).getSize(), N = F.any3d ? this.options.zoomSnap : 1, H = C.x / z.x, Y = C.y / z.y, gt = n ? Math.max(H, Y) : Math.min(H, Y);
1900
+ var u = this.getZoom() || 0, f = this.getMinZoom(), _ = this.getMaxZoom(), k = t.getNorthWest(), A = t.getSouthEast(), C = this.getSize().subtract(h), B = bt(this.project(A, u), this.project(k, u)).getSize(), N = F.any3d ? this.options.zoomSnap : 1, H = C.x / B.x, Y = C.y / B.y, gt = n ? Math.max(H, Y) : Math.min(H, Y);
1905
1901
  return u = this.getScaleZoom(gt, u), N && (u = Math.round(u / (N / 100)) * (N / 100), u = n ? Math.ceil(u / N) * N : Math.floor(u / N) * N), Math.max(f, Math.min(_, u));
1906
1902
  },
1907
1903
  // @method getSize(): Point
@@ -2141,16 +2137,16 @@ function ha() {
2141
2137
  Math.max(Math.abs(t.x), Math.abs(t.y)) >= this.options.transform3DLimit && this._resetView(this.getCenter(), this.getZoom());
2142
2138
  },
2143
2139
  _findEventTargets: function(t, n) {
2144
- for (var h = [], u, f = n === "mouseout" || n === "mouseover", _ = t.target || t.srcElement, w = !1; _; ) {
2140
+ for (var h = [], u, f = n === "mouseout" || n === "mouseover", _ = t.target || t.srcElement, k = !1; _; ) {
2145
2141
  if (u = this._targets[d(_)], u && (n === "click" || n === "preclick") && this._draggableMoved(u)) {
2146
- w = !0;
2142
+ k = !0;
2147
2143
  break;
2148
2144
  }
2149
2145
  if (u && u.listens(n, !0) && (f && !ao(_, t) || (h.push(u), f)) || _ === this._container)
2150
2146
  break;
2151
2147
  _ = _.parentNode;
2152
2148
  }
2153
- return !h.length && !w && !f && this.listens(n, !0) && (h = [this]), h;
2149
+ return !h.length && !k && !f && this.listens(n, !0) && (h = [this]), h;
2154
2150
  },
2155
2151
  _isClickDisabled: function(t) {
2156
2152
  for (; t && t !== this._container; ) {
@@ -2174,21 +2170,21 @@ function ha() {
2174
2170
  }
2175
2171
  var f = this._findEventTargets(t, n);
2176
2172
  if (h) {
2177
- for (var _ = [], w = 0; w < h.length; w++)
2178
- h[w].listens(n, !0) && _.push(h[w]);
2173
+ for (var _ = [], k = 0; k < h.length; k++)
2174
+ h[k].listens(n, !0) && _.push(h[k]);
2179
2175
  f = _.concat(f);
2180
2176
  }
2181
2177
  if (f.length) {
2182
2178
  n === "contextmenu" && dt(t);
2183
- var M = f[0], C = {
2179
+ var A = f[0], C = {
2184
2180
  originalEvent: t
2185
2181
  };
2186
2182
  if (t.type !== "keypress" && t.type !== "keydown" && t.type !== "keyup") {
2187
- var z = M.getLatLng && (!M._radius || M._radius <= 10);
2188
- C.containerPoint = z ? this.latLngToContainerPoint(M.getLatLng()) : this.mouseEventToContainerPoint(t), C.layerPoint = this.containerPointToLayerPoint(C.containerPoint), C.latlng = z ? M.getLatLng() : this.layerPointToLatLng(C.layerPoint);
2183
+ var B = A.getLatLng && (!A._radius || A._radius <= 10);
2184
+ C.containerPoint = B ? this.latLngToContainerPoint(A.getLatLng()) : this.mouseEventToContainerPoint(t), C.layerPoint = this.containerPointToLayerPoint(C.containerPoint), C.latlng = B ? A.getLatLng() : this.layerPointToLatLng(C.layerPoint);
2189
2185
  }
2190
- for (w = 0; w < f.length; w++)
2191
- if (f[w].fire(n, C, !0), C.originalEvent._stopped || f[w].options.bubblingMouseEvents === !1 && S(this._mouseEvents, n) !== -1)
2186
+ for (k = 0; k < f.length; k++)
2187
+ if (f[k].fire(n, C, !0), C.originalEvent._stopped || f[k].options.bubblingMouseEvents === !1 && S(this._mouseEvents, n) !== -1)
2192
2188
  return;
2193
2189
  }
2194
2190
  },
@@ -2248,8 +2244,8 @@ function ha() {
2248
2244
  _limitCenter: function(t, n, h) {
2249
2245
  if (!h)
2250
2246
  return t;
2251
- var u = this.project(t, n), f = this.getSize().divideBy(2), _ = new it(u.subtract(f), u.add(f)), w = this._getBoundsOffset(_, h, n);
2252
- return Math.abs(w.x) <= 1 && Math.abs(w.y) <= 1 ? t : this.unproject(u.add(w), n);
2247
+ var u = this.project(t, n), f = this.getSize().divideBy(2), _ = new it(u.subtract(f), u.add(f)), k = this._getBoundsOffset(_, h, n);
2248
+ return Math.abs(k.x) <= 1 && Math.abs(k.y) <= 1 ? t : this.unproject(u.add(k), n);
2253
2249
  },
2254
2250
  // adjust offset for view to get inside bounds
2255
2251
  _limitOffset: function(t, n) {
@@ -2263,8 +2259,8 @@ function ha() {
2263
2259
  var u = bt(
2264
2260
  this.project(n.getNorthEast(), h),
2265
2261
  this.project(n.getSouthWest(), h)
2266
- ), f = u.min.subtract(t.min), _ = u.max.subtract(t.max), w = this._rebound(f.x, -_.x), M = this._rebound(f.y, -_.y);
2267
- return new q(w, M);
2262
+ ), f = u.min.subtract(t.min), _ = u.max.subtract(t.max), k = this._rebound(f.x, -_.x), A = this._rebound(f.y, -_.y);
2263
+ return new q(k, A);
2268
2264
  },
2269
2265
  _rebound: function(t, n) {
2270
2266
  return t + n > 0 ? Math.round(t - n) / 2 : Math.max(0, Math.ceil(t)) - Math.max(0, Math.floor(n));
@@ -2337,7 +2333,7 @@ function ha() {
2337
2333
  position: "topright"
2338
2334
  },
2339
2335
  initialize: function(t) {
2340
- v(this, t);
2336
+ b(this, t);
2341
2337
  },
2342
2338
  /* @section
2343
2339
  * Classes extending L.Control will inherit the following methods:
@@ -2391,8 +2387,8 @@ function ha() {
2391
2387
  _initControlPos: function() {
2392
2388
  var t = this._controlCorners = {}, n = "leaflet-", h = this._controlContainer = $("div", n + "control-container", this._container);
2393
2389
  function u(f, _) {
2394
- var w = n + f + " " + n + _;
2395
- t[f + _] = $("div", w, h);
2390
+ var k = n + f + " " + n + _;
2391
+ t[f + _] = $("div", k, h);
2396
2392
  }
2397
2393
  u("top", "left"), u("top", "right"), u("bottom", "left"), u("bottom", "right");
2398
2394
  },
@@ -2431,7 +2427,7 @@ function ha() {
2431
2427
  }
2432
2428
  },
2433
2429
  initialize: function(t, n, h) {
2434
- v(this, h), this._layerControlInputs = [], this._layers = [], this._lastZIndex = 0, this._handlingClick = !1, this._preventClick = !1;
2430
+ b(this, h), this._layerControlInputs = [], this._layers = [], this._lastZIndex = 0, this._handlingClick = !1, this._preventClick = !1;
2435
2431
  for (var u in t)
2436
2432
  this._addLayer(t[u], u);
2437
2433
  for (u in n)
@@ -2539,8 +2535,8 @@ function ha() {
2539
2535
  f.innerHTML = " " + t.name;
2540
2536
  var _ = document.createElement("span");
2541
2537
  n.appendChild(_), _.appendChild(u), _.appendChild(f);
2542
- var w = t.overlay ? this._overlaysList : this._baseLayersList;
2543
- return w.appendChild(n), this._checkDisabledLayers(), n;
2538
+ var k = t.overlay ? this._overlaysList : this._baseLayersList;
2539
+ return k.appendChild(n), this._checkDisabledLayers(), n;
2544
2540
  },
2545
2541
  _onInputClick: function() {
2546
2542
  if (!this._preventClick) {
@@ -2701,7 +2697,7 @@ function ha() {
2701
2697
  prefix: '<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">' + (F.inlineSvg ? Ts + " " : "") + "Leaflet</a>"
2702
2698
  },
2703
2699
  initialize: function(t) {
2704
- v(this, t), this._attributions = {};
2700
+ b(this, t), this._attributions = {};
2705
2701
  },
2706
2702
  onAdd: function(t) {
2707
2703
  t.attributionControl = this, this._container = $("div", "leaflet-control-attribution"), Ie(this._container);
@@ -2792,7 +2788,7 @@ function ha() {
2792
2788
  // @constructor L.Draggable(el: HTMLElement, dragHandle?: HTMLElement, preventOutline?: Boolean, options?: Draggable options)
2793
2789
  // Creates a `Draggable` object for moving `el` when you start dragging the `dragHandle` element (equals `el` itself by default).
2794
2790
  initialize: function(t, n, h, u) {
2795
- v(this, u), this._element = t, this._dragStartTarget = n || t, this._preventOutline = h;
2791
+ b(this, u), this._element = t, this._dragStartTarget = n || t, this._preventOutline = h;
2796
2792
  },
2797
2793
  // @method enable()
2798
2794
  // Enables the dragging ability
@@ -2846,18 +2842,18 @@ function ha() {
2846
2842
  }
2847
2843
  });
2848
2844
  function Fn(t, n, h) {
2849
- var u, f = [1, 4, 2, 8], _, w, M, C, z, N, H, Y;
2845
+ var u, f = [1, 4, 2, 8], _, k, A, C, B, N, H, Y;
2850
2846
  for (_ = 0, N = t.length; _ < N; _++)
2851
2847
  t[_]._code = ee(t[_], n);
2852
- for (M = 0; M < 4; M++) {
2853
- for (H = f[M], u = [], _ = 0, N = t.length, w = N - 1; _ < N; w = _++)
2854
- C = t[_], z = t[w], C._code & H ? z._code & H || (Y = ai(z, C, H, n, h), Y._code = ee(Y, n), u.push(Y)) : (z._code & H && (Y = ai(z, C, H, n, h), Y._code = ee(Y, n), u.push(Y)), u.push(C));
2848
+ for (A = 0; A < 4; A++) {
2849
+ for (H = f[A], u = [], _ = 0, N = t.length, k = N - 1; _ < N; k = _++)
2850
+ C = t[_], B = t[k], C._code & H ? B._code & H || (Y = ai(B, C, H, n, h), Y._code = ee(Y, n), u.push(Y)) : (B._code & H && (Y = ai(B, C, H, n, h), Y._code = ee(Y, n), u.push(Y)), u.push(C));
2855
2851
  t = u;
2856
2852
  }
2857
2853
  return t;
2858
2854
  }
2859
2855
  function Gn(t, n) {
2860
- var h, u, f, _, w, M, C, z, N;
2856
+ var h, u, f, _, k, A, C, B, N;
2861
2857
  if (!t || t.length === 0)
2862
2858
  throw new Error("latlngs not passed");
2863
2859
  xt(t) || (console.warn("latlngs are not flat! Only the first ring will be used"), t = t[0]);
@@ -2868,9 +2864,9 @@ function ha() {
2868
2864
  var wt = X(t[h]);
2869
2865
  Et.push(n.project(X([wt.lat - H.lat, wt.lng - H.lng])));
2870
2866
  }
2871
- for (M = C = z = 0, h = 0, u = ct - 1; h < ct; u = h++)
2872
- f = Et[h], _ = Et[u], w = f.y * _.x - _.y * f.x, C += (f.x + _.x) * w, z += (f.y + _.y) * w, M += w * 3;
2873
- M === 0 ? N = Et[0] : N = [C / M, z / M];
2867
+ for (A = C = B = 0, h = 0, u = ct - 1; h < ct; u = h++)
2868
+ f = Et[h], _ = Et[u], k = f.y * _.x - _.y * f.x, C += (f.x + _.x) * k, B += (f.y + _.y) * k, A += k * 3;
2869
+ A === 0 ? N = Et[0] : N = [C / A, B / A];
2874
2870
  var me = n.unproject(V(N));
2875
2871
  return X([me.lat + H.lat, me.lng + H.lng]);
2876
2872
  }
@@ -2902,16 +2898,16 @@ function ha() {
2902
2898
  function Os(t, n) {
2903
2899
  var h = t.length, u = typeof Uint8Array != "undefined" ? Uint8Array : Array, f = new u(h);
2904
2900
  f[0] = f[h - 1] = 1, co(t, f, n, 0, h - 1);
2905
- var _, w = [];
2901
+ var _, k = [];
2906
2902
  for (_ = 0; _ < h; _++)
2907
- f[_] && w.push(t[_]);
2908
- return w;
2903
+ f[_] && k.push(t[_]);
2904
+ return k;
2909
2905
  }
2910
2906
  function co(t, n, h, u, f) {
2911
- var _ = 0, w, M, C;
2912
- for (M = u + 1; M <= f - 1; M++)
2913
- C = De(t[M], t[u], t[f], !0), C > _ && (w = M, _ = C);
2914
- _ > h && (n[w] = 1, co(t, n, h, u, w), co(t, n, h, w, f));
2907
+ var _ = 0, k, A, C;
2908
+ for (A = u + 1; A <= f - 1; A++)
2909
+ C = De(t[A], t[u], t[f], !0), C > _ && (k = A, _ = C);
2910
+ _ > h && (n[k] = 1, co(t, n, h, u, k), co(t, n, h, k, f));
2915
2911
  }
2916
2912
  function Ds(t, n) {
2917
2913
  for (var h = [t[0]], u = 1, f = 0, _ = t.length; u < _; u++)
@@ -2920,18 +2916,18 @@ function ha() {
2920
2916
  }
2921
2917
  var Vn;
2922
2918
  function qn(t, n, h, u, f) {
2923
- var _ = u ? Vn : ee(t, h), w = ee(n, h), M, C, z;
2924
- for (Vn = w; ; ) {
2925
- if (!(_ | w))
2919
+ var _ = u ? Vn : ee(t, h), k = ee(n, h), A, C, B;
2920
+ for (Vn = k; ; ) {
2921
+ if (!(_ | k))
2926
2922
  return [t, n];
2927
- if (_ & w)
2923
+ if (_ & k)
2928
2924
  return !1;
2929
- M = _ || w, C = ai(t, n, M, h, f), z = ee(C, h), M === _ ? (t = C, _ = z) : (n = C, w = z);
2925
+ A = _ || k, C = ai(t, n, A, h, f), B = ee(C, h), A === _ ? (t = C, _ = B) : (n = C, k = B);
2930
2926
  }
2931
2927
  }
2932
2928
  function ai(t, n, h, u, f) {
2933
- var _ = n.x - t.x, w = n.y - t.y, M = u.min, C = u.max, z, N;
2934
- return h & 8 ? (z = t.x + _ * (C.y - t.y) / w, N = C.y) : h & 4 ? (z = t.x + _ * (M.y - t.y) / w, N = M.y) : h & 2 ? (z = C.x, N = t.y + w * (C.x - t.x) / _) : h & 1 && (z = M.x, N = t.y + w * (M.x - t.x) / _), new q(z, N, f);
2929
+ var _ = n.x - t.x, k = n.y - t.y, A = u.min, C = u.max, B, N;
2930
+ return h & 8 ? (B = t.x + _ * (C.y - t.y) / k, N = C.y) : h & 4 ? (B = t.x + _ * (A.y - t.y) / k, N = A.y) : h & 2 ? (B = C.x, N = t.y + k * (C.x - t.x) / _) : h & 1 && (B = A.x, N = t.y + k * (A.x - t.x) / _), new q(B, N, f);
2935
2931
  }
2936
2932
  function ee(t, n) {
2937
2933
  var h = 0;
@@ -2942,17 +2938,17 @@ function ha() {
2942
2938
  return h * h + u * u;
2943
2939
  }
2944
2940
  function De(t, n, h, u) {
2945
- var f = n.x, _ = n.y, w = h.x - f, M = h.y - _, C = w * w + M * M, z;
2946
- return C > 0 && (z = ((t.x - f) * w + (t.y - _) * M) / C, z > 1 ? (f = h.x, _ = h.y) : z > 0 && (f += w * z, _ += M * z)), w = t.x - f, M = t.y - _, u ? w * w + M * M : new q(f, _);
2941
+ var f = n.x, _ = n.y, k = h.x - f, A = h.y - _, C = k * k + A * A, B;
2942
+ return C > 0 && (B = ((t.x - f) * k + (t.y - _) * A) / C, B > 1 ? (f = h.x, _ = h.y) : B > 0 && (f += k * B, _ += A * B)), k = t.x - f, A = t.y - _, u ? k * k + A * A : new q(f, _);
2947
2943
  }
2948
2944
  function xt(t) {
2949
- return !A(t[0]) || typeof t[0][0] != "object" && typeof t[0][0] != "undefined";
2945
+ return !M(t[0]) || typeof t[0][0] != "object" && typeof t[0][0] != "undefined";
2950
2946
  }
2951
2947
  function Jn(t) {
2952
2948
  return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."), xt(t);
2953
2949
  }
2954
2950
  function Wn(t, n) {
2955
- var h, u, f, _, w, M, C, z;
2951
+ var h, u, f, _, k, A, C, B;
2956
2952
  if (!t || t.length === 0)
2957
2953
  throw new Error("latlngs not passed");
2958
2954
  xt(t) || (console.warn("latlngs are not flat! Only the first ring will be used"), t = t[0]);
@@ -2966,17 +2962,17 @@ function ha() {
2966
2962
  for (h = 0, u = 0; h < gt - 1; h++)
2967
2963
  u += ct[h].distanceTo(ct[h + 1]) / 2;
2968
2964
  if (u === 0)
2969
- z = ct[0];
2965
+ B = ct[0];
2970
2966
  else
2971
2967
  for (h = 0, _ = 0; h < gt - 1; h++)
2972
- if (w = ct[h], M = ct[h + 1], f = w.distanceTo(M), _ += f, _ > u) {
2973
- C = (_ - u) / f, z = [
2974
- M.x - C * (M.x - w.x),
2975
- M.y - C * (M.y - w.y)
2968
+ if (k = ct[h], A = ct[h + 1], f = k.distanceTo(A), _ += f, _ > u) {
2969
+ C = (_ - u) / f, B = [
2970
+ A.x - C * (A.x - k.x),
2971
+ A.y - C * (A.y - k.y)
2976
2972
  ];
2977
2973
  break;
2978
2974
  }
2979
- var wt = n.unproject(V(z));
2975
+ var wt = n.unproject(V(B));
2980
2976
  return X([wt.lat + N.lat, wt.lng + N.lng]);
2981
2977
  }
2982
2978
  var Bs = {
@@ -3004,13 +3000,13 @@ function ha() {
3004
3000
  R_MINOR: 6356752314245179e-9,
3005
3001
  bounds: new it([-2003750834279e-5, -1549657073972e-5], [2003750834279e-5, 1876465623138e-5]),
3006
3002
  project: function(t) {
3007
- var n = Math.PI / 180, h = this.R, u = t.lat * n, f = this.R_MINOR / h, _ = Math.sqrt(1 - f * f), w = _ * Math.sin(u), M = Math.tan(Math.PI / 4 - u / 2) / Math.pow((1 - w) / (1 + w), _ / 2);
3008
- return u = -h * Math.log(Math.max(M, 1e-10)), new q(t.lng * n * h, u);
3003
+ var n = Math.PI / 180, h = this.R, u = t.lat * n, f = this.R_MINOR / h, _ = Math.sqrt(1 - f * f), k = _ * Math.sin(u), A = Math.tan(Math.PI / 4 - u / 2) / Math.pow((1 - k) / (1 + k), _ / 2);
3004
+ return u = -h * Math.log(Math.max(A, 1e-10)), new q(t.lng * n * h, u);
3009
3005
  },
3010
3006
  unproject: function(t) {
3011
- for (var n = 180 / Math.PI, h = this.R, u = this.R_MINOR / h, f = Math.sqrt(1 - u * u), _ = Math.exp(-t.y / h), w = Math.PI / 2 - 2 * Math.atan(_), M = 0, C = 0.1, z; M < 15 && Math.abs(C) > 1e-7; M++)
3012
- z = f * Math.sin(w), z = Math.pow((1 - z) / (1 + z), f / 2), C = Math.PI / 2 - 2 * Math.atan(_ * z) - w, w += C;
3013
- return new tt(w * n, t.x * n / h);
3007
+ for (var n = 180 / Math.PI, h = this.R, u = this.R_MINOR / h, f = Math.sqrt(1 - u * u), _ = Math.exp(-t.y / h), k = Math.PI / 2 - 2 * Math.atan(_), A = 0, C = 0.1, B; A < 15 && Math.abs(C) > 1e-7; A++)
3008
+ B = f * Math.sin(k), B = Math.pow((1 - B) / (1 + B), f / 2), C = Math.PI / 2 - 2 * Math.atan(_ * B) - k, k += C;
3009
+ return new tt(k * n, t.x * n / h);
3014
3010
  }
3015
3011
  }, Rs = {
3016
3012
  __proto__: null,
@@ -3141,7 +3137,7 @@ function ha() {
3141
3137
  return this;
3142
3138
  },
3143
3139
  _addLayers: function(t) {
3144
- t = t ? A(t) ? t : [t] : [];
3140
+ t = t ? M(t) ? t : [t] : [];
3145
3141
  for (var n = 0, h = t.length; n < h; n++)
3146
3142
  this.addLayer(t[n]);
3147
3143
  },
@@ -3163,7 +3159,7 @@ function ha() {
3163
3159
  });
3164
3160
  var ce = At.extend({
3165
3161
  initialize: function(t, n) {
3166
- v(this, n), this._layers = {};
3162
+ b(this, n), this._layers = {};
3167
3163
  var h, u;
3168
3164
  if (t)
3169
3165
  for (h = 0, u = t.length; h < u; h++)
@@ -3333,7 +3329,7 @@ function ha() {
3333
3329
  crossOrigin: !1
3334
3330
  },
3335
3331
  initialize: function(t) {
3336
- v(this, t);
3332
+ b(this, t);
3337
3333
  },
3338
3334
  // @method createIcon(oldIcon?: HTMLElement): HTMLElement
3339
3335
  // Called internally when the icon has to be shown, returns a `<img>` HTML element
@@ -3425,16 +3421,16 @@ function ha() {
3425
3421
  return this._draggable && this._draggable._moved;
3426
3422
  },
3427
3423
  _adjustPan: function(t) {
3428
- var n = this._marker, h = n._map, u = this._marker.options.autoPanSpeed, f = this._marker.options.autoPanPadding, _ = Qt(n._icon), w = h.getPixelBounds(), M = h.getPixelOrigin(), C = bt(
3429
- w.min._subtract(M).add(f),
3430
- w.max._subtract(M).subtract(f)
3424
+ var n = this._marker, h = n._map, u = this._marker.options.autoPanSpeed, f = this._marker.options.autoPanPadding, _ = Qt(n._icon), k = h.getPixelBounds(), A = h.getPixelOrigin(), C = bt(
3425
+ k.min._subtract(A).add(f),
3426
+ k.max._subtract(A).subtract(f)
3431
3427
  );
3432
3428
  if (!C.contains(_)) {
3433
- var z = V(
3434
- (Math.max(C.max.x, _.x) - C.max.x) / (w.max.x - C.max.x) - (Math.min(C.min.x, _.x) - C.min.x) / (w.min.x - C.min.x),
3435
- (Math.max(C.max.y, _.y) - C.max.y) / (w.max.y - C.max.y) - (Math.min(C.min.y, _.y) - C.min.y) / (w.min.y - C.min.y)
3429
+ var B = V(
3430
+ (Math.max(C.max.x, _.x) - C.max.x) / (k.max.x - C.max.x) - (Math.min(C.min.x, _.x) - C.min.x) / (k.min.x - C.min.x),
3431
+ (Math.max(C.max.y, _.y) - C.max.y) / (k.max.y - C.max.y) - (Math.min(C.min.y, _.y) - C.min.y) / (k.min.y - C.min.y)
3436
3432
  ).multiplyBy(u);
3437
- h.panBy(z, { animate: !1 }), this._draggable._newPos._add(z), this._draggable._startPos._add(z), lt(n._icon, this._draggable._newPos), this._onDrag(t), this._panRequest = R(this._adjustPan.bind(this, t));
3433
+ h.panBy(B, { animate: !1 }), this._draggable._newPos._add(B), this._draggable._startPos._add(B), lt(n._icon, this._draggable._newPos), this._onDrag(t), this._panRequest = R(this._adjustPan.bind(this, t));
3438
3434
  }
3439
3435
  },
3440
3436
  _onDragStart: function() {
@@ -3519,7 +3515,7 @@ function ha() {
3519
3515
  * In addition to [shared layer methods](#Layer) like `addTo()` and `remove()` and [popup methods](#Popup) like bindPopup() you can also use the following methods:
3520
3516
  */
3521
3517
  initialize: function(t, n) {
3522
- v(this, n), this._latlng = X(t);
3518
+ b(this, n), this._latlng = X(t);
3523
3519
  },
3524
3520
  onAdd: function(t) {
3525
3521
  this._zoomAnimated = this._zoomAnimated && t.options.markerZoomAnimation, this._zoomAnimated && t.on("zoomanim", this._animateZoom, this), this._initIcon(), this.update();
@@ -3703,7 +3699,7 @@ function ha() {
3703
3699
  // @method setStyle(style: Path options): this
3704
3700
  // Changes the appearance of a Path based on the options in the `Path options` object.
3705
3701
  setStyle: function(t) {
3706
- return v(this, t), this._renderer && (this._renderer._updateStyle(this), this.options.stroke && t && Object.prototype.hasOwnProperty.call(t, "weight") && this._updateBounds()), this;
3702
+ return b(this, t), this._renderer && (this._renderer._updateStyle(this), this.options.stroke && t && Object.prototype.hasOwnProperty.call(t, "weight") && this._updateBounds()), this;
3707
3703
  },
3708
3704
  // @method bringToFront(): this
3709
3705
  // Brings the layer to the top of all path layers.
@@ -3734,7 +3730,7 @@ function ha() {
3734
3730
  radius: 10
3735
3731
  },
3736
3732
  initialize: function(t, n) {
3737
- v(this, n), this._latlng = X(t), this._radius = this.options.radius;
3733
+ b(this, n), this._latlng = X(t), this._radius = this.options.radius;
3738
3734
  },
3739
3735
  // @method setLatLng(latLng: LatLng): this
3740
3736
  // Sets the position of a circle marker to a new location.
@@ -3787,7 +3783,7 @@ function ha() {
3787
3783
  }
3788
3784
  var po = li.extend({
3789
3785
  initialize: function(t, n, h) {
3790
- if (typeof n == "number" && (n = i({}, h, { radius: n })), v(this, n), this._latlng = X(t), isNaN(this.options.radius))
3786
+ if (typeof n == "number" && (n = i({}, h, { radius: n })), b(this, n), this._latlng = X(t), isNaN(this.options.radius))
3791
3787
  throw new Error("Circle radius cannot be NaN");
3792
3788
  this._mRadius = this.options.radius;
3793
3789
  },
@@ -3814,8 +3810,8 @@ function ha() {
3814
3810
  _project: function() {
3815
3811
  var t = this._latlng.lng, n = this._latlng.lat, h = this._map, u = h.options.crs;
3816
3812
  if (u.distance === Jt.distance) {
3817
- var f = Math.PI / 180, _ = this._mRadius / Jt.R / f, w = h.project([n + _, t]), M = h.project([n - _, t]), C = w.add(M).divideBy(2), z = h.unproject(C).lat, N = Math.acos((Math.cos(_ * f) - Math.sin(n * f) * Math.sin(z * f)) / (Math.cos(n * f) * Math.cos(z * f))) / f;
3818
- (isNaN(N) || N === 0) && (N = _ / Math.cos(Math.PI / 180 * n)), this._point = C.subtract(h.getPixelOrigin()), this._radius = isNaN(N) ? 0 : C.x - h.project([z, t - N]).x, this._radiusY = C.y - w.y;
3813
+ var f = Math.PI / 180, _ = this._mRadius / Jt.R / f, k = h.project([n + _, t]), A = h.project([n - _, t]), C = k.add(A).divideBy(2), B = h.unproject(C).lat, N = Math.acos((Math.cos(_ * f) - Math.sin(n * f) * Math.sin(B * f)) / (Math.cos(n * f) * Math.cos(B * f))) / f;
3814
+ (isNaN(N) || N === 0) && (N = _ / Math.cos(Math.PI / 180 * n)), this._point = C.subtract(h.getPixelOrigin()), this._radius = isNaN(N) ? 0 : C.x - h.project([B, t - N]).x, this._radiusY = C.y - k.y;
3819
3815
  } else {
3820
3816
  var H = u.unproject(u.project(this._latlng).subtract([this._mRadius, 0]));
3821
3817
  this._point = h.latLngToLayerPoint(this._latlng), this._radius = this._point.x - h.latLngToLayerPoint(H).x;
@@ -3839,7 +3835,7 @@ function ha() {
3839
3835
  noClip: !1
3840
3836
  },
3841
3837
  initialize: function(t, n) {
3842
- v(this, n), this._setLatLngs(t);
3838
+ b(this, n), this._setLatLngs(t);
3843
3839
  },
3844
3840
  // @method getLatLngs(): LatLng[]
3845
3841
  // Returns an array of the points in the path, or nested arrays of points in case of multi-polyline.
@@ -3859,9 +3855,9 @@ function ha() {
3859
3855
  // @method closestLayerPoint(p: Point): Point
3860
3856
  // Returns the point closest to `p` on the Polyline.
3861
3857
  closestLayerPoint: function(t) {
3862
- for (var n = 1 / 0, h = null, u = De, f, _, w = 0, M = this._parts.length; w < M; w++)
3863
- for (var C = this._parts[w], z = 1, N = C.length; z < N; z++) {
3864
- f = C[z - 1], _ = C[z];
3858
+ for (var n = 1 / 0, h = null, u = De, f, _, k = 0, A = this._parts.length; k < A; k++)
3859
+ for (var C = this._parts[k], B = 1, N = C.length; B < N; B++) {
3860
+ f = C[B - 1], _ = C[B];
3865
3861
  var H = u(t, f, _, !0);
3866
3862
  H < n && (n = H, h = u(t, f, _));
3867
3863
  }
@@ -3911,11 +3907,11 @@ function ha() {
3911
3907
  },
3912
3908
  // recursively turns latlngs into a set of rings with projected coordinates
3913
3909
  _projectLatlngs: function(t, n, h) {
3914
- var u = t[0] instanceof tt, f = t.length, _, w;
3910
+ var u = t[0] instanceof tt, f = t.length, _, k;
3915
3911
  if (u) {
3916
- for (w = [], _ = 0; _ < f; _++)
3917
- w[_] = this._map.latLngToLayerPoint(t[_]), h.extend(w[_]);
3918
- n.push(w);
3912
+ for (k = [], _ = 0; _ < f; _++)
3913
+ k[_] = this._map.latLngToLayerPoint(t[_]), h.extend(k[_]);
3914
+ n.push(k);
3919
3915
  } else
3920
3916
  for (_ = 0; _ < f; _++)
3921
3917
  this._projectLatlngs(t[_], n, h);
@@ -3928,10 +3924,10 @@ function ha() {
3928
3924
  this._parts = this._rings;
3929
3925
  return;
3930
3926
  }
3931
- var n = this._parts, h, u, f, _, w, M, C;
3927
+ var n = this._parts, h, u, f, _, k, A, C;
3932
3928
  for (h = 0, f = 0, _ = this._rings.length; h < _; h++)
3933
- for (C = this._rings[h], u = 0, w = C.length; u < w - 1; u++)
3934
- M = qn(C[u], C[u + 1], t, u, !0), M && (n[f] = n[f] || [], n[f].push(M[0]), (M[1] !== C[u + 1] || u === w - 2) && (n[f].push(M[1]), f++));
3929
+ for (C = this._rings[h], u = 0, k = C.length; u < k - 1; u++)
3930
+ A = qn(C[u], C[u + 1], t, u, !0), A && (n[f] = n[f] || [], n[f].push(A[0]), (A[1] !== C[u + 1] || u === k - 2) && (n[f].push(A[1]), f++));
3935
3931
  }
3936
3932
  },
3937
3933
  // simplify each clipped part of the polyline for performance
@@ -3947,12 +3943,12 @@ function ha() {
3947
3943
  },
3948
3944
  // Needed by the `Canvas` renderer for interactivity
3949
3945
  _containsPoint: function(t, n) {
3950
- var h, u, f, _, w, M, C = this._clickTolerance();
3946
+ var h, u, f, _, k, A, C = this._clickTolerance();
3951
3947
  if (!this._pxBounds || !this._pxBounds.contains(t))
3952
3948
  return !1;
3953
3949
  for (h = 0, _ = this._parts.length; h < _; h++)
3954
- for (M = this._parts[h], u = 0, w = M.length, f = w - 1; u < w; f = u++)
3955
- if (!(!n && u === 0) && Hn(t, M[f], M[u]) <= C)
3950
+ for (A = this._parts[h], u = 0, k = A.length, f = k - 1; u < k; f = u++)
3951
+ if (!(!n && u === 0) && Hn(t, A[f], A[u]) <= C)
3956
3952
  return !0;
3957
3953
  return !1;
3958
3954
  }
@@ -4001,12 +3997,12 @@ function ha() {
4001
3997
  },
4002
3998
  // Needed by the `Canvas` renderer for interactivity
4003
3999
  _containsPoint: function(t) {
4004
- var n = !1, h, u, f, _, w, M, C, z;
4000
+ var n = !1, h, u, f, _, k, A, C, B;
4005
4001
  if (!this._pxBounds || !this._pxBounds.contains(t))
4006
4002
  return !1;
4007
4003
  for (_ = 0, C = this._parts.length; _ < C; _++)
4008
- for (h = this._parts[_], w = 0, z = h.length, M = z - 1; w < z; M = w++)
4009
- u = h[w], f = h[M], u.y > t.y != f.y > t.y && t.x < (f.x - u.x) * (t.y - u.y) / (f.y - u.y) + u.x && (n = !n);
4004
+ for (h = this._parts[_], k = 0, B = h.length, A = B - 1; k < B; A = k++)
4005
+ u = h[k], f = h[A], u.y > t.y != f.y > t.y && t.x < (f.x - u.x) * (t.y - u.y) / (f.y - u.y) + u.x && (n = !n);
4010
4006
  return n || Rt.prototype._containsPoint.call(this, t, !0);
4011
4007
  }
4012
4008
  });
@@ -4064,12 +4060,12 @@ function ha() {
4064
4060
  * Whether default Markers for "Point" type Features inherit from group options.
4065
4061
  */
4066
4062
  initialize: function(t, n) {
4067
- v(this, n), this._layers = {}, t && this.addData(t);
4063
+ b(this, n), this._layers = {}, t && this.addData(t);
4068
4064
  },
4069
4065
  // @method addData( <GeoJSON> data ): this
4070
4066
  // Adds a GeoJSON object to the layer.
4071
4067
  addData: function(t) {
4072
- var n = A(t) ? t : t.features, h, u, f;
4068
+ var n = M(t) ? t : t.features, h, u, f;
4073
4069
  if (n) {
4074
4070
  for (h = 0, u = n.length; h < u; h++)
4075
4071
  f = n[h], (f.geometries || f.geometry || f.features || f.coordinates) && this.addData(f);
@@ -4078,8 +4074,8 @@ function ha() {
4078
4074
  var _ = this.options;
4079
4075
  if (_.filter && !_.filter(t))
4080
4076
  return this;
4081
- var w = hi(t, _);
4082
- return w ? (w.feature = di(t), w.defaultOptions = w.options, this.resetStyle(w), _.onEachFeature && _.onEachFeature(t, w), this.addLayer(w)) : this;
4077
+ var k = hi(t, _);
4078
+ return k ? (k.feature = di(t), k.defaultOptions = k.options, this.resetStyle(k), _.onEachFeature && _.onEachFeature(t, k), this.addLayer(k)) : this;
4083
4079
  },
4084
4080
  // @method resetStyle( <Path> layer? ): this
4085
4081
  // Resets the given vector layer's style to the original GeoJSON style, useful for resetting style after hover events.
@@ -4099,26 +4095,26 @@ function ha() {
4099
4095
  }
4100
4096
  });
4101
4097
  function hi(t, n) {
4102
- var h = t.type === "Feature" ? t.geometry : t, u = h ? h.coordinates : null, f = [], _ = n && n.pointToLayer, w = n && n.coordsToLatLng || mo, M, C, z, N;
4098
+ var h = t.type === "Feature" ? t.geometry : t, u = h ? h.coordinates : null, f = [], _ = n && n.pointToLayer, k = n && n.coordsToLatLng || mo, A, C, B, N;
4103
4099
  if (!u && !h)
4104
4100
  return null;
4105
4101
  switch (h.type) {
4106
4102
  case "Point":
4107
- return M = w(u), Kn(_, t, M, n);
4103
+ return A = k(u), Kn(_, t, A, n);
4108
4104
  case "MultiPoint":
4109
- for (z = 0, N = u.length; z < N; z++)
4110
- M = w(u[z]), f.push(Kn(_, t, M, n));
4105
+ for (B = 0, N = u.length; B < N; B++)
4106
+ A = k(u[B]), f.push(Kn(_, t, A, n));
4111
4107
  return new Bt(f);
4112
4108
  case "LineString":
4113
4109
  case "MultiLineString":
4114
- return C = ci(u, h.type === "LineString" ? 0 : 1, w), new Rt(C, n);
4110
+ return C = ci(u, h.type === "LineString" ? 0 : 1, k), new Rt(C, n);
4115
4111
  case "Polygon":
4116
4112
  case "MultiPolygon":
4117
- return C = ci(u, h.type === "Polygon" ? 1 : 2, w), new de(C, n);
4113
+ return C = ci(u, h.type === "Polygon" ? 1 : 2, k), new de(C, n);
4118
4114
  case "GeometryCollection":
4119
- for (z = 0, N = h.geometries.length; z < N; z++) {
4115
+ for (B = 0, N = h.geometries.length; B < N; B++) {
4120
4116
  var H = hi({
4121
- geometry: h.geometries[z],
4117
+ geometry: h.geometries[B],
4122
4118
  type: "Feature",
4123
4119
  properties: t.properties
4124
4120
  }, n);
@@ -4126,8 +4122,8 @@ function ha() {
4126
4122
  }
4127
4123
  return new Bt(f);
4128
4124
  case "FeatureCollection":
4129
- for (z = 0, N = h.features.length; z < N; z++) {
4130
- var Y = hi(h.features[z], n);
4125
+ for (B = 0, N = h.features.length; B < N; B++) {
4126
+ var Y = hi(h.features[B], n);
4131
4127
  Y && f.push(Y);
4132
4128
  }
4133
4129
  return new Bt(f);
@@ -4142,15 +4138,15 @@ function ha() {
4142
4138
  return new tt(t[1], t[0], t[2]);
4143
4139
  }
4144
4140
  function ci(t, n, h) {
4145
- for (var u = [], f = 0, _ = t.length, w; f < _; f++)
4146
- w = n ? ci(t[f], n - 1, h) : (h || mo)(t[f]), u.push(w);
4141
+ for (var u = [], f = 0, _ = t.length, k; f < _; f++)
4142
+ k = n ? ci(t[f], n - 1, h) : (h || mo)(t[f]), u.push(k);
4147
4143
  return u;
4148
4144
  }
4149
4145
  function go(t, n) {
4150
4146
  return t = X(t), t.alt !== void 0 ? [y(t.lng, n), y(t.lat, n), y(t.alt, n)] : [y(t.lng, n), y(t.lat, n)];
4151
4147
  }
4152
4148
  function ui(t, n, h, u) {
4153
- for (var f = [], _ = 0, w = t.length; _ < w; _++)
4149
+ for (var f = [], _ = 0, k = t.length; _ < k; _++)
4154
4150
  f.push(n ? ui(t[_], xt(t[_]) ? 0 : n - 1, h, u) : go(t[_], u));
4155
4151
  return !n && h && f.length > 0 && f.push(f[0].slice()), f;
4156
4152
  }
@@ -4212,8 +4208,8 @@ function ha() {
4212
4208
  if (h)
4213
4209
  u.push(_.geometry);
4214
4210
  else {
4215
- var w = di(_);
4216
- w.type === "FeatureCollection" ? u.push.apply(u, w.features) : u.push(w);
4211
+ var k = di(_);
4212
+ k.type === "FeatureCollection" ? u.push.apply(u, k.features) : u.push(k);
4217
4213
  }
4218
4214
  }
4219
4215
  }), h ? fe(this, {
@@ -4257,7 +4253,7 @@ function ha() {
4257
4253
  className: ""
4258
4254
  },
4259
4255
  initialize: function(t, n, h) {
4260
- this._url = t, this._bounds = st(n), v(this, h);
4256
+ this._url = t, this._bounds = st(n), b(this, h);
4261
4257
  },
4262
4258
  onAdd: function() {
4263
4259
  this._image || (this._initImage(), this.options.opacity < 1 && this._updateOpacity()), this.options.interactive && (j(this._image, "leaflet-interactive"), this.addInteractiveTarget(this._image)), this.getPane().appendChild(this._image), this._reset();
@@ -4383,10 +4379,10 @@ function ha() {
4383
4379
  this._url = h.length > 0 ? u : [n.src];
4384
4380
  return;
4385
4381
  }
4386
- A(this._url) || (this._url = [this._url]), !this.options.keepAspectRatio && Object.prototype.hasOwnProperty.call(n.style, "objectFit") && (n.style.objectFit = "fill"), n.autoplay = !!this.options.autoplay, n.loop = !!this.options.loop, n.muted = !!this.options.muted, n.playsInline = !!this.options.playsInline;
4382
+ M(this._url) || (this._url = [this._url]), !this.options.keepAspectRatio && Object.prototype.hasOwnProperty.call(n.style, "objectFit") && (n.style.objectFit = "fill"), n.autoplay = !!this.options.autoplay, n.loop = !!this.options.loop, n.muted = !!this.options.muted, n.playsInline = !!this.options.playsInline;
4387
4383
  for (var _ = 0; _ < this._url.length; _++) {
4388
- var w = $("source");
4389
- w.src = this._url[_], n.appendChild(w);
4384
+ var k = $("source");
4385
+ k.src = this._url[_], n.appendChild(k);
4390
4386
  }
4391
4387
  }
4392
4388
  // @method getElement(): HTMLVideoElement
@@ -4430,7 +4426,7 @@ function ha() {
4430
4426
  content: ""
4431
4427
  },
4432
4428
  initialize: function(t, n) {
4433
- t && (t instanceof tt || A(t)) ? (this._latlng = X(t), v(this, n)) : (v(this, t), this._source = n), this.options.content && (this._content = this.options.content);
4429
+ t && (t instanceof tt || M(t)) ? (this._latlng = X(t), b(this, n)) : (b(this, t), this._source = n), this.options.content && (this._content = this.options.content);
4434
4430
  },
4435
4431
  // @method openOn(map: Map): this
4436
4432
  // Adds the overlay to the map.
@@ -4573,7 +4569,7 @@ function ha() {
4573
4569
  }), At.include({
4574
4570
  _initOverlay: function(t, n, h, u) {
4575
4571
  var f = h;
4576
- return f instanceof t ? (v(f, u), f._source = this) : (f = n && !u ? n : new t(u, this), f.setContent(h)), f;
4572
+ return f instanceof t ? (b(f, u), f._source = this) : (f = n && !u ? n : new t(u, this), f.setContent(h)), f;
4577
4573
  }
4578
4574
  });
4579
4575
  var pi = St.extend({
@@ -4684,8 +4680,8 @@ function ha() {
4684
4680
  }
4685
4681
  var t = this._map, n = parseInt(Te(this._container, "marginBottom"), 10) || 0, h = this._container.offsetHeight + n, u = this._containerWidth, f = new q(this._containerLeft, -h - this._containerBottom);
4686
4682
  f._add(Qt(this._container));
4687
- var _ = t.layerPointToContainerPoint(f), w = V(this.options.autoPanPadding), M = V(this.options.autoPanPaddingTopLeft || w), C = V(this.options.autoPanPaddingBottomRight || w), z = t.getSize(), N = 0, H = 0;
4688
- _.x + u + C.x > z.x && (N = _.x + u - z.x + C.x), _.x - N - M.x < 0 && (N = _.x - M.x), _.y + h + C.y > z.y && (H = _.y + h - z.y + C.y), _.y - H - M.y < 0 && (H = _.y - M.y), (N || H) && (this.options.keepInView && (this._autopanning = !0), t.fire("autopanstart").panBy([N, H]));
4683
+ var _ = t.layerPointToContainerPoint(f), k = V(this.options.autoPanPadding), A = V(this.options.autoPanPaddingTopLeft || k), C = V(this.options.autoPanPaddingBottomRight || k), B = t.getSize(), N = 0, H = 0;
4684
+ _.x + u + C.x > B.x && (N = _.x + u - B.x + C.x), _.x - N - A.x < 0 && (N = _.x - A.x), _.y + h + C.y > B.y && (H = _.y + h - B.y + C.y), _.y - H - A.y < 0 && (H = _.y - A.y), (N || H) && (this.options.keepInView && (this._autopanning = !0), t.fire("autopanstart").panBy([N, H]));
4689
4685
  }
4690
4686
  },
4691
4687
  _getAnchor: function() {
@@ -4826,8 +4822,8 @@ function ha() {
4826
4822
  _adjustPan: function() {
4827
4823
  },
4828
4824
  _setPosition: function(t) {
4829
- var n, h, u = this._map, f = this._container, _ = u.latLngToContainerPoint(u.getCenter()), w = u.layerPointToContainerPoint(t), M = this.options.direction, C = f.offsetWidth, z = f.offsetHeight, N = V(this.options.offset), H = this._getAnchor();
4830
- M === "top" ? (n = C / 2, h = z) : M === "bottom" ? (n = C / 2, h = 0) : M === "center" ? (n = C / 2, h = z / 2) : M === "right" ? (n = 0, h = z / 2) : M === "left" ? (n = C, h = z / 2) : w.x < _.x ? (M = "right", n = 0, h = z / 2) : (M = "left", n = C + (N.x + H.x) * 2, h = z / 2), t = t.subtract(V(n, h, !0)).add(N).add(H), nt(f, "leaflet-tooltip-right"), nt(f, "leaflet-tooltip-left"), nt(f, "leaflet-tooltip-top"), nt(f, "leaflet-tooltip-bottom"), j(f, "leaflet-tooltip-" + M), lt(f, t);
4825
+ var n, h, u = this._map, f = this._container, _ = u.latLngToContainerPoint(u.getCenter()), k = u.layerPointToContainerPoint(t), A = this.options.direction, C = f.offsetWidth, B = f.offsetHeight, N = V(this.options.offset), H = this._getAnchor();
4826
+ A === "top" ? (n = C / 2, h = B) : A === "bottom" ? (n = C / 2, h = 0) : A === "center" ? (n = C / 2, h = B / 2) : A === "right" ? (n = 0, h = B / 2) : A === "left" ? (n = C, h = B / 2) : k.x < _.x ? (A = "right", n = 0, h = B / 2) : (A = "left", n = C + (N.x + H.x) * 2, h = B / 2), t = t.subtract(V(n, h, !0)).add(N).add(H), nt(f, "leaflet-tooltip-right"), nt(f, "leaflet-tooltip-left"), nt(f, "leaflet-tooltip-top"), nt(f, "leaflet-tooltip-bottom"), j(f, "leaflet-tooltip-" + A), lt(f, t);
4831
4827
  },
4832
4828
  _updatePosition: function() {
4833
4829
  var t = this._map.latLngToLayerPoint(this._latlng);
@@ -5039,7 +5035,7 @@ function ha() {
5039
5035
  keepBuffer: 2
5040
5036
  },
5041
5037
  initialize: function(t) {
5042
- v(this, t);
5038
+ b(this, t);
5043
5039
  },
5044
5040
  onAdd: function() {
5045
5041
  this._initContainer(), this._levels = {}, this._tiles = {}, this._resetView();
@@ -5185,17 +5181,17 @@ function ha() {
5185
5181
  this._removeAllTiles(), this._tileZoom = void 0;
5186
5182
  },
5187
5183
  _retainParent: function(t, n, h, u) {
5188
- var f = Math.floor(t / 2), _ = Math.floor(n / 2), w = h - 1, M = new q(+f, +_);
5189
- M.z = +w;
5190
- var C = this._tileCoordsToKey(M), z = this._tiles[C];
5191
- return z && z.active ? (z.retain = !0, !0) : (z && z.loaded && (z.retain = !0), w > u ? this._retainParent(f, _, w, u) : !1);
5184
+ var f = Math.floor(t / 2), _ = Math.floor(n / 2), k = h - 1, A = new q(+f, +_);
5185
+ A.z = +k;
5186
+ var C = this._tileCoordsToKey(A), B = this._tiles[C];
5187
+ return B && B.active ? (B.retain = !0, !0) : (B && B.loaded && (B.retain = !0), k > u ? this._retainParent(f, _, k, u) : !1);
5192
5188
  },
5193
5189
  _retainChildren: function(t, n, h, u) {
5194
5190
  for (var f = 2 * t; f < 2 * t + 2; f++)
5195
5191
  for (var _ = 2 * n; _ < 2 * n + 2; _++) {
5196
- var w = new q(f, _);
5197
- w.z = h + 1;
5198
- var M = this._tileCoordsToKey(w), C = this._tiles[M];
5192
+ var k = new q(f, _);
5193
+ k.z = h + 1;
5194
+ var A = this._tileCoordsToKey(k), C = this._tiles[A];
5199
5195
  if (C && C.active) {
5200
5196
  C.retain = !0;
5201
5197
  continue;
@@ -5251,15 +5247,15 @@ function ha() {
5251
5247
  if (n) {
5252
5248
  var h = this._clampZoom(n.getZoom());
5253
5249
  if (t === void 0 && (t = n.getCenter()), this._tileZoom !== void 0) {
5254
- var u = this._getTiledPixelBounds(t), f = this._pxBoundsToTileRange(u), _ = f.getCenter(), w = [], M = this.options.keepBuffer, C = new it(
5255
- f.getBottomLeft().subtract([M, -M]),
5256
- f.getTopRight().add([M, -M])
5250
+ var u = this._getTiledPixelBounds(t), f = this._pxBoundsToTileRange(u), _ = f.getCenter(), k = [], A = this.options.keepBuffer, C = new it(
5251
+ f.getBottomLeft().subtract([A, -A]),
5252
+ f.getTopRight().add([A, -A])
5257
5253
  );
5258
5254
  if (!(isFinite(f.min.x) && isFinite(f.min.y) && isFinite(f.max.x) && isFinite(f.max.y)))
5259
5255
  throw new Error("Attempted to load an infinite number of tiles");
5260
- for (var z in this._tiles) {
5261
- var N = this._tiles[z].coords;
5262
- (N.z !== this._tileZoom || !C.contains(new q(N.x, N.y))) && (this._tiles[z].current = !1);
5256
+ for (var B in this._tiles) {
5257
+ var N = this._tiles[B].coords;
5258
+ (N.z !== this._tileZoom || !C.contains(new q(N.x, N.y))) && (this._tiles[B].current = !1);
5263
5259
  }
5264
5260
  if (Math.abs(h - this._tileZoom) > 1) {
5265
5261
  this._setView(t, h);
@@ -5270,16 +5266,16 @@ function ha() {
5270
5266
  var gt = new q(Y, H);
5271
5267
  if (gt.z = this._tileZoom, !!this._isValidTile(gt)) {
5272
5268
  var ct = this._tiles[this._tileCoordsToKey(gt)];
5273
- ct ? ct.current = !0 : w.push(gt);
5269
+ ct ? ct.current = !0 : k.push(gt);
5274
5270
  }
5275
5271
  }
5276
- if (w.sort(function(wt, me) {
5272
+ if (k.sort(function(wt, me) {
5277
5273
  return wt.distanceTo(_) - me.distanceTo(_);
5278
- }), w.length !== 0) {
5274
+ }), k.length !== 0) {
5279
5275
  this._loading || (this._loading = !0, this.fire("loading"));
5280
5276
  var Et = document.createDocumentFragment();
5281
- for (Y = 0; Y < w.length; Y++)
5282
- this._addTile(w[Y], Et);
5277
+ for (Y = 0; Y < k.length; Y++)
5278
+ this._addTile(k[Y], Et);
5283
5279
  this._level.el.appendChild(Et);
5284
5280
  }
5285
5281
  }
@@ -5301,8 +5297,8 @@ function ha() {
5301
5297
  return this._tileCoordsToBounds(this._keyToTileCoords(t));
5302
5298
  },
5303
5299
  _tileCoordsToNwSe: function(t) {
5304
- var n = this._map, h = this.getTileSize(), u = t.scaleBy(h), f = u.add(h), _ = n.unproject(u, t.z), w = n.unproject(f, t.z);
5305
- return [_, w];
5300
+ var n = this._map, h = this.getTileSize(), u = t.scaleBy(h), f = u.add(h), _ = n.unproject(u, t.z), k = n.unproject(f, t.z);
5301
+ return [_, k];
5306
5302
  },
5307
5303
  // converts tile coordinates to its geographical bounds
5308
5304
  _tileCoordsToBounds: function(t) {
@@ -5422,7 +5418,7 @@ function ha() {
5422
5418
  referrerPolicy: !1
5423
5419
  },
5424
5420
  initialize: function(t, n) {
5425
- this._url = t, n = v(this, n), n.detectRetina && F.retina && n.maxZoom > 0 ? (n.tileSize = Math.floor(n.tileSize / 2), n.zoomReverse ? (n.zoomOffset--, n.minZoom = Math.min(n.maxZoom, n.minZoom + 1)) : (n.zoomOffset++, n.maxZoom = Math.max(n.minZoom, n.maxZoom - 1)), n.minZoom = Math.max(0, n.minZoom)) : n.zoomReverse ? n.minZoom = Math.min(n.maxZoom, n.minZoom) : n.maxZoom = Math.max(n.minZoom, n.maxZoom), typeof n.subdomains == "string" && (n.subdomains = n.subdomains.split("")), this.on("tileunload", this._onTileRemove);
5421
+ this._url = t, n = b(this, n), n.detectRetina && F.retina && n.maxZoom > 0 ? (n.tileSize = Math.floor(n.tileSize / 2), n.zoomReverse ? (n.zoomOffset--, n.minZoom = Math.min(n.maxZoom, n.minZoom + 1)) : (n.zoomOffset++, n.maxZoom = Math.max(n.minZoom, n.maxZoom - 1)), n.minZoom = Math.max(0, n.minZoom)) : n.zoomReverse ? n.minZoom = Math.min(n.maxZoom, n.minZoom) : n.maxZoom = Math.max(n.minZoom, n.maxZoom), typeof n.subdomains == "string" && (n.subdomains = n.subdomains.split("")), this.on("tileunload", this._onTileRemove);
5426
5422
  },
5427
5423
  // @method setUrl(url: String, noRedraw?: Boolean): this
5428
5424
  // Updates the layer's URL template and redraws it (unless `noRedraw` is set to `true`).
@@ -5542,7 +5538,7 @@ function ha() {
5542
5538
  var h = i({}, this.defaultWmsParams);
5543
5539
  for (var u in n)
5544
5540
  u in this.options || (h[u] = n[u]);
5545
- n = v(this, n);
5541
+ n = b(this, n);
5546
5542
  var f = n.detectRetina && F.retina ? 2 : 1, _ = this.getTileSize();
5547
5543
  h.width = _.x * f, h.height = _.y * f, this.wmsParams = h;
5548
5544
  },
@@ -5552,8 +5548,8 @@ function ha() {
5552
5548
  this.wmsParams[n] = this._crs.code, pe.prototype.onAdd.call(this, t);
5553
5549
  },
5554
5550
  getTileUrl: function(t) {
5555
- var n = this._tileCoordsToNwSe(t), h = this._crs, u = bt(h.project(n[0]), h.project(n[1])), f = u.min, _ = u.max, w = (this._wmsVersion >= 1.3 && this._crs === jn ? [f.y, f.x, _.y, _.x] : [f.x, f.y, _.x, _.y]).join(","), M = pe.prototype.getTileUrl.call(this, t);
5556
- return M + x(this.wmsParams, M, this.options.uppercase) + (this.options.uppercase ? "&BBOX=" : "&bbox=") + w;
5551
+ var n = this._tileCoordsToNwSe(t), h = this._crs, u = bt(h.project(n[0]), h.project(n[1])), f = u.min, _ = u.max, k = (this._wmsVersion >= 1.3 && this._crs === jn ? [f.y, f.x, _.y, _.x] : [f.x, f.y, _.x, _.y]).join(","), A = pe.prototype.getTileUrl.call(this, t);
5552
+ return A + w(this.wmsParams, A, this.options.uppercase) + (this.options.uppercase ? "&BBOX=" : "&bbox=") + k;
5557
5553
  },
5558
5554
  // @method setParams(params: Object, noRedraw?: Boolean): this
5559
5555
  // Merges an object with the new parameters and re-requests tiles on the current screen (unless `noRedraw` was set to true).
@@ -5575,7 +5571,7 @@ function ha() {
5575
5571
  padding: 0.1
5576
5572
  },
5577
5573
  initialize: function(t) {
5578
- v(this, t), d(this), this._layers = this._layers || {};
5574
+ b(this, t), d(this), this._layers = this._layers || {};
5579
5575
  },
5580
5576
  onAdd: function() {
5581
5577
  this._container || (this._initContainer(), j(this._container, "leaflet-zoom-animated")), this.getPane().appendChild(this._container), this._update(), this.on("update", this._updatePaths, this);
@@ -5730,11 +5726,11 @@ function ha() {
5730
5726
  },
5731
5727
  _updatePoly: function(t, n) {
5732
5728
  if (this._drawing) {
5733
- var h, u, f, _, w = t._parts, M = w.length, C = this._ctx;
5734
- if (M) {
5735
- for (C.beginPath(), h = 0; h < M; h++) {
5736
- for (u = 0, f = w[h].length; u < f; u++)
5737
- _ = w[h][u], C[u ? "lineTo" : "moveTo"](_.x, _.y);
5729
+ var h, u, f, _, k = t._parts, A = k.length, C = this._ctx;
5730
+ if (A) {
5731
+ for (C.beginPath(), h = 0; h < A; h++) {
5732
+ for (u = 0, f = k[h].length; u < f; u++)
5733
+ _ = k[h][u], C[u ? "lineTo" : "moveTo"](_.x, _.y);
5738
5734
  n && C.closePath();
5739
5735
  }
5740
5736
  this._fillStroke(C, t);
@@ -5837,7 +5833,7 @@ function ha() {
5837
5833
  },
5838
5834
  _updateStyle: function(t) {
5839
5835
  var n = t._stroke, h = t._fill, u = t.options, f = t._container;
5840
- f.stroked = !!u.stroke, f.filled = !!u.fill, u.stroke ? (n || (n = t._stroke = Re("stroke")), f.appendChild(n), n.weight = u.weight + "px", n.color = u.color, n.opacity = u.opacity, u.dashArray ? n.dashStyle = A(u.dashArray) ? u.dashArray.join(" ") : u.dashArray.replace(/( *, *)/g, " ") : n.dashStyle = "", n.endcap = u.lineCap.replace("butt", "flat"), n.joinstyle = u.lineJoin) : n && (f.removeChild(n), t._stroke = null), u.fill ? (h || (h = t._fill = Re("fill")), f.appendChild(h), h.color = u.fillColor || u.color, h.opacity = u.fillOpacity) : h && (f.removeChild(h), t._fill = null);
5836
+ f.stroked = !!u.stroke, f.filled = !!u.fill, u.stroke ? (n || (n = t._stroke = Re("stroke")), f.appendChild(n), n.weight = u.weight + "px", n.color = u.color, n.opacity = u.opacity, u.dashArray ? n.dashStyle = M(u.dashArray) ? u.dashArray.join(" ") : u.dashArray.replace(/( *, *)/g, " ") : n.dashStyle = "", n.endcap = u.lineCap.replace("butt", "flat"), n.joinstyle = u.lineJoin) : n && (f.removeChild(n), t._stroke = null), u.fill ? (h || (h = t._fill = Re("fill")), f.appendChild(h), h.color = u.fillColor || u.color, h.opacity = u.fillOpacity) : h && (f.removeChild(h), t._fill = null);
5841
5837
  },
5842
5838
  _updateCircle: function(t) {
5843
5839
  var n = t._point.round(), h = Math.round(t._radius), u = Math.round(t._radiusY || h);
@@ -6124,8 +6120,8 @@ function ha() {
6124
6120
  }
6125
6121
  },
6126
6122
  _onPreDragWrap: function() {
6127
- var t = this._worldWidth, n = Math.round(t / 2), h = this._initialWorldOffset, u = this._draggable._newPos.x, f = (u - n + h) % t + n - h, _ = (u + n + h) % t - n - h, w = Math.abs(f + h) < Math.abs(_ + h) ? f : _;
6128
- this._draggable._absPos = this._draggable._newPos.clone(), this._draggable._newPos.x = w;
6123
+ var t = this._worldWidth, n = Math.round(t / 2), h = this._initialWorldOffset, u = this._draggable._newPos.x, f = (u - n + h) % t + n - h, _ = (u + n + h) % t - n - h, k = Math.abs(f + h) < Math.abs(_ + h) ? f : _;
6124
+ this._draggable._absPos = this._draggable._newPos.clone(), this._draggable._newPos.x = k;
6129
6125
  },
6130
6126
  _onDragEnd: function(t) {
6131
6127
  var n = this._map, h = n.options, u = !h.inertia || t.noInertia || this._times.length < 2;
@@ -6133,11 +6129,11 @@ function ha() {
6133
6129
  n.fire("moveend");
6134
6130
  else {
6135
6131
  this._prunePositions(+/* @__PURE__ */ new Date());
6136
- var f = this._lastPos.subtract(this._positions[0]), _ = (this._lastTime - this._times[0]) / 1e3, w = h.easeLinearity, M = f.multiplyBy(w / _), C = M.distanceTo([0, 0]), z = Math.min(h.inertiaMaxSpeed, C), N = M.multiplyBy(z / C), H = z / (h.inertiaDeceleration * w), Y = N.multiplyBy(-H / 2).round();
6132
+ var f = this._lastPos.subtract(this._positions[0]), _ = (this._lastTime - this._times[0]) / 1e3, k = h.easeLinearity, A = f.multiplyBy(k / _), C = A.distanceTo([0, 0]), B = Math.min(h.inertiaMaxSpeed, C), N = A.multiplyBy(B / C), H = B / (h.inertiaDeceleration * k), Y = N.multiplyBy(-H / 2).round();
6137
6133
  !Y.x && !Y.y ? n.fire("moveend") : (Y = n._limitOffset(Y, n.options.maxBounds), R(function() {
6138
6134
  n.panBy(Y, {
6139
6135
  duration: H,
6140
- easeLinearity: w,
6136
+ easeLinearity: k,
6141
6137
  noMoveStart: !0,
6142
6138
  animate: !0
6143
6139
  });
@@ -6275,8 +6271,8 @@ function ha() {
6275
6271
  _performZoom: function() {
6276
6272
  var t = this._map, n = t.getZoom(), h = this._map.options.zoomSnap || 0;
6277
6273
  t._stop();
6278
- var u = this._delta / (this._map.options.wheelPxPerZoomLevel * 4), f = 4 * Math.log(2 / (1 + Math.exp(-Math.abs(u)))) / Math.LN2, _ = h ? Math.ceil(f / h) * h : f, w = t._limitZoom(n + (this._delta > 0 ? _ : -_)) - n;
6279
- this._delta = 0, this._startTime = null, w && (t.options.scrollWheelZoom === "center" ? t.setZoom(n + w) : t.setZoomAround(this._lastMousePos, n + w));
6274
+ var u = this._delta / (this._map.options.wheelPxPerZoomLevel * 4), f = 4 * Math.log(2 / (1 + Math.exp(-Math.abs(u)))) / Math.LN2, _ = h ? Math.ceil(f / h) * h : f, k = t._limitZoom(n + (this._delta > 0 ? _ : -_)) - n;
6275
+ this._delta = 0, this._startTime = null, k && (t.options.scrollWheelZoom === "center" ? t.setZoom(n + k) : t.setZoomAround(this._lastMousePos, n + k));
6280
6276
  }
6281
6277
  });
6282
6278
  Q.addInitHook("addHandler", "scrollWheelZoom", ur);
@@ -6375,8 +6371,8 @@ function ha() {
6375
6371
  this._center = n.unproject(n.project(this._pinchStartLatLng, this._zoom).subtract(_), this._zoom);
6376
6372
  }
6377
6373
  this._moved || (n._moveStart(!0, !1), this._moved = !0), G(this._animRequest);
6378
- var w = s(n._move, n, this._center, this._zoom, { pinch: !0, round: !1 }, void 0);
6379
- this._animRequest = R(w, this, !0), dt(t);
6374
+ var k = s(n._move, n, this._center, this._zoom, { pinch: !0, round: !1 }, void 0);
6375
+ this._animRequest = R(k, this, !0), dt(t);
6380
6376
  }
6381
6377
  },
6382
6378
  _onTouchEnd: function() {
@@ -6387,7 +6383,7 @@ function ha() {
6387
6383
  this._zooming = !1, G(this._animRequest), et(document, "touchmove", this._onTouchMove, this), et(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));
6388
6384
  }
6389
6385
  });
6390
- Q.addInitHook("addHandler", "touchZoom", fr), Q.BoxZoom = sr, Q.DoubleClickZoom = lr, Q.Drag = hr, Q.Keyboard = cr, Q.ScrollWheelZoom = ur, Q.TapHold = dr, Q.TouchZoom = fr, e.Bounds = it, e.Browser = F, e.CRS = zt, e.Canvas = or, e.Circle = po, e.CircleMarker = li, e.Class = K, e.Control = Mt, e.DivIcon = tr, e.DivOverlay = St, e.DomEvent = ks, e.DomUtil = Ls, e.Draggable = Wt, e.Evented = Dt, e.FeatureGroup = Bt, e.GeoJSON = Nt, e.GridLayer = Be, e.Handler = Pt, e.Icon = ue, e.ImageOverlay = fi, e.LatLng = tt, e.LatLngBounds = Lt, e.Layer = At, e.LayerGroup = ce, e.LineUtil = Bs, e.Map = Q, e.Marker = si, e.Mixin = Ps, e.Path = jt, e.Point = q, e.PolyUtil = Ss, e.Polygon = de, e.Polyline = Rt, e.Popup = pi, e.PosAnimation = Bn, e.Projection = Rs, e.Rectangle = ar, e.Renderer = Ut, e.SVG = Ne, e.SVGOverlay = $n, e.TileLayer = pe, e.Tooltip = mi, e.Transformation = Ui, e.Util = W, e.VideoOverlay = Qn, e.bind = s, e.bounds = bt, e.canvas = nr, e.circle = qs, e.circleMarker = Vs, e.control = Oe, e.divIcon = tl, e.extend = i, e.featureGroup = Gs, e.geoJSON = Xn, e.geoJson = js, e.gridLayer = el, e.icon = Zs, e.imageOverlay = Ys, e.latLng = X, e.latLngBounds = st, e.layerGroup = Fs, e.map = xs, e.marker = Hs, e.point = V, e.polygon = Ws, e.polyline = Js, e.popup = Qs, e.rectangle = nl, e.setOptions = v, e.stamp = d, e.svg = rr, e.svgOverlay = Xs, e.tileLayer = er, e.tooltip = $s, e.transformation = Ee, e.version = r, e.videoOverlay = Ks;
6386
+ Q.addInitHook("addHandler", "touchZoom", fr), Q.BoxZoom = sr, Q.DoubleClickZoom = lr, Q.Drag = hr, Q.Keyboard = cr, Q.ScrollWheelZoom = ur, Q.TapHold = dr, Q.TouchZoom = fr, e.Bounds = it, e.Browser = F, e.CRS = zt, e.Canvas = or, e.Circle = po, e.CircleMarker = li, e.Class = K, e.Control = Mt, e.DivIcon = tr, e.DivOverlay = St, e.DomEvent = ks, e.DomUtil = Ls, e.Draggable = Wt, e.Evented = Dt, e.FeatureGroup = Bt, e.GeoJSON = Nt, e.GridLayer = Be, e.Handler = Pt, e.Icon = ue, e.ImageOverlay = fi, e.LatLng = tt, e.LatLngBounds = Lt, e.Layer = At, e.LayerGroup = ce, e.LineUtil = Bs, e.Map = Q, e.Marker = si, e.Mixin = Ps, e.Path = jt, e.Point = q, e.PolyUtil = Ss, e.Polygon = de, e.Polyline = Rt, e.Popup = pi, e.PosAnimation = Bn, e.Projection = Rs, e.Rectangle = ar, e.Renderer = Ut, e.SVG = Ne, e.SVGOverlay = $n, e.TileLayer = pe, e.Tooltip = mi, e.Transformation = Ui, e.Util = W, e.VideoOverlay = Qn, e.bind = s, e.bounds = bt, e.canvas = nr, e.circle = qs, e.circleMarker = Vs, e.control = Oe, e.divIcon = tl, e.extend = i, e.featureGroup = Gs, e.geoJSON = Xn, e.geoJson = js, e.gridLayer = el, e.icon = Zs, e.imageOverlay = Ys, e.latLng = X, e.latLngBounds = st, e.layerGroup = Fs, e.map = xs, e.marker = Hs, e.point = V, e.polygon = Ws, e.polyline = Js, e.popup = Qs, e.rectangle = nl, e.setOptions = b, e.stamp = d, e.svg = rr, e.svgOverlay = Xs, e.tileLayer = er, e.tooltip = $s, e.transformation = Ee, e.version = r, e.videoOverlay = Ks;
6391
6387
  var al = window.L;
6392
6388
  e.noConflict = function() {
6393
6389
  return window.L = al, this;
@@ -7216,7 +7212,6 @@ function Ul(l) {
7216
7212
  case "nauticalMile":
7217
7213
  a *= 0.53996, g = L.GeometryUtil.formattedNumber(a / 1e3, m.nm) + " nm";
7218
7214
  break;
7219
- case "yards":
7220
7215
  default:
7221
7216
  a *= 1.09361, g = a > 1760 ? L.GeometryUtil.formattedNumber(a / 1760, m.mi) + " miles" : L.GeometryUtil.formattedNumber(a, m.yd) + " yd";
7222
7217
  }
@@ -7510,10 +7505,10 @@ function Fl() {
7510
7505
  _calculateBearingAndDistance: function() {
7511
7506
  var r = this._clickedLatLong.lat, i = this._clickedLatLong.lng, a = this._movingLatLong.lat, s = this._movingLatLong.lng, c = Math.PI / 180, d = Math.sin((s - i) * c) * Math.cos(a * c), p = Math.cos(r * c) * Math.sin(a * c) - Math.sin(r * c) * Math.cos(a * c) * Math.cos((s - i) * c), g = Math.atan2(d, p) * ((this.options.angleUnit.factor ? this.options.angleUnit.factor / 2 : 180) / Math.PI);
7512
7507
  g += g < 0 ? this.options.angleUnit.factor ? this.options.angleUnit.factor : 360 : 0;
7513
- var m = this.options.lengthUnit.factor ? 6371 * this.options.lengthUnit.factor : 6371, y = (a - r) * c, b = (s - i) * c, k = Math.sin(y / 2) * Math.sin(y / 2) + Math.cos(r * c) * Math.cos(a * c) * Math.sin(b / 2) * Math.sin(b / 2), v = 2 * Math.atan2(Math.sqrt(k), Math.sqrt(1 - k)), x = m * v;
7508
+ var m = this.options.lengthUnit.factor ? 6371 * this.options.lengthUnit.factor : 6371, y = (a - r) * c, v = (s - i) * c, x = Math.sin(y / 2) * Math.sin(y / 2) + Math.cos(r * c) * Math.cos(a * c) * Math.sin(v / 2) * Math.sin(v / 2), b = 2 * Math.atan2(Math.sqrt(x), Math.sqrt(1 - x)), w = m * b;
7514
7509
  this._result = {
7515
7510
  Bearing: g,
7516
- Distance: x
7511
+ Distance: w
7517
7512
  };
7518
7513
  },
7519
7514
  _closePath: function() {
@@ -7657,16 +7652,16 @@ function tn(l, o = {}) {
7657
7652
  for (const a of l.features) {
7658
7653
  if (!a || a.type !== "Feature") continue;
7659
7654
  const s = (i = a.properties) != null ? i : {}, c = Ft(a), d = (g, m) => {
7660
- const y = s && typeof s == "object" ? { ...s } : {}, b = c !== void 0 ? `${c}::${m}` : void 0;
7661
- b !== void 0 && (y.id = b);
7662
- const k = Array.isArray(s[Ot]) ? s[Ot] : [], v = {
7655
+ const y = s && typeof s == "object" ? { ...s } : {}, v = c !== void 0 ? `${c}::${m}` : void 0;
7656
+ v !== void 0 && (y.id = v);
7657
+ const x = Array.isArray(s[Ot]) ? s[Ot] : [], b = {
7663
7658
  type: a.geometry.type,
7664
7659
  hasPropertyId: Object.prototype.hasOwnProperty.call(s, "id"),
7665
7660
  nullProperties: a.properties === null
7666
7661
  };
7667
- return a.id !== void 0 ? v.id = a.id : c !== void 0 && (v.id = c), v.hasPropertyId && (v.propertyId = s.id), o.preserveMetadata && (y[Ot] = [...k, v]), {
7662
+ return a.id !== void 0 ? b.id = a.id : c !== void 0 && (b.id = c), b.hasPropertyId && (b.propertyId = s.id), o.preserveMetadata && (y[Ot] = [...x, b]), {
7668
7663
  type: "Feature",
7669
- id: b,
7664
+ id: v,
7670
7665
  properties: y,
7671
7666
  geometry: g
7672
7667
  };
@@ -7719,8 +7714,8 @@ function ua(l, o = {}) {
7719
7714
  if (!a(m)) continue;
7720
7715
  const y = Lo(m);
7721
7716
  if (!y) continue;
7722
- const b = s.get(y.baseId);
7723
- b ? b.push(y) : s.set(y.baseId, [y]);
7717
+ const v = s.get(y.baseId);
7718
+ v ? v.push(y) : s.set(y.baseId, [y]);
7724
7719
  }
7725
7720
  if (s.size === 0) return l;
7726
7721
  const c = /* @__PURE__ */ new Set(), d = [];
@@ -8414,12 +8409,12 @@ class sh extends HTMLElement {
8414
8409
  ), this.entries.forEach(({ element: d, config: p }) => {
8415
8410
  const g = ah(p, r.width), m = getComputedStyle(d), y = nh(
8416
8411
  m.getPropertyValue("--geokit-toolbar-zone").trim() || g.position
8417
- ), b = this.querySelector(
8412
+ ), v = this.querySelector(
8418
8413
  `[data-geokit-zone="${y}"]`
8419
8414
  );
8420
- if (d.parentElement !== b) {
8415
+ if (d.parentElement !== v) {
8421
8416
  const E = d.getRootNode() instanceof ShadowRoot ? d.getRootNode().activeElement : document.activeElement;
8422
- b.appendChild(d), E instanceof HTMLElement && d.contains(E) && E.focus({ preventScroll: !0 });
8417
+ v.appendChild(d), E instanceof HTMLElement && d.contains(E) && E.focus({ preventScroll: !0 });
8423
8418
  }
8424
8419
  d.dataset.geokitToolbarPosition = y, d.style.setProperty(
8425
8420
  "--_geokit-direction",
@@ -8431,18 +8426,18 @@ class sh extends HTMLElement {
8431
8426
  "--_geokit-wrap",
8432
8427
  g.overflow === "scroll" ? "nowrap" : "wrap"
8433
8428
  );
8434
- const [k, v] = g.offset;
8429
+ const [x, b] = g.offset;
8435
8430
  d.style.setProperty(
8436
8431
  "--_geokit-layout-x",
8437
- `${Number.isFinite(k) ? Math.max(0, k) : 10}px`
8432
+ `${Number.isFinite(x) ? Math.max(0, x) : 10}px`
8438
8433
  ), d.style.setProperty(
8439
8434
  "--_geokit-layout-y",
8440
- `${Number.isFinite(v) ? Math.max(0, v) : 10}px`
8435
+ `${Number.isFinite(b) ? Math.max(0, b) : 10}px`
8441
8436
  );
8442
- const x = getComputedStyle(d).flexDirection.startsWith("row");
8437
+ const w = getComputedStyle(d).flexDirection.startsWith("row");
8443
8438
  d.setAttribute(
8444
8439
  "aria-orientation",
8445
- x ? "horizontal" : "vertical"
8440
+ w ? "horizontal" : "vertical"
8446
8441
  );
8447
8442
  });
8448
8443
  const s = qe.filter(
@@ -8723,14 +8718,14 @@ function bh(l, o, e) {
8723
8718
  g === "horizontal" ? "row" : "column"
8724
8719
  ), typeof d.gap == "number" && Number.isFinite(d.gap) && d.gap >= 0 && p.style.setProperty("--_geokit-gap", `${d.gap}px`), kh(p, d.position, d.offset);
8725
8720
  const m = Bi(d.className);
8726
- m.length > 0 && p.classList.add(...m), d.tools.forEach((b, k) => {
8727
- const v = wh(b, d, k, o == null ? void 0 : o[b]);
8728
- ga(v, b, {
8721
+ m.length > 0 && p.classList.add(...m), d.tools.forEach((v, x) => {
8722
+ const b = wh(v, d, x, o == null ? void 0 : o[v]);
8723
+ ga(b, v, {
8729
8724
  source: "toolbar",
8730
8725
  activate: !0,
8731
8726
  groupId: d.id,
8732
8727
  onTrigger: e.onTrigger
8733
- }), p.appendChild(v);
8728
+ }), p.appendChild(b);
8734
8729
  }), rh(d) ? (p.setAttribute(
8735
8730
  "part",
8736
8731
  `toolbar-group toolbar-group-${d.id.replace(/[^a-zA-Z0-9_-]/g, "-")}`
@@ -8750,30 +8745,30 @@ function Lh(l, o) {
8750
8745
  });
8751
8746
  }
8752
8747
  function wh(l, o, e, r) {
8753
- var g, m, y, b, k, v, x, E, T;
8748
+ var g, m, y, v, x, b, w, E, T;
8754
8749
  const i = document.createElement("button");
8755
8750
  i.type = "button", i.dataset.geokitTool = (m = (g = Ke[l]) == null ? void 0 : g.dataTool) != null ? m : l, i.dataset.geokitToolbarGroup = o.id, i.dataset.geokitToolbarPosition = (y = o.position) != null ? y : "topright", i.dataset.geokitToolInstance = Th(
8756
8751
  o.id,
8757
8752
  l,
8758
8753
  e
8759
8754
  ), i.className = "leaflet-geokit-toolbar-button", i.disabled = (r == null ? void 0 : r.disabled) === !0, i.setAttribute("aria-disabled", String(i.disabled));
8760
- const a = (b = r == null ? void 0 : r.title) != null ? b : _a(l);
8761
- i.title = a, i.setAttribute("aria-label", (k = r == null ? void 0 : r.ariaLabel) != null ? k : a), r != null && r.popover && (i.setAttribute("aria-haspopup", "dialog"), i.setAttribute("aria-expanded", "false"));
8755
+ const a = (v = r == null ? void 0 : r.title) != null ? v : _a(l);
8756
+ i.title = a, i.setAttribute("aria-label", (x = r == null ? void 0 : r.ariaLabel) != null ? x : a), r != null && r.popover && (i.setAttribute("aria-haspopup", "dialog"), i.setAttribute("aria-expanded", "false"));
8762
8757
  const s = Bi(r == null ? void 0 : r.className);
8763
8758
  if (s.length > 0 && i.classList.add(...s), r && (i.__geokitToolButtonConfig = r, gh(r) && Mi(i, r, { tool: l, groupId: o.id })), !i.querySelector(`.${Bo}`)) {
8764
- const A = {
8759
+ const M = {
8765
8760
  iconHtml: Ch(l),
8766
- iconSize: (v = r == null ? void 0 : r.iconSize) != null ? v : [20, 20]
8761
+ iconSize: (b = r == null ? void 0 : r.iconSize) != null ? b : [20, 20]
8767
8762
  };
8768
- Mi(i, A, { tool: l, groupId: o.id });
8763
+ Mi(i, M, { tool: l, groupId: o.id });
8769
8764
  }
8770
8765
  const c = `${o.id}-${l}-${e}`, d = i.querySelector(`.${Bo}`), p = document.createElement("slot");
8771
8766
  p.name = `${c}-icon`, p.append(...Array.from(d.childNodes)), d.appendChild(p);
8772
- for (const A of ["badge", "tooltip"]) {
8767
+ for (const M of ["badge", "tooltip"]) {
8773
8768
  const S = document.createElement("span");
8774
- S.className = `leaflet-geokit-tool-${A}`, S.setAttribute("part", A), S.setAttribute("aria-hidden", "true");
8769
+ S.className = `leaflet-geokit-tool-${M}`, S.setAttribute("part", M), S.setAttribute("aria-hidden", "true");
8775
8770
  const I = document.createElement("slot");
8776
- I.name = `${c}-${A}`, I.textContent = A === "badge" ? (x = r == null ? void 0 : r.badge) != null ? x : "" : (T = (E = r == null ? void 0 : r.tooltip) != null ? E : r == null ? void 0 : r.ariaLabel) != null ? T : a, S.appendChild(I), i.appendChild(S);
8771
+ I.name = `${c}-${M}`, I.textContent = M === "badge" ? (w = r == null ? void 0 : r.badge) != null ? w : "" : (T = (E = r == null ? void 0 : r.tooltip) != null ? E : r == null ? void 0 : r.ariaLabel) != null ? T : a, S.appendChild(I), i.appendChild(S);
8777
8772
  }
8778
8773
  return i;
8779
8774
  }
@@ -8782,7 +8777,7 @@ function kh(l, o = "topright", e) {
8782
8777
  l.dataset.geokitToolbarPosition = o, l.style.setProperty("--_geokit-offset-x", `${r}px`), l.style.setProperty("--_geokit-offset-y", `${i}px`);
8783
8778
  }
8784
8779
  function xh(l, o, e, r) {
8785
- var c, d, p, g, m, y, b, k, v;
8780
+ var c, d, p, g, m, y, v, x, b;
8786
8781
  if (!e.popover) return;
8787
8782
  Je(r.container);
8788
8783
  const i = document.createElement("div");
@@ -8790,16 +8785,16 @@ function xh(l, o, e, r) {
8790
8785
  "aria-label",
8791
8786
  (g = (p = e.popover.ariaLabel) != null ? p : e.popover.title) != null ? g : _a(o)
8792
8787
  ), e.popover.title) {
8793
- const x = document.createElement("strong");
8794
- x.textContent = e.popover.title, i.appendChild(x);
8788
+ const w = document.createElement("strong");
8789
+ w.textContent = e.popover.title, i.appendChild(w);
8795
8790
  }
8796
8791
  if (e.popover.body) {
8797
- const x = document.createElement("div");
8798
- x.textContent = e.popover.body, i.appendChild(x);
8792
+ const w = document.createElement("div");
8793
+ w.textContent = e.popover.body, i.appendChild(w);
8799
8794
  }
8800
8795
  if (e.popover.html) {
8801
- const x = document.createElement("div");
8802
- x.innerHTML = e.popover.html, i.appendChild(x);
8796
+ const w = document.createElement("div");
8797
+ w.innerHTML = e.popover.html, i.appendChild(w);
8803
8798
  }
8804
8799
  const a = (y = (m = e.popover).render) == null ? void 0 : y.call(m, {
8805
8800
  tool: o,
@@ -8810,17 +8805,17 @@ function xh(l, o, e, r) {
8810
8805
  if (a instanceof HTMLElement || s)
8811
8806
  i.appendChild(a);
8812
8807
  else if (typeof a == "string" && a.trim()) {
8813
- const x = document.createElement("div");
8814
- x.innerHTML = a, i.appendChild(x);
8808
+ const w = document.createElement("div");
8809
+ w.innerHTML = a, i.appendChild(w);
8815
8810
  }
8816
8811
  r.container.appendChild(i), Eh(r.container, l, i), l.setAttribute("aria-expanded", "true"), Uo.set(i, {
8817
8812
  tool: o,
8818
8813
  groupId: r.groupId,
8819
8814
  button: l,
8820
8815
  config: e
8821
- }), Mh(r.container, l, i), i.tabIndex = -1, ((b = i.querySelector(
8816
+ }), Mh(r.container, l, i), i.tabIndex = -1, ((v = i.querySelector(
8822
8817
  "button:not(:disabled), [href], input, select, textarea, [tabindex='0']"
8823
- )) != null ? b : i).focus(), (v = (k = e.popover).onOpen) == null || v.call(k, {
8818
+ )) != null ? v : i).focus(), (b = (x = e.popover).onOpen) == null || b.call(x, {
8824
8819
  tool: o,
8825
8820
  groupId: r.groupId,
8826
8821
  button: l,
@@ -9007,49 +9002,49 @@ function ya(l, o, e) {
9007
9002
  s = !1;
9008
9003
  };
9009
9004
  l.on("unload", c);
9010
- const d = (v, x) => ({
9011
- target: x,
9012
- originalEvent: v,
9013
- latlng: l.mouseEventToLatLng(v)
9014
- }), p = (v) => {
9015
- v.preventDefault(), v.stopPropagation();
9005
+ const d = (b, w) => ({
9006
+ target: w,
9007
+ originalEvent: b,
9008
+ latlng: l.mouseEventToLatLng(b)
9009
+ }), p = (b) => {
9010
+ b.preventDefault(), b.stopPropagation();
9016
9011
  }, g = () => {
9017
- var x;
9018
- const v = a;
9019
- a = null, v !== null && ((x = r.hasPointerCapture) != null && x.call(r, v)) && r.releasePointerCapture(v), s && l.dragging.enable(), s = !1;
9020
- }, m = (v) => {
9021
- if (a !== null || !v.isPrimary || v.button !== 0) return;
9022
- let x;
9023
- const E = v.composedPath(), T = l.mouseEventToLayerPoint(v), A = /* @__PURE__ */ new Set();
9012
+ var w;
9013
+ const b = a;
9014
+ a = null, b !== null && ((w = r.hasPointerCapture) != null && w.call(r, b)) && r.releasePointerCapture(b), s && l.dragging.enable(), s = !1;
9015
+ }, m = (b) => {
9016
+ if (a !== null || !b.isPrimary || b.button !== 0) return;
9017
+ let w;
9018
+ const E = b.composedPath(), T = l.mouseEventToLayerPoint(b), M = /* @__PURE__ */ new Set();
9024
9019
  if (o.eachLayer((S) => {
9025
- var B;
9026
- const I = (B = S.getElement) == null ? void 0 : B.call(S);
9027
- I && E.includes(I) && (x = S);
9020
+ var D;
9021
+ const I = (D = S.getElement) == null ? void 0 : D.call(S);
9022
+ I && E.includes(I) && (w = S);
9028
9023
  const O = S._renderer;
9029
- if (!I && O && !A.has(O) && E.includes(O._container)) {
9030
- A.add(O);
9031
- for (let D = O._drawFirst; D; D = D.next) {
9032
- const U = D.layer;
9033
- o.hasLayer(U) && U.options.interactive && U._containsPoint(T) && (x = U);
9024
+ if (!I && O && !M.has(O) && E.includes(O._container)) {
9025
+ M.add(O);
9026
+ for (let z = O._drawFirst; z; z = z.next) {
9027
+ const U = z.layer;
9028
+ o.hasLayer(U) && U.options.interactive && U._containsPoint(T) && (w = U);
9034
9029
  }
9035
9030
  }
9036
- }), !!x && (p(v), !e.pending())) {
9037
- a = v.pointerId, s = l.dragging.enabled(), l.dragging.disable(), e.start(d(v, x));
9031
+ }), !!w && (p(b), !e.pending())) {
9032
+ a = b.pointerId, s = l.dragging.enabled(), l.dragging.disable(), e.start(d(b, w));
9038
9033
  try {
9039
9034
  r.setPointerCapture(a);
9040
9035
  } catch {
9041
9036
  g(), e.cancel();
9042
9037
  }
9043
9038
  }
9044
- }, y = (v) => {
9045
- v.pointerId === a && (p(v), e.move(d(v)));
9046
- }, b = (v) => {
9047
- v.pointerId === a && (p(v), e.move(d(v)), g(), e.end(d(v)));
9048
- }, k = (v) => {
9049
- v.pointerId === a && (p(v), g(), e.cancel());
9039
+ }, y = (b) => {
9040
+ b.pointerId === a && (p(b), e.move(d(b)));
9041
+ }, v = (b) => {
9042
+ b.pointerId === a && (p(b), e.move(d(b)), g(), e.end(d(b)));
9043
+ }, x = (b) => {
9044
+ b.pointerId === a && (p(b), g(), e.cancel());
9050
9045
  };
9051
- return r.addEventListener("pointerdown", m, !0), r.addEventListener("pointermove", y, !0), r.addEventListener("pointerup", b, !0), r.addEventListener("pointercancel", k, !0), r.addEventListener("lostpointercapture", k, !0), () => {
9052
- g(), e.cancel(), l.off("unload", c), r.style.touchAction = i, r.removeEventListener("pointerdown", m, !0), r.removeEventListener("pointermove", y, !0), r.removeEventListener("pointerup", b, !0), r.removeEventListener("pointercancel", k, !0), r.removeEventListener("lostpointercapture", k, !0);
9046
+ return r.addEventListener("pointerdown", m, !0), r.addEventListener("pointermove", y, !0), r.addEventListener("pointerup", v, !0), r.addEventListener("pointercancel", x, !0), r.addEventListener("lostpointercapture", x, !0), () => {
9047
+ g(), e.cancel(), l.off("unload", c), r.style.touchAction = i, r.removeEventListener("pointerdown", m, !0), r.removeEventListener("pointermove", y, !0), r.removeEventListener("pointerup", v, !0), r.removeEventListener("pointercancel", x, !0), r.removeEventListener("lostpointercapture", x, !0);
9053
9048
  };
9054
9049
  }
9055
9050
  const Di = class Di extends rt.Draw.Feature {
@@ -9378,8 +9373,8 @@ function Ar(l) {
9378
9373
  return l * 180 / Math.PI;
9379
9374
  }
9380
9375
  function zh(l, o, e) {
9381
- const r = o / Dh, i = xo(e), a = xo(l.lat), s = xo(l.lng), c = Math.sin(a), d = Math.cos(a), p = Math.sin(r), g = Math.cos(r), m = c * g + d * p * Math.cos(i), y = Math.asin(m), b = Math.sin(i) * p * d, k = g - c * m, v = s + Math.atan2(b, k);
9382
- return { lat: Ar(y), lng: Ar(v) };
9376
+ const r = o / Dh, i = xo(e), a = xo(l.lat), s = xo(l.lng), c = Math.sin(a), d = Math.cos(a), p = Math.sin(r), g = Math.cos(r), m = c * g + d * p * Math.cos(i), y = Math.asin(m), v = Math.sin(i) * p * d, x = g - c * m, b = s + Math.atan2(v, x);
9377
+ return { lat: Ar(y), lng: Ar(b) };
9383
9378
  }
9384
9379
  function Bh(l) {
9385
9380
  let o = 0;
@@ -9513,6 +9508,7 @@ function Fe(l, o) {
9513
9508
  }
9514
9509
  class Zh {
9515
9510
  constructor(o, e, r, i = "metric", a) {
9511
+ P(this, "onChange");
9516
9512
  P(this, "map");
9517
9513
  P(this, "layers", []);
9518
9514
  P(this, "controlsGroup");
@@ -9529,28 +9525,28 @@ class Zh {
9529
9525
  this.onChange = a, this.map = o, this.onSave = r, this.measurementSystem = i, this.controlsGroup = rt.layerGroup().addTo(o), this.baseCircleOptions = { ...e.options }, Object.assign(this.baseCircleOptions, this.style), delete this.baseCircleOptions.editing, delete this.baseCircleOptions.original, this.addLayer(e), this.installEditEventBridges(), this.renderControls();
9530
9526
  }
9531
9527
  installEditEventBridges() {
9532
- var g, m, y, b, k, v, x, E;
9533
- const o = Ei, e = (m = (g = o == null ? void 0 : o.Draw) == null ? void 0 : g.Event) == null ? void 0 : m.EDITMOVE, r = (b = (y = o == null ? void 0 : o.Draw) == null ? void 0 : y.Event) == null ? void 0 : b.EDITRESIZE, i = (v = (k = o == null ? void 0 : o.Draw) == null ? void 0 : k.Event) == null ? void 0 : v.EDITSTART, a = (E = (x = o == null ? void 0 : o.Draw) == null ? void 0 : x.Event) == null ? void 0 : E.EDITSTOP;
9528
+ var g, m, y, v, x, b, w, E;
9529
+ const o = Ei, e = (m = (g = o == null ? void 0 : o.Draw) == null ? void 0 : g.Event) == null ? void 0 : m.EDITMOVE, r = (v = (y = o == null ? void 0 : o.Draw) == null ? void 0 : y.Event) == null ? void 0 : v.EDITRESIZE, i = (b = (x = o == null ? void 0 : o.Draw) == null ? void 0 : x.Event) == null ? void 0 : b.EDITSTART, a = (E = (w = o == null ? void 0 : o.Draw) == null ? void 0 : w.Event) == null ? void 0 : E.EDITSTOP;
9534
9530
  if (!e || !r) return;
9535
9531
  const s = (T) => {
9536
- const A = T == null ? void 0 : T.layer;
9537
- A && this.layers.includes(A) && this.syncCenters(A);
9532
+ const M = T == null ? void 0 : T.layer;
9533
+ M && this.layers.includes(M) && this.syncCenters(M);
9538
9534
  }, c = (T) => {
9539
- const A = T == null ? void 0 : T.layer;
9540
- A && this.layers.includes(A) && (this.updateLabels(A), this.requestRenderControls());
9535
+ const M = T == null ? void 0 : T.layer;
9536
+ M && this.layers.includes(M) && (this.updateLabels(M), this.requestRenderControls());
9541
9537
  }, d = (T) => {
9542
9538
  var O;
9543
- const A = T == null ? void 0 : T.layer;
9544
- if (!A || !this.layers.includes(A)) return;
9545
- const S = A;
9546
- ((O = S.getTooltip) == null ? void 0 : O.call(S)) && this.updateLabels(S);
9539
+ const M = T == null ? void 0 : T.layer;
9540
+ if (!M || !this.layers.includes(M)) return;
9541
+ const S = M;
9542
+ (O = S.getTooltip) != null && O.call(S) && this.updateLabels(S);
9547
9543
  }, p = () => {
9548
9544
  this.layers.forEach((T) => {
9549
9545
  var S;
9550
- const A = (S = T.getTooltip) == null ? void 0 : S.call(T);
9551
- A && (T.setTooltipContent(
9546
+ const M = (S = T.getTooltip) == null ? void 0 : S.call(T);
9547
+ M && (T.setTooltipContent(
9552
9548
  Fe(T.getRadius(), this.measurementSystem)
9553
- ), A.options.offset = [10, 0], A.options.direction = "right", T.closeTooltip(), T.openTooltip());
9549
+ ), M.options.offset = [10, 0], M.options.direction = "right", T.closeTooltip(), T.openTooltip());
9554
9550
  });
9555
9551
  };
9556
9552
  this.map.on(e, s), this.map.on(r, c), i && (this.map.on(i, d), this.detachMapListeners.push(() => this.map.off(i, d))), a && (this.map.on(a, p), this.detachMapListeners.push(() => this.map.off(a, p))), this.detachMapListeners.push(() => this.map.off(e, s)), this.detachMapListeners.push(() => this.map.off(r, c));
@@ -9795,229 +9791,233 @@ function ba(l, o, e, r) {
9795
9791
  }
9796
9792
  function jh(l, o, e, r) {
9797
9793
  const i = Le(l), a = Le(e), s = Le(r - o), c = Math.atan((1 - oe) * Math.tan(i)), d = Math.atan((1 - oe) * Math.tan(a)), p = Math.sin(c), g = Math.cos(c), m = Math.sin(d), y = Math.cos(d);
9798
- let b = s, k = Number.POSITIVE_INFINITY, v = 0;
9799
- const x = 200;
9800
- let E = 0, T = 0, A = 0, S = 0, I = 0;
9801
- for (; Math.abs(b - k) > 1e-12 && v < x; ) {
9802
- const G = Math.sin(b), W = Math.cos(b);
9794
+ let v = s, x = Number.POSITIVE_INFINITY, b = 0;
9795
+ const w = 200;
9796
+ let E = 0, T = 0, M = 0, S = 0, I = 0;
9797
+ for (; Math.abs(v - x) > 1e-12 && b < w; ) {
9798
+ const G = Math.sin(v), W = Math.cos(v);
9803
9799
  if (E = Math.sqrt(
9804
9800
  (y * G) ** 2 + (g * m - p * y * W) ** 2
9805
9801
  ), E === 0)
9806
9802
  return {
9807
9803
  distanceMeters: 0,
9808
9804
  bearingRad: 0,
9809
- iterations: v,
9805
+ iterations: b,
9810
9806
  converged: !0
9811
9807
  };
9812
- T = p * m + g * y * W, A = Math.atan2(E, T);
9808
+ T = p * m + g * y * W, M = Math.atan2(E, T);
9813
9809
  const K = g * y * G / E;
9814
9810
  S = 1 - K ** 2, I = S === 0 ? 0 : T - 2 * p * m / S;
9815
9811
  const vt = oe / 16 * S * (4 + oe * (4 - 3 * S));
9816
- k = b, b = s + (1 - vt) * oe * K * (A + vt * E * (I + vt * T * (-1 + 2 * I ** 2))), v += 1;
9812
+ x = v, v = s + (1 - vt) * oe * K * (M + vt * E * (I + vt * T * (-1 + 2 * I ** 2))), b += 1;
9817
9813
  }
9818
- if (v >= x)
9814
+ if (b >= w)
9819
9815
  return {
9820
9816
  distanceMeters: Number.NaN,
9821
9817
  bearingRad: 0,
9822
- iterations: v,
9818
+ iterations: b,
9823
9819
  converged: !1
9824
9820
  };
9825
- const O = (va ** 2 - be ** 2) / be ** 2 * S, B = 1 + O / 16384 * (4096 + O * (-768 + O * (320 - 175 * O))), D = O / 1024 * (256 + O * (-128 + O * (74 - 47 * O))), U = D * E * (I + D / 4 * (T * (-1 + 2 * I ** 2) - D / 6 * I * (-3 + 4 * E ** 2) * (-3 + 4 * I ** 2))), Z = be * B * (A - U), R = Math.atan2(
9826
- y * Math.sin(b),
9827
- g * m - p * y * Math.cos(b)
9821
+ const O = (va ** 2 - be ** 2) / be ** 2 * S, D = 1 + O / 16384 * (4096 + O * (-768 + O * (320 - 175 * O))), z = O / 1024 * (256 + O * (-128 + O * (74 - 47 * O))), U = z * E * (I + z / 4 * (T * (-1 + 2 * I ** 2) - z / 6 * I * (-3 + 4 * E ** 2) * (-3 + 4 * I ** 2))), Z = be * D * (M - U), R = Math.atan2(
9822
+ y * Math.sin(v),
9823
+ g * m - p * y * Math.cos(v)
9828
9824
  );
9829
9825
  return {
9830
9826
  distanceMeters: Z,
9831
9827
  bearingRad: R,
9832
- iterations: v,
9828
+ iterations: b,
9833
9829
  converged: !0
9834
9830
  };
9835
9831
  }
9836
9832
  function Yh(l, o, e, r) {
9837
- const i = Le(l), a = Le(e), s = Le(r - o), c = Math.atan((1 - oe) * Math.tan(i)), d = Math.atan((1 - oe) * Math.tan(a)), p = Math.sin(c), g = Math.cos(c), m = Math.sin(d), y = Math.cos(d), b = Math.sqrt(
9833
+ const i = Le(l), a = Le(e), s = Le(r - o), c = Math.atan((1 - oe) * Math.tan(i)), d = Math.atan((1 - oe) * Math.tan(a)), p = Math.sin(c), g = Math.cos(c), m = Math.sin(d), y = Math.cos(d), v = Math.sqrt(
9838
9834
  (y * Math.sin(s)) ** 2 + (g * m - p * y * Math.cos(s)) ** 2
9839
- ), k = p * m + g * y * Math.cos(s), v = Math.atan2(b, k);
9840
- if (v === 0)
9835
+ ), x = p * m + g * y * Math.cos(s), b = Math.atan2(v, x);
9836
+ if (b === 0)
9841
9837
  return { distanceMeters: 0, bearingRad: 0 };
9842
- const E = 1 - (g * y * Math.sin(s) / Math.sin(v)) ** 2, T = E === 0 ? 0 : k - 2 * p * m / E, A = (va ** 2 - be ** 2) / be ** 2 * E, S = 1 + A / 16384 * (4096 + A * (-768 + A * (320 - 175 * A))), I = A / 1024 * (256 + A * (-128 + A * (74 - 47 * A))), O = I * b * (T + I / 4 * (k * (-1 + 2 * T ** 2) - I / 6 * T * (-3 + 4 * b ** 2) * (-3 + 4 * T ** 2))), B = be * S * (v - O), D = Math.atan2(
9838
+ const E = 1 - (g * y * Math.sin(s) / Math.sin(b)) ** 2, T = E === 0 ? 0 : x - 2 * p * m / E, M = (va ** 2 - be ** 2) / be ** 2 * E, S = 1 + M / 16384 * (4096 + M * (-768 + M * (320 - 175 * M))), I = M / 1024 * (256 + M * (-128 + M * (74 - 47 * M))), O = I * v * (T + I / 4 * (x * (-1 + 2 * T ** 2) - I / 6 * T * (-3 + 4 * v ** 2) * (-3 + 4 * T ** 2))), D = be * S * (b - O), z = Math.atan2(
9843
9839
  y * Math.sin(s),
9844
9840
  g * m - p * y * Math.cos(s)
9845
9841
  );
9846
- return { distanceMeters: B, bearingRad: D };
9842
+ return { distanceMeters: D, bearingRad: z };
9847
9843
  }
9848
9844
  const ie = (l) => l !== null && typeof l == "object" && !Array.isArray(l), Cr = (l) => JSON.parse(JSON.stringify(l));
9849
9845
  function Ci(l) {
9850
9846
  const o = [];
9851
9847
  let e = 0;
9852
- const r = /* @__PURE__ */ new Set(), i = (v, x, E, T = "error") => {
9853
- o.push({ code: v, path: x, message: E, severity: T });
9854
- }, a = (v, x) => {
9855
- "crs" in v && i(
9848
+ const r = /* @__PURE__ */ new Set(), i = (w, E, T, M = "error") => {
9849
+ o.push({ code: w, path: E, message: T, severity: M });
9850
+ }, a = (w, E) => {
9851
+ "crs" in w && i(
9856
9852
  "crs-mismatch",
9857
- `${x}.crs`,
9853
+ `${E}.crs`,
9858
9854
  "RFC 7946 uses WGS84 longitude/latitude; legacy CRS is not reprojected.",
9859
9855
  "warning"
9860
9856
  );
9861
- }, s = (v, x) => {
9862
- if (Array.isArray(v) && v.length === 0 && i("empty-geometry", x, "Point has no coordinates."), !Array.isArray(v) || v.length < 2 || !v.every((E) => typeof E == "number" && Number.isFinite(E))) {
9857
+ }, s = (w, E) => {
9858
+ if (Array.isArray(w) && w.length === 0 && i("empty-geometry", E, "Point has no coordinates."), !Array.isArray(w) || w.length < 2 || !w.every((T) => typeof T == "number" && Number.isFinite(T))) {
9863
9859
  i(
9864
9860
  "invalid-position",
9865
- x,
9861
+ E,
9866
9862
  "Expected at least two finite ordinates."
9867
9863
  );
9868
9864
  return;
9869
9865
  }
9870
- (Math.abs(v[0]) > 180 || Math.abs(v[1]) > 90) && i(
9866
+ (Math.abs(w[0]) > 180 || Math.abs(w[1]) > 90) && i(
9871
9867
  "crs-mismatch",
9872
- x,
9868
+ E,
9873
9869
  "Position outside WGS84 longitude/latitude range.",
9874
9870
  "warning"
9875
9871
  );
9876
- }, c = (v, x, E) => {
9877
- if (!Array.isArray(v) || v.length === 0) {
9872
+ }, c = (w, E, T) => {
9873
+ if (!Array.isArray(w) || w.length === 0) {
9878
9874
  i(
9879
9875
  "empty-geometry",
9880
- x,
9876
+ E,
9881
9877
  "Expected a non-empty coordinate/geometry array."
9882
9878
  );
9883
9879
  return;
9884
9880
  }
9885
- v.forEach((T, A) => E(T, `${x}[${A}]`));
9886
- }, d = (v, x) => {
9887
- c(v, x, s), Array.isArray(v) && v.length < 2 && i(
9881
+ w.forEach((M, S) => T(M, `${E}[${S}]`));
9882
+ }, d = (w, E) => {
9883
+ c(w, E, s), Array.isArray(w) && w.length < 2 && i(
9888
9884
  "invalid-line",
9889
- x,
9885
+ E,
9890
9886
  "LineString requires at least two positions."
9891
9887
  );
9892
- }, p = (v, x) => {
9893
- c(v, x, s);
9894
- const E = Array.isArray(v) ? v[0] : void 0, T = Array.isArray(v) ? v[v.length - 1] : void 0, A = Array.isArray(E) && Array.isArray(T) && E.length === T.length && E.every((S, I) => S === T[I]);
9895
- Array.isArray(v) && (v.length < 4 || !A) && i(
9888
+ }, p = (w, E) => {
9889
+ c(w, E, s);
9890
+ const T = Array.isArray(w) ? w[0] : void 0, M = Array.isArray(w) ? w[w.length - 1] : void 0, S = Array.isArray(T) && Array.isArray(M) && T.length === M.length && T.every((I, O) => I === M[O]);
9891
+ Array.isArray(w) && (w.length < 4 || !S) && i(
9896
9892
  "invalid-ring",
9897
- x,
9893
+ E,
9898
9894
  "Linear rings require four positions and exact closure."
9899
9895
  );
9900
- }, g = (v, x) => c(v, x, p), m = (v, x, E) => {
9901
- if (E > 64) {
9902
- i("nesting-limit", x, "Geometry nesting exceeds 64.");
9896
+ }, g = (w, E) => c(w, E, p), m = (w, E, T) => {
9897
+ if (T > 64) {
9898
+ i("nesting-limit", E, "Geometry nesting exceeds 64.");
9903
9899
  return;
9904
9900
  }
9905
- if (!ie(v)) {
9906
- i("empty-geometry", x, "Missing or null geometry.");
9901
+ if (!ie(w)) {
9902
+ i("empty-geometry", E, "Missing or null geometry.");
9907
9903
  return;
9908
9904
  }
9909
- a(v, x);
9910
- const T = `${x}.coordinates`;
9911
- switch (v.type) {
9905
+ a(w, E);
9906
+ const M = `${E}.coordinates`;
9907
+ switch (w.type) {
9912
9908
  case "Point":
9913
- s(v.coordinates, T);
9909
+ s(w.coordinates, M);
9914
9910
  break;
9915
9911
  case "LineString":
9916
- d(v.coordinates, T);
9912
+ d(w.coordinates, M);
9917
9913
  break;
9918
9914
  case "Polygon":
9919
- g(v.coordinates, T);
9915
+ g(w.coordinates, M);
9920
9916
  break;
9921
9917
  case "MultiPoint":
9922
- c(v.coordinates, T, s);
9918
+ c(w.coordinates, M, s);
9923
9919
  break;
9924
9920
  case "MultiLineString":
9925
- c(v.coordinates, T, d);
9921
+ c(w.coordinates, M, d);
9926
9922
  break;
9927
9923
  case "MultiPolygon":
9928
- c(v.coordinates, T, g);
9924
+ c(w.coordinates, M, g);
9929
9925
  break;
9930
9926
  case "GeometryCollection":
9931
9927
  c(
9932
- v.geometries,
9933
- `${x}.geometries`,
9934
- (A, S) => m(A, S, E + 1)
9928
+ w.geometries,
9929
+ `${E}.geometries`,
9930
+ (S, I) => m(S, I, T + 1)
9935
9931
  );
9936
9932
  break;
9937
9933
  default:
9938
9934
  i(
9939
9935
  "unsupported-geometry",
9940
- x,
9941
- `Unsupported geometry: ${typeof v.type == "string" ? v.type : "missing or non-string type"}.`
9936
+ E,
9937
+ `Unsupported geometry: ${typeof w.type == "string" ? w.type : "missing or non-string type"}.`
9942
9938
  );
9943
9939
  }
9944
- typeof v.type == "string" && (v.type.startsWith("Multi") || v.type === "GeometryCollection") && i(
9940
+ typeof w.type == "string" && (w.type.startsWith("Multi") || w.type === "GeometryCollection") && i(
9945
9941
  "multi-expansion",
9946
- x,
9942
+ E,
9947
9943
  "Editing adapters expand this geometry into single-geometry features.",
9948
9944
  "info"
9949
9945
  );
9950
- }, y = (v, x) => {
9951
- var A;
9952
- if (e++, !ie(v) || v.type !== "Feature") {
9953
- i("invalid-feature", x, "Expected a Feature.");
9946
+ }, y = (w, E) => {
9947
+ var S;
9948
+ if (e++, !ie(w) || w.type !== "Feature") {
9949
+ i("invalid-feature", E, "Expected a Feature.");
9954
9950
  return;
9955
9951
  }
9956
- if (a(v, x), v.properties === null || ie(v.properties) || i(
9952
+ if (a(w, E), w.properties === null || ie(w.properties) || i(
9957
9953
  "invalid-properties",
9958
- `${x}.properties`,
9954
+ `${E}.properties`,
9959
9955
  "Expected an object or null."
9960
- ), ie(v.properties)) {
9961
- const S = v.properties.id;
9962
- v.id === void 0 && S !== void 0 && !(typeof S == "string" && S.length > 0) && !(typeof S == "number" && Number.isFinite(S)) && i(
9956
+ ), ie(w.properties)) {
9957
+ const I = w.properties.id;
9958
+ w.id === void 0 && I !== void 0 && !(typeof I == "string" && I.length > 0) && !(typeof I == "number" && Number.isFinite(I)) && i(
9963
9959
  "invalid-id",
9964
- `${x}.properties.id`,
9960
+ `${E}.properties.id`,
9965
9961
  "Fallback ID must be a non-empty string or finite number."
9966
9962
  );
9967
- const I = v.properties["geokit:source"];
9968
- I !== void 0 && (!Array.isArray(I) || I.length === 0 || I.length > 64 || !I.every(
9969
- (O) => ie(O) && typeof O.type == "string" && [
9963
+ const O = w.properties["geokit:source"];
9964
+ O !== void 0 && (!Array.isArray(O) || O.length === 0 || O.length > 64 || !O.every(
9965
+ (D) => ie(D) && typeof D.type == "string" && [
9970
9966
  "MultiPoint",
9971
9967
  "MultiLineString",
9972
9968
  "MultiPolygon",
9973
9969
  "GeometryCollection"
9974
- ].includes(O.type) && (typeof O.id == "string" || typeof O.id == "number") && typeof O.hasPropertyId == "boolean" && typeof O.nullProperties == "boolean"
9970
+ ].includes(D.type) && (typeof D.id == "string" || typeof D.id == "number") && typeof D.hasPropertyId == "boolean" && typeof D.nullProperties == "boolean"
9975
9971
  )) && i(
9976
9972
  "invalid-provenance",
9977
- `${x}.properties.geokit:source`,
9973
+ `${E}.properties.geokit:source`,
9978
9974
  "Reserved expansion provenance is malformed."
9979
9975
  );
9980
9976
  }
9981
- v.id !== void 0 && !(typeof v.id == "string" && v.id.length > 0) && !(typeof v.id == "number" && Number.isFinite(v.id)) && i(
9977
+ w.id !== void 0 && !(typeof w.id == "string" && w.id.length > 0) && !(typeof w.id == "number" && Number.isFinite(w.id)) && i(
9982
9978
  "invalid-id",
9983
- `${x}.id`,
9979
+ `${E}.id`,
9984
9980
  "Feature ID must be a non-empty string or finite number."
9985
9981
  );
9986
- const E = (A = v.id) != null ? A : ie(v.properties) ? v.properties.id : void 0, T = typeof E == "string" || typeof E == "number" ? String(E) : void 0;
9987
- T !== void 0 && (r.has(T) && i("duplicate-id", `${x}.id`, `Duplicate feature ID: ${T}.`), r.add(T)), m(v.geometry, `${x}.geometry`, 0);
9988
- }, b = /* @__PURE__ */ new Set(), k = (v, x, E) => {
9989
- if (E > 128) {
9990
- i("nesting-limit", x, "JSON nesting exceeds 128.");
9982
+ const T = (S = w.id) != null ? S : ie(w.properties) ? w.properties.id : void 0, M = typeof T == "string" || typeof T == "number" ? String(T) : void 0;
9983
+ M !== void 0 && (r.has(M) && i("duplicate-id", `${E}.id`, `Duplicate feature ID: ${M}.`), r.add(M)), m(w.geometry, `${E}.geometry`, 0);
9984
+ }, v = /* @__PURE__ */ new Set();
9985
+ let x = !1;
9986
+ const b = (w, E, T) => {
9987
+ if (T > 128) {
9988
+ x = !0, i("nesting-limit", E, "JSON nesting exceeds 128.");
9991
9989
  return;
9992
9990
  }
9993
- if (!(v === null || typeof v == "string" || typeof v == "boolean") && !(typeof v == "number" && Number.isFinite(v))) {
9994
- if (typeof v != "object" || v === null || b.has(v)) {
9995
- i("invalid-json", x, "Expected finite, acyclic JSON values.");
9991
+ if (!(w === null || typeof w == "string" || typeof w == "boolean") && !(typeof w == "number" && Number.isFinite(w))) {
9992
+ if (typeof w != "object" || w === null || v.has(w)) {
9993
+ typeof w == "object" && w !== null && v.has(w) && (x = !0), i("invalid-json", E, "Expected finite, acyclic JSON values.");
9996
9994
  return;
9997
9995
  }
9998
- if (!Array.isArray(v) && Object.getPrototypeOf(v) !== Object.prototype && Object.getPrototypeOf(v) !== null) {
9999
- i("invalid-json", x, "Expected a plain JSON object.");
9996
+ if (!Array.isArray(w) && Object.getPrototypeOf(w) !== Object.prototype && Object.getPrototypeOf(w) !== null) {
9997
+ i("invalid-json", E, "Expected a plain JSON object.");
10000
9998
  return;
10001
9999
  }
10002
- if (b.add(v), Array.isArray(v))
10003
- for (let T = 0; T < v.length; T++)
10004
- k(v[T], `${x}[${T}]`, E + 1);
10000
+ if (v.add(w), Array.isArray(w))
10001
+ for (let M = 0; M < w.length; M++)
10002
+ b(w[M], `${E}[${M}]`, T + 1);
10005
10003
  else
10006
- Object.entries(v).forEach(
10007
- ([T, A]) => k(A, `${x}.${T}`, E + 1)
10004
+ Object.entries(w).forEach(
10005
+ ([M, S]) => b(S, `${E}.${M}`, T + 1)
10008
10006
  );
10009
- b.delete(v);
10007
+ v.delete(w);
10010
10008
  }
10011
10009
  };
10012
- return k(l, "$", 0), ie(l) ? l.type === "FeatureCollection" ? (a(l, "$"), Array.isArray(l.features) ? l.features.forEach((v, x) => y(v, `$.features[${x}]`)) : i("invalid-collection", "$.features", "Expected a features array.")) : l.type === "Feature" ? y(l, "$") : (e = 1, m(l, "$", 0)) : i("invalid-input", "$", "Expected a GeoJSON object."), {
10013
- valid: !o.some((v) => v.severity === "error"),
10010
+ return b(l, "$", 0), x ? { valid: !1, featureCount: e, diagnostics: o } : (ie(l) ? l.type === "FeatureCollection" ? (a(l, "$"), Array.isArray(l.features) ? l.features.forEach((w, E) => y(w, `$.features[${E}]`)) : i("invalid-collection", "$.features", "Expected a features array.")) : l.type === "Feature" ? y(l, "$") : (e = 1, m(l, "$", 0)) : i("invalid-input", "$", "Expected a GeoJSON object."), {
10011
+ valid: !o.some((w) => w.severity === "error"),
10014
10012
  featureCount: e,
10015
10013
  diagnostics: o
10016
- };
10014
+ });
10017
10015
  }
10018
10016
  class Jo extends Error {
10019
- constructor(o) {
10020
- super("GeoJSON validation failed"), this.summary = o, this.name = "GeoJSONValidationError";
10017
+ constructor(e) {
10018
+ super("GeoJSON validation failed");
10019
+ P(this, "summary");
10020
+ this.summary = e, this.name = "GeoJSONValidationError";
10021
10021
  }
10022
10022
  }
10023
10023
  function Wo(l, o = {}) {
@@ -10420,67 +10420,67 @@ function Ta(l, o, e, r, i = {}, a) {
10420
10420
  if (!Number.isFinite(c) || c <= 0) return null;
10421
10421
  const d = e(l);
10422
10422
  let p = null;
10423
- const g = (b, k, v = {}, x) => {
10424
- const E = oc(d, b);
10423
+ const g = (v, x, b = {}, w) => {
10424
+ const E = oc(d, v);
10425
10425
  if (E > c) return;
10426
- const T = s.indexOf(k), A = p ? s.indexOf(p.mode) : Number.MAX_SAFE_INTEGER;
10427
- p && (E > p.distancePx + 1e-3 || E >= p.distancePx - 1e-3 && T > A) || (p = {
10428
- latlng: x != null ? x : r(b),
10429
- point: b,
10426
+ const T = s.indexOf(x), M = p ? s.indexOf(p.mode) : Number.MAX_SAFE_INTEGER;
10427
+ p && (E > p.distancePx + 1e-3 || E >= p.distancePx - 1e-3 && T > M) || (p = {
10428
+ latlng: w != null ? w : r(v),
10429
+ point: v,
10430
10430
  distancePx: E,
10431
- mode: k,
10432
- ...v
10431
+ mode: x,
10432
+ ...b
10433
10433
  });
10434
10434
  };
10435
- for (const b of o) {
10436
- if (!b.visible || b.layerKind === "measurement" || b.featureId === a)
10435
+ for (const v of o) {
10436
+ if (!v.visible || v.layerKind === "measurement" || v.featureId === a)
10437
10437
  continue;
10438
- const k = b.layerKind === "guide" ? s.includes("guide") ? ["guide"] : [] : s.filter(
10439
- (v) => v === "vertex" || v === "edge"
10438
+ const x = v.layerKind === "guide" ? s.includes("guide") ? ["guide"] : [] : s.filter(
10439
+ (b) => b === "vertex" || b === "edge"
10440
10440
  );
10441
- for (const v of k)
10442
- v === "vertex" ? Aa(b.feature.geometry, (x) => {
10443
- const E = Ao(x);
10441
+ for (const b of x)
10442
+ b === "vertex" ? Aa(v.feature.geometry, (w) => {
10443
+ const E = Ao(w);
10444
10444
  E && g(
10445
10445
  e({ lng: E[0], lat: E[1] }),
10446
- v,
10446
+ b,
10447
10447
  {
10448
- targetFeatureId: b.featureId,
10449
- targetLayerId: b.layerId
10448
+ targetFeatureId: v.featureId,
10449
+ targetLayerId: v.layerId
10450
10450
  },
10451
10451
  { lng: E[0], lat: E[1] }
10452
10452
  );
10453
- }) : Ma(b.feature.geometry, (x) => {
10454
- for (let E = 1; E < x.length; E++) {
10455
- const T = Ao(x[E - 1]), A = Ao(x[E]);
10456
- if (!T || !A) continue;
10457
- const S = e({ lng: T[0], lat: T[1] }), I = e({ lng: A[0], lat: A[1] }), O = nc(d, S, I), B = (I.x - S.x) ** 2 + (I.y - S.y) ** 2, D = B === 0 ? 0 : Math.max(
10453
+ }) : Ma(v.feature.geometry, (w) => {
10454
+ for (let E = 1; E < w.length; E++) {
10455
+ const T = Ao(w[E - 1]), M = Ao(w[E]);
10456
+ if (!T || !M) continue;
10457
+ const S = e({ lng: T[0], lat: T[1] }), I = e({ lng: M[0], lat: M[1] }), O = nc(d, S, I), D = (I.x - S.x) ** 2 + (I.y - S.y) ** 2, z = D === 0 ? 0 : Math.max(
10458
10458
  0,
10459
10459
  Math.min(
10460
10460
  1,
10461
- ((O.x - S.x) * (I.x - S.x) + (O.y - S.y) * (I.y - S.y)) / B
10461
+ ((O.x - S.x) * (I.x - S.x) + (O.y - S.y) * (I.y - S.y)) / D
10462
10462
  )
10463
10463
  );
10464
10464
  g(
10465
10465
  O,
10466
- v,
10466
+ b,
10467
10467
  {
10468
- targetFeatureId: b.featureId,
10469
- targetLayerId: b.layerId
10468
+ targetFeatureId: v.featureId,
10469
+ targetLayerId: v.layerId
10470
10470
  },
10471
10471
  {
10472
- lng: T[0] + (A[0] - T[0]) * D,
10473
- lat: T[1] + (A[1] - T[1]) * D
10472
+ lng: T[0] + (M[0] - T[0]) * z,
10473
+ lat: T[1] + (M[1] - T[1]) * z
10474
10474
  }
10475
10475
  );
10476
10476
  }
10477
10477
  });
10478
10478
  }
10479
10479
  if (s.includes("grid") && Number.isFinite(i.gridSizeMeters) && ((y = i.gridSizeMeters) != null ? y : 0) > 0) {
10480
- const b = hc(l, i);
10481
- if (b) {
10482
- const k = e(b);
10483
- g(k, "grid", {}, b);
10480
+ const v = hc(l, i);
10481
+ if (v) {
10482
+ const x = e(v);
10483
+ g(x, "grid", {}, v);
10484
10484
  }
10485
10485
  }
10486
10486
  return p;
@@ -10543,30 +10543,30 @@ function Or(l) {
10543
10543
  return !isNaN(l) && l !== null && !Array.isArray(l);
10544
10544
  }
10545
10545
  function Ca(l, o) {
10546
- var e, r, i, a, s, c, d, p, g, m, y = 0, b = l.type === "FeatureCollection", k = l.type === "Feature", v = b ? l.features.length : 1;
10547
- for (e = 0; e < v; e++) {
10548
- for (c = b ? (
10546
+ var e, r, i, a, s, c, d, p, g, m, y = 0, v = l.type === "FeatureCollection", x = l.type === "Feature", b = v ? l.features.length : 1;
10547
+ for (e = 0; e < b; e++) {
10548
+ for (c = v ? (
10549
10549
  // @ts-expect-error: Known type conflict
10550
10550
  l.features[e].geometry
10551
- ) : k ? (
10551
+ ) : x ? (
10552
10552
  // @ts-expect-error: Known type conflict
10553
10553
  l.geometry
10554
- ) : l, p = b ? (
10554
+ ) : l, p = v ? (
10555
10555
  // @ts-expect-error: Known type conflict
10556
10556
  l.features[e].properties
10557
- ) : k ? (
10557
+ ) : x ? (
10558
10558
  // @ts-expect-error: Known type conflict
10559
10559
  l.properties
10560
- ) : {}, g = b ? (
10560
+ ) : {}, g = v ? (
10561
10561
  // @ts-expect-error: Known type conflict
10562
10562
  l.features[e].bbox
10563
- ) : k ? (
10563
+ ) : x ? (
10564
10564
  // @ts-expect-error: Known type conflict
10565
10565
  l.bbox
10566
- ) : void 0, m = b ? (
10566
+ ) : void 0, m = v ? (
10567
10567
  // @ts-expect-error: Known type conflict
10568
10568
  l.features[e].id
10569
- ) : k ? (
10569
+ ) : x ? (
10570
10570
  // @ts-expect-error: Known type conflict
10571
10571
  l.id
10572
10572
  ) : void 0, d = c ? c.type === "GeometryCollection" : !1, s = d ? c.geometries.length : 1, i = 0; i < s; i++) {
@@ -10770,15 +10770,15 @@ const Zt = 11102230246251565e-32, pt = 134217729, gc = (3 + 8 * Zt) * Zt;
10770
10770
  function Co(l, o, e, r, i) {
10771
10771
  let a, s, c, d, p = o[0], g = r[0], m = 0, y = 0;
10772
10772
  g > p == g > -p ? (a = p, p = o[++m]) : (a = g, g = r[++y]);
10773
- let b = 0;
10773
+ let v = 0;
10774
10774
  if (m < l && y < e)
10775
- for (g > p == g > -p ? (s = p + a, c = a - (s - p), p = o[++m]) : (s = g + a, c = a - (s - g), g = r[++y]), a = s, c !== 0 && (i[b++] = c); m < l && y < e; )
10776
- g > p == g > -p ? (s = a + p, d = s - a, c = a - (s - d) + (p - d), p = o[++m]) : (s = a + g, d = s - a, c = a - (s - d) + (g - d), g = r[++y]), a = s, c !== 0 && (i[b++] = c);
10775
+ for (g > p == g > -p ? (s = p + a, c = a - (s - p), p = o[++m]) : (s = g + a, c = a - (s - g), g = r[++y]), a = s, c !== 0 && (i[v++] = c); m < l && y < e; )
10776
+ g > p == g > -p ? (s = a + p, d = s - a, c = a - (s - d) + (p - d), p = o[++m]) : (s = a + g, d = s - a, c = a - (s - d) + (g - d), g = r[++y]), a = s, c !== 0 && (i[v++] = c);
10777
10777
  for (; m < l; )
10778
- s = a + p, d = s - a, c = a - (s - d) + (p - d), p = o[++m], a = s, c !== 0 && (i[b++] = c);
10778
+ s = a + p, d = s - a, c = a - (s - d) + (p - d), p = o[++m], a = s, c !== 0 && (i[v++] = c);
10779
10779
  for (; y < e; )
10780
- s = a + g, d = s - a, c = a - (s - d) + (g - d), g = r[++y], a = s, c !== 0 && (i[b++] = c);
10781
- return (a !== 0 || b === 0) && (i[b++] = a), b;
10780
+ s = a + g, d = s - a, c = a - (s - d) + (g - d), g = r[++y], a = s, c !== 0 && (i[v++] = c);
10781
+ return (a !== 0 || v === 0) && (i[v++] = a), v;
10782
10782
  }
10783
10783
  function _c(l, o) {
10784
10784
  let e = o[0];
@@ -10790,16 +10790,16 @@ function Xe(l) {
10790
10790
  }
10791
10791
  const yc = (3 + 16 * Zt) * Zt, vc = (2 + 12 * Zt) * Zt, bc = (9 + 64 * Zt) * Zt * Zt, ge = Xe(4), Rr = Xe(8), Nr = Xe(12), Ur = Xe(16), _t = Xe(4);
10792
10792
  function Lc(l, o, e, r, i, a, s) {
10793
- let c, d, p, g, m, y, b, k, v, x, E, T, A, S, I, O, B, D;
10793
+ let c, d, p, g, m, y, v, x, b, w, E, T, M, S, I, O, D, z;
10794
10794
  const U = l - i, Z = e - i, R = o - a, G = r - a;
10795
- S = U * G, y = pt * U, b = y - (y - U), k = U - b, y = pt * G, v = y - (y - G), x = G - v, I = k * x - (S - b * v - k * v - b * x), O = R * Z, y = pt * R, b = y - (y - R), k = R - b, y = pt * Z, v = y - (y - Z), x = Z - v, B = k * x - (O - b * v - k * v - b * x), E = I - B, m = I - E, ge[0] = I - (E + m) + (m - B), T = S + E, m = T - S, A = S - (T - m) + (E - m), E = A - O, m = A - E, ge[1] = A - (E + m) + (m - O), D = T + E, m = D - T, ge[2] = T - (D - m) + (E - m), ge[3] = D;
10795
+ S = U * G, y = pt * U, v = y - (y - U), x = U - v, y = pt * G, b = y - (y - G), w = G - b, I = x * w - (S - v * b - x * b - v * w), O = R * Z, y = pt * R, v = y - (y - R), x = R - v, y = pt * Z, b = y - (y - Z), w = Z - b, D = x * w - (O - v * b - x * b - v * w), E = I - D, m = I - E, ge[0] = I - (E + m) + (m - D), T = S + E, m = T - S, M = S - (T - m) + (E - m), E = M - O, m = M - E, ge[1] = M - (E + m) + (m - O), z = T + E, m = z - T, ge[2] = T - (z - m) + (E - m), ge[3] = z;
10796
10796
  let W = _c(4, ge), K = vc * s;
10797
10797
  if (W >= K || -W >= K || (m = l - U, c = l - (U + m) + (m - i), m = e - Z, p = e - (Z + m) + (m - i), m = o - R, d = o - (R + m) + (m - a), m = r - G, g = r - (G + m) + (m - a), c === 0 && d === 0 && p === 0 && g === 0) || (K = bc * s + gc * Math.abs(W), W += U * g + G * c - (R * p + Z * d), W >= K || -W >= K)) return W;
10798
- S = c * G, y = pt * c, b = y - (y - c), k = c - b, y = pt * G, v = y - (y - G), x = G - v, I = k * x - (S - b * v - k * v - b * x), O = d * Z, y = pt * d, b = y - (y - d), k = d - b, y = pt * Z, v = y - (y - Z), x = Z - v, B = k * x - (O - b * v - k * v - b * x), E = I - B, m = I - E, _t[0] = I - (E + m) + (m - B), T = S + E, m = T - S, A = S - (T - m) + (E - m), E = A - O, m = A - E, _t[1] = A - (E + m) + (m - O), D = T + E, m = D - T, _t[2] = T - (D - m) + (E - m), _t[3] = D;
10798
+ S = c * G, y = pt * c, v = y - (y - c), x = c - v, y = pt * G, b = y - (y - G), w = G - b, I = x * w - (S - v * b - x * b - v * w), O = d * Z, y = pt * d, v = y - (y - d), x = d - v, y = pt * Z, b = y - (y - Z), w = Z - b, D = x * w - (O - v * b - x * b - v * w), E = I - D, m = I - E, _t[0] = I - (E + m) + (m - D), T = S + E, m = T - S, M = S - (T - m) + (E - m), E = M - O, m = M - E, _t[1] = M - (E + m) + (m - O), z = T + E, m = z - T, _t[2] = T - (z - m) + (E - m), _t[3] = z;
10799
10799
  const vt = Co(4, ge, 4, _t, Rr);
10800
- S = U * g, y = pt * U, b = y - (y - U), k = U - b, y = pt * g, v = y - (y - g), x = g - v, I = k * x - (S - b * v - k * v - b * x), O = R * p, y = pt * R, b = y - (y - R), k = R - b, y = pt * p, v = y - (y - p), x = p - v, B = k * x - (O - b * v - k * v - b * x), E = I - B, m = I - E, _t[0] = I - (E + m) + (m - B), T = S + E, m = T - S, A = S - (T - m) + (E - m), E = A - O, m = A - E, _t[1] = A - (E + m) + (m - O), D = T + E, m = D - T, _t[2] = T - (D - m) + (E - m), _t[3] = D;
10800
+ S = U * g, y = pt * U, v = y - (y - U), x = U - v, y = pt * g, b = y - (y - g), w = g - b, I = x * w - (S - v * b - x * b - v * w), O = R * p, y = pt * R, v = y - (y - R), x = R - v, y = pt * p, b = y - (y - p), w = p - b, D = x * w - (O - v * b - x * b - v * w), E = I - D, m = I - E, _t[0] = I - (E + m) + (m - D), T = S + E, m = T - S, M = S - (T - m) + (E - m), E = M - O, m = M - E, _t[1] = M - (E + m) + (m - O), z = T + E, m = z - T, _t[2] = T - (z - m) + (E - m), _t[3] = z;
10801
10801
  const at = Co(vt, Rr, 4, _t, Nr);
10802
- S = c * g, y = pt * c, b = y - (y - c), k = c - b, y = pt * g, v = y - (y - g), x = g - v, I = k * x - (S - b * v - k * v - b * x), O = d * p, y = pt * d, b = y - (y - d), k = d - b, y = pt * p, v = y - (y - p), x = p - v, B = k * x - (O - b * v - k * v - b * x), E = I - B, m = I - E, _t[0] = I - (E + m) + (m - B), T = S + E, m = T - S, A = S - (T - m) + (E - m), E = A - O, m = A - E, _t[1] = A - (E + m) + (m - O), D = T + E, m = D - T, _t[2] = T - (D - m) + (E - m), _t[3] = D;
10802
+ S = c * g, y = pt * c, v = y - (y - c), x = c - v, y = pt * g, b = y - (y - g), w = g - b, I = x * w - (S - v * b - x * b - v * w), O = d * p, y = pt * d, v = y - (y - d), x = d - v, y = pt * p, b = y - (y - p), w = p - b, D = x * w - (O - v * b - x * b - v * w), E = I - D, m = I - E, _t[0] = I - (E + m) + (m - D), T = S + E, m = T - S, M = S - (T - m) + (E - m), E = M - O, m = M - E, _t[1] = M - (E + m) + (m - O), z = T + E, m = z - T, _t[2] = T - (z - m) + (E - m), _t[3] = z;
10803
10803
  const Dt = Co(at, Nr, 4, _t, Ur);
10804
10804
  return Ur[Dt - 1];
10805
10805
  }
@@ -10808,14 +10808,14 @@ function wc(l, o, e, r, i, a) {
10808
10808
  return Math.abs(d) >= yc * p ? d : -Lc(l, o, e, r, i, a, p);
10809
10809
  }
10810
10810
  function kc(l, o) {
10811
- var e, r, i = 0, a, s, c, d, p, g, m, y = l[0], b = l[1], k = o.length;
10812
- for (e = 0; e < k; e++) {
10811
+ var e, r, i = 0, a, s, c, d, p, g, m, y = l[0], v = l[1], x = o.length;
10812
+ for (e = 0; e < x; e++) {
10813
10813
  r = 0;
10814
- var v = o[e], x = v.length - 1;
10815
- if (g = v[0], g[0] !== v[x][0] && g[1] !== v[x][1])
10814
+ var b = o[e], w = b.length - 1;
10815
+ if (g = b[0], g[0] !== b[w][0] && g[1] !== b[w][1])
10816
10816
  throw new Error("First and last coordinates in a ring must be the same");
10817
- for (s = g[0] - y, c = g[1] - b, r; r < x; r++) {
10818
- if (m = v[r + 1], d = m[0] - y, p = m[1] - b, c === 0 && p === 0) {
10817
+ for (s = g[0] - y, c = g[1] - v, r; r < w; r++) {
10818
+ if (m = b[r + 1], d = m[0] - y, p = m[1] - v, c === 0 && p === 0) {
10819
10819
  if (d <= 0 && s >= 0 || s <= 0 && d >= 0)
10820
10820
  return 0;
10821
10821
  } else if (p >= 0 && c <= 0 || p <= 0 && c >= 0) {
@@ -10891,15 +10891,15 @@ const Ht = 11102230246251565e-32, mt = 134217729, Mc = (3 + 8 * Ht) * Ht;
10891
10891
  function Po(l, o, e, r, i) {
10892
10892
  let a, s, c, d, p = o[0], g = r[0], m = 0, y = 0;
10893
10893
  g > p == g > -p ? (a = p, p = o[++m]) : (a = g, g = r[++y]);
10894
- let b = 0;
10894
+ let v = 0;
10895
10895
  if (m < l && y < e)
10896
- for (g > p == g > -p ? (s = p + a, c = a - (s - p), p = o[++m]) : (s = g + a, c = a - (s - g), g = r[++y]), a = s, c !== 0 && (i[b++] = c); m < l && y < e; )
10897
- g > p == g > -p ? (s = a + p, d = s - a, c = a - (s - d) + (p - d), p = o[++m]) : (s = a + g, d = s - a, c = a - (s - d) + (g - d), g = r[++y]), a = s, c !== 0 && (i[b++] = c);
10896
+ for (g > p == g > -p ? (s = p + a, c = a - (s - p), p = o[++m]) : (s = g + a, c = a - (s - g), g = r[++y]), a = s, c !== 0 && (i[v++] = c); m < l && y < e; )
10897
+ g > p == g > -p ? (s = a + p, d = s - a, c = a - (s - d) + (p - d), p = o[++m]) : (s = a + g, d = s - a, c = a - (s - d) + (g - d), g = r[++y]), a = s, c !== 0 && (i[v++] = c);
10898
10898
  for (; m < l; )
10899
- s = a + p, d = s - a, c = a - (s - d) + (p - d), p = o[++m], a = s, c !== 0 && (i[b++] = c);
10899
+ s = a + p, d = s - a, c = a - (s - d) + (p - d), p = o[++m], a = s, c !== 0 && (i[v++] = c);
10900
10900
  for (; y < e; )
10901
- s = a + g, d = s - a, c = a - (s - d) + (g - d), g = r[++y], a = s, c !== 0 && (i[b++] = c);
10902
- return (a !== 0 || b === 0) && (i[b++] = a), b;
10901
+ s = a + g, d = s - a, c = a - (s - d) + (g - d), g = r[++y], a = s, c !== 0 && (i[v++] = c);
10902
+ return (a !== 0 || v === 0) && (i[v++] = a), v;
10903
10903
  }
10904
10904
  function Ac(l, o) {
10905
10905
  let e = o[0];
@@ -10911,16 +10911,16 @@ function Qe(l) {
10911
10911
  }
10912
10912
  const Tc = (3 + 16 * Ht) * Ht, Cc = (2 + 12 * Ht) * Ht, Pc = (9 + 64 * Ht) * Ht * Ht, _e = Qe(4), Fr = Qe(8), Gr = Qe(12), Zr = Qe(16), yt = Qe(4);
10913
10913
  function Sc(l, o, e, r, i, a, s) {
10914
- let c, d, p, g, m, y, b, k, v, x, E, T, A, S, I, O, B, D;
10914
+ let c, d, p, g, m, y, v, x, b, w, E, T, M, S, I, O, D, z;
10915
10915
  const U = l - i, Z = e - i, R = o - a, G = r - a;
10916
- S = U * G, y = mt * U, b = y - (y - U), k = U - b, y = mt * G, v = y - (y - G), x = G - v, I = k * x - (S - b * v - k * v - b * x), O = R * Z, y = mt * R, b = y - (y - R), k = R - b, y = mt * Z, v = y - (y - Z), x = Z - v, B = k * x - (O - b * v - k * v - b * x), E = I - B, m = I - E, _e[0] = I - (E + m) + (m - B), T = S + E, m = T - S, A = S - (T - m) + (E - m), E = A - O, m = A - E, _e[1] = A - (E + m) + (m - O), D = T + E, m = D - T, _e[2] = T - (D - m) + (E - m), _e[3] = D;
10916
+ S = U * G, y = mt * U, v = y - (y - U), x = U - v, y = mt * G, b = y - (y - G), w = G - b, I = x * w - (S - v * b - x * b - v * w), O = R * Z, y = mt * R, v = y - (y - R), x = R - v, y = mt * Z, b = y - (y - Z), w = Z - b, D = x * w - (O - v * b - x * b - v * w), E = I - D, m = I - E, _e[0] = I - (E + m) + (m - D), T = S + E, m = T - S, M = S - (T - m) + (E - m), E = M - O, m = M - E, _e[1] = M - (E + m) + (m - O), z = T + E, m = z - T, _e[2] = T - (z - m) + (E - m), _e[3] = z;
10917
10917
  let W = Ac(4, _e), K = Cc * s;
10918
10918
  if (W >= K || -W >= K || (m = l - U, c = l - (U + m) + (m - i), m = e - Z, p = e - (Z + m) + (m - i), m = o - R, d = o - (R + m) + (m - a), m = r - G, g = r - (G + m) + (m - a), c === 0 && d === 0 && p === 0 && g === 0) || (K = Pc * s + Mc * Math.abs(W), W += U * g + G * c - (R * p + Z * d), W >= K || -W >= K)) return W;
10919
- S = c * G, y = mt * c, b = y - (y - c), k = c - b, y = mt * G, v = y - (y - G), x = G - v, I = k * x - (S - b * v - k * v - b * x), O = d * Z, y = mt * d, b = y - (y - d), k = d - b, y = mt * Z, v = y - (y - Z), x = Z - v, B = k * x - (O - b * v - k * v - b * x), E = I - B, m = I - E, yt[0] = I - (E + m) + (m - B), T = S + E, m = T - S, A = S - (T - m) + (E - m), E = A - O, m = A - E, yt[1] = A - (E + m) + (m - O), D = T + E, m = D - T, yt[2] = T - (D - m) + (E - m), yt[3] = D;
10919
+ S = c * G, y = mt * c, v = y - (y - c), x = c - v, y = mt * G, b = y - (y - G), w = G - b, I = x * w - (S - v * b - x * b - v * w), O = d * Z, y = mt * d, v = y - (y - d), x = d - v, y = mt * Z, b = y - (y - Z), w = Z - b, D = x * w - (O - v * b - x * b - v * w), E = I - D, m = I - E, yt[0] = I - (E + m) + (m - D), T = S + E, m = T - S, M = S - (T - m) + (E - m), E = M - O, m = M - E, yt[1] = M - (E + m) + (m - O), z = T + E, m = z - T, yt[2] = T - (z - m) + (E - m), yt[3] = z;
10920
10920
  const vt = Po(4, _e, 4, yt, Fr);
10921
- S = U * g, y = mt * U, b = y - (y - U), k = U - b, y = mt * g, v = y - (y - g), x = g - v, I = k * x - (S - b * v - k * v - b * x), O = R * p, y = mt * R, b = y - (y - R), k = R - b, y = mt * p, v = y - (y - p), x = p - v, B = k * x - (O - b * v - k * v - b * x), E = I - B, m = I - E, yt[0] = I - (E + m) + (m - B), T = S + E, m = T - S, A = S - (T - m) + (E - m), E = A - O, m = A - E, yt[1] = A - (E + m) + (m - O), D = T + E, m = D - T, yt[2] = T - (D - m) + (E - m), yt[3] = D;
10921
+ S = U * g, y = mt * U, v = y - (y - U), x = U - v, y = mt * g, b = y - (y - g), w = g - b, I = x * w - (S - v * b - x * b - v * w), O = R * p, y = mt * R, v = y - (y - R), x = R - v, y = mt * p, b = y - (y - p), w = p - b, D = x * w - (O - v * b - x * b - v * w), E = I - D, m = I - E, yt[0] = I - (E + m) + (m - D), T = S + E, m = T - S, M = S - (T - m) + (E - m), E = M - O, m = M - E, yt[1] = M - (E + m) + (m - O), z = T + E, m = z - T, yt[2] = T - (z - m) + (E - m), yt[3] = z;
10922
10922
  const at = Po(vt, Fr, 4, yt, Gr);
10923
- S = c * g, y = mt * c, b = y - (y - c), k = c - b, y = mt * g, v = y - (y - g), x = g - v, I = k * x - (S - b * v - k * v - b * x), O = d * p, y = mt * d, b = y - (y - d), k = d - b, y = mt * p, v = y - (y - p), x = p - v, B = k * x - (O - b * v - k * v - b * x), E = I - B, m = I - E, yt[0] = I - (E + m) + (m - B), T = S + E, m = T - S, A = S - (T - m) + (E - m), E = A - O, m = A - E, yt[1] = A - (E + m) + (m - O), D = T + E, m = D - T, yt[2] = T - (D - m) + (E - m), yt[3] = D;
10923
+ S = c * g, y = mt * c, v = y - (y - c), x = c - v, y = mt * g, b = y - (y - g), w = g - b, I = x * w - (S - v * b - x * b - v * w), O = d * p, y = mt * d, v = y - (y - d), x = d - v, y = mt * p, b = y - (y - p), w = p - b, D = x * w - (O - v * b - x * b - v * w), E = I - D, m = I - E, yt[0] = I - (E + m) + (m - D), T = S + E, m = T - S, M = S - (T - m) + (E - m), E = M - O, m = M - E, yt[1] = M - (E + m) + (m - O), z = T + E, m = z - T, yt[2] = T - (z - m) + (E - m), yt[3] = z;
10924
10924
  const Dt = Po(at, Gr, 4, yt, Zr);
10925
10925
  return Zr[Dt - 1];
10926
10926
  }
@@ -11021,12 +11021,12 @@ function Rc(l, o) {
11021
11021
  if (l.leftSweepEvent.isSamePoint(o.rightSweepEvent))
11022
11022
  return o.rightSweepEvent.asNewXY();
11023
11023
  }
11024
- const y = (p - c) * (i - e) - (d - s) * (a - r), b = (d - s) * (r - c) - (p - c) * (e - s), k = (i - e) * (r - c) - (a - r) * (e - s);
11024
+ const y = (p - c) * (i - e) - (d - s) * (a - r), v = (d - s) * (r - c) - (p - c) * (e - s), x = (i - e) * (r - c) - (a - r) * (e - s);
11025
11025
  if (y === 0)
11026
11026
  return !1;
11027
- const v = b / y, x = k / y;
11028
- if (v >= 0 && v <= 1 && x >= 0 && x <= 1) {
11029
- const E = e + v * (i - e), T = r + v * (a - r);
11027
+ const b = v / y, w = x / y;
11028
+ if (b >= 0 && b <= 1 && w >= 0 && w <= 1) {
11029
+ const E = e + b * (i - e), T = r + b * (a - r);
11030
11030
  return [E, T];
11031
11031
  }
11032
11032
  return !1;
@@ -11313,22 +11313,22 @@ function $o(l, o, e = {}) {
11313
11313
  return !1;
11314
11314
  }
11315
11315
  function jc(l, o, e, r, i) {
11316
- const a = e[0], s = e[1], c = l[0], d = l[1], p = o[0], g = o[1], m = e[0] - c, y = e[1] - d, b = p - c, k = g - d, v = m * k - y * b;
11316
+ const a = e[0], s = e[1], c = l[0], d = l[1], p = o[0], g = o[1], m = e[0] - c, y = e[1] - d, v = p - c, x = g - d, b = m * x - y * v;
11317
11317
  if (i !== null) {
11318
- if (Math.abs(v) > i)
11318
+ if (Math.abs(b) > i)
11319
11319
  return !1;
11320
- } else if (v !== 0)
11320
+ } else if (b !== 0)
11321
11321
  return !1;
11322
- if (Math.abs(b) === Math.abs(k) && Math.abs(b) === 0)
11322
+ if (Math.abs(v) === Math.abs(x) && Math.abs(v) === 0)
11323
11323
  return r ? !1 : e[0] === l[0] && e[1] === l[1];
11324
11324
  if (r) {
11325
11325
  if (r === "start")
11326
- return Math.abs(b) >= Math.abs(k) ? b > 0 ? c < a && a <= p : p <= a && a < c : k > 0 ? d < s && s <= g : g <= s && s < d;
11326
+ return Math.abs(v) >= Math.abs(x) ? v > 0 ? c < a && a <= p : p <= a && a < c : x > 0 ? d < s && s <= g : g <= s && s < d;
11327
11327
  if (r === "end")
11328
- return Math.abs(b) >= Math.abs(k) ? b > 0 ? c <= a && a < p : p < a && a <= c : k > 0 ? d <= s && s < g : g < s && s <= d;
11328
+ return Math.abs(v) >= Math.abs(x) ? v > 0 ? c <= a && a < p : p < a && a <= c : x > 0 ? d <= s && s < g : g < s && s <= d;
11329
11329
  if (r === "both")
11330
- return Math.abs(b) >= Math.abs(k) ? b > 0 ? c < a && a < p : p < a && a < c : k > 0 ? d < s && s < g : g < s && s < d;
11331
- } else return Math.abs(b) >= Math.abs(k) ? b > 0 ? c <= a && a <= p : p <= a && a <= c : k > 0 ? d <= s && s <= g : g <= s && s <= d;
11330
+ return Math.abs(v) >= Math.abs(x) ? v > 0 ? c < a && a < p : p < a && a < c : x > 0 ? d < s && s < g : g < s && s < d;
11331
+ } else return Math.abs(v) >= Math.abs(x) ? v > 0 ? c <= a && a <= p : p <= a && a <= c : x > 0 ? d <= s && s <= g : g <= s && s <= d;
11332
11332
  return !1;
11333
11333
  }
11334
11334
  function jr(l, o = {}) {
@@ -11589,13 +11589,13 @@ function tu(l) {
11589
11589
  }
11590
11590
  function eu(l, o, e, r, i, a, s, c) {
11591
11591
  let d, p, g, m, y;
11592
- const b = {
11592
+ const v = {
11593
11593
  x: null,
11594
11594
  y: null,
11595
11595
  onLine1: !1,
11596
11596
  onLine2: !1
11597
11597
  };
11598
- return d = (c - a) * (e - l) - (s - i) * (r - o), d === 0 ? b.x !== null && b.y !== null ? b : !1 : (p = o - a, g = l - i, m = (s - i) * p - (c - a) * g, y = (e - l) * p - (r - o) * g, p = m / d, g = y / d, b.x = l + p * (e - l), b.y = o + p * (r - o), p >= 0 && p <= 1 && (b.onLine1 = !0), g >= 0 && g <= 1 && (b.onLine2 = !0), b.onLine1 && b.onLine2 ? [b.x, b.y] : !1);
11598
+ return d = (c - a) * (e - l) - (s - i) * (r - o), d === 0 ? v.x !== null && v.y !== null ? v : !1 : (p = o - a, g = l - i, m = (s - i) * p - (c - a) * g, y = (e - l) * p - (r - o) * g, p = m / d, g = y / d, v.x = l + p * (e - l), v.y = o + p * (r - o), p >= 0 && p <= 1 && (v.onLine1 = !0), g >= 0 && g <= 1 && (v.onLine2 = !0), v.onLine1 && v.onLine2 ? [v.x, v.y] : !1);
11599
11599
  }
11600
11600
  const iu = 3.280839895013123, ou = 10.763910416709722, ea = 1609.344, ia = 4046.8564224, oa = 1e4, on = (l) => ({
11601
11601
  ok: !0,
@@ -12144,7 +12144,7 @@ class fu {
12144
12144
  return this.executeToolCommand(r, e, o, !1, o);
12145
12145
  }
12146
12146
  executeToolCommand(o, e, r, i, a) {
12147
- var p, g, m, y, b, k, v, x, E, T, A, S, I;
12147
+ var p, g, m, y, v, x, b, w, E, T, M, S, I;
12148
12148
  const s = this.beginToolCommand(
12149
12149
  o,
12150
12150
  e,
@@ -12154,8 +12154,8 @@ class fu {
12154
12154
  );
12155
12155
  delete this.toolErrors[o];
12156
12156
  const c = (g = (p = this.toolButtonConfig) == null ? void 0 : p[o]) == null ? void 0 : g.requirements, d = this.getToolCapabilities().tools[o];
12157
- if (e !== "deactivate" && (((m = d == null ? void 0 : d.reason) == null ? void 0 : m.code) === "missing_attribute" || ((y = d == null ? void 0 : d.reason) == null ? void 0 : y.code) === "no_editable_layers" || this.options.readOnly && ((b = Pi[o]) != null && b.mutates) || c != null && c.selection && this.getToolCapabilities().selectedFeatureIds.length === 0 || c != null && c.provider && this.toolProvider.state !== "enabled")) {
12158
- const O = `Tool "${o}" is not available: ${(v = (k = d == null ? void 0 : d.reason) == null ? void 0 : k.message) != null ? v : "Tool requirements are not met"}`;
12157
+ if (e !== "deactivate" && (((m = d == null ? void 0 : d.reason) == null ? void 0 : m.code) === "missing_attribute" || ((y = d == null ? void 0 : d.reason) == null ? void 0 : y.code) === "no_editable_layers" || this.options.readOnly && ((v = Pi[o]) != null && v.mutates) || c != null && c.selection && this.getToolCapabilities().selectedFeatureIds.length === 0 || c != null && c.provider && this.toolProvider.state !== "enabled")) {
12158
+ const O = `Tool "${o}" is not available: ${(b = (x = d == null ? void 0 : d.reason) == null ? void 0 : x.message) != null ? b : "Tool requirements are not met"}`;
12159
12159
  return this.failToolCommand(s, O), this.emitToolTrigger({
12160
12160
  tool: o,
12161
12161
  source: s.source,
@@ -12167,8 +12167,8 @@ class fu {
12167
12167
  }
12168
12168
  try {
12169
12169
  if (e === "deactivate" || o === "select") {
12170
- const B = (x = this.activeToolCommand) == null ? void 0 : x.tool;
12171
- return this.cancelActiveTool("Deactivated by select command"), this.disablePhysicalTool(B), this.toggleMeasurementModal(!1), this.emitToolLifecycle("leaflet-geokit:tool-completed", s, {
12170
+ const D = (w = this.activeToolCommand) == null ? void 0 : w.tool;
12171
+ return this.cancelActiveTool("Deactivated by select command"), this.disablePhysicalTool(D), this.toggleMeasurementModal(!1), this.emitToolLifecycle("leaflet-geokit:tool-completed", s, {
12172
12172
  activeTool: null
12173
12173
  }), this.emitToolTrigger({
12174
12174
  tool: "select",
@@ -12179,16 +12179,16 @@ class fu {
12179
12179
  }), !0;
12180
12180
  }
12181
12181
  if (o === "save") {
12182
- const B = this.store.toFeatureCollection(), D = B.features.map((U) => Ft(U)).filter((U) => !!U);
12182
+ const D = this.store.toFeatureCollection(), z = D.features.map((U) => Ft(U)).filter((U) => !!U);
12183
12183
  return (T = (E = this.options.callbacks) == null ? void 0 : E.onSaved) == null || T.call(E, {
12184
- geoJSON: B,
12185
- featureCount: B.features.length
12184
+ geoJSON: D,
12185
+ featureCount: D.features.length
12186
12186
  }), this.emitToolEvent("tool:save", {
12187
- geoJSON: B,
12188
- featureCount: B.features.length
12187
+ geoJSON: D,
12188
+ featureCount: D.features.length
12189
12189
  }), this.emitToolLifecycle("leaflet-geokit:tool-completed", s, {
12190
- featureIds: D,
12191
- geometry: B
12190
+ featureIds: z,
12191
+ geometry: D
12192
12192
  }), this.emitToolTrigger({
12193
12193
  tool: o,
12194
12194
  source: s.source,
@@ -12201,13 +12201,13 @@ class fu {
12201
12201
  if (o === "measurementSettings")
12202
12202
  this.toggleMeasurementModal(!0);
12203
12203
  else {
12204
- (A = this.closeLayerStylePanel) == null || A.call(this);
12205
- const B = { layers: this.getLayers() };
12206
- (I = (S = this.options.callbacks) == null ? void 0 : S.onLayerStyleRequested) != null && I.call(S, B) || (this.closeLayerStylePanel = eh(
12204
+ (M = this.closeLayerStylePanel) == null || M.call(this);
12205
+ const D = { layers: this.getLayers() };
12206
+ (I = (S = this.options.callbacks) == null ? void 0 : S.onLayerStyleRequested) != null && I.call(S, D) || (this.closeLayerStylePanel = eh(
12207
12207
  this.container,
12208
- B.layers,
12209
- (D, U) => {
12210
- this.setLayerStyle(D, U);
12208
+ D.layers,
12209
+ (z, U) => {
12210
+ this.setLayerStyle(z, U);
12211
12211
  }
12212
12212
  ));
12213
12213
  }
@@ -12221,25 +12221,25 @@ class fu {
12221
12221
  }
12222
12222
  if (o === "ruler") {
12223
12223
  if (!this.canTriggerRulerTool()) {
12224
- const D = "Ruler control is not available";
12225
- return this.failToolCommand(s, D), this.emitToolTrigger({
12224
+ const z = "Ruler control is not available";
12225
+ return this.failToolCommand(s, z), this.emitToolTrigger({
12226
12226
  tool: o,
12227
12227
  source: s.source,
12228
12228
  groupId: s.groupId,
12229
12229
  commandId: s.commandId,
12230
12230
  handled: !1,
12231
- error: D
12231
+ error: z
12232
12232
  }), !1;
12233
12233
  }
12234
12234
  if (this.preparePersistentTool(s), !this.triggerRulerTool()) {
12235
- const D = "Ruler control is not available";
12236
- return this.failToolCommand(s, D), this.emitToolTrigger({
12235
+ const z = "Ruler control is not available";
12236
+ return this.failToolCommand(s, z), this.emitToolTrigger({
12237
12237
  tool: o,
12238
12238
  source: s.source,
12239
12239
  groupId: s.groupId,
12240
12240
  commandId: s.commandId,
12241
12241
  handled: !1,
12242
- error: D
12242
+ error: z
12243
12243
  }), !1;
12244
12244
  }
12245
12245
  return this.startPersistentTool(s), this.emitToolTrigger({
@@ -12252,25 +12252,25 @@ class fu {
12252
12252
  }
12253
12253
  const O = this.findLeafletDrawHandler(o);
12254
12254
  if (!O || typeof O.enable != "function") {
12255
- const B = `Tool "${o}" is not available on this map`;
12256
- return this.failToolCommand(s, B), this.emitToolTrigger({
12255
+ const D = `Tool "${o}" is not available on this map`;
12256
+ return this.failToolCommand(s, D), this.emitToolTrigger({
12257
12257
  tool: o,
12258
12258
  source: s.source,
12259
12259
  groupId: s.groupId,
12260
12260
  commandId: s.commandId,
12261
12261
  handled: !1,
12262
- error: B
12262
+ error: D
12263
12263
  }), !1;
12264
12264
  }
12265
12265
  if (this.preparePersistentTool(s), this.pendingToolCommand = s, O.enable(), this.pendingToolCommand = null, typeof O.enabled == "function" && O.enabled() === !1) {
12266
- const B = `Tool "${o}" could not be started`;
12267
- return this.failToolCommand(s, B), this.emitToolTrigger({
12266
+ const D = `Tool "${o}" could not be started`;
12267
+ return this.failToolCommand(s, D), this.emitToolTrigger({
12268
12268
  tool: o,
12269
12269
  source: s.source,
12270
12270
  groupId: s.groupId,
12271
12271
  commandId: s.commandId,
12272
12272
  handled: !1,
12273
- error: B
12273
+ error: D
12274
12274
  }), !1;
12275
12275
  }
12276
12276
  return this.startPersistentTool(s), this.emitToolTrigger({
@@ -12282,14 +12282,14 @@ class fu {
12282
12282
  }), !0;
12283
12283
  } catch (O) {
12284
12284
  this.pendingToolCommand = null;
12285
- const B = e === "deactivate" ? "Failed to deactivate active map tools" : "Failed to activate tool " + o, D = O instanceof Error ? O.message : B;
12286
- return this.toolErrors[o] = D, this._error(B, O), this.failToolCommand(s, D), this.emitToolTrigger({
12285
+ const D = e === "deactivate" ? "Failed to deactivate active map tools" : "Failed to activate tool " + o, z = O instanceof Error ? O.message : D;
12286
+ return this.toolErrors[o] = z, this._error(D, O), this.failToolCommand(s, z), this.emitToolTrigger({
12287
12287
  tool: o,
12288
12288
  source: s.source,
12289
12289
  groupId: s.groupId,
12290
12290
  commandId: s.commandId,
12291
12291
  handled: !1,
12292
- error: D
12292
+ error: z
12293
12293
  }), !1;
12294
12294
  }
12295
12295
  }
@@ -12333,46 +12333,46 @@ class fu {
12333
12333
  zoom: g,
12334
12334
  minZoom: m,
12335
12335
  maxZoom: y,
12336
- tileUrl: b,
12337
- tileAttribution: k,
12338
- preferCanvas: v = !0,
12336
+ tileUrl: v,
12337
+ tileAttribution: x,
12338
+ preferCanvas: b = !0,
12339
12339
  // Default to Canvas rendering for better performance
12340
- useExternalLeaflet: x
12340
+ useExternalLeaflet: w
12341
12341
  } = this.options.map, E = [d, p], T = this.L;
12342
- x && Eo(T, {
12343
- onError: (B) => this.logger.warn("external-leaflet-missing-draw", { message: B })
12342
+ w && Eo(T, {
12343
+ onError: (D) => this.logger.warn("external-leaflet-missing-draw", { message: D })
12344
12344
  }), this.map = T.map(this.container, {
12345
12345
  zoomControl: !0,
12346
12346
  minZoom: m,
12347
- preferCanvas: v
12347
+ preferCanvas: b
12348
12348
  }).setView(E, g), this.setTileLayer(
12349
12349
  {
12350
- urlTemplate: b,
12351
- attribution: k != null ? k : "",
12350
+ urlTemplate: v,
12351
+ attribution: x != null ? x : "",
12352
12352
  maxZoom: y
12353
12353
  },
12354
12354
  {
12355
- onTileError: (B) => {
12356
- var D, U;
12357
- (U = (D = this.options.callbacks) == null ? void 0 : D.onTileError) == null || U.call(D, B);
12355
+ onTileError: (D) => {
12356
+ var z, U;
12357
+ (U = (z = this.options.callbacks) == null ? void 0 : z.onTileError) == null || U.call(z, D);
12358
12358
  }
12359
12359
  }
12360
12360
  ), this.drawnItems = T.featureGroup().addTo(this.map), this.drawnItems.on(
12361
12361
  "layeradd layerremove",
12362
12362
  () => this.notifyToolCapabilities()
12363
12363
  );
12364
- const A = this.buildDrawOptions(
12364
+ const M = this.buildDrawOptions(
12365
12365
  this.options.controls,
12366
12366
  !!this.options.readOnly
12367
12367
  ), S = T.Control.Draw;
12368
- this.drawControl = new S(A), this.map.addControl(this.drawControl), this.applyLayerCakeToolbarIcon(), this.applyMoveToolbarIcon(), this.restoreVisibleLayersFromStore(), this.options.controls.ruler && (this.logger.debug("init:ruler", {
12368
+ this.drawControl = new S(M), this.map.addControl(this.drawControl), this.applyLayerCakeToolbarIcon(), this.applyMoveToolbarIcon(), this.restoreVisibleLayersFromStore(), this.options.controls.ruler && (this.logger.debug("init:ruler", {
12369
12369
  available: typeof T.control.ruler == "function"
12370
12370
  }), typeof T.control.ruler == "function" ? (this.addRulerControl(), this.installMeasurementSettingsControl()) : this.logger.warn("init:ruler:missing", {
12371
12371
  msg: "L.control.ruler is not defined"
12372
12372
  })), this.applyToolButtonCustomizations(), this.patchLeafletDrawBugs(), this.installPolygonFinishPatch(), this.installVertexEditSurfaceMenu(), this.map.invalidateSize(), setTimeout(() => {
12373
- var B;
12373
+ var D;
12374
12374
  try {
12375
- (B = this.map) == null || B.invalidateSize();
12375
+ (D = this.map) == null || D.invalidateSize();
12376
12376
  } catch {
12377
12377
  }
12378
12378
  }, 0), this.bindDrawEvents(), this.installInteractionIntegrations();
@@ -12437,8 +12437,8 @@ class fu {
12437
12437
  continue;
12438
12438
  }
12439
12439
  for (const y of m.featureIds) {
12440
- const b = this.featureLayers.get(y);
12441
- b && (m.visible ? this.drawnItems.addLayer(b) : this.drawnItems.removeLayer(b), (i = b.setStyle) == null || i.call(b, m.style), (s = b.setOpacity) == null || s.call(b, (a = m.style.opacity) != null ? a : 1), m.visible && ((c = b.bringToFront) == null || c.call(b)), (d = b.setZIndexOffset) == null || d.call(b, m.order * 100));
12440
+ const v = this.featureLayers.get(y);
12441
+ v && (m.visible ? this.drawnItems.addLayer(v) : this.drawnItems.removeLayer(v), (i = v.setStyle) == null || i.call(v, m.style), (s = v.setOpacity) == null || s.call(v, (a = m.style.opacity) != null ? a : 1), m.visible && ((c = v.bringToFront) == null || c.call(v)), (d = v.setZIndexOffset) == null || d.call(v, m.order * 100));
12442
12442
  }
12443
12443
  }
12444
12444
  (g = (p = this.options.callbacks) == null ? void 0 : p.onLayerEvent) == null || g.call(p, "leaflet-geokit:layers-changed", {
@@ -12931,7 +12931,7 @@ class fu {
12931
12931
  });
12932
12932
  }
12933
12933
  findLeafletDrawHandler(o) {
12934
- var s, c, d, p, g, m, y, b, k, v;
12934
+ var s, c, d, p, g, m, y, v, x, b;
12935
12935
  const e = {
12936
12936
  polygon: "polygon",
12937
12937
  polyline: "polyline",
@@ -12947,7 +12947,7 @@ class fu {
12947
12947
  if (i)
12948
12948
  return (g = (p = (d = (c = (s = this.drawControl) == null ? void 0 : s._toolbars) == null ? void 0 : c.draw) == null ? void 0 : d._modes) == null ? void 0 : p[i]) == null ? void 0 : g.handler;
12949
12949
  const a = r[o];
12950
- return a ? (v = (k = (b = (y = (m = this.drawControl) == null ? void 0 : m._toolbars) == null ? void 0 : y.edit) == null ? void 0 : b._modes) == null ? void 0 : k[a]) == null ? void 0 : v.handler : null;
12950
+ return a ? (b = (x = (v = (y = (m = this.drawControl) == null ? void 0 : m._toolbars) == null ? void 0 : y.edit) == null ? void 0 : v._modes) == null ? void 0 : x[a]) == null ? void 0 : b.handler : null;
12951
12951
  }
12952
12952
  disableActiveToolHandlers() {
12953
12953
  var e;
@@ -13034,8 +13034,8 @@ class fu {
13034
13034
  p.lng,
13035
13035
  g.lat,
13036
13036
  g.lng
13037
- ), b = m / 1e3, k = typeof ((d = (c = this.options) == null ? void 0 : c.lengthUnit) == null ? void 0 : d.factor) == "number" ? this.options.lengthUnit.factor : 1, v = qo(b * k);
13038
- this._result = this._result || {}, this._result.Distance = v, this._result.Bearing = y, this._result.meters = m;
13037
+ ), v = m / 1e3, x = typeof ((d = (c = this.options) == null ? void 0 : c.lengthUnit) == null ? void 0 : d.factor) == "number" ? this.options.lengthUnit.factor : 1, b = qo(v * x);
13038
+ this._result = this._result || {}, this._result.Distance = b, this._result.Bearing = y, this._result.meters = m;
13039
13039
  } catch (p) {
13040
13040
  i == null || i.warn("ruler:precision-patch", p);
13041
13041
  }
@@ -13168,16 +13168,16 @@ class fu {
13168
13168
  const o = this.map, e = (d = (c = this.drawControl) == null ? void 0 : c._toolbars) == null ? void 0 : d.draw;
13169
13169
  if (!e || !!!((g = (p = e._modes) == null ? void 0 : p.polygon) != null && g.handler)) return;
13170
13170
  const i = 10, a = (m) => {
13171
- var y, b, k, v, x, E, T, A;
13171
+ var y, v, x, b, w, E, T, M;
13172
13172
  try {
13173
- const S = (b = (y = e._modes) == null ? void 0 : y.polygon) == null ? void 0 : b.handler;
13173
+ const S = (v = (y = e._modes) == null ? void 0 : y.polygon) == null ? void 0 : v.handler;
13174
13174
  if (!S || !S._enabled) return;
13175
13175
  const I = S._markers;
13176
13176
  if (!Array.isArray(I) || I.length < 3) return;
13177
- const O = (v = (k = I[0]) == null ? void 0 : k.getLatLng) == null ? void 0 : v.call(k);
13177
+ const O = (b = (x = I[0]) == null ? void 0 : x.getLatLng) == null ? void 0 : b.call(x);
13178
13178
  if (!O) return;
13179
- const B = o.latLngToContainerPoint(O), D = o.latLngToContainerPoint(m.latlng);
13180
- Math.hypot(B.x - D.x, B.y - D.y) <= i && typeof S._finishShape == "function" && ((E = (x = m.originalEvent) == null ? void 0 : x.preventDefault) == null || E.call(x), (A = (T = m.originalEvent) == null ? void 0 : T.stopPropagation) == null || A.call(T), S._finishShape());
13179
+ const D = o.latLngToContainerPoint(O), z = o.latLngToContainerPoint(m.latlng);
13180
+ Math.hypot(D.x - z.x, D.y - z.y) <= i && typeof S._finishShape == "function" && ((E = (w = m.originalEvent) == null ? void 0 : w.preventDefault) == null || E.call(w), (M = (T = m.originalEvent) == null ? void 0 : T.stopPropagation) == null || M.call(T), S._finishShape());
13181
13181
  } catch (S) {
13182
13182
  this._error("polygon-finish-patch", S);
13183
13183
  }
@@ -13205,16 +13205,16 @@ class fu {
13205
13205
  nm: 2
13206
13206
  }, p = (e = (o = c.formattedNumber) == null ? void 0 : o.bind(c)) != null ? e : ((g, m) => Number(g).toFixed(m));
13207
13207
  c.readableArea = (g, m, y) => {
13208
- var v;
13209
- const b = (v = s.Util) != null && v.extend ? s.Util.extend({}, d, y || {}) : { ...d, ...y || {} };
13210
- let k;
13208
+ var b;
13209
+ const v = (b = s.Util) != null && b.extend ? s.Util.extend({}, d, y || {}) : { ...d, ...y || {} };
13210
+ let x;
13211
13211
  if (m) {
13212
- let x = ["ha", "m"];
13212
+ let w = ["ha", "m"];
13213
13213
  const E = typeof m;
13214
- E === "string" ? x = [m] : E !== "boolean" && (x = Array.isArray(m) ? m : x), g >= 1e6 && x.indexOf("km") !== -1 ? k = `${p(1e-6 * g, b.km)} km²` : g >= 1e4 && x.indexOf("ha") !== -1 ? k = `${p(1e-4 * g, b.ha)} ha` : k = `${p(g, b.m)} m²`;
13214
+ E === "string" ? w = [m] : E !== "boolean" && (w = Array.isArray(m) ? m : w), g >= 1e6 && w.indexOf("km") !== -1 ? x = `${p(1e-6 * g, v.km)} km²` : g >= 1e4 && w.indexOf("ha") !== -1 ? x = `${p(1e-4 * g, v.ha)} ha` : x = `${p(g, v.m)} m²`;
13215
13215
  } else
13216
- g = g / 0.836127, g >= 3097600 ? k = `${p(g / 3097600, b.mi)} mi²` : g >= 4840 ? k = `${p(g / 4840, b.ac)} acres` : k = `${p(g, b.yd)} yd²`;
13217
- return k;
13216
+ g = g / 0.836127, g >= 3097600 ? x = `${p(g / 3097600, v.mi)} mi²` : g >= 4840 ? x = `${p(g / 4840, v.ac)} acres` : x = `${p(g, v.yd)} yd²`;
13217
+ return x;
13218
13218
  };
13219
13219
  } catch (s) {
13220
13220
  this.logger.warn("leaflet-draw-patch:readableArea", s);
@@ -13223,14 +13223,14 @@ class fu {
13223
13223
  const s = this.L, c = (r = s.Edit) == null ? void 0 : r.Circle, d = (i = s.Draw) == null ? void 0 : i.Event, p = s.GeometryUtil;
13224
13224
  if (!((a = c == null ? void 0 : c.prototype) != null && a._resize) || !d || !p) return;
13225
13225
  c.prototype._resize = function(m) {
13226
- var k, v, x;
13227
- const y = this._moveMarker.getLatLng(), b = p.isVersion07x() ? y.distanceTo(m) : this._map.distance(y, m);
13228
- this._shape.setRadius(b);
13226
+ var x, b, w;
13227
+ const y = this._moveMarker.getLatLng(), v = p.isVersion07x() ? y.distanceTo(m) : this._map.distance(y, m);
13228
+ this._shape.setRadius(v);
13229
13229
  try {
13230
- (k = this._map) != null && k.editTooltip && ((x = (v = this._map) == null ? void 0 : v._editTooltip) != null && x.updateContent) && this._map._editTooltip.updateContent({
13230
+ (x = this._map) != null && x.editTooltip && ((w = (b = this._map) == null ? void 0 : b._editTooltip) != null && w.updateContent) && this._map._editTooltip.updateContent({
13231
13231
  text: s.drawLocal.edit.handlers.edit.tooltip.subtext + "<br />" + s.drawLocal.edit.handlers.edit.tooltip.text,
13232
13232
  subtext: s.drawLocal.draw.handlers.circle.radius + ": " + p.readableDistance(
13233
- b,
13233
+ v,
13234
13234
  !0,
13235
13235
  this.options.feet,
13236
13236
  this.options.nautic
@@ -13339,43 +13339,43 @@ class fu {
13339
13339
  const r = (i = o == null ? void 0 : o._poly) != null ? i : o == null ? void 0 : o._shape;
13340
13340
  if (!r) return null;
13341
13341
  if ((a = o == null ? void 0 : o._poly) != null && a.getLatLngs) {
13342
- const y = o._poly.getLatLngs(), b = Array.isArray(y == null ? void 0 : y[0]) ? y[0] : y, k = (Array.isArray(b) ? b : []).map((x) => [
13343
- x.lng,
13344
- x.lat
13345
- ]), v = e != null ? e : o._currentLatLng;
13346
- if (v && k.length && (((s = k.at(-1)) == null ? void 0 : s[0]) !== v.lng || ((c = k.at(-1)) == null ? void 0 : c[1]) !== v.lat) && k.push([v.lng, v.lat]), o.type === "polygon" || r instanceof this.L.Polygon) {
13347
- if (k.length < 3) return null;
13348
- const x = k[0][0] === ((d = k.at(-1)) == null ? void 0 : d[0]) && k[0][1] === ((p = k.at(-1)) == null ? void 0 : p[1]) ? k : [...k, k[0]];
13342
+ const y = o._poly.getLatLngs(), v = Array.isArray(y == null ? void 0 : y[0]) ? y[0] : y, x = (Array.isArray(v) ? v : []).map((w) => [
13343
+ w.lng,
13344
+ w.lat
13345
+ ]), b = e != null ? e : o._currentLatLng;
13346
+ if (b && x.length && (((s = x.at(-1)) == null ? void 0 : s[0]) !== b.lng || ((c = x.at(-1)) == null ? void 0 : c[1]) !== b.lat) && x.push([b.lng, b.lat]), o.type === "polygon" || r instanceof this.L.Polygon) {
13347
+ if (x.length < 3) return null;
13348
+ const w = x[0][0] === ((d = x.at(-1)) == null ? void 0 : d[0]) && x[0][1] === ((p = x.at(-1)) == null ? void 0 : p[1]) ? x : [...x, x[0]];
13349
13349
  return {
13350
13350
  type: "Feature",
13351
13351
  properties: {},
13352
- geometry: { type: "Polygon", coordinates: [x] }
13352
+ geometry: { type: "Polygon", coordinates: [w] }
13353
13353
  };
13354
13354
  }
13355
- return k.length < 2 ? null : {
13355
+ return x.length < 2 ? null : {
13356
13356
  type: "Feature",
13357
13357
  properties: {},
13358
- geometry: { type: "LineString", coordinates: k }
13358
+ geometry: { type: "LineString", coordinates: x }
13359
13359
  };
13360
13360
  }
13361
13361
  if ((g = o == null ? void 0 : o._shape) != null && g.getLatLng && ((m = o == null ? void 0 : o._shape) != null && m.getRadius)) {
13362
- const y = o._shape.getLatLng(), b = o._shape.getRadius(), k = 110574, v = k * Math.max(0.1, Math.cos(y.lat * Math.PI / 180)), x = Array.from({ length: 65 }, (E, T) => {
13363
- const A = T / 64 * Math.PI * 2;
13362
+ const y = o._shape.getLatLng(), v = o._shape.getRadius(), x = 110574, b = x * Math.max(0.1, Math.cos(y.lat * Math.PI / 180)), w = Array.from({ length: 65 }, (E, T) => {
13363
+ const M = T / 64 * Math.PI * 2;
13364
13364
  return [
13365
- y.lng + Math.cos(A) * b / v,
13366
- y.lat + Math.sin(A) * b / k
13365
+ y.lng + Math.cos(M) * v / b,
13366
+ y.lat + Math.sin(M) * v / x
13367
13367
  ];
13368
13368
  });
13369
13369
  return {
13370
13370
  type: "Feature",
13371
13371
  properties: {},
13372
- geometry: { type: "Polygon", coordinates: [x] }
13372
+ geometry: { type: "Polygon", coordinates: [w] }
13373
13373
  };
13374
13374
  }
13375
13375
  return typeof r.toGeoJSON == "function" ? r.toGeoJSON() : null;
13376
13376
  }
13377
13377
  renderMeasurement(o, e) {
13378
- var p, g, m, y, b;
13378
+ var p, g, m, y, v;
13379
13379
  if (!((p = this.measurementOverlayOptions) != null && p.enabled) || !o) return;
13380
13380
  const r = Fa(o);
13381
13381
  if (!r.ok) {
@@ -13408,10 +13408,10 @@ class fu {
13408
13408
  whiteSpace: "pre-line"
13409
13409
  }), this.container.appendChild(c), this.measurementOverlayElement = c), c.textContent = a.join(`
13410
13410
  `);
13411
- const d = (b = e != null ? e : this.lastMeasurementLatLng) != null ? b : (y = this.map) == null ? void 0 : y.getCenter();
13411
+ const d = (v = e != null ? e : this.lastMeasurementLatLng) != null ? v : (y = this.map) == null ? void 0 : y.getCenter();
13412
13412
  if (d && this.map) {
13413
- const k = this.map.latLngToContainerPoint(d);
13414
- c.style.left = `${k.x + 12}px`, c.style.top = `${k.y + 12}px`;
13413
+ const x = this.map.latLngToContainerPoint(d);
13414
+ c.style.left = `${x.x + 12}px`, c.style.top = `${x.y + 12}px`;
13415
13415
  }
13416
13416
  this.lastMeasurementFeature = o, this.lastMeasurementLatLng = e ? this.L.latLng(e) : this.lastMeasurementLatLng;
13417
13417
  }
@@ -13433,20 +13433,20 @@ class fu {
13433
13433
  const i = e._onMarkerDrag, a = e._onTouchMove;
13434
13434
  i && ((c = o.off) == null || c.call(o, "drag", i, e));
13435
13435
  const s = (p) => {
13436
- var y, b, k, v, x, E;
13437
- const g = (y = e._poly) == null ? void 0 : y._fid, m = this.findSnapResult((b = o.getLatLng) == null ? void 0 : b.call(o), g);
13436
+ var y, v, x, b, w, E;
13437
+ const g = (y = e._poly) == null ? void 0 : y._fid, m = this.findSnapResult((v = o.getLatLng) == null ? void 0 : v.call(o), g);
13438
13438
  this.showSnapFeedback(m), m && o.setLatLng(m.latlng), i == null || i.call(e, { ...p, target: o }), this.renderMeasurement(
13439
- (x = (v = (k = e._poly) == null ? void 0 : k.toGeoJSON) == null ? void 0 : v.call(k)) != null ? x : null,
13439
+ (w = (b = (x = e._poly) == null ? void 0 : x.toGeoJSON) == null ? void 0 : b.call(x)) != null ? w : null,
13440
13440
  (E = o.getLatLng) == null ? void 0 : E.call(o)
13441
13441
  );
13442
13442
  };
13443
13443
  if (o.on("drag", s, e), a) {
13444
13444
  (d = o.off) == null || d.call(o, "touchmove", a, e);
13445
13445
  const p = (g) => {
13446
- var b, k, v, x, E, T, A, S;
13447
- const m = (k = this.eventLatLng(g)) != null ? k : (b = o.getLatLng) == null ? void 0 : b.call(o), y = this.findSnapResult(m, (v = e._poly) == null ? void 0 : v._fid);
13448
- this.showSnapFeedback(y), y ? (o.setLatLng(y.latlng), i == null || i.call(e, { ...g, target: o })) : (m && ((x = o.setLatLng) == null || x.call(o, m)), a ? a.call(e, { ...g, target: o }) : i == null || i.call(e, { ...g, target: o })), this.renderMeasurement(
13449
- (A = (T = (E = e._poly) == null ? void 0 : E.toGeoJSON) == null ? void 0 : T.call(E)) != null ? A : null,
13446
+ var v, x, b, w, E, T, M, S;
13447
+ const m = (x = this.eventLatLng(g)) != null ? x : (v = o.getLatLng) == null ? void 0 : v.call(o), y = this.findSnapResult(m, (b = e._poly) == null ? void 0 : b._fid);
13448
+ this.showSnapFeedback(y), y ? (o.setLatLng(y.latlng), i == null || i.call(e, { ...g, target: o })) : (m && ((w = o.setLatLng) == null || w.call(o, m)), a ? a.call(e, { ...g, target: o }) : i == null || i.call(e, { ...g, target: o })), this.renderMeasurement(
13449
+ (M = (T = (E = e._poly) == null ? void 0 : E.toGeoJSON) == null ? void 0 : T.call(E)) != null ? M : null,
13450
13450
  (S = o.getLatLng) == null ? void 0 : S.call(o)
13451
13451
  );
13452
13452
  };
@@ -13476,20 +13476,20 @@ class fu {
13476
13476
  });
13477
13477
  }
13478
13478
  installInteractionIntegrations() {
13479
- var y, b, k, v, x, E, T;
13479
+ var y, v, x, b, w, E, T;
13480
13480
  if ((y = this.interactionCleanup) == null || y.call(this), this.interactionCleanup = null, this.hideLiveOverlays(), !this.map || !this.drawControl) return;
13481
- const o = [], e = [], r = !!(((b = this.snappingOptions) == null ? void 0 : b.enabled) !== !1 && this.snappingOptions);
13481
+ const o = [], e = [], r = !!(((v = this.snappingOptions) == null ? void 0 : v.enabled) !== !1 && this.snappingOptions);
13482
13482
  let i = !0;
13483
- const a = !!((k = this.measurementOverlayOptions) != null && k.enabled), s = () => {
13484
- var A;
13485
- for (; e.length; ) (A = e.pop()) == null || A();
13483
+ const a = !!((x = this.measurementOverlayOptions) != null && x.enabled), s = () => {
13484
+ var M;
13485
+ for (; e.length; ) (M = e.pop()) == null || M();
13486
13486
  this.showSnapFeedback(null);
13487
13487
  };
13488
13488
  if (r) {
13489
- const A = Object.values(
13490
- (T = (E = (x = (v = this.drawControl) == null ? void 0 : v._toolbars) == null ? void 0 : x.draw) == null ? void 0 : E._modes) != null ? T : {}
13489
+ const M = Object.values(
13490
+ (T = (E = (w = (b = this.drawControl) == null ? void 0 : b._toolbars) == null ? void 0 : w.draw) == null ? void 0 : E._modes) != null ? T : {}
13491
13491
  );
13492
- for (const S of A) {
13492
+ for (const S of M) {
13493
13493
  const I = S == null ? void 0 : S.handler;
13494
13494
  if (I)
13495
13495
  for (const O of [
@@ -13498,13 +13498,13 @@ class fu {
13498
13498
  "_onMouseUp",
13499
13499
  "_onTouch"
13500
13500
  ]) {
13501
- const B = I[O];
13502
- if (typeof B != "function") continue;
13503
- const D = (U) => {
13501
+ const D = I[O];
13502
+ if (typeof D != "function") continue;
13503
+ const z = (U) => {
13504
13504
  var K, vt, at;
13505
13505
  const Z = this.eventLatLng(U), R = this.findSnapResult(Z);
13506
13506
  this.showSnapFeedback(R);
13507
- const G = R ? { ...U, latlng: R.latlng } : U, W = B.call(I, G);
13507
+ const G = R ? { ...U, latlng: R.latlng } : U, W = D.call(I, G);
13508
13508
  return R && (I._currentLatLng = R.latlng, (K = I._mouseMarker) == null || K.setLatLng(R.latlng), typeof I._updateGuide == "function" && I._updateGuide(
13509
13509
  this.map.latLngToLayerPoint(R.latlng)
13510
13510
  ), (vt = I._updateTooltip) == null || vt.call(I, R.latlng)), this.renderMeasurement(
@@ -13512,48 +13512,48 @@ class fu {
13512
13512
  (at = R == null ? void 0 : R.latlng) != null ? at : Z
13513
13513
  ), W;
13514
13514
  };
13515
- I[O] = D, o.push(() => {
13516
- I[O] === D && (I[O] = B);
13515
+ I[O] = z, o.push(() => {
13516
+ I[O] === z && (I[O] = D);
13517
13517
  });
13518
13518
  }
13519
13519
  }
13520
13520
  }
13521
- const c = (A) => {
13522
- var B, D, U, Z, R, G;
13521
+ const c = (M) => {
13522
+ var D, z, U, Z, R, G;
13523
13523
  const S = Object.values(
13524
- (Z = (U = (D = (B = this.drawControl) == null ? void 0 : B._toolbars) == null ? void 0 : D.draw) == null ? void 0 : U._modes) != null ? Z : {}
13524
+ (Z = (U = (z = (D = this.drawControl) == null ? void 0 : D._toolbars) == null ? void 0 : z.draw) == null ? void 0 : U._modes) != null ? Z : {}
13525
13525
  ).map((W) => W == null ? void 0 : W.handler).find((W) => W == null ? void 0 : W._enabled);
13526
13526
  if (!S) return;
13527
- const I = this.eventLatLng(A), O = r ? this.findSnapResult(I) : null;
13527
+ const I = this.eventLatLng(M), O = r ? this.findSnapResult(I) : null;
13528
13528
  r && this.showSnapFeedback(O), this.renderMeasurement(
13529
13529
  this.geometryFeatureForHandler(S, (R = O == null ? void 0 : O.latlng) != null ? R : I),
13530
13530
  (G = O == null ? void 0 : O.latlng) != null ? G : I
13531
13531
  );
13532
13532
  };
13533
13533
  this.map.on("mousemove touchmove", c), o.push(() => {
13534
- var A;
13535
- return (A = this.map) == null ? void 0 : A.off("mousemove touchmove", c);
13534
+ var M;
13535
+ return (M = this.map) == null ? void 0 : M.off("mousemove touchmove", c);
13536
13536
  });
13537
13537
  const d = () => {
13538
- var A, S, I, O;
13538
+ var M, S, I, O;
13539
13539
  if (a)
13540
- for (const B of (I = (S = (A = this.drawnItems) == null ? void 0 : A.getLayers) == null ? void 0 : S.call(A)) != null ? I : []) {
13541
- const D = B, U = () => {
13540
+ for (const D of (I = (S = (M = this.drawnItems) == null ? void 0 : M.getLayers) == null ? void 0 : S.call(M)) != null ? I : []) {
13541
+ const z = D, U = () => {
13542
13542
  var Z, R, G;
13543
13543
  return this.renderMeasurement(
13544
- (R = (Z = D.toGeoJSON) == null ? void 0 : Z.call(D)) != null ? R : null,
13545
- (G = D.getLatLng) == null ? void 0 : G.call(D)
13544
+ (R = (Z = z.toGeoJSON) == null ? void 0 : Z.call(z)) != null ? R : null,
13545
+ (G = z.getLatLng) == null ? void 0 : G.call(z)
13546
13546
  );
13547
13547
  };
13548
- (O = D.on) == null || O.call(D, "editdrag drag", U), e.push(() => {
13548
+ (O = z.on) == null || O.call(z, "editdrag drag", U), e.push(() => {
13549
13549
  var Z;
13550
- return (Z = D.off) == null ? void 0 : Z.call(D, "editdrag drag", U);
13550
+ return (Z = z.off) == null ? void 0 : Z.call(z, "editdrag drag", U);
13551
13551
  });
13552
13552
  }
13553
13553
  r && queueMicrotask(() => {
13554
- var B, D, U, Z, R;
13554
+ var D, z, U, Z, R;
13555
13555
  if (i)
13556
- for (const G of (U = (D = (B = this.drawnItems) == null ? void 0 : B.getLayers) == null ? void 0 : D.call(B)) != null ? U : []) {
13556
+ for (const G of (U = (z = (D = this.drawnItems) == null ? void 0 : D.getLayers) == null ? void 0 : z.call(D)) != null ? U : []) {
13557
13557
  const W = G.editing;
13558
13558
  for (const K of (Z = W == null ? void 0 : W._verticesHandlers) != null ? Z : []) {
13559
13559
  this.installEditHandlerSnap(K, e);
@@ -13562,12 +13562,12 @@ class fu {
13562
13562
  }
13563
13563
  }
13564
13564
  });
13565
- }, p = (A) => {
13566
- var I, O, B, D, U, Z, R, G, W, K;
13567
- const S = (U = (O = (I = A == null ? void 0 : A.poly) == null ? void 0 : I.toGeoJSON) == null ? void 0 : O.call(I)) != null ? U : (D = (B = A == null ? void 0 : A.layer) == null ? void 0 : B.toGeoJSON) == null ? void 0 : D.call(B);
13565
+ }, p = (M) => {
13566
+ var I, O, D, z, U, Z, R, G, W, K;
13567
+ const S = (U = (O = (I = M == null ? void 0 : M.poly) == null ? void 0 : I.toGeoJSON) == null ? void 0 : O.call(I)) != null ? U : (z = (D = M == null ? void 0 : M.layer) == null ? void 0 : D.toGeoJSON) == null ? void 0 : z.call(D);
13568
13568
  this.renderMeasurement(
13569
13569
  S,
13570
- (K = (R = (Z = A == null ? void 0 : A.marker) == null ? void 0 : Z.getLatLng) == null ? void 0 : R.call(Z)) != null ? K : (W = (G = A == null ? void 0 : A.poly) == null ? void 0 : G.getCenter) == null ? void 0 : W.call(G)
13570
+ (K = (R = (Z = M == null ? void 0 : M.marker) == null ? void 0 : Z.getLatLng) == null ? void 0 : R.call(Z)) != null ? K : (W = (G = M == null ? void 0 : M.poly) == null ? void 0 : G.getCenter) == null ? void 0 : W.call(G)
13571
13571
  );
13572
13572
  }, g = () => {
13573
13573
  s(), this.hideLiveOverlays();
@@ -13575,11 +13575,11 @@ class fu {
13575
13575
  this.hideLiveOverlays();
13576
13576
  };
13577
13577
  this.map.on("draw:editstart", d), this.map.on("draw:editvertex", p), this.map.on("draw:editstop", g), this.map.on("draw:drawstop", m), o.push(() => {
13578
- var A, S, I, O;
13579
- i = !1, s(), (A = this.map) == null || A.off("draw:editstart", d), (S = this.map) == null || S.off("draw:editvertex", p), (I = this.map) == null || I.off("draw:editstop", g), (O = this.map) == null || O.off("draw:drawstop", m);
13578
+ var M, S, I, O;
13579
+ i = !1, s(), (M = this.map) == null || M.off("draw:editstart", d), (S = this.map) == null || S.off("draw:editvertex", p), (I = this.map) == null || I.off("draw:editstop", g), (O = this.map) == null || O.off("draw:drawstop", m);
13580
13580
  }), this.interactionCleanup = () => {
13581
- var A;
13582
- for (; o.length; ) (A = o.pop()) == null || A();
13581
+ var M;
13582
+ for (; o.length; ) (M = o.pop()) == null || M();
13583
13583
  s(), this.hideLiveOverlays();
13584
13584
  };
13585
13585
  }
@@ -13646,53 +13646,53 @@ class fu {
13646
13646
  this.cakeSessionCommand = this.activeToolCommand, this.activeCakeSession = new Zh(
13647
13647
  this.map,
13648
13648
  d,
13649
- (v) => {
13649
+ (b) => {
13650
13650
  var O;
13651
13651
  if (!this.drawnItems) return;
13652
- const x = this.activeCakeSession.snapshot();
13653
- v.features.forEach((B, D) => {
13654
- B.properties = {
13655
- ...B.properties,
13656
- name: `${x.name} ${D === 0 ? "core" : `ring ${D}`}`
13652
+ const w = this.activeCakeSession.snapshot();
13653
+ b.features.forEach((D, z) => {
13654
+ D.properties = {
13655
+ ...D.properties,
13656
+ name: `${w.name} ${z === 0 ? "core" : `ring ${z}`}`
13657
13657
  };
13658
13658
  });
13659
- const E = this.store.add(v), T = this.layerRegistry.add(E, {
13660
- name: x.name,
13659
+ const E = this.store.add(b), T = this.layerRegistry.add(E, {
13660
+ name: w.name,
13661
13661
  kind: "drawn",
13662
- style: x.style
13663
- }), A = this.L.geoJSON(v);
13662
+ style: w.style
13663
+ }), M = this.L.geoJSON(b);
13664
13664
  let S = 0;
13665
- A.eachLayer((B) => {
13665
+ M.eachLayer((D) => {
13666
13666
  var U, Z, R;
13667
- const D = (U = E[S]) != null ? U : E[E.length - 1];
13668
- B._fid = D, this.featureLayers.set(D, B), this.drawnItems.addLayer(B), this.installVertexContextMenu(B), (R = (Z = this.options.callbacks) == null ? void 0 : Z.onCreated) == null || R.call(Z, {
13669
- id: D,
13667
+ const z = (U = E[S]) != null ? U : E[E.length - 1];
13668
+ D._fid = z, this.featureLayers.set(z, D), this.drawnItems.addLayer(D), this.installVertexContextMenu(D), (R = (Z = this.options.callbacks) == null ? void 0 : Z.onCreated) == null || R.call(Z, {
13669
+ id: z,
13670
13670
  layerType: "polygon",
13671
- geoJSON: B.toGeoJSON()
13671
+ geoJSON: D.toGeoJSON()
13672
13672
  }), S++;
13673
13673
  }), this.applyLayerRegistry();
13674
13674
  const I = ((O = this.activeToolCommand) == null ? void 0 : O.tool) === "layerCake" ? this.activeToolCommand : null;
13675
13675
  this.emitCakeEvent("tool:layer-cake:saved", {
13676
13676
  layerId: T,
13677
- featureCollection: v,
13677
+ featureCollection: b,
13678
13678
  source: I == null ? void 0 : I.source,
13679
13679
  groupId: I == null ? void 0 : I.groupId,
13680
13680
  commandId: I == null ? void 0 : I.commandId
13681
13681
  }), this.activeCakeSession = null, this.cakeSessionCommand = null, I && (this.completeActiveTool(
13682
- { featureIds: E, geometry: v },
13682
+ { featureIds: E, geometry: b },
13683
13683
  !0
13684
13684
  ), this.clearActiveTool(I));
13685
13685
  },
13686
13686
  this.measurementSystem,
13687
13687
  () => this.emitCakeEvent("tool:layer-cake:session-changed")
13688
13688
  );
13689
- const k = ((i = this.activeToolCommand) == null ? void 0 : i.tool) === "layerCake" ? this.activeToolCommand : null;
13689
+ const x = ((i = this.activeToolCommand) == null ? void 0 : i.tool) === "layerCake" ? this.activeToolCommand : null;
13690
13690
  this.emitCakeEvent("tool:layer-cake:session-started", {
13691
13691
  center: d.getLatLng(),
13692
13692
  radius: d.getRadius(),
13693
- source: k == null ? void 0 : k.source,
13694
- groupId: k == null ? void 0 : k.groupId,
13695
- commandId: k == null ? void 0 : k.commandId
13693
+ source: x == null ? void 0 : x.source,
13694
+ groupId: x == null ? void 0 : x.groupId,
13695
+ commandId: x == null ? void 0 : x.commandId
13696
13696
  });
13697
13697
  return;
13698
13698
  }
@@ -13705,8 +13705,8 @@ class fu {
13705
13705
  name: `${p} layer`,
13706
13706
  kind: "drawn"
13707
13707
  }), this.applyLayerRegistry(), (s = (a = this.options.callbacks) == null ? void 0 : a.onCreated) == null || s.call(a, { id: y, layerType: p, geoJSON: g });
13708
- const b = du[p];
13709
- b && this.emitToolEvent(b, {
13708
+ const v = du[p];
13709
+ v && this.emitToolEvent(v, {
13710
13710
  id: y,
13711
13711
  geoJSON: g
13712
13712
  }), ((c = this.activeToolCommand) == null ? void 0 : c.tool) === p && this.completeActiveTool({ featureIds: [y], geometry: g }, !0);
@@ -13929,13 +13929,13 @@ class fu {
13929
13929
  }
13930
13930
  findNearestVertex(o, e, r) {
13931
13931
  if (!this.map) return null;
13932
- const i = (y) => this.map.latLngToContainerPoint(y), a = (y, b) => Math.hypot(y.x - b.x, y.y - b.y), s = i(e);
13932
+ const i = (y) => this.map.latLngToContainerPoint(y), a = (y, v) => Math.hypot(y.x - v.x, y.y - v.y), s = i(e);
13933
13933
  let c = 1 / 0, d = -1, p = -1;
13934
13934
  const g = o.getLatLngs();
13935
- return (Array.isArray(g[0]) ? g : [g]).forEach((y, b) => {
13936
- y.forEach((k, v) => {
13937
- const x = i(k), E = a(x, s);
13938
- E < c && (c = E, d = b, p = v);
13935
+ return (Array.isArray(g[0]) ? g : [g]).forEach((y, v) => {
13936
+ y.forEach((x, b) => {
13937
+ const w = i(x), E = a(w, s);
13938
+ E < c && (c = E, d = v, p = b);
13939
13939
  });
13940
13940
  }), d === -1 || c > r ? null : { pathIndex: d, vertexIndex: p };
13941
13941
  }
@@ -13950,15 +13950,15 @@ class fu {
13950
13950
  if (g.splice(r, 1), p.length === 1)
13951
13951
  o.setLatLngs(g);
13952
13952
  else {
13953
- const k = p.map((v, x) => x === e ? g : v);
13954
- o.setLatLngs(k);
13953
+ const x = p.map((b, w) => w === e ? g : b);
13954
+ o.setLatLngs(x);
13955
13955
  }
13956
13956
  (i = o.redraw) == null || i.call(o);
13957
- const b = o._fid;
13958
- if (b) {
13959
- const k = o.toGeoJSON();
13960
- this.store.update(b, k), (s = (a = this.options.callbacks) == null ? void 0 : a.onEdited) == null || s.call(a, {
13961
- ids: [b],
13957
+ const v = o._fid;
13958
+ if (v) {
13959
+ const x = o.toGeoJSON();
13960
+ this.store.update(v, x), (s = (a = this.options.callbacks) == null ? void 0 : a.onEdited) == null || s.call(a, {
13961
+ ids: [v],
13962
13962
  geoJSON: this.store.toFeatureCollection()
13963
13963
  });
13964
13964
  }
@@ -13977,10 +13977,10 @@ class fu {
13977
13977
  if (!a) return;
13978
13978
  const s = a._modes || {};
13979
13979
  let c = null;
13980
- for (const b in s) {
13981
- const k = s[b];
13982
- if (((r = k == null ? void 0 : k.handler) == null ? void 0 : r.type) === "move") {
13983
- c = k.handler;
13980
+ for (const v in s) {
13981
+ const x = s[v];
13982
+ if (((r = x == null ? void 0 : x.handler) == null ? void 0 : r.type) === "move") {
13983
+ c = x.handler;
13984
13984
  break;
13985
13985
  }
13986
13986
  }
@@ -13989,18 +13989,18 @@ class fu {
13989
13989
  d.dataset.geokitMoveConfirmation = "", this.L.DomEvent.disableClickPropagation(d), this.L.DomEvent.disableScrollPropagation(d), d.style.position = "absolute";
13990
13990
  const p = this.container.getBoundingClientRect();
13991
13991
  let g = 60;
13992
- this.container.querySelectorAll("[data-geokit-managed-toolbar]").forEach((b) => {
13993
- var v;
13994
- const k = b.getBoundingClientRect();
13995
- k.width && k.height && ((v = b.dataset.geokitToolbarPosition) != null && v.startsWith("bottom")) && (g = Math.max(g, p.bottom - k.top + 8));
13992
+ this.container.querySelectorAll("[data-geokit-managed-toolbar]").forEach((v) => {
13993
+ var b;
13994
+ const x = v.getBoundingClientRect();
13995
+ x.width && x.height && ((b = v.dataset.geokitToolbarPosition) != null && b.startsWith("bottom")) && (g = Math.max(g, p.bottom - x.top + 8));
13996
13996
  }), d.style.bottom = `${g}px`, d.style.maxWidth = "calc(100% - 32px)", d.style.boxSizing = "border-box", d.style.left = "50%", d.style.transform = "translateX(-50%)", d.style.display = "flex", d.style.gap = "8px", d.style.background = "#fff", d.style.border = "2px solid #3388ff", d.style.borderRadius = "8px", d.style.padding = "12px 16px", d.style.boxShadow = "0 4px 12px rgba(0,0,0,0.2)", d.style.zIndex = "10000", d.style.fontSize = "14px", d.style.fontFamily = "system-ui, sans-serif";
13997
13997
  const m = document.createElement("button");
13998
- m.textContent = "✓ Save", m.style.minHeight = "44px", m.style.minWidth = "44px", m.style.whiteSpace = "nowrap", 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", (b) => {
13999
- b.stopPropagation(), b.preventDefault(), c != null && c.confirmMove && c.confirmMove();
13998
+ m.textContent = "✓ Save", m.style.minHeight = "44px", m.style.minWidth = "44px", m.style.whiteSpace = "nowrap", 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", (v) => {
13999
+ v.stopPropagation(), v.preventDefault(), c != null && c.confirmMove && c.confirmMove();
14000
14000
  });
14001
14001
  const y = document.createElement("button");
14002
- y.textContent = "✕ Cancel", y.style.minHeight = "44px", y.style.minWidth = "44px", y.style.whiteSpace = "nowrap", y.style.padding = "8px 16px", y.style.border = "1px solid #ccc", y.style.background = "#fff", y.style.color = "#333", y.style.borderRadius = "4px", y.style.cursor = "pointer", y.style.fontWeight = "600", y.style.fontSize = "14px", y.addEventListener("click", (b) => {
14003
- b.stopPropagation(), b.preventDefault(), this.emitToolEvent("tool:move:cancelled", {
14002
+ y.textContent = "✕ Cancel", y.style.minHeight = "44px", y.style.minWidth = "44px", y.style.whiteSpace = "nowrap", y.style.padding = "8px 16px", y.style.border = "1px solid #ccc", y.style.background = "#fff", y.style.color = "#333", y.style.borderRadius = "4px", y.style.cursor = "pointer", y.style.fontWeight = "600", y.style.fontSize = "14px", y.addEventListener("click", (v) => {
14003
+ v.stopPropagation(), v.preventDefault(), this.emitToolEvent("tool:move:cancelled", {
14004
14004
  layerId: o == null ? void 0 : o._fid
14005
14005
  }), c != null && c.cancelMove && c.cancelMove(), this.hideMoveConfirmationUI();
14006
14006
  }), d.appendChild(m), d.appendChild(y), this.container.appendChild(d), this.moveConfirmationUI = d, this.logger.debug("showMoveConfirmationUI", {
@@ -14658,25 +14658,25 @@ class rn extends HTMLElement {
14658
14658
  attribution: this._tileAttribution
14659
14659
  }, m = ec(g);
14660
14660
  if (!m.valid) {
14661
- const k = (r = m.error) != null && r.toLowerCase().includes("api key") ? "missing_api_key" : "tile_load_failed";
14661
+ const x = (r = m.error) != null && r.toLowerCase().includes("api key") ? "missing_api_key" : "tile_load_failed";
14662
14662
  this._handleTileProviderError(
14663
- k,
14663
+ x,
14664
14664
  (i = m.error) != null ? i : "Invalid tile provider configuration",
14665
14665
  p
14666
14666
  );
14667
14667
  return;
14668
14668
  }
14669
- const y = jo(g), b = this._activeTileProvider;
14669
+ const y = jo(g), v = this._activeTileProvider;
14670
14670
  e.setTileLayer(y, {
14671
- onTileError: (k) => {
14671
+ onTileError: (x) => {
14672
14672
  if (this._tileProvider !== p) return;
14673
- const v = this._describeTileLayerError(k, p), x = p === "here" ? this._resolveHereTileLayerErrorCode(v) : "tile_load_failed";
14674
- this._handleTileProviderError(x, v, p);
14673
+ const b = this._describeTileLayerError(x, p), w = p === "here" ? this._resolveHereTileLayerErrorCode(b) : "tile_load_failed";
14674
+ this._handleTileProviderError(w, b, p);
14675
14675
  }
14676
14676
  }), this._activeTileProvider = p, this._emitTileProviderChanged(
14677
14677
  p,
14678
14678
  this._tileStyle,
14679
- b
14679
+ v
14680
14680
  );
14681
14681
  return;
14682
14682
  }
@@ -15798,18 +15798,18 @@ function ku(l) {
15798
15798
  const d = e.externalLeaflet != null ? e.externalLeaflet ? "external" : "bundled" : l;
15799
15799
  wu(c, d), e.className ? c.setAttribute("class", e.className) : c.removeAttribute("class"), i ? c.setAttribute("style", i) : c.removeAttribute("style"), c.leafletInstance = e.leafletInstance, c.toolHooks = e.toolHooks, c.toolEventEmitter = e.toolEventEmitter, c.toolButtonConfig = e.toolButtonConfig, c.toolbarGroups = e.toolbarGroups, e.attributes && Lu(c, e.attributes);
15800
15800
  const p = async () => {
15801
- var y, b, k;
15801
+ var y, v, x;
15802
15802
  try {
15803
- const v = await c.getGeoJSON(), x = JSON.stringify(v);
15804
- (y = e.onChangeText) == null || y.call(e, x), (b = e.onChangeGeoJSON) == null || b.call(e, v);
15805
- } catch (v) {
15806
- (k = e.onError) == null || k.call(e, Do(v));
15803
+ const b = await c.getGeoJSON(), w = JSON.stringify(b);
15804
+ (y = e.onChangeText) == null || y.call(e, w), (v = e.onChangeGeoJSON) == null || v.call(e, b);
15805
+ } catch (b) {
15806
+ (x = e.onError) == null || x.call(e, Do(b));
15807
15807
  }
15808
15808
  }, g = () => {
15809
- var y, b;
15810
- (y = e.onReady) == null || y.call(e, c), (b = e.initialGeoJSONText) != null && b.trim() ? c.loadGeoJSONFromText(e.initialGeoJSONText).then(() => p()).catch((k) => {
15811
- var v;
15812
- return (v = e.onError) == null ? void 0 : v.call(e, Do(k));
15809
+ var y, v;
15810
+ (y = e.onReady) == null || y.call(e, c), (v = e.initialGeoJSONText) != null && v.trim() ? c.loadGeoJSONFromText(e.initialGeoJSONText).then(() => p()).catch((x) => {
15811
+ var b;
15812
+ return (b = e.onError) == null ? void 0 : b.call(e, Do(x));
15813
15813
  }) : p();
15814
15814
  }, m = () => {
15815
15815
  p();