1/* @preserve 2 * Leaflet 1.9.1, a JS library for interactive maps. https://leafletjs.com 3 * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade 4 */ 5! ( function ( t, e ) { 6 'object' == typeof exports && 'undefined' != typeof module 7 ? e( exports ) 8 : 'function' == typeof define && define.amd 9 ? define( [ 'exports' ], e ) 10 : e( 11 ( ( t = 12 'undefined' != typeof globalThis 13 ? globalThis 14 : t || self ).leaflet = {} ) 15 ); 16} )( this, function ( t ) { 17 'use strict'; 18 var R = '1.9.1'; 19 function l( t ) { 20 for ( var e, i, n = 1, o = arguments.length; n < o; n++ ) 21 for ( e in ( i = arguments[ n ] ) ) t[ e ] = i[ e ]; 22 return t; 23 } 24 var N = 25 Object.create || 26 function ( t ) { 27 return ( D.prototype = t ), new D(); 28 }; 29 function D() {} 30 function a( t, e ) { 31 var i, 32 n = Array.prototype.slice; 33 return t.bind 34 ? t.bind.apply( t, n.call( arguments, 1 ) ) 35 : ( ( i = n.call( arguments, 2 ) ), 36 function () { 37 return t.apply( 38 e, 39 i.length ? i.concat( n.call( arguments ) ) : arguments 40 ); 41 } ); 42 } 43 var j = 0; 44 function h( t ) { 45 return '_leaflet_id' in t || ( t._leaflet_id = ++j ), t._leaflet_id; 46 } 47 function H( t, e, i ) { 48 var n, 49 o, 50 s = function () { 51 ( n = ! 1 ), o && ( r.apply( i, o ), ( o = ! 1 ) ); 52 }, 53 r = function () { 54 n 55 ? ( o = arguments ) 56 : ( t.apply( i, arguments ), 57 setTimeout( s, e ), 58 ( n = ! 0 ) ); 59 }; 60 return r; 61 } 62 function F( t, e, i ) { 63 var n = e[ 1 ], 64 e = e[ 0 ], 65 o = n - e; 66 return t === n && i ? t : ( ( ( ( t - e ) % o ) + o ) % o ) + e; 67 } 68 function u() { 69 return ! 1; 70 } 71 function i( t, e ) { 72 return ! 1 === e 73 ? t 74 : ( ( e = Math.pow( 10, void 0 === e ? 6 : e ) ), 75 Math.round( t * e ) / e ); 76 } 77 function W( t ) { 78 return t.trim ? t.trim() : t.replace( /^\s+|\s+$/g, '' ); 79 } 80 function U( t ) { 81 return W( t ).split( /\s+/ ); 82 } 83 function c( t, e ) { 84 for ( var i in ( Object.prototype.hasOwnProperty.call( t, 'options' ) || 85 ( t.options = t.options ? N( t.options ) : {} ), 86 e ) ) 87 t.options[ i ] = e[ i ]; 88 return t.options; 89 } 90 function V( t, e, i ) { 91 var n, 92 o = []; 93 for ( n in t ) 94 o.push( 95 encodeURIComponent( i ? n.toUpperCase() : n ) + 96 '=' + 97 encodeURIComponent( t[ n ] ) 98 ); 99 return ( e && -1 !== e.indexOf( '?' ) ? '&' : '?' ) + o.join( '&' ); 100 } 101 var G = /\{ *([\w_ -]+) *\}/g; 102 function q( t, i ) { 103 return t.replace( G, function ( t, e ) { 104 e = i[ e ]; 105 if ( void 0 === e ) 106 throw new Error( 'No value provided for variable ' + t ); 107 return ( e = 'function' == typeof e ? e( i ) : e ); 108 } ); 109 } 110 var d = 111 Array.isArray || 112 function ( t ) { 113 return '[object Array]' === Object.prototype.toString.call( t ); 114 }; 115 function K( t, e ) { 116 for ( var i = 0; i < t.length; i++ ) if ( t[ i ] === e ) return i; 117 return -1; 118 } 119 var Y = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs='; 120 function J( t ) { 121 return ( 122 window[ 'webkit' + t ] || window[ 'moz' + t ] || window[ 'ms' + t ] 123 ); 124 } 125 var X = 0; 126 function $( t ) { 127 var e = +new Date(), 128 i = Math.max( 0, 16 - ( e - X ) ); 129 return ( X = e + i ), window.setTimeout( t, i ); 130 } 131 var Q = window.requestAnimationFrame || J( 'RequestAnimationFrame' ) || $, 132 tt = 133 window.cancelAnimationFrame || 134 J( 'CancelAnimationFrame' ) || 135 J( 'CancelRequestAnimationFrame' ) || 136 function ( t ) { 137 window.clearTimeout( t ); 138 }; 139 function x( t, e, i ) { 140 if ( ! i || Q !== $ ) return Q.call( window, a( t, e ) ); 141 t.call( e ); 142 } 143 function r( t ) { 144 t && tt.call( window, t ); 145 } 146 var et = { 147 __proto__: null, 148 extend: l, 149 create: N, 150 bind: a, 151 get lastId() { 152 return j; 153 }, 154 stamp: h, 155 throttle: H, 156 wrapNum: F, 157 falseFn: u, 158 formatNum: i, 159 trim: W, 160 splitWords: U, 161 setOptions: c, 162 getParamString: V, 163 template: q, 164 isArray: d, 165 indexOf: K, 166 emptyImageUrl: Y, 167 requestFn: Q, 168 cancelFn: tt, 169 requestAnimFrame: x, 170 cancelAnimFrame: r, 171 }; 172 function e() {} 173 ( e.extend = function ( t ) { 174 function e() { 175 c( this ), 176 this.initialize && this.initialize.apply( this, arguments ), 177 this.callInitHooks(); 178 } 179 var i, 180 n = ( e.__super__ = this.prototype ), 181 o = N( n ); 182 for ( i in ( ( ( o.constructor = e ).prototype = o ), this ) ) 183 Object.prototype.hasOwnProperty.call( this, i ) && 184 'prototype' !== i && 185 '__super__' !== i && 186 ( e[ i ] = this[ i ] ); 187 if ( ( t.statics && l( e, t.statics ), t.includes ) ) { 188 var s = t.includes; 189 if ( 'undefined' != typeof L && L && L.Mixin ) { 190 s = d( s ) ? s : [ s ]; 191 for ( var r = 0; r < s.length; r++ ) 192 s[ r ] === L.Mixin.Events && 193 console.warn(
194 'Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.', 195 new Error().stack 196 ); 197 } 198 l.apply( null, [ o ].concat( t.includes ) ); 199 } 200 return ( 201 l( o, t ), 202 delete o.statics, 203 delete o.includes, 204 o.options && 205 ( ( o.options = n.options ? N( n.options ) : {} ), 206 l( o.options, t.options ) ), 207 ( o._initHooks = [] ), 208 ( o.callInitHooks = function () { 209 if ( ! this._initHooksCalled ) { 210 n.callInitHooks && n.callInitHooks.call( this ), 211 ( this._initHooksCalled = ! 0 ); 212 for ( var t = 0, e = o._initHooks.length; t < e; t++ ) 213 o._initHooks[ t ].call( this ); 214 } 215 } ), 216 e 217 ); 218 } ), 219 ( e.include = function ( t ) { 220 var e = this.prototype.options; 221 return ( 222 l( this.prototype, t ), 223 t.options && 224 ( ( this.prototype.options = e ), 225 this.mergeOptions( t.options ) ), 226 this 227 ); 228 } ), 229 ( e.mergeOptions = function ( t ) { 230 return l( this.prototype.options, t ), this; 231 } ), 232 ( e.addInitHook = function ( t ) { 233 var e = Array.prototype.slice.call( arguments, 1 ), 234 i = 235 'function' == typeof t 236 ? t 237 : function () { 238 this[ t ].apply( this, e ); 239 }; 240 return ( 241 ( this.prototype._initHooks = this.prototype._initHooks || [] ), 242 this.prototype._initHooks.push( i ), 243 this 244 ); 245 } ); 246 var n = { 247 on: function ( t, e, i ) { 248 if ( 'object' == typeof t ) 249 for ( var n in t ) this._on( n, t[ n ], e ); 250 else 251 for ( var o = 0, s = ( t = U( t ) ).length; o < s; o++ ) 252 this._on( t[ o ], e, i ); 253 return this; 254 }, 255 off: function ( t, e, i ) { 256 if ( arguments.length ) 257 if ( 'object' == typeof t ) 258 for ( var n in t ) this._off( n, t[ n ], e ); 259 else { 260 t = U( t ); 261 for ( 262 var o = 1 === arguments.length, s = 0, r = t.length; 263 s < r; 264 s++ 265 ) 266 o ? this._off( t[ s ] ) : this._off( t[ s ], e, i ); 267 } 268 else delete this._events; 269 return this; 270 }, 271 _on: function ( t, e, i, n ) { 272 'function' != typeof e 273 ? console.warn( 'wrong listener type: ' + typeof e ) 274 : ! 1 === this._listens( t, e, i ) && 275 ( ( e = { fn: e, ctx: ( i = i === this ? void 0 : i ) } ), 276 n && ( e.once = ! 0 ), 277 ( this._events = this._events || {} ), 278 ( this._events[ t ] = this._events[ t ] || [] ), 279 this._events[ t ].push( e ) ); 280 }, 281 _off: function ( t, e, i ) { 282 var n, o, s; 283 if ( this._events && ( n = this._events[ t ] ) ) 284 if ( 1 === arguments.length ) { 285 if ( this._firingCount ) 286 for ( o = 0, s = n.length; o < s; o++ ) 287 n[ o ].fn = u; 288 delete this._events[ t ]; 289 } else 290 'function' != typeof e 291 ? console.warn( 'wrong listener type: ' + typeof e ) 292 : ! 1 !== ( e = this._listens( t, e, i ) ) && 293 ( ( i = n[ e ] ), 294 this._firingCount && 295 ( ( i.fn = u ), 296 ( this._events[ t ] = n = n.slice() ) ), 297 n.splice( e, 1 ) ); 298 }, 299 fire: function ( t, e, i ) { 300 if ( this.listens( t, i ) ) { 301 var n = l( {}, e, { 302 type: t, 303 target: this, 304 sourceTarget: ( e && e.sourceTarget ) || this, 305 } ); 306 if ( this._events ) { 307 var o = this._events[ t ]; 308 if ( o ) { 309 this._firingCount = this._firingCount + 1 || 1; 310 for ( var s = 0, r = o.length; s < r; s++ ) { 311 var a = o[ s ], 312 h = a.fn; 313 a.once && this.off( t, h, a.ctx ), 314 h.call( a.ctx || this, n ); 315 } 316 this._firingCount--; 317 } 318 } 319 i && this._propagateEvent( n ); 320 } 321 return this; 322 }, 323 listens: function ( t, e, i, n ) { 324 'string' != typeof t && 325 console.warn( '"string" type argument expected' ); 326 var o = e, 327 s = 328 ( 'function' != typeof e && 329 ( ( n = !! e ), ( i = o = void 0 ) ), 330 this._events && this._events[ t ] ); 331 if ( s && s.length && ! 1 !== this._listens( t, o, i ) ) 332 return ! 0; 333 if ( n ) 334 for ( var r in this._eventParents ) 335 if ( this._eventParents[ r ].listens( t, e, i, n ) ) 336 return ! 0; 337 return ! 1; 338 }, 339 _listens: function ( t, e, i ) { 340 if ( this._events ) { 341 var n = this._events[ t ] || []; 342 if ( ! e ) return !! n.length; 343 i === this && ( i = void 0 ); 344 for ( var o = 0, s = n.length; o < s; o++ ) 345 if ( n[ o ].fn === e && n[ o ].ctx === i ) return o; 346 } 347 return ! 1; 348 }, 349 once: function ( t, e, i ) { 350 if ( 'object' == typeof t ) 351 for ( var n in t ) this._on( n, t[ n ], e, ! 0 ); 352 else 353 for ( var o = 0, s = ( t = U( t ) ).length; o < s; o++ ) 354 this._on( t[ o ], e, i, ! 0 ); 355 return this; 356 }, 357 addEventParent: function ( t ) { 358 return ( 359 ( this._eventParents = this._eventParents || {} ), 360 ( this._eventParents[ h( t ) ] = t ), 361 this 362 ); 363 }, 364 removeEventParent: function ( t ) { 365 return ( 366 this._eventParents && delete this._eventParents[ h( t ) ], 367 this 368 ); 369 }, 370 _propagateEvent: function ( t ) { 371 for ( var e in this._eventParents ) 372 this._eventParents[ e ].fire( 373 t.type,
374 l( { layer: t.target, propagatedFrom: t.target }, t ), 375 ! 0 376 ); 377 }, 378 }, 379 it = 380 ( ( n.addEventListener = n.on ), 381 ( n.removeEventListener = n.clearAllEventListeners = n.off ), 382 ( n.addOneTimeEventListener = n.once ), 383 ( n.fireEvent = n.fire ), 384 ( n.hasEventListeners = n.listens ), 385 e.extend( n ) ); 386 function p( t, e, i ) { 387 ( this.x = i ? Math.round( t ) : t ), 388 ( this.y = i ? Math.round( e ) : e ); 389 } 390 var nt = 391 Math.trunc || 392 function ( t ) { 393 return 0 < t ? Math.floor( t ) : Math.ceil( t ); 394 }; 395 function m( t, e, i ) { 396 return t instanceof p 397 ? t 398 : d( t ) 399 ? new p( t[ 0 ], t[ 1 ] ) 400 : null == t 401 ? t 402 : 'object' == typeof t && 'x' in t && 'y' in t 403 ? new p( t.x, t.y ) 404 : new p( t, e, i ); 405 } 406 function f( t, e ) { 407 if ( t ) 408 for ( var i = e ? [ t, e ] : t, n = 0, o = i.length; n < o; n++ ) 409 this.extend( i[ n ] ); 410 } 411 function _( t, e ) { 412 return ! t || t instanceof f ? t : new f( t, e ); 413 } 414 function s( t, e ) { 415 if ( t ) 416 for ( var i = e ? [ t, e ] : t, n = 0, o = i.length; n < o; n++ ) 417 this.extend( i[ n ] ); 418 } 419 function g( t, e ) { 420 return t instanceof s ? t : new s( t, e ); 421 } 422 function v( t, e, i ) { 423 if ( isNaN( t ) || isNaN( e ) ) 424 throw new Error( 'Invalid LatLng object: (' + t + ', ' + e + ')' ); 425 ( this.lat = +t ), ( this.lng = +e ), void 0 !== i && ( this.alt = +i ); 426 } 427 function w( t, e, i ) { 428 return t instanceof v 429 ? t 430 : d( t ) && 'object' != typeof t[ 0 ] 431 ? 3 === t.length 432 ? new v( t[ 0 ], t[ 1 ], t[ 2 ] ) 433 : 2 === t.length 434 ? new v( t[ 0 ], t[ 1 ] ) 435 : null 436 : null == t 437 ? t 438 : 'object' == typeof t && 'lat' in t 439 ? new v( t.lat, 'lng' in t ? t.lng : t.lon, t.alt ) 440 : void 0 === e 441 ? null 442 : new v( t, e, i ); 443 } 444 ( p.prototype = { 445 clone: function () { 446 return new p( this.x, this.y ); 447 }, 448 add: function ( t ) { 449 return this.clone()._add( m( t ) ); 450 }, 451 _add: function ( t ) { 452 return ( this.x += t.x ), ( this.y += t.y ), this; 453 }, 454 subtract: function ( t ) { 455 return this.clone()._subtract( m( t ) ); 456 }, 457 _subtract: function ( t ) { 458 return ( this.x -= t.x ), ( this.y -= t.y ), this; 459 }, 460 divideBy: function ( t ) { 461 return this.clone()._divideBy( t ); 462 }, 463 _divideBy: function ( t ) { 464 return ( this.x /= t ), ( this.y /= t ), this; 465 }, 466 multiplyBy: function ( t ) { 467 return this.clone()._multiplyBy( t ); 468 }, 469 _multiplyBy: function ( t ) { 470 return ( this.x *= t ), ( this.y *= t ), this; 471 }, 472 scaleBy: function ( t ) { 473 return new p( this.x * t.x, this.y * t.y ); 474 }, 475 unscaleBy: function ( t ) { 476 return new p( this.x / t.x, this.y / t.y ); 477 }, 478 round: function () { 479 return this.clone()._round(); 480 }, 481 _round: function () { 482 return ( 483 ( this.x = Math.round( this.x ) ), 484 ( this.y = Math.round( this.y ) ), 485 this 486 ); 487 }, 488 floor: function () { 489 return this.clone()._floor(); 490 }, 491 _floor: function () { 492 return ( 493 ( this.x = Math.floor( this.x ) ), 494 ( this.y = Math.floor( this.y ) ), 495 this 496 ); 497 }, 498 ceil: function () { 499 return this.clone()._ceil(); 500 }, 501 _ceil: function () { 502 return ( 503 ( this.x = Math.ceil( this.x ) ), 504 ( this.y = Math.ceil( this.y ) ), 505 this 506 ); 507 }, 508 trunc: function () { 509 return this.clone()._trunc(); 510 }, 511 _trunc: function () { 512 return ( this.x = nt( this.x ) ), ( this.y = nt( this.y ) ), this; 513 }, 514 distanceTo: function ( t ) { 515 var e = ( t = m( t ) ).x - this.x, 516 t = t.y - this.y; 517 return Math.sqrt( e * e + t * t ); 518 }, 519 equals: function ( t ) { 520 return ( t = m( t ) ).x === this.x && t.y === this.y; 521 }, 522 contains: function ( t ) { 523 return ( 524 ( t = m( t ) ), 525 Math.abs( t.x ) <= Math.abs( this.x ) && 526 Math.abs( t.y ) <= Math.abs( this.y ) 527 ); 528 }, 529 toString: function () { 530 return 'Point(' + i( this.x ) + ', ' + i( this.y ) + ')'; 531 }, 532 } ), 533 ( f.prototype = { 534 extend: function ( t ) { 535 var e, i; 536 if ( t ) { 537 if ( 538 t instanceof p || 539 'number' == typeof t[ 0 ] || 540 'x' in t 541 ) 542 e = i = m( t ); 543 else if ( 544 ( ( e = ( t = _( t ) ).min ), 545 ( i = t.max ), 546 ! e || ! i ) 547 ) 548 return this; 549 this.min || this.max 550 ? ( ( this.min.x = Math.min( e.x, this.min.x ) ), 551 ( this.max.x = Math.max( i.x, this.max.x ) ), 552 ( this.min.y = Math.min( e.y, this.min.y ) ), 553 ( this.max.y = Math.max( i.y, this.max.y ) ) ) 554 : ( ( this.min = e.clone() ), 555 ( this.max = i.clone() ) ); 556 } 557 return this; 558 }, 559 getCenter: function ( t ) { 560 return m( 561 ( this.min.x + this.max.x ) / 2, 562 ( this.min.y + this.max.y ) / 2, 563 t 564 ); 565 }, 566 getBottomLeft: function () { 567 return m( this.min.x, this.max.y ); 568 }, 569 getTopRight: function () { 570 return m( this.max.x, this.min.y ); 571 }, 572 getTopLeft: function () { 573 return this.min; 574 }, 575 getBottomRight: function () { 576 return this.max; 577 }, 578 getSize: function () { 579 return this.max.subtract( this.min ); 580 },
581 contains: function ( t ) { 582 var e, i; 583 return ( 584 ( t = ( 585 'number' == typeof t[ 0 ] || t instanceof p ? m : _ 586 )( t ) ) instanceof f 587 ? ( ( e = t.min ), ( i = t.max ) ) 588 : ( e = i = t ), 589 e.x >= this.min.x && 590 i.x <= this.max.x && 591 e.y >= this.min.y && 592 i.y <= this.max.y 593 ); 594 }, 595 intersects: function ( t ) { 596 t = _( t ); 597 var e = this.min, 598 i = this.max, 599 n = t.min, 600 t = t.max, 601 o = t.x >= e.x && n.x <= i.x, 602 t = t.y >= e.y && n.y <= i.y; 603 return o && t; 604 }, 605 overlaps: function ( t ) { 606 t = _( t ); 607 var e = this.min, 608 i = this.max, 609 n = t.min, 610 t = t.max, 611 o = t.x > e.x && n.x < i.x, 612 t = t.y > e.y && n.y < i.y; 613 return o && t; 614 }, 615 isValid: function () { 616 return ! ( ! this.min || ! this.max ); 617 }, 618 pad: function ( t ) { 619 var e = this.min, 620 i = this.max, 621 n = Math.abs( e.x - i.x ) * t, 622 t = Math.abs( e.y - i.y ) * t; 623 return _( m( e.x - n, e.y - t ), m( i.x + n, i.y + t ) ); 624 }, 625 equals: function ( t ) { 626 return ( 627 !! t && 628 ( ( t = _( t ) ), 629 this.min.equals( t.getTopLeft() ) && 630 this.max.equals( t.getBottomRight() ) ) 631 ); 632 }, 633 } ), 634 ( s.prototype = { 635 extend: function ( t ) { 636 var e, 637 i, 638 n = this._southWest, 639 o = this._northEast; 640 if ( t instanceof v ) i = e = t; 641 else { 642 if ( ! ( t instanceof s ) ) 643 return t ? this.extend( w( t ) || g( t ) ) : this; 644 if ( 645 ( ( e = t._southWest ), 646 ( i = t._northEast ), 647 ! e || ! i ) 648 ) 649 return this; 650 } 651 return ( 652 n || o 653 ? ( ( n.lat = Math.min( e.lat, n.lat ) ), 654 ( n.lng = Math.min( e.lng, n.lng ) ), 655 ( o.lat = Math.max( i.lat, o.lat ) ), 656 ( o.lng = Math.max( i.lng, o.lng ) ) ) 657 : ( ( this._southWest = new v( e.lat, e.lng ) ), 658 ( this._northEast = new v( i.lat, i.lng ) ) ), 659 this 660 ); 661 }, 662 pad: function ( t ) { 663 var e = this._southWest, 664 i = this._northEast, 665 n = Math.abs( e.lat - i.lat ) * t, 666 t = Math.abs( e.lng - i.lng ) * t; 667 return new s( 668 new v( e.lat - n, e.lng - t ), 669 new v( i.lat + n, i.lng + t ) 670 ); 671 }, 672 getCenter: function () { 673 return new v( 674 ( this._southWest.lat + this._northEast.lat ) / 2, 675 ( this._southWest.lng + this._northEast.lng ) / 2 676 ); 677 }, 678 getSouthWest: function () { 679 return this._southWest; 680 }, 681 getNorthEast: function () { 682 return this._northEast; 683 }, 684 getNorthWest: function () { 685 return new v( this.getNorth(), this.getWest() ); 686 }, 687 getSouthEast: function () { 688 return new v( this.getSouth(), this.getEast() ); 689 }, 690 getWest: function () { 691 return this._southWest.lng; 692 }, 693 getSouth: function () { 694 return this._southWest.lat; 695 }, 696 getEast: function () { 697 return this._northEast.lng; 698 }, 699 getNorth: function () { 700 return this._northEast.lat; 701 }, 702 contains: function ( t ) { 703 t = ( 704 'number' == typeof t[ 0 ] || t instanceof v || 'lat' in t 705 ? w 706 : g 707 )( t ); 708 var e, 709 i, 710 n = this._southWest, 711 o = this._northEast; 712 return ( 713 t instanceof s
714 ? ( ( e = t.getSouthWest() ), ( i = t.getNorthEast() ) ) 715 : ( e = i = t ), 716 e.lat >= n.lat && 717 i.lat <= o.lat && 718 e.lng >= n.lng && 719 i.lng <= o.lng 720 ); 721 }, 722 intersects: function ( t ) { 723 t = g( t ); 724 var e = this._southWest, 725 i = this._northEast, 726 n = t.getSouthWest(), 727 t = t.getNorthEast(), 728 o = t.lat >= e.lat && n.lat <= i.lat, 729 t = t.lng >= e.lng && n.lng <= i.lng; 730 return o && t; 731 }, 732 overlaps: function ( t ) { 733 t = g( t ); 734 var e = this._southWest, 735 i = this._northEast, 736 n = t.getSouthWest(), 737 t = t.getNorthEast(), 738 o = t.lat > e.lat && n.lat < i.lat, 739 t = t.lng > e.lng && n.lng < i.lng; 740 return o && t; 741 }, 742 toBBoxString: function () { 743 return [ 744 this.getWest(), 745 this.getSouth(), 746 this.getEast(), 747 this.getNorth(), 748 ].join( ',' ); 749 }, 750 equals: function ( t, e ) { 751 return ( 752 !! t && 753 ( ( t = g( t ) ), 754 this._southWest.equals( t.getSouthWest(), e ) && 755 this._northEast.equals( t.getNorthEast(), e ) ) 756 ); 757 }, 758 isValid: function () { 759 return ! ( ! this._southWest || ! this._northEast ); 760 }, 761 } ); 762 var ot = { 763 latLngToPoint: function ( t, e ) { 764 ( t = this.projection.project( t ) ), ( e = this.scale( e ) ); 765 return this.transformation._transform( t, e ); 766 }, 767 pointToLatLng: function ( t, e ) { 768 ( e = this.scale( e ) ), 769 ( t = this.transformation.untransform( t, e ) ); 770 return this.projection.unproject( t ); 771 }, 772 project: function ( t ) { 773 return this.projection.project( t ); 774 }, 775 unproject: function ( t ) { 776 return this.projection.unproject( t ); 777 }, 778 scale: function ( t ) { 779 return 256 * Math.pow( 2, t ); 780 }, 781 zoom: function ( t ) { 782 return Math.log( t / 256 ) / Math.LN2; 783 }, 784 getProjectedBounds: function ( t ) { 785 var e; 786 return this.infinite 787 ? null 788 : ( ( e = this.projection.bounds ), 789 ( t = this.scale( t ) ), 790 new f( 791 this.transformation.transform( e.min, t ), 792 this.transformation.transform( e.max, t ) 793 ) ); 794 }, 795 infinite: ! ( v.prototype = { 796 equals: function ( t, e ) { 797 return ( 798 !! t && 799 ( ( t = w( t ) ), 800 Math.max( 801 Math.abs( this.lat - t.lat ), 802 Math.abs( this.lng - t.lng ) 803 ) <= ( void 0 === e ? 1e-9 : e ) ) 804 ); 805 }, 806 toString: function ( t ) { 807 return ( 808 'LatLng(' + 809 i( this.lat, t ) + 810 ', ' + 811 i( this.lng, t ) + 812 ')' 813 ); 814 }, 815 distanceTo: function ( t ) { 816 return st.distance( this, w( t ) ); 817 }, 818 wrap: function () { 819 return st.wrapLatLng( this ); 820 }, 821 toBounds: function ( t ) { 822 var t = ( 180 * t ) / 40075017, 823 e = t / Math.cos( ( Math.PI / 180 ) * this.lat ); 824 return g( 825 [ this.lat - t, this.lng - e ], 826 [ this.lat + t, this.lng + e ] 827 ); 828 }, 829 clone: function () { 830 return new v( this.lat, this.lng, this.alt ); 831 }, 832 } ), 833 wrapLatLng: function ( t ) { 834 var e = this.wrapLng ? F( t.lng, this.wrapLng, ! 0 ) : t.lng; 835 return new v( 836 this.wrapLat ? F( t.lat, this.wrapLat, ! 0 ) : t.lat, 837 e, 838 t.alt 839 ); 840 }, 841 wrapLatLngBounds: function ( t ) { 842 var e = t.getCenter(), 843 i = this.wrapLatLng( e ), 844 n = e.lat - i.lat, 845 e = e.lng - i.lng; 846 return 0 == n && 0 == e 847 ? t
848 : ( ( i = t.getSouthWest() ), 849 ( t = t.getNorthEast() ), 850 new s( 851 new v( i.lat - n, i.lng - e ), 852 new v( t.lat - n, t.lng - e ) 853 ) ); 854 }, 855 }, 856 st = l( {}, ot, { 857 wrapLng: [ -180, 180 ], 858 R: 6371e3, 859 distance: function ( t, e ) { 860 var i = Math.PI / 180, 861 n = t.lat * i, 862 o = e.lat * i, 863 s = Math.sin( ( ( e.lat - t.lat ) * i ) / 2 ), 864 e = Math.sin( ( ( e.lng - t.lng ) * i ) / 2 ), 865 t = s * s + Math.cos( n ) * Math.cos( o ) * e * e, 866 i = 2 * Math.atan2( Math.sqrt( t ), Math.sqrt( 1 - t ) ); 867 return this.R * i; 868 }, 869 } ), 870 rt = 6378137, 871 rt = { 872 R: rt, 873 MAX_LATITUDE: 85.0511287798, 874 project: function ( t ) { 875 var e = Math.PI / 180, 876 i = this.MAX_LATITUDE, 877 i = Math.max( Math.min( i, t.lat ), -i ), 878 i = Math.sin( i * e ); 879 return new p( 880 this.R * t.lng * e, 881 ( this.R * Math.log( ( 1 + i ) / ( 1 - i ) ) ) / 2 882 ); 883 }, 884 unproject: function ( t ) { 885 var e = 180 / Math.PI; 886 return new v( 887 ( 2 * Math.atan( Math.exp( t.y / this.R ) ) - 888 Math.PI / 2 ) * 889 e, 890 ( t.x * e ) / this.R 891 ); 892 }, 893 bounds: new f( [ -( rt = rt * Math.PI ), -rt ], [ rt, rt ] ), 894 }; 895 function at( t, e, i, n ) { 896 d( t ) 897 ? ( ( this._a = t[ 0 ] ), 898 ( this._b = t[ 1 ] ), 899 ( this._c = t[ 2 ] ), 900 ( this._d = t[ 3 ] ) ) 901 : ( ( this._a = t ), 902 ( this._b = e ), 903 ( this._c = i ), 904 ( this._d = n ) ); 905 } 906 function ht( t, e, i, n ) { 907 return new at( t, e, i, n ); 908 } 909 at.prototype = { 910 transform: function ( t, e ) { 911 return this._transform( t.clone(), e ); 912 }, 913 _transform: function ( t, e ) { 914 return ( 915 ( t.x = ( e = e || 1 ) * ( this._a * t.x + this._b ) ), 916 ( t.y = e * ( this._c * t.y + this._d ) ), 917 t 918 ); 919 }, 920 untransform: function ( t, e ) { 921 return new p( 922 ( t.x / ( e = e || 1 ) - this._b ) / this._a, 923 ( t.y / e - this._d ) / this._c 924 ); 925 }, 926 }; 927 var lt = l( {}, st, { 928 code: 'EPSG:3857', 929 projection: rt, 930 transformation: ht( 931 ( lt = 0.5 / ( Math.PI * rt.R ) ), 932 0.5, 933 -lt, 934 0.5 935 ), 936 } ), 937 ut = l( {}, lt, { code: 'EPSG:900913' } ); 938 function ct( t ) { 939 return document.createElementNS( 'http://www.w3.org/2000/svg', t ); 940 } 941 function dt( t, e ) { 942 for ( var i, n, o, s, r = '', a = 0, h = t.length; a < h; a++ ) { 943 for ( i = 0, n = ( o = t[ a ] ).length; i < n; i++ ) 944 r += ( i ? 'L' : 'M' ) + ( s = o[ i ] ).x + ' ' + s.y; 945 r += e ? ( b.svg ? 'z' : 'x' ) : ''; 946 } 947 return r || 'M0 0'; 948 } 949 var _t = document.documentElement.style, 950 pt = 'ActiveXObject' in window, 951 mt = pt && ! document.addEventListener, 952 o = 'msLaunchUri' in navigator && ! ( 'documentMode' in document ), 953 ft = Wt( 'webkit' ), 954 gt = Wt( 'android' ), 955 vt = Wt( 'android 2' ) || Wt( 'android 3' ), 956 yt = parseInt( 957 /WebKit\/([0-9]+)|$/.exec( navigator.userAgent )[ 1 ], 958 10 959 ), 960 yt = gt && Wt( 'Google' ) && yt < 537 && ! ( 'AudioNode' in window ), 961 xt = !! window.opera, 962 wt = ! o && Wt( 'chrome' ), 963 bt = Wt( 'gecko' ) && ! ft && ! xt && ! pt, 964 Pt = ! wt && Wt( 'safari' ), 965 Lt = Wt( 'phantom' ), 966 y = 'OTransition' in _t, 967 Tt = 0 === navigator.platform.indexOf( 'Win' ), 968 Mt = pt && 'transition' in _t, 969 zt = 970 'WebKitCSSMatrix' in window && 971 'm11' in new window.WebKitCSSMatrix() && 972 ! vt, 973 _t = 'MozPerspective' in _t, 974 Ct = ! window.L_DISABLE_3D && ( Mt || zt || _t ) && ! y && ! Lt, 975 Zt = 'undefined' != typeof orientation || Wt( 'mobile' ), 976 St = Zt && ft, 977 Et = Zt && zt, 978 kt = ! window.PointerEvent && window.MSPointerEvent, 979 Ot = ! ( ! window.PointerEvent && ! kt ), 980 Bt = 'ontouchstart' in window || !! window.TouchEvent, 981 At = ! window.L_NO_TOUCH && ( Bt || Ot ), 982 It = Zt && xt, 983 Rt = Zt && bt, 984 Nt = 985 1 < 986 ( window.devicePixelRatio || 987 window.screen.deviceXDPI / window.screen.logicalXDPI ), 988 Dt = ( function () { 989 var t = ! 1; 990 try { 991 var e = Object.defineProperty( {}, 'passive', { 992 get: function () { 993 t = ! 0; 994 }, 995 } ); 996 window.addEventListener( 'testPassiveEventSupport', u, e ), 997 window.removeEventListener( 998 'testPassiveEventSupport', 999 u, 1000 e 1001 ); 1002 } catch ( t ) {} 1003 return t; 1004 } )(), 1005 jt = !! document.createElement( 'canvas' ).getContext, 1006 Ht = ! ( ! document.createElementNS || ! ct( 'svg' ).createSVGRect ), 1007 Ft = 1008 !! Ht && 1009 ( ( ( Ft = document.createElement( 'div' ) ).innerHTML = '<svg/>' ),
1010 'http://www.w3.org/2000/svg' === 1011 ( Ft.firstChild && Ft.firstChild.namespaceURI ) ); 1012 function Wt( t ) { 1013 return 0 <= navigator.userAgent.toLowerCase().indexOf( t ); 1014 } 1015 var b = { 1016 ie: pt, 1017 ielt9: mt, 1018 edge: o, 1019 webkit: ft, 1020 android: gt, 1021 android23: vt, 1022 androidStock: yt, 1023 opera: xt, 1024 chrome: wt, 1025 gecko: bt, 1026 safari: Pt, 1027 phantom: Lt, 1028 opera12: y, 1029 win: Tt, 1030 ie3d: Mt, 1031 webkit3d: zt, 1032 gecko3d: _t, 1033 any3d: Ct, 1034 mobile: Zt, 1035 mobileWebkit: St, 1036 mobileWebkit3d: Et, 1037 msPointer: kt, 1038 pointer: Ot, 1039 touch: At, 1040 touchNative: Bt, 1041 mobileOpera: It, 1042 mobileGecko: Rt, 1043 retina: Nt, 1044 passiveEvents: Dt, 1045 canvas: jt, 1046 svg: Ht, 1047 vml: 1048 ! Ht && 1049 ( function () { 1050 try { 1051 var t = document.createElement( 'div' ), 1052 e = 1053 ( ( t.innerHTML = '<v:shape adj="1"/>' ), 1054 t.firstChild ); 1055 return ( 1056 ( e.style.behavior = 'url(#default#VML)' ), 1057 e && 'object' == typeof e.adj 1058 ); 1059 } catch ( t ) { 1060 return ! 1; 1061 } 1062 } )(), 1063 inlineSvg: Ft, 1064 mac: 0 === navigator.platform.indexOf( 'Mac' ), 1065 linux: 0 === navigator.platform.indexOf( 'Linux' ), 1066 }, 1067 Ut = b.msPointer ? 'MSPointerDown' : 'pointerdown', 1068 Vt = b.msPointer ? 'MSPointerMove' : 'pointermove', 1069 Gt = b.msPointer ? 'MSPointerUp' : 'pointerup', 1070 qt = b.msPointer ? 'MSPointerCancel' : 'pointercancel', 1071 Kt = { touchstart: Ut, touchmove: Vt, touchend: Gt, touchcancel: qt }, 1072 Yt = { 1073 touchstart: function ( t, e ) { 1074 e.MSPOINTER_TYPE_TOUCH && 1075 e.pointerType === e.MSPOINTER_TYPE_TOUCH && 1076 k( e ); 1077 ie( t, e ); 1078 }, 1079 touchmove: ie, 1080 touchend: ie, 1081 touchcancel: ie, 1082 }, 1083 Jt = {}, 1084 Xt = ! 1; 1085 function $t( t, e, i ) { 1086 return ( 1087 'touchstart' !== e || 1088 Xt || 1089 ( document.addEventListener( Ut, Qt, ! 0 ), 1090 document.addEventListener( Vt, te, ! 0 ), 1091 document.addEventListener( Gt, ee, ! 0 ), 1092 document.addEventListener( qt, ee, ! 0 ), 1093 ( Xt = ! 0 ) ), 1094 Yt[ e ] 1095 ? ( ( i = Yt[ e ].bind( this, i ) ), 1096 t.addEventListener( Kt[ e ], i, ! 1 ), 1097 i ) 1098 : ( console.warn( 'wrong event specified:', e ), 1099 L.Util.falseFn ) 1100 ); 1101 } 1102 function Qt( t ) { 1103 Jt[ t.pointerId ] = t; 1104 } 1105 function te( t ) { 1106 Jt[ t.pointerId ] && ( Jt[ t.pointerId ] = t ); 1107 } 1108 function ee( t ) { 1109 delete Jt[ t.pointerId ]; 1110 } 1111 function ie( t, e ) { 1112 if ( e.pointerType !== ( e.MSPOINTER_TYPE_MOUSE || 'mouse' ) ) { 1113 for ( var i in ( ( e.touches = [] ), Jt ) ) 1114 e.touches.push( Jt[ i ] ); 1115 ( e.changedTouches = [ e ] ), t( e ); 1116 } 1117 } 1118 var ne = 200; 1119 function oe( t, i ) { 1120 t.addEventListener( 'dblclick', i ); 1121 var n, 1122 o = 0; 1123 function e( t ) { 1124 var e; 1125 1 !== t.detail 1126 ? ( n = t.detail ) 1127 : 'mouse' === t.pointerType || 1128 ( t.sourceCapabilities && 1129 ! t.sourceCapabilities.firesTouchEvents ) || 1130 ( ( e = je( t ) ).some( function ( t ) { 1131 return ( 1132 t instanceof HTMLLabelElement && t.attributes.for 1133 ); 1134 } ) && 1135 ! e.some( function ( t ) { 1136 return ( 1137 t instanceof HTMLInputElement || 1138 t instanceof HTMLSelectElement 1139 ); 1140 } ) ) || 1141 ( ( e = Date.now() ) - o <= ne 1142 ? 2 === ++n && 1143 i( 1144 ( function ( t ) { 1145 var e, 1146 i, 1147 n = {}; 1148 for ( i in t ) 1149 ( e = t[ i ] ), 1150 ( n[ i ] = 1151 e && e.bind ? e.bind( t ) : e ); 1152 return ( 1153 ( ( t = n ).type = 'dblclick' ), 1154 ( n.detail = 2 ), 1155 ( n.isTrusted = ! 1 ), 1156 ( n._simulated = ! 0 ), 1157 n 1158 ); 1159 } )( t ) 1160 ) 1161 : ( n = 1 ), 1162 ( o = e ) ); 1163 } 1164 return ( 1165 t.addEventListener( 'click', e ), { dblclick: i, simDblclick: e } 1166 ); 1167 } 1168 var se, 1169 re, 1170 ae, 1171 he, 1172 le, 1173 ue, 1174 ce = be( [ 1175 'transform', 1176 'webkitTransform', 1177 'OTransform', 1178 'MozTransform', 1179 'msTransform', 1180 ] ), 1181 de = be( [ 1182 'webkitTransition', 1183 'transition', 1184 'OTransition', 1185 'MozTransition', 1186 'msTransition', 1187 ] ), 1188 _e = 1189 'webkitTransition' === de || 'OTransition' === de 1190 ? de + 'End' 1191 : 'transitionend'; 1192 function pe( t ) { 1193 return 'string' == typeof t ? document.getElementById( t ) : t; 1194 } 1195 function me( t, e ) { 1196 var i = t.style[ e ] || ( t.currentStyle && t.currentStyle[ e ] ); 1197 return 'auto' === 1198 ( i = 1199 ( i && 'auto' !== i ) || ! document.defaultView 1200 ? i 1201 : ( t = document.defaultView.getComputedStyle( t, null ) ) 1202 ? t[ e ] 1203 : null ) 1204 ? null 1205 : i; 1206 } 1207 function P( t, e, i ) { 1208 t = document.createElement( t ); 1209 return ( t.className = e || '' ), i && i.appendChild( t ), t; 1210 } 1211 function T( t ) { 1212 var e = t.parentNode; 1213 e && e.removeChild( t ); 1214 } 1215 function fe( t ) { 1216 for ( ; t.firstChild; ) t.removeChild( t.firstChild ); 1217 } 1218 function ge( t ) { 1219 var e = t.parentNode; 1220 e && e.lastChild !== t && e.appendChild( t ); 1221 } 1222 function ve( t ) { 1223 var e = t.parentNode; 1224 e && e.firstChild !== t && e.insertBefore( t, e.firstChild ); 1225 } 1226 function ye( t, e ) { 1227 return void 0 !== t.classList 1228 ? t.classList.contains( e ) 1229 : 0 < ( t = we( t ) ).length && 1230 new RegExp( '(^|\\s)' + e + '(\\s|$)' ).test( t ); 1231 } 1232 function M( t, e ) { 1233 var i; 1234 if ( void 0 !== t.classList ) 1235 for ( var n = U( e ), o = 0, s = n.length; o < s; o++ ) 1236 t.classList.add( n[ o ] ); 1237 else ye( t, e ) || xe( t, ( ( i = we( t ) ) ? i + ' ' : '' ) + e ); 1238 } 1239 function z( t, e ) { 1240 void 0 !== t.classList 1241 ? t.classList.remove( e ) 1242 : xe( 1243 t, 1244 W( ( ' ' + we( t ) + ' ' ).replace( ' ' + e + ' ', ' ' ) ) 1245 ); 1246 } 1247 function xe( t, e ) { 1248 void 0 === t.className.baseVal 1249 ? ( t.className = e ) 1250 : ( t.className.baseVal = e ); 1251 } 1252 function we( t ) { 1253 return void 0 === 1254 ( t = t.correspondingElement ? t.correspondingElement : t ) 1255 .className.baseVal 1256 ? t.className 1257 : t.className.baseVal; 1258 } 1259 function C( t, e ) { 1260 if ( 'opacity' in t.style ) t.style.opacity = e; 1261 else if ( 'filter' in t.style ) { 1262 var i = ! 1, 1263 n = 'DXImageTransform.Microsoft.Alpha'; 1264 try { 1265 i = t.filters.item( n ); 1266 } catch ( t ) { 1267 if ( 1 === e ) return; 1268 } 1269 ( e = Math.round( 100 * e ) ), 1270 i 1271 ? ( ( i.Enabled = 100 !== e ), ( i.Opacity = e ) ) 1272 : ( t.style.filter += 1273 ' progid:' + n + '(opacity=' + e + ')' ); 1274 } 1275 } 1276 function be( t ) { 1277 for ( var e = document.documentElement.style, i = 0; i < t.length; i++ ) 1278 if ( t[ i ] in e ) return t[ i ]; 1279 return ! 1; 1280 } 1281 function Pe( t, e, i ) { 1282 e = e || new p( 0, 0 ); 1283 t.style[ ce ] = 1284 ( b.ie3d 1285 ? 'translate(' + e.x + 'px,' + e.y + 'px)' 1286 : 'translate3d(' + e.x + 'px,' + e.y + 'px,0)' ) + 1287 ( i ? ' scale(' + i + ')' : '' ); 1288 } 1289 function Z( t, e ) { 1290 ( t._leaflet_pos = e ), 1291 b.any3d 1292 ? Pe( t, e ) 1293 : ( ( t.style.left = e.x + 'px' ), 1294 ( t.style.top = e.y + 'px' ) ); 1295 } 1296 function Le( t ) { 1297 return t._leaflet_pos || new p( 0, 0 ); 1298 } 1299 function Te() { 1300 S( window, 'dragstart', k ); 1301 } 1302 function Me() { 1303 E( window, 'dragstart', k ); 1304 } 1305 function ze( t ) { 1306 for ( ; -1 === t.tabIndex; ) t = t.parentNode; 1307 t.style && 1308 ( Ce(), 1309 ( ue = ( le = t ).style.outline ), 1310 ( t.style.outline = 'none' ), 1311 S( window, 'keydown', Ce ) ); 1312 } 1313 function Ce() { 1314 le && 1315 ( ( le.style.outline = ue ), 1316 ( ue = le = void 0 ), 1317 E( window, 'keydown', Ce ) ); 1318 } 1319 function Ze( t ) { 1320 for ( 1321 ; 1322 ! ( 1323 ( ( t = t.parentNode ).offsetWidth && t.offsetHeight ) || 1324 t === document.body 1325 ); 1326 1327 ); 1328 return t; 1329 } 1330 function Se( t ) { 1331 var e = t.getBoundingClientRect(); 1332 return { 1333 x: e.width / t.offsetWidth || 1, 1334 y: e.height / t.offsetHeight || 1, 1335 boundingClientRect: e, 1336 }; 1337 } 1338 he = 1339 'onselectstart' in document 1340 ? ( ( ae = function () { 1341 S( window, 'selectstart', k ); 1342 } ), 1343 function () { 1344 E( window, 'selectstart', k ); 1345 } ) 1346 : ( ( re = be( [ 1347 'userSelect', 1348 'WebkitUserSelect', 1349 'OUserSelect', 1350 'MozUserSelect', 1351 'msUserSelect', 1352 ] ) ), 1353 ( ae = function () { 1354 var t; 1355 re && 1356 ( ( t = document.documentElement.style ), 1357 ( se = t[ re ] ), 1358 ( t[ re ] = 'none' ) ); 1359 } ), 1360 function () { 1361 re && 1362 ( ( document.documentElement.style[ re ] = se ), 1363 ( se = void 0 ) ); 1364 } ); 1365 pt = { 1366 __proto__: null, 1367 TRANSFORM: ce, 1368 TRANSITION: de, 1369 TRANSITION_END: _e, 1370 get: pe, 1371 getStyle: me, 1372 create: P, 1373 remove: T, 1374 empty: fe, 1375 toFront: ge, 1376 toBack: ve, 1377 hasClass: ye, 1378 addClass: M, 1379 removeClass: z, 1380 setClass: xe, 1381 getClass: we, 1382 setOpacity: C, 1383 testProp: be, 1384 setTransform: Pe, 1385 setPosition: Z, 1386 getPosition: Le, 1387 get disableTextSelection() { 1388 return ae; 1389 }, 1390 get enableTextSelection() { 1391 return he; 1392 }, 1393 disableImageDrag: Te, 1394 enableImageDrag: Me, 1395 preventOutline: ze, 1396 restoreOutline: Ce, 1397 getSizedParentNode: Ze, 1398 getScale: Se, 1399 }; 1400 function S( t, e, i, n ) { 1401 if ( e && 'object' == typeof e ) 1402 for ( var o in e ) Be( t, o, e[ o ], i ); 1403 else 1404 for ( var s = 0, r = ( e = U( e ) ).length; s < r; s++ ) 1405 Be( t, e[ s ], i, n ); 1406 return this; 1407 } 1408 var Ee = '_leaflet_events'; 1409 function E( t, e, i, n ) { 1410 if ( 1 === arguments.length ) ke( t ), delete t[ Ee ]; 1411 else if ( e && 'object' == typeof e ) 1412 for ( var o in e ) Ae( t, o, e[ o ], i ); 1413 else if ( ( ( e = U( e ) ), 2 === arguments.length ) ) 1414 ke( t, function ( t ) { 1415 return -1 !== K( e, t ); 1416 } ); 1417 else for ( var s = 0, r = e.length; s < r; s++ ) Ae( t, e[ s ], i, n ); 1418 return this; 1419 } 1420 function ke( t, e ) { 1421 for ( var i in t[ Ee ] ) { 1422 var n = i.split( /\d/ )[ 0 ]; 1423 ( e && ! e( n ) ) || Ae( t, n, null, null, i ); 1424 } 1425 } 1426 var Oe = { 1427 mouseenter: 'mouseover',
1428 mouseleave: 'mouseout', 1429 wheel: ! ( 'onwheel' in window ) && 'mousewheel', 1430 }; 1431 function Be( e, t, i, n ) { 1432 var o, 1433 s, 1434 r = t + h( i ) + ( n ? '_' + h( n ) : '' ); 1435 ( e[ Ee ] && e[ Ee ][ r ] ) || 1436 ( ( s = o = 1437 function ( t ) { 1438 return i.call( n || e, t || window.event ); 1439 } ), 1440 ! b.touchNative && b.pointer && 0 === t.indexOf( 'touch' ) 1441 ? ( o = $t( e, t, o ) ) 1442 : b.touch && 'dblclick' === t 1443 ? ( o = oe( e, o ) ) 1444 : 'addEventListener' in e 1445 ? 'touchstart' === t || 1446 'touchmove' === t || 1447 'wheel' === t || 1448 'mousewheel' === t 1449 ? e.addEventListener( 1450 Oe[ t ] || t, 1451 o, 1452 !! b.passiveEvents && { passive: ! 1 } 1453 ) 1454 : 'mouseenter' === t || 'mouseleave' === t 1455 ? e.addEventListener( 1456 Oe[ t ], 1457 ( o = function ( t ) { 1458 ( t = t || window.event ), Ue( e, t ) && s( t ); 1459 } ), 1460 ! 1 1461 ) 1462 : e.addEventListener( t, s, ! 1 ) 1463 : e.attachEvent( 'on' + t, o ), 1464 ( e[ Ee ] = e[ Ee ] || {} ), 1465 ( e[ Ee ][ r ] = o ) ); 1466 } 1467 function Ae( t, e, i, n, o ) { 1468 o = o || e + h( i ) + ( n ? '_' + h( n ) : '' ); 1469 var s, 1470 r, 1471 i = t[ Ee ] && t[ Ee ][ o ]; 1472 i && 1473 ( ! b.touchNative && b.pointer && 0 === e.indexOf( 'touch' ) 1474 ? ( ( n = t ), 1475 ( r = i ), 1476 Kt[ ( s = e ) ] 1477 ? n.removeEventListener( Kt[ s ], r, ! 1 ) 1478 : console.warn( 'wrong event specified:', s ) ) 1479 : b.touch && 'dblclick' === e 1480 ? ( ( n = i ), 1481 ( r = t ).removeEventListener( 'dblclick', n.dblclick ), 1482 r.removeEventListener( 'click', n.simDblclick ) ) 1483 : 'removeEventListener' in t 1484 ? t.removeEventListener( Oe[ e ] || e, i, ! 1 ) 1485 : t.detachEvent( 'on' + e, i ), 1486 ( t[ Ee ][ o ] = null ) ); 1487 } 1488 function Ie( t ) { 1489 return ( 1490 t.stopPropagation 1491 ? t.stopPropagation() 1492 : t.originalEvent 1493 ? ( t.originalEvent._stopped = ! 0 ) 1494 : ( t.cancelBubble = ! 0 ), 1495 this 1496 ); 1497 } 1498 function Re( t ) { 1499 return Be( t, 'wheel', Ie ), this; 1500 } 1501 function Ne( t ) { 1502 return ( 1503 S( t, 'mousedown touchstart dblclick contextmenu', Ie ), 1504 ( t._leaflet_disable_click = ! 0 ), 1505 this 1506 ); 1507 } 1508 function k( t ) { 1509 return ( 1510 t.preventDefault ? t.preventDefault() : ( t.returnValue = ! 1 ), 1511 this 1512 ); 1513 } 1514 function De( t ) { 1515 return k( t ), Ie( t ), this; 1516 } 1517 function je( t ) { 1518 if ( t.composedPath ) return t.composedPath(); 1519 for ( var e = [], i = t.target; i; ) e.push( i ), ( i = i.parentNode ); 1520 return e; 1521 } 1522 function He( t, e ) { 1523 var i, n; 1524 return e 1525 ? ( ( n = ( i = Se( e ) ).boundingClientRect ), 1526 new p( 1527 ( t.clientX - n.left ) / i.x - e.clientLeft, 1528 ( t.clientY - n.top ) / i.y - e.clientTop 1529 ) ) 1530 : new p( t.clientX, t.clientY ); 1531 } 1532 var Fe = 1533 b.linux && b.chrome 1534 ? window.devicePixelRatio 1535 : b.mac 1536 ? 3 * window.devicePixelRatio 1537 : 0 < window.devicePixelRatio 1538 ? 2 * window.devicePixelRatio 1539 : 1; 1540 function We( t ) { 1541 return b.edge 1542 ? t.wheelDeltaY / 2 1543 : t.deltaY && 0 === t.deltaMode 1544 ? -t.deltaY / Fe 1545 : t.deltaY && 1 === t.deltaMode 1546 ? 20 * -t.deltaY 1547 : t.deltaY && 2 === t.deltaMode 1548 ? 60 * -t.deltaY 1549 : t.deltaX || t.deltaZ 1550 ? 0 1551 : t.wheelDelta 1552 ? ( t.wheelDeltaY || t.wheelDelta ) / 2 1553 : t.detail && Math.abs( t.detail ) < 32765 1554 ? 20 * -t.detail 1555 : t.detail 1556 ? ( t.detail / -32765 ) * 60 1557 : 0; 1558 } 1559 function Ue( t, e ) { 1560 var i = e.relatedTarget; 1561 if ( ! i ) return ! 0; 1562 try { 1563 for ( ; i && i !== t; ) i = i.parentNode; 1564 } catch ( t ) { 1565 return ! 1; 1566 } 1567 return i !== t; 1568 } 1569 var mt = { 1570 __proto__: null, 1571 on: S, 1572 off: E, 1573 stopPropagation: Ie, 1574 disableScrollPropagation: Re, 1575 disableClickPropagation: Ne, 1576 preventDefault: k, 1577 stop: De, 1578 getPropagationPath: je, 1579 getMousePosition: He, 1580 getWheelDelta: We, 1581 isExternalTarget: Ue, 1582 addListener: S, 1583 removeListener: E, 1584 }, 1585 Ve = it.extend( { 1586 run: function ( t, e, i, n ) { 1587 this.stop(), 1588 ( this._el = t ), 1589 ( this._inProgress = ! 0 ), 1590 ( this._duration = i || 0.25 ), 1591 ( this._easeOutPower = 1 / Math.max( n || 0.5, 0.2 ) ), 1592 ( this._startPos = Le( t ) ), 1593 ( this._offset = e.subtract( this._startPos ) ), 1594 ( this._startTime = +new Date() ), 1595 this.fire( 'start' ), 1596 this._animate(); 1597 }, 1598 stop: function () { 1599 this._inProgress && ( this._step( ! 0 ), this._complete() ); 1600 }, 1601 _animate: function () { 1602 ( this._animId = x( this._animate, this ) ), this._step(); 1603 }, 1604 _step: function ( t ) { 1605 var e = +new Date() - this._startTime, 1606 i = 1e3 * this._duration; 1607 e < i 1608 ? this._runFrame( this._easeOut( e / i ), t ) 1609 : ( this._runFrame( 1 ), this._complete() ); 1610 }, 1611 _runFrame: function ( t, e ) { 1612 t = this._startPos.add( this._offset.multiplyBy( t ) ); 1613 e && t._round(), Z( this._el, t ), this.fire( 'step' ); 1614 }, 1615 _complete: function () { 1616 r( this._animId ), 1617 ( this._inProgress = ! 1 ), 1618 this.fire( 'end' ); 1619 }, 1620 _easeOut: function ( t ) { 1621 return 1 - Math.pow( 1 - t, this._easeOutPower ); 1622 }, 1623 } ), 1624 O = it.extend( { 1625 options: { 1626 crs: lt, 1627 center: void 0, 1628 zoom: void 0, 1629 minZoom: void 0, 1630 maxZoom: void 0, 1631 layers: [], 1632 maxBounds: void 0, 1633 renderer: void 0, 1634 zoomAnimation: ! 0, 1635 zoomAnimationThreshold: 4, 1636 fadeAnimation: ! 0, 1637 markerZoomAnimation: ! 0, 1638 transform3DLimit: 8388608, 1639 zoomSnap: 1, 1640 zoomDelta: 1, 1641 trackResize: ! 0, 1642 }, 1643 initialize: function ( t, e ) { 1644 ( e = c( this, e ) ), 1645 ( this._handlers = [] ), 1646 ( this._layers = {} ), 1647 ( this._zoomBoundLayers = {} ), 1648 ( this._sizeChanged = ! 0 ), 1649 this._initContainer( t ), 1650 this._initLayout(), 1651 ( this._onResize = a( this._onResize, this ) ), 1652 this._initEvents(), 1653 e.maxBounds && this.setMaxBounds( e.maxBounds ), 1654 void 0 !== e.zoom && 1655 ( this._zoom = this._limitZoom( e.zoom ) ), 1656 e.center && 1657 void 0 !== e.zoom && 1658 this.setView( w( e.center ), e.zoom, { reset: ! 0 } ), 1659 this.callInitHooks(), 1660 ( this._zoomAnimated = 1661 de && 1662 b.any3d && 1663 ! b.mobileOpera && 1664 this.options.zoomAnimation ), 1665 this._zoomAnimated && 1666 ( this._createAnimProxy(), 1667 S( this._proxy, _e, this._catchTransitionEnd, this ) ), 1668 this._addLayers( this.options.layers ); 1669 },
1670 setView: function ( t, e, i ) { 1671 if ( 1672 ( ( e = void 0 === e ? this._zoom : this._limitZoom( e ) ), 1673 ( t = this._limitCenter( 1674 w( t ), 1675 e, 1676 this.options.maxBounds 1677 ) ), 1678 ( i = i || {} ), 1679 this._stop(), 1680 this._loaded && ! i.reset && ! 0 !== i ) && 1681 ( void 0 !== i.animate && 1682 ( ( i.zoom = l( { animate: i.animate }, i.zoom ) ), 1683 ( i.pan = l( 1684 { animate: i.animate, duration: i.duration }, 1685 i.pan 1686 ) ) ), 1687 this._zoom !== e 1688 ? this._tryAnimatedZoom && 1689 this._tryAnimatedZoom( t, e, i.zoom ) 1690 : this._tryAnimatedPan( t, i.pan ) ) 1691 ) 1692 return clearTimeout( this._sizeTimer ), this; 1693 return ( 1694 this._resetView( t, e, i.pan && i.pan.noMoveStart ), this 1695 ); 1696 }, 1697 setZoom: function ( t, e ) { 1698 return this._loaded 1699 ? this.setView( this.getCenter(), t, { zoom: e } ) 1700 : ( ( this._zoom = t ), this ); 1701 }, 1702 zoomIn: function ( t, e ) { 1703 return ( 1704 ( t = t || ( b.any3d ? this.options.zoomDelta : 1 ) ), 1705 this.setZoom( this._zoom + t, e ) 1706 ); 1707 }, 1708 zoomOut: function ( t, e ) { 1709 return ( 1710 ( t = t || ( b.any3d ? this.options.zoomDelta : 1 ) ), 1711 this.setZoom( this._zoom - t, e ) 1712 ); 1713 }, 1714 setZoomAround: function ( t, e, i ) { 1715 var n = this.getZoomScale( e ), 1716 o = this.getSize().divideBy( 2 ), 1717 t = ( 1718 t instanceof p ? t : this.latLngToContainerPoint( t ) 1719 ) 1720 .subtract( o ) 1721 .multiplyBy( 1 - 1 / n ), 1722 n = this.containerPointToLatLng( o.add( t ) ); 1723 return this.setView( n, e, { zoom: i } ); 1724 }, 1725 _getBoundsCenterZoom: function ( t, e ) { 1726 ( e = e || {} ), ( t = t.getBounds ? t.getBounds() : g( t ) ); 1727 var i = m( e.paddingTopLeft || e.padding || [ 0, 0 ] ), 1728 n = m( e.paddingBottomRight || e.padding || [ 0, 0 ] ), 1729 o = this.getBoundsZoom( t, ! 1, i.add( n ) ); 1730 return ( o = 1731 'number' == typeof e.maxZoom 1732 ? Math.min( e.maxZoom, o ) 1733 : o ) === 1734 1 / 0 1735 ? { center: t.getCenter(), zoom: o } 1736 : ( ( e = n.subtract( i ).divideBy( 2 ) ),
1737 ( n = this.project( t.getSouthWest(), o ) ), 1738 ( i = this.project( t.getNorthEast(), o ) ), 1739 { 1740 center: this.unproject( 1741 n.add( i ).divideBy( 2 ).add( e ), 1742 o 1743 ), 1744 zoom: o, 1745 } ); 1746 }, 1747 fitBounds: function ( t, e ) { 1748 if ( ( t = g( t ) ).isValid() ) 1749 return ( 1750 ( t = this._getBoundsCenterZoom( t, e ) ), 1751 this.setView( t.center, t.zoom, e ) 1752 ); 1753 throw new Error( 'Bounds are not valid.' ); 1754 }, 1755 fitWorld: function ( t ) { 1756 return this.fitBounds( 1757 [ 1758 [ -90, -180 ], 1759 [ 90, 180 ], 1760 ], 1761 t 1762 ); 1763 }, 1764 panTo: function ( t, e ) { 1765 return this.setView( t, this._zoom, { pan: e } ); 1766 }, 1767 panBy: function ( t, e ) { 1768 var i; 1769 return ( 1770 ( e = e || {} ), 1771 ( t = m( t ).round() ).x || t.y 1772 ? ( ! 0 === e.animate || this.getSize().contains( t ) 1773 ? ( this._panAnim || 1774 ( ( this._panAnim = new Ve() ), 1775 this._panAnim.on( 1776 { 1777 step: this._onPanTransitionStep, 1778 end: this._onPanTransitionEnd, 1779 }, 1780 this 1781 ) ), 1782 e.noMoveStart || this.fire( 'movestart' ), 1783 ! 1 !== e.animate 1784 ? ( M( 1785 this._mapPane, 1786 'leaflet-pan-anim' 1787 ), 1788 ( i = this._getMapPanePos() 1789 .subtract( t ) 1790 .round() ), 1791 this._panAnim.run( 1792 this._mapPane, 1793 i, 1794 e.duration || 0.25, 1795 e.easeLinearity 1796 ) ) 1797 : ( this._rawPanBy( t ), 1798 this.fire( 'move' ).fire( 1799 'moveend' 1800 ) ) ) 1801 : this._resetView( 1802 this.unproject( 1803 this.project( 1804 this.getCenter() 1805 ).add( t ) 1806 ), 1807 this.getZoom() 1808 ), 1809 this ) 1810 : this.fire( 'moveend' ) 1811 ); 1812 }, 1813 flyTo: function ( n, o, t ) { 1814 if ( ! 1 === ( t = t || {} ).animate || ! b.any3d ) 1815 return this.setView( n, o, t ); 1816 this._stop(); 1817 var s = this.project( this.getCenter() ), 1818 r = this.project( n ), 1819 e = this.getSize(), 1820 a = this._zoom, 1821 h = 1822 ( ( n = w( n ) ), 1823 ( o = void 0 === o ? a : o ), 1824 Math.max( e.x, e.y ) ), 1825 i = h * this.getZoomScale( a, o ), 1826 l = r.distanceTo( s ) || 1, 1827 u = 1.42, 1828 c = u * u; 1829 function d( t ) { 1830 ( t = 1831 ( i * i - h * h + ( t ? -1 : 1 ) * c * c * l * l ) / 1832 ( 2 * ( t ? i : h ) * c * l ) ), 1833 ( t = Math.sqrt( t * t + 1 ) - t ); 1834 return t < 1e-9 ? -18 : Math.log( t ); 1835 } 1836 function _( t ) { 1837 return ( Math.exp( t ) - Math.exp( -t ) ) / 2; 1838 } 1839 function p( t ) { 1840 return ( Math.exp( t ) + Math.exp( -t ) ) / 2; 1841 } 1842 var m = d( 0 ); 1843 function f( t ) { 1844 return ( 1845 ( h * 1846 ( p( m ) * ( _( ( t = m + u * t ) ) / p( t ) ) - 1847 _( m ) ) ) / 1848 c 1849 ); 1850 } 1851 var g = Date.now(), 1852 v = ( d( 1 ) - m ) / u, 1853 y = t.duration ? 1e3 * t.duration : 1e3 * v * 0.8; 1854 return ( 1855 this._moveStart( ! 0, t.noMoveStart ), 1856 function t() { 1857 var e = ( Date.now() - g ) / y, 1858 i = ( 1 - Math.pow( 1 - e, 1.5 ) ) * v; 1859 e <= 1 1860 ? ( ( this._flyToFrame = x( t, this ) ), 1861 this._move( 1862 this.unproject( 1863 s.add( 1864 r 1865 .subtract( s ) 1866 .multiplyBy( f( i ) / l ) 1867 ), 1868 a 1869 ), 1870 this.getScaleZoom( 1871 h / 1872 ( ( e = i ), 1873 h * ( p( m ) / p( m + u * e ) ) ), 1874 a 1875 ), 1876 { flyTo: ! 0 } 1877 ) ) 1878 : this._move( n, o )._moveEnd( ! 0 ); 1879 }.call( this ), 1880 this 1881 ); 1882 }, 1883 flyToBounds: function ( t, e ) { 1884 t = this._getBoundsCenterZoom( t, e ); 1885 return this.flyTo( t.center, t.zoom, e ); 1886 }, 1887 setMaxBounds: function ( t ) { 1888 return ( 1889 ( t = g( t ) ), 1890 this.listens( 'moveend', this._panInsideMaxBounds ) && 1891 this.off( 'moveend', this._panInsideMaxBounds ), 1892 t.isValid() 1893 ? ( ( this.options.maxBounds = t ), 1894 this._loaded && this._panInsideMaxBounds(), 1895 this.on( 'moveend', this._panInsideMaxBounds ) ) 1896 : ( ( this.options.maxBounds = null ), this ) 1897 ); 1898 }, 1899 setMinZoom: function ( t ) { 1900 var e = this.options.minZoom; 1901 return ( 1902 ( this.options.minZoom = t ), 1903 this._loaded && 1904 e !== t && 1905 ( this.fire( 'zoomlevelschange' ), 1906 this.getZoom() < this.options.minZoom ) 1907 ? this.setZoom( t ) 1908 : this 1909 ); 1910 }, 1911 setMaxZoom: function ( t ) { 1912 var e = this.options.maxZoom; 1913 return ( 1914 ( this.options.maxZoom = t ), 1915 this._loaded && 1916 e !== t && 1917 ( this.fire( 'zoomlevelschange' ), 1918 this.getZoom() > this.options.maxZoom ) 1919 ? this.setZoom( t ) 1920 : this 1921 ); 1922 }, 1923 panInsideBounds: function ( t, e ) { 1924 this._enforcingBounds = ! 0; 1925 var i = this.getCenter(), 1926 t = this._limitCenter( i, this._zoom, g( t ) ); 1927 return ( 1928 i.equals( t ) || this.panTo( t, e ), 1929 ( this._enforcingBounds = ! 1 ), 1930 this 1931 ); 1932 }, 1933 panInside: function ( t, e ) { 1934 var i = m( 1935 ( e = e || {} ).paddingTopLeft || e.padding || [ 0, 0 ] 1936 ), 1937 n = m( e.paddingBottomRight || e.padding || [ 0, 0 ] ), 1938 o = this.project( this.getCenter() ), 1939 t = this.project( t ), 1940 s = this.getPixelBounds(), 1941 i = _( [ s.min.add( i ), s.max.subtract( n ) ] ), 1942 s = i.getSize(); 1943 return ( 1944 i.contains( t ) || 1945 ( ( this._enforcingBounds = ! 0 ), 1946 ( n = t.subtract( i.getCenter() ) ), 1947 ( i = i.extend( t ).getSize().subtract( s ) ), 1948 ( o.x += n.x < 0 ? -i.x : i.x ), 1949 ( o.y += n.y < 0 ? -i.y : i.y ), 1950 this.panTo( this.unproject( o ), e ), 1951 ( this._enforcingBounds = ! 1 ) ), 1952 this 1953 ); 1954 }, 1955 invalidateSize: function ( t ) { 1956 if ( ! this._loaded ) return this; 1957 t = l( 1958 { animate: ! 1, pan: ! 0 }, 1959 ! 0 === t ? { animate: ! 0 } : t 1960 );
1961 var e = this.getSize(), 1962 i = 1963 ( ( this._sizeChanged = ! 0 ), 1964 ( this._lastCenter = null ), 1965 this.getSize() ), 1966 n = e.divideBy( 2 ).round(), 1967 o = i.divideBy( 2 ).round(), 1968 n = n.subtract( o ); 1969 return n.x || n.y 1970 ? ( t.animate && t.pan 1971 ? this.panBy( n ) 1972 : ( t.pan && this._rawPanBy( n ), 1973 this.fire( 'move' ), 1974 t.debounceMoveend 1975 ? ( clearTimeout( this._sizeTimer ), 1976 ( this._sizeTimer = setTimeout( 1977 a( this.fire, this, 'moveend' ), 1978 200 1979 ) ) ) 1980 : this.fire( 'moveend' ) ), 1981 this.fire( 'resize', { oldSize: e, newSize: i } ) ) 1982 : this; 1983 }, 1984 stop: function () { 1985 return ( 1986 this.setZoom( this._limitZoom( this._zoom ) ), 1987 this.options.zoomSnap || this.fire( 'viewreset' ), 1988 this._stop() 1989 ); 1990 }, 1991 locate: function ( t ) { 1992 var e, i; 1993 return ( 1994 ( t = this._locateOptions = 1995 l( { timeout: 1e4, watch: ! 1 }, t ) ), 1996 'geolocation' in navigator 1997 ? ( ( e = a( this._handleGeolocationResponse, this ) ), 1998 ( i = a( this._handleGeolocationError, this ) ), 1999 t.watch 2000 ? ( this._locationWatchId = 2001 navigator.geolocation.watchPosition( 2002 e, 2003 i, 2004 t 2005 ) ) 2006 : navigator.geolocation.getCurrentPosition( 2007 e, 2008 i, 2009 t 2010 ) ) 2011 : this._handleGeolocationError( { 2012 code: 0, 2013 message: 'Geolocation not supported.', 2014 } ), 2015 this 2016 ); 2017 }, 2018 stopLocate: function () { 2019 return ( 2020 navigator.geolocation && 2021 navigator.geolocation.clearWatch && 2022 navigator.geolocation.clearWatch( 2023 this._locationWatchId 2024 ), 2025 this._locateOptions && 2026 ( this._locateOptions.setView = ! 1 ), 2027 this 2028 ); 2029 }, 2030 _handleGeolocationError: function ( t ) { 2031 var e; 2032 this._container._leaflet_id && 2033 ( ( e = t.code ), 2034 ( t = 2035 t.message || 2036 ( 1 === e 2037 ? 'permission denied' 2038 : 2 === e 2039 ? 'position unavailable' 2040 : 'timeout' ) ), 2041 this._locateOptions.setView && 2042 ! this._loaded && 2043 this.fitWorld(), 2044 this.fire( 'locationerror', { 2045 code: e, 2046 message: 'Geolocation error: ' + t + '.', 2047 } ) ); 2048 }, 2049 _handleGeolocationResponse: function ( t ) { 2050 if ( this._container._leaflet_id ) { 2051 var e, 2052 i, 2053 n = new v( t.coords.latitude, t.coords.longitude ), 2054 o = n.toBounds( 2 * t.coords.accuracy ), 2055 s = this._locateOptions, 2056 r = 2057 ( s.setView && 2058 ( ( e = this.getBoundsZoom( o ) ), 2059 this.setView( 2060 n, 2061 s.maxZoom ? Math.min( e, s.maxZoom ) : e 2062 ) ), 2063 { latlng: n, bounds: o, timestamp: t.timestamp } ); 2064 for ( i in t.coords ) 2065 'number' == typeof t.coords[ i ] && 2066 ( r[ i ] = t.coords[ i ] ); 2067 this.fire( 'locationfound', r ); 2068 } 2069 }, 2070 addHandler: function ( t, e ) { 2071 return ( 2072 e && 2073 ( ( e = this[ t ] = new e( this ) ), 2074 this._handlers.push( e ), 2075 this.options[ t ] && e.enable() ), 2076 this 2077 ); 2078 }, 2079 remove: function () { 2080 if ( 2081 ( this._initEvents( ! 0 ), 2082 this.options.maxBounds && 2083 this.off( 'moveend', this._panInsideMaxBounds ), 2084 this._containerId !== this._container._leaflet_id ) 2085 ) 2086 throw new Error( 2087 'Map container is being reused by another instance' 2088 ); 2089 try { 2090 delete this._container._leaflet_id, 2091 delete this._containerId; 2092 } catch ( t ) { 2093 ( this._container._leaflet_id = void 0 ), 2094 ( this._containerId = void 0 ); 2095 } 2096 for ( var t in ( void 0 !== this._locationWatchId && 2097 this.stopLocate(), 2098 this._stop(), 2099 T( this._mapPane ), 2100 this._clearControlPos && this._clearControlPos(), 2101 this._resizeRequest && 2102 ( r( this._resizeRequest ), 2103 ( this._resizeRequest = null ) ), 2104 this._clearHandlers(), 2105 this._loaded && this.fire( 'unload' ), 2106 this._layers ) ) 2107 this._layers[ t ].remove(); 2108 for ( t in this._panes ) T( this._panes[ t ] ); 2109 return ( 2110 ( this._layers = [] ), 2111 ( this._panes = [] ), 2112 delete this._mapPane, 2113 delete this._renderer, 2114 this 2115 ); 2116 }, 2117 createPane: function ( t, e ) { 2118 e = P( 2119 'div', 2120 'leaflet-pane' + 2121 ( t 2122 ? ' leaflet-' + t.replace( 'Pane', '' ) + '-pane' 2123 : '' ), 2124 e || this._mapPane 2125 ); 2126 return t && ( this._panes[ t ] = e ), e; 2127 }, 2128 getCenter: function () { 2129 return ( 2130 this._checkIfLoaded(), 2131 this._lastCenter && ! this._moved() 2132 ? this._lastCenter.clone() 2133 : this.layerPointToLatLng( this._getCenterLayerPoint() ) 2134 ); 2135 }, 2136 getZoom: function () { 2137 return this._zoom; 2138 }, 2139 getBounds: function () { 2140 var t = this.getPixelBounds(); 2141 return new s( 2142 this.unproject( t.getBottomLeft() ), 2143 this.unproject( t.getTopRight() ) 2144 ); 2145 }, 2146 getMinZoom: function () { 2147 return void 0 === this.options.minZoom 2148 ? this._layersMinZoom || 0 2149 : this.options.minZoom; 2150 }, 2151 getMaxZoom: function () { 2152 return void 0 === this.options.maxZoom
2153 ? void 0 === this._layersMaxZoom 2154 ? 1 / 0 2155 : this._layersMaxZoom 2156 : this.options.maxZoom; 2157 }, 2158 getBoundsZoom: function ( t, e, i ) { 2159 ( t = g( t ) ), ( i = m( i || [ 0, 0 ] ) ); 2160 var n = this.getZoom() || 0, 2161 o = this.getMinZoom(), 2162 s = this.getMaxZoom(), 2163 r = t.getNorthWest(), 2164 t = t.getSouthEast(), 2165 i = this.getSize().subtract( i ), 2166 t = _( 2167 this.project( t, n ), 2168 this.project( r, n ) 2169 ).getSize(), 2170 r = b.any3d ? this.options.zoomSnap : 1, 2171 a = i.x / t.x, 2172 i = i.y / t.y, 2173 t = e ? Math.max( a, i ) : Math.min( a, i ), 2174 n = this.getScaleZoom( t, n ); 2175 return ( 2176 r && 2177 ( ( n = Math.round( n / ( r / 100 ) ) * ( r / 100 ) ), 2178 ( n = e 2179 ? Math.ceil( n / r ) * r 2180 : Math.floor( n / r ) * r ) ), 2181 Math.max( o, Math.min( s, n ) ) 2182 ); 2183 }, 2184 getSize: function () { 2185 return ( 2186 ( this._size && ! this._sizeChanged ) || 2187 ( ( this._size = new p( 2188 this._container.clientWidth || 0, 2189 this._container.clientHeight || 0 2190 ) ), 2191 ( this._sizeChanged = ! 1 ) ), 2192 this._size.clone() 2193 ); 2194 }, 2195 getPixelBounds: function ( t, e ) { 2196 t = this._getTopLeftPoint( t, e ); 2197 return new f( t, t.add( this.getSize() ) ); 2198 }, 2199 getPixelOrigin: function () { 2200 return this._checkIfLoaded(), this._pixelOrigin; 2201 }, 2202 getPixelWorldBounds: function ( t ) { 2203 return this.options.crs.getProjectedBounds( 2204 void 0 === t ? this.getZoom() : t 2205 ); 2206 }, 2207 getPane: function ( t ) { 2208 return 'string' == typeof t ? this._panes[ t ] : t; 2209 }, 2210 getPanes: function () { 2211 return this._panes; 2212 }, 2213 getContainer: function () { 2214 return this._container; 2215 }, 2216 getZoomScale: function ( t, e ) { 2217 var i = this.options.crs; 2218 return ( 2219 ( e = void 0 === e ? this._zoom : e ), 2220 i.scale( t ) / i.scale( e ) 2221 ); 2222 }, 2223 getScaleZoom: function ( t, e ) { 2224 var i = this.options.crs, 2225 t = 2226 ( ( e = void 0 === e ? this._zoom : e ), 2227 i.zoom( t * i.scale( e ) ) ); 2228 return isNaN( t ) ? 1 / 0 : t; 2229 }, 2230 project: function ( t, e ) { 2231 return ( 2232 ( e = void 0 === e ? this._zoom : e ), 2233 this.options.crs.latLngToPoint( w( t ), e ) 2234 ); 2235 }, 2236 unproject: function ( t, e ) { 2237 return ( 2238 ( e = void 0 === e ? this._zoom : e ), 2239 this.options.crs.pointToLatLng( m( t ), e ) 2240 ); 2241 }, 2242 layerPointToLatLng: function ( t ) { 2243 t = m( t ).add( this.getPixelOrigin() ); 2244 return this.unproject( t ); 2245 }, 2246 latLngToLayerPoint: function ( t ) { 2247 return this.project( w( t ) ) 2248 ._round() 2249 ._subtract( this.getPixelOrigin() ); 2250 }, 2251 wrapLatLng: function ( t ) { 2252 return this.options.crs.wrapLatLng( w( t ) ); 2253 }, 2254 wrapLatLngBounds: function ( t ) { 2255 return this.options.crs.wrapLatLngBounds( g( t ) ); 2256 }, 2257 distance: function ( t, e ) { 2258 return this.options.crs.distance( w( t ), w( e ) ); 2259 }, 2260 containerPointToLayerPoint: function ( t ) { 2261 return m( t ).subtract( this._getMapPanePos() ); 2262 }, 2263 layerPointToContainerPoint: function ( t ) { 2264 return m( t ).add( this._getMapPanePos() ); 2265 }, 2266 containerPointToLatLng: function ( t ) { 2267 t = this.containerPointToLayerPoint( m( t ) ); 2268 return this.layerPointToLatLng( t ); 2269 }, 2270 latLngToContainerPoint: function ( t ) { 2271 return this.layerPointToContainerPoint( 2272 this.latLngToLayerPoint( w( t ) ) 2273 ); 2274 }, 2275 mouseEventToContainerPoint: function ( t ) { 2276 return He( t, this._container ); 2277 }, 2278 mouseEventToLayerPoint: function ( t ) { 2279 return this.containerPointToLayerPoint( 2280 this.mouseEventToContainerPoint( t ) 2281 ); 2282 }, 2283 mouseEventToLatLng: function ( t ) { 2284 return this.layerPointToLatLng( 2285 this.mouseEventToLayerPoint( t ) 2286 ); 2287 }, 2288 _initContainer: function ( t ) { 2289 t = this._container = pe( t ); 2290 if ( ! t ) throw new Error( 'Map container not found.' ); 2291 if ( t._leaflet_id ) 2292 throw new Error( 'Map container is already initialized.' ); 2293 S( t, 'scroll', this._onScroll, this ), 2294 ( this._containerId = h( t ) ); 2295 }, 2296 _initLayout: function () { 2297 var t = this._container, 2298 e = 2299 ( ( this._fadeAnimated = 2300 this.options.fadeAnimation && b.any3d ), 2301 M( 2302 t, 2303 'leaflet-container' + 2304 ( b.touch ? ' leaflet-touch' : '' ) + 2305 ( b.retina ? ' leaflet-retina' : '' ) + 2306 ( b.ielt9 ? ' leaflet-oldie' : '' ) + 2307 ( b.safari ? ' leaflet-safari' : '' ) + 2308 ( this._fadeAnimated 2309 ? ' leaflet-fade-anim' 2310 : '' ) 2311 ), 2312 me( t, 'position' ) ); 2313 'absolute' !== e && 2314 'relative' !== e && 2315 'fixed' !== e && 2316 ( t.style.position = 'relative' ), 2317 this._initPanes(), 2318 this._initControlPos && this._initControlPos(); 2319 }, 2320 _initPanes: function () { 2321 var t = ( this._panes = {} ); 2322 ( this._paneRenderers = {} ), 2323 ( this._mapPane = this.createPane( 2324 'mapPane', 2325 this._container 2326 ) ), 2327 Z( this._mapPane, new p( 0, 0 ) ), 2328 this.createPane( 'tilePane' ), 2329 this.createPane( 'overlayPane' ), 2330 this.createPane( 'shadowPane' ), 2331 this.createPane( 'markerPane' ), 2332 this.createPane( 'tooltipPane' ), 2333 this.createPane( 'popupPane' ), 2334 this.options.markerZoomAnimation || 2335 ( M( t.markerPane, 'leaflet-zoom-hide' ), 2336 M( t.shadowPane, 'leaflet-zoom-hide' ) ); 2337 }, 2338 _resetView: function ( t, e, i ) { 2339 Z( this._mapPane, new p( 0, 0 ) ); 2340 var n = ! this._loaded, 2341 o = 2342 ( ( this._loaded = ! 0 ), 2343 ( e = this._limitZoom( e ) ), 2344 this.fire( 'viewprereset' ), 2345 this._zoom !== e ); 2346 this._moveStart( o, i )._move( t, e )._moveEnd( o ), 2347 this.fire( 'viewreset' ), 2348 n && this.fire( 'load' ); 2349 }, 2350 _moveStart: function ( t, e ) { 2351 return ( 2352 t && this.fire( 'zoomstart' ), 2353 e || this.fire( 'movestart' ), 2354 this 2355 ); 2356 }, 2357 _move: function ( t, e, i, n ) { 2358 void 0 === e && ( e = this._zoom ); 2359 var o = this._zoom !== e; 2360 return ( 2361 ( this._zoom = e ),
2362 ( this._lastCenter = t ), 2363 ( this._pixelOrigin = this._getNewPixelOrigin( t ) ), 2364 n 2365 ? i && i.pinch && this.fire( 'zoom', i ) 2366 : ( ( o || ( i && i.pinch ) ) && this.fire( 'zoom', i ), 2367 this.fire( 'move', i ) ), 2368 this 2369 ); 2370 }, 2371 _moveEnd: function ( t ) { 2372 return t && this.fire( 'zoomend' ), this.fire( 'moveend' ); 2373 }, 2374 _stop: function () { 2375 return ( 2376 r( this._flyToFrame ), 2377 this._panAnim && this._panAnim.stop(), 2378 this 2379 ); 2380 }, 2381 _rawPanBy: function ( t ) { 2382 Z( this._mapPane, this._getMapPanePos().subtract( t ) ); 2383 }, 2384 _getZoomSpan: function () { 2385 return this.getMaxZoom() - this.getMinZoom(); 2386 }, 2387 _panInsideMaxBounds: function () { 2388 this._enforcingBounds || 2389 this.panInsideBounds( this.options.maxBounds ); 2390 }, 2391 _checkIfLoaded: function () { 2392 if ( ! this._loaded ) 2393 throw new Error( 'Set map center and zoom first.' ); 2394 }, 2395 _initEvents: function ( t ) { 2396 this._targets = {}; 2397 var e = t ? E : S; 2398 e( 2399 ( this._targets[ h( this._container ) ] = this )._container, 2400 'click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup', 2401 this._handleDOMEvent, 2402 this 2403 ), 2404 this.options.trackResize && 2405 e( window, 'resize', this._onResize, this ), 2406 b.any3d && 2407 this.options.transform3DLimit && 2408 ( t ? this.off : this.on ).call( 2409 this, 2410 'moveend', 2411 this._onMoveEnd 2412 ); 2413 }, 2414 _onResize: function () { 2415 r( this._resizeRequest ), 2416 ( this._resizeRequest = x( function () { 2417 this.invalidateSize( { debounceMoveend: ! 0 } ); 2418 }, this ) ); 2419 }, 2420 _onScroll: function () { 2421 ( this._container.scrollTop = 0 ), 2422 ( this._container.scrollLeft = 0 ); 2423 }, 2424 _onMoveEnd: function () { 2425 var t = this._getMapPanePos(); 2426 Math.max( Math.abs( t.x ), Math.abs( t.y ) ) >= 2427 this.options.transform3DLimit && 2428 this._resetView( this.getCenter(), this.getZoom() ); 2429 }, 2430 _findEventTargets: function ( t, e ) { 2431 for ( 2432 var i, 2433 n = [], 2434 o = 'mouseout' === e || 'mouseover' === e, 2435 s = t.target || t.srcElement, 2436 r = ! 1; 2437 s; 2438 2439 ) { 2440 if ( 2441 ( i = this._targets[ h( s ) ] ) && 2442 ( 'click' === e || 'preclick' === e ) && 2443 this._draggableMoved( i ) 2444 ) { 2445 r = ! 0; 2446 break; 2447 } 2448 if ( i && i.listens( e, ! 0 ) ) { 2449 if ( o && ! Ue( s, t ) ) break; 2450 if ( ( n.push( i ), o ) ) break; 2451 } 2452 if ( s === this._container ) break; 2453 s = s.parentNode; 2454 } 2455 return ( n = 2456 n.length || r || o || ! this.listens( e, ! 0 ) 2457 ? n 2458 : [ this ] ); 2459 }, 2460 _isClickDisabled: function ( t ) { 2461 for ( ; t && t !== this._container; ) { 2462 if ( t._leaflet_disable_click ) return ! 0; 2463 t = t.parentNode; 2464 } 2465 }, 2466 _handleDOMEvent: function ( t ) { 2467 var e, 2468 i = t.target || t.srcElement; 2469 ! this._loaded || 2470 i._leaflet_disable_events || 2471 ( 'click' === t.type && this._isClickDisabled( i ) ) || 2472 ( 'mousedown' === ( e = t.type ) && ze( i ), 2473 this._fireDOMEvent( t, e ) ); 2474 }, 2475 _mouseEvents: [ 2476 'click', 2477 'dblclick', 2478 'mouseover', 2479 'mouseout', 2480 'contextmenu', 2481 ], 2482 _fireDOMEvent: function ( t, e, i ) { 2483 'click' === t.type && 2484 ( ( ( a = l( {}, t ) ).type = 'preclick' ), 2485 this._fireDOMEvent( a, a.type, i ) ); 2486 var n = this._findEventTargets( t, e ); 2487 if ( i ) { 2488 for ( var o = [], s = 0; s < i.length; s++ ) 2489 i[ s ].listens( e, ! 0 ) && o.push( i[ s ] ); 2490 n = o.concat( n ); 2491 } 2492 if ( n.length ) { 2493 'contextmenu' === e && k( t ); 2494 var r, 2495 a = n[ 0 ], 2496 h = { originalEvent: t }; 2497 for ( 2498 'keypress' !== t.type && 2499 'keydown' !== t.type && 2500 'keyup' !== t.type && 2501 ( ( r = 2502 a.getLatLng && 2503 ( ! a._radius || a._radius <= 10 ) ), 2504 ( h.containerPoint = r 2505 ? this.latLngToContainerPoint( a.getLatLng() ) 2506 : this.mouseEventToContainerPoint( t ) ), 2507 ( h.layerPoint = this.containerPointToLayerPoint( 2508 h.containerPoint 2509 ) ), 2510 ( h.latlng = r 2511 ? a.getLatLng() 2512 : this.layerPointToLatLng( h.layerPoint ) ) ), 2513 s = 0; 2514 s < n.length; 2515 s++ 2516 ) 2517 if ( 2518 ( n[ s ].fire( e, h, ! 0 ), 2519 h.originalEvent._stopped || 2520 ( ! 1 === n[ s ].options.bubblingMouseEvents && 2521 -1 !== K( this._mouseEvents, e ) ) ) 2522 ) 2523 return; 2524 } 2525 }, 2526 _draggableMoved: function ( t ) { 2527 return ( 2528 ( ( t = t.dragging && t.dragging.enabled() ? t : this ) 2529 .dragging && 2530 t.dragging.moved() ) || 2531 ( this.boxZoom && this.boxZoom.moved() ) 2532 ); 2533 }, 2534 _clearHandlers: function () { 2535 for ( var t = 0, e = this._handlers.length; t < e; t++ ) 2536 this._handlers[ t ].disable(); 2537 }, 2538 whenReady: function ( t, e ) { 2539 return ( 2540 this._loaded 2541 ? t.call( e || this, { target: this } ) 2542 : this.on( 'load', t, e ), 2543 this 2544 ); 2545 }, 2546 _getMapPanePos: function () { 2547 return Le( this._mapPane ) || new p( 0, 0 ); 2548 }, 2549 _moved: function () { 2550 var t = this._getMapPanePos(); 2551 return t && ! t.equals( [ 0, 0 ] ); 2552 }, 2553 _getTopLeftPoint: function ( t, e ) { 2554 return ( 2555 t && void 0 !== e 2556 ? this._getNewPixelOrigin( t, e ) 2557 : this.getPixelOrigin() 2558 ).subtract( this._getMapPanePos() ); 2559 }, 2560 _getNewPixelOrigin: function ( t, e ) {
2561 var i = this.getSize()._divideBy( 2 ); 2562 return this.project( t, e ) 2563 ._subtract( i ) 2564 ._add( this._getMapPanePos() ) 2565 ._round(); 2566 }, 2567 _latLngToNewLayerPoint: function ( t, e, i ) { 2568 i = this._getNewPixelOrigin( i, e ); 2569 return this.project( t, e )._subtract( i ); 2570 }, 2571 _latLngBoundsToNewLayerBounds: function ( t, e, i ) { 2572 i = this._getNewPixelOrigin( i, e ); 2573 return _( [ 2574 this.project( t.getSouthWest(), e )._subtract( i ), 2575 this.project( t.getNorthWest(), e )._subtract( i ), 2576 this.project( t.getSouthEast(), e )._subtract( i ), 2577 this.project( t.getNorthEast(), e )._subtract( i ), 2578 ] ); 2579 }, 2580 _getCenterLayerPoint: function () { 2581 return this.containerPointToLayerPoint( 2582 this.getSize()._divideBy( 2 ) 2583 ); 2584 }, 2585 _getCenterOffset: function ( t ) { 2586 return this.latLngToLayerPoint( t ).subtract( 2587 this._getCenterLayerPoint() 2588 ); 2589 }, 2590 _limitCenter: function ( t, e, i ) { 2591 var n, o; 2592 return ! i || 2593 ( ( n = this.project( t, e ) ), 2594 ( o = this.getSize().divideBy( 2 ) ), 2595 ( o = new f( n.subtract( o ), n.add( o ) ) ), 2596 ( o = this._getBoundsOffset( o, i, e ) ) 2597 .round() 2598 .equals( [ 0, 0 ] ) ) 2599 ? t 2600 : this.unproject( n.add( o ), e ); 2601 }, 2602 _limitOffset: function ( t, e ) { 2603 var i; 2604 return e 2605 ? ( ( i = new f( 2606 ( i = this.getPixelBounds() ).min.add( t ), 2607 i.max.add( t ) 2608 ) ), 2609 t.add( this._getBoundsOffset( i, e ) ) ) 2610 : t; 2611 }, 2612 _getBoundsOffset: function ( t, e, i ) { 2613 ( e = _( 2614 this.project( e.getNorthEast(), i ),
2615 this.project( e.getSouthWest(), i ) 2616 ) ), 2617 ( i = e.min.subtract( t.min ) ), 2618 ( e = e.max.subtract( t.max ) ); 2619 return new p( 2620 this._rebound( i.x, -e.x ), 2621 this._rebound( i.y, -e.y ) 2622 ); 2623 }, 2624 _rebound: function ( t, e ) { 2625 return 0 < t + e 2626 ? Math.round( t - e ) / 2 2627 : Math.max( 0, Math.ceil( t ) ) - 2628 Math.max( 0, Math.floor( e ) ); 2629 }, 2630 _limitZoom: function ( t ) { 2631 var e = this.getMinZoom(), 2632 i = this.getMaxZoom(), 2633 n = b.any3d ? this.options.zoomSnap : 1; 2634 return ( 2635 n && ( t = Math.round( t / n ) * n ), 2636 Math.max( e, Math.min( i, t ) ) 2637 ); 2638 }, 2639 _onPanTransitionStep: function () { 2640 this.fire( 'move' ); 2641 }, 2642 _onPanTransitionEnd: function () { 2643 z( this._mapPane, 'leaflet-pan-anim' ), this.fire( 'moveend' ); 2644 }, 2645 _tryAnimatedPan: function ( t, e ) { 2646 t = this._getCenterOffset( t )._trunc(); 2647 return ( 2648 ! ( 2649 ! 0 !== ( e && e.animate ) && 2650 ! this.getSize().contains( t ) 2651 ) && ( this.panBy( t, e ), ! 0 ) 2652 ); 2653 }, 2654 _createAnimProxy: function () { 2655 var t = ( this._proxy = P( 2656 'div', 2657 'leaflet-proxy leaflet-zoom-animated' 2658 ) ); 2659 this._panes.mapPane.appendChild( t ), 2660 this.on( 2661 'zoomanim', 2662 function ( t ) { 2663 var e = ce, 2664 i = this._proxy.style[ e ]; 2665 Pe( 2666 this._proxy, 2667 this.project( t.center, t.zoom ), 2668 this.getZoomScale( t.zoom, 1 ) 2669 ), 2670 i === this._proxy.style[ e ] && 2671 this._animatingZoom && 2672 this._onZoomTransitionEnd(); 2673 }, 2674 this 2675 ), 2676 this.on( 'load moveend', this._animMoveEnd, this ), 2677 this._on( 'unload', this._destroyAnimProxy, this ); 2678 }, 2679 _destroyAnimProxy: function () { 2680 T( this._proxy ), 2681 this.off( 'load moveend', this._animMoveEnd, this ), 2682 delete this._proxy; 2683 }, 2684 _animMoveEnd: function () { 2685 var t = this.getCenter(), 2686 e = this.getZoom(); 2687 Pe( 2688 this._proxy, 2689 this.project( t, e ), 2690 this.getZoomScale( e, 1 ) 2691 ); 2692 }, 2693 _catchTransitionEnd: function ( t ) { 2694 this._animatingZoom && 2695 0 <= t.propertyName.indexOf( 'transform' ) && 2696 this._onZoomTransitionEnd(); 2697 }, 2698 _nothingToAnimate: function () { 2699 return ! this._container.getElementsByClassName( 2700 'leaflet-zoom-animated' 2701 ).length; 2702 }, 2703 _tryAnimatedZoom: function ( t, e, i ) { 2704 if ( ! this._animatingZoom ) { 2705 if ( 2706 ( ( i = i || {} ), 2707 ! this._zoomAnimated || 2708 ! 1 === i.animate || 2709 this._nothingToAnimate() || 2710 Math.abs( e - this._zoom ) > 2711 this.options.zoomAnimationThreshold ) 2712 ) 2713 return ! 1; 2714 var n = this.getZoomScale( e ), 2715 n = this._getCenterOffset( t )._divideBy( 1 - 1 / n ); 2716 if ( ! 0 !== i.animate && ! this.getSize().contains( n ) ) 2717 return ! 1; 2718 x( function () { 2719 this._moveStart( ! 0, ! 1 )._animateZoom( t, e, ! 0 ); 2720 }, this ); 2721 } 2722 return ! 0; 2723 }, 2724 _animateZoom: function ( t, e, i, n ) { 2725 this._mapPane && 2726 ( i && 2727 ( ( this._animatingZoom = ! 0 ), 2728 ( this._animateToCenter = t ), 2729 ( this._animateToZoom = e ), 2730 M( this._mapPane, 'leaflet-zoom-anim' ) ), 2731 this.fire( 'zoomanim', { 2732 center: t, 2733 zoom: e, 2734 noUpdate: n, 2735 } ), 2736 this._tempFireZoomEvent || 2737 ( this._tempFireZoomEvent = 2738 this._zoom !== this._animateToZoom ), 2739 this._move( 2740 this._animateToCenter, 2741 this._animateToZoom, 2742 void 0, 2743 ! 0 2744 ), 2745 setTimeout( a( this._onZoomTransitionEnd, this ), 250 ) ); 2746 }, 2747 _onZoomTransitionEnd: function () { 2748 this._animatingZoom && 2749 ( this._mapPane && z( this._mapPane, 'leaflet-zoom-anim' ), 2750 ( this._animatingZoom = ! 1 ), 2751 this._move( 2752 this._animateToCenter, 2753 this._animateToZoom, 2754 void 0, 2755 ! 0 2756 ), 2757 this._tempFireZoomEvent && this.fire( 'zoom' ), 2758 delete this._tempFireZoomEvent, 2759 this.fire( 'move' ), 2760 this._moveEnd( ! 0 ) ); 2761 }, 2762 } ); 2763 function Ge( t, e ) { 2764 return new O( t, e ); 2765 } 2766 function qe( t ) { 2767 return new B( t ); 2768 } 2769 var Ke, 2770 B = e.extend( { 2771 options: { position: 'topright' }, 2772 initialize: function ( t ) { 2773 c( this, t ); 2774 }, 2775 getPosition: function () { 2776 return this.options.position; 2777 }, 2778 setPosition: function ( t ) { 2779 var e = this._map; 2780 return ( 2781 e && e.removeControl( this ), 2782 ( this.options.position = t ), 2783 e && e.addControl( this ), 2784 this 2785 ); 2786 }, 2787 getContainer: function () { 2788 return this._container; 2789 }, 2790 addTo: function ( t ) { 2791 this.remove(), ( this._map = t ); 2792 var e = ( this._container = this.onAdd( t ) ), 2793 i = this.getPosition(), 2794 t = t._controlCorners[ i ]; 2795 return ( 2796 M( e, 'leaflet-control' ), 2797 -1 !== i.indexOf( 'bottom' ) 2798 ? t.insertBefore( e, t.firstChild ) 2799 : t.appendChild( e ), 2800 this._map.on( 'unload', this.remove, this ), 2801 this 2802 ); 2803 }, 2804 remove: function () { 2805 return ( 2806 this._map && 2807 ( T( this._container ), 2808 this.onRemove && this.onRemove( this._map ), 2809 this._map.off( 'unload', this.remove, this ), 2810 ( this._map = null ) ), 2811 this 2812 ); 2813 }, 2814 _refocusOnMap: function ( t ) { 2815 this._map && 2816 t && 2817 0 < t.screenX && 2818 0 < t.screenY && 2819 this._map.getContainer().focus(); 2820 }, 2821 } ), 2822 Ye = 2823 ( O.include( { 2824 addControl: function ( t ) { 2825 return t.addTo( this ), this; 2826 }, 2827 removeControl: function ( t ) { 2828 return t.remove(), this; 2829 }, 2830 _initControlPos: function () { 2831 var i = ( this._controlCorners = {} ), 2832 n = 'leaflet-', 2833 o = ( this._controlContainer = P( 2834 'div', 2835 n + 'control-container', 2836 this._container 2837 ) ); 2838 function t( t, e ) { 2839 i[ t + e ] = P( 'div', n + t + ' ' + n + e, o ); 2840 } 2841 t( 'top', 'left' ), 2842 t( 'top', 'right' ), 2843 t( 'bottom', 'left' ), 2844 t( 'bottom', 'right' ); 2845 }, 2846 _clearControlPos: function () { 2847 for ( var t in this._controlCorners ) 2848 T( this._controlCorners[ t ] ); 2849 T( this._controlContainer ), 2850 delete this._controlCorners, 2851 delete this._controlContainer; 2852 }, 2853 } ), 2854 B.extend( { 2855 options: { 2856 collapsed: ! 0, 2857 position: 'topright', 2858 autoZIndex: ! 0, 2859 hideSingleBase: ! 1,
2860 sortLayers: ! 1, 2861 sortFunction: function ( t, e, i, n ) { 2862 return i < n ? -1 : n < i ? 1 : 0; 2863 }, 2864 }, 2865 initialize: function ( t, e, i ) { 2866 for ( var n in ( c( this, i ), 2867 ( this._layerControlInputs = [] ), 2868 ( this._layers = [] ), 2869 ( this._lastZIndex = 0 ), 2870 ( this._handlingClick = ! 1 ), 2871 t ) ) 2872 this._addLayer( t[ n ], n ); 2873 for ( n in e ) this._addLayer( e[ n ], n, ! 0 ); 2874 }, 2875 onAdd: function ( t ) { 2876 this._initLayout(), 2877 this._update(), 2878 ( this._map = t ).on( 2879 'zoomend', 2880 this._checkDisabledLayers, 2881 this 2882 ); 2883 for ( var e = 0; e < this._layers.length; e++ ) 2884 this._layers[ e ].layer.on( 2885 'add remove', 2886 this._onLayerChange, 2887 this 2888 ); 2889 return this._container; 2890 }, 2891 addTo: function ( t ) { 2892 return ( 2893 B.prototype.addTo.call( this, t ), 2894 this._expandIfNotCollapsed() 2895 ); 2896 }, 2897 onRemove: function () { 2898 this._map.off( 'zoomend', this._checkDisabledLayers, this ); 2899 for ( var t = 0; t < this._layers.length; t++ ) 2900 this._layers[ t ].layer.off( 2901 'add remove', 2902 this._onLayerChange, 2903 this 2904 ); 2905 }, 2906 addBaseLayer: function ( t, e ) { 2907 return ( 2908 this._addLayer( t, e ), 2909 this._map ? this._update() : this 2910 ); 2911 }, 2912 addOverlay: function ( t, e ) { 2913 return ( 2914 this._addLayer( t, e, ! 0 ), 2915 this._map ? this._update() : this 2916 ); 2917 }, 2918 removeLayer: function ( t ) { 2919 t.off( 'add remove', this._onLayerChange, this ); 2920 t = this._getLayer( h( t ) ); 2921 return ( 2922 t && 2923 this._layers.splice( this._layers.indexOf( t ), 1 ), 2924 this._map ? this._update() : this 2925 ); 2926 }, 2927 expand: function () { 2928 M( this._container, 'leaflet-control-layers-expanded' ), 2929 ( this._section.style.height = null ); 2930 var t = 2931 this._map.getSize().y - 2932 ( this._container.offsetTop + 50 ); 2933 return ( 2934 t < this._section.clientHeight 2935 ? ( M( 2936 this._section, 2937 'leaflet-control-layers-scrollbar' 2938 ), 2939 ( this._section.style.height = t + 'px' ) ) 2940 : z( 2941 this._section, 2942 'leaflet-control-layers-scrollbar' 2943 ), 2944 this._checkDisabledLayers(), 2945 this 2946 ); 2947 }, 2948 collapse: function () { 2949 return ( 2950 z( this._container, 'leaflet-control-layers-expanded' ), 2951 this 2952 ); 2953 }, 2954 _initLayout: function () { 2955 var t = 'leaflet-control-layers', 2956 e = ( this._container = P( 'div', t ) ), 2957 i = this.options.collapsed, 2958 n = 2959 ( e.setAttribute( 'aria-haspopup', ! 0 ), 2960 Ne( e ), 2961 Re( e ), 2962 ( this._section = P( 'section', t + '-list' ) ) ), 2963 o = 2964 ( i && 2965 ( this._map.on( 'click', this.collapse, this ), 2966 S( 2967 e, 2968 { 2969 mouseenter: function () { 2970 S( n, 'click', k ), 2971 this.expand(), 2972 setTimeout( function () { 2973 E( n, 'click', k ); 2974 } ); 2975 }, 2976 mouseleave: this.collapse, 2977 }, 2978 this 2979 ) ), 2980 ( this._layersLink = P( 'a', t + '-toggle', e ) ) ); 2981 ( o.href = '#' ), 2982 ( o.title = 'Layers' ), 2983 o.setAttribute( 'role', 'button' ), 2984 S( o, 'click', k ), 2985 S( o, 'focus', this.expand, this ), 2986 i || this.expand(), 2987 ( this._baseLayersList = P( 'div', t + '-base', n ) ), 2988 ( this._separator = P( 'div', t + '-separator', n ) ), 2989 ( this._overlaysList = P( 'div', t + '-overlays', n ) ), 2990 e.appendChild( n ); 2991 }, 2992 _getLayer: function ( t ) { 2993 for ( var e = 0; e < this._layers.length; e++ ) 2994 if ( 2995 this._layers[ e ] && 2996 h( this._layers[ e ].layer ) === t 2997 ) 2998 return this._layers[ e ]; 2999 }, 3000 _addLayer: function ( t, e, i ) { 3001 this._map && 3002 t.on( 'add remove', this._onLayerChange, this ), 3003 this._layers.push( { layer: t, name: e, overlay: i } ), 3004 this.options.sortLayers && 3005 this._layers.sort( 3006 a( function ( t, e ) { 3007 return this.options.sortFunction( 3008 t.layer, 3009 e.layer, 3010 t.name, 3011 e.name 3012 ); 3013 }, this ) 3014 ),
3015 this.options.autoZIndex && 3016 t.setZIndex && 3017 ( this._lastZIndex++, 3018 t.setZIndex( this._lastZIndex ) ), 3019 this._expandIfNotCollapsed(); 3020 }, 3021 _update: function () { 3022 if ( this._container ) { 3023 fe( this._baseLayersList ), 3024 fe( this._overlaysList ), 3025 ( this._layerControlInputs = [] ); 3026 for ( 3027 var t, e, i, n = 0, o = 0; 3028 o < this._layers.length; 3029 o++ 3030 ) 3031 ( i = this._layers[ o ] ), 3032 this._addItem( i ), 3033 ( e = e || i.overlay ), 3034 ( t = t || ! i.overlay ), 3035 ( n += i.overlay ? 0 : 1 ); 3036 this.options.hideSingleBase && 3037 ( this._baseLayersList.style.display = ( t = 3038 t && 1 < n ) 3039 ? '' 3040 : 'none' ), 3041 ( this._separator.style.display = 3042 e && t ? '' : 'none' ); 3043 } 3044 return this; 3045 }, 3046 _onLayerChange: function ( t ) { 3047 this._handlingClick || this._update(); 3048 var e = this._getLayer( h( t.target ) ), 3049 t = e.overlay 3050 ? 'add' === t.type 3051 ? 'overlayadd' 3052 : 'overlayremove' 3053 : 'add' === t.type 3054 ? 'baselayerchange' 3055 : null; 3056 t && this._map.fire( t, e ); 3057 }, 3058 _createRadioElement: function ( t, e ) { 3059 ( t = 3060 '<input type="radio" class="leaflet-control-layers-selector" name="' + 3061 t + 3062 '"' + 3063 ( e ? ' checked="checked"' : '' ) + 3064 '/>' ), 3065 ( e = document.createElement( 'div' ) ); 3066 return ( e.innerHTML = t ), e.firstChild; 3067 }, 3068 _addItem: function ( t ) { 3069 var e, 3070 i = document.createElement( 'label' ), 3071 n = this._map.hasLayer( t.layer ), 3072 n = 3073 ( t.overlay 3074 ? ( ( ( e = 3075 document.createElement( 3076 'input' 3077 ) ).type = 'checkbox' ), 3078 ( e.className = 3079 'leaflet-control-layers-selector' ), 3080 ( e.defaultChecked = n ) ) 3081 : ( e = this._createRadioElement( 3082 'leaflet-base-layers_' + h( this ), 3083 n 3084 ) ), 3085 this._layerControlInputs.push( e ), 3086 ( e.layerId = h( t.layer ) ), 3087 S( e, 'click', this._onInputClick, this ), 3088 document.createElement( 'span' ) ), 3089 o = 3090 ( ( n.innerHTML = ' ' + t.name ), 3091 document.createElement( 'span' ) ); 3092 return ( 3093 i.appendChild( o ), 3094 o.appendChild( e ), 3095 o.appendChild( n ), 3096 ( t.overlay 3097 ? this._overlaysList 3098 : this._baseLayersList 3099 ).appendChild( i ), 3100 this._checkDisabledLayers(), 3101 i 3102 ); 3103 }, 3104 _onInputClick: function () { 3105 var t, 3106 e, 3107 i = this._layerControlInputs, 3108 n = [], 3109 o = []; 3110 this._handlingClick = ! 0; 3111 for ( var s = i.length - 1; 0 <= s; s-- ) 3112 ( t = i[ s ] ), 3113 ( e = this._getLayer( t.layerId ).layer ), 3114 t.checked ? n.push( e ) : t.checked || o.push( e ); 3115 for ( s = 0; s < o.length; s++ ) 3116 this._map.hasLayer( o[ s ] ) && 3117 this._map.removeLayer( o[ s ] ); 3118 for ( s = 0; s < n.length; s++ ) 3119 this._map.hasLayer( n[ s ] ) || 3120 this._map.addLayer( n[ s ] ); 3121 ( this._handlingClick = ! 1 ), this._refocusOnMap(); 3122 }, 3123 _checkDisabledLayers: function () { 3124 for ( 3125 var t, 3126 e, 3127 i = this._layerControlInputs, 3128 n = this._map.getZoom(), 3129 o = i.length - 1; 3130 0 <= o; 3131 o-- 3132 ) 3133 ( t = i[ o ] ), 3134 ( e = this._getLayer( t.layerId ).layer ), 3135 ( t.disabled = 3136 ( void 0 !== e.options.minZoom && 3137 n < e.options.minZoom ) || 3138 ( void 0 !== e.options.maxZoom && 3139 n > e.options.maxZoom ) ); 3140 }, 3141 _expandIfNotCollapsed: function () { 3142 return ( 3143 this._map && ! this.options.collapsed && this.expand(), 3144 this 3145 ); 3146 }, 3147 } ) ), 3148 Je = B.extend( { 3149 options: { 3150 position: 'topleft', 3151 zoomInText: '<span aria-hidden="true">+</span>', 3152 zoomInTitle: 'Zoom in', 3153 zoomOutText: '<span aria-hidden="true">−</span>', 3154 zoomOutTitle: 'Zoom out', 3155 }, 3156 onAdd: function ( t ) { 3157 var e = 'leaflet-control-zoom', 3158 i = P( 'div', e + ' leaflet-bar' ), 3159 n = this.options; 3160 return ( 3161 ( this._zoomInButton = this._createButton( 3162 n.zoomInText, 3163 n.zoomInTitle, 3164 e + '-in', 3165 i, 3166 this._zoomIn 3167 ) ), 3168 ( this._zoomOutButton = this._createButton( 3169 n.zoomOutText, 3170 n.zoomOutTitle, 3171 e + '-out', 3172 i, 3173 this._zoomOut 3174 ) ), 3175 this._updateDisabled(), 3176 t.on( 3177 'zoomend zoomlevelschange', 3178 this._updateDisabled, 3179 this 3180 ), 3181 i 3182 ); 3183 }, 3184 onRemove: function ( t ) { 3185 t.off( 'zoomend zoomlevelschange', this._updateDisabled, this ); 3186 }, 3187 disable: function () { 3188 return ( this._disabled = ! 0 ), this._updateDisabled(), this; 3189 }, 3190 enable: function () { 3191 return ( this._disabled = ! 1 ), this._updateDisabled(), this; 3192 }, 3193 _zoomIn: function ( t ) { 3194 ! this._disabled && 3195 this._map._zoom < this._map.getMaxZoom() && 3196 this._map.zoomIn( 3197 this._map.options.zoomDelta * ( t.shiftKey ? 3 : 1 ) 3198 ); 3199 }, 3200 _zoomOut: function ( t ) { 3201 ! this._disabled && 3202 this._map._zoom > this._map.getMinZoom() && 3203 this._map.zoomOut( 3204 this._map.options.zoomDelta * ( t.shiftKey ? 3 : 1 ) 3205 ); 3206 }, 3207 _createButton: function ( t, e, i, n, o ) { 3208 i = P( 'a', i, n ); 3209 return ( 3210 ( i.innerHTML = t ), 3211 ( i.href = '#' ), 3212 ( i.title = e ), 3213 i.setAttribute( 'role', 'button' ), 3214 i.setAttribute( 'aria-label', e ), 3215 Ne( i ), 3216 S( i, 'click', De ), 3217 S( i, 'click', o, this ), 3218 S( i, 'click', this._refocusOnMap, this ), 3219 i 3220 ); 3221 }, 3222 _updateDisabled: function () { 3223 var t = this._map, 3224 e = 'leaflet-disabled'; 3225 z( this._zoomInButton, e ), 3226 z( this._zoomOutButton, e ), 3227 this._zoomInButton.setAttribute( 'aria-disabled', 'false' ), 3228 this._zoomOutButton.setAttribute( 3229 'aria-disabled', 3230 'false' 3231 ),
3232 ( ! this._disabled && t._zoom !== t.getMinZoom() ) || 3233 ( M( this._zoomOutButton, e ), 3234 this._zoomOutButton.setAttribute( 3235 'aria-disabled', 3236 'true' 3237 ) ), 3238 ( ! this._disabled && t._zoom !== t.getMaxZoom() ) || 3239 ( M( this._zoomInButton, e ), 3240 this._zoomInButton.setAttribute( 3241 'aria-disabled', 3242 'true' 3243 ) ); 3244 }, 3245 } ), 3246 Xe = 3247 ( O.mergeOptions( { zoomControl: ! 0 } ), 3248 O.addInitHook( function () { 3249 this.options.zoomControl && 3250 ( ( this.zoomControl = new Je() ), 3251 this.addControl( this.zoomControl ) ); 3252 } ), 3253 B.extend( { 3254 options: { 3255 position: 'bottomleft', 3256 maxWidth: 100, 3257 metric: ! 0, 3258 imperial: ! 0, 3259 }, 3260 onAdd: function ( t ) { 3261 var e = 'leaflet-control-scale', 3262 i = P( 'div', e ), 3263 n = this.options; 3264 return ( 3265 this._addScales( n, e + '-line', i ), 3266 t.on( 3267 n.updateWhenIdle ? 'moveend' : 'move', 3268 this._update, 3269 this 3270 ), 3271 t.whenReady( this._update, this ), 3272 i 3273 ); 3274 }, 3275 onRemove: function ( t ) { 3276 t.off( 3277 this.options.updateWhenIdle ? 'moveend' : 'move', 3278 this._update, 3279 this 3280 ); 3281 }, 3282 _addScales: function ( t, e, i ) { 3283 t.metric && ( this._mScale = P( 'div', e, i ) ), 3284 t.imperial && ( this._iScale = P( 'div', e, i ) ); 3285 }, 3286 _update: function () { 3287 var t = this._map, 3288 e = t.getSize().y / 2, 3289 t = t.distance( 3290 t.containerPointToLatLng( [ 0, e ] ), 3291 t.containerPointToLatLng( [ 3292 this.options.maxWidth, 3293 e, 3294 ] ) 3295 ); 3296 this._updateScales( t ); 3297 }, 3298 _updateScales: function ( t ) { 3299 this.options.metric && t && this._updateMetric( t ), 3300 this.options.imperial && t && this._updateImperial( t ); 3301 }, 3302 _updateMetric: function ( t ) { 3303 var e = this._getRoundNum( t ); 3304 this._updateScale( 3305 this._mScale, 3306 e < 1e3 ? e + ' m' : e / 1e3 + ' km', 3307 e / t 3308 ); 3309 }, 3310 _updateImperial: function ( t ) { 3311 var e, 3312 i, 3313 t = 3.2808399 * t; 3314 5280 < t 3315 ? ( ( i = this._getRoundNum( ( e = t / 5280 ) ) ), 3316 this._updateScale( this._iScale, i + ' mi', i / e ) ) 3317 : ( ( i = this._getRoundNum( t ) ), 3318 this._updateScale( this._iScale, i + ' ft', i / t ) ); 3319 }, 3320 _updateScale: function ( t, e, i ) { 3321 ( t.style.width = 3322 Math.round( this.options.maxWidth * i ) + 'px' ), 3323 ( t.innerHTML = e ); 3324 }, 3325 _getRoundNum: function ( t ) { 3326 var e = Math.pow( 10, ( Math.floor( t ) + '' ).length - 1 ), 3327 t = t / e; 3328 return ( 3329 e * 3330 ( t = 3331 10 <= t 3332 ? 10 3333 : 5 <= t 3334 ? 5 3335 : 3 <= t 3336 ? 3 3337 : 2 <= t 3338 ? 2 3339 : 1 ) 3340 ); 3341 }, 3342 } ) ), 3343 $e = B.extend( { 3344 options: { 3345 position: 'bottomright', 3346 prefix: 3347 '<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">' + 3348 ( b.inlineSvg 3349 ? '<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> ' 3350 : '' ) + 3351 'Leaflet</a>', 3352 }, 3353 initialize: function ( t ) { 3354 c( this, t ), ( this._attributions = {} ); 3355 }, 3356 onAdd: function ( t ) { 3357 for ( var e in ( ( ( t.attributionControl = this )._container = 3358 P( 'div', 'leaflet-control-attribution' ) ), 3359 Ne( this._container ), 3360 t._layers ) ) 3361 t._layers[ e ].getAttribution && 3362 this.addAttribution( t._layers[ e ].getAttribution() ); 3363 return ( 3364 this._update(), 3365 t.on( 'layeradd', this._addAttribution, this ), 3366 this._container 3367 ); 3368 }, 3369 onRemove: function ( t ) { 3370 t.off( 'layeradd', this._addAttribution, this ); 3371 }, 3372 _addAttribution: function ( t ) { 3373 t.layer.getAttribution && 3374 ( this.addAttribution( t.layer.getAttribution() ), 3375 t.layer.once( 3376 'remove', 3377 function () { 3378 this.removeAttribution( t.layer.getAttribution() ); 3379 }, 3380 this 3381 ) ); 3382 }, 3383 setPrefix: function ( t ) { 3384 return ( this.options.prefix = t ), this._update(), this; 3385 }, 3386 addAttribution: function ( t ) { 3387 return ( 3388 t && 3389 ( this._attributions[ t ] || 3390 ( this._attributions[ t ] = 0 ), 3391 this._attributions[ t ]++, 3392 this._update() ), 3393 this 3394 ); 3395 }, 3396 removeAttribution: function ( t ) { 3397 return ( 3398 t && 3399 this._attributions[ t ] && 3400 ( this._attributions[ t ]--, this._update() ), 3401 this 3402 ); 3403 }, 3404 _update: function () { 3405 if ( this._map ) { 3406 var t, 3407 e = []; 3408 for ( t in this._attributions ) 3409 this._attributions[ t ] && e.push( t ); 3410 var i = []; 3411 this.options.prefix && i.push( this.options.prefix ), 3412 e.length && i.push( e.join( ', ' ) ), 3413 ( this._container.innerHTML = i.join( 3414 ' <span aria-hidden="true">|</span> ' 3415 ) ); 3416 } 3417 }, 3418 } ), 3419 o = 3420 ( O.mergeOptions( { attributionControl: ! 0 } ), 3421 O.addInitHook( function () { 3422 this.options.attributionControl && new $e().addTo( this ); 3423 } ), 3424 ( B.Layers = Ye ), 3425 ( B.Zoom = Je ), 3426 ( B.Scale = Xe ), 3427 ( B.Attribution = $e ), 3428 ( qe.layers = function ( t, e, i ) { 3429 return new Ye( t, e, i ); 3430 } ), 3431 ( qe.zoom = function ( t ) { 3432 return new Je( t ); 3433 } ), 3434 ( qe.scale = function ( t ) { 3435 return new Xe( t ); 3436 } ), 3437 ( qe.attribution = function ( t ) { 3438 return new $e( t ); 3439 } ), 3440 e.extend( { 3441 initialize: function ( t ) { 3442 this._map = t; 3443 }, 3444 enable: function () { 3445 return ( 3446 this._enabled || 3447 ( ( this._enabled = ! 0 ), this.addHooks() ), 3448 this 3449 ); 3450 }, 3451 disable: function () { 3452 return ( 3453 this._enabled && 3454 ( ( this._enabled = ! 1 ), this.removeHooks() ), 3455 this 3456 ); 3457 }, 3458 enabled: function () { 3459 return !! this._enabled; 3460 }, 3461 } ) ), 3462 ft = 3463 ( ( o.addTo = function ( t, e ) { 3464 return t.addHandler( e, this ), this; 3465 } ), 3466 { Events: n } ), 3467 Qe = b.touch ? 'touchstart mousedown' : 'mousedown', 3468 ti = it.extend( { 3469 options: { clickTolerance: 3 }, 3470 initialize: function ( t, e, i, n ) { 3471 c( this, n ), 3472 ( this._element = t ), 3473 ( this._dragStartTarget = e || t ), 3474 ( this._preventOutline = i ); 3475 }, 3476 enable: function () { 3477 this._enabled || 3478 ( S( this._dragStartTarget, Qe, this._onDown, this ), 3479 ( this._enabled = ! 0 ) ); 3480 }, 3481 disable: function () { 3482 this._enabled && 3483 ( ti._dragging === this && this.finishDrag( ! 0 ), 3484 E( this._dragStartTarget, Qe, this._onDown, this ), 3485 ( this._enabled = ! 1 ), 3486 ( this._moved = ! 1 ) ); 3487 }, 3488 _onDown: function ( t ) { 3489 var e, i; 3490 this._enabled && 3491 ( ( this._moved = ! 1 ), 3492 ye( this._element, 'leaflet-zoom-anim' ) || 3493 ( t.touches && 1 !== t.touches.length 3494 ? ti._dragging === this && this.finishDrag() 3495 : ti._dragging || 3496 t.shiftKey || 3497 ( 1 !== t.which && 3498 1 !== t.button && 3499 ! t.touches ) || 3500 ( ( ti._dragging = this )._preventOutline && 3501 ze( this._element ), 3502 Te(), 3503 ae(), 3504 this._moving || 3505 ( this.fire( 'down' ), 3506 ( i = t.touches ? t.touches[ 0 ] : t ), 3507 ( e = Ze( this._element ) ), 3508 ( this._startPoint = new p( 3509 i.clientX, 3510 i.clientY 3511 ) ), 3512 ( this._startPos = Le( this._element ) ), 3513 ( this._parentScale = Se( e ) ), 3514 ( i = 'mousedown' === t.type ), 3515 S( 3516 document, 3517 i ? 'mousemove' : 'touchmove', 3518 this._onMove, 3519 this 3520 ), 3521 S( 3522 document, 3523 i ? 'mouseup' : 'touchend touchcancel', 3524 this._onUp, 3525 this 3526 ) ) ) ) ); 3527 }, 3528 _onMove: function ( t ) { 3529 var e; 3530 this._enabled && 3531 ( t.touches && 1 < t.touches.length 3532 ? ( this._moved = ! 0 ) 3533 : ( ! ( e = new p( 3534 ( e = 3535 t.touches && 1 === t.touches.length 3536 ? t.touches[ 0 ] 3537 : t ).clientX, 3538 e.clientY 3539 )._subtract( this._startPoint ) ).x && 3540 ! e.y ) || 3541 Math.abs( e.x ) + Math.abs( e.y ) < 3542 this.options.clickTolerance || 3543 ( ( e.x /= this._parentScale.x ), 3544 ( e.y /= this._parentScale.y ), 3545 k( t ), 3546 this._moved || 3547 ( this.fire( 'dragstart' ), 3548 ( this._moved = ! 0 ), 3549 M( document.body, 'leaflet-dragging' ), 3550 ( this._lastTarget = t.target || t.srcElement ), 3551 window.SVGElementInstance && 3552 this._lastTarget instanceof 3553 window.SVGElementInstance && 3554 ( this._lastTarget = 3555 this._lastTarget.correspondingUseElement ), 3556 M( this._lastTarget, 'leaflet-drag-target' ) ), 3557 ( this._newPos = this._startPos.add( e ) ), 3558 ( this._moving = ! 0 ), 3559 ( this._lastEvent = t ), 3560 this._updatePosition() ) ); 3561 }, 3562 _updatePosition: function () { 3563 var t = { originalEvent: this._lastEvent }; 3564 this.fire( 'predrag', t ), 3565 Z( this._element, this._newPos ), 3566 this.fire( 'drag', t ); 3567 }, 3568 _onUp: function () { 3569 this._enabled && this.finishDrag(); 3570 }, 3571 finishDrag: function ( t ) { 3572 z( document.body, 'leaflet-dragging' ), 3573 this._lastTarget && 3574 ( z( this._lastTarget, 'leaflet-drag-target' ), 3575 ( this._lastTarget = null ) ), 3576 E( document, 'mousemove touchmove', this._onMove, this ), 3577 E( 3578 document, 3579 'mouseup touchend touchcancel', 3580 this._onUp, 3581 this 3582 ), 3583 Me(), 3584 he(), 3585 this._moved && 3586 this._moving && 3587 this.fire( 'dragend', { 3588 noInertia: t, 3589 distance: this._newPos.distanceTo( this._startPos ), 3590 } ), 3591 ( this._moving = ! 1 ), 3592 ( ti._dragging = ! 1 ); 3593 }, 3594 } ); 3595 function ei( t, e ) { 3596 if ( e && t.length ) { 3597 var i = ( t = ( function ( t, e ) { 3598 for ( 3599 var i = [ t[ 0 ] ], n = 1, o = 0, s = t.length; 3600 n < s; 3601 n++ 3602 ) 3603 ( function ( t, e ) { 3604 var i = e.x - t.x,
3605 e = e.y - t.y; 3606 return i * i + e * e; 3607 } )( t[ n ], t[ o ] ) > e && 3608 ( i.push( t[ n ] ), ( o = n ) ); 3609 o < s - 1 && i.push( t[ s - 1 ] ); 3610 return i; 3611 } )( t, ( e = e * e ) ) ), 3612 n = i.length, 3613 o = new ( 3614 typeof Uint8Array != void 0 + '' ? Uint8Array : Array 3615 )( n ); 3616 ( o[ 0 ] = o[ n - 1 ] = 1 ), 3617 ( function t( e, i, n, o, s ) { 3618 var r, 3619 a, 3620 h, 3621 l = 0; 3622 for ( a = o + 1; a <= s - 1; a++ ) 3623 ( h = ri( e[ a ], e[ o ], e[ s ], ! 0 ) ), 3624 l < h && ( ( r = a ), ( l = h ) ); 3625 n < l && 3626 ( ( i[ r ] = 1 ), 3627 t( e, i, n, o, r ), 3628 t( e, i, n, r, s ) ); 3629 } )( i, o, e, 0, n - 1 ); 3630 var s, 3631 r = []; 3632 for ( s = 0; s < n; s++ ) o[ s ] && r.push( i[ s ] ); 3633 return r; 3634 } 3635 return t.slice(); 3636 } 3637 function ii( t, e, i ) { 3638 return Math.sqrt( ri( t, e, i, ! 0 ) ); 3639 } 3640 function ni( t, e, i, n, o ) { 3641 var s, 3642 r, 3643 a, 3644 h = n ? Ke : si( t, i ), 3645 l = si( e, i ); 3646 for ( Ke = l; ; ) { 3647 if ( ! ( h | l ) ) return [ t, e ]; 3648 if ( h & l ) return ! 1; 3649 ( a = si( ( r = oi( t, e, ( s = h || l ), i, o ) ), i ) ), 3650 s === h ? ( ( t = r ), ( h = a ) ) : ( ( e = r ), ( l = a ) ); 3651 } 3652 } 3653 function oi( t, e, i, n, o ) { 3654 var s, 3655 r, 3656 a = e.x - t.x, 3657 e = e.y - t.y, 3658 h = n.min, 3659 n = n.max; 3660 return ( 3661 8 & i 3662 ? ( ( s = t.x + ( a * ( n.y - t.y ) ) / e ), ( r = n.y ) ) 3663 : 4 & i 3664 ? ( ( s = t.x + ( a * ( h.y - t.y ) ) / e ), ( r = h.y ) ) 3665 : 2 & i 3666 ? ( ( s = n.x ), ( r = t.y + ( e * ( n.x - t.x ) ) / a ) ) 3667 : 1 & i && 3668 ( ( s = h.x ), ( r = t.y + ( e * ( h.x - t.x ) ) / a ) ), 3669 new p( s, r, o ) 3670 ); 3671 } 3672 function si( t, e ) { 3673 var i = 0; 3674 return ( 3675 t.x < e.min.x ? ( i |= 1 ) : t.x > e.max.x && ( i |= 2 ), 3676 t.y < e.min.y ? ( i |= 4 ) : t.y > e.max.y && ( i |= 8 ), 3677 i 3678 ); 3679 } 3680 function ri( t, e, i, n ) { 3681 var o = e.x, 3682 e = e.y, 3683 s = i.x - o, 3684 r = i.y - e, 3685 a = s * s + r * r; 3686 return ( 3687 0 < a && 3688 ( 1 < ( a = ( ( t.x - o ) * s + ( t.y - e ) * r ) / a ) 3689 ? ( ( o = i.x ), ( e = i.y ) ) 3690 : 0 < a && ( ( o += s * a ), ( e += r * a ) ) ), 3691 ( s = t.x - o ), 3692 ( r = t.y - e ), 3693 n ? s * s + r * r : new p( o, e ) 3694 ); 3695 } 3696 function A( t ) { 3697 return ( 3698 ! d( t[ 0 ] ) || 3699 ( 'object' != typeof t[ 0 ][ 0 ] && void 0 !== t[ 0 ][ 0 ] ) 3700 ); 3701 } 3702 function ai( t ) { 3703 return ( 3704 console.warn( 3705 'Deprecated use of _flat, please use L.LineUtil.isFlat instead.' 3706 ), 3707 A( t ) 3708 ); 3709 } 3710 function hi( t, e ) { 3711 var i, n, o, s, r; 3712 if ( ! t || 0 === t.length ) throw new Error( 'latlngs not passed' ); 3713 A( t ) || 3714 ( console.warn( 3715 'latlngs are not flat! Only the first ring will be used' 3716 ), 3717 ( t = t[ 0 ] ) ); 3718 var a, 3719 h = []; 3720 for ( a in t ) h.push( e.project( w( t[ a ] ) ) ); 3721 for ( var l = h.length, u = 0, c = 0; u < l - 1; u++ ) 3722 c += h[ u ].distanceTo( h[ u + 1 ] ) / 2; 3723 if ( 0 === c ) r = h[ 0 ]; 3724 else 3725 for ( i = u = 0; u < l - 1; u++ ) 3726 if ( 3727 ( ( n = h[ u ] ), 3728 ( o = h[ u + 1 ] ), 3729 c < ( i += s = n.distanceTo( o ) ) ) 3730 ) { 3731 r = [ 3732 o.x - ( s = ( i - c ) / s ) * ( o.x - n.x ), 3733 o.y - s * ( o.y - n.y ), 3734 ]; 3735 break; 3736 } 3737 return e.unproject( m( r ) ); 3738 } 3739 gt = { 3740 __proto__: null, 3741 simplify: ei, 3742 pointToSegmentDistance: ii, 3743 closestPointOnSegment: function ( t, e, i ) { 3744 return ri( t, e, i ); 3745 }, 3746 clipSegment: ni, 3747 _getEdgeIntersection: oi, 3748 _getBitCode: si, 3749 _sqClosestPointOnSegment: ri, 3750 isFlat: A, 3751 _flat: ai, 3752 polylineCenter: hi, 3753 }; 3754 function li( t, e, i ) { 3755 for ( 3756 var n, o, s, r, a, h, l, u = [ 1, 4, 2, 8 ], c = 0, d = t.length; 3757 c < d; 3758 c++ 3759 ) 3760 t[ c ]._code = si( t[ c ], e ); 3761 for ( s = 0; s < 4; s++ ) { 3762 for ( 3763 h = u[ s ], n = [], c = 0, o = ( d = t.length ) - 1; 3764 c < d; 3765 o = c++ 3766 ) 3767 ( r = t[ c ] ), 3768 ( a = t[ o ] ), 3769 r._code & h 3770 ? a._code & h || 3771 ( ( ( l = oi( a, r, h, e, i ) )._code = si( l, e ) ), 3772 n.push( l ) ) 3773 : ( a._code & h && 3774 ( ( ( l = oi( a, r, h, e, i ) )._code = si( 3775 l, 3776 e 3777 ) ), 3778 n.push( l ) ), 3779 n.push( r ) ); 3780 t = n; 3781 } 3782 return t; 3783 } 3784 function ui( t, e ) { 3785 var i, n, o, s, r, a; 3786 if ( ! t || 0 === t.length ) throw new Error( 'latlngs not passed' ); 3787 A( t ) || 3788 ( console.warn( 3789 'latlngs are not flat! Only the first ring will be used' 3790 ), 3791 ( t = t[ 0 ] ) ); 3792 var h, 3793 l = []; 3794 for ( h in t ) l.push( e.project( w( t[ h ] ) ) ); 3795 for ( 3796 var u = l.length, c = ( s = r = 0 ), d = 0, _ = u - 1; 3797 d < u; 3798 _ = d++ 3799 ) 3800 ( i = l[ d ] ), 3801 ( n = l[ _ ] ), 3802 ( o = i.y * n.x - n.y * i.x ), 3803 ( s += ( i.x + n.x ) * o ), 3804 ( r += ( i.y + n.y ) * o ), 3805 ( c += 3 * o ); 3806 return ( 3807 ( a = 0 === c ? l[ 0 ] : [ s / c, r / c ] ), e.unproject( m( a ) ) 3808 ); 3809 } 3810 function ci( t, e ) { 3811 return new pi( t, e ); 3812 } 3813 function di( t, e ) { 3814 return new mi( t, e ); 3815 } 3816 var vt = { __proto__: null, clipPolygon: li, polygonCenter: ui }, 3817 yt = { 3818 project: function ( t ) { 3819 return new p( t.lng, t.lat ); 3820 }, 3821 unproject: function ( t ) { 3822 return new v( t.y, t.x ); 3823 }, 3824 bounds: new f( [ -180, -90 ], [ 180, 90 ] ), 3825 }, 3826 xt = { 3827 R: 6378137, 3828 R_MINOR: 6356752.314245179, 3829 bounds: new f( 3830 [ -20037508.34279, -15496570.73972 ], 3831 [ 20037508.34279, 18764656.23138 ] 3832 ), 3833 project: function ( t ) { 3834 var e = Math.PI / 180, 3835 i = this.R, 3836 n = t.lat * e, 3837 o = this.R_MINOR / i, 3838 o = Math.sqrt( 1 - o * o ), 3839 s = o * Math.sin( n ), 3840 s = 3841 Math.tan( Math.PI / 4 - n / 2 ) / 3842 Math.pow( ( 1 - s ) / ( 1 + s ), o / 2 ),
3843 n = -i * Math.log( Math.max( s, 1e-10 ) ); 3844 return new p( t.lng * e * i, n ); 3845 }, 3846 unproject: function ( t ) { 3847 for ( 3848 var e, 3849 i = 180 / Math.PI, 3850 n = this.R, 3851 o = this.R_MINOR / n, 3852 s = Math.sqrt( 1 - o * o ), 3853 r = Math.exp( -t.y / n ), 3854 a = Math.PI / 2 - 2 * Math.atan( r ), 3855 h = 0, 3856 l = 0.1; 3857 h < 15 && 1e-7 < Math.abs( l ); 3858 h++ 3859 ) 3860 ( e = s * Math.sin( a ) ), 3861 ( e = Math.pow( ( 1 - e ) / ( 1 + e ), s / 2 ) ), 3862 ( a += l = Math.PI / 2 - 2 * Math.atan( r * e ) - a ); 3863 return new v( a * i, ( t.x * i ) / n ); 3864 }, 3865 }, 3866 wt = { 3867 __proto__: null, 3868 LonLat: yt, 3869 Mercator: xt, 3870 SphericalMercator: rt, 3871 }, 3872 Pt = l( {}, st, { 3873 code: 'EPSG:3395', 3874 projection: xt, 3875 transformation: ht( 3876 ( bt = 0.5 / ( Math.PI * xt.R ) ), 3877 0.5, 3878 -bt, 3879 0.5 3880 ), 3881 } ), 3882 _i = l( {}, st, { 3883 code: 'EPSG:4326', 3884 projection: yt, 3885 transformation: ht( 1 / 180, 1, -1 / 180, 0.5 ), 3886 } ), 3887 Lt = l( {}, ot, { 3888 projection: yt, 3889 transformation: ht( 1, 0, -1, 0 ), 3890 scale: function ( t ) { 3891 return Math.pow( 2, t ); 3892 }, 3893 zoom: function ( t ) { 3894 return Math.log( t ) / Math.LN2; 3895 }, 3896 distance: function ( t, e ) { 3897 var i = e.lng - t.lng, 3898 e = e.lat - t.lat; 3899 return Math.sqrt( i * i + e * e ); 3900 }, 3901 infinite: ! 0, 3902 } ), 3903 y = 3904 ( ( ot.Earth = st ), 3905 ( ot.EPSG3395 = Pt ), 3906 ( ot.EPSG3857 = lt ), 3907 ( ot.EPSG900913 = ut ), 3908 ( ot.EPSG4326 = _i ), 3909 ( ot.Simple = Lt ), 3910 it.extend( { 3911 options: { 3912 pane: 'overlayPane', 3913 attribution: null, 3914 bubblingMouseEvents: ! 0, 3915 }, 3916 addTo: function ( t ) { 3917 return t.addLayer( this ), this; 3918 }, 3919 remove: function () { 3920 return this.removeFrom( this._map || this._mapToAdd ); 3921 }, 3922 removeFrom: function ( t ) { 3923 return t && t.removeLayer( this ), this; 3924 }, 3925 getPane: function ( t ) { 3926 return this._map.getPane( 3927 t ? this.options[ t ] || t : this.options.pane 3928 ); 3929 }, 3930 addInteractiveTarget: function ( t ) { 3931 return ( this._map._targets[ h( t ) ] = this ); 3932 }, 3933 removeInteractiveTarget: function ( t ) { 3934 return delete this._map._targets[ h( t ) ], this; 3935 }, 3936 getAttribution: function () { 3937 return this.options.attribution; 3938 }, 3939 _layerAdd: function ( t ) { 3940 var e, 3941 i = t.target; 3942 i.hasLayer( this ) && 3943 ( ( this._map = i ), 3944 ( this._zoomAnimated = i._zoomAnimated ), 3945 this.getEvents && 3946 ( ( e = this.getEvents() ), 3947 i.on( e, this ), 3948 this.once( 3949 'remove', 3950 function () { 3951 i.off( e, this ); 3952 }, 3953 this 3954 ) ), 3955 this.onAdd( i ), 3956 this.fire( 'add' ), 3957 i.fire( 'layeradd', { layer: this } ) ); 3958 }, 3959 } ) ), 3960 pi = 3961 ( O.include( { 3962 addLayer: function ( t ) { 3963 var e; 3964 if ( t._layerAdd ) 3965 return ( 3966 ( e = h( t ) ), 3967 this._layers[ e ] || 3968 ( ( ( this._layers[ e ] = t )._mapToAdd = 3969 this ), 3970 t.beforeAdd && t.beforeAdd( this ), 3971 this.whenReady( t._layerAdd, t ) ), 3972 this 3973 ); 3974 throw new Error( 'The provided object is not a Layer.' ); 3975 }, 3976 removeLayer: function ( t ) { 3977 var e = h( t ); 3978 return ( 3979 this._layers[ e ] && 3980 ( this._loaded && t.onRemove( this ), 3981 delete this._layers[ e ], 3982 this._loaded && 3983 ( this.fire( 'layerremove', { layer: t } ), 3984 t.fire( 'remove' ) ), 3985 ( t._map = t._mapToAdd = null ) ), 3986 this 3987 ); 3988 }, 3989 hasLayer: function ( t ) { 3990 return h( t ) in this._layers; 3991 }, 3992 eachLayer: function ( t, e ) { 3993 for ( var i in this._layers ) 3994 t.call( e, this._layers[ i ] ); 3995 return this; 3996 }, 3997 _addLayers: function ( t ) { 3998 for ( 3999 var e = 0, 4000 i = ( t = t ? ( d( t ) ? t : [ t ] ) : [] ).length; 4001 e < i; 4002 e++ 4003 ) 4004 this.addLayer( t[ e ] ); 4005 }, 4006 _addZoomLimit: function ( t ) { 4007 ( isNaN( t.options.maxZoom ) && 4008 isNaN( t.options.minZoom ) ) || 4009 ( ( this._zoomBoundLayers[ h( t ) ] = t ), 4010 this._updateZoomLevels() ); 4011 }, 4012 _removeZoomLimit: function ( t ) { 4013 t = h( t ); 4014 this._zoomBoundLayers[ t ] && 4015 ( delete this._zoomBoundLayers[ t ], 4016 this._updateZoomLevels() ); 4017 }, 4018 _updateZoomLevels: function () { 4019 var t, 4020 e = 1 / 0, 4021 i = -1 / 0, 4022 n = this._getZoomSpan(); 4023 for ( t in this._zoomBoundLayers ) 4024 var o = this._zoomBoundLayers[ t ].options, 4025 e = 4026 void 0 === o.minZoom 4027 ? e 4028 : Math.min( e, o.minZoom ), 4029 i = 4030 void 0 === o.maxZoom 4031 ? i 4032 : Math.max( i, o.maxZoom );
4033 ( this._layersMaxZoom = i === -1 / 0 ? void 0 : i ), 4034 ( this._layersMinZoom = e === 1 / 0 ? void 0 : e ), 4035 n !== this._getZoomSpan() && 4036 this.fire( 'zoomlevelschange' ), 4037 void 0 === this.options.maxZoom && 4038 this._layersMaxZoom && 4039 this.getZoom() > this._layersMaxZoom && 4040 this.setZoom( this._layersMaxZoom ), 4041 void 0 === this.options.minZoom && 4042 this._layersMinZoom && 4043 this.getZoom() < this._layersMinZoom && 4044 this.setZoom( this._layersMinZoom ); 4045 }, 4046 } ), 4047 y.extend( { 4048 initialize: function ( t, e ) { 4049 var i, n; 4050 if ( ( c( this, e ), ( this._layers = {} ), t ) ) 4051 for ( i = 0, n = t.length; i < n; i++ ) 4052 this.addLayer( t[ i ] ); 4053 }, 4054 addLayer: function ( t ) { 4055 var e = this.getLayerId( t ); 4056 return ( 4057 ( this._layers[ e ] = t ), 4058 this._map && this._map.addLayer( t ), 4059 this 4060 ); 4061 }, 4062 removeLayer: function ( t ) { 4063 t = t in this._layers ? t : this.getLayerId( t ); 4064 return ( 4065 this._map && 4066 this._layers[ t ] && 4067 this._map.removeLayer( this._layers[ t ] ), 4068 delete this._layers[ t ], 4069 this 4070 ); 4071 }, 4072 hasLayer: function ( t ) { 4073 return ( 4074 ( 'number' == typeof t ? t : this.getLayerId( t ) ) in 4075 this._layers 4076 ); 4077 }, 4078 clearLayers: function () { 4079 return this.eachLayer( this.removeLayer, this ); 4080 }, 4081 invoke: function ( t ) { 4082 var e, 4083 i, 4084 n = Array.prototype.slice.call( arguments, 1 ); 4085 for ( e in this._layers ) 4086 ( i = this._layers[ e ] )[ t ] && i[ t ].apply( i, n ); 4087 return this; 4088 }, 4089 onAdd: function ( t ) { 4090 this.eachLayer( t.addLayer, t ); 4091 }, 4092 onRemove: function ( t ) { 4093 this.eachLayer( t.removeLayer, t ); 4094 }, 4095 eachLayer: function ( t, e ) { 4096 for ( var i in this._layers ) 4097 t.call( e, this._layers[ i ] ); 4098 return this; 4099 }, 4100 getLayer: function ( t ) { 4101 return this._layers[ t ]; 4102 }, 4103 getLayers: function () { 4104 var t = []; 4105 return this.eachLayer( t.push, t ), t; 4106 }, 4107 setZIndex: function ( t ) { 4108 return this.invoke( 'setZIndex', t ); 4109 }, 4110 getLayerId: h, 4111 } ) ), 4112 mi = pi.extend( { 4113 addLayer: function ( t ) { 4114 return this.hasLayer( t ) 4115 ? this 4116 : ( t.addEventParent( this ), 4117 pi.prototype.addLayer.call( this, t ), 4118 this.fire( 'layeradd', { layer: t } ) ); 4119 }, 4120 removeLayer: function ( t ) { 4121 return this.hasLayer( t ) 4122 ? ( ( t = 4123 t in this._layers 4124 ? this._layers[ t ] 4125 : t ).removeEventParent( this ), 4126 pi.prototype.removeLayer.call( this, t ), 4127 this.fire( 'layerremove', { layer: t } ) ) 4128 : this; 4129 }, 4130 setStyle: function ( t ) { 4131 return this.invoke( 'setStyle', t ); 4132 }, 4133 bringToFront: function () { 4134 return this.invoke( 'bringToFront' ); 4135 }, 4136 bringToBack: function () { 4137 return this.invoke( 'bringToBack' ); 4138 }, 4139 getBounds: function () { 4140 var t, 4141 e = new s(); 4142 for ( t in this._layers ) { 4143 var i = this._layers[ t ]; 4144 e.extend( i.getBounds ? i.getBounds() : i.getLatLng() ); 4145 } 4146 return e; 4147 }, 4148 } ), 4149 fi = e.extend( { 4150 options: { 4151 popupAnchor: [ 0, 0 ], 4152 tooltipAnchor: [ 0, 0 ], 4153 crossOrigin: ! 1, 4154 }, 4155 initialize: function ( t ) { 4156 c( this, t ); 4157 }, 4158 createIcon: function ( t ) { 4159 return this._createIcon( 'icon', t ); 4160 }, 4161 createShadow: function ( t ) { 4162 return this._createIcon( 'shadow', t ); 4163 }, 4164 _createIcon: function ( t, e ) { 4165 var i = this._getIconUrl( t ); 4166 if ( i ) 4167 return ( 4168 ( i = this._createImg( 4169 i, 4170 e && 'IMG' === e.tagName ? e : null 4171 ) ), 4172 this._setIconStyles( i, t ), 4173 ( ! this.options.crossOrigin && 4174 '' !== this.options.crossOrigin ) || 4175 ( i.crossOrigin = 4176 ! 0 === this.options.crossOrigin 4177 ? '' 4178 : this.options.crossOrigin ), 4179 i 4180 ); 4181 if ( 'icon' === t ) 4182 throw new Error( 4183 'iconUrl not set in Icon options (see the docs).' 4184 ); 4185 return null; 4186 }, 4187 _setIconStyles: function ( t, e ) { 4188 var i = this.options, 4189 n = i[ e + 'Size' ], 4190 n = m( ( n = 'number' == typeof n ? [ n, n ] : n ) ), 4191 o = m(
4192 ( 'shadow' === e && i.shadowAnchor ) || 4193 i.iconAnchor || 4194 ( n && n.divideBy( 2, ! 0 ) ) 4195 ); 4196 ( t.className = 4197 'leaflet-marker-' + e + ' ' + ( i.className || '' ) ), 4198 o && 4199 ( ( t.style.marginLeft = -o.x + 'px' ), 4200 ( t.style.marginTop = -o.y + 'px' ) ), 4201 n && 4202 ( ( t.style.width = n.x + 'px' ), 4203 ( t.style.height = n.y + 'px' ) ); 4204 }, 4205 _createImg: function ( t, e ) { 4206 return ( 4207 ( ( e = e || document.createElement( 'img' ) ).src = t ), e 4208 ); 4209 }, 4210 _getIconUrl: function ( t ) { 4211 return ( 4212 ( b.retina && this.options[ t + 'RetinaUrl' ] ) || 4213 this.options[ t + 'Url' ] 4214 ); 4215 }, 4216 } ); 4217 function gi( t ) { 4218 return new fi( t ); 4219 } 4220 var vi = fi.extend( { 4221 options: { 4222 iconUrl: 'marker-icon.png', 4223 iconRetinaUrl: 'marker-icon-2x.png', 4224 shadowUrl: 'marker-shadow.png', 4225 iconSize: [ 25, 41 ], 4226 iconAnchor: [ 12, 41 ], 4227 popupAnchor: [ 1, -34 ], 4228 tooltipAnchor: [ 16, -28 ], 4229 shadowSize: [ 41, 41 ], 4230 }, 4231 _getIconUrl: function ( t ) { 4232 return ( 4233 'string' != typeof vi.imagePath && 4234 ( vi.imagePath = this._detectIconPath() ), 4235 ( this.options.imagePath || vi.imagePath ) + 4236 fi.prototype._getIconUrl.call( this, t ) 4237 ); 4238 }, 4239 _stripUrl: function ( t ) { 4240 function e( t, e, i ) { 4241 return ( e = e.exec( t ) ) && e[ i ]; 4242 } 4243 return ( 4244 ( t = e( t, /^url\((['"])?(.+)\1\)$/, 2 ) ) && 4245 e( t, /^(.*)marker-icon\.png$/, 1 ) 4246 ); 4247 }, 4248 _detectIconPath: function () { 4249 var t = P( 'div', 'leaflet-default-icon-path', document.body ), 4250 e = 4251 me( t, 'background-image' ) || 4252 me( t, 'backgroundImage' ); 4253 return ( 4254 document.body.removeChild( t ), 4255 ( e = this._stripUrl( e ) ) 4256 ? e 4257 : ( t = document.querySelector( 4258 'link[href$="leaflet.css"]' 4259 ) ) 4260 ? t.href.substring( 4261 0, 4262 t.href.length - 'leaflet.css'.length - 1 4263 ) 4264 : '' 4265 ); 4266 }, 4267 } ), 4268 yi = o.extend( { 4269 initialize: function ( t ) { 4270 this._marker = t; 4271 }, 4272 addHooks: function () { 4273 var t = this._marker._icon; 4274 this._draggable || ( this._draggable = new ti( t, t, ! 0 ) ), 4275 this._draggable 4276 .on( 4277 { 4278 dragstart: this._onDragStart, 4279 predrag: this._onPreDrag, 4280 drag: this._onDrag, 4281 dragend: this._onDragEnd, 4282 }, 4283 this 4284 ) 4285 .enable(), 4286 M( t, 'leaflet-marker-draggable' ); 4287 }, 4288 removeHooks: function () { 4289 this._draggable 4290 .off( 4291 { 4292 dragstart: this._onDragStart, 4293 predrag: this._onPreDrag, 4294 drag: this._onDrag, 4295 dragend: this._onDragEnd, 4296 }, 4297 this 4298 ) 4299 .disable(), 4300 this._marker._icon && 4301 z( this._marker._icon, 'leaflet-marker-draggable' ); 4302 }, 4303 moved: function () { 4304 return this._draggable && this._draggable._moved; 4305 }, 4306 _adjustPan: function ( t ) { 4307 var e = this._marker, 4308 i = e._map, 4309 n = this._marker.options.autoPanSpeed, 4310 o = this._marker.options.autoPanPadding, 4311 s = Le( e._icon ), 4312 r = i.getPixelBounds(), 4313 a = i.getPixelOrigin(), 4314 a = _( 4315 r.min._subtract( a ).add( o ), 4316 r.max._subtract( a ).subtract( o ) 4317 ); 4318 a.contains( s ) || 4319 ( ( o = m( 4320 ( Math.max( a.max.x, s.x ) - a.max.x ) / 4321 ( r.max.x - a.max.x ) - 4322 ( Math.min( a.min.x, s.x ) - a.min.x ) / 4323 ( r.min.x - a.min.x ), 4324 ( Math.max( a.max.y, s.y ) - a.max.y ) / 4325 ( r.max.y - a.max.y ) - 4326 ( Math.min( a.min.y, s.y ) - a.min.y ) / 4327 ( r.min.y - a.min.y ) 4328 ).multiplyBy( n ) ), 4329 i.panBy( o, { animate: ! 1 } ), 4330 this._draggable._newPos._add( o ), 4331 this._draggable._startPos._add( o ), 4332 Z( e._icon, this._draggable._newPos ), 4333 this._onDrag( t ), 4334 ( this._panRequest = x( 4335 this._adjustPan.bind( this, t ) 4336 ) ) ); 4337 }, 4338 _onDragStart: function () { 4339 ( this._oldLatLng = this._marker.getLatLng() ), 4340 this._marker.closePopup && this._marker.closePopup(), 4341 this._marker.fire( 'movestart' ).fire( 'dragstart' ); 4342 }, 4343 _onPreDrag: function ( t ) { 4344 this._marker.options.autoPan && 4345 ( r( this._panRequest ), 4346 ( this._panRequest = x( 4347 this._adjustPan.bind( this, t ) 4348 ) ) ); 4349 }, 4350 _onDrag: function ( t ) { 4351 var e = this._marker, 4352 i = e._shadow, 4353 n = Le( e._icon ), 4354 o = e._map.layerPointToLatLng( n ); 4355 i && Z( i, n ), 4356 ( e._latlng = o ), 4357 ( t.latlng = o ), 4358 ( t.oldLatLng = this._oldLatLng ), 4359 e.fire( 'move', t ).fire( 'drag', t ); 4360 }, 4361 _onDragEnd: function ( t ) { 4362 r( this._panRequest ), 4363 delete this._oldLatLng, 4364 this._marker.fire( 'moveend' ).fire( 'dragend', t ); 4365 }, 4366 } ), 4367 xi = y.extend( { 4368 options: { 4369 icon: new vi(), 4370 interactive: ! 0, 4371 keyboard: ! 0, 4372 title: '', 4373 alt: 'Marker', 4374 zIndexOffset: 0, 4375 opacity: 1, 4376 riseOnHover: ! 1, 4377 riseOffset: 250, 4378 pane: 'markerPane', 4379 shadowPane: 'shadowPane', 4380 bubblingMouseEvents: ! 1, 4381 autoPanOnFocus: ! 0, 4382 draggable: ! 1, 4383 autoPan: ! 1, 4384 autoPanPadding: [ 50, 50 ], 4385 autoPanSpeed: 10, 4386 }, 4387 initialize: function ( t, e ) { 4388 c( this, e ), ( this._latlng = w( t ) ); 4389 }, 4390 onAdd: function ( t ) { 4391 ( this._zoomAnimated = 4392 this._zoomAnimated && t.options.markerZoomAnimation ), 4393 this._zoomAnimated && 4394 t.on( 'zoomanim', this._animateZoom, this ), 4395 this._initIcon(), 4396 this.update(); 4397 }, 4398 onRemove: function ( t ) { 4399 this.dragging && 4400 this.dragging.enabled() && 4401 ( ( this.options.draggable = ! 0 ), 4402 this.dragging.removeHooks() ), 4403 delete this.dragging, 4404 this._zoomAnimated && 4405 t.off( 'zoomanim', this._animateZoom, this ), 4406 this._removeIcon(), 4407 this._removeShadow(); 4408 }, 4409 getEvents: function () { 4410 return { zoom: this.update, viewreset: this.update }; 4411 }, 4412 getLatLng: function () { 4413 return this._latlng; 4414 }, 4415 setLatLng: function ( t ) { 4416 var e = this._latlng; 4417 return ( 4418 ( this._latlng = w( t ) ), 4419 this.update(), 4420 this.fire( 'move', { oldLatLng: e, latlng: this._latlng } ) 4421 ); 4422 }, 4423 setZIndexOffset: function ( t ) { 4424 return ( this.options.zIndexOffset = t ), this.update(); 4425 }, 4426 getIcon: function () { 4427 return this.options.icon; 4428 }, 4429 setIcon: function ( t ) { 4430 return ( 4431 ( this.options.icon = t ), 4432 this._map && ( this._initIcon(), this.update() ), 4433 this._popup && 4434 this.bindPopup( this._popup, this._popup.options ), 4435 this 4436 ); 4437 }, 4438 getElement: function () { 4439 return this._icon; 4440 }, 4441 update: function () { 4442 var t; 4443 return ( 4444 this._icon && 4445 this._map && 4446 ( ( t = this._map 4447 .latLngToLayerPoint( this._latlng ) 4448 .round() ), 4449 this._setPos( t ) ), 4450 this 4451 ); 4452 }, 4453 _initIcon: function () { 4454 var t = this.options, 4455 e = 4456 'leaflet-zoom-' + 4457 ( this._zoomAnimated ? 'animated' : 'hide' ), 4458 i = t.icon.createIcon( this._icon ), 4459 n = ! 1, 4460 i = 4461 ( i !== this._icon && 4462 ( this._icon && this._removeIcon(), 4463 ( n = ! 0 ), 4464 t.title && ( i.title = t.title ), 4465 'IMG' === i.tagName && ( i.alt = t.alt || '' ) ), 4466 M( i, e ), 4467 t.keyboard && 4468 ( ( i.tabIndex = '0' ), 4469 i.setAttribute( 'role', 'button' ) ), 4470 ( this._icon = i ), 4471 t.riseOnHover && 4472 this.on( { 4473 mouseover: this._bringToFront, 4474 mouseout: this._resetZIndex, 4475 } ), 4476 this.options.autoPanOnFocus &&
4477 S( i, 'focus', this._panOnFocus, this ), 4478 t.icon.createShadow( this._shadow ) ), 4479 o = ! 1; 4480 i !== this._shadow && ( this._removeShadow(), ( o = ! 0 ) ), 4481 i && ( M( i, e ), ( i.alt = '' ) ), 4482 ( this._shadow = i ), 4483 t.opacity < 1 && this._updateOpacity(), 4484 n && this.getPane().appendChild( this._icon ), 4485 this._initInteraction(), 4486 i && 4487 o && 4488 this.getPane( t.shadowPane ).appendChild( 4489 this._shadow 4490 ); 4491 }, 4492 _removeIcon: function () { 4493 this.options.riseOnHover && 4494 this.off( { 4495 mouseover: this._bringToFront, 4496 mouseout: this._resetZIndex, 4497 } ), 4498 this.options.autoPanOnFocus && 4499 E( this._icon, 'focus', this._panOnFocus, this ), 4500 T( this._icon ), 4501 this.removeInteractiveTarget( this._icon ), 4502 ( this._icon = null ); 4503 }, 4504 _removeShadow: function () { 4505 this._shadow && T( this._shadow ), ( this._shadow = null ); 4506 }, 4507 _setPos: function ( t ) { 4508 this._icon && Z( this._icon, t ), 4509 this._shadow && Z( this._shadow, t ), 4510 ( this._zIndex = t.y + this.options.zIndexOffset ), 4511 this._resetZIndex(); 4512 }, 4513 _updateZIndex: function ( t ) { 4514 this._icon && ( this._icon.style.zIndex = this._zIndex + t ); 4515 }, 4516 _animateZoom: function ( t ) { 4517 t = this._map 4518 ._latLngToNewLayerPoint( this._latlng, t.zoom, t.center ) 4519 .round(); 4520 this._setPos( t ); 4521 }, 4522 _initInteraction: function () { 4523 var t; 4524 this.options.interactive && 4525 ( M( this._icon, 'leaflet-interactive' ), 4526 this.addInteractiveTarget( this._icon ), 4527 yi && 4528 ( ( t = this.options.draggable ), 4529 this.dragging && 4530 ( ( t = this.dragging.enabled() ), 4531 this.dragging.disable() ), 4532 ( this.dragging = new yi( this ) ), 4533 t && this.dragging.enable() ) ); 4534 }, 4535 setOpacity: function ( t ) { 4536 return ( 4537 ( this.options.opacity = t ), 4538 this._map && this._updateOpacity(), 4539 this 4540 ); 4541 }, 4542 _updateOpacity: function () { 4543 var t = this.options.opacity; 4544 this._icon && C( this._icon, t ), 4545 this._shadow && C( this._shadow, t ); 4546 }, 4547 _bringToFront: function () { 4548 this._updateZIndex( this.options.riseOffset ); 4549 }, 4550 _resetZIndex: function () { 4551 this._updateZIndex( 0 ); 4552 }, 4553 _panOnFocus: function () { 4554 var t, 4555 e, 4556 i = this._map; 4557 i && 4558 ( ( t = ( e = this.options.icon.options ).iconSize 4559 ? m( e.iconSize ) 4560 : m( 0, 0 ) ), 4561 ( e = e.iconAnchor ? m( e.iconAnchor ) : m( 0, 0 ) ), 4562 i.panInside( this._latlng, { 4563 paddingTopLeft: e, 4564 paddingBottomRight: t.subtract( e ), 4565 } ) ); 4566 }, 4567 _getPopupAnchor: function () { 4568 return this.options.icon.options.popupAnchor; 4569 }, 4570 _getTooltipAnchor: function () { 4571 return this.options.icon.options.tooltipAnchor; 4572 }, 4573 } ); 4574 function wi( t, e ) { 4575 return new xi( t, e ); 4576 } 4577 var bi = y.extend( { 4578 options: { 4579 stroke: ! 0, 4580 color: '#3388ff', 4581 weight: 3, 4582 opacity: 1, 4583 lineCap: 'round', 4584 lineJoin: 'round', 4585 dashArray: null, 4586 dashOffset: null, 4587 fill: ! 1, 4588 fillColor: null, 4589 fillOpacity: 0.2, 4590 fillRule: 'evenodd', 4591 interactive: ! 0, 4592 bubblingMouseEvents: ! 0, 4593 }, 4594 beforeAdd: function ( t ) { 4595 this._renderer = t.getRenderer( this ); 4596 }, 4597 onAdd: function () { 4598 this._renderer._initPath( this ), 4599 this._reset(), 4600 this._renderer._addPath( this ); 4601 }, 4602 onRemove: function () { 4603 this._renderer._removePath( this ); 4604 }, 4605 redraw: function () { 4606 return this._map && this._renderer._updatePath( this ), this; 4607 }, 4608 setStyle: function ( t ) { 4609 return ( 4610 c( this, t ), 4611 this._renderer && 4612 ( this._renderer._updateStyle( this ), 4613 this.options.stroke && 4614 t && 4615 Object.prototype.hasOwnProperty.call( 4616 t, 4617 'weight' 4618 ) && 4619 this._updateBounds() ), 4620 this 4621 ); 4622 }, 4623 bringToFront: function () { 4624 return ( 4625 this._renderer && this._renderer._bringToFront( this ), this 4626 ); 4627 }, 4628 bringToBack: function () { 4629 return ( 4630 this._renderer && this._renderer._bringToBack( this ), this 4631 ); 4632 }, 4633 getElement: function () { 4634 return this._path; 4635 }, 4636 _reset: function () { 4637 this._project(), this._update(); 4638 }, 4639 _clickTolerance: function () { 4640 return ( 4641 ( this.options.stroke ? this.options.weight / 2 : 0 ) + 4642 ( this._renderer.options.tolerance || 0 ) 4643 ); 4644 }, 4645 } ), 4646 Pi = bi.extend( { 4647 options: { fill: ! 0, radius: 10 }, 4648 initialize: function ( t, e ) { 4649 c( this, e ), 4650 ( this._latlng = w( t ) ), 4651 ( this._radius = this.options.radius ); 4652 }, 4653 setLatLng: function ( t ) { 4654 var e = this._latlng; 4655 return ( 4656 ( this._latlng = w( t ) ), 4657 this.redraw(), 4658 this.fire( 'move', { oldLatLng: e, latlng: this._latlng } ) 4659 ); 4660 }, 4661 getLatLng: function () { 4662 return this._latlng; 4663 }, 4664 setRadius: function ( t ) { 4665 return ( 4666 ( this.options.radius = this._radius = t ), this.redraw() 4667 ); 4668 }, 4669 getRadius: function () { 4670 return this._radius; 4671 }, 4672 setStyle: function ( t ) {
4673 var e = ( t && t.radius ) || this._radius; 4674 return ( 4675 bi.prototype.setStyle.call( this, t ), 4676 this.setRadius( e ), 4677 this 4678 ); 4679 }, 4680 _project: function () { 4681 ( this._point = this._map.latLngToLayerPoint( this._latlng ) ), 4682 this._updateBounds(); 4683 }, 4684 _updateBounds: function () { 4685 var t = this._radius, 4686 e = this._radiusY || t, 4687 i = this._clickTolerance(), 4688 t = [ t + i, e + i ]; 4689 this._pxBounds = new f( 4690 this._point.subtract( t ), 4691 this._point.add( t ) 4692 ); 4693 }, 4694 _update: function () { 4695 this._map && this._updatePath(); 4696 }, 4697 _updatePath: function () { 4698 this._renderer._updateCircle( this ); 4699 }, 4700 _empty: function () { 4701 return ( 4702 this._radius && 4703 ! this._renderer._bounds.intersects( this._pxBounds ) 4704 ); 4705 }, 4706 _containsPoint: function ( t ) { 4707 return ( 4708 t.distanceTo( this._point ) <= 4709 this._radius + this._clickTolerance() 4710 ); 4711 }, 4712 } ); 4713 function Li( t, e ) { 4714 return new Pi( t, e ); 4715 } 4716 var Ti = Pi.extend( { 4717 initialize: function ( t, e, i ) { 4718 if ( 4719 ( c( 4720 this, 4721 ( e = 'number' == typeof e ? l( {}, i, { radius: e } ) : e ) 4722 ), 4723 ( this._latlng = w( t ) ), 4724 isNaN( this.options.radius ) ) 4725 ) 4726 throw new Error( 'Circle radius cannot be NaN' ); 4727 this._mRadius = this.options.radius; 4728 }, 4729 setRadius: function ( t ) { 4730 return ( this._mRadius = t ), this.redraw(); 4731 }, 4732 getRadius: function () { 4733 return this._mRadius; 4734 }, 4735 getBounds: function () { 4736 var t = [ this._radius, this._radiusY || this._radius ]; 4737 return new s( 4738 this._map.layerPointToLatLng( this._point.subtract( t ) ), 4739 this._map.layerPointToLatLng( this._point.add( t ) ) 4740 ); 4741 }, 4742 setStyle: bi.prototype.setStyle, 4743 _project: function () { 4744 var t, 4745 e, 4746 i, 4747 n, 4748 o, 4749 s = this._latlng.lng, 4750 r = this._latlng.lat, 4751 a = this._map, 4752 h = a.options.crs; 4753 h.distance === st.distance 4754 ? ( ( n = Math.PI / 180 ), 4755 ( o = this._mRadius / st.R / n ), 4756 ( t = a.project( [ r + o, s ] ) ), 4757 ( e = a.project( [ r - o, s ] ) ), 4758 ( e = t.add( e ).divideBy( 2 ) ), 4759 ( i = a.unproject( e ).lat ), 4760 ( n = 4761 Math.acos( 4762 ( Math.cos( o * n ) - 4763 Math.sin( r * n ) * Math.sin( i * n ) ) / 4764 ( Math.cos( r * n ) * Math.cos( i * n ) ) 4765 ) / n ), 4766 ( ! isNaN( n ) && 0 !== n ) || 4767 ( n = o / Math.cos( ( Math.PI / 180 ) * r ) ), 4768 ( this._point = e.subtract( a.getPixelOrigin() ) ), 4769 ( this._radius = isNaN( n ) 4770 ? 0 4771 : e.x - a.project( [ i, s - n ] ).x ), 4772 ( this._radiusY = e.y - t.y ) ) 4773 : ( ( o = h.unproject( 4774 h 4775 .project( this._latlng ) 4776 .subtract( [ this._mRadius, 0 ] ) 4777 ) ), 4778 ( this._point = a.latLngToLayerPoint( this._latlng ) ), 4779 ( this._radius = 4780 this._point.x - a.latLngToLayerPoint( o ).x ) ), 4781 this._updateBounds(); 4782 }, 4783 } ); 4784 function Mi( t, e, i ) { 4785 return new Ti( t, e, i ); 4786 } 4787 var zi = bi.extend( { 4788 options: { smoothFactor: 1, noClip: ! 1 }, 4789 initialize: function ( t, e ) { 4790 c( this, e ), this._setLatLngs( t ); 4791 }, 4792 getLatLngs: function () { 4793 return this._latlngs; 4794 }, 4795 setLatLngs: function ( t ) { 4796 return this._setLatLngs( t ), this.redraw(); 4797 }, 4798 isEmpty: function () { 4799 return ! this._latlngs.length; 4800 }, 4801 closestLayerPoint: function ( t ) { 4802 for ( 4803 var e = 1 / 0, i = null, n = ri, o = 0, s = this._parts.length; 4804 o < s; 4805 o++ 4806 ) 4807 for ( 4808 var r = this._parts[ o ], a = 1, h = r.length; 4809 a < h; 4810 a++ 4811 ) { 4812 var l, 4813 u, 4814 c = n( t, ( l = r[ a - 1 ] ), ( u = r[ a ] ), ! 0 ); 4815 c < e && ( ( e = c ), ( i = n( t, l, u ) ) ); 4816 } 4817 return i && ( i.distance = Math.sqrt( e ) ), i; 4818 }, 4819 getCenter: function () { 4820 if ( this._map ) 4821 return hi( this._defaultShape(), this._map.options.crs ); 4822 throw new Error( 'Must add layer to map before using getCenter()' ); 4823 }, 4824 getBounds: function () { 4825 return this._bounds; 4826 }, 4827 addLatLng: function ( t, e ) { 4828 return ( 4829 ( e = e || this._defaultShape() ), 4830 ( t = w( t ) ), 4831 e.push( t ), 4832 this._bounds.extend( t ), 4833 this.redraw() 4834 ); 4835 }, 4836 _setLatLngs: function ( t ) { 4837 ( this._bounds = new s() ), 4838 ( this._latlngs = this._convertLatLngs( t ) ); 4839 }, 4840 _defaultShape: function () { 4841 return A( this._latlngs ) ? this._latlngs : this._latlngs[ 0 ]; 4842 }, 4843 _convertLatLngs: function ( t ) { 4844 for ( var e = [], i = A( t ), n = 0, o = t.length; n < o; n++ ) 4845 i 4846 ? ( ( e[ n ] = w( t[ n ] ) ), 4847 this._bounds.extend( e[ n ] ) ) 4848 : ( e[ n ] = this._convertLatLngs( t[ n ] ) ); 4849 return e; 4850 }, 4851 _project: function () { 4852 var t = new f(); 4853 ( this._rings = [] ), 4854 this._projectLatlngs( this._latlngs, this._rings, t ), 4855 this._bounds.isValid() && 4856 t.isValid() && 4857 ( ( this._rawPxBounds = t ), this._updateBounds() ); 4858 }, 4859 _updateBounds: function () { 4860 var t = this._clickTolerance(), 4861 t = new p( t, t ); 4862 this._rawPxBounds && 4863 ( this._pxBounds = new f( [ 4864 this._rawPxBounds.min.subtract( t ), 4865 this._rawPxBounds.max.add( t ), 4866 ] ) ); 4867 }, 4868 _projectLatlngs: function ( t, e, i ) { 4869 var n, 4870 o, 4871 s = t[ 0 ] instanceof v, 4872 r = t.length; 4873 if ( s ) { 4874 for ( o = [], n = 0; n < r; n++ ) 4875 ( o[ n ] = this._map.latLngToLayerPoint( t[ n ] ) ), 4876 i.extend( o[ n ] ); 4877 e.push( o ); 4878 } else 4879 for ( n = 0; n < r; n++ ) this._projectLatlngs( t[ n ], e, i ); 4880 }, 4881 _clipPoints: function () { 4882 var t = this._renderer._bounds; 4883 if ( 4884 ( ( this._parts = [] ), 4885 this._pxBounds && this._pxBounds.intersects( t ) ) 4886 ) 4887 if ( this.options.noClip ) this._parts = this._rings; 4888 else 4889 for ( 4890 var e, 4891 i, 4892 n, 4893 o, 4894 s = this._parts, 4895 r = 0, 4896 a = 0, 4897 h = this._rings.length; 4898 r < h; 4899 r++ 4900 ) 4901 for ( 4902 e = 0, i = ( o = this._rings[ r ] ).length; 4903 e < i - 1; 4904 e++ 4905 ) 4906 ( n = ni( o[ e ], o[ e + 1 ], t, e, ! 0 ) ) && 4907 ( ( s[ a ] = s[ a ] || [] ), 4908 s[ a ].push( n[ 0 ] ),
4909 ( n[ 1 ] === o[ e + 1 ] && e !== i - 2 ) || 4910 ( s[ a ].push( n[ 1 ] ), a++ ) ); 4911 }, 4912 _simplifyPoints: function () { 4913 for ( 4914 var t = this._parts, 4915 e = this.options.smoothFactor, 4916 i = 0, 4917 n = t.length; 4918 i < n; 4919 i++ 4920 ) 4921 t[ i ] = ei( t[ i ], e ); 4922 }, 4923 _update: function () { 4924 this._map && 4925 ( this._clipPoints(), 4926 this._simplifyPoints(), 4927 this._updatePath() ); 4928 }, 4929 _updatePath: function () { 4930 this._renderer._updatePoly( this ); 4931 }, 4932 _containsPoint: function ( t, e ) { 4933 var i, 4934 n, 4935 o, 4936 s, 4937 r, 4938 a, 4939 h = this._clickTolerance(); 4940 if ( this._pxBounds && this._pxBounds.contains( t ) ) 4941 for ( i = 0, s = this._parts.length; i < s; i++ ) 4942 for ( 4943 n = 0, o = ( r = ( a = this._parts[ i ] ).length ) - 1; 4944 n < r; 4945 o = n++ 4946 ) 4947 if ( ( e || 0 !== n ) && ii( t, a[ o ], a[ n ] ) <= h ) 4948 return ! 0; 4949 return ! 1; 4950 }, 4951 } ); 4952 function Ci( t, e ) { 4953 return new zi( t, e ); 4954 } 4955 zi._flat = ai; 4956 var Zi = zi.extend( { 4957 options: { fill: ! 0 }, 4958 isEmpty: function () { 4959 return ! this._latlngs.length || ! this._latlngs[ 0 ].length; 4960 }, 4961 getCenter: function () { 4962 if ( this._map ) 4963 return ui( this._defaultShape(), this._map.options.crs ); 4964 throw new Error( 'Must add layer to map before using getCenter()' ); 4965 }, 4966 _convertLatLngs: function ( t ) { 4967 var t = zi.prototype._convertLatLngs.call( this, t ), 4968 e = t.length; 4969 return ( 4970 2 <= e && 4971 t[ 0 ] instanceof v && 4972 t[ 0 ].equals( t[ e - 1 ] ) && 4973 t.pop(), 4974 t 4975 ); 4976 }, 4977 _setLatLngs: function ( t ) { 4978 zi.prototype._setLatLngs.call( this, t ), 4979 A( this._latlngs ) && ( this._latlngs = [ this._latlngs ] ); 4980 }, 4981 _defaultShape: function () { 4982 return ( 4983 A( this._latlngs[ 0 ] ) ? this._latlngs : this._latlngs[ 0 ] 4984 )[ 0 ]; 4985 }, 4986 _clipPoints: function () { 4987 var t = this._renderer._bounds, 4988 e = this.options.weight, 4989 e = new p( e, e ), 4990 t = new f( t.min.subtract( e ), t.max.add( e ) ); 4991 if ( 4992 ( ( this._parts = [] ), 4993 this._pxBounds && this._pxBounds.intersects( t ) ) 4994 ) 4995 if ( this.options.noClip ) this._parts = this._rings; 4996 else 4997 for ( var i, n = 0, o = this._rings.length; n < o; n++ ) 4998 ( i = li( this._rings[ n ], t, ! 0 ) ).length && 4999 this._parts.push( i ); 5000 }, 5001 _updatePath: function () { 5002 this._renderer._updatePoly( this, ! 0 ); 5003 }, 5004 _containsPoint: function ( t ) { 5005 var e, 5006 i, 5007 n, 5008 o, 5009 s, 5010 r, 5011 a, 5012 h, 5013 l = ! 1; 5014 if ( ! this._pxBounds || ! this._pxBounds.contains( t ) ) 5015 return ! 1; 5016 for ( o = 0, a = this._parts.length; o < a; o++ ) 5017 for ( 5018 s = 0, r = ( h = ( e = this._parts[ o ] ).length ) - 1; 5019 s < h; 5020 r = s++ 5021 ) 5022 ( i = e[ s ] ), 5023 ( n = e[ r ] ), 5024 i.y > t.y != n.y > t.y && 5025 t.x < 5026 ( ( n.x - i.x ) * ( t.y - i.y ) ) / 5027 ( n.y - i.y ) + 5028 i.x && 5029 ( l = ! l ); 5030 return l || zi.prototype._containsPoint.call( this, t, ! 0 ); 5031 }, 5032 } ); 5033 function Si( t, e ) { 5034 return new Zi( t, e ); 5035 } 5036 var Ei = mi.extend( { 5037 initialize: function ( t, e ) { 5038 c( this, e ), ( this._layers = {} ), t && this.addData( t ); 5039 }, 5040 addData: function ( t ) { 5041 var e, 5042 i, 5043 n, 5044 o = d( t ) ? t : t.features; 5045 if ( o ) { 5046 for ( e = 0, i = o.length; e < i; e++ ) 5047 ( ( n = o[ e ] ).geometries || 5048 n.geometry || 5049 n.features || 5050 n.coordinates ) && 5051 this.addData( n ); 5052 return this; 5053 } 5054 var s, 5055 r = this.options; 5056 return ( ! r.filter || r.filter( t ) ) && ( s = ki( t, r ) ) 5057 ? ( ( s.feature = Di( t ) ), 5058 ( s.defaultOptions = s.options ), 5059 this.resetStyle( s ), 5060 r.onEachFeature && r.onEachFeature( t, s ), 5061 this.addLayer( s ) ) 5062 : this; 5063 }, 5064 resetStyle: function ( t ) { 5065 return void 0 === t 5066 ? this.eachLayer( this.resetStyle, this ) 5067 : ( ( t.options = l( {}, t.defaultOptions ) ), 5068 this._setLayerStyle( t, this.options.style ), 5069 this ); 5070 }, 5071 setStyle: function ( e ) { 5072 return this.eachLayer( function ( t ) { 5073 this._setLayerStyle( t, e ); 5074 }, this ); 5075 }, 5076 _setLayerStyle: function ( t, e ) { 5077 t.setStyle && 5078 ( 'function' == typeof e && ( e = e( t.feature ) ), 5079 t.setStyle( e ) ); 5080 }, 5081 } ); 5082 function ki( t, e ) { 5083 var i, 5084 n, 5085 o, 5086 s, 5087 r = 'Feature' === t.type ? t.geometry : t, 5088 a = r ? r.coordinates : null, 5089 h = [], 5090 l = e && e.pointToLayer, 5091 u = ( e && e.coordsToLatLng ) || Bi; 5092 if ( ! a && ! r ) return null; 5093 switch ( r.type ) { 5094 case 'Point': 5095 return Oi( l, t, ( i = u( a ) ), e ); 5096 case 'MultiPoint': 5097 for ( o = 0, s = a.length; o < s; o++ ) 5098 ( i = u( a[ o ] ) ), h.push( Oi( l, t, i, e ) ); 5099 return new mi( h ); 5100 case 'LineString': 5101 case 'MultiLineString': 5102 return ( 5103 ( n = Ai( a, 'LineString' === r.type ? 0 : 1, u ) ), 5104 new zi( n, e ) 5105 ); 5106 case 'Polygon': 5107 case 'MultiPolygon': 5108 return ( 5109 ( n = Ai( a, 'Polygon' === r.type ? 1 : 2, u ) ), 5110 new Zi( n, e ) 5111 ); 5112 case 'GeometryCollection': 5113 for ( o = 0, s = r.geometries.length; o < s; o++ ) { 5114 var c = ki( 5115 { 5116 geometry: r.geometries[ o ], 5117 type: 'Feature', 5118 properties: t.properties, 5119 }, 5120 e 5121 ); 5122 c && h.push( c ); 5123 } 5124 return new mi( h ); 5125 case 'FeatureCollection': 5126 for ( o = 0, s = r.features.length; o < s; o++ ) { 5127 var d = ki( r.features[ o ], e ); 5128 d && h.push( d ); 5129 } 5130 return new mi( h ); 5131 default: 5132 throw new Error( 'Invalid GeoJSON object.' ); 5133 } 5134 } 5135 function Oi( t, e, i, n ) { 5136 return t ? t( e, i ) : new xi( i, n && n.markersInheritOptions && n ); 5137 } 5138 function Bi( t ) { 5139 return new v( t[ 1 ], t[ 0 ], t[ 2 ] ); 5140 } 5141 function Ai( t, e, i ) { 5142 for ( var n, o = [], s = 0, r = t.length; s < r; s++ ) 5143 ( n = e ? Ai( t[ s ], e - 1, i ) : ( i || Bi )( t[ s ] ) ), 5144 o.push( n ); 5145 return o; 5146 } 5147 function Ii( t, e ) { 5148 return void 0 !== ( t = w( t ) ).alt 5149 ? [ i( t.lng, e ), i( t.lat, e ), i( t.alt, e ) ] 5150 : [ i( t.lng, e ), i( t.lat, e ) ]; 5151 } 5152 function Ri( t, e, i, n ) { 5153 for ( var o = [], s = 0, r = t.length; s < r; s++ ) 5154 o.push( 5155 e 5156 ? Ri( t[ s ], A( t[ s ] ) ? 0 : e - 1, i, n ) 5157 : Ii( t[ s ], n ) 5158 ); 5159 return ! e && i && o.push( o[ 0 ] ), o; 5160 } 5161 function Ni( t, e ) { 5162 return t.feature ? l( {}, t.feature, { geometry: e } ) : Di( e ); 5163 } 5164 function Di( t ) { 5165 return 'Feature' === t.type || 'FeatureCollection' === t.type 5166 ? t 5167 : { type: 'Feature', properties: {}, geometry: t }; 5168 } 5169 Tt = { 5170 toGeoJSON: function ( t ) { 5171 return Ni( this, { 5172 type: 'Point', 5173 coordinates: Ii( this.getLatLng(), t ), 5174 } ); 5175 }, 5176 }; 5177 function ji( t, e ) { 5178 return new Ei( t, e ); 5179 } 5180 xi.include( Tt ), 5181 Ti.include( Tt ), 5182 Pi.include( Tt ), 5183 zi.include( { 5184 toGeoJSON: function ( t ) { 5185 var e = ! A( this._latlngs ); 5186 return Ni( this, { 5187 type: ( e ? 'Multi' : '' ) + 'LineString', 5188 coordinates: Ri( this._latlngs, e ? 1 : 0, ! 1, t ), 5189 } ); 5190 }, 5191 } ), 5192 Zi.include( { 5193 toGeoJSON: function ( t ) { 5194 var e = ! A( this._latlngs ), 5195 i = e && ! A( this._latlngs[ 0 ] ), 5196 t = Ri( this._latlngs, i ? 2 : e ? 1 : 0, ! 0, t ); 5197 return Ni( this, { 5198 type: ( i ? 'Multi' : '' ) + 'Polygon', 5199 coordinates: ( t = e ? t : [ t ] ), 5200 } ); 5201 }, 5202 } ), 5203 pi.include( { 5204 toMultiPoint: function ( e ) { 5205 var i = []; 5206 return ( 5207 this.eachLayer( function ( t ) { 5208 i.push( t.toGeoJSON( e ).geometry.coordinates ); 5209 } ), 5210 Ni( this, { type: 'MultiPoint', coordinates: i } ) 5211 ); 5212 }, 5213 toGeoJSON: function ( e ) { 5214 var i, 5215 n, 5216 t = 5217 this.feature && 5218 this.feature.geometry && 5219 this.feature.geometry.type; 5220 return 'MultiPoint' === t 5221 ? this.toMultiPoint( e ) 5222 : ( ( i = 'GeometryCollection' === t ), 5223 ( n = [] ), 5224 this.eachLayer( function ( t ) { 5225 t.toGeoJSON && 5226 ( ( t = t.toGeoJSON( e ) ), 5227 i 5228 ? n.push( t.geometry ) 5229 : 'FeatureCollection' === 5230 ( t = Di( t ) ).type 5231 ? n.push.apply( n, t.features ) 5232 : n.push( t ) ); 5233 } ), 5234 i 5235 ? Ni( this, { 5236 geometries: n, 5237 type: 'GeometryCollection', 5238 } ) 5239 : { type: 'FeatureCollection', features: n } ); 5240 }, 5241 } ); 5242 function Hi( t, e, i ) { 5243 return new Fi( t, e, i ); 5244 } 5245 var Mt = ji, 5246 Fi = y.extend( { 5247 options: { 5248 opacity: 1, 5249 alt: '', 5250 interactive: ! 1, 5251 crossOrigin: ! 1, 5252 errorOverlayUrl: '', 5253 zIndex: 1, 5254 className: '', 5255 }, 5256 initialize: function ( t, e, i ) { 5257 ( this._url = t ), ( this._bounds = g( e ) ), c( this, i ); 5258 }, 5259 onAdd: function () { 5260 this._image || 5261 ( this._initImage(), 5262 this.options.opacity < 1 && this._updateOpacity() ), 5263 this.options.interactive && 5264 ( M( this._image, 'leaflet-interactive' ), 5265 this.addInteractiveTarget( this._image ) ), 5266 this.getPane().appendChild( this._image ), 5267 this._reset(); 5268 }, 5269 onRemove: function () { 5270 T( this._image ), 5271 this.options.interactive && 5272 this.removeInteractiveTarget( this._image ); 5273 }, 5274 setOpacity: function ( t ) { 5275 return ( 5276 ( this.options.opacity = t ), 5277 this._image && this._updateOpacity(), 5278 this 5279 ); 5280 }, 5281 setStyle: function ( t ) { 5282 return t.opacity && this.setOpacity( t.opacity ), this; 5283 }, 5284 bringToFront: function () { 5285 return this._map && ge( this._image ), this; 5286 }, 5287 bringToBack: function () { 5288 return this._map && ve( this._image ), this; 5289 }, 5290 setUrl: function ( t ) { 5291 return ( 5292 ( this._url = t ), 5293 this._image && ( this._image.src = t ), 5294 this 5295 ); 5296 }, 5297 setBounds: function ( t ) { 5298 return ( 5299 ( this._bounds = g( t ) ), this._map && this._reset(), this 5300 ); 5301 }, 5302 getEvents: function () { 5303 var t = { zoom: this._reset, viewreset: this._reset }; 5304 return ( 5305 this._zoomAnimated && ( t.zoomanim = this._animateZoom ), t 5306 ); 5307 }, 5308 setZIndex: function ( t ) { 5309 return ( this.options.zIndex = t ), this._updateZIndex(), this; 5310 }, 5311 getBounds: function () { 5312 return this._bounds; 5313 }, 5314 getElement: function () { 5315 return this._image; 5316 }, 5317 _initImage: function () { 5318 var t = 'IMG' === this._url.tagName, 5319 e = ( this._image = t ? this._url : P( 'img' ) ); 5320 M( e, 'leaflet-image-layer' ), 5321 this._zoomAnimated && M( e, 'leaflet-zoom-animated' ), 5322 this.options.className && M( e, this.options.className ), 5323 ( e.onselectstart = u ), 5324 ( e.onmousemove = u ), 5325 ( e.onload = a( this.fire, this, 'load' ) ), 5326 ( e.onerror = a( this._overlayOnError, this, 'error' ) ), 5327 ( ! this.options.crossOrigin && 5328 '' !== this.options.crossOrigin ) || 5329 ( e.crossOrigin = 5330 ! 0 === this.options.crossOrigin 5331 ? '' 5332 : this.options.crossOrigin ), 5333 this.options.zIndex && this._updateZIndex(), 5334 t 5335 ? ( this._url = e.src ) 5336 : ( ( e.src = this._url ), 5337 ( e.alt = this.options.alt ) ); 5338 }, 5339 _animateZoom: function ( t ) { 5340 var e = this._map.getZoomScale( t.zoom ), 5341 t = this._map._latLngBoundsToNewLayerBounds( 5342 this._bounds, 5343 t.zoom, 5344 t.center 5345 ).min; 5346 Pe( this._image, t, e ); 5347 }, 5348 _reset: function () { 5349 var t = this._image, 5350 e = new f( 5351 this._map.latLngToLayerPoint( 5352 this._bounds.getNorthWest() 5353 ), 5354 this._map.latLngToLayerPoint( 5355 this._bounds.getSouthEast() 5356 ) 5357 ), 5358 i = e.getSize(); 5359 Z( t, e.min ), 5360 ( t.style.width = i.x + 'px' ), 5361 ( t.style.height = i.y + 'px' ); 5362 }, 5363 _updateOpacity: function () { 5364 C( this._image, this.options.opacity ); 5365 }, 5366 _updateZIndex: function () { 5367 this._image && 5368 void 0 !== this.options.zIndex && 5369 null !== this.options.zIndex && 5370 ( this._image.style.zIndex = this.options.zIndex ); 5371 }, 5372 _overlayOnError: function () { 5373 this.fire( 'error' ); 5374 var t = this.options.errorOverlayUrl; 5375 t && 5376 this._url !== t && 5377 ( ( this._url = t ), ( this._image.src = t ) ); 5378 }, 5379 getCenter: function () { 5380 return this._bounds.getCenter(); 5381 }, 5382 } ), 5383 Wi = Fi.extend( { 5384 options: { 5385 autoplay: ! 0, 5386 loop: ! 0, 5387 keepAspectRatio: ! 0, 5388 muted: ! 1,
5389 playsInline: ! 0, 5390 }, 5391 _initImage: function () { 5392 var t = 'VIDEO' === this._url.tagName, 5393 e = ( this._image = t ? this._url : P( 'video' ) ); 5394 if ( 5395 ( M( e, 'leaflet-image-layer' ), 5396 this._zoomAnimated && M( e, 'leaflet-zoom-animated' ), 5397 this.options.className && M( e, this.options.className ), 5398 ( e.onselectstart = u ), 5399 ( e.onmousemove = u ), 5400 ( e.onloadeddata = a( this.fire, this, 'load' ) ), 5401 t ) 5402 ) { 5403 for ( 5404 var i = e.getElementsByTagName( 'source' ), 5405 n = [], 5406 o = 0; 5407 o < i.length; 5408 o++ 5409 ) 5410 n.push( i[ o ].src ); 5411 this._url = 0 < i.length ? n : [ e.src ]; 5412 } else { 5413 d( this._url ) || ( this._url = [ this._url ] ), 5414 ! this.options.keepAspectRatio && 5415 Object.prototype.hasOwnProperty.call( 5416 e.style, 5417 'objectFit' 5418 ) && 5419 ( e.style.objectFit = 'fill' ), 5420 ( e.autoplay = !! this.options.autoplay ), 5421 ( e.loop = !! this.options.loop ), 5422 ( e.muted = !! this.options.muted ), 5423 ( e.playsInline = !! this.options.playsInline ); 5424 for ( var s = 0; s < this._url.length; s++ ) { 5425 var r = P( 'source' ); 5426 ( r.src = this._url[ s ] ), e.appendChild( r ); 5427 } 5428 } 5429 }, 5430 } ); 5431 function Ui( t, e, i ) { 5432 return new Wi( t, e, i ); 5433 } 5434 var Vi = Fi.extend( { 5435 _initImage: function () { 5436 var t = ( this._image = this._url ); 5437 M( t, 'leaflet-image-layer' ), 5438 this._zoomAnimated && M( t, 'leaflet-zoom-animated' ), 5439 this.options.className && M( t, this.options.className ), 5440 ( t.onselectstart = u ), 5441 ( t.onmousemove = u ); 5442 }, 5443 } ); 5444 function Gi( t, e, i ) { 5445 return new Vi( t, e, i ); 5446 } 5447 function qi( t, e ) { 5448 return new Yi( t, e ); 5449 } 5450 function Ki( t, e ) { 5451 return new Ji( t, e ); 5452 } 5453 var I = y.extend( { 5454 options: { 5455 interactive: ! 1, 5456 offset: [ 0, 0 ], 5457 className: '', 5458 pane: void 0, 5459 content: '', 5460 }, 5461 initialize: function ( t, e ) { 5462 t && ( t instanceof L.LatLng || d( t ) ) 5463 ? ( ( this._latlng = w( t ) ), c( this, e ) ) 5464 : ( c( this, t ), ( this._source = e ) ), 5465 this.options.content && 5466 ( this._content = this.options.content ); 5467 }, 5468 openOn: function ( t ) { 5469 return ( 5470 ( t = arguments.length ? t : this._source._map ).hasLayer( 5471 this 5472 ) || t.addLayer( this ), 5473 this 5474 ); 5475 }, 5476 close: function () { 5477 return this._map && this._map.removeLayer( this ), this; 5478 }, 5479 toggle: function ( t ) { 5480 return ( 5481 this._map 5482 ? this.close() 5483 : ( arguments.length 5484 ? ( this._source = t ) 5485 : ( t = this._source ), 5486 this._prepareOpen(), 5487 this.openOn( t._map ) ), 5488 this 5489 ); 5490 }, 5491 onAdd: function ( t ) { 5492 ( this._zoomAnimated = t._zoomAnimated ), 5493 this._container || this._initLayout(), 5494 t._fadeAnimated && C( this._container, 0 ), 5495 clearTimeout( this._removeTimeout ), 5496 this.getPane().appendChild( this._container ), 5497 this.update(), 5498 t._fadeAnimated && C( this._container, 1 ), 5499 this.bringToFront(), 5500 this.options.interactive && 5501 ( M( this._container, 'leaflet-interactive' ), 5502 this.addInteractiveTarget( this._container ) ); 5503 }, 5504 onRemove: function ( t ) { 5505 t._fadeAnimated 5506 ? ( C( this._container, 0 ), 5507 ( this._removeTimeout = setTimeout( 5508 a( T, void 0, this._container ), 5509 200 5510 ) ) ) 5511 : T( this._container ), 5512 this.options.interactive && 5513 ( z( this._container, 'leaflet-interactive' ), 5514 this.removeInteractiveTarget( this._container ) ); 5515 }, 5516 getLatLng: function () { 5517 return this._latlng; 5518 }, 5519 setLatLng: function ( t ) { 5520 return ( 5521 ( this._latlng = w( t ) ), 5522 this._map && ( this._updatePosition(), this._adjustPan() ), 5523 this 5524 ); 5525 }, 5526 getContent: function () { 5527 return this._content; 5528 }, 5529 setContent: function ( t ) { 5530 return ( this._content = t ), this.update(), this; 5531 }, 5532 getElement: function () { 5533 return this._container; 5534 }, 5535 update: function () { 5536 this._map && 5537 ( ( this._container.style.visibility = 'hidden' ), 5538 this._updateContent(), 5539 this._updateLayout(), 5540 this._updatePosition(), 5541 ( this._container.style.visibility = '' ), 5542 this._adjustPan() ); 5543 }, 5544 getEvents: function () { 5545 var t = { 5546 zoom: this._updatePosition, 5547 viewreset: this._updatePosition, 5548 }; 5549 return ( 5550 this._zoomAnimated && ( t.zoomanim = this._animateZoom ), t 5551 ); 5552 }, 5553 isOpen: function () { 5554 return !! this._map && this._map.hasLayer( this ); 5555 }, 5556 bringToFront: function () { 5557 return this._map && ge( this._container ), this; 5558 }, 5559 bringToBack: function () { 5560 return this._map && ve( this._container ), this; 5561 }, 5562 _prepareOpen: function ( t ) { 5563 if ( ! ( i = this._source )._map ) return ! 1; 5564 if ( i instanceof mi ) { 5565 var e, 5566 i = null, 5567 n = this._source._layers; 5568 for ( e in n ) 5569 if ( n[ e ]._map ) { 5570 i = n[ e ]; 5571 break; 5572 } 5573 if ( ! i ) return ! 1; 5574 this._source = i; 5575 } 5576 if ( ! t ) 5577 if ( i.getCenter ) t = i.getCenter(); 5578 else if ( i.getLatLng ) t = i.getLatLng(); 5579 else { 5580 if ( ! i.getBounds ) 5581 throw new Error( 5582 'Unable to get source layer LatLng.' 5583 ); 5584 t = i.getBounds().getCenter(); 5585 } 5586 return this.setLatLng( t ), this._map && this.update(), ! 0; 5587 }, 5588 _updateContent: function () { 5589 if ( this._content ) { 5590 var t = this._contentNode, 5591 e = 5592 'function' == typeof this._content 5593 ? this._content( this._source || this ) 5594 : this._content; 5595 if ( 'string' == typeof e ) t.innerHTML = e; 5596 else { 5597 for ( ; t.hasChildNodes(); ) 5598 t.removeChild( t.firstChild ); 5599 t.appendChild( e ); 5600 } 5601 this.fire( 'contentupdate' ); 5602 } 5603 }, 5604 _updatePosition: function () { 5605 var t, e, i; 5606 this._map && 5607 ( ( e = this._map.latLngToLayerPoint( this._latlng ) ), 5608 ( t = m( this.options.offset ) ), 5609 ( i = this._getAnchor() ), 5610 this._zoomAnimated 5611 ? Z( this._container, e.add( i ) ) 5612 : ( t = t.add( e ).add( i ) ), 5613 ( e = this._containerBottom = -t.y ), 5614 ( i = this._containerLeft = 5615 -Math.round( this._containerWidth / 2 ) + t.x ), 5616 ( this._container.style.bottom = e + 'px' ), 5617 ( this._container.style.left = i + 'px' ) ); 5618 }, 5619 _getAnchor: function () { 5620 return [ 0, 0 ]; 5621 }, 5622 } ), 5623 Yi = 5624 ( O.include( { 5625 _initOverlay: function ( t, e, i, n ) { 5626 var o = e; 5627 return ( 5628 o instanceof t || ( o = new t( n ).setContent( e ) ), 5629 i && o.setLatLng( i ), 5630 o 5631 ); 5632 }, 5633 } ), 5634 y.include( { 5635 _initOverlay: function ( t, e, i, n ) { 5636 var o = i; 5637 return ( 5638 o instanceof t 5639 ? ( c( o, n ), ( o._source = this ) ) 5640 : ( o = 5641 e && ! n 5642 ? e 5643 : new t( n, this ) ).setContent( i ), 5644 o 5645 ); 5646 }, 5647 } ), 5648 I.extend( { 5649 options: { 5650 pane: 'popupPane', 5651 offset: [ 0, 7 ], 5652 maxWidth: 300, 5653 minWidth: 50, 5654 maxHeight: null, 5655 autoPan: ! 0, 5656 autoPanPaddingTopLeft: null, 5657 autoPanPaddingBottomRight: null, 5658 autoPanPadding: [ 5, 5 ], 5659 keepInView: ! 1, 5660 closeButton: ! 0, 5661 autoClose: ! 0, 5662 closeOnEscapeKey: ! 0, 5663 className: '', 5664 }, 5665 openOn: function ( t ) { 5666 return ( 5667 ! ( t = arguments.length 5668 ? t 5669 : this._source._map ).hasLayer( this ) && 5670 t._popup && 5671 t._popup.options.autoClose && 5672 t.removeLayer( t._popup ), 5673 ( t._popup = this ), 5674 I.prototype.openOn.call( this, t ) 5675 ); 5676 }, 5677 onAdd: function ( t ) { 5678 I.prototype.onAdd.call( this, t ), 5679 t.fire( 'popupopen', { popup: this } ), 5680 this._source && 5681 ( this._source.fire( 5682 'popupopen', 5683 { popup: this }, 5684 ! 0 5685 ), 5686 this._source instanceof bi || 5687 this._source.on( 'preclick', Ie ) ); 5688 }, 5689 onRemove: function ( t ) { 5690 I.prototype.onRemove.call( this, t ), 5691 t.fire( 'popupclose', { popup: this } ), 5692 this._source && 5693 ( this._source.fire( 5694 'popupclose', 5695 { popup: this }, 5696 ! 0 5697 ), 5698 this._source instanceof bi || 5699 this._source.off( 'preclick', Ie ) ); 5700 }, 5701 getEvents: function () { 5702 var t = I.prototype.getEvents.call( this ); 5703 return ( 5704 ( void 0 !== this.options.closeOnClick 5705 ? this.options.closeOnClick 5706 : this._map.options.closePopupOnClick ) && 5707 ( t.preclick = this.close ), 5708 this.options.keepInView && 5709 ( t.moveend = this._adjustPan ), 5710 t 5711 ); 5712 }, 5713 _initLayout: function () { 5714 var t = 'leaflet-popup', 5715 e = ( this._container = P( 5716 'div', 5717 t + 5718 ' ' + 5719 ( this.options.className || '' ) + 5720 ' leaflet-zoom-animated' 5721 ) ), 5722 i = ( this._wrapper = P( 5723 'div', 5724 t + '-content-wrapper', 5725 e 5726 ) ); 5727 ( this._contentNode = P( 'div', t + '-content', i ) ), 5728 Ne( e ),
5729 Re( this._contentNode ), 5730 S( e, 'contextmenu', Ie ), 5731 ( this._tipContainer = P( 5732 'div', 5733 t + '-tip-container', 5734 e 5735 ) ), 5736 ( this._tip = P( 5737 'div', 5738 t + '-tip', 5739 this._tipContainer 5740 ) ), 5741 this.options.closeButton && 5742 ( ( i = this._closeButton = 5743 P( 'a', t + '-close-button', e ) ).setAttribute( 5744 'role', 5745 'button' 5746 ), 5747 i.setAttribute( 'aria-label', 'Close popup' ), 5748 ( i.href = '#close' ), 5749 ( i.innerHTML = 5750 '<span aria-hidden="true">×</span>' ), 5751 S( 5752 i, 5753 'click', 5754 function ( t ) { 5755 k( t ), this.close(); 5756 }, 5757 this 5758 ) ); 5759 }, 5760 _updateLayout: function () { 5761 var t = this._contentNode, 5762 e = t.style, 5763 i = 5764 ( ( e.width = '' ), 5765 ( e.whiteSpace = 'nowrap' ), 5766 t.offsetWidth ), 5767 i = Math.min( i, this.options.maxWidth ), 5768 i = 5769 ( ( i = Math.max( i, this.options.minWidth ) ), 5770 ( e.width = i + 1 + 'px' ), 5771 ( e.whiteSpace = '' ), 5772 ( e.height = '' ), 5773 t.offsetHeight ), 5774 n = this.options.maxHeight, 5775 o = 'leaflet-popup-scrolled'; 5776 ( n && n < i ? ( ( e.height = n + 'px' ), M ) : z )( t, o ), 5777 ( this._containerWidth = this._container.offsetWidth ); 5778 }, 5779 _animateZoom: function ( t ) { 5780 var t = this._map._latLngToNewLayerPoint( 5781 this._latlng, 5782 t.zoom, 5783 t.center 5784 ), 5785 e = this._getAnchor(); 5786 Z( this._container, t.add( e ) ); 5787 }, 5788 _adjustPan: function ( t ) { 5789 var e, i, n, o, s, r, a, h; 5790 this.options.autoPan && 5791 ( this._map._panAnim && this._map._panAnim.stop(), 5792 ( e = this._map ), 5793 ( i = 5794 parseInt( 5795 me( this._container, 'marginBottom' ), 5796 10 5797 ) || 0 ), 5798 ( i = this._container.offsetHeight + i ), 5799 ( h = this._containerWidth ), 5800 ( n = new p( 5801 this._containerLeft, 5802 -i - this._containerBottom 5803 ) )._add( Le( this._container ) ), 5804 ( n = e.layerPointToContainerPoint( n ) ), 5805 ( s = m( this.options.autoPanPadding ) ), 5806 ( o = m( this.options.autoPanPaddingTopLeft || s ) ), 5807 ( s = m( 5808 this.options.autoPanPaddingBottomRight || s 5809 ) ), 5810 ( r = e.getSize() ), 5811 ( a = 0 ), 5812 n.x + h + s.x > r.x && ( a = n.x + h - r.x + s.x ), 5813 n.x - a - o.x < ( h = 0 ) && ( a = n.x - o.x ), 5814 n.y + i + s.y > r.y && ( h = n.y + i - r.y + s.y ), 5815 n.y - h - o.y < 0 && ( h = n.y - o.y ), 5816 ( a || h ) && 5817 e.fire( 'autopanstart' ).panBy( [ a, h ], { 5818 animate: t && 'moveend' === t.type, 5819 } ) ); 5820 }, 5821 _getAnchor: function () { 5822 return m( 5823 this._source && this._source._getPopupAnchor 5824 ? this._source._getPopupAnchor() 5825 : [ 0, 0 ] 5826 ); 5827 }, 5828 } ) ), 5829 Ji = 5830 ( O.mergeOptions( { closePopupOnClick: ! 0 } ), 5831 O.include( { 5832 openPopup: function ( t, e, i ) { 5833 return ( 5834 this._initOverlay( Yi, t, e, i ).openOn( this ), this 5835 ); 5836 }, 5837 closePopup: function ( t ) { 5838 return ( 5839 ( t = arguments.length ? t : this._popup ) && t.close(), 5840 this 5841 ); 5842 }, 5843 } ), 5844 y.include( { 5845 bindPopup: function ( t, e ) { 5846 return ( 5847 ( this._popup = this._initOverlay( 5848 Yi, 5849 this._popup, 5850 t, 5851 e 5852 ) ), 5853 this._popupHandlersAdded || 5854 ( this.on( { 5855 click: this._openPopup, 5856 keypress: this._onKeyPress, 5857 remove: this.closePopup,
5858 move: this._movePopup, 5859 } ), 5860 ( this._popupHandlersAdded = ! 0 ) ), 5861 this 5862 ); 5863 }, 5864 unbindPopup: function () { 5865 return ( 5866 this._popup && 5867 ( this.off( { 5868 click: this._openPopup, 5869 keypress: this._onKeyPress, 5870 remove: this.closePopup, 5871 move: this._movePopup, 5872 } ), 5873 ( this._popupHandlersAdded = ! 1 ), 5874 ( this._popup = null ) ), 5875 this 5876 ); 5877 }, 5878 openPopup: function ( t ) { 5879 return ( 5880 this._popup && 5881 this._popup._prepareOpen( t ) && 5882 this._popup.openOn( this._map ), 5883 this 5884 ); 5885 }, 5886 closePopup: function () { 5887 return this._popup && this._popup.close(), this; 5888 }, 5889 togglePopup: function () { 5890 return this._popup && this._popup.toggle( this ), this; 5891 }, 5892 isPopupOpen: function () { 5893 return !! this._popup && this._popup.isOpen(); 5894 }, 5895 setPopupContent: function ( t ) { 5896 return this._popup && this._popup.setContent( t ), this; 5897 }, 5898 getPopup: function () { 5899 return this._popup; 5900 }, 5901 _openPopup: function ( t ) { 5902 var e; 5903 this._popup && 5904 this._map && 5905 ( De( t ), 5906 ( e = t.layer || t.target ), 5907 this._popup._source !== e || e instanceof bi 5908 ? ( ( this._popup._source = e ), 5909 this.openPopup( t.latlng ) ) 5910 : this._map.hasLayer( this._popup ) 5911 ? this.closePopup() 5912 : this.openPopup( t.latlng ) ); 5913 }, 5914 _movePopup: function ( t ) { 5915 this._popup.setLatLng( t.latlng ); 5916 }, 5917 _onKeyPress: function ( t ) { 5918 13 === t.originalEvent.keyCode && this._openPopup( t ); 5919 }, 5920 } ), 5921 I.extend( { 5922 options: { 5923 pane: 'tooltipPane', 5924 offset: [ 0, 0 ], 5925 direction: 'auto', 5926 permanent: ! 1, 5927 sticky: ! 1, 5928 opacity: 0.9, 5929 }, 5930 onAdd: function ( t ) { 5931 I.prototype.onAdd.call( this, t ), 5932 this.setOpacity( this.options.opacity ), 5933 t.fire( 'tooltipopen', { tooltip: this } ), 5934 this._source && 5935 ( this.addEventParent( this._source ), 5936 this._source.fire( 5937 'tooltipopen', 5938 { tooltip: this }, 5939 ! 0 5940 ) ); 5941 }, 5942 onRemove: function ( t ) { 5943 I.prototype.onRemove.call( this, t ), 5944 t.fire( 'tooltipclose', { tooltip: this } ), 5945 this._source && 5946 ( this.removeEventParent( this._source ), 5947 this._source.fire( 5948 'tooltipclose', 5949 { tooltip: this }, 5950 ! 0 5951 ) ); 5952 }, 5953 getEvents: function () { 5954 var t = I.prototype.getEvents.call( this ); 5955 return ( 5956 this.options.permanent || ( t.preclick = this.close ), t 5957 ); 5958 }, 5959 _initLayout: function () { 5960 var t = 5961 'leaflet-tooltip ' + 5962 ( this.options.className || '' ) + 5963 ' leaflet-zoom-' + 5964 ( this._zoomAnimated ? 'animated' : 'hide' ); 5965 ( this._contentNode = this._container = P( 'div', t ) ), 5966 this._container.setAttribute( 'role', 'tooltip' ), 5967 this._container.setAttribute( 5968 'id', 5969 'leaflet-tooltip-' + h( this ) 5970 ); 5971 }, 5972 _updateLayout: function () {}, 5973 _adjustPan: function () {}, 5974 _setPosition: function ( t ) { 5975 var e, 5976 i = this._map, 5977 n = this._container, 5978 o = i.latLngToContainerPoint( i.getCenter() ), 5979 i = i.layerPointToContainerPoint( t ), 5980 s = this.options.direction, 5981 r = n.offsetWidth, 5982 a = n.offsetHeight, 5983 h = m( this.options.offset ), 5984 l = this._getAnchor(), 5985 i = 5986 'top' === s 5987 ? ( ( e = r / 2 ), a ) 5988 : 'bottom' === s 5989 ? ( ( e = r / 2 ), 0 ) 5990 : ( ( e = 5991 'center' === s 5992 ? r / 2 5993 : 'right' === s 5994 ? 0 5995 : 'left' === s 5996 ? r 5997 : i.x < o.x 5998 ? ( ( s = 'right' ), 0 ) 5999 : ( ( s = 'left' ), 6000 r + 2 * ( h.x + l.x ) ) ), 6001 a / 2 ); 6002 ( t = t.subtract( m( e, i, ! 0 ) ).add( h ).add( l ) ), 6003 z( n, 'leaflet-tooltip-right' ), 6004 z( n, 'leaflet-tooltip-left' ), 6005 z( n, 'leaflet-tooltip-top' ), 6006 z( n, 'leaflet-tooltip-bottom' ),
6007 M( n, 'leaflet-tooltip-' + s ), 6008 Z( n, t ); 6009 }, 6010 _updatePosition: function () { 6011 var t = this._map.latLngToLayerPoint( this._latlng ); 6012 this._setPosition( t ); 6013 }, 6014 setOpacity: function ( t ) { 6015 ( this.options.opacity = t ), 6016 this._container && C( this._container, t ); 6017 }, 6018 _animateZoom: function ( t ) { 6019 t = this._map._latLngToNewLayerPoint( 6020 this._latlng, 6021 t.zoom, 6022 t.center 6023 ); 6024 this._setPosition( t ); 6025 }, 6026 _getAnchor: function () { 6027 return m( 6028 this._source && 6029 this._source._getTooltipAnchor && 6030 ! this.options.sticky 6031 ? this._source._getTooltipAnchor() 6032 : [ 0, 0 ] 6033 ); 6034 }, 6035 } ) ), 6036 Xi = 6037 ( O.include( { 6038 openTooltip: function ( t, e, i ) { 6039 return ( 6040 this._initOverlay( Ji, t, e, i ).openOn( this ), this 6041 ); 6042 }, 6043 closeTooltip: function ( t ) { 6044 return t.close(), this; 6045 }, 6046 } ), 6047 y.include( { 6048 bindTooltip: function ( t, e ) { 6049 return ( 6050 this._tooltip && 6051 this.isTooltipOpen() && 6052 this.unbindTooltip(), 6053 ( this._tooltip = this._initOverlay( 6054 Ji, 6055 this._tooltip, 6056 t, 6057 e 6058 ) ), 6059 this._initTooltipInteractions(), 6060 this._tooltip.options.permanent && 6061 this._map && 6062 this._map.hasLayer( this ) && 6063 this.openTooltip(), 6064 this 6065 ); 6066 }, 6067 unbindTooltip: function () { 6068 return ( 6069 this._tooltip && 6070 ( this._initTooltipInteractions( ! 0 ), 6071 this.closeTooltip(), 6072 ( this._tooltip = null ) ), 6073 this 6074 ); 6075 }, 6076 _initTooltipInteractions: function ( t ) { 6077 var e, i; 6078 ( ! t && this._tooltipHandlersAdded ) || 6079 ( ( e = t ? 'off' : 'on' ), 6080 ( i = { 6081 remove: this.closeTooltip, 6082 move: this._moveTooltip, 6083 } ), 6084 this._tooltip.options.permanent 6085 ? ( i.add = this._openTooltip ) 6086 : ( ( i.mouseover = this._openTooltip ), 6087 ( i.mouseout = this.closeTooltip ), 6088 ( i.click = this._openTooltip ), 6089 this._map 6090 ? this._addFocusListeners() 6091 : ( i.add = this._addFocusListeners ) ), 6092 this._tooltip.options.sticky && 6093 ( i.mousemove = this._moveTooltip ), 6094 this[ e ]( i ), 6095 ( this._tooltipHandlersAdded = ! t ) ); 6096 }, 6097 openTooltip: function ( t ) { 6098 return ( 6099 this._tooltip && 6100 this._tooltip._prepareOpen( t ) && 6101 ( this._tooltip.openOn( this._map ), 6102 this.getElement 6103 ? this._setAriaDescribedByOnLayer( this ) 6104 : this.eachLayer && 6105 this.eachLayer( 6106 this._setAriaDescribedByOnLayer, 6107 this 6108 ) ), 6109 this 6110 ); 6111 }, 6112 closeTooltip: function () { 6113 if ( this._tooltip ) return this._tooltip.close(); 6114 }, 6115 toggleTooltip: function () { 6116 return this._tooltip && this._tooltip.toggle( this ), this; 6117 }, 6118 isTooltipOpen: function () { 6119 return this._tooltip.isOpen(); 6120 }, 6121 setTooltipContent: function ( t ) { 6122 return this._tooltip && this._tooltip.setContent( t ), this; 6123 }, 6124 getTooltip: function () { 6125 return this._tooltip; 6126 }, 6127 _addFocusListeners: function () { 6128 this.getElement 6129 ? this._addFocusListenersOnLayer( this ) 6130 : this.eachLayer && 6131 this.eachLayer( 6132 this._addFocusListenersOnLayer, 6133 this 6134 ); 6135 }, 6136 _addFocusListenersOnLayer: function ( t ) { 6137 S( 6138 t.getElement(), 6139 'focus', 6140 function () { 6141 ( this._tooltip._source = t ), this.openTooltip(); 6142 }, 6143 this 6144 ), 6145 S( t.getElement(), 'blur', this.closeTooltip, this ); 6146 }, 6147 _setAriaDescribedByOnLayer: function ( t ) { 6148 t.getElement().setAttribute( 6149 'aria-describedby', 6150 this._tooltip._container.id 6151 ); 6152 }, 6153 _openTooltip: function ( t ) { 6154 ! this._tooltip || 6155 ! this._map || 6156 ( this._map.dragging && this._map.dragging.moving() ) || 6157 ( ( this._tooltip._source = t.layer || t.target ), 6158 this.openTooltip( 6159 this._tooltip.options.sticky ? t.latlng : void 0 6160 ) ); 6161 }, 6162 _moveTooltip: function ( t ) { 6163 var e = t.latlng; 6164 this._tooltip.options.sticky && 6165 t.originalEvent && 6166 ( ( t = this._map.mouseEventToContainerPoint( 6167 t.originalEvent 6168 ) ), 6169 ( t = this._map.containerPointToLayerPoint( t ) ), 6170 ( e = this._map.layerPointToLatLng( t ) ) ), 6171 this._tooltip.setLatLng( e ); 6172 }, 6173 } ), 6174 fi.extend( { 6175 options: { 6176 iconSize: [ 12, 12 ], 6177 html: ! 1, 6178 bgPos: null, 6179 className: 'leaflet-div-icon', 6180 }, 6181 createIcon: function ( t ) { 6182 var t = 6183 t && 'DIV' === t.tagName 6184 ? t 6185 : document.createElement( 'div' ), 6186 e = this.options; 6187 return ( 6188 e.html instanceof Element 6189 ? ( fe( t ), t.appendChild( e.html ) ) 6190 : ( t.innerHTML = ! 1 !== e.html ? e.html : '' ), 6191 e.bgPos && 6192 ( ( e = m( e.bgPos ) ), 6193 ( t.style.backgroundPosition = 6194 -e.x + 'px ' + -e.y + 'px' ) ), 6195 this._setIconStyles( t, 'icon' ), 6196 t 6197 ); 6198 }, 6199 createShadow: function () { 6200 return null; 6201 }, 6202 } ) ); 6203 function $i( t ) { 6204 return new Xi( t ); 6205 } 6206 fi.Default = vi; 6207 var Qi = y.extend( { 6208 options: { 6209 tileSize: 256, 6210 opacity: 1, 6211 updateWhenIdle: b.mobile, 6212 updateWhenZooming: ! 0, 6213 updateInterval: 200, 6214 zIndex: 1, 6215 bounds: null,
6216 minZoom: 0, 6217 maxZoom: void 0, 6218 maxNativeZoom: void 0, 6219 minNativeZoom: void 0, 6220 noWrap: ! 1, 6221 pane: 'tilePane', 6222 className: '', 6223 keepBuffer: 2, 6224 }, 6225 initialize: function ( t ) { 6226 c( this, t ); 6227 }, 6228 onAdd: function () { 6229 this._initContainer(), 6230 ( this._levels = {} ), 6231 ( this._tiles = {} ), 6232 this._resetView(); 6233 }, 6234 beforeAdd: function ( t ) { 6235 t._addZoomLimit( this ); 6236 }, 6237 onRemove: function ( t ) { 6238 this._removeAllTiles(), 6239 T( this._container ), 6240 t._removeZoomLimit( this ), 6241 ( this._container = null ), 6242 ( this._tileZoom = void 0 ); 6243 }, 6244 bringToFront: function () { 6245 return ( 6246 this._map && 6247 ( ge( this._container ), this._setAutoZIndex( Math.max ) ), 6248 this 6249 ); 6250 }, 6251 bringToBack: function () { 6252 return ( 6253 this._map && 6254 ( ve( this._container ), this._setAutoZIndex( Math.min ) ), 6255 this 6256 ); 6257 }, 6258 getContainer: function () { 6259 return this._container; 6260 }, 6261 setOpacity: function ( t ) { 6262 return ( this.options.opacity = t ), this._updateOpacity(), this; 6263 }, 6264 setZIndex: function ( t ) { 6265 return ( this.options.zIndex = t ), this._updateZIndex(), this; 6266 }, 6267 isLoading: function () { 6268 return this._loading; 6269 }, 6270 redraw: function () { 6271 var t; 6272 return ( 6273 this._map && 6274 ( this._removeAllTiles(), 6275 ( t = this._clampZoom( this._map.getZoom() ) ) !== 6276 this._tileZoom && 6277 ( ( this._tileZoom = t ), this._updateLevels() ), 6278 this._update() ), 6279 this 6280 ); 6281 }, 6282 getEvents: function () { 6283 var t = { 6284 viewprereset: this._invalidateAll, 6285 viewreset: this._resetView, 6286 zoom: this._resetView, 6287 moveend: this._onMoveEnd, 6288 }; 6289 return ( 6290 this.options.updateWhenIdle || 6291 ( this._onMove || 6292 ( this._onMove = H( 6293 this._onMoveEnd, 6294 this.options.updateInterval, 6295 this 6296 ) ), 6297 ( t.move = this._onMove ) ), 6298 this._zoomAnimated && ( t.zoomanim = this._animateZoom ), 6299 t 6300 ); 6301 }, 6302 createTile: function () { 6303 return document.createElement( 'div' ); 6304 }, 6305 getTileSize: function () { 6306 var t = this.options.tileSize; 6307 return t instanceof p ? t : new p( t, t ); 6308 }, 6309 _updateZIndex: function () { 6310 this._container && 6311 void 0 !== this.options.zIndex && 6312 null !== this.options.zIndex && 6313 ( this._container.style.zIndex = this.options.zIndex ); 6314 }, 6315 _setAutoZIndex: function ( t ) { 6316 for ( 6317 var e, 6318 i = this.getPane().children, 6319 n = -t( -1 / 0, 1 / 0 ), 6320 o = 0, 6321 s = i.length; 6322 o < s; 6323 o++ 6324 ) 6325 ( e = i[ o ].style.zIndex ), 6326 i[ o ] !== this._container && e && ( n = t( n, +e ) ); 6327 isFinite( n ) && 6328 ( ( this.options.zIndex = n + t( -1, 1 ) ), 6329 this._updateZIndex() ); 6330 }, 6331 _updateOpacity: function () { 6332 if ( this._map && ! b.ielt9 ) { 6333 C( this._container, this.options.opacity ); 6334 var t, 6335 e = +new Date(), 6336 i = ! 1, 6337 n = ! 1; 6338 for ( t in this._tiles ) { 6339 var o, 6340 s = this._tiles[ t ]; 6341 s.current && 6342 s.loaded && 6343 ( ( o = Math.min( 1, ( e - s.loaded ) / 200 ) ), 6344 C( s.el, o ), 6345 o < 1 6346 ? ( i = ! 0 ) 6347 : ( s.active 6348 ? ( n = ! 0 ) 6349 : this._onOpaqueTile( s ), 6350 ( s.active = ! 0 ) ) ); 6351 } 6352 n && ! this._noPrune && this._pruneTiles(), 6353 i && 6354 ( r( this._fadeFrame ), 6355 ( this._fadeFrame = x( this._updateOpacity, this ) ) ); 6356 } 6357 }, 6358 _onOpaqueTile: u, 6359 _initContainer: function () { 6360 this._container || 6361 ( ( this._container = P( 6362 'div', 6363 'leaflet-layer ' + ( this.options.className || '' ) 6364 ) ), 6365 this._updateZIndex(), 6366 this.options.opacity < 1 && this._updateOpacity(), 6367 this.getPane().appendChild( this._container ) ); 6368 }, 6369 _updateLevels: function () { 6370 var t = this._tileZoom, 6371 e = this.options.maxZoom; 6372 if ( void 0 !== t ) { 6373 for ( var i in this._levels ) 6374 ( i = Number( i ) ), 6375 this._levels[ i ].el.children.length || i === t 6376 ? ( ( this._levels[ i ].el.style.zIndex = 6377 e - Math.abs( t - i ) ), 6378 this._onUpdateLevel( i ) ) 6379 : ( T( this._levels[ i ].el ), 6380 this._removeTilesAtZoom( i ), 6381 this._onRemoveLevel( i ), 6382 delete this._levels[ i ] ); 6383 var n = this._levels[ t ], 6384 o = this._map; 6385 return ( 6386 n || 6387 ( ( ( n = this._levels[ t ] = {} ).el = P( 6388 'div', 6389 'leaflet-tile-container leaflet-zoom-animated', 6390 this._container 6391 ) ), 6392 ( n.el.style.zIndex = e ), 6393 ( n.origin = o 6394 .project( o.unproject( o.getPixelOrigin() ), t ) 6395 .round() ), 6396 ( n.zoom = t ), 6397 this._setZoomTransform( n, o.getCenter(), o.getZoom() ), 6398 u( n.el.offsetWidth ), 6399 this._onCreateLevel( n ) ), 6400 ( this._level = n ) 6401 ); 6402 } 6403 }, 6404 _onUpdateLevel: u, 6405 _onRemoveLevel: u, 6406 _onCreateLevel: u, 6407 _pruneTiles: function () { 6408 if ( this._map ) { 6409 var t, 6410 e, 6411 i, 6412 n = this._map.getZoom(); 6413 if ( n > this.options.maxZoom || n < this.options.minZoom ) 6414 this._removeAllTiles(); 6415 else { 6416 for ( t in this._tiles ) 6417 ( i = this._tiles[ t ] ).retain = i.current; 6418 for ( t in this._tiles ) 6419 ( i = this._tiles[ t ] ).current && 6420 ! i.active && 6421 ( ( e = i.coords ), 6422 this._retainParent( e.x, e.y, e.z, e.z - 5 ) || 6423 this._retainChildren( 6424 e.x, 6425 e.y, 6426 e.z, 6427 e.z + 2 6428 ) ); 6429 for ( t in this._tiles ) 6430 this._tiles[ t ].retain || this._removeTile( t ); 6431 } 6432 } 6433 }, 6434 _removeTilesAtZoom: function ( t ) { 6435 for ( var e in this._tiles ) 6436 this._tiles[ e ].coords.z === t && this._removeTile( e ); 6437 }, 6438 _removeAllTiles: function () { 6439 for ( var t in this._tiles ) this._removeTile( t ); 6440 }, 6441 _invalidateAll: function () { 6442 for ( var t in this._levels ) 6443 T( this._levels[ t ].el ), 6444 this._onRemoveLevel( Number( t ) ), 6445 delete this._levels[ t ]; 6446 this._removeAllTiles(), ( this._tileZoom = void 0 ); 6447 }, 6448 _retainParent: function ( t, e, i, n ) { 6449 var t = Math.floor( t / 2 ), 6450 e = Math.floor( e / 2 ),
6451 i = i - 1, 6452 o = new p( +t, +e ), 6453 o = ( ( o.z = i ), this._tileCoordsToKey( o ) ), 6454 o = this._tiles[ o ]; 6455 return o && o.active 6456 ? ( o.retain = ! 0 ) 6457 : ( o && o.loaded && ( o.retain = ! 0 ), 6458 n < i && this._retainParent( t, e, i, n ) ); 6459 }, 6460 _retainChildren: function ( t, e, i, n ) { 6461 for ( var o = 2 * t; o < 2 * t + 2; o++ ) 6462 for ( var s = 2 * e; s < 2 * e + 2; s++ ) { 6463 var r = new p( o, s ), 6464 r = ( ( r.z = i + 1 ), this._tileCoordsToKey( r ) ), 6465 r = this._tiles[ r ]; 6466 r && r.active 6467 ? ( r.retain = ! 0 ) 6468 : ( r && r.loaded && ( r.retain = ! 0 ), 6469 i + 1 < n && this._retainChildren( o, s, i + 1, n ) ); 6470 } 6471 }, 6472 _resetView: function ( t ) { 6473 t = t && ( t.pinch || t.flyTo ); 6474 this._setView( this._map.getCenter(), this._map.getZoom(), t, t ); 6475 }, 6476 _animateZoom: function ( t ) { 6477 this._setView( t.center, t.zoom, ! 0, t.noUpdate ); 6478 }, 6479 _clampZoom: function ( t ) { 6480 var e = this.options; 6481 return void 0 !== e.minNativeZoom && t < e.minNativeZoom 6482 ? e.minNativeZoom 6483 : void 0 !== e.maxNativeZoom && e.maxNativeZoom < t 6484 ? e.maxNativeZoom 6485 : t; 6486 }, 6487 _setView: function ( t, e, i, n ) { 6488 var o = Math.round( e ), 6489 o = 6490 ( void 0 !== this.options.maxZoom && 6491 o > this.options.maxZoom ) || 6492 ( void 0 !== this.options.minZoom && 6493 o < this.options.minZoom ) 6494 ? void 0 6495 : this._clampZoom( o ), 6496 s = this.options.updateWhenZooming && o !== this._tileZoom; 6497 ( n && ! s ) || 6498 ( ( this._tileZoom = o ), 6499 this._abortLoading && this._abortLoading(), 6500 this._updateLevels(), 6501 this._resetGrid(), 6502 void 0 !== o && this._update( t ), 6503 i || this._pruneTiles(), 6504 ( this._noPrune = !! i ) ), 6505 this._setZoomTransforms( t, e ); 6506 }, 6507 _setZoomTransforms: function ( t, e ) { 6508 for ( var i in this._levels ) 6509 this._setZoomTransform( this._levels[ i ], t, e ); 6510 }, 6511 _setZoomTransform: function ( t, e, i ) { 6512 var n = this._map.getZoomScale( i, t.zoom ), 6513 e = t.origin 6514 .multiplyBy( n ) 6515 .subtract( this._map._getNewPixelOrigin( e, i ) ) 6516 .round(); 6517 b.any3d ? Pe( t.el, e, n ) : Z( t.el, e ); 6518 }, 6519 _resetGrid: function () { 6520 var t = this._map, 6521 e = t.options.crs, 6522 i = ( this._tileSize = this.getTileSize() ), 6523 n = this._tileZoom, 6524 o = this._map.getPixelWorldBounds( this._tileZoom ); 6525 o && ( this._globalTileRange = this._pxBoundsToTileRange( o ) ), 6526 ( this._wrapX = e.wrapLng && 6527 ! this.options.noWrap && [ 6528 Math.floor( 6529 t.project( [ 0, e.wrapLng[ 0 ] ], n ).x / i.x 6530 ), 6531 Math.ceil( 6532 t.project( [ 0, e.wrapLng[ 1 ] ], n ).x / i.y 6533 ), 6534 ] ), 6535 ( this._wrapY = e.wrapLat && 6536 ! this.options.noWrap && [ 6537 Math.floor( 6538 t.project( [ e.wrapLat[ 0 ], 0 ], n ).y / i.x 6539 ), 6540 Math.ceil( 6541 t.project( [ e.wrapLat[ 1 ], 0 ], n ).y / i.y 6542 ), 6543 ] ); 6544 }, 6545 _onMoveEnd: function () { 6546 this._map && ! this._map._animatingZoom && this._update(); 6547 }, 6548 _getTiledPixelBounds: function ( t ) { 6549 var e = this._map, 6550 i = e._animatingZoom 6551 ? Math.max( e._animateToZoom, e.getZoom() ) 6552 : e.getZoom(), 6553 i = e.getZoomScale( i, this._tileZoom ), 6554 t = e.project( t, this._tileZoom ).floor(), 6555 e = e.getSize().divideBy( 2 * i ); 6556 return new f( t.subtract( e ), t.add( e ) ); 6557 }, 6558 _update: function ( t ) { 6559 var e = this._map; 6560 if ( e ) { 6561 var i = this._clampZoom( e.getZoom() ); 6562 if ( 6563 ( void 0 === t && ( t = e.getCenter() ), 6564 void 0 !== this._tileZoom ) 6565 ) { 6566 var n, 6567 e = this._getTiledPixelBounds( t ), 6568 o = this._pxBoundsToTileRange( e ), 6569 s = o.getCenter(), 6570 r = [], 6571 e = this.options.keepBuffer, 6572 a = new f( 6573 o.getBottomLeft().subtract( [ e, -e ] ), 6574 o.getTopRight().add( [ e, -e ] ) 6575 ); 6576 if ( 6577 ! ( 6578 isFinite( o.min.x ) && 6579 isFinite( o.min.y ) && 6580 isFinite( o.max.x ) && 6581 isFinite( o.max.y ) 6582 ) 6583 ) 6584 throw new Error( 6585 'Attempted to load an infinite number of tiles' 6586 ); 6587 for ( n in this._tiles ) { 6588 var h = this._tiles[ n ].coords; 6589 ( h.z === this._tileZoom && 6590 a.contains( new p( h.x, h.y ) ) ) || 6591 ( this._tiles[ n ].current = ! 1 ); 6592 } 6593 if ( 1 < Math.abs( i - this._tileZoom ) )
6594 this._setView( t, i ); 6595 else { 6596 for ( var l = o.min.y; l <= o.max.y; l++ ) 6597 for ( var u = o.min.x; u <= o.max.x; u++ ) { 6598 var c, 6599 d = new p( u, l ); 6600 ( d.z = this._tileZoom ), 6601 this._isValidTile( d ) && 6602 ( ( c = 6603 this._tiles[ 6604 this._tileCoordsToKey( d ) 6605 ] ) 6606 ? ( c.current = ! 0 ) 6607 : r.push( d ) ); 6608 } 6609 if ( 6610 ( r.sort( function ( t, e ) { 6611 return t.distanceTo( s ) - e.distanceTo( s ); 6612 } ), 6613 0 !== r.length ) 6614 ) { 6615 this._loading || 6616 ( ( this._loading = ! 0 ), 6617 this.fire( 'loading' ) ); 6618 for ( 6619 var _ = document.createDocumentFragment(), 6620 u = 0; 6621 u < r.length; 6622 u++ 6623 ) 6624 this._addTile( r[ u ], _ ); 6625 this._level.el.appendChild( _ ); 6626 } 6627 } 6628 } 6629 } 6630 }, 6631 _isValidTile: function ( t ) { 6632 var e = this._map.options.crs; 6633 if ( ! e.infinite ) { 6634 var i = this._globalTileRange; 6635 if ( 6636 ( ! e.wrapLng && ( t.x < i.min.x || t.x > i.max.x ) ) || 6637 ( ! e.wrapLat && ( t.y < i.min.y || t.y > i.max.y ) ) 6638 ) 6639 return ! 1; 6640 } 6641 return ( 6642 ! this.options.bounds || 6643 ( ( e = this._tileCoordsToBounds( t ) ), 6644 g( this.options.bounds ).overlaps( e ) ) 6645 ); 6646 }, 6647 _keyToBounds: function ( t ) { 6648 return this._tileCoordsToBounds( this._keyToTileCoords( t ) ); 6649 }, 6650 _tileCoordsToNwSe: function ( t ) { 6651 var e = this._map, 6652 i = this.getTileSize(), 6653 n = t.scaleBy( i ), 6654 i = n.add( i ); 6655 return [ e.unproject( n, t.z ), e.unproject( i, t.z ) ]; 6656 }, 6657 _tileCoordsToBounds: function ( t ) { 6658 ( t = this._tileCoordsToNwSe( t ) ), 6659 ( t = new s( t[ 0 ], t[ 1 ] ) ); 6660 return ( t = this.options.noWrap 6661 ? t 6662 : this._map.wrapLatLngBounds( t ) ); 6663 }, 6664 _tileCoordsToKey: function ( t ) { 6665 return t.x + ':' + t.y + ':' + t.z; 6666 }, 6667 _keyToTileCoords: function ( t ) { 6668 var t = t.split( ':' ), 6669 e = new p( +t[ 0 ], +t[ 1 ] ); 6670 return ( e.z = +t[ 2 ] ), e; 6671 }, 6672 _removeTile: function ( t ) { 6673 var e = this._tiles[ t ]; 6674 e && 6675 ( T( e.el ), 6676 delete this._tiles[ t ], 6677 this.fire( 'tileunload', { 6678 tile: e.el, 6679 coords: this._keyToTileCoords( t ), 6680 } ) ); 6681 }, 6682 _initTile: function ( t ) { 6683 M( t, 'leaflet-tile' ); 6684 var e = this.getTileSize(); 6685 ( t.style.width = e.x + 'px' ), 6686 ( t.style.height = e.y + 'px' ), 6687 ( t.onselectstart = u ), 6688 ( t.onmousemove = u ), 6689 b.ielt9 && 6690 this.options.opacity < 1 && 6691 C( t, this.options.opacity ); 6692 }, 6693 _addTile: function ( t, e ) { 6694 var i = this._getTilePos( t ), 6695 n = this._tileCoordsToKey( t ), 6696 o = this.createTile( 6697 this._wrapCoords( t ), 6698 a( this._tileReady, this, t ) 6699 ); 6700 this._initTile( o ), 6701 this.createTile.length < 2 && 6702 x( a( this._tileReady, this, t, null, o ) ), 6703 Z( o, i ), 6704 ( this._tiles[ n ] = { el: o, coords: t, current: ! 0 } ), 6705 e.appendChild( o ), 6706 this.fire( 'tileloadstart', { tile: o, coords: t } ); 6707 }, 6708 _tileReady: function ( t, e, i ) { 6709 e && this.fire( 'tileerror', { error: e, tile: i, coords: t } ); 6710 var n = this._tileCoordsToKey( t ); 6711 ( i = this._tiles[ n ] ) && 6712 ( ( i.loaded = +new Date() ), 6713 this._map._fadeAnimated 6714 ? ( C( i.el, 0 ), 6715 r( this._fadeFrame ), 6716 ( this._fadeFrame = x( this._updateOpacity, this ) ) ) 6717 : ( ( i.active = ! 0 ), this._pruneTiles() ), 6718 e || 6719 ( M( i.el, 'leaflet-tile-loaded' ), 6720 this.fire( 'tileload', { tile: i.el, coords: t } ) ), 6721 this._noTilesToLoad() && 6722 ( ( this._loading = ! 1 ), 6723 this.fire( 'load' ), 6724 b.ielt9 || ! this._map._fadeAnimated 6725 ? x( this._pruneTiles, this ) 6726 : setTimeout( a( this._pruneTiles, this ), 250 ) ) ); 6727 }, 6728 _getTilePos: function ( t ) { 6729 return t 6730 .scaleBy( this.getTileSize() ) 6731 .subtract( this._level.origin ); 6732 }, 6733 _wrapCoords: function ( t ) { 6734 var e = new p( 6735 this._wrapX ? F( t.x, this._wrapX ) : t.x, 6736 this._wrapY ? F( t.y, this._wrapY ) : t.y 6737 ); 6738 return ( e.z = t.z ), e; 6739 }, 6740 _pxBoundsToTileRange: function ( t ) { 6741 var e = this.getTileSize(); 6742 return new f( 6743 t.min.unscaleBy( e ).floor(), 6744 t.max.unscaleBy( e ).ceil().subtract( [ 1, 1 ] ) 6745 ); 6746 }, 6747 _noTilesToLoad: function () { 6748 for ( var t in this._tiles ) 6749 if ( ! this._tiles[ t ].loaded ) return ! 1; 6750 return ! 0; 6751 }, 6752 } ); 6753 function tn( t ) { 6754 return new Qi( t ); 6755 } 6756 var en = Qi.extend( { 6757 options: {
6758 minZoom: 0, 6759 maxZoom: 18, 6760 subdomains: 'abc', 6761 errorTileUrl: '', 6762 zoomOffset: 0, 6763 tms: ! 1, 6764 zoomReverse: ! 1, 6765 detectRetina: ! 1, 6766 crossOrigin: ! 1, 6767 referrerPolicy: ! 1, 6768 }, 6769 initialize: function ( t, e ) { 6770 ( this._url = t ), 6771 ( e = c( this, e ) ).detectRetina && b.retina && 0 < e.maxZoom 6772 ? ( ( e.tileSize = Math.floor( e.tileSize / 2 ) ), 6773 e.zoomReverse 6774 ? ( e.zoomOffset--, 6775 ( e.minZoom = Math.min( 6776 e.maxZoom, 6777 e.minZoom + 1 6778 ) ) ) 6779 : ( e.zoomOffset++, 6780 ( e.maxZoom = Math.max( 6781 e.minZoom, 6782 e.maxZoom - 1 6783 ) ) ), 6784 ( e.minZoom = Math.max( 0, e.minZoom ) ) ) 6785 : e.zoomReverse 6786 ? ( e.minZoom = Math.min( e.maxZoom, e.minZoom ) ) 6787 : ( e.maxZoom = Math.max( e.minZoom, e.maxZoom ) ), 6788 'string' == typeof e.subdomains && 6789 ( e.subdomains = e.subdomains.split( '' ) ), 6790 this.on( 'tileunload', this._onTileRemove ); 6791 }, 6792 setUrl: function ( t, e ) { 6793 return ( 6794 this._url === t && void 0 === e && ( e = ! 0 ), 6795 ( this._url = t ), 6796 e || this.redraw(), 6797 this 6798 ); 6799 }, 6800 createTile: function ( t, e ) { 6801 var i = document.createElement( 'img' ); 6802 return ( 6803 S( i, 'load', a( this._tileOnLoad, this, e, i ) ), 6804 S( i, 'error', a( this._tileOnError, this, e, i ) ), 6805 ( ! this.options.crossOrigin && 6806 '' !== this.options.crossOrigin ) || 6807 ( i.crossOrigin = 6808 ! 0 === this.options.crossOrigin 6809 ? '' 6810 : this.options.crossOrigin ), 6811 'string' == typeof this.options.referrerPolicy && 6812 ( i.referrerPolicy = this.options.referrerPolicy ), 6813 ( i.alt = '' ), 6814 ( i.src = this.getTileUrl( t ) ), 6815 i 6816 ); 6817 }, 6818 getTileUrl: function ( t ) { 6819 var e = { 6820 r: b.retina ? '@2x' : '', 6821 s: this._getSubdomain( t ), 6822 x: t.x, 6823 y: t.y, 6824 z: this._getZoomForUrl(), 6825 }; 6826 return ( 6827 this._map && 6828 ! this._map.options.crs.infinite && 6829 ( ( t = this._globalTileRange.max.y - t.y ), 6830 this.options.tms && ( e.y = t ), 6831 ( e[ '-y' ] = t ) ), 6832 q( this._url, l( e, this.options ) ) 6833 ); 6834 }, 6835 _tileOnLoad: function ( t, e ) { 6836 b.ielt9 ? setTimeout( a( t, this, null, e ), 0 ) : t( null, e ); 6837 }, 6838 _tileOnError: function ( t, e, i ) { 6839 var n = this.options.errorTileUrl; 6840 n && e.getAttribute( 'src' ) !== n && ( e.src = n ), t( i, e ); 6841 }, 6842 _onTileRemove: function ( t ) { 6843 t.tile.onload = null; 6844 }, 6845 _getZoomForUrl: function () { 6846 var t = this._tileZoom, 6847 e = this.options.maxZoom; 6848 return ( 6849 ( t = this.options.zoomReverse ? e - t : t ) + 6850 this.options.zoomOffset 6851 ); 6852 }, 6853 _getSubdomain: function ( t ) { 6854 t = Math.abs( t.x + t.y ) % this.options.subdomains.length; 6855 return this.options.subdomains[ t ]; 6856 }, 6857 _abortLoading: function () { 6858 var t, e, i; 6859 for ( t in this._tiles ) 6860 this._tiles[ t ].coords.z !== this._tileZoom && 6861 ( ( ( i = this._tiles[ t ].el ).onload = u ), 6862 ( i.onerror = u ), 6863 i.complete || 6864 ( ( i.src = Y ), 6865 ( e = this._tiles[ t ].coords ), 6866 T( i ), 6867 delete this._tiles[ t ], 6868 this.fire( 'tileabort', { tile: i, coords: e } ) ) ); 6869 }, 6870 _removeTile: function ( t ) { 6871 var e = this._tiles[ t ]; 6872 if ( e ) 6873 return ( 6874 e.el.setAttribute( 'src', Y ), 6875 Qi.prototype._removeTile.call( this, t ) 6876 ); 6877 }, 6878 _tileReady: function ( t, e, i ) { 6879 if ( this._map && ( ! i || i.getAttribute( 'src' ) !== Y ) ) 6880 return Qi.prototype._tileReady.call( this, t, e, i ); 6881 }, 6882 } ); 6883 function nn( t, e ) { 6884 return new en( t, e ); 6885 } 6886 var on = en.extend( { 6887 defaultWmsParams: { 6888 service: 'WMS', 6889 request: 'GetMap', 6890 layers: '', 6891 styles: '', 6892 format: 'image/jpeg', 6893 transparent: ! 1, 6894 version: '1.1.1', 6895 }, 6896 options: { crs: null, uppercase: ! 1 }, 6897 initialize: function ( t, e ) { 6898 this._url = t; 6899 var i, 6900 n = l( {}, this.defaultWmsParams ); 6901 for ( i in e ) i in this.options || ( n[ i ] = e[ i ] ); 6902 var t = ( e = c( this, e ) ).detectRetina && b.retina ? 2 : 1, 6903 o = this.getTileSize(); 6904 ( n.width = o.x * t ), 6905 ( n.height = o.y * t ), 6906 ( this.wmsParams = n ); 6907 }, 6908 onAdd: function ( t ) { 6909 ( this._crs = this.options.crs || t.options.crs ), 6910 ( this._wmsVersion = parseFloat( this.wmsParams.version ) ); 6911 var e = 1.3 <= this._wmsVersion ? 'crs' : 'srs'; 6912 ( this.wmsParams[ e ] = this._crs.code ), 6913 en.prototype.onAdd.call( this, t ); 6914 }, 6915 getTileUrl: function ( t ) { 6916 var e = this._tileCoordsToNwSe( t ), 6917 i = this._crs, 6918 i = _( i.project( e[ 0 ] ), i.project( e[ 1 ] ) ), 6919 e = i.min, 6920 i = i.max, 6921 e = ( 6922 1.3 <= this._wmsVersion && this._crs === _i 6923 ? [ e.y, e.x, i.y, i.x ] 6924 : [ e.x, e.y, i.x, i.y ] 6925 ).join( ',' ), 6926 i = en.prototype.getTileUrl.call( this, t ); 6927 return ( 6928 i + 6929 V( this.wmsParams, i, this.options.uppercase ) + 6930 ( this.options.uppercase ? '&BBOX=' : '&bbox=' ) + 6931 e 6932 ); 6933 }, 6934 setParams: function ( t, e ) { 6935 return l( this.wmsParams, t ), e || this.redraw(), this; 6936 }, 6937 } ); 6938 ( en.WMS = on ), 6939 ( nn.wms = function ( t, e ) { 6940 return new on( t, e ); 6941 } ); 6942 var sn = y.extend( { 6943 options: { padding: 0.1 }, 6944 initialize: function ( t ) { 6945 c( this, t ), h( this ), ( this._layers = this._layers || {} ); 6946 }, 6947 onAdd: function () { 6948 this._container || 6949 ( this._initContainer(), 6950 this._zoomAnimated && 6951 M( this._container, 'leaflet-zoom-animated' ) ), 6952 this.getPane().appendChild( this._container ), 6953 this._update(), 6954 this.on( 'update', this._updatePaths, this ); 6955 }, 6956 onRemove: function () { 6957 this.off( 'update', this._updatePaths, this ), 6958 this._destroyContainer(); 6959 }, 6960 getEvents: function () { 6961 var t = { 6962 viewreset: this._reset, 6963 zoom: this._onZoom, 6964 moveend: this._update, 6965 zoomend: this._onZoomEnd, 6966 }; 6967 return ( 6968 this._zoomAnimated && ( t.zoomanim = this._onAnimZoom ), t 6969 ); 6970 }, 6971 _onAnimZoom: function ( t ) { 6972 this._updateTransform( t.center, t.zoom ); 6973 }, 6974 _onZoom: function () { 6975 this._updateTransform( 6976 this._map.getCenter(), 6977 this._map.getZoom() 6978 ); 6979 }, 6980 _updateTransform: function ( t, e ) { 6981 var i = this._map.getZoomScale( e, this._zoom ), 6982 n = this._map 6983 .getSize() 6984 .multiplyBy( 0.5 + this.options.padding ), 6985 o = this._map.project( this._center, e ), 6986 n = n 6987 .multiplyBy( -i ) 6988 .add( o ) 6989 .subtract( this._map._getNewPixelOrigin( t, e ) ); 6990 b.any3d ? Pe( this._container, n, i ) : Z( this._container, n ); 6991 }, 6992 _reset: function () { 6993 for ( var t in ( this._update(), 6994 this._updateTransform( this._center, this._zoom ), 6995 this._layers ) ) 6996 this._layers[ t ]._reset(); 6997 }, 6998 _onZoomEnd: function () { 6999 for ( var t in this._layers ) this._layers[ t ]._project(); 7000 }, 7001 _updatePaths: function () { 7002 for ( var t in this._layers ) this._layers[ t ]._update(); 7003 }, 7004 _update: function () { 7005 var t = this.options.padding, 7006 e = this._map.getSize(), 7007 i = this._map 7008 .containerPointToLayerPoint( e.multiplyBy( -t ) ) 7009 .round(); 7010 ( this._bounds = new f( 7011 i, 7012 i.add( e.multiplyBy( 1 + 2 * t ) ).round() 7013 ) ), 7014 ( this._center = this._map.getCenter() ), 7015 ( this._zoom = this._map.getZoom() ); 7016 }, 7017 } ), 7018 rn = sn.extend( { 7019 options: { tolerance: 0 }, 7020 getEvents: function () { 7021 var t = sn.prototype.getEvents.call( this ); 7022 return ( t.viewprereset = this._onViewPreReset ), t; 7023 }, 7024 _onViewPreReset: function () { 7025 this._postponeUpdatePaths = ! 0; 7026 }, 7027 onAdd: function () { 7028 sn.prototype.onAdd.call( this ), this._draw(); 7029 },
7030 _initContainer: function () { 7031 var t = ( this._container = 7032 document.createElement( 'canvas' ) ); 7033 S( t, 'mousemove', this._onMouseMove, this ), 7034 S( 7035 t, 7036 'click dblclick mousedown mouseup contextmenu', 7037 this._onClick, 7038 this 7039 ), 7040 S( t, 'mouseout', this._handleMouseOut, this ), 7041 ( t._leaflet_disable_events = ! 0 ), 7042 ( this._ctx = t.getContext( '2d' ) ); 7043 }, 7044 _destroyContainer: function () { 7045 r( this._redrawRequest ), 7046 delete this._ctx, 7047 T( this._container ), 7048 E( this._container ), 7049 delete this._container; 7050 }, 7051 _updatePaths: function () { 7052 if ( ! this._postponeUpdatePaths ) { 7053 for ( var t in ( ( this._redrawBounds = null ), 7054 this._layers ) ) 7055 this._layers[ t ]._update(); 7056 this._redraw(); 7057 } 7058 }, 7059 _update: function () { 7060 var t, e, i, n; 7061 ( this._map._animatingZoom && this._bounds ) || 7062 ( sn.prototype._update.call( this ), 7063 ( t = this._bounds ), 7064 ( e = this._container ), 7065 ( i = t.getSize() ), 7066 ( n = b.retina ? 2 : 1 ), 7067 Z( e, t.min ), 7068 ( e.width = n * i.x ), 7069 ( e.height = n * i.y ), 7070 ( e.style.width = i.x + 'px' ), 7071 ( e.style.height = i.y + 'px' ), 7072 b.retina && this._ctx.scale( 2, 2 ), 7073 this._ctx.translate( -t.min.x, -t.min.y ), 7074 this.fire( 'update' ) ); 7075 }, 7076 _reset: function () { 7077 sn.prototype._reset.call( this ), 7078 this._postponeUpdatePaths && 7079 ( ( this._postponeUpdatePaths = ! 1 ), 7080 this._updatePaths() ); 7081 }, 7082 _initPath: function ( t ) { 7083 this._updateDashArray( t ); 7084 t = ( this._layers[ h( t ) ] = t )._order = { 7085 layer: t, 7086 prev: this._drawLast, 7087 next: null, 7088 }; 7089 this._drawLast && ( this._drawLast.next = t ), 7090 ( this._drawLast = t ), 7091 ( this._drawFirst = this._drawFirst || this._drawLast ); 7092 }, 7093 _addPath: function ( t ) { 7094 this._requestRedraw( t ); 7095 }, 7096 _removePath: function ( t ) { 7097 var e = t._order, 7098 i = e.next, 7099 e = e.prev; 7100 i ? ( i.prev = e ) : ( this._drawLast = e ), 7101 e ? ( e.next = i ) : ( this._drawFirst = i ), 7102 delete t._order, 7103 delete this._layers[ h( t ) ], 7104 this._requestRedraw( t ); 7105 }, 7106 _updatePath: function ( t ) { 7107 this._extendRedrawBounds( t ), 7108 t._project(), 7109 t._update(), 7110 this._requestRedraw( t ); 7111 }, 7112 _updateStyle: function ( t ) { 7113 this._updateDashArray( t ), this._requestRedraw( t ); 7114 }, 7115 _updateDashArray: function ( t ) { 7116 if ( 'string' == typeof t.options.dashArray ) { 7117 for ( 7118 var e, 7119 i = t.options.dashArray.split( /[, ]+/ ), 7120 n = [], 7121 o = 0; 7122 o < i.length; 7123 o++ 7124 ) { 7125 if ( ( ( e = Number( i[ o ] ) ), isNaN( e ) ) ) return; 7126 n.push( e ); 7127 } 7128 t.options._dashArray = n; 7129 } else t.options._dashArray = t.options.dashArray; 7130 }, 7131 _requestRedraw: function ( t ) { 7132 this._map && 7133 ( this._extendRedrawBounds( t ), 7134 ( this._redrawRequest = 7135 this._redrawRequest || x( this._redraw, this ) ) ); 7136 }, 7137 _extendRedrawBounds: function ( t ) { 7138 var e; 7139 t._pxBounds && 7140 ( ( e = ( t.options.weight || 0 ) + 1 ), 7141 ( this._redrawBounds = this._redrawBounds || new f() ), 7142 this._redrawBounds.extend( 7143 t._pxBounds.min.subtract( [ e, e ] ) 7144 ), 7145 this._redrawBounds.extend( 7146 t._pxBounds.max.add( [ e, e ] ) 7147 ) ); 7148 }, 7149 _redraw: function () { 7150 ( this._redrawRequest = null ), 7151 this._redrawBounds && 7152 ( this._redrawBounds.min._floor(), 7153 this._redrawBounds.max._ceil() ), 7154 this._clear(), 7155 this._draw(), 7156 ( this._redrawBounds = null ); 7157 }, 7158 _clear: function () { 7159 var t, 7160 e = this._redrawBounds; 7161 e 7162 ? ( ( t = e.getSize() ), 7163 this._ctx.clearRect( e.min.x, e.min.y, t.x, t.y ) ) 7164 : ( this._ctx.save(), 7165 this._ctx.setTransform( 1, 0, 0, 1, 0, 0 ), 7166 this._ctx.clearRect( 7167 0, 7168 0, 7169 this._container.width, 7170 this._container.height 7171 ), 7172 this._ctx.restore() ); 7173 }, 7174 _draw: function () { 7175 var t, 7176 e, 7177 i = this._redrawBounds; 7178 this._ctx.save(), 7179 i && 7180 ( ( e = i.getSize() ), 7181 this._ctx.beginPath(), 7182 this._ctx.rect( i.min.x, i.min.y, e.x, e.y ), 7183 this._ctx.clip() ), 7184 ( this._drawing = ! 0 ); 7185 for ( var n = this._drawFirst; n; n = n.next ) 7186 ( t = n.layer ), 7187 ( ! i || 7188 ( t._pxBounds && t._pxBounds.intersects( i ) ) ) && 7189 t._updatePath();
7190 ( this._drawing = ! 1 ), this._ctx.restore(); 7191 }, 7192 _updatePoly: function ( t, e ) { 7193 if ( this._drawing ) { 7194 var i, 7195 n, 7196 o, 7197 s, 7198 r = t._parts, 7199 a = r.length, 7200 h = this._ctx; 7201 if ( a ) { 7202 for ( h.beginPath(), i = 0; i < a; i++ ) { 7203 for ( n = 0, o = r[ i ].length; n < o; n++ ) 7204 ( s = r[ i ][ n ] ), 7205 h[ n ? 'lineTo' : 'moveTo' ]( s.x, s.y ); 7206 e && h.closePath(); 7207 } 7208 this._fillStroke( h, t ); 7209 } 7210 } 7211 }, 7212 _updateCircle: function ( t ) { 7213 var e, i, n, o; 7214 this._drawing && 7215 ! t._empty() && 7216 ( ( e = t._point ), 7217 ( i = this._ctx ), 7218 ( n = Math.max( Math.round( t._radius ), 1 ) ), 7219 1 != 7220 ( o = 7221 ( Math.max( Math.round( t._radiusY ), 1 ) || n ) / 7222 n ) && ( i.save(), i.scale( 1, o ) ), 7223 i.beginPath(), 7224 i.arc( e.x, e.y / o, n, 0, 2 * Math.PI, ! 1 ), 7225 1 != o && i.restore(), 7226 this._fillStroke( i, t ) ); 7227 }, 7228 _fillStroke: function ( t, e ) { 7229 var i = e.options; 7230 i.fill && 7231 ( ( t.globalAlpha = i.fillOpacity ), 7232 ( t.fillStyle = i.fillColor || i.color ), 7233 t.fill( i.fillRule || 'evenodd' ) ), 7234 i.stroke && 7235 0 !== i.weight && 7236 ( t.setLineDash && 7237 t.setLineDash( 7238 ( e.options && e.options._dashArray ) || [] 7239 ), 7240 ( t.globalAlpha = i.opacity ), 7241 ( t.lineWidth = i.weight ), 7242 ( t.strokeStyle = i.color ), 7243 ( t.lineCap = i.lineCap ), 7244 ( t.lineJoin = i.lineJoin ), 7245 t.stroke() ); 7246 }, 7247 _onClick: function ( t ) { 7248 for ( 7249 var e, 7250 i, 7251 n = this._map.mouseEventToLayerPoint( t ), 7252 o = this._drawFirst; 7253 o; 7254 o = o.next 7255 ) 7256 ( e = o.layer ).options.interactive && 7257 e._containsPoint( n ) && 7258 ( ( ( 'click' === t.type || 'preclick' === t.type ) && 7259 this._map._draggableMoved( e ) ) || 7260 ( i = e ) ); 7261 this._fireEvent( !! i && [ i ], t ); 7262 }, 7263 _onMouseMove: function ( t ) { 7264 var e; 7265 ! this._map || 7266 this._map.dragging.moving() || 7267 this._map._animatingZoom || 7268 ( ( e = this._map.mouseEventToLayerPoint( t ) ), 7269 this._handleMouseHover( t, e ) ); 7270 }, 7271 _handleMouseOut: function ( t ) { 7272 var e = this._hoveredLayer; 7273 e && 7274 ( z( this._container, 'leaflet-interactive' ), 7275 this._fireEvent( [ e ], t, 'mouseout' ), 7276 ( this._hoveredLayer = null ), 7277 ( this._mouseHoverThrottled = ! 1 ) ); 7278 }, 7279 _handleMouseHover: function ( t, e ) { 7280 if ( ! this._mouseHoverThrottled ) { 7281 for ( var i, n, o = this._drawFirst; o; o = o.next ) 7282 ( i = o.layer ).options.interactive && 7283 i._containsPoint( e ) && 7284 ( n = i ); 7285 n !== this._hoveredLayer && 7286 ( this._handleMouseOut( t ), 7287 n && 7288 ( M( this._container, 'leaflet-interactive' ), 7289 this._fireEvent( [ n ], t, 'mouseover' ), 7290 ( this._hoveredLayer = n ) ) ), 7291 this._fireEvent( 7292 !! this._hoveredLayer && [ this._hoveredLayer ], 7293 t 7294 ), 7295 ( this._mouseHoverThrottled = ! 0 ), 7296 setTimeout( 7297 a( function () { 7298 this._mouseHoverThrottled = ! 1; 7299 }, this ), 7300 32 7301 ); 7302 } 7303 }, 7304 _fireEvent: function ( t, e, i ) { 7305 this._map._fireDOMEvent( e, i || e.type, t ); 7306 }, 7307 _bringToFront: function ( t ) { 7308 var e, 7309 i, 7310 n = t._order; 7311 n && 7312 ( ( e = n.next ), 7313 ( i = n.prev ), 7314 e && 7315 ( ( e.prev = i ) 7316 ? ( i.next = e ) 7317 : e && ( this._drawFirst = e ), 7318 ( n.prev = this._drawLast ), 7319 ( ( this._drawLast.next = n ).next = null ), 7320 ( this._drawLast = n ), 7321 this._requestRedraw( t ) ) ); 7322 }, 7323 _bringToBack: function ( t ) { 7324 var e, 7325 i, 7326 n = t._order; 7327 n && 7328 ( ( e = n.next ), 7329 ( i = n.prev ) && 7330 ( ( i.next = e ) 7331 ? ( e.prev = i ) 7332 : i && ( this._drawLast = i ), 7333 ( n.prev = null ), 7334 ( n.next = this._drawFirst ), 7335 ( this._drawFirst.prev = n ), 7336 ( this._drawFirst = n ), 7337 this._requestRedraw( t ) ) ); 7338 }, 7339 } ); 7340 function an( t ) { 7341 return b.canvas ? new rn( t ) : null; 7342 } 7343 var hn = ( function () { 7344 try { 7345 return ( 7346 document.namespaces.add( 7347 'lvml', 7348 'urn:schemas-microsoft-com:vml' 7349 ), 7350 function ( t ) { 7351 return document.createElement( 7352 '<lvml:' + t + ' class="lvml">' 7353 ); 7354 } 7355 ); 7356 } catch ( t ) {} 7357 return function ( t ) { 7358 return document.createElement( 7359 '<' + 7360 t + 7361 ' xmlns="urn:schemas-microsoft.com:vml" class="lvml">' 7362 ); 7363 }; 7364 } )(), 7365 zt = {
7366 _initContainer: function () { 7367 this._container = P( 'div', 'leaflet-vml-container' ); 7368 }, 7369 _update: function () { 7370 this._map._animatingZoom || 7371 ( sn.prototype._update.call( this ), 7372 this.fire( 'update' ) ); 7373 }, 7374 _initPath: function ( t ) { 7375 var e = ( t._container = hn( 'shape' ) ); 7376 M( e, 'leaflet-vml-shape ' + ( this.options.className || '' ) ), 7377 ( e.coordsize = '1 1' ), 7378 ( t._path = hn( 'path' ) ), 7379 e.appendChild( t._path ), 7380 this._updateStyle( t ), 7381 ( this._layers[ h( t ) ] = t ); 7382 }, 7383 _addPath: function ( t ) { 7384 var e = t._container; 7385 this._container.appendChild( e ), 7386 t.options.interactive && t.addInteractiveTarget( e ); 7387 }, 7388 _removePath: function ( t ) { 7389 var e = t._container; 7390 T( e ), 7391 t.removeInteractiveTarget( e ), 7392 delete this._layers[ h( t ) ]; 7393 }, 7394 _updateStyle: function ( t ) { 7395 var e = t._stroke, 7396 i = t._fill, 7397 n = t.options, 7398 o = t._container; 7399 ( o.stroked = !! n.stroke ), 7400 ( o.filled = !! n.fill ), 7401 n.stroke 7402 ? ( ( e = e || ( t._stroke = hn( 'stroke' ) ) ), 7403 o.appendChild( e ), 7404 ( e.weight = n.weight + 'px' ), 7405 ( e.color = n.color ), 7406 ( e.opacity = n.opacity ), 7407 n.dashArray 7408 ? ( e.dashStyle = d( n.dashArray ) 7409 ? n.dashArray.join( ' ' ) 7410 : n.dashArray.replace( 7411 /( *, *)/g, 7412 ' ' 7413 ) ) 7414 : ( e.dashStyle = '' ), 7415 ( e.endcap = n.lineCap.replace( 'butt', 'flat' ) ), 7416 ( e.joinstyle = n.lineJoin ) ) 7417 : e && ( o.removeChild( e ), ( t._stroke = null ) ), 7418 n.fill 7419 ? ( ( i = i || ( t._fill = hn( 'fill' ) ) ), 7420 o.appendChild( i ), 7421 ( i.color = n.fillColor || n.color ), 7422 ( i.opacity = n.fillOpacity ) ) 7423 : i && ( o.removeChild( i ), ( t._fill = null ) ); 7424 }, 7425 _updateCircle: function ( t ) { 7426 var e = t._point.round(), 7427 i = Math.round( t._radius ), 7428 n = Math.round( t._radiusY || i ); 7429 this._setPath( 7430 t, 7431 t._empty() 7432 ? 'M0 0' 7433 : 'AL ' + 7434 e.x + 7435 ',' + 7436 e.y + 7437 ' ' + 7438 i + 7439 ',' + 7440 n + 7441 ' 0,23592600' 7442 ); 7443 }, 7444 _setPath: function ( t, e ) { 7445 t._path.v = e; 7446 }, 7447 _bringToFront: function ( t ) { 7448 ge( t._container ); 7449 }, 7450 _bringToBack: function ( t ) { 7451 ve( t._container ); 7452 }, 7453 }, 7454 ln = b.vml ? hn : ct, 7455 un = sn.extend( { 7456 _initContainer: function () { 7457 ( this._container = ln( 'svg' ) ), 7458 this._container.setAttribute( 'pointer-events', 'none' ), 7459 ( this._rootGroup = ln( 'g' ) ), 7460 this._container.appendChild( this._rootGroup ); 7461 }, 7462 _destroyContainer: function () { 7463 T( this._container ), 7464 E( this._container ), 7465 delete this._container, 7466 delete this._rootGroup, 7467 delete this._svgSize; 7468 }, 7469 _update: function () { 7470 var t, e, i; 7471 ( this._map._animatingZoom && this._bounds ) || 7472 ( sn.prototype._update.call( this ), 7473 ( e = ( t = this._bounds ).getSize() ), 7474 ( i = this._container ), 7475 ( this._svgSize && this._svgSize.equals( e ) ) || 7476 ( ( this._svgSize = e ), 7477 i.setAttribute( 'width', e.x ), 7478 i.setAttribute( 'height', e.y ) ), 7479 Z( i, t.min ), 7480 i.setAttribute( 7481 'viewBox', 7482 [ t.min.x, t.min.y, e.x, e.y ].join( ' ' ) 7483 ), 7484 this.fire( 'update' ) ); 7485 }, 7486 _initPath: function ( t ) { 7487 var e = ( t._path = ln( 'path' ) ); 7488 t.options.className && M( e, t.options.className ), 7489 t.options.interactive && M( e, 'leaflet-interactive' ), 7490 this._updateStyle( t ), 7491 ( this._layers[ h( t ) ] = t ); 7492 }, 7493 _addPath: function ( t ) { 7494 this._rootGroup || this._initContainer(), 7495 this._rootGroup.appendChild( t._path ), 7496 t.addInteractiveTarget( t._path ); 7497 }, 7498 _removePath: function ( t ) { 7499 T( t._path ), 7500 t.removeInteractiveTarget( t._path ), 7501 delete this._layers[ h( t ) ]; 7502 }, 7503 _updatePath: function ( t ) { 7504 t._project(), t._update(); 7505 }, 7506 _updateStyle: function ( t ) { 7507 var e = t._path, 7508 t = t.options; 7509 e && 7510 ( t.stroke 7511 ? ( e.setAttribute( 'stroke', t.color ), 7512 e.setAttribute( 'stroke-opacity', t.opacity ), 7513 e.setAttribute( 'stroke-width', t.weight ), 7514 e.setAttribute( 'stroke-linecap', t.lineCap ), 7515 e.setAttribute( 'stroke-linejoin', t.lineJoin ), 7516 t.dashArray 7517 ? e.setAttribute( 7518 'stroke-dasharray', 7519 t.dashArray 7520 ) 7521 : e.removeAttribute( 'stroke-dasharray' ), 7522 t.dashOffset 7523 ? e.setAttribute( 7524 'stroke-dashoffset', 7525 t.dashOffset 7526 ) 7527 : e.removeAttribute( 'stroke-dashoffset' ) ) 7528 : e.setAttribute( 'stroke', 'none' ), 7529 t.fill 7530 ? ( e.setAttribute( 'fill', t.fillColor || t.color ), 7531 e.setAttribute( 'fill-opacity', t.fillOpacity ), 7532 e.setAttribute( 7533 'fill-rule', 7534 t.fillRule || 'evenodd' 7535 ) ) 7536 : e.setAttribute( 'fill', 'none' ) ); 7537 }, 7538 _updatePoly: function ( t, e ) { 7539 this._setPath( t, dt( t._parts, e ) ); 7540 }, 7541 _updateCircle: function ( t ) { 7542 var e = t._point, 7543 i = Math.max( Math.round( t._radius ), 1 ), 7544 n = 7545 'a' + 7546 i + 7547 ',' + 7548 ( Math.max( Math.round( t._radiusY ), 1 ) || i ) + 7549 ' 0 1,0 ', 7550 e = t._empty() 7551 ? 'M0 0' 7552 : 'M' + 7553 ( e.x - i ) + 7554 ',' + 7555 e.y + 7556 n + 7557 2 * i + 7558 ',0 ' + 7559 n + 7560 2 * -i + 7561 ',0 '; 7562 this._setPath( t, e ); 7563 }, 7564 _setPath: function ( t, e ) { 7565 t._path.setAttribute( 'd', e ); 7566 }, 7567 _bringToFront: function ( t ) { 7568 ge( t._path ); 7569 }, 7570 _bringToBack: function ( t ) { 7571 ve( t._path ); 7572 }, 7573 } ); 7574 function cn( t ) { 7575 return b.svg || b.vml ? new un( t ) : null; 7576 } 7577 b.vml && un.include( zt ), 7578 O.include( { 7579 getRenderer: function ( t ) { 7580 t = 7581 ( t = 7582 t.options.renderer || 7583 this._getPaneRenderer( t.options.pane ) || 7584 this.options.renderer || 7585 this._renderer ) || 7586 ( this._renderer = this._createRenderer() ); 7587 return this.hasLayer( t ) || this.addLayer( t ), t; 7588 }, 7589 _getPaneRenderer: function ( t ) { 7590 var e; 7591 return ( 7592 'overlayPane' !== t && 7593 void 0 !== t && 7594 ( void 0 === ( e = this._paneRenderers[ t ] ) && 7595 ( ( e = this._createRenderer( { pane: t } ) ), 7596 ( this._paneRenderers[ t ] = e ) ), 7597 e ) 7598 ); 7599 }, 7600 _createRenderer: function ( t ) { 7601 return ( this.options.preferCanvas && an( t ) ) || cn( t ); 7602 }, 7603 } ); 7604 var dn = Zi.extend( { 7605 initialize: function ( t, e ) { 7606 Zi.prototype.initialize.call( this, this._boundsToLatLngs( t ), e ); 7607 }, 7608 setBounds: function ( t ) { 7609 return this.setLatLngs( this._boundsToLatLngs( t ) ); 7610 }, 7611 _boundsToLatLngs: function ( t ) { 7612 return [
7613 ( t = g( t ) ).getSouthWest(), 7614 t.getNorthWest(), 7615 t.getNorthEast(), 7616 t.getSouthEast(), 7617 ]; 7618 }, 7619 } ); 7620 function _n( t, e ) { 7621 return new dn( t, e ); 7622 } 7623 ( un.create = ln ), 7624 ( un.pointsToPath = dt ), 7625 ( Ei.geometryToLayer = ki ), 7626 ( Ei.coordsToLatLng = Bi ), 7627 ( Ei.coordsToLatLngs = Ai ), 7628 ( Ei.latLngToCoords = Ii ), 7629 ( Ei.latLngsToCoords = Ri ), 7630 ( Ei.getFeature = Ni ), 7631 ( Ei.asFeature = Di ), 7632 O.mergeOptions( { boxZoom: ! 0 } ); 7633 ( _t = o.extend( { 7634 initialize: function ( t ) { 7635 ( this._map = t ), 7636 ( this._container = t._container ), 7637 ( this._pane = t._panes.overlayPane ), 7638 ( this._resetStateTimeout = 0 ), 7639 t.on( 'unload', this._destroy, this ); 7640 }, 7641 addHooks: function () { 7642 S( this._container, 'mousedown', this._onMouseDown, this ); 7643 }, 7644 removeHooks: function () { 7645 E( this._container, 'mousedown', this._onMouseDown, this ); 7646 }, 7647 moved: function () { 7648 return this._moved; 7649 }, 7650 _destroy: function () { 7651 T( this._pane ), delete this._pane; 7652 }, 7653 _resetState: function () { 7654 ( this._resetStateTimeout = 0 ), ( this._moved = ! 1 ); 7655 }, 7656 _clearDeferredResetState: function () { 7657 0 !== this._resetStateTimeout && 7658 ( clearTimeout( this._resetStateTimeout ), 7659 ( this._resetStateTimeout = 0 ) ); 7660 }, 7661 _onMouseDown: function ( t ) { 7662 if ( ! t.shiftKey || ( 1 !== t.which && 1 !== t.button ) ) 7663 return ! 1; 7664 this._clearDeferredResetState(), 7665 this._resetState(), 7666 ae(), 7667 Te(), 7668 ( this._startPoint = 7669 this._map.mouseEventToContainerPoint( t ) ), 7670 S( 7671 document, 7672 { 7673 contextmenu: De, 7674 mousemove: this._onMouseMove, 7675 mouseup: this._onMouseUp, 7676 keydown: this._onKeyDown, 7677 }, 7678 this 7679 ); 7680 }, 7681 _onMouseMove: function ( t ) { 7682 this._moved || 7683 ( ( this._moved = ! 0 ), 7684 ( this._box = P( 'div', 'leaflet-zoom-box', this._container ) ), 7685 M( this._container, 'leaflet-crosshair' ), 7686 this._map.fire( 'boxzoomstart' ) ), 7687 ( this._point = this._map.mouseEventToContainerPoint( t ) ); 7688 var t = new f( this._point, this._startPoint ), 7689 e = t.getSize(); 7690 Z( this._box, t.min ), 7691 ( this._box.style.width = e.x + 'px' ), 7692 ( this._box.style.height = e.y + 'px' ); 7693 }, 7694 _finish: function () { 7695 this._moved && 7696 ( T( this._box ), z( this._container, 'leaflet-crosshair' ) ), 7697 he(), 7698 Me(), 7699 E( 7700 document, 7701 { 7702 contextmenu: De, 7703 mousemove: this._onMouseMove, 7704 mouseup: this._onMouseUp, 7705 keydown: this._onKeyDown, 7706 }, 7707 this 7708 ); 7709 }, 7710 _onMouseUp: function ( t ) { 7711 ( 1 !== t.which && 1 !== t.button ) || 7712 ( this._finish(), 7713 this._moved && 7714 ( this._clearDeferredResetState(), 7715 ( this._resetStateTimeout = setTimeout( 7716 a( this._resetState, this ), 7717 0 7718 ) ), 7719 ( t = new s( 7720 this._map.containerPointToLatLng( this._startPoint ), 7721 this._map.containerPointToLatLng( this._point ) 7722 ) ), 7723 this._map 7724 .fitBounds( t ) 7725 .fire( 'boxzoomend', { boxZoomBounds: t } ) ) ); 7726 }, 7727 _onKeyDown: function ( t ) { 7728 27 === t.keyCode && 7729 ( this._finish(), 7730 this._clearDeferredResetState(), 7731 this._resetState() ); 7732 }, 7733 } ) ), 7734 O.addInitHook( 'addHandler', 'boxZoom', _t ), 7735 O.mergeOptions( { doubleClickZoom: ! 0 } ), 7736 ( Ct = o.extend( { 7737 addHooks: function () { 7738 this._map.on( 'dblclick', this._onDoubleClick, this ); 7739 }, 7740 removeHooks: function () { 7741 this._map.off( 'dblclick', this._onDoubleClick, this ); 7742 }, 7743 _onDoubleClick: function ( t ) { 7744 var e = this._map, 7745 i = e.getZoom(), 7746 n = e.options.zoomDelta, 7747 i = t.originalEvent.shiftKey ? i - n : i + n; 7748 'center' === e.options.doubleClickZoom 7749 ? e.setZoom( i ) 7750 : e.setZoomAround( t.containerPoint, i ); 7751 }, 7752 } ) ), 7753 O.addInitHook( 'addHandler', 'doubleClickZoom', Ct ), 7754 O.mergeOptions( { 7755 dragging: ! 0, 7756 inertia: ! 0, 7757 inertiaDeceleration: 3400, 7758 inertiaMaxSpeed: 1 / 0, 7759 easeLinearity: 0.2, 7760 worldCopyJump: ! 1, 7761 maxBoundsViscosity: 0, 7762 } ), 7763 ( Zt = o.extend( { 7764 addHooks: function () { 7765 var t; 7766 this._draggable || 7767 ( ( t = this._map ), 7768 ( this._draggable = new ti( t._mapPane, t._container ) ), 7769 this._draggable.on( 7770 { 7771 dragstart: this._onDragStart, 7772 drag: this._onDrag, 7773 dragend: this._onDragEnd, 7774 }, 7775 this 7776 ), 7777 this._draggable.on( 'predrag', this._onPreDragLimit, this ), 7778 t.options.worldCopyJump && 7779 ( this._draggable.on( 7780 'predrag', 7781 this._onPreDragWrap, 7782 this 7783 ), 7784 t.on( 'zoomend', this._onZoomEnd, this ), 7785 t.whenReady( this._onZoomEnd, this ) ) ), 7786 M( 7787 this._map._container, 7788 'leaflet-grab leaflet-touch-drag' 7789 ), 7790 this._draggable.enable(), 7791 ( this._positions = [] ), 7792 ( this._times = [] ); 7793 }, 7794 removeHooks: function () { 7795 z( this._map._container, 'leaflet-grab' ), 7796 z( this._map._container, 'leaflet-touch-drag' ), 7797 this._draggable.disable(); 7798 }, 7799 moved: function () { 7800 return this._draggable && this._draggable._moved; 7801 }, 7802 moving: function () {
7803 return this._draggable && this._draggable._moving; 7804 }, 7805 _onDragStart: function () { 7806 var t, 7807 e = this._map; 7808 e._stop(), 7809 this._map.options.maxBounds && 7810 this._map.options.maxBoundsViscosity 7811 ? ( ( t = g( this._map.options.maxBounds ) ), 7812 ( this._offsetLimit = _( 7813 this._map 7814 .latLngToContainerPoint( t.getNorthWest() ) 7815 .multiplyBy( -1 ), 7816 this._map 7817 .latLngToContainerPoint( t.getSouthEast() ) 7818 .multiplyBy( -1 ) 7819 .add( this._map.getSize() ) 7820 ) ), 7821 ( this._viscosity = Math.min( 7822 1, 7823 Math.max( 7824 0, 7825 this._map.options.maxBoundsViscosity 7826 ) 7827 ) ) ) 7828 : ( this._offsetLimit = null ), 7829 e.fire( 'movestart' ).fire( 'dragstart' ), 7830 e.options.inertia && 7831 ( ( this._positions = [] ), ( this._times = [] ) ); 7832 }, 7833 _onDrag: function ( t ) { 7834 var e, i; 7835 this._map.options.inertia && 7836 ( ( e = this._lastTime = +new Date() ), 7837 ( i = this._lastPos = 7838 this._draggable._absPos || this._draggable._newPos ), 7839 this._positions.push( i ), 7840 this._times.push( e ), 7841 this._prunePositions( e ) ), 7842 this._map.fire( 'move', t ).fire( 'drag', t ); 7843 }, 7844 _prunePositions: function ( t ) { 7845 for ( 7846 ; 7847 1 < this._positions.length && 50 < t - this._times[ 0 ]; 7848 7849 ) 7850 this._positions.shift(), this._times.shift(); 7851 }, 7852 _onZoomEnd: function () { 7853 var t = this._map.getSize().divideBy( 2 ), 7854 e = this._map.latLngToLayerPoint( [ 0, 0 ] ); 7855 ( this._initialWorldOffset = e.subtract( t ).x ), 7856 ( this._worldWidth = this._map 7857 .getPixelWorldBounds() 7858 .getSize().x ); 7859 }, 7860 _viscousLimit: function ( t, e ) { 7861 return t - ( t - e ) * this._viscosity; 7862 }, 7863 _onPreDragLimit: function () { 7864 var t, e; 7865 this._viscosity && 7866 this._offsetLimit && 7867 ( ( t = this._draggable._newPos.subtract( 7868 this._draggable._startPos 7869 ) ), 7870 ( e = this._offsetLimit ), 7871 t.x < e.min.x && 7872 ( t.x = this._viscousLimit( t.x, e.min.x ) ), 7873 t.y < e.min.y && 7874 ( t.y = this._viscousLimit( t.y, e.min.y ) ), 7875 t.x > e.max.x && 7876 ( t.x = this._viscousLimit( t.x, e.max.x ) ), 7877 t.y > e.max.y && 7878 ( t.y = this._viscousLimit( t.y, e.max.y ) ), 7879 ( this._draggable._newPos = 7880 this._draggable._startPos.add( t ) ) ); 7881 }, 7882 _onPreDragWrap: function () { 7883 var t = this._worldWidth, 7884 e = Math.round( t / 2 ), 7885 i = this._initialWorldOffset, 7886 n = this._draggable._newPos.x, 7887 o = ( ( n - e + i ) % t ) + e - i, 7888 n = ( ( n + e + i ) % t ) - e - i, 7889 t = Math.abs( o + i ) < Math.abs( n + i ) ? o : n; 7890 ( this._draggable._absPos = this._draggable._newPos.clone() ), 7891 ( this._draggable._newPos.x = t ); 7892 }, 7893 _onDragEnd: function ( t ) { 7894 var e, 7895 i, 7896 n, 7897 o, 7898 s = this._map, 7899 r = s.options, 7900 a = ! r.inertia || t.noInertia || this._times.length < 2; 7901 s.fire( 'dragend', t ), 7902 ! a && 7903 ( this._prunePositions( +new Date() ), 7904 ( t = this._lastPos.subtract( this._positions[ 0 ] ) ), 7905 ( a = ( this._lastTime - this._times[ 0 ] ) / 1e3 ), 7906 ( e = r.easeLinearity ), 7907 ( a = ( t = t.multiplyBy( e / a ) ).distanceTo( [ 7908 0, 0, 7909 ] ) ), 7910 ( i = Math.min( r.inertiaMaxSpeed, a ) ), 7911 ( t = t.multiplyBy( i / a ) ), 7912 ( n = i / ( r.inertiaDeceleration * e ) ), 7913 ( o = t.multiplyBy( -n / 2 ).round() ).x || o.y ) 7914 ? ( ( o = s._limitOffset( o, s.options.maxBounds ) ), 7915 x( function () { 7916 s.panBy( o, { 7917 duration: n, 7918 easeLinearity: e, 7919 noMoveStart: ! 0, 7920 animate: ! 0, 7921 } ); 7922 } ) ) 7923 : s.fire( 'moveend' ); 7924 }, 7925 } ) ), 7926 O.addInitHook( 'addHandler', 'dragging', Zt ), 7927 O.mergeOptions( { keyboard: ! 0, keyboardPanDelta: 80 } ), 7928 ( St = o.extend( { 7929 keyCodes: { 7930 left: [ 37 ], 7931 right: [ 39 ], 7932 down: [ 40 ], 7933 up: [ 38 ], 7934 zoomIn: [ 187, 107, 61, 171 ], 7935 zoomOut: [ 189, 109, 54, 173 ], 7936 }, 7937 initialize: function ( t ) { 7938 ( this._map = t ), 7939 this._setPanDelta( t.options.keyboardPanDelta ), 7940 this._setZoomDelta( t.options.zoomDelta ); 7941 }, 7942 addHooks: function () { 7943 var t = this._map._container; 7944 t.tabIndex <= 0 && ( t.tabIndex = '0' ), 7945 S( 7946 t, 7947 { 7948 focus: this._onFocus, 7949 blur: this._onBlur, 7950 mousedown: this._onMouseDown, 7951 }, 7952 this 7953 ), 7954 this._map.on( 7955 { focus: this._addHooks, blur: this._removeHooks }, 7956 this 7957 ); 7958 }, 7959 removeHooks: function () { 7960 this._removeHooks(), 7961 E( 7962 this._map._container, 7963 { 7964 focus: this._onFocus, 7965 blur: this._onBlur, 7966 mousedown: this._onMouseDown, 7967 }, 7968 this 7969 ), 7970 this._map.off( 7971 { focus: this._addHooks, blur: this._removeHooks }, 7972 this 7973 ); 7974 }, 7975 _onMouseDown: function () { 7976 var t, e, i; 7977 this._focused || 7978 ( ( i = document.body ), 7979 ( t = document.documentElement ), 7980 ( e = i.scrollTop || t.scrollTop ), 7981 ( i = i.scrollLeft || t.scrollLeft ), 7982 this._map._container.focus(), 7983 window.scrollTo( i, e ) ); 7984 }, 7985 _onFocus: function () { 7986 ( this._focused = ! 0 ), this._map.fire( 'focus' ); 7987 }, 7988 _onBlur: function () { 7989 ( this._focused = ! 1 ), this._map.fire( 'blur' ); 7990 }, 7991 _setPanDelta: function ( t ) { 7992 for ( 7993 var e = ( this._panKeys = {} ), 7994 i = this.keyCodes, 7995 n = 0, 7996 o = i.left.length; 7997 n < o; 7998 n++ 7999 ) 8000 e[ i.left[ n ] ] = [ -1 * t, 0 ]; 8001 for ( n = 0, o = i.right.length; n < o; n++ ) 8002 e[ i.right[ n ] ] = [ t, 0 ]; 8003 for ( n = 0, o = i.down.length; n < o; n++ ) 8004 e[ i.down[ n ] ] = [ 0, t ]; 8005 for ( n = 0, o = i.up.length; n < o; n++ ) 8006 e[ i.up[ n ] ] = [ 0, -1 * t ]; 8007 }, 8008 _setZoomDelta: function ( t ) { 8009 for ( 8010 var e = ( this._zoomKeys = {} ), 8011 i = this.keyCodes, 8012 n = 0, 8013 o = i.zoomIn.length; 8014 n < o; 8015 n++ 8016 ) 8017 e[ i.zoomIn[ n ] ] = t; 8018 for ( n = 0, o = i.zoomOut.length; n < o; n++ ) 8019 e[ i.zoomOut[ n ] ] = -t; 8020 }, 8021 _addHooks: function () { 8022 S( document, 'keydown', this._onKeyDown, this ); 8023 }, 8024 _removeHooks: function () { 8025 E( document, 'keydown', this._onKeyDown, this ); 8026 }, 8027 _onKeyDown: function ( t ) { 8028 if ( ! ( t.altKey || t.ctrlKey || t.metaKey ) ) { 8029 var e, 8030 i = t.keyCode, 8031 n = this._map; 8032 if ( i in this._panKeys )
8033 ( n._panAnim && n._panAnim._inProgress ) || 8034 ( ( e = this._panKeys[ i ] ), 8035 t.shiftKey && ( e = m( e ).multiplyBy( 3 ) ), 8036 n.panBy( e ), 8037 n.options.maxBounds && 8038 n.panInsideBounds( n.options.maxBounds ) ); 8039 else if ( i in this._zoomKeys ) 8040 n.setZoom( 8041 n.getZoom() + 8042 ( t.shiftKey ? 3 : 1 ) * this._zoomKeys[ i ] 8043 ); 8044 else { 8045 if ( 8046 27 !== i || 8047 ! n._popup || 8048 ! n._popup.options.closeOnEscapeKey 8049 ) 8050 return; 8051 n.closePopup(); 8052 } 8053 De( t ); 8054 } 8055 }, 8056 } ) ), 8057 O.addInitHook( 'addHandler', 'keyboard', St ), 8058 O.mergeOptions( { 8059 scrollWheelZoom: ! 0, 8060 wheelDebounceTime: 40, 8061 wheelPxPerZoomLevel: 60, 8062 } ), 8063 ( Et = o.extend( { 8064 addHooks: function () { 8065 S( this._map._container, 'wheel', this._onWheelScroll, this ), 8066 ( this._delta = 0 ); 8067 }, 8068 removeHooks: function () { 8069 E( this._map._container, 'wheel', this._onWheelScroll, this ); 8070 }, 8071 _onWheelScroll: function ( t ) { 8072 var e = We( t ), 8073 i = this._map.options.wheelDebounceTime, 8074 e = 8075 ( ( this._delta += e ), 8076 ( this._lastMousePos = 8077 this._map.mouseEventToContainerPoint( t ) ), 8078 this._startTime || ( this._startTime = +new Date() ), 8079 Math.max( i - ( +new Date() - this._startTime ), 0 ) ); 8080 clearTimeout( this._timer ), 8081 ( this._timer = setTimeout( 8082 a( this._performZoom, this ), 8083 e 8084 ) ), 8085 De( t ); 8086 }, 8087 _performZoom: function () { 8088 var t = this._map, 8089 e = t.getZoom(), 8090 i = this._map.options.zoomSnap || 0, 8091 n = 8092 ( t._stop(), 8093 this._delta / 8094 ( 4 * this._map.options.wheelPxPerZoomLevel ) ), 8095 n = 8096 ( 4 * 8097 Math.log( 8098 2 / ( 1 + Math.exp( -Math.abs( n ) ) ) 8099 ) ) / 8100 Math.LN2, 8101 i = i ? Math.ceil( n / i ) * i : n, 8102 n = t._limitZoom( e + ( 0 < this._delta ? i : -i ) ) - e; 8103 ( this._delta = 0 ), 8104 ( this._startTime = null ), 8105 n && 8106 ( 'center' === t.options.scrollWheelZoom 8107 ? t.setZoom( e + n ) 8108 : t.setZoomAround( this._lastMousePos, e + n ) ); 8109 }, 8110 } ) ), 8111 O.addInitHook( 'addHandler', 'scrollWheelZoom', Et ), 8112 O.mergeOptions( { 8113 tapHold: b.touchNative && b.safari && b.mobile, 8114 tapTolerance: 15, 8115 } ), 8116 ( kt = o.extend( { 8117 addHooks: function () { 8118 S( this._map._container, 'touchstart', this._onDown, this ); 8119 }, 8120 removeHooks: function () { 8121 E( this._map._container, 'touchstart', this._onDown, this ); 8122 }, 8123 _onDown: function ( t ) { 8124 var e; 8125 clearTimeout( this._holdTimeout ), 8126 1 === t.touches.length && 8127 ( ( e = t.touches[ 0 ] ), 8128 ( this._startPos = this._newPos = 8129 new p( e.clientX, e.clientY ) ), 8130 ( this._holdTimeout = setTimeout( 8131 a( function () { 8132 this._cancel(), 8133 this._isTapValid() && 8134 ( S( document, 'touchend', k ), 8135 S( 8136 document, 8137 'touchend touchcancel', 8138 this._cancelClickPrevent 8139 ), 8140 this._simulateEvent( 8141 'contextmenu', 8142 e 8143 ) ); 8144 }, this ), 8145 600 8146 ) ), 8147 S( 8148 document, 8149 'touchend touchcancel contextmenu', 8150 this._cancel, 8151 this 8152 ), 8153 S( document, 'touchmove', this._onMove, this ) ); 8154 }, 8155 _cancelClickPrevent: function t() { 8156 E( document, 'touchend', k ), 8157 E( document, 'touchend touchcancel', t ); 8158 }, 8159 _cancel: function () { 8160 clearTimeout( this._holdTimeout ), 8161 E( 8162 document, 8163 'touchend touchcancel contextmenu', 8164 this._cancel, 8165 this 8166 ), 8167 E( document, 'touchmove', this._onMove, this ); 8168 }, 8169 _onMove: function ( t ) { 8170 t = t.touches[ 0 ]; 8171 this._newPos = new p( t.clientX, t.clientY ); 8172 }, 8173 _isTapValid: function () { 8174 return ( 8175 this._newPos.distanceTo( this._startPos ) <= 8176 this._map.options.tapTolerance 8177 ); 8178 }, 8179 _simulateEvent: function ( t, e ) { 8180 t = new MouseEvent( t, { 8181 bubbles: ! 0, 8182 cancelable: ! 0, 8183 view: window, 8184 screenX: e.screenX, 8185 screenY: e.screenY, 8186 clientX: e.clientX, 8187 clientY: e.clientY, 8188 } ); 8189 ( t._simulated = ! 0 ), e.target.dispatchEvent( t ); 8190 }, 8191 } ) ), 8192 O.addInitHook( 'addHandler', 'tapHold', kt ),
8193 O.mergeOptions( { touchZoom: b.touch, bounceAtZoomLimits: ! 0 } ), 8194 ( Ot = o.extend( { 8195 addHooks: function () { 8196 M( this._map._container, 'leaflet-touch-zoom' ), 8197 S( 8198 this._map._container, 8199 'touchstart', 8200 this._onTouchStart, 8201 this 8202 ); 8203 }, 8204 removeHooks: function () { 8205 z( this._map._container, 'leaflet-touch-zoom' ), 8206 E( 8207 this._map._container, 8208 'touchstart', 8209 this._onTouchStart, 8210 this 8211 ); 8212 }, 8213 _onTouchStart: function ( t ) { 8214 var e, 8215 i, 8216 n = this._map; 8217 ! t.touches || 8218 2 !== t.touches.length || 8219 n._animatingZoom || 8220 this._zooming || 8221 ( ( e = n.mouseEventToContainerPoint( t.touches[ 0 ] ) ), 8222 ( i = n.mouseEventToContainerPoint( t.touches[ 1 ] ) ), 8223 ( this._centerPoint = n.getSize()._divideBy( 2 ) ), 8224 ( this._startLatLng = n.containerPointToLatLng( 8225 this._centerPoint 8226 ) ), 8227 'center' !== n.options.touchZoom && 8228 ( this._pinchStartLatLng = n.containerPointToLatLng( 8229 e.add( i )._divideBy( 2 ) 8230 ) ), 8231 ( this._startDist = e.distanceTo( i ) ), 8232 ( this._startZoom = n.getZoom() ), 8233 ( this._moved = ! 1 ), 8234 ( this._zooming = ! 0 ), 8235 n._stop(), 8236 S( document, 'touchmove', this._onTouchMove, this ), 8237 S( 8238 document, 8239 'touchend touchcancel', 8240 this._onTouchEnd, 8241 this 8242 ), 8243 k( t ) ); 8244 }, 8245 _onTouchMove: function ( t ) { 8246 if ( t.touches && 2 === t.touches.length && this._zooming ) { 8247 var e = this._map, 8248 i = e.mouseEventToContainerPoint( t.touches[ 0 ] ), 8249 n = e.mouseEventToContainerPoint( t.touches[ 1 ] ), 8250 o = i.distanceTo( n ) / this._startDist; 8251 if ( 8252 ( ( this._zoom = e.getScaleZoom( o, this._startZoom ) ), 8253 ! e.options.bounceAtZoomLimits && 8254 ( ( this._zoom < e.getMinZoom() && o < 1 ) || 8255 ( this._zoom > e.getMaxZoom() && 1 < o ) ) && 8256 ( this._zoom = e._limitZoom( this._zoom ) ), 8257 'center' === e.options.touchZoom ) 8258 ) { 8259 if ( ( ( this._center = this._startLatLng ), 1 == o ) ) 8260 return; 8261 } else { 8262 i = i 8263 ._add( n ) 8264 ._divideBy( 2 ) 8265 ._subtract( this._centerPoint ); 8266 if ( 1 == o && 0 === i.x && 0 === i.y ) return; 8267 this._center = e.unproject( 8268 e 8269 .project( this._pinchStartLatLng, this._zoom ) 8270 .subtract( i ), 8271 this._zoom 8272 ); 8273 } 8274 this._moved || 8275 ( e._moveStart( ! 0, ! 1 ), ( this._moved = ! 0 ) ), 8276 r( this._animRequest ); 8277 n = a( 8278 e._move, 8279 e, 8280 this._center, 8281 this._zoom, 8282 { pinch: ! 0, round: ! 1 }, 8283 void 0 8284 ); 8285 ( this._animRequest = x( n, this, ! 0 ) ), k( t ); 8286 } 8287 }, 8288 _onTouchEnd: function () { 8289 this._moved && this._zooming 8290 ? ( ( this._zooming = ! 1 ), 8291 r( this._animRequest ), 8292 E( document, 'touchmove', this._onTouchMove, this ), 8293 E( 8294 document, 8295 'touchend touchcancel', 8296 this._onTouchEnd, 8297 this 8298 ), 8299 this._map.options.zoomAnimation 8300 ? this._map._animateZoom( 8301 this._center, 8302 this._map._limitZoom( this._zoom ), 8303 ! 0, 8304 this._map.options.zoomSnap 8305 ) 8306 : this._map._resetView( 8307 this._center, 8308 this._map._limitZoom( this._zoom ) 8309 ) ) 8310 : ( this._zooming = ! 1 ); 8311 }, 8312 } ) ); 8313 O.addInitHook( 'addHandler', 'touchZoom', Ot ), 8314 ( O.BoxZoom = _t ), 8315 ( O.DoubleClickZoom = Ct ), 8316 ( O.Drag = Zt ), 8317 ( O.Keyboard = St ), 8318 ( O.ScrollWheelZoom = Et ), 8319 ( O.TapHold = kt ), 8320 ( O.TouchZoom = Ot ); 8321 var pn = l( 8322 { 8323 __proto__: null, 8324 version: R, 8325 Control: B, 8326 control: qe, 8327 Class: e, 8328 Handler: o, 8329 extend: l, 8330 bind: a, 8331 stamp: h, 8332 setOptions: c, 8333 Browser: b, 8334 Evented: it, 8335 Mixin: ft, 8336 Util: et, 8337 PosAnimation: Ve, 8338 Draggable: ti, 8339 DomEvent: mt, 8340 DomUtil: pt, 8341 Point: p, 8342 point: m, 8343 Bounds: f, 8344 bounds: _, 8345 Transformation: at, 8346 transformation: ht, 8347 LineUtil: gt, 8348 PolyUtil: vt, 8349 LatLng: v, 8350 latLng: w, 8351 LatLngBounds: s, 8352 latLngBounds: g, 8353 CRS: ot, 8354 Projection: wt, 8355 Layer: y, 8356 LayerGroup: pi, 8357 layerGroup: ci, 8358 FeatureGroup: mi, 8359 featureGroup: di, 8360 ImageOverlay: Fi, 8361 imageOverlay: Hi, 8362 VideoOverlay: Wi, 8363 videoOverlay: Ui, 8364 SVGOverlay: Vi, 8365 svgOverlay: Gi, 8366 DivOverlay: I, 8367 Popup: Yi, 8368 popup: qi, 8369 Tooltip: Ji, 8370 tooltip: Ki, 8371 icon: gi, 8372 DivIcon: Xi, 8373 divIcon: $i, 8374 Marker: xi, 8375 marker: wi, 8376 Icon: fi, 8377 GridLayer: Qi, 8378 gridLayer: tn, 8379 TileLayer: en, 8380 tileLayer: nn, 8381 Renderer: sn, 8382 Canvas: rn, 8383 canvas: an, 8384 Path: bi, 8385 CircleMarker: Pi, 8386 circleMarker: Li, 8387 Circle: Ti, 8388 circle: Mi, 8389 Polyline: zi, 8390 polyline: Ci, 8391 Polygon: Zi, 8392 polygon: Si, 8393 Rectangle: dn, 8394 rectangle: _n, 8395 SVG: un, 8396 svg: cn, 8397 GeoJSON: Ei, 8398 geoJSON: ji, 8399 geoJson: Mt, 8400 Map: O, 8401 map: Ge, 8402 }, 8403 { noConflict: gn } 8404 ), 8405 mn = ( function () { 8406 if ( 'undefined' != typeof globalThis ) return globalThis; 8407 if ( 'undefined' != typeof self ) return self; 8408 if ( 'undefined' != typeof window ) return window; 8409 if ( 'undefined' == typeof global ) 8410 throw new Error( 'Unable to locate global object.' ); 8411 return global; 8412 } )(), 8413 fn = mn.L; 8414 function gn() { 8415 return ( mn.L = fn ), pn; 8416 } 8417 ( mn.L = pn ), 8418 ( t.Bounds = f ), 8419 ( t.Browser = b ), 8420 ( t.CRS = ot ), 8421 ( t.Canvas = rn ), 8422 ( t.Circle = Ti ), 8423 ( t.CircleMarker = Pi ), 8424 ( t.Class = e ), 8425 ( t.Control = B ), 8426 ( t.DivIcon = Xi ), 8427 ( t.DivOverlay = I ), 8428 ( t.DomEvent = mt ), 8429 ( t.DomUtil = pt ), 8430 ( t.Draggable = ti ), 8431 ( t.Evented = it ), 8432 ( t.FeatureGroup = mi ), 8433 ( t.GeoJSON = Ei ), 8434 ( t.GridLayer = Qi ), 8435 ( t.Handler = o ), 8436 ( t.Icon = fi ), 8437 ( t.ImageOverlay = Fi ), 8438 ( t.LatLng = v ),
8439 ( t.LatLngBounds = s ), 8440 ( t.Layer = y ), 8441 ( t.LayerGroup = pi ), 8442 ( t.LineUtil = gt ), 8443 ( t.Map = O ), 8444 ( t.Marker = xi ), 8445 ( t.Mixin = ft ), 8446 ( t.Path = bi ), 8447 ( t.Point = p ), 8448 ( t.PolyUtil = vt ), 8449 ( t.Polygon = Zi ), 8450 ( t.Polyline = zi ), 8451 ( t.Popup = Yi ), 8452 ( t.PosAnimation = Ve ), 8453 ( t.Projection = wt ), 8454 ( t.Rectangle = dn ), 8455 ( t.Renderer = sn ), 8456 ( t.SVG = un ), 8457 ( t.SVGOverlay = Vi ), 8458 ( t.TileLayer = en ), 8459 ( t.Tooltip = Ji ), 8460 ( t.Transformation = at ), 8461 ( t.Util = et ), 8462 ( t.VideoOverlay = Wi ), 8463 ( t.bind = a ), 8464 ( t.bounds = _ ), 8465 ( t.canvas = an ), 8466 ( t.circle = Mi ), 8467 ( t.circleMarker = Li ), 8468 ( t.control = qe ), 8469 ( t.default = pn ), 8470 ( t.divIcon = $i ), 8471 ( t.extend = l ), 8472 ( t.featureGroup = di ), 8473 ( t.geoJSON = ji ), 8474 ( t.geoJson = Mt ), 8475 ( t.gridLayer = tn ), 8476 ( t.icon = gi ), 8477 ( t.imageOverlay = Hi ), 8478 ( t.latLng = w ), 8479 ( t.latLngBounds = g ), 8480 ( t.layerGroup = ci ), 8481 ( t.map = Ge ), 8482 ( t.marker = wi ), 8483 ( t.noConflict = gn ), 8484 ( t.point = m ), 8485 ( t.polygon = Si ), 8486 ( t.polyline = Ci ), 8487 ( t.popup = qi ), 8488 ( t.rectangle = _n ), 8489 ( t.setOptions = c ), 8490 ( t.stamp = h ), 8491 ( t.svg = cn ), 8492 ( t.svgOverlay = Gi ), 8493 ( t.tileLayer = nn ), 8494 ( t.tooltip = Ki ), 8495 ( t.transformation = ht ), 8496 ( t.version = R ), 8497 ( t.videoOverlay = Ui ); 8498} ); 8499//# sourceMappingURL=leaflet.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.