@revolugo/elements 7.11.2 → 7.12.0-alpha.0

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