seatyjs
Version:
Event seating interactive map component. Dynamically loads the SVG event map and renders available seats on it
1 lines • 342 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("backbone"),require("jquery"),require("underscore")):"function"==typeof define&&define.amd?define("seatyjs",["backbone","jquery","underscore"],e):"object"==typeof exports?exports.seatyjs=e(require("backbone"),require("jquery"),require("underscore")):t.seatyjs=e(t.backbone,t.jquery,t.underscore)}(this,function(t,e,n){return function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=109)}([function(t,e,n){var i,o;i=[n,e],void 0!==(o=function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FanZoneType=e.METADATA_DICTIONARY=e.SEAT_STATUS_ID=void 0,e.SEAT_STATUS_ID={undefined:0,available:1,inCart:2,sold:3,reserved:4,outToRetail:5,paymentPending:6,booked:7},e.METADATA_DICTIONARY={containers:{fanZone:"fanZoneMetadata",nestedSectorContents:"nestedSectorContents",seatMetadata:"seatMetadata",sectorMetadata:"sectorMetadata",seatStatuses:"seatStatuses",ticketTypes:"ticketTypes"},seat:{id:"id",seatId:"seatUid",seatStatusId:"seatStatusId",sectorElId:"sector",row:"row",seat:"seat",sectorTitle:"sectorTitle",seatHint:"seatHint",ticketTypeId:"ticketTypeId",seatContainer:"seatContainer",extraInfo:"extraInfo"},fanZone:{id:"sectorId",sectorId:"sectorId",title:"title",sectorElId:"sectorElId",ticketTypeId:"ticketTypeId",zoneType:"zoneType",numAvailable:"quoteAvailable"},sector:{id:"id",tierId:"tierId",name:"name",tagIdName:"tagIdName",nested:"nested",color:"color",className:"class"},ticketType:{id:"id",color:"TTColor",currencyCode:"currencyCode",price:"price",className:"className",groupId:"groupId",childTypeId:"childTypeId",childTypeMinLimit:"childTypeMinLimit",childTypeMaxLimit:"childTypeMaxLimit",titlePrint:"titlePrint"},sectorContent:{id:"id",contentArray:"contentArray",currencyCode:"currencyCode",numAvailable:"numAvailable",price:"price",sectorId:"sectorId"},seatStatuses:{undefined:"undefined",available:"available",inCart:"inCart",sold:"sold",reserved:"reserved",outToRetail:"outToRetail",paymentPending:"paymentPending",booked:"booked",defaultClass:"seat-default",id:"id",statusName:"statusName",fill:"fill",stroke:"stroke",className:"className",statusDescription:"statusDescription"}};!function(t){t[t.fanZone=1]="fanZone",t[t.box=6]="box",t[t.table=7]="table"}(e.FanZoneType||(e.FanZoneType={}))}.apply(e,i))&&(t.exports=o)},function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t,e,n){var i,o;i=[n,e,n(4),n(6),n(10),n(0),n(0)],void 0!==(o=function(t,e,n,i,o,r,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Map=e.DEFAULT_CURRENCY=e.ON_HOVER_SEAT_ENLARGE=e.SEAT_UNCHECKED_OPACITY=e.SEAT_CHECKED_OPACITY=e.SEAT_STROKE_OPACITY=e.SEAT_STROKE_WIDTH=e.DEFAULT_MAP_ZOOM=e.MAX_MAP_ZOOM=e.MIN_MAP_ZOOM=e.SVG_DOC_ROOT_ID=void 0,Object.defineProperty(e,"SEAT_STATUS_ID",{enumerable:!0,get:function(){return s.SEAT_STATUS_ID}}),Object.defineProperty(e,"FanZoneType",{enumerable:!0,get:function(){return s.FanZoneType}}),e.SVG_DOC_ROOT_ID="svg-doc-root",e.MIN_MAP_ZOOM=0,e.MAX_MAP_ZOOM=3,e.DEFAULT_MAP_ZOOM=1,e.SEAT_STROKE_WIDTH=3,e.SEAT_STROKE_OPACITY=1,e.SEAT_CHECKED_OPACITY=1,e.SEAT_UNCHECKED_OPACITY=.2,e.ON_HOVER_SEAT_ENLARGE=1.3,e.DEFAULT_CURRENCY="UAH";var a=function(){function t(t){if(this.eventId=t.eventId,this.rootTierId=t.rootTierId,!t.seatyContainer)throw new Error("Cannot initialize seating map due to invalid config supplied!");this.containerView=new i.ContainerView(t.tierDataProvider,t.metadataMapper,t.mediatorService,t.legendComponent,t.loaderComponent,{el:t.seatyContainer}),t.mediatorService.onAdd(this),t.legendComponent&&t.legendComponent.onAdd(this),t.loaderComponent&&"function"==typeof t.loaderComponent.onAdd&&t.loaderComponent.onAdd(this),t.svgDocRootId&&(e.SVG_DOC_ROOT_ID=t.svgDocRootId),n.trigger("seatyjs:loading:start"),this.containerView.switchToTier(t.rootTierId).then(function(){n.trigger("seatyjs:loading:done")}).catch(function(){n.trigger("seatyjs:loading:fail")})}return t.prototype.destroy=function(){this.containerView.destroy(),delete this.containerView,delete this.mapper},t.prototype.updateSeatStatus=function(t,e){var n=this.findSeatModel(t);return!!n&&(n.setSeatStatusId(e),!0)},t.prototype.updateSeatTicketType=function(t,e){var n=this.findSeatModel(t);return!!n&&(n.setTicketTypeId(e),!0)},t.prototype.updateFanZoneTicketType=function(t,e,n){var i=this.findFanZoneModel(t);return!!i&&(i.setTicketTypeId(e),n&&i.setTitle(n),this.containerView.redrawLegend(),!0)},t.prototype.addTicketType=function(t){var e=o.TicketTypeModel.initWithData(t);return this.containerView.tierCollection.iterate(function(t){return t.metadataContainer.ticketTypes.add(e),!1},!1),i.TicketTypeView.initFromTicketTypeModel(e),e},t.prototype.updateTicketTypeModel=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var i,o=this.containerView.tierCollection,r=function(t,e){return e.forEach(function(e){return t.set(e)})};return o.iterate(function(n){return i=n.metadataContainer.ticketTypes.filter(function(e){return e.id===t})[0],i&&r(i,e),!1},!1),i},t.prototype.findSeatModel=function(t){var e;return this.containerView.tierCollection.iterate(function(n){var i=n.metadataContainer.seatMetadata,o=i.findWhere({id:t});return!!o&&(e=o,!0)},!0),e},t.prototype.findFanZoneModel=function(t){var e,n=r.METADATA_DICTIONARY.fanZone.id;return this.containerView.tierCollection.iterate(function(i){var o,r=i.metadataContainer.fanZoneMetadata,s=r.findWhere((o={},o[n]=t,o));return!!s&&(e=s,!0)},!0),e},t.prototype.findSeatModelByAttributes=function(t,e,n){var i,o=(this.containerView.mapper,r.METADATA_DICTIONARY.seat.seat),s=r.METADATA_DICTIONARY.seat.row,a=r.METADATA_DICTIONARY.seat.sectorTitle;return this.containerView.tierCollection.iterate(function(r){var u,h=r.metadataContainer.seatMetadata,c=(u={},u[o]=String(t),u[s]=String(e),u[a]=n,u),l=h.findWhere(c);return!!l&&(i=l,!0)},!0),i},t.prototype.findSeatModelsByTicketType=function(t){var e=r.METADATA_DICTIONARY.seat.ticketTypeId,n=[];return this.containerView.tierCollection.iterate(function(i){var o=i.metadataContainer.seatMetadata.filter(function(n){return n.get(e)===t||n.get(e)===t.toString()});return n=n.concat(o),!1},!1),n},t}();e.Map=a}.apply(e,i))&&(t.exports=o)},function(t,e,n){var i;!function(o){"use strict";void 0!==(i=function(t){function e(t,e,n,i){var o=A.resolve(t);return arguments.length<2?o:o.then(e,n,i)}function i(t){return new A(t)}function o(t){return function(){for(var e=0,n=arguments.length,i=new Array(n);e<n;++e)i[e]=arguments[e];return C(t,this,i)}}function r(t){for(var e=0,n=arguments.length-1,i=new Array(n);e<n;++e)i[e]=arguments[e+1];return C(t,this,i)}function s(){return new a}function a(){function t(t){i._handler.resolve(t)}function e(t){i._handler.reject(t)}function n(t){i._handler.notify(t)}var i=A._defer();this.promise=i,this.resolve=t,this.reject=e,this.notify=n,this.resolver={resolve:t,reject:e,notify:n}}function u(t){return t&&"function"==typeof t.then}function h(){return A.all(arguments)}function c(t){return e(t,A.all)}function l(t){return e(t,A.settle)}function d(t,n){return e(t,function(t){return A.map(t,n)})}function p(t,n){return e(t,function(t){return A.filter(t,n)})}var f=n(50),m=n(44),_=n(45),v=n(46),y=n(47),g=n(48),T=n(49),x=n(52),b=n(51),w=n(17),A=[m,_,v,g,T,y,x,f,b].reduce(function(t,e){return e(t)},n(42)),C=n(18)(A);return e.promise=i,e.resolve=A.resolve,e.reject=A.reject,e.lift=o,e.try=r,e.attempt=r,e.iterate=A.iterate,e.unfold=A.unfold,e.join=h,e.all=c,e.settle=l,e.any=o(A.any),e.some=o(A.some),e.race=o(A.race),e.map=d,e.filter=p,e.reduce=o(A.reduce),e.reduceRight=o(A.reduceRight),e.isPromiseLike=u,e.Promise=A,e.defer=s,e.TimeoutError=w,e}.call(e,n,e,t))&&(t.exports=i)}(n(1))},function(e,n){e.exports=t},function(t,e,n){var i,o,r=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();i=[n,e,n(4)],void 0!==(o=function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMetadataModel=void 0;var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getByAttribute=function(t){return this.get(t)},e}(n.Model);e.AbstractMetadataModel=i}.apply(e,i))&&(t.exports=o)},function(t,e,n){var i,o,r=this&&this.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),s=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};i=[n,e,n(11),n(103),n(15),n(104),n(34),n(35),n(105),n(106),n(107),n(36),n(37),n(108)],void 0!==(o=function(t,e,n,i,o,r,a,u,h,c,l,d,p,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),s(n,e),s(i,e),s(o,e),s(r,e),s(a,e),s(u,e),s(h,e),s(c,e),s(l,e),s(d,e),s(p,e),s(f,e)}.apply(e,i))&&(t.exports=o)},function(t,n){t.exports=e},function(t,e,n){!function(t,n){n(e)}(0,function(t){"use strict";function e(t){var e,n,i,o;for(n=1,i=arguments.length;n<i;n++){o=arguments[n];for(e in o)t[e]=o[e]}return t}function n(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}function i(t){return t._leaflet_id=t._leaflet_id||++ve,t._leaflet_id}function o(t,e,n){var i,o,r,s;return s=function(){i=!1,o&&(r.apply(n,o),o=!1)},r=function(){i?o=arguments:(t.apply(n,arguments),setTimeout(s,e),i=!0)}}function r(t,e,n){var i=e[1],o=e[0],r=i-o;return t===i&&n?t:((t-o)%r+r)%r+o}function s(){return!1}function a(t,e){var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function h(t){return u(t).split(/\s+/)}function c(t,e){t.hasOwnProperty("options")||(t.options=t.options?_e(t.options):{});for(var n in e)t.options[n]=e[n];return t.options}function l(t,e,n){var i=[];for(var o in t)i.push(encodeURIComponent(n?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}function d(t,e){return t.replace(ye,function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(e)),i})}function p(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}function f(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}function m(t){var e=+new Date,n=Math.max(0,16-(e-xe));return xe=e+n,window.setTimeout(t,n)}function _(t,e,i){if(!i||be!==m)return be.call(window,n(t,e));t.call(e)}function v(t){t&&we.call(window,t)}function y(){}function g(t){if("undefined"!=typeof L&&L&&L.Mixin){t=ge(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}function T(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}function x(t,e,n){return t instanceof T?t:ge(t)?new T(t[0],t[1]):void 0===t||null===t?t:"object"==typeof t&&"x"in t&&"y"in t?new T(t.x,t.y):new T(t,e,n)}function b(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function w(t,e){return!t||t instanceof b?t:new b(t,e)}function A(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function C(t,e){return t instanceof A?t:new A(t,e)}function S(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function M(t,e,n){return t instanceof S?t:ge(t)&&"object"!=typeof t[0]?3===t.length?new S(t[0],t[1],t[2]):2===t.length?new S(t[0],t[1]):null:void 0===t||null===t?t:"object"==typeof t&&"lat"in t?new S(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new S(t,e,n)}function P(t,e,n,i){if(ge(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=i}function k(t,e,n,i){return new P(t,e,n,i)}function E(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function O(t,e){var n,i,o,r,s,a,u="";for(n=0,o=t.length;n<o;n++){for(s=t[n],i=0,r=s.length;i<r;i++)a=s[i],u+=(i?"L":"M")+a.x+" "+a.y;u+=e?fn?"z":"x":""}return u||"M0 0"}function I(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}function D(t,e,n,i){return"touchstart"===e?j(t,n,i):"touchmove"===e?F(t,n,i):"touchend"===e&&H(t,n,i),this}function N(t,e,n){var i=t["_leaflet_"+e+n];return"touchstart"===e?t.removeEventListener(vn,i,!1):"touchmove"===e?t.removeEventListener(yn,i,!1):"touchend"===e&&(t.removeEventListener(gn,i,!1),t.removeEventListener(Tn,i,!1)),this}function j(t,e,i){var o=n(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(xn.indexOf(t.target.tagName)<0))return;bt(t)}Z(t,e)});t["_leaflet_touchstart"+i]=o,t.addEventListener(vn,o,!1),wn||(document.documentElement.addEventListener(vn,z,!0),document.documentElement.addEventListener(yn,B,!0),document.documentElement.addEventListener(gn,R,!0),document.documentElement.addEventListener(Tn,R,!0),wn=!0)}function z(t){bn[t.pointerId]=t,An++}function B(t){bn[t.pointerId]&&(bn[t.pointerId]=t)}function R(t){delete bn[t.pointerId],An--}function Z(t,e){t.touches=[];for(var n in bn)t.touches.push(bn[n]);t.changedTouches=[t],e(t)}function F(t,e,n){var i=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&Z(t,e)};t["_leaflet_touchmove"+n]=i,t.addEventListener(yn,i,!1)}function H(t,e,n){var i=function(t){Z(t,e)};t["_leaflet_touchend"+n]=i,t.addEventListener(gn,i,!1),t.addEventListener(Tn,i,!1)}function V(t,e,n){function i(t){var e;if(an){if(!Re||"mouse"===t.pointerType)return;e=An}else e=t.touches.length;if(!(e>1)){var n=Date.now(),i=n-(r||n);s=t.touches?t.touches[0]:t,a=i>0&&i<=u,r=n}}function o(t){if(a&&!s.cancelBubble){if(an){if(!Re||"mouse"===t.pointerType)return;var n,i,o={};for(i in s)n=s[i],o[i]=n&&n.bind?n.bind(s):n;s=o}s.type="dblclick",s.button=0,e(s),r=null}}var r,s,a=!1,u=250;return t[Mn+Cn+n]=i,t[Mn+Sn+n]=o,t[Mn+"dblclick"+n]=e,t.addEventListener(Cn,i,!!dn&&{passive:!1}),t.addEventListener(Sn,o,!!dn&&{passive:!1}),t.addEventListener("dblclick",e,!1),this}function U(t,e){var n=t[Mn+Cn+e],i=t[Mn+Sn+e],o=t[Mn+"dblclick"+e];return t.removeEventListener(Cn,n,!!dn&&{passive:!1}),t.removeEventListener(Sn,i,!!dn&&{passive:!1}),Re||t.removeEventListener("dblclick",o,!1),this}function Y(t){return"string"==typeof t?document.getElementById(t):t}function W(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function q(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function G(t){var e=t.parentNode;e&&e.removeChild(t)}function X(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function K(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function J(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function $(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=nt(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function Q(t,e){if(void 0!==t.classList)for(var n=h(e),i=0,o=n.length;i<o;i++)t.classList.add(n[i]);else if(!$(t,e)){var r=nt(t);et(t,(r?r+" ":"")+e)}}function tt(t,e){void 0!==t.classList?t.classList.remove(e):et(t,u((" "+nt(t)+" ").replace(" "+e+" "," ")))}function et(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function nt(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function it(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&ot(t,e)}function ot(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(t){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}function rt(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function st(t,e,n){var i=e||new T(0,0);t.style[Pn]=($e?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function at(t,e){t._leaflet_pos=e,en?st(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function ut(t){return t._leaflet_pos||new T(0,0)}function ht(){mt(window,"dragstart",bt)}function ct(){_t(window,"dragstart",bt)}function lt(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(dt(),On=t,In=t.style.outline,t.style.outline="none",mt(window,"keydown",dt))}function dt(){On&&(On.style.outline=In,On=void 0,In=void 0,_t(window,"keydown",dt))}function pt(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function ft(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}function mt(t,e,n,i){if("object"==typeof e)for(var o in e)vt(t,o,e[o],n);else{e=h(e);for(var r=0,s=e.length;r<s;r++)vt(t,e[r],n,i)}return this}function _t(t,e,n,i){if("object"==typeof e)for(var o in e)yt(t,o,e[o],n);else if(e){e=h(e);for(var r=0,s=e.length;r<s;r++)yt(t,e[r],n,i)}else{for(var a in t[jn])yt(t,a,t[jn][a]);delete t[jn]}return this}function vt(t,e,n,o){var r=e+i(n)+(o?"_"+i(o):"");if(t[jn]&&t[jn][r])return this;var s=function(e){return n.call(o||t,e||window.event)},a=s;an&&0===e.indexOf("touch")?D(t,e,s,r):!un||"dblclick"!==e||!V||an&&We?"addEventListener"in t?"mousewheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",s,!!dn&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(s=function(e){e=e||window.event,Pt(t,e)&&a(e)},t.addEventListener("mouseenter"===e?"mouseover":"mouseout",s,!1)):("click"===e&&Fe&&(s=function(t){kt(t,a)}),t.addEventListener(e,s,!1)):"attachEvent"in t&&t.attachEvent("on"+e,s):V(t,s,r),t[jn]=t[jn]||{},t[jn][r]=s}function yt(t,e,n,o){var r=e+i(n)+(o?"_"+i(o):""),s=t[jn]&&t[jn][r];if(!s)return this;an&&0===e.indexOf("touch")?N(t,e,r):!un||"dblclick"!==e||!U||an&&We?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",s,!!dn&&{passive:!1}):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,s,!1):"detachEvent"in t&&t.detachEvent("on"+e,s):U(t,r),t[jn][r]=null}function gt(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Mt(t),this}function Tt(t){return vt(t,"mousewheel",gt),this}function xt(t){return mt(t,"mousedown touchstart dblclick",gt),vt(t,"click",St),this}function bt(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function wt(t){return bt(t),gt(t),this}function At(t,e){if(!e)return new T(t.clientX,t.clientY);var n=ft(e),i=n.boundingClientRect;return new T((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}function Ct(t){return Re?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/zn:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function St(t){Bn[t.type]=!0}function Mt(t){var e=Bn[t.type];return Bn[t.type]=!1,e}function Pt(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}function kt(t,e){var n=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,i=Dn&&n-Dn;if(i&&i>100&&i<500||t.target._simulatedClick&&!t._simulated)return void wt(t);Dn=n,e(t)}function Et(t,e){return new Fn(t,e)}function Lt(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=jt(t,n),t=Dt(t,n)}function Ot(t,e,n){return Math.sqrt(Ft(t,e,n,!0))}function It(t,e,n){return Ft(t,e,n)}function Dt(t,e){var n=t.length,i=typeof Uint8Array!=void 0+""?Uint8Array:Array,o=new i(n);o[0]=o[n-1]=1,Nt(t,o,e,0,n-1);var r,s=[];for(r=0;r<n;r++)o[r]&&s.push(t[r]);return s}function Nt(t,e,n,i,o){var r,s,a,u=0;for(s=i+1;s<=o-1;s++)(a=Ft(t[s],t[i],t[o],!0))>u&&(r=s,u=a);u>n&&(e[r]=1,Nt(t,e,n,i,r),Nt(t,e,n,r,o))}function jt(t,e){for(var n=[t[0]],i=1,o=0,r=t.length;i<r;i++)Zt(t[i],t[o])>e&&(n.push(t[i]),o=i);return o<r-1&&n.push(t[r-1]),n}function zt(t,e,n,i,o){var r,s,a,u=i?Qn:Rt(t,n),h=Rt(e,n);for(Qn=h;;){if(!(u|h))return[t,e];if(u&h)return!1;r=u||h,s=Bt(t,e,r,n,o),a=Rt(s,n),r===u?(t=s,u=a):(e=s,h=a)}}function Bt(t,e,n,i,o){var r,s,a=e.x-t.x,u=e.y-t.y,h=i.min,c=i.max;return 8&n?(r=t.x+a*(c.y-t.y)/u,s=c.y):4&n?(r=t.x+a*(h.y-t.y)/u,s=h.y):2&n?(r=c.x,s=t.y+u*(c.x-t.x)/a):1&n&&(r=h.x,s=t.y+u*(h.x-t.x)/a),new T(r,s,o)}function Rt(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function Zt(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function Ft(t,e,n,i){var o,r=e.x,s=e.y,a=n.x-r,u=n.y-s,h=a*a+u*u;return h>0&&(o=((t.x-r)*a+(t.y-s)*u)/h,o>1?(r=n.x,s=n.y):o>0&&(r+=a*o,s+=u*o)),a=t.x-r,u=t.y-s,i?a*a+u*u:new T(r,s)}function Ht(t){return!ge(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Vt(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Ht(t)}function Ut(t,e,n){var i,o,r,s,a,u,h,c,l,d=[1,4,2,8];for(o=0,h=t.length;o<h;o++)t[o]._code=Rt(t[o],e);for(s=0;s<4;s++){for(c=d[s],i=[],o=0,h=t.length,r=h-1;o<h;r=o++)a=t[o],u=t[r],a._code&c?u._code&c||(l=Bt(u,a,c,e,n),l._code=Rt(l,e),i.push(l)):(u._code&c&&(l=Bt(u,a,c,e,n),l._code=Rt(l,e),i.push(l)),i.push(a));t=i}return t}function Yt(t){return new yi(t)}function Wt(t,e){return new xi(t,e)}function qt(t,e){return new wi(t,e)}function Gt(t,e,n){return new Ai(t,e,n)}function Xt(t,e){return new Ci(t,e)}function Kt(t,e){return new Si(t,e)}function Jt(t,e){var n,i,o,r,s="Feature"===t.type?t.geometry:t,a=s?s.coordinates:null,u=[],h=e&&e.pointToLayer,c=e&&e.coordsToLatLng||Qt;if(!a&&!s)return null;switch(s.type){case"Point":return n=c(a),$t(h,t,n,e);case"MultiPoint":for(o=0,r=a.length;o<r;o++)n=c(a[o]),u.push($t(h,t,n,e));return new _i(u);case"LineString":case"MultiLineString":return i=te(a,"LineString"===s.type?0:1,c),new Ci(i,e);case"Polygon":case"MultiPolygon":return i=te(a,"Polygon"===s.type?1:2,c),new Si(i,e);case"GeometryCollection":for(o=0,r=s.geometries.length;o<r;o++){var l=Jt({geometry:s.geometries[o],type:"Feature",properties:t.properties},e);l&&u.push(l)}return new _i(u);default:throw new Error("Invalid GeoJSON object.")}}function $t(t,e,n,i){return t?t(e,n):new xi(n,i&&i.markersInheritOptions&&i)}function Qt(t){return new S(t[1],t[0],t[2])}function te(t,e,n){for(var i,o=[],r=0,s=t.length;r<s;r++)i=e?te(t[r],e-1,n):(n||Qt)(t[r]),o.push(i);return o}function ee(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[a(t.lng,e),a(t.lat,e),a(t.alt,e)]:[a(t.lng,e),a(t.lat,e)]}function ne(t,e,n,i){for(var o=[],r=0,s=t.length;r<s;r++)o.push(e?ne(t[r],e-1,n,i):ee(t[r],i));return!e&&n&&o.push(o[0]),o}function ie(t,n){return t.feature?e({},t.feature,{geometry:n}):oe(n)}function oe(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}function re(t,e){return new Mi(t,e)}function se(t,e,n){return new Oi(t,e,n)}function ae(t,e,n){return new Ii(t,e,n)}function ue(t){return new Ri(t)}function he(t){return new Zi(t)}function ce(t,e){return new Fi(t,e)}function le(t,e){return new Hi(t,e)}function de(t){return pn?new Ui(t):null}function pe(t){return fn||mn?new Gi(t):null}function fe(t,e){return new Xi(t,e)}var me=Object.freeze;Object.freeze=function(t){return t};var _e=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}(),ve=0,ye=/\{ *([\w_-]+) *\}/g,ge=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},Te="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",xe=0,be=window.requestAnimationFrame||f("RequestAnimationFrame")||m,we=window.cancelAnimationFrame||f("CancelAnimationFrame")||f("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)},Ae=(Object.freeze||Object)({freeze:me,extend:e,create:_e,bind:n,lastId:ve,stamp:i,throttle:o,wrapNum:r,falseFn:s,formatNum:a,trim:u,splitWords:h,setOptions:c,getParamString:l,template:d,isArray:ge,indexOf:p,emptyImageUrl:Te,requestFn:be,cancelFn:we,requestAnimFrame:_,cancelAnimFrame:v});y.extend=function(t){var n=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=n.__super__=this.prototype,o=_e(i);o.constructor=n,n.prototype=o;for(var r in this)this.hasOwnProperty(r)&&"prototype"!==r&&"__super__"!==r&&(n[r]=this[r]);return t.statics&&(e(n,t.statics),delete t.statics),t.includes&&(g(t.includes),e.apply(null,[o].concat(t.includes)),delete t.includes),o.options&&(t.options=e(_e(o.options),t.options)),e(o,t),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},n},y.include=function(t){return e(this.prototype,t),this},y.mergeOptions=function(t){return e(this.prototype.options,t),this},y.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var Ce={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else{t=h(t);for(var o=0,r=t.length;o<r;o++)this._on(t[o],e,n)}return this},off:function(t,e,n){if(t)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else{t=h(t);for(var o=0,r=t.length;o<r;o++)this._off(t[o],e,n)}else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var i=this._events[t];i||(i=[],this._events[t]=i),n===this&&(n=void 0);for(var o={fn:e,ctx:n},r=i,s=0,a=r.length;s<a;s++)if(r[s].fn===e&&r[s].ctx===n)return;r.push(o)},_off:function(t,e,n){var i,o,r;if(this._events&&(i=this._events[t])){if(!e){for(o=0,r=i.length;o<r;o++)i[o].fn=s;return void delete this._events[t]}if(n===this&&(n=void 0),i)for(o=0,r=i.length;o<r;o++){var a=i[o];if(a.ctx===n&&a.fn===e)return a.fn=s,this._firingCount&&(this._events[t]=i=i.slice()),void i.splice(o,1)}}},fire:function(t,n,i){if(!this.listens(t,i))return this;var o=e({},n,{type:t,target:this,sourceTarget:n&&n.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var s=0,a=r.length;s<a;s++){var u=r[s];u.fn.call(u.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e){var n=this._events&&this._events[t];if(n&&n.length)return!0;if(e)for(var i in this._eventParents)if(this._eventParents[i].listens(t,e))return!0;return!1},once:function(t,e,i){if("object"==typeof t){for(var o in t)this.once(o,t[o],e);return this}var r=n(function(){this.off(t,e,i).off(t,r,i)},this);return this.on(t,e,i).on(t,r,i)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[i(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[i(t)],this},_propagateEvent:function(t){for(var n in this._eventParents)this._eventParents[n].fire(t.type,e({layer:t.target,propagatedFrom:t.target},t),!0)}};Ce.addEventListener=Ce.on,Ce.removeEventListener=Ce.clearAllEventListeners=Ce.off,Ce.addOneTimeEventListener=Ce.once,Ce.fireEvent=Ce.fire,Ce.hasEventListeners=Ce.listens;var Se=y.extend(Ce),Me=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};T.prototype={clone:function(){return new T(this.x,this.y)},add:function(t){return this.clone()._add(x(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(x(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new T(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new T(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=Me(this.x),this.y=Me(this.y),this},distanceTo:function(t){t=x(t);var e=t.x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return t=x(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=x(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+a(this.x)+", "+a(this.y)+")"}},b.prototype={extend:function(t){return t=x(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new T((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new T(this.min.x,this.max.y)},getTopRight:function(){return new T(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return t="number"==typeof t[0]||t instanceof T?x(t):w(t),t instanceof b?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=w(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>=e.x&&i.x<=n.x,s=o.y>=e.y&&i.y<=n.y;return r&&s},overlaps:function(t){t=w(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>e.x&&i.x<n.x,s=o.y>e.y&&i.y<n.y;return r&&s},isValid:function(){return!(!this.min||!this.max)}},A.prototype={extend:function(t){var e,n,i=this._southWest,o=this._northEast;if(t instanceof S)e=t,n=t;else{if(!(t instanceof A))return t?this.extend(M(t)||C(t)):this;if(e=t._southWest,n=t._northEast,!e||!n)return this}return i||o?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),o.lat=Math.max(n.lat,o.lat),o.lng=Math.max(n.lng,o.lng)):(this._southWest=new S(e.lat,e.lng),this._northEast=new S(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,o=Math.abs(e.lng-n.lng)*t;return new A(new S(e.lat-i,e.lng-o),new S(n.lat+i,n.lng+o))},getCenter:function(){return new S((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new S(this.getNorth(),this.getWest())},getSouthEast:function(){return new S(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof S||"lat"in t?M(t):C(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof A?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=o.lat&&e.lng>=i.lng&&n.lng<=o.lng},intersects:function(t){t=C(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>=e.lat&&i.lat<=n.lat,s=o.lng>=e.lng&&i.lng<=n.lng;return r&&s},overlaps:function(t){t=C(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>e.lat&&i.lat<n.lat,s=o.lng>e.lng&&i.lng<n.lng;return r&&s},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=C(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},S.prototype={equals:function(t,e){return!!t&&(t=M(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+a(this.lat,t)+", "+a(this.lng,t)+")"},distanceTo:function(t){return ke.distance(this,M(t))},wrap:function(){return ke.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return C([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new S(this.lat,this.lng,this.alt)}};var Pe={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,n=this.scale(t);return new b(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?r(t.lng,this.wrapLng,!0):t.lng;return new S(this.wrapLat?r(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,o=e.lng-n.lng;if(0===i&&0===o)return t;var r=t.getSouthWest(),s=t.getNorthEast();return new A(new S(r.lat-i,r.lng-o),new S(s.lat-i,s.lng-o))}},ke=e({},Pe,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,o=e.lat*n,r=Math.sin((e.lat-t.lat)*n/2),s=Math.sin((e.lng-t.lng)*n/2),a=r*r+Math.cos(i)*Math.cos(o)*s*s,u=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*u}}),Ee={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),o=Math.sin(i*e);return new T(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new S((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:function(){var t=6378137*Math.PI;return new b([-t,-t],[t,t])}()};P.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new T((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var Le,Oe,Ie,De=e({},ke,{code:"EPSG:3857",projection:Ee,transformation:function(){var t=.5/(Math.PI*Ee.R);return k(t,.5,-t,.5)}()}),Ne=e({},De,{code:"EPSG:900913"}),je=document.documentElement.style,ze="ActiveXObject"in window,Be=ze&&!document.addEventListener,Re="msLaunchUri"in navigator&&!("documentMode"in document),Ze=I("webkit"),Fe=I("android"),He=I("android 2")||I("android 3"),Ve=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Ue=Fe&&I("Google")&&Ve<537&&!("AudioNode"in window),Ye=!!window.opera,We=I("chrome"),qe=I("gecko")&&!Ze&&!Ye&&!ze,Ge=!We&&I("safari"),Xe=I("phantom"),Ke="OTransition"in je,Je=0===navigator.platform.indexOf("Win"),$e=ze&&"transition"in je,Qe="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!He,tn="MozPerspective"in je,en=!window.L_DISABLE_3D&&($e||Qe||tn)&&!Ke&&!Xe,nn="undefined"!=typeof orientation||I("mobile"),on=nn&&Ze,rn=nn&&Qe,sn=!window.PointerEvent&&window.MSPointerEvent,an=!(Ze||!window.PointerEvent&&!sn),un=!window.L_NO_TOUCH&&(an||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),hn=nn&&Ye,cn=nn&&qe,ln=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,dn=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",s,e),window.removeEventListener("testPassiveEventSupport",s,e)}catch(t){}return t},pn=function(){return!!document.createElement("canvas").getContext}(),fn=!(!document.createElementNS||!E("svg").createSVGRect),mn=!fn&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),_n=(Object.freeze||Object)({ie:ze,ielt9:Be,edge:Re,webkit:Ze,android:Fe,android23:He,androidStock:Ue,opera:Ye,chrome:We,gecko:qe,safari:Ge,phantom:Xe,opera12:Ke,win:Je,ie3d:$e,webkit3d:Qe,gecko3d:tn,any3d:en,mobile:nn,mobileWebkit:on,mobileWebkit3d:rn,msPointer:sn,pointer:an,touch:un,mobileOpera:hn,mobileGecko:cn,retina:ln,passiveEvents:dn,canvas:pn,svg:fn,vml:mn}),vn=sn?"MSPointerDown":"pointerdown",yn=sn?"MSPointerMove":"pointermove",gn=sn?"MSPointerUp":"pointerup",Tn=sn?"MSPointerCancel":"pointercancel",xn=["INPUT","SELECT","OPTION"],bn={},wn=!1,An=0,Cn=sn?"MSPointerDown":an?"pointerdown":"touchstart",Sn=sn?"MSPointerUp":an?"pointerup":"touchend",Mn="_leaflet_",Pn=rt(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),kn=rt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),En="webkitTransition"===kn||"OTransition"===kn?kn+"End":"transitionend";if("onselectstart"in document)Le=function(){mt(window,"selectstart",bt)},Oe=function(){_t(window,"selectstart",bt)};else{var Ln=rt(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Le=function(){if(Ln){var t=document.documentElement.style;Ie=t[Ln],t[Ln]="none"}},Oe=function(){Ln&&(document.documentElement.style[Ln]=Ie,Ie=void 0)}}var On,In,Dn,Nn=(Object.freeze||Object)({TRANSFORM:Pn,TRANSITION:kn,TRANSITION_END:En,get:Y,getStyle:W,create:q,remove:G,empty:X,toFront:K,toBack:J,hasClass:$,addClass:Q,removeClass:tt,setClass:et,getClass:nt,setOpacity:it,testProp:rt,setTransform:st,setPosition:at,getPosition:ut,disableTextSelection:Le,enableTextSelection:Oe,disableImageDrag:ht,enableImageDrag:ct,preventOutline:lt,restoreOutline:dt,getSizedParentNode:pt,getScale:ft}),jn="_leaflet_events",zn=Je&&We?2*window.devicePixelRatio:qe?window.devicePixelRatio:1,Bn={},Rn=(Object.freeze||Object)({on:mt,off:_t,stopPropagation:gt,disableScrollPropagation:Tt,disableClickPropagation:xt,preventDefault:bt,stop:wt,getMousePosition:At,getWheelDelta:Ct,fakeStop:St,skipped:Mt,isExternalTarget:Pt,addListener:mt,removeListener:_t}),Zn=Se.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=ut(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=_(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),at(this._el,n),this.fire("step")},_complete:function(){v(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Fn=Se.extend({options:{crs:De,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=c(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=n(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(M(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=kn&&en&&!hn&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),mt(this._proxy,En,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,n,i){if(n=void 0===n?this._zoom:this._limitZoom(n),t=this._limitCenter(M(t),n,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i){void 0!==i.animate&&(i.zoom=e({animate:i.animate},i.zoom),i.pan=e({animate:i.animate,duration:i.duration},i.pan));if(this._zoom!==n?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,n,i.zoom):this._tryAnimatedPan(t,i.pan))return clearTimeout(this._sizeTimer),this}return this._resetView(t,n),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(en?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(en?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),o=this.getSize().divideBy(2),r=t instanceof T?t:this.latLngToContainerPoint(t),s=r.subtract(o).multiplyBy(1-1/i),a=this.containerPointToLatLng(o.add(s));return this.setView(a,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():C(t);var n=x(e.paddingTopLeft||e.padding||[0,0]),i=x(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,n.add(i));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var r=i.subtract(n).divideBy(2),s=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(s.add(a).divideBy(2).add(r),o),zoom:o}},fitBounds:function(t,e){if(t=C(t),!t.isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=x(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Zn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){Q(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){function i(t){var e=t?-1:1,n=t?v:m,i=v*v-m*m+e*T*T*y*y,o=2*n*T*y,r=i/o,s=Math.sqrt(r*r+1)-r;return s<1e-9?-18:Math.log(s)}function o(t){return(Math.exp(t)-Math.exp(-t))/2}function r(t){return(Math.exp(t)+Math.exp(-t))/2}function s(t){return o(t)/r(t)}function a(t){return m*(r(x)/r(x+g*t))}function u(t){return m*(r(x)*s(x+g*t)-o(x))/T}function h(t){return 1-Math.pow(1-t,1.5)}function c(){var n=(Date.now()-b)/A,i=h(n)*w;n<=1?(this._flyToFrame=_(c,this),this._move(this.unproject(l.add(d.subtract(l).multiplyBy(u(i)/y)),f),this.getScaleZoom(m/a(i),f),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}if(n=n||{},!1===n.animate||!en)return this.setView(t,e,n);this._stop();var l=this.project(this.getCenter()),d=this.project(t),p=this.getSize(),f=this._zoom;t=M(t),e=void 0===e?f:e;var m=Math.max(p.x,p.y),v=m*this.getZoomScale(f,e),y=d.distanceTo(l)||1,g=1.42,T=g*g,x=i(0),b=Date.now(),w=(i(1)-x)/g,A=n.duration?1e3*n.duration:1e3*w*.8;return this._moveStart(!0,n.noMoveStart),c.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return t=C(t),t.isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,C(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var n=x(e.paddingTopLeft||e.padding||[0,0]),i=x(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),r=this.project(o),s=this.project(t),a=this.getPixelBounds(),u=a.getSize().divideBy(2),h=w([a.min.add(n),a.max.subtract(i)]);if(!h.contains(s)){this._enforcingBounds=!0;var c=r.subtract(s),l=x(s.x+c.x,s.y+c.y);(s.x<h.min.x||s.x>h.max.x)&&(l.x=r.x-c.x,c.x>0?l.x+=u.x-n.x:l.x-=u.x-i.x),(s.y<h.min.y||s.y>h.max.y)&&(l.y=r.y-c.y,c.y>0?l.y+=u.y-n.y:l.y-=u.y-i.y),this.panTo(this.unproject(l),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var i=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),r=i.divideBy(2).round(),s=o.divideBy(2).round(),a=r.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(n(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:o})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var i=n(this._handleGeolocationResponse,this),o=n(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(i,o,t):navigator.geolocation.getCurrentPosition(i,o,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,n=t.coords.longitude,i=new S(e,n),o=i.toBounds(2*t.coords.accuracy),r=this._locateOptions;if(r.setView){var s=this.getBoundsZoom(o);this.setView(i,r.maxZoom?Math.min(s,r.maxZoom):s)}var a={latlng:i,bounds:o,timestamp:t.timestamp};for(var u in t.coords)"number"==typeof t.coords[u]&&(a[u]=t.coords[u]);this.fire("locationfound",a)},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),G(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(v(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)G(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i=q("div",n,e||this._mapPane);return t&&(this._panes[t]=i),i},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new A(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=C(t),n=x(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),u=this.getSize().subtract(n),h=w(this.project(a,i),this.project(s,i)).getSize(),c=en?this.options.zoomSnap:1,l=u.x/h.x,d=u.y/h.y,p=e?Math.max(l,d):Math.min(l,d);return i=this.getScaleZoom(p,i),c&&(i=Math.round(i/(c/100))*(c/100),i=e?Math.ceil(i/c)*c:Math.floor(i/c)*c),Math.max(o,Math.min(r,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new T(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new b(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)