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