@burdenoff/microfe-kadaikodi 2026.1126.2 → 2026.1127.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +12 -0
  2. package/dist/kadaikodi/components/CourierLocationSharingCard.d.ts +10 -0
  3. package/dist/kadaikodi/components/CourierLocationSharingCard.js +52 -0
  4. package/dist/kadaikodi/components/CourierLocationSharingCard.js.map +1 -0
  5. package/dist/kadaikodi/components/DropoffPinField.d.ts +16 -0
  6. package/dist/kadaikodi/components/DropoffPinField.js +67 -0
  7. package/dist/kadaikodi/components/DropoffPinField.js.map +1 -0
  8. package/dist/kadaikodi/components/LiveTrackingMap.d.ts +27 -0
  9. package/dist/kadaikodi/components/LiveTrackingMap.js +74 -0
  10. package/dist/kadaikodi/components/LiveTrackingMap.js.map +1 -0
  11. package/dist/kadaikodi/hooks/useCourierLocationSharing.d.ts +24 -0
  12. package/dist/kadaikodi/hooks/useCourierLocationSharing.js +54 -0
  13. package/dist/kadaikodi/hooks/useCourierLocationSharing.js.map +1 -0
  14. package/dist/kadaikodi/hooks/useTrackingApi.d.ts +63 -0
  15. package/dist/kadaikodi/hooks/useTrackingApi.js +37 -0
  16. package/dist/kadaikodi/hooks/useTrackingApi.js.map +1 -0
  17. package/dist/kadaikodi/pages/customer/CheckoutPage.js +222 -213
  18. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  19. package/dist/kadaikodi/pages/customer/OrderTrackingPage.d.ts +4 -0
  20. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +274 -252
  21. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  22. package/dist/kadaikodi/pages/customer/shared.d.ts +0 -13
  23. package/dist/kadaikodi/pages/customer/shared.js +16 -119
  24. package/dist/kadaikodi/pages/customer/shared.js.map +1 -1
  25. package/dist/kadaikodi/pages/worker/TaskDetailsPage.d.ts +3 -2
  26. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +67 -65
  27. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  28. package/dist/kadaikodi/utils/deviceGeolocation.d.ts +46 -0
  29. package/dist/kadaikodi/utils/deviceGeolocation.js +71 -0
  30. package/dist/kadaikodi/utils/deviceGeolocation.js.map +1 -0
  31. package/dist/kadaikodi/utils/leaflet.d.ts +8 -0
  32. package/dist/kadaikodi/utils/leaflet.js +11 -0
  33. package/dist/kadaikodi/utils/leaflet.js.map +1 -0
  34. package/dist/node_modules/leaflet/dist/leaflet-src.js +4535 -0
  35. package/dist/node_modules/leaflet/dist/leaflet-src.js.map +1 -0
  36. package/package.json +4 -1
@@ -0,0 +1,4535 @@
1
+ import { __commonJSMin as e } from "../../../_virtual/_rolldown/runtime.js";
2
+ // node_modules/leaflet/dist/leaflet-src.js
3
+ var t = /* @__PURE__ */ e(((e, t, n) => {
4
+ (function(n, r) {
5
+ typeof e == "object" && t !== void 0 ? r(e) : typeof define == "function" && define.amd ? define(["exports"], r) : (n = typeof globalThis < "u" ? globalThis : n || self, r(n.leaflet = {}));
6
+ })(n, (function(e) {
7
+ var t = "1.9.4";
8
+ function n(e) {
9
+ for (var t, n = 1, r = arguments.length, i; n < r; n++) for (t in i = arguments[n], i) e[t] = i[t];
10
+ return e;
11
+ }
12
+ var r = Object.create || (function() {
13
+ function e() {}
14
+ return function(t) {
15
+ return e.prototype = t, new e();
16
+ };
17
+ })();
18
+ function i(e, t) {
19
+ var n = Array.prototype.slice;
20
+ if (e.bind) return e.bind.apply(e, n.call(arguments, 1));
21
+ var r = n.call(arguments, 2);
22
+ return function() {
23
+ return e.apply(t, r.length ? r.concat(n.call(arguments)) : arguments);
24
+ };
25
+ }
26
+ var a = 0;
27
+ function o(e) {
28
+ return "_leaflet_id" in e || (e._leaflet_id = ++a), e._leaflet_id;
29
+ }
30
+ function s(e, t, n) {
31
+ var r, i, a, o = function() {
32
+ r = !1, i &&= (a.apply(n, i), !1);
33
+ };
34
+ return a = function() {
35
+ r ? i = arguments : (e.apply(n, arguments), setTimeout(o, t), r = !0);
36
+ }, a;
37
+ }
38
+ function c(e, t, n) {
39
+ var r = t[1], i = t[0], a = r - i;
40
+ return e === r && n ? e : ((e - i) % a + a) % a + i;
41
+ }
42
+ function l() {
43
+ return !1;
44
+ }
45
+ function u(e, t) {
46
+ if (t === !1) return e;
47
+ var n = 10 ** (t === void 0 ? 6 : t);
48
+ return Math.round(e * n) / n;
49
+ }
50
+ function d(e) {
51
+ return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "");
52
+ }
53
+ function f(e) {
54
+ return d(e).split(/\s+/);
55
+ }
56
+ function p(e, t) {
57
+ for (var n in Object.prototype.hasOwnProperty.call(e, "options") || (e.options = e.options ? r(e.options) : {}), t) e.options[n] = t[n];
58
+ return e.options;
59
+ }
60
+ function m(e, t, n) {
61
+ var r = [];
62
+ for (var i in e) r.push(encodeURIComponent(n ? i.toUpperCase() : i) + "=" + encodeURIComponent(e[i]));
63
+ return (!t || t.indexOf("?") === -1 ? "?" : "&") + r.join("&");
64
+ }
65
+ var ee = /\{ *([\w_ -]+) *\}/g;
66
+ function h(e, t) {
67
+ return e.replace(ee, function(e, n) {
68
+ var r = t[n];
69
+ if (r === void 0) throw Error("No value provided for variable " + e);
70
+ return typeof r == "function" && (r = r(t)), r;
71
+ });
72
+ }
73
+ var g = Array.isArray || function(e) {
74
+ return Object.prototype.toString.call(e) === "[object Array]";
75
+ };
76
+ function te(e, t) {
77
+ for (var n = 0; n < e.length; n++) if (e[n] === t) return n;
78
+ return -1;
79
+ }
80
+ var ne = "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";
81
+ function re(e) {
82
+ return window["webkit" + e] || window["moz" + e] || window["ms" + e];
83
+ }
84
+ var ie = 0;
85
+ function ae(e) {
86
+ var t = +/* @__PURE__ */ new Date(), n = Math.max(0, 16 - (t - ie));
87
+ return ie = t + n, window.setTimeout(e, n);
88
+ }
89
+ var oe = window.requestAnimationFrame || re("RequestAnimationFrame") || ae, se = window.cancelAnimationFrame || re("CancelAnimationFrame") || re("CancelRequestAnimationFrame") || function(e) {
90
+ window.clearTimeout(e);
91
+ };
92
+ function _(e, t, n) {
93
+ if (n && oe === ae) e.call(t);
94
+ else return oe.call(window, i(e, t));
95
+ }
96
+ function v(e) {
97
+ e && se.call(window, e);
98
+ }
99
+ var ce = {
100
+ __proto__: null,
101
+ extend: n,
102
+ create: r,
103
+ bind: i,
104
+ get lastId() {
105
+ return a;
106
+ },
107
+ stamp: o,
108
+ throttle: s,
109
+ wrapNum: c,
110
+ falseFn: l,
111
+ formatNum: u,
112
+ trim: d,
113
+ splitWords: f,
114
+ setOptions: p,
115
+ getParamString: m,
116
+ template: h,
117
+ isArray: g,
118
+ indexOf: te,
119
+ emptyImageUrl: ne,
120
+ requestFn: oe,
121
+ cancelFn: se,
122
+ requestAnimFrame: _,
123
+ cancelAnimFrame: v
124
+ };
125
+ function y() {}
126
+ y.extend = function(e) {
127
+ var t = function() {
128
+ p(this), this.initialize && this.initialize.apply(this, arguments), this.callInitHooks();
129
+ }, i = t.__super__ = this.prototype, a = r(i);
130
+ for (var o in a.constructor = t, t.prototype = a, this) Object.prototype.hasOwnProperty.call(this, o) && o !== "prototype" && o !== "__super__" && (t[o] = this[o]);
131
+ return e.statics && n(t, e.statics), e.includes && (le(e.includes), n.apply(null, [a].concat(e.includes))), n(a, e), delete a.statics, delete a.includes, a.options && (a.options = i.options ? r(i.options) : {}, n(a.options, e.options)), a._initHooks = [], a.callInitHooks = function() {
132
+ if (!this._initHooksCalled) {
133
+ i.callInitHooks && i.callInitHooks.call(this), this._initHooksCalled = !0;
134
+ for (var e = 0, t = a._initHooks.length; e < t; e++) a._initHooks[e].call(this);
135
+ }
136
+ }, t;
137
+ }, y.include = function(e) {
138
+ var t = this.prototype.options;
139
+ return n(this.prototype, e), e.options && (this.prototype.options = t, this.mergeOptions(e.options)), this;
140
+ }, y.mergeOptions = function(e) {
141
+ return n(this.prototype.options, e), this;
142
+ }, y.addInitHook = function(e) {
143
+ var t = Array.prototype.slice.call(arguments, 1), n = typeof e == "function" ? e : function() {
144
+ this[e].apply(this, t);
145
+ };
146
+ return this.prototype._initHooks = this.prototype._initHooks || [], this.prototype._initHooks.push(n), this;
147
+ };
148
+ function le(e) {
149
+ if (typeof L < "u" && L && L.Mixin) {
150
+ e = g(e) ? e : [e];
151
+ for (var t = 0; t < e.length; t++) e[t] === 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.", (/* @__PURE__ */ Error()).stack);
152
+ }
153
+ }
154
+ var b = {
155
+ on: function(e, t, n) {
156
+ if (typeof e == "object") for (var r in e) this._on(r, e[r], t);
157
+ else {
158
+ e = f(e);
159
+ for (var i = 0, a = e.length; i < a; i++) this._on(e[i], t, n);
160
+ }
161
+ return this;
162
+ },
163
+ off: function(e, t, n) {
164
+ if (!arguments.length) delete this._events;
165
+ else if (typeof e == "object") for (var r in e) this._off(r, e[r], t);
166
+ else {
167
+ e = f(e);
168
+ for (var i = arguments.length === 1, a = 0, o = e.length; a < o; a++) i ? this._off(e[a]) : this._off(e[a], t, n);
169
+ }
170
+ return this;
171
+ },
172
+ _on: function(e, t, n, r) {
173
+ if (typeof t != "function") console.warn("wrong listener type: " + typeof t);
174
+ else if (this._listens(e, t, n) === !1) {
175
+ n === this && (n = void 0);
176
+ var i = {
177
+ fn: t,
178
+ ctx: n
179
+ };
180
+ r && (i.once = !0), this._events = this._events || {}, this._events[e] = this._events[e] || [], this._events[e].push(i);
181
+ }
182
+ },
183
+ _off: function(e, t, n) {
184
+ var r, i, a;
185
+ if (this._events && (r = this._events[e], r)) {
186
+ if (arguments.length === 1) {
187
+ if (this._firingCount) for (i = 0, a = r.length; i < a; i++) r[i].fn = l;
188
+ delete this._events[e];
189
+ } else if (typeof t != "function") console.warn("wrong listener type: " + typeof t);
190
+ else {
191
+ var o = this._listens(e, t, n);
192
+ if (o !== !1) {
193
+ var s = r[o];
194
+ this._firingCount && (s.fn = l, this._events[e] = r = r.slice()), r.splice(o, 1);
195
+ }
196
+ }
197
+ }
198
+ },
199
+ fire: function(e, t, r) {
200
+ if (!this.listens(e, r)) return this;
201
+ var i = n({}, t, {
202
+ type: e,
203
+ target: this,
204
+ sourceTarget: t && t.sourceTarget || this
205
+ });
206
+ if (this._events) {
207
+ var a = this._events[e];
208
+ if (a) {
209
+ this._firingCount = this._firingCount + 1 || 1;
210
+ for (var o = 0, s = a.length; o < s; o++) {
211
+ var c = a[o], l = c.fn;
212
+ c.once && this.off(e, l, c.ctx), l.call(c.ctx || this, i);
213
+ }
214
+ this._firingCount--;
215
+ }
216
+ }
217
+ return r && this._propagateEvent(i), this;
218
+ },
219
+ listens: function(e, t, n, r) {
220
+ typeof e != "string" && console.warn("\"string\" type argument expected");
221
+ var i = t;
222
+ typeof t != "function" && (r = !!t, i = void 0, n = void 0);
223
+ var a = this._events && this._events[e];
224
+ if (a && a.length && this._listens(e, i, n) !== !1) return !0;
225
+ if (r) {
226
+ for (var o in this._eventParents) if (this._eventParents[o].listens(e, t, n, r)) return !0;
227
+ }
228
+ return !1;
229
+ },
230
+ _listens: function(e, t, n) {
231
+ if (!this._events) return !1;
232
+ var r = this._events[e] || [];
233
+ if (!t) return !!r.length;
234
+ n === this && (n = void 0);
235
+ for (var i = 0, a = r.length; i < a; i++) if (r[i].fn === t && r[i].ctx === n) return i;
236
+ return !1;
237
+ },
238
+ once: function(e, t, n) {
239
+ if (typeof e == "object") for (var r in e) this._on(r, e[r], t, !0);
240
+ else {
241
+ e = f(e);
242
+ for (var i = 0, a = e.length; i < a; i++) this._on(e[i], t, n, !0);
243
+ }
244
+ return this;
245
+ },
246
+ addEventParent: function(e) {
247
+ return this._eventParents = this._eventParents || {}, this._eventParents[o(e)] = e, this;
248
+ },
249
+ removeEventParent: function(e) {
250
+ return this._eventParents && delete this._eventParents[o(e)], this;
251
+ },
252
+ _propagateEvent: function(e) {
253
+ for (var t in this._eventParents) this._eventParents[t].fire(e.type, n({
254
+ layer: e.target,
255
+ propagatedFrom: e.target
256
+ }, e), !0);
257
+ }
258
+ };
259
+ b.addEventListener = b.on, b.removeEventListener = b.clearAllEventListeners = b.off, b.addOneTimeEventListener = b.once, b.fireEvent = b.fire, b.hasEventListeners = b.listens;
260
+ var ue = y.extend(b);
261
+ function x(e, t, n) {
262
+ this.x = n ? Math.round(e) : e, this.y = n ? Math.round(t) : t;
263
+ }
264
+ var de = Math.trunc || function(e) {
265
+ return e > 0 ? Math.floor(e) : Math.ceil(e);
266
+ };
267
+ x.prototype = {
268
+ clone: function() {
269
+ return new x(this.x, this.y);
270
+ },
271
+ add: function(e) {
272
+ return this.clone()._add(S(e));
273
+ },
274
+ _add: function(e) {
275
+ return this.x += e.x, this.y += e.y, this;
276
+ },
277
+ subtract: function(e) {
278
+ return this.clone()._subtract(S(e));
279
+ },
280
+ _subtract: function(e) {
281
+ return this.x -= e.x, this.y -= e.y, this;
282
+ },
283
+ divideBy: function(e) {
284
+ return this.clone()._divideBy(e);
285
+ },
286
+ _divideBy: function(e) {
287
+ return this.x /= e, this.y /= e, this;
288
+ },
289
+ multiplyBy: function(e) {
290
+ return this.clone()._multiplyBy(e);
291
+ },
292
+ _multiplyBy: function(e) {
293
+ return this.x *= e, this.y *= e, this;
294
+ },
295
+ scaleBy: function(e) {
296
+ return new x(this.x * e.x, this.y * e.y);
297
+ },
298
+ unscaleBy: function(e) {
299
+ return new x(this.x / e.x, this.y / e.y);
300
+ },
301
+ round: function() {
302
+ return this.clone()._round();
303
+ },
304
+ _round: function() {
305
+ return this.x = Math.round(this.x), this.y = Math.round(this.y), this;
306
+ },
307
+ floor: function() {
308
+ return this.clone()._floor();
309
+ },
310
+ _floor: function() {
311
+ return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this;
312
+ },
313
+ ceil: function() {
314
+ return this.clone()._ceil();
315
+ },
316
+ _ceil: function() {
317
+ return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this;
318
+ },
319
+ trunc: function() {
320
+ return this.clone()._trunc();
321
+ },
322
+ _trunc: function() {
323
+ return this.x = de(this.x), this.y = de(this.y), this;
324
+ },
325
+ distanceTo: function(e) {
326
+ e = S(e);
327
+ var t = e.x - this.x, n = e.y - this.y;
328
+ return Math.sqrt(t * t + n * n);
329
+ },
330
+ equals: function(e) {
331
+ return e = S(e), e.x === this.x && e.y === this.y;
332
+ },
333
+ contains: function(e) {
334
+ return e = S(e), Math.abs(e.x) <= Math.abs(this.x) && Math.abs(e.y) <= Math.abs(this.y);
335
+ },
336
+ toString: function() {
337
+ return "Point(" + u(this.x) + ", " + u(this.y) + ")";
338
+ }
339
+ };
340
+ function S(e, t, n) {
341
+ return e instanceof x ? e : g(e) ? new x(e[0], e[1]) : e == null ? e : typeof e == "object" && "x" in e && "y" in e ? new x(e.x, e.y) : new x(e, t, n);
342
+ }
343
+ function C(e, t) {
344
+ if (e) for (var n = t ? [e, t] : e, r = 0, i = n.length; r < i; r++) this.extend(n[r]);
345
+ }
346
+ C.prototype = {
347
+ extend: function(e) {
348
+ var t, n;
349
+ if (!e) return this;
350
+ if (e instanceof x || typeof e[0] == "number" || "x" in e) t = n = S(e);
351
+ else if (e = w(e), t = e.min, n = e.max, !t || !n) return this;
352
+ return !this.min && !this.max ? (this.min = t.clone(), this.max = n.clone()) : (this.min.x = Math.min(t.x, this.min.x), this.max.x = Math.max(n.x, this.max.x), this.min.y = Math.min(t.y, this.min.y), this.max.y = Math.max(n.y, this.max.y)), this;
353
+ },
354
+ getCenter: function(e) {
355
+ return S((this.min.x + this.max.x) / 2, (this.min.y + this.max.y) / 2, e);
356
+ },
357
+ getBottomLeft: function() {
358
+ return S(this.min.x, this.max.y);
359
+ },
360
+ getTopRight: function() {
361
+ return S(this.max.x, this.min.y);
362
+ },
363
+ getTopLeft: function() {
364
+ return this.min;
365
+ },
366
+ getBottomRight: function() {
367
+ return this.max;
368
+ },
369
+ getSize: function() {
370
+ return this.max.subtract(this.min);
371
+ },
372
+ contains: function(e) {
373
+ var t, n;
374
+ return e = typeof e[0] == "number" || e instanceof x ? S(e) : w(e), e instanceof C ? (t = e.min, n = e.max) : t = n = e, t.x >= this.min.x && n.x <= this.max.x && t.y >= this.min.y && n.y <= this.max.y;
375
+ },
376
+ intersects: function(e) {
377
+ e = w(e);
378
+ var t = this.min, n = this.max, r = e.min, i = e.max, a = i.x >= t.x && r.x <= n.x, o = i.y >= t.y && r.y <= n.y;
379
+ return a && o;
380
+ },
381
+ overlaps: function(e) {
382
+ e = w(e);
383
+ var t = this.min, n = this.max, r = e.min, i = e.max, a = i.x > t.x && r.x < n.x, o = i.y > t.y && r.y < n.y;
384
+ return a && o;
385
+ },
386
+ isValid: function() {
387
+ return !!(this.min && this.max);
388
+ },
389
+ pad: function(e) {
390
+ var t = this.min, n = this.max, r = Math.abs(t.x - n.x) * e, i = Math.abs(t.y - n.y) * e;
391
+ return w(S(t.x - r, t.y - i), S(n.x + r, n.y + i));
392
+ },
393
+ equals: function(e) {
394
+ return e ? (e = w(e), this.min.equals(e.getTopLeft()) && this.max.equals(e.getBottomRight())) : !1;
395
+ }
396
+ };
397
+ function w(e, t) {
398
+ return !e || e instanceof C ? e : new C(e, t);
399
+ }
400
+ function T(e, t) {
401
+ if (e) for (var n = t ? [e, t] : e, r = 0, i = n.length; r < i; r++) this.extend(n[r]);
402
+ }
403
+ T.prototype = {
404
+ extend: function(e) {
405
+ var t = this._southWest, n = this._northEast, r, i;
406
+ if (e instanceof D) r = e, i = e;
407
+ else if (e instanceof T) {
408
+ if (r = e._southWest, i = e._northEast, !r || !i) return this;
409
+ } else return e ? this.extend(O(e) || E(e)) : this;
410
+ return !t && !n ? (this._southWest = new D(r.lat, r.lng), this._northEast = new D(i.lat, i.lng)) : (t.lat = Math.min(r.lat, t.lat), t.lng = Math.min(r.lng, t.lng), n.lat = Math.max(i.lat, n.lat), n.lng = Math.max(i.lng, n.lng)), this;
411
+ },
412
+ pad: function(e) {
413
+ var t = this._southWest, n = this._northEast, r = Math.abs(t.lat - n.lat) * e, i = Math.abs(t.lng - n.lng) * e;
414
+ return new T(new D(t.lat - r, t.lng - i), new D(n.lat + r, n.lng + i));
415
+ },
416
+ getCenter: function() {
417
+ return new D((this._southWest.lat + this._northEast.lat) / 2, (this._southWest.lng + this._northEast.lng) / 2);
418
+ },
419
+ getSouthWest: function() {
420
+ return this._southWest;
421
+ },
422
+ getNorthEast: function() {
423
+ return this._northEast;
424
+ },
425
+ getNorthWest: function() {
426
+ return new D(this.getNorth(), this.getWest());
427
+ },
428
+ getSouthEast: function() {
429
+ return new D(this.getSouth(), this.getEast());
430
+ },
431
+ getWest: function() {
432
+ return this._southWest.lng;
433
+ },
434
+ getSouth: function() {
435
+ return this._southWest.lat;
436
+ },
437
+ getEast: function() {
438
+ return this._northEast.lng;
439
+ },
440
+ getNorth: function() {
441
+ return this._northEast.lat;
442
+ },
443
+ contains: function(e) {
444
+ e = typeof e[0] == "number" || e instanceof D || "lat" in e ? O(e) : E(e);
445
+ var t = this._southWest, n = this._northEast, r, i;
446
+ return e instanceof T ? (r = e.getSouthWest(), i = e.getNorthEast()) : r = i = e, r.lat >= t.lat && i.lat <= n.lat && r.lng >= t.lng && i.lng <= n.lng;
447
+ },
448
+ intersects: function(e) {
449
+ e = E(e);
450
+ var t = this._southWest, n = this._northEast, r = e.getSouthWest(), i = e.getNorthEast(), a = i.lat >= t.lat && r.lat <= n.lat, o = i.lng >= t.lng && r.lng <= n.lng;
451
+ return a && o;
452
+ },
453
+ overlaps: function(e) {
454
+ e = E(e);
455
+ var t = this._southWest, n = this._northEast, r = e.getSouthWest(), i = e.getNorthEast(), a = i.lat > t.lat && r.lat < n.lat, o = i.lng > t.lng && r.lng < n.lng;
456
+ return a && o;
457
+ },
458
+ toBBoxString: function() {
459
+ return [
460
+ this.getWest(),
461
+ this.getSouth(),
462
+ this.getEast(),
463
+ this.getNorth()
464
+ ].join(",");
465
+ },
466
+ equals: function(e, t) {
467
+ return e ? (e = E(e), this._southWest.equals(e.getSouthWest(), t) && this._northEast.equals(e.getNorthEast(), t)) : !1;
468
+ },
469
+ isValid: function() {
470
+ return !!(this._southWest && this._northEast);
471
+ }
472
+ };
473
+ function E(e, t) {
474
+ return e instanceof T ? e : new T(e, t);
475
+ }
476
+ function D(e, t, n) {
477
+ if (isNaN(e) || isNaN(t)) throw Error("Invalid LatLng object: (" + e + ", " + t + ")");
478
+ this.lat = +e, this.lng = +t, n !== void 0 && (this.alt = +n);
479
+ }
480
+ D.prototype = {
481
+ equals: function(e, t) {
482
+ return e ? (e = O(e), Math.max(Math.abs(this.lat - e.lat), Math.abs(this.lng - e.lng)) <= (t === void 0 ? 1e-9 : t)) : !1;
483
+ },
484
+ toString: function(e) {
485
+ return "LatLng(" + u(this.lat, e) + ", " + u(this.lng, e) + ")";
486
+ },
487
+ distanceTo: function(e) {
488
+ return A.distance(this, O(e));
489
+ },
490
+ wrap: function() {
491
+ return A.wrapLatLng(this);
492
+ },
493
+ toBounds: function(e) {
494
+ var t = 180 * e / 40075017, n = t / Math.cos(Math.PI / 180 * this.lat);
495
+ return E([this.lat - t, this.lng - n], [this.lat + t, this.lng + n]);
496
+ },
497
+ clone: function() {
498
+ return new D(this.lat, this.lng, this.alt);
499
+ }
500
+ };
501
+ function O(e, t, n) {
502
+ return e instanceof D ? e : g(e) && typeof e[0] != "object" ? e.length === 3 ? new D(e[0], e[1], e[2]) : e.length === 2 ? new D(e[0], e[1]) : null : e == null ? e : typeof e == "object" && "lat" in e ? new D(e.lat, "lng" in e ? e.lng : e.lon, e.alt) : t === void 0 ? null : new D(e, t, n);
503
+ }
504
+ var k = {
505
+ latLngToPoint: function(e, t) {
506
+ var n = this.projection.project(e), r = this.scale(t);
507
+ return this.transformation._transform(n, r);
508
+ },
509
+ pointToLatLng: function(e, t) {
510
+ var n = this.scale(t), r = this.transformation.untransform(e, n);
511
+ return this.projection.unproject(r);
512
+ },
513
+ project: function(e) {
514
+ return this.projection.project(e);
515
+ },
516
+ unproject: function(e) {
517
+ return this.projection.unproject(e);
518
+ },
519
+ scale: function(e) {
520
+ return 256 * 2 ** e;
521
+ },
522
+ zoom: function(e) {
523
+ return Math.log(e / 256) / Math.LN2;
524
+ },
525
+ getProjectedBounds: function(e) {
526
+ if (this.infinite) return null;
527
+ var t = this.projection.bounds, n = this.scale(e);
528
+ return new C(this.transformation.transform(t.min, n), this.transformation.transform(t.max, n));
529
+ },
530
+ infinite: !1,
531
+ wrapLatLng: function(e) {
532
+ var t = this.wrapLng ? c(e.lng, this.wrapLng, !0) : e.lng, n = this.wrapLat ? c(e.lat, this.wrapLat, !0) : e.lat, r = e.alt;
533
+ return new D(n, t, r);
534
+ },
535
+ wrapLatLngBounds: function(e) {
536
+ var t = e.getCenter(), n = this.wrapLatLng(t), r = t.lat - n.lat, i = t.lng - n.lng;
537
+ if (r === 0 && i === 0) return e;
538
+ var a = e.getSouthWest(), o = e.getNorthEast();
539
+ return new T(new D(a.lat - r, a.lng - i), new D(o.lat - r, o.lng - i));
540
+ }
541
+ }, A = n({}, k, {
542
+ wrapLng: [-180, 180],
543
+ R: 6371e3,
544
+ distance: function(e, t) {
545
+ var n = Math.PI / 180, r = e.lat * n, i = t.lat * n, a = Math.sin((t.lat - e.lat) * n / 2), o = Math.sin((t.lng - e.lng) * n / 2), s = a * a + Math.cos(r) * Math.cos(i) * o * o, c = 2 * Math.atan2(Math.sqrt(s), Math.sqrt(1 - s));
546
+ return this.R * c;
547
+ }
548
+ }), fe = 6378137, pe = {
549
+ R: fe,
550
+ MAX_LATITUDE: 85.0511287798,
551
+ project: function(e) {
552
+ var t = Math.PI / 180, n = this.MAX_LATITUDE, r = Math.max(Math.min(n, e.lat), -n), i = Math.sin(r * t);
553
+ return new x(this.R * e.lng * t, this.R * Math.log((1 + i) / (1 - i)) / 2);
554
+ },
555
+ unproject: function(e) {
556
+ var t = 180 / Math.PI;
557
+ return new D((2 * Math.atan(Math.exp(e.y / this.R)) - Math.PI / 2) * t, e.x * t / this.R);
558
+ },
559
+ bounds: (function() {
560
+ var e = fe * Math.PI;
561
+ return new C([-e, -e], [e, e]);
562
+ })()
563
+ };
564
+ function me(e, t, n, r) {
565
+ g(e) ? (this._a = e[0], this._b = e[1], this._c = e[2], this._d = e[3]) : (this._a = e, this._b = t, this._c = n, this._d = r);
566
+ }
567
+ me.prototype = {
568
+ transform: function(e, t) {
569
+ return this._transform(e.clone(), t);
570
+ },
571
+ _transform: function(e, t) {
572
+ return t ||= 1, e.x = t * (this._a * e.x + this._b), e.y = t * (this._c * e.y + this._d), e;
573
+ },
574
+ untransform: function(e, t) {
575
+ return t ||= 1, new x((e.x / t - this._b) / this._a, (e.y / t - this._d) / this._c);
576
+ }
577
+ };
578
+ function he(e, t, n, r) {
579
+ return new me(e, t, n, r);
580
+ }
581
+ var ge = n({}, A, {
582
+ code: "EPSG:3857",
583
+ projection: pe,
584
+ transformation: function() {
585
+ var e = .5 / (Math.PI * pe.R);
586
+ return he(e, .5, -e, .5);
587
+ }()
588
+ }), _e = n({}, ge, { code: "EPSG:900913" });
589
+ function ve(e) {
590
+ return document.createElementNS("http://www.w3.org/2000/svg", e);
591
+ }
592
+ function ye(e, t) {
593
+ for (var n = "", r = 0, i, a = e.length, o, s, c; r < a; r++) {
594
+ for (s = e[r], i = 0, o = s.length; i < o; i++) c = s[i], n += (i ? "L" : "M") + c.x + " " + c.y;
595
+ n += t ? M.svg ? "z" : "x" : "";
596
+ }
597
+ return n || "M0 0";
598
+ }
599
+ var be = document.documentElement.style, xe = "ActiveXObject" in window, Se = xe && !document.addEventListener, Ce = "msLaunchUri" in navigator && !("documentMode" in document), we = j("webkit"), Te = j("android"), Ee = j("android 2") || j("android 3"), De = parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10), Oe = Te && j("Google") && De < 537 && !("AudioNode" in window), ke = !!window.opera, Ae = !Ce && j("chrome"), je = j("gecko") && !we && !ke && !xe, Me = !Ae && j("safari"), Ne = j("phantom"), Pe = "OTransition" in be, Fe = navigator.platform.indexOf("Win") === 0, Ie = xe && "transition" in be, Le = "WebKitCSSMatrix" in window && "m11" in new window.WebKitCSSMatrix() && !Ee, Re = "MozPerspective" in be, ze = !window.L_DISABLE_3D && (Ie || Le || Re) && !Pe && !Ne, Be = typeof orientation < "u" || j("mobile"), Ve = Be && we, He = Be && Le, Ue = !window.PointerEvent && window.MSPointerEvent, We = !!(window.PointerEvent || Ue), Ge = "ontouchstart" in window || !!window.TouchEvent, Ke = !window.L_NO_TOUCH && (Ge || We), qe = Be && ke, Je = Be && je, Ye = (window.devicePixelRatio || window.screen.deviceXDPI / window.screen.logicalXDPI) > 1, Xe = function() {
600
+ var e = !1;
601
+ try {
602
+ var t = Object.defineProperty({}, "passive", { get: function() {
603
+ e = !0;
604
+ } });
605
+ window.addEventListener("testPassiveEventSupport", l, t), window.removeEventListener("testPassiveEventSupport", l, t);
606
+ } catch {}
607
+ return e;
608
+ }(), Ze = function() {
609
+ return !!document.createElement("canvas").getContext;
610
+ }(), Qe = !!(document.createElementNS && ve("svg").createSVGRect), $e = !!Qe && (function() {
611
+ var e = document.createElement("div");
612
+ return e.innerHTML = "<svg/>", (e.firstChild && e.firstChild.namespaceURI) === "http://www.w3.org/2000/svg";
613
+ })(), et = !Qe && function() {
614
+ try {
615
+ var e = document.createElement("div");
616
+ e.innerHTML = "<v:shape adj=\"1\"/>";
617
+ var t = e.firstChild;
618
+ return t.style.behavior = "url(#default#VML)", t && typeof t.adj == "object";
619
+ } catch {
620
+ return !1;
621
+ }
622
+ }(), tt = navigator.platform.indexOf("Mac") === 0, nt = navigator.platform.indexOf("Linux") === 0;
623
+ function j(e) {
624
+ return navigator.userAgent.toLowerCase().indexOf(e) >= 0;
625
+ }
626
+ var M = {
627
+ ie: xe,
628
+ ielt9: Se,
629
+ edge: Ce,
630
+ webkit: we,
631
+ android: Te,
632
+ android23: Ee,
633
+ androidStock: Oe,
634
+ opera: ke,
635
+ chrome: Ae,
636
+ gecko: je,
637
+ safari: Me,
638
+ phantom: Ne,
639
+ opera12: Pe,
640
+ win: Fe,
641
+ ie3d: Ie,
642
+ webkit3d: Le,
643
+ gecko3d: Re,
644
+ any3d: ze,
645
+ mobile: Be,
646
+ mobileWebkit: Ve,
647
+ mobileWebkit3d: He,
648
+ msPointer: Ue,
649
+ pointer: We,
650
+ touch: Ke,
651
+ touchNative: Ge,
652
+ mobileOpera: qe,
653
+ mobileGecko: Je,
654
+ retina: Ye,
655
+ passiveEvents: Xe,
656
+ canvas: Ze,
657
+ svg: Qe,
658
+ vml: et,
659
+ inlineSvg: $e,
660
+ mac: tt,
661
+ linux: nt
662
+ }, rt = M.msPointer ? "MSPointerDown" : "pointerdown", it = M.msPointer ? "MSPointerMove" : "pointermove", at = M.msPointer ? "MSPointerUp" : "pointerup", ot = M.msPointer ? "MSPointerCancel" : "pointercancel", st = {
663
+ touchstart: rt,
664
+ touchmove: it,
665
+ touchend: at,
666
+ touchcancel: ot
667
+ }, ct = {
668
+ touchstart: vt,
669
+ touchmove: _t,
670
+ touchend: _t,
671
+ touchcancel: _t
672
+ }, lt = {}, ut = !1;
673
+ function dt(e, t, n) {
674
+ return t === "touchstart" && gt(), ct[t] ? (n = ct[t].bind(this, n), e.addEventListener(st[t], n, !1), n) : (console.warn("wrong event specified:", t), l);
675
+ }
676
+ function ft(e, t, n) {
677
+ st[t] ? e.removeEventListener(st[t], n, !1) : console.warn("wrong event specified:", t);
678
+ }
679
+ function pt(e) {
680
+ lt[e.pointerId] = e;
681
+ }
682
+ function mt(e) {
683
+ lt[e.pointerId] && (lt[e.pointerId] = e);
684
+ }
685
+ function ht(e) {
686
+ delete lt[e.pointerId];
687
+ }
688
+ function gt() {
689
+ ut ||= (document.addEventListener(rt, pt, !0), document.addEventListener(it, mt, !0), document.addEventListener(at, ht, !0), document.addEventListener(ot, ht, !0), !0);
690
+ }
691
+ function _t(e, t) {
692
+ if (t.pointerType !== (t.MSPOINTER_TYPE_MOUSE || "mouse")) {
693
+ for (var n in t.touches = [], lt) t.touches.push(lt[n]);
694
+ t.changedTouches = [t], e(t);
695
+ }
696
+ }
697
+ function vt(e, t) {
698
+ t.MSPOINTER_TYPE_TOUCH && t.pointerType === t.MSPOINTER_TYPE_TOUCH && U(t), _t(e, t);
699
+ }
700
+ function yt(e) {
701
+ var t = {}, n, r;
702
+ for (r in e) n = e[r], t[r] = n && n.bind ? n.bind(e) : n;
703
+ return e = t, t.type = "dblclick", t.detail = 2, t.isTrusted = !1, t._simulated = !0, t;
704
+ }
705
+ var bt = 200;
706
+ function xt(e, t) {
707
+ e.addEventListener("dblclick", t);
708
+ var n = 0, r;
709
+ function i(e) {
710
+ if (e.detail !== 1) r = e.detail;
711
+ else if (!(e.pointerType === "mouse" || e.sourceCapabilities && !e.sourceCapabilities.firesTouchEvents)) {
712
+ var i = on(e);
713
+ if (!i.some(function(e) {
714
+ return e instanceof HTMLLabelElement && e.attributes.for;
715
+ }) || i.some(function(e) {
716
+ return e instanceof HTMLInputElement || e instanceof HTMLSelectElement;
717
+ })) {
718
+ var a = Date.now();
719
+ a - n <= bt ? (r++, r === 2 && t(yt(e))) : r = 1, n = a;
720
+ }
721
+ }
722
+ }
723
+ return e.addEventListener("click", i), {
724
+ dblclick: t,
725
+ simDblclick: i
726
+ };
727
+ }
728
+ function St(e, t) {
729
+ e.removeEventListener("dblclick", t.dblclick), e.removeEventListener("click", t.simDblclick);
730
+ }
731
+ var Ct = Ft([
732
+ "transform",
733
+ "webkitTransform",
734
+ "OTransform",
735
+ "MozTransform",
736
+ "msTransform"
737
+ ]), wt = Ft([
738
+ "webkitTransition",
739
+ "transition",
740
+ "OTransition",
741
+ "MozTransition",
742
+ "msTransition"
743
+ ]), Tt = wt === "webkitTransition" || wt === "OTransition" ? wt + "End" : "transitionend";
744
+ function Et(e) {
745
+ return typeof e == "string" ? document.getElementById(e) : e;
746
+ }
747
+ function Dt(e, t) {
748
+ var n = e.style[t] || e.currentStyle && e.currentStyle[t];
749
+ if ((!n || n === "auto") && document.defaultView) {
750
+ var r = document.defaultView.getComputedStyle(e, null);
751
+ n = r ? r[t] : null;
752
+ }
753
+ return n === "auto" ? null : n;
754
+ }
755
+ function N(e, t, n) {
756
+ var r = document.createElement(e);
757
+ return r.className = t || "", n && n.appendChild(r), r;
758
+ }
759
+ function P(e) {
760
+ var t = e.parentNode;
761
+ t && t.removeChild(e);
762
+ }
763
+ function Ot(e) {
764
+ for (; e.firstChild;) e.removeChild(e.firstChild);
765
+ }
766
+ function kt(e) {
767
+ var t = e.parentNode;
768
+ t && t.lastChild !== e && t.appendChild(e);
769
+ }
770
+ function At(e) {
771
+ var t = e.parentNode;
772
+ t && t.firstChild !== e && t.insertBefore(e, t.firstChild);
773
+ }
774
+ function jt(e, t) {
775
+ if (e.classList !== void 0) return e.classList.contains(t);
776
+ var n = Nt(e);
777
+ return n.length > 0 && RegExp("(^|\\s)" + t + "(\\s|$)").test(n);
778
+ }
779
+ function F(e, t) {
780
+ if (e.classList !== void 0) for (var n = f(t), r = 0, i = n.length; r < i; r++) e.classList.add(n[r]);
781
+ else if (!jt(e, t)) {
782
+ var a = Nt(e);
783
+ Mt(e, (a ? a + " " : "") + t);
784
+ }
785
+ }
786
+ function I(e, t) {
787
+ e.classList === void 0 ? Mt(e, d((" " + Nt(e) + " ").replace(" " + t + " ", " "))) : e.classList.remove(t);
788
+ }
789
+ function Mt(e, t) {
790
+ e.className.baseVal === void 0 ? e.className = t : e.className.baseVal = t;
791
+ }
792
+ function Nt(e) {
793
+ return e.correspondingElement && (e = e.correspondingElement), e.className.baseVal === void 0 ? e.className : e.className.baseVal;
794
+ }
795
+ function R(e, t) {
796
+ "opacity" in e.style ? e.style.opacity = t : "filter" in e.style && Pt(e, t);
797
+ }
798
+ function Pt(e, t) {
799
+ var n = !1, r = "DXImageTransform.Microsoft.Alpha";
800
+ try {
801
+ n = e.filters.item(r);
802
+ } catch {
803
+ if (t === 1) return;
804
+ }
805
+ t = Math.round(t * 100), n ? (n.Enabled = t !== 100, n.Opacity = t) : e.style.filter += " progid:" + r + "(opacity=" + t + ")";
806
+ }
807
+ function Ft(e) {
808
+ for (var t = document.documentElement.style, n = 0; n < e.length; n++) if (e[n] in t) return e[n];
809
+ return !1;
810
+ }
811
+ function It(e, t, n) {
812
+ var r = t || new x(0, 0);
813
+ e.style[Ct] = (M.ie3d ? "translate(" + r.x + "px," + r.y + "px)" : "translate3d(" + r.x + "px," + r.y + "px,0)") + (n ? " scale(" + n + ")" : "");
814
+ }
815
+ function z(e, t) {
816
+ e._leaflet_pos = t, M.any3d ? It(e, t) : (e.style.left = t.x + "px", e.style.top = t.y + "px");
817
+ }
818
+ function Lt(e) {
819
+ return e._leaflet_pos || new x(0, 0);
820
+ }
821
+ var Rt, zt, Bt;
822
+ if ("onselectstart" in document) Rt = function() {
823
+ B(window, "selectstart", U);
824
+ }, zt = function() {
825
+ H(window, "selectstart", U);
826
+ };
827
+ else {
828
+ var Vt = Ft([
829
+ "userSelect",
830
+ "WebkitUserSelect",
831
+ "OUserSelect",
832
+ "MozUserSelect",
833
+ "msUserSelect"
834
+ ]);
835
+ Rt = function() {
836
+ if (Vt) {
837
+ var e = document.documentElement.style;
838
+ Bt = e[Vt], e[Vt] = "none";
839
+ }
840
+ }, zt = function() {
841
+ Vt && (document.documentElement.style[Vt] = Bt, Bt = void 0);
842
+ };
843
+ }
844
+ function Ht() {
845
+ B(window, "dragstart", U);
846
+ }
847
+ function Ut() {
848
+ H(window, "dragstart", U);
849
+ }
850
+ var Wt, Gt;
851
+ function Kt(e) {
852
+ for (; e.tabIndex === -1;) e = e.parentNode;
853
+ e.style && (qt(), Wt = e, Gt = e.style.outlineStyle, e.style.outlineStyle = "none", B(window, "keydown", qt));
854
+ }
855
+ function qt() {
856
+ Wt && (Wt.style.outlineStyle = Gt, Wt = void 0, Gt = void 0, H(window, "keydown", qt));
857
+ }
858
+ function Jt(e) {
859
+ do
860
+ e = e.parentNode;
861
+ while ((!e.offsetWidth || !e.offsetHeight) && e !== document.body);
862
+ return e;
863
+ }
864
+ function Yt(e) {
865
+ var t = e.getBoundingClientRect();
866
+ return {
867
+ x: t.width / e.offsetWidth || 1,
868
+ y: t.height / e.offsetHeight || 1,
869
+ boundingClientRect: t
870
+ };
871
+ }
872
+ var Xt = {
873
+ __proto__: null,
874
+ TRANSFORM: Ct,
875
+ TRANSITION: wt,
876
+ TRANSITION_END: Tt,
877
+ get: Et,
878
+ getStyle: Dt,
879
+ create: N,
880
+ remove: P,
881
+ empty: Ot,
882
+ toFront: kt,
883
+ toBack: At,
884
+ hasClass: jt,
885
+ addClass: F,
886
+ removeClass: I,
887
+ setClass: Mt,
888
+ getClass: Nt,
889
+ setOpacity: R,
890
+ testProp: Ft,
891
+ setTransform: It,
892
+ setPosition: z,
893
+ getPosition: Lt,
894
+ get disableTextSelection() {
895
+ return Rt;
896
+ },
897
+ get enableTextSelection() {
898
+ return zt;
899
+ },
900
+ disableImageDrag: Ht,
901
+ enableImageDrag: Ut,
902
+ preventOutline: Kt,
903
+ restoreOutline: qt,
904
+ getSizedParentNode: Jt,
905
+ getScale: Yt
906
+ };
907
+ function B(e, t, n, r) {
908
+ if (t && typeof t == "object") for (var i in t) $t(e, i, t[i], n);
909
+ else {
910
+ t = f(t);
911
+ for (var a = 0, o = t.length; a < o; a++) $t(e, t[a], n, r);
912
+ }
913
+ return this;
914
+ }
915
+ var V = "_leaflet_events";
916
+ function H(e, t, n, r) {
917
+ if (arguments.length === 1) Zt(e), delete e[V];
918
+ else if (t && typeof t == "object") for (var i in t) en(e, i, t[i], n);
919
+ else if (t = f(t), arguments.length === 2) Zt(e, function(e) {
920
+ return te(t, e) !== -1;
921
+ });
922
+ else for (var a = 0, o = t.length; a < o; a++) en(e, t[a], n, r);
923
+ return this;
924
+ }
925
+ function Zt(e, t) {
926
+ for (var n in e[V]) {
927
+ var r = n.split(/\d/)[0];
928
+ (!t || t(r)) && en(e, r, null, null, n);
929
+ }
930
+ }
931
+ var Qt = {
932
+ mouseenter: "mouseover",
933
+ mouseleave: "mouseout",
934
+ wheel: !("onwheel" in window) && "mousewheel"
935
+ };
936
+ function $t(e, t, n, r) {
937
+ var i = t + o(n) + (r ? "_" + o(r) : "");
938
+ if (e[V] && e[V][i]) return this;
939
+ var a = function(t) {
940
+ return n.call(r || e, t || window.event);
941
+ }, s = a;
942
+ !M.touchNative && M.pointer && t.indexOf("touch") === 0 ? a = dt(e, t, a) : M.touch && t === "dblclick" ? a = xt(e, a) : "addEventListener" in e ? t === "touchstart" || t === "touchmove" || t === "wheel" || t === "mousewheel" ? e.addEventListener(Qt[t] || t, a, M.passiveEvents ? { passive: !1 } : !1) : t === "mouseenter" || t === "mouseleave" ? (a = function(t) {
943
+ t ||= window.event, un(e, t) && s(t);
944
+ }, e.addEventListener(Qt[t], a, !1)) : e.addEventListener(t, s, !1) : e.attachEvent("on" + t, a), e[V] = e[V] || {}, e[V][i] = a;
945
+ }
946
+ function en(e, t, n, r, i) {
947
+ i ||= t + o(n) + (r ? "_" + o(r) : "");
948
+ var a = e[V] && e[V][i];
949
+ if (!a) return this;
950
+ !M.touchNative && M.pointer && t.indexOf("touch") === 0 ? ft(e, t, a) : M.touch && t === "dblclick" ? St(e, a) : "removeEventListener" in e ? e.removeEventListener(Qt[t] || t, a, !1) : e.detachEvent("on" + t, a), e[V][i] = null;
951
+ }
952
+ function tn(e) {
953
+ return e.stopPropagation ? e.stopPropagation() : e.originalEvent ? e.originalEvent._stopped = !0 : e.cancelBubble = !0, this;
954
+ }
955
+ function nn(e) {
956
+ return $t(e, "wheel", tn), this;
957
+ }
958
+ function rn(e) {
959
+ return B(e, "mousedown touchstart dblclick contextmenu", tn), e._leaflet_disable_click = !0, this;
960
+ }
961
+ function U(e) {
962
+ return e.preventDefault ? e.preventDefault() : e.returnValue = !1, this;
963
+ }
964
+ function an(e) {
965
+ return U(e), tn(e), this;
966
+ }
967
+ function on(e) {
968
+ if (e.composedPath) return e.composedPath();
969
+ for (var t = [], n = e.target; n;) t.push(n), n = n.parentNode;
970
+ return t;
971
+ }
972
+ function sn(e, t) {
973
+ if (!t) return new x(e.clientX, e.clientY);
974
+ var n = Yt(t), r = n.boundingClientRect;
975
+ return new x((e.clientX - r.left) / n.x - t.clientLeft, (e.clientY - r.top) / n.y - t.clientTop);
976
+ }
977
+ var cn = M.linux && M.chrome ? window.devicePixelRatio : M.mac ? window.devicePixelRatio * 3 : window.devicePixelRatio > 0 ? 2 * window.devicePixelRatio : 1;
978
+ function ln(e) {
979
+ return M.edge ? e.wheelDeltaY / 2 : e.deltaY && e.deltaMode === 0 ? -e.deltaY / cn : e.deltaY && e.deltaMode === 1 ? -e.deltaY * 20 : e.deltaY && e.deltaMode === 2 ? -e.deltaY * 60 : e.deltaX || e.deltaZ ? 0 : e.wheelDelta ? (e.wheelDeltaY || e.wheelDelta) / 2 : e.detail && Math.abs(e.detail) < 32765 ? -e.detail * 20 : e.detail ? e.detail / -32765 * 60 : 0;
980
+ }
981
+ function un(e, t) {
982
+ var n = t.relatedTarget;
983
+ if (!n) return !0;
984
+ try {
985
+ for (; n && n !== e;) n = n.parentNode;
986
+ } catch {
987
+ return !1;
988
+ }
989
+ return n !== e;
990
+ }
991
+ var dn = {
992
+ __proto__: null,
993
+ on: B,
994
+ off: H,
995
+ stopPropagation: tn,
996
+ disableScrollPropagation: nn,
997
+ disableClickPropagation: rn,
998
+ preventDefault: U,
999
+ stop: an,
1000
+ getPropagationPath: on,
1001
+ getMousePosition: sn,
1002
+ getWheelDelta: ln,
1003
+ isExternalTarget: un,
1004
+ addListener: B,
1005
+ removeListener: H
1006
+ }, fn = ue.extend({
1007
+ run: function(e, t, n, r) {
1008
+ this.stop(), this._el = e, this._inProgress = !0, this._duration = n || .25, this._easeOutPower = 1 / Math.max(r || .5, .2), this._startPos = Lt(e), this._offset = t.subtract(this._startPos), this._startTime = +/* @__PURE__ */ new Date(), this.fire("start"), this._animate();
1009
+ },
1010
+ stop: function() {
1011
+ this._inProgress && (this._step(!0), this._complete());
1012
+ },
1013
+ _animate: function() {
1014
+ this._animId = _(this._animate, this), this._step();
1015
+ },
1016
+ _step: function(e) {
1017
+ var t = +/* @__PURE__ */ new Date() - this._startTime, n = this._duration * 1e3;
1018
+ t < n ? this._runFrame(this._easeOut(t / n), e) : (this._runFrame(1), this._complete());
1019
+ },
1020
+ _runFrame: function(e, t) {
1021
+ var n = this._startPos.add(this._offset.multiplyBy(e));
1022
+ t && n._round(), z(this._el, n), this.fire("step");
1023
+ },
1024
+ _complete: function() {
1025
+ v(this._animId), this._inProgress = !1, this.fire("end");
1026
+ },
1027
+ _easeOut: function(e) {
1028
+ return 1 - (1 - e) ** this._easeOutPower;
1029
+ }
1030
+ }), W = ue.extend({
1031
+ options: {
1032
+ crs: ge,
1033
+ center: void 0,
1034
+ zoom: void 0,
1035
+ minZoom: void 0,
1036
+ maxZoom: void 0,
1037
+ layers: [],
1038
+ maxBounds: void 0,
1039
+ renderer: void 0,
1040
+ zoomAnimation: !0,
1041
+ zoomAnimationThreshold: 4,
1042
+ fadeAnimation: !0,
1043
+ markerZoomAnimation: !0,
1044
+ transform3DLimit: 8388608,
1045
+ zoomSnap: 1,
1046
+ zoomDelta: 1,
1047
+ trackResize: !0
1048
+ },
1049
+ initialize: function(e, t) {
1050
+ t = p(this, t), this._handlers = [], this._layers = {}, this._zoomBoundLayers = {}, this._sizeChanged = !0, this._initContainer(e), this._initLayout(), this._onResize = i(this._onResize, this), this._initEvents(), t.maxBounds && this.setMaxBounds(t.maxBounds), t.zoom !== void 0 && (this._zoom = this._limitZoom(t.zoom)), t.center && t.zoom !== void 0 && this.setView(O(t.center), t.zoom, { reset: !0 }), this.callInitHooks(), this._zoomAnimated = wt && M.any3d && !M.mobileOpera && this.options.zoomAnimation, this._zoomAnimated && (this._createAnimProxy(), B(this._proxy, Tt, this._catchTransitionEnd, this)), this._addLayers(this.options.layers);
1051
+ },
1052
+ setView: function(e, t, r) {
1053
+ return t = t === void 0 ? this._zoom : this._limitZoom(t), e = this._limitCenter(O(e), t, this.options.maxBounds), r ||= {}, this._stop(), this._loaded && !r.reset && r !== !0 && (r.animate !== void 0 && (r.zoom = n({ animate: r.animate }, r.zoom), r.pan = n({
1054
+ animate: r.animate,
1055
+ duration: r.duration
1056
+ }, r.pan)), this._zoom === t ? this._tryAnimatedPan(e, r.pan) : this._tryAnimatedZoom && this._tryAnimatedZoom(e, t, r.zoom)) ? (clearTimeout(this._sizeTimer), this) : (this._resetView(e, t, r.pan && r.pan.noMoveStart), this);
1057
+ },
1058
+ setZoom: function(e, t) {
1059
+ return this._loaded ? this.setView(this.getCenter(), e, { zoom: t }) : (this._zoom = e, this);
1060
+ },
1061
+ zoomIn: function(e, t) {
1062
+ return e ||= M.any3d ? this.options.zoomDelta : 1, this.setZoom(this._zoom + e, t);
1063
+ },
1064
+ zoomOut: function(e, t) {
1065
+ return e ||= M.any3d ? this.options.zoomDelta : 1, this.setZoom(this._zoom - e, t);
1066
+ },
1067
+ setZoomAround: function(e, t, n) {
1068
+ var r = this.getZoomScale(t), i = this.getSize().divideBy(2), a = (e instanceof x ? e : this.latLngToContainerPoint(e)).subtract(i).multiplyBy(1 - 1 / r), o = this.containerPointToLatLng(i.add(a));
1069
+ return this.setView(o, t, { zoom: n });
1070
+ },
1071
+ _getBoundsCenterZoom: function(e, t) {
1072
+ t ||= {}, e = e.getBounds ? e.getBounds() : E(e);
1073
+ var n = S(t.paddingTopLeft || t.padding || [0, 0]), r = S(t.paddingBottomRight || t.padding || [0, 0]), i = this.getBoundsZoom(e, !1, n.add(r));
1074
+ if (i = typeof t.maxZoom == "number" ? Math.min(t.maxZoom, i) : i, i === Infinity) return {
1075
+ center: e.getCenter(),
1076
+ zoom: i
1077
+ };
1078
+ var a = r.subtract(n).divideBy(2), o = this.project(e.getSouthWest(), i), s = this.project(e.getNorthEast(), i);
1079
+ return {
1080
+ center: this.unproject(o.add(s).divideBy(2).add(a), i),
1081
+ zoom: i
1082
+ };
1083
+ },
1084
+ fitBounds: function(e, t) {
1085
+ if (e = E(e), !e.isValid()) throw Error("Bounds are not valid.");
1086
+ var n = this._getBoundsCenterZoom(e, t);
1087
+ return this.setView(n.center, n.zoom, t);
1088
+ },
1089
+ fitWorld: function(e) {
1090
+ return this.fitBounds([[-90, -180], [90, 180]], e);
1091
+ },
1092
+ panTo: function(e, t) {
1093
+ return this.setView(e, this._zoom, { pan: t });
1094
+ },
1095
+ panBy: function(e, t) {
1096
+ if (e = S(e).round(), t ||= {}, !e.x && !e.y) return this.fire("moveend");
1097
+ if (t.animate !== !0 && !this.getSize().contains(e)) return this._resetView(this.unproject(this.project(this.getCenter()).add(e)), this.getZoom()), this;
1098
+ if (this._panAnim || (this._panAnim = new fn(), this._panAnim.on({
1099
+ step: this._onPanTransitionStep,
1100
+ end: this._onPanTransitionEnd
1101
+ }, this)), t.noMoveStart || this.fire("movestart"), t.animate !== !1) {
1102
+ F(this._mapPane, "leaflet-pan-anim");
1103
+ var n = this._getMapPanePos().subtract(e).round();
1104
+ this._panAnim.run(this._mapPane, n, t.duration || .25, t.easeLinearity);
1105
+ } else this._rawPanBy(e), this.fire("move").fire("moveend");
1106
+ return this;
1107
+ },
1108
+ flyTo: function(e, t, n) {
1109
+ if (n ||= {}, n.animate === !1 || !M.any3d) return this.setView(e, t, n);
1110
+ this._stop();
1111
+ var r = this.project(this.getCenter()), i = this.project(e), a = this.getSize(), o = this._zoom;
1112
+ e = O(e), t = t === void 0 ? o : t;
1113
+ var s = Math.max(a.x, a.y), c = s * this.getZoomScale(o, t), l = i.distanceTo(r) || 1, u = 1.42, d = u * u;
1114
+ function f(e) {
1115
+ var t = e ? -1 : 1, n = e ? c : s, r = (c * c - s * s + t * d * d * l * l) / (2 * n * d * l), i = Math.sqrt(r * r + 1) - r;
1116
+ return i < 1e-9 ? -18 : Math.log(i);
1117
+ }
1118
+ function p(e) {
1119
+ return (Math.exp(e) - Math.exp(-e)) / 2;
1120
+ }
1121
+ function m(e) {
1122
+ return (Math.exp(e) + Math.exp(-e)) / 2;
1123
+ }
1124
+ function ee(e) {
1125
+ return p(e) / m(e);
1126
+ }
1127
+ var h = f(0);
1128
+ function g(e) {
1129
+ return s * (m(h) / m(h + u * e));
1130
+ }
1131
+ function te(e) {
1132
+ return s * (m(h) * ee(h + u * e) - p(h)) / d;
1133
+ }
1134
+ function ne(e) {
1135
+ return 1 - (1 - e) ** 1.5;
1136
+ }
1137
+ var re = Date.now(), ie = (f(1) - h) / u, ae = n.duration ? 1e3 * n.duration : 1e3 * ie * .8;
1138
+ function oe() {
1139
+ var n = (Date.now() - re) / ae, a = ne(n) * ie;
1140
+ n <= 1 ? (this._flyToFrame = _(oe, this), this._move(this.unproject(r.add(i.subtract(r).multiplyBy(te(a) / l)), o), this.getScaleZoom(s / g(a), o), { flyTo: !0 })) : this._move(e, t)._moveEnd(!0);
1141
+ }
1142
+ return this._moveStart(!0, n.noMoveStart), oe.call(this), this;
1143
+ },
1144
+ flyToBounds: function(e, t) {
1145
+ var n = this._getBoundsCenterZoom(e, t);
1146
+ return this.flyTo(n.center, n.zoom, t);
1147
+ },
1148
+ setMaxBounds: function(e) {
1149
+ return e = E(e), this.listens("moveend", this._panInsideMaxBounds) && this.off("moveend", this._panInsideMaxBounds), e.isValid() ? (this.options.maxBounds = e, this._loaded && this._panInsideMaxBounds(), this.on("moveend", this._panInsideMaxBounds)) : (this.options.maxBounds = null, this);
1150
+ },
1151
+ setMinZoom: function(e) {
1152
+ var t = this.options.minZoom;
1153
+ return this.options.minZoom = e, this._loaded && t !== e && (this.fire("zoomlevelschange"), this.getZoom() < this.options.minZoom) ? this.setZoom(e) : this;
1154
+ },
1155
+ setMaxZoom: function(e) {
1156
+ var t = this.options.maxZoom;
1157
+ return this.options.maxZoom = e, this._loaded && t !== e && (this.fire("zoomlevelschange"), this.getZoom() > this.options.maxZoom) ? this.setZoom(e) : this;
1158
+ },
1159
+ panInsideBounds: function(e, t) {
1160
+ this._enforcingBounds = !0;
1161
+ var n = this.getCenter(), r = this._limitCenter(n, this._zoom, E(e));
1162
+ return n.equals(r) || this.panTo(r, t), this._enforcingBounds = !1, this;
1163
+ },
1164
+ panInside: function(e, t) {
1165
+ t ||= {};
1166
+ var n = S(t.paddingTopLeft || t.padding || [0, 0]), r = S(t.paddingBottomRight || t.padding || [0, 0]), i = this.project(this.getCenter()), a = this.project(e), o = this.getPixelBounds(), s = w([o.min.add(n), o.max.subtract(r)]), c = s.getSize();
1167
+ if (!s.contains(a)) {
1168
+ this._enforcingBounds = !0;
1169
+ var l = a.subtract(s.getCenter()), u = s.extend(a).getSize().subtract(c);
1170
+ i.x += l.x < 0 ? -u.x : u.x, i.y += l.y < 0 ? -u.y : u.y, this.panTo(this.unproject(i), t), this._enforcingBounds = !1;
1171
+ }
1172
+ return this;
1173
+ },
1174
+ invalidateSize: function(e) {
1175
+ if (!this._loaded) return this;
1176
+ e = n({
1177
+ animate: !1,
1178
+ pan: !0
1179
+ }, e === !0 ? { animate: !0 } : e);
1180
+ var t = this.getSize();
1181
+ this._sizeChanged = !0, this._lastCenter = null;
1182
+ var r = this.getSize(), a = t.divideBy(2).round(), o = r.divideBy(2).round(), s = a.subtract(o);
1183
+ return !s.x && !s.y ? this : (e.animate && e.pan ? this.panBy(s) : (e.pan && this._rawPanBy(s), this.fire("move"), e.debounceMoveend ? (clearTimeout(this._sizeTimer), this._sizeTimer = setTimeout(i(this.fire, this, "moveend"), 200)) : this.fire("moveend")), this.fire("resize", {
1184
+ oldSize: t,
1185
+ newSize: r
1186
+ }));
1187
+ },
1188
+ stop: function() {
1189
+ return this.setZoom(this._limitZoom(this._zoom)), this.options.zoomSnap || this.fire("viewreset"), this._stop();
1190
+ },
1191
+ locate: function(e) {
1192
+ if (e = this._locateOptions = n({
1193
+ timeout: 1e4,
1194
+ watch: !1
1195
+ }, e), !("geolocation" in navigator)) return this._handleGeolocationError({
1196
+ code: 0,
1197
+ message: "Geolocation not supported."
1198
+ }), this;
1199
+ var t = i(this._handleGeolocationResponse, this), r = i(this._handleGeolocationError, this);
1200
+ return e.watch ? this._locationWatchId = navigator.geolocation.watchPosition(t, r, e) : navigator.geolocation.getCurrentPosition(t, r, e), this;
1201
+ },
1202
+ stopLocate: function() {
1203
+ return navigator.geolocation && navigator.geolocation.clearWatch && navigator.geolocation.clearWatch(this._locationWatchId), this._locateOptions && (this._locateOptions.setView = !1), this;
1204
+ },
1205
+ _handleGeolocationError: function(e) {
1206
+ if (this._container._leaflet_id) {
1207
+ var t = e.code, n = e.message || (t === 1 ? "permission denied" : t === 2 ? "position unavailable" : "timeout");
1208
+ this._locateOptions.setView && !this._loaded && this.fitWorld(), this.fire("locationerror", {
1209
+ code: t,
1210
+ message: "Geolocation error: " + n + "."
1211
+ });
1212
+ }
1213
+ },
1214
+ _handleGeolocationResponse: function(e) {
1215
+ if (this._container._leaflet_id) {
1216
+ var t = e.coords.latitude, n = e.coords.longitude, r = new D(t, n), i = r.toBounds(e.coords.accuracy * 2), a = this._locateOptions;
1217
+ if (a.setView) {
1218
+ var o = this.getBoundsZoom(i);
1219
+ this.setView(r, a.maxZoom ? Math.min(o, a.maxZoom) : o);
1220
+ }
1221
+ var s = {
1222
+ latlng: r,
1223
+ bounds: i,
1224
+ timestamp: e.timestamp
1225
+ };
1226
+ for (var c in e.coords) typeof e.coords[c] == "number" && (s[c] = e.coords[c]);
1227
+ this.fire("locationfound", s);
1228
+ }
1229
+ },
1230
+ addHandler: function(e, t) {
1231
+ if (!t) return this;
1232
+ var n = this[e] = new t(this);
1233
+ return this._handlers.push(n), this.options[e] && n.enable(), this;
1234
+ },
1235
+ remove: function() {
1236
+ if (this._initEvents(!0), this.options.maxBounds && this.off("moveend", this._panInsideMaxBounds), this._containerId !== this._container._leaflet_id) throw Error("Map container is being reused by another instance");
1237
+ try {
1238
+ delete this._container._leaflet_id, delete this._containerId;
1239
+ } catch {
1240
+ this._container._leaflet_id = void 0, this._containerId = void 0;
1241
+ }
1242
+ for (var e in this._locationWatchId !== void 0 && this.stopLocate(), this._stop(), P(this._mapPane), this._clearControlPos && this._clearControlPos(), this._resizeRequest &&= (v(this._resizeRequest), null), this._clearHandlers(), this._loaded && this.fire("unload"), this._layers) this._layers[e].remove();
1243
+ for (e in this._panes) P(this._panes[e]);
1244
+ return this._layers = [], this._panes = [], delete this._mapPane, delete this._renderer, this;
1245
+ },
1246
+ createPane: function(e, t) {
1247
+ var n = N("div", "leaflet-pane" + (e ? " leaflet-" + e.replace("Pane", "") + "-pane" : ""), t || this._mapPane);
1248
+ return e && (this._panes[e] = n), n;
1249
+ },
1250
+ getCenter: function() {
1251
+ return this._checkIfLoaded(), this._lastCenter && !this._moved() ? this._lastCenter.clone() : this.layerPointToLatLng(this._getCenterLayerPoint());
1252
+ },
1253
+ getZoom: function() {
1254
+ return this._zoom;
1255
+ },
1256
+ getBounds: function() {
1257
+ var e = this.getPixelBounds();
1258
+ return new T(this.unproject(e.getBottomLeft()), this.unproject(e.getTopRight()));
1259
+ },
1260
+ getMinZoom: function() {
1261
+ return this.options.minZoom === void 0 ? this._layersMinZoom || 0 : this.options.minZoom;
1262
+ },
1263
+ getMaxZoom: function() {
1264
+ return this.options.maxZoom === void 0 ? this._layersMaxZoom === void 0 ? Infinity : this._layersMaxZoom : this.options.maxZoom;
1265
+ },
1266
+ getBoundsZoom: function(e, t, n) {
1267
+ e = E(e), n = S(n || [0, 0]);
1268
+ var r = this.getZoom() || 0, i = this.getMinZoom(), a = this.getMaxZoom(), o = e.getNorthWest(), s = e.getSouthEast(), c = this.getSize().subtract(n), l = w(this.project(s, r), this.project(o, r)).getSize(), u = M.any3d ? this.options.zoomSnap : 1, d = c.x / l.x, f = c.y / l.y, p = t ? Math.max(d, f) : Math.min(d, f);
1269
+ return r = this.getScaleZoom(p, r), u && (r = Math.round(r / (u / 100)) * (u / 100), r = t ? Math.ceil(r / u) * u : Math.floor(r / u) * u), Math.max(i, Math.min(a, r));
1270
+ },
1271
+ getSize: function() {
1272
+ return (!this._size || this._sizeChanged) && (this._size = new x(this._container.clientWidth || 0, this._container.clientHeight || 0), this._sizeChanged = !1), this._size.clone();
1273
+ },
1274
+ getPixelBounds: function(e, t) {
1275
+ var n = this._getTopLeftPoint(e, t);
1276
+ return new C(n, n.add(this.getSize()));
1277
+ },
1278
+ getPixelOrigin: function() {
1279
+ return this._checkIfLoaded(), this._pixelOrigin;
1280
+ },
1281
+ getPixelWorldBounds: function(e) {
1282
+ return this.options.crs.getProjectedBounds(e === void 0 ? this.getZoom() : e);
1283
+ },
1284
+ getPane: function(e) {
1285
+ return typeof e == "string" ? this._panes[e] : e;
1286
+ },
1287
+ getPanes: function() {
1288
+ return this._panes;
1289
+ },
1290
+ getContainer: function() {
1291
+ return this._container;
1292
+ },
1293
+ getZoomScale: function(e, t) {
1294
+ var n = this.options.crs;
1295
+ return t = t === void 0 ? this._zoom : t, n.scale(e) / n.scale(t);
1296
+ },
1297
+ getScaleZoom: function(e, t) {
1298
+ var n = this.options.crs;
1299
+ t = t === void 0 ? this._zoom : t;
1300
+ var r = n.zoom(e * n.scale(t));
1301
+ return isNaN(r) ? Infinity : r;
1302
+ },
1303
+ project: function(e, t) {
1304
+ return t = t === void 0 ? this._zoom : t, this.options.crs.latLngToPoint(O(e), t);
1305
+ },
1306
+ unproject: function(e, t) {
1307
+ return t = t === void 0 ? this._zoom : t, this.options.crs.pointToLatLng(S(e), t);
1308
+ },
1309
+ layerPointToLatLng: function(e) {
1310
+ var t = S(e).add(this.getPixelOrigin());
1311
+ return this.unproject(t);
1312
+ },
1313
+ latLngToLayerPoint: function(e) {
1314
+ return this.project(O(e))._round()._subtract(this.getPixelOrigin());
1315
+ },
1316
+ wrapLatLng: function(e) {
1317
+ return this.options.crs.wrapLatLng(O(e));
1318
+ },
1319
+ wrapLatLngBounds: function(e) {
1320
+ return this.options.crs.wrapLatLngBounds(E(e));
1321
+ },
1322
+ distance: function(e, t) {
1323
+ return this.options.crs.distance(O(e), O(t));
1324
+ },
1325
+ containerPointToLayerPoint: function(e) {
1326
+ return S(e).subtract(this._getMapPanePos());
1327
+ },
1328
+ layerPointToContainerPoint: function(e) {
1329
+ return S(e).add(this._getMapPanePos());
1330
+ },
1331
+ containerPointToLatLng: function(e) {
1332
+ var t = this.containerPointToLayerPoint(S(e));
1333
+ return this.layerPointToLatLng(t);
1334
+ },
1335
+ latLngToContainerPoint: function(e) {
1336
+ return this.layerPointToContainerPoint(this.latLngToLayerPoint(O(e)));
1337
+ },
1338
+ mouseEventToContainerPoint: function(e) {
1339
+ return sn(e, this._container);
1340
+ },
1341
+ mouseEventToLayerPoint: function(e) {
1342
+ return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e));
1343
+ },
1344
+ mouseEventToLatLng: function(e) {
1345
+ return this.layerPointToLatLng(this.mouseEventToLayerPoint(e));
1346
+ },
1347
+ _initContainer: function(e) {
1348
+ var t = this._container = Et(e);
1349
+ if (!t) throw Error("Map container not found.");
1350
+ if (t._leaflet_id) throw Error("Map container is already initialized.");
1351
+ B(t, "scroll", this._onScroll, this), this._containerId = o(t);
1352
+ },
1353
+ _initLayout: function() {
1354
+ var e = this._container;
1355
+ this._fadeAnimated = this.options.fadeAnimation && M.any3d, F(e, "leaflet-container" + (M.touch ? " leaflet-touch" : "") + (M.retina ? " leaflet-retina" : "") + (M.ielt9 ? " leaflet-oldie" : "") + (M.safari ? " leaflet-safari" : "") + (this._fadeAnimated ? " leaflet-fade-anim" : ""));
1356
+ var t = Dt(e, "position");
1357
+ t !== "absolute" && t !== "relative" && t !== "fixed" && t !== "sticky" && (e.style.position = "relative"), this._initPanes(), this._initControlPos && this._initControlPos();
1358
+ },
1359
+ _initPanes: function() {
1360
+ var e = this._panes = {};
1361
+ this._paneRenderers = {}, this._mapPane = this.createPane("mapPane", this._container), z(this._mapPane, new x(0, 0)), this.createPane("tilePane"), this.createPane("overlayPane"), this.createPane("shadowPane"), this.createPane("markerPane"), this.createPane("tooltipPane"), this.createPane("popupPane"), this.options.markerZoomAnimation || (F(e.markerPane, "leaflet-zoom-hide"), F(e.shadowPane, "leaflet-zoom-hide"));
1362
+ },
1363
+ _resetView: function(e, t, n) {
1364
+ z(this._mapPane, new x(0, 0));
1365
+ var r = !this._loaded;
1366
+ this._loaded = !0, t = this._limitZoom(t), this.fire("viewprereset");
1367
+ var i = this._zoom !== t;
1368
+ this._moveStart(i, n)._move(e, t)._moveEnd(i), this.fire("viewreset"), r && this.fire("load");
1369
+ },
1370
+ _moveStart: function(e, t) {
1371
+ return e && this.fire("zoomstart"), t || this.fire("movestart"), this;
1372
+ },
1373
+ _move: function(e, t, n, r) {
1374
+ t === void 0 && (t = this._zoom);
1375
+ var i = this._zoom !== t;
1376
+ return this._zoom = t, this._lastCenter = e, this._pixelOrigin = this._getNewPixelOrigin(e), r ? n && n.pinch && this.fire("zoom", n) : ((i || n && n.pinch) && this.fire("zoom", n), this.fire("move", n)), this;
1377
+ },
1378
+ _moveEnd: function(e) {
1379
+ return e && this.fire("zoomend"), this.fire("moveend");
1380
+ },
1381
+ _stop: function() {
1382
+ return v(this._flyToFrame), this._panAnim && this._panAnim.stop(), this;
1383
+ },
1384
+ _rawPanBy: function(e) {
1385
+ z(this._mapPane, this._getMapPanePos().subtract(e));
1386
+ },
1387
+ _getZoomSpan: function() {
1388
+ return this.getMaxZoom() - this.getMinZoom();
1389
+ },
1390
+ _panInsideMaxBounds: function() {
1391
+ this._enforcingBounds || this.panInsideBounds(this.options.maxBounds);
1392
+ },
1393
+ _checkIfLoaded: function() {
1394
+ if (!this._loaded) throw Error("Set map center and zoom first.");
1395
+ },
1396
+ _initEvents: function(e) {
1397
+ this._targets = {}, this._targets[o(this._container)] = this;
1398
+ var t = e ? H : B;
1399
+ t(this._container, "click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup", this._handleDOMEvent, this), this.options.trackResize && t(window, "resize", this._onResize, this), M.any3d && this.options.transform3DLimit && (e ? this.off : this.on).call(this, "moveend", this._onMoveEnd);
1400
+ },
1401
+ _onResize: function() {
1402
+ v(this._resizeRequest), this._resizeRequest = _(function() {
1403
+ this.invalidateSize({ debounceMoveend: !0 });
1404
+ }, this);
1405
+ },
1406
+ _onScroll: function() {
1407
+ this._container.scrollTop = 0, this._container.scrollLeft = 0;
1408
+ },
1409
+ _onMoveEnd: function() {
1410
+ var e = this._getMapPanePos();
1411
+ Math.max(Math.abs(e.x), Math.abs(e.y)) >= this.options.transform3DLimit && this._resetView(this.getCenter(), this.getZoom());
1412
+ },
1413
+ _findEventTargets: function(e, t) {
1414
+ for (var n = [], r, i = t === "mouseout" || t === "mouseover", a = e.target || e.srcElement, s = !1; a;) {
1415
+ if (r = this._targets[o(a)], r && (t === "click" || t === "preclick") && this._draggableMoved(r)) {
1416
+ s = !0;
1417
+ break;
1418
+ }
1419
+ if (r && r.listens(t, !0) && (i && !un(a, e) || (n.push(r), i)) || a === this._container) break;
1420
+ a = a.parentNode;
1421
+ }
1422
+ return !n.length && !s && !i && this.listens(t, !0) && (n = [this]), n;
1423
+ },
1424
+ _isClickDisabled: function(e) {
1425
+ for (; e && e !== this._container;) {
1426
+ if (e._leaflet_disable_click) return !0;
1427
+ e = e.parentNode;
1428
+ }
1429
+ },
1430
+ _handleDOMEvent: function(e) {
1431
+ var t = e.target || e.srcElement;
1432
+ if (!(!this._loaded || t._leaflet_disable_events || e.type === "click" && this._isClickDisabled(t))) {
1433
+ var n = e.type;
1434
+ n === "mousedown" && Kt(t), this._fireDOMEvent(e, n);
1435
+ }
1436
+ },
1437
+ _mouseEvents: [
1438
+ "click",
1439
+ "dblclick",
1440
+ "mouseover",
1441
+ "mouseout",
1442
+ "contextmenu"
1443
+ ],
1444
+ _fireDOMEvent: function(e, t, r) {
1445
+ if (e.type === "click") {
1446
+ var i = n({}, e);
1447
+ i.type = "preclick", this._fireDOMEvent(i, i.type, r);
1448
+ }
1449
+ var a = this._findEventTargets(e, t);
1450
+ if (r) {
1451
+ for (var o = [], s = 0; s < r.length; s++) r[s].listens(t, !0) && o.push(r[s]);
1452
+ a = o.concat(a);
1453
+ }
1454
+ if (a.length) {
1455
+ t === "contextmenu" && U(e);
1456
+ var c = a[0], l = { originalEvent: e };
1457
+ if (e.type !== "keypress" && e.type !== "keydown" && e.type !== "keyup") {
1458
+ var u = c.getLatLng && (!c._radius || c._radius <= 10);
1459
+ l.containerPoint = u ? this.latLngToContainerPoint(c.getLatLng()) : this.mouseEventToContainerPoint(e), l.layerPoint = this.containerPointToLayerPoint(l.containerPoint), l.latlng = u ? c.getLatLng() : this.layerPointToLatLng(l.layerPoint);
1460
+ }
1461
+ for (s = 0; s < a.length; s++) if (a[s].fire(t, l, !0), l.originalEvent._stopped || a[s].options.bubblingMouseEvents === !1 && te(this._mouseEvents, t) !== -1) return;
1462
+ }
1463
+ },
1464
+ _draggableMoved: function(e) {
1465
+ return e = e.dragging && e.dragging.enabled() ? e : this, e.dragging && e.dragging.moved() || this.boxZoom && this.boxZoom.moved();
1466
+ },
1467
+ _clearHandlers: function() {
1468
+ for (var e = 0, t = this._handlers.length; e < t; e++) this._handlers[e].disable();
1469
+ },
1470
+ whenReady: function(e, t) {
1471
+ return this._loaded ? e.call(t || this, { target: this }) : this.on("load", e, t), this;
1472
+ },
1473
+ _getMapPanePos: function() {
1474
+ return Lt(this._mapPane) || new x(0, 0);
1475
+ },
1476
+ _moved: function() {
1477
+ var e = this._getMapPanePos();
1478
+ return e && !e.equals([0, 0]);
1479
+ },
1480
+ _getTopLeftPoint: function(e, t) {
1481
+ return (e && t !== void 0 ? this._getNewPixelOrigin(e, t) : this.getPixelOrigin()).subtract(this._getMapPanePos());
1482
+ },
1483
+ _getNewPixelOrigin: function(e, t) {
1484
+ var n = this.getSize()._divideBy(2);
1485
+ return this.project(e, t)._subtract(n)._add(this._getMapPanePos())._round();
1486
+ },
1487
+ _latLngToNewLayerPoint: function(e, t, n) {
1488
+ var r = this._getNewPixelOrigin(n, t);
1489
+ return this.project(e, t)._subtract(r);
1490
+ },
1491
+ _latLngBoundsToNewLayerBounds: function(e, t, n) {
1492
+ var r = this._getNewPixelOrigin(n, t);
1493
+ return w([
1494
+ this.project(e.getSouthWest(), t)._subtract(r),
1495
+ this.project(e.getNorthWest(), t)._subtract(r),
1496
+ this.project(e.getSouthEast(), t)._subtract(r),
1497
+ this.project(e.getNorthEast(), t)._subtract(r)
1498
+ ]);
1499
+ },
1500
+ _getCenterLayerPoint: function() {
1501
+ return this.containerPointToLayerPoint(this.getSize()._divideBy(2));
1502
+ },
1503
+ _getCenterOffset: function(e) {
1504
+ return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint());
1505
+ },
1506
+ _limitCenter: function(e, t, n) {
1507
+ if (!n) return e;
1508
+ var r = this.project(e, t), i = this.getSize().divideBy(2), a = new C(r.subtract(i), r.add(i)), o = this._getBoundsOffset(a, n, t);
1509
+ return Math.abs(o.x) <= 1 && Math.abs(o.y) <= 1 ? e : this.unproject(r.add(o), t);
1510
+ },
1511
+ _limitOffset: function(e, t) {
1512
+ if (!t) return e;
1513
+ var n = this.getPixelBounds(), r = new C(n.min.add(e), n.max.add(e));
1514
+ return e.add(this._getBoundsOffset(r, t));
1515
+ },
1516
+ _getBoundsOffset: function(e, t, n) {
1517
+ var r = w(this.project(t.getNorthEast(), n), this.project(t.getSouthWest(), n)), i = r.min.subtract(e.min), a = r.max.subtract(e.max);
1518
+ return new x(this._rebound(i.x, -a.x), this._rebound(i.y, -a.y));
1519
+ },
1520
+ _rebound: function(e, t) {
1521
+ return e + t > 0 ? Math.round(e - t) / 2 : Math.max(0, Math.ceil(e)) - Math.max(0, Math.floor(t));
1522
+ },
1523
+ _limitZoom: function(e) {
1524
+ var t = this.getMinZoom(), n = this.getMaxZoom(), r = M.any3d ? this.options.zoomSnap : 1;
1525
+ return r && (e = Math.round(e / r) * r), Math.max(t, Math.min(n, e));
1526
+ },
1527
+ _onPanTransitionStep: function() {
1528
+ this.fire("move");
1529
+ },
1530
+ _onPanTransitionEnd: function() {
1531
+ I(this._mapPane, "leaflet-pan-anim"), this.fire("moveend");
1532
+ },
1533
+ _tryAnimatedPan: function(e, t) {
1534
+ var n = this._getCenterOffset(e)._trunc();
1535
+ return (t && t.animate) !== !0 && !this.getSize().contains(n) ? !1 : (this.panBy(n, t), !0);
1536
+ },
1537
+ _createAnimProxy: function() {
1538
+ var e = this._proxy = N("div", "leaflet-proxy leaflet-zoom-animated");
1539
+ this._panes.mapPane.appendChild(e), this.on("zoomanim", function(e) {
1540
+ var t = Ct, n = this._proxy.style[t];
1541
+ It(this._proxy, this.project(e.center, e.zoom), this.getZoomScale(e.zoom, 1)), n === this._proxy.style[t] && this._animatingZoom && this._onZoomTransitionEnd();
1542
+ }, this), this.on("load moveend", this._animMoveEnd, this), this._on("unload", this._destroyAnimProxy, this);
1543
+ },
1544
+ _destroyAnimProxy: function() {
1545
+ P(this._proxy), this.off("load moveend", this._animMoveEnd, this), delete this._proxy;
1546
+ },
1547
+ _animMoveEnd: function() {
1548
+ var e = this.getCenter(), t = this.getZoom();
1549
+ It(this._proxy, this.project(e, t), this.getZoomScale(t, 1));
1550
+ },
1551
+ _catchTransitionEnd: function(e) {
1552
+ this._animatingZoom && e.propertyName.indexOf("transform") >= 0 && this._onZoomTransitionEnd();
1553
+ },
1554
+ _nothingToAnimate: function() {
1555
+ return !this._container.getElementsByClassName("leaflet-zoom-animated").length;
1556
+ },
1557
+ _tryAnimatedZoom: function(e, t, n) {
1558
+ if (this._animatingZoom) return !0;
1559
+ if (n ||= {}, !this._zoomAnimated || n.animate === !1 || this._nothingToAnimate() || Math.abs(t - this._zoom) > this.options.zoomAnimationThreshold) return !1;
1560
+ var r = this.getZoomScale(t), i = this._getCenterOffset(e)._divideBy(1 - 1 / r);
1561
+ return n.animate !== !0 && !this.getSize().contains(i) ? !1 : (_(function() {
1562
+ this._moveStart(!0, n.noMoveStart || !1)._animateZoom(e, t, !0);
1563
+ }, this), !0);
1564
+ },
1565
+ _animateZoom: function(e, t, n, r) {
1566
+ this._mapPane && (n && (this._animatingZoom = !0, this._animateToCenter = e, this._animateToZoom = t, F(this._mapPane, "leaflet-zoom-anim")), this.fire("zoomanim", {
1567
+ center: e,
1568
+ zoom: t,
1569
+ noUpdate: r
1570
+ }), this._tempFireZoomEvent ||= this._zoom !== this._animateToZoom, this._move(this._animateToCenter, this._animateToZoom, void 0, !0), setTimeout(i(this._onZoomTransitionEnd, this), 250));
1571
+ },
1572
+ _onZoomTransitionEnd: function() {
1573
+ this._animatingZoom && (this._mapPane && I(this._mapPane, "leaflet-zoom-anim"), this._animatingZoom = !1, this._move(this._animateToCenter, this._animateToZoom, void 0, !0), this._tempFireZoomEvent && this.fire("zoom"), delete this._tempFireZoomEvent, this.fire("move"), this._moveEnd(!0));
1574
+ }
1575
+ });
1576
+ function pn(e, t) {
1577
+ return new W(e, t);
1578
+ }
1579
+ var G = y.extend({
1580
+ options: { position: "topright" },
1581
+ initialize: function(e) {
1582
+ p(this, e);
1583
+ },
1584
+ getPosition: function() {
1585
+ return this.options.position;
1586
+ },
1587
+ setPosition: function(e) {
1588
+ var t = this._map;
1589
+ return t && t.removeControl(this), this.options.position = e, t && t.addControl(this), this;
1590
+ },
1591
+ getContainer: function() {
1592
+ return this._container;
1593
+ },
1594
+ addTo: function(e) {
1595
+ this.remove(), this._map = e;
1596
+ var t = this._container = this.onAdd(e), n = this.getPosition(), r = e._controlCorners[n];
1597
+ return F(t, "leaflet-control"), n.indexOf("bottom") === -1 ? r.appendChild(t) : r.insertBefore(t, r.firstChild), this._map.on("unload", this.remove, this), this;
1598
+ },
1599
+ remove: function() {
1600
+ return this._map &&= (P(this._container), this.onRemove && this.onRemove(this._map), this._map.off("unload", this.remove, this), null), this;
1601
+ },
1602
+ _refocusOnMap: function(e) {
1603
+ this._map && e && e.screenX > 0 && e.screenY > 0 && this._map.getContainer().focus();
1604
+ }
1605
+ }), mn = function(e) {
1606
+ return new G(e);
1607
+ };
1608
+ W.include({
1609
+ addControl: function(e) {
1610
+ return e.addTo(this), this;
1611
+ },
1612
+ removeControl: function(e) {
1613
+ return e.remove(), this;
1614
+ },
1615
+ _initControlPos: function() {
1616
+ var e = this._controlCorners = {}, t = "leaflet-", n = this._controlContainer = N("div", t + "control-container", this._container);
1617
+ function r(r, i) {
1618
+ var a = t + r + " " + t + i;
1619
+ e[r + i] = N("div", a, n);
1620
+ }
1621
+ r("top", "left"), r("top", "right"), r("bottom", "left"), r("bottom", "right");
1622
+ },
1623
+ _clearControlPos: function() {
1624
+ for (var e in this._controlCorners) P(this._controlCorners[e]);
1625
+ P(this._controlContainer), delete this._controlCorners, delete this._controlContainer;
1626
+ }
1627
+ });
1628
+ var hn = G.extend({
1629
+ options: {
1630
+ collapsed: !0,
1631
+ position: "topright",
1632
+ autoZIndex: !0,
1633
+ hideSingleBase: !1,
1634
+ sortLayers: !1,
1635
+ sortFunction: function(e, t, n, r) {
1636
+ return n < r ? -1 : +(r < n);
1637
+ }
1638
+ },
1639
+ initialize: function(e, t, n) {
1640
+ for (var r in p(this, n), this._layerControlInputs = [], this._layers = [], this._lastZIndex = 0, this._handlingClick = !1, this._preventClick = !1, e) this._addLayer(e[r], r);
1641
+ for (r in t) this._addLayer(t[r], r, !0);
1642
+ },
1643
+ onAdd: function(e) {
1644
+ this._initLayout(), this._update(), this._map = e, e.on("zoomend", this._checkDisabledLayers, this);
1645
+ for (var t = 0; t < this._layers.length; t++) this._layers[t].layer.on("add remove", this._onLayerChange, this);
1646
+ return this._container;
1647
+ },
1648
+ addTo: function(e) {
1649
+ return G.prototype.addTo.call(this, e), this._expandIfNotCollapsed();
1650
+ },
1651
+ onRemove: function() {
1652
+ this._map.off("zoomend", this._checkDisabledLayers, this);
1653
+ for (var e = 0; e < this._layers.length; e++) this._layers[e].layer.off("add remove", this._onLayerChange, this);
1654
+ },
1655
+ addBaseLayer: function(e, t) {
1656
+ return this._addLayer(e, t), this._map ? this._update() : this;
1657
+ },
1658
+ addOverlay: function(e, t) {
1659
+ return this._addLayer(e, t, !0), this._map ? this._update() : this;
1660
+ },
1661
+ removeLayer: function(e) {
1662
+ e.off("add remove", this._onLayerChange, this);
1663
+ var t = this._getLayer(o(e));
1664
+ return t && this._layers.splice(this._layers.indexOf(t), 1), this._map ? this._update() : this;
1665
+ },
1666
+ expand: function() {
1667
+ F(this._container, "leaflet-control-layers-expanded"), this._section.style.height = null;
1668
+ var e = this._map.getSize().y - (this._container.offsetTop + 50);
1669
+ return e < this._section.clientHeight ? (F(this._section, "leaflet-control-layers-scrollbar"), this._section.style.height = e + "px") : I(this._section, "leaflet-control-layers-scrollbar"), this._checkDisabledLayers(), this;
1670
+ },
1671
+ collapse: function() {
1672
+ return I(this._container, "leaflet-control-layers-expanded"), this;
1673
+ },
1674
+ _initLayout: function() {
1675
+ var e = "leaflet-control-layers", t = this._container = N("div", e), n = this.options.collapsed;
1676
+ t.setAttribute("aria-haspopup", !0), rn(t), nn(t);
1677
+ var r = this._section = N("section", e + "-list");
1678
+ n && (this._map.on("click", this.collapse, this), B(t, {
1679
+ mouseenter: this._expandSafely,
1680
+ mouseleave: this.collapse
1681
+ }, this));
1682
+ var i = this._layersLink = N("a", e + "-toggle", t);
1683
+ i.href = "#", i.title = "Layers", i.setAttribute("role", "button"), B(i, {
1684
+ keydown: function(e) {
1685
+ e.keyCode === 13 && this._expandSafely();
1686
+ },
1687
+ click: function(e) {
1688
+ U(e), this._expandSafely();
1689
+ }
1690
+ }, this), n || this.expand(), this._baseLayersList = N("div", e + "-base", r), this._separator = N("div", e + "-separator", r), this._overlaysList = N("div", e + "-overlays", r), t.appendChild(r);
1691
+ },
1692
+ _getLayer: function(e) {
1693
+ for (var t = 0; t < this._layers.length; t++) if (this._layers[t] && o(this._layers[t].layer) === e) return this._layers[t];
1694
+ },
1695
+ _addLayer: function(e, t, n) {
1696
+ this._map && e.on("add remove", this._onLayerChange, this), this._layers.push({
1697
+ layer: e,
1698
+ name: t,
1699
+ overlay: n
1700
+ }), this.options.sortLayers && this._layers.sort(i(function(e, t) {
1701
+ return this.options.sortFunction(e.layer, t.layer, e.name, t.name);
1702
+ }, this)), this.options.autoZIndex && e.setZIndex && (this._lastZIndex++, e.setZIndex(this._lastZIndex)), this._expandIfNotCollapsed();
1703
+ },
1704
+ _update: function() {
1705
+ if (!this._container) return this;
1706
+ Ot(this._baseLayersList), Ot(this._overlaysList), this._layerControlInputs = [];
1707
+ var e, t, n, r, i = 0;
1708
+ for (n = 0; n < this._layers.length; n++) r = this._layers[n], this._addItem(r), t ||= r.overlay, e ||= !r.overlay, i += +!r.overlay;
1709
+ return this.options.hideSingleBase && (e &&= i > 1, this._baseLayersList.style.display = e ? "" : "none"), this._separator.style.display = t && e ? "" : "none", this;
1710
+ },
1711
+ _onLayerChange: function(e) {
1712
+ this._handlingClick || this._update();
1713
+ var t = this._getLayer(o(e.target)), n = t.overlay ? e.type === "add" ? "overlayadd" : "overlayremove" : e.type === "add" ? "baselayerchange" : null;
1714
+ n && this._map.fire(n, t);
1715
+ },
1716
+ _createRadioElement: function(e, t) {
1717
+ var n = "<input type=\"radio\" class=\"leaflet-control-layers-selector\" name=\"" + e + "\"" + (t ? " checked=\"checked\"" : "") + "/>", r = document.createElement("div");
1718
+ return r.innerHTML = n, r.firstChild;
1719
+ },
1720
+ _addItem: function(e) {
1721
+ var t = document.createElement("label"), n = this._map.hasLayer(e.layer), r;
1722
+ e.overlay ? (r = document.createElement("input"), r.type = "checkbox", r.className = "leaflet-control-layers-selector", r.defaultChecked = n) : r = this._createRadioElement("leaflet-base-layers_" + o(this), n), this._layerControlInputs.push(r), r.layerId = o(e.layer), B(r, "click", this._onInputClick, this);
1723
+ var i = document.createElement("span");
1724
+ i.innerHTML = " " + e.name;
1725
+ var a = document.createElement("span");
1726
+ return t.appendChild(a), a.appendChild(r), a.appendChild(i), (e.overlay ? this._overlaysList : this._baseLayersList).appendChild(t), this._checkDisabledLayers(), t;
1727
+ },
1728
+ _onInputClick: function() {
1729
+ if (!this._preventClick) {
1730
+ var e = this._layerControlInputs, t, n, r = [], i = [];
1731
+ this._handlingClick = !0;
1732
+ for (var a = e.length - 1; a >= 0; a--) t = e[a], n = this._getLayer(t.layerId).layer, t.checked ? r.push(n) : t.checked || i.push(n);
1733
+ for (a = 0; a < i.length; a++) this._map.hasLayer(i[a]) && this._map.removeLayer(i[a]);
1734
+ for (a = 0; a < r.length; a++) this._map.hasLayer(r[a]) || this._map.addLayer(r[a]);
1735
+ this._handlingClick = !1, this._refocusOnMap();
1736
+ }
1737
+ },
1738
+ _checkDisabledLayers: function() {
1739
+ for (var e = this._layerControlInputs, t, n, r = this._map.getZoom(), i = e.length - 1; i >= 0; i--) t = e[i], n = this._getLayer(t.layerId).layer, t.disabled = n.options.minZoom !== void 0 && r < n.options.minZoom || n.options.maxZoom !== void 0 && r > n.options.maxZoom;
1740
+ },
1741
+ _expandIfNotCollapsed: function() {
1742
+ return this._map && !this.options.collapsed && this.expand(), this;
1743
+ },
1744
+ _expandSafely: function() {
1745
+ var e = this._section;
1746
+ this._preventClick = !0, B(e, "click", U), this.expand();
1747
+ var t = this;
1748
+ setTimeout(function() {
1749
+ H(e, "click", U), t._preventClick = !1;
1750
+ });
1751
+ }
1752
+ }), gn = function(e, t, n) {
1753
+ return new hn(e, t, n);
1754
+ }, _n = G.extend({
1755
+ options: {
1756
+ position: "topleft",
1757
+ zoomInText: "<span aria-hidden=\"true\">+</span>",
1758
+ zoomInTitle: "Zoom in",
1759
+ zoomOutText: "<span aria-hidden=\"true\">&#x2212;</span>",
1760
+ zoomOutTitle: "Zoom out"
1761
+ },
1762
+ onAdd: function(e) {
1763
+ var t = "leaflet-control-zoom", n = N("div", t + " leaflet-bar"), r = this.options;
1764
+ return this._zoomInButton = this._createButton(r.zoomInText, r.zoomInTitle, t + "-in", n, this._zoomIn), this._zoomOutButton = this._createButton(r.zoomOutText, r.zoomOutTitle, t + "-out", n, this._zoomOut), this._updateDisabled(), e.on("zoomend zoomlevelschange", this._updateDisabled, this), n;
1765
+ },
1766
+ onRemove: function(e) {
1767
+ e.off("zoomend zoomlevelschange", this._updateDisabled, this);
1768
+ },
1769
+ disable: function() {
1770
+ return this._disabled = !0, this._updateDisabled(), this;
1771
+ },
1772
+ enable: function() {
1773
+ return this._disabled = !1, this._updateDisabled(), this;
1774
+ },
1775
+ _zoomIn: function(e) {
1776
+ !this._disabled && this._map._zoom < this._map.getMaxZoom() && this._map.zoomIn(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1));
1777
+ },
1778
+ _zoomOut: function(e) {
1779
+ !this._disabled && this._map._zoom > this._map.getMinZoom() && this._map.zoomOut(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1));
1780
+ },
1781
+ _createButton: function(e, t, n, r, i) {
1782
+ var a = N("a", n, r);
1783
+ return a.innerHTML = e, a.href = "#", a.title = t, a.setAttribute("role", "button"), a.setAttribute("aria-label", t), rn(a), B(a, "click", an), B(a, "click", i, this), B(a, "click", this._refocusOnMap, this), a;
1784
+ },
1785
+ _updateDisabled: function() {
1786
+ var e = this._map, t = "leaflet-disabled";
1787
+ I(this._zoomInButton, t), I(this._zoomOutButton, t), this._zoomInButton.setAttribute("aria-disabled", "false"), this._zoomOutButton.setAttribute("aria-disabled", "false"), (this._disabled || e._zoom === e.getMinZoom()) && (F(this._zoomOutButton, t), this._zoomOutButton.setAttribute("aria-disabled", "true")), (this._disabled || e._zoom === e.getMaxZoom()) && (F(this._zoomInButton, t), this._zoomInButton.setAttribute("aria-disabled", "true"));
1788
+ }
1789
+ });
1790
+ W.mergeOptions({ zoomControl: !0 }), W.addInitHook(function() {
1791
+ this.options.zoomControl && (this.zoomControl = new _n(), this.addControl(this.zoomControl));
1792
+ });
1793
+ var vn = function(e) {
1794
+ return new _n(e);
1795
+ }, yn = G.extend({
1796
+ options: {
1797
+ position: "bottomleft",
1798
+ maxWidth: 100,
1799
+ metric: !0,
1800
+ imperial: !0
1801
+ },
1802
+ onAdd: function(e) {
1803
+ var t = "leaflet-control-scale", n = N("div", t), r = this.options;
1804
+ return this._addScales(r, t + "-line", n), e.on(r.updateWhenIdle ? "moveend" : "move", this._update, this), e.whenReady(this._update, this), n;
1805
+ },
1806
+ onRemove: function(e) {
1807
+ e.off(this.options.updateWhenIdle ? "moveend" : "move", this._update, this);
1808
+ },
1809
+ _addScales: function(e, t, n) {
1810
+ e.metric && (this._mScale = N("div", t, n)), e.imperial && (this._iScale = N("div", t, n));
1811
+ },
1812
+ _update: function() {
1813
+ var e = this._map, t = e.getSize().y / 2, n = e.distance(e.containerPointToLatLng([0, t]), e.containerPointToLatLng([this.options.maxWidth, t]));
1814
+ this._updateScales(n);
1815
+ },
1816
+ _updateScales: function(e) {
1817
+ this.options.metric && e && this._updateMetric(e), this.options.imperial && e && this._updateImperial(e);
1818
+ },
1819
+ _updateMetric: function(e) {
1820
+ var t = this._getRoundNum(e), n = t < 1e3 ? t + " m" : t / 1e3 + " km";
1821
+ this._updateScale(this._mScale, n, t / e);
1822
+ },
1823
+ _updateImperial: function(e) {
1824
+ var t = e * 3.2808399, n, r, i;
1825
+ t > 5280 ? (n = t / 5280, r = this._getRoundNum(n), this._updateScale(this._iScale, r + " mi", r / n)) : (i = this._getRoundNum(t), this._updateScale(this._iScale, i + " ft", i / t));
1826
+ },
1827
+ _updateScale: function(e, t, n) {
1828
+ e.style.width = Math.round(this.options.maxWidth * n) + "px", e.innerHTML = t;
1829
+ },
1830
+ _getRoundNum: function(e) {
1831
+ var t = 10 ** ((Math.floor(e) + "").length - 1), n = e / t;
1832
+ return n = n >= 10 ? 10 : n >= 5 ? 5 : n >= 3 ? 3 : n >= 2 ? 2 : 1, t * n;
1833
+ }
1834
+ }), bn = function(e) {
1835
+ return new yn(e);
1836
+ }, xn = G.extend({
1837
+ options: {
1838
+ position: "bottomright",
1839
+ prefix: "<a href=\"https://leafletjs.com\" title=\"A JavaScript library for interactive maps\">" + (M.inlineSvg ? "<svg aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"8\" viewBox=\"0 0 12 8\" class=\"leaflet-attribution-flag\"><path fill=\"#4C7BE1\" d=\"M0 0h12v4H0z\"/><path fill=\"#FFD500\" d=\"M0 4h12v3H0z\"/><path fill=\"#E0BC00\" d=\"M0 7h12v1H0z\"/></svg> " : "") + "Leaflet</a>"
1840
+ },
1841
+ initialize: function(e) {
1842
+ p(this, e), this._attributions = {};
1843
+ },
1844
+ onAdd: function(e) {
1845
+ for (var t in e.attributionControl = this, this._container = N("div", "leaflet-control-attribution"), rn(this._container), e._layers) e._layers[t].getAttribution && this.addAttribution(e._layers[t].getAttribution());
1846
+ return this._update(), e.on("layeradd", this._addAttribution, this), this._container;
1847
+ },
1848
+ onRemove: function(e) {
1849
+ e.off("layeradd", this._addAttribution, this);
1850
+ },
1851
+ _addAttribution: function(e) {
1852
+ e.layer.getAttribution && (this.addAttribution(e.layer.getAttribution()), e.layer.once("remove", function() {
1853
+ this.removeAttribution(e.layer.getAttribution());
1854
+ }, this));
1855
+ },
1856
+ setPrefix: function(e) {
1857
+ return this.options.prefix = e, this._update(), this;
1858
+ },
1859
+ addAttribution: function(e) {
1860
+ return e && (this._attributions[e] || (this._attributions[e] = 0), this._attributions[e]++, this._update()), this;
1861
+ },
1862
+ removeAttribution: function(e) {
1863
+ return e && this._attributions[e] && (this._attributions[e]--, this._update()), this;
1864
+ },
1865
+ _update: function() {
1866
+ if (this._map) {
1867
+ var e = [];
1868
+ for (var t in this._attributions) this._attributions[t] && e.push(t);
1869
+ var n = [];
1870
+ this.options.prefix && n.push(this.options.prefix), e.length && n.push(e.join(", ")), this._container.innerHTML = n.join(" <span aria-hidden=\"true\">|</span> ");
1871
+ }
1872
+ }
1873
+ });
1874
+ W.mergeOptions({ attributionControl: !0 }), W.addInitHook(function() {
1875
+ this.options.attributionControl && new xn().addTo(this);
1876
+ }), G.Layers = hn, G.Zoom = _n, G.Scale = yn, G.Attribution = xn, mn.layers = gn, mn.zoom = vn, mn.scale = bn, mn.attribution = function(e) {
1877
+ return new xn(e);
1878
+ };
1879
+ var K = y.extend({
1880
+ initialize: function(e) {
1881
+ this._map = e;
1882
+ },
1883
+ enable: function() {
1884
+ return this._enabled || (this._enabled = !0, this.addHooks()), this;
1885
+ },
1886
+ disable: function() {
1887
+ return this._enabled && (this._enabled = !1, this.removeHooks()), this;
1888
+ },
1889
+ enabled: function() {
1890
+ return !!this._enabled;
1891
+ }
1892
+ });
1893
+ K.addTo = function(e, t) {
1894
+ return e.addHandler(t, this), this;
1895
+ };
1896
+ var Sn = { Events: b }, Cn = M.touch ? "touchstart mousedown" : "mousedown", wn = ue.extend({
1897
+ options: { clickTolerance: 3 },
1898
+ initialize: function(e, t, n, r) {
1899
+ p(this, r), this._element = e, this._dragStartTarget = t || e, this._preventOutline = n;
1900
+ },
1901
+ enable: function() {
1902
+ this._enabled ||= (B(this._dragStartTarget, Cn, this._onDown, this), !0);
1903
+ },
1904
+ disable: function() {
1905
+ this._enabled && (wn._dragging === this && this.finishDrag(!0), H(this._dragStartTarget, Cn, this._onDown, this), this._enabled = !1, this._moved = !1);
1906
+ },
1907
+ _onDown: function(e) {
1908
+ if (this._enabled && (this._moved = !1, !jt(this._element, "leaflet-zoom-anim"))) {
1909
+ if (e.touches && e.touches.length !== 1) wn._dragging === this && this.finishDrag();
1910
+ else if (!(wn._dragging || e.shiftKey || e.which !== 1 && e.button !== 1 && !e.touches) && (wn._dragging = this, this._preventOutline && Kt(this._element), Ht(), Rt(), !this._moving)) {
1911
+ this.fire("down");
1912
+ var t = e.touches ? e.touches[0] : e, n = Jt(this._element);
1913
+ this._startPoint = new x(t.clientX, t.clientY), this._startPos = Lt(this._element), this._parentScale = Yt(n);
1914
+ var r = e.type === "mousedown";
1915
+ B(document, r ? "mousemove" : "touchmove", this._onMove, this), B(document, r ? "mouseup" : "touchend touchcancel", this._onUp, this);
1916
+ }
1917
+ }
1918
+ },
1919
+ _onMove: function(e) {
1920
+ if (this._enabled) {
1921
+ if (e.touches && e.touches.length > 1) this._moved = !0;
1922
+ else {
1923
+ var t = e.touches && e.touches.length === 1 ? e.touches[0] : e, n = new x(t.clientX, t.clientY)._subtract(this._startPoint);
1924
+ (n.x || n.y) && (Math.abs(n.x) + Math.abs(n.y) < this.options.clickTolerance || (n.x /= this._parentScale.x, n.y /= this._parentScale.y, U(e), this._moved || (this.fire("dragstart"), this._moved = !0, F(document.body, "leaflet-dragging"), this._lastTarget = e.target || e.srcElement, window.SVGElementInstance && this._lastTarget instanceof window.SVGElementInstance && (this._lastTarget = this._lastTarget.correspondingUseElement), F(this._lastTarget, "leaflet-drag-target")), this._newPos = this._startPos.add(n), this._moving = !0, this._lastEvent = e, this._updatePosition()));
1925
+ }
1926
+ }
1927
+ },
1928
+ _updatePosition: function() {
1929
+ var e = { originalEvent: this._lastEvent };
1930
+ this.fire("predrag", e), z(this._element, this._newPos), this.fire("drag", e);
1931
+ },
1932
+ _onUp: function() {
1933
+ this._enabled && this.finishDrag();
1934
+ },
1935
+ finishDrag: function(e) {
1936
+ I(document.body, "leaflet-dragging"), this._lastTarget &&= (I(this._lastTarget, "leaflet-drag-target"), null), H(document, "mousemove touchmove", this._onMove, this), H(document, "mouseup touchend touchcancel", this._onUp, this), Ut(), zt();
1937
+ var t = this._moved && this._moving;
1938
+ this._moving = !1, wn._dragging = !1, t && this.fire("dragend", {
1939
+ noInertia: e,
1940
+ distance: this._newPos.distanceTo(this._startPos)
1941
+ });
1942
+ }
1943
+ });
1944
+ function Tn(e, t, n) {
1945
+ for (var r, i = [
1946
+ 1,
1947
+ 4,
1948
+ 2,
1949
+ 8
1950
+ ], a = 0, o, s, c, l, u = e.length, d, f; a < u; a++) e[a]._code = Rn(e[a], t);
1951
+ for (s = 0; s < 4; s++) {
1952
+ for (d = i[s], r = [], a = 0, u = e.length, o = u - 1; a < u; o = a++) c = e[a], l = e[o], c._code & d ? l._code & d || (f = Ln(l, c, d, t, n), f._code = Rn(f, t), r.push(f)) : (l._code & d && (f = Ln(l, c, d, t, n), f._code = Rn(f, t), r.push(f)), r.push(c));
1953
+ e = r;
1954
+ }
1955
+ return e;
1956
+ }
1957
+ function En(e, t) {
1958
+ var n, r, i, a, o, s, c, l, u;
1959
+ if (!e || e.length === 0) throw Error("latlngs not passed");
1960
+ q(e) || (console.warn("latlngs are not flat! Only the first ring will be used"), e = e[0]);
1961
+ var d = O([0, 0]), f = E(e);
1962
+ f.getNorthWest().distanceTo(f.getSouthWest()) * f.getNorthEast().distanceTo(f.getNorthWest()) < 1700 && (d = Dn(e));
1963
+ var p = e.length, m = [];
1964
+ for (n = 0; n < p; n++) {
1965
+ var ee = O(e[n]);
1966
+ m.push(t.project(O([ee.lat - d.lat, ee.lng - d.lng])));
1967
+ }
1968
+ for (s = c = l = 0, n = 0, r = p - 1; n < p; r = n++) i = m[n], a = m[r], o = i.y * a.x - a.y * i.x, c += (i.x + a.x) * o, l += (i.y + a.y) * o, s += o * 3;
1969
+ u = s === 0 ? m[0] : [c / s, l / s];
1970
+ var h = t.unproject(S(u));
1971
+ return O([h.lat + d.lat, h.lng + d.lng]);
1972
+ }
1973
+ function Dn(e) {
1974
+ for (var t = 0, n = 0, r = 0, i = 0; i < e.length; i++) {
1975
+ var a = O(e[i]);
1976
+ t += a.lat, n += a.lng, r++;
1977
+ }
1978
+ return O([t / r, n / r]);
1979
+ }
1980
+ var On = {
1981
+ __proto__: null,
1982
+ clipPolygon: Tn,
1983
+ polygonCenter: En,
1984
+ centroid: Dn
1985
+ };
1986
+ function kn(e, t) {
1987
+ if (!t || !e.length) return e.slice();
1988
+ var n = t * t;
1989
+ return e = Pn(e, n), e = Mn(e, n), e;
1990
+ }
1991
+ function An(e, t, n) {
1992
+ return Math.sqrt(Bn(e, t, n, !0));
1993
+ }
1994
+ function jn(e, t, n) {
1995
+ return Bn(e, t, n);
1996
+ }
1997
+ function Mn(e, t) {
1998
+ var n = e.length, r = new (typeof Uint8Array < "u" ? Uint8Array : Array)(n);
1999
+ r[0] = r[n - 1] = 1, Nn(e, r, t, 0, n - 1);
2000
+ var i, a = [];
2001
+ for (i = 0; i < n; i++) r[i] && a.push(e[i]);
2002
+ return a;
2003
+ }
2004
+ function Nn(e, t, n, r, i) {
2005
+ for (var a = 0, o, s = r + 1, c; s <= i - 1; s++) c = Bn(e[s], e[r], e[i], !0), c > a && (o = s, a = c);
2006
+ a > n && (t[o] = 1, Nn(e, t, n, r, o), Nn(e, t, n, o, i));
2007
+ }
2008
+ function Pn(e, t) {
2009
+ for (var n = [e[0]], r = 1, i = 0, a = e.length; r < a; r++) zn(e[r], e[i]) > t && (n.push(e[r]), i = r);
2010
+ return i < a - 1 && n.push(e[a - 1]), n;
2011
+ }
2012
+ var Fn;
2013
+ function In(e, t, n, r, i) {
2014
+ var a = r ? Fn : Rn(e, n), o = Rn(t, n), s, c, l;
2015
+ for (Fn = o;;) {
2016
+ if (!(a | o)) return [e, t];
2017
+ if (a & o) return !1;
2018
+ s = a || o, c = Ln(e, t, s, n, i), l = Rn(c, n), s === a ? (e = c, a = l) : (t = c, o = l);
2019
+ }
2020
+ }
2021
+ function Ln(e, t, n, r, i) {
2022
+ var a = t.x - e.x, o = t.y - e.y, s = r.min, c = r.max, l, u;
2023
+ return n & 8 ? (l = e.x + a * (c.y - e.y) / o, u = c.y) : n & 4 ? (l = e.x + a * (s.y - e.y) / o, u = s.y) : n & 2 ? (l = c.x, u = e.y + o * (c.x - e.x) / a) : n & 1 && (l = s.x, u = e.y + o * (s.x - e.x) / a), new x(l, u, i);
2024
+ }
2025
+ function Rn(e, t) {
2026
+ var n = 0;
2027
+ return e.x < t.min.x ? n |= 1 : e.x > t.max.x && (n |= 2), e.y < t.min.y ? n |= 4 : e.y > t.max.y && (n |= 8), n;
2028
+ }
2029
+ function zn(e, t) {
2030
+ var n = t.x - e.x, r = t.y - e.y;
2031
+ return n * n + r * r;
2032
+ }
2033
+ function Bn(e, t, n, r) {
2034
+ var i = t.x, a = t.y, o = n.x - i, s = n.y - a, c = o * o + s * s, l;
2035
+ return c > 0 && (l = ((e.x - i) * o + (e.y - a) * s) / c, l > 1 ? (i = n.x, a = n.y) : l > 0 && (i += o * l, a += s * l)), o = e.x - i, s = e.y - a, r ? o * o + s * s : new x(i, a);
2036
+ }
2037
+ function q(e) {
2038
+ return !g(e[0]) || typeof e[0][0] != "object" && e[0][0] !== void 0;
2039
+ }
2040
+ function Vn(e) {
2041
+ return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."), q(e);
2042
+ }
2043
+ function Hn(e, t) {
2044
+ var n, r, i, a, o, s, c, l;
2045
+ if (!e || e.length === 0) throw Error("latlngs not passed");
2046
+ q(e) || (console.warn("latlngs are not flat! Only the first ring will be used"), e = e[0]);
2047
+ var u = O([0, 0]), d = E(e);
2048
+ d.getNorthWest().distanceTo(d.getSouthWest()) * d.getNorthEast().distanceTo(d.getNorthWest()) < 1700 && (u = Dn(e));
2049
+ var f = e.length, p = [];
2050
+ for (n = 0; n < f; n++) {
2051
+ var m = O(e[n]);
2052
+ p.push(t.project(O([m.lat - u.lat, m.lng - u.lng])));
2053
+ }
2054
+ for (n = 0, r = 0; n < f - 1; n++) r += p[n].distanceTo(p[n + 1]) / 2;
2055
+ if (r === 0) l = p[0];
2056
+ else for (n = 0, a = 0; n < f - 1; n++) if (o = p[n], s = p[n + 1], i = o.distanceTo(s), a += i, a > r) {
2057
+ c = (a - r) / i, l = [s.x - c * (s.x - o.x), s.y - c * (s.y - o.y)];
2058
+ break;
2059
+ }
2060
+ var ee = t.unproject(S(l));
2061
+ return O([ee.lat + u.lat, ee.lng + u.lng]);
2062
+ }
2063
+ var Un = {
2064
+ __proto__: null,
2065
+ simplify: kn,
2066
+ pointToSegmentDistance: An,
2067
+ closestPointOnSegment: jn,
2068
+ clipSegment: In,
2069
+ _getEdgeIntersection: Ln,
2070
+ _getBitCode: Rn,
2071
+ _sqClosestPointOnSegment: Bn,
2072
+ isFlat: q,
2073
+ _flat: Vn,
2074
+ polylineCenter: Hn
2075
+ }, Wn = {
2076
+ project: function(e) {
2077
+ return new x(e.lng, e.lat);
2078
+ },
2079
+ unproject: function(e) {
2080
+ return new D(e.y, e.x);
2081
+ },
2082
+ bounds: new C([-180, -90], [180, 90])
2083
+ }, Gn = {
2084
+ R: 6378137,
2085
+ R_MINOR: 6356752.314245179,
2086
+ bounds: new C([-20037508.34279, -15496570.73972], [20037508.34279, 18764656.23138]),
2087
+ project: function(e) {
2088
+ var t = Math.PI / 180, n = this.R, r = e.lat * t, i = this.R_MINOR / n, a = Math.sqrt(1 - i * i), o = a * Math.sin(r), s = Math.tan(Math.PI / 4 - r / 2) / ((1 - o) / (1 + o)) ** (a / 2);
2089
+ return r = -n * Math.log(Math.max(s, 1e-10)), new x(e.lng * t * n, r);
2090
+ },
2091
+ unproject: function(e) {
2092
+ for (var t = 180 / Math.PI, n = this.R, r = this.R_MINOR / n, i = Math.sqrt(1 - r * r), a = Math.exp(-e.y / n), o = Math.PI / 2 - 2 * Math.atan(a), s = 0, c = .1, l; s < 15 && Math.abs(c) > 1e-7; s++) l = i * Math.sin(o), l = ((1 - l) / (1 + l)) ** (i / 2), c = Math.PI / 2 - 2 * Math.atan(a * l) - o, o += c;
2093
+ return new D(o * t, e.x * t / n);
2094
+ }
2095
+ }, Kn = {
2096
+ __proto__: null,
2097
+ LonLat: Wn,
2098
+ Mercator: Gn,
2099
+ SphericalMercator: pe
2100
+ }, qn = n({}, A, {
2101
+ code: "EPSG:3395",
2102
+ projection: Gn,
2103
+ transformation: function() {
2104
+ var e = .5 / (Math.PI * Gn.R);
2105
+ return he(e, .5, -e, .5);
2106
+ }()
2107
+ }), Jn = n({}, A, {
2108
+ code: "EPSG:4326",
2109
+ projection: Wn,
2110
+ transformation: he(1 / 180, 1, -1 / 180, .5)
2111
+ }), Yn = n({}, k, {
2112
+ projection: Wn,
2113
+ transformation: he(1, 0, -1, 0),
2114
+ scale: function(e) {
2115
+ return 2 ** e;
2116
+ },
2117
+ zoom: function(e) {
2118
+ return Math.log(e) / Math.LN2;
2119
+ },
2120
+ distance: function(e, t) {
2121
+ var n = t.lng - e.lng, r = t.lat - e.lat;
2122
+ return Math.sqrt(n * n + r * r);
2123
+ },
2124
+ infinite: !0
2125
+ });
2126
+ k.Earth = A, k.EPSG3395 = qn, k.EPSG3857 = ge, k.EPSG900913 = _e, k.EPSG4326 = Jn, k.Simple = Yn;
2127
+ var J = ue.extend({
2128
+ options: {
2129
+ pane: "overlayPane",
2130
+ attribution: null,
2131
+ bubblingMouseEvents: !0
2132
+ },
2133
+ addTo: function(e) {
2134
+ return e.addLayer(this), this;
2135
+ },
2136
+ remove: function() {
2137
+ return this.removeFrom(this._map || this._mapToAdd);
2138
+ },
2139
+ removeFrom: function(e) {
2140
+ return e && e.removeLayer(this), this;
2141
+ },
2142
+ getPane: function(e) {
2143
+ return this._map.getPane(e ? this.options[e] || e : this.options.pane);
2144
+ },
2145
+ addInteractiveTarget: function(e) {
2146
+ return this._map._targets[o(e)] = this, this;
2147
+ },
2148
+ removeInteractiveTarget: function(e) {
2149
+ return delete this._map._targets[o(e)], this;
2150
+ },
2151
+ getAttribution: function() {
2152
+ return this.options.attribution;
2153
+ },
2154
+ _layerAdd: function(e) {
2155
+ var t = e.target;
2156
+ if (t.hasLayer(this)) {
2157
+ if (this._map = t, this._zoomAnimated = t._zoomAnimated, this.getEvents) {
2158
+ var n = this.getEvents();
2159
+ t.on(n, this), this.once("remove", function() {
2160
+ t.off(n, this);
2161
+ }, this);
2162
+ }
2163
+ this.onAdd(t), this.fire("add"), t.fire("layeradd", { layer: this });
2164
+ }
2165
+ }
2166
+ });
2167
+ W.include({
2168
+ addLayer: function(e) {
2169
+ if (!e._layerAdd) throw Error("The provided object is not a Layer.");
2170
+ var t = o(e);
2171
+ return this._layers[t] || (this._layers[t] = e, e._mapToAdd = this, e.beforeAdd && e.beforeAdd(this), this.whenReady(e._layerAdd, e)), this;
2172
+ },
2173
+ removeLayer: function(e) {
2174
+ var t = o(e);
2175
+ return this._layers[t] && (this._loaded && e.onRemove(this), delete this._layers[t], this._loaded && (this.fire("layerremove", { layer: e }), e.fire("remove")), e._map = e._mapToAdd = null), this;
2176
+ },
2177
+ hasLayer: function(e) {
2178
+ return o(e) in this._layers;
2179
+ },
2180
+ eachLayer: function(e, t) {
2181
+ for (var n in this._layers) e.call(t, this._layers[n]);
2182
+ return this;
2183
+ },
2184
+ _addLayers: function(e) {
2185
+ e = e ? g(e) ? e : [e] : [];
2186
+ for (var t = 0, n = e.length; t < n; t++) this.addLayer(e[t]);
2187
+ },
2188
+ _addZoomLimit: function(e) {
2189
+ isNaN(e.options.maxZoom) && isNaN(e.options.minZoom) || (this._zoomBoundLayers[o(e)] = e, this._updateZoomLevels());
2190
+ },
2191
+ _removeZoomLimit: function(e) {
2192
+ var t = o(e);
2193
+ this._zoomBoundLayers[t] && (delete this._zoomBoundLayers[t], this._updateZoomLevels());
2194
+ },
2195
+ _updateZoomLevels: function() {
2196
+ var e = Infinity, t = -Infinity, n = this._getZoomSpan();
2197
+ for (var r in this._zoomBoundLayers) {
2198
+ var i = this._zoomBoundLayers[r].options;
2199
+ e = i.minZoom === void 0 ? e : Math.min(e, i.minZoom), t = i.maxZoom === void 0 ? t : Math.max(t, i.maxZoom);
2200
+ }
2201
+ this._layersMaxZoom = t === -Infinity ? void 0 : t, this._layersMinZoom = e === Infinity ? void 0 : e, n !== this._getZoomSpan() && this.fire("zoomlevelschange"), this.options.maxZoom === void 0 && this._layersMaxZoom && this.getZoom() > this._layersMaxZoom && this.setZoom(this._layersMaxZoom), this.options.minZoom === void 0 && this._layersMinZoom && this.getZoom() < this._layersMinZoom && this.setZoom(this._layersMinZoom);
2202
+ }
2203
+ });
2204
+ var Xn = J.extend({
2205
+ initialize: function(e, t) {
2206
+ p(this, t), this._layers = {};
2207
+ var n, r;
2208
+ if (e) for (n = 0, r = e.length; n < r; n++) this.addLayer(e[n]);
2209
+ },
2210
+ addLayer: function(e) {
2211
+ var t = this.getLayerId(e);
2212
+ return this._layers[t] = e, this._map && this._map.addLayer(e), this;
2213
+ },
2214
+ removeLayer: function(e) {
2215
+ var t = e in this._layers ? e : this.getLayerId(e);
2216
+ return this._map && this._layers[t] && this._map.removeLayer(this._layers[t]), delete this._layers[t], this;
2217
+ },
2218
+ hasLayer: function(e) {
2219
+ return (typeof e == "number" ? e : this.getLayerId(e)) in this._layers;
2220
+ },
2221
+ clearLayers: function() {
2222
+ return this.eachLayer(this.removeLayer, this);
2223
+ },
2224
+ invoke: function(e) {
2225
+ var t = Array.prototype.slice.call(arguments, 1), n, r;
2226
+ for (n in this._layers) r = this._layers[n], r[e] && r[e].apply(r, t);
2227
+ return this;
2228
+ },
2229
+ onAdd: function(e) {
2230
+ this.eachLayer(e.addLayer, e);
2231
+ },
2232
+ onRemove: function(e) {
2233
+ this.eachLayer(e.removeLayer, e);
2234
+ },
2235
+ eachLayer: function(e, t) {
2236
+ for (var n in this._layers) e.call(t, this._layers[n]);
2237
+ return this;
2238
+ },
2239
+ getLayer: function(e) {
2240
+ return this._layers[e];
2241
+ },
2242
+ getLayers: function() {
2243
+ var e = [];
2244
+ return this.eachLayer(e.push, e), e;
2245
+ },
2246
+ setZIndex: function(e) {
2247
+ return this.invoke("setZIndex", e);
2248
+ },
2249
+ getLayerId: function(e) {
2250
+ return o(e);
2251
+ }
2252
+ }), Zn = function(e, t) {
2253
+ return new Xn(e, t);
2254
+ }, Y = Xn.extend({
2255
+ addLayer: function(e) {
2256
+ return this.hasLayer(e) ? this : (e.addEventParent(this), Xn.prototype.addLayer.call(this, e), this.fire("layeradd", { layer: e }));
2257
+ },
2258
+ removeLayer: function(e) {
2259
+ return this.hasLayer(e) ? (e in this._layers && (e = this._layers[e]), e.removeEventParent(this), Xn.prototype.removeLayer.call(this, e), this.fire("layerremove", { layer: e })) : this;
2260
+ },
2261
+ setStyle: function(e) {
2262
+ return this.invoke("setStyle", e);
2263
+ },
2264
+ bringToFront: function() {
2265
+ return this.invoke("bringToFront");
2266
+ },
2267
+ bringToBack: function() {
2268
+ return this.invoke("bringToBack");
2269
+ },
2270
+ getBounds: function() {
2271
+ var e = new T();
2272
+ for (var t in this._layers) {
2273
+ var n = this._layers[t];
2274
+ e.extend(n.getBounds ? n.getBounds() : n.getLatLng());
2275
+ }
2276
+ return e;
2277
+ }
2278
+ }), Qn = function(e, t) {
2279
+ return new Y(e, t);
2280
+ }, $n = y.extend({
2281
+ options: {
2282
+ popupAnchor: [0, 0],
2283
+ tooltipAnchor: [0, 0],
2284
+ crossOrigin: !1
2285
+ },
2286
+ initialize: function(e) {
2287
+ p(this, e);
2288
+ },
2289
+ createIcon: function(e) {
2290
+ return this._createIcon("icon", e);
2291
+ },
2292
+ createShadow: function(e) {
2293
+ return this._createIcon("shadow", e);
2294
+ },
2295
+ _createIcon: function(e, t) {
2296
+ var n = this._getIconUrl(e);
2297
+ if (!n) {
2298
+ if (e === "icon") throw Error("iconUrl not set in Icon options (see the docs).");
2299
+ return null;
2300
+ }
2301
+ var r = this._createImg(n, t && t.tagName === "IMG" ? t : null);
2302
+ return this._setIconStyles(r, e), (this.options.crossOrigin || this.options.crossOrigin === "") && (r.crossOrigin = this.options.crossOrigin === !0 ? "" : this.options.crossOrigin), r;
2303
+ },
2304
+ _setIconStyles: function(e, t) {
2305
+ var n = this.options, r = n[t + "Size"];
2306
+ typeof r == "number" && (r = [r, r]);
2307
+ var i = S(r), a = S(t === "shadow" && n.shadowAnchor || n.iconAnchor || i && i.divideBy(2, !0));
2308
+ e.className = "leaflet-marker-" + t + " " + (n.className || ""), a && (e.style.marginLeft = -a.x + "px", e.style.marginTop = -a.y + "px"), i && (e.style.width = i.x + "px", e.style.height = i.y + "px");
2309
+ },
2310
+ _createImg: function(e, t) {
2311
+ return t ||= document.createElement("img"), t.src = e, t;
2312
+ },
2313
+ _getIconUrl: function(e) {
2314
+ return M.retina && this.options[e + "RetinaUrl"] || this.options[e + "Url"];
2315
+ }
2316
+ });
2317
+ function er(e) {
2318
+ return new $n(e);
2319
+ }
2320
+ var tr = $n.extend({
2321
+ options: {
2322
+ iconUrl: "marker-icon.png",
2323
+ iconRetinaUrl: "marker-icon-2x.png",
2324
+ shadowUrl: "marker-shadow.png",
2325
+ iconSize: [25, 41],
2326
+ iconAnchor: [12, 41],
2327
+ popupAnchor: [1, -34],
2328
+ tooltipAnchor: [16, -28],
2329
+ shadowSize: [41, 41]
2330
+ },
2331
+ _getIconUrl: function(e) {
2332
+ return typeof tr.imagePath != "string" && (tr.imagePath = this._detectIconPath()), (this.options.imagePath || tr.imagePath) + $n.prototype._getIconUrl.call(this, e);
2333
+ },
2334
+ _stripUrl: function(e) {
2335
+ var t = function(e, t, n) {
2336
+ var r = t.exec(e);
2337
+ return r && r[n];
2338
+ };
2339
+ return e = t(e, /^url\((['"])?(.+)\1\)$/, 2), e && t(e, /^(.*)marker-icon\.png$/, 1);
2340
+ },
2341
+ _detectIconPath: function() {
2342
+ var e = N("div", "leaflet-default-icon-path", document.body), t = Dt(e, "background-image") || Dt(e, "backgroundImage");
2343
+ if (document.body.removeChild(e), t = this._stripUrl(t), t) return t;
2344
+ var n = document.querySelector("link[href$=\"leaflet.css\"]");
2345
+ return n ? n.href.substring(0, n.href.length - 11 - 1) : "";
2346
+ }
2347
+ }), nr = K.extend({
2348
+ initialize: function(e) {
2349
+ this._marker = e;
2350
+ },
2351
+ addHooks: function() {
2352
+ var e = this._marker._icon;
2353
+ this._draggable ||= new wn(e, e, !0), this._draggable.on({
2354
+ dragstart: this._onDragStart,
2355
+ predrag: this._onPreDrag,
2356
+ drag: this._onDrag,
2357
+ dragend: this._onDragEnd
2358
+ }, this).enable(), F(e, "leaflet-marker-draggable");
2359
+ },
2360
+ removeHooks: function() {
2361
+ this._draggable.off({
2362
+ dragstart: this._onDragStart,
2363
+ predrag: this._onPreDrag,
2364
+ drag: this._onDrag,
2365
+ dragend: this._onDragEnd
2366
+ }, this).disable(), this._marker._icon && I(this._marker._icon, "leaflet-marker-draggable");
2367
+ },
2368
+ moved: function() {
2369
+ return this._draggable && this._draggable._moved;
2370
+ },
2371
+ _adjustPan: function(e) {
2372
+ var t = this._marker, n = t._map, r = this._marker.options.autoPanSpeed, i = this._marker.options.autoPanPadding, a = Lt(t._icon), o = n.getPixelBounds(), s = n.getPixelOrigin(), c = w(o.min._subtract(s).add(i), o.max._subtract(s).subtract(i));
2373
+ if (!c.contains(a)) {
2374
+ var l = S((Math.max(c.max.x, a.x) - c.max.x) / (o.max.x - c.max.x) - (Math.min(c.min.x, a.x) - c.min.x) / (o.min.x - c.min.x), (Math.max(c.max.y, a.y) - c.max.y) / (o.max.y - c.max.y) - (Math.min(c.min.y, a.y) - c.min.y) / (o.min.y - c.min.y)).multiplyBy(r);
2375
+ n.panBy(l, { animate: !1 }), this._draggable._newPos._add(l), this._draggable._startPos._add(l), z(t._icon, this._draggable._newPos), this._onDrag(e), this._panRequest = _(this._adjustPan.bind(this, e));
2376
+ }
2377
+ },
2378
+ _onDragStart: function() {
2379
+ this._oldLatLng = this._marker.getLatLng(), this._marker.closePopup && this._marker.closePopup(), this._marker.fire("movestart").fire("dragstart");
2380
+ },
2381
+ _onPreDrag: function(e) {
2382
+ this._marker.options.autoPan && (v(this._panRequest), this._panRequest = _(this._adjustPan.bind(this, e)));
2383
+ },
2384
+ _onDrag: function(e) {
2385
+ var t = this._marker, n = t._shadow, r = Lt(t._icon), i = t._map.layerPointToLatLng(r);
2386
+ n && z(n, r), t._latlng = i, e.latlng = i, e.oldLatLng = this._oldLatLng, t.fire("move", e).fire("drag", e);
2387
+ },
2388
+ _onDragEnd: function(e) {
2389
+ v(this._panRequest), delete this._oldLatLng, this._marker.fire("moveend").fire("dragend", e);
2390
+ }
2391
+ }), rr = J.extend({
2392
+ options: {
2393
+ icon: new tr(),
2394
+ interactive: !0,
2395
+ keyboard: !0,
2396
+ title: "",
2397
+ alt: "Marker",
2398
+ zIndexOffset: 0,
2399
+ opacity: 1,
2400
+ riseOnHover: !1,
2401
+ riseOffset: 250,
2402
+ pane: "markerPane",
2403
+ shadowPane: "shadowPane",
2404
+ bubblingMouseEvents: !1,
2405
+ autoPanOnFocus: !0,
2406
+ draggable: !1,
2407
+ autoPan: !1,
2408
+ autoPanPadding: [50, 50],
2409
+ autoPanSpeed: 10
2410
+ },
2411
+ initialize: function(e, t) {
2412
+ p(this, t), this._latlng = O(e);
2413
+ },
2414
+ onAdd: function(e) {
2415
+ this._zoomAnimated = this._zoomAnimated && e.options.markerZoomAnimation, this._zoomAnimated && e.on("zoomanim", this._animateZoom, this), this._initIcon(), this.update();
2416
+ },
2417
+ onRemove: function(e) {
2418
+ this.dragging && this.dragging.enabled() && (this.options.draggable = !0, this.dragging.removeHooks()), delete this.dragging, this._zoomAnimated && e.off("zoomanim", this._animateZoom, this), this._removeIcon(), this._removeShadow();
2419
+ },
2420
+ getEvents: function() {
2421
+ return {
2422
+ zoom: this.update,
2423
+ viewreset: this.update
2424
+ };
2425
+ },
2426
+ getLatLng: function() {
2427
+ return this._latlng;
2428
+ },
2429
+ setLatLng: function(e) {
2430
+ var t = this._latlng;
2431
+ return this._latlng = O(e), this.update(), this.fire("move", {
2432
+ oldLatLng: t,
2433
+ latlng: this._latlng
2434
+ });
2435
+ },
2436
+ setZIndexOffset: function(e) {
2437
+ return this.options.zIndexOffset = e, this.update();
2438
+ },
2439
+ getIcon: function() {
2440
+ return this.options.icon;
2441
+ },
2442
+ setIcon: function(e) {
2443
+ return this.options.icon = e, this._map && (this._initIcon(), this.update()), this._popup && this.bindPopup(this._popup, this._popup.options), this;
2444
+ },
2445
+ getElement: function() {
2446
+ return this._icon;
2447
+ },
2448
+ update: function() {
2449
+ if (this._icon && this._map) {
2450
+ var e = this._map.latLngToLayerPoint(this._latlng).round();
2451
+ this._setPos(e);
2452
+ }
2453
+ return this;
2454
+ },
2455
+ _initIcon: function() {
2456
+ var e = this.options, t = "leaflet-zoom-" + (this._zoomAnimated ? "animated" : "hide"), n = e.icon.createIcon(this._icon), r = !1;
2457
+ n !== this._icon && (this._icon && this._removeIcon(), r = !0, e.title && (n.title = e.title), n.tagName === "IMG" && (n.alt = e.alt || "")), F(n, t), e.keyboard && (n.tabIndex = "0", n.setAttribute("role", "button")), this._icon = n, e.riseOnHover && this.on({
2458
+ mouseover: this._bringToFront,
2459
+ mouseout: this._resetZIndex
2460
+ }), this.options.autoPanOnFocus && B(n, "focus", this._panOnFocus, this);
2461
+ var i = e.icon.createShadow(this._shadow), a = !1;
2462
+ i !== this._shadow && (this._removeShadow(), a = !0), i && (F(i, t), i.alt = ""), this._shadow = i, e.opacity < 1 && this._updateOpacity(), r && this.getPane().appendChild(this._icon), this._initInteraction(), i && a && this.getPane(e.shadowPane).appendChild(this._shadow);
2463
+ },
2464
+ _removeIcon: function() {
2465
+ this.options.riseOnHover && this.off({
2466
+ mouseover: this._bringToFront,
2467
+ mouseout: this._resetZIndex
2468
+ }), this.options.autoPanOnFocus && H(this._icon, "focus", this._panOnFocus, this), P(this._icon), this.removeInteractiveTarget(this._icon), this._icon = null;
2469
+ },
2470
+ _removeShadow: function() {
2471
+ this._shadow && P(this._shadow), this._shadow = null;
2472
+ },
2473
+ _setPos: function(e) {
2474
+ this._icon && z(this._icon, e), this._shadow && z(this._shadow, e), this._zIndex = e.y + this.options.zIndexOffset, this._resetZIndex();
2475
+ },
2476
+ _updateZIndex: function(e) {
2477
+ this._icon && (this._icon.style.zIndex = this._zIndex + e);
2478
+ },
2479
+ _animateZoom: function(e) {
2480
+ var t = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center).round();
2481
+ this._setPos(t);
2482
+ },
2483
+ _initInteraction: function() {
2484
+ if (this.options.interactive && (F(this._icon, "leaflet-interactive"), this.addInteractiveTarget(this._icon), nr)) {
2485
+ var e = this.options.draggable;
2486
+ this.dragging && (e = this.dragging.enabled(), this.dragging.disable()), this.dragging = new nr(this), e && this.dragging.enable();
2487
+ }
2488
+ },
2489
+ setOpacity: function(e) {
2490
+ return this.options.opacity = e, this._map && this._updateOpacity(), this;
2491
+ },
2492
+ _updateOpacity: function() {
2493
+ var e = this.options.opacity;
2494
+ this._icon && R(this._icon, e), this._shadow && R(this._shadow, e);
2495
+ },
2496
+ _bringToFront: function() {
2497
+ this._updateZIndex(this.options.riseOffset);
2498
+ },
2499
+ _resetZIndex: function() {
2500
+ this._updateZIndex(0);
2501
+ },
2502
+ _panOnFocus: function() {
2503
+ var e = this._map;
2504
+ if (e) {
2505
+ var t = this.options.icon.options, n = t.iconSize ? S(t.iconSize) : S(0, 0), r = t.iconAnchor ? S(t.iconAnchor) : S(0, 0);
2506
+ e.panInside(this._latlng, {
2507
+ paddingTopLeft: r,
2508
+ paddingBottomRight: n.subtract(r)
2509
+ });
2510
+ }
2511
+ },
2512
+ _getPopupAnchor: function() {
2513
+ return this.options.icon.options.popupAnchor;
2514
+ },
2515
+ _getTooltipAnchor: function() {
2516
+ return this.options.icon.options.tooltipAnchor;
2517
+ }
2518
+ });
2519
+ function ir(e, t) {
2520
+ return new rr(e, t);
2521
+ }
2522
+ var ar = J.extend({
2523
+ options: {
2524
+ stroke: !0,
2525
+ color: "#3388ff",
2526
+ weight: 3,
2527
+ opacity: 1,
2528
+ lineCap: "round",
2529
+ lineJoin: "round",
2530
+ dashArray: null,
2531
+ dashOffset: null,
2532
+ fill: !1,
2533
+ fillColor: null,
2534
+ fillOpacity: .2,
2535
+ fillRule: "evenodd",
2536
+ interactive: !0,
2537
+ bubblingMouseEvents: !0
2538
+ },
2539
+ beforeAdd: function(e) {
2540
+ this._renderer = e.getRenderer(this);
2541
+ },
2542
+ onAdd: function() {
2543
+ this._renderer._initPath(this), this._reset(), this._renderer._addPath(this);
2544
+ },
2545
+ onRemove: function() {
2546
+ this._renderer._removePath(this);
2547
+ },
2548
+ redraw: function() {
2549
+ return this._map && this._renderer._updatePath(this), this;
2550
+ },
2551
+ setStyle: function(e) {
2552
+ return p(this, e), this._renderer && (this._renderer._updateStyle(this), this.options.stroke && e && Object.prototype.hasOwnProperty.call(e, "weight") && this._updateBounds()), this;
2553
+ },
2554
+ bringToFront: function() {
2555
+ return this._renderer && this._renderer._bringToFront(this), this;
2556
+ },
2557
+ bringToBack: function() {
2558
+ return this._renderer && this._renderer._bringToBack(this), this;
2559
+ },
2560
+ getElement: function() {
2561
+ return this._path;
2562
+ },
2563
+ _reset: function() {
2564
+ this._project(), this._update();
2565
+ },
2566
+ _clickTolerance: function() {
2567
+ return (this.options.stroke ? this.options.weight / 2 : 0) + (this._renderer.options.tolerance || 0);
2568
+ }
2569
+ }), or = ar.extend({
2570
+ options: {
2571
+ fill: !0,
2572
+ radius: 10
2573
+ },
2574
+ initialize: function(e, t) {
2575
+ p(this, t), this._latlng = O(e), this._radius = this.options.radius;
2576
+ },
2577
+ setLatLng: function(e) {
2578
+ var t = this._latlng;
2579
+ return this._latlng = O(e), this.redraw(), this.fire("move", {
2580
+ oldLatLng: t,
2581
+ latlng: this._latlng
2582
+ });
2583
+ },
2584
+ getLatLng: function() {
2585
+ return this._latlng;
2586
+ },
2587
+ setRadius: function(e) {
2588
+ return this.options.radius = this._radius = e, this.redraw();
2589
+ },
2590
+ getRadius: function() {
2591
+ return this._radius;
2592
+ },
2593
+ setStyle: function(e) {
2594
+ var t = e && e.radius || this._radius;
2595
+ return ar.prototype.setStyle.call(this, e), this.setRadius(t), this;
2596
+ },
2597
+ _project: function() {
2598
+ this._point = this._map.latLngToLayerPoint(this._latlng), this._updateBounds();
2599
+ },
2600
+ _updateBounds: function() {
2601
+ var e = this._radius, t = this._radiusY || e, n = this._clickTolerance(), r = [e + n, t + n];
2602
+ this._pxBounds = new C(this._point.subtract(r), this._point.add(r));
2603
+ },
2604
+ _update: function() {
2605
+ this._map && this._updatePath();
2606
+ },
2607
+ _updatePath: function() {
2608
+ this._renderer._updateCircle(this);
2609
+ },
2610
+ _empty: function() {
2611
+ return this._radius && !this._renderer._bounds.intersects(this._pxBounds);
2612
+ },
2613
+ _containsPoint: function(e) {
2614
+ return e.distanceTo(this._point) <= this._radius + this._clickTolerance();
2615
+ }
2616
+ });
2617
+ function sr(e, t) {
2618
+ return new or(e, t);
2619
+ }
2620
+ var cr = or.extend({
2621
+ initialize: function(e, t, r) {
2622
+ if (typeof t == "number" && (t = n({}, r, { radius: t })), p(this, t), this._latlng = O(e), isNaN(this.options.radius)) throw Error("Circle radius cannot be NaN");
2623
+ this._mRadius = this.options.radius;
2624
+ },
2625
+ setRadius: function(e) {
2626
+ return this._mRadius = e, this.redraw();
2627
+ },
2628
+ getRadius: function() {
2629
+ return this._mRadius;
2630
+ },
2631
+ getBounds: function() {
2632
+ var e = [this._radius, this._radiusY || this._radius];
2633
+ return new T(this._map.layerPointToLatLng(this._point.subtract(e)), this._map.layerPointToLatLng(this._point.add(e)));
2634
+ },
2635
+ setStyle: ar.prototype.setStyle,
2636
+ _project: function() {
2637
+ var e = this._latlng.lng, t = this._latlng.lat, n = this._map, r = n.options.crs;
2638
+ if (r.distance === A.distance) {
2639
+ var i = Math.PI / 180, a = this._mRadius / A.R / i, o = n.project([t + a, e]), s = n.project([t - a, e]), c = o.add(s).divideBy(2), l = n.unproject(c).lat, u = Math.acos((Math.cos(a * i) - Math.sin(t * i) * Math.sin(l * i)) / (Math.cos(t * i) * Math.cos(l * i))) / i;
2640
+ (isNaN(u) || u === 0) && (u = a / Math.cos(Math.PI / 180 * t)), this._point = c.subtract(n.getPixelOrigin()), this._radius = isNaN(u) ? 0 : c.x - n.project([l, e - u]).x, this._radiusY = c.y - o.y;
2641
+ } else {
2642
+ var d = r.unproject(r.project(this._latlng).subtract([this._mRadius, 0]));
2643
+ this._point = n.latLngToLayerPoint(this._latlng), this._radius = this._point.x - n.latLngToLayerPoint(d).x;
2644
+ }
2645
+ this._updateBounds();
2646
+ }
2647
+ });
2648
+ function lr(e, t, n) {
2649
+ return new cr(e, t, n);
2650
+ }
2651
+ var X = ar.extend({
2652
+ options: {
2653
+ smoothFactor: 1,
2654
+ noClip: !1
2655
+ },
2656
+ initialize: function(e, t) {
2657
+ p(this, t), this._setLatLngs(e);
2658
+ },
2659
+ getLatLngs: function() {
2660
+ return this._latlngs;
2661
+ },
2662
+ setLatLngs: function(e) {
2663
+ return this._setLatLngs(e), this.redraw();
2664
+ },
2665
+ isEmpty: function() {
2666
+ return !this._latlngs.length;
2667
+ },
2668
+ closestLayerPoint: function(e) {
2669
+ for (var t = Infinity, n = null, r = Bn, i, a, o = 0, s = this._parts.length; o < s; o++) for (var c = this._parts[o], l = 1, u = c.length; l < u; l++) {
2670
+ i = c[l - 1], a = c[l];
2671
+ var d = r(e, i, a, !0);
2672
+ d < t && (t = d, n = r(e, i, a));
2673
+ }
2674
+ return n && (n.distance = Math.sqrt(t)), n;
2675
+ },
2676
+ getCenter: function() {
2677
+ if (!this._map) throw Error("Must add layer to map before using getCenter()");
2678
+ return Hn(this._defaultShape(), this._map.options.crs);
2679
+ },
2680
+ getBounds: function() {
2681
+ return this._bounds;
2682
+ },
2683
+ addLatLng: function(e, t) {
2684
+ return t ||= this._defaultShape(), e = O(e), t.push(e), this._bounds.extend(e), this.redraw();
2685
+ },
2686
+ _setLatLngs: function(e) {
2687
+ this._bounds = new T(), this._latlngs = this._convertLatLngs(e);
2688
+ },
2689
+ _defaultShape: function() {
2690
+ return q(this._latlngs) ? this._latlngs : this._latlngs[0];
2691
+ },
2692
+ _convertLatLngs: function(e) {
2693
+ for (var t = [], n = q(e), r = 0, i = e.length; r < i; r++) n ? (t[r] = O(e[r]), this._bounds.extend(t[r])) : t[r] = this._convertLatLngs(e[r]);
2694
+ return t;
2695
+ },
2696
+ _project: function() {
2697
+ var e = new C();
2698
+ this._rings = [], this._projectLatlngs(this._latlngs, this._rings, e), this._bounds.isValid() && e.isValid() && (this._rawPxBounds = e, this._updateBounds());
2699
+ },
2700
+ _updateBounds: function() {
2701
+ var e = this._clickTolerance(), t = new x(e, e);
2702
+ this._rawPxBounds && (this._pxBounds = new C([this._rawPxBounds.min.subtract(t), this._rawPxBounds.max.add(t)]));
2703
+ },
2704
+ _projectLatlngs: function(e, t, n) {
2705
+ var r = e[0] instanceof D, i = e.length, a, o;
2706
+ if (r) {
2707
+ for (o = [], a = 0; a < i; a++) o[a] = this._map.latLngToLayerPoint(e[a]), n.extend(o[a]);
2708
+ t.push(o);
2709
+ } else for (a = 0; a < i; a++) this._projectLatlngs(e[a], t, n);
2710
+ },
2711
+ _clipPoints: function() {
2712
+ var e = this._renderer._bounds;
2713
+ if (this._parts = [], this._pxBounds && this._pxBounds.intersects(e)) {
2714
+ if (this.options.noClip) this._parts = this._rings;
2715
+ else for (var t = this._parts, n = 0, r, i = 0, a = this._rings.length, o, s, c; n < a; n++) for (c = this._rings[n], r = 0, o = c.length; r < o - 1; r++) s = In(c[r], c[r + 1], e, r, !0), s && (t[i] = t[i] || [], t[i].push(s[0]), (s[1] !== c[r + 1] || r === o - 2) && (t[i].push(s[1]), i++));
2716
+ }
2717
+ },
2718
+ _simplifyPoints: function() {
2719
+ for (var e = this._parts, t = this.options.smoothFactor, n = 0, r = e.length; n < r; n++) e[n] = kn(e[n], t);
2720
+ },
2721
+ _update: function() {
2722
+ this._map && (this._clipPoints(), this._simplifyPoints(), this._updatePath());
2723
+ },
2724
+ _updatePath: function() {
2725
+ this._renderer._updatePoly(this);
2726
+ },
2727
+ _containsPoint: function(e, t) {
2728
+ var n, r, i, a, o, s, c = this._clickTolerance();
2729
+ if (!this._pxBounds || !this._pxBounds.contains(e)) return !1;
2730
+ for (n = 0, a = this._parts.length; n < a; n++) for (s = this._parts[n], r = 0, o = s.length, i = o - 1; r < o; i = r++) if ((t || r !== 0) && An(e, s[i], s[r]) <= c) return !0;
2731
+ return !1;
2732
+ }
2733
+ });
2734
+ function ur(e, t) {
2735
+ return new X(e, t);
2736
+ }
2737
+ X._flat = Vn;
2738
+ var dr = X.extend({
2739
+ options: { fill: !0 },
2740
+ isEmpty: function() {
2741
+ return !this._latlngs.length || !this._latlngs[0].length;
2742
+ },
2743
+ getCenter: function() {
2744
+ if (!this._map) throw Error("Must add layer to map before using getCenter()");
2745
+ return En(this._defaultShape(), this._map.options.crs);
2746
+ },
2747
+ _convertLatLngs: function(e) {
2748
+ var t = X.prototype._convertLatLngs.call(this, e), n = t.length;
2749
+ return n >= 2 && t[0] instanceof D && t[0].equals(t[n - 1]) && t.pop(), t;
2750
+ },
2751
+ _setLatLngs: function(e) {
2752
+ X.prototype._setLatLngs.call(this, e), q(this._latlngs) && (this._latlngs = [this._latlngs]);
2753
+ },
2754
+ _defaultShape: function() {
2755
+ return q(this._latlngs[0]) ? this._latlngs[0] : this._latlngs[0][0];
2756
+ },
2757
+ _clipPoints: function() {
2758
+ var e = this._renderer._bounds, t = this.options.weight, n = new x(t, t);
2759
+ if (e = new C(e.min.subtract(n), e.max.add(n)), this._parts = [], this._pxBounds && this._pxBounds.intersects(e)) {
2760
+ if (this.options.noClip) this._parts = this._rings;
2761
+ else for (var r = 0, i = this._rings.length, a; r < i; r++) a = Tn(this._rings[r], e, !0), a.length && this._parts.push(a);
2762
+ }
2763
+ },
2764
+ _updatePath: function() {
2765
+ this._renderer._updatePoly(this, !0);
2766
+ },
2767
+ _containsPoint: function(e) {
2768
+ var t = !1, n, r, i, a, o, s, c, l;
2769
+ if (!this._pxBounds || !this._pxBounds.contains(e)) return !1;
2770
+ for (a = 0, c = this._parts.length; a < c; a++) for (n = this._parts[a], o = 0, l = n.length, s = l - 1; o < l; s = o++) r = n[o], i = n[s], r.y > e.y != i.y > e.y && e.x < (i.x - r.x) * (e.y - r.y) / (i.y - r.y) + r.x && (t = !t);
2771
+ return t || X.prototype._containsPoint.call(this, e, !0);
2772
+ }
2773
+ });
2774
+ function fr(e, t) {
2775
+ return new dr(e, t);
2776
+ }
2777
+ var Z = Y.extend({
2778
+ initialize: function(e, t) {
2779
+ p(this, t), this._layers = {}, e && this.addData(e);
2780
+ },
2781
+ addData: function(e) {
2782
+ var t = g(e) ? e : e.features, n, r, i;
2783
+ if (t) {
2784
+ for (n = 0, r = t.length; n < r; n++) i = t[n], (i.geometries || i.geometry || i.features || i.coordinates) && this.addData(i);
2785
+ return this;
2786
+ }
2787
+ var a = this.options;
2788
+ if (a.filter && !a.filter(e)) return this;
2789
+ var o = pr(e, a);
2790
+ return o ? (o.feature = br(e), o.defaultOptions = o.options, this.resetStyle(o), a.onEachFeature && a.onEachFeature(e, o), this.addLayer(o)) : this;
2791
+ },
2792
+ resetStyle: function(e) {
2793
+ return e === void 0 ? this.eachLayer(this.resetStyle, this) : (e.options = n({}, e.defaultOptions), this._setLayerStyle(e, this.options.style), this);
2794
+ },
2795
+ setStyle: function(e) {
2796
+ return this.eachLayer(function(t) {
2797
+ this._setLayerStyle(t, e);
2798
+ }, this);
2799
+ },
2800
+ _setLayerStyle: function(e, t) {
2801
+ e.setStyle && (typeof t == "function" && (t = t(e.feature)), e.setStyle(t));
2802
+ }
2803
+ });
2804
+ function pr(e, t) {
2805
+ var n = e.type === "Feature" ? e.geometry : e, r = n ? n.coordinates : null, i = [], a = t && t.pointToLayer, o = t && t.coordsToLatLng || hr, s, c, l, u;
2806
+ if (!r && !n) return null;
2807
+ switch (n.type) {
2808
+ case "Point": return s = o(r), mr(a, e, s, t);
2809
+ case "MultiPoint":
2810
+ for (l = 0, u = r.length; l < u; l++) s = o(r[l]), i.push(mr(a, e, s, t));
2811
+ return new Y(i);
2812
+ case "LineString":
2813
+ case "MultiLineString": return c = gr(r, n.type === "LineString" ? 0 : 1, o), new X(c, t);
2814
+ case "Polygon":
2815
+ case "MultiPolygon": return c = gr(r, n.type === "Polygon" ? 1 : 2, o), new dr(c, t);
2816
+ case "GeometryCollection":
2817
+ for (l = 0, u = n.geometries.length; l < u; l++) {
2818
+ var d = pr({
2819
+ geometry: n.geometries[l],
2820
+ type: "Feature",
2821
+ properties: e.properties
2822
+ }, t);
2823
+ d && i.push(d);
2824
+ }
2825
+ return new Y(i);
2826
+ case "FeatureCollection":
2827
+ for (l = 0, u = n.features.length; l < u; l++) {
2828
+ var f = pr(n.features[l], t);
2829
+ f && i.push(f);
2830
+ }
2831
+ return new Y(i);
2832
+ default: throw Error("Invalid GeoJSON object.");
2833
+ }
2834
+ }
2835
+ function mr(e, t, n, r) {
2836
+ return e ? e(t, n) : new rr(n, r && r.markersInheritOptions && r);
2837
+ }
2838
+ function hr(e) {
2839
+ return new D(e[1], e[0], e[2]);
2840
+ }
2841
+ function gr(e, t, n) {
2842
+ for (var r = [], i = 0, a = e.length, o; i < a; i++) o = t ? gr(e[i], t - 1, n) : (n || hr)(e[i]), r.push(o);
2843
+ return r;
2844
+ }
2845
+ function _r(e, t) {
2846
+ return e = O(e), e.alt === void 0 ? [u(e.lng, t), u(e.lat, t)] : [
2847
+ u(e.lng, t),
2848
+ u(e.lat, t),
2849
+ u(e.alt, t)
2850
+ ];
2851
+ }
2852
+ function vr(e, t, n, r) {
2853
+ for (var i = [], a = 0, o = e.length; a < o; a++) i.push(t ? vr(e[a], q(e[a]) ? 0 : t - 1, n, r) : _r(e[a], r));
2854
+ return !t && n && i.length > 0 && i.push(i[0].slice()), i;
2855
+ }
2856
+ function yr(e, t) {
2857
+ return e.feature ? n({}, e.feature, { geometry: t }) : br(t);
2858
+ }
2859
+ function br(e) {
2860
+ return e.type === "Feature" || e.type === "FeatureCollection" ? e : {
2861
+ type: "Feature",
2862
+ properties: {},
2863
+ geometry: e
2864
+ };
2865
+ }
2866
+ var xr = { toGeoJSON: function(e) {
2867
+ return yr(this, {
2868
+ type: "Point",
2869
+ coordinates: _r(this.getLatLng(), e)
2870
+ });
2871
+ } };
2872
+ rr.include(xr), cr.include(xr), or.include(xr), X.include({ toGeoJSON: function(e) {
2873
+ var t = !q(this._latlngs), n = vr(this._latlngs, +!!t, !1, e);
2874
+ return yr(this, {
2875
+ type: (t ? "Multi" : "") + "LineString",
2876
+ coordinates: n
2877
+ });
2878
+ } }), dr.include({ toGeoJSON: function(e) {
2879
+ var t = !q(this._latlngs), n = t && !q(this._latlngs[0]), r = vr(this._latlngs, n ? 2 : +!!t, !0, e);
2880
+ return t || (r = [r]), yr(this, {
2881
+ type: (n ? "Multi" : "") + "Polygon",
2882
+ coordinates: r
2883
+ });
2884
+ } }), Xn.include({
2885
+ toMultiPoint: function(e) {
2886
+ var t = [];
2887
+ return this.eachLayer(function(n) {
2888
+ t.push(n.toGeoJSON(e).geometry.coordinates);
2889
+ }), yr(this, {
2890
+ type: "MultiPoint",
2891
+ coordinates: t
2892
+ });
2893
+ },
2894
+ toGeoJSON: function(e) {
2895
+ var t = this.feature && this.feature.geometry && this.feature.geometry.type;
2896
+ if (t === "MultiPoint") return this.toMultiPoint(e);
2897
+ var n = t === "GeometryCollection", r = [];
2898
+ return this.eachLayer(function(t) {
2899
+ if (t.toGeoJSON) {
2900
+ var i = t.toGeoJSON(e);
2901
+ if (n) r.push(i.geometry);
2902
+ else {
2903
+ var a = br(i);
2904
+ a.type === "FeatureCollection" ? r.push.apply(r, a.features) : r.push(a);
2905
+ }
2906
+ }
2907
+ }), n ? yr(this, {
2908
+ geometries: r,
2909
+ type: "GeometryCollection"
2910
+ }) : {
2911
+ type: "FeatureCollection",
2912
+ features: r
2913
+ };
2914
+ }
2915
+ });
2916
+ function Sr(e, t) {
2917
+ return new Z(e, t);
2918
+ }
2919
+ var Cr = Sr, wr = J.extend({
2920
+ options: {
2921
+ opacity: 1,
2922
+ alt: "",
2923
+ interactive: !1,
2924
+ crossOrigin: !1,
2925
+ errorOverlayUrl: "",
2926
+ zIndex: 1,
2927
+ className: ""
2928
+ },
2929
+ initialize: function(e, t, n) {
2930
+ this._url = e, this._bounds = E(t), p(this, n);
2931
+ },
2932
+ onAdd: function() {
2933
+ this._image || (this._initImage(), this.options.opacity < 1 && this._updateOpacity()), this.options.interactive && (F(this._image, "leaflet-interactive"), this.addInteractiveTarget(this._image)), this.getPane().appendChild(this._image), this._reset();
2934
+ },
2935
+ onRemove: function() {
2936
+ P(this._image), this.options.interactive && this.removeInteractiveTarget(this._image);
2937
+ },
2938
+ setOpacity: function(e) {
2939
+ return this.options.opacity = e, this._image && this._updateOpacity(), this;
2940
+ },
2941
+ setStyle: function(e) {
2942
+ return e.opacity && this.setOpacity(e.opacity), this;
2943
+ },
2944
+ bringToFront: function() {
2945
+ return this._map && kt(this._image), this;
2946
+ },
2947
+ bringToBack: function() {
2948
+ return this._map && At(this._image), this;
2949
+ },
2950
+ setUrl: function(e) {
2951
+ return this._url = e, this._image && (this._image.src = e), this;
2952
+ },
2953
+ setBounds: function(e) {
2954
+ return this._bounds = E(e), this._map && this._reset(), this;
2955
+ },
2956
+ getEvents: function() {
2957
+ var e = {
2958
+ zoom: this._reset,
2959
+ viewreset: this._reset
2960
+ };
2961
+ return this._zoomAnimated && (e.zoomanim = this._animateZoom), e;
2962
+ },
2963
+ setZIndex: function(e) {
2964
+ return this.options.zIndex = e, this._updateZIndex(), this;
2965
+ },
2966
+ getBounds: function() {
2967
+ return this._bounds;
2968
+ },
2969
+ getElement: function() {
2970
+ return this._image;
2971
+ },
2972
+ _initImage: function() {
2973
+ var e = this._url.tagName === "IMG", t = this._image = e ? this._url : N("img");
2974
+ F(t, "leaflet-image-layer"), this._zoomAnimated && F(t, "leaflet-zoom-animated"), this.options.className && F(t, this.options.className), t.onselectstart = l, t.onmousemove = l, t.onload = i(this.fire, this, "load"), t.onerror = i(this._overlayOnError, this, "error"), (this.options.crossOrigin || this.options.crossOrigin === "") && (t.crossOrigin = this.options.crossOrigin === !0 ? "" : this.options.crossOrigin), this.options.zIndex && this._updateZIndex(), e ? this._url = t.src : (t.src = this._url, t.alt = this.options.alt);
2975
+ },
2976
+ _animateZoom: function(e) {
2977
+ var t = this._map.getZoomScale(e.zoom), n = this._map._latLngBoundsToNewLayerBounds(this._bounds, e.zoom, e.center).min;
2978
+ It(this._image, n, t);
2979
+ },
2980
+ _reset: function() {
2981
+ var e = this._image, t = new C(this._map.latLngToLayerPoint(this._bounds.getNorthWest()), this._map.latLngToLayerPoint(this._bounds.getSouthEast())), n = t.getSize();
2982
+ z(e, t.min), e.style.width = n.x + "px", e.style.height = n.y + "px";
2983
+ },
2984
+ _updateOpacity: function() {
2985
+ R(this._image, this.options.opacity);
2986
+ },
2987
+ _updateZIndex: function() {
2988
+ this._image && this.options.zIndex !== void 0 && this.options.zIndex !== null && (this._image.style.zIndex = this.options.zIndex);
2989
+ },
2990
+ _overlayOnError: function() {
2991
+ this.fire("error");
2992
+ var e = this.options.errorOverlayUrl;
2993
+ e && this._url !== e && (this._url = e, this._image.src = e);
2994
+ },
2995
+ getCenter: function() {
2996
+ return this._bounds.getCenter();
2997
+ }
2998
+ }), Tr = function(e, t, n) {
2999
+ return new wr(e, t, n);
3000
+ }, Er = wr.extend({
3001
+ options: {
3002
+ autoplay: !0,
3003
+ loop: !0,
3004
+ keepAspectRatio: !0,
3005
+ muted: !1,
3006
+ playsInline: !0
3007
+ },
3008
+ _initImage: function() {
3009
+ var e = this._url.tagName === "VIDEO", t = this._image = e ? this._url : N("video");
3010
+ if (F(t, "leaflet-image-layer"), this._zoomAnimated && F(t, "leaflet-zoom-animated"), this.options.className && F(t, this.options.className), t.onselectstart = l, t.onmousemove = l, t.onloadeddata = i(this.fire, this, "load"), e) {
3011
+ for (var n = t.getElementsByTagName("source"), r = [], a = 0; a < n.length; a++) r.push(n[a].src);
3012
+ this._url = n.length > 0 ? r : [t.src];
3013
+ } else {
3014
+ g(this._url) || (this._url = [this._url]), !this.options.keepAspectRatio && Object.prototype.hasOwnProperty.call(t.style, "objectFit") && (t.style.objectFit = "fill"), t.autoplay = !!this.options.autoplay, t.loop = !!this.options.loop, t.muted = !!this.options.muted, t.playsInline = !!this.options.playsInline;
3015
+ for (var o = 0; o < this._url.length; o++) {
3016
+ var s = N("source");
3017
+ s.src = this._url[o], t.appendChild(s);
3018
+ }
3019
+ }
3020
+ }
3021
+ });
3022
+ function Dr(e, t, n) {
3023
+ return new Er(e, t, n);
3024
+ }
3025
+ var Or = wr.extend({ _initImage: function() {
3026
+ var e = this._image = this._url;
3027
+ F(e, "leaflet-image-layer"), this._zoomAnimated && F(e, "leaflet-zoom-animated"), this.options.className && F(e, this.options.className), e.onselectstart = l, e.onmousemove = l;
3028
+ } });
3029
+ function kr(e, t, n) {
3030
+ return new Or(e, t, n);
3031
+ }
3032
+ var Q = J.extend({
3033
+ options: {
3034
+ interactive: !1,
3035
+ offset: [0, 0],
3036
+ className: "",
3037
+ pane: void 0,
3038
+ content: ""
3039
+ },
3040
+ initialize: function(e, t) {
3041
+ e && (e instanceof D || g(e)) ? (this._latlng = O(e), p(this, t)) : (p(this, e), this._source = t), this.options.content && (this._content = this.options.content);
3042
+ },
3043
+ openOn: function(e) {
3044
+ return e = arguments.length ? e : this._source._map, e.hasLayer(this) || e.addLayer(this), this;
3045
+ },
3046
+ close: function() {
3047
+ return this._map && this._map.removeLayer(this), this;
3048
+ },
3049
+ toggle: function(e) {
3050
+ return this._map ? this.close() : (arguments.length ? this._source = e : e = this._source, this._prepareOpen(), this.openOn(e._map)), this;
3051
+ },
3052
+ onAdd: function(e) {
3053
+ this._zoomAnimated = e._zoomAnimated, this._container || this._initLayout(), e._fadeAnimated && R(this._container, 0), clearTimeout(this._removeTimeout), this.getPane().appendChild(this._container), this.update(), e._fadeAnimated && R(this._container, 1), this.bringToFront(), this.options.interactive && (F(this._container, "leaflet-interactive"), this.addInteractiveTarget(this._container));
3054
+ },
3055
+ onRemove: function(e) {
3056
+ e._fadeAnimated ? (R(this._container, 0), this._removeTimeout = setTimeout(i(P, void 0, this._container), 200)) : P(this._container), this.options.interactive && (I(this._container, "leaflet-interactive"), this.removeInteractiveTarget(this._container));
3057
+ },
3058
+ getLatLng: function() {
3059
+ return this._latlng;
3060
+ },
3061
+ setLatLng: function(e) {
3062
+ return this._latlng = O(e), this._map && (this._updatePosition(), this._adjustPan()), this;
3063
+ },
3064
+ getContent: function() {
3065
+ return this._content;
3066
+ },
3067
+ setContent: function(e) {
3068
+ return this._content = e, this.update(), this;
3069
+ },
3070
+ getElement: function() {
3071
+ return this._container;
3072
+ },
3073
+ update: function() {
3074
+ this._map && (this._container.style.visibility = "hidden", this._updateContent(), this._updateLayout(), this._updatePosition(), this._container.style.visibility = "", this._adjustPan());
3075
+ },
3076
+ getEvents: function() {
3077
+ var e = {
3078
+ zoom: this._updatePosition,
3079
+ viewreset: this._updatePosition
3080
+ };
3081
+ return this._zoomAnimated && (e.zoomanim = this._animateZoom), e;
3082
+ },
3083
+ isOpen: function() {
3084
+ return !!this._map && this._map.hasLayer(this);
3085
+ },
3086
+ bringToFront: function() {
3087
+ return this._map && kt(this._container), this;
3088
+ },
3089
+ bringToBack: function() {
3090
+ return this._map && At(this._container), this;
3091
+ },
3092
+ _prepareOpen: function(e) {
3093
+ var t = this._source;
3094
+ if (!t._map) return !1;
3095
+ if (t instanceof Y) {
3096
+ t = null;
3097
+ var n = this._source._layers;
3098
+ for (var r in n) if (n[r]._map) {
3099
+ t = n[r];
3100
+ break;
3101
+ }
3102
+ if (!t) return !1;
3103
+ this._source = t;
3104
+ }
3105
+ if (!e) {
3106
+ if (t.getCenter) e = t.getCenter();
3107
+ else if (t.getLatLng) e = t.getLatLng();
3108
+ else if (t.getBounds) e = t.getBounds().getCenter();
3109
+ else throw Error("Unable to get source layer LatLng.");
3110
+ }
3111
+ return this.setLatLng(e), this._map && this.update(), !0;
3112
+ },
3113
+ _updateContent: function() {
3114
+ if (this._content) {
3115
+ var e = this._contentNode, t = typeof this._content == "function" ? this._content(this._source || this) : this._content;
3116
+ if (typeof t == "string") e.innerHTML = t;
3117
+ else {
3118
+ for (; e.hasChildNodes();) e.removeChild(e.firstChild);
3119
+ e.appendChild(t);
3120
+ }
3121
+ this.fire("contentupdate");
3122
+ }
3123
+ },
3124
+ _updatePosition: function() {
3125
+ if (this._map) {
3126
+ var e = this._map.latLngToLayerPoint(this._latlng), t = S(this.options.offset), n = this._getAnchor();
3127
+ this._zoomAnimated ? z(this._container, e.add(n)) : t = t.add(e).add(n);
3128
+ var r = this._containerBottom = -t.y, i = this._containerLeft = -Math.round(this._containerWidth / 2) + t.x;
3129
+ this._container.style.bottom = r + "px", this._container.style.left = i + "px";
3130
+ }
3131
+ },
3132
+ _getAnchor: function() {
3133
+ return [0, 0];
3134
+ }
3135
+ });
3136
+ W.include({ _initOverlay: function(e, t, n, r) {
3137
+ var i = t;
3138
+ return i instanceof e || (i = new e(r).setContent(t)), n && i.setLatLng(n), i;
3139
+ } }), J.include({ _initOverlay: function(e, t, n, r) {
3140
+ var i = n;
3141
+ return i instanceof e ? (p(i, r), i._source = this) : (i = t && !r ? t : new e(r, this), i.setContent(n)), i;
3142
+ } });
3143
+ var Ar = Q.extend({
3144
+ options: {
3145
+ pane: "popupPane",
3146
+ offset: [0, 7],
3147
+ maxWidth: 300,
3148
+ minWidth: 50,
3149
+ maxHeight: null,
3150
+ autoPan: !0,
3151
+ autoPanPaddingTopLeft: null,
3152
+ autoPanPaddingBottomRight: null,
3153
+ autoPanPadding: [5, 5],
3154
+ keepInView: !1,
3155
+ closeButton: !0,
3156
+ autoClose: !0,
3157
+ closeOnEscapeKey: !0,
3158
+ className: ""
3159
+ },
3160
+ openOn: function(e) {
3161
+ return e = arguments.length ? e : this._source._map, !e.hasLayer(this) && e._popup && e._popup.options.autoClose && e.removeLayer(e._popup), e._popup = this, Q.prototype.openOn.call(this, e);
3162
+ },
3163
+ onAdd: function(e) {
3164
+ Q.prototype.onAdd.call(this, e), e.fire("popupopen", { popup: this }), this._source && (this._source.fire("popupopen", { popup: this }, !0), this._source instanceof ar || this._source.on("preclick", tn));
3165
+ },
3166
+ onRemove: function(e) {
3167
+ Q.prototype.onRemove.call(this, e), e.fire("popupclose", { popup: this }), this._source && (this._source.fire("popupclose", { popup: this }, !0), this._source instanceof ar || this._source.off("preclick", tn));
3168
+ },
3169
+ getEvents: function() {
3170
+ var e = Q.prototype.getEvents.call(this);
3171
+ return (this.options.closeOnClick === void 0 ? this._map.options.closePopupOnClick : this.options.closeOnClick) && (e.preclick = this.close), this.options.keepInView && (e.moveend = this._adjustPan), e;
3172
+ },
3173
+ _initLayout: function() {
3174
+ var e = "leaflet-popup", t = this._container = N("div", e + " " + (this.options.className || "") + " leaflet-zoom-animated"), n = this._wrapper = N("div", e + "-content-wrapper", t);
3175
+ if (this._contentNode = N("div", e + "-content", n), rn(t), nn(this._contentNode), B(t, "contextmenu", tn), this._tipContainer = N("div", e + "-tip-container", t), this._tip = N("div", e + "-tip", this._tipContainer), this.options.closeButton) {
3176
+ var r = this._closeButton = N("a", e + "-close-button", t);
3177
+ r.setAttribute("role", "button"), r.setAttribute("aria-label", "Close popup"), r.href = "#close", r.innerHTML = "<span aria-hidden=\"true\">&#215;</span>", B(r, "click", function(e) {
3178
+ U(e), this.close();
3179
+ }, this);
3180
+ }
3181
+ },
3182
+ _updateLayout: function() {
3183
+ var e = this._contentNode, t = e.style;
3184
+ t.width = "", t.whiteSpace = "nowrap";
3185
+ var n = e.offsetWidth;
3186
+ n = Math.min(n, this.options.maxWidth), n = Math.max(n, this.options.minWidth), t.width = n + 1 + "px", t.whiteSpace = "", t.height = "";
3187
+ var r = e.offsetHeight, i = this.options.maxHeight, a = "leaflet-popup-scrolled";
3188
+ i && r > i ? (t.height = i + "px", F(e, a)) : I(e, a), this._containerWidth = this._container.offsetWidth;
3189
+ },
3190
+ _animateZoom: function(e) {
3191
+ var t = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center), n = this._getAnchor();
3192
+ z(this._container, t.add(n));
3193
+ },
3194
+ _adjustPan: function() {
3195
+ if (this.options.autoPan) {
3196
+ if (this._map._panAnim && this._map._panAnim.stop(), this._autopanning) this._autopanning = !1;
3197
+ else {
3198
+ var e = this._map, t = parseInt(Dt(this._container, "marginBottom"), 10) || 0, n = this._container.offsetHeight + t, r = this._containerWidth, i = new x(this._containerLeft, -n - this._containerBottom);
3199
+ i._add(Lt(this._container));
3200
+ var a = e.layerPointToContainerPoint(i), o = S(this.options.autoPanPadding), s = S(this.options.autoPanPaddingTopLeft || o), c = S(this.options.autoPanPaddingBottomRight || o), l = e.getSize(), u = 0, d = 0;
3201
+ a.x + r + c.x > l.x && (u = a.x + r - l.x + c.x), a.x - u - s.x < 0 && (u = a.x - s.x), a.y + n + c.y > l.y && (d = a.y + n - l.y + c.y), a.y - d - s.y < 0 && (d = a.y - s.y), (u || d) && (this.options.keepInView && (this._autopanning = !0), e.fire("autopanstart").panBy([u, d]));
3202
+ }
3203
+ }
3204
+ },
3205
+ _getAnchor: function() {
3206
+ return S(this._source && this._source._getPopupAnchor ? this._source._getPopupAnchor() : [0, 0]);
3207
+ }
3208
+ }), jr = function(e, t) {
3209
+ return new Ar(e, t);
3210
+ };
3211
+ W.mergeOptions({ closePopupOnClick: !0 }), W.include({
3212
+ openPopup: function(e, t, n) {
3213
+ return this._initOverlay(Ar, e, t, n).openOn(this), this;
3214
+ },
3215
+ closePopup: function(e) {
3216
+ return e = arguments.length ? e : this._popup, e && e.close(), this;
3217
+ }
3218
+ }), J.include({
3219
+ bindPopup: function(e, t) {
3220
+ return this._popup = this._initOverlay(Ar, this._popup, e, t), this._popupHandlersAdded ||= (this.on({
3221
+ click: this._openPopup,
3222
+ keypress: this._onKeyPress,
3223
+ remove: this.closePopup,
3224
+ move: this._movePopup
3225
+ }), !0), this;
3226
+ },
3227
+ unbindPopup: function() {
3228
+ return this._popup &&= (this.off({
3229
+ click: this._openPopup,
3230
+ keypress: this._onKeyPress,
3231
+ remove: this.closePopup,
3232
+ move: this._movePopup
3233
+ }), this._popupHandlersAdded = !1, null), this;
3234
+ },
3235
+ openPopup: function(e) {
3236
+ return this._popup && (this instanceof Y || (this._popup._source = this), this._popup._prepareOpen(e || this._latlng) && this._popup.openOn(this._map)), this;
3237
+ },
3238
+ closePopup: function() {
3239
+ return this._popup && this._popup.close(), this;
3240
+ },
3241
+ togglePopup: function() {
3242
+ return this._popup && this._popup.toggle(this), this;
3243
+ },
3244
+ isPopupOpen: function() {
3245
+ return this._popup ? this._popup.isOpen() : !1;
3246
+ },
3247
+ setPopupContent: function(e) {
3248
+ return this._popup && this._popup.setContent(e), this;
3249
+ },
3250
+ getPopup: function() {
3251
+ return this._popup;
3252
+ },
3253
+ _openPopup: function(e) {
3254
+ if (this._popup && this._map) {
3255
+ an(e);
3256
+ var t = e.layer || e.target;
3257
+ this._popup._source === t && !(t instanceof ar) ? this._map.hasLayer(this._popup) ? this.closePopup() : this.openPopup(e.latlng) : (this._popup._source = t, this.openPopup(e.latlng));
3258
+ }
3259
+ },
3260
+ _movePopup: function(e) {
3261
+ this._popup.setLatLng(e.latlng);
3262
+ },
3263
+ _onKeyPress: function(e) {
3264
+ e.originalEvent.keyCode === 13 && this._openPopup(e);
3265
+ }
3266
+ });
3267
+ var Mr = Q.extend({
3268
+ options: {
3269
+ pane: "tooltipPane",
3270
+ offset: [0, 0],
3271
+ direction: "auto",
3272
+ permanent: !1,
3273
+ sticky: !1,
3274
+ opacity: .9
3275
+ },
3276
+ onAdd: function(e) {
3277
+ Q.prototype.onAdd.call(this, e), this.setOpacity(this.options.opacity), e.fire("tooltipopen", { tooltip: this }), this._source && (this.addEventParent(this._source), this._source.fire("tooltipopen", { tooltip: this }, !0));
3278
+ },
3279
+ onRemove: function(e) {
3280
+ Q.prototype.onRemove.call(this, e), e.fire("tooltipclose", { tooltip: this }), this._source && (this.removeEventParent(this._source), this._source.fire("tooltipclose", { tooltip: this }, !0));
3281
+ },
3282
+ getEvents: function() {
3283
+ var e = Q.prototype.getEvents.call(this);
3284
+ return this.options.permanent || (e.preclick = this.close), e;
3285
+ },
3286
+ _initLayout: function() {
3287
+ var e = "leaflet-tooltip " + (this.options.className || "") + " leaflet-zoom-" + (this._zoomAnimated ? "animated" : "hide");
3288
+ this._contentNode = this._container = N("div", e), this._container.setAttribute("role", "tooltip"), this._container.setAttribute("id", "leaflet-tooltip-" + o(this));
3289
+ },
3290
+ _updateLayout: function() {},
3291
+ _adjustPan: function() {},
3292
+ _setPosition: function(e) {
3293
+ var t, n, r = this._map, i = this._container, a = r.latLngToContainerPoint(r.getCenter()), o = r.layerPointToContainerPoint(e), s = this.options.direction, c = i.offsetWidth, l = i.offsetHeight, u = S(this.options.offset), d = this._getAnchor();
3294
+ s === "top" ? (t = c / 2, n = l) : s === "bottom" ? (t = c / 2, n = 0) : s === "center" ? (t = c / 2, n = l / 2) : s === "right" ? (t = 0, n = l / 2) : s === "left" ? (t = c, n = l / 2) : o.x < a.x ? (s = "right", t = 0, n = l / 2) : (s = "left", t = c + (u.x + d.x) * 2, n = l / 2), e = e.subtract(S(t, n, !0)).add(u).add(d), I(i, "leaflet-tooltip-right"), I(i, "leaflet-tooltip-left"), I(i, "leaflet-tooltip-top"), I(i, "leaflet-tooltip-bottom"), F(i, "leaflet-tooltip-" + s), z(i, e);
3295
+ },
3296
+ _updatePosition: function() {
3297
+ var e = this._map.latLngToLayerPoint(this._latlng);
3298
+ this._setPosition(e);
3299
+ },
3300
+ setOpacity: function(e) {
3301
+ this.options.opacity = e, this._container && R(this._container, e);
3302
+ },
3303
+ _animateZoom: function(e) {
3304
+ var t = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center);
3305
+ this._setPosition(t);
3306
+ },
3307
+ _getAnchor: function() {
3308
+ return S(this._source && this._source._getTooltipAnchor && !this.options.sticky ? this._source._getTooltipAnchor() : [0, 0]);
3309
+ }
3310
+ }), Nr = function(e, t) {
3311
+ return new Mr(e, t);
3312
+ };
3313
+ W.include({
3314
+ openTooltip: function(e, t, n) {
3315
+ return this._initOverlay(Mr, e, t, n).openOn(this), this;
3316
+ },
3317
+ closeTooltip: function(e) {
3318
+ return e.close(), this;
3319
+ }
3320
+ }), J.include({
3321
+ bindTooltip: function(e, t) {
3322
+ return this._tooltip && this.isTooltipOpen() && this.unbindTooltip(), this._tooltip = this._initOverlay(Mr, this._tooltip, e, t), this._initTooltipInteractions(), this._tooltip.options.permanent && this._map && this._map.hasLayer(this) && this.openTooltip(), this;
3323
+ },
3324
+ unbindTooltip: function() {
3325
+ return this._tooltip &&= (this._initTooltipInteractions(!0), this.closeTooltip(), null), this;
3326
+ },
3327
+ _initTooltipInteractions: function(e) {
3328
+ if (e || !this._tooltipHandlersAdded) {
3329
+ var t = e ? "off" : "on", n = {
3330
+ remove: this.closeTooltip,
3331
+ move: this._moveTooltip
3332
+ };
3333
+ this._tooltip.options.permanent ? n.add = this._openTooltip : (n.mouseover = this._openTooltip, n.mouseout = this.closeTooltip, n.click = this._openTooltip, this._map ? this._addFocusListeners() : n.add = this._addFocusListeners), this._tooltip.options.sticky && (n.mousemove = this._moveTooltip), this[t](n), this._tooltipHandlersAdded = !e;
3334
+ }
3335
+ },
3336
+ openTooltip: function(e) {
3337
+ return this._tooltip && (this instanceof Y || (this._tooltip._source = this), this._tooltip._prepareOpen(e) && (this._tooltip.openOn(this._map), this.getElement ? this._setAriaDescribedByOnLayer(this) : this.eachLayer && this.eachLayer(this._setAriaDescribedByOnLayer, this))), this;
3338
+ },
3339
+ closeTooltip: function() {
3340
+ if (this._tooltip) return this._tooltip.close();
3341
+ },
3342
+ toggleTooltip: function() {
3343
+ return this._tooltip && this._tooltip.toggle(this), this;
3344
+ },
3345
+ isTooltipOpen: function() {
3346
+ return this._tooltip.isOpen();
3347
+ },
3348
+ setTooltipContent: function(e) {
3349
+ return this._tooltip && this._tooltip.setContent(e), this;
3350
+ },
3351
+ getTooltip: function() {
3352
+ return this._tooltip;
3353
+ },
3354
+ _addFocusListeners: function() {
3355
+ this.getElement ? this._addFocusListenersOnLayer(this) : this.eachLayer && this.eachLayer(this._addFocusListenersOnLayer, this);
3356
+ },
3357
+ _addFocusListenersOnLayer: function(e) {
3358
+ var t = typeof e.getElement == "function" && e.getElement();
3359
+ t && (B(t, "focus", function() {
3360
+ this._tooltip._source = e, this.openTooltip();
3361
+ }, this), B(t, "blur", this.closeTooltip, this));
3362
+ },
3363
+ _setAriaDescribedByOnLayer: function(e) {
3364
+ var t = typeof e.getElement == "function" && e.getElement();
3365
+ t && t.setAttribute("aria-describedby", this._tooltip._container.id);
3366
+ },
3367
+ _openTooltip: function(e) {
3368
+ if (this._tooltip && this._map) {
3369
+ if (this._map.dragging && this._map.dragging.moving() && !this._openOnceFlag) {
3370
+ this._openOnceFlag = !0;
3371
+ var t = this;
3372
+ this._map.once("moveend", function() {
3373
+ t._openOnceFlag = !1, t._openTooltip(e);
3374
+ });
3375
+ } else this._tooltip._source = e.layer || e.target, this.openTooltip(this._tooltip.options.sticky ? e.latlng : void 0);
3376
+ }
3377
+ },
3378
+ _moveTooltip: function(e) {
3379
+ var t = e.latlng, n, r;
3380
+ this._tooltip.options.sticky && e.originalEvent && (n = this._map.mouseEventToContainerPoint(e.originalEvent), r = this._map.containerPointToLayerPoint(n), t = this._map.layerPointToLatLng(r)), this._tooltip.setLatLng(t);
3381
+ }
3382
+ });
3383
+ var Pr = $n.extend({
3384
+ options: {
3385
+ iconSize: [12, 12],
3386
+ html: !1,
3387
+ bgPos: null,
3388
+ className: "leaflet-div-icon"
3389
+ },
3390
+ createIcon: function(e) {
3391
+ var t = e && e.tagName === "DIV" ? e : document.createElement("div"), n = this.options;
3392
+ if (n.html instanceof Element ? (Ot(t), t.appendChild(n.html)) : t.innerHTML = n.html === !1 ? "" : n.html, n.bgPos) {
3393
+ var r = S(n.bgPos);
3394
+ t.style.backgroundPosition = -r.x + "px " + -r.y + "px";
3395
+ }
3396
+ return this._setIconStyles(t, "icon"), t;
3397
+ },
3398
+ createShadow: function() {
3399
+ return null;
3400
+ }
3401
+ });
3402
+ function Fr(e) {
3403
+ return new Pr(e);
3404
+ }
3405
+ $n.Default = tr;
3406
+ var Ir = J.extend({
3407
+ options: {
3408
+ tileSize: 256,
3409
+ opacity: 1,
3410
+ updateWhenIdle: M.mobile,
3411
+ updateWhenZooming: !0,
3412
+ updateInterval: 200,
3413
+ zIndex: 1,
3414
+ bounds: null,
3415
+ minZoom: 0,
3416
+ maxZoom: void 0,
3417
+ maxNativeZoom: void 0,
3418
+ minNativeZoom: void 0,
3419
+ noWrap: !1,
3420
+ pane: "tilePane",
3421
+ className: "",
3422
+ keepBuffer: 2
3423
+ },
3424
+ initialize: function(e) {
3425
+ p(this, e);
3426
+ },
3427
+ onAdd: function() {
3428
+ this._initContainer(), this._levels = {}, this._tiles = {}, this._resetView();
3429
+ },
3430
+ beforeAdd: function(e) {
3431
+ e._addZoomLimit(this);
3432
+ },
3433
+ onRemove: function(e) {
3434
+ this._removeAllTiles(), P(this._container), e._removeZoomLimit(this), this._container = null, this._tileZoom = void 0;
3435
+ },
3436
+ bringToFront: function() {
3437
+ return this._map && (kt(this._container), this._setAutoZIndex(Math.max)), this;
3438
+ },
3439
+ bringToBack: function() {
3440
+ return this._map && (At(this._container), this._setAutoZIndex(Math.min)), this;
3441
+ },
3442
+ getContainer: function() {
3443
+ return this._container;
3444
+ },
3445
+ setOpacity: function(e) {
3446
+ return this.options.opacity = e, this._updateOpacity(), this;
3447
+ },
3448
+ setZIndex: function(e) {
3449
+ return this.options.zIndex = e, this._updateZIndex(), this;
3450
+ },
3451
+ isLoading: function() {
3452
+ return this._loading;
3453
+ },
3454
+ redraw: function() {
3455
+ if (this._map) {
3456
+ this._removeAllTiles();
3457
+ var e = this._clampZoom(this._map.getZoom());
3458
+ e !== this._tileZoom && (this._tileZoom = e, this._updateLevels()), this._update();
3459
+ }
3460
+ return this;
3461
+ },
3462
+ getEvents: function() {
3463
+ var e = {
3464
+ viewprereset: this._invalidateAll,
3465
+ viewreset: this._resetView,
3466
+ zoom: this._resetView,
3467
+ moveend: this._onMoveEnd
3468
+ };
3469
+ return this.options.updateWhenIdle || (this._onMove ||= s(this._onMoveEnd, this.options.updateInterval, this), e.move = this._onMove), this._zoomAnimated && (e.zoomanim = this._animateZoom), e;
3470
+ },
3471
+ createTile: function() {
3472
+ return document.createElement("div");
3473
+ },
3474
+ getTileSize: function() {
3475
+ var e = this.options.tileSize;
3476
+ return e instanceof x ? e : new x(e, e);
3477
+ },
3478
+ _updateZIndex: function() {
3479
+ this._container && this.options.zIndex !== void 0 && this.options.zIndex !== null && (this._container.style.zIndex = this.options.zIndex);
3480
+ },
3481
+ _setAutoZIndex: function(e) {
3482
+ for (var t = this.getPane().children, n = -e(-Infinity, Infinity), r = 0, i = t.length, a; r < i; r++) a = t[r].style.zIndex, t[r] !== this._container && a && (n = e(n, +a));
3483
+ isFinite(n) && (this.options.zIndex = n + e(-1, 1), this._updateZIndex());
3484
+ },
3485
+ _updateOpacity: function() {
3486
+ if (this._map && !M.ielt9) {
3487
+ R(this._container, this.options.opacity);
3488
+ var e = +/* @__PURE__ */ new Date(), t = !1, n = !1;
3489
+ for (var r in this._tiles) {
3490
+ var i = this._tiles[r];
3491
+ if (i.current && i.loaded) {
3492
+ var a = Math.min(1, (e - i.loaded) / 200);
3493
+ R(i.el, a), a < 1 ? t = !0 : (i.active ? n = !0 : this._onOpaqueTile(i), i.active = !0);
3494
+ }
3495
+ }
3496
+ n && !this._noPrune && this._pruneTiles(), t && (v(this._fadeFrame), this._fadeFrame = _(this._updateOpacity, this));
3497
+ }
3498
+ },
3499
+ _onOpaqueTile: l,
3500
+ _initContainer: function() {
3501
+ this._container || (this._container = N("div", "leaflet-layer " + (this.options.className || "")), this._updateZIndex(), this.options.opacity < 1 && this._updateOpacity(), this.getPane().appendChild(this._container));
3502
+ },
3503
+ _updateLevels: function() {
3504
+ var e = this._tileZoom, t = this.options.maxZoom;
3505
+ if (e !== void 0) {
3506
+ for (var n in this._levels) n = Number(n), this._levels[n].el.children.length || n === e ? (this._levels[n].el.style.zIndex = t - Math.abs(e - n), this._onUpdateLevel(n)) : (P(this._levels[n].el), this._removeTilesAtZoom(n), this._onRemoveLevel(n), delete this._levels[n]);
3507
+ var r = this._levels[e], i = this._map;
3508
+ return r || (r = this._levels[e] = {}, r.el = N("div", "leaflet-tile-container leaflet-zoom-animated", this._container), r.el.style.zIndex = t, r.origin = i.project(i.unproject(i.getPixelOrigin()), e).round(), r.zoom = e, this._setZoomTransform(r, i.getCenter(), i.getZoom()), r.el.offsetWidth, this._onCreateLevel(r)), this._level = r, r;
3509
+ }
3510
+ },
3511
+ _onUpdateLevel: l,
3512
+ _onRemoveLevel: l,
3513
+ _onCreateLevel: l,
3514
+ _pruneTiles: function() {
3515
+ if (this._map) {
3516
+ var e, t, n = this._map.getZoom();
3517
+ if (n > this.options.maxZoom || n < this.options.minZoom) this._removeAllTiles();
3518
+ else {
3519
+ for (e in this._tiles) t = this._tiles[e], t.retain = t.current;
3520
+ for (e in this._tiles) if (t = this._tiles[e], t.current && !t.active) {
3521
+ var r = t.coords;
3522
+ this._retainParent(r.x, r.y, r.z, r.z - 5) || this._retainChildren(r.x, r.y, r.z, r.z + 2);
3523
+ }
3524
+ for (e in this._tiles) this._tiles[e].retain || this._removeTile(e);
3525
+ }
3526
+ }
3527
+ },
3528
+ _removeTilesAtZoom: function(e) {
3529
+ for (var t in this._tiles) this._tiles[t].coords.z === e && this._removeTile(t);
3530
+ },
3531
+ _removeAllTiles: function() {
3532
+ for (var e in this._tiles) this._removeTile(e);
3533
+ },
3534
+ _invalidateAll: function() {
3535
+ for (var e in this._levels) P(this._levels[e].el), this._onRemoveLevel(Number(e)), delete this._levels[e];
3536
+ this._removeAllTiles(), this._tileZoom = void 0;
3537
+ },
3538
+ _retainParent: function(e, t, n, r) {
3539
+ var i = Math.floor(e / 2), a = Math.floor(t / 2), o = n - 1, s = new x(+i, +a);
3540
+ s.z = +o;
3541
+ var c = this._tileCoordsToKey(s), l = this._tiles[c];
3542
+ return l && l.active ? (l.retain = !0, !0) : (l && l.loaded && (l.retain = !0), o > r && this._retainParent(i, a, o, r));
3543
+ },
3544
+ _retainChildren: function(e, t, n, r) {
3545
+ for (var i = 2 * e; i < 2 * e + 2; i++) for (var a = 2 * t; a < 2 * t + 2; a++) {
3546
+ var o = new x(i, a);
3547
+ o.z = n + 1;
3548
+ var s = this._tileCoordsToKey(o), c = this._tiles[s];
3549
+ c && c.active ? c.retain = !0 : (c && c.loaded && (c.retain = !0), n + 1 < r && this._retainChildren(i, a, n + 1, r));
3550
+ }
3551
+ },
3552
+ _resetView: function(e) {
3553
+ var t = e && (e.pinch || e.flyTo);
3554
+ this._setView(this._map.getCenter(), this._map.getZoom(), t, t);
3555
+ },
3556
+ _animateZoom: function(e) {
3557
+ this._setView(e.center, e.zoom, !0, e.noUpdate);
3558
+ },
3559
+ _clampZoom: function(e) {
3560
+ var t = this.options;
3561
+ return t.minNativeZoom !== void 0 && e < t.minNativeZoom ? t.minNativeZoom : t.maxNativeZoom !== void 0 && t.maxNativeZoom < e ? t.maxNativeZoom : e;
3562
+ },
3563
+ _setView: function(e, t, n, r) {
3564
+ var i = Math.round(t);
3565
+ i = this.options.maxZoom !== void 0 && i > this.options.maxZoom || this.options.minZoom !== void 0 && i < this.options.minZoom ? void 0 : this._clampZoom(i);
3566
+ var a = this.options.updateWhenZooming && i !== this._tileZoom;
3567
+ (!r || a) && (this._tileZoom = i, this._abortLoading && this._abortLoading(), this._updateLevels(), this._resetGrid(), i !== void 0 && this._update(e), n || this._pruneTiles(), this._noPrune = !!n), this._setZoomTransforms(e, t);
3568
+ },
3569
+ _setZoomTransforms: function(e, t) {
3570
+ for (var n in this._levels) this._setZoomTransform(this._levels[n], e, t);
3571
+ },
3572
+ _setZoomTransform: function(e, t, n) {
3573
+ var r = this._map.getZoomScale(n, e.zoom), i = e.origin.multiplyBy(r).subtract(this._map._getNewPixelOrigin(t, n)).round();
3574
+ M.any3d ? It(e.el, i, r) : z(e.el, i);
3575
+ },
3576
+ _resetGrid: function() {
3577
+ var e = this._map, t = e.options.crs, n = this._tileSize = this.getTileSize(), r = this._tileZoom, i = this._map.getPixelWorldBounds(this._tileZoom);
3578
+ i && (this._globalTileRange = this._pxBoundsToTileRange(i)), this._wrapX = t.wrapLng && !this.options.noWrap && [Math.floor(e.project([0, t.wrapLng[0]], r).x / n.x), Math.ceil(e.project([0, t.wrapLng[1]], r).x / n.y)], this._wrapY = t.wrapLat && !this.options.noWrap && [Math.floor(e.project([t.wrapLat[0], 0], r).y / n.x), Math.ceil(e.project([t.wrapLat[1], 0], r).y / n.y)];
3579
+ },
3580
+ _onMoveEnd: function() {
3581
+ this._map && !this._map._animatingZoom && this._update();
3582
+ },
3583
+ _getTiledPixelBounds: function(e) {
3584
+ var t = this._map, n = t._animatingZoom ? Math.max(t._animateToZoom, t.getZoom()) : t.getZoom(), r = t.getZoomScale(n, this._tileZoom), i = t.project(e, this._tileZoom).floor(), a = t.getSize().divideBy(r * 2);
3585
+ return new C(i.subtract(a), i.add(a));
3586
+ },
3587
+ _update: function(e) {
3588
+ var t = this._map;
3589
+ if (t) {
3590
+ var n = this._clampZoom(t.getZoom());
3591
+ if (e === void 0 && (e = t.getCenter()), this._tileZoom !== void 0) {
3592
+ var r = this._getTiledPixelBounds(e), i = this._pxBoundsToTileRange(r), a = i.getCenter(), o = [], s = this.options.keepBuffer, c = new C(i.getBottomLeft().subtract([s, -s]), i.getTopRight().add([s, -s]));
3593
+ if (!(isFinite(i.min.x) && isFinite(i.min.y) && isFinite(i.max.x) && isFinite(i.max.y))) throw Error("Attempted to load an infinite number of tiles");
3594
+ for (var l in this._tiles) {
3595
+ var u = this._tiles[l].coords;
3596
+ u.z === this._tileZoom && c.contains(new x(u.x, u.y)) || (this._tiles[l].current = !1);
3597
+ }
3598
+ if (Math.abs(n - this._tileZoom) > 1) this._setView(e, n);
3599
+ else {
3600
+ for (var d = i.min.y; d <= i.max.y; d++) for (var f = i.min.x; f <= i.max.x; f++) {
3601
+ var p = new x(f, d);
3602
+ if (p.z = this._tileZoom, this._isValidTile(p)) {
3603
+ var m = this._tiles[this._tileCoordsToKey(p)];
3604
+ m ? m.current = !0 : o.push(p);
3605
+ }
3606
+ }
3607
+ if (o.sort(function(e, t) {
3608
+ return e.distanceTo(a) - t.distanceTo(a);
3609
+ }), o.length !== 0) {
3610
+ this._loading || (this._loading = !0, this.fire("loading"));
3611
+ var ee = document.createDocumentFragment();
3612
+ for (f = 0; f < o.length; f++) this._addTile(o[f], ee);
3613
+ this._level.el.appendChild(ee);
3614
+ }
3615
+ }
3616
+ }
3617
+ }
3618
+ },
3619
+ _isValidTile: function(e) {
3620
+ var t = this._map.options.crs;
3621
+ if (!t.infinite) {
3622
+ var n = this._globalTileRange;
3623
+ if (!t.wrapLng && (e.x < n.min.x || e.x > n.max.x) || !t.wrapLat && (e.y < n.min.y || e.y > n.max.y)) return !1;
3624
+ }
3625
+ if (!this.options.bounds) return !0;
3626
+ var r = this._tileCoordsToBounds(e);
3627
+ return E(this.options.bounds).overlaps(r);
3628
+ },
3629
+ _keyToBounds: function(e) {
3630
+ return this._tileCoordsToBounds(this._keyToTileCoords(e));
3631
+ },
3632
+ _tileCoordsToNwSe: function(e) {
3633
+ var t = this._map, n = this.getTileSize(), r = e.scaleBy(n), i = r.add(n);
3634
+ return [t.unproject(r, e.z), t.unproject(i, e.z)];
3635
+ },
3636
+ _tileCoordsToBounds: function(e) {
3637
+ var t = this._tileCoordsToNwSe(e), n = new T(t[0], t[1]);
3638
+ return this.options.noWrap || (n = this._map.wrapLatLngBounds(n)), n;
3639
+ },
3640
+ _tileCoordsToKey: function(e) {
3641
+ return e.x + ":" + e.y + ":" + e.z;
3642
+ },
3643
+ _keyToTileCoords: function(e) {
3644
+ var t = e.split(":"), n = new x(+t[0], +t[1]);
3645
+ return n.z = +t[2], n;
3646
+ },
3647
+ _removeTile: function(e) {
3648
+ var t = this._tiles[e];
3649
+ t && (P(t.el), delete this._tiles[e], this.fire("tileunload", {
3650
+ tile: t.el,
3651
+ coords: this._keyToTileCoords(e)
3652
+ }));
3653
+ },
3654
+ _initTile: function(e) {
3655
+ F(e, "leaflet-tile");
3656
+ var t = this.getTileSize();
3657
+ e.style.width = t.x + "px", e.style.height = t.y + "px", e.onselectstart = l, e.onmousemove = l, M.ielt9 && this.options.opacity < 1 && R(e, this.options.opacity);
3658
+ },
3659
+ _addTile: function(e, t) {
3660
+ var n = this._getTilePos(e), r = this._tileCoordsToKey(e), a = this.createTile(this._wrapCoords(e), i(this._tileReady, this, e));
3661
+ this._initTile(a), this.createTile.length < 2 && _(i(this._tileReady, this, e, null, a)), z(a, n), this._tiles[r] = {
3662
+ el: a,
3663
+ coords: e,
3664
+ current: !0
3665
+ }, t.appendChild(a), this.fire("tileloadstart", {
3666
+ tile: a,
3667
+ coords: e
3668
+ });
3669
+ },
3670
+ _tileReady: function(e, t, n) {
3671
+ t && this.fire("tileerror", {
3672
+ error: t,
3673
+ tile: n,
3674
+ coords: e
3675
+ });
3676
+ var r = this._tileCoordsToKey(e);
3677
+ n = this._tiles[r], n && (n.loaded = +/* @__PURE__ */ new Date(), this._map._fadeAnimated ? (R(n.el, 0), v(this._fadeFrame), this._fadeFrame = _(this._updateOpacity, this)) : (n.active = !0, this._pruneTiles()), t || (F(n.el, "leaflet-tile-loaded"), this.fire("tileload", {
3678
+ tile: n.el,
3679
+ coords: e
3680
+ })), this._noTilesToLoad() && (this._loading = !1, this.fire("load"), M.ielt9 || !this._map._fadeAnimated ? _(this._pruneTiles, this) : setTimeout(i(this._pruneTiles, this), 250)));
3681
+ },
3682
+ _getTilePos: function(e) {
3683
+ return e.scaleBy(this.getTileSize()).subtract(this._level.origin);
3684
+ },
3685
+ _wrapCoords: function(e) {
3686
+ var t = new x(this._wrapX ? c(e.x, this._wrapX) : e.x, this._wrapY ? c(e.y, this._wrapY) : e.y);
3687
+ return t.z = e.z, t;
3688
+ },
3689
+ _pxBoundsToTileRange: function(e) {
3690
+ var t = this.getTileSize();
3691
+ return new C(e.min.unscaleBy(t).floor(), e.max.unscaleBy(t).ceil().subtract([1, 1]));
3692
+ },
3693
+ _noTilesToLoad: function() {
3694
+ for (var e in this._tiles) if (!this._tiles[e].loaded) return !1;
3695
+ return !0;
3696
+ }
3697
+ });
3698
+ function Lr(e) {
3699
+ return new Ir(e);
3700
+ }
3701
+ var Rr = Ir.extend({
3702
+ options: {
3703
+ minZoom: 0,
3704
+ maxZoom: 18,
3705
+ subdomains: "abc",
3706
+ errorTileUrl: "",
3707
+ zoomOffset: 0,
3708
+ tms: !1,
3709
+ zoomReverse: !1,
3710
+ detectRetina: !1,
3711
+ crossOrigin: !1,
3712
+ referrerPolicy: !1
3713
+ },
3714
+ initialize: function(e, t) {
3715
+ this._url = e, t = p(this, t), t.detectRetina && M.retina && t.maxZoom > 0 ? (t.tileSize = Math.floor(t.tileSize / 2), t.zoomReverse ? (t.zoomOffset--, t.minZoom = Math.min(t.maxZoom, t.minZoom + 1)) : (t.zoomOffset++, t.maxZoom = Math.max(t.minZoom, t.maxZoom - 1)), t.minZoom = Math.max(0, t.minZoom)) : t.zoomReverse ? t.minZoom = Math.min(t.maxZoom, t.minZoom) : t.maxZoom = Math.max(t.minZoom, t.maxZoom), typeof t.subdomains == "string" && (t.subdomains = t.subdomains.split("")), this.on("tileunload", this._onTileRemove);
3716
+ },
3717
+ setUrl: function(e, t) {
3718
+ return this._url === e && t === void 0 && (t = !0), this._url = e, t || this.redraw(), this;
3719
+ },
3720
+ createTile: function(e, t) {
3721
+ var n = document.createElement("img");
3722
+ return B(n, "load", i(this._tileOnLoad, this, t, n)), B(n, "error", i(this._tileOnError, this, t, n)), (this.options.crossOrigin || this.options.crossOrigin === "") && (n.crossOrigin = this.options.crossOrigin === !0 ? "" : this.options.crossOrigin), typeof this.options.referrerPolicy == "string" && (n.referrerPolicy = this.options.referrerPolicy), n.alt = "", n.src = this.getTileUrl(e), n;
3723
+ },
3724
+ getTileUrl: function(e) {
3725
+ var t = {
3726
+ r: M.retina ? "@2x" : "",
3727
+ s: this._getSubdomain(e),
3728
+ x: e.x,
3729
+ y: e.y,
3730
+ z: this._getZoomForUrl()
3731
+ };
3732
+ if (this._map && !this._map.options.crs.infinite) {
3733
+ var r = this._globalTileRange.max.y - e.y;
3734
+ this.options.tms && (t.y = r), t["-y"] = r;
3735
+ }
3736
+ return h(this._url, n(t, this.options));
3737
+ },
3738
+ _tileOnLoad: function(e, t) {
3739
+ M.ielt9 ? setTimeout(i(e, this, null, t), 0) : e(null, t);
3740
+ },
3741
+ _tileOnError: function(e, t, n) {
3742
+ var r = this.options.errorTileUrl;
3743
+ r && t.getAttribute("src") !== r && (t.src = r), e(n, t);
3744
+ },
3745
+ _onTileRemove: function(e) {
3746
+ e.tile.onload = null;
3747
+ },
3748
+ _getZoomForUrl: function() {
3749
+ var e = this._tileZoom, t = this.options.maxZoom, n = this.options.zoomReverse, r = this.options.zoomOffset;
3750
+ return n && (e = t - e), e + r;
3751
+ },
3752
+ _getSubdomain: function(e) {
3753
+ var t = Math.abs(e.x + e.y) % this.options.subdomains.length;
3754
+ return this.options.subdomains[t];
3755
+ },
3756
+ _abortLoading: function() {
3757
+ var e, t;
3758
+ for (e in this._tiles) if (this._tiles[e].coords.z !== this._tileZoom && (t = this._tiles[e].el, t.onload = l, t.onerror = l, !t.complete)) {
3759
+ t.src = ne;
3760
+ var n = this._tiles[e].coords;
3761
+ P(t), delete this._tiles[e], this.fire("tileabort", {
3762
+ tile: t,
3763
+ coords: n
3764
+ });
3765
+ }
3766
+ },
3767
+ _removeTile: function(e) {
3768
+ var t = this._tiles[e];
3769
+ if (t) return t.el.setAttribute("src", ne), Ir.prototype._removeTile.call(this, e);
3770
+ },
3771
+ _tileReady: function(e, t, n) {
3772
+ if (!(!this._map || n && n.getAttribute("src") === ne)) return Ir.prototype._tileReady.call(this, e, t, n);
3773
+ }
3774
+ });
3775
+ function zr(e, t) {
3776
+ return new Rr(e, t);
3777
+ }
3778
+ var Br = Rr.extend({
3779
+ defaultWmsParams: {
3780
+ service: "WMS",
3781
+ request: "GetMap",
3782
+ layers: "",
3783
+ styles: "",
3784
+ format: "image/jpeg",
3785
+ transparent: !1,
3786
+ version: "1.1.1"
3787
+ },
3788
+ options: {
3789
+ crs: null,
3790
+ uppercase: !1
3791
+ },
3792
+ initialize: function(e, t) {
3793
+ this._url = e;
3794
+ var r = n({}, this.defaultWmsParams);
3795
+ for (var i in t) i in this.options || (r[i] = t[i]);
3796
+ t = p(this, t);
3797
+ var a = t.detectRetina && M.retina ? 2 : 1, o = this.getTileSize();
3798
+ r.width = o.x * a, r.height = o.y * a, this.wmsParams = r;
3799
+ },
3800
+ onAdd: function(e) {
3801
+ this._crs = this.options.crs || e.options.crs, this._wmsVersion = parseFloat(this.wmsParams.version);
3802
+ var t = this._wmsVersion >= 1.3 ? "crs" : "srs";
3803
+ this.wmsParams[t] = this._crs.code, Rr.prototype.onAdd.call(this, e);
3804
+ },
3805
+ getTileUrl: function(e) {
3806
+ var t = this._tileCoordsToNwSe(e), n = this._crs, r = w(n.project(t[0]), n.project(t[1])), i = r.min, a = r.max, o = (this._wmsVersion >= 1.3 && this._crs === Jn ? [
3807
+ i.y,
3808
+ i.x,
3809
+ a.y,
3810
+ a.x
3811
+ ] : [
3812
+ i.x,
3813
+ i.y,
3814
+ a.x,
3815
+ a.y
3816
+ ]).join(","), s = Rr.prototype.getTileUrl.call(this, e);
3817
+ return s + m(this.wmsParams, s, this.options.uppercase) + (this.options.uppercase ? "&BBOX=" : "&bbox=") + o;
3818
+ },
3819
+ setParams: function(e, t) {
3820
+ return n(this.wmsParams, e), t || this.redraw(), this;
3821
+ }
3822
+ });
3823
+ function Vr(e, t) {
3824
+ return new Br(e, t);
3825
+ }
3826
+ Rr.WMS = Br, zr.wms = Vr;
3827
+ var $ = J.extend({
3828
+ options: { padding: .1 },
3829
+ initialize: function(e) {
3830
+ p(this, e), o(this), this._layers = this._layers || {};
3831
+ },
3832
+ onAdd: function() {
3833
+ this._container || (this._initContainer(), F(this._container, "leaflet-zoom-animated")), this.getPane().appendChild(this._container), this._update(), this.on("update", this._updatePaths, this);
3834
+ },
3835
+ onRemove: function() {
3836
+ this.off("update", this._updatePaths, this), this._destroyContainer();
3837
+ },
3838
+ getEvents: function() {
3839
+ var e = {
3840
+ viewreset: this._reset,
3841
+ zoom: this._onZoom,
3842
+ moveend: this._update,
3843
+ zoomend: this._onZoomEnd
3844
+ };
3845
+ return this._zoomAnimated && (e.zoomanim = this._onAnimZoom), e;
3846
+ },
3847
+ _onAnimZoom: function(e) {
3848
+ this._updateTransform(e.center, e.zoom);
3849
+ },
3850
+ _onZoom: function() {
3851
+ this._updateTransform(this._map.getCenter(), this._map.getZoom());
3852
+ },
3853
+ _updateTransform: function(e, t) {
3854
+ var n = this._map.getZoomScale(t, this._zoom), r = this._map.getSize().multiplyBy(.5 + this.options.padding), i = this._map.project(this._center, t), a = r.multiplyBy(-n).add(i).subtract(this._map._getNewPixelOrigin(e, t));
3855
+ M.any3d ? It(this._container, a, n) : z(this._container, a);
3856
+ },
3857
+ _reset: function() {
3858
+ for (var e in this._update(), this._updateTransform(this._center, this._zoom), this._layers) this._layers[e]._reset();
3859
+ },
3860
+ _onZoomEnd: function() {
3861
+ for (var e in this._layers) this._layers[e]._project();
3862
+ },
3863
+ _updatePaths: function() {
3864
+ for (var e in this._layers) this._layers[e]._update();
3865
+ },
3866
+ _update: function() {
3867
+ var e = this.options.padding, t = this._map.getSize(), n = this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();
3868
+ this._bounds = new C(n, n.add(t.multiplyBy(1 + e * 2)).round()), this._center = this._map.getCenter(), this._zoom = this._map.getZoom();
3869
+ }
3870
+ }), Hr = $.extend({
3871
+ options: { tolerance: 0 },
3872
+ getEvents: function() {
3873
+ var e = $.prototype.getEvents.call(this);
3874
+ return e.viewprereset = this._onViewPreReset, e;
3875
+ },
3876
+ _onViewPreReset: function() {
3877
+ this._postponeUpdatePaths = !0;
3878
+ },
3879
+ onAdd: function() {
3880
+ $.prototype.onAdd.call(this), this._draw();
3881
+ },
3882
+ _initContainer: function() {
3883
+ var e = this._container = document.createElement("canvas");
3884
+ B(e, "mousemove", this._onMouseMove, this), B(e, "click dblclick mousedown mouseup contextmenu", this._onClick, this), B(e, "mouseout", this._handleMouseOut, this), e._leaflet_disable_events = !0, this._ctx = e.getContext("2d");
3885
+ },
3886
+ _destroyContainer: function() {
3887
+ v(this._redrawRequest), delete this._ctx, P(this._container), H(this._container), delete this._container;
3888
+ },
3889
+ _updatePaths: function() {
3890
+ if (!this._postponeUpdatePaths) {
3891
+ var e;
3892
+ for (var t in this._redrawBounds = null, this._layers) e = this._layers[t], e._update();
3893
+ this._redraw();
3894
+ }
3895
+ },
3896
+ _update: function() {
3897
+ if (!(this._map._animatingZoom && this._bounds)) {
3898
+ $.prototype._update.call(this);
3899
+ var e = this._bounds, t = this._container, n = e.getSize(), r = M.retina ? 2 : 1;
3900
+ z(t, e.min), t.width = r * n.x, t.height = r * n.y, t.style.width = n.x + "px", t.style.height = n.y + "px", M.retina && this._ctx.scale(2, 2), this._ctx.translate(-e.min.x, -e.min.y), this.fire("update");
3901
+ }
3902
+ },
3903
+ _reset: function() {
3904
+ $.prototype._reset.call(this), this._postponeUpdatePaths && (this._postponeUpdatePaths = !1, this._updatePaths());
3905
+ },
3906
+ _initPath: function(e) {
3907
+ this._updateDashArray(e), this._layers[o(e)] = e;
3908
+ var t = e._order = {
3909
+ layer: e,
3910
+ prev: this._drawLast,
3911
+ next: null
3912
+ };
3913
+ this._drawLast && (this._drawLast.next = t), this._drawLast = t, this._drawFirst = this._drawFirst || this._drawLast;
3914
+ },
3915
+ _addPath: function(e) {
3916
+ this._requestRedraw(e);
3917
+ },
3918
+ _removePath: function(e) {
3919
+ var t = e._order, n = t.next, r = t.prev;
3920
+ n ? n.prev = r : this._drawLast = r, r ? r.next = n : this._drawFirst = n, delete e._order, delete this._layers[o(e)], this._requestRedraw(e);
3921
+ },
3922
+ _updatePath: function(e) {
3923
+ this._extendRedrawBounds(e), e._project(), e._update(), this._requestRedraw(e);
3924
+ },
3925
+ _updateStyle: function(e) {
3926
+ this._updateDashArray(e), this._requestRedraw(e);
3927
+ },
3928
+ _updateDashArray: function(e) {
3929
+ if (typeof e.options.dashArray == "string") {
3930
+ for (var t = e.options.dashArray.split(/[, ]+/), n = [], r, i = 0; i < t.length; i++) {
3931
+ if (r = Number(t[i]), isNaN(r)) return;
3932
+ n.push(r);
3933
+ }
3934
+ e.options._dashArray = n;
3935
+ } else e.options._dashArray = e.options.dashArray;
3936
+ },
3937
+ _requestRedraw: function(e) {
3938
+ this._map && (this._extendRedrawBounds(e), this._redrawRequest = this._redrawRequest || _(this._redraw, this));
3939
+ },
3940
+ _extendRedrawBounds: function(e) {
3941
+ if (e._pxBounds) {
3942
+ var t = (e.options.weight || 0) + 1;
3943
+ this._redrawBounds = this._redrawBounds || new C(), this._redrawBounds.extend(e._pxBounds.min.subtract([t, t])), this._redrawBounds.extend(e._pxBounds.max.add([t, t]));
3944
+ }
3945
+ },
3946
+ _redraw: function() {
3947
+ this._redrawRequest = null, this._redrawBounds && (this._redrawBounds.min._floor(), this._redrawBounds.max._ceil()), this._clear(), this._draw(), this._redrawBounds = null;
3948
+ },
3949
+ _clear: function() {
3950
+ var e = this._redrawBounds;
3951
+ if (e) {
3952
+ var t = e.getSize();
3953
+ this._ctx.clearRect(e.min.x, e.min.y, t.x, t.y);
3954
+ } else this._ctx.save(), this._ctx.setTransform(1, 0, 0, 1, 0, 0), this._ctx.clearRect(0, 0, this._container.width, this._container.height), this._ctx.restore();
3955
+ },
3956
+ _draw: function() {
3957
+ var e, t = this._redrawBounds;
3958
+ if (this._ctx.save(), t) {
3959
+ var n = t.getSize();
3960
+ this._ctx.beginPath(), this._ctx.rect(t.min.x, t.min.y, n.x, n.y), this._ctx.clip();
3961
+ }
3962
+ this._drawing = !0;
3963
+ for (var r = this._drawFirst; r; r = r.next) e = r.layer, (!t || e._pxBounds && e._pxBounds.intersects(t)) && e._updatePath();
3964
+ this._drawing = !1, this._ctx.restore();
3965
+ },
3966
+ _updatePoly: function(e, t) {
3967
+ if (this._drawing) {
3968
+ var n, r, i, a, o = e._parts, s = o.length, c = this._ctx;
3969
+ if (s) {
3970
+ for (c.beginPath(), n = 0; n < s; n++) {
3971
+ for (r = 0, i = o[n].length; r < i; r++) a = o[n][r], c[r ? "lineTo" : "moveTo"](a.x, a.y);
3972
+ t && c.closePath();
3973
+ }
3974
+ this._fillStroke(c, e);
3975
+ }
3976
+ }
3977
+ },
3978
+ _updateCircle: function(e) {
3979
+ if (this._drawing && !e._empty()) {
3980
+ var t = e._point, n = this._ctx, r = Math.max(Math.round(e._radius), 1), i = (Math.max(Math.round(e._radiusY), 1) || r) / r;
3981
+ i !== 1 && (n.save(), n.scale(1, i)), n.beginPath(), n.arc(t.x, t.y / i, r, 0, Math.PI * 2, !1), i !== 1 && n.restore(), this._fillStroke(n, e);
3982
+ }
3983
+ },
3984
+ _fillStroke: function(e, t) {
3985
+ var n = t.options;
3986
+ n.fill && (e.globalAlpha = n.fillOpacity, e.fillStyle = n.fillColor || n.color, e.fill(n.fillRule || "evenodd")), n.stroke && n.weight !== 0 && (e.setLineDash && e.setLineDash(t.options && t.options._dashArray || []), e.globalAlpha = n.opacity, e.lineWidth = n.weight, e.strokeStyle = n.color, e.lineCap = n.lineCap, e.lineJoin = n.lineJoin, e.stroke());
3987
+ },
3988
+ _onClick: function(e) {
3989
+ for (var t = this._map.mouseEventToLayerPoint(e), n, r, i = this._drawFirst; i; i = i.next) n = i.layer, n.options.interactive && n._containsPoint(t) && (e.type !== "click" && e.type !== "preclick" || !this._map._draggableMoved(n)) && (r = n);
3990
+ this._fireEvent(r ? [r] : !1, e);
3991
+ },
3992
+ _onMouseMove: function(e) {
3993
+ if (!(!this._map || this._map.dragging.moving() || this._map._animatingZoom)) {
3994
+ var t = this._map.mouseEventToLayerPoint(e);
3995
+ this._handleMouseHover(e, t);
3996
+ }
3997
+ },
3998
+ _handleMouseOut: function(e) {
3999
+ var t = this._hoveredLayer;
4000
+ t && (I(this._container, "leaflet-interactive"), this._fireEvent([t], e, "mouseout"), this._hoveredLayer = null, this._mouseHoverThrottled = !1);
4001
+ },
4002
+ _handleMouseHover: function(e, t) {
4003
+ if (!this._mouseHoverThrottled) {
4004
+ for (var n, r, a = this._drawFirst; a; a = a.next) n = a.layer, n.options.interactive && n._containsPoint(t) && (r = n);
4005
+ r !== this._hoveredLayer && (this._handleMouseOut(e), r && (F(this._container, "leaflet-interactive"), this._fireEvent([r], e, "mouseover"), this._hoveredLayer = r)), this._fireEvent(this._hoveredLayer ? [this._hoveredLayer] : !1, e), this._mouseHoverThrottled = !0, setTimeout(i(function() {
4006
+ this._mouseHoverThrottled = !1;
4007
+ }, this), 32);
4008
+ }
4009
+ },
4010
+ _fireEvent: function(e, t, n) {
4011
+ this._map._fireDOMEvent(t, n || t.type, e);
4012
+ },
4013
+ _bringToFront: function(e) {
4014
+ var t = e._order;
4015
+ if (t) {
4016
+ var n = t.next, r = t.prev;
4017
+ if (n) n.prev = r;
4018
+ else return;
4019
+ r ? r.next = n : n && (this._drawFirst = n), t.prev = this._drawLast, this._drawLast.next = t, t.next = null, this._drawLast = t, this._requestRedraw(e);
4020
+ }
4021
+ },
4022
+ _bringToBack: function(e) {
4023
+ var t = e._order;
4024
+ if (t) {
4025
+ var n = t.next, r = t.prev;
4026
+ if (r) r.next = n;
4027
+ else return;
4028
+ n ? n.prev = r : r && (this._drawLast = r), t.prev = null, t.next = this._drawFirst, this._drawFirst.prev = t, this._drawFirst = t, this._requestRedraw(e);
4029
+ }
4030
+ }
4031
+ });
4032
+ function Ur(e) {
4033
+ return M.canvas ? new Hr(e) : null;
4034
+ }
4035
+ var Wr = (function() {
4036
+ try {
4037
+ return document.namespaces.add("lvml", "urn:schemas-microsoft-com:vml"), function(e) {
4038
+ return document.createElement("<lvml:" + e + " class=\"lvml\">");
4039
+ };
4040
+ } catch {}
4041
+ return function(e) {
4042
+ return document.createElement("<" + e + " xmlns=\"urn:schemas-microsoft.com:vml\" class=\"lvml\">");
4043
+ };
4044
+ })(), Gr = {
4045
+ _initContainer: function() {
4046
+ this._container = N("div", "leaflet-vml-container");
4047
+ },
4048
+ _update: function() {
4049
+ this._map._animatingZoom || ($.prototype._update.call(this), this.fire("update"));
4050
+ },
4051
+ _initPath: function(e) {
4052
+ var t = e._container = Wr("shape");
4053
+ F(t, "leaflet-vml-shape " + (this.options.className || "")), t.coordsize = "1 1", e._path = Wr("path"), t.appendChild(e._path), this._updateStyle(e), this._layers[o(e)] = e;
4054
+ },
4055
+ _addPath: function(e) {
4056
+ var t = e._container;
4057
+ this._container.appendChild(t), e.options.interactive && e.addInteractiveTarget(t);
4058
+ },
4059
+ _removePath: function(e) {
4060
+ var t = e._container;
4061
+ P(t), e.removeInteractiveTarget(t), delete this._layers[o(e)];
4062
+ },
4063
+ _updateStyle: function(e) {
4064
+ var t = e._stroke, n = e._fill, r = e.options, i = e._container;
4065
+ i.stroked = !!r.stroke, i.filled = !!r.fill, r.stroke ? (t ||= e._stroke = Wr("stroke"), i.appendChild(t), t.weight = r.weight + "px", t.color = r.color, t.opacity = r.opacity, r.dashArray ? t.dashStyle = g(r.dashArray) ? r.dashArray.join(" ") : r.dashArray.replace(/( *, *)/g, " ") : t.dashStyle = "", t.endcap = r.lineCap.replace("butt", "flat"), t.joinstyle = r.lineJoin) : t && (i.removeChild(t), e._stroke = null), r.fill ? (n ||= e._fill = Wr("fill"), i.appendChild(n), n.color = r.fillColor || r.color, n.opacity = r.fillOpacity) : n && (i.removeChild(n), e._fill = null);
4066
+ },
4067
+ _updateCircle: function(e) {
4068
+ var t = e._point.round(), n = Math.round(e._radius), r = Math.round(e._radiusY || n);
4069
+ this._setPath(e, e._empty() ? "M0 0" : "AL " + t.x + "," + t.y + " " + n + "," + r + " 0,23592600");
4070
+ },
4071
+ _setPath: function(e, t) {
4072
+ e._path.v = t;
4073
+ },
4074
+ _bringToFront: function(e) {
4075
+ kt(e._container);
4076
+ },
4077
+ _bringToBack: function(e) {
4078
+ At(e._container);
4079
+ }
4080
+ }, Kr = M.vml ? Wr : ve, qr = $.extend({
4081
+ _initContainer: function() {
4082
+ this._container = Kr("svg"), this._container.setAttribute("pointer-events", "none"), this._rootGroup = Kr("g"), this._container.appendChild(this._rootGroup);
4083
+ },
4084
+ _destroyContainer: function() {
4085
+ P(this._container), H(this._container), delete this._container, delete this._rootGroup, delete this._svgSize;
4086
+ },
4087
+ _update: function() {
4088
+ if (!(this._map._animatingZoom && this._bounds)) {
4089
+ $.prototype._update.call(this);
4090
+ var e = this._bounds, t = e.getSize(), n = this._container;
4091
+ this._svgSize && this._svgSize.equals(t) || (this._svgSize = t, n.setAttribute("width", t.x), n.setAttribute("height", t.y)), z(n, e.min), n.setAttribute("viewBox", [
4092
+ e.min.x,
4093
+ e.min.y,
4094
+ t.x,
4095
+ t.y
4096
+ ].join(" ")), this.fire("update");
4097
+ }
4098
+ },
4099
+ _initPath: function(e) {
4100
+ var t = e._path = Kr("path");
4101
+ e.options.className && F(t, e.options.className), e.options.interactive && F(t, "leaflet-interactive"), this._updateStyle(e), this._layers[o(e)] = e;
4102
+ },
4103
+ _addPath: function(e) {
4104
+ this._rootGroup || this._initContainer(), this._rootGroup.appendChild(e._path), e.addInteractiveTarget(e._path);
4105
+ },
4106
+ _removePath: function(e) {
4107
+ P(e._path), e.removeInteractiveTarget(e._path), delete this._layers[o(e)];
4108
+ },
4109
+ _updatePath: function(e) {
4110
+ e._project(), e._update();
4111
+ },
4112
+ _updateStyle: function(e) {
4113
+ var t = e._path, n = e.options;
4114
+ t && (n.stroke ? (t.setAttribute("stroke", n.color), t.setAttribute("stroke-opacity", n.opacity), t.setAttribute("stroke-width", n.weight), t.setAttribute("stroke-linecap", n.lineCap), t.setAttribute("stroke-linejoin", n.lineJoin), n.dashArray ? t.setAttribute("stroke-dasharray", n.dashArray) : t.removeAttribute("stroke-dasharray"), n.dashOffset ? t.setAttribute("stroke-dashoffset", n.dashOffset) : t.removeAttribute("stroke-dashoffset")) : t.setAttribute("stroke", "none"), n.fill ? (t.setAttribute("fill", n.fillColor || n.color), t.setAttribute("fill-opacity", n.fillOpacity), t.setAttribute("fill-rule", n.fillRule || "evenodd")) : t.setAttribute("fill", "none"));
4115
+ },
4116
+ _updatePoly: function(e, t) {
4117
+ this._setPath(e, ye(e._parts, t));
4118
+ },
4119
+ _updateCircle: function(e) {
4120
+ var t = e._point, n = Math.max(Math.round(e._radius), 1), r = Math.max(Math.round(e._radiusY), 1) || n, i = "a" + n + "," + r + " 0 1,0 ", a = e._empty() ? "M0 0" : "M" + (t.x - n) + "," + t.y + i + n * 2 + ",0 " + i + -n * 2 + ",0 ";
4121
+ this._setPath(e, a);
4122
+ },
4123
+ _setPath: function(e, t) {
4124
+ e._path.setAttribute("d", t);
4125
+ },
4126
+ _bringToFront: function(e) {
4127
+ kt(e._path);
4128
+ },
4129
+ _bringToBack: function(e) {
4130
+ At(e._path);
4131
+ }
4132
+ });
4133
+ M.vml && qr.include(Gr);
4134
+ function Jr(e) {
4135
+ return M.svg || M.vml ? new qr(e) : null;
4136
+ }
4137
+ W.include({
4138
+ getRenderer: function(e) {
4139
+ var t = e.options.renderer || this._getPaneRenderer(e.options.pane) || this.options.renderer || this._renderer;
4140
+ return t ||= this._renderer = this._createRenderer(), this.hasLayer(t) || this.addLayer(t), t;
4141
+ },
4142
+ _getPaneRenderer: function(e) {
4143
+ if (e === "overlayPane" || e === void 0) return !1;
4144
+ var t = this._paneRenderers[e];
4145
+ return t === void 0 && (t = this._createRenderer({ pane: e }), this._paneRenderers[e] = t), t;
4146
+ },
4147
+ _createRenderer: function(e) {
4148
+ return this.options.preferCanvas && Ur(e) || Jr(e);
4149
+ }
4150
+ });
4151
+ var Yr = dr.extend({
4152
+ initialize: function(e, t) {
4153
+ dr.prototype.initialize.call(this, this._boundsToLatLngs(e), t);
4154
+ },
4155
+ setBounds: function(e) {
4156
+ return this.setLatLngs(this._boundsToLatLngs(e));
4157
+ },
4158
+ _boundsToLatLngs: function(e) {
4159
+ return e = E(e), [
4160
+ e.getSouthWest(),
4161
+ e.getNorthWest(),
4162
+ e.getNorthEast(),
4163
+ e.getSouthEast()
4164
+ ];
4165
+ }
4166
+ });
4167
+ function Xr(e, t) {
4168
+ return new Yr(e, t);
4169
+ }
4170
+ qr.create = Kr, qr.pointsToPath = ye, Z.geometryToLayer = pr, Z.coordsToLatLng = hr, Z.coordsToLatLngs = gr, Z.latLngToCoords = _r, Z.latLngsToCoords = vr, Z.getFeature = yr, Z.asFeature = br, W.mergeOptions({ boxZoom: !0 });
4171
+ var Zr = K.extend({
4172
+ initialize: function(e) {
4173
+ this._map = e, this._container = e._container, this._pane = e._panes.overlayPane, this._resetStateTimeout = 0, e.on("unload", this._destroy, this);
4174
+ },
4175
+ addHooks: function() {
4176
+ B(this._container, "mousedown", this._onMouseDown, this);
4177
+ },
4178
+ removeHooks: function() {
4179
+ H(this._container, "mousedown", this._onMouseDown, this);
4180
+ },
4181
+ moved: function() {
4182
+ return this._moved;
4183
+ },
4184
+ _destroy: function() {
4185
+ P(this._pane), delete this._pane;
4186
+ },
4187
+ _resetState: function() {
4188
+ this._resetStateTimeout = 0, this._moved = !1;
4189
+ },
4190
+ _clearDeferredResetState: function() {
4191
+ this._resetStateTimeout !== 0 && (clearTimeout(this._resetStateTimeout), this._resetStateTimeout = 0);
4192
+ },
4193
+ _onMouseDown: function(e) {
4194
+ if (!e.shiftKey || e.which !== 1 && e.button !== 1) return !1;
4195
+ this._clearDeferredResetState(), this._resetState(), Rt(), Ht(), this._startPoint = this._map.mouseEventToContainerPoint(e), B(document, {
4196
+ contextmenu: an,
4197
+ mousemove: this._onMouseMove,
4198
+ mouseup: this._onMouseUp,
4199
+ keydown: this._onKeyDown
4200
+ }, this);
4201
+ },
4202
+ _onMouseMove: function(e) {
4203
+ this._moved || (this._moved = !0, this._box = N("div", "leaflet-zoom-box", this._container), F(this._container, "leaflet-crosshair"), this._map.fire("boxzoomstart")), this._point = this._map.mouseEventToContainerPoint(e);
4204
+ var t = new C(this._point, this._startPoint), n = t.getSize();
4205
+ z(this._box, t.min), this._box.style.width = n.x + "px", this._box.style.height = n.y + "px";
4206
+ },
4207
+ _finish: function() {
4208
+ this._moved && (P(this._box), I(this._container, "leaflet-crosshair")), zt(), Ut(), H(document, {
4209
+ contextmenu: an,
4210
+ mousemove: this._onMouseMove,
4211
+ mouseup: this._onMouseUp,
4212
+ keydown: this._onKeyDown
4213
+ }, this);
4214
+ },
4215
+ _onMouseUp: function(e) {
4216
+ if ((e.which === 1 || e.button === 1) && (this._finish(), this._moved)) {
4217
+ this._clearDeferredResetState(), this._resetStateTimeout = setTimeout(i(this._resetState, this), 0);
4218
+ var t = new T(this._map.containerPointToLatLng(this._startPoint), this._map.containerPointToLatLng(this._point));
4219
+ this._map.fitBounds(t).fire("boxzoomend", { boxZoomBounds: t });
4220
+ }
4221
+ },
4222
+ _onKeyDown: function(e) {
4223
+ e.keyCode === 27 && (this._finish(), this._clearDeferredResetState(), this._resetState());
4224
+ }
4225
+ });
4226
+ W.addInitHook("addHandler", "boxZoom", Zr), W.mergeOptions({ doubleClickZoom: !0 });
4227
+ var Qr = K.extend({
4228
+ addHooks: function() {
4229
+ this._map.on("dblclick", this._onDoubleClick, this);
4230
+ },
4231
+ removeHooks: function() {
4232
+ this._map.off("dblclick", this._onDoubleClick, this);
4233
+ },
4234
+ _onDoubleClick: function(e) {
4235
+ var t = this._map, n = t.getZoom(), r = t.options.zoomDelta, i = e.originalEvent.shiftKey ? n - r : n + r;
4236
+ t.options.doubleClickZoom === "center" ? t.setZoom(i) : t.setZoomAround(e.containerPoint, i);
4237
+ }
4238
+ });
4239
+ W.addInitHook("addHandler", "doubleClickZoom", Qr), W.mergeOptions({
4240
+ dragging: !0,
4241
+ inertia: !0,
4242
+ inertiaDeceleration: 3400,
4243
+ inertiaMaxSpeed: Infinity,
4244
+ easeLinearity: .2,
4245
+ worldCopyJump: !1,
4246
+ maxBoundsViscosity: 0
4247
+ });
4248
+ var $r = K.extend({
4249
+ addHooks: function() {
4250
+ if (!this._draggable) {
4251
+ var e = this._map;
4252
+ this._draggable = new wn(e._mapPane, e._container), this._draggable.on({
4253
+ dragstart: this._onDragStart,
4254
+ drag: this._onDrag,
4255
+ dragend: this._onDragEnd
4256
+ }, this), this._draggable.on("predrag", this._onPreDragLimit, this), e.options.worldCopyJump && (this._draggable.on("predrag", this._onPreDragWrap, this), e.on("zoomend", this._onZoomEnd, this), e.whenReady(this._onZoomEnd, this));
4257
+ }
4258
+ F(this._map._container, "leaflet-grab leaflet-touch-drag"), this._draggable.enable(), this._positions = [], this._times = [];
4259
+ },
4260
+ removeHooks: function() {
4261
+ I(this._map._container, "leaflet-grab"), I(this._map._container, "leaflet-touch-drag"), this._draggable.disable();
4262
+ },
4263
+ moved: function() {
4264
+ return this._draggable && this._draggable._moved;
4265
+ },
4266
+ moving: function() {
4267
+ return this._draggable && this._draggable._moving;
4268
+ },
4269
+ _onDragStart: function() {
4270
+ var e = this._map;
4271
+ if (e._stop(), this._map.options.maxBounds && this._map.options.maxBoundsViscosity) {
4272
+ var t = E(this._map.options.maxBounds);
4273
+ this._offsetLimit = w(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1), this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())), this._viscosity = Math.min(1, Math.max(0, this._map.options.maxBoundsViscosity));
4274
+ } else this._offsetLimit = null;
4275
+ e.fire("movestart").fire("dragstart"), e.options.inertia && (this._positions = [], this._times = []);
4276
+ },
4277
+ _onDrag: function(e) {
4278
+ if (this._map.options.inertia) {
4279
+ var t = this._lastTime = +/* @__PURE__ */ new Date(), n = this._lastPos = this._draggable._absPos || this._draggable._newPos;
4280
+ this._positions.push(n), this._times.push(t), this._prunePositions(t);
4281
+ }
4282
+ this._map.fire("move", e).fire("drag", e);
4283
+ },
4284
+ _prunePositions: function(e) {
4285
+ for (; this._positions.length > 1 && e - this._times[0] > 50;) this._positions.shift(), this._times.shift();
4286
+ },
4287
+ _onZoomEnd: function() {
4288
+ var e = this._map.getSize().divideBy(2), t = this._map.latLngToLayerPoint([0, 0]);
4289
+ this._initialWorldOffset = t.subtract(e).x, this._worldWidth = this._map.getPixelWorldBounds().getSize().x;
4290
+ },
4291
+ _viscousLimit: function(e, t) {
4292
+ return e - (e - t) * this._viscosity;
4293
+ },
4294
+ _onPreDragLimit: function() {
4295
+ if (this._viscosity && this._offsetLimit) {
4296
+ var e = this._draggable._newPos.subtract(this._draggable._startPos), t = this._offsetLimit;
4297
+ e.x < t.min.x && (e.x = this._viscousLimit(e.x, t.min.x)), e.y < t.min.y && (e.y = this._viscousLimit(e.y, t.min.y)), e.x > t.max.x && (e.x = this._viscousLimit(e.x, t.max.x)), e.y > t.max.y && (e.y = this._viscousLimit(e.y, t.max.y)), this._draggable._newPos = this._draggable._startPos.add(e);
4298
+ }
4299
+ },
4300
+ _onPreDragWrap: function() {
4301
+ var e = this._worldWidth, t = Math.round(e / 2), n = this._initialWorldOffset, r = this._draggable._newPos.x, i = (r - t + n) % e + t - n, a = (r + t + n) % e - t - n, o = Math.abs(i + n) < Math.abs(a + n) ? i : a;
4302
+ this._draggable._absPos = this._draggable._newPos.clone(), this._draggable._newPos.x = o;
4303
+ },
4304
+ _onDragEnd: function(e) {
4305
+ var t = this._map, n = t.options, r = !n.inertia || e.noInertia || this._times.length < 2;
4306
+ if (t.fire("dragend", e), r) t.fire("moveend");
4307
+ else {
4308
+ this._prunePositions(+/* @__PURE__ */ new Date());
4309
+ var i = this._lastPos.subtract(this._positions[0]), a = (this._lastTime - this._times[0]) / 1e3, o = n.easeLinearity, s = i.multiplyBy(o / a), c = s.distanceTo([0, 0]), l = Math.min(n.inertiaMaxSpeed, c), u = s.multiplyBy(l / c), d = l / (n.inertiaDeceleration * o), f = u.multiplyBy(-d / 2).round();
4310
+ !f.x && !f.y ? t.fire("moveend") : (f = t._limitOffset(f, t.options.maxBounds), _(function() {
4311
+ t.panBy(f, {
4312
+ duration: d,
4313
+ easeLinearity: o,
4314
+ noMoveStart: !0,
4315
+ animate: !0
4316
+ });
4317
+ }));
4318
+ }
4319
+ }
4320
+ });
4321
+ W.addInitHook("addHandler", "dragging", $r), W.mergeOptions({
4322
+ keyboard: !0,
4323
+ keyboardPanDelta: 80
4324
+ });
4325
+ var ei = K.extend({
4326
+ keyCodes: {
4327
+ left: [37],
4328
+ right: [39],
4329
+ down: [40],
4330
+ up: [38],
4331
+ zoomIn: [
4332
+ 187,
4333
+ 107,
4334
+ 61,
4335
+ 171
4336
+ ],
4337
+ zoomOut: [
4338
+ 189,
4339
+ 109,
4340
+ 54,
4341
+ 173
4342
+ ]
4343
+ },
4344
+ initialize: function(e) {
4345
+ this._map = e, this._setPanDelta(e.options.keyboardPanDelta), this._setZoomDelta(e.options.zoomDelta);
4346
+ },
4347
+ addHooks: function() {
4348
+ var e = this._map._container;
4349
+ e.tabIndex <= 0 && (e.tabIndex = "0"), B(e, {
4350
+ focus: this._onFocus,
4351
+ blur: this._onBlur,
4352
+ mousedown: this._onMouseDown
4353
+ }, this), this._map.on({
4354
+ focus: this._addHooks,
4355
+ blur: this._removeHooks
4356
+ }, this);
4357
+ },
4358
+ removeHooks: function() {
4359
+ this._removeHooks(), H(this._map._container, {
4360
+ focus: this._onFocus,
4361
+ blur: this._onBlur,
4362
+ mousedown: this._onMouseDown
4363
+ }, this), this._map.off({
4364
+ focus: this._addHooks,
4365
+ blur: this._removeHooks
4366
+ }, this);
4367
+ },
4368
+ _onMouseDown: function() {
4369
+ if (!this._focused) {
4370
+ var e = document.body, t = document.documentElement, n = e.scrollTop || t.scrollTop, r = e.scrollLeft || t.scrollLeft;
4371
+ this._map._container.focus(), window.scrollTo(r, n);
4372
+ }
4373
+ },
4374
+ _onFocus: function() {
4375
+ this._focused = !0, this._map.fire("focus");
4376
+ },
4377
+ _onBlur: function() {
4378
+ this._focused = !1, this._map.fire("blur");
4379
+ },
4380
+ _setPanDelta: function(e) {
4381
+ for (var t = this._panKeys = {}, n = this.keyCodes, r = 0, i = n.left.length; r < i; r++) t[n.left[r]] = [-1 * e, 0];
4382
+ for (r = 0, i = n.right.length; r < i; r++) t[n.right[r]] = [e, 0];
4383
+ for (r = 0, i = n.down.length; r < i; r++) t[n.down[r]] = [0, e];
4384
+ for (r = 0, i = n.up.length; r < i; r++) t[n.up[r]] = [0, -1 * e];
4385
+ },
4386
+ _setZoomDelta: function(e) {
4387
+ for (var t = this._zoomKeys = {}, n = this.keyCodes, r = 0, i = n.zoomIn.length; r < i; r++) t[n.zoomIn[r]] = e;
4388
+ for (r = 0, i = n.zoomOut.length; r < i; r++) t[n.zoomOut[r]] = -e;
4389
+ },
4390
+ _addHooks: function() {
4391
+ B(document, "keydown", this._onKeyDown, this);
4392
+ },
4393
+ _removeHooks: function() {
4394
+ H(document, "keydown", this._onKeyDown, this);
4395
+ },
4396
+ _onKeyDown: function(e) {
4397
+ if (!(e.altKey || e.ctrlKey || e.metaKey)) {
4398
+ var t = e.keyCode, n = this._map, r;
4399
+ if (t in this._panKeys) {
4400
+ if (!n._panAnim || !n._panAnim._inProgress) {
4401
+ if (r = this._panKeys[t], e.shiftKey && (r = S(r).multiplyBy(3)), n.options.maxBounds && (r = n._limitOffset(S(r), n.options.maxBounds)), n.options.worldCopyJump) {
4402
+ var i = n.wrapLatLng(n.unproject(n.project(n.getCenter()).add(r)));
4403
+ n.panTo(i);
4404
+ } else n.panBy(r);
4405
+ }
4406
+ } else if (t in this._zoomKeys) n.setZoom(n.getZoom() + (e.shiftKey ? 3 : 1) * this._zoomKeys[t]);
4407
+ else if (t === 27 && n._popup && n._popup.options.closeOnEscapeKey) n.closePopup();
4408
+ else return;
4409
+ an(e);
4410
+ }
4411
+ }
4412
+ });
4413
+ W.addInitHook("addHandler", "keyboard", ei), W.mergeOptions({
4414
+ scrollWheelZoom: !0,
4415
+ wheelDebounceTime: 40,
4416
+ wheelPxPerZoomLevel: 60
4417
+ });
4418
+ var ti = K.extend({
4419
+ addHooks: function() {
4420
+ B(this._map._container, "wheel", this._onWheelScroll, this), this._delta = 0;
4421
+ },
4422
+ removeHooks: function() {
4423
+ H(this._map._container, "wheel", this._onWheelScroll, this);
4424
+ },
4425
+ _onWheelScroll: function(e) {
4426
+ var t = ln(e), n = this._map.options.wheelDebounceTime;
4427
+ this._delta += t, this._lastMousePos = this._map.mouseEventToContainerPoint(e), this._startTime ||= +/* @__PURE__ */ new Date();
4428
+ var r = Math.max(n - (+/* @__PURE__ */ new Date() - this._startTime), 0);
4429
+ clearTimeout(this._timer), this._timer = setTimeout(i(this._performZoom, this), r), an(e);
4430
+ },
4431
+ _performZoom: function() {
4432
+ var e = this._map, t = e.getZoom(), n = this._map.options.zoomSnap || 0;
4433
+ e._stop();
4434
+ var r = this._delta / (this._map.options.wheelPxPerZoomLevel * 4), i = 4 * Math.log(2 / (1 + Math.exp(-Math.abs(r)))) / Math.LN2, a = n ? Math.ceil(i / n) * n : i, o = e._limitZoom(t + (this._delta > 0 ? a : -a)) - t;
4435
+ this._delta = 0, this._startTime = null, o && (e.options.scrollWheelZoom === "center" ? e.setZoom(t + o) : e.setZoomAround(this._lastMousePos, t + o));
4436
+ }
4437
+ });
4438
+ W.addInitHook("addHandler", "scrollWheelZoom", ti);
4439
+ var ni = 600;
4440
+ W.mergeOptions({
4441
+ tapHold: M.touchNative && M.safari && M.mobile,
4442
+ tapTolerance: 15
4443
+ });
4444
+ var ri = K.extend({
4445
+ addHooks: function() {
4446
+ B(this._map._container, "touchstart", this._onDown, this);
4447
+ },
4448
+ removeHooks: function() {
4449
+ H(this._map._container, "touchstart", this._onDown, this);
4450
+ },
4451
+ _onDown: function(e) {
4452
+ if (clearTimeout(this._holdTimeout), e.touches.length === 1) {
4453
+ var t = e.touches[0];
4454
+ this._startPos = this._newPos = new x(t.clientX, t.clientY), this._holdTimeout = setTimeout(i(function() {
4455
+ this._cancel(), this._isTapValid() && (B(document, "touchend", U), B(document, "touchend touchcancel", this._cancelClickPrevent), this._simulateEvent("contextmenu", t));
4456
+ }, this), ni), B(document, "touchend touchcancel contextmenu", this._cancel, this), B(document, "touchmove", this._onMove, this);
4457
+ }
4458
+ },
4459
+ _cancelClickPrevent: function e() {
4460
+ H(document, "touchend", U), H(document, "touchend touchcancel", e);
4461
+ },
4462
+ _cancel: function() {
4463
+ clearTimeout(this._holdTimeout), H(document, "touchend touchcancel contextmenu", this._cancel, this), H(document, "touchmove", this._onMove, this);
4464
+ },
4465
+ _onMove: function(e) {
4466
+ var t = e.touches[0];
4467
+ this._newPos = new x(t.clientX, t.clientY);
4468
+ },
4469
+ _isTapValid: function() {
4470
+ return this._newPos.distanceTo(this._startPos) <= this._map.options.tapTolerance;
4471
+ },
4472
+ _simulateEvent: function(e, t) {
4473
+ var n = new MouseEvent(e, {
4474
+ bubbles: !0,
4475
+ cancelable: !0,
4476
+ view: window,
4477
+ screenX: t.screenX,
4478
+ screenY: t.screenY,
4479
+ clientX: t.clientX,
4480
+ clientY: t.clientY
4481
+ });
4482
+ n._simulated = !0, t.target.dispatchEvent(n);
4483
+ }
4484
+ });
4485
+ W.addInitHook("addHandler", "tapHold", ri), W.mergeOptions({
4486
+ touchZoom: M.touch,
4487
+ bounceAtZoomLimits: !0
4488
+ });
4489
+ var ii = K.extend({
4490
+ addHooks: function() {
4491
+ F(this._map._container, "leaflet-touch-zoom"), B(this._map._container, "touchstart", this._onTouchStart, this);
4492
+ },
4493
+ removeHooks: function() {
4494
+ I(this._map._container, "leaflet-touch-zoom"), H(this._map._container, "touchstart", this._onTouchStart, this);
4495
+ },
4496
+ _onTouchStart: function(e) {
4497
+ var t = this._map;
4498
+ if (!(!e.touches || e.touches.length !== 2 || t._animatingZoom || this._zooming)) {
4499
+ var n = t.mouseEventToContainerPoint(e.touches[0]), r = t.mouseEventToContainerPoint(e.touches[1]);
4500
+ this._centerPoint = t.getSize()._divideBy(2), this._startLatLng = t.containerPointToLatLng(this._centerPoint), t.options.touchZoom !== "center" && (this._pinchStartLatLng = t.containerPointToLatLng(n.add(r)._divideBy(2))), this._startDist = n.distanceTo(r), this._startZoom = t.getZoom(), this._moved = !1, this._zooming = !0, t._stop(), B(document, "touchmove", this._onTouchMove, this), B(document, "touchend touchcancel", this._onTouchEnd, this), U(e);
4501
+ }
4502
+ },
4503
+ _onTouchMove: function(e) {
4504
+ if (e.touches && e.touches.length === 2 && this._zooming) {
4505
+ var t = this._map, n = t.mouseEventToContainerPoint(e.touches[0]), r = t.mouseEventToContainerPoint(e.touches[1]), a = n.distanceTo(r) / this._startDist;
4506
+ if (this._zoom = t.getScaleZoom(a, this._startZoom), !t.options.bounceAtZoomLimits && (this._zoom < t.getMinZoom() && a < 1 || this._zoom > t.getMaxZoom() && a > 1) && (this._zoom = t._limitZoom(this._zoom)), t.options.touchZoom === "center") {
4507
+ if (this._center = this._startLatLng, a === 1) return;
4508
+ } else {
4509
+ var o = n._add(r)._divideBy(2)._subtract(this._centerPoint);
4510
+ if (a === 1 && o.x === 0 && o.y === 0) return;
4511
+ this._center = t.unproject(t.project(this._pinchStartLatLng, this._zoom).subtract(o), this._zoom);
4512
+ }
4513
+ this._moved ||= (t._moveStart(!0, !1), !0), v(this._animRequest);
4514
+ var s = i(t._move, t, this._center, this._zoom, {
4515
+ pinch: !0,
4516
+ round: !1
4517
+ }, void 0);
4518
+ this._animRequest = _(s, this, !0), U(e);
4519
+ }
4520
+ },
4521
+ _onTouchEnd: function() {
4522
+ !this._moved || !this._zooming ? this._zooming = !1 : (this._zooming = !1, v(this._animRequest), H(document, "touchmove", this._onTouchMove, this), H(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)));
4523
+ }
4524
+ });
4525
+ W.addInitHook("addHandler", "touchZoom", ii), W.BoxZoom = Zr, W.DoubleClickZoom = Qr, W.Drag = $r, W.Keyboard = ei, W.ScrollWheelZoom = ti, W.TapHold = ri, W.TouchZoom = ii, e.Bounds = C, e.Browser = M, e.CRS = k, e.Canvas = Hr, e.Circle = cr, e.CircleMarker = or, e.Class = y, e.Control = G, e.DivIcon = Pr, e.DivOverlay = Q, e.DomEvent = dn, e.DomUtil = Xt, e.Draggable = wn, e.Evented = ue, e.FeatureGroup = Y, e.GeoJSON = Z, e.GridLayer = Ir, e.Handler = K, e.Icon = $n, e.ImageOverlay = wr, e.LatLng = D, e.LatLngBounds = T, e.Layer = J, e.LayerGroup = Xn, e.LineUtil = Un, e.Map = W, e.Marker = rr, e.Mixin = Sn, e.Path = ar, e.Point = x, e.PolyUtil = On, e.Polygon = dr, e.Polyline = X, e.Popup = Ar, e.PosAnimation = fn, e.Projection = Kn, e.Rectangle = Yr, e.Renderer = $, e.SVG = qr, e.SVGOverlay = Or, e.TileLayer = Rr, e.Tooltip = Mr, e.Transformation = me, e.Util = ce, e.VideoOverlay = Er, e.bind = i, e.bounds = w, e.canvas = Ur, e.circle = lr, e.circleMarker = sr, e.control = mn, e.divIcon = Fr, e.extend = n, e.featureGroup = Qn, e.geoJSON = Sr, e.geoJson = Cr, e.gridLayer = Lr, e.icon = er, e.imageOverlay = Tr, e.latLng = O, e.latLngBounds = E, e.layerGroup = Zn, e.map = pn, e.marker = ir, e.point = S, e.polygon = fr, e.polyline = ur, e.popup = jr, e.rectangle = Xr, e.setOptions = p, e.stamp = o, e.svg = Jr, e.svgOverlay = kr, e.tileLayer = zr, e.tooltip = Nr, e.transformation = he, e.version = t, e.videoOverlay = Dr;
4526
+ var ai = window.L;
4527
+ e.noConflict = function() {
4528
+ return window.L = ai, this;
4529
+ }, window.L = e;
4530
+ }));
4531
+ }));
4532
+ export default t();
4533
+ export { t as require_leaflet_src };
4534
+
4535
+ //# sourceMappingURL=leaflet-src.js.map