-!function(){"use strict";function t(){}function e(t,e){for(const n in e)t[n]=e[n];return t}function n(t){return t()}function i(){return Object.create(null)}function o(t){t.forEach(n)}function s(t){return"function"==typeof t}function r(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let a,l;function c(t,e){return a||(a=document.createElement("a")),a.href=e,t===a.href}function h(e,...n){if(null==e)return t;const i=e.subscribe(...n);return i.unsubscribe?()=>i.unsubscribe():i}function u(t){let e;return h(t,(t=>e=t))(),e}function d(t,e,n){t.$$.on_destroy.push(h(e,n))}function p(t,e,n,i){if(t){const o=m(t,e,n,i);return t[0](o)}}function m(t,n,i,o){return t[1]&&o?e(i.ctx.slice(),t[1](o(n))):i.ctx}function f(t,e,n,i){if(t[2]&&i){const o=t[2](i(n));if(void 0===e.dirty)return o;if("object"==typeof o){const t=[],n=Math.max(e.dirty.length,o.length);for(let i=0;i<n;i+=1)t[i]=e.dirty[i]|o[i];return t}return e.dirty|o}return e.dirty}function _(t,e,n,i,o,s){if(o){const r=m(e,n,i,s);t.p(r,o)}}function g(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}function v(t,e){t.appendChild(e)}function y(t,e,n){t.insertBefore(e,n||null)}function b(t){t.parentNode.removeChild(t)}function w(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function x(t){return document.createElement(t)}function $(t){return document.createTextNode(t)}function T(){return $(" ")}function P(){return $("")}function E(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function k(t){return function(e){return e.preventDefault(),t.call(this,e)}}function M(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function C(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function S(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function A(t,e){t.value=null==e?"":e}function z(t,e){for(let n=0;n<t.options.length;n+=1){const i=t.options[n];if(i.__value===e)return void(i.selected=!0)}t.selectedIndex=-1}function O(t,e,n){t.classList[n?"add":"remove"](e)}class I{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,n=null){var i;this.e||(this.is_svg?this.e=(i=e.nodeName,document.createElementNS("http://www.w3.org/2000/svg",i)):this.e=x(e.nodeName),this.t=e,this.c(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)y(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(b)}}function N(t){l=t}function B(t){(function(){if(!l)throw new Error("Function called outside component initialization");return l})().$$.on_mount.push(t)}const D=[],Z=[],R=[],j=[],H=Promise.resolve();let W=!1;function F(t){R.push(t)}function q(t){j.push(t)}const U=new Set;let V=0;function K(){const t=l;do{for(;V<D.length;){const t=D[V];V++,N(t),G(t.$$)}for(N(null),D.length=0,V=0;Z.length;)Z.pop()();for(let t=0;t<R.length;t+=1){const e=R[t];U.has(e)||(U.add(e),e())}R.length=0}while(D.length);for(;j.length;)j.pop()();W=!1,U.clear(),N(t)}function G(t){if(null!==t.fragment){t.update(),o(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(F)}}const Y=new Set;let X;function J(){X={r:0,c:[],p:X}}function Q(){X.r||o(X.c),X=X.p}function tt(t,e){t&&t.i&&(Y.delete(t),t.i(e))}function et(t,e,n,i){if(t&&t.o){if(Y.has(t))return;Y.add(t),X.c.push((()=>{Y.delete(t),i&&(n&&t.d(1),i())})),t.o(e)}}function nt(t,e,n){const i=t.$$.props[e];void 0!==i&&(t.$$.bound[i]=n,n(t.$$.ctx[i]))}function it(t){t&&t.c()}function ot(t,e,i,r){const{fragment:a,on_mount:l,on_destroy:c,after_update:h}=t.$$;a&&a.m(e,i),r||F((()=>{const e=l.map(n).filter(s);c?c.push(...e):o(e),t.$$.on_mount=[]})),h.forEach(F)}function st(t,e){const n=t.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function rt(t,e){-1===t.$$.dirty[0]&&(D.push(t),W||(W=!0,H.then(K)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function at(e,n,s,r,a,c,h,u=[-1]){const d=l;N(e);const p=e.$$={fragment:null,ctx:null,props:c,update:t,not_equal:a,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(d?d.$$.context:[])),callbacks:i(),dirty:u,skip_bound:!1,root:n.target||d.$$.root};h&&h(p.root);let m=!1;if(p.ctx=s?s(e,n.props||{},((t,n,...i)=>{const o=i.length?i[0]:n;return p.ctx&&a(p.ctx[t],p.ctx[t]=o)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](o),m&&rt(e,t)),n})):[],p.update(),m=!0,o(p.before_update),p.fragment=!!r&&r(p.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);p.fragment&&p.fragment.l(t),t.forEach(b)}else p.fragment&&p.fragment.c();n.intro&&tt(e.$$.fragment),ot(e,n.target,n.anchor,n.customElement),K()}N(d)}class lt{$destroy(){st(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;(function(){const t=1e6,e=1e3,n="transitionend",i=t=>null==t?`${t}`:{}.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),o=e=>{do{e+=Math.floor(Math.random()*t)}while(document.getElementById(e));return e},s=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),e=n&&"#"!==n?n.trim():null}return e},r=t=>{const e=s(t);return e&&document.querySelector(e)?e:null},a=t=>{const e=s(t);return e?document.querySelector(e):null},l=t=>{if(!t)return 0;let{transitionDuration:n,transitionDelay:i}=window.getComputedStyle(t);const o=Number.parseFloat(n),s=Number.parseFloat(i);return o||s?(n=n.split(",")[0],i=i.split(",")[0],(Number.parseFloat(n)+Number.parseFloat(i))*e):0},c=t=>{t.dispatchEvent(new Event(n))},h=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),u=t=>h(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,d=(t,e,n)=>{Object.keys(n).forEach((o=>{const s=n[o],r=e[o],a=r&&h(r)?"element":i(r);if(!new RegExp(s).test(a))throw new TypeError(`${t.toUpperCase()}: Option "${o}" provided type "${a}" but expected type "${s}".`)}))},p=t=>!(!h(t)||0===t.getClientRects().length)&&"visible"===getComputedStyle(t).getPropertyValue("visibility"),m=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),f=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?f(t.parentNode):null},_=()=>{},g=t=>{t.offsetHeight},v=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},y=[],b=t=>{"loading"===document.readyState?(y.length||document.addEventListener("DOMContentLoaded",(()=>{y.forEach((t=>t()))})),y.push(t)):t()},w=()=>"rtl"===document.documentElement.dir,x=t=>{b((()=>{const e=v();if(e){const n=t.NAME,i=e.fn[n];e.fn[n]=t.jQueryInterface,e.fn[n].Constructor=t,e.fn[n].noConflict=()=>(e.fn[n]=i,t.jQueryInterface)}}))},$=t=>{"function"==typeof t&&t()},L=(t,e,i=!0)=>{if(!i)return void $(t);const o=5,s=l(e)+o;let r=!1;const a=({target:i})=>{i===e&&(r=!0,e.removeEventListener(n,a),$(t))};e.addEventListener(n,a),setTimeout((()=>{r||c(e)}),s)},T=(t,e,n,i)=>{let o=t.indexOf(e);if(-1===o)return t[!n&&i?t.length-1:0];const s=t.length;return o+=n?1:-1,i&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))]},P=/[^.]*(?=\..*)\.|.*/,E=/\..*/,k=/::\d+$/,M={};let C=1;const S={mouseenter:"mouseover",mouseleave:"mouseout"},A=/^(mouseenter|mouseleave)/i,z=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function O(t,e){return e&&`${e}::${C++}`||t.uidEvent||C++}function I(t){const e=O(t);return t.uidEvent=e,M[e]=M[e]||{},M[e]}function N(t,e){return function n(i){return i.delegateTarget=t,n.oneOff&&F.off(t,i.type,e),e.apply(t,[i])}}function B(t,e,n){return function i(o){const s=t.querySelectorAll(e);for(let{target:r}=o;r&&r!==this;r=r.parentNode)for(let a=s.length;a--;)if(s[a]===r)return o.delegateTarget=r,i.oneOff&&F.off(t,o.type,e,n),n.apply(r,[o]);return null}}function D(t,e,n=null){const i=Object.keys(t);for(let o=0,s=i.length;o<s;o++){const s=t[i[o]];if(s.originalHandler===e&&s.delegationSelector===n)return s}return null}function Z(t,e,n){const i="string"==typeof e,o=i?n:e;let s=W(t);return z.has(s)||(s=t),[i,o,s]}function R(t,e,n,i,o){if("string"!=typeof e||!t)return;if(n||(n=i,i=null),A.test(e)){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};i?i=t(i):n=t(n)}const[s,r,a]=Z(e,n,i),l=I(t),c=l[a]||(l[a]={}),h=D(c,r,s?n:null);if(h)return void(h.oneOff=h.oneOff&&o);const u=O(r,e.replace(P,"")),d=s?B(t,n,i):N(t,n);d.delegationSelector=s?n:null,d.originalHandler=r,d.oneOff=o,d.uidEvent=u,c[u]=d,t.addEventListener(a,d,s)}function j(t,e,n,i,o){const s=D(e[n],i,o);s&&(t.removeEventListener(n,s,Boolean(o)),delete e[n][s.uidEvent])}function H(t,e,n,i){const o=e[n]||{};Object.keys(o).forEach((s=>{if(s.includes(i)){const i=o[s];j(t,e,n,i.originalHandler,i.delegationSelector)}}))}function W(t){return t=t.replace(E,""),S[t]||t}const F={on(t,e,n,i){R(t,e,n,i,!1)},one(t,e,n,i){R(t,e,n,i,!0)},off(t,e,n,i){if("string"!=typeof e||!t)return;const[o,s,r]=Z(e,n,i),a=r!==e,l=I(t),c=e.startsWith(".");if(void 0!==s){if(!l||!l[r])return;return void j(t,l,r,s,o?n:null)}c&&Object.keys(l).forEach((n=>{H(t,l,n,e.slice(1))}));const h=l[r]||{};Object.keys(h).forEach((n=>{const i=n.replace(k,"");if(!a||e.includes(i)){const e=h[n];j(t,l,r,e.originalHandler,e.delegationSelector)}}))},trigger(t,e,n){if("string"!=typeof e||!t)return null;const i=v(),o=W(e),s=e!==o,r=z.has(o);let a,l=!0,c=!0,h=!1,u=null;return s&&i&&(a=i.Event(e,n),i(t).trigger(a),l=!a.isPropagationStopped(),c=!a.isImmediatePropagationStopped(),h=a.isDefaultPrevented()),r?(u=document.createEvent("HTMLEvents"),u.initEvent(o,l,!0)):u=new CustomEvent(e,{bubbles:l,cancelable:!0}),void 0!==n&&Object.keys(n).forEach((t=>{Object.defineProperty(u,t,{get:()=>n[t]})})),h&&u.preventDefault(),c&&t.dispatchEvent(u),u.defaultPrevented&&void 0!==a&&a.preventDefault(),u}},q=new Map,U={set(t,e,n){q.has(t)||q.set(t,new Map);const i=q.get(t);i.has(e)||0===i.size?i.set(e,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(t,e)=>q.has(t)&&q.get(t).get(e)||null,remove(t,e){if(!q.has(t))return;const n=q.get(t);n.delete(e),0===n.size&&q.delete(t)}},V="5.1.3";class K{constructor(t){(t=u(t))&&(this._element=t,U.set(this._element,this.constructor.DATA_KEY,this))}dispose(){U.remove(this._element,this.constructor.DATA_KEY),F.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach((t=>{this[t]=null}))}_queueCallback(t,e,n=!0){L(t,e,n)}static getInstance(t){return U.get(u(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return V}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}const G=(t,e="hide")=>{const n=`click.dismiss${t.EVENT_KEY}`,i=t.NAME;F.on(document,n,`[data-bs-dismiss="${i}"]`,(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),m(this))return;const o=a(this)||this.closest(`.${i}`);t.getOrCreateInstance(o)[e]()}))},Y="alert",X=".bs.alert",J=`close${X}`,Q=`closed${X}`,tt="fade",et="show";class nt extends K{static get NAME(){return Y}close(){if(F.trigger(this._element,J).defaultPrevented)return;this._element.classList.remove(et);const t=this._element.classList.contains(tt);this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),F.trigger(this._element,Q),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=nt.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}G(nt,"close"),x(nt);const it="button",ot="active",st='[data-bs-toggle="button"]',rt="click.bs.button.data-api";class at extends K{static get NAME(){return it}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(ot))}static jQueryInterface(t){return this.each((function(){const e=at.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}function lt(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function ct(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}F.on(document,rt,st,(t=>{t.preventDefault();const e=t.target.closest(st);at.getOrCreateInstance(e).toggle()})),x(at);const ht={setDataAttribute(t,e,n){t.setAttribute(`data-bs-${ct(e)}`,n)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${ct(e)}`)},getDataAttributes(t){if(!t)return{};const e={};return Object.keys(t.dataset).filter((t=>t.startsWith("bs"))).forEach((n=>{let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=lt(t.dataset[n])})),e},getDataAttribute:(t,e)=>lt(t.getAttribute(`data-bs-${ct(e)}`)),offset(t){const e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset,left:e.left+window.pageXOffset}},position:t=>({top:t.offsetTop,left:t.offsetLeft})},ut=3,dt={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const n=[];let i=t.parentNode;for(;i&&i.nodeType===Node.ELEMENT_NODE&&i.nodeType!==ut;)i.matches(e)&&n.push(i),i=i.parentNode;return n},prev(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(", ");return this.find(e,t).filter((t=>!m(t)&&p(t)))}},pt="carousel",mt=".bs.carousel",ft=".data-api",_t=500,gt=40,vt={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},yt={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},bt="next",wt="prev",xt="left",$t="right",Lt={ArrowLeft:$t,ArrowRight:xt},Tt=`slide${mt}`,Pt=`slid${mt}`,Et=`keydown${mt}`,kt=`mouseenter${mt}`,Mt=`mouseleave${mt}`,Ct=`touchstart${mt}`,St=`touchmove${mt}`,At=`touchend${mt}`,zt=`pointerdown${mt}`,Ot=`pointerup${mt}`,It=`dragstart${mt}`,Nt=`load${mt}${ft}`,Bt=`click${mt}${ft}`,Dt="carousel",Zt="active",Rt="slide",jt="carousel-item-end",Ht="carousel-item-start",Wt="carousel-item-next",Ft="carousel-item-prev",qt="pointer-event",Ut=".active",Vt=".active.carousel-item",Kt=".carousel-item",Gt=".carousel-item img",Yt=".carousel-item-next, .carousel-item-prev",Xt=".carousel-indicators",Jt="[data-bs-target]",Qt="[data-bs-slide], [data-bs-slide-to]",te='[data-bs-ride="carousel"]',ee="touch",ne="pen";class ie extends K{constructor(t,e){super(t),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._indicatorsElement=dt.findOne(Xt,this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return vt}static get NAME(){return pt}next(){this._slide(bt)}nextWhenVisible(){!document.hidden&&p(this._element)&&this.next()}prev(){this._slide(wt)}pause(t){t||(this._isPaused=!0),dt.findOne(Yt,this._element)&&(c(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(t){this._activeElement=dt.findOne(Vt,this._element);const e=this._getItemIndex(this._activeElement);if(t>this._items.length-1||t<0)return;if(this._isSliding)return void F.one(this._element,Pt,(()=>this.to(t)));if(e===t)return this.pause(),void this.cycle();const n=t>e?bt:wt;this._slide(n,this._items[t])}_getConfig(t){return t={...vt,...ht.getDataAttributes(this._element),..."object"==typeof t?t:{}},d(pt,t,yt),t}_handleSwipe(){const t=Math.abs(this.touchDeltaX);if(t<=gt)return;const e=t/this.touchDeltaX;this.touchDeltaX=0,e&&this._slide(e>0?$t:xt)}_addEventListeners(){this._config.keyboard&&F.on(this._element,Et,(t=>this._keydown(t))),"hover"===this._config.pause&&(F.on(this._element,kt,(t=>this.pause(t))),F.on(this._element,Mt,(t=>this.cycle(t)))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const t=t=>this._pointerEvent&&(t.pointerType===ne||t.pointerType===ee),e=e=>{t(e)?this.touchStartX=e.clientX:this._pointerEvent||(this.touchStartX=e.touches[0].clientX)},n=t=>{this.touchDeltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this.touchStartX},i=e=>{t(e)&&(this.touchDeltaX=e.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((t=>this.cycle(t)),_t+this._config.interval))};dt.find(Gt,this._element).forEach((t=>{F.on(t,It,(t=>t.preventDefault()))})),this._pointerEvent?(F.on(this._element,zt,(t=>e(t))),F.on(this._element,Ot,(t=>i(t))),this._element.classList.add(qt)):(F.on(this._element,Ct,(t=>e(t))),F.on(this._element,St,(t=>n(t))),F.on(this._element,At,(t=>i(t))))}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=Lt[t.key];e&&(t.preventDefault(),this._slide(e))}_getItemIndex(t){return this._items=t&&t.parentNode?dt.find(Kt,t.parentNode):[],this._items.indexOf(t)}_getItemByOrder(t,e){const n=t===bt;return T(this._items,e,n,this._config.wrap)}_triggerSlideEvent(t,e){const n=this._getItemIndex(t),i=this._getItemIndex(dt.findOne(Vt,this._element));return F.trigger(this._element,Tt,{relatedTarget:t,direction:e,from:i,to:n})}_setActiveIndicatorElement(t){if(this._indicatorsElement){const e=dt.findOne(Ut,this._indicatorsElement);e.classList.remove(Zt),e.removeAttribute("aria-current");const n=dt.find(Jt,this._indicatorsElement);for(let e=0;e<n.length;e++)if(Number.parseInt(n[e].getAttribute("data-bs-slide-to"),10)===this._getItemIndex(t)){n[e].classList.add(Zt),n[e].setAttribute("aria-current","true");break}}}_updateInterval(){const t=this._activeElement||dt.findOne(Vt,this._element);if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}_slide(t,e){const n=this._directionToOrder(t),i=dt.findOne(Vt,this._element),o=this._getItemIndex(i),s=e||this._getItemByOrder(n,i),r=this._getItemIndex(s),a=Boolean(this._interval),l=n===bt,c=l?Ht:jt,h=l?Wt:Ft,u=this._orderToDirection(n);if(s&&s.classList.contains(Zt))return void(this._isSliding=!1);if(this._isSliding)return;if(this._triggerSlideEvent(s,u).defaultPrevented)return;if(!i||!s)return;this._isSliding=!0,a&&this.pause(),this._setActiveIndicatorElement(s),this._activeElement=s;const d=()=>{F.trigger(this._element,Pt,{relatedTarget:s,direction:u,from:o,to:r})};if(this._element.classList.contains(Rt)){s.classList.add(h),g(s),i.classList.add(c),s.classList.add(c);const t=()=>{s.classList.remove(c,h),s.classList.add(Zt),i.classList.remove(Zt,h,c),this._isSliding=!1,setTimeout(d,0)};this._queueCallback(t,i,!0)}else i.classList.remove(Zt),s.classList.add(Zt),this._isSliding=!1,d();a&&this.cycle()}_directionToOrder(t){return[$t,xt].includes(t)?w()?t===xt?wt:bt:t===xt?bt:wt:t}_orderToDirection(t){return[bt,wt].includes(t)?w()?t===wt?xt:$t:t===wt?$t:xt:t}static carouselInterface(t,e){const n=ie.getOrCreateInstance(t,e);let{_config:i}=n;"object"==typeof e&&(i={...i,...e});const o="string"==typeof e?e:i.slide;if("number"==typeof e)n.to(e);else if("string"==typeof o){if(void 0===n[o])throw new TypeError(`No method named "${o}"`);n[o]()}else i.interval&&i.ride&&(n.pause(),n.cycle())}static jQueryInterface(t){return this.each((function(){ie.carouselInterface(this,t)}))}static dataApiClickHandler(t){const e=a(this);if(!e||!e.classList.contains(Dt))return;const n={...ht.getDataAttributes(e),...ht.getDataAttributes(this)},i=this.getAttribute("data-bs-slide-to");i&&(n.interval=!1),ie.carouselInterface(e,n),i&&ie.getInstance(e).to(i),t.preventDefault()}}F.on(document,Bt,Qt,ie.dataApiClickHandler),F.on(window,Nt,(()=>{const t=dt.find(te);for(let e=0,n=t.length;e<n;e++)ie.carouselInterface(t[e],ie.getInstance(t[e]))})),x(ie);const oe="collapse",se="bs.collapse",re=`.${se}`,ae={toggle:!0,parent:null},le={toggle:"boolean",parent:"(null|element)"},ce=`show${re}`,he=`shown${re}`,ue=`hide${re}`,de=`hidden${re}`,pe=`click${re}.data-api`,me="show",fe="collapse",_e="collapsing",ge="collapsed",ve=`:scope .${fe} .${fe}`,ye="collapse-horizontal",be="width",we="height",xe=".collapse.show, .collapse.collapsing",$e='[data-bs-toggle="collapse"]';class Le extends K{constructor(t,e){super(t),this._isTransitioning=!1,this._config=this._getConfig(e),this._triggerArray=[];const n=dt.find($e);for(let t=0,e=n.length;t<e;t++){const e=n[t],i=r(e),o=dt.find(i).filter((t=>t===this._element));null!==i&&o.length&&(this._selector=i,this._triggerArray.push(e))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return ae}static get NAME(){return oe}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t,e=[];if(this._config.parent){const t=dt.find(ve,this._config.parent);e=dt.find(xe,this._config.parent).filter((e=>!t.includes(e)))}const n=dt.findOne(this._selector);if(e.length){const i=e.find((t=>n!==t));if(t=i?Le.getInstance(i):null,t&&t._isTransitioning)return}if(F.trigger(this._element,ce).defaultPrevented)return;e.forEach((e=>{n!==e&&Le.getOrCreateInstance(e,{toggle:!1}).hide(),t||U.set(e,se,null)}));const i=this._getDimension();this._element.classList.remove(fe),this._element.classList.add(_e),this._element.style[i]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const o=()=>{this._isTransitioning=!1,this._element.classList.remove(_e),this._element.classList.add(fe,me),this._element.style[i]="",F.trigger(this._element,he)},s=`scroll${i[0].toUpperCase()+i.slice(1)}`;this._queueCallback(o,this._element,!0),this._element.style[i]=`${this._element[s]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(F.trigger(this._element,ue).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,g(this._element),this._element.classList.add(_e),this._element.classList.remove(fe,me);const e=this._triggerArray.length;for(let t=0;t<e;t++){const e=this._triggerArray[t],n=a(e);n&&!this._isShown(n)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0;const n=()=>{this._isTransitioning=!1,this._element.classList.remove(_e),this._element.classList.add(fe),F.trigger(this._element,de)};this._element.style[t]="",this._queueCallback(n,this._element,!0)}_isShown(t=this._element){return t.classList.contains(me)}_getConfig(t){return(t={...ae,...ht.getDataAttributes(this._element),...t}).toggle=Boolean(t.toggle),t.parent=u(t.parent),d(oe,t,le),t}_getDimension(){return this._element.classList.contains(ye)?be:we}_initializeChildren(){if(!this._config.parent)return;const t=dt.find(ve,this._config.parent);dt.find($e,this._config.parent).filter((e=>!t.includes(e))).forEach((t=>{const e=a(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}))}_addAriaAndCollapsedClass(t,e){t.length&&t.forEach((t=>{e?t.classList.remove(ge):t.classList.add(ge),t.setAttribute("aria-expanded",e)}))}static jQueryInterface(t){return this.each((function(){const e={};"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1);const n=Le.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t]()}}))}}F.on(document,pe,$e,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=r(this);dt.find(e).forEach((t=>{Le.getOrCreateInstance(t,{toggle:!1}).toggle()}))})),x(Le);var Te="top",Pe="bottom",Ee="right",ke="left",Me="auto",Ce=[Te,Pe,Ee,ke],Se="start",Ae="end",ze="clippingParents",Oe="viewport",Ie="popper",Ne="reference",Be=Ce.reduce((function(t,e){return t.concat([e+"-"+Se,e+"-"+Ae])}),[]),De=[].concat(Ce,[Me]).reduce((function(t,e){return t.concat([e,e+"-"+Se,e+"-"+Ae])}),[]),Ze="beforeRead",Re="read",je="afterRead",He="beforeMain",We="main",Fe="afterMain",qe="beforeWrite",Ue="write",Ve="afterWrite",Ke=[Ze,Re,je,He,We,Fe,qe,Ue,Ve];function Ge(t){return t?(t.nodeName||"").toLowerCase():null}function Ye(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Xe(t){return t instanceof Ye(t).Element||t instanceof Element}function Je(t){return t instanceof Ye(t).HTMLElement||t instanceof HTMLElement}function Qe(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Ye(t).ShadowRoot||t instanceof ShadowRoot)}function tn(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},o=e.elements[t];Je(o)&&Ge(o)&&(Object.assign(o.style,n),Object.keys(i).forEach((function(t){var e=i[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})))}))}function en(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var i=e.elements[t],o=e.attributes[t]||{},s=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});Je(i)&&Ge(i)&&(Object.assign(i.style,s),Object.keys(o).forEach((function(t){i.removeAttribute(t)})))}))}}const nn={name:"applyStyles",enabled:!0,phase:"write",fn:tn,effect:en,requires:["computeStyles"]};function on(t){return t.split("-")[0]}function sn(t,e){var n=t.getBoundingClientRect(),i=1,o=1;return{width:n.width/i,height:n.height/o,top:n.top/o,right:n.right/i,bottom:n.bottom/o,left:n.left/i,x:n.left/i,y:n.top/o}}function rn(t){var e=sn(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function an(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Qe(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function ln(t){return Ye(t).getComputedStyle(t)}function cn(t){return["table","td","th"].indexOf(Ge(t))>=0}function hn(t){return((Xe(t)?t.ownerDocument:t.document)||window.document).documentElement}function un(t){return"html"===Ge(t)?t:t.assignedSlot||t.parentNode||(Qe(t)?t.host:null)||hn(t)}function dn(t){return Je(t)&&"fixed"!==ln(t).position?t.offsetParent:null}function pn(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&Je(t)&&"fixed"===ln(t).position)return null;for(var n=un(t);Je(n)&&["html","body"].indexOf(Ge(n))<0;){var i=ln(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}function mn(t){for(var e=Ye(t),n=dn(t);n&&cn(n)&&"static"===ln(n).position;)n=dn(n);return n&&("html"===Ge(n)||"body"===Ge(n)&&"static"===ln(n).position)?e:n||pn(t)||e}function fn(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}var _n=Math.max,gn=Math.min,vn=Math.round;function yn(t,e,n){return _n(t,gn(e,n))}function bn(){return{top:0,right:0,bottom:0,left:0}}function wn(t){return Object.assign({},bn(),t)}function xn(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}var $n=function(t,e){return wn("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:xn(t,Ce))};function Ln(t){var e,n=t.state,i=t.name,o=t.options,s=n.elements.arrow,r=n.modifiersData.popperOffsets,a=on(n.placement),l=fn(a),c=[ke,Ee].indexOf(a)>=0?"height":"width";if(s&&r){var h=$n(o.padding,n),u=rn(s),d="y"===l?Te:ke,p="y"===l?Pe:Ee,m=n.rects.reference[c]+n.rects.reference[l]-r[l]-n.rects.popper[c],f=r[l]-n.rects.reference[l],_=mn(s),g=_?"y"===l?_.clientHeight||0:_.clientWidth||0:0,v=m/2-f/2,y=h[d],b=g-u[c]-h[p],w=g/2-u[c]/2+v,x=yn(y,w,b),$=l;n.modifiersData[i]=((e={})[$]=x,e.centerOffset=x-w,e)}}function Tn(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&an(e.elements.popper,i)&&(e.elements.arrow=i)}const Pn={name:"arrow",enabled:!0,phase:"main",fn:Ln,effect:Tn,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function En(t){return t.split("-")[1]}var kn={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Mn(t){var e=t.x,n=t.y,i=window.devicePixelRatio||1;return{x:vn(vn(e*i)/i)||0,y:vn(vn(n*i)/i)||0}}function Cn(t){var e,n=t.popper,i=t.popperRect,o=t.placement,s=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,u=!0===h?Mn(r):"function"==typeof h?h(r):r,d=u.x,p=void 0===d?0:d,m=u.y,f=void 0===m?0:m,_=r.hasOwnProperty("x"),g=r.hasOwnProperty("y"),v=ke,y=Te,b=window;if(c){var w=mn(n),x="clientHeight",$="clientWidth";w===Ye(n)&&"static"!==ln(w=hn(n)).position&&"absolute"===a&&(x="scrollHeight",$="scrollWidth"),o!==Te&&(o!==ke&&o!==Ee||s!==Ae)||(y=Pe,f-=w[x]-i.height,f*=l?1:-1),o!==ke&&(o!==Te&&o!==Pe||s!==Ae)||(v=Ee,p-=w[$]-i.width,p*=l?1:-1)}var L,T=Object.assign({position:a},c&&kn);return l?Object.assign({},T,((L={})[y]=g?"0":"",L[v]=_?"0":"",L.transform=(b.devicePixelRatio||1)<=1?"translate("+p+"px, "+f+"px)":"translate3d("+p+"px, "+f+"px, 0)",L)):Object.assign({},T,((e={})[y]=g?f+"px":"",e[v]=_?p+"px":"",e.transform="",e))}function Sn(t){var e=t.state,n=t.options,i=n.gpuAcceleration,o=void 0===i||i,s=n.adaptive,r=void 0===s||s,a=n.roundOffsets,l=void 0===a||a,c={placement:on(e.placement),variation:En(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,Cn(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Cn(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const An={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Sn,data:{}};var zn={passive:!0};function On(t){var e=t.state,n=t.instance,i=t.options,o=i.scroll,s=void 0===o||o,r=i.resize,a=void 0===r||r,l=Ye(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&c.forEach((function(t){t.addEventListener("scroll",n.update,zn)})),a&&l.addEventListener("resize",n.update,zn),function(){s&&c.forEach((function(t){t.removeEventListener("scroll",n.update,zn)})),a&&l.removeEventListener("resize",n.update,zn)}}const In={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:On,data:{}};var Nn={left:"right",right:"left",bottom:"top",top:"bottom"};function Bn(t){return t.replace(/left|right|bottom|top/g,(function(t){return Nn[t]}))}var Dn={start:"end",end:"start"};function Zn(t){return t.replace(/start|end/g,(function(t){return Dn[t]}))}function Rn(t){var e=Ye(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function jn(t){return sn(hn(t)).left+Rn(t).scrollLeft}function Hn(t){var e=Ye(t),n=hn(t),i=e.visualViewport,o=n.clientWidth,s=n.clientHeight,r=0,a=0;return i&&(o=i.width,s=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(r=i.offsetLeft,a=i.offsetTop)),{width:o,height:s,x:r+jn(t),y:a}}function Wn(t){var e,n=hn(t),i=Rn(t),o=null==(e=t.ownerDocument)?void 0:e.body,s=_n(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),r=_n(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-i.scrollLeft+jn(t),l=-i.scrollTop;return"rtl"===ln(o||n).direction&&(a+=_n(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:r,x:a,y:l}}function Fn(t){var e=ln(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+i)}function qn(t){return["html","body","#document"].indexOf(Ge(t))>=0?t.ownerDocument.body:Je(t)&&Fn(t)?t:qn(un(t))}function Un(t,e){var n;void 0===e&&(e=[]);var i=qn(t),o=i===(null==(n=t.ownerDocument)?void 0:n.body),s=Ye(i),r=o?[s].concat(s.visualViewport||[],Fn(i)?i:[]):i,a=e.concat(r);return o?a:a.concat(Un(un(r)))}function Vn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Kn(t){var e=sn(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function Gn(t,e){return e===Oe?Vn(Hn(t)):Je(e)?Kn(e):Vn(Wn(hn(t)))}function Yn(t){var e=Un(un(t)),n=["absolute","fixed"].indexOf(ln(t).position)>=0&&Je(t)?mn(t):t;return Xe(n)?e.filter((function(t){return Xe(t)&&an(t,n)&&"body"!==Ge(t)})):[]}function Xn(t,e,n){var i="clippingParents"===e?Yn(t):[].concat(e),o=[].concat(i,[n]),s=o[0],r=o.reduce((function(e,n){var i=Gn(t,n);return e.top=_n(i.top,e.top),e.right=gn(i.right,e.right),e.bottom=gn(i.bottom,e.bottom),e.left=_n(i.left,e.left),e}),Gn(t,s));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function Jn(t){var e,n=t.reference,i=t.element,o=t.placement,s=o?on(o):null,r=o?En(o):null,a=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(s){case Te:e={x:a,y:n.y-i.height};break;case Pe:e={x:a,y:n.y+n.height};break;case Ee:e={x:n.x+n.width,y:l};break;case ke:e={x:n.x-i.width,y:l};break;default:e={x:n.x,y:n.y}}var c=s?fn(s):null;if(null!=c){var h="y"===c?"height":"width";switch(r){case Se:e[c]=e[c]-(n[h]/2-i[h]/2);break;case Ae:e[c]=e[c]+(n[h]/2-i[h]/2)}}return e}function Qn(t,e){void 0===e&&(e={});var n=e,i=n.placement,o=void 0===i?t.placement:i,s=n.boundary,r=void 0===s?ze:s,a=n.rootBoundary,l=void 0===a?Oe:a,c=n.elementContext,h=void 0===c?Ie:c,u=n.altBoundary,d=void 0!==u&&u,p=n.padding,m=void 0===p?0:p,f=wn("number"!=typeof m?m:xn(m,Ce)),_=h===Ie?Ne:Ie,g=t.rects.popper,v=t.elements[d?_:h],y=Xn(Xe(v)?v:v.contextElement||hn(t.elements.popper),r,l),b=sn(t.elements.reference),w=Jn({reference:b,element:g,strategy:"absolute",placement:o}),x=Vn(Object.assign({},g,w)),$=h===Ie?x:b,L={top:y.top-$.top+f.top,bottom:$.bottom-y.bottom+f.bottom,left:y.left-$.left+f.left,right:$.right-y.right+f.right},T=t.modifiersData.offset;if(h===Ie&&T){var P=T[o];Object.keys(L).forEach((function(t){var e=[Ee,Pe].indexOf(t)>=0?1:-1,n=[Te,Pe].indexOf(t)>=0?"y":"x";L[t]+=P[n]*e}))}return L}function ti(t,e){void 0===e&&(e={});var n=e,i=n.placement,o=n.boundary,s=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?De:l,h=En(i),u=h?a?Be:Be.filter((function(t){return En(t)===h})):Ce,d=u.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=u);var p=d.reduce((function(e,n){return e[n]=Qn(t,{placement:n,boundary:o,rootBoundary:s,padding:r})[on(n)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}function ei(t){if(on(t)===Me)return[];var e=Bn(t);return[Zn(t),e,Zn(e)]}function ni(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var o=n.mainAxis,s=void 0===o||o,r=n.altAxis,a=void 0===r||r,l=n.fallbackPlacements,c=n.padding,h=n.boundary,u=n.rootBoundary,d=n.altBoundary,p=n.flipVariations,m=void 0===p||p,f=n.allowedAutoPlacements,_=e.options.placement,g=on(_),v=l||(g!==_&&m?ei(_):[Bn(_)]),y=[_].concat(v).reduce((function(t,n){return t.concat(on(n)===Me?ti(e,{placement:n,boundary:h,rootBoundary:u,padding:c,flipVariations:m,allowedAutoPlacements:f}):n)}),[]),b=e.rects.reference,w=e.rects.popper,x=new Map,$=!0,L=y[0],T=0;T<y.length;T++){var P=y[T],E=on(P),k=En(P)===Se,M=[Te,Pe].indexOf(E)>=0,C=M?"width":"height",S=Qn(e,{placement:P,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),A=M?k?Ee:ke:k?Pe:Te;b[C]>w[C]&&(A=Bn(A));var z=Bn(A),O=[];if(s&&O.push(S[E]<=0),a&&O.push(S[A]<=0,S[z]<=0),O.every((function(t){return t}))){L=P,$=!1;break}x.set(P,O)}if($)for(var I=function(t){var e=y.find((function(e){var n=x.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return L=e,"break"},N=m?3:1;N>0&&"break"!==I(N);N--);e.placement!==L&&(e.modifiersData[i]._skip=!0,e.placement=L,e.reset=!0)}}const ii={name:"flip",enabled:!0,phase:"main",fn:ni,requiresIfExists:["offset"],data:{_skip:!1}};function oi(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function si(t){return[Te,Ee,Pe,ke].some((function(e){return t[e]>=0}))}function ri(t){var e=t.state,n=t.name,i=e.rects.reference,o=e.rects.popper,s=e.modifiersData.preventOverflow,r=Qn(e,{elementContext:"reference"}),a=Qn(e,{altBoundary:!0}),l=oi(r,i),c=oi(a,o,s),h=si(l),u=si(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}const ai={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ri};function li(t,e,n){var i=on(t),o=[ke,Te].indexOf(i)>=0?-1:1,s="function"==typeof n?n(Object.assign({},e,{placement:t})):n,r=s[0],a=s[1];return r=r||0,a=(a||0)*o,[ke,Ee].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function ci(t){var e=t.state,n=t.options,i=t.name,o=n.offset,s=void 0===o?[0,0]:o,r=De.reduce((function(t,n){return t[n]=li(n,e.rects,s),t}),{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=r}const hi={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ci};function ui(t){var e=t.state,n=t.name;e.modifiersData[n]=Jn({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const di={name:"popperOffsets",enabled:!0,phase:"read",fn:ui,data:{}};function pi(t){return"x"===t?"y":"x"}function mi(t){var e=t.state,n=t.options,i=t.name,o=n.mainAxis,s=void 0===o||o,r=n.altAxis,a=void 0!==r&&r,l=n.boundary,c=n.rootBoundary,h=n.altBoundary,u=n.padding,d=n.tether,p=void 0===d||d,m=n.tetherOffset,f=void 0===m?0:m,_=Qn(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),g=on(e.placement),v=En(e.placement),y=!v,b=fn(g),w=pi(b),x=e.modifiersData.popperOffsets,$=e.rects.reference,L=e.rects.popper,T="function"==typeof f?f(Object.assign({},e.rects,{placement:e.placement})):f,P={x:0,y:0};if(x){if(s||a){var E="y"===b?Te:ke,k="y"===b?Pe:Ee,M="y"===b?"height":"width",C=x[b],S=x[b]+_[E],A=x[b]-_[k],z=p?-L[M]/2:0,O=v===Se?$[M]:L[M],I=v===Se?-L[M]:-$[M],N=e.elements.arrow,B=p&&N?rn(N):{width:0,height:0},D=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:bn(),Z=D[E],R=D[k],j=yn(0,$[M],B[M]),H=y?$[M]/2-z-j-Z-T:O-j-Z-T,W=y?-$[M]/2+z+j+R+T:I+j+R+T,F=e.elements.arrow&&mn(e.elements.arrow),q=F?"y"===b?F.clientTop||0:F.clientLeft||0:0,U=e.modifiersData.offset?e.modifiersData.offset[e.placement][b]:0,V=x[b]+H-U-q,K=x[b]+W-U;if(s){var G=yn(p?gn(S,V):S,C,p?_n(A,K):A);x[b]=G,P[b]=G-C}if(a){var Y="x"===b?Te:ke,X="x"===b?Pe:Ee,J=x[w],Q=J+_[Y],tt=J-_[X],et=yn(p?gn(Q,V):Q,J,p?_n(tt,K):tt);x[w]=et,P[w]=et-J}}e.modifiersData[i]=P}}const fi={name:"preventOverflow",enabled:!0,phase:"main",fn:mi,requiresIfExists:["offset"]};function _i(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function gi(t){return t!==Ye(t)&&Je(t)?_i(t):Rn(t)}function vi(t){var e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,i=e.height/t.offsetHeight||1;return 1!==n||1!==i}function yi(t,e,n){void 0===n&&(n=!1);var i=Je(e);Je(e)&&vi(e);var o=hn(e),s=sn(t),r={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(i||!i&&!n)&&(("body"!==Ge(e)||Fn(o))&&(r=gi(e)),Je(e)?((a=sn(e)).x+=e.clientLeft,a.y+=e.clientTop):o&&(a.x=jn(o))),{x:s.left+r.scrollLeft-a.x,y:s.top+r.scrollTop-a.y,width:s.width,height:s.height}}function bi(t){var e=new Map,n=new Set,i=[];function o(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var i=e.get(t);i&&o(i)}})),i.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||o(t)})),i}function wi(t){var e=bi(t);return Ke.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}function xi(t){var e;return function(){return e||(e=new Promise((function(n){Promise.resolve().then((function(){e=void 0,n(t())}))}))),e}}function $i(t){var e=t.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}var Li={placement:"bottom",modifiers:[],strategy:"absolute"};function Ti(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Pi(t){void 0===t&&(t={});var e=t,n=e.defaultModifiers,i=void 0===n?[]:n,o=e.defaultOptions,s=void 0===o?Li:o;return function(t,e,n){void 0===n&&(n=s);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},Li,s),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},r=[],a=!1,l={state:o,setOptions:function(n){var r="function"==typeof n?n(o.options):n;h(),o.options=Object.assign({},s,o.options,r),o.scrollParents={reference:Xe(t)?Un(t):t.contextElement?Un(t.contextElement):[],popper:Un(e)};var a=wi($i([].concat(i,o.options.modifiers)));return o.orderedModifiers=a.filter((function(t){return t.enabled})),c(),l.update()},forceUpdate:function(){if(!a){var t=o.elements,e=t.reference,n=t.popper;if(Ti(e,n)){o.rects={reference:yi(e,mn(n),"fixed"===o.options.strategy),popper:rn(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(t){return o.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0;i<o.orderedModifiers.length;i++)if(!0!==o.reset){var s=o.orderedModifiers[i],r=s.fn,c=s.options,h=void 0===c?{}:c,u=s.name;"function"==typeof r&&(o=r({state:o,options:h,name:u,instance:l})||o)}else o.reset=!1,i=-1}}},update:xi((function(){return new Promise((function(t){l.forceUpdate(),t(o)}))})),destroy:function(){h(),a=!0}};if(!Ti(t,e))return l;function c(){o.orderedModifiers.forEach((function(t){var e=t.name,n=t.options,i=void 0===n?{}:n,s=t.effect;if("function"==typeof s){var a=s({state:o,name:e,instance:l,options:i}),c=function(){};r.push(a||c)}}))}function h(){r.forEach((function(t){return t()})),r=[]}return l.setOptions(n).then((function(t){!a&&n.onFirstUpdate&&n.onFirstUpdate(t)})),l}}var Ei=Pi(),ki=Pi({defaultModifiers:[In,di,An,nn]}),Mi=Pi({defaultModifiers:[In,di,An,nn,hi,ii,fi,Pn,ai]});const Ci=Object.freeze({__proto__:null,popperGenerator:Pi,detectOverflow:Qn,createPopperBase:Ei,createPopper:Mi,createPopperLite:ki,top:Te,bottom:Pe,right:Ee,left:ke,auto:Me,basePlacements:Ce,start:Se,end:Ae,clippingParents:ze,viewport:Oe,popper:Ie,reference:Ne,variationPlacements:Be,placements:De,beforeRead:Ze,read:Re,afterRead:je,beforeMain:He,main:We,afterMain:Fe,beforeWrite:qe,write:Ue,afterWrite:Ve,modifierPhases:Ke,applyStyles:nn,arrow:Pn,computeStyles:An,eventListeners:In,flip:ii,hide:ai,offset:hi,popperOffsets:di,preventOverflow:fi}),Si="dropdown",Ai=".bs.dropdown",zi=".data-api",Oi="Escape",Ii="Space",Ni="Tab",Bi="ArrowUp",Di="ArrowDown",Zi=2,Ri=new RegExp(`${Bi}|${Di}|${Oi}`),ji=`hide${Ai}`,Hi=`hidden${Ai}`,Wi=`show${Ai}`,Fi=`shown${Ai}`,qi=`click${Ai}${zi}`,Ui=`keydown${Ai}${zi}`,Vi=`keyup${Ai}${zi}`,Ki="show",Gi="dropup",Yi="dropend",Xi="dropstart",Ji="navbar",Qi='[data-bs-toggle="dropdown"]',to=".dropdown-menu",eo=".navbar-nav",no=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",io=w()?"top-end":"top-start",oo=w()?"top-start":"top-end",so=w()?"bottom-end":"bottom-start",ro=w()?"bottom-start":"bottom-end",ao=w()?"left-start":"right-start",lo=w()?"right-start":"left-start",co={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},ho={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"};class uo extends K{constructor(t,e){super(t),this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar()}static get Default(){return co}static get DefaultType(){return ho}static get NAME(){return Si}toggle(){return this._isShown()?this.hide():this.show()}show(){if(m(this._element)||this._isShown(this._menu))return;const t={relatedTarget:this._element};if(F.trigger(this._element,Wi,t).defaultPrevented)return;const e=uo.getParentFromElement(this._element);this._inNavbar?ht.setDataAttribute(this._menu,"popper","none"):this._createPopper(e),"ontouchstart"in document.documentElement&&!e.closest(eo)&&[].concat(...document.body.children).forEach((t=>F.on(t,"mouseover",_))),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Ki),this._element.classList.add(Ki),F.trigger(this._element,Fi,t)}hide(){if(m(this._element)||!this._isShown(this._menu))return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){F.trigger(this._element,ji,t).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>F.off(t,"mouseover",_))),this._popper&&this._popper.destroy(),this._menu.classList.remove(Ki),this._element.classList.remove(Ki),this._element.setAttribute("aria-expanded","false"),ht.removeDataAttribute(this._menu,"popper"),F.trigger(this._element,Hi,t))}_getConfig(t){if(t={...this.constructor.Default,...ht.getDataAttributes(this._element),...t},d(Si,t,this.constructor.DefaultType),"object"==typeof t.reference&&!h(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Si.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(t){if(void 0===Ci)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=t:h(this._config.reference)?e=u(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const n=this._getPopperConfig(),i=n.modifiers.find((t=>"applyStyles"===t.name&&!1===t.enabled));this._popper=Mi(e,this._menu,n),i&&ht.setDataAttribute(this._menu,"popper","static")}_isShown(t=this._element){return t.classList.contains(Ki)}_getMenuElement(){return dt.next(this._element,to)[0]}_getPlacement(){const t=this._element.parentNode;if(t.classList.contains(Yi))return ao;if(t.classList.contains(Xi))return lo;const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains(Gi)?e?oo:io:e?ro:so}_detectNavbar(){return null!==this._element.closest(`.${Ji}`)}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const n=dt.find(no,this._menu).filter(p);n.length&&T(n,e,t===Di,!n.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=uo.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(t&&(t.button===Zi||"keyup"===t.type&&t.key!==Ni))return;const e=dt.find(Qi);for(let n=0,i=e.length;n<i;n++){const i=uo.getInstance(e[n]);if(!i||!1===i._config.autoClose)continue;if(!i._isShown())continue;const o={relatedTarget:i._element};if(t){const e=t.composedPath(),n=e.includes(i._menu);if(e.includes(i._element)||"inside"===i._config.autoClose&&!n||"outside"===i._config.autoClose&&n)continue;if(i._menu.contains(t.target)&&("keyup"===t.type&&t.key===Ni||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;"click"===t.type&&(o.clickEvent=t)}i._completeHide(o)}}static getParentFromElement(t){return a(t)||t.parentNode}static dataApiKeydownHandler(t){if(/input|textarea/i.test(t.target.tagName)?t.key===Ii||t.key!==Oi&&(t.key!==Di&&t.key!==Bi||t.target.closest(to)):!Ri.test(t.key))return;const e=this.classList.contains(Ki);if(!e&&t.key===Oi)return;if(t.preventDefault(),t.stopPropagation(),m(this))return;const n=this.matches(Qi)?this:dt.prev(this,Qi)[0],i=uo.getOrCreateInstance(n);if(t.key!==Oi)return t.key===Bi||t.key===Di?(e||i.show(),void i._selectMenuItem(t)):void(e&&t.key!==Ii||uo.clearMenus());i.hide()}}F.on(document,Ui,Qi,uo.dataApiKeydownHandler),F.on(document,Ui,to,uo.dataApiKeydownHandler),F.on(document,qi,uo.clearMenus),F.on(document,Vi,uo.clearMenus),F.on(document,qi,Qi,(function(t){t.preventDefault(),uo.getOrCreateInstance(this).toggle()})),x(uo);const po=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",mo=".sticky-top";class fo{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,"paddingRight",(e=>e+t)),this._setElementAttributes(po,"paddingRight",(e=>e+t)),this._setElementAttributes(mo,"marginRight",(e=>e-t))}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,n){const i=this.getWidth(),o=t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+i)return;this._saveInitialAttribute(t,e);const o=window.getComputedStyle(t)[e];t.style[e]=`${n(Number.parseFloat(o))}px`};this._applyManipulationCallback(t,o)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes(po,"paddingRight"),this._resetElementAttributes(mo,"marginRight")}_saveInitialAttribute(t,e){const n=t.style[e];n&&ht.setDataAttribute(t,e,n)}_resetElementAttributes(t,e){const n=t=>{const n=ht.getDataAttribute(t,e);void 0===n?t.style.removeProperty(e):(ht.removeDataAttribute(t,e),t.style[e]=n)};this._applyManipulationCallback(t,n)}_applyManipulationCallback(t,e){h(t)?e(t):dt.find(t,this._element).forEach(e)}isOverflowing(){return this.getWidth()>0}}const _o={className:"modal-backdrop",isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},go={className:"string",isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},vo="backdrop",yo="fade",bo="show",wo=`mousedown.bs.${vo}`;class xo{constructor(t){this._config=this._getConfig(t),this._isAppended=!1,this._element=null}show(t){this._config.isVisible?(this._append(),this._config.isAnimated&&g(this._getElement()),this._getElement().classList.add(bo),this._emulateAnimation((()=>{$(t)}))):$(t)}hide(t){this._config.isVisible?(this._getElement().classList.remove(bo),this._emulateAnimation((()=>{this.dispose(),$(t)}))):$(t)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add(yo),this._element=t}return this._element}_getConfig(t){return(t={..._o,..."object"==typeof t?t:{}}).rootElement=u(t.rootElement),d(vo,t,go),t}_append(){this._isAppended||(this._config.rootElement.append(this._getElement()),F.on(this._getElement(),wo,(()=>{$(this._config.clickCallback)})),this._isAppended=!0)}dispose(){this._isAppended&&(F.off(this._element,wo),this._element.remove(),this._isAppended=!1)}_emulateAnimation(t){L(t,this._getElement(),this._config.isAnimated)}}const $o={trapElement:null,autofocus:!0},Lo={trapElement:"element",autofocus:"boolean"},To="focustrap",Po=".bs.focustrap",Eo=`focusin${Po}`,ko=`keydown.tab${Po}`,Mo="Tab",Co="forward",So="backward";class Ao{constructor(t){this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}activate(){const{trapElement:t,autofocus:e}=this._config;this._isActive||(e&&t.focus(),F.off(document,Po),F.on(document,Eo,(t=>this._handleFocusin(t))),F.on(document,ko,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,F.off(document,Po))}_handleFocusin(t){const{target:e}=t,{trapElement:n}=this._config;if(e===document||e===n||n.contains(e))return;const i=dt.focusableChildren(n);0===i.length?n.focus():this._lastTabNavDirection===So?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){t.key===Mo&&(this._lastTabNavDirection=t.shiftKey?So:Co)}_getConfig(t){return t={...$o,..."object"==typeof t?t:{}},d(To,t,Lo),t}}const zo="modal",Oo=".bs.modal",Io="Escape",No={backdrop:!0,keyboard:!0,focus:!0},Bo={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},Do=`hide${Oo}`,Zo=`hidePrevented${Oo}`,Ro=`hidden${Oo}`,jo=`show${Oo}`,Ho=`shown${Oo}`,Wo=`resize${Oo}`,Fo=`click.dismiss${Oo}`,qo=`keydown.dismiss${Oo}`,Uo=`mouseup.dismiss${Oo}`,Vo=`mousedown.dismiss${Oo}`,Ko=`click${Oo}.data-api`,Go="modal-open",Yo="fade",Xo="show",Jo="modal-static",Qo=".modal.show",ts=".modal-dialog",es=".modal-body",ns='[data-bs-toggle="modal"]';class is extends K{constructor(t,e){super(t),this._config=this._getConfig(e),this._dialog=dt.findOne(ts,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new fo}static get Default(){return No}static get NAME(){return zo}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||F.trigger(this._element,jo,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add(Go),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),F.on(this._dialog,Vo,(()=>{F.one(this._element,Uo,(t=>{t.target===this._element&&(this._ignoreBackdropClick=!0)}))})),this._showBackdrop((()=>this._showElement(t))))}hide(){if(!this._isShown||this._isTransitioning)return;if(F.trigger(this._element,Do).defaultPrevented)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),this._focustrap.deactivate(),this._element.classList.remove(Xo),F.off(this._element,Fo),F.off(this._dialog,Vo),this._queueCallback((()=>this._hideModal()),this._element,t)}dispose(){[window,this._dialog].forEach((t=>F.off(t,Oo))),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new xo({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ao({trapElement:this._element})}_getConfig(t){return t={...No,...ht.getDataAttributes(this._element),..."object"==typeof t?t:{}},d(zo,t,Bo),t}_showElement(t){const e=this._isAnimated(),n=dt.findOne(es,this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,n&&(n.scrollTop=0),e&&g(this._element),this._element.classList.add(Xo);const i=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,F.trigger(this._element,Ho,{relatedTarget:t})};this._queueCallback(i,this._dialog,e)}_setEscapeEvent(){this._isShown?F.on(this._element,qo,(t=>{this._config.keyboard&&t.key===Io?(t.preventDefault(),this.hide()):this._config.keyboard||t.key!==Io||this._triggerBackdropTransition()})):F.off(this._element,qo)}_setResizeEvent(){this._isShown?F.on(window,Wo,(()=>this._adjustDialog())):F.off(window,Wo)}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Go),this._resetAdjustments(),this._scrollBar.reset(),F.trigger(this._element,Ro)}))}_showBackdrop(t){F.on(this._element,Fo,(t=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:t.target===t.currentTarget&&(!0===this._config.backdrop?this.hide():"static"===this._config.backdrop&&this._triggerBackdropTransition())})),this._backdrop.show(t)}_isAnimated(){return this._element.classList.contains(Yo)}_triggerBackdropTransition(){if(F.trigger(this._element,Zo).defaultPrevented)return;const{classList:t,scrollHeight:e,style:n}=this._element,i=e>document.documentElement.clientHeight;!i&&"hidden"===n.overflowY||t.contains(Jo)||(i||(n.overflowY="hidden"),t.add(Jo),this._queueCallback((()=>{t.remove(Jo),i||this._queueCallback((()=>{n.overflowY=""}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),n=e>0;(!n&&t&&!w()||n&&!t&&w())&&(this._element.style.paddingLeft=`${e}px`),(n&&!t&&!w()||!n&&t&&w())&&(this._element.style.paddingRight=`${e}px`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const n=is.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t](e)}}))}}F.on(document,Ko,ns,(function(t){const e=a(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),F.one(e,jo,(t=>{t.defaultPrevented||F.one(e,Ro,(()=>{p(this)&&this.focus()}))}));const n=dt.findOne(Qo);n&&is.getInstance(n).hide(),is.getOrCreateInstance(e).toggle(this)})),G(is),x(is);const os="offcanvas",ss=".bs.offcanvas",rs=".data-api",as=`load${ss}${rs}`,ls="Escape",cs={backdrop:!0,keyboard:!0,scroll:!1},hs={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},us="show",ds="offcanvas-backdrop",ps=".offcanvas.show",ms=`show${ss}`,fs=`shown${ss}`,_s=`hide${ss}`,gs=`hidden${ss}`,vs=`click${ss}${rs}`,ys=`keydown.dismiss${ss}`,bs='[data-bs-toggle="offcanvas"]';class ws extends K{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get NAME(){return os}static get Default(){return cs}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(F.trigger(this._element,ms,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||(new fo).hide(),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(us);const e=()=>{this._config.scroll||this._focustrap.activate(),F.trigger(this._element,fs,{relatedTarget:t})};this._queueCallback(e,this._element,!0)}hide(){if(!this._isShown)return;if(F.trigger(this._element,_s).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.remove(us),this._backdrop.hide();const t=()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||(new fo).reset(),F.trigger(this._element,gs)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_getConfig(t){return t={...cs,...ht.getDataAttributes(this._element),..."object"==typeof t?t:{}},d(os,t,hs),t}_initializeBackDrop(){return new xo({className:ds,isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_initializeFocusTrap(){return new Ao({trapElement:this._element})}_addEventListeners(){F.on(this._element,ys,(t=>{this._config.keyboard&&t.key===ls&&this.hide()}))}static jQueryInterface(t){return this.each((function(){const e=ws.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}F.on(document,vs,bs,(function(t){const e=a(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),m(this))return;F.one(e,gs,(()=>{p(this)&&this.focus()}));const n=dt.findOne(ps);n&&n!==e&&ws.getInstance(n).hide(),ws.getOrCreateInstance(e).toggle(this)})),F.on(window,as,(()=>dt.find(ps).forEach((t=>ws.getOrCreateInstance(t).show())))),G(ws),x(ws);const xs=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),$s=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Ls=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Ts=(t,e)=>{const n=t.nodeName.toLowerCase();if(e.includes(n))return!xs.has(n)||Boolean($s.test(t.nodeValue)||Ls.test(t.nodeValue));const i=e.filter((t=>t instanceof RegExp));for(let t=0,e=i.length;t<e;t++)if(i[t].test(n))return!0;return!1},Ps={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};function Es(t,e,n){if(!t.length)return t;if(n&&"function"==typeof n)return n(t);const i=(new window.DOMParser).parseFromString(t,"text/html"),o=[].concat(...i.body.querySelectorAll("*"));for(let t=0,n=o.length;t<n;t++){const n=o[t],i=n.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){n.remove();continue}const s=[].concat(...n.attributes),r=[].concat(e["*"]||[],e[i]||[]);s.forEach((t=>{Ts(t,r)||n.removeAttribute(t.nodeName)}))}return i.body.innerHTML}const ks="tooltip",Ms=".bs.tooltip",Cs="bs-tooltip",Ss=new Set(["sanitize","allowList","sanitizeFn"]),As={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},zs={AUTO:"auto",TOP:"top",RIGHT:w()?"left":"right",BOTTOM:"bottom",LEFT:w()?"right":"left"},Os={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:Ps,popperConfig:null},Is={HIDE:`hide${Ms}`,HIDDEN:`hidden${Ms}`,SHOW:`show${Ms}`,SHOWN:`shown${Ms}`,INSERTED:`inserted${Ms}`,CLICK:`click${Ms}`,FOCUSIN:`focusin${Ms}`,FOCUSOUT:`focusout${Ms}`,MOUSEENTER:`mouseenter${Ms}`,MOUSELEAVE:`mouseleave${Ms}`},Ns="fade",Bs="show",Ds="show",Zs="out",Rs=".tooltip-inner",js=".modal",Hs="hide.bs.modal",Ws="hover",Fs="focus",qs="click",Us="manual";class Vs extends K{constructor(t,e){if(void 0===Ci)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(e),this.tip=null,this._setListeners()}static get Default(){return Os}static get NAME(){return ks}static get Event(){return Is}static get DefaultType(){return As}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(t){if(this._isEnabled)if(t){const e=this._initializeOnDelegatedTarget(t);e._activeTrigger.click=!e._activeTrigger.click,e._isWithActiveTrigger()?e._enter(null,e):e._leave(null,e)}else{if(this.getTipElement().classList.contains(Bs))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),F.off(this._element.closest(js),Hs,this._hideModalHandler),this.tip&&this.tip.remove(),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this.isWithContent()||!this._isEnabled)return;const t=F.trigger(this._element,this.constructor.Event.SHOW),e=f(this._element),n=null===e?this._element.ownerDocument.documentElement.contains(this._element):e.contains(this._element);if(t.defaultPrevented||!n)return;"tooltip"===this.constructor.NAME&&this.tip&&this.getTitle()!==this.tip.querySelector(Rs).innerHTML&&(this._disposePopper(),this.tip.remove(),this.tip=null);const i=this.getTipElement(),s=o(this.constructor.NAME);i.setAttribute("id",s),this._element.setAttribute("aria-describedby",s),this._config.animation&&i.classList.add(Ns);const r="function"==typeof this._config.placement?this._config.placement.call(this,i,this._element):this._config.placement,a=this._getAttachment(r);this._addAttachmentClass(a);const{container:l}=this._config;U.set(i,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(l.append(i),F.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=Mi(this._element,i,this._getPopperConfig(a)),i.classList.add(Bs);const c=this._resolvePossibleFunction(this._config.customClass);c&&i.classList.add(...c.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>{F.on(t,"mouseover",_)}));const h=()=>{const t=this._hoverState;this._hoverState=null,F.trigger(this._element,this.constructor.Event.SHOWN),t===Zs&&this._leave(null,this)},u=this.tip.classList.contains(Ns);this._queueCallback(h,this.tip,u)}hide(){if(!this._popper)return;const t=this.getTipElement(),e=()=>{this._isWithActiveTrigger()||(this._hoverState!==Ds&&t.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),F.trigger(this._element,this.constructor.Event.HIDDEN),this._disposePopper())};if(F.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;t.classList.remove(Bs),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>F.off(t,"mouseover",_))),this._activeTrigger[qs]=!1,this._activeTrigger[Fs]=!1,this._activeTrigger[Ws]=!1;const n=this.tip.classList.contains(Ns);this._queueCallback(e,this.tip,n),this._hoverState=""}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const t=document.createElement("div");t.innerHTML=this._config.template;const e=t.children[0];return this.setContent(e),e.classList.remove(Ns,Bs),this.tip=e,this.tip}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),Rs)}_sanitizeAndSetContent(t,e,n){const i=dt.findOne(n,t);e||!i?this.setElementContent(i,e):i.remove()}setElementContent(t,e){if(null!==t)return h(e)?(e=u(e),void(this._config.html?e.parentNode!==t&&(t.innerHTML="",t.append(e)):t.textContent=e.textContent)):void(this._config.html?(this._config.sanitize&&(e=Es(e,this._config.allowList,this._config.sanitizeFn)),t.innerHTML=e):t.textContent=e)}getTitle(){const t=this._element.getAttribute("data-bs-original-title")||this._config.title;return this._resolvePossibleFunction(t)}updateAttachment(t){return"right"===t?"end":"left"===t?"start":t}_initializeOnDelegatedTarget(t,e){return e||this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:t=>this._handlePopperPlacementChange(t)}],onFirstUpdate:t=>{t.options.placement!==t.placement&&this._handlePopperPlacementChange(t)}};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_addAttachmentClass(t){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(t)}`)}_getAttachment(t){return zs[t.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach((t=>{if("click"===t)F.on(this._element,this.constructor.Event.CLICK,this._config.selector,(t=>this.toggle(t)));else if(t!==Us){const e=t===Ws?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,n=t===Ws?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;F.on(this._element,e,this._config.selector,(t=>this._enter(t))),F.on(this._element,n,this._config.selector,(t=>this._leave(t)))}})),this._hideModalHandler=()=>{this._element&&this.hide()},F.on(this._element.closest(js),Hs,this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-bs-original-title");(t||"string"!==e)&&(this._element.setAttribute("data-bs-original-title",t||""),!t||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))}_enter(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusin"===t.type?Fs:Ws]=!0),e.getTipElement().classList.contains(Bs)||e._hoverState===Ds?e._hoverState=Ds:(clearTimeout(e._timeout),e._hoverState=Ds,e._config.delay&&e._config.delay.show?e._timeout=setTimeout((()=>{e._hoverState===Ds&&e.show()}),e._config.delay.show):e.show())}_leave(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusout"===t.type?Fs:Ws]=e._element.contains(t.relatedTarget)),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=Zs,e._config.delay&&e._config.delay.hide?e._timeout=setTimeout((()=>{e._hoverState===Zs&&e.hide()}),e._config.delay.hide):e.hide())}_isWithActiveTrigger(){for(const t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1}_getConfig(t){const e=ht.getDataAttributes(this._element);return Object.keys(e).forEach((t=>{Ss.has(t)&&delete e[t]})),(t={...this.constructor.Default,...e,..."object"==typeof t&&t?t:{}}).container=!1===t.container?document.body:u(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),d(ks,t,this.constructor.DefaultType),t.sanitize&&(t.template=Es(t.template,t.allowList,t.sanitizeFn)),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t}_cleanTipClass(){const t=this.getTipElement(),e=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),n=t.getAttribute("class").match(e);null!==n&&n.length>0&&n.map((t=>t.trim())).forEach((e=>t.classList.remove(e)))}_getBasicClassPrefix(){return Cs}_handlePopperPlacementChange(t){const{state:e}=t;e&&(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(t){return this.each((function(){const e=Vs.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}x(Vs);const Ks="popover",Gs=".bs.popover",Ys="bs-popover",Xs={...Vs.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'},Js={...Vs.DefaultType,content:"(string|element|function)"},Qs={HIDE:`hide${Gs}`,HIDDEN:`hidden${Gs}`,SHOW:`show${Gs}`,SHOWN:`shown${Gs}`,INSERTED:`inserted${Gs}`,CLICK:`click${Gs}`,FOCUSIN:`focusin${Gs}`,FOCUSOUT:`focusout${Gs}`,MOUSEENTER:`mouseenter${Gs}`,MOUSELEAVE:`mouseleave${Gs}`},tr=".popover-header",er=".popover-body";class nr extends Vs{static get Default(){return Xs}static get NAME(){return Ks}static get Event(){return Qs}static get DefaultType(){return Js}isWithContent(){return this.getTitle()||this._getContent()}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),tr),this._sanitizeAndSetContent(t,this._getContent(),er)}_getContent(){return this._resolvePossibleFunction(this._config.content)}_getBasicClassPrefix(){return Ys}static jQueryInterface(t){return this.each((function(){const e=nr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}x(nr);const ir="scrollspy",or=".bs.scrollspy",sr={offset:10,method:"auto",target:""},rr={offset:"number",method:"string",target:"(string|element)"},ar=`activate${or}`,lr=`scroll${or}`,cr=`load${or}.data-api`,hr="dropdown-item",ur="active",dr='[data-bs-spy="scroll"]',pr=".nav, .list-group",mr=".nav-link",fr=".nav-item",_r=".list-group-item",gr=`${mr}, ${_r}, .${hr}`,vr=".dropdown",yr=".dropdown-toggle",br="offset",wr="position";class xr extends K{constructor(t,e){super(t),this._scrollElement="BODY"===this._element.tagName?window:this._element,this._config=this._getConfig(e),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,F.on(this._scrollElement,lr,(()=>this._process())),this.refresh(),this._process()}static get Default(){return sr}static get NAME(){return ir}refresh(){const t=this._scrollElement===this._scrollElement.window?br:wr,e="auto"===this._config.method?t:this._config.method,n=e===wr?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),dt.find(gr,this._config.target).map((t=>{const i=r(t),o=i?dt.findOne(i):null;if(o){const t=o.getBoundingClientRect();if(t.width||t.height)return[ht[e](o).top+n,i]}return null})).filter((t=>t)).sort(((t,e)=>t[0]-e[0])).forEach((t=>{this._offsets.push(t[0]),this._targets.push(t[1])}))}dispose(){F.off(this._scrollElement,or),super.dispose()}_getConfig(t){return(t={...sr,...ht.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}}).target=u(t.target)||document.documentElement,d(ir,t,rr),t}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){const t=this._targets[this._targets.length-1];this._activeTarget!==t&&this._activate(t)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(let e=this._offsets.length;e--;)this._activeTarget!==this._targets[e]&&t>=this._offsets[e]&&(void 0===this._offsets[e+1]||t<this._offsets[e+1])&&this._activate(this._targets[e])}}_activate(t){this._activeTarget=t,this._clear();const e=gr.split(",").map((e=>`${e}[data-bs-target="${t}"],${e}[href="${t}"]`)),n=dt.findOne(e.join(","),this._config.target);n.classList.add(ur),n.classList.contains(hr)?dt.findOne(yr,n.closest(vr)).classList.add(ur):dt.parents(n,pr).forEach((t=>{dt.prev(t,`${mr}, ${_r}`).forEach((t=>t.classList.add(ur))),dt.prev(t,fr).forEach((t=>{dt.children(t,mr).forEach((t=>t.classList.add(ur)))}))})),F.trigger(this._scrollElement,ar,{relatedTarget:t})}_clear(){dt.find(gr,this._config.target).filter((t=>t.classList.contains(ur))).forEach((t=>t.classList.remove(ur)))}static jQueryInterface(t){return this.each((function(){const e=xr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}F.on(window,cr,(()=>{dt.find(dr).forEach((t=>new xr(t)))})),x(xr);const $r="tab",Lr=".bs.tab",Tr=`hide${Lr}`,Pr=`hidden${Lr}`,Er=`show${Lr}`,kr=`shown${Lr}`,Mr=`click${Lr}.data-api`,Cr="dropdown-menu",Sr="active",Ar="fade",zr="show",Or=".dropdown",Ir=".nav, .list-group",Nr=".active",Br=":scope > li > .active",Dr='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Zr=".dropdown-toggle",Rr=":scope > .dropdown-menu .active";class jr extends K{static get NAME(){return $r}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(Sr))return;let t;const e=a(this._element),n=this._element.closest(Ir);if(n){const e="UL"===n.nodeName||"OL"===n.nodeName?Br:Nr;t=dt.find(e,n),t=t[t.length-1]}const i=t?F.trigger(t,Tr,{relatedTarget:this._element}):null;if(F.trigger(this._element,Er,{relatedTarget:t}).defaultPrevented||null!==i&&i.defaultPrevented)return;this._activate(this._element,n);const o=()=>{F.trigger(t,Pr,{relatedTarget:this._element}),F.trigger(this._element,kr,{relatedTarget:t})};e?this._activate(e,e.parentNode,o):o()}_activate(t,e,n){const i=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?dt.children(e,Nr):dt.find(Br,e))[0],o=n&&i&&i.classList.contains(Ar),s=()=>this._transitionComplete(t,i,n);i&&o?(i.classList.remove(zr),this._queueCallback(s,t,!0)):s()}_transitionComplete(t,e,n){if(e){e.classList.remove(Sr);const t=dt.findOne(Rr,e.parentNode);t&&t.classList.remove(Sr),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}t.classList.add(Sr),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),g(t),t.classList.contains(Ar)&&t.classList.add(zr);let i=t.parentNode;if(i&&"LI"===i.nodeName&&(i=i.parentNode),i&&i.classList.contains(Cr)){const e=t.closest(Or);e&&dt.find(Zr,e).forEach((t=>t.classList.add(Sr))),t.setAttribute("aria-expanded",!0)}n&&n()}static jQueryInterface(t){return this.each((function(){const e=jr.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}F.on(document,Mr,Dr,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),m(this)||jr.getOrCreateInstance(this).show()})),x(jr);const Hr="toast",Wr=".bs.toast",Fr=`mouseover${Wr}`,qr=`mouseout${Wr}`,Ur=`focusin${Wr}`,Vr=`focusout${Wr}`,Kr=`hide${Wr}`,Gr=`hidden${Wr}`,Yr=`show${Wr}`,Xr=`shown${Wr}`,Jr="fade",Qr="hide",ta="show",ea="showing",na={animation:"boolean",autohide:"boolean",delay:"number"},ia={animation:!0,autohide:!0,delay:5e3};class oa extends K{constructor(t,e){super(t),this._config=this._getConfig(e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return na}static get Default(){return ia}static get NAME(){return Hr}show(){if(F.trigger(this._element,Yr).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(Jr);const t=()=>{this._element.classList.remove(ea),F.trigger(this._element,Xr),this._maybeScheduleHide()};this._element.classList.remove(Qr),g(this._element),this._element.classList.add(ta),this._element.classList.add(ea),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this._element.classList.contains(ta))return;if(F.trigger(this._element,Kr).defaultPrevented)return;const t=()=>{this._element.classList.add(Qr),this._element.classList.remove(ea),this._element.classList.remove(ta),F.trigger(this._element,Gr)};this._element.classList.add(ea),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this._element.classList.contains(ta)&&this._element.classList.remove(ta),super.dispose()}_getConfig(t){return t={...ia,...ht.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}},d(Hr,t,this.constructor.DefaultType),t}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const n=t.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){F.on(this._element,Fr,(t=>this._onInteraction(t,!0))),F.on(this._element,qr,(t=>this._onInteraction(t,!1))),F.on(this._element,Ur,(t=>this._onInteraction(t,!0))),F.on(this._element,Vr,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=oa.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}G(oa),x(oa)})();const ct=[];function ht(e,n=t){let i;const o=new Set;function s(t){if(r(e,t)&&(e=t,i)){const t=!ct.length;for(const t of o)t[1](),ct.push(t,e);if(t){for(let t=0;t<ct.length;t+=2)ct[t][0](ct[t+1]);ct.length=0}}}return{set:s,update:function(t){s(t(e))},subscribe:function(r,a=t){const l=[r,a];return o.add(l),1===o.size&&(i=n(s)||t),r(e),()=>{o.delete(l),0===o.size&&(i(),i=null)}}}}const ut=ht(),dt=ht(),pt=ht(),mt=ht(),ft=ht(),_t=Nominatim_Config.Reverse_Only?"reverse":"search",gt=[_t,"reverse","details","deletable","polygons","status","about"];function vt(t,e){if(void 0===t)t=window.location.pathname.replace(".html","").replace(/^.*\//,""),gt.includes(t)||(t=_t),e=new URLSearchParams(window.location.search);else{gt.includes(t)||(t=_t),void 0===e&&(e=new URLSearchParams);let n=e.toString();n&&(n="?"+n);let i=t+".html"+n;window.location.protocol.match(/^http/)?window.history.pushState([],"",i):window.location.href=i}ft.set({tab:t,params:e}),pt.set(null),mt.set(null)}function yt(e){let n;return{c(){n=x("footer"),n.innerHTML='<p class="disclaimer svelte-1f2bd8l">Addresses and postcodes are approximate</p> \n <p class="copyright svelte-1f2bd8l">© <a href="https://osm.org/copyright">OpenStreetMap</a> contributors</p>',C(n,"class","svelte-1f2bd8l")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}class bt extends lt{constructor(t){super(),at(this,t,null,yt,r,{})}}function wt(t){var e=document.getElementById("loading");e&&(e.style.display="start"===t?"block":null)}async function xt(t,e,n){var i=function(t,e){1===e.dedupe&&delete e.dedupe;return function(t,e){for(var n=Object.keys(e),i=0;i<n.length;i+=1)t[n[i]]=e[n[i]]}(e,Nominatim_Config.Nominatim_API_Endpoint_Params),Tt(t)+"?"+Object.keys(function(t){for(var e=Object.keys(t),n=0;n<e.length;n+=1){var i=t[e[n]];void 0!==i&&""!==i&&null!==i||delete t[e[n]]}return t}(e)).map((t=>encodeURIComponent(t)+"="+encodeURIComponent(e[t]))).join("&")}(t,e),o=new URLSearchParams(window.location.search);o&&o.get("httpbin_status")&&(i="https://httpbin.org/status/"+parseInt(o.get("httpbin_status"),10)),wt("start"),"status"!==t&&pt.set(null);try{await fetch(i,{headers:Nominatim_Config.Nominatim_API_Endpoint_Headers||{}}).then((async t=>{if(t.status>=200&&t.status<300||404===t.status){var e;try{e=await t.json()}catch(t){return void mt.set(`Error parsing JSON data from ${i} (${t})`)}return e}mt.set(`Error fetching data from ${i} (${t.statusText})`)})).then((t=>{t&&(t.error&&mt.set(t.error.message),n(t)),wt("finish")}))}catch(t){mt.set(`Error fetching data from ${i} (${t})`),wt("finish")}"status"!==t&&pt.set(i)}var $t={};async function Lt(t,e){if(window.location.protocol.match(/^http/))if($t[t])e.innerHTML=$t[t];else try{await fetch(t).then((t=>t.text())).then((n=>{n=n.replace("Nominatim_API_Endpoint",Tt()),e.innerHTML=n,$t[t]=n}))}catch(n){e.innerHTML=`Error fetching content from ${t} (${n})`}else e.innerHTML=`Cannot display data from ${t} here. Browser security prevents loading content from file:// URLs.`}function Tt(t){var e=Nominatim_Config.Nominatim_API_Endpoint;return"function"==typeof e?e(t):t?e+t+".php":e}function Pt(t){document.title=[t,Nominatim_Config.Page_Title].filter((t=>t&&t.length>1)).join(" | ")}function Et(t){let e,n,i,o;const s=t[6].default,r=p(s,t,t[5],null);return{c(){e=x("a"),r&&r.c(),C(e,"href",t[1]),C(e,"class",t[0])},m(s,a){y(s,e,a),r&&r.m(e,null),n=!0,i||(o=E(e,"click",M(k(t[2]))),i=!0)},p(t,[i]){r&&r.p&&(!n||32&i)&&_(r,s,t,t[5],n?f(s,t[5],i,null):g(t[5]),null),(!n||2&i)&&C(e,"href",t[1]),(!n||1&i)&&C(e,"class",t[0])},i(t){n||(tt(r,t),n=!0)},o(t){et(r,t),n=!1},d(t){t&&b(e),r&&r.d(t),i=!1,o()}}}function kt(t,e,n){let{$$slots:i={},$$scope:o}=e,{page:s}=e,{params_hash:r={}}=e,{extra_classes:a=""}=e,l=s+".html";return t.$$set=t=>{"page"in t&&n(3,s=t.page),"params_hash"in t&&n(4,r=t.params_hash),"extra_classes"in t&&n(0,a=t.extra_classes),"$$scope"in t&&n(5,o=t.$$scope)},t.$$.update=()=>{if(24&t.$$.dirty){let t=new URLSearchParams(r).toString();n(1,l=s+".html"+(t?"?":"")+t)}},[a,l,function(){vt(s,new URLSearchParams(r))},s,r,o,i]}class Mt extends lt{constructor(t){super(),at(this,t,kt,Et,r,{page:3,params_hash:4,extra_classes:0})}}function Ct(t){let e,n,i,o;const s=t[7].default,r=p(s,t,t[6],null);return{c(){e=x("a"),r&&r.c(),C(e,"href",t[2]),C(e,"class",t[0])},m(s,a){y(s,e,a),r&&r.m(e,null),n=!0,i||(o=E(e,"click",M(k(t[8]))),i=!0)},p(t,[i]){r&&r.p&&(!n||64&i)&&_(r,s,t,t[6],n?f(s,t[6],i,null):g(t[6]),null),(!n||4&i)&&C(e,"href",t[2]),(!n||1&i)&&C(e,"class",t[0])},i(t){n||(tt(r,t),n=!0)},o(t){et(r,t),n=!1},d(t){t&&b(e),r&&r.d(t),i=!1,o()}}}function St(t,e,n){let{$$slots:i={},$$scope:o}=e,{lat:s=null}=e,{lon:r=null}=e,{zoom:a=null}=e,{extra_classes:l=""}=e,c=new URLSearchParams,h="reverse.html";return t.$$set=t=>{"lat"in t&&n(3,s=t.lat),"lon"in t&&n(4,r=t.lon),"zoom"in t&&n(5,a=t.zoom),"extra_classes"in t&&n(0,l=t.extra_classes),"$$scope"in t&&n(6,o=t.$$scope)},t.$$.update=()=>{if(56&t.$$.dirty){let t=new URLSearchParams;s&&r&&(t.set("lat",s),t.set("lon",r),a&&t.set("zoom",a)),n(1,c=t)}if(2&t.$$.dirty){let t=c.toString();n(2,h="reverse.html"+(t?"?":"")+t)}},[l,c,h,s,r,a,o,i,()=>vt("reverse",c)]}class At extends lt{constructor(t){super(),at(this,t,St,Ct,r,{lat:3,lon:4,zoom:5,extra_classes:0})}}var zt=["second","minute","hour","day","week","month","year"];var Ot=["秒","分钟","小时","天","周","个月","年"];var It={},Nt=function(t,e){It[t]=e},Bt=[60,60,24,7,365/7/12,12];function Dt(t){return t instanceof Date?t:!isNaN(t)||/^\d+$/.test(t)?new Date(parseInt(t)):(t=(t||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(t))}var Zt=function(t,e,n){var i=function(t,e){return(+(e?Dt(e):new Date)-+Dt(t))/1e3}(t,n&&n.relativeDate);return function(t,e){for(var n=t<0?1:0,i=t=Math.abs(t),o=0;t>=Bt[o]&&o<Bt.length;o++)t/=Bt[o];return(t=Math.floor(t))>(0==(o*=2)?9:1)&&(o+=1),e(t,o,i)[n].replace("%s",t.toString())}(i,function(t){return It[t]||It.en_US}(e))};function Rt(t){let e,n,i,o,s,r,a,l,c,h,u;return{c(){e=x("div"),n=$("Data from "),i=x("a"),o=$("API request"),s=T(),r=x("span"),a=$("("),l=x("a"),c=$("debug output"),u=$(")"),C(i,"href",t[1]),C(l,"href",h=t[1]+"&debug=1"),C(r,"id","api-request-debug"),C(e,"id","api-request")},m(t,h){y(t,e,h),v(e,n),v(e,i),v(i,o),v(e,s),v(e,r),v(r,a),v(r,l),v(l,c),v(r,u)},p(t,e){2&e&&C(i,"href",t[1]),2&e&&h!==(h=t[1]+"&debug=1")&&C(l,"href",h)},d(t){t&&b(e)}}}function jt(t){let e,n,i,o,s=Zt(new Date(t[0]))+"";return{c(){e=$("Data last updated:\n "),n=x("abbr"),i=$(s),C(n,"id","data-date"),C(n,"title",o=t[0]+" (UTC timezone)")},m(t,o){y(t,e,o),y(t,n,o),v(n,i)},p(t,e){1&e&&s!==(s=Zt(new Date(t[0]))+"")&&S(i,s),1&e&&o!==(o=t[0]+" (UTC timezone)")&&C(n,"title",o)},d(t){t&&b(e),t&&b(n)}}}function Ht(t){let e;return{c(){e=$("Details")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Wt(t){let e,n,i,o,s,r,a,l,c,h,u,d=t[1]&&Rt(t),p=t[0]&&jt(t);return c=new Mt({props:{page:"status",$$slots:{default:[Ht]},$$scope:{ctx:t}}}),{c(){e=x("div"),n=x("div"),n.innerHTML='<div class="spinner-border spinner-border-sm text-primary me-1" role="status"></div>\n Loading data from API ...',i=T(),o=x("div"),s=x("div"),d&&d.c(),r=T(),a=x("div"),p&&p.c(),l=$("\n ("),it(c.$$.fragment),h=$(")"),C(n,"id","loading"),C(n,"class","py-2 px-4 svelte-1i1228w"),C(s,"class","col-sm-6"),C(a,"class","col-sm-6 text-end"),C(o,"class","row"),C(e,"id","last-updated"),C(e,"class","container-fluid py-2 px-4 mb-3 svelte-1i1228w")},m(t,m){y(t,e,m),v(e,n),v(e,i),v(e,o),v(o,s),d&&d.m(s,null),v(o,r),v(o,a),p&&p.m(a,null),v(a,l),ot(c,a,null),v(a,h),u=!0},p(t,[e]){t[1]?d?d.p(t,e):(d=Rt(t),d.c(),d.m(s,null)):d&&(d.d(1),d=null),t[0]?p?p.p(t,e):(p=jt(t),p.c(),p.m(a,l)):p&&(p.d(1),p=null);const n={};8&e&&(n.$$scope={dirty:e,ctx:t}),c.$set(n)},i(t){u||(tt(c.$$.fragment,t),u=!0)},o(t){et(c.$$.fragment,t),u=!1},d(t){t&&b(e),d&&d.d(),p&&p.d(),st(c)}}}function Ft(t,e,n){let i,o,s=!1;return pt.subscribe((t=>{n(1,o=t),o&&(n(1,o=new URL(o,window.location.origin)),o.searchParams.delete("polygon_geojson"),n(1,o=o.toString())),s||i||(s=!0,xt("status",{format:"json"},(function(t){n(0,i=t.data_updated),s=!1})))})),[i,o]}Nt("en_US",(function(t,e){if(0===e)return["just now","right now"];var n=zt[Math.floor(e/2)];return t>1&&(n+="s"),[t+" "+n+" ago","in "+t+" "+n]})),Nt("zh_CN",(function(t,e){if(0===e)return["刚刚","片刻后"];var n=Ot[~~(e/2)];return[t+" "+n+"前",t+" "+n+"后"]}));class qt extends lt{constructor(t){super(),at(this,t,Ft,Wt,r,{})}}function Ut(t){let e,n,i,o,s,r;return{c(){e=x("div"),n=$(t[0]),i=T(),o=x("button"),C(o,"type","button"),C(o,"class","btn-close float-end"),C(o,"aria-label","dismiss"),C(e,"id","error"),C(e,"class","container-fluid alert-danger py-3 px-4")},m(a,l){y(a,e,l),v(e,n),v(e,i),v(e,o),s||(r=E(o,"click",t[1]),s=!0)},p(t,e){1&e&&S(n,t[0])},d(t){t&&b(e),s=!1,r()}}}function Vt(e){let n,i=e[0]&&Ut(e);return{c(){i&&i.c(),n=P()},m(t,e){i&&i.m(t,e),y(t,n,e)},p(t,[e]){t[0]?i?i.p(t,e):(i=Ut(t),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},i:t,o:t,d(t){i&&i.d(t),t&&b(n)}}}function Kt(t,e,n){let i;return mt.subscribe((t=>{n(0,i=t)})),[i,function(){mt.set(null)}]}class Gt extends lt{constructor(t){super(),at(this,t,Kt,Vt,r,{})}}function Yt(t){let e,n,i,o,s;return{c(){e=x("img"),i=T(),o=x("h1"),s=$(t[3]),C(e,"alt","logo"),C(e,"id","theme-logo"),c(e.src,n="theme/logo.png")||C(e,"src","theme/logo.png"),C(e,"class","svelte-1q88nx"),C(o,"class","svelte-1q88nx")},m(t,n){y(t,e,n),y(t,i,n),y(t,o,n),v(o,s)},p(t,e){8&e&&S(s,t[3])},d(t){t&&b(e),t&&b(i),t&&b(o)}}}function Xt(t){let e,n,i;return n=new Mt({props:{page:"search",extra_classes:"nav-link "+("search"===t[4]?"active":""),$$slots:{default:[Jt]},$$scope:{ctx:t}}}),{c(){e=x("li"),it(n.$$.fragment),C(e,"class","nav-item svelte-1q88nx")},m(t,o){y(t,e,o),ot(n,e,null),i=!0},p(t,e){const i={};16&e&&(i.extra_classes="nav-link "+("search"===t[4]?"active":"")),128&e&&(i.$$scope={dirty:e,ctx:t}),n.$set(i)},i(t){i||(tt(n.$$.fragment,t),i=!0)},o(t){et(n.$$.fragment,t),i=!1},d(t){t&&b(e),st(n)}}}function Jt(t){let e;return{c(){e=$("Search")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Qt(t){let e;return{c(){e=$("Reverse")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function te(t){let e;return{c(){e=$("Search By ID")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function ee(t){let e;return{c(){e=$("About & Help")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function ne(t){let e,n,i,o,s,r,a,l,c,h,u,d,m,w,L,P,E,k,M,A,z,O,I,N,B,D,Z,R,j,H,W;s=new Mt({props:{page:t[2]?"reverse":"search",$$slots:{default:[Yt]},$$scope:{ctx:t}}});let F=!t[2]&&Xt(t);m=new At({props:{lat:t[0],lon:t[1],extra_classes:"nav-link "+("reverse"===t[4]?"active":""),$$slots:{default:[Qt]},$$scope:{ctx:t}}}),P=new Mt({props:{page:"details",extra_classes:"nav-link "+("details"===t[4]?"active":""),$$slots:{default:[te]},$$scope:{ctx:t}}}),A=new Mt({props:{page:"about",extra_classes:"nav-link "+("about"===t[4]?"active":""),$$slots:{default:[ee]},$$scope:{ctx:t}}});const q=t[6].default,U=p(q,t,t[7],null);return R=new Gt({}),H=new qt({}),{c(){e=x("header"),n=x("nav"),i=x("div"),o=x("div"),it(s.$$.fragment),r=T(),a=x("button"),a.innerHTML='<span class="navbar-toggler-icon"></span>',l=T(),c=x("div"),h=x("ul"),F&&F.c(),u=T(),d=x("li"),it(m.$$.fragment),w=T(),L=x("li"),it(P.$$.fragment),E=T(),k=x("ul"),M=x("li"),it(A.$$.fragment),z=T(),O=x("section"),I=x("h2"),N=$(t[4]),B=T(),D=x("section"),U&&U.c(),Z=T(),it(R.$$.fragment),j=T(),it(H.$$.fragment),C(o,"class","navbar-brand svelte-1q88nx"),C(a,"class","navbar-toggler"),C(a,"type","button"),C(a,"data-bs-toggle","collapse"),C(a,"data-bs-target","#navbarSupportedContent"),C(a,"aria-controls","navbarSupportedContent"),C(a,"aria-expanded","false"),C(a,"aria-label","Toggle navigation"),C(d,"class","nav-item svelte-1q88nx"),C(L,"class","nav-item svelte-1q88nx"),C(h,"class","navbar-nav me-auto"),C(c,"class","collapse navbar-collapse"),C(c,"id","navbarSupportedContent"),C(M,"class","nav-item svelte-1q88nx"),C(k,"class","navbar-nav"),C(i,"class","container-fluid"),C(n,"class","navbar navbar-expand-sm navbar-light"),C(e,"class","container-fluid"),C(O,"class","page-title-section svelte-1q88nx"),C(D,"class","search-section svelte-1q88nx")},m(t,p){y(t,e,p),v(e,n),v(n,i),v(i,o),ot(s,o,null),v(i,r),v(i,a),v(i,l),v(i,c),v(c,h),F&&F.m(h,null),v(h,u),v(h,d),ot(m,d,null),v(h,w),v(h,L),ot(P,L,null),v(i,E),v(i,k),v(k,M),ot(A,M,null),y(t,z,p),y(t,O,p),v(O,I),v(I,N),y(t,B,p),y(t,D,p),U&&U.m(D,null),y(t,Z,p),ot(R,t,p),y(t,j,p),ot(H,t,p),W=!0},p(t,[e]){const n={};4&e&&(n.page=t[2]?"reverse":"search"),136&e&&(n.$$scope={dirty:e,ctx:t}),s.$set(n),t[2]?F&&(J(),et(F,1,1,(()=>{F=null})),Q()):F?(F.p(t,e),4&e&&tt(F,1)):(F=Xt(t),F.c(),tt(F,1),F.m(h,u));const i={};1&e&&(i.lat=t[0]),2&e&&(i.lon=t[1]),16&e&&(i.extra_classes="nav-link "+("reverse"===t[4]?"active":"")),128&e&&(i.$$scope={dirty:e,ctx:t}),m.$set(i);const o={};16&e&&(o.extra_classes="nav-link "+("details"===t[4]?"active":"")),128&e&&(o.$$scope={dirty:e,ctx:t}),P.$set(o);const r={};16&e&&(r.extra_classes="nav-link "+("about"===t[4]?"active":"")),128&e&&(r.$$scope={dirty:e,ctx:t}),A.$set(r),(!W||16&e)&&S(N,t[4]),U&&U.p&&(!W||128&e)&&_(U,q,t,t[7],W?f(q,t[7],e,null):g(t[7]),null)},i(t){W||(tt(s.$$.fragment,t),tt(F),tt(m.$$.fragment,t),tt(P.$$.fragment,t),tt(A.$$.fragment,t),tt(U,t),tt(R.$$.fragment,t),tt(H.$$.fragment,t),W=!0)},o(t){et(s.$$.fragment,t),et(F),et(m.$$.fragment,t),et(P.$$.fragment,t),et(A.$$.fragment,t),et(U,t),et(R.$$.fragment,t),et(H.$$.fragment,t),W=!1},d(t){t&&b(e),st(s),F&&F.d(),st(m),st(P),st(A),t&&b(z),t&&b(O),t&&b(B),t&&b(D),U&&U.d(t),t&&b(Z),st(R,t),t&&b(j),st(H,t)}}}function ie(t,e,n){let i,o,s,r;d(t,ft,(t=>n(5,r=t)));let a,l,{$$slots:c={},$$scope:h}=e;return ut.subscribe((t=>{t&&t.on("move",(function(){n(0,a=t.getCenter().lat),n(1,l=t.getCenter().lng)}))})),t.$$set=t=>{"$$scope"in t&&n(7,h=t.$$scope)},t.$$.update=()=>{32&t.$$.dirty&&n(4,i=r.tab)},n(3,o=Nominatim_Config.Page_Title),n(2,s=Nominatim_Config.Reverse_Only),[a,l,s,o,i,r,c,h]}class oe extends lt{constructor(t){super(),at(this,t,ie,ne,r,{})}}function se(t){let e,n,i,o,s;const r=t[3].default,a=p(r,t,t[2],null);return{c(){e=x("form"),n=x("div"),a&&a.c(),C(n,"class","row g-2"),C(e,"class","form-inline"),C(e,"role","search"),C(e,"accept-charset","UTF-8"),C(e,"action","")},m(r,l){y(r,e,l),v(e,n),a&&a.m(n,null),i=!0,o||(s=E(e,"submit",k(t[0])),o=!0)},p(t,[e]){a&&a.p&&(!i||4&e)&&_(a,r,t,t[2],i?f(r,t[2],e,null):g(t[2]),null)},i(t){i||(tt(a,t),i=!0)},o(t){et(a,t),i=!1},d(t){t&&b(e),a&&a.d(t),o=!1,s()}}}function re(t,e,n){let{$$slots:i={},$$scope:o}=e,{page:s}=e;return t.$$set=t=>{"page"in t&&n(1,s=t.page),"$$scope"in t&&n(2,o=t.$$scope)},[function(t){let e=t.target,n=!0;Array.prototype.slice.call(e.elements).forEach((function(t){(function(t){return!("hidden"===t.type&&t.value.length&&t.pattern&&!t.value.match(t.pattern))&&t.checkValidity()})(t)||(alert("Invalid input in "+t.name),n=!1)})),n&&vt(s,function(t){var e=new URLSearchParams;return Array.prototype.slice.call(t.elements).forEach((function(t){!t.name||t.disabled||["submit","button"].indexOf(t.type)>-1||["checkbox","radio"].indexOf(t.type)>-1&&!t.checked||void 0!==t.value&&""!==t.value&&("dedupe"!==t.name||1!==t.value&&"1"!==t.value)&&e.set(t.name,t.value)})),e}(e))},s,o,i]}class ae extends lt{constructor(t){super(),at(this,t,re,se,r,{page:1})}}function le(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,$,L,P,E,k,M,S,A,z;return{c(){e=x("div"),n=x("input"),o=T(),s=x("div"),r=x("button"),r.textContent="Search",a=T(),l=x("input"),h=T(),u=x("input"),p=T(),m=x("input"),_=T(),g=x("input"),$=T(),L=x("input"),E=T(),k=x("input"),S=T(),A=x("input"),C(n,"id","q"),C(n,"name","q"),C(n,"type","text"),C(n,"class","form-control form-control-sm svelte-1u2ltgo"),C(n,"placeholder","Search"),n.value=i=t[1].q||"",C(e,"class","col-auto"),C(r,"type","submit"),C(r,"class","btn btn-primary btn-sm mx-1"),C(l,"type","hidden"),C(l,"name","viewbox"),l.value=c=t[2]||"",C(u,"type","hidden"),C(u,"name","dedupe"),u.value=d=0===t[1].dedupe?0:1,C(m,"type","hidden"),C(m,"name","bounded"),m.value=f=t[1].bounded?1:"",C(g,"type","hidden"),C(g,"name","accept-language"),g.value=w=t[1]["accept-language"]||"",C(L,"type","hidden"),C(L,"name","countrycodes"),L.value=P=t[1].countrycodes||"",C(L,"pattern","^[a-zA-Z]{2}(,[a-zA-Z]{2})*$"),C(k,"type","hidden"),C(k,"name","limit"),k.value=M=t[1].limit||"",C(A,"type","hidden"),C(A,"name","polygon_threshold"),A.value=z=t[1].polygon_threshold||"",C(s,"class","col-auto")},m(t,i){y(t,e,i),v(e,n),y(t,o,i),y(t,s,i),v(s,r),v(s,a),v(s,l),v(s,h),v(s,u),v(s,p),v(s,m),v(s,_),v(s,g),v(s,$),v(s,L),v(s,E),v(s,k),v(s,S),v(s,A)},p(t,e){2&e&&i!==(i=t[1].q||"")&&n.value!==i&&(n.value=i),4&e&&c!==(c=t[2]||"")&&(l.value=c),2&e&&d!==(d=0===t[1].dedupe?0:1)&&(u.value=d),2&e&&f!==(f=t[1].bounded?1:"")&&(m.value=f),2&e&&w!==(w=t[1]["accept-language"]||"")&&(g.value=w),2&e&&P!==(P=t[1].countrycodes||"")&&(L.value=P),2&e&&M!==(M=t[1].limit||"")&&(k.value=M),2&e&&z!==(z=t[1].polygon_threshold||"")&&(A.value=z)},d(t){t&&b(e),t&&b(o),t&&b(s)}}}function ce(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,$,L,P,E,k,M,S,A,z,O,I,N,B,D,Z,R,j,H,W,F,q,U,V,K,G,Y,X,J,Q;return{c(){e=x("div"),n=x("input"),o=T(),s=x("div"),r=x("input"),l=T(),c=x("div"),h=x("input"),d=T(),p=x("div"),m=x("input"),_=T(),g=x("div"),w=x("input"),L=T(),P=x("div"),E=x("input"),M=T(),S=x("div"),A=x("button"),A.textContent="Search",z=T(),O=x("input"),N=T(),B=x("input"),Z=T(),R=x("input"),H=T(),W=x("input"),q=T(),U=x("input"),K=T(),G=x("input"),X=T(),J=x("input"),C(n,"name","street"),C(n,"type","text"),C(n,"class","form-control form-control-sm me-1"),C(n,"placeholder","House number/Street"),n.value=i=t[1].street||"",C(e,"class","col-auto"),C(r,"name","city"),C(r,"type","text"),C(r,"class","form-control form-control-sm me-1"),C(r,"placeholder","City"),r.value=a=t[1].city||"",C(s,"class","col-auto"),C(h,"id","county"),C(h,"name","county"),C(h,"type","text"),C(h,"class","form-control form-control-sm me-1"),C(h,"placeholder","County"),h.value=u=t[1].county||"",C(c,"class","col-auto"),C(m,"name","state"),C(m,"type","text"),C(m,"class","form-control form-control-sm me-1"),C(m,"placeholder","State"),m.value=f=t[1].state||"",C(p,"class","col-auto"),C(w,"name","country"),C(w,"type","text"),C(w,"class","form-control form-control-sm me-1"),C(w,"placeholder","Country"),w.value=$=t[1].country||"",C(g,"class","col-auto"),C(E,"name","postalcode"),C(E,"type","text"),C(E,"class","form-control form-control-sm me-1"),C(E,"placeholder","Postal Code"),E.value=k=t[1].postalcode||"",C(P,"class","col-auto"),C(A,"type","submit"),C(A,"class","btn btn-primary btn-sm"),C(O,"type","hidden"),C(O,"name","viewbox"),O.value=I=t[2]||"",C(B,"type","hidden"),C(B,"name","dedupe"),B.value=D=0===t[1].dedupe?0:1,C(R,"type","hidden"),C(R,"name","bounded"),R.value=j=t[1].bounded?1:"",C(W,"type","hidden"),C(W,"name","accept-language"),W.value=F=t[1]["accept-language"]||"",C(U,"type","hidden"),C(U,"name","countrycodes"),U.value=V=t[1].countrycodes||"",C(U,"pattern","^[a-zA-Z]{2}(,[a-zA-Z]{2})*$"),C(G,"type","hidden"),C(G,"name","limit"),G.value=Y=t[1].limit||"",C(J,"type","hidden"),C(J,"name","polygon_threshold"),J.value=Q=t[1].polygon_threshold||"",C(S,"class","col-auto")},m(t,i){y(t,e,i),v(e,n),y(t,o,i),y(t,s,i),v(s,r),y(t,l,i),y(t,c,i),v(c,h),y(t,d,i),y(t,p,i),v(p,m),y(t,_,i),y(t,g,i),v(g,w),y(t,L,i),y(t,P,i),v(P,E),y(t,M,i),y(t,S,i),v(S,A),v(S,z),v(S,O),v(S,N),v(S,B),v(S,Z),v(S,R),v(S,H),v(S,W),v(S,q),v(S,U),v(S,K),v(S,G),v(S,X),v(S,J)},p(t,e){2&e&&i!==(i=t[1].street||"")&&n.value!==i&&(n.value=i),2&e&&a!==(a=t[1].city||"")&&r.value!==a&&(r.value=a),2&e&&u!==(u=t[1].county||"")&&h.value!==u&&(h.value=u),2&e&&f!==(f=t[1].state||"")&&m.value!==f&&(m.value=f),2&e&&$!==($=t[1].country||"")&&w.value!==$&&(w.value=$),2&e&&k!==(k=t[1].postalcode||"")&&E.value!==k&&(E.value=k),4&e&&I!==(I=t[2]||"")&&(O.value=I),2&e&&D!==(D=0===t[1].dedupe?0:1)&&(B.value=D),2&e&&j!==(j=t[1].bounded?1:"")&&(R.value=j),2&e&&F!==(F=t[1]["accept-language"]||"")&&(W.value=F),2&e&&V!==(V=t[1].countrycodes||"")&&(U.value=V),2&e&&Y!==(Y=t[1].limit||"")&&(G.value=Y),2&e&&Q!==(Q=t[1].polygon_threshold||"")&&(J.value=Q)},d(t){t&&b(e),t&&b(o),t&&b(s),t&&b(l),t&&b(c),t&&b(d),t&&b(p),t&&b(_),t&&b(g),t&&b(L),t&&b(P),t&&b(M),t&&b(S)}}}function he(t){let e,n,i,s,r,a,l,c,h,u,d,p,m,f,_,g,w,$,L,P,k,M,S,A,z,I,N,B,D,Z,R,j,H,W,F,q,U,V,K,G,Y,X,J,Q,nt,rt,at,lt,ct,ht,ut,dt,pt,mt,ft,_t,gt,vt,yt,bt,wt,xt,$t,Lt,Tt;return u=new ae({props:{page:"search",$$slots:{default:[le]},$$scope:{ctx:t}}}),m=new ae({props:{page:"search",$$slots:{default:[ce]},$$scope:{ctx:t}}}),{c(){e=x("ul"),n=x("li"),i=x("a"),i.textContent="Simple",s=T(),r=x("li"),a=x("a"),a.textContent="Structured",l=T(),c=x("div"),h=x("div"),it(u.$$.fragment),d=T(),p=x("div"),it(m.$$.fragment),f=T(),_=x("details"),g=x("summary"),g.innerHTML="<small>Advanced options</small>",w=T(),$=x("ul"),L=x("li"),P=x("div"),k=x("label"),k.textContent="apply viewbox",M=T(),S=x("input"),z=T(),I=x("li"),N=x("div"),B=x("label"),B.textContent="bounded to viewbox",D=T(),Z=x("input"),j=T(),H=x("li"),W=x("div"),F=x("label"),F.textContent="deduplicate results",q=T(),U=x("input"),K=T(),G=x("li"),Y=x("label"),Y.textContent="Maximum number of results",X=T(),J=x("input"),nt=T(),rt=x("li"),at=x("label"),at.textContent="Polygon simplification",lt=T(),ct=x("input"),ut=T(),dt=x("li"),pt=x("label"),pt.textContent="Languages",mt=T(),ft=x("input"),gt=T(),vt=x("li"),yt=x("label"),yt.textContent="Country Codes",bt=T(),wt=x("input"),C(i,"class","nav-link svelte-1u2ltgo"),C(i,"data-bs-toggle","tab"),C(i,"href","#simple"),O(i,"active",!t[0]),C(n,"class","nav-item"),C(a,"class","nav-link svelte-1u2ltgo"),C(a,"data-bs-toggle","tab"),C(a,"href","#structured"),O(a,"active",t[0]),C(r,"class","nav-item"),C(e,"class","nav nav-tabs svelte-1u2ltgo"),C(h,"class","tab-pane"),C(h,"id","simple"),C(h,"role","tabpanel"),O(h,"active",!t[0]),C(p,"class","tab-pane"),C(p,"id","structured"),C(p,"role","tabpanel"),O(p,"active",t[0]),C(c,"class","tab-content py-2"),C(k,"class","form-check-label svelte-1u2ltgo"),C(k,"for","use_viewbox"),C(S,"type","checkbox"),C(S,"class","form-check-input api-param-setting"),C(S,"id","use_viewbox"),S.checked=A=t[1].viewbox,C(P,"class","form-check form-check-inline"),C(L,"class","svelte-1u2ltgo"),C(B,"class","form-check-label svelte-1u2ltgo"),C(B,"for","option_bounded"),C(Z,"type","checkbox"),C(Z,"class","form-check-input api-param-setting"),C(Z,"id","option_bounded"),Z.checked=R=!!t[1].bounded,C(N,"class","form-check form-check-inline"),C(I,"class","svelte-1u2ltgo"),C(F,"class","form-check-label svelte-1u2ltgo"),C(F,"for","option_dedupe"),C(U,"type","checkbox"),C(U,"class","form-check-input api-param-setting"),C(U,"id","option_dedupe"),U.checked=V=0===t[1].dedupe?0:1,C(W,"class","form-check form-check-inline"),C(H,"class","svelte-1u2ltgo"),C(Y,"for","option_limit"),C(Y,"class","svelte-1u2ltgo"),C(J,"type","number"),C(J,"class","form-control form-control-sm d-inline w-auto api-param-setting"),C(J,"data-api-param","limit"),C(J,"id","option_limit"),C(J,"min","1"),C(J,"max","50"),J.value=Q=t[1].limit||"",C(G,"class","svelte-1u2ltgo"),C(at,"for","option_polygon_threshold"),C(at,"class","svelte-1u2ltgo"),C(ct,"type","number"),C(ct,"class","form-control form-control-sm d-inline w-auto api-param-setting"),C(ct,"data-api-param","polygon_threshold"),C(ct,"id","option_polygon_threshold"),C(ct,"min","0.0"),C(ct,"max","1.0"),C(ct,"step","0.001"),ct.value=ht=t[1].polygon_threshold||"",C(rt,"class","svelte-1u2ltgo"),C(pt,"for","accept_lang"),C(pt,"class","svelte-1u2ltgo"),C(ft,"type","text"),C(ft,"placeholder","e.g. en,zh-Hant"),C(ft,"class","form-control form-control-sm d-inline w-auto api-param-setting"),C(ft,"data-api-param","accept-language"),C(ft,"id","accept_lang"),C(ft,"size","15"),ft.value=_t=t[1]["accept-language"]||"",C(dt,"class","svelte-1u2ltgo"),C(yt,"for","option_ccode"),C(yt,"class","svelte-1u2ltgo"),C(wt,"type","text"),C(wt,"placeholder","e.g. de,gb"),C(wt,"class","form-control form-control-sm d-inline w-auto api-param-setting"),C(wt,"data-api-param","countrycodes"),C(wt,"id","option_ccode"),C(wt,"size","15"),wt.value=xt=t[1].countrycodes||"",C(wt,"pattern","^[a-zA-Z]{2}(,[a-zA-Z]{2})*$"),C(vt,"class","svelte-1u2ltgo"),C($,"class","svelte-1u2ltgo"),C(_,"id","searchAdvancedOptions"),C(_,"class","svelte-1u2ltgo")},m(o,b){y(o,e,b),v(e,n),v(n,i),v(e,s),v(e,r),v(r,a),y(o,l,b),y(o,c,b),v(c,h),ot(u,h,null),v(c,d),v(c,p),ot(m,p,null),y(o,f,b),y(o,_,b),v(_,g),v(_,w),v(_,$),v($,L),v(L,P),v(P,k),v(P,M),v(P,S),v($,z),v($,I),v(I,N),v(N,B),v(N,D),v(N,Z),v($,j),v($,H),v(H,W),v(W,F),v(W,q),v(W,U),v($,K),v($,G),v(G,Y),v(G,X),v(G,J),v($,nt),v($,rt),v(rt,at),v(rt,lt),v(rt,ct),v($,ut),v($,dt),v(dt,pt),v(dt,mt),v(dt,ft),v($,gt),v($,vt),v(vt,yt),v(vt,bt),v(vt,wt),$t=!0,Lt||(Tt=[E(S,"change",t[3]),E(Z,"change",ue),E(U,"change",de),E(J,"change",pe),E(ct,"change",pe),E(ft,"change",pe),E(wt,"change",pe)],Lt=!0)},p(t,[e]){1&e&&O(i,"active",!t[0]),1&e&&O(a,"active",t[0]);const n={};262&e&&(n.$$scope={dirty:e,ctx:t}),u.$set(n),1&e&&O(h,"active",!t[0]);const o={};262&e&&(o.$$scope={dirty:e,ctx:t}),m.$set(o),1&e&&O(p,"active",t[0]),(!$t||2&e&&A!==(A=t[1].viewbox))&&(S.checked=A),(!$t||2&e&&R!==(R=!!t[1].bounded))&&(Z.checked=R),(!$t||2&e&&V!==(V=0===t[1].dedupe?0:1))&&(U.checked=V),(!$t||2&e&&Q!==(Q=t[1].limit||"")&&J.value!==Q)&&(J.value=Q),(!$t||2&e&&ht!==(ht=t[1].polygon_threshold||"")&&ct.value!==ht)&&(ct.value=ht),(!$t||2&e&&_t!==(_t=t[1]["accept-language"]||"")&&ft.value!==_t)&&(ft.value=_t),(!$t||2&e&&xt!==(xt=t[1].countrycodes||"")&&wt.value!==xt)&&(wt.value=xt)},i(t){$t||(tt(u.$$.fragment,t),tt(m.$$.fragment,t),$t=!0)},o(t){et(u.$$.fragment,t),et(m.$$.fragment,t),$t=!1},d(t){t&&b(e),t&&b(l),t&&b(c),st(u),st(m),t&&b(f),t&&b(_),Lt=!1,o(Tt)}}}function ue(t){document.querySelector("input[name=bounded]").value=t.target.checked?1:""}function de(t){document.querySelector("input[name=dedupe]").value=t.target.checked?1:0}function pe(t){document.querySelector("input[name="+t.target.dataset.apiParam+"]").value=t.target.value}function me(t,e,n){let i,{bStructuredSearch:o=!1}=e,{api_request_params:s={}}=e;function r(t){let e=document.getElementById("use_viewbox");e&&e.checked?n(2,i=function(t){var e=t.getBounds(),n=e.getWest(),i=e.getEast();return i-n>=360&&(n=t.getCenter().lng-179.999,i=t.getCenter().lng+179.999),i=L.latLng(77,i).wrap().lng,[(n=L.latLng(77,n).wrap().lng).toFixed(5),e.getNorth().toFixed(5),i.toFixed(5),e.getSouth().toFixed(5)].join(",")}(t)):n(2,i="")}function a(t){let e=t.wrapLatLng(t.getCenter());e.lat.toFixed(5),e.lng.toFixed(5)}return ut.subscribe((t=>{t&&(t.on("move",(function(){r(t),a(t)})),t.on("load",(function(){r(t),a(t)})))})),t.$$set=t=>{"bStructuredSearch"in t&&n(0,o=t.bStructuredSearch),"api_request_params"in t&&n(1,s=t.api_request_params)},[o,s,i,function(){let t=u(ut);t&&r(t)}]}class fe extends lt{constructor(t){super(),at(this,t,me,he,r,{bStructuredSearch:0,api_request_params:1})}}
+var app=function(){"use strict";var t=Array.isArray,e=Array.from,i=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,s=Object.prototype,r=Array.prototype,a=Object.getPrototypeOf;const l=()=>{};function h(t){return t()}function c(t){for(var e=0;e<t.length;e++)t[e]()}const u=32,d=128,p=256,f=512,_=1024,m=2048,g=4096,v=8192,y=32768,b=1<<19,w=Symbol("$state"),x=Symbol("");function T(t){return t===this.v}function P(t,e){return t!=t?e==e:t!==e||null!==t&&"object"==typeof t||"function"==typeof t}function M(t){return!P(t,this.v)}function k(t){return{f:0,v:t,reactions:null,equals:T,version:0}}function C(t,e=!1){const i=k(t);return e||(i.equals=M),null!==qt&&null!==qt.l&&(qt.l.s??=[]).push(i),i}function E(t,e=!1){return function(t){null!==zt&&2&zt.f&&(null===Nt?Nt=[t]:Nt.push(t));return t}(C(t,e))}function A(t,e){return S(t,se((()=>oe(t)))),e}function S(t,e){return null!==zt&&Vt()&&18&zt.f&&(null===Nt||!Nt.includes(t))&&function(){throw new Error("state_unsafe_mutation")}(),O(t,e)}function O(t,e){return t.equals(e)||(t.v=e,t.version=Ut(),z(t,_),Vt()&&null!==Dt&&Dt.f&f&&!(Dt.f&u)&&(null!==Zt&&Zt.includes(t)?(ae(Dt,_),ie(Dt)):null===$t?function(t){$t=t}([t]):$t.push(t))),e}function z(t,e){var i=t.reactions;if(null!==i)for(var n=Vt(),o=i.length,s=0;s<o;s++){var r=i[s],a=r.f;a&_||(n||r!==Dt)&&(ae(r,e),640&a&&(2&a?z(r,m):ie(r)))}}const I=Symbol();let D=!1;function B(e,i=null,o){if("object"!=typeof e||null===e||w in e)return e;const l=a(e);if(l!==s&&l!==r)return e;var h,c=new Map,u=t(e),d=k(0);return u&&c.set("length",k(e.length)),new Proxy(e,{defineProperty(t,e,i){"value"in i&&!1!==i.configurable&&!1!==i.enumerable&&!1!==i.writable||function(){throw new Error("state_descriptors_fixed")}();var n=c.get(e);return void 0===n?(n=k(i.value),c.set(e,n)):S(n,B(i.value,h)),!0},deleteProperty(t,e){var i=c.get(e);if(void 0===i)e in t&&c.set(e,k(I));else{if(u&&"string"==typeof e){var n=c.get("length"),o=Number(e);Number.isInteger(o)&&o<n.v&&S(n,o)}S(i,I),N(d)}return!0},get(t,i,o){if(i===w)return e;var s=c.get(i),r=i in t;if(void 0!==s||r&&!n(t,i)?.writable||(s=k(B(r?t[i]:I,h)),c.set(i,s)),void 0!==s){var a=oe(s);return a===I?void 0:a}return Reflect.get(t,i,o)},getOwnPropertyDescriptor(t,e){var i=Reflect.getOwnPropertyDescriptor(t,e);if(i&&"value"in i){var n=c.get(e);n&&(i.value=oe(n))}else if(void 0===i){var o=c.get(e),s=o?.v;if(void 0!==o&&s!==I)return{enumerable:!0,configurable:!0,value:s,writable:!0}}return i},has(t,e){if(e===w)return!0;var i=c.get(e),o=void 0!==i&&i.v!==I||Reflect.has(t,e);if((void 0!==i||null!==Dt&&(!o||n(t,e)?.writable))&&(void 0===i&&(i=k(o?B(t[e],h):I),c.set(e,i)),oe(i)===I))return!1;return o},set(t,e,i,o){var s=c.get(e),r=e in t;if(u&&"length"===e)for(var a=i;a<s.v;a+=1){var l=c.get(a+"");void 0!==l?S(l,I):a in t&&(l=k(I),c.set(a+"",l))}void 0===s?r&&!n(t,e)?.writable||(S(s=k(void 0),B(i,h)),c.set(e,s)):(r=s.v!==I,S(s,B(i,h)));var p=Reflect.getOwnPropertyDescriptor(t,e);if(p?.set&&p.set.call(o,i),!r){if(u&&"string"==typeof e){var f=c.get("length"),_=Number(e);Number.isInteger(_)&&_>=f.v&&S(f,_+1)}N(d)}return!0},ownKeys(t){oe(d);var e=Reflect.ownKeys(t).filter((t=>{var e=c.get(t);return void 0===e||e.v!==I}));for(var[i,n]of c)n.v===I||i in t||e.push(i);return e},setPrototypeOf(){!function(){throw new Error("state_prototype_fixed")}()}})}function N(t,e=1){S(t,t.v+e)}function Z(t){return null!==t&&"object"==typeof t&&w in t?t[w]:t}var j,$,R;function F(t=""){return document.createTextNode(t)}function H(t){return $.call(t)}function W(t){return R.call(t)}function q(t,e){return H(t)}function U(t,e){var i=H(t);return i instanceof Comment&&""===i.data?W(i):i}function V(t,e=1,i=!1){let n=t;for(;e--;)n=W(n);return n}function K(t){var e=1026;null===Dt?e|=d:Dt.f|=b;const i={children:null,ctx:qt,deps:null,equals:T,f:e,fn:t,reactions:null,v:null,version:0,parent:Dt};if(null!==zt&&2&zt.f){var n=zt;(n.children??=[]).push(i)}return i}function G(t){const e=K(t);return e.equals=M,e}function Y(t){var e=t.children;if(null!==e){t.children=null;for(var i=0;i<e.length;i+=1){var n=e[i];2&n.f?Q(n):ft(n)}}}function X(t){var e,i=Dt;Bt(t.parent);try{Y(t),e=Gt(t)}finally{Bt(i)}return e}function J(t){var e=X(t);ae(t,(Ft||t.f&d)&&null!==t.deps?m:f),t.equals(e)||(t.v=e,t.version=Ut())}function Q(t){Y(t),Xt(t,0),ae(t,v),t.v=t.children=t.deps=t.ctx=t.reactions=null}function tt(t){null===Dt&&null===zt&&function(){throw new Error("effect_orphan")}(),null!==zt&&zt.f&d&&function(){throw new Error("effect_in_unowned_derived")}(),Ct&&function(){throw new Error("effect_in_teardown")}()}function et(t,e,i,n=!0){var o=!!(64&t),s=Dt,r={ctx:qt,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|_,first:null,fn:e,last:null,next:null,parent:o?null:s,prev:null,teardown:null,transitions:null,version:0};if(i){var a=kt;try{Et(!0),Jt(r),r.f|=16384}catch(t){throw ft(r),t}finally{Et(a)}}else null!==e&&ie(r);if(!(i&&null===r.deps&&null===r.first&&null===r.nodes_start&&null===r.teardown&&!(r.f&b))&&!o&&n&&(null!==s&&function(t,e){var i=e.last;null===i?e.last=e.first=t:(i.next=t,t.prev=i,e.last=t)}(r,s),null!==zt&&2&zt.f)){var l=zt;(l.children??=[]).push(r)}return r}function it(t){const e=et(8,null,!1);return ae(e,f),e.teardown=t,e}function nt(t){if(tt(),!(null!==Dt&&!!(Dt.f&u)&&null!==qt&&!qt.m))return ot(t);var e=qt;(e.e??=[]).push({fn:t,effect:Dt,reaction:zt})}function ot(t){return et(4,t,!1)}function st(t,e){var i=qt,n={effect:null,ran:!1};i.l.r1.push(n),n.effect=at((()=>{t(),n.ran||(n.ran=!0,S(i.l.r2,!0),se(e))}))}function rt(){var t=qt;at((()=>{if(oe(t.l.r2)){for(var e of t.l.r1){var i=e.effect;i.f&f&&ae(i,m),Kt(i)&&Jt(i),e.ran=!1}t.l.r2.v=!1}}))}function at(t){return et(8,t,!0)}function lt(t){return ht(t)}function ht(t,e=0){return et(24|e,t,!0)}function ct(t,e=!0){return et(40,t,!0,e)}function ut(t){var e=t.teardown;if(null!==e){const t=Ct,i=zt;At(!0),It(null);try{e.call(null)}finally{At(t),It(i)}}}function dt(t){var e=t.deriveds;if(null!==e){t.deriveds=null;for(var i=0;i<e.length;i+=1)Q(e[i])}}function pt(t,e=!1){var i=t.first;for(t.first=t.last=null;null!==i;){var n=i.next;ft(i,e),i=n}}function ft(t,e=!0){var i=!1;if((e||262144&t.f)&&null!==t.nodes_start){for(var n=t.nodes_start,o=t.nodes_end;null!==n;){var s=n===o?null:W(n);n.remove(),n=s}i=!0}pt(t,e&&!i),dt(t),Xt(t,0),ae(t,v);var r=t.transitions;if(null!==r)for(const t of r)t.stop();ut(t);var a=t.parent;null!==a&&null!==a.first&&_t(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.parent=t.fn=t.nodes_start=t.nodes_end=null}function _t(t){var e=t.parent,i=t.prev,n=t.next;null!==i&&(i.next=n),null!==n&&(n.prev=i),null!==e&&(e.first===t&&(e.first=n),e.last===t&&(e.last=i))}function mt(t,e){var i=[];vt(t,i,!0),gt(i,(()=>{ft(t),e&&e()}))}function gt(t,e){var i=t.length;if(i>0){var n=()=>--i||e();for(var o of t)o.out(n)}else e()}function vt(t,e,i){if(!(t.f&g)){if(t.f^=g,null!==t.transitions)for(const n of t.transitions)(n.is_global||i)&&e.push(n);for(var n=t.first;null!==n;){var o=n.next;vt(n,e,!!(!!(n.f&y)||!!(n.f&u))&&i),n=o}}}function yt(t){bt(t,!0)}function bt(t,e){if(t.f&g){Kt(t)&&Jt(t),t.f^=g;for(var i=t.first;null!==i;){var n=i.next;bt(i,!!(!!(i.f&y)||!!(i.f&u))&&e),i=n}if(null!==t.transitions)for(const i of t.transitions)(i.is_global||e)&&i.in()}}let wt=!1,xt=[];function Lt(){wt=!1;const t=xt.slice();xt=[],c(t)}function Tt(t){wt||(wt=!0,queueMicrotask(Lt)),xt.push(t)}function Pt(t){throw new Error("lifecycle_outside_component")}let Mt=!1,kt=!1,Ct=!1;function Et(t){kt=t}function At(t){Ct=t}let St=[],Ot=0,zt=null;function It(t){zt=t}let Dt=null;function Bt(t){Dt=t}let Nt=null;let Zt=null,jt=0,$t=null;let Rt=0,Ft=!1,Ht=!1,Wt=new Set,qt=null;function Ut(){return++Rt}function Vt(){return null!==qt&&null===qt.l}function Kt(t){var e=t.f;if(e&_)return!0;if(e&m){var i=t.deps,n=!!(e&d);if(null!==i){var o;if(e&p){for(o=0;o<i.length;o++)(i[o].reactions??=[]).push(t);t.f^=p}for(o=0;o<i.length;o++){var s=i[o];if(Kt(s)&&J(s),!n||null===Dt||Ft||s?.reactions?.includes(t)||(s.reactions??=[]).push(t),s.version>t.version)return!0}}n||ae(t,f)}return!1}function Gt(t){var e=Zt,i=jt,n=$t,o=zt,s=Ft,r=Nt,a=qt,l=t.f;Zt=null,jt=0,$t=null,zt=96&l?null:t,Ft=!kt&&!!(l&d),Nt=null,qt=t.ctx;try{var h=(0,t.fn)(),c=t.deps;if(null!==Zt){var u;if(Xt(t,jt),null!==c&&jt>0)for(c.length=jt+Zt.length,u=0;u<Zt.length;u++)c[jt+u]=Zt[u];else t.deps=c=Zt;if(!Ft)for(u=jt;u<c.length;u++)(c[u].reactions??=[]).push(t)}else null!==c&&jt<c.length&&(Xt(t,jt),c.length=jt);return h}finally{Zt=e,jt=i,$t=n,zt=o,Ft=s,Nt=r,qt=a}}function Yt(t,e){let i=e.reactions;if(null!==i){var n=i.indexOf(t);if(-1!==n){var o=i.length-1;0===o?i=e.reactions=null:(i[n]=i[o],i.pop())}}null===i&&2&e.f&&(null===Zt||!Zt.includes(e))&&(ae(e,m),384&e.f||(e.f^=p),Xt(e,0))}function Xt(t,e){var i=t.deps;if(null!==i)for(var n=e;n<i.length;n++)Yt(t,i[n])}function Jt(t){var e=t.f;if(!(e&v)){ae(t,f);var i=Dt;Dt=t;try{16&e?function(t){for(var e=t.first;null!==e;){var i=e.next;e.f&u||ft(e),e=i}}(t):pt(t),dt(t),ut(t);var n=Gt(t);t.teardown="function"==typeof n?n:null,t.version=Rt}catch(t){!function(t){throw t}(t)}finally{Dt=i}}}function Qt(){Ot>1e3&&(Ot=0,function(){throw new Error("effect_update_depth_exceeded")}()),Ot++}function te(t){var e=t.length;if(0!==e)for(var i=0;i<e;i++){var n=t[i];12288&n.f||!Kt(n)||(Jt(n),null===n.deps&&null===n.first&&null===n.nodes_start&&(null===n.teardown?_t(n):n.fn=null))}}function ee(){if(Mt=!1,Ot>1001)return;const t=St;St=[],function(t){var e=t.length;if(0!==e){Qt();var i=kt;kt=!0;try{for(var n=0;n<e;n++){var o=t[n];o.f&f||(o.f^=f);var s=[];ne(o,s),te(s)}}finally{kt=i}}}(t),Mt||(Ot=0)}function ie(t){Mt||(Mt=!0,queueMicrotask(ee));for(var e=t;null!==e.parent;){var i=(e=e.parent).f;if(96&i){if(!(i&f))return;e.f^=f}}St.push(e)}function ne(t,e){var i=t.first,n=[];t:for(;null!==i;){var o=i.f,s=!!(o&u);if(!(s&&!!(o&f)||o&g))if(8&o){s?i.f^=f:Kt(i)&&Jt(i);var r=i.first;if(null!==r){i=r;continue}}else 4&o&&n.push(i);var a=i.next;if(null===a){let e=i.parent;for(;null!==e;){if(t===e)break t;var l=e.next;if(null!==l){i=l;continue t}e=e.parent}}i=a}for(var h=0;h<n.length;h++)r=n[h],e.push(r),ne(r,e)}function oe(t){var e=t.f,i=!!(2&e);if(i&&e&v){var n=X(t);return Q(t),n}if(Ht&&Wt.add(t),null!==zt){null!==Nt&&Nt.includes(t)&&function(){throw new Error("state_unsafe_local_read")}();var o=zt.deps;null===Zt&&null!==o&&o[jt]===t?jt++:null===Zt?Zt=[t]:Zt.push(t),null!==$t&&null!==Dt&&Dt.f&f&&!(Dt.f&u)&&$t.includes(t)&&(ae(Dt,_),ie(Dt))}else if(i&&null===t.deps){var s=t,r=s.parent;null===r||r.deriveds?.includes(s)||(r.deriveds??=[]).push(s)}return i&&Kt(s=t)&&J(s),t.v}function se(t){const e=zt;try{return zt=null,t()}finally{zt=e}}const re=-3585;function ae(t,e){t.f=t.f&re|e}function le(t,e=!1,i){qt={p:qt,c:null,e:null,m:!1,s:t,x:null,l:null},e||(qt.l={s:null,u:null,r1:[],r2:k(!1)})}function he(t){const e=qt;if(null!==e){const t=e.e;if(null!==t){var i=Dt,n=zt;e.e=null;try{for(var o=0;o<t.length;o++){var s=t[o];Bt(s.effect),It(s.reaction),ot(s.fn)}}finally{Bt(i),It(n)}}qt=e.p,e.m=!0}return{}}function ce(t){if("object"==typeof t&&t&&!(t instanceof EventTarget))if(w in t)ue(t);else if(!Array.isArray(t))for(let e in t){const i=t[e];"object"==typeof i&&i&&w in i&&ue(i)}}function ue(t,e=new Set){if(!("object"!=typeof t||null===t||t instanceof EventTarget||e.has(t))){e.add(t),t instanceof Date&&t.getTime();for(let i in t)try{ue(t[i],e)}catch(t){}const i=a(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){const e=o(i);for(let i in e){const n=e[i].get;if(n)try{n.call(t)}catch(t){}}}}}const de=new Set,pe=new Set;function fe(t,e,i,n,o){var s={capture:n,passive:o},r=function(t,e,i,n){function o(t){if(n.capture||_e.call(e,t),!t.cancelBubble){var o=zt,s=Dt;It(null),Bt(null);try{return i.call(this,t)}finally{It(o),Bt(s)}}}return t.startsWith("pointer")||t.startsWith("touch")||"wheel"===t?Tt((()=>{e.addEventListener(t,o,n)})):e.addEventListener(t,o,n),o}(t,e,i,s);e!==document.body&&e!==window&&e!==document||it((()=>{e.removeEventListener(t,r,s)}))}function _e(e){var n=this,o=n.ownerDocument,s=e.type,r=e.composedPath?.()||[],a=r[0]||e.target,l=0,h=e.__root;if(h){var c=r.indexOf(h);if(-1!==c&&(n===document||n===window))return void(e.__root=n);var u=r.indexOf(n);if(-1===u)return;c<=u&&(l=c)}if((a=r[l]||e.target)!==n){i(e,"currentTarget",{configurable:!0,get:()=>a||o});var d=zt,p=Dt;It(null),Bt(null);try{for(var f,_=[];null!==a;){var m=a.assignedSlot||a.parentNode||a.host||null;try{var g=a["__"+s];if(void 0!==g&&!a.disabled)if(t(g)){var[v,...y]=g;v.apply(a,[e,...y])}else g.call(a,e)}catch(t){f?_.push(t):f=t}if(e.cancelBubble||m===n||null===m)break;a=m}if(f){for(let t of _)queueMicrotask((()=>{throw t}));throw f}}finally{e.__root=n,delete e.currentTarget,It(d),Bt(p)}}}function me(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function ge(t,e){var i=Dt;null===i.nodes_start&&(i.nodes_start=t,i.nodes_end=e)}function ve(t,e){var i,n=!!(1&e),o=!!(2&e),s=!t.startsWith("<!>");return()=>{void 0===i&&(i=me(s?t:"<!>"+t),n||(i=H(i)));var e=o?document.importNode(i,!0):i.cloneNode(!0);n?ge(H(e),e.lastChild):ge(e,e);return e}}function ye(t=""){var e=F(t+"");return ge(e,e),e}function be(){var t=document.createDocumentFragment(),e=document.createComment(""),i=F();return t.append(e,i),ge(e,i),t}function we(t,e){null!==t&&t.before(e)}const xe=["touchstart","touchmove"];function Le(t){return xe.includes(t)}function Te(t,e){var i=null==e?"":"object"==typeof e?e+"":e;i!==(t.__t??=t.nodeValue)&&(t.__t=i,t.nodeValue=null==i?"":i+"")}const Pe=new Map;let Me=new WeakMap;function ke(t,e,i,n=null,o=!1){var s=t,r=null,a=null,l=null;ht((()=>{l!==(l=!!e())&&(l?(r?yt(r):r=ct((()=>i(s))),a&&mt(a,(()=>{a=null}))):(a?yt(a):n&&(a=ct((()=>n(s)))),r&&mt(r,(()=>{r=null}))))}),o?y:0)}let Ce=null;function Ee(t,e){return e}function Ae(i,n,o,s,r,a=null){var l=i,h={flags:n,items:new Map,first:null};!(4&n)||(l=i.appendChild(F()));var c=null,u=!1;ht((()=>{var i=o(),d=t(i)?i:null==i?[]:e(i),p=d.length;u&&0===p||(u=0===p,function(t,i,n,o,s,r,a){var l,h,c,u,d,p,f=!!(8&s),_=!!(3&s),m=t.length,v=i.items,y=i.first,b=y,w=null,x=[],L=[];if(f)for(p=0;p<m;p+=1)u=a(c=t[p],p),void 0!==(d=v.get(u))&&(d.a?.measure(),(h??=new Set).add(d));for(p=0;p<m;p+=1)if(u=a(c=t[p],p),void 0!==(d=v.get(u))){if(_&&Se(d,c,p,s),d.e.f&g&&(yt(d.e),f&&(d.a?.unfix(),(h??=new Set).delete(d))),d!==b){if(void 0!==l&&l.has(d)){if(x.length<L.length){var T,P=L[0];w=P.prev;var M=x[0],k=x[x.length-1];for(T=0;T<x.length;T+=1)ze(x[T],P,n);for(T=0;T<L.length;T+=1)l.delete(L[T]);Ie(i,M.prev,k.next),Ie(i,w,M),Ie(i,k,P),b=P,w=k,p-=1,x=[],L=[]}else l.delete(d),ze(d,b,n),Ie(i,d.prev,d.next),Ie(i,d,null===w?i.first:w.next),Ie(i,w,d),w=d;continue}for(x=[],L=[];null!==b&&b.k!==u;)!r&&b.e.f&g||(l??=new Set).add(b),L.push(b),b=b.next;if(null===b)continue;d=b}x.push(d),w=d,b=d.next}else{w=Oe(b?b.e.nodes_start:n,i,w,null===w?i.first:w.next,c,u,p,o,s),v.set(u,w),x=[],L=[],b=w.next}if(null!==b||void 0!==l){for(var C=void 0===l?[]:e(l);null!==b;)!r&&b.e.f&g||C.push(b),b=b.next;var E=C.length;if(E>0){var A=4&s&&0===m?n:null;if(f){for(p=0;p<E;p+=1)C[p].a?.measure();for(p=0;p<E;p+=1)C[p].a?.fix()}!function(t,e,i,n){for(var o=[],s=e.length,r=0;r<s;r++)vt(e[r].e,o,!0);var a=s>0&&0===o.length&&null!==i;if(a){var l=i.parentNode;l.textContent="",l.append(i),n.clear(),Ie(t,e[0].prev,e[s-1].next)}gt(o,(()=>{for(var i=0;i<s;i++){var o=e[i];a||(n.delete(o.k),Ie(t,o.prev,o.next)),ft(o.e,!a)}}))}(i,C,A,v)}}f&&Tt((()=>{if(void 0!==h)for(d of h)d.a?.apply()}));Dt.first=i.first&&i.first.e,Dt.last=w&&w.e}(d,h,l,r,n,!!(zt.f&g),s),null!==a&&(0===p?c?yt(c):c=ct((()=>a(l))):null!==c&&mt(c,(()=>{c=null}))),o())}))}function Se(t,e,i,n){1&n&&O(t.v,e),2&n?O(t.i,i):t.i=i}function Oe(t,e,i,n,o,s,r,a,l){var h=Ce;try{var c=!!(1&l)?!(16&l)?C(o):k(o):o,u=2&l?k(r):r,d={i:u,v:c,k:s,a:null,e:null,prev:i,next:n};return Ce=d,d.e=ct((()=>a(t,c,u)),D),d.e.prev=i&&i.e,d.e.next=n&&n.e,null===i?e.first=d:(i.next=d,i.e.next=d.e),null!==n&&(n.prev=d,n.e.prev=d.e),d}finally{Ce=h}}function ze(t,e,i){for(var n=t.next?t.next.e.nodes_start:i,o=e?e.e.nodes_start:i,s=t.e.nodes_start;s!==n;){var r=W(s);o.before(s),s=r}}function Ie(t,e,i){null===e?t.first=i:(e.next=i,e.e.next=i&&i.e),null!==i&&(i.prev=e,i.e.prev=e&&e.e)}function De(t,e,i,n,o){var s,r=t,a="";ht((()=>{a!==(a=e()??"")&&(void 0!==s&&(ft(s),s=void 0),""!==a&&(s=ct((()=>{var t=me(a+"");ge(H(t),t.lastChild),r.before(t)}))))}))}function Be(t,e,i,n,o){var s=e.$$slots?.[i],r=!1;!0===s&&(s=e.children,r=!0),void 0===s||s(t,r?()=>n:n)}let Ne=!1;function Ze(t,e){var i=t.__attributes??={};i.value!==(i.value=e)&&(t.value!==e||0===e&&"PROGRESS"===t.nodeName)&&(t.value=e)}function je(t,e){var i=t.__attributes??={};i.checked!==(i.checked=e)&&(t.checked=e)}function $e(t,e,i,n){var s=t.__attributes??={};s[e]!==(s[e]=i)&&("style"===e&&"__styles"in t&&(t.__styles={}),"loading"===e&&(t[x]=i),null==i?t.removeAttribute(e):"string"!=typeof i&&function(t){var e,i=Re.get(t.nodeName);if(i)return i;Re.set(t.nodeName,i=[]);var n=a(t),s=Element.prototype;for(;s!==n;){for(var r in e=o(n))e[r].set&&i.push(r);n=a(n)}return i}(t).includes(e)?t[e]=i:t.setAttribute(e,i))}var Re=new Map;function Fe(t,e){var i=t.__className,n=function(t){return null==t?"":t}(e);i!==n&&(null==e?t.removeAttribute("class"):t.className=n,t.__className=n)}function He(t,e,i){if(i){if(t.classList.contains(e))return;t.classList.add(e)}else{if(!t.classList.contains(e))return;t.classList.remove(e)}}function We(t,e,i,n=i){t.addEventListener(e,i);const o=t.__on_r;t.__on_r=o?()=>{o(),n()}:n,Ne||(Ne=!0,document.addEventListener("reset",(t=>{Promise.resolve().then((()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e.__on_r?.()}))}),{capture:!0}))}function qe(t,e,i=e){var n=Vt();We(t,"input",(()=>{var o=Ue(t)?Ve(t.value):t.value;i(o),n&&o!==(o=e())&&(t.value=o??"")})),at((()=>{var i=e();Ue(t)&&i===Ve(t.value)||("date"!==t.type||i||t.value)&&i!==t.value&&(t.value=i??"")}))}function Ue(t){var e=t.type;return"number"===e||"range"===e}function Ve(t){return""===t?null:+t}function Ke(t,e,i){if(t.multiple)return function(t,e){for(var i of t.options)i.selected=~e.indexOf(Ye(i))}(t,e);for(var n of t.options){var o=Ye(n);if(s=o,r=e,Object.is(Z(s),Z(r)))return void(n.selected=!0)}var s,r;i&&void 0===e||(t.selectedIndex=-1)}function Ge(t,e,i=e){var n=!0;We(t,"change",(()=>{var e;if(t.multiple)e=[].map.call(t.querySelectorAll(":checked"),Ye);else{var n=t.querySelector(":checked");e=n&&Ye(n)}i(e)})),ot((()=>{var o=e();if(Ke(t,o,n),n&&void 0===o){var s=t.querySelector(":checked");null!==s&&(o=Ye(s),i(o))}t.__value=o,n=!1})),function(t){ot((()=>{var e=new MutationObserver((()=>{var e=t.__value;Ke(t,e)}));return e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),()=>{e.disconnect()}}))}(t)}function Ye(t){return"__value"in t?t.__value:t.value}function Xe(t){return function(...e){return e[0].stopPropagation(),t?.apply(this,e)}}function Je(t){return function(...e){return e[0].preventDefault(),t?.apply(this,e)}}function Qe(t=!1){const e=qt,i=e.l.u;if(!i)return;let n=()=>ce(e.s);if(t){let t=0,i={};const o=K((()=>{let n=!1;const o=e.s;for(const t in o)o[t]!==i[t]&&(i[t]=o[t],n=!0);return n&&t++,t}));n=()=>oe(o)}var o;i.b.length&&(o=()=>{ti(e,n),c(i.b)},tt(),at(o)),nt((()=>{const t=se((()=>i.m.map(h)));return()=>{for(const e of t)"function"==typeof e&&e()}})),i.a.length&&nt((()=>{ti(e,n),c(i.a)}))}function ti(t,e){if(t.l.s)for(const e of t.l.s)oe(e);e()}function ei(t,e,i){if(null==t)return e(void 0),l;const n=se((()=>t.subscribe(e,i)));return n.unsubscribe?()=>n.unsubscribe():n}let ii=!1;function ni(t,e,i){const n=i[e]??={store:null,source:C(void 0),unsubscribe:l};if(n.store!==t)if(n.unsubscribe(),n.store=t??null,null==t)n.source.v=void 0,n.unsubscribe=l;else{var o=!0;n.unsubscribe=ei(t,(t=>{o?n.source.v=t:S(n.source,t)})),o=!1}return oe(n.source)}function oi(){const t={};return it((()=>{for(var e in t){t[e].unsubscribe()}})),t}function si(t){for(var e=Dt,i=Dt;null!==e&&!(96&e.f);)e=e.parent;try{return Bt(e),t()}finally{Bt(i)}}function ri(t,e,i,o){var s,r=!!(1&i),a=!!(2&i),l=!!(8&i),h=!!(16&i),c=!1;l?[s,c]=function(t){var e=ii;try{return ii=!1,[t(),ii]}finally{ii=e}}((()=>t[e])):s=t[e];var u,d=n(t,e)?.set,p=o,f=!0,_=!1,m=()=>(_=!0,f&&(f=!1,p=h?se(o):o),p);if(void 0===s&&void 0!==o&&(d&&a&&function(){throw new Error("props_invalid_value")}(),s=m(),d&&d(s)),a)u=()=>{var i=t[e];return void 0===i?m():(f=!0,_=!1,i)};else{var g=si((()=>(r?K:G)((()=>t[e]))));g.f|=65536,u=()=>{var t=oe(g);return void 0!==t&&(p=void 0),void 0===t?p:t}}if(!(4&i))return u;if(d){var v=t.$$legacy;return function(t,e){return arguments.length>0?(a&&e&&!v&&!c||d(e?u():t),t):u()}}var y=!1,b=!1,w=C(s),x=si((()=>K((()=>{var t=u(),e=oe(w);return y?(y=!1,b=!0,e):(b=!1,w.v=t)}))));return r||(x.equals=M),function(t,e){if(Ht&&(y=b,u(),oe(w)),arguments.length>0){const i=e?oe(x):a&&l?B(t):t;return x.equals(i)||(y=!0,S(w,i),_&&void 0!==p&&(p=i),se((()=>oe(x)))),t}return oe(x)}}function ai(t){var e,i;null===qt&&Pt(),null!==qt.l?(e=qt,i=e.l,i.u??={a:[],b:[],m:[]}).m.push(t):nt((()=>{const e=se(t);if("function"==typeof e)return e}))}function li(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}"undefined"!=typeof window&&(window.__svelte||={v:new Set}).v.add("5");var hi,ci={exports:{}};
/*!
- * escape-html
- * Copyright(c) 2012-2013 TJ Holowaychuk
- * Copyright(c) 2015 Andreas Lubbe
- * Copyright(c) 2015 Tiancheng "Timothy" Gu
- * MIT Licensed
- */var _e=/["'&<>]/;var ge=Ce,ve=function(t){if(!t.osm_type)return"";var e=Ce(t.osm_type,!1);return e?'<a href="https://www.openstreetmap.org/'+e+"/"+t.osm_id+'">'+e+" "+t.osm_id+"</a>":""},ye=function(t){if(t.label)return t.label;function e(t){return t&&t[0].toUpperCase()+t.slice(1)}if(t.type&&"yes"===t.type&&t.class)return e(t.class.replace(/_/g," "));if(t.type)return e(t.type.replace(/_/g," "));return""},be=function(t){if(!t.calculated_wikipedia)return"";var e=t.calculated_wikipedia.split(":",2),n=Me(t.calculated_wikipedia),i=Me(e[0]),o=Me(e[1]);return'<a href="https://'+i+".wikipedia.org/wiki/"+o+'" target="_blank">'+n+"</a>"},we=function(t){return t.isarea?"Polygon":"Point"},xe=function(t){return"boundary"===t.category&&"administrative"===t.type},$e=function(t){return t<4?"other":t<6?"country":t<8?"region":t<10?"state":t<12?"state district":t<14?"county":t<16?"municipality":t<18?"city / town / village":t<20?"city / village district":t<22?"suburb / hamlet":t<24?"neighbourhood":t<26?"city block / square":26===t?"major street":27===t?"minory street / path":t<=30?"house / building":"other"},Le=function(t){var e=t.class+":"+t.type;t.type&&"administrative"===t.type&&t.place_type&&(e=e+" ("+t.place_type+")");return Me(e)},Te=function(t){return t&&t<15?t:""},Pe=function(t,e){if(e){if(t<1)return"0";var n=t>=1e3?Math.round(t/1e3,1)+" km":Math.round(t,0)+" m";return'<abbr class="distance" title="'+t+' meters">~'+n+"</abbr>"}return 0===t?"0":'<abbr class="distance" title="spheric distance '+t+'">~'+Math.round(1e3*t,4)/1e3+"</abbr>"},Ee=function(t){return(" "===t[0]?"*":"")+Me(t)},ke=function(){return["Continent / Sea","","","Country","","State","Region","","County","","City","","Town / Village","","Suburb","","Street","","Building","","",""]};const Me=function(t){var e,n=""+t,i=_e.exec(n);if(!i)return n;var o="",s=0,r=0;for(s=i.index;s<n.length;s++){switch(n.charCodeAt(s)){case 34:e=""";break;case 38:e="&";break;case 39:e="'";break;case 60:e="<";break;case 62:e=">";break;default:continue}r!==s&&(o+=n.substring(r,s)),r=s+1,o+=e}return r!==s?o+n.substring(r,s):o};function Ce(t,e){return"N"===t?"node":"W"===t?"way":"R"===t?"relation":e&&("T"===t||"I"===t)?"way":""}function Se(t){let e,n,i,o;const s=t[6].default,r=p(s,t,t[5],null);return{c(){e=x("a"),r&&r.c(),C(e,"href",t[1]),C(e,"class",t[0])},m(s,a){y(s,e,a),r&&r.m(e,null),n=!0,i||(o=E(e,"click",M(k(t[2]))),i=!0)},p(t,[i]){r&&r.p&&(!n||32&i)&&_(r,s,t,t[5],n?f(s,t[5],i,null):g(t[5]),null),(!n||2&i)&&C(e,"href",t[1]),(!n||1&i)&&C(e,"class",t[0])},i(t){n||(tt(r,t),n=!0)},o(t){et(r,t),n=!1},d(t){t&&b(e),r&&r.d(t),i=!1,o()}}}function Ae(t,e,n){let{$$slots:i={},$$scope:o}=e,{extra_classes:s=""}=e,{feature:r=null}=e,a=new URLSearchParams,l="details.html";return t.$$set=t=>{"extra_classes"in t&&n(0,s=t.extra_classes),"feature"in t&&n(3,r=t.feature),"$$scope"in t&&n(5,o=t.$$scope)},t.$$.update=()=>{if(8&t.$$.dirty){let t=new URLSearchParams;null!==r&&(r.osm_type?(1===r.osm_type.length?t.set("osmtype",r.osm_type):t.set("osmtype","node"===(e=r.osm_type)?"N":"way"===e?"W":"relation"===e?"R":""),t.set("osmid",r.osm_id),r.class?t.set("class",r.class):r.category&&t.set("class",r.category)):r.place_id&&t.set("place_id",r.place_id)),n(4,a=t)}var e;if(16&t.$$.dirty){let t=a.toString();n(1,l="details.html"+(t?"?":"")+t)}},[s,l,function(){vt("details",a)},r,a,o,i]}class ze extends lt{constructor(t){super(),at(this,t,Ae,Se,r,{extra_classes:0,feature:3})}}function Oe(e){let n;return{c(){n=x("div"),C(n,"id","welcome")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function Ie(t){return B((()=>{Lt("theme/welcome.html",document.getElementById("welcome"))})),[]}class Ne extends lt{constructor(t){super(),at(this,t,Ie,Oe,r,{})}}function Be(t){let e,n;return{c(){e=x("img"),C(e,"class","mapicon svelte-180cawe"),c(e.src,n=t[1])||C(e,"src",n),C(e,"alt",t[2])},m(t,n){y(t,e,n)},p(t,i){2&i&&!c(e.src,n=t[1])&&C(e,"src",n),4&i&&C(e,"alt",t[2])},d(t){t&&b(e)}}}function De(e){let n,i=e[0]&&Be(e);return{c(){i&&i.c(),n=P()},m(t,e){i&&i.m(t,e),y(t,n,e)},p(t,[e]){t[0]?i?i.p(t,e):(i=Be(t),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},i:t,o:t,d(t){i&&i.d(t),t&&b(n)}}}function Ze(t,e,n){let i,o,s,{aPlace:r}=e;return t.$$set=t=>{"aPlace"in t&&n(3,r=t.aPlace)},t.$$.update=()=>{var e,a;8&t.$$.dirty&&n(0,(e=r.category,a=r.type,i={"boundary:administrative":"poi_boundary_administrative","place:city":"poi_place_city","place:town":"poi_place_town","place:village":"poi_place_village","place:hamlet":"poi_place_village","place:suburb":"poi_place_village","place:locality":"poi_place_village","place:airport":"transport_airport2","aeroway:aerodrome":"transport_airport2","railway:station":"transport_train_station2","amenity:place_of_worship":"place_of_worship_unknown3","amenity:pub":"food_pub","amenity:bar":"food_bar","amenity:university":"education_university","tourism:museum":"tourist_museum","amenity:arts_centre":"tourist_art_gallery2","tourism:zoo":"tourist_zoo","tourism:theme_park":"poi_point_of_interest","tourism:attraction":"poi_point_of_interest","leisure:golf_course":"sport_golf","historic:castle":"tourist_castle","amenity:hospital":"health_hospital","amenity:school":"education_school","amenity:theatre":"tourist_theatre","amenity:library":"amenity_library","amenity:fire_station":"amenity_firestation3","amenity:police":"amenity_police2","amenity:bank":"money_bank2","amenity:post_office":"amenity_post_office","tourism:hotel":"accommodation_hotel2","amenity:cinema":"tourist_cinema","tourism:artwork":"tourist_art_gallery2","historic:archaeological_site":"tourist_archaeological2","amenity:doctors":"health_doctors","leisure:sports_centre":"sport_leisure_centre","leisure:swimming_pool":"sport_swimming_outdoor","shop:supermarket":"shopping_supermarket","shop:convenience":"shopping_convenience","amenity:restaurant":"food_restaurant","amenity:fast_food":"food_fastfood","amenity:cafe":"food_cafe","tourism:guest_house":"accommodation_bed_and_breakfast","amenity:pharmacy":"health_pharmacy_dispensing","amenity:fuel":"transport_fuel","natural:peak":"poi_peak","natural:wood":"landuse_coniferous_and_deciduous","shop:bicycle":"shopping_bicycle","shop:clothes":"shopping_clothes","shop:hairdresser":"shopping_hairdresser","shop:doityourself":"shopping_diy","shop:estate_agent":"shopping_estateagent2","shop:car":"shopping_car","shop:garden_centre":"shopping_garden_centre","shop:car_repair":"shopping_car_repair","shop:bakery":"shopping_bakery","shop:butcher":"shopping_butcher","shop:apparel":"shopping_clothes","shop:laundry":"shopping_laundrette","shop:beverages":"shopping_alcohol","shop:alcohol":"shopping_alcohol","shop:optician":"health_opticians","shop:chemist":"health_pharmacy","shop:gallery":"tourist_art_gallery2","shop:jewelry":"shopping_jewelry","tourism:information":"amenity_information","historic:ruins":"tourist_ruin","amenity:college":"education_school","historic:monument":"tourist_monument","historic:memorial":"tourist_monument","historic:mine":"poi_mine","tourism:caravan_site":"accommodation_caravan_park","amenity:bus_station":"transport_bus_station","amenity:atm":"money_atm2","tourism:viewpoint":"tourist_view_point","tourism:guesthouse":"accommodation_bed_and_breakfast","railway:tram":"transport_tram_stop","amenity:courthouse":"amenity_court","amenity:recycling":"amenity_recycling","amenity:dentist":"health_dentist","natural:beach":"tourist_beach","railway:tram_stop":"transport_tram_stop","amenity:prison":"amenity_prison","highway:bus_stop":"transport_bus_stop2"}[e+":"+a])),8&t.$$.dirty&&n(2,o="icon for "+r.category+" "+r.type),1&t.$$.dirty&&n(1,s=Nominatim_Config.Images_Base_Url+i+".p.20.png")},[i,s,o,r]}class Re extends lt{constructor(t){super(),at(this,t,Ze,De,r,{aPlace:3})}}function je(t,e,n){const i=t.slice();return i[6]=e[n],i[8]=n,i}function He(e){let n,i;return n=new Ne({}),{c(){it(n.$$.fragment)},m(t,e){ot(n,t,e),i=!0},p:t,i(t){i||(tt(n.$$.fragment,t),i=!0)},o(t){et(n.$$.fragment,t),i=!1},d(t){st(n,t)}}}function We(e){let n;function i(t,e){return t[0]?Ue:qe}let o=i(e),s=o(e);return{c(){s.c(),n=P()},m(t,e){s.m(t,e),y(t,n,e)},p(t,e){o!==(o=i(t))&&(s.d(1),s=o(t),s&&(s.c(),s.m(n.parentNode,n)))},i:t,o:t,d(t){s.d(t),t&&b(n)}}}function Fe(t){let e,n,i,o=t[1],s=[];for(let e=0;e<o.length;e+=1)s[e]=Ke(je(t,o,e));const r=t=>et(s[t],1,1,(()=>{s[t]=null}));let a=t[3]&&!t[0]&&Ge(t);return{c(){e=x("div");for(let t=0;t<s.length;t+=1)s[t].c();n=T(),a&&a.c(),C(e,"id","searchresults")},m(t,o){y(t,e,o);for(let t=0;t<s.length;t+=1)s[t].m(e,null);v(e,n),a&&a.m(e,null),i=!0},p(t,i){if(22&i){let a;for(o=t[1],a=0;a<o.length;a+=1){const r=je(t,o,a);s[a]?(s[a].p(r,i),tt(s[a],1)):(s[a]=Ke(r),s[a].c(),tt(s[a],1),s[a].m(e,n))}for(J(),a=o.length;a<s.length;a+=1)r(a);Q()}t[3]&&!t[0]?a?a.p(t,i):(a=Ge(t),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i(t){if(!i){for(let t=0;t<o.length;t+=1)tt(s[t]);i=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)et(s[t]);i=!1},d(t){t&&b(e),w(s,t),a&&a.d()}}}function qe(t){let e;return{c(){e=x("div"),e.textContent="No search results found",C(e,"class","noresults svelte-5fm7ib")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Ue(t){let e;return{c(){e=x("div"),e.textContent="Search for coordinates or click anywhere on the map.",C(e,"id","intro"),C(e,"class","sidebar")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Ve(t){let e;return{c(){e=$("details")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Ke(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,k=t[6].display_name+"",A=ye(t[6])+"",z=t[6].lat+"",I=t[6].lon+"";return i=new Re({props:{aPlace:t[6]}}),_=new ze({props:{extra_classes:"btn btn-outline-secondary btn-sm",feature:t[6],$$slots:{default:[Ve]},$$scope:{ctx:t}}}),{c(){var v,y,b,w;e=x("div"),n=x("div"),it(i.$$.fragment),o=T(),s=x("span"),r=$(k),a=T(),l=x("span"),c=$(A),h=T(),u=x("p"),d=$(z),p=$(","),m=$(I),f=T(),it(_.$$.fragment),v=n,y="float",null===(b="right")?v.style.removeProperty(y):v.style.setProperty(y,b,w?"important":""),C(s,"class","name"),C(l,"class","type svelte-5fm7ib"),C(u,"class","coords svelte-5fm7ib"),C(e,"class","result svelte-5fm7ib"),C(e,"data-position",g=t[8]),O(e,"highlight",t[8]===t[2])},m(g,b){y(g,e,b),v(e,n),ot(i,n,null),v(e,o),v(e,s),v(s,r),v(e,a),v(e,l),v(l,c),v(e,h),v(e,u),v(u,d),v(u,p),v(u,m),v(e,f),ot(_,e,null),w=!0,L||(P=E(e,"click",M(t[4])),L=!0)},p(t,n){const o={};2&n&&(o.aPlace=t[6]),i.$set(o),(!w||2&n)&&k!==(k=t[6].display_name+"")&&S(r,k),(!w||2&n)&&A!==(A=ye(t[6])+"")&&S(c,A),(!w||2&n)&&z!==(z=t[6].lat+"")&&S(d,z),(!w||2&n)&&I!==(I=t[6].lon+"")&&S(m,I);const s={};2&n&&(s.feature=t[6]),512&n&&(s.$$scope={dirty:n,ctx:t}),_.$set(s),4&n&&O(e,"highlight",t[8]===t[2])},i(t){w||(tt(i.$$.fragment,t),tt(_.$$.fragment,t),w=!0)},o(t){et(i.$$.fragment,t),et(_.$$.fragment,t),w=!1},d(t){t&&b(e),st(i),st(_),L=!1,P()}}}function Ge(t){let e,n,i;return{c(){e=x("div"),n=x("a"),i=$("Search for more results"),C(n,"class","btn btn-primary"),C(n,"href",t[3]),C(e,"class","more svelte-5fm7ib")},m(t,o){y(t,e,o),v(e,n),v(n,i)},p(t,e){8&e&&C(n,"href",t[3])},d(t){t&&b(e)}}}function Ye(t){let e,n,i,o;const s=[Fe,We,He],r=[];function a(t,e){return t[1]&&t[1].length>0?0:t[1]?1:2}return e=a(t),n=r[e]=s[e](t),{c(){n.c(),i=P()},m(t,n){r[e].m(t,n),y(t,i,n),o=!0},p(t,[o]){let l=e;e=a(t),e===l?r[e].p(t,o):(J(),et(r[l],1,1,(()=>{r[l]=null})),Q(),n=r[e],n?n.p(t,o):(n=r[e]=s[e](t),n.c()),tt(n,1),n.m(i.parentNode,i))},i(t){o||(tt(n),o=!0)},o(t){et(n),o=!1},d(t){r[e].d(t),t&&b(i)}}}function Xe(t,e,n){let i,o,s,{reverse_search:r=!1}=e,{current_result:a=null}=e;return dt.subscribe((t=>{if(!t)return;n(1,i=t),n(2,o=0),n(5,a=i[0]);let e=new URLSearchParams(window.location.search),r=t;var l=[];e.has("exclude_place_ids")&&(l=e.get("exclude_place_ids").split(","));for(var c=0;c<r.length;c+=1)l.push(r[c].place_id);var h=new URLSearchParams(window.location.search);h.set("exclude_place_ids",l.join(",")),n(3,s="?"+h.toString())})),t.$$set=t=>{"reverse_search"in t&&n(0,r=t.reverse_search),"current_result"in t&&n(5,a=t.current_result)},[r,i,o,s,function(t){let e=t.target;e.className.match("result")||(e=e.parentElement);let s=Number(e.dataset.position);n(5,a=i[s]),n(2,o=s)},a]}class Je extends lt{constructor(t){super(),at(this,t,Xe,Ye,r,{reverse_search:0,current_result:5})}}var Qe,tn={exports:{}};
+ * Bootstrap v5.3.3 (https://getbootstrap.com/)
+ * Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ */hi||(hi=1,ci.exports=function(){const t=new Map,e={set(e,i,n){t.has(e)||t.set(e,new Map);const o=t.get(e);o.has(i)||0===o.size?o.set(i,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(o.keys())[0]}.`)},get:(e,i)=>t.has(e)&&t.get(e).get(i)||null,remove(e,i){if(!t.has(e))return;const n=t.get(e);n.delete(i),0===n.size&&t.delete(e)}},i=1e6,n=1e3,o="transitionend",s=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),r=t=>null==t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),a=t=>{do{t+=Math.floor(Math.random()*i)}while(document.getElementById(t));return t},l=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const o=Number.parseFloat(e),s=Number.parseFloat(i);return o||s?(e=e.split(",")[0],i=i.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(i))*n):0},h=t=>{t.dispatchEvent(new Event(o))},c=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),u=t=>c(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(s(t)):null,d=t=>{if(!c(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},p=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),f=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?f(t.parentNode):null},_=()=>{},m=t=>{t.offsetHeight},g=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,v=[],y=t=>{"loading"===document.readyState?(v.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of v)t()})),v.push(t)):t()},b=()=>"rtl"===document.documentElement.dir,w=t=>{y((()=>{const e=g();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}}))},x=(t,e=[],i=t)=>"function"==typeof t?t(...e):i,L=(t,e,i=!0)=>{if(!i)return void x(t);const n=5,s=l(e)+n;let r=!1;const a=({target:i})=>{i===e&&(r=!0,e.removeEventListener(o,a),x(t))};e.addEventListener(o,a),setTimeout((()=>{r||h(e)}),s)},T=(t,e,i,n)=>{const o=t.length;let s=t.indexOf(e);return-1===s?!i&&n?t[o-1]:t[0]:(s+=i?1:-1,n&&(s=(s+o)%o),t[Math.max(0,Math.min(s,o-1))])},P=/[^.]*(?=\..*)\.|.*/,M=/\..*/,k=/::\d+$/,C={};let E=1;const A={mouseenter:"mouseover",mouseleave:"mouseout"},S=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function O(t,e){return e&&`${e}::${E++}`||t.uidEvent||E++}function z(t){const e=O(t);return t.uidEvent=e,C[e]=C[e]||{},C[e]}function I(t,e){return function i(n){return H(n,{delegateTarget:t}),i.oneOff&&F.off(t,n.type,e),e.apply(t,[n])}}function D(t,e,i){return function n(o){const s=t.querySelectorAll(e);for(let{target:r}=o;r&&r!==this;r=r.parentNode)for(const a of s)if(a===r)return H(o,{delegateTarget:r}),n.oneOff&&F.off(t,o.type,e,i),i.apply(r,[o])}}function B(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function N(t,e,i){const n="string"==typeof e,o=n?i:e||i;let s=R(t);return S.has(s)||(s=t),[n,o,s]}function Z(t,e,i,n,o){if("string"!=typeof e||!t)return;let[s,r,a]=N(e,i,n);if(e in A){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=z(t),h=l[a]||(l[a]={}),c=B(h,r,s?i:null);if(c)return void(c.oneOff=c.oneOff&&o);const u=O(r,e.replace(P,"")),d=s?D(t,i,r):I(t,r);d.delegationSelector=s?i:null,d.callable=r,d.oneOff=o,d.uidEvent=u,h[u]=d,t.addEventListener(a,d,s)}function j(t,e,i,n,o){const s=B(e[i],n,o);s&&(t.removeEventListener(i,s,Boolean(o)),delete e[i][s.uidEvent])}function $(t,e,i,n){const o=e[i]||{};for(const[s,r]of Object.entries(o))s.includes(n)&&j(t,e,i,r.callable,r.delegationSelector)}function R(t){return t=t.replace(M,""),A[t]||t}const F={on(t,e,i,n){Z(t,e,i,n,!1)},one(t,e,i,n){Z(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[o,s,r]=N(e,i,n),a=r!==e,l=z(t),h=l[r]||{},c=e.startsWith(".");if(void 0===s){if(c)for(const i of Object.keys(l))$(t,l,i,e.slice(1));for(const[i,n]of Object.entries(h)){const o=i.replace(k,"");a&&!e.includes(o)||j(t,l,r,n.callable,n.delegationSelector)}}else{if(!Object.keys(h).length)return;j(t,l,r,s,o?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=g();let o=null,s=!0,r=!0,a=!1;e!==R(e)&&n&&(o=n.Event(e,i),n(t).trigger(o),s=!o.isPropagationStopped(),r=!o.isImmediatePropagationStopped(),a=o.isDefaultPrevented());const l=H(new Event(e,{bubbles:s,cancelable:!0}),i);return a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&o&&o.preventDefault(),l}};function H(t,e={}){for(const[i,n]of Object.entries(e))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}function W(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function q(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const U={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${q(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${q(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=W(t.dataset[n])}return e},getDataAttribute:(t,e)=>W(t.getAttribute(`data-bs-${q(e)}`))};class V{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=c(e)?U.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...c(e)?U.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[i,n]of Object.entries(e)){const e=t[i],o=c(e)?"element":r(e);if(!new RegExp(n).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${o}" but expected type "${n}".`)}}}const K="5.3.3";class G extends V{constructor(t,i){super(),(t=u(t))&&(this._element=t,this._config=this._getConfig(i),e.set(this._element,this.constructor.DATA_KEY,this))}dispose(){e.remove(this._element,this.constructor.DATA_KEY),F.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){L(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return e.get(u(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return K}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const Y=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e?e.split(",").map((t=>s(t))).join(","):null},X={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!p(t)&&d(t)))},getSelectorFromElement(t){const e=Y(t);return e&&X.findOne(e)?e:null},getElementFromSelector(t){const e=Y(t);return e?X.findOne(e):null},getMultipleElementsFromSelector(t){const e=Y(t);return e?X.find(e):[]}},J=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;F.on(document,i,`[data-bs-dismiss="${n}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),p(this))return;const o=X.getElementFromSelector(this)||this.closest(`.${n}`);t.getOrCreateInstance(o)[e]()}))},Q="alert",tt=".bs.alert",et=`close${tt}`,it=`closed${tt}`,nt="fade",ot="show";class st extends G{static get NAME(){return Q}close(){if(F.trigger(this._element,et).defaultPrevented)return;this._element.classList.remove(ot);const t=this._element.classList.contains(nt);this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),F.trigger(this._element,it),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=st.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}J(st,"close"),w(st);const rt="button",at="active",lt='[data-bs-toggle="button"]',ht="click.bs.button.data-api";class ct extends G{static get NAME(){return rt}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(at))}static jQueryInterface(t){return this.each((function(){const e=ct.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}F.on(document,ht,lt,(t=>{t.preventDefault();const e=t.target.closest(lt);ct.getOrCreateInstance(e).toggle()})),w(ct);const ut="swipe",dt=".bs.swipe",pt=`touchstart${dt}`,ft=`touchmove${dt}`,_t=`touchend${dt}`,mt=`pointerdown${dt}`,gt=`pointerup${dt}`,vt="touch",yt="pen",bt="pointer-event",wt=40,xt={endCallback:null,leftCallback:null,rightCallback:null},Lt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Tt extends V{constructor(t,e){super(),this._element=t,t&&Tt.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return xt}static get DefaultType(){return Lt}static get NAME(){return ut}dispose(){F.off(this._element,dt)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),x(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=wt)return;const e=t/this._deltaX;this._deltaX=0,e&&x(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(F.on(this._element,mt,(t=>this._start(t))),F.on(this._element,gt,(t=>this._end(t))),this._element.classList.add(bt)):(F.on(this._element,pt,(t=>this._start(t))),F.on(this._element,ft,(t=>this._move(t))),F.on(this._element,_t,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&(t.pointerType===yt||t.pointerType===vt)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Pt="carousel",Mt=".bs.carousel",kt=".data-api",Ct="ArrowLeft",Et="ArrowRight",At=500,St="next",Ot="prev",zt="left",It="right",Dt=`slide${Mt}`,Bt=`slid${Mt}`,Nt=`keydown${Mt}`,Zt=`mouseenter${Mt}`,jt=`mouseleave${Mt}`,$t=`dragstart${Mt}`,Rt=`load${Mt}${kt}`,Ft=`click${Mt}${kt}`,Ht="carousel",Wt="active",qt="slide",Ut="carousel-item-end",Vt="carousel-item-start",Kt="carousel-item-next",Gt="carousel-item-prev",Yt=".active",Xt=".carousel-item",Jt=Yt+Xt,Qt=".carousel-item img",te=".carousel-indicators",ee="[data-bs-slide], [data-bs-slide-to]",ie='[data-bs-ride="carousel"]',ne={[Ct]:It,[Et]:zt},oe={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},se={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class re extends G{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=X.findOne(te,this._element),this._addEventListeners(),this._config.ride===Ht&&this.cycle()}static get Default(){return oe}static get DefaultType(){return se}static get NAME(){return Pt}next(){this._slide(St)}nextWhenVisible(){!document.hidden&&d(this._element)&&this.next()}prev(){this._slide(Ot)}pause(){this._isSliding&&h(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?F.one(this._element,Bt,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void F.one(this._element,Bt,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const n=t>i?St:Ot;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&F.on(this._element,Nt,(t=>this._keydown(t))),"hover"===this._config.pause&&(F.on(this._element,Zt,(()=>this.pause())),F.on(this._element,jt,(()=>this._maybeEnableCycle()))),this._config.touch&&Tt.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of X.find(Qt,this._element))F.on(t,$t,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(zt)),rightCallback:()=>this._slide(this._directionToOrder(It)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),At+this._config.interval))}};this._swipeHelper=new Tt(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=ne[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=X.findOne(Yt,this._indicatorsElement);e.classList.remove(Wt),e.removeAttribute("aria-current");const i=X.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(Wt),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),n=t===St,o=e||T(this._getItems(),i,n,this._config.wrap);if(o===i)return;const s=this._getItemIndex(o),r=e=>F.trigger(this._element,e,{relatedTarget:o,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:s});if(r(Dt).defaultPrevented)return;if(!i||!o)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(s),this._activeElement=o;const l=n?Vt:Ut,h=n?Kt:Gt;o.classList.add(h),m(o),i.classList.add(l),o.classList.add(l);const c=()=>{o.classList.remove(l,h),o.classList.add(Wt),i.classList.remove(Wt,h,l),this._isSliding=!1,r(Bt)};this._queueCallback(c,i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains(qt)}_getActive(){return X.findOne(Jt,this._element)}_getItems(){return X.find(Xt,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return b()?t===zt?Ot:St:t===zt?St:Ot}_orderToDirection(t){return b()?t===Ot?zt:It:t===Ot?It:zt}static jQueryInterface(t){return this.each((function(){const e=re.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}F.on(document,Ft,ee,(function(t){const e=X.getElementFromSelector(this);if(!e||!e.classList.contains(Ht))return;t.preventDefault();const i=re.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===U.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),F.on(window,Rt,(()=>{const t=X.find(ie);for(const e of t)re.getOrCreateInstance(e)})),w(re);const ae="collapse",le=".bs.collapse",he=`show${le}`,ce=`shown${le}`,ue=`hide${le}`,de=`hidden${le}`,pe=`click${le}.data-api`,fe="show",_e="collapse",me="collapsing",ge="collapsed",ve=`:scope .${_e} .${_e}`,ye="collapse-horizontal",be="width",we="height",xe=".collapse.show, .collapse.collapsing",Le='[data-bs-toggle="collapse"]',Te={parent:null,toggle:!0},Pe={parent:"(null|element)",toggle:"boolean"};class Me extends G{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=X.find(Le);for(const t of i){const e=X.getSelectorFromElement(t),i=X.find(e).filter((t=>t===this._element));null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Te}static get DefaultType(){return Pe}static get NAME(){return ae}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(xe).filter((t=>t!==this._element)).map((t=>Me.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(F.trigger(this._element,he).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(_e),this._element.classList.add(me),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=()=>{this._isTransitioning=!1,this._element.classList.remove(me),this._element.classList.add(_e,fe),this._element.style[e]="",F.trigger(this._element,ce)},n=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback(i,this._element,!0),this._element.style[e]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(F.trigger(this._element,ue).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,m(this._element),this._element.classList.add(me),this._element.classList.remove(_e,fe);for(const t of this._triggerArray){const e=X.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0;const e=()=>{this._isTransitioning=!1,this._element.classList.remove(me),this._element.classList.add(_e),F.trigger(this._element,de)};this._element.style[t]="",this._queueCallback(e,this._element,!0)}_isShown(t=this._element){return t.classList.contains(fe)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=u(t.parent),t}_getDimension(){return this._element.classList.contains(ye)?be:we}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Le);for(const e of t){const t=X.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=X.find(ve,this._config.parent);return X.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle(ge,!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=Me.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}F.on(document,pe,Le,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of X.getMultipleElementsFromSelector(this))Me.getOrCreateInstance(t,{toggle:!1}).toggle()})),w(Me);var ke="top",Ce="bottom",Ee="right",Ae="left",Se="auto",Oe=[ke,Ce,Ee,Ae],ze="start",Ie="end",De="clippingParents",Be="viewport",Ne="popper",Ze="reference",je=Oe.reduce((function(t,e){return t.concat([e+"-"+ze,e+"-"+Ie])}),[]),$e=[].concat(Oe,[Se]).reduce((function(t,e){return t.concat([e,e+"-"+ze,e+"-"+Ie])}),[]),Re="beforeRead",Fe="read",He="afterRead",We="beforeMain",qe="main",Ue="afterMain",Ve="beforeWrite",Ke="write",Ge="afterWrite",Ye=[Re,Fe,He,We,qe,Ue,Ve,Ke,Ge];function Xe(t){return t?(t.nodeName||"").toLowerCase():null}function Je(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Qe(t){return t instanceof Je(t).Element||t instanceof Element}function ti(t){return t instanceof Je(t).HTMLElement||t instanceof HTMLElement}function ei(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Je(t).ShadowRoot||t instanceof ShadowRoot)}function ii(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},o=e.elements[t];ti(o)&&Xe(o)&&(Object.assign(o.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})))}))}function ni(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],o=e.attributes[t]||{},s=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});ti(n)&&Xe(n)&&(Object.assign(n.style,s),Object.keys(o).forEach((function(t){n.removeAttribute(t)})))}))}}const oi={name:"applyStyles",enabled:!0,phase:"write",fn:ii,effect:ni,requires:["computeStyles"]};function si(t){return t.split("-")[0]}var ri=Math.max,ai=Math.min,li=Math.round;function hi(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function ci(){return!/^((?!chrome|android).)*safari/i.test(hi())}function ui(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),o=1,s=1;e&&ti(t)&&(o=t.offsetWidth>0&&li(n.width)/t.offsetWidth||1,s=t.offsetHeight>0&&li(n.height)/t.offsetHeight||1);var r=(Qe(t)?Je(t):window).visualViewport,a=!ci()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/o,h=(n.top+(a&&r?r.offsetTop:0))/s,c=n.width/o,u=n.height/s;return{width:c,height:u,top:h,right:l+c,bottom:h+u,left:l,x:l,y:h}}function di(t){var e=ui(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function pi(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&ei(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function fi(t){return Je(t).getComputedStyle(t)}function _i(t){return["table","td","th"].indexOf(Xe(t))>=0}function mi(t){return((Qe(t)?t.ownerDocument:t.document)||window.document).documentElement}function gi(t){return"html"===Xe(t)?t:t.assignedSlot||t.parentNode||(ei(t)?t.host:null)||mi(t)}function vi(t){return ti(t)&&"fixed"!==fi(t).position?t.offsetParent:null}function yi(t){var e=/firefox/i.test(hi());if(/Trident/i.test(hi())&&ti(t)&&"fixed"===fi(t).position)return null;var i=gi(t);for(ei(i)&&(i=i.host);ti(i)&&["html","body"].indexOf(Xe(i))<0;){var n=fi(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}function bi(t){for(var e=Je(t),i=vi(t);i&&_i(i)&&"static"===fi(i).position;)i=vi(i);return i&&("html"===Xe(i)||"body"===Xe(i)&&"static"===fi(i).position)?e:i||yi(t)||e}function wi(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function xi(t,e,i){return ri(t,ai(e,i))}function Li(t,e,i){var n=xi(t,e,i);return n>i?i:n}function Ti(){return{top:0,right:0,bottom:0,left:0}}function Pi(t){return Object.assign({},Ti(),t)}function Mi(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var ki=function(t,e){return Pi("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Mi(t,Oe))};function Ci(t){var e,i=t.state,n=t.name,o=t.options,s=i.elements.arrow,r=i.modifiersData.popperOffsets,a=si(i.placement),l=wi(a),h=[Ae,Ee].indexOf(a)>=0?"height":"width";if(s&&r){var c=ki(o.padding,i),u=di(s),d="y"===l?ke:Ae,p="y"===l?Ce:Ee,f=i.rects.reference[h]+i.rects.reference[l]-r[l]-i.rects.popper[h],_=r[l]-i.rects.reference[l],m=bi(s),g=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,v=f/2-_/2,y=c[d],b=g-u[h]-c[p],w=g/2-u[h]/2+v,x=xi(y,w,b),L=l;i.modifiersData[n]=((e={})[L]=x,e.centerOffset=x-w,e)}}function Ei(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&pi(e.elements.popper,n)&&(e.elements.arrow=n)}const Ai={name:"arrow",enabled:!0,phase:"main",fn:Ci,effect:Ei,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Si(t){return t.split("-")[1]}var Oi={top:"auto",right:"auto",bottom:"auto",left:"auto"};function zi(t,e){var i=t.x,n=t.y,o=e.devicePixelRatio||1;return{x:li(i*o)/o||0,y:li(n*o)/o||0}}function Ii(t){var e,i=t.popper,n=t.popperRect,o=t.placement,s=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,h=t.adaptive,c=t.roundOffsets,u=t.isFixed,d=r.x,p=void 0===d?0:d,f=r.y,_=void 0===f?0:f,m="function"==typeof c?c({x:p,y:_}):{x:p,y:_};p=m.x,_=m.y;var g=r.hasOwnProperty("x"),v=r.hasOwnProperty("y"),y=Ae,b=ke,w=window;if(h){var x=bi(i),L="clientHeight",T="clientWidth";x===Je(i)&&"static"!==fi(x=mi(i)).position&&"absolute"===a&&(L="scrollHeight",T="scrollWidth"),(o===ke||(o===Ae||o===Ee)&&s===Ie)&&(b=Ce,_-=(u&&x===w&&w.visualViewport?w.visualViewport.height:x[L])-n.height,_*=l?1:-1),o!==Ae&&(o!==ke&&o!==Ce||s!==Ie)||(y=Ee,p-=(u&&x===w&&w.visualViewport?w.visualViewport.width:x[T])-n.width,p*=l?1:-1)}var P,M=Object.assign({position:a},h&&Oi),k=!0===c?zi({x:p,y:_},Je(i)):{x:p,y:_};return p=k.x,_=k.y,l?Object.assign({},M,((P={})[b]=v?"0":"",P[y]=g?"0":"",P.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+_+"px)":"translate3d("+p+"px, "+_+"px, 0)",P)):Object.assign({},M,((e={})[b]=v?_+"px":"",e[y]=g?p+"px":"",e.transform="",e))}function Di(t){var e=t.state,i=t.options,n=i.gpuAcceleration,o=void 0===n||n,s=i.adaptive,r=void 0===s||s,a=i.roundOffsets,l=void 0===a||a,h={placement:si(e.placement),variation:Si(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,Ii(Object.assign({},h,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Ii(Object.assign({},h,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Bi={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Di,data:{}};var Ni={passive:!0};function Zi(t){var e=t.state,i=t.instance,n=t.options,o=n.scroll,s=void 0===o||o,r=n.resize,a=void 0===r||r,l=Je(e.elements.popper),h=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&h.forEach((function(t){t.addEventListener("scroll",i.update,Ni)})),a&&l.addEventListener("resize",i.update,Ni),function(){s&&h.forEach((function(t){t.removeEventListener("scroll",i.update,Ni)})),a&&l.removeEventListener("resize",i.update,Ni)}}const ji={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Zi,data:{}};var $i={left:"right",right:"left",bottom:"top",top:"bottom"};function Ri(t){return t.replace(/left|right|bottom|top/g,(function(t){return $i[t]}))}var Fi={start:"end",end:"start"};function Hi(t){return t.replace(/start|end/g,(function(t){return Fi[t]}))}function Wi(t){var e=Je(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function qi(t){return ui(mi(t)).left+Wi(t).scrollLeft}function Ui(t,e){var i=Je(t),n=mi(t),o=i.visualViewport,s=n.clientWidth,r=n.clientHeight,a=0,l=0;if(o){s=o.width,r=o.height;var h=ci();(h||!h&&"fixed"===e)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:r,x:a+qi(t),y:l}}function Vi(t){var e,i=mi(t),n=Wi(t),o=null==(e=t.ownerDocument)?void 0:e.body,s=ri(i.scrollWidth,i.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),r=ri(i.scrollHeight,i.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+qi(t),l=-n.scrollTop;return"rtl"===fi(o||i).direction&&(a+=ri(i.clientWidth,o?o.clientWidth:0)-s),{width:s,height:r,x:a,y:l}}function Ki(t){var e=fi(t),i=e.overflow,n=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+o+n)}function Gi(t){return["html","body","#document"].indexOf(Xe(t))>=0?t.ownerDocument.body:ti(t)&&Ki(t)?t:Gi(gi(t))}function Yi(t,e){var i;void 0===e&&(e=[]);var n=Gi(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),s=Je(n),r=o?[s].concat(s.visualViewport||[],Ki(n)?n:[]):n,a=e.concat(r);return o?a:a.concat(Yi(gi(r)))}function Xi(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Ji(t,e){var i=ui(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}function Qi(t,e,i){return e===Be?Xi(Ui(t,i)):Qe(e)?Ji(e,i):Xi(Vi(mi(t)))}function tn(t){var e=Yi(gi(t)),i=["absolute","fixed"].indexOf(fi(t).position)>=0&&ti(t)?bi(t):t;return Qe(i)?e.filter((function(t){return Qe(t)&&pi(t,i)&&"body"!==Xe(t)})):[]}function en(t,e,i,n){var o="clippingParents"===e?tn(t):[].concat(e),s=[].concat(o,[i]),r=s[0],a=s.reduce((function(e,i){var o=Qi(t,i,n);return e.top=ri(o.top,e.top),e.right=ai(o.right,e.right),e.bottom=ai(o.bottom,e.bottom),e.left=ri(o.left,e.left),e}),Qi(t,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function nn(t){var e,i=t.reference,n=t.element,o=t.placement,s=o?si(o):null,r=o?Si(o):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(s){case ke:e={x:a,y:i.y-n.height};break;case Ce:e={x:a,y:i.y+i.height};break;case Ee:e={x:i.x+i.width,y:l};break;case Ae:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var h=s?wi(s):null;if(null!=h){var c="y"===h?"height":"width";switch(r){case ze:e[h]=e[h]-(i[c]/2-n[c]/2);break;case Ie:e[h]=e[h]+(i[c]/2-n[c]/2)}}return e}function on(t,e){void 0===e&&(e={});var i=e,n=i.placement,o=void 0===n?t.placement:n,s=i.strategy,r=void 0===s?t.strategy:s,a=i.boundary,l=void 0===a?De:a,h=i.rootBoundary,c=void 0===h?Be:h,u=i.elementContext,d=void 0===u?Ne:u,p=i.altBoundary,f=void 0!==p&&p,_=i.padding,m=void 0===_?0:_,g=Pi("number"!=typeof m?m:Mi(m,Oe)),v=d===Ne?Ze:Ne,y=t.rects.popper,b=t.elements[f?v:d],w=en(Qe(b)?b:b.contextElement||mi(t.elements.popper),l,c,r),x=ui(t.elements.reference),L=nn({reference:x,element:y,strategy:"absolute",placement:o}),T=Xi(Object.assign({},y,L)),P=d===Ne?T:x,M={top:w.top-P.top+g.top,bottom:P.bottom-w.bottom+g.bottom,left:w.left-P.left+g.left,right:P.right-w.right+g.right},k=t.modifiersData.offset;if(d===Ne&&k){var C=k[o];Object.keys(M).forEach((function(t){var e=[Ee,Ce].indexOf(t)>=0?1:-1,i=[ke,Ce].indexOf(t)>=0?"y":"x";M[t]+=C[i]*e}))}return M}function sn(t,e){void 0===e&&(e={});var i=e,n=i.placement,o=i.boundary,s=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,h=void 0===l?$e:l,c=Si(n),u=c?a?je:je.filter((function(t){return Si(t)===c})):Oe,d=u.filter((function(t){return h.indexOf(t)>=0}));0===d.length&&(d=u);var p=d.reduce((function(e,i){return e[i]=on(t,{placement:i,boundary:o,rootBoundary:s,padding:r})[si(i)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}function rn(t){if(si(t)===Se)return[];var e=Ri(t);return[Hi(t),e,Hi(e)]}function an(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var o=i.mainAxis,s=void 0===o||o,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,h=i.padding,c=i.boundary,u=i.rootBoundary,d=i.altBoundary,p=i.flipVariations,f=void 0===p||p,_=i.allowedAutoPlacements,m=e.options.placement,g=si(m),v=l||(g!==m&&f?rn(m):[Ri(m)]),y=[m].concat(v).reduce((function(t,i){return t.concat(si(i)===Se?sn(e,{placement:i,boundary:c,rootBoundary:u,padding:h,flipVariations:f,allowedAutoPlacements:_}):i)}),[]),b=e.rects.reference,w=e.rects.popper,x=new Map,L=!0,T=y[0],P=0;P<y.length;P++){var M=y[P],k=si(M),C=Si(M)===ze,E=[ke,Ce].indexOf(k)>=0,A=E?"width":"height",S=on(e,{placement:M,boundary:c,rootBoundary:u,altBoundary:d,padding:h}),O=E?C?Ee:Ae:C?Ce:ke;b[A]>w[A]&&(O=Ri(O));var z=Ri(O),I=[];if(s&&I.push(S[k]<=0),a&&I.push(S[O]<=0,S[z]<=0),I.every((function(t){return t}))){T=M,L=!1;break}x.set(M,I)}if(L)for(var D=function(t){var e=y.find((function(e){var i=x.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return T=e,"break"},B=f?3:1;B>0&&"break"!==D(B);B--);e.placement!==T&&(e.modifiersData[n]._skip=!0,e.placement=T,e.reset=!0)}}const ln={name:"flip",enabled:!0,phase:"main",fn:an,requiresIfExists:["offset"],data:{_skip:!1}};function hn(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function cn(t){return[ke,Ee,Ce,Ae].some((function(e){return t[e]>=0}))}function un(t){var e=t.state,i=t.name,n=e.rects.reference,o=e.rects.popper,s=e.modifiersData.preventOverflow,r=on(e,{elementContext:"reference"}),a=on(e,{altBoundary:!0}),l=hn(r,n),h=hn(a,o,s),c=cn(l),u=cn(h);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:h,isReferenceHidden:c,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":u})}const dn={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:un};function pn(t,e,i){var n=si(t),o=[Ae,ke].indexOf(n)>=0?-1:1,s="function"==typeof i?i(Object.assign({},e,{placement:t})):i,r=s[0],a=s[1];return r=r||0,a=(a||0)*o,[Ae,Ee].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}function fn(t){var e=t.state,i=t.options,n=t.name,o=i.offset,s=void 0===o?[0,0]:o,r=$e.reduce((function(t,i){return t[i]=pn(i,e.rects,s),t}),{}),a=r[e.placement],l=a.x,h=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=h),e.modifiersData[n]=r}const _n={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:fn};function mn(t){var e=t.state,i=t.name;e.modifiersData[i]=nn({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const gn={name:"popperOffsets",enabled:!0,phase:"read",fn:mn,data:{}};function vn(t){return"x"===t?"y":"x"}function yn(t){var e=t.state,i=t.options,n=t.name,o=i.mainAxis,s=void 0===o||o,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,h=i.rootBoundary,c=i.altBoundary,u=i.padding,d=i.tether,p=void 0===d||d,f=i.tetherOffset,_=void 0===f?0:f,m=on(e,{boundary:l,rootBoundary:h,padding:u,altBoundary:c}),g=si(e.placement),v=Si(e.placement),y=!v,b=wi(g),w=vn(b),x=e.modifiersData.popperOffsets,L=e.rects.reference,T=e.rects.popper,P="function"==typeof _?_(Object.assign({},e.rects,{placement:e.placement})):_,M="number"==typeof P?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),k=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,C={x:0,y:0};if(x){if(s){var E,A="y"===b?ke:Ae,S="y"===b?Ce:Ee,O="y"===b?"height":"width",z=x[b],I=z+m[A],D=z-m[S],B=p?-T[O]/2:0,N=v===ze?L[O]:T[O],Z=v===ze?-T[O]:-L[O],j=e.elements.arrow,$=p&&j?di(j):{width:0,height:0},R=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Ti(),F=R[A],H=R[S],W=xi(0,L[O],$[O]),q=y?L[O]/2-B-W-F-M.mainAxis:N-W-F-M.mainAxis,U=y?-L[O]/2+B+W+H+M.mainAxis:Z+W+H+M.mainAxis,V=e.elements.arrow&&bi(e.elements.arrow),K=V?"y"===b?V.clientTop||0:V.clientLeft||0:0,G=null!=(E=null==k?void 0:k[b])?E:0,Y=z+U-G,X=xi(p?ai(I,z+q-G-K):I,z,p?ri(D,Y):D);x[b]=X,C[b]=X-z}if(a){var J,Q="x"===b?ke:Ae,tt="x"===b?Ce:Ee,et=x[w],it="y"===w?"height":"width",nt=et+m[Q],ot=et-m[tt],st=-1!==[ke,Ae].indexOf(g),rt=null!=(J=null==k?void 0:k[w])?J:0,at=st?nt:et-L[it]-T[it]-rt+M.altAxis,lt=st?et+L[it]+T[it]-rt-M.altAxis:ot,ht=p&&st?Li(at,et,lt):xi(p?at:nt,et,p?lt:ot);x[w]=ht,C[w]=ht-et}e.modifiersData[n]=C}}const bn={name:"preventOverflow",enabled:!0,phase:"main",fn:yn,requiresIfExists:["offset"]};function wn(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function xn(t){return t!==Je(t)&&ti(t)?wn(t):Wi(t)}function Ln(t){var e=t.getBoundingClientRect(),i=li(e.width)/t.offsetWidth||1,n=li(e.height)/t.offsetHeight||1;return 1!==i||1!==n}function Tn(t,e,i){void 0===i&&(i=!1);var n=ti(e),o=ti(e)&&Ln(e),s=mi(e),r=ui(t,o,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!i)&&(("body"!==Xe(e)||Ki(s))&&(a=xn(e)),ti(e)?((l=ui(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):s&&(l.x=qi(s))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function Pn(t){var e=new Map,i=new Set,n=[];function o(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&o(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||o(t)})),n}function Mn(t){var e=Pn(t);return Ye.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}function kn(t){var e;return function(){return e||(e=new Promise((function(i){Promise.resolve().then((function(){e=void 0,i(t())}))}))),e}}function Cn(t){var e=t.reduce((function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}var En={placement:"bottom",modifiers:[],strategy:"absolute"};function An(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Sn(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,o=e.defaultOptions,s=void 0===o?En:o;return function(t,e,i){void 0===i&&(i=s);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},En,s),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},r=[],a=!1,l={state:o,setOptions:function(i){var r="function"==typeof i?i(o.options):i;c(),o.options=Object.assign({},s,o.options,r),o.scrollParents={reference:Qe(t)?Yi(t):t.contextElement?Yi(t.contextElement):[],popper:Yi(e)};var a=Mn(Cn([].concat(n,o.options.modifiers)));return o.orderedModifiers=a.filter((function(t){return t.enabled})),h(),l.update()},forceUpdate:function(){if(!a){var t=o.elements,e=t.reference,i=t.popper;if(An(e,i)){o.rects={reference:Tn(e,bi(i),"fixed"===o.options.strategy),popper:di(i)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(t){return o.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<o.orderedModifiers.length;n++)if(!0!==o.reset){var s=o.orderedModifiers[n],r=s.fn,h=s.options,c=void 0===h?{}:h,u=s.name;"function"==typeof r&&(o=r({state:o,options:c,name:u,instance:l})||o)}else o.reset=!1,n=-1}}},update:kn((function(){return new Promise((function(t){l.forceUpdate(),t(o)}))})),destroy:function(){c(),a=!0}};if(!An(t,e))return l;function h(){o.orderedModifiers.forEach((function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,s=t.effect;if("function"==typeof s){var a=s({state:o,name:e,instance:l,options:n}),h=function(){};r.push(a||h)}}))}function c(){r.forEach((function(t){return t()})),r=[]}return l.setOptions(i).then((function(t){!a&&i.onFirstUpdate&&i.onFirstUpdate(t)})),l}}var On=Sn(),zn=Sn({defaultModifiers:[ji,gn,Bi,oi]}),In=Sn({defaultModifiers:[ji,gn,Bi,oi,_n,ln,bn,Ai,dn]});const Dn=Object.freeze(Object.defineProperty({__proto__:null,afterMain:Ue,afterRead:He,afterWrite:Ge,applyStyles:oi,arrow:Ai,auto:Se,basePlacements:Oe,beforeMain:We,beforeRead:Re,beforeWrite:Ve,bottom:Ce,clippingParents:De,computeStyles:Bi,createPopper:In,createPopperBase:On,createPopperLite:zn,detectOverflow:on,end:Ie,eventListeners:ji,flip:ln,hide:dn,left:Ae,main:qe,modifierPhases:Ye,offset:_n,placements:$e,popper:Ne,popperGenerator:Sn,popperOffsets:gn,preventOverflow:bn,read:Fe,reference:Ze,right:Ee,start:ze,top:ke,variationPlacements:je,viewport:Be,write:Ke},Symbol.toStringTag,{value:"Module"})),Bn="dropdown",Nn=".bs.dropdown",Zn=".data-api",jn="Escape",$n="Tab",Rn="ArrowUp",Fn="ArrowDown",Hn=2,Wn=`hide${Nn}`,qn=`hidden${Nn}`,Un=`show${Nn}`,Vn=`shown${Nn}`,Kn=`click${Nn}${Zn}`,Gn=`keydown${Nn}${Zn}`,Yn=`keyup${Nn}${Zn}`,Xn="show",Jn="dropup",Qn="dropend",to="dropstart",eo="dropup-center",io="dropdown-center",no='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',oo=`${no}.${Xn}`,so=".dropdown-menu",ro=".navbar",ao=".navbar-nav",lo=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",ho=b()?"top-end":"top-start",co=b()?"top-start":"top-end",uo=b()?"bottom-end":"bottom-start",po=b()?"bottom-start":"bottom-end",fo=b()?"left-start":"right-start",_o=b()?"right-start":"left-start",mo="top",go="bottom",vo={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},yo={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class bo extends G{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=X.next(this._element,so)[0]||X.prev(this._element,so)[0]||X.findOne(so,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return vo}static get DefaultType(){return yo}static get NAME(){return Bn}toggle(){return this._isShown()?this.hide():this.show()}show(){if(p(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!F.trigger(this._element,Un,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(ao))for(const t of[].concat(...document.body.children))F.on(t,"mouseover",_);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Xn),this._element.classList.add(Xn),F.trigger(this._element,Vn,t)}}hide(){if(p(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!F.trigger(this._element,Wn,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))F.off(t,"mouseover",_);this._popper&&this._popper.destroy(),this._menu.classList.remove(Xn),this._element.classList.remove(Xn),this._element.setAttribute("aria-expanded","false"),U.removeDataAttribute(this._menu,"popper"),F.trigger(this._element,qn,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!c(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Bn.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===Dn)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:c(this._config.reference)?t=u(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=In(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Xn)}_getPlacement(){const t=this._parent;if(t.classList.contains(Qn))return fo;if(t.classList.contains(to))return _o;if(t.classList.contains(eo))return mo;if(t.classList.contains(io))return go;const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains(Jn)?e?co:ho:e?po:uo}_detectNavbar(){return null!==this._element.closest(ro)}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(U.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...x(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:e}){const i=X.find(lo,this._menu).filter((t=>d(t)));i.length&&T(i,e,t===Fn,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=bo.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(t.button===Hn||"keyup"===t.type&&t.key!==$n)return;const e=X.find(oo);for(const i of e){const e=bo.getInstance(i);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),o=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!o||"outside"===e._config.autoClose&&o)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&t.key===$n||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const s={relatedTarget:e._element};"click"===t.type&&(s.clickEvent=t),e._completeHide(s)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i=t.key===jn,n=[Rn,Fn].includes(t.key);if(!n&&!i)return;if(e&&!i)return;t.preventDefault();const o=this.matches(no)?this:X.prev(this,no)[0]||X.next(this,no)[0]||X.findOne(no,t.delegateTarget.parentNode),s=bo.getOrCreateInstance(o);if(n)return t.stopPropagation(),s.show(),void s._selectMenuItem(t);s._isShown()&&(t.stopPropagation(),s.hide(),o.focus())}}F.on(document,Gn,no,bo.dataApiKeydownHandler),F.on(document,Gn,so,bo.dataApiKeydownHandler),F.on(document,Kn,bo.clearMenus),F.on(document,Yn,bo.clearMenus),F.on(document,Kn,no,(function(t){t.preventDefault(),bo.getOrCreateInstance(this).toggle()})),w(bo);const wo="backdrop",xo="fade",Lo="show",To=`mousedown.bs.${wo}`,Po={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Mo={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class ko extends V{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Po}static get DefaultType(){return Mo}static get NAME(){return wo}show(t){if(!this._config.isVisible)return void x(t);this._append();const e=this._getElement();this._config.isAnimated&&m(e),e.classList.add(Lo),this._emulateAnimation((()=>{x(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(Lo),this._emulateAnimation((()=>{this.dispose(),x(t)}))):x(t)}dispose(){this._isAppended&&(F.off(this._element,To),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add(xo),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=u(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),F.on(t,To,(()=>{x(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){L(t,this._getElement(),this._config.isAnimated)}}const Co="focustrap",Eo=".bs.focustrap",Ao=`focusin${Eo}`,So=`keydown.tab${Eo}`,Oo="Tab",zo="forward",Io="backward",Do={autofocus:!0,trapElement:null},Bo={autofocus:"boolean",trapElement:"element"};class No extends V{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Do}static get DefaultType(){return Bo}static get NAME(){return Co}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),F.off(document,Eo),F.on(document,Ao,(t=>this._handleFocusin(t))),F.on(document,So,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,F.off(document,Eo))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=X.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===Io?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){t.key===Oo&&(this._lastTabNavDirection=t.shiftKey?Io:zo)}}const Zo=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",jo=".sticky-top",$o="padding-right",Ro="margin-right";class Fo{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,$o,(e=>e+t)),this._setElementAttributes(Zo,$o,(e=>e+t)),this._setElementAttributes(jo,Ro,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,$o),this._resetElementAttributes(Zo,$o),this._resetElementAttributes(jo,Ro)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth(),o=t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const o=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(o))}px`)};this._applyManipulationCallback(t,o)}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&U.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){const i=t=>{const i=U.getDataAttribute(t,e);null!==i?(U.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)};this._applyManipulationCallback(t,i)}_applyManipulationCallback(t,e){if(c(t))e(t);else for(const i of X.find(t,this._element))e(i)}}const Ho="modal",Wo=".bs.modal",qo="Escape",Uo=`hide${Wo}`,Vo=`hidePrevented${Wo}`,Ko=`hidden${Wo}`,Go=`show${Wo}`,Yo=`shown${Wo}`,Xo=`resize${Wo}`,Jo=`click.dismiss${Wo}`,Qo=`mousedown.dismiss${Wo}`,ts=`keydown.dismiss${Wo}`,es=`click${Wo}.data-api`,is="modal-open",ns="fade",os="show",ss="modal-static",rs=".modal.show",as=".modal-dialog",ls=".modal-body",hs='[data-bs-toggle="modal"]',cs={backdrop:!0,focus:!0,keyboard:!0},us={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class ds extends G{constructor(t,e){super(t,e),this._dialog=X.findOne(as,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Fo,this._addEventListeners()}static get Default(){return cs}static get DefaultType(){return us}static get NAME(){return Ho}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||F.trigger(this._element,Go,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(is),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(F.trigger(this._element,Uo).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(os),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){F.off(window,Wo),F.off(this._dialog,Wo),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new ko({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new No({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=X.findOne(ls,this._dialog);e&&(e.scrollTop=0),m(this._element),this._element.classList.add(os);const i=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,F.trigger(this._element,Yo,{relatedTarget:t})};this._queueCallback(i,this._dialog,this._isAnimated())}_addEventListeners(){F.on(this._element,ts,(t=>{t.key===qo&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),F.on(window,Xo,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),F.on(this._element,Qo,(t=>{F.one(this._element,Jo,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(is),this._resetAdjustments(),this._scrollBar.reset(),F.trigger(this._element,Ko)}))}_isAnimated(){return this._element.classList.contains(ns)}_triggerBackdropTransition(){if(F.trigger(this._element,Vo).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(ss)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(ss),this._queueCallback((()=>{this._element.classList.remove(ss),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=b()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=b()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=ds.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}F.on(document,es,hs,(function(t){const e=X.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),F.one(e,Go,(t=>{t.defaultPrevented||F.one(e,Ko,(()=>{d(this)&&this.focus()}))}));const i=X.findOne(rs);i&&ds.getInstance(i).hide(),ds.getOrCreateInstance(e).toggle(this)})),J(ds),w(ds);const ps="offcanvas",fs=".bs.offcanvas",_s=".data-api",ms=`load${fs}${_s}`,gs="Escape",vs="show",ys="showing",bs="hiding",ws="offcanvas-backdrop",xs=".offcanvas.show",Ls=`show${fs}`,Ts=`shown${fs}`,Ps=`hide${fs}`,Ms=`hidePrevented${fs}`,ks=`hidden${fs}`,Cs=`resize${fs}`,Es=`click${fs}${_s}`,As=`keydown.dismiss${fs}`,Ss='[data-bs-toggle="offcanvas"]',Os={backdrop:!0,keyboard:!0,scroll:!1},zs={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Is extends G{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Os}static get DefaultType(){return zs}static get NAME(){return ps}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(F.trigger(this._element,Ls,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new Fo).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ys);const e=()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(vs),this._element.classList.remove(ys),F.trigger(this._element,Ts,{relatedTarget:t})};this._queueCallback(e,this._element,!0)}hide(){if(!this._isShown)return;if(F.trigger(this._element,Ps).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(bs),this._backdrop.hide();const t=()=>{this._element.classList.remove(vs,bs),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new Fo).reset(),F.trigger(this._element,ks)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=()=>{"static"!==this._config.backdrop?this.hide():F.trigger(this._element,Ms)},e=Boolean(this._config.backdrop);return new ko({className:ws,isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?t:null})}_initializeFocusTrap(){return new No({trapElement:this._element})}_addEventListeners(){F.on(this._element,As,(t=>{t.key===gs&&(this._config.keyboard?this.hide():F.trigger(this._element,Ms))}))}static jQueryInterface(t){return this.each((function(){const e=Is.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}F.on(document,Es,Ss,(function(t){const e=X.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),p(this))return;F.one(e,ks,(()=>{d(this)&&this.focus()}));const i=X.findOne(xs);i&&i!==e&&Is.getInstance(i).hide(),Is.getOrCreateInstance(e).toggle(this)})),F.on(window,ms,(()=>{for(const t of X.find(xs))Is.getOrCreateInstance(t).show()})),F.on(window,Cs,(()=>{for(const t of X.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Is.getOrCreateInstance(t).hide()})),J(Is),w(Is);const Ds={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Bs=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Ns=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Zs=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!Bs.has(i)||Boolean(Ns.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(i)))};function js(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),o=[].concat(...n.body.querySelectorAll("*"));for(const t of o){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const n=[].concat(...t.attributes),o=[].concat(e["*"]||[],e[i]||[]);for(const e of n)Zs(e,o)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}const $s="TemplateFactory",Rs={allowList:Ds,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Fs={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Hs={entry:"(string|element|function|null)",selector:"(string|element)"};class Ws extends V{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Rs}static get DefaultType(){return Fs}static get NAME(){return $s}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},Hs)}_setContent(t,e,i){const n=X.findOne(i,t);n&&((e=this._resolvePossibleFunction(e))?c(e)?this._putElementInTemplate(u(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?js(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return x(t,[this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const qs="tooltip",Us=new Set(["sanitize","allowList","sanitizeFn"]),Vs="fade",Ks="show",Gs=".tooltip-inner",Ys=".modal",Xs="hide.bs.modal",Js="hover",Qs="focus",tr="click",er="manual",ir="hide",nr="hidden",or="show",sr="shown",rr="inserted",ar="click",lr="focusin",hr="focusout",cr="mouseenter",ur="mouseleave",dr={AUTO:"auto",TOP:"top",RIGHT:b()?"left":"right",BOTTOM:"bottom",LEFT:b()?"right":"left"},pr={allowList:Ds,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},fr={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class _r extends G{constructor(t,e){if(void 0===Dn)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return pr}static get DefaultType(){return fr}static get NAME(){return qs}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),F.off(this._element.closest(Ys),Xs,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=F.trigger(this._element,this.constructor.eventName(or)),e=(f(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),F.trigger(this._element,this.constructor.eventName(rr))),this._popper=this._createPopper(i),i.classList.add(Ks),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))F.on(t,"mouseover",_);const o=()=>{F.trigger(this._element,this.constructor.eventName(sr)),!1===this._isHovered&&this._leave(),this._isHovered=!1};this._queueCallback(o,this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(F.trigger(this._element,this.constructor.eventName(ir)).defaultPrevented)return;if(this._getTipElement().classList.remove(Ks),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))F.off(t,"mouseover",_);this._activeTrigger[tr]=!1,this._activeTrigger[Qs]=!1,this._activeTrigger[Js]=!1,this._isHovered=null;const t=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),F.trigger(this._element,this.constructor.eventName(nr)))};this._queueCallback(t,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(Vs,Ks),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=a(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(Vs),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Ws({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Gs]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Vs)}_isShown(){return this.tip&&this.tip.classList.contains(Ks)}_createPopper(t){const e=x(this._config.placement,[this,t,this._element]),i=dr[e.toUpperCase()];return In(this._element,t,this._getPopperConfig(i))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return x(t,[this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...x(this._config.popperConfig,[e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)F.on(this._element,this.constructor.eventName(ar),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if(e!==er){const t=e===Js?this.constructor.eventName(cr):this.constructor.eventName(lr),i=e===Js?this.constructor.eventName(ur):this.constructor.eventName(hr);F.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?Qs:Js]=!0,e._enter()})),F.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?Qs:Js]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},F.on(this._element.closest(Ys),Xs,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=U.getDataAttributes(this._element);for(const t of Object.keys(e))Us.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:u(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,i]of Object.entries(this._config))this.constructor.Default[e]!==i&&(t[e]=i);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=_r.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}w(_r);const mr="popover",gr=".popover-header",vr=".popover-body",yr={..._r.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},br={..._r.DefaultType,content:"(null|string|element|function)"};class wr extends _r{static get Default(){return yr}static get DefaultType(){return br}static get NAME(){return mr}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[gr]:this._getTitle(),[vr]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=wr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}w(wr);const xr="scrollspy",Lr=".bs.scrollspy",Tr=`activate${Lr}`,Pr=`click${Lr}`,Mr=`load${Lr}.data-api`,kr="dropdown-item",Cr="active",Er='[data-bs-spy="scroll"]',Ar="[href]",Sr=".nav, .list-group",Or=".nav-link",zr=`${Or}, .nav-item > ${Or}, .list-group-item`,Ir=".dropdown",Dr=".dropdown-toggle",Br={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Nr={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Zr extends G{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Br}static get DefaultType(){return Nr}static get NAME(){return xr}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=u(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(F.off(this._config.target,Pr),F.on(this._config.target,Pr,Ar,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:n,behavior:"smooth"});i.scrollTop=n}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},n=(this._rootElement||document.documentElement).scrollTop,o=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const s of t){if(!s.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(s));continue}const t=s.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(o&&t){if(i(s),!n)return}else o||t||i(s)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=X.find(Ar,this._config.target);for(const e of t){if(!e.hash||p(e))continue;const t=X.findOne(decodeURI(e.hash),this._element);d(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Cr),this._activateParents(t),F.trigger(this._element,Tr,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains(kr))X.findOne(Dr,t.closest(Ir)).classList.add(Cr);else for(const e of X.parents(t,Sr))for(const t of X.prev(e,zr))t.classList.add(Cr)}_clearActiveClass(t){t.classList.remove(Cr);const e=X.find(`${Ar}.${Cr}`,t);for(const t of e)t.classList.remove(Cr)}static jQueryInterface(t){return this.each((function(){const e=Zr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}F.on(window,Mr,(()=>{for(const t of X.find(Er))Zr.getOrCreateInstance(t)})),w(Zr);const jr="tab",$r=".bs.tab",Rr=`hide${$r}`,Fr=`hidden${$r}`,Hr=`show${$r}`,Wr=`shown${$r}`,qr=`click${$r}`,Ur=`keydown${$r}`,Vr=`load${$r}`,Kr="ArrowLeft",Gr="ArrowRight",Yr="ArrowUp",Xr="ArrowDown",Jr="Home",Qr="End",ta="active",ea="fade",ia="show",na="dropdown",oa=".dropdown-toggle",sa=".dropdown-menu",ra=`:not(${oa})`,aa='.list-group, .nav, [role="tablist"]',la=".nav-item, .list-group-item",ha='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',ca=`.nav-link${ra}, .list-group-item${ra}, [role="tab"]${ra}, ${ha}`,ua=`.${ta}[data-bs-toggle="tab"], .${ta}[data-bs-toggle="pill"], .${ta}[data-bs-toggle="list"]`;class da extends G{constructor(t){super(t),this._parent=this._element.closest(aa),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),F.on(this._element,Ur,(t=>this._keydown(t))))}static get NAME(){return jr}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?F.trigger(e,Rr,{relatedTarget:t}):null;F.trigger(t,Hr,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){if(!t)return;t.classList.add(ta),this._activate(X.getElementFromSelector(t));const i=()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),F.trigger(t,Wr,{relatedTarget:e})):t.classList.add(ia)};this._queueCallback(i,t,t.classList.contains(ea))}_deactivate(t,e){if(!t)return;t.classList.remove(ta),t.blur(),this._deactivate(X.getElementFromSelector(t));const i=()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),F.trigger(t,Fr,{relatedTarget:e})):t.classList.remove(ia)};this._queueCallback(i,t,t.classList.contains(ea))}_keydown(t){if(![Kr,Gr,Yr,Xr,Jr,Qr].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter((t=>!p(t)));let i;if([Jr,Qr].includes(t.key))i=e[t.key===Jr?0:e.length-1];else{const n=[Gr,Xr].includes(t.key);i=T(e,t.target,n,!0)}i&&(i.focus({preventScroll:!0}),da.getOrCreateInstance(i).show())}_getChildren(){return X.find(ca,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=X.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains(na))return;const n=(t,n)=>{const o=X.findOne(t,i);o&&o.classList.toggle(n,e)};n(oa,ta),n(sa,ia),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(ta)}_getInnerElement(t){return t.matches(ca)?t:X.findOne(ca,t)}_getOuterElement(t){return t.closest(la)||t}static jQueryInterface(t){return this.each((function(){const e=da.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}F.on(document,qr,ha,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),p(this)||da.getOrCreateInstance(this).show()})),F.on(window,Vr,(()=>{for(const t of X.find(ua))da.getOrCreateInstance(t)})),w(da);const pa="toast",fa=".bs.toast",_a=`mouseover${fa}`,ma=`mouseout${fa}`,ga=`focusin${fa}`,va=`focusout${fa}`,ya=`hide${fa}`,ba=`hidden${fa}`,wa=`show${fa}`,xa=`shown${fa}`,La="fade",Ta="hide",Pa="show",Ma="showing",ka={animation:"boolean",autohide:"boolean",delay:"number"},Ca={animation:!0,autohide:!0,delay:5e3};class Ea extends G{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Ca}static get DefaultType(){return ka}static get NAME(){return pa}show(){if(F.trigger(this._element,wa).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(La);const t=()=>{this._element.classList.remove(Ma),F.trigger(this._element,xa),this._maybeScheduleHide()};this._element.classList.remove(Ta),m(this._element),this._element.classList.add(Pa,Ma),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this.isShown())return;if(F.trigger(this._element,ya).defaultPrevented)return;const t=()=>{this._element.classList.add(Ta),this._element.classList.remove(Ma,Pa),F.trigger(this._element,ba)};this._element.classList.add(Ma),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Pa),super.dispose()}isShown(){return this._element.classList.contains(Pa)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){F.on(this._element,_a,(t=>this._onInteraction(t,!0))),F.on(this._element,ma,(t=>this._onInteraction(t,!1))),F.on(this._element,ga,(t=>this._onInteraction(t,!0))),F.on(this._element,va,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Ea.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return J(Ea),w(Ea),{Alert:st,Button:ct,Carousel:re,Collapse:Me,Dropdown:bo,Modal:ds,Offcanvas:Is,Popover:wr,ScrollSpy:Zr,Tab:da,Toast:Ea,Tooltip:_r}}());const ui=[];function di(t,e=l){let i=null;const n=new Set;function o(e){if(P(t,e)&&(t=e,i)){const e=!ui.length;for(const e of n)e[1](),ui.push(e,t);if(e){for(let t=0;t<ui.length;t+=2)ui[t][0](ui[t+1]);ui.length=0}}}function s(e){o(e(t))}return{set:o,update:s,subscribe:function(r,a=l){const h=[r,a];return n.add(h),1===n.size&&(i=e(o,s)||l),r(t),()=>{n.delete(h),0===n.size&&i&&(i(),i=null)}}}}function pi(t){let e;return ei(t,(t=>e=t))(),e}
+/*!
+ * escape-html
+ * Copyright(c) 2012-2013 TJ Holowaychuk
+ * Copyright(c) 2015 Andreas Lubbe
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
+ * MIT Licensed
+ */var fi,_i;var mi=function(){if(_i)return fi;_i=1;var t=/["'&<>]/;return fi=function(e){var i,n=""+e,o=t.exec(n);if(!o)return n;var s="",r=0,a=0;for(r=o.index;r<n.length;r++){switch(n.charCodeAt(r)){case 34:i=""";break;case 38:i="&";break;case 39:i="'";break;case 60:i="<";break;case 62:i=">";break;default:continue}a!==r&&(s+=n.substring(a,r)),a=r+1,s+=i}return a!==r?s+n.substring(a,r):s},fi}(),gi=li(mi);function vi(t,e){return"N"===t?"node":"W"===t?"way":"R"===t?"relation":e&&("T"===t||"I"===t)?"way":""}function yi(t){if(!t.osm_type)return"";var e=vi(t.osm_type,!1);return e?'<a href="https://www.openstreetmap.org/'+e+"/"+t.osm_id+'">'+e+" "+t.osm_id+"</a>":""}function bi(t){return(" "===t[0]?"*":"")+gi(t)}function wi(){return["Continent / Sea","","","Country","","State","Region","","County","","City","","Town / Borough","Village / Suburb","Neighbourhood","Locality","Major Street","Minor Street","Building"]}const xi=di(),Li=di(),Ti=di(),Pi=di(),Mi=di(),ki=Nominatim_Config.Reverse_Only?"reverse":"search",Ci=[ki,"reverse","details","deletable","polygons","status","about"];function Ei(t,e){if(void 0===t)t=window.location.pathname.replace(".html","").replace(/^.*\//,""),Ci.includes(t)||(t=ki),e=new URLSearchParams(window.location.search);else{Ci.includes(t)||(t=ki),void 0===e&&(e=new URLSearchParams);let i=e.toString();i&&(i="?"+i);let n=t+".html"+i;window.location.protocol.match(/^http/)?window.history.pushState([],"",n):window.location.href=n}if("search"===t&&e.has("q")){const i=function(t){if(!t)return;const e=t.match(/\/(relation|way|node)\/(-?\d+)/)||t.match(/^([nwr])(-?\d+)$/i);return e?[e[1][0].toUpperCase(),Number(e[2])]:void 0}(e.get("q"));i instanceof Array&&(t="details",(e=new URLSearchParams).set("osmtype",i[0]),e.set("osmid",i[1]))}Mi.set({tab:t,params:e}),Ti.set(null),Pi.set(null)}var Ai=ve('<footer class="svelte-1f2bd8l"><p class="disclaimer svelte-1f2bd8l">Addresses and postcodes are approximate.\n Blue circle is search result,\n smaller red circle is search position (reverse geocoding).</p> <p class="copyright svelte-1f2bd8l">© <a href="https://osm.org/copyright">OpenStreetMap</a> contributors</p></footer>');function Si(t){var e=document.getElementById("loading");e&&(e.style.display="start"===t?"block":null)}async function Oi(t,e,i){var n=function(t,e){1===e.dedupe&&delete e.dedupe;return function(t,e){for(var i=Object.keys(e),n=0;n<i.length;n+=1)t[i[n]]=e[i[n]]}(e,Nominatim_Config.Nominatim_API_Endpoint_Params),Di(t)+"?"+Object.keys(function(t){for(var e=Object.keys(t),i=0;i<e.length;i+=1){var n=t[e[i]];void 0!==n&&""!==n&&null!==n||delete t[e[i]]}return t}(e)).map((t=>encodeURIComponent(t)+"="+encodeURIComponent(e[t]))).join("&")}(t,e);const o=new URLSearchParams(window.location.search).get("mock_api_error");Si("start"),"status"!==t&&Ti.set(null);try{await fetch(n,{headers:Nominatim_Config.Nominatim_API_Endpoint_Headers||{}}).then((async t=>{if((t.status>=200&&t.status<300||404===t.status)&&"fetch"!==o){var e;try{e="parse"===o?JSON.parse("{"):await t.json()}catch(t){return void Pi.set(`Error parsing JSON data from ${n} (${t})`)}return e}Pi.set(`Error fetching data from ${n} (${t.statusText})`)})).then((t=>{t&&(t.error&&Pi.set(t.error.message),i(t)),Si("finish")}))}catch(t){Pi.set(`Error fetching data from ${n} (${t})`),Si("finish")}"status"!==t&&Ti.set(n)}var zi={};async function Ii(t,e){if(window.location.protocol.match(/^http/))if(zi[t])e.innerHTML=zi[t];else try{await fetch(t).then((t=>t.text())).then((i=>{i=i.replace("Nominatim_API_Endpoint",Di()),e.innerHTML=i,zi[t]=i}))}catch(i){e.innerHTML=`Error fetching content from ${t} (${i})`}else e.innerHTML=`Cannot display data from ${t} here. Browser security prevents loading content from file:// URLs.`}function Di(t){var e=Nominatim_Config.Nominatim_API_Endpoint;return"function"==typeof e?e(t):t?e+t+".php":e}function Bi(t){document.title=[t,Nominatim_Config.Page_Title].filter((t=>t&&t.length>1)).join(" | ")}var Ni=ve("<a><!></a>");function Zi(t,e){le(e,!1);let i=ri(e,"page",8),n=ri(e,"params_hash",24,(()=>({}))),o=ri(e,"extra_classes",8,""),s=E(i()+".html");st((()=>(ce(n()),ce(i()))),(()=>{let t=new URLSearchParams(n()).toString();S(s,i()+".html"+(t?"?":"")+t)})),rt(),Qe();var r=Ni();Be(q(r),e,"default",{}),lt((()=>{$e(r,"href",oe(s)),Fe(r,o())})),fe("click",r,Je(Xe((function(){Ei(i(),new URLSearchParams(n()))})))),we(t,r),he()}var ji=ve("<a><!></a>");var $i=["second","minute","hour","day","week","month","year"];var Ri=["秒","分钟","小时","天","周","个月","年"];var Fi={},Hi=function(t,e){Fi[t]=e},Wi=[60,60,24,7,365/7/12,12];function qi(t,e){var i;return(+new Date-+((i=t)instanceof Date?i:!isNaN(i)||/^\d+$/.test(i)?new Date(parseInt(i)):(i=(i||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(i))))/1e3}var Ui=function(t,e,i){return function(t,e){for(var i=t<0?1:0,n=t=Math.abs(t),o=0;t>=Wi[o]&&o<Wi.length;o++)t/=Wi[o];return(t=Math.floor(t))>(0==(o*=2)?9:1)&&(o+=1),e(t,o,n)[i].replace("%s",t.toString())}(qi(t),function(t){return Fi[t]||Fi.en_US}(e))};Hi("en_US",(function(t,e){if(0===e)return["just now","right now"];var i=$i[Math.floor(e/2)];return t>1&&(i+="s"),[t+" "+i+" ago","in "+t+" "+i]})),Hi("zh_CN",(function(t,e){if(0===e)return["刚刚","片刻后"];var i=Ri[~~(e/2)];return[t+" "+i+"前",t+" "+i+"后"]}));var Vi=ve('<div id="api-request">Data from <a>API request</a> <span id="api-request-debug">(<a>debug output</a>)</span></div>'),Ki=ve('Data last updated: <abbr id="data-date"> </abbr>',1),Gi=ve('<div id="last-updated" class="container-fluid py-2 px-4 mb-3 svelte-1i1228w"><div id="loading" class="py-2 px-4 svelte-1i1228w"><div class="spinner-border spinner-border-sm text-primary me-1" role="status"></div> Loading data from API ...</div> <div class="row"><div class="col-sm-6"><!></div> <div class="col-sm-6 text-end"><!> (<!>)</div></div></div>');var Yi=ve('<div id="error" class="container-fluid alert-danger py-3 px-4"> <button type="button" class="btn-close float-end" aria-label="dismiss"></button></div>');var Xi=ve('<img alt="logo" id="theme-logo" src="theme/logo.png" class="svelte-1q88nx"> <h1 class="svelte-1q88nx"> </h1>',1),Ji=ve('<li class="nav-item svelte-1q88nx"><!></li>'),Qi=ve('<header class="container-fluid"><nav class="navbar navbar-expand-sm navbar-light"><div class="container-fluid"><div class="navbar-brand svelte-1q88nx"><!></div> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button> <div class="collapse navbar-collapse" id="navbarSupportedContent"><ul class="navbar-nav me-auto"><!> <li class="nav-item svelte-1q88nx"><!></li> <li class="nav-item svelte-1q88nx"><!></li></ul></div> <ul class="navbar-nav"><li class="nav-item svelte-1q88nx"><!></li></ul></div></nav></header> <section class="page-title-section svelte-1q88nx"><h2> </h2></section> <section class="search-section svelte-1q88nx"><!></section> <!> <!>',1);function tn(t,e){le(e,!1);const i=oi(),n=()=>ni(Mi,"$page",i),o=E(),s=E(),r=E();let a=E(),l=E();xi.subscribe((t=>{t&&t.on("move",(function(){S(a,t.getCenter().lat.toFixed(5)),S(l,t.getCenter().lng.toFixed(5))}))})),st((()=>n()),(()=>{S(o,n().tab)})),st((()=>{}),(()=>{S(s,Nominatim_Config.Page_Title)})),st((()=>{}),(()=>{S(r,Nominatim_Config.Reverse_Only)})),rt(),Qe();var h=Qi(),c=U(h),u=q(c),d=q(u),p=q(d),f=q(p),_=G((()=>oe(r)?"reverse":"search"));Zi(f,{get page(){return oe(_)},children:(t,e)=>{var i=Xi(),n=q(V(U(i),2));lt((()=>Te(n,oe(s)))),we(t,i)},$$slots:{default:!0}});var m=V(p,4),g=q(m),v=q(g);ke(v,(()=>!oe(r)),(t=>{var e=Ji(),i=q(e),n=G((()=>`nav-link ${("search"===oe(o)?"active":"")??""}`));Zi(i,{page:"search",get extra_classes(){return oe(n)},children:(t,e)=>{we(t,ye("Search"))},$$slots:{default:!0}}),we(t,e)}));var y=V(v,2),b=q(y),w=G((()=>`nav-link ${("reverse"===oe(o)?"active":"")??""}`));!function(t,e){le(e,!1);let i=ri(e,"lat",8,null),n=ri(e,"lon",8,null),o=ri(e,"zoom",8,null),s=ri(e,"extra_classes",8,""),r=E(new URLSearchParams),a=E("reverse.html");st((()=>(ce(i()),ce(n()),ce(o()))),(()=>{let t=new URLSearchParams;i()&&n()&&(t.set("lat",i()),t.set("lon",n()),o()&&t.set("zoom",o())),S(r,t)})),st((()=>oe(r)),(()=>{let t=oe(r).toString();S(a,"reverse.html"+(t?"?":"")+t)})),rt(),Qe();var l=ji();Be(q(l),e,"default",{}),lt((()=>{$e(l,"href",oe(a)),Fe(l,s())})),fe("click",l,Je(Xe((()=>Ei("reverse",oe(r)))))),we(t,l),he()}(b,{get lat(){return oe(a)},get lon(){return oe(l)},get extra_classes(){return oe(w)},children:(t,e)=>{we(t,ye("Reverse"))},$$slots:{default:!0}});var x=q(V(y,2)),L=G((()=>`nav-link ${("details"===oe(o)?"active":"")??""}`));Zi(x,{page:"details",get extra_classes(){return oe(L)},children:(t,e)=>{we(t,ye("Search By ID"))},$$slots:{default:!0}});var T=q(V(m,2)),P=q(T),M=G((()=>`nav-link ${("about"===oe(o)?"active":"")??""}`));Zi(P,{page:"about",get extra_classes(){return oe(M)},children:(t,e)=>{we(t,ye("About & Help"))},$$slots:{default:!0}});var k=V(c,2),C=q(k),A=q(C),O=V(k,2);Be(q(O),e,"default",{});var z=V(O,2);!function(t,e){le(e,!1);let i=E();function n(){Pi.set(null)}Pi.subscribe((t=>{S(i,t)})),Qe();var o=be();ke(U(o),(()=>oe(i)),(t=>{var e=Yi(),o=q(e),s=V(o);lt((()=>Te(o,`${oe(i)??""} `))),fe("click",s,n),we(t,e)})),we(t,o),he()}(z,{}),function(t,e){le(e,!1);let i=E(),n=E(),o=!1;Ti.subscribe((t=>{S(n,t),oe(n)&&(S(n,new URL(oe(n),window.location.origin)),oe(n).searchParams.delete("polygon_geojson"),S(n,oe(n).toString())),o||oe(i)||(o=!0,Oi("status",{format:"json"},(function(t){S(i,t.data_updated),o=!1})))})),Qe();var s=Gi(),r=V(q(s),2),a=q(r);ke(q(a),(()=>oe(n)),(t=>{var e=Vi(),i=V(q(e)),o=V(i,2),s=V(q(o));lt((()=>{$e(i,"href",oe(n)),$e(s,"href",`${oe(n)??""}&debug=1`)})),we(t,e)}));var l=q(V(a,2));ke(l,(()=>oe(i)),(t=>{var e=Ki(),n=V(U(e)),o=q(n);lt((()=>Te(o,Ui(new Date(oe(i)))))),lt((()=>$e(n,"title",`${oe(i)??""} (UTC timezone)`))),we(t,e)})),Zi(V(l,2),{page:"status",children:(t,e)=>{we(t,ye("Details"))},$$slots:{default:!0}}),we(t,s),he()}(V(z,2),{}),lt((()=>Te(A,oe(o)))),we(t,h),he()}var en=ve('<form class="form-inline" role="search" accept-charset="UTF-8" action=""><div class="row g-2"><!></div></form>');function nn(t,e){le(e,!1);let i=ri(e,"page",8);Qe();var n=en(),o=q(n);Be(q(o),e,"default",{}),fe("submit",n,Je((function(t){let e=t.target,n=!0;Array.prototype.slice.call(e.elements).forEach((function(t){(function(t){return!("hidden"===t.type&&t.value.length&&t.pattern&&!t.value.match(t.pattern))&&t.checkValidity()})(t)||(alert("Invalid input in "+t.name),n=!1)})),n&&Ei(i(),function(t){var e=new URLSearchParams;return Array.prototype.slice.call(t.elements).forEach((function(t){!t.name||t.disabled||["submit","button"].indexOf(t.type)>-1||["checkbox","radio"].indexOf(t.type)>-1&&!t.checked||void 0!==t.value&&""!==t.value&&("dedupe"!==t.name||1!==t.value&&"1"!==t.value)&&e.set(t.name,t.value)})),e}(e))}))),we(t,n),he()}var on=ve('<div class="col-auto"><input id="q" name="q" type="text" class="form-control form-control-sm svelte-1u2ltgo" placeholder="Search"></div> <div class="col-auto"><button type="submit" class="btn btn-primary btn-sm mx-1">Search</button> <input type="hidden" name="viewbox"> <input type="hidden" name="dedupe"> <input type="hidden" name="bounded"> <input type="hidden" name="accept-language"> <input type="hidden" name="countrycodes"> <input type="hidden" name="limit"> <input type="hidden" name="polygon_threshold"> <input type="hidden" name="layer"></div>',1),sn=ve('<div class="col-auto"><input name="street" type="text" class="form-control form-control-sm me-1" placeholder="House number/Street"></div> <div class="col-auto"><input name="city" type="text" class="form-control form-control-sm me-1" placeholder="City"></div> <div class="col-auto"><input id="county" name="county" type="text" class="form-control form-control-sm me-1" placeholder="County"></div> <div class="col-auto"><input name="state" type="text" class="form-control form-control-sm me-1" placeholder="State"></div> <div class="col-auto"><input name="country" type="text" class="form-control form-control-sm me-1" placeholder="Country"></div> <div class="col-auto"><input name="postalcode" type="text" class="form-control form-control-sm me-1" placeholder="Postal Code"></div> <div class="col-auto"><button type="submit" class="btn btn-primary btn-sm">Search</button> <input type="hidden" name="viewbox"> <input type="hidden" name="dedupe"> <input type="hidden" name="bounded"> <input type="hidden" name="accept-language"> <input type="hidden" name="countrycodes"> <input type="hidden" name="limit"> <input type="hidden" name="polygon_threshold"> <input type="hidden" name="layer"></div>',1),rn=ve('<ul class="nav nav-tabs svelte-1u2ltgo"><li class="nav-item"><a class="nav-link svelte-1u2ltgo" data-bs-toggle="tab" href="#simple">Simple</a></li> <li class="nav-item"><a class="nav-link svelte-1u2ltgo" data-bs-toggle="tab" href="#structured">Structured</a></li></ul> <div class="tab-content py-2"><div class="tab-pane" id="simple" role="tabpanel"><!></div> <div class="tab-pane" id="structured" role="tabpanel"><!></div></div> <details id="searchAdvancedOptions" class="svelte-1u2ltgo"><summary><small>Advanced options</small></summary> <ul class="svelte-1u2ltgo"><li class="svelte-1u2ltgo"><div class="form-check form-check-inline"><label class="form-check-label svelte-1u2ltgo" for="use_viewbox">apply viewbox</label> <input type="checkbox" class="form-check-input api-param-setting" id="use_viewbox"></div></li> <li class="svelte-1u2ltgo"><div class="form-check form-check-inline"><label class="form-check-label svelte-1u2ltgo" for="option_bounded">bounded to viewbox</label> <input type="checkbox" class="form-check-input api-param-setting" id="option_bounded"></div></li> <li class="svelte-1u2ltgo"><div class="form-check form-check-inline"><label class="form-check-label svelte-1u2ltgo" for="option_dedupe">deduplicate results</label> <input type="checkbox" class="form-check-input api-param-setting" id="option_dedupe"></div></li> <li class="svelte-1u2ltgo"><label for="option_limit" class="svelte-1u2ltgo">Maximum number of results</label> <input type="number" class="form-control form-control-sm d-inline w-auto api-param-setting" data-api-param="limit" id="option_limit" min="1" max="50"></li> <li class="svelte-1u2ltgo"><label for="option_polygon_threshold" class="svelte-1u2ltgo">Polygon simplification</label> <input type="number" class="form-control form-control-sm d-inline w-auto api-param-setting" data-api-param="polygon_threshold" id="option_polygon_threshold" min="0.0" max="1.0" step="0.001"></li> <li class="svelte-1u2ltgo"><label for="accept_lang" class="svelte-1u2ltgo">Languages</label> <input type="text" placeholder="e.g. en,zh-Hant" class="form-control form-control-sm d-inline w-auto api-param-setting" data-api-param="accept-language" id="accept_lang" size="15"></li> <li class="svelte-1u2ltgo"><label for="option_ccode" class="svelte-1u2ltgo">Country Codes</label> <input type="text" placeholder="e.g. de,gb" class="form-control form-control-sm d-inline w-auto api-param-setting" data-api-param="countrycodes" id="option_ccode" size="15"></li> <li class="svelte-1u2ltgo"><label for="option_layer" class="svelte-1u2ltgo">Layer</label> <input id="option_layer" name="layer" placeholder="e.g. address,poi,railway,natural,manmade" data-api-param="layer" class="form-control form-control-sm d-inline w-auto api-param-setting"></li></ul></details>',1);function an(t,e){le(e,!1);let i=ri(e,"bStructuredSearch",8,!1),n=ri(e,"api_request_params",24,(()=>({}))),o=E();function s(t){let e=document.getElementById("use_viewbox");e&&e.checked?S(o,function(t){var e=t.getBounds(),i=e.getWest(),n=e.getEast();return n-i>=360&&(i=t.getCenter().lng-179.999,n=t.getCenter().lng+179.999),n=L.latLng(77,n).wrap().lng,[(i=L.latLng(77,i).wrap().lng).toFixed(5),e.getNorth().toFixed(5),n.toFixed(5),e.getSouth().toFixed(5)].join(",")}(t)):S(o,"")}function r(t){let e=t.wrapLatLng(t.getCenter());e.lat.toFixed(5),e.lng.toFixed(5)}function a(t){document.querySelector("input[name="+t.target.dataset.apiParam+"]").value=t.target.value}xi.subscribe((t=>{t&&(t.on("move",(function(){s(t),r(t)})),t.on("load",(function(){s(t),r(t)})))})),Qe();var l=rn(),h=U(l),c=q(h),u=q(c),d=q(V(c,2)),p=V(h,2),f=q(p);nn(q(f),{page:"search",children:(t,e)=>{var i=on(),s=U(i),r=q(s),a=V(s,2),l=V(q(a),2),h=V(l,2),c=V(h,2),u=V(c,2),d=V(u,2);$e(d,"pattern","^[a-zA-Z]{2}(,[a-zA-Z]{2})*$");var p=V(d,2),f=V(p,2),_=V(f,2);lt((()=>{Ze(r,n().q||""),Ze(l,oe(o)||""),Ze(h,0===n().dedupe?0:1),Ze(c,n().bounded?1:""),Ze(u,n()["accept-language"]||""),Ze(d,n().countrycodes||""),Ze(p,n().limit||""),Ze(f,n().polygon_threshold||""),Ze(_,n().layer||"")})),we(t,i)},$$slots:{default:!0}});var _=V(f,2);nn(q(_),{page:"search",children:(t,e)=>{var i=sn(),s=U(i),r=q(s),a=V(s,2),l=q(a),h=V(a,2),c=q(h),u=V(h,2),d=q(u),p=V(u,2),f=q(p),_=V(p,2),m=q(_),g=V(_,2),v=V(q(g),2),y=V(v,2),b=V(y,2),w=V(b,2),x=V(w,2);$e(x,"pattern","^[a-zA-Z]{2}(,[a-zA-Z]{2})*$");var L=V(x,2),T=V(L,2),P=V(T,2);lt((()=>{Ze(r,n().street||""),Ze(l,n().city||""),Ze(c,n().county||""),Ze(d,n().state||""),Ze(f,n().country||""),Ze(m,n().postalcode||""),Ze(v,oe(o)||""),Ze(y,0===n().dedupe?0:1),Ze(b,n().bounded?1:""),Ze(w,n()["accept-language"]||""),Ze(x,n().countrycodes||""),Ze(L,n().limit||""),Ze(T,n().polygon_threshold||""),Ze(P,n().layer||"")})),we(t,i)},$$slots:{default:!0}});var m=V(p,2),g=V(q(m),2),v=q(g),y=q(v),b=V(q(y),2),w=V(v,2),x=q(w),T=V(q(x),2),P=V(w,2),M=q(P),k=V(q(M),2),C=V(P,2),A=V(q(C),2),O=V(C,2),z=V(q(O),2),I=V(O,2),D=V(q(I),2),B=V(I,2),N=V(q(B),2);$e(N,"pattern","^[a-zA-Z]{2}(,[a-zA-Z]{2})*$");var Z=V(B,2),j=V(q(Z),2);lt((()=>{He(u,"active",!i()),He(d,"active",i()),He(f,"active",!i()),He(_,"active",i()),je(b,n().viewbox),je(T,!!n().bounded),je(k,0===n().dedupe?0:1),Ze(A,n().limit||""),Ze(z,n().polygon_threshold||""),Ze(D,n()["accept-language"]||""),Ze(N,n().countrycodes||""),Ze(j,n().layer||"")})),fe("change",b,(function(){let t=pi(xi);t&&s(t)})),fe("change",T,(function(t){document.querySelector("input[name=bounded]").value=t.target.checked?1:""})),fe("change",k,(function(t){document.querySelector("input[name=dedupe]").value=t.target.checked?1:0})),fe("change",A,a),fe("change",z,a),fe("change",D,a),fe("change",N,a),fe("change",j,a),we(t,l),he()}var ln=ve("<a><!></a>");function hn(t,e){le(e,!1);let i=ri(e,"extra_classes",8,""),n=ri(e,"feature",8,null),o=E(new URLSearchParams),s=E("details.html");st((()=>ce(n())),(()=>{let t=new URLSearchParams;var e;null!==n()&&(n().osm_type?(1===n().osm_type.length?t.set("osmtype",n().osm_type):t.set("osmtype","node"===(e=n().osm_type)?"N":"way"===e?"W":"relation"===e?"R":""),t.set("osmid",n().osm_id),n().class?t.set("class",n().class):n().category&&t.set("class",n().category)):n().place_id&&t.set("place_id",n().place_id)),S(o,t)})),st((()=>oe(o)),(()=>{let t=oe(o).toString();S(s,"details.html"+(t?"?":"")+t)})),rt(),Qe();var r=ln();Be(q(r),e,"default",{}),lt((()=>{$e(r,"href",oe(s)),Fe(r,i())})),fe("click",r,Je(Xe((function(){Ei("details",oe(o))})))),we(t,r),he()}var cn=ve('<div id="welcome"></div>');var un=ve('<img class="mapicon svelte-180cawe">');function dn(t,e){le(e,!1);const i=E(),n=E(),o=E();let s=ri(e,"aPlace",8);st((()=>ce(s())),(()=>{var t,e;S(i,(t=s().category,e=s().type,{"boundary:administrative":"poi_boundary_administrative","place:city":"poi_place_city","place:town":"poi_place_town","place:village":"poi_place_village","place:hamlet":"poi_place_village","place:suburb":"poi_place_village","place:locality":"poi_place_village","place:airport":"transport_airport2","aeroway:aerodrome":"transport_airport2","railway:station":"transport_train_station2","amenity:place_of_worship":"place_of_worship_unknown3","amenity:pub":"food_pub","amenity:bar":"food_bar","amenity:university":"education_university","tourism:museum":"tourist_museum","amenity:arts_centre":"tourist_art_gallery2","tourism:zoo":"tourist_zoo","tourism:theme_park":"poi_point_of_interest","tourism:attraction":"poi_point_of_interest","leisure:golf_course":"sport_golf","historic:castle":"tourist_castle","amenity:hospital":"health_hospital","amenity:school":"education_school","amenity:theatre":"tourist_theatre","amenity:library":"amenity_library","amenity:fire_station":"amenity_firestation3","amenity:police":"amenity_police2","amenity:bank":"money_bank2","amenity:post_office":"amenity_post_office","tourism:hotel":"accommodation_hotel2","amenity:cinema":"tourist_cinema","tourism:artwork":"tourist_art_gallery2","historic:archaeological_site":"tourist_archaeological2","amenity:doctors":"health_doctors","leisure:sports_centre":"sport_leisure_centre","leisure:swimming_pool":"sport_swimming_outdoor","shop:supermarket":"shopping_supermarket","shop:convenience":"shopping_convenience","amenity:restaurant":"food_restaurant","amenity:fast_food":"food_fastfood","amenity:cafe":"food_cafe","tourism:guest_house":"accommodation_bed_and_breakfast","amenity:pharmacy":"health_pharmacy_dispensing","amenity:fuel":"transport_fuel","natural:peak":"poi_peak","natural:wood":"landuse_coniferous_and_deciduous","shop:bicycle":"shopping_bicycle","shop:clothes":"shopping_clothes","shop:hairdresser":"shopping_hairdresser","shop:doityourself":"shopping_diy","shop:estate_agent":"shopping_estateagent2","shop:car":"shopping_car","shop:garden_centre":"shopping_garden_centre","shop:car_repair":"shopping_car_repair","shop:bakery":"shopping_bakery","shop:butcher":"shopping_butcher","shop:apparel":"shopping_clothes","shop:laundry":"shopping_laundrette","shop:beverages":"shopping_alcohol","shop:alcohol":"shopping_alcohol","shop:optician":"health_opticians","shop:chemist":"health_pharmacy","shop:gallery":"tourist_art_gallery2","shop:jewelry":"shopping_jewelry","tourism:information":"amenity_information","historic:ruins":"tourist_ruin","amenity:college":"education_school","historic:monument":"tourist_monument","historic:memorial":"tourist_monument","historic:mine":"poi_mine","tourism:caravan_site":"accommodation_caravan_park","amenity:bus_station":"transport_bus_station","amenity:atm":"money_atm2","tourism:viewpoint":"tourist_view_point","tourism:guesthouse":"accommodation_bed_and_breakfast","railway:tram":"transport_tram_stop","amenity:courthouse":"amenity_court","amenity:recycling":"amenity_recycling","amenity:dentist":"health_dentist","natural:beach":"tourist_beach","railway:tram_stop":"transport_tram_stop","amenity:prison":"amenity_prison","highway:bus_stop":"transport_bus_stop2"}[t+":"+e]))})),st((()=>ce(s())),(()=>{S(n,"icon for "+s().category+" "+s().type)})),st((()=>oe(i)),(()=>{S(o,Nominatim_Config.Images_Base_Url+oe(i)+".p.20.png")})),rt(),Qe();var r=be();ke(U(r),(()=>oe(i)),(t=>{var e=un();lt((()=>{$e(e,"src",oe(o)),$e(e,"alt",oe(n))})),we(t,e)})),we(t,r),he()}var pn=ve('<div class="result svelte-358hab" role="listitem"><div style="float:right"><!></div> <span class="name"> </span> <span class="type svelte-358hab"> </span> <p class="coords svelte-358hab"> </p> <!></div>'),fn=ve('<div class="more svelte-358hab"><a class="btn btn-primary">Search for more results</a></div>'),_n=ve('<div id="searchresults" role="list"><!> <!></div>'),mn=ve('<div id="intro" class="sidebar">Search for coordinates or click anywhere on the map.</div>'),gn=ve('<div class="noresults svelte-358hab">No search results found</div>');function vn(t,e){le(e,!1);let i=ri(e,"reverse_search",8,!1),n=ri(e,"current_result",12,null),o=E(),s=E(),r=E();function a(t){let e=t.target;e.className.match("result")||(e=e.parentElement);let i=Number(e.dataset.position);n(oe(o)[i]),S(s,i)}Li.subscribe((t=>{if(!t)return;S(o,t),S(s,0),n(oe(o)[0]);let e=new URLSearchParams(window.location.search),i=t;var a=[];e.has("exclude_place_ids")&&(a=e.get("exclude_place_ids").split(","));for(var l=0;l<i.length;l+=1)a.push(i[l].place_id);var h=new URLSearchParams(window.location.search);h.set("exclude_place_ids",a.join(",")),S(r,"?"+h.toString())})),Qe();var l=be();ke(U(l),(()=>oe(o)&&oe(o).length>0),(t=>{var e=_n(),n=q(e);Ae(n,1,(()=>oe(o)),Ee,((t,e,i)=>{var n=pn();$e(n,"data-position",i);var o=q(n);dn(q(o),{get aPlace(){return oe(e)}});var r=V(o,2),l=q(r),h=V(r,2),c=q(h);lt((()=>Te(c,function(t){if(t.label)return t.label;function e(t){return t&&t[0].toUpperCase()+t.slice(1)}return t.type&&"yes"===t.type&&t.category?e(t.category.replace(/_/g," ")):t.type?e(t.type.replace(/_/g," ")):""}(oe(e)))));var u=V(h,2),d=q(u);hn(V(u,2),{extra_classes:"btn btn-outline-secondary btn-sm",get feature(){return oe(e)},children:(t,e)=>{we(t,ye("details"))},$$slots:{default:!0}}),lt((()=>{He(n,"highlight",i===oe(s)),Te(l,oe(e).display_name),Te(d,`${oe(e).lat??""},${oe(e).lon??""}`)})),fe("click",n,Xe(a)),fe("keypress",n,Xe(a)),we(t,n)})),ke(V(n,2),(()=>oe(r)&&!i()),(t=>{var e=fn(),i=q(e);lt((()=>$e(i,"href",oe(r)))),we(t,e)})),we(t,e)}),(t=>{var e=be();ke(U(e),(()=>oe(o)),(t=>{var e=be();ke(U(e),i,(t=>{we(t,mn())}),(t=>{we(t,gn())})),we(t,e)}),(t=>{!function(t,e){le(e,!1),ai((()=>{Ii("theme/welcome.html",document.getElementById("welcome"))})),Qe(),we(t,cn()),he()}(t,{})}),!0),we(t,e)})),we(t,l),he()}var yn,bn={exports:{}};
/* @preserve
- * Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com
- * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade
- */function en(){return Qe||(Qe=1,function(t){var e="1.7.1";function n(t){var e,n,i,o;for(n=1,i=arguments.length;n<i;n++)for(e in o=arguments[n])t[e]=o[e];return t}var i=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function o(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)}}var s=0;function r(t){return t._leaflet_id=t._leaflet_id||++s,t._leaflet_id}function a(t,e,n){var i,o,s,r;return r=function(){i=!1,o&&(s.apply(n,o),o=!1)},s=function(){i?o=arguments:(t.apply(n,arguments),setTimeout(r,e),i=!0)},s}function l(t,e,n){var i=e[1],o=e[0],s=i-o;return t===i&&n?t:((t-o)%s+s)%s+o}function c(){return!1}function h(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 d(t){return u(t).split(/\s+/)}function p(t,e){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?i(t.options):{}),e)t.options[n]=e[n];return t.options}function m(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("&")}var f=/\{ *([\w_-]+) *\}/g;function _(t,e){return t.replace(f,(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}))}var g=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function v(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var y="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function x(t){var e=+new Date,n=Math.max(0,16-(e-w));return w=e+n,window.setTimeout(t,n)}var $=window.requestAnimationFrame||b("RequestAnimationFrame")||x,T=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function P(t,e,n){if(!n||$!==x)return $.call(window,o(t,e));t.call(e)}function E(t){t&&T.call(window,t)}var k={extend:n,create:i,bind:o,lastId:s,stamp:r,throttle:a,wrapNum:l,falseFn:c,formatNum:h,trim:u,splitWords:d,setOptions:p,getParamString:m,template:_,isArray:g,indexOf:v,emptyImageUrl:y,requestFn:$,cancelFn:T,requestAnimFrame:P,cancelAnimFrame:E};function M(){}function C(t){if("undefined"!=typeof L&&L&&L.Mixin){t=g(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)}}M.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,s=i(o);for(var r in s.constructor=e,e.prototype=s,this)Object.prototype.hasOwnProperty.call(this,r)&&"prototype"!==r&&"__super__"!==r&&(e[r]=this[r]);return t.statics&&(n(e,t.statics),delete t.statics),t.includes&&(C(t.includes),n.apply(null,[s].concat(t.includes)),delete t.includes),s.options&&(t.options=n(i(s.options),t.options)),n(s,t),s._initHooks=[],s.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=s._initHooks.length;t<e;t++)s._initHooks[t].call(this)}},e},M.include=function(t){return n(this.prototype,t),this},M.mergeOptions=function(t){return n(this.prototype.options,t),this},M.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 S={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else for(var o=0,s=(t=d(t)).length;o<s;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 for(var o=0,s=(t=d(t)).length;o<s;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},s=i,r=0,a=s.length;r<a;r++)if(s[r].fn===e&&s[r].ctx===n)return;s.push(o)},_off:function(t,e,n){var i,o,s;if(this._events&&(i=this._events[t]))if(e){if(n===this&&(n=void 0),i)for(o=0,s=i.length;o<s;o++){var r=i[o];if(r.ctx===n&&r.fn===e)return r.fn=c,this._firingCount&&(this._events[t]=i=i.slice()),void i.splice(o,1)}}else{for(o=0,s=i.length;o<s;o++)i[o].fn=c;delete this._events[t]}},fire:function(t,e,i){if(!this.listens(t,i))return this;var o=n({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var s=this._events[t];if(s){this._firingCount=this._firingCount+1||1;for(var r=0,a=s.length;r<a;r++){var l=s[r];l.fn.call(l.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,n){if("object"==typeof t){for(var i in t)this.once(i,t[i],e);return this}var s=o((function(){this.off(t,e,n).off(t,s,n)}),this);return this.on(t,e,n).on(t,s,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[r(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[r(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,n({layer:t.target,propagatedFrom:t.target},t),!0)}};S.addEventListener=S.on,S.removeEventListener=S.clearAllEventListeners=S.off,S.addOneTimeEventListener=S.once,S.fireEvent=S.fire,S.hasEventListeners=S.listens;var A=M.extend(S);function z(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var O=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function I(t,e,n){return t instanceof z?t:g(t)?new z(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new z(t.x,t.y):new z(t,e,n)}function N(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function B(t,e){return!t||t instanceof N?t:new N(t,e)}function D(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function Z(t,e){return t instanceof D?t:new D(t,e)}function R(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 j(t,e,n){return t instanceof R?t:g(t)&&"object"!=typeof t[0]?3===t.length?new R(t[0],t[1],t[2]):2===t.length?new R(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new R(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new R(t,e,n)}z.prototype={clone:function(){return new z(this.x,this.y)},add:function(t){return this.clone()._add(I(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(I(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 z(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new z(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=O(this.x),this.y=O(this.y),this},distanceTo:function(t){var e=(t=I(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=I(t)).x===this.x&&t.y===this.y},contains:function(t){return t=I(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+h(this.x)+", "+h(this.y)+")"}},N.prototype={extend:function(t){return t=I(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 z((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new z(this.min.x,this.max.y)},getTopRight:function(){return new z(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 z?I(t):B(t))instanceof N?(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=B(t);var e=this.min,n=this.max,i=t.min,o=t.max,s=o.x>=e.x&&i.x<=n.x,r=o.y>=e.y&&i.y<=n.y;return s&&r},overlaps:function(t){t=B(t);var e=this.min,n=this.max,i=t.min,o=t.max,s=o.x>e.x&&i.x<n.x,r=o.y>e.y&&i.y<n.y;return s&&r},isValid:function(){return!(!this.min||!this.max)}},D.prototype={extend:function(t){var e,n,i=this._southWest,o=this._northEast;if(t instanceof R)e=t,n=t;else{if(!(t instanceof D))return t?this.extend(j(t)||Z(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 R(e.lat,e.lng),this._northEast=new R(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 D(new R(e.lat-i,e.lng-o),new R(n.lat+i,n.lng+o))},getCenter:function(){return new R((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 R(this.getNorth(),this.getWest())},getSouthEast:function(){return new R(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 R||"lat"in t?j(t):Z(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof D?(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=Z(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&i.lat<=n.lat,r=o.lng>=e.lng&&i.lng<=n.lng;return s&&r},overlaps:function(t){t=Z(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&i.lat<n.lat,r=o.lng>e.lng&&i.lng<n.lng;return s&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=Z(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},R.prototype={equals:function(t,e){return!!t&&(t=j(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("+h(this.lat,t)+", "+h(this.lng,t)+")"},distanceTo:function(t){return F.distance(this,j(t))},wrap:function(){return F.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return Z([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new R(this.lat,this.lng,this.alt)}};var H,W={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 N(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng;return new R(this.wrapLat?l(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 s=t.getSouthWest(),r=t.getNorthEast();return new D(new R(s.lat-i,s.lng-o),new R(r.lat-i,r.lng-o))}},F=n({},W,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,o=e.lat*n,s=Math.sin((e.lat-t.lat)*n/2),r=Math.sin((e.lng-t.lng)*n/2),a=s*s+Math.cos(i)*Math.cos(o)*r*r,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),q=6378137,U={R:q,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 z(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new R((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(H=q*Math.PI,new N([-H,-H],[H,H]))};function V(t,e,n,i){if(g(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 V(t,e,n,i)}V.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 z((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var G=n({},F,{code:"EPSG:3857",projection:U,transformation:function(){var t=.5/(Math.PI*U.R);return K(t,.5,-t,.5)}()}),Y=n({},G,{code:"EPSG:900913"});function X(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function J(t,e){var n,i,o,s,r,a,l="";for(n=0,o=t.length;n<o;n++){for(i=0,s=(r=t[n]).length;i<s;i++)l+=(i?"L":"M")+(a=r[i]).x+" "+a.y;l+=e?Ct?"z":"x":""}return l||"M0 0"}var Q=document.documentElement.style,tt="ActiveXObject"in window,et=tt&&!document.addEventListener,nt="msLaunchUri"in navigator&&!("documentMode"in document),it=At("webkit"),ot=At("android"),st=At("android 2")||At("android 3"),rt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),at=ot&&At("Google")&&rt<537&&!("AudioNode"in window),lt=!!window.opera,ct=!nt&&At("chrome"),ht=At("gecko")&&!it&&!lt&&!tt,ut=!ct&&At("safari"),dt=At("phantom"),pt="OTransition"in Q,mt=0===navigator.platform.indexOf("Win"),ft=tt&&"transition"in Q,_t="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!st,gt="MozPerspective"in Q,vt=!window.L_DISABLE_3D&&(ft||_t||gt)&&!pt&&!dt,yt="undefined"!=typeof orientation||At("mobile"),bt=yt&&it,wt=yt&&_t,xt=!window.PointerEvent&&window.MSPointerEvent,$t=!(!window.PointerEvent&&!xt),Lt=!window.L_NO_TOUCH&&($t||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Tt=yt&<,Pt=yt&&ht,Et=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,kt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",c,e),window.removeEventListener("testPassiveEventSupport",c,e)}catch(t){}return t}(),Mt=!!document.createElement("canvas").getContext,Ct=!(!document.createElementNS||!X("svg").createSVGRect),St=!Ct&&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}}();function At(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var zt={ie:tt,ielt9:et,edge:nt,webkit:it,android:ot,android23:st,androidStock:at,opera:lt,chrome:ct,gecko:ht,safari:ut,phantom:dt,opera12:pt,win:mt,ie3d:ft,webkit3d:_t,gecko3d:gt,any3d:vt,mobile:yt,mobileWebkit:bt,mobileWebkit3d:wt,msPointer:xt,pointer:$t,touch:Lt,mobileOpera:Tt,mobileGecko:Pt,retina:Et,passiveEvents:kt,canvas:Mt,svg:Ct,vml:St},Ot=xt?"MSPointerDown":"pointerdown",It=xt?"MSPointerMove":"pointermove",Nt=xt?"MSPointerUp":"pointerup",Bt=xt?"MSPointerCancel":"pointercancel",Dt={},Zt=!1;function Rt(t,e,n,i){return"touchstart"===e?Ht(t,n,i):"touchmove"===e?Vt(t,n,i):"touchend"===e&&Kt(t,n,i),this}function jt(t,e,n){var i=t["_leaflet_"+e+n];return"touchstart"===e?t.removeEventListener(Ot,i,!1):"touchmove"===e?t.removeEventListener(It,i,!1):"touchend"===e&&(t.removeEventListener(Nt,i,!1),t.removeEventListener(Bt,i,!1)),this}function Ht(t,e,n){var i=o((function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Fe(t),Ut(t,e)}));t["_leaflet_touchstart"+n]=i,t.addEventListener(Ot,i,!1),Zt||(document.addEventListener(Ot,Wt,!0),document.addEventListener(It,Ft,!0),document.addEventListener(Nt,qt,!0),document.addEventListener(Bt,qt,!0),Zt=!0)}function Wt(t){Dt[t.pointerId]=t}function Ft(t){Dt[t.pointerId]&&(Dt[t.pointerId]=t)}function qt(t){delete Dt[t.pointerId]}function Ut(t,e){for(var n in t.touches=[],Dt)t.touches.push(Dt[n]);t.changedTouches=[t],e(t)}function Vt(t,e,n){var i=function(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||Ut(t,e)};t["_leaflet_touchmove"+n]=i,t.addEventListener(It,i,!1)}function Kt(t,e,n){var i=function(t){Ut(t,e)};t["_leaflet_touchend"+n]=i,t.addEventListener(Nt,i,!1),t.addEventListener(Bt,i,!1)}var Gt=xt?"MSPointerDown":$t?"pointerdown":"touchstart",Yt=xt?"MSPointerUp":$t?"pointerup":"touchend",Xt="_leaflet_";function Jt(t,e,n){var i,o,s=!1,r=250;function a(t){if($t){if(!t.isPrimary)return;if("mouse"===t.pointerType)return}else if(t.touches.length>1)return;var e=Date.now(),n=e-(i||e);o=t.touches?t.touches[0]:t,s=n>0&&n<=r,i=e}function l(t){if(s&&!o.cancelBubble){if($t){if("mouse"===t.pointerType)return;var n,r,a={};for(r in o)n=o[r],a[r]=n&&n.bind?n.bind(o):n;o=a}o.type="dblclick",o.button=0,e(o),i=null}}return t[Xt+Gt+n]=a,t[Xt+Yt+n]=l,t[Xt+"dblclick"+n]=e,t.addEventListener(Gt,a,!!kt&&{passive:!1}),t.addEventListener(Yt,l,!!kt&&{passive:!1}),t.addEventListener("dblclick",e,!1),this}function Qt(t,e){var n=t[Xt+Gt+e],i=t[Xt+Yt+e],o=t[Xt+"dblclick"+e];return t.removeEventListener(Gt,n,!!kt&&{passive:!1}),t.removeEventListener(Yt,i,!!kt&&{passive:!1}),t.removeEventListener("dblclick",o,!1),this}var te,ee,ne,ie,oe,se=xe(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),re=xe(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ae="webkitTransition"===re||"OTransition"===re?re+"End":"transitionend";function le(t){return"string"==typeof t?document.getElementById(t):t}function ce(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 he(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function ue(t){var e=t.parentNode;e&&e.removeChild(t)}function de(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function pe(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function me(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function fe(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=ye(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function _e(t,e){if(void 0!==t.classList)for(var n=d(e),i=0,o=n.length;i<o;i++)t.classList.add(n[i]);else if(!fe(t,e)){var s=ye(t);ve(t,(s?s+" ":"")+e)}}function ge(t,e){void 0!==t.classList?t.classList.remove(e):ve(t,u((" "+ye(t)+" ").replace(" "+e+" "," ")))}function ve(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function ye(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function be(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&we(t,e)}function we(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 xe(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function $e(t,e,n){var i=e||new z(0,0);t.style[se]=(ft?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function Le(t,e){t._leaflet_pos=e,vt?$e(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Te(t){return t._leaflet_pos||new z(0,0)}if("onselectstart"in document)te=function(){Oe(window,"selectstart",Fe)},ee=function(){Ne(window,"selectstart",Fe)};else{var Pe=xe(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);te=function(){if(Pe){var t=document.documentElement.style;ne=t[Pe],t[Pe]="none"}},ee=function(){Pe&&(document.documentElement.style[Pe]=ne,ne=void 0)}}function Ee(){Oe(window,"dragstart",Fe)}function ke(){Ne(window,"dragstart",Fe)}function Me(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Ce(),ie=t,oe=t.style.outline,t.style.outline="none",Oe(window,"keydown",Ce))}function Ce(){ie&&(ie.style.outline=oe,ie=void 0,oe=void 0,Ne(window,"keydown",Ce))}function Se(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Ae(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var ze={TRANSFORM:se,TRANSITION:re,TRANSITION_END:ae,get:le,getStyle:ce,create:he,remove:ue,empty:de,toFront:pe,toBack:me,hasClass:fe,addClass:_e,removeClass:ge,setClass:ve,getClass:ye,setOpacity:be,testProp:xe,setTransform:$e,setPosition:Le,getPosition:Te,disableTextSelection:te,enableTextSelection:ee,disableImageDrag:Ee,enableImageDrag:ke,preventOutline:Me,restoreOutline:Ce,getSizedParentNode:Se,getScale:Ae};function Oe(t,e,n,i){if("object"==typeof e)for(var o in e)Ze(t,o,e[o],n);else for(var s=0,r=(e=d(e)).length;s<r;s++)Ze(t,e[s],n,i);return this}var Ie="_leaflet_events";function Ne(t,e,n,i){if("object"==typeof e)for(var o in e)Re(t,o,e[o],n);else if(e)for(var s=0,r=(e=d(e)).length;s<r;s++)Re(t,e[s],n,i);else{for(var a in t[Ie])Re(t,a,t[Ie][a]);delete t[Ie]}return this}function Be(){if($t)return!(nt||ut)}var De={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ze(t,e,n,i){var o=e+r(n)+(i?"_"+r(i):"");if(t[Ie]&&t[Ie][o])return this;var s=function(e){return n.call(i||t,e||window.event)},a=s;$t&&0===e.indexOf("touch")?Rt(t,e,s,o):Lt&&"dblclick"===e&&!Be()?Jt(t,s,o):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(De[e]||e,s,!!kt&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(s=function(e){e=e||window.event,Je(t,e)&&a(e)},t.addEventListener(De[e],s,!1)):t.addEventListener(e,a,!1):"attachEvent"in t&&t.attachEvent("on"+e,s),t[Ie]=t[Ie]||{},t[Ie][o]=s}function Re(t,e,n,i){var o=e+r(n)+(i?"_"+r(i):""),s=t[Ie]&&t[Ie][o];if(!s)return this;$t&&0===e.indexOf("touch")?jt(t,e,o):Lt&&"dblclick"===e&&!Be()?Qt(t,o):"removeEventListener"in t?t.removeEventListener(De[e]||e,s,!1):"detachEvent"in t&&t.detachEvent("on"+e,s),t[Ie][o]=null}function je(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Xe(t),this}function He(t){return Ze(t,"wheel",je),this}function We(t){return Oe(t,"mousedown touchstart dblclick",je),Ze(t,"click",Ye),this}function Fe(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function qe(t){return Fe(t),je(t),this}function Ue(t,e){if(!e)return new z(t.clientX,t.clientY);var n=Ae(e),i=n.boundingClientRect;return new z((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var Ve=mt&&ct?2*window.devicePixelRatio:ht?window.devicePixelRatio:1;function Ke(t){return nt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ve: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}var Ge={};function Ye(t){Ge[t.type]=!0}function Xe(t){var e=Ge[t.type];return Ge[t.type]=!1,e}function Je(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}var Qe={on:Oe,off:Ne,stopPropagation:je,disableScrollPropagation:He,disableClickPropagation:We,preventDefault:Fe,stop:qe,getMousePosition:Ue,getWheelDelta:Ke,fakeStop:Ye,skipped:Xe,isExternalTarget:Je,addListener:Oe,removeListener:Ne},tn=A.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=Te(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=P(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(),Le(this._el,n),this.fire("step")},_complete:function(){E(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),en=A.extend({options:{crs:G,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=p(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=o(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(j(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=re&&vt&&!Tt&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Oe(this._proxy,ae,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(j(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=n({animate:i.animate},i.zoom),i.pan=n({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e),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||(vt?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(vt?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),s=(t instanceof z?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/i),r=this.containerPointToLatLng(o.add(s));return this.setView(r,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():Z(t);var n=I(e.paddingTopLeft||e.padding||[0,0]),i=I(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 s=i.subtract(n).divideBy(2),r=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(r.add(a).divideBy(2).add(s),o),zoom:o}},fitBounds:function(t,e){if(!(t=Z(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(e=e||{},!(t=I(t).round()).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 tn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){_e(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){if(!1===(n=n||{}).animate||!vt)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),o=this.project(t),s=this.getSize(),r=this._zoom;t=j(t),e=void 0===e?r:e;var a=Math.max(s.x,s.y),l=a*this.getZoomScale(r,e),c=o.distanceTo(i)||1,h=1.42,u=h*h;function d(t){var e=(l*l-a*a+(t?-1:1)*u*u*c*c)/(2*(t?l:a)*u*c),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function m(t){return(Math.exp(t)+Math.exp(-t))/2}function f(t){return p(t)/m(t)}var _=d(0);function g(t){return a*(m(_)/m(_+h*t))}function v(t){return a*(m(_)*f(_+h*t)-p(_))/u}function y(t){return 1-Math.pow(1-t,1.5)}var b=Date.now(),w=(d(1)-_)/h,x=n.duration?1e3*n.duration:1e3*w*.8;function $(){var n=(Date.now()-b)/x,s=y(n)*w;n<=1?(this._flyToFrame=P($,this),this._move(this.unproject(i.add(o.subtract(i).multiplyBy(v(s)/c)),r),this.getScaleZoom(a/g(s),r),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),$.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=Z(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,Z(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=I((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=I(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),s=this.project(o),r=this.project(t),a=this.getPixelBounds(),l=a.getSize().divideBy(2),c=B([a.min.add(n),a.max.subtract(i)]);if(!c.contains(r)){this._enforcingBounds=!0;var h=s.subtract(r),u=I(r.x+h.x,r.y+h.y);(r.x<c.min.x||r.x>c.max.x)&&(u.x=s.x-h.x,h.x>0?u.x+=l.x-n.x:u.x-=l.x-i.x),(r.y<c.min.y||r.y>c.max.y)&&(u.y=s.y-h.y,h.y>0?u.y+=l.y-n.y:u.y-=l.y-i.y),this.panTo(this.unproject(u),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),s=e.divideBy(2).round(),r=i.divideBy(2).round(),a=s.subtract(r);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(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):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=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o(this._handleGeolocationResponse,this),i=o(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,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=new R(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var o=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(o,i.maxZoom):o)}var s={latlng:e,bounds:n,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)},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.off("moveend",this._panInsideMaxBounds),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}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ue(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(E(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ue(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=he("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},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 D(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=Z(t),n=I(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(n),c=B(this.project(a,i),this.project(r,i)).getSize(),h=vt?this.options.zoomSnap:1,u=l.x/c.x,d=l.y/c.y,p=e?Math.max(u,d):Math.min(u,d);return i=this.getScaleZoom(p,i),h&&(i=Math.round(i/(h/100))*(h/100),i=e?Math.ceil(i/h)*h:Math.floor(i/h)*h),Math.max(o,Math.min(s,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new z(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 N(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)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var i=n.zoom(t*n.scale(e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(j(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(I(t),e)},layerPointToLatLng:function(t){var e=I(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(j(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(j(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(Z(t))},distance:function(t,e){return this.options.crs.distance(j(t),j(e))},containerPointToLayerPoint:function(t){return I(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return I(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(I(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(j(t)))},mouseEventToContainerPoint:function(t){return Ue(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=le(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Oe(e,"scroll",this._onScroll,this),this._containerId=r(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&vt,_e(t,"leaflet-container"+(Lt?" leaflet-touch":"")+(Et?" leaflet-retina":"")+(et?" leaflet-oldie":"")+(ut?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ce(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Le(this._mapPane,new z(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(_e(t.markerPane,"leaflet-zoom-hide"),_e(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){Le(this._mapPane,new z(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var i=this._zoom!==e;this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var i=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(i||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return E(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Le(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[r(this._container)]=this;var e=t?Ne:Oe;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),vt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){E(this._resizeRequest),this._resizeRequest=P((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,a=!1;s;){if((n=this._targets[r(s)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(e,!0)){if(o&&!Je(s,t))break;if(i.push(n),o)break}if(s===this._container)break;s=s.parentNode}return i.length||a||o||!Je(s,t)||(i=[this]),i},_handleDOMEvent:function(t){if(this._loaded&&!Xe(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||Me(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var o=n({},t);o.type="preclick",this._fireDOMEvent(o,o.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e))).length){var s=i[0];"contextmenu"===e&&s.listens(e,!0)&&Fe(t);var r={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var a=s.getLatLng&&(!s._radius||s._radius<=10);r.containerPoint=a?this.latLngToContainerPoint(s.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=a?s.getLatLng():this.layerPointToLatLng(r.layerPoint)}for(var l=0;l<i.length;l++)if(i[l].fire(e,r,!0),r.originalEvent._stopped||!1===i[l].options.bubblingMouseEvents&&-1!==v(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Te(this._mapPane)||new z(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return B([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),o=this.getSize().divideBy(2),s=new N(i.subtract(o),i.add(o)),r=this._getBoundsOffset(s,n,e);return r.round().equals([0,0])?t:this.unproject(i.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new N(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=B(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),o=i.min.subtract(t.min),s=i.max.subtract(t.max);return new z(this._rebound(o.x,-s.x),this._rebound(o.y,-s.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=vt?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ge(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=he("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=se,n=this._proxy.style[e];$e(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ue(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();$e(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(o)||(P((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,_e(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ge(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),P((function(){this._moveEnd(!0)}),this))}});function nn(t,e){return new en(t,e)}var on=M.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return _e(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ue(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),sn=function(t){return new on(t)};en.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=he("div",e+"control-container",this._container);function i(i,o){var s=e+i+" "+e+o;t[i+o]=he("div",s,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ue(this._controlCorners[t]);ue(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var rn=on.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in p(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return on.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(r(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){_e(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(_e(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):ge(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return ge(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=he("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),We(e),He(e);var i=this._section=he("section",t+"-list");n&&(this._map.on("click",this.collapse,this),ot||Oe(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=he("a",t+"-toggle",e);o.href="#",o.title="Layers",Lt?(Oe(o,"click",qe),Oe(o,"click",this.expand,this)):Oe(o,"focus",this.expand,this),n||this.expand(),this._baseLayersList=he("div",t+"-base",i),this._separator=he("div",t+"-separator",i),this._overlaysList=he("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&r(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(o((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;de(this._baseLayersList),de(this._overlaysList),this._layerControlInputs=[];var t,e,n,i,o=0;for(n=0;n<this._layers.length;n++)i=this._layers[n],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,o+=i.overlay?0:1;return this.options.hideSingleBase&&(t=t&&o>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(r(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+r(this),i),this._layerControlInputs.push(e),e.layerId=r(t.layer),Oe(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("div");return n.appendChild(s),s.appendChild(e),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var s=n.length-1;s>=0;s--)t=n[s],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(s=0;s<o.length;s++)this._map.hasLayer(o[s])&&this._map.removeLayer(o[s]);for(s=0;s<i.length;s++)this._map.hasLayer(i[s])||this._map.addLayer(i[s]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),o=n.length-1;o>=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&i<e.options.minZoom||void 0!==e.options.maxZoom&&i>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),an=function(t,e,n){return new rn(t,e,n)},ln=on.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=he("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,o){var s=he("a",n,i);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),We(s),Oe(s,"click",qe),Oe(s,"click",o,this),Oe(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";ge(this._zoomInButton,e),ge(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&_e(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&_e(this._zoomInButton,e)}});en.mergeOptions({zoomControl:!0}),en.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new ln,this.addControl(this.zoomControl))}));var cn=function(t){return new ln(t)},hn=on.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=he("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=he("div",e,n)),t.imperial&&(this._iScale=he("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,o=3.2808399*t;o>5280?(e=o/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(o),this._updateScale(this._iScale,i+" ft",i/o))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),un=function(t){return new hn(t)},dn=on.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=he("div","leaflet-control-attribution"),We(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});en.mergeOptions({attributionControl:!0}),en.addInitHook((function(){this.options.attributionControl&&(new dn).addTo(this)}));var pn=function(t){return new dn(t)};on.Layers=rn,on.Zoom=ln,on.Scale=hn,on.Attribution=dn,sn.layers=an,sn.zoom=cn,sn.scale=un,sn.attribution=pn;var mn=M.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});mn.addTo=function(t,e){return t.addHandler(e,this),this};var fn,_n={Events:S},gn=Lt?"touchstart mousedown":"mousedown",vn={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},yn={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},bn=A.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){p(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Oe(this._dragStartTarget,gn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(bn._dragging===this&&this.finishDrag(),Ne(this._dragStartTarget,gn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!fe(this._element,"leaflet-zoom-anim")&&!(bn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(bn._dragging=this,this._preventOutline&&Me(this._element),Ee(),te(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Se(this._element);this._startPoint=new z(e.clientX,e.clientY),this._parentScale=Ae(n),Oe(document,yn[t.type],this._onMove,this),Oe(document,vn[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new z(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,Fe(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=Te(this._element).subtract(n),_e(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),_e(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,E(this._animRequest),this._lastEvent=t,this._animRequest=P(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Le(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in ge(document.body,"leaflet-dragging"),this._lastTarget&&(ge(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),yn)Ne(document,yn[t],this._onMove,this),Ne(document,vn[t],this._onUp,this);ke(),ee(),this._moved&&this._moving&&(E(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,bn._dragging=!1}});function wn(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=Ln(t=Pn(t,n),n)}function xn(t,e,n){return Math.sqrt(Sn(t,e,n,!0))}function $n(t,e,n){return Sn(t,e,n)}function Ln(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,Tn(t,i,e,0,n-1);var o,s=[];for(o=0;o<n;o++)i[o]&&s.push(t[o]);return s}function Tn(t,e,n,i,o){var s,r,a,l=0;for(r=i+1;r<=o-1;r++)(a=Sn(t[r],t[i],t[o],!0))>l&&(s=r,l=a);l>n&&(e[s]=1,Tn(t,e,n,i,s),Tn(t,e,n,s,o))}function Pn(t,e){for(var n=[t[0]],i=1,o=0,s=t.length;i<s;i++)Cn(t[i],t[o])>e&&(n.push(t[i]),o=i);return o<s-1&&n.push(t[s-1]),n}function En(t,e,n,i,o){var s,r,a,l=i?fn:Mn(t,n),c=Mn(e,n);for(fn=c;;){if(!(l|c))return[t,e];if(l&c)return!1;a=Mn(r=kn(t,e,s=l||c,n,o),n),s===l?(t=r,l=a):(e=r,c=a)}}function kn(t,e,n,i,o){var s,r,a=e.x-t.x,l=e.y-t.y,c=i.min,h=i.max;return 8&n?(s=t.x+a*(h.y-t.y)/l,r=h.y):4&n?(s=t.x+a*(c.y-t.y)/l,r=c.y):2&n?(s=h.x,r=t.y+l*(h.x-t.x)/a):1&n&&(s=c.x,r=t.y+l*(c.x-t.x)/a),new z(s,r,o)}function Mn(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 Cn(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function Sn(t,e,n,i){var o,s=e.x,r=e.y,a=n.x-s,l=n.y-r,c=a*a+l*l;return c>0&&((o=((t.x-s)*a+(t.y-r)*l)/c)>1?(s=n.x,r=n.y):o>0&&(s+=a*o,r+=l*o)),a=t.x-s,l=t.y-r,i?a*a+l*l:new z(s,r)}function An(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function zn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),An(t)}var On={simplify:wn,pointToSegmentDistance:xn,closestPointOnSegment:$n,clipSegment:En,_getEdgeIntersection:kn,_getBitCode:Mn,_sqClosestPointOnSegment:Sn,isFlat:An,_flat:zn};function In(t,e,n){var i,o,s,r,a,l,c,h,u,d=[1,4,2,8];for(o=0,c=t.length;o<c;o++)t[o]._code=Mn(t[o],e);for(r=0;r<4;r++){for(h=d[r],i=[],o=0,s=(c=t.length)-1;o<c;s=o++)a=t[o],l=t[s],a._code&h?l._code&h||((u=kn(l,a,h,e,n))._code=Mn(u,e),i.push(u)):(l._code&h&&((u=kn(l,a,h,e,n))._code=Mn(u,e),i.push(u)),i.push(a));t=i}return t}var Nn={clipPolygon:In},Bn={project:function(t){return new z(t.lng,t.lat)},unproject:function(t){return new R(t.y,t.x)},bounds:new N([-180,-90],[180,90])},Dn={R:6378137,R_MINOR:6356752.314245179,bounds:new N([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),r=s*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-r)/(1+r),s/2);return i=-n*Math.log(Math.max(a,1e-10)),new z(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,s=Math.sqrt(1-o*o),r=Math.exp(-t.y/i),a=Math.PI/2-2*Math.atan(r),l=0,c=.1;l<15&&Math.abs(c)>1e-7;l++)e=s*Math.sin(a),e=Math.pow((1-e)/(1+e),s/2),a+=c=Math.PI/2-2*Math.atan(r*e)-a;return new R(a*n,t.x*n/i)}},Zn={LonLat:Bn,Mercator:Dn,SphericalMercator:U},Rn=n({},F,{code:"EPSG:3395",projection:Dn,transformation:function(){var t=.5/(Math.PI*Dn.R);return K(t,.5,-t,.5)}()}),jn=n({},F,{code:"EPSG:4326",projection:Bn,transformation:K(1/180,1,-1/180,.5)}),Hn=n({},W,{projection:Bn,transformation:K(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});W.Earth=F,W.EPSG3395=Rn,W.EPSG3857=G,W.EPSG900913=Y,W.EPSG4326=jn,W.Simple=Hn;var Wn=A.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[r(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[r(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",(function(){e.off(n,this)}),this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});en.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=r(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=r(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&r(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?g(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[r(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=r(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var o=this._zoomBoundLayers[i].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Fn=Wn.extend({initialize:function(t,e){var n,i;if(p(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return r(t)}}),qn=function(t,e){return new Fn(t,e)},Un=Fn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Fn.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Fn.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new D;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Vn=function(t,e){return new Un(t,e)},Kn=M.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){p(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var o=I(i),s=I("shadow"===e&&n.shadowAnchor||n.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Et&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function Gn(t){return new Kn(t)}var Yn=Kn.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return Yn.imagePath||(Yn.imagePath=this._detectIconPath()),(this.options.imagePath||Yn.imagePath)+Kn.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=he("div","leaflet-default-icon-path",document.body),e=ce(t,"background-image")||ce(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Xn=mn.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new bn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),_e(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&ge(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,s=Te(e._icon),r=n.getPixelBounds(),a=n.getPixelOrigin(),l=B(r.min._subtract(a).add(o),r.max._subtract(a).subtract(o));if(!l.contains(s)){var c=I((Math.max(l.max.x,s.x)-l.max.x)/(r.max.x-l.max.x)-(Math.min(l.min.x,s.x)-l.min.x)/(r.min.x-l.min.x),(Math.max(l.max.y,s.y)-l.max.y)/(r.max.y-l.max.y)-(Math.min(l.min.y,s.y)-l.min.y)/(r.min.y-l.min.y)).multiplyBy(i);n.panBy(c,{animate:!1}),this._draggable._newPos._add(c),this._draggable._startPos._add(c),Le(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=P(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(E(this._panRequest),this._panRequest=P(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=Te(e._icon),o=e._map.layerPointToLatLng(i);n&&Le(n,i),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){E(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Jn=Wn.extend({options:{icon:new Yn,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){p(this,e),this._latlng=j(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=j(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),_e(n,e),t.keyboard&&(n.tabIndex="0"),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),s=!1;o!==this._shadow&&(this._removeShadow(),s=!0),o&&(_e(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&s&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),ue(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ue(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Le(this._icon,t),this._shadow&&Le(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(_e(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Xn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Xn(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&be(this._icon,t),this._shadow&&be(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Qn(t,e){return new Jn(t,e)}var ti=Wn.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return p(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),ei=ti.extend({options:{fill:!0,radius:10},initialize:function(t,e){p(this,e),this._latlng=j(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=j(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return ti.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new N(this._point.subtract(i),this._point.add(i))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function ni(t,e){return new ei(t,e)}var ii=ei.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=n({},i,{radius:e})),p(this,e),this._latlng=j(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new D(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:ti.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===F.distance){var o=Math.PI/180,s=this._mRadius/F.R/o,r=n.project([e+s,t]),a=n.project([e-s,t]),l=r.add(a).divideBy(2),c=n.unproject(l).lat,h=Math.acos((Math.cos(s*o)-Math.sin(e*o)*Math.sin(c*o))/(Math.cos(e*o)*Math.cos(c*o)))/o;(isNaN(h)||0===h)&&(h=s/Math.cos(Math.PI/180*e)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(h)?0:l.x-n.project([c,t-h]).x,this._radiusY=l.y-r.y}else{var u=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(u).x}this._updateBounds()}});function oi(t,e,n){return new ii(t,e,n)}var si=ti.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){p(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,n,i=1/0,o=null,s=Sn,r=0,a=this._parts.length;r<a;r++)for(var l=this._parts[r],c=1,h=l.length;c<h;c++){var u=s(t,e=l[c-1],n=l[c],!0);u<i&&(i=u,o=s(t,e,n))}return o&&(o.distance=Math.sqrt(i)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,o,s,r,a=this._rings[0],l=a.length;if(!l)return null;for(t=0,e=0;t<l-1;t++)e+=a[t].distanceTo(a[t+1])/2;if(0===e)return this._map.layerPointToLatLng(a[0]);for(t=0,i=0;t<l-1;t++)if(o=a[t],s=a[t+1],(i+=n=o.distanceTo(s))>e)return r=(i-e)/n,this._map.layerPointToLatLng([s.x-r*(s.x-o.x),s.y-r*(s.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=j(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new D,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return An(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=An(t),i=0,o=t.length;i<o;i++)n?(e[i]=j(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new N;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new z(t,t);this._pxBounds=new N([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,n){var i,o,s=t[0]instanceof R,r=t.length;if(s){for(o=[],i=0;i<r;i++)o[i]=this._map.latLngToLayerPoint(t[i]),n.extend(o[i]);e.push(o)}else for(i=0;i<r;i++)this._projectLatlngs(t[i],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,i,o,s,r,a,l=this._parts;for(e=0,i=0,o=this._rings.length;e<o;e++)for(n=0,s=(a=this._rings[e]).length;n<s-1;n++)(r=En(a[n],a[n+1],t,n,!0))&&(l[i]=l[i]||[],l[i].push(r[0]),r[1]===a[n+1]&&n!==s-2||(l[i].push(r[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=wn(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,o,s,r,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,s=this._parts.length;n<s;n++)for(i=0,o=(r=(a=this._parts[n]).length)-1;i<r;o=i++)if((e||0!==i)&&xn(t,a[o],a[i])<=l)return!0;return!1}});function ri(t,e){return new si(t,e)}si._flat=zn;var ai=si.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,o,s,r,a,l,c=this._rings[0],h=c.length;if(!h)return null;for(s=r=a=0,t=0,e=h-1;t<h;e=t++)n=c[t],i=c[e],o=n.y*i.x-i.y*n.x,r+=(n.x+i.x)*o,a+=(n.y+i.y)*o,s+=3*o;return l=0===s?c[0]:[r/s,a/s],this._map.layerPointToLatLng(l)},_convertLatLngs:function(t){var e=si.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof R&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){si.prototype._setLatLngs.call(this,t),An(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return An(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new z(e,e);if(t=new N(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,o=0,s=this._rings.length;o<s;o++)(i=In(this._rings[o],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,o,s,r,a,l,c=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(s=0,r=(l=(e=this._parts[o]).length)-1;s<l;r=s++)n=e[s],i=e[r],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(c=!c);return c||si.prototype._containsPoint.call(this,t,!0)}});function li(t,e){return new ai(t,e)}var ci=Un.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=g(t)?t:t.features;if(o){for(e=0,n=o.length;e<n;e++)((i=o[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var s=this.options;if(s.filter&&!s.filter(t))return this;var r=hi(t,s);return r?(r.feature=gi(t),r.defaultOptions=r.options,this.resetStyle(r),s.onEachFeature&&s.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=n({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function hi(t,e){var n,i,o,s,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,l=[],c=e&&e.pointToLayer,h=e&&e.coordsToLatLng||di;if(!a&&!r)return null;switch(r.type){case"Point":return ui(c,t,n=h(a),e);case"MultiPoint":for(o=0,s=a.length;o<s;o++)n=h(a[o]),l.push(ui(c,t,n,e));return new Un(l);case"LineString":case"MultiLineString":return i=pi(a,"LineString"===r.type?0:1,h),new si(i,e);case"Polygon":case"MultiPolygon":return i=pi(a,"Polygon"===r.type?1:2,h),new ai(i,e);case"GeometryCollection":for(o=0,s=r.geometries.length;o<s;o++){var u=hi({geometry:r.geometries[o],type:"Feature",properties:t.properties},e);u&&l.push(u)}return new Un(l);default:throw new Error("Invalid GeoJSON object.")}}function ui(t,e,n,i){return t?t(e,n):new Jn(n,i&&i.markersInheritOptions&&i)}function di(t){return new R(t[1],t[0],t[2])}function pi(t,e,n){for(var i,o=[],s=0,r=t.length;s<r;s++)i=e?pi(t[s],e-1,n):(n||di)(t[s]),o.push(i);return o}function mi(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[h(t.lng,e),h(t.lat,e),h(t.alt,e)]:[h(t.lng,e),h(t.lat,e)]}function fi(t,e,n,i){for(var o=[],s=0,r=t.length;s<r;s++)o.push(e?fi(t[s],e-1,n,i):mi(t[s],i));return!e&&n&&o.push(o[0]),o}function _i(t,e){return t.feature?n({},t.feature,{geometry:e}):gi(e)}function gi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var vi={toGeoJSON:function(t){return _i(this,{type:"Point",coordinates:mi(this.getLatLng(),t)})}};function yi(t,e){return new ci(t,e)}Jn.include(vi),ii.include(vi),ei.include(vi),si.include({toGeoJSON:function(t){var e=!An(this._latlngs);return _i(this,{type:(e?"Multi":"")+"LineString",coordinates:fi(this._latlngs,e?1:0,!1,t)})}}),ai.include({toGeoJSON:function(t){var e=!An(this._latlngs),n=e&&!An(this._latlngs[0]),i=fi(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),_i(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Fn.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),_i(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer((function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(n)i.push(o.geometry);else{var s=gi(o);"FeatureCollection"===s.type?i.push.apply(i,s.features):i.push(s)}}})),n?_i(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var bi=yi,wi=Wn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=Z(e),p(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(_e(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ue(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&pe(this._image),this},bringToBack:function(){return this._map&&me(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=Z(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:he("img");_e(e,"leaflet-image-layer"),this._zoomAnimated&&_e(e,"leaflet-zoom-animated"),this.options.className&&_e(e,this.options.className),e.onselectstart=c,e.onmousemove=c,e.onload=o(this.fire,this,"load"),e.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;$e(this._image,n,e)},_reset:function(){var t=this._image,e=new N(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();Le(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){be(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),xi=function(t,e,n){return new wi(t,e,n)},$i=wi.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:he("video");if(_e(e,"leaflet-image-layer"),this._zoomAnimated&&_e(e,"leaflet-zoom-animated"),this.options.className&&_e(e,this.options.className),e.onselectstart=c,e.onmousemove=c,e.onloadeddata=o(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],s=0;s<n.length;s++)i.push(n[s].src);this._url=n.length>0?i:[e.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted;for(var r=0;r<this._url.length;r++){var a=he("source");a.src=this._url[r],e.appendChild(a)}}}});function Li(t,e,n){return new $i(t,e,n)}var Ti=wi.extend({_initImage:function(){var t=this._image=this._url;_e(t,"leaflet-image-layer"),this._zoomAnimated&&_e(t,"leaflet-zoom-animated"),this.options.className&&_e(t,this.options.className),t.onselectstart=c,t.onmousemove=c}});function Pi(t,e,n){return new Ti(t,e,n)}var Ei=Wn.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){p(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&be(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&be(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(be(this._container,0),this._removeTimeout=setTimeout(o(ue,void 0,this._container),200)):ue(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=j(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&pe(this._container),this},bringToBack:function(){return this._map&&me(this._container),this},_prepareOpen:function(t,e,n){if(e instanceof Wn||(n=e,e=t),e instanceof Un)for(var i in t._layers){e=t._layers[i];break}if(!n)if(e.getCenter)n=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");n=e.getLatLng()}return this._source=e,this.update(),n},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=I(this.options.offset),n=this._getAnchor();this._zoomAnimated?Le(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}}),ki=Ei.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){Ei.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ti||this._source.on("preclick",je))},onRemove:function(t){Ei.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ti||this._source.off("preclick",je))},getEvents:function(){var t=Ei.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=he("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=he("div",t+"-content-wrapper",e);if(this._contentNode=he("div",t+"-content",n),We(e),He(this._contentNode),Oe(e,"contextmenu",je),this._tipContainer=he("div",t+"-tip-container",e),this._tip=he("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=he("a",t+"-close-button",e);i.href="#close",i.innerHTML="×",Oe(i,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=t.offsetHeight,o=this.options.maxHeight,s="leaflet-popup-scrolled";o&&i>o?(e.height=o+"px",_e(t,s)):ge(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();Le(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(ce(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new z(this._containerLeft,-n-this._containerBottom);o._add(Te(this._container));var s=t.layerPointToContainerPoint(o),r=I(this.options.autoPanPadding),a=I(this.options.autoPanPaddingTopLeft||r),l=I(this.options.autoPanPaddingBottomRight||r),c=t.getSize(),h=0,u=0;s.x+i+l.x>c.x&&(h=s.x+i-c.x+l.x),s.x-h-a.x<0&&(h=s.x-a.x),s.y+n+l.y>c.y&&(u=s.y+n-c.y+l.y),s.y-u-a.y<0&&(u=s.y-a.y),(h||u)&&t.fire("autopanstart").panBy([h,u])}},_onCloseButtonClick:function(t){this._close(),qe(t)},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Mi=function(t,e){return new ki(t,e)};en.mergeOptions({closePopupOnClick:!0}),en.include({openPopup:function(t,e,n){return t instanceof ki||(t=new ki(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Wn.include({bindPopup:function(t,e){return t instanceof ki?(p(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new ki(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(qe(t),e instanceof ti?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Ci=Ei.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Ei.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Ei.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Ei.prototype.getEvents.call(this);return Lt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=he("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,o=this._container,s=i.latLngToContainerPoint(i.getCenter()),r=i.layerPointToContainerPoint(t),a=this.options.direction,l=o.offsetWidth,c=o.offsetHeight,h=I(this.options.offset),u=this._getAnchor();"top"===a?(e=l/2,n=c):"bottom"===a?(e=l/2,n=0):"center"===a?(e=l/2,n=c/2):"right"===a?(e=0,n=c/2):"left"===a?(e=l,n=c/2):r.x<s.x?(a="right",e=0,n=c/2):(a="left",e=l+2*(h.x+u.x),n=c/2),t=t.subtract(I(e,n,!0)).add(h).add(u),ge(o,"leaflet-tooltip-right"),ge(o,"leaflet-tooltip-left"),ge(o,"leaflet-tooltip-top"),ge(o,"leaflet-tooltip-bottom"),_e(o,"leaflet-tooltip-"+a),Le(o,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&be(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return I(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Si=function(t,e){return new Ci(t,e)};en.include({openTooltip:function(t,e,n){return t instanceof Ci||(t=new Ci(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Wn.include({bindTooltip:function(t,e){return t instanceof Ci?(p(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new Ci(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),Lt&&(n.click=this._openTooltip)),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(_e(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(ge(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var Ai=Kn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(n.html instanceof Element?(de(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=I(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function zi(t){return new Ai(t)}Kn.Default=Yn;var Oi=Wn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:yt,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){p(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ue(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(pe(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(me(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof z?t:new z(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,i=-t(-1/0,1/0),o=0,s=n.length;o<s;o++)e=n[o].style.zIndex,n[o]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!et){be(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var o=this._tiles[i];if(o.current&&o.loaded){var s=Math.min(1,(t-o.loaded)/200);be(o.el,s),s<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(E(this._fadeFrame),this._fadeFrame=P(this._updateOpacity,this))}},_onOpaqueTile:c,_initContainer:function(){this._container||(this._container=he("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(ue(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],o=this._map;return i||((i=this._levels[t]={}).el=he("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,o.getCenter(),o.getZoom()),c(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:c,_onRemoveLevel:c,_onCreateLevel:c,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ue(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,i){var o=Math.floor(t/2),s=Math.floor(e/2),r=n-1,a=new z(+o,+s);a.z=+r;var l=this._tileCoordsToKey(a),c=this._tiles[l];return c&&c.active?(c.retain=!0,!0):(c&&c.loaded&&(c.retain=!0),r>i&&this._retainParent(o,s,r,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new z(o,s);r.z=n+1;var a=this._tileCoordsToKey(r),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<i&&this._retainChildren(o,s,n+1,i))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,i){var o=Math.round(e);o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o);var s=this.options.updateWhenZooming&&o!==this._tileZoom;i&&!s||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),o=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();vt?$e(t.el,o,i):Le(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),o=e.project(t,this._tileZoom).floor(),s=e.getSize().divideBy(2*i);return new N(o.subtract(s),o.add(s))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(i),s=o.getCenter(),r=[],a=this.options.keepBuffer,l=new N(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var c in this._tiles){var h=this._tiles[c].coords;h.z===this._tileZoom&&l.contains(new z(h.x,h.y))||(this._tiles[c].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var u=o.min.y;u<=o.max.y;u++)for(var d=o.min.x;d<=o.max.x;d++){var p=new z(d,u);if(p.z=this._tileZoom,this._isValidTile(p)){var m=this._tiles[this._tileCoordsToKey(p)];m?m.current=!0:r.push(p)}}if(r.sort((function(t,e){return t.distanceTo(s)-e.distanceTo(s)})),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var f=document.createDocumentFragment();for(d=0;d<r.length;d++)this._addTile(r[d],f);this._level.el.appendChild(f)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return Z(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),o=i.add(n);return[e.unproject(i,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new D(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new z(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(ue(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){_e(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=c,t.onmousemove=c,et&&this.options.opacity<1&&be(t,this.options.opacity),ot&&!st&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&P(o(this._tileReady,this,t,null,s)),Le(s,n),this._tiles[i]={el:s,coords:t,current:!0},e.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(be(n.el,0),E(this._fadeFrame),this._fadeFrame=P(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(_e(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et||!this._map._fadeAnimated?P(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new z(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new N(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Ii(t){return new Oi(t)}var Ni=Oi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&Et&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),ot||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Oe(n,"load",o(this._tileOnLoad,this,e,n)),Oe(n,"error",o(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Et?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return _(this._url,n(e,this.options))},_tileOnLoad:function(t,e){et?setTimeout(o(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=c,e.onerror=c,e.complete||(e.src=y,ue(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return at||e.el.setAttribute("src",y),Oi.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==y))return Oi.prototype._tileReady.call(this,t,e,n)}});function Bi(t,e){return new Ni(t,e)}var Di=Ni.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=n({},this.defaultWmsParams);for(var o in e)o in this.options||(i[o]=e[o]);var s=(e=p(this,e)).detectRetina&&Et?2:1,r=this.getTileSize();i.width=r.x*s,i.height=r.y*s,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Ni.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=B(n.project(e[0]),n.project(e[1])),o=i.min,s=i.max,r=(this._wmsVersion>=1.3&&this._crs===jn?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=Ni.prototype.getTileUrl.call(this,t);return a+m(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});function Zi(t,e){return new Di(t,e)}Ni.WMS=Di,Bi.wms=Zi;var Ri=Wn.extend({options:{padding:.1,tolerance:0},initialize:function(t){p(this,t),r(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&_e(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),i=Te(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,e),r=this._map.project(t,e).subtract(s),a=o.multiplyBy(-n).add(i).add(o).subtract(r);vt?$e(this._container,a,n):Le(this._container,a)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new N(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ji=Ri.extend({getEvents:function(){var t=Ri.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Ri.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Oe(t,"mousemove",this._onMouseMove,this),Oe(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Oe(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){E(this._redrawRequest),delete this._ctx,ue(this._container),Ne(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Ri.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=Et?2:1;Le(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Et&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Ri.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[r(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[r(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),o=[];for(n=0;n<i.length;n++){if(e=Number(i[n]),isNaN(e))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||P(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new N,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,o,s,r=t._parts,a=r.length,l=this._ctx;if(a){for(l.beginPath(),n=0;n<a;n++){for(i=0,o=r[n].length;i<o;i++)s=r[n][i],l[i?"lineTo":"moveTo"](s.x,s.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,i=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||i)/i;1!==o&&(n.save(),n.scale(1,o)),n.beginPath(),n.arc(e.x,e.y/o,i,0,2*Math.PI,!1),1!==o&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&("click"!==t.type&&"preclick"===t.type||!this._map._draggableMoved(e))&&(n=e);n&&(Ye(t),this._fireEvent([n],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(ge(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var n,i,s=this._drawFirst;s;s=s.next)(n=s.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(_e(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(o((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function Hi(t){return Mt?new ji(t):null}var Wi=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),Fi={_initContainer:function(){this._container=he("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ri.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Wi("shape");_e(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Wi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ue(e),t.removeInteractiveTarget(e),delete this._layers[r(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,o=t._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(e||(e=t._stroke=Wi("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=g(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(o.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=Wi("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){pe(t._container)},_bringToBack:function(t){me(t._container)}},qi=St?Wi:X,Ui=Ri.extend({getEvents:function(){var t=Ri.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=qi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=qi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ue(this._container),Ne(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){Ri.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),Le(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=qi("path");t.options.className&&_e(e,t.options.className),t.options.interactive&&_e(e,"leaflet-interactive"),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ue(t._path),t.removeInteractiveTarget(t._path),delete this._layers[r(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,J(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){pe(t._path)},_bringToBack:function(t){me(t._path)}});function Vi(t){return Ct||St?new Ui(t):null}St&&Ui.include(Fi),en.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Hi(t)||Vi(t)}});var Ki=ai.extend({initialize:function(t,e){ai.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=Z(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Gi(t,e){return new Ki(t,e)}Ui.create=qi,Ui.pointsToPath=J,ci.geometryToLayer=hi,ci.coordsToLatLng=di,ci.coordsToLatLngs=pi,ci.latLngToCoords=mi,ci.latLngsToCoords=fi,ci.getFeature=_i,ci.asFeature=gi,en.mergeOptions({boxZoom:!0});var Yi=mn.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Oe(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ne(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ue(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),te(),Ee(),this._startPoint=this._map.mouseEventToContainerPoint(t),Oe(document,{contextmenu:qe,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=he("div","leaflet-zoom-box",this._container),_e(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new N(this._point,this._startPoint),n=e.getSize();Le(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ue(this._box),ge(this._container,"leaflet-crosshair")),ee(),ke(),Ne(document,{contextmenu:qe,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var e=new D(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});en.addInitHook("addHandler","boxZoom",Yi),en.mergeOptions({doubleClickZoom:!0});var Xi=mn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,o=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});en.addInitHook("addHandler","doubleClickZoom",Xi),en.mergeOptions({dragging:!0,inertia:!st,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Ji=mn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new bn(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}_e(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ge(this._map._container,"leaflet-grab"),ge(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=Z(this._map.options.maxBounds);this._offsetLimit=B(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,o=(i-e+n)%t+e-n,s=(i+e+n)%t-e-n,r=Math.abs(o+n)<Math.abs(s+n)?o:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),s=(this._lastTime-this._times[0])/1e3,r=n.easeLinearity,a=o.multiplyBy(r/s),l=a.distanceTo([0,0]),c=Math.min(n.inertiaMaxSpeed,l),h=a.multiplyBy(c/l),u=c/(n.inertiaDeceleration*r),d=h.multiplyBy(-u/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),P((function(){e.panBy(d,{duration:u,easeLinearity:r,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});en.addInitHook("addHandler","dragging",Ji),en.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Qi=mn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),Oe(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Ne(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},o=this.keyCodes;for(e=0,n=o.left.length;e<n;e++)i[o.left[e]]=[-1*t,0];for(e=0,n=o.right.length;e<n;e++)i[o.right[e]]=[t,0];for(e=0,n=o.down.length;e<n;e++)i[o.down[e]]=[0,t];for(e=0,n=o.up.length;e<n;e++)i[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},o=this.keyCodes;for(e=0,n=o.zoomIn.length;e<n;e++)i[o.zoomIn[e]]=t;for(e=0,n=o.zoomOut.length;e<n;e++)i[o.zoomOut[e]]=-t},_addHooks:function(){Oe(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ne(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys)i._panAnim&&i._panAnim._inProgress||(e=this._panKeys[n],t.shiftKey&&(e=I(e).multiplyBy(3)),i.panBy(e),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds));else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}qe(t)}}});en.addInitHook("addHandler","keyboard",Qi),en.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var to=mn.extend({addHooks:function(){Oe(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ne(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Ke(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),i),qe(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,s=n?Math.ceil(o/n)*n:o,r=t._limitZoom(e+(this._delta>0?s:-s))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});en.addInitHook("addHandler","scrollWheelZoom",to),en.mergeOptions({tap:!0,tapTolerance:15});var eo=mn.extend({addHooks:function(){Oe(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ne(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Fe(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new z(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&_e(n,"leaflet-active"),this._holdTimeout=setTimeout(o((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))}),this),1e3),this._simulateEvent("mousedown",e),Oe(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Ne(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&ge(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new z(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});!Lt||$t&&!ut||en.addInitHook("addHandler","tap",eo),en.mergeOptions({touchZoom:Lt&&!st,bounceAtZoomLimits:!0});var no=mn.extend({addHooks:function(){_e(this._map._container,"leaflet-touch-zoom"),Oe(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ge(this._map._container,"leaflet-touch-zoom"),Ne(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Oe(document,"touchmove",this._onTouchMove,this),Oe(document,"touchend",this._onTouchEnd,this),Fe(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),s=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&s<1||this._zoom>e.getMaxZoom()&&s>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var r=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===r.x&&0===r.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),E(this._animRequest);var a=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=P(a,this,!0),Fe(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,E(this._animRequest),Ne(document,"touchmove",this._onTouchMove,this),Ne(document,"touchend",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});en.addInitHook("addHandler","touchZoom",no),en.BoxZoom=Yi,en.DoubleClickZoom=Xi,en.Drag=Ji,en.Keyboard=Qi,en.ScrollWheelZoom=to,en.Tap=eo,en.TouchZoom=no,t.version=e,t.Control=on,t.control=sn,t.Browser=zt,t.Evented=A,t.Mixin=_n,t.Util=k,t.Class=M,t.Handler=mn,t.extend=n,t.bind=o,t.stamp=r,t.setOptions=p,t.DomEvent=Qe,t.DomUtil=ze,t.PosAnimation=tn,t.Draggable=bn,t.LineUtil=On,t.PolyUtil=Nn,t.Point=z,t.point=I,t.Bounds=N,t.bounds=B,t.Transformation=V,t.transformation=K,t.Projection=Zn,t.LatLng=R,t.latLng=j,t.LatLngBounds=D,t.latLngBounds=Z,t.CRS=W,t.GeoJSON=ci,t.geoJSON=yi,t.geoJson=bi,t.Layer=Wn,t.LayerGroup=Fn,t.layerGroup=qn,t.FeatureGroup=Un,t.featureGroup=Vn,t.ImageOverlay=wi,t.imageOverlay=xi,t.VideoOverlay=$i,t.videoOverlay=Li,t.SVGOverlay=Ti,t.svgOverlay=Pi,t.DivOverlay=Ei,t.Popup=ki,t.popup=Mi,t.Tooltip=Ci,t.tooltip=Si,t.Icon=Kn,t.icon=Gn,t.DivIcon=Ai,t.divIcon=zi,t.Marker=Jn,t.marker=Qn,t.TileLayer=Ni,t.tileLayer=Bi,t.GridLayer=Oi,t.gridLayer=Ii,t.SVG=Ui,t.svg=Vi,t.Renderer=Ri,t.Canvas=ji,t.canvas=Hi,t.Path=ti,t.CircleMarker=ei,t.circleMarker=ni,t.Circle=ii,t.circle=oi,t.Polyline=si,t.polyline=ri,t.Polygon=ai,t.polygon=li,t.Rectangle=Ki,t.rectangle=Gi,t.Map=en,t.map=nn;var io=window.L;t.noConflict=function(){return window.L=io,this},window.L=t}(tn.exports)),tn.exports}var nn=en();function on(e){let n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,k,M,A,z,O,I,N,B,D;return{c(){n=x("div"),i=x("div"),o=$("map center: "),s=$(e[0]),r=T(),a=x("a"),l=$("view on osm.org"),c=T(),h=x("br"),u=$("\n map zoom: "),d=$(e[1]),p=T(),m=x("br"),f=$("\n viewbox: "),_=$(e[2]),g=T(),w=x("br"),L=$("\n last click: "),P=$(e[4]),k=T(),M=x("br"),A=$("\n mouse position: "),z=$(e[5]),O=T(),I=x("div"),N=x("a"),N.textContent="hide",C(a,"target","_blank"),C(a,"href",e[3]),C(i,"id","map-position-inner"),C(N,"href","#hide"),C(I,"id","map-position-close"),C(I,"class","svelte-1b30dq3"),C(n,"id","map-position"),C(n,"class","svelte-1b30dq3")},m(t,e){y(t,n,e),v(n,i),v(i,o),v(i,s),v(i,r),v(i,a),v(a,l),v(i,c),v(i,h),v(i,u),v(i,d),v(i,p),v(i,m),v(i,f),v(i,_),v(i,g),v(i,w),v(i,L),v(i,P),v(i,k),v(i,M),v(i,A),v(i,z),v(n,O),v(n,I),v(I,N),B||(D=E(N,"click",sn),B=!0)},p(t,[e]){1&e&&S(s,t[0]),8&e&&C(a,"href",t[3]),2&e&&S(d,t[1]),4&e&&S(_,t[2]),16&e&&S(P,t[4]),32&e&&S(z,t[5])},i:t,o:t,d(t){t&&b(n),B=!1,D()}}}function sn(){document.getElementById("map-position").style.display="none",document.getElementById("show-map-position").style.display="block"}function rn(t,e,n){let i,o,s,r,a,l,c;function h(t,e){n(0,o=t.getCenter().lat.toFixed(5)+","+t.getCenter().lng.toFixed(5)),n(3,a=function(t){return"https://openstreetmap.org/#map="+t.getZoom()+"/"+t.getCenter().lat.toFixed(5)+"/"+t.getCenter().lng.toFixed(5)}(t)),n(1,s=t.getZoom()),n(2,r=function(t){var e=t.getBounds(),n=e.getWest(),i=e.getEast();return i-n>=360&&(n=t.getCenter().lng-179.999,i=t.getCenter().lng+179.999),i=L.latLng(77,i).wrap().lng,[(n=L.latLng(77,n).wrap().lng).toFixed(5),e.getNorth().toFixed(5),i.toFixed(5),e.getSouth().toFixed(5)].join(",")}(t)),n(5,c="-"),e&&n(5,c=[e.lat.toFixed(5),e.lng.toFixed(5)].join(",")),i&&n(4,l=[i.lat.toFixed(5),i.lng.toFixed(5)].join(","))}return ut.subscribe((t=>{t&&(t.on("move",(function(){h(t)})),t.on("mousemove",(function(e){h(t,e.latlng)})),t.on("click",(function(e){i=e.latlng,h(t)})),t.on("load",(function(){h(t)})))})),[o,s,r,a,l,c]}!function(t,e){!function(e,n){t.exports=e(en()),void 0!==n&&n.L&&(n.L.Control.MiniMap=e(L),n.L.control.minimap=function(t,e){return new n.L.Control.MiniMap(t,e)})}((function(t){var e=t.Control.extend({includes:t.Evented?t.Evented.prototype:t.Mixin.Events,options:{position:"bottomright",toggleDisplay:!1,zoomLevelOffset:-5,zoomLevelFixed:!1,centerFixed:!1,zoomAnimation:!1,autoToggleDisplay:!1,minimized:!1,width:150,height:150,collapsedWidth:19,collapsedHeight:19,aimingRectOptions:{color:"#ff7800",weight:1,clickable:!1},shadowRectOptions:{color:"#000000",weight:1,clickable:!1,opacity:0,fillOpacity:0},strings:{hideText:"Hide MiniMap",showText:"Show MiniMap"},mapOptions:{}},initialize:function(e,n){t.Util.setOptions(this,n),this.options.aimingRectOptions.clickable=!1,this.options.shadowRectOptions.clickable=!1,this._layer=e},onAdd:function(e){this._mainMap=e,this._container=t.DomUtil.create("div","leaflet-control-minimap"),this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",t.DomEvent.disableClickPropagation(this._container),t.DomEvent.on(this._container,"mousewheel",t.DomEvent.stopPropagation);var n={attributionControl:!1,dragging:!this.options.centerFixed,zoomControl:!1,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:e.options.crs};return n=t.Util.extend(this.options.mapOptions,n),this._miniMap=new t.Map(this._container,n),this._miniMap.addLayer(this._layer),this._mainMapMoving=!1,this._miniMapMoving=!1,this._userToggledDisplay=!1,this._minimized=!1,this.options.toggleDisplay&&this._addToggleButton(),this._miniMap.whenReady(t.Util.bind((function(){this._aimingRect=t.rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._miniMap),this._shadowRect=t.rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._miniMap),this._mainMap.on("moveend",this._onMainMapMoved,this),this._mainMap.on("move",this._onMainMapMoving,this),this._miniMap.on("movestart",this._onMiniMapMoveStarted,this),this._miniMap.on("move",this._onMiniMapMoving,this),this._miniMap.on("moveend",this._onMiniMapMoved,this)}),this)),this._container},addTo:function(e){t.Control.prototype.addTo.call(this,e);var n=this.options.centerFixed||this._mainMap.getCenter();return this._miniMap.setView(n,this._decideZoom(!0)),this._setDisplay(this.options.minimized),this},onRemove:function(t){this._mainMap.off("moveend",this._onMainMapMoved,this),this._mainMap.off("move",this._onMainMapMoving,this),this._miniMap.off("moveend",this._onMiniMapMoved,this),this._miniMap.removeLayer(this._layer)},changeLayer:function(t){this._miniMap.removeLayer(this._layer),this._layer=t,this._miniMap.addLayer(this._layer)},_addToggleButton:function(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton("",this._toggleButtonInitialTitleText(),"leaflet-control-minimap-toggle-display leaflet-control-minimap-toggle-display-"+this.options.position,this._container,this._toggleDisplayButtonClicked,this):void 0,this._toggleDisplayButton.style.width=this.options.collapsedWidth+"px",this._toggleDisplayButton.style.height=this.options.collapsedHeight+"px"},_toggleButtonInitialTitleText:function(){return this.options.minimized?this.options.strings.showText:this.options.strings.hideText},_createButton:function(e,n,i,o,s,r){var a=t.DomUtil.create("a",i,o);a.innerHTML=e,a.href="#",a.title=n;var l=t.DomEvent.stopPropagation;return t.DomEvent.on(a,"click",l).on(a,"mousedown",l).on(a,"dblclick",l).on(a,"click",t.DomEvent.preventDefault).on(a,"click",s,r),a},_toggleDisplayButtonClicked:function(){this._userToggledDisplay=!0,this._minimized?this._restore():this._minimize()},_setDisplay:function(t){t!==this._minimized&&(this._minimized?this._restore():this._minimize())},_minimize:function(){this.options.toggleDisplay?(this._container.style.width=this.options.collapsedWidth+"px",this._container.style.height=this.options.collapsedHeight+"px",this._toggleDisplayButton.className+=" minimized-"+this.options.position,this._toggleDisplayButton.title=this.options.strings.showText):this._container.style.display="none",this._minimized=!0,this._onToggle()},_restore:function(){this.options.toggleDisplay?(this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",this._toggleDisplayButton.className=this._toggleDisplayButton.className.replace("minimized-"+this.options.position,""),this._toggleDisplayButton.title=this.options.strings.hideText):this._container.style.display="block",this._minimized=!1,this._onToggle()},_onMainMapMoved:function(t){if(this._miniMapMoving)this._miniMapMoving=!1;else{var e=this.options.centerFixed||this._mainMap.getCenter();this._mainMapMoving=!0,this._miniMap.setView(e,this._decideZoom(!0)),this._setDisplay(this._decideMinimized())}this._aimingRect.setBounds(this._mainMap.getBounds())},_onMainMapMoving:function(t){this._aimingRect.setBounds(this._mainMap.getBounds())},_onMiniMapMoveStarted:function(t){if(!this.options.centerFixed){var e=this._aimingRect.getBounds(),n=this._miniMap.latLngToContainerPoint(e.getSouthWest()),i=this._miniMap.latLngToContainerPoint(e.getNorthEast());this._lastAimingRectPosition={sw:n,ne:i}}},_onMiniMapMoving:function(e){this.options.centerFixed||!this._mainMapMoving&&this._lastAimingRectPosition&&(this._shadowRect.setBounds(new t.LatLngBounds(this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.ne))),this._shadowRect.setStyle({opacity:1,fillOpacity:.3}))},_onMiniMapMoved:function(t){this._mainMapMoving?this._mainMapMoving=!1:(this._miniMapMoving=!0,this._mainMap.setView(this._miniMap.getCenter(),this._decideZoom(!1)),this._shadowRect.setStyle({opacity:0,fillOpacity:0}))},_isZoomLevelFixed:function(){var t=this.options.zoomLevelFixed;return this._isDefined(t)&&this._isInteger(t)},_decideZoom:function(t){if(this._isZoomLevelFixed())return t?this.options.zoomLevelFixed:this._mainMap.getZoom();if(t)return this._mainMap.getZoom()+this.options.zoomLevelOffset;var e,n=this._miniMap.getZoom()-this._mainMap.getZoom(),i=this._miniMap.getZoom()-this.options.zoomLevelOffset;return n>this.options.zoomLevelOffset&&this._mainMap.getZoom()<this._miniMap.getMinZoom()-this.options.zoomLevelOffset?this._miniMap.getZoom()>this._lastMiniMapZoom?(e=this._mainMap.getZoom()+1,this._miniMap.setZoom(this._miniMap.getZoom()-1)):e=this._mainMap.getZoom():e=i,this._lastMiniMapZoom=this._miniMap.getZoom(),e},_decideMinimized:function(){return this._userToggledDisplay?this._minimized:this.options.autoToggleDisplay?!!this._mainMap.getBounds().contains(this._miniMap.getBounds()):this._minimized},_isInteger:function(t){return"number"==typeof t},_isDefined:function(t){return void 0!==t},_onToggle:function(){t.Util.requestAnimFrame((function(){t.DomEvent.on(this._container,"transitionend",this._fireToggleEvents,this),t.Browser.any3d||t.Util.requestAnimFrame(this._fireToggleEvents,this)}),this)},_fireToggleEvents:function(){t.DomEvent.off(this._container,"transitionend",this._fireToggleEvents,this);var e={minimized:this._minimized};this.fire(this._minimized?"minimize":"restore",e),this.fire("toggle",e)}});return t.Map.mergeOptions({miniMapControl:!1}),t.Map.addInitHook((function(){this.options.miniMapControl&&(this.miniMapControl=(new e).addTo(this))})),e}),window)}({exports:{}});class an extends lt{constructor(t){super(),at(this,t,rn,on,r,{})}}function ln(e){let n,i,r,a,l,c,h,u;return n=new an({}),{c(){it(n.$$.fragment),i=T(),r=x("div"),a=T(),l=x("div"),l.textContent="show map bounds",C(r,"id","map"),C(r,"class","svelte-1vbvdrk"),C(l,"id","show-map-position"),C(l,"class","leaflet-bar btn btn-sm btn-outline-secondary svelte-1vbvdrk")},m(o,d){var p;ot(n,o,d),y(o,i,d),y(o,r,d),y(o,a,d),y(o,l,d),c=!0,h||(u=[(p=e[0].call(null,r),p&&s(p.destroy)?p.destroy:t),E(l,"click",M(cn))],h=!0)},p:t,i(t){c||(tt(n.$$.fragment,t),c=!0)},o(t){et(n.$$.fragment,t),c=!1},d(t){st(n,t),t&&b(i),t&&b(r),t&&b(a),t&&b(l),h=!1,o(u)}}}function cn(t){t.target.style.display="none",document.getElementById("map-position").style.display="block"}function hn(t,e,n){let{display_minimap:i=!1}=e,{current_result:o=null}=e,{position_marker:s=null}=e,r=[];function a(t){let e=u(ut);if(!e)return;if(function(){let t=u(ut);t&&r.forEach((function(e){t.removeLayer(e)}))}(),s){let t=nn.circleMarker(s,{radius:5,weight:2,fillColor:"#ff7800",color:"red",opacity:.75,zIndexOffset:100,clickable:!1});t.bindTooltip(`Search (${s[0]},${s[1]})`).openTooltip(),t.addTo(e),r.push(t)}var n=new URLSearchParams(window.location.search).get("viewbox");if(n){let t=n.split(","),i=nn.latLngBounds([t[1],t[0]],[t[3],t[2]]);nn.rectangle(i,{color:"#69d53e",weight:3,dashArray:"5 5",opacity:.8,fill:!1}).addTo(e)}if(!t)return;let i=t.centroid?t.centroid.coordinates[1]:t.lat,o=t.centroid?t.centroid.coordinates[0]:t.lon,a=t.geometry||t.geojson;if(i&&o){let t=nn.circleMarker([i,o],{radius:10,weight:2,fillColor:"#ff7800",color:"blue",opacity:.75});s&&t.bindTooltip("Result").openTooltip(),e.addLayer(t),r.push(t)}if(a){var l=nn.geoJson({type:"FeatureCollection",features:[{type:"Feature",geometry:a,properties:{}}]},{style:()=>({interactive:!1,color:"blue"})});e.addLayer(l),r.push(l),e.fitBounds(l.getBounds())}else i&&o&&s?e.fitBounds([[i,o],s],{padding:[50,50]}):i&&o&&e.setView([i,o],10)}return t.$$set=t=>{"display_minimap"in t&&n(1,i=t.display_minimap),"current_result"in t&&n(2,o=t.current_result),"position_marker"in t&&n(3,s=t.position_marker)},t.$$.update=()=>{4&t.$$.dirty&&a(o)},[function(t){let e=function(t){const e=Nominatim_Config.Map_Tile_Attribution;let n=new nn.map(t,{attributionControl:e&&e.length,scrollWheelZoom:!0,touchZoom:!1,center:[Nominatim_Config.Map_Default_Lat,Nominatim_Config.Map_Default_Lon],zoom:Nominatim_Config.Map_Default_Zoom});if(nn.tileLayer(Nominatim_Config.Map_Tile_URL,{attribution:e}).addTo(n),i){let t=new nn.TileLayer(Nominatim_Config.Map_Tile_URL,{minZoom:0,maxZoom:13,attribution:e});new nn.Control.MiniMap(t,{toggleDisplay:!0}).addTo(n)}const o=nn.Control.extend({options:{position:"topright"},onAdd:()=>document.getElementById("show-map-position")});return n.addControl(new o),n}(t);return ut.set(e),a(o),{destroy:()=>{ut.set(null),e.remove()}}},i,o,s]}class un extends lt{constructor(t){super(),at(this,t,hn,ln,r,{display_minimap:1,current_result:2,position_marker:3})}}function dn(t){let e,n;return e=new fe({props:{api_request_params:t[0],bStructuredSearch:t[2]}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.api_request_params=t[0]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function pn(t){let e,n,i,o,s,r,a,l,c,h;function u(e){t[4](e)}e=new oe({props:{$$slots:{default:[dn]},$$scope:{ctx:t}}});let d={reverse_search:!1};return void 0!==t[1]&&(d.current_result=t[1]),s=new Je({props:d}),Z.push((()=>nt(s,"current_result",u))),c=new un({props:{current_result:t[1],display_minimap:!0}}),{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),it(s.$$.fragment),a=T(),l=x("div"),it(c.$$.fragment),C(o,"class","sidebar svelte-1d53ob0"),C(l,"id","map-wrapper"),C(l,"class","svelte-1d53ob0"),C(i,"id","content"),C(i,"class","svelte-1d53ob0")},m(t,r){ot(e,t,r),y(t,n,r),y(t,i,r),v(i,o),ot(s,o,null),v(i,a),v(i,l),ot(c,l,null),h=!0},p(t,[n]){const i={};65&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i);const o={};!r&&2&n&&(r=!0,o.current_result=t[1],q((()=>r=!1))),s.$set(o);const a={};2&n&&(a.current_result=t[1]),c.$set(a)},i(t){h||(tt(e.$$.fragment,t),tt(s.$$.fragment,t),tt(c.$$.fragment,t),h=!0)},o(t){et(e.$$.fragment,t),et(s.$$.fragment,t),et(c.$$.fragment,t),h=!1},d(t){st(e,t),t&&b(n),t&&b(i),st(s),st(c)}}}function mn(t,e,n){let i,o,s;return d(t,ft,(t=>n(3,i=t))),t.$$.update=()=>{if(8&t.$$.dirty){let t=i;"search"===t.tab&&function(t){Pt(),n(0,o={q:t.get("q"),street:t.get("street"),city:t.get("city"),county:t.get("county"),state:t.get("state"),country:t.get("country"),postalcode:t.get("postalcode"),polygon_geojson:Nominatim_Config.Search_AreaPolygons?1:0,viewbox:t.get("viewbox"),bounded:t.get("bounded"),dedupe:t.has("dedupe")&&"1"!==t.get("dedupe")?0:1,"accept-language":t.get("accept-language"),countrycodes:t.get("countrycodes"),limit:t.get("limit"),polygon_threshold:t.get("polygon_threshold"),exclude_place_ids:t.get("exclude_place_ids"),format:"jsonv2"});let e=o.street||o.city||o.county||o.state||o.country||o.postalcode;o.q||e?xt("search",o,(function(t){dt.set(t),Pt("Result for "+o.q),e?(document.querySelector(".nav-tabs a[href='#structured']").click(),document.querySelector("input[name=street]").focus()):document.querySelector("input[name=q]").focus()})):dt.set(void 0)}(t.params)}},[o,s,undefined,i,function(t){s=t,n(1,s)}]}class fn extends lt{constructor(t){super(),at(this,t,mn,pn,r,{})}}function _n(t,e,n){const i=t.slice();return i[8]=e[n],i[10]=n,i}function gn(e){let n,i,o,s,r,a=e[8]+"";return{c(){n=x("option"),i=$(e[10]),o=$(" - "),s=$(a),n.__value=r=e[10],n.value=n.__value},m(t,e){y(t,n,e),v(n,i),v(n,o),v(n,s)},p:t,d(t){t&&b(n)}}}function vn(t){let e,n,i,s,r,a,l,c,h,u,d,p,m,f,_,g,$,L,P,S,O,I,N=ke(),B=[];for(let e=0;e<N.length;e+=1)B[e]=gn(_n(t,N,e));return{c(){e=x("div"),e.innerHTML='<label for="reverse-lat" class="svelte-1pqxd6v">lat</label>',n=T(),i=x("div"),s=x("input"),r=T(),a=x("div"),l=x("a"),l.textContent="<>",c=T(),h=x("div"),h.innerHTML='<label for="reverse-lon" class="svelte-1pqxd6v">lon</label>',u=T(),d=x("div"),p=x("input"),m=T(),f=x("div"),f.innerHTML='<label for="reverse-zoom" class="svelte-1pqxd6v">max zoom</label>',_=T(),g=x("div"),$=x("select"),L=x("option"),L.textContent="---";for(let t=0;t<B.length;t+=1)B[t].c();P=T(),S=x("div"),S.innerHTML='<button type="submit" class="btn btn-primary btn-sm mx-1">Search</button>',C(e,"class","col-auto"),C(s,"id","reverse-lat"),C(s,"name","lat"),C(s,"type","text"),C(s,"class","form-control form-control-sm d-inline svelte-1pqxd6v"),C(s,"placeholder","latitude"),C(s,"pattern","^-?\\d+(\\.\\d+)?$"),C(i,"class","col-auto"),C(l,"id","switch-coords"),C(l,"class","btn btn-outline-secondary btn-sm svelte-1pqxd6v"),C(l,"title","switch lat and lon"),C(a,"class","col-auto"),C(h,"class","col-auto"),C(p,"id","reverse-lon"),C(p,"name","lon"),C(p,"type","text"),C(p,"class","form-control form-control-sm svelte-1pqxd6v"),C(p,"placeholder","longitude"),C(p,"pattern","^-?\\d+(\\.\\d+)?$"),C(d,"class","col-auto"),C(f,"class","col-auto"),L.__value="",L.value=L.__value,C($,"id","reverse-zoom"),C($,"name","zoom"),C($,"class","form-select form-select-sm svelte-1pqxd6v"),void 0===t[2]&&F((()=>t[7].call($))),C(g,"class","col-auto"),C(S,"class","col-auto")},m(o,b){y(o,e,b),y(o,n,b),y(o,i,b),v(i,s),A(s,t[0]),y(o,r,b),y(o,a,b),v(a,l),y(o,c,b),y(o,h,b),y(o,u,b),y(o,d,b),v(d,p),A(p,t[1]),y(o,m,b),y(o,f,b),y(o,_,b),y(o,g,b),v(g,$),v($,L);for(let t=0;t<B.length;t+=1)B[t].m($,null);z($,t[2]),y(o,P,b),y(o,S,b),O||(I=[E(s,"input",t[4]),E(s,"change",bn),E(l,"click",M(k(t[5]))),E(p,"input",t[6]),E($,"change",t[7])],O=!0)},p(t,e){if(1&e&&s.value!==t[0]&&A(s,t[0]),2&e&&p.value!==t[1]&&A(p,t[1]),0&e){let n;for(N=ke(),n=0;n<N.length;n+=1){const i=_n(t,N,n);B[n]?B[n].p(i,e):(B[n]=gn(i),B[n].c(),B[n].m($,null))}for(;n<B.length;n+=1)B[n].d(1);B.length=N.length}4&e&&z($,t[2])},d(t){t&&b(e),t&&b(n),t&&b(i),t&&b(r),t&&b(a),t&&b(c),t&&b(h),t&&b(u),t&&b(d),t&&b(m),t&&b(f),t&&b(_),t&&b(g),w(B,t),t&&b(P),t&&b(S),O=!1,o(I)}}}function yn(t){let e,n;return e=new ae({props:{page:"reverse",$$slots:{default:[vn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,[n]){const i={};2055&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function bn(t){var e=t.target.value.split(",");2===e.length&&(document.querySelector("input[name=lat]").value=L.Util.trim(e[0]),document.querySelector("input[name=lon]").value=L.Util.trim(e[1]))}function wn(t,e,n){let{lat:i=""}=e,{lon:o=""}=e,{zoom:s=""}=e;function r(t,e,n){if(null===t||null===e)return;let i=new URLSearchParams;i.set("lat",t),i.set("lon",e),i.set("zoom",n||s),vt("reverse",i)}ut.subscribe((t=>{t&&t.on("click",(t=>{let e=t.latlng.wrap();r(e.lat.toFixed(5),e.lng.toFixed(5))}))}));return t.$$set=t=>{"lat"in t&&n(0,i=t.lat),"lon"in t&&n(1,o=t.lon),"zoom"in t&&n(2,s=t.zoom)},[i,o,s,r,function(){i=this.value,n(0,i)},()=>r(o,i),function(){o=this.value,n(1,o)},function(){s=function(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}(this),n(2,s)}]}class xn extends lt{constructor(t){super(),at(this,t,wn,yn,r,{lat:0,lon:1,zoom:2})}}function $n(t){let n,i;const o=[t[0]];let s={};for(let t=0;t<o.length;t+=1)s=e(s,o[t]);return n=new xn({props:s}),{c(){it(n.$$.fragment)},m(t,e){ot(n,t,e),i=!0},p(t,e){const i=1&e?function(t,e){const n={},i={},o={$$scope:1};let s=t.length;for(;s--;){const r=t[s],a=e[s];if(a){for(const t in r)t in a||(i[t]=1);for(const t in a)o[t]||(n[t]=a[t],o[t]=1);t[s]=a}else for(const t in r)o[t]=1}for(const t in i)t in n||(n[t]=void 0);return n}(o,[(s=t[0],"object"==typeof s&&null!==s?s:{})]):{};var s;n.$set(i)},i(t){i||(tt(n.$$.fragment,t),i=!0)},o(t){et(n.$$.fragment,t),i=!1},d(t){st(n,t)}}}function Ln(t){let e,n,i,o,s,r,a,l,c,h;function u(e){t[4](e)}e=new oe({props:{$$slots:{default:[$n]},$$scope:{ctx:t}}});let d={reverse_search:!0};return void 0!==t[1]&&(d.current_result=t[1]),s=new Je({props:d}),Z.push((()=>nt(s,"current_result",u))),c=new un({props:{current_result:t[1],position_marker:t[2],display_minimap:!0}}),{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),it(s.$$.fragment),a=T(),l=x("div"),it(c.$$.fragment),C(o,"class","sidebar svelte-1d53ob0"),C(l,"id","map-wrapper"),C(l,"class","svelte-1d53ob0"),C(i,"id","content"),C(i,"class","svelte-1d53ob0")},m(t,r){ot(e,t,r),y(t,n,r),y(t,i,r),v(i,o),ot(s,o,null),v(i,a),v(i,l),ot(c,l,null),h=!0},p(t,[n]){const i={};65&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i);const o={};!r&&2&n&&(r=!0,o.current_result=t[1],q((()=>r=!1))),s.$set(o);const a={};2&n&&(a.current_result=t[1]),4&n&&(a.position_marker=t[2]),c.$set(a)},i(t){h||(tt(e.$$.fragment,t),tt(s.$$.fragment,t),tt(c.$$.fragment,t),h=!0)},o(t){et(e.$$.fragment,t),et(s.$$.fragment,t),et(c.$$.fragment,t),h=!1},d(t){st(e,t),t&&b(n),t&&b(i),st(s),st(c)}}}function Tn(t,e,n){let i,o,s,r;return d(t,ft,(t=>n(3,i=t))),t.$$.update=()=>{if(8&t.$$.dirty){let t=i;"reverse"===t.tab&&(e=t.params,Pt(),n(0,o={lat:e.get("lat"),lon:e.get("lon"),zoom:e.get("zoom")>1?Number(e.get("zoom")):Number(Nominatim_Config.Reverse_Default_Search_Zoom),format:"jsonv2"}),o.lat||o.lat?xt("reverse",o,(function(t){t&&!t.error?(n(2,r=[o.lat,o.lon]),dt.set([t])):dt.set([]),Pt("Reverse result for "+o.lat+","+o.lon),document.querySelector("input[name=lat]").focus()})):dt.set(void 0))}var e},[o,s,r,i,function(t){s=t,n(1,s)}]}class Pn extends lt{constructor(t){super(),at(this,t,Tn,Ln,r,{})}}function En(e){let n,i,o,s,r,a,l,c,h,u,d;return{c(){n=x("form"),i=x("div"),o=x("div"),s=x("input"),a=T(),l=x("div"),l.innerHTML='<button type="submit" class="btn btn-primary btn-sm">Show</button>',c=T(),h=x("small"),h.innerHTML='OSM type+id (<em class="svelte-1kvo9ki">N123</em>, <em class="svelte-1kvo9ki">n123</em>, <em class="svelte-1kvo9ki">W123</em>, <em class="svelte-1kvo9ki">w123</em>, <em class="svelte-1kvo9ki">R123</em>, <em class="svelte-1kvo9ki">r123</em>),\n Place id (<em class="svelte-1kvo9ki">1234</em>) or\n URL (<em class="svelte-1kvo9ki">https://openstreetmap.org/way/123</em>)',C(s,"type","edit"),C(s,"class","form-control form-control-sm me-1 svelte-1kvo9ki"),C(s,"pattern","^[NWRnwr]?[0-9]+$|.*openstreetmap.*"),s.value=r=""+((e[0].osmtype||"")+(e[0].osmid||"")+(e[0].place_id||"")),C(o,"class","col-auto"),C(l,"class","col-auto"),C(i,"class","row g-1"),C(n,"class","form-inline svelte-1kvo9ki"),C(n,"action","details.html"),C(h,"class","form-text text-muted svelte-1kvo9ki")},m(t,r){y(t,n,r),v(n,i),v(i,o),v(o,s),v(i,a),v(i,l),y(t,c,r),y(t,h,r),u||(d=E(n,"submit",k(e[1])),u=!0)},p(t,[e]){1&e&&r!==(r=""+((t[0].osmtype||"")+(t[0].osmid||"")+(t[0].place_id||"")))&&s.value!==r&&(s.value=r)},i:t,o:t,d(t){t&&b(n),t&&b(c),t&&b(h),u=!1,d()}}}function kn(t,e,n){let{api_request_params:i={}}=e;return t.$$set=t=>{"api_request_params"in t&&n(0,i=t.api_request_params)},[i,function(t){let e=t.target.querySelector("input[type=edit]").value.trim(),n=e.match(/^\s*([NWR])(\d+)\s*$/i)||e.match(/\/(relation|way|node)\/(\d+)\s*$/);var i=new URLSearchParams;if(n)i.set("osmtype",n[1].charAt(0).toUpperCase()),i.set("osmid",n[2]);else{if(!e.match(/^\d+$/))return void alert("invalid input");i.set("place_id",e)}vt("details",i)}]}class Mn extends lt{constructor(t){super(),at(this,t,kn,En,r,{api_request_params:0})}}function Cn(e){let n;return{c(){n=x("span"),n.textContent="No Name",C(n,"class","noname")},m(t,e){y(t,n,e)},p:t,d(t){t&&b(n)}}}function Sn(t){let e,n=t[0].localname+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].localname+"")&&S(e,n)},d(t){t&&b(e)}}}function An(t){let e,n;return e=new Mt({props:{page:"search",params_hash:{postalcode:t[0].localname},$$slots:{default:[In]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.params_hash={postalcode:t[0].localname}),32&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function zn(t){let e,n;return e=new Mt({props:{page:"search",params_hash:{country:t[0].localname},$$slots:{default:[Nn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.params_hash={country:t[0].localname}),32&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function On(t){let e,n;return e=new ze({props:{feature:t[0],$$slots:{default:[Bn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.feature=t[0]),32&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function In(t){let e;return{c(){e=$("search by name")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Nn(t){let e;return{c(){e=$("search by name")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Bn(t){let e;return{c(){e=$("details")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Dn(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,E,k=Le(t[0])+"",M=ve(t[0])+"",A=t[0].rank_address+"",z=Te(t[0].admin_level)+"",I=Pe(t[0].distance,t[1])+"";function N(t,e){return t[0].localname?Sn:Cn}let B=N(t),D=B(t);const Z=[On,zn,An],R=[];function j(t,e){return 9&e&&(w=null),t[0].osm_id?0:(null==w&&(w=!(t[3]||!t[0].type.match(/^country/))),w?1:t[3]||"postcode"!==t[0].type?-1:2)}return~(L=j(t,-1))&&(P=R[L]=Z[L](t)),{c(){e=x("tr"),n=x("td"),D.c(),i=T(),o=x("td"),s=$(k),r=T(),a=x("td"),l=T(),c=x("td"),h=$(A),u=T(),d=x("td"),p=$(z),m=T(),f=x("td"),_=T(),g=x("td"),P&&P.c(),C(n,"class","name fw-bold svelte-6a43i0"),C(o,"class","svelte-6a43i0"),C(a,"class","svelte-6a43i0"),C(c,"class","svelte-6a43i0"),C(d,"class","svelte-6a43i0"),C(f,"class","svelte-6a43i0"),C(g,"class","svelte-6a43i0"),C(e,"class","svelte-6a43i0"),O(e,"notused",t[2]&&!t[4])},m(t,b){y(t,e,b),v(e,n),D.m(n,null),v(e,i),v(e,o),v(o,s),v(e,r),v(e,a),a.innerHTML=M,v(e,l),v(e,c),v(c,h),v(e,u),v(e,d),v(d,p),v(e,m),v(e,f),f.innerHTML=I,v(e,_),v(e,g),~L&&R[L].m(g,null),E=!0},p(t,[i]){B===(B=N(t))&&D?D.p(t,i):(D.d(1),D=B(t),D&&(D.c(),D.m(n,null))),(!E||1&i)&&k!==(k=Le(t[0])+"")&&S(s,k),(!E||1&i)&&M!==(M=ve(t[0])+"")&&(a.innerHTML=M),(!E||1&i)&&A!==(A=t[0].rank_address+"")&&S(h,A),(!E||1&i)&&z!==(z=Te(t[0].admin_level)+"")&&S(p,z),(!E||3&i)&&I!==(I=Pe(t[0].distance,t[1])+"")&&(f.innerHTML=I);let o=L;L=j(t,i),L===o?~L&&R[L].p(t,i):(P&&(J(),et(R[o],1,1,(()=>{R[o]=null})),Q()),~L?(P=R[L],P?P.p(t,i):(P=R[L]=Z[L](t),P.c()),tt(P,1),P.m(g,null)):P=null),20&i&&O(e,"notused",t[2]&&!t[4])},i(t){E||(tt(P),E=!0)},o(t){et(P),E=!1},d(t){t&&b(e),D.d(),~L&&R[L].d()}}}function Zn(t,e,n){let i,o,{addressLine:s}=e,{bDistanceInMeters:r}=e,{bMarkUnusedLines:a=!1}=e;return t.$$set=t=>{"addressLine"in t&&n(0,s=t.addressLine),"bDistanceInMeters"in t&&n(1,r=t.bDistanceInMeters),"bMarkUnusedLines"in t&&n(2,a=t.bMarkUnusedLines)},t.$$.update=()=>{1&t.$$.dirty&&n(4,i=s.isaddress)},n(3,o=Nominatim_Config.Reverse_Only),[s,r,a,o,i]}class Rn extends lt{constructor(t){super(),at(this,t,Zn,Dn,r,{addressLine:0,bDistanceInMeters:1,bMarkUnusedLines:2})}}function jn(e){let n,i,s,r,a,l,c,h,u,d,p,m,f;return{c(){n=$("("),i=x("a"),i.textContent="how?",s=$(")\n\n"),r=x("div"),a=x("button"),a.innerHTML='<span aria-hidden="true">×</span>',l=$("\n\n Nightly calculated from nearby places having this postcode.\n "),c=x("a"),c.textContent="Documentation",h=$(".\n You can search for those with an "),u=x("a"),d=$("Overpass Turbo query"),p=$("."),C(i,"href","#openHint"),C(a,"type","button"),C(a,"class","close svelte-yw4tm0"),C(a,"aria-label","Close"),C(c,"href","https://nominatim.org/release-docs/latest/develop/Postcodes/"),C(u,"href",e[0]),C(u,"target","_blank"),C(r,"id","postcode-hint"),C(r,"class","my-2 p-2 svelte-yw4tm0")},m(t,e){y(t,n,e),y(t,i,e),y(t,s,e),y(t,r,e),v(r,a),v(r,l),v(r,c),v(r,h),v(r,u),v(u,d),v(r,p),m||(f=[E(i,"click",M(k(Hn))),E(a,"click",M(Wn))],m=!0)},p:t,i:t,o:t,d(t){t&&b(n),t&&b(i),t&&b(s),t&&b(r),m=!1,o(f)}}}function Hn(){document.getElementById("postcode-hint").style.display="block"}function Wn(){document.getElementById("postcode-hint").style.display="none"}function Fn(t,e,n){let{postcode:i}=e,{lat:o}=e,{lon:s}=e,r=`\n // Based on the map bounds, you can zoom out and rerun the query\n\n [timeout:30]; // in seconds\n\n // we define a shortcut\n // https://wiki.openstreetmap.org/wiki/Overpass_turbo/Extended_Overpass_Turbo_Queries\n {{postcode=${i}}}\n\n (\n node["addr:postcode"="{{postcode}}"]({{bbox}});\n way["addr:postcode"="{{postcode}}"]({{bbox}});\n relation["addr:postcode"="{{postcode}}"]({{bbox}});\n\n node["postal_code"="{{postcode}}"]({{bbox}});\n way["postal_code"="{{postcode}}"]({{bbox}});\n relation["postal_code"="{{postcode}}"]({{bbox}});\n );\n\n out body;\n >;\n out skel qt;\n `.replace(/^ {4}/gm,""),a="https://overpass-turbo.eu/?Q="+encodeURIComponent(r)+"&C="+encodeURIComponent([o,s,15].join(";"))+"&R";return t.$$set=t=>{"postcode"in t&&n(1,i=t.postcode),"lat"in t&&n(2,o=t.lat),"lon"in t&&n(3,s=t.lon)},[a,i,o,s]}class qn extends lt{constructor(t){super(),at(this,t,Fn,jn,r,{postcode:1,lat:2,lon:3})}}function Un(t){let e,n,i,o,s,r;const a=t[2].default,l=p(a,t,t[1],null);return{c(){e=x("tr"),n=x("td"),i=$(t[0]),o=T(),s=x("td"),l&&l.c(),C(n,"class","svelte-1184nr4"),C(s,"class","svelte-1184nr4")},m(t,a){y(t,e,a),v(e,n),v(n,i),v(e,o),v(e,s),l&&l.m(s,null),r=!0},p(t,[e]){(!r||1&e)&&S(i,t[0]),l&&l.p&&(!r||2&e)&&_(l,a,t,t[1],r?f(a,t[1],e,null):g(t[1]),null)},i(t){r||(tt(l,t),r=!0)},o(t){et(l,t),r=!1},d(t){t&&b(e),l&&l.d(t)}}}function Vn(t,e,n){let{$$slots:i={},$$scope:o}=e,{title:s}=e;return t.$$set=t=>{"title"in t&&n(0,s=t.title),"$$scope"in t&&n(1,o=t.$$scope)},[s,o,i]}class Kn extends lt{constructor(t){super(),at(this,t,Vn,Un,r,{title:0})}}function Gn(t,e,n){const i=t.slice();return i[1]=e[n],i}function Yn(t){let e,n,i,o,s,r,a=t[0][t[1]]+"",l=t[1]+"";return{c(){e=x("div"),n=x("span"),i=$(a),o=$(" ("),s=$(l),r=$(")\n "),C(n,"class","name svelte-ndknvb"),C(e,"class","line")},m(t,a){y(t,e,a),v(e,n),v(n,i),v(e,o),v(e,s),v(e,r)},p(t,e){1&e&&a!==(a=t[0][t[1]]+"")&&S(i,a),1&e&&l!==(l=t[1]+"")&&S(s,l)},d(t){t&&b(e)}}}function Xn(e){let n,i=Object.keys(e[0]),o=[];for(let t=0;t<i.length;t+=1)o[t]=Yn(Gn(e,i,t));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();n=P()},m(t,e){for(let n=0;n<o.length;n+=1)o[n].m(t,e);y(t,n,e)},p(t,[e]){if(1&e){let s;for(i=Object.keys(t[0]),s=0;s<i.length;s+=1){const r=Gn(t,i,s);o[s]?o[s].p(r,e):(o[s]=Yn(r),o[s].c(),o[s].m(n.parentNode,n))}for(;s<o.length;s+=1)o[s].d(1);o.length=i.length}},i:t,o:t,d(t){w(o,t),t&&b(n)}}}function Jn(t,e,n){let{items:i}=e;return t.$$set=t=>{"items"in t&&n(0,i=t.items)},[i]}class Qn extends lt{constructor(t){super(),at(this,t,Jn,Xn,r,{items:0})}}function ti(t,e,n){const i=t.slice();return i[7]=e[n],i}function ei(t,e,n){const i=t.slice();return i[10]=e[n],i}function ni(t,e,n){const i=t.slice();return i[13]=e[n],i}function ii(t,e,n){const i=t.slice();return i[13]=e[n],i}function oi(t,e,n){const i=t.slice();return i[18]=e[n],i}function si(t,e,n){const i=t.slice();return i[18]=e[n],i}function ri(t){let e,n;return e=new Mn({props:{api_request_params:t[2]}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};4&n&&(i.api_request_params=t[2]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ai(e){let n;return{c(){n=$("No such place found.")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function li(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,E,k,M,A,z,O,I,N,B,D,Z,R,j,H,W,F,q,U,V,K,G,Y,X,nt,rt,at,lt,ct,ht,ut,dt,pt,mt,ft,_t,gt,vt,yt,bt,wt,xt,$t,Lt=(t[0].localname||`${ge(t[0].osm_type)} ${t[0].osm_id}`)+"",Tt=xe(t[0]);a=new ze({props:{feature:t[0],$$slots:{default:[ci]},$$scope:{ctx:t}}}),h=new Re({props:{aPlace:t[0]}}),_=new Kn({props:{title:"Name",$$slots:{default:[di]},$$scope:{ctx:t}}}),w=new Kn({props:{title:"Type",$$slots:{default:[pi]},$$scope:{ctx:t}}}),P=new Kn({props:{title:"Last Updated",$$slots:{default:[mi]},$$scope:{ctx:t}}});let Pt=Tt&&fi(t);M=new Kn({props:{title:"Search Rank",$$slots:{default:[gi]},$$scope:{ctx:t}}}),z=new Kn({props:{title:"Address Rank",$$slots:{default:[vi]},$$scope:{ctx:t}}});let Et=t[0].calculated_importance&&yi(t);N=new Kn({props:{title:"Coverage",$$slots:{default:[xi]},$$scope:{ctx:t}}}),D=new Kn({props:{title:"Centre Point (lat,lon)",$$slots:{default:[$i]},$$scope:{ctx:t}}}),R=new Kn({props:{title:"OSM",$$slots:{default:[Li]},$$scope:{ctx:t}}}),H=new Kn({props:{title:"Place Id",$$slots:{default:[Ti]},$$scope:{ctx:t}}});let kt=t[0].calculated_wikipedia&&Pi(t);q=new Kn({props:{title:"Computed Postcode",$$slots:{default:[Mi]},$$scope:{ctx:t}}}),V=new Kn({props:{title:"Address Tags",$$slots:{default:[Ci]},$$scope:{ctx:t}}}),G=new Kn({props:{title:"Extra Tags",$$slots:{default:[Si]},$$scope:{ctx:t}}}),rt=new un({props:{current_result:t[0]}});let Mt=t[0].address&&Ai(t),Ct=t[0].linked_places&&Oi(t),St=!t[4]&&Ni(t);const At=[Vi,Ui],zt=[];function Ot(t,e){return t[2].hierarchy?0:1}return wt=Ot(t),xt=zt[wt]=At[wt](t),{c(){e=x("div"),n=x("div"),i=x("h1"),o=$(Lt),s=T(),r=x("small"),it(a.$$.fragment),l=T(),c=x("div"),it(h.$$.fragment),u=T(),d=x("div"),p=x("div"),m=x("table"),f=x("tbody"),it(_.$$.fragment),g=T(),it(w.$$.fragment),L=T(),it(P.$$.fragment),E=T(),Pt&&Pt.c(),k=T(),it(M.$$.fragment),A=T(),it(z.$$.fragment),O=T(),Et&&Et.c(),I=T(),it(N.$$.fragment),B=T(),it(D.$$.fragment),Z=T(),it(R.$$.fragment),j=T(),it(H.$$.fragment),W=T(),kt&&kt.c(),F=T(),it(q.$$.fragment),U=T(),it(V.$$.fragment),K=T(),it(G.$$.fragment),Y=T(),X=x("div"),nt=x("div"),it(rt.$$.fragment),at=T(),lt=x("div"),ct=x("div"),ht=x("h2"),ht.textContent="Address",ut=T(),dt=x("table"),pt=x("thead"),pt.innerHTML="<tr><th>Local name</th> \n <th>Type</th> \n <th>OSM</th> \n <th>Address rank</th> \n <th>Admin level</th> \n <th>Distance</th> \n <th></th></tr>",mt=T(),ft=x("tbody"),Mt&&Mt.c(),_t=T(),Ct&&Ct.c(),gt=T(),St&&St.c(),vt=T(),yt=x("tr"),yt.innerHTML='<td colspan="7" class="svelte-193h58e"><h2 class="svelte-193h58e">Parent Of</h2></td>',bt=T(),xt.c(),C(r,"class","svelte-193h58e"),C(i,"class","svelte-193h58e"),C(n,"class","col-sm-10"),C(c,"class","col-sm-2 text-end"),C(e,"class","row"),C(m,"id","locationdetails"),C(m,"class","table table-striped table-responsive"),C(p,"class","col-md-6"),C(nt,"id","map-wrapper"),C(nt,"class","svelte-193h58e"),C(X,"class","col-md-6"),C(d,"class","row"),C(ht,"class","svelte-193h58e"),C(yt,"class","all-columns svelte-193h58e"),C(dt,"id","address"),C(dt,"class","table table-striped table-small"),C(ct,"class","col-md-12"),C(lt,"class","row")},m(t,b){y(t,e,b),v(e,n),v(n,i),v(i,o),v(i,s),v(i,r),ot(a,r,null),v(e,l),v(e,c),ot(h,c,null),y(t,u,b),y(t,d,b),v(d,p),v(p,m),v(m,f),ot(_,f,null),v(f,g),ot(w,f,null),v(f,L),ot(P,f,null),v(f,E),Pt&&Pt.m(f,null),v(f,k),ot(M,f,null),v(f,A),ot(z,f,null),v(f,O),Et&&Et.m(f,null),v(f,I),ot(N,f,null),v(f,B),ot(D,f,null),v(f,Z),ot(R,f,null),v(f,j),ot(H,f,null),v(f,W),kt&&kt.m(f,null),v(f,F),ot(q,f,null),v(f,U),ot(V,f,null),v(f,K),ot(G,f,null),v(d,Y),v(d,X),v(X,nt),ot(rt,nt,null),y(t,at,b),y(t,lt,b),v(lt,ct),v(ct,ht),v(ct,ut),v(ct,dt),v(dt,pt),v(dt,mt),v(dt,ft),Mt&&Mt.m(ft,null),v(ft,_t),Ct&&Ct.m(ft,null),v(ft,gt),St&&St.m(ft,null),v(ft,vt),v(ft,yt),v(ft,bt),zt[wt].m(ft,null),$t=!0},p(t,e){(!$t||1&e)&&Lt!==(Lt=(t[0].localname||`${ge(t[0].osm_type)} ${t[0].osm_id}`)+"")&&S(o,Lt);const n={};1&e&&(n.feature=t[0]),8388608&e&&(n.$$scope={dirty:e,ctx:t}),a.$set(n);const i={};1&e&&(i.aPlace=t[0]),h.$set(i);const s={};8388609&e&&(s.$$scope={dirty:e,ctx:t}),_.$set(s);const r={};8388609&e&&(r.$$scope={dirty:e,ctx:t}),w.$set(r);const l={};8388609&e&&(l.$$scope={dirty:e,ctx:t}),P.$set(l),1&e&&(Tt=xe(t[0])),Tt?Pt?(Pt.p(t,e),1&e&&tt(Pt,1)):(Pt=fi(t),Pt.c(),tt(Pt,1),Pt.m(f,k)):Pt&&(J(),et(Pt,1,1,(()=>{Pt=null})),Q());const c={};8388609&e&&(c.$$scope={dirty:e,ctx:t}),M.$set(c);const u={};8388609&e&&(u.$$scope={dirty:e,ctx:t}),z.$set(u),t[0].calculated_importance?Et?(Et.p(t,e),1&e&&tt(Et,1)):(Et=yi(t),Et.c(),tt(Et,1),Et.m(f,I)):Et&&(J(),et(Et,1,1,(()=>{Et=null})),Q());const d={};8388609&e&&(d.$$scope={dirty:e,ctx:t}),N.$set(d);const p={};8388609&e&&(p.$$scope={dirty:e,ctx:t}),D.$set(p);const m={};8388609&e&&(m.$$scope={dirty:e,ctx:t}),R.$set(m);const g={};8388609&e&&(g.$$scope={dirty:e,ctx:t}),H.$set(g),t[0].calculated_wikipedia?kt?(kt.p(t,e),1&e&&tt(kt,1)):(kt=Pi(t),kt.c(),tt(kt,1),kt.m(f,F)):kt&&(J(),et(kt,1,1,(()=>{kt=null})),Q());const v={};8388609&e&&(v.$$scope={dirty:e,ctx:t}),q.$set(v);const y={};8388609&e&&(y.$$scope={dirty:e,ctx:t}),V.$set(y);const b={};8388609&e&&(b.$$scope={dirty:e,ctx:t}),G.$set(b);const x={};1&e&&(x.current_result=t[0]),rt.$set(x),t[0].address?Mt?(Mt.p(t,e),1&e&&tt(Mt,1)):(Mt=Ai(t),Mt.c(),tt(Mt,1),Mt.m(ft,_t)):Mt&&(J(),et(Mt,1,1,(()=>{Mt=null})),Q()),t[0].linked_places?Ct?(Ct.p(t,e),1&e&&tt(Ct,1)):(Ct=Oi(t),Ct.c(),tt(Ct,1),Ct.m(ft,gt)):Ct&&(J(),et(Ct,1,1,(()=>{Ct=null})),Q()),t[4]?St&&(St.d(1),St=null):St?St.p(t,e):(St=Ni(t),St.c(),St.m(ft,vt));let $=wt;wt=Ot(t),wt===$?zt[wt].p(t,e):(J(),et(zt[$],1,1,(()=>{zt[$]=null})),Q(),xt=zt[wt],xt?xt.p(t,e):(xt=zt[wt]=At[wt](t),xt.c()),tt(xt,1),xt.m(ft,null))},i(t){$t||(tt(a.$$.fragment,t),tt(h.$$.fragment,t),tt(_.$$.fragment,t),tt(w.$$.fragment,t),tt(P.$$.fragment,t),tt(Pt),tt(M.$$.fragment,t),tt(z.$$.fragment,t),tt(Et),tt(N.$$.fragment,t),tt(D.$$.fragment,t),tt(R.$$.fragment,t),tt(H.$$.fragment,t),tt(kt),tt(q.$$.fragment,t),tt(V.$$.fragment,t),tt(G.$$.fragment,t),tt(rt.$$.fragment,t),tt(Mt),tt(Ct),tt(xt),$t=!0)},o(t){et(a.$$.fragment,t),et(h.$$.fragment,t),et(_.$$.fragment,t),et(w.$$.fragment,t),et(P.$$.fragment,t),et(Pt),et(M.$$.fragment,t),et(z.$$.fragment,t),et(Et),et(N.$$.fragment,t),et(D.$$.fragment,t),et(R.$$.fragment,t),et(H.$$.fragment,t),et(kt),et(q.$$.fragment,t),et(V.$$.fragment,t),et(G.$$.fragment,t),et(rt.$$.fragment,t),et(Mt),et(Ct),et(xt),$t=!1},d(t){t&&b(e),st(a),st(h),t&&b(u),t&&b(d),st(_),st(w),st(P),Pt&&Pt.d(),st(M),st(z),Et&&Et.d(),st(N),st(D),st(R),st(H),kt&&kt.d(),st(q),st(V),st(G),st(rt),t&&b(at),t&&b(lt),Mt&&Mt.d(),Ct&&Ct.d(),St&&St.d(),zt[wt].d()}}}function ci(t){let e;return{c(){e=$("link to this page")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function hi(t){let e,n;return e=new Qn({props:{items:t[0].names}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].names),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ui(e){let n;return{c(){n=x("span"),n.textContent="No Name",C(n,"class","noname fw-bold")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function di(t){let e,n,i,o,s;const r=[ui,hi],a=[];function l(t,n){return 1&n&&(e=null),null==e&&(e=!!Array.isArray(t[0].names)),e?0:1}return n=l(t,-1),i=a[n]=r[n](t),{c(){i.c(),o=P()},m(t,e){a[n].m(t,e),y(t,o,e),s=!0},p(t,e){let s=n;n=l(t,e),n===s?a[n].p(t,e):(J(),et(a[s],1,1,(()=>{a[s]=null})),Q(),i=a[n],i?i.p(t,e):(i=a[n]=r[n](t),i.c()),tt(i,1),i.m(o.parentNode,o))},i(t){s||(tt(i),s=!0)},o(t){et(i),s=!1},d(t){a[n].d(t),t&&b(o)}}}function pi(t){let e,n,i,o=t[0].category+"",s=t[0].type+"";return{c(){e=$(o),n=$(":"),i=$(s)},m(t,o){y(t,e,o),y(t,n,o),y(t,i,o)},p(t,n){1&n&&o!==(o=t[0].category+"")&&S(e,o),1&n&&s!==(s=t[0].type+"")&&S(i,s)},d(t){t&&b(e),t&&b(n),t&&b(i)}}}function mi(t){let e,n=t[0].indexed_date+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].indexed_date+"")&&S(e,n)},d(t){t&&b(e)}}}function fi(t){let e,n;return e=new Kn({props:{title:"Admin Level",$$slots:{default:[_i]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};8388609&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function _i(t){let e,n=t[0].admin_level+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].admin_level+"")&&S(e,n)},d(t){t&&b(e)}}}function gi(t){let e,n=t[0].rank_search+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].rank_search+"")&&S(e,n)},d(t){t&&b(e)}}}function vi(t){let e,n,i,o,s=t[0].rank_address+"",r=$e(t[0].rank_address)+"";return{c(){e=$(s),n=$(" ("),i=$(r),o=$(")")},m(t,s){y(t,e,s),y(t,n,s),y(t,i,s),y(t,o,s)},p(t,n){1&n&&s!==(s=t[0].rank_address+"")&&S(e,s),1&n&&r!==(r=$e(t[0].rank_address)+"")&&S(i,r)},d(t){t&&b(e),t&&b(n),t&&b(i),t&&b(o)}}}function yi(t){let e,n;return e=new Kn({props:{title:"Importance",$$slots:{default:[wi]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};8388609&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function bi(t){let e;return{c(){e=$("(estimated)")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function wi(t){let e,n,i,o=t[0].calculated_importance+"",s=!t[0].importance&&bi();return{c(){e=$(o),n=T(),s&&s.c(),i=P()},m(t,o){y(t,e,o),y(t,n,o),s&&s.m(t,o),y(t,i,o)},p(t,n){1&n&&o!==(o=t[0].calculated_importance+"")&&S(e,o),t[0].importance?s&&(s.d(1),s=null):s||(s=bi(),s.c(),s.m(i.parentNode,i))},d(t){t&&b(e),t&&b(n),s&&s.d(t),t&&b(i)}}}function xi(t){let e,n=we(t[0])+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=we(t[0])+"")&&S(e,n)},d(t){t&&b(e)}}}function $i(t){let e,n,i,o=t[0].centroid.coordinates[1]+"",s=t[0].centroid.coordinates[0]+"";return{c(){e=$(o),n=$(","),i=$(s)},m(t,o){y(t,e,o),y(t,n,o),y(t,i,o)},p(t,n){1&n&&o!==(o=t[0].centroid.coordinates[1]+"")&&S(e,o),1&n&&s!==(s=t[0].centroid.coordinates[0]+"")&&S(i,s)},d(t){t&&b(e),t&&b(n),t&&b(i)}}}function Li(t){let e,n,i=ve(t[0])+"";return{c(){e=new I(!1),n=P(),e.a=n},m(t,o){e.m(i,t,o),y(t,n,o)},p(t,n){1&n&&i!==(i=ve(t[0])+"")&&e.p(i)},d(t){t&&b(n),t&&e.d()}}}function Ti(t){let e,n,i,o,s=t[0].place_id+"";return{c(){e=$(s),n=$("\n ("),i=x("a"),i.textContent="on this server",o=$(")"),C(i,"href","https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id")},m(t,s){y(t,e,s),y(t,n,s),y(t,i,s),y(t,o,s)},p(t,n){1&n&&s!==(s=t[0].place_id+"")&&S(e,s)},d(t){t&&b(e),t&&b(n),t&&b(i),t&&b(o)}}}function Pi(t){let e,n;return e=new Kn({props:{title:"Wikipedia Calculated",$$slots:{default:[Ei]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};8388609&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Ei(t){let e,n,i=be(t[0])+"";return{c(){e=new I(!1),n=P(),e.a=n},m(t,o){e.m(i,t,o),y(t,n,o)},p(t,n){1&n&&i!==(i=be(t[0])+"")&&e.p(i)},d(t){t&&b(n),t&&e.d()}}}function ki(t){let e,n,i,o,s=t[0].calculated_postcode+"";return i=new qn({props:{postcode:t[0].calculated_postcode,lat:t[0].centroid.coordinates[1],lon:t[0].centroid.coordinates[0]}}),{c(){e=$(s),n=T(),it(i.$$.fragment)},m(t,s){y(t,e,s),y(t,n,s),ot(i,t,s),o=!0},p(t,n){(!o||1&n)&&s!==(s=t[0].calculated_postcode+"")&&S(e,s);const r={};1&n&&(r.postcode=t[0].calculated_postcode),1&n&&(r.lat=t[0].centroid.coordinates[1]),1&n&&(r.lon=t[0].centroid.coordinates[0]),i.$set(r)},i(t){o||(tt(i.$$.fragment,t),o=!0)},o(t){et(i.$$.fragment,t),o=!1},d(t){t&&b(e),t&&b(n),st(i,t)}}}function Mi(t){let e,n,i=t[0].calculated_postcode&&ki(t);return{c(){i&&i.c(),e=P()},m(t,o){i&&i.m(t,o),y(t,e,o),n=!0},p(t,n){t[0].calculated_postcode?i?(i.p(t,n),1&n&&tt(i,1)):(i=ki(t),i.c(),tt(i,1),i.m(e.parentNode,e)):i&&(J(),et(i,1,1,(()=>{i=null})),Q())},i(t){n||(tt(i),n=!0)},o(t){et(i),n=!1},d(t){i&&i.d(t),t&&b(e)}}}function Ci(t){let e,n;return e=new Qn({props:{items:t[0].addresstags}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].addresstags),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Si(t){let e,n;return e=new Qn({props:{items:t[0].extratags}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].extratags),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Ai(t){let e,n,i=t[0].address,o=[];for(let e=0;e<i.length;e+=1)o[e]=zi(si(t,i,e));const s=t=>et(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=P()},m(t,i){for(let e=0;e<o.length;e+=1)o[e].m(t,i);y(t,e,i),n=!0},p(t,n){if(1&n){let r;for(i=t[0].address,r=0;r<i.length;r+=1){const s=si(t,i,r);o[r]?(o[r].p(s,n),tt(o[r],1)):(o[r]=zi(s),o[r].c(),tt(o[r],1),o[r].m(e.parentNode,e))}for(J(),r=i.length;r<o.length;r+=1)s(r);Q()}},i(t){if(!n){for(let t=0;t<i.length;t+=1)tt(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)et(o[t]);n=!1},d(t){w(o,t),t&&b(e)}}}function zi(t){let e,n;return e=new Rn({props:{addressLine:t[18],bMarkUnusedLines:!0,bDistanceInMeters:!1}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[18]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Oi(t){let e,n,i,o,s=t[0].linked_places,r=[];for(let e=0;e<s.length;e+=1)r[e]=Ii(oi(t,s,e));const a=t=>et(r[t],1,1,(()=>{r[t]=null}));return{c(){e=x("tr"),e.innerHTML='<td colspan="7" class="svelte-193h58e"><h2 class="svelte-193h58e">Linked Places</h2></td>',n=T();for(let t=0;t<r.length;t+=1)r[t].c();i=P(),C(e,"class","all-columns svelte-193h58e")},m(t,s){y(t,e,s),y(t,n,s);for(let e=0;e<r.length;e+=1)r[e].m(t,s);y(t,i,s),o=!0},p(t,e){if(1&e){let n;for(s=t[0].linked_places,n=0;n<s.length;n+=1){const o=oi(t,s,n);r[n]?(r[n].p(o,e),tt(r[n],1)):(r[n]=Ii(o),r[n].c(),tt(r[n],1),r[n].m(i.parentNode,i))}for(J(),n=s.length;n<r.length;n+=1)a(n);Q()}},i(t){if(!o){for(let t=0;t<s.length;t+=1)tt(r[t]);o=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)et(r[t]);o=!1},d(t){t&&b(e),t&&b(n),w(r,t),t&&b(i)}}}function Ii(t){let e,n;return e=new Rn({props:{addressLine:t[18],bMarkUnusedLines:!0,bDistanceInMeters:!0}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[18]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Ni(t){let e,n,i;function o(t,e){return t[2].keywords?Di:Bi}let s=o(t),r=s(t);return{c(){e=x("tr"),e.innerHTML='<td colspan="7" class="svelte-193h58e"><h2 class="svelte-193h58e">Keywords</h2></td>',n=T(),r.c(),i=P(),C(e,"class","all-columns svelte-193h58e")},m(t,o){y(t,e,o),y(t,n,o),r.m(t,o),y(t,i,o)},p(t,e){s===(s=o(t))&&r?r.p(t,e):(r.d(1),r=s(t),r&&(r.c(),r.m(i.parentNode,i)))},d(t){t&&b(e),t&&b(n),r.d(t),t&&b(i)}}}function Bi(t){let e,n,i,o,s;return{c(){e=x("tr"),n=x("td"),i=x("a"),o=$("display keywords"),C(i,"class","btn btn-outline-secondary btn-sm"),C(i,"href",s=t[1]+"&keywords=1")},m(t,s){y(t,e,s),v(e,n),v(n,i),v(i,o)},p(t,e){2&e&&s!==(s=t[1]+"&keywords=1")&&C(i,"href",s)},d(t){t&&b(e)}}}function Di(t){let e,n;function i(t,n){var i;return 1&n&&(e=null),null==e&&(i=t[0],e=!!(i.keywords&&i.keywords.name&&i.keywords.address&&(i.keywords.name.length>0||i.keywords.address.length>0))),e?Ri:Zi}let o=i(t,-1),s=o(t);return{c(){s.c(),n=P()},m(t,e){s.m(t,e),y(t,n,e)},p(t,e){o===(o=i(t,e))&&s?s.p(t,e):(s.d(1),s=o(t),s&&(s.c(),s.m(n.parentNode,n)))},d(t){s.d(t),t&&b(n)}}}function Zi(e){let n;return{c(){n=x("tr"),n.innerHTML="<td>Place has no keywords</td>"},m(t,e){y(t,n,e)},p:t,d(t){t&&b(n)}}}function Ri(t){let e,n,i,o,s=t[0].keywords.name,r=[];for(let e=0;e<s.length;e+=1)r[e]=Hi(ii(t,s,e));let a=t[0].keywords.address&&Wi(t);return{c(){e=x("tr"),e.innerHTML='<td colspan="7" class="svelte-193h58e"><h3 class="svelte-193h58e">Name Keywords</h3></td>',n=T();for(let t=0;t<r.length;t+=1)r[t].c();i=T(),a&&a.c(),o=P(),C(e,"class","all-columns svelte-193h58e")},m(t,s){y(t,e,s),y(t,n,s);for(let e=0;e<r.length;e+=1)r[e].m(t,s);y(t,i,s),a&&a.m(t,s),y(t,o,s)},p(t,e){if(1&e){let n;for(s=t[0].keywords.name,n=0;n<s.length;n+=1){const o=ii(t,s,n);r[n]?r[n].p(o,e):(r[n]=Hi(o),r[n].c(),r[n].m(i.parentNode,i))}for(;n<r.length;n+=1)r[n].d(1);r.length=s.length}t[0].keywords.address?a?a.p(t,e):(a=Wi(t),a.c(),a.m(o.parentNode,o)):a&&(a.d(1),a=null)},d(t){t&&b(e),t&&b(n),w(r,t),t&&b(i),a&&a.d(t),t&&b(o)}}}function ji(t){let e,n,i,o=t[13].id+"";return{c(){e=x("td"),n=$("word id: "),i=$(o)},m(t,o){y(t,e,o),v(e,n),v(e,i)},p(t,e){1&e&&o!==(o=t[13].id+"")&&S(i,o)},d(t){t&&b(e)}}}function Hi(t){let e,n,i,o,s=Ee(t[13].token)+"",r=t[13].id&&ji(t);return{c(){e=x("tr"),n=x("td"),i=$(s),o=T(),r&&r.c()},m(t,s){y(t,e,s),v(e,n),v(n,i),v(e,o),r&&r.m(e,null)},p(t,n){1&n&&s!==(s=Ee(t[13].token)+"")&&S(i,s),t[13].id?r?r.p(t,n):(r=ji(t),r.c(),r.m(e,null)):r&&(r.d(1),r=null)},d(t){t&&b(e),r&&r.d()}}}function Wi(t){let e,n,i,o=t[0].keywords.address,s=[];for(let e=0;e<o.length;e+=1)s[e]=qi(ni(t,o,e));return{c(){e=x("tr"),e.innerHTML='<td colspan="7" class="svelte-193h58e"><h3 class="svelte-193h58e">Address Keywords</h3></td>',n=T();for(let t=0;t<s.length;t+=1)s[t].c();i=P(),C(e,"class","all-columns svelte-193h58e")},m(t,o){y(t,e,o),y(t,n,o);for(let e=0;e<s.length;e+=1)s[e].m(t,o);y(t,i,o)},p(t,e){if(1&e){let n;for(o=t[0].keywords.address,n=0;n<o.length;n+=1){const r=ni(t,o,n);s[n]?s[n].p(r,e):(s[n]=qi(r),s[n].c(),s[n].m(i.parentNode,i))}for(;n<s.length;n+=1)s[n].d(1);s.length=o.length}},d(t){t&&b(e),t&&b(n),w(s,t),t&&b(i)}}}function Fi(t){let e,n,i,o=t[13].id+"";return{c(){e=x("td"),n=$("word id: "),i=$(o)},m(t,o){y(t,e,o),v(e,n),v(e,i)},p(t,e){1&e&&o!==(o=t[13].id+"")&&S(i,o)},d(t){t&&b(e)}}}function qi(t){let e,n,i,o,s,r=Ee(t[13].token)+"",a=t[13].id&&Fi(t);return{c(){e=x("tr"),n=x("td"),i=$(r),o=T(),a&&a.c(),s=T()},m(t,r){y(t,e,r),v(e,n),v(n,i),v(e,o),a&&a.m(e,null),v(e,s)},p(t,n){1&n&&r!==(r=Ee(t[13].token)+"")&&S(i,r),t[13].id?a?a.p(t,n):(a=Fi(t),a.c(),a.m(e,s)):a&&(a.d(1),a=null)},d(t){t&&b(e),a&&a.d()}}}function Ui(e){let n,i,o,s,r;return{c(){n=x("tr"),i=x("td"),o=x("a"),s=$("display child places"),C(o,"class","btn btn-outline-secondary btn-sm"),C(o,"href",r=e[1]+"&hierarchy=1")},m(t,e){y(t,n,e),v(n,i),v(i,o),v(o,s)},p(t,e){2&e&&r!==(r=t[1]+"&hierarchy=1")&&C(o,"href",r)},i:t,o:t,d(t){t&&b(n)}}}function Vi(t){let e,n,i,o,s;const r=[Gi,Ki],a=[];function l(t,n){return 1&n&&(e=null),null==e&&(e=!(!t[0].hierarchy||"object"!=typeof t[0].hierarchy||!Object.keys(t[0].hierarchy).length)),e?0:1}return n=l(t,-1),i=a[n]=r[n](t),{c(){i.c(),o=P()},m(t,e){a[n].m(t,e),y(t,o,e),s=!0},p(t,e){let s=n;n=l(t,e),n===s?a[n].p(t,e):(J(),et(a[s],1,1,(()=>{a[s]=null})),Q(),i=a[n],i?i.p(t,e):(i=a[n]=r[n](t),i.c()),tt(i,1),i.m(o.parentNode,o))},i(t){s||(tt(i),s=!0)},o(t){et(i),s=!1},d(t){a[n].d(t),t&&b(o)}}}function Ki(e){let n;return{c(){n=x("tr"),n.innerHTML="<td>Place is not parent of other places</td>"},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function Gi(t){let e,n,i,o=Object.keys(t[0].hierarchy)>500,s=Object.keys(t[0].hierarchy),r=[];for(let e=0;e<s.length;e+=1)r[e]=Xi(ti(t,s,e));const a=t=>et(r[t],1,1,(()=>{r[t]=null}));let l=o&&Ji();return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=T(),l&&l.c(),n=P()},m(t,o){for(let e=0;e<r.length;e+=1)r[e].m(t,o);y(t,e,o),l&&l.m(t,o),y(t,n,o),i=!0},p(t,i){if(1&i){let n;for(s=Object.keys(t[0].hierarchy),n=0;n<s.length;n+=1){const o=ti(t,s,n);r[n]?(r[n].p(o,i),tt(r[n],1)):(r[n]=Xi(o),r[n].c(),tt(r[n],1),r[n].m(e.parentNode,e))}for(J(),n=s.length;n<r.length;n+=1)a(n);Q()}1&i&&(o=Object.keys(t[0].hierarchy)>500),o?l||(l=Ji(),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i(t){if(!i){for(let t=0;t<s.length;t+=1)tt(r[t]);i=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)et(r[t]);i=!1},d(t){w(r,t),t&&b(e),l&&l.d(t),t&&b(n)}}}function Yi(t){let e,n;return e=new Rn({props:{addressLine:t[10],bDistanceInMeters:!0}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[10]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Xi(t){let e,n,i,o,s,r,a,l=t[7]+"",c=t[0].hierarchy[t[7]],h=[];for(let e=0;e<c.length;e+=1)h[e]=Yi(ei(t,c,e));const u=t=>et(h[t],1,1,(()=>{h[t]=null}));return{c(){e=x("tr"),n=x("td"),i=x("h3"),o=$(l),s=T();for(let t=0;t<h.length;t+=1)h[t].c();r=P(),C(i,"class","svelte-193h58e"),C(n,"colspan","7"),C(n,"class","svelte-193h58e"),C(e,"class","all-columns svelte-193h58e")},m(t,l){y(t,e,l),v(e,n),v(n,i),v(i,o),y(t,s,l);for(let e=0;e<h.length;e+=1)h[e].m(t,l);y(t,r,l),a=!0},p(t,e){if((!a||1&e)&&l!==(l=t[7]+"")&&S(o,l),1&e){let n;for(c=t[0].hierarchy[t[7]],n=0;n<c.length;n+=1){const i=ei(t,c,n);h[n]?(h[n].p(i,e),tt(h[n],1)):(h[n]=Yi(i),h[n].c(),tt(h[n],1),h[n].m(r.parentNode,r))}for(J(),n=c.length;n<h.length;n+=1)u(n);Q()}},i(t){if(!a){for(let t=0;t<c.length;t+=1)tt(h[t]);a=!0}},o(t){h=h.filter(Boolean);for(let t=0;t<h.length;t+=1)et(h[t]);a=!1},d(t){t&&b(e),t&&b(s),w(h,t),t&&b(r)}}}function Ji(t){let e;return{c(){e=x("p"),e.textContent="There are more child objects which are not shown."},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Qi(t){let e,n,i,o,s,r;e=new oe({props:{$$slots:{default:[ri]},$$scope:{ctx:t}}});const a=[li,ai],l=[];function c(t,e){return t[0]?0:""!==window.location.search&&t[3]?1:-1}return~(o=c(t))&&(s=l[o]=a[o](t)),{c(){it(e.$$.fragment),n=T(),i=x("div"),s&&s.c(),C(i,"class","container")},m(t,s){ot(e,t,s),y(t,n,s),y(t,i,s),~o&&l[o].m(i,null),r=!0},p(t,[n]){const r={};8388612&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r);let h=o;o=c(t),o===h?~o&&l[o].p(t,n):(s&&(J(),et(l[h],1,1,(()=>{l[h]=null})),Q()),~o?(s=l[o],s?s.p(t,n):(s=l[o]=a[o](t),s.c()),tt(s,1),s.m(i,null)):s=null)},i(t){r||(tt(e.$$.fragment,t),tt(s),r=!0)},o(t){et(e.$$.fragment,t),et(s),r=!1},d(t){st(e,t),t&&b(n),t&&b(i),~o&&l[o].d()}}}function to(t,e,n){let i,o,s,r,a;d(t,ft,(t=>n(5,o=t)));let l=!1;return t.$$.update=()=>{if(32&t.$$.dirty){let t=o;"details"===t.tab&&(e=t.params,n(2,a={place_id:e.get("place_id"),osmtype:e.get("osmtype"),osmid:e.get("osmid"),class:e.get("class"),keywords:e.get("keywords"),addressdetails:1,hierarchy:"1"===e.get("hierarchy")?1:0,group_hierarchy:1,polygon_geojson:1,format:"json"}),n(3,l=!1),a.place_id||a.osmtype&&a.osmid?(a.place_id?Pt("Details for "+a.place_id):Pt("Details for "+a.osmtype+a.osmid),xt("details",a,(function(t){window.scrollTo(0,0),n(3,l=!0),n(0,s=t&&!t.error?t:void 0)}))):n(0,s=void 0),n(1,r=window.location.search))}var e},n(4,i=Nominatim_Config.Reverse_Only),[s,r,a,l,i,o]}class eo extends lt{constructor(t){super(),at(this,t,to,Qi,r,{})}}function no(t,e,n){const i=t.slice();return i[2]=e[n],i}function io(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,E,k,M,A,z,O,I,N,B,D=t[2].osm_type+"",Z=ve(t[2])+"",R=t[2].class+"",j=t[2].type+"",H=t[2].name+"",W=(t[2].country_code||"")+"",F=t[2].errormessage+"",q=t[2].updated+"";return{c(){e=x("tr"),n=x("td"),i=$(D),o=T(),s=x("td"),r=T(),a=x("td"),l=$(R),c=T(),h=x("td"),u=$(j),d=T(),p=x("td"),m=$(H),f=T(),_=x("td"),g=$(W),w=T(),L=x("td"),P=$(F),E=T(),k=x("td"),M=$(q),A=T(),z=x("td"),O=x("a"),I=$("josm"),B=T(),C(O,"href",N="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/"+ge(t[2].osm_type)+"/"+t[2].osm_id+"/full"),C(O,"target","josm")},m(t,b){y(t,e,b),v(e,n),v(n,i),v(e,o),v(e,s),s.innerHTML=Z,v(e,r),v(e,a),v(a,l),v(e,c),v(e,h),v(h,u),v(e,d),v(e,p),v(p,m),v(e,f),v(e,_),v(_,g),v(e,w),v(e,L),v(L,P),v(e,E),v(e,k),v(k,M),v(e,A),v(e,z),v(z,O),v(O,I),v(e,B)},p(t,e){1&e&&D!==(D=t[2].osm_type+"")&&S(i,D),1&e&&Z!==(Z=ve(t[2])+"")&&(s.innerHTML=Z),1&e&&R!==(R=t[2].class+"")&&S(l,R),1&e&&j!==(j=t[2].type+"")&&S(u,j),1&e&&H!==(H=t[2].name+"")&&S(m,H),1&e&&W!==(W=(t[2].country_code||"")+"")&&S(g,W),1&e&&F!==(F=t[2].errormessage+"")&&S(P,F),1&e&&q!==(q=t[2].updated+"")&&S(M,q),1&e&&N!==(N="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/"+ge(t[2].osm_type)+"/"+t[2].osm_id+"/full")&&C(O,"href",N)},d(t){t&&b(e)}}}function oo(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,L=t[0].length+"";e=new oe({});let P=t[0],E=[];for(let e=0;e<P.length;e+=1)E[e]=io(no(t,P,e));return{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),s=x("div"),r=x("h1"),r.textContent="Broken polygons",a=T(),l=x("p"),c=$("Total number of broken polygons: "),h=$(L),u=$("."),d=T(),p=x("table"),m=x("thead"),m.innerHTML="<th>OSM type</th> \n <th>OSM id</th> \n <th>Class</th> \n <th>Type</th> \n <th>Name</th> \n <th>Country Code</th> \n <th>Error message</th> \n <th>Updated</th> \n <th></th>",f=T(),_=x("tbody");for(let t=0;t<E.length;t+=1)E[t].c();C(p,"class","table table-striped table-hover"),C(s,"class","col-sm-12"),C(o,"class","row"),C(i,"class","container")},m(t,b){ot(e,t,b),y(t,n,b),y(t,i,b),v(i,o),v(o,s),v(s,r),v(s,a),v(s,l),v(l,c),v(l,h),v(l,u),v(s,d),v(s,p),v(p,m),v(p,f),v(p,_);for(let t=0;t<E.length;t+=1)E[t].m(_,null);g=!0},p(t,[e]){if((!g||1&e)&&L!==(L=t[0].length+"")&&S(h,L),1&e){let n;for(P=t[0],n=0;n<P.length;n+=1){const i=no(t,P,n);E[n]?E[n].p(i,e):(E[n]=io(i),E[n].c(),E[n].m(_,null))}for(;n<E.length;n+=1)E[n].d(1);E.length=P.length}},i(t){g||(tt(e.$$.fragment,t),g=!0)},o(t){et(e.$$.fragment,t),g=!1},d(t){st(e,t),t&&b(n),t&&b(i),w(E,t)}}}function so(t,e,n){let i=[];return B((function(){xt("polygons",{format:"json"},(function(t){n(0,i=t)})),Pt("Broken polygons")})),[i]}class ro extends lt{constructor(t){super(),at(this,t,so,oo,r,{})}}function ao(t,e,n){const i=t.slice();return i[2]=e[n],i}function lo(t){let e,n=t[2].place_id+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[2].place_id+"")&&S(e,n)},d(t){t&&b(e)}}}function co(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,E,k,M=t[2].country_code+"",C=t[2].name+"",A=ve(t[2])+"",z=t[2].osm_type+"",O=t[2].class+"",I=t[2].type+"";return i=new ze({props:{feature:t[2],$$slots:{default:[lo]},$$scope:{ctx:t}}}),{c(){e=x("tr"),n=x("td"),it(i.$$.fragment),o=T(),s=x("td"),r=$(M),a=T(),l=x("td"),c=$(C),h=T(),u=x("td"),d=T(),p=x("td"),m=$(z),f=T(),_=x("td"),g=$(O),w=T(),L=x("td"),P=$(I),E=T()},m(t,b){y(t,e,b),v(e,n),ot(i,n,null),v(e,o),v(e,s),v(s,r),v(e,a),v(e,l),v(l,c),v(e,h),v(e,u),u.innerHTML=A,v(e,d),v(e,p),v(p,m),v(e,f),v(e,_),v(_,g),v(e,w),v(e,L),v(L,P),v(e,E),k=!0},p(t,e){const n={};1&e&&(n.feature=t[2]),33&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n),(!k||1&e)&&M!==(M=t[2].country_code+"")&&S(r,M),(!k||1&e)&&C!==(C=t[2].name+"")&&S(c,C),(!k||1&e)&&A!==(A=ve(t[2])+"")&&(u.innerHTML=A),(!k||1&e)&&z!==(z=t[2].osm_type+"")&&S(m,z),(!k||1&e)&&O!==(O=t[2].class+"")&&S(g,O),(!k||1&e)&&I!==(I=t[2].type+"")&&S(P,I)},i(t){k||(tt(i.$$.fragment,t),k=!0)},o(t){et(i.$$.fragment,t),k=!1},d(t){t&&b(e),st(i)}}}function ho(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g=t[0].length+"";e=new oe({});let L=t[0],P=[];for(let e=0;e<L.length;e+=1)P[e]=co(ao(t,L,e));const E=t=>et(P[t],1,1,(()=>{P[t]=null}));return{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),s=x("div"),r=x("h1"),r.textContent="Deletable",a=T(),l=x("p"),c=$(g),h=$(" objects have been deleted in OSM but are still in the Nominatim database."),u=T(),d=x("table"),p=x("thead"),p.innerHTML="<th>Place id</th> \n <th>Country Code</th> \n <th>Name</th> \n <th>OSM id</th> \n <th>OSM type</th> \n <th>Class</th> \n <th>Type</th>",m=T(),f=x("tbody");for(let t=0;t<P.length;t+=1)P[t].c();C(d,"class","table table-striped table-hover"),C(s,"class","col-sm-12"),C(o,"class","row"),C(i,"class","container")},m(t,g){ot(e,t,g),y(t,n,g),y(t,i,g),v(i,o),v(o,s),v(s,r),v(s,a),v(s,l),v(l,c),v(l,h),v(s,u),v(s,d),v(d,p),v(d,m),v(d,f);for(let t=0;t<P.length;t+=1)P[t].m(f,null);_=!0},p(t,[e]){if((!_||1&e)&&g!==(g=t[0].length+"")&&S(c,g),1&e){let n;for(L=t[0],n=0;n<L.length;n+=1){const i=ao(t,L,n);P[n]?(P[n].p(i,e),tt(P[n],1)):(P[n]=co(i),P[n].c(),tt(P[n],1),P[n].m(f,null))}for(J(),n=L.length;n<P.length;n+=1)E(n);Q()}},i(t){if(!_){tt(e.$$.fragment,t);for(let t=0;t<L.length;t+=1)tt(P[t]);_=!0}},o(t){et(e.$$.fragment,t),P=P.filter(Boolean);for(let t=0;t<P.length;t+=1)et(P[t]);_=!1},d(t){st(e,t),t&&b(n),t&&b(i),w(P,t)}}}function uo(t,e,n){let i=[];return B((function(){xt("deletable",{format:"json"},(function(t){n(0,i=t)})),Pt("Deletable objects")})),[i]}class po extends lt{constructor(t){super(),at(this,t,uo,ho,r,{})}}function mo(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,E,k,M=t[1].Nominatim_API_Endpoint+"",A=t[0].software_version+"",z=t[0].database_version+"",O=t[0].data_updated+"";return e=new oe({}),{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),s=x("div"),r=x("h1"),r.textContent="Server status",a=T(),l=x("dl"),c=x("dt"),c.textContent="API Endpoint",h=x("dd"),u=x("a"),d=$(M),p=x("dt"),p.textContent="Software version",m=x("dd"),f=$(A),_=x("dt"),_.textContent="Database version",g=x("dd"),w=$(z),L=x("dt"),L.textContent="Data last updated",P=x("dd"),E=$(O),C(u,"href",t[1].Nominatim_API_Endpoint),C(s,"class","col-sm-12"),C(o,"class","row"),C(i,"class","container")},m(t,b){ot(e,t,b),y(t,n,b),y(t,i,b),v(i,o),v(o,s),v(s,r),v(s,a),v(s,l),v(l,c),v(l,h),v(h,u),v(u,d),v(l,p),v(l,m),v(m,f),v(l,_),v(l,g),v(g,w),v(l,L),v(l,P),v(P,E),k=!0},p(t,[e]){(!k||1&e)&&A!==(A=t[0].software_version+"")&&S(f,A),(!k||1&e)&&z!==(z=t[0].database_version+"")&&S(w,z),(!k||1&e)&&O!==(O=t[0].data_updated+"")&&S(E,O)},i(t){k||(tt(e.$$.fragment,t),k=!0)},o(t){et(e.$$.fragment,t),k=!1},d(t){st(e,t),t&&b(n),t&&b(i)}}}function fo(t,e,n){let i={},o=Nominatim_Config;return B((function(){xt("status",{format:"json"},(function(t){n(0,i=t)})),Pt("Server status")})),[i,o]}class _o extends lt{constructor(t){super(),at(this,t,fo,mo,r,{})}}function go(e){let n,i,o,s;return n=new oe({}),{c(){it(n.$$.fragment),i=T(),o=x("div"),C(o,"id","about-help"),C(o,"class","container svelte-1l5yrvt")},m(t,e){ot(n,t,e),y(t,i,e),y(t,o,e),s=!0},p:t,i(t){s||(tt(n.$$.fragment,t),s=!0)},o(t){et(n.$$.fragment,t),s=!1},d(t){st(n,t),t&&b(i),t&&b(o)}}}function vo(t){return B((()=>{Lt("theme/about-help.html",document.getElementById("about-help"))})),[]}class yo extends lt{constructor(t){super(),at(this,t,vo,go,r,{})}}function bo(t){let e,n;return e=new yo({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function wo(t){let e,n;return e=new _o({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function xo(t){let e,n;return e=new ro({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function $o(t){let e,n;return e=new po({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Lo(t){let e,n;return e=new eo({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function To(t){let e,n;return e=new Pn({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Po(t){let e,n;return e=new fn({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Eo(t){let e,n,i,o,s,r,a;const l=[Po,To,Lo,$o,xo,wo,bo],c=[];function h(t,e){return"search"===t[0]?0:"reverse"===t[0]?1:"details"===t[0]?2:"deletable"===t[0]?3:"polygons"===t[0]?4:"status"===t[0]?5:"about"===t[0]?6:-1}return~(e=h(t))&&(n=c[e]=l[e](t)),o=new bt({}),{c(){n&&n.c(),i=T(),it(o.$$.fragment)},m(n,l){~e&&c[e].m(n,l),y(n,i,l),ot(o,n,l),s=!0,r||(a=E(window,"popstate",t[2]),r=!0)},p(t,[o]){let s=e;e=h(t),e!==s&&(n&&(J(),et(c[s],1,1,(()=>{c[s]=null})),Q()),~e?(n=c[e],n||(n=c[e]=l[e](t),n.c()),tt(n,1),n.m(i.parentNode,i)):n=null)},i(t){s||(tt(n),tt(o.$$.fragment,t),s=!0)},o(t){et(n),et(o.$$.fragment,t),s=!1},d(t){~e&&c[e].d(t),t&&b(i),st(o,t),r=!1,a()}}}function ko(t,e,n){let i,o;d(t,ft,(t=>n(1,o=t))),vt();return t.$$.update=()=>{2&t.$$.dirty&&n(0,i=o.tab)},[i,o,()=>vt()]}new class extends lt{constructor(t){super(),at(this,t,ko,Eo,r,{})}}({target:document.body})}();
+ * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
+ * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
+ */function wn(){return yn||(yn=1,function(t){var e="1.9.4";function i(t){var e,i,n,o;for(i=1,n=arguments.length;i<n;i++)for(e in o=arguments[i])t[e]=o[e];return t}var n=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function o(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var s=0;function r(t){return"_leaflet_id"in t||(t._leaflet_id=++s),t._leaflet_id}function a(t,e,i){var n,o,s,r;return r=function(){n=!1,o&&(s.apply(i,o),o=!1)},s=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(r,e),n=!0)},s}function l(t,e,i){var n=e[1],o=e[0],s=n-o;return t===n&&i?t:((t-o)%s+s)%s+o}function h(){return!1}function c(t,e){if(!1===e)return t;var i=Math.pow(10,void 0===e?6:e);return Math.round(t*i)/i}function u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function d(t){return u(t).split(/\s+/)}function p(t,e){for(var i in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?n(t.options):{}),e)t.options[i]=e[i];return t.options}function f(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}var _=/\{ *([\w_ -]+) *\}/g;function m(t,e){return t.replace(_,(function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n}))}var g=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function v(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var y="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function x(t){var e=+new Date,i=Math.max(0,16-(e-w));return w=e+i,window.setTimeout(t,i)}var T=window.requestAnimationFrame||b("RequestAnimationFrame")||x,P=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function M(t,e,i){if(!i||T!==x)return T.call(window,o(t,e));t.call(e)}function k(t){t&&P.call(window,t)}var C={__proto__:null,extend:i,create:n,bind:o,get lastId(){return s},stamp:r,throttle:a,wrapNum:l,falseFn:h,formatNum:c,trim:u,splitWords:d,setOptions:p,getParamString:f,template:m,isArray:g,indexOf:v,emptyImageUrl:y,requestFn:T,cancelFn:P,requestAnimFrame:M,cancelAnimFrame:k};function E(){}function A(t){if("undefined"!=typeof L&&L&&L.Mixin){t=g(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)}}E.extend=function(t){var e=function(){p(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,s=n(o);for(var r in s.constructor=e,e.prototype=s,this)Object.prototype.hasOwnProperty.call(this,r)&&"prototype"!==r&&"__super__"!==r&&(e[r]=this[r]);return t.statics&&i(e,t.statics),t.includes&&(A(t.includes),i.apply(null,[s].concat(t.includes))),i(s,t),delete s.statics,delete s.includes,s.options&&(s.options=o.options?n(o.options):{},i(s.options,t.options)),s._initHooks=[],s.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=s._initHooks.length;t<e;t++)s._initHooks[t].call(this)}},e},E.include=function(t){var e=this.prototype.options;return i(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},E.mergeOptions=function(t){return i(this.prototype.options,t),this},E.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var S={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else for(var o=0,s=(t=d(t)).length;o<s;o++)this._on(t[o],e,i);return this},off:function(t,e,i){if(arguments.length)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else{t=d(t);for(var o=1===arguments.length,s=0,r=t.length;s<r;s++)o?this._off(t[s]):this._off(t[s],e,i)}else delete this._events;return this},_on:function(t,e,i,n){if("function"==typeof e){if(!1===this._listens(t,e,i)){i===this&&(i=void 0);var o={fn:e,ctx:i};n&&(o.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(o)}}else console.warn("wrong listener type: "+typeof e)},_off:function(t,e,i){var n,o,s;if(this._events&&(n=this._events[t]))if(1!==arguments.length)if("function"==typeof e){var r=this._listens(t,e,i);if(!1!==r){var a=n[r];this._firingCount&&(a.fn=h,this._events[t]=n=n.slice()),n.splice(r,1)}}else console.warn("wrong listener type: "+typeof e);else{if(this._firingCount)for(o=0,s=n.length;o<s;o++)n[o].fn=h;delete this._events[t]}},fire:function(t,e,n){if(!this.listens(t,n))return this;var o=i({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var s=this._events[t];if(s){this._firingCount=this._firingCount+1||1;for(var r=0,a=s.length;r<a;r++){var l=s[r],h=l.fn;l.once&&this.off(t,h,l.ctx),h.call(l.ctx||this,o)}this._firingCount--}}return n&&this._propagateEvent(o),this},listens:function(t,e,i,n){"string"!=typeof t&&console.warn('"string" type argument expected');var o=e;"function"!=typeof e&&(n=!!e,o=void 0,i=void 0);var s=this._events&&this._events[t];if(s&&s.length&&!1!==this._listens(t,o,i))return!0;if(n)for(var r in this._eventParents)if(this._eventParents[r].listens(t,e,i,n))return!0;return!1},_listens:function(t,e,i){if(!this._events)return!1;var n=this._events[t]||[];if(!e)return!!n.length;i===this&&(i=void 0);for(var o=0,s=n.length;o<s;o++)if(n[o].fn===e&&n[o].ctx===i)return o;return!1},once:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e,!0);else for(var o=0,s=(t=d(t)).length;o<s;o++)this._on(t[o],e,i,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[r(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[r(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)}};S.addEventListener=S.on,S.removeEventListener=S.clearAllEventListeners=S.off,S.addOneTimeEventListener=S.once,S.fireEvent=S.fire,S.hasEventListeners=S.listens;var O=E.extend(S);function z(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var I=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function D(t,e,i){return t instanceof z?t:g(t)?new z(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new z(t.x,t.y):new z(t,e,i)}function B(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function N(t,e){return!t||t instanceof B?t:new B(t,e)}function Z(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function j(t,e){return t instanceof Z?t:new Z(t,e)}function $(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}function R(t,e,i){return t instanceof $?t:g(t)&&"object"!=typeof t[0]?3===t.length?new $(t[0],t[1],t[2]):2===t.length?new $(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new $(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new $(t,e,i)}z.prototype={clone:function(){return new z(this.x,this.y)},add:function(t){return this.clone()._add(D(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(D(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 z(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new z(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=I(this.x),this.y=I(this.y),this},distanceTo:function(t){var e=(t=D(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=D(t)).x===this.x&&t.y===this.y},contains:function(t){return t=D(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},B.prototype={extend:function(t){var e,i;if(!t)return this;if(t instanceof z||"number"==typeof t[0]||"x"in t)e=i=D(t);else if(e=(t=N(t)).min,i=t.max,!e||!i)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(i.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(i.y,this.max.y)):(this.min=e.clone(),this.max=i.clone()),this},getCenter:function(t){return D((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return D(this.min.x,this.max.y)},getTopRight:function(){return D(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,i;return(t="number"==typeof t[0]||t instanceof z?D(t):N(t))instanceof B?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=N(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>=e.x&&n.x<=i.x,r=o.y>=e.y&&n.y<=i.y;return s&&r},overlaps:function(t){t=N(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>e.x&&n.x<i.x,r=o.y>e.y&&n.y<i.y;return s&&r},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var e=this.min,i=this.max,n=Math.abs(e.x-i.x)*t,o=Math.abs(e.y-i.y)*t;return N(D(e.x-n,e.y-o),D(i.x+n,i.y+o))},equals:function(t){return!!t&&(t=N(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},Z.prototype={extend:function(t){var e,i,n=this._southWest,o=this._northEast;if(t instanceof $)e=t,i=t;else{if(!(t instanceof Z))return t?this.extend(R(t)||j(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||o?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),o.lat=Math.max(i.lat,o.lat),o.lng=Math.max(i.lng,o.lng)):(this._southWest=new $(e.lat,e.lng),this._northEast=new $(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,o=Math.abs(e.lng-i.lng)*t;return new Z(new $(e.lat-n,e.lng-o),new $(i.lat+n,i.lng+o))},getCenter:function(){return new $((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 $(this.getNorth(),this.getWest())},getSouthEast:function(){return new $(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 $||"lat"in t?R(t):j(t);var e,i,n=this._southWest,o=this._northEast;return t instanceof Z?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=j(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&n.lat<=i.lat,r=o.lng>=e.lng&&n.lng<=i.lng;return s&&r},overlaps:function(t){t=j(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&n.lat<i.lat,r=o.lng>e.lng&&n.lng<i.lng;return s&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=j(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},$.prototype={equals:function(t,e){return!!t&&(t=R(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("+c(this.lat,t)+", "+c(this.lng,t)+")"},distanceTo:function(t){return W.distance(this,R(t))},wrap:function(){return W.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return j([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new $(this.lat,this.lng,this.alt)}};var F,H={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},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,i=this.scale(t);return new B(this.transformation.transform(e.min,i),this.transformation.transform(e.max,i))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng;return new $(this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,o=e.lng-i.lng;if(0===n&&0===o)return t;var s=t.getSouthWest(),r=t.getNorthEast();return new Z(new $(s.lat-n,s.lng-o),new $(r.lat-n,r.lng-o))}},W=i({},H,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,o=e.lat*i,s=Math.sin((e.lat-t.lat)*i/2),r=Math.sin((e.lng-t.lng)*i/2),a=s*s+Math.cos(n)*Math.cos(o)*r*r,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),q=6378137,U={R:q,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),o=Math.sin(n*e);return new z(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new $((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(F=q*Math.PI,new B([-F,-F],[F,F]))};function V(t,e,i,n){if(g(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=i,this._d=n}function K(t,e,i,n){return new V(t,e,i,n)}V.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 z((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var G=i({},W,{code:"EPSG:3857",projection:U,transformation:function(){var t=.5/(Math.PI*U.R);return K(t,.5,-t,.5)}()}),Y=i({},G,{code:"EPSG:900913"});function X(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function J(t,e){var i,n,o,s,r,a,l="";for(i=0,o=t.length;i<o;i++){for(n=0,s=(r=t[i]).length;n<s;n++)l+=(n?"L":"M")+(a=r[n]).x+" "+a.y;l+=e?Zt.svg?"z":"x":""}return l||"M0 0"}var Q,tt=document.documentElement.style,et="ActiveXObject"in window,it=et&&!document.addEventListener,nt="msLaunchUri"in navigator&&!("documentMode"in document),ot=Nt("webkit"),st=Nt("android"),rt=Nt("android 2")||Nt("android 3"),at=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),lt=st&&Nt("Google")&&at<537&&!("AudioNode"in window),ht=!!window.opera,ct=!nt&&Nt("chrome"),ut=Nt("gecko")&&!ot&&!ht&&!et,dt=!ct&&Nt("safari"),pt=Nt("phantom"),ft="OTransition"in tt,_t=0===navigator.platform.indexOf("Win"),mt=et&&"transition"in tt,gt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt,vt="MozPerspective"in tt,yt=!window.L_DISABLE_3D&&(mt||gt||vt)&&!ft&&!pt,bt="undefined"!=typeof orientation||Nt("mobile"),wt=bt&&ot,xt=bt&>,Lt=!window.PointerEvent&&window.MSPointerEvent,Tt=!(!window.PointerEvent&&!Lt),Pt="ontouchstart"in window||!!window.TouchEvent,Mt=!window.L_NO_TOUCH&&(Pt||Tt),kt=bt&&ht,Ct=bt&&ut,Et=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,At=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",h,e),window.removeEventListener("testPassiveEventSupport",h,e)}catch(t){}return t}(),St=!!document.createElement("canvas").getContext,Ot=!(!document.createElementNS||!X("svg").createSVGRect),zt=!!Ot&&((Q=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Q.firstChild&&Q.firstChild.namespaceURI)),It=!Ot&&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}}(),Dt=0===navigator.platform.indexOf("Mac"),Bt=0===navigator.platform.indexOf("Linux");function Nt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Zt={ie:et,ielt9:it,edge:nt,webkit:ot,android:st,android23:rt,androidStock:lt,opera:ht,chrome:ct,gecko:ut,safari:dt,phantom:pt,opera12:ft,win:_t,ie3d:mt,webkit3d:gt,gecko3d:vt,any3d:yt,mobile:bt,mobileWebkit:wt,mobileWebkit3d:xt,msPointer:Lt,pointer:Tt,touch:Mt,touchNative:Pt,mobileOpera:kt,mobileGecko:Ct,retina:Et,passiveEvents:At,canvas:St,svg:Ot,vml:It,inlineSvg:zt,mac:Dt,linux:Bt},jt=Zt.msPointer?"MSPointerDown":"pointerdown",$t=Zt.msPointer?"MSPointerMove":"pointermove",Rt=Zt.msPointer?"MSPointerUp":"pointerup",Ft=Zt.msPointer?"MSPointerCancel":"pointercancel",Ht={touchstart:jt,touchmove:$t,touchend:Rt,touchcancel:Ft},Wt={touchstart:te,touchmove:Qt,touchend:Qt,touchcancel:Qt},qt={},Ut=!1;function Vt(t,e,i){return"touchstart"===e&&Jt(),Wt[e]?(i=Wt[e].bind(this,i),t.addEventListener(Ht[e],i,!1),i):(console.warn("wrong event specified:",e),h)}function Kt(t,e,i){Ht[e]?t.removeEventListener(Ht[e],i,!1):console.warn("wrong event specified:",e)}function Gt(t){qt[t.pointerId]=t}function Yt(t){qt[t.pointerId]&&(qt[t.pointerId]=t)}function Xt(t){delete qt[t.pointerId]}function Jt(){Ut||(document.addEventListener(jt,Gt,!0),document.addEventListener($t,Yt,!0),document.addEventListener(Rt,Xt,!0),document.addEventListener(Ft,Xt,!0),Ut=!0)}function Qt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],qt)e.touches.push(qt[i]);e.changedTouches=[e],t(e)}}function te(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Ge(e),Qt(t,e)}function ee(t){var e,i,n={};for(i in t)e=t[i],n[i]=e&&e.bind?e.bind(t):e;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}var ie=200;function ne(t,e){t.addEventListener("dblclick",e);var i,n=0;function o(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var o=Xe(t);if(!o.some((function(t){return t instanceof HTMLLabelElement&&t.attributes.for}))||o.some((function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement}))){var s=Date.now();s-n<=ie?2==++i&&e(ee(t)):i=1,n=s}}}else i=t.detail}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}function oe(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var se,re,ae,le,he,ce=ke(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ue=ke(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===ue||"OTransition"===ue?ue+"End":"transitionend";function pe(t){return"string"==typeof t?document.getElementById(t):t}function fe(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function _e(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function me(t){var e=t.parentNode;e&&e.removeChild(t)}function ge(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ve(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ye(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function be(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=Te(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function we(t,e){if(void 0!==t.classList)for(var i=d(e),n=0,o=i.length;n<o;n++)t.classList.add(i[n]);else if(!be(t,e)){var s=Te(t);Le(t,(s?s+" ":"")+e)}}function xe(t,e){void 0!==t.classList?t.classList.remove(e):Le(t,u((" "+Te(t)+" ").replace(" "+e+" "," ")))}function Le(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function Te(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function Pe(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&Me(t,e)}function Me(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}function ke(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function Ce(t,e,i){var n=e||new z(0,0);t.style[ce]=(Zt.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function Ee(t,e){t._leaflet_pos=e,Zt.any3d?Ce(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Ae(t){return t._leaflet_pos||new z(0,0)}if("onselectstart"in document)se=function(){je(window,"selectstart",Ge)},re=function(){Re(window,"selectstart",Ge)};else{var Se=ke(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);se=function(){if(Se){var t=document.documentElement.style;ae=t[Se],t[Se]="none"}},re=function(){Se&&(document.documentElement.style[Se]=ae,ae=void 0)}}function Oe(){je(window,"dragstart",Ge)}function ze(){Re(window,"dragstart",Ge)}function Ie(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(De(),le=t,he=t.style.outlineStyle,t.style.outlineStyle="none",je(window,"keydown",De))}function De(){le&&(le.style.outlineStyle=he,le=void 0,he=void 0,Re(window,"keydown",De))}function Be(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Ne(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ze={__proto__:null,TRANSFORM:ce,TRANSITION:ue,TRANSITION_END:de,get:pe,getStyle:fe,create:_e,remove:me,empty:ge,toFront:ve,toBack:ye,hasClass:be,addClass:we,removeClass:xe,setClass:Le,getClass:Te,setOpacity:Pe,testProp:ke,setTransform:Ce,setPosition:Ee,getPosition:Ae,get disableTextSelection(){return se},get enableTextSelection(){return re},disableImageDrag:Oe,enableImageDrag:ze,preventOutline:Ie,restoreOutline:De,getSizedParentNode:Be,getScale:Ne};function je(t,e,i,n){if(e&&"object"==typeof e)for(var o in e)We(t,o,e[o],i);else for(var s=0,r=(e=d(e)).length;s<r;s++)We(t,e[s],i,n);return this}var $e="_leaflet_events";function Re(t,e,i,n){if(1===arguments.length)Fe(t),delete t[$e];else if(e&&"object"==typeof e)for(var o in e)qe(t,o,e[o],i);else if(e=d(e),2===arguments.length)Fe(t,(function(t){return-1!==v(e,t)}));else for(var s=0,r=e.length;s<r;s++)qe(t,e[s],i,n);return this}function Fe(t,e){for(var i in t[$e]){var n=i.split(/\d/)[0];e&&!e(n)||qe(t,n,null,null,i)}}var He={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function We(t,e,i,n){var o=e+r(i)+(n?"_"+r(n):"");if(t[$e]&&t[$e][o])return this;var s=function(e){return i.call(n||t,e||window.event)},a=s;!Zt.touchNative&&Zt.pointer&&0===e.indexOf("touch")?s=Vt(t,e,s):Zt.touch&&"dblclick"===e?s=ne(t,s):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(He[e]||e,s,!!Zt.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(s=function(e){e=e||window.event,ei(t,e)&&a(e)},t.addEventListener(He[e],s,!1)):t.addEventListener(e,a,!1):t.attachEvent("on"+e,s),t[$e]=t[$e]||{},t[$e][o]=s}function qe(t,e,i,n,o){o=o||e+r(i)+(n?"_"+r(n):"");var s=t[$e]&&t[$e][o];if(!s)return this;!Zt.touchNative&&Zt.pointer&&0===e.indexOf("touch")?Kt(t,e,s):Zt.touch&&"dblclick"===e?oe(t,s):"removeEventListener"in t?t.removeEventListener(He[e]||e,s,!1):t.detachEvent("on"+e,s),t[$e][o]=null}function Ue(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ve(t){return We(t,"wheel",Ue),this}function Ke(t){return je(t,"mousedown touchstart dblclick contextmenu",Ue),t._leaflet_disable_click=!0,this}function Ge(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ye(t){return Ge(t),Ue(t),this}function Xe(t){if(t.composedPath)return t.composedPath();for(var e=[],i=t.target;i;)e.push(i),i=i.parentNode;return e}function Je(t,e){if(!e)return new z(t.clientX,t.clientY);var i=Ne(e),n=i.boundingClientRect;return new z((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var Qe=Zt.linux&&Zt.chrome?window.devicePixelRatio:Zt.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function ti(t){return Zt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Qe: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 ei(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}var ii={__proto__:null,on:je,off:Re,stopPropagation:Ue,disableScrollPropagation:Ve,disableClickPropagation:Ke,preventDefault:Ge,stop:Ye,getPropagationPath:Xe,getMousePosition:Je,getWheelDelta:ti,isExternalTarget:ei,addListener:je,removeListener:Re},ni=O.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=Ae(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=M(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),Ee(this._el,i),this.fire("step")},_complete:function(){k(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),oi=O.extend({options:{crs:G,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=p(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=o(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(R(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ue&&Zt.any3d&&!Zt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),je(this._proxy,de,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,n){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(R(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=i({animate:n.animate},n.zoom),n.pan=i({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e,n.pan&&n.pan.noMoveStart),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||(Zt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(Zt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),o=this.getSize().divideBy(2),s=(t instanceof z?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/n),r=this.containerPointToLatLng(o.add(s));return this.setView(r,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():j(t);var i=D(e.paddingTopLeft||e.padding||[0,0]),n=D(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,i.add(n));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var s=n.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(r.add(a).divideBy(2).add(s),o),zoom:o}},fitBounds:function(t,e){if(!(t=j(t)).isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.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(e=e||{},!(t=D(t).round()).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 ni,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){we(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,i){if(!1===(i=i||{}).animate||!Zt.any3d)return this.setView(t,e,i);this._stop();var n=this.project(this.getCenter()),o=this.project(t),s=this.getSize(),r=this._zoom;t=R(t),e=void 0===e?r:e;var a=Math.max(s.x,s.y),l=a*this.getZoomScale(r,e),h=o.distanceTo(n)||1,c=1.42,u=c*c;function d(t){var e=(l*l-a*a+(t?-1:1)*u*u*h*h)/(2*(t?l:a)*u*h),i=Math.sqrt(e*e+1)-e;return i<1e-9?-18:Math.log(i)}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function f(t){return(Math.exp(t)+Math.exp(-t))/2}function _(t){return p(t)/f(t)}var m=d(0);function g(t){return a*(f(m)/f(m+c*t))}function v(t){return a*(f(m)*_(m+c*t)-p(m))/u}function y(t){return 1-Math.pow(1-t,1.5)}var b=Date.now(),w=(d(1)-m)/c,x=i.duration?1e3*i.duration:1e3*w*.8;function L(){var i=(Date.now()-b)/x,s=y(i)*w;i<=1?(this._flyToFrame=M(L,this),this._move(this.unproject(n.add(o.subtract(n).multiplyBy(v(s)/h)),r),this.getScaleZoom(a/g(s),r),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,i.noMoveStart),L.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return t=j(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},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 i=this.getCenter(),n=this._limitCenter(i,this._zoom,j(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=D((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=D(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=N([r.min.add(i),r.max.subtract(n)]),l=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var h=s.subtract(a.getCenter()),c=a.extend(s).getSize().subtract(l);o.x+=h.x<0?-c.x:c.x,o.y+=h.y<0?-c.y:c.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),s=e.divideBy(2).round(),r=n.divideBy(2).round(),a=s.subtract(r);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(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):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=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o(this._handleGeolocationResponse,this),n=o(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,n,t):navigator.geolocation.getCurrentPosition(e,n,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){if(this._container._leaflet_id){var e=t.code,i=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: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new $(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var o=this.getBoundsZoom(i);this.setView(e,n.maxZoom?Math.min(o,n.maxZoom):o)}var s={latlng:e,bounds:i,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),me(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(k(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)me(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=_e("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=i),i},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new Z(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,i){t=j(t),i=D(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(i),h=N(this.project(a,n),this.project(r,n)).getSize(),c=Zt.any3d?this.options.zoomSnap:1,u=l.x/h.x,d=l.y/h.y,p=e?Math.max(u,d):Math.min(u,d);return n=this.getScaleZoom(p,n),c&&(n=Math.round(n/(c/100))*(c/100),n=e?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new z(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new B(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(R(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(D(t),e)},layerPointToLatLng:function(t){var e=D(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(R(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(R(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(j(t))},distance:function(t,e){return this.options.crs.distance(R(t),R(e))},containerPointToLayerPoint:function(t){return D(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return D(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(D(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(R(t)))},mouseEventToContainerPoint:function(t){return Je(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=pe(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");je(e,"scroll",this._onScroll,this),this._containerId=r(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Zt.any3d,we(t,"leaflet-container"+(Zt.touch?" leaflet-touch":"")+(Zt.retina?" leaflet-retina":"")+(Zt.ielt9?" leaflet-oldie":"")+(Zt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=fe(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Ee(this._mapPane,new z(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(we(t.markerPane,"leaflet-zoom-hide"),we(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){Ee(this._mapPane,new z(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return k(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Ee(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[r(this._container)]=this;var e=t?Re:je;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),Zt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){k(this._resizeRequest),this._resizeRequest=M((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,a=!1;s;){if((i=this._targets[r(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){a=!0;break}if(i&&i.listens(e,!0)){if(o&&!ei(s,t))break;if(n.push(i),o)break}if(s===this._container)break;s=s.parentNode}return n.length||a||o||!this.listens(e,!0)||(n=[this]),n},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var i=t.type;"mousedown"===i&&Ie(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var o=i({},t);o.type="preclick",this._fireDOMEvent(o,o.type,n)}var s=this._findEventTargets(t,e);if(n){for(var r=[],a=0;a<n.length;a++)n[a].listens(e,!0)&&r.push(n[a]);s=r.concat(s)}if(s.length){"contextmenu"===e&&Ge(t);var l=s[0],h={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var c=l.getLatLng&&(!l._radius||l._radius<=10);h.containerPoint=c?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(t),h.layerPoint=this.containerPointToLayerPoint(h.containerPoint),h.latlng=c?l.getLatLng():this.layerPointToLatLng(h.layerPoint)}for(a=0;a<s.length;a++)if(s[a].fire(e,h,!0),h.originalEvent._stopped||!1===s[a].options.bubblingMouseEvents&&-1!==v(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Ae(this._mapPane)||new z(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return N([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),o=this.getSize().divideBy(2),s=new B(n.subtract(o),n.add(o)),r=this._getBoundsOffset(s,i,e);return Math.abs(r.x)<=1&&Math.abs(r.y)<=1?t:this.unproject(n.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new B(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=N(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),o=n.min.subtract(t.min),s=n.max.subtract(t.max);return new z(this._rebound(o.x,-s.x),this._rebound(o.y,-s.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=Zt.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){xe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i)||(this.panBy(i,e),0))},_createAnimProxy:function(){var t=this._proxy=_e("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=ce,i=this._proxy.style[e];Ce(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){me(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Ce(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(o)||(M((function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,we(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&xe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function si(t,e){return new oi(t,e)}var ri=E.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return we(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(me(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),ai=function(t){return new ri(t)};oi.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=_e("div",e+"control-container",this._container);function n(n,o){var s=e+n+" "+e+o;t[n+o]=_e("div",s,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)me(this._controlCorners[t]);me(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var li=ri.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){for(var n in p(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return ri.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(r(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){we(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(we(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):xe(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return xe(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=_e("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Ke(e),Ve(e);var n=this._section=_e("section",t+"-list");i&&(this._map.on("click",this.collapse,this),je(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var o=this._layersLink=_e("a",t+"-toggle",e);o.href="#",o.title="Layers",o.setAttribute("role","button"),je(o,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){Ge(t),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=_e("div",t+"-base",n),this._separator=_e("div",t+"-separator",n),this._overlaysList=_e("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&r(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(o((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ge(this._baseLayersList),ge(this._overlaysList),this._layerControlInputs=[];var t,e,i,n,o=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,o+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&o>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(r(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+r(this),n),this._layerControlInputs.push(e),e.layerId=r(t.layer),je(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("span");return i.appendChild(s),s.appendChild(e),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){if(!this._preventClick){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=i.length-1;s>=0;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(s=0;s<o.length;s++)this._map.hasLayer(o[s])&&this._map.removeLayer(o[s]);for(s=0;s<n.length;s++)this._map.hasLayer(n[s])||this._map.addLayer(n[s]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),o=i.length-1;o>=0;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,je(t,"click",Ge),this.expand();var e=this;setTimeout((function(){Re(t,"click",Ge),e._preventClick=!1}))}}),hi=function(t,e,i){return new li(t,e,i)},ci=ri.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=_e("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){var s=_e("a",i,n);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),Ke(s),je(s,"click",Ye),je(s,"click",o,this),je(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";xe(this._zoomInButton,e),xe(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(we(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(we(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});oi.mergeOptions({zoomControl:!0}),oi.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new ci,this.addControl(this.zoomControl))}));var ui=function(t){return new ci(t)},di=ri.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=_e("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=_e("div",e,i)),t.imperial&&(this._iScale=_e("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,o=3.2808399*t;o>5280?(e=o/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)}}),pi=function(t){return new di(t)},fi='<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>',_i=ri.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Zt.inlineSvg?fi+" ":"")+"Leaflet</a>"},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=_e("div","leaflet-control-attribution"),Ke(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' <span aria-hidden="true">|</span> ')}}});oi.mergeOptions({attributionControl:!0}),oi.addInitHook((function(){this.options.attributionControl&&(new _i).addTo(this)}));var mi=function(t){return new _i(t)};ri.Layers=li,ri.Zoom=ci,ri.Scale=di,ri.Attribution=_i,ai.layers=hi,ai.zoom=ui,ai.scale=pi,ai.attribution=mi;var gi=E.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});gi.addTo=function(t,e){return t.addHandler(e,this),this};var vi={Events:S},yi=Zt.touch?"touchstart mousedown":"mousedown",bi=O.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){p(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(je(this._dragStartTarget,yi,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(bi._dragging===this&&this.finishDrag(!0),Re(this._dragStartTarget,yi,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!be(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)bi._dragging===this&&this.finishDrag();else if(!(bi._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(bi._dragging=this,this._preventOutline&&Ie(this._element),Oe(),se(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,i=Be(this._element);this._startPoint=new z(e.clientX,e.clientY),this._startPos=Ae(this._element),this._parentScale=Ne(i);var n="mousedown"===t.type;je(document,n?"mousemove":"touchmove",this._onMove,this),je(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new z(e.clientX,e.clientY)._subtract(this._startPoint);(i.x||i.y)&&(Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance||(i.x/=this._parentScale.x,i.y/=this._parentScale.y,Ge(t),this._moved||(this.fire("dragstart"),this._moved=!0,we(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),we(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Ee(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){xe(document.body,"leaflet-dragging"),this._lastTarget&&(xe(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Re(document,"mousemove touchmove",this._onMove,this),Re(document,"mouseup touchend touchcancel",this._onUp,this),ze(),re();var e=this._moved&&this._moving;this._moving=!1,bi._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function wi(t,e,i){var n,o,s,r,a,l,h,c,u,d=[1,4,2,8];for(o=0,h=t.length;o<h;o++)t[o]._code=Ii(t[o],e);for(r=0;r<4;r++){for(c=d[r],n=[],o=0,s=(h=t.length)-1;o<h;s=o++)a=t[o],l=t[s],a._code&c?l._code&c||((u=zi(l,a,c,e,i))._code=Ii(u,e),n.push(u)):(l._code&c&&((u=zi(l,a,c,e,i))._code=Ii(u,e),n.push(u)),n.push(a));t=n}return t}function xi(t,e){var i,n,o,s,r,a,l,h,c;if(!t||0===t.length)throw new Error("latlngs not passed");Ni(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var u=R([0,0]),d=j(t);d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(u=Li(t));var p=t.length,f=[];for(i=0;i<p;i++){var _=R(t[i]);f.push(e.project(R([_.lat-u.lat,_.lng-u.lng])))}for(a=l=h=0,i=0,n=p-1;i<p;n=i++)o=f[i],s=f[n],r=o.y*s.x-s.y*o.x,l+=(o.x+s.x)*r,h+=(o.y+s.y)*r,a+=3*r;c=0===a?f[0]:[l/a,h/a];var m=e.unproject(D(c));return R([m.lat+u.lat,m.lng+u.lng])}function Li(t){for(var e=0,i=0,n=0,o=0;o<t.length;o++){var s=R(t[o]);e+=s.lat,i+=s.lng,n++}return R([e/n,i/n])}var Ti,Pi={__proto__:null,clipPolygon:wi,polygonCenter:xi,centroid:Li};function Mi(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=Ei(t=Si(t,i),i)}function ki(t,e,i){return Math.sqrt(Bi(t,e,i,!0))}function Ci(t,e,i){return Bi(t,e,i)}function Ei(t,e){var i=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(i);n[0]=n[i-1]=1,Ai(t,n,e,0,i-1);var o,s=[];for(o=0;o<i;o++)n[o]&&s.push(t[o]);return s}function Ai(t,e,i,n,o){var s,r,a,l=0;for(r=n+1;r<=o-1;r++)(a=Bi(t[r],t[n],t[o],!0))>l&&(s=r,l=a);l>i&&(e[s]=1,Ai(t,e,i,n,s),Ai(t,e,i,s,o))}function Si(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;n<s;n++)Di(t[n],t[o])>e&&(i.push(t[n]),o=n);return o<s-1&&i.push(t[s-1]),i}function Oi(t,e,i,n,o){var s,r,a,l=n?Ti:Ii(t,i),h=Ii(e,i);for(Ti=h;;){if(!(l|h))return[t,e];if(l&h)return!1;a=Ii(r=zi(t,e,s=l||h,i,o),i),s===l?(t=r,l=a):(e=r,h=a)}}function zi(t,e,i,n,o){var s,r,a=e.x-t.x,l=e.y-t.y,h=n.min,c=n.max;return 8&i?(s=t.x+a*(c.y-t.y)/l,r=c.y):4&i?(s=t.x+a*(h.y-t.y)/l,r=h.y):2&i?(s=c.x,r=t.y+l*(c.x-t.x)/a):1&i&&(s=h.x,r=t.y+l*(h.x-t.x)/a),new z(s,r,o)}function Ii(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function Di(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function Bi(t,e,i,n){var o,s=e.x,r=e.y,a=i.x-s,l=i.y-r,h=a*a+l*l;return h>0&&((o=((t.x-s)*a+(t.y-r)*l)/h)>1?(s=i.x,r=i.y):o>0&&(s+=a*o,r+=l*o)),a=t.x-s,l=t.y-r,n?a*a+l*l:new z(s,r)}function Ni(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Zi(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Ni(t)}function ji(t,e){var i,n,o,s,r,a,l,h;if(!t||0===t.length)throw new Error("latlngs not passed");Ni(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var c=R([0,0]),u=j(t);u.getNorthWest().distanceTo(u.getSouthWest())*u.getNorthEast().distanceTo(u.getNorthWest())<1700&&(c=Li(t));var d=t.length,p=[];for(i=0;i<d;i++){var f=R(t[i]);p.push(e.project(R([f.lat-c.lat,f.lng-c.lng])))}for(i=0,n=0;i<d-1;i++)n+=p[i].distanceTo(p[i+1])/2;if(0===n)h=p[0];else for(i=0,s=0;i<d-1;i++)if(r=p[i],a=p[i+1],(s+=o=r.distanceTo(a))>n){l=(s-n)/o,h=[a.x-l*(a.x-r.x),a.y-l*(a.y-r.y)];break}var _=e.unproject(D(h));return R([_.lat+c.lat,_.lng+c.lng])}var $i={__proto__:null,simplify:Mi,pointToSegmentDistance:ki,closestPointOnSegment:Ci,clipSegment:Oi,_getEdgeIntersection:zi,_getBitCode:Ii,_sqClosestPointOnSegment:Bi,isFlat:Ni,_flat:Zi,polylineCenter:ji},Ri={project:function(t){return new z(t.lng,t.lat)},unproject:function(t){return new $(t.y,t.x)},bounds:new B([-180,-90],[180,90])},Fi={R:6378137,R_MINOR:6356752.314245179,bounds:new B([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,s=Math.sqrt(1-o*o),r=s*Math.sin(n),a=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),s/2);return n=-i*Math.log(Math.max(a,1e-10)),new z(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),r=Math.exp(-t.y/n),a=Math.PI/2-2*Math.atan(r),l=0,h=.1;l<15&&Math.abs(h)>1e-7;l++)e=s*Math.sin(a),e=Math.pow((1-e)/(1+e),s/2),a+=h=Math.PI/2-2*Math.atan(r*e)-a;return new $(a*i,t.x*i/n)}},Hi={__proto__:null,LonLat:Ri,Mercator:Fi,SphericalMercator:U},Wi=i({},W,{code:"EPSG:3395",projection:Fi,transformation:function(){var t=.5/(Math.PI*Fi.R);return K(t,.5,-t,.5)}()}),qi=i({},W,{code:"EPSG:4326",projection:Ri,transformation:K(1/180,1,-1/180,.5)}),Ui=i({},H,{projection:Ri,transformation:K(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});H.Earth=W,H.EPSG3395=Wi,H.EPSG3857=G,H.EPSG900913=Y,H.EPSG4326=qi,H.Simple=Ui;var Vi=O.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[r(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[r(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",(function(){e.off(i,this)}),this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});oi.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=r(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=r(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return r(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?g(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[r(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=r(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var n in this._zoomBoundLayers){var o=this._zoomBoundLayers[n].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,i!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Ki=Vi.extend({initialize:function(t,e){var i,n;if(p(this,e),this._layers={},t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return r(t)}}),Gi=function(t,e){return new Ki(t,e)},Yi=Ki.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Ki.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Ki.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new Z;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Xi=function(t,e){return new Yi(t,e)},Ji=E.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){p(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var o=D(n),s=D("shadow"===e&&i.shadowAnchor||i.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Zt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function Qi(t){return new Ji(t)}var tn=Ji.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return"string"!=typeof tn.imagePath&&(tn.imagePath=this._detectIconPath()),(this.options.imagePath||tn.imagePath)+Ji.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(t,e,i){var n=e.exec(t);return n&&n[i]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=_e("div","leaflet-default-icon-path",document.body),e=fe(t,"background-image")||fe(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var i=document.querySelector('link[href$="leaflet.css"]');return i?i.href.substring(0,i.href.length-11-1):""}}),en=gi.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new bi(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),we(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&xe(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,s=Ae(e._icon),r=i.getPixelBounds(),a=i.getPixelOrigin(),l=N(r.min._subtract(a).add(o),r.max._subtract(a).subtract(o));if(!l.contains(s)){var h=D((Math.max(l.max.x,s.x)-l.max.x)/(r.max.x-l.max.x)-(Math.min(l.min.x,s.x)-l.min.x)/(r.min.x-l.min.x),(Math.max(l.max.y,s.y)-l.max.y)/(r.max.y-l.max.y)-(Math.min(l.min.y,s.y)-l.min.y)/(r.min.y-l.min.y)).multiplyBy(n);i.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),Ee(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=M(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(k(this._panRequest),this._panRequest=M(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=Ae(e._icon),o=e._map.layerPointToLatLng(n);i&&Ee(i,n),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){k(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),nn=Vi.extend({options:{icon:new tn,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){p(this,e),this._latlng=R(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=R(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),we(i,e),t.keyboard&&(i.tabIndex="0",i.setAttribute("role","button")),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&je(i,"focus",this._panOnFocus,this);var o=t.icon.createShadow(this._shadow),s=!1;o!==this._shadow&&(this._removeShadow(),s=!0),o&&(we(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&s&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Re(this._icon,"focus",this._panOnFocus,this),me(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&me(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Ee(this._icon,t),this._shadow&&Ee(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(we(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),en)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new en(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&Pe(this._icon,t),this._shadow&&Pe(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,i=e.iconSize?D(e.iconSize):D(0,0),n=e.iconAnchor?D(e.iconAnchor):D(0,0);t.panInside(this._latlng,{paddingTopLeft:n,paddingBottomRight:i.subtract(n)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function on(t,e){return new nn(t,e)}var sn=Vi.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return p(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),rn=sn.extend({options:{fill:!0,radius:10},initialize:function(t,e){p(this,e),this._latlng=R(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=R(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return sn.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new B(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function an(t,e){return new rn(t,e)}var ln=rn.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=i({},n,{radius:e})),p(this,e),this._latlng=R(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new Z(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:sn.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===W.distance){var o=Math.PI/180,s=this._mRadius/W.R/o,r=i.project([e+s,t]),a=i.project([e-s,t]),l=r.add(a).divideBy(2),h=i.unproject(l).lat,c=Math.acos((Math.cos(s*o)-Math.sin(e*o)*Math.sin(h*o))/(Math.cos(e*o)*Math.cos(h*o)))/o;(isNaN(c)||0===c)&&(c=s/Math.cos(Math.PI/180*e)),this._point=l.subtract(i.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-i.project([h,t-c]).x,this._radiusY=l.y-r.y}else{var u=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(u).x}this._updateBounds()}});function hn(t,e,i){return new ln(t,e,i)}var cn=sn.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){p(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,i,n=1/0,o=null,s=Bi,r=0,a=this._parts.length;r<a;r++)for(var l=this._parts[r],h=1,c=l.length;h<c;h++){var u=s(t,e=l[h-1],i=l[h],!0);u<n&&(n=u,o=s(t,e,i))}return o&&(o.distance=Math.sqrt(n)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return ji(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=R(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new Z,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Ni(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=Ni(t),n=0,o=t.length;n<o;n++)i?(e[n]=R(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new B;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new z(t,t);this._rawPxBounds&&(this._pxBounds=new B([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,i){var n,o,s=t[0]instanceof $,r=t.length;if(s){for(o=[],n=0;n<r;n++)o[n]=this._map.latLngToLayerPoint(t[n]),i.extend(o[n]);e.push(o)}else for(n=0;n<r;n++)this._projectLatlngs(t[n],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,i,n,o,s,r,a,l=this._parts;for(e=0,n=0,o=this._rings.length;e<o;e++)for(i=0,s=(a=this._rings[e]).length;i<s-1;i++)(r=Oi(a[i],a[i+1],t,i,!0))&&(l[n]=l[n]||[],l[n].push(r[0]),r[1]===a[i+1]&&i!==s-2||(l[n].push(r[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=Mi(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,o,s,r,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,s=this._parts.length;i<s;i++)for(n=0,o=(r=(a=this._parts[i]).length)-1;n<r;o=n++)if((e||0!==n)&&ki(t,a[o],a[n])<=l)return!0;return!1}});function un(t,e){return new cn(t,e)}cn._flat=Zi;var dn=cn.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return xi(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=cn.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof $&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){cn.prototype._setLatLngs.call(this,t),Ni(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Ni(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new z(e,e);if(t=new B(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,o=0,s=this._rings.length;o<s;o++)(n=wi(this._rings[o],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,o,s,r,a,l,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(s=0,r=(l=(e=this._parts[o]).length)-1;s<l;r=s++)i=e[s],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(h=!h);return h||cn.prototype._containsPoint.call(this,t,!0)}});function pn(t,e){return new dn(t,e)}var fn=Yi.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=g(t)?t:t.features;if(o){for(e=0,i=o.length;e<i;e++)((n=o[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var s=this.options;if(s.filter&&!s.filter(t))return this;var r=_n(t,s);return r?(r.feature=xn(t),r.defaultOptions=r.options,this.resetStyle(r),s.onEachFeature&&s.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function _n(t,e){var i,n,o,s,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,l=[],h=e&&e.pointToLayer,c=e&&e.coordsToLatLng||gn;if(!a&&!r)return null;switch(r.type){case"Point":return mn(h,t,i=c(a),e);case"MultiPoint":for(o=0,s=a.length;o<s;o++)i=c(a[o]),l.push(mn(h,t,i,e));return new Yi(l);case"LineString":case"MultiLineString":return n=vn(a,"LineString"===r.type?0:1,c),new cn(n,e);case"Polygon":case"MultiPolygon":return n=vn(a,"Polygon"===r.type?1:2,c),new dn(n,e);case"GeometryCollection":for(o=0,s=r.geometries.length;o<s;o++){var u=_n({geometry:r.geometries[o],type:"Feature",properties:t.properties},e);u&&l.push(u)}return new Yi(l);case"FeatureCollection":for(o=0,s=r.features.length;o<s;o++){var d=_n(r.features[o],e);d&&l.push(d)}return new Yi(l);default:throw new Error("Invalid GeoJSON object.")}}function mn(t,e,i,n){return t?t(e,i):new nn(i,n&&n.markersInheritOptions&&n)}function gn(t){return new $(t[1],t[0],t[2])}function vn(t,e,i){for(var n,o=[],s=0,r=t.length;s<r;s++)n=e?vn(t[s],e-1,i):(i||gn)(t[s]),o.push(n);return o}function yn(t,e){return void 0!==(t=R(t)).alt?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function bn(t,e,i,n){for(var o=[],s=0,r=t.length;s<r;s++)o.push(e?bn(t[s],Ni(t[s])?0:e-1,i,n):yn(t[s],n));return!e&&i&&o.length>0&&o.push(o[0].slice()),o}function wn(t,e){return t.feature?i({},t.feature,{geometry:e}):xn(e)}function xn(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Ln={toGeoJSON:function(t){return wn(this,{type:"Point",coordinates:yn(this.getLatLng(),t)})}};function Tn(t,e){return new fn(t,e)}nn.include(Ln),ln.include(Ln),rn.include(Ln),cn.include({toGeoJSON:function(t){var e=!Ni(this._latlngs);return wn(this,{type:(e?"Multi":"")+"LineString",coordinates:bn(this._latlngs,e?1:0,!1,t)})}}),dn.include({toGeoJSON:function(t){var e=!Ni(this._latlngs),i=e&&!Ni(this._latlngs[0]),n=bn(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),wn(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),Ki.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(i){e.push(i.toGeoJSON(t).geometry.coordinates)})),wn(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var i="GeometryCollection"===e,n=[];return this.eachLayer((function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(i)n.push(o.geometry);else{var s=xn(o);"FeatureCollection"===s.type?n.push.apply(n,s.features):n.push(s)}}})),i?wn(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var Pn=Tn,Mn=Vi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=j(e),p(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(we(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){me(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ve(this._image),this},bringToBack:function(){return this._map&&ye(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=j(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:_e("img");we(e,"leaflet-image-layer"),this._zoomAnimated&&we(e,"leaflet-zoom-animated"),this.options.className&&we(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onload=o(this.fire,this,"load"),e.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Ce(this._image,i,e)},_reset:function(){var t=this._image,e=new B(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();Ee(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){Pe(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),kn=function(t,e,i){return new Mn(t,e,i)},Cn=Mn.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:_e("video");if(we(e,"leaflet-image-layer"),this._zoomAnimated&&we(e,"leaflet-zoom-animated"),this.options.className&&we(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onloadeddata=o(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],s=0;s<i.length;s++)n.push(i[s].src);this._url=i.length>0?n:[e.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var r=0;r<this._url.length;r++){var a=_e("source");a.src=this._url[r],e.appendChild(a)}}}});function En(t,e,i){return new Cn(t,e,i)}var An=Mn.extend({_initImage:function(){var t=this._image=this._url;we(t,"leaflet-image-layer"),this._zoomAnimated&&we(t,"leaflet-zoom-animated"),this.options.className&&we(t,this.options.className),t.onselectstart=h,t.onmousemove=h}});function Sn(t,e,i){return new An(t,e,i)}var On=Vi.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof $||g(t))?(this._latlng=R(t),p(this,e)):(p(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&Pe(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&Pe(this._container,1),this.bringToFront(),this.options.interactive&&(we(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(Pe(this._container,0),this._removeTimeout=setTimeout(o(me,void 0,this._container),200)):me(this._container),this.options.interactive&&(xe(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=R(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ve(this._container),this},bringToBack:function(){return this._map&&ye(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Yi){e=null;var i=this._source._layers;for(var n in i)if(i[n]._map){e=i[n];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=D(this.options.offset),i=this._getAnchor();this._zoomAnimated?Ee(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}});oi.include({_initOverlay:function(t,e,i,n){var o=e;return o instanceof t||(o=new t(n).setContent(e)),i&&o.setLatLng(i),o}}),Vi.include({_initOverlay:function(t,e,i,n){var o=i;return o instanceof t?(p(o,n),o._source=this):(o=e&&!n?e:new t(n,this)).setContent(i),o}});var zn=On.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,On.prototype.openOn.call(this,t)},onAdd:function(t){On.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof sn||this._source.on("preclick",Ue))},onRemove:function(t){On.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof sn||this._source.off("preclick",Ue))},getEvents:function(){var t=On.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=_e("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=_e("div",t+"-content-wrapper",e);if(this._contentNode=_e("div",t+"-content",i),Ke(e),Ve(this._contentNode),je(e,"contextmenu",Ue),this._tipContainer=_e("div",t+"-tip-container",e),this._tip=_e("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=_e("a",t+"-close-button",e);n.setAttribute("role","button"),n.setAttribute("aria-label","Close popup"),n.href="#close",n.innerHTML='<span aria-hidden="true">×</span>',je(n,"click",(function(t){Ge(t),this.close()}),this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,o=this.options.maxHeight,s="leaflet-popup-scrolled";o&&n>o?(e.height=o+"px",we(t,s)):xe(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();Ee(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(fe(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,o=new z(this._containerLeft,-i-this._containerBottom);o._add(Ae(this._container));var s=t.layerPointToContainerPoint(o),r=D(this.options.autoPanPadding),a=D(this.options.autoPanPaddingTopLeft||r),l=D(this.options.autoPanPaddingBottomRight||r),h=t.getSize(),c=0,u=0;s.x+n+l.x>h.x&&(c=s.x+n-h.x+l.x),s.x-c-a.x<0&&(c=s.x-a.x),s.y+i+l.y>h.y&&(u=s.y+i-h.y+l.y),s.y-u-a.y<0&&(u=s.y-a.y),(c||u)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,u]))}},_getAnchor:function(){return D(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),In=function(t,e){return new zn(t,e)};oi.mergeOptions({closePopupOnClick:!0}),oi.include({openPopup:function(t,e,i){return this._initOverlay(zn,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),Vi.include({bindPopup:function(t,e){return this._popup=this._initOverlay(zn,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Yi||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Ye(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof sn?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Dn=On.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){On.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){On.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=On.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=_e("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+r(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,o=this._container,s=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),a=this.options.direction,l=o.offsetWidth,h=o.offsetHeight,c=D(this.options.offset),u=this._getAnchor();"top"===a?(e=l/2,i=h):"bottom"===a?(e=l/2,i=0):"center"===a?(e=l/2,i=h/2):"right"===a?(e=0,i=h/2):"left"===a?(e=l,i=h/2):r.x<s.x?(a="right",e=0,i=h/2):(a="left",e=l+2*(c.x+u.x),i=h/2),t=t.subtract(D(e,i,!0)).add(c).add(u),xe(o,"leaflet-tooltip-right"),xe(o,"leaflet-tooltip-left"),xe(o,"leaflet-tooltip-top"),xe(o,"leaflet-tooltip-bottom"),we(o,"leaflet-tooltip-"+a),Ee(o,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&Pe(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return D(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Bn=function(t,e){return new Dn(t,e)};oi.include({openTooltip:function(t,e,i){return this._initOverlay(Dn,t,e,i).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Vi.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Dn,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,i.click=this._openTooltip,this._map?this._addFocusListeners():i.add=this._addFocusListeners),this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),this[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Yi||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&(je(e,"focus",(function(){this._tooltip._source=t,this.openTooltip()}),this),je(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",(function(){e._openOnceFlag=!1,e._openTooltip(t)}))}else this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,i,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),n=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(n)}});var Nn=Ji.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),i=this.options;if(i.html instanceof Element?(ge(e),e.appendChild(i.html)):e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var n=D(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function Zn(t){return new Nn(t)}Ji.Default=tn;var jn=Vi.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Zt.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){p(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),me(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ve(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ye(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof z?t:new z(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-1/0,1/0),o=0,s=i.length;o<s;o++)e=i[o].style.zIndex,i[o]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Zt.ielt9){Pe(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var o=this._tiles[n];if(o.current&&o.loaded){var s=Math.min(1,(t-o.loaded)/200);Pe(o.el,s),s<1?e=!0:(o.active?i=!0:this._onOpaqueTile(o),o.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(k(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=_e("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var i in this._levels)i=Number(i),this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(me(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],o=this._map;return n||((n=this._levels[t]={}).el=_e("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),h(n.el.offsetWidth),this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var n=e.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)me(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){var o=Math.floor(t/2),s=Math.floor(e/2),r=i-1,a=new z(+o,+s);a.z=+r;var l=this._tileCoordsToKey(a),h=this._tiles[l];return h&&h.active?(h.retain=!0,!0):(h&&h.loaded&&(h.retain=!0),r>n&&this._retainParent(o,s,r,n))},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new z(o,s);r.z=i+1;var a=this._tileCoordsToKey(r),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1<n&&this._retainChildren(o,s,i+1,n))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,n){var o=Math.round(e);o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o);var s=this.options.updateWhenZooming&&o!==this._tileZoom;n&&!s||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),o=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();Zt.any3d?Ce(t.el,o,n):Ee(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._tileZoom),o=e.project(t,this._tileZoom).floor(),s=e.getSize().divideBy(2*n);return new B(o.subtract(s),o.add(s))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(n),s=o.getCenter(),r=[],a=this.options.keepBuffer,l=new B(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var h in this._tiles){var c=this._tiles[h].coords;c.z===this._tileZoom&&l.contains(new z(c.x,c.y))||(this._tiles[h].current=!1)}if(Math.abs(i-this._tileZoom)>1)this._setView(t,i);else{for(var u=o.min.y;u<=o.max.y;u++)for(var d=o.min.x;d<=o.max.x;d++){var p=new z(d,u);if(p.z=this._tileZoom,this._isValidTile(p)){var f=this._tiles[this._tileCoordsToKey(p)];f?f.current=!0:r.push(p)}}if(r.sort((function(t,e){return t.distanceTo(s)-e.distanceTo(s)})),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var _=document.createDocumentFragment();for(d=0;d<r.length;d++)this._addTile(r[d],_);this._level.el.appendChild(_)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return j(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i);return[e.unproject(n,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new Z(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new z(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(me(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){we(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=h,t.onmousemove=h,Zt.ielt9&&this.options.opacity<1&&Pe(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&M(o(this._tileReady,this,t,null,s)),Ee(s,i),this._tiles[n]={el:s,coords:t,current:!0},e.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(Pe(i.el,0),k(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(we(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Zt.ielt9||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new z(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new B(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function $n(t){return new jn(t)}var Rn=jn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&Zt.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return je(i,"load",o(this._tileOnLoad,this,e,i)),je(i,"error",o(this._tileOnError,this,e,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:Zt.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return m(this._url,i(e,this.options))},_tileOnLoad:function(t,e){Zt.ielt9?setTimeout(o(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=h,e.onerror=h,!e.complete)){e.src=y;var i=this._tiles[t].coords;me(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",y),jn.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==y))return jn.prototype._tileReady.call(this,t,e,i)}});function Fn(t,e){return new Rn(t,e)}var Hn=Rn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i({},this.defaultWmsParams);for(var o in e)o in this.options||(n[o]=e[o]);var s=(e=p(this,e)).detectRetina&&Zt.retina?2:1,r=this.getTileSize();n.width=r.x*s,n.height=r.y*s,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Rn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=N(i.project(e[0]),i.project(e[1])),o=n.min,s=n.max,r=(this._wmsVersion>=1.3&&this._crs===qi?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=Rn.prototype.getTileUrl.call(this,t);return a+f(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});function Wn(t,e){return new Hn(t,e)}Rn.WMS=Hn,Fn.wms=Wn;var qn=Vi.extend({options:{padding:.1},initialize:function(t){p(this,t),r(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),we(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),s=n.multiplyBy(-i).add(o).subtract(this._map._getNewPixelOrigin(t,e));Zt.any3d?Ce(this._container,s,i):Ee(this._container,s)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new B(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Un=qn.extend({options:{tolerance:0},getEvents:function(){var t=qn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){qn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");je(t,"mousemove",this._onMouseMove,this),je(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),je(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){k(this._redrawRequest),delete this._ctx,me(this._container),Re(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){qn.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=Zt.retina?2:1;Ee(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",Zt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){qn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[r(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[r(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,i,n=t.options.dashArray.split(/[, ]+/),o=[];for(i=0;i<n.length;i++){if(e=Number(n[i]),isNaN(e))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||M(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new B,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,o,s,r=t._parts,a=r.length,l=this._ctx;if(a){for(l.beginPath(),i=0;i<a;i++){for(n=0,o=r[i].length;n<o;n++)s=r[i][n],l[n?"lineTo":"moveTo"](s.x,s.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||n)/n;1!==o&&(i.save(),i.scale(1,o)),i.beginPath(),i.arc(e.x,e.y/o,n,0,2*Math.PI,!1),1!==o&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,n=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(n)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(i=e);this._fireEvent(!!i&&[i],t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(xe(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var i,n,s=this._drawFirst;s;s=s.next)(i=s.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(we(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(o((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;i&&(i.prev=n,n?n.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;n&&(n.next=i,i?i.prev=n:n&&(this._drawLast=n),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function Vn(t){return Zt.canvas?new Un(t):null}var Kn=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Gn={_initContainer:function(){this._container=_e("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(qn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Kn("shape");we(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Kn("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;me(e),t.removeInteractiveTarget(e),delete this._layers[r(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=Kn("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=g(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=Kn("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ve(t._container)},_bringToBack:function(t){ye(t._container)}},Yn=Zt.vml?Kn:X,Xn=qn.extend({_initContainer:function(){this._container=Yn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Yn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){me(this._container),Re(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){qn.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),Ee(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Yn("path");t.options.className&&we(e,t.options.className),t.options.interactive&&we(e,"leaflet-interactive"),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){me(t._path),t.removeInteractiveTarget(t._path),delete this._layers[r(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,J(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ve(t._path)},_bringToBack:function(t){ye(t._path)}});function Jn(t){return Zt.svg||Zt.vml?new Xn(t):null}Zt.vml&&Xn.include(Gn),oi.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Vn(t)||Jn(t)}});var Qn=dn.extend({initialize:function(t,e){dn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=j(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function to(t,e){return new Qn(t,e)}Xn.create=Yn,Xn.pointsToPath=J,fn.geometryToLayer=_n,fn.coordsToLatLng=gn,fn.coordsToLatLngs=vn,fn.latLngToCoords=yn,fn.latLngsToCoords=bn,fn.getFeature=wn,fn.asFeature=xn,oi.mergeOptions({boxZoom:!0});var eo=gi.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){je(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Re(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){me(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),se(),Oe(),this._startPoint=this._map.mouseEventToContainerPoint(t),je(document,{contextmenu:Ye,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=_e("div","leaflet-zoom-box",this._container),we(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new B(this._point,this._startPoint),i=e.getSize();Ee(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(me(this._box),xe(this._container,"leaflet-crosshair")),re(),ze(),Re(document,{contextmenu:Ye,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var e=new Z(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});oi.addInitHook("addHandler","boxZoom",eo),oi.mergeOptions({doubleClickZoom:!0});var io=gi.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});oi.addInitHook("addHandler","doubleClickZoom",io),oi.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var no=gi.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new bi(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}we(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){xe(this._map._container,"leaflet-grab"),xe(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=j(this._map.options.maxBounds);this._offsetLimit=N(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,r=Math.abs(o+i)<Math.abs(s+i)?o:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),n)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),s=(this._lastTime-this._times[0])/1e3,r=i.easeLinearity,a=o.multiplyBy(r/s),l=a.distanceTo([0,0]),h=Math.min(i.inertiaMaxSpeed,l),c=a.multiplyBy(h/l),u=h/(i.inertiaDeceleration*r),d=c.multiplyBy(-u/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),M((function(){e.panBy(d,{duration:u,easeLinearity:r,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});oi.addInitHook("addHandler","dragging",no),oi.mergeOptions({keyboard:!0,keyboardPanDelta:80});var oo=gi.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),je(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Re(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,i=t.scrollTop||e.scrollTop,n=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(n,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;e<i;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;e<i;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;e<i;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;e<i;e++)n[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;e<i;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;e<i;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){je(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Re(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys){if(!n._panAnim||!n._panAnim._inProgress)if(e=this._panKeys[i],t.shiftKey&&(e=D(e).multiplyBy(3)),n.options.maxBounds&&(e=n._limitOffset(D(e),n.options.maxBounds)),n.options.worldCopyJump){var o=n.wrapLatLng(n.unproject(n.project(n.getCenter()).add(e)));n.panTo(o)}else n.panBy(e)}else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}Ye(t)}}});oi.addInitHook("addHandler","keyboard",oo),oi.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var so=gi.extend({addHooks:function(){je(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Re(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=ti(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),n),Ye(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,s=i?Math.ceil(o/i)*i:o,r=t._limitZoom(e+(this._delta>0?s:-s))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});oi.addInitHook("addHandler","scrollWheelZoom",so);var ro=600;oi.mergeOptions({tapHold:Zt.touchNative&&Zt.safari&&Zt.mobile,tapTolerance:15});var ao=gi.extend({addHooks:function(){je(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Re(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new z(e.clientX,e.clientY),this._holdTimeout=setTimeout(o((function(){this._cancel(),this._isTapValid()&&(je(document,"touchend",Ge),je(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))}),this),ro),je(document,"touchend touchcancel contextmenu",this._cancel,this),je(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Re(document,"touchend",Ge),Re(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Re(document,"touchend touchcancel contextmenu",this._cancel,this),Re(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new z(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});oi.addInitHook("addHandler","tapHold",ao),oi.mergeOptions({touchZoom:Zt.touch,bounceAtZoomLimits:!0});var lo=gi.extend({addHooks:function(){we(this._map._container,"leaflet-touch-zoom"),je(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){xe(this._map._container,"leaflet-touch-zoom"),Re(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),je(document,"touchmove",this._onTouchMove,this),je(document,"touchend touchcancel",this._onTouchEnd,this),Ge(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),s=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&s<1||this._zoom>e.getMaxZoom()&&s>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var r=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===r.x&&0===r.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),k(this._animRequest);var a=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=M(a,this,!0),Ge(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,k(this._animRequest),Re(document,"touchmove",this._onTouchMove,this),Re(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});oi.addInitHook("addHandler","touchZoom",lo),oi.BoxZoom=eo,oi.DoubleClickZoom=io,oi.Drag=no,oi.Keyboard=oo,oi.ScrollWheelZoom=so,oi.TapHold=ao,oi.TouchZoom=lo,t.Bounds=B,t.Browser=Zt,t.CRS=H,t.Canvas=Un,t.Circle=ln,t.CircleMarker=rn,t.Class=E,t.Control=ri,t.DivIcon=Nn,t.DivOverlay=On,t.DomEvent=ii,t.DomUtil=Ze,t.Draggable=bi,t.Evented=O,t.FeatureGroup=Yi,t.GeoJSON=fn,t.GridLayer=jn,t.Handler=gi,t.Icon=Ji,t.ImageOverlay=Mn,t.LatLng=$,t.LatLngBounds=Z,t.Layer=Vi,t.LayerGroup=Ki,t.LineUtil=$i,t.Map=oi,t.Marker=nn,t.Mixin=vi,t.Path=sn,t.Point=z,t.PolyUtil=Pi,t.Polygon=dn,t.Polyline=cn,t.Popup=zn,t.PosAnimation=ni,t.Projection=Hi,t.Rectangle=Qn,t.Renderer=qn,t.SVG=Xn,t.SVGOverlay=An,t.TileLayer=Rn,t.Tooltip=Dn,t.Transformation=V,t.Util=C,t.VideoOverlay=Cn,t.bind=o,t.bounds=N,t.canvas=Vn,t.circle=hn,t.circleMarker=an,t.control=ai,t.divIcon=Zn,t.extend=i,t.featureGroup=Xi,t.geoJSON=Tn,t.geoJson=Pn,t.gridLayer=$n,t.icon=Qi,t.imageOverlay=kn,t.latLng=R,t.latLngBounds=j,t.layerGroup=Gi,t.map=si,t.marker=on,t.point=D,t.polygon=pn,t.polyline=un,t.popup=In,t.rectangle=to,t.setOptions=p,t.stamp=r,t.svg=Jn,t.svgOverlay=Sn,t.tileLayer=Fn,t.tooltip=Bn,t.transformation=K,t.version=e,t.videoOverlay=En;var ho=window.L;t.noConflict=function(){return window.L=ho,this},window.L=t}(bn.exports)),bn.exports}var xn,Ln,Tn=wn(),Pn={exports:{}};xn||(xn=1,Ln=Pn,function(t,e){Ln.exports=t(wn()),void 0!==e&&e.L&&(e.L.Control.MiniMap=t(L),e.L.control.minimap=function(t,i){return new e.L.Control.MiniMap(t,i)})}((function(t){var e=t.Control.extend({includes:t.Evented?t.Evented.prototype:t.Mixin.Events,options:{position:"bottomright",toggleDisplay:!1,zoomLevelOffset:-5,zoomLevelFixed:!1,centerFixed:!1,zoomAnimation:!1,autoToggleDisplay:!1,minimized:!1,width:150,height:150,collapsedWidth:19,collapsedHeight:19,aimingRectOptions:{color:"#ff7800",weight:1,clickable:!1},shadowRectOptions:{color:"#000000",weight:1,clickable:!1,opacity:0,fillOpacity:0},strings:{hideText:"Hide MiniMap",showText:"Show MiniMap"},mapOptions:{}},initialize:function(e,i){t.Util.setOptions(this,i),this.options.aimingRectOptions.clickable=!1,this.options.shadowRectOptions.clickable=!1,this._layer=e},onAdd:function(e){this._mainMap=e,this._container=t.DomUtil.create("div","leaflet-control-minimap"),this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",t.DomEvent.disableClickPropagation(this._container),t.DomEvent.on(this._container,"mousewheel",t.DomEvent.stopPropagation);var i={attributionControl:!1,dragging:!this.options.centerFixed,zoomControl:!1,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:e.options.crs};return i=t.Util.extend(this.options.mapOptions,i),this._miniMap=new t.Map(this._container,i),this._miniMap.addLayer(this._layer),this._mainMapMoving=!1,this._miniMapMoving=!1,this._userToggledDisplay=!1,this._minimized=!1,this.options.toggleDisplay&&this._addToggleButton(),this._miniMap.whenReady(t.Util.bind((function(){this._aimingRect=t.rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._miniMap),this._shadowRect=t.rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._miniMap),this._mainMap.on("moveend",this._onMainMapMoved,this),this._mainMap.on("move",this._onMainMapMoving,this),this._miniMap.on("movestart",this._onMiniMapMoveStarted,this),this._miniMap.on("move",this._onMiniMapMoving,this),this._miniMap.on("moveend",this._onMiniMapMoved,this)}),this)),this._container},addTo:function(e){t.Control.prototype.addTo.call(this,e);var i=this.options.centerFixed||this._mainMap.getCenter();return this._miniMap.setView(i,this._decideZoom(!0)),this._setDisplay(this.options.minimized),this},onRemove:function(t){this._mainMap.off("moveend",this._onMainMapMoved,this),this._mainMap.off("move",this._onMainMapMoving,this),this._miniMap.off("moveend",this._onMiniMapMoved,this),this._miniMap.removeLayer(this._layer)},changeLayer:function(t){this._miniMap.removeLayer(this._layer),this._layer=t,this._miniMap.addLayer(this._layer)},_addToggleButton:function(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton("",this._toggleButtonInitialTitleText(),"leaflet-control-minimap-toggle-display leaflet-control-minimap-toggle-display-"+this.options.position,this._container,this._toggleDisplayButtonClicked,this):void 0,this._toggleDisplayButton.style.width=this.options.collapsedWidth+"px",this._toggleDisplayButton.style.height=this.options.collapsedHeight+"px"},_toggleButtonInitialTitleText:function(){return this.options.minimized?this.options.strings.showText:this.options.strings.hideText},_createButton:function(e,i,n,o,s,r){var a=t.DomUtil.create("a",n,o);a.innerHTML=e,a.href="#",a.title=i;var l=t.DomEvent.stopPropagation;return t.DomEvent.on(a,"click",l).on(a,"mousedown",l).on(a,"dblclick",l).on(a,"click",t.DomEvent.preventDefault).on(a,"click",s,r),a},_toggleDisplayButtonClicked:function(){this._userToggledDisplay=!0,this._minimized?this._restore():this._minimize()},_setDisplay:function(t){t!==this._minimized&&(this._minimized?this._restore():this._minimize())},_minimize:function(){this.options.toggleDisplay?(this._container.style.width=this.options.collapsedWidth+"px",this._container.style.height=this.options.collapsedHeight+"px",this._toggleDisplayButton.className+=" minimized-"+this.options.position,this._toggleDisplayButton.title=this.options.strings.showText):this._container.style.display="none",this._minimized=!0,this._onToggle()},_restore:function(){this.options.toggleDisplay?(this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",this._toggleDisplayButton.className=this._toggleDisplayButton.className.replace("minimized-"+this.options.position,""),this._toggleDisplayButton.title=this.options.strings.hideText):this._container.style.display="block",this._minimized=!1,this._onToggle()},_onMainMapMoved:function(t){if(this._miniMapMoving)this._miniMapMoving=!1;else{var e=this.options.centerFixed||this._mainMap.getCenter();this._mainMapMoving=!0,this._miniMap.setView(e,this._decideZoom(!0)),this._setDisplay(this._decideMinimized())}this._aimingRect.setBounds(this._mainMap.getBounds())},_onMainMapMoving:function(t){this._aimingRect.setBounds(this._mainMap.getBounds())},_onMiniMapMoveStarted:function(t){if(!this.options.centerFixed){var e=this._aimingRect.getBounds(),i=this._miniMap.latLngToContainerPoint(e.getSouthWest()),n=this._miniMap.latLngToContainerPoint(e.getNorthEast());this._lastAimingRectPosition={sw:i,ne:n}}},_onMiniMapMoving:function(e){this.options.centerFixed||!this._mainMapMoving&&this._lastAimingRectPosition&&(this._shadowRect.setBounds(new t.LatLngBounds(this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.ne))),this._shadowRect.setStyle({opacity:1,fillOpacity:.3}))},_onMiniMapMoved:function(t){this._mainMapMoving?this._mainMapMoving=!1:(this._miniMapMoving=!0,this._mainMap.setView(this._miniMap.getCenter(),this._decideZoom(!1)),this._shadowRect.setStyle({opacity:0,fillOpacity:0}))},_isZoomLevelFixed:function(){var t=this.options.zoomLevelFixed;return this._isDefined(t)&&this._isInteger(t)},_decideZoom:function(t){if(this._isZoomLevelFixed())return t?this.options.zoomLevelFixed:this._mainMap.getZoom();if(t)return this._mainMap.getZoom()+this.options.zoomLevelOffset;var e,i=this._miniMap.getZoom()-this._mainMap.getZoom(),n=this._miniMap.getZoom()-this.options.zoomLevelOffset;return i>this.options.zoomLevelOffset&&this._mainMap.getZoom()<this._miniMap.getMinZoom()-this.options.zoomLevelOffset?this._miniMap.getZoom()>this._lastMiniMapZoom?(e=this._mainMap.getZoom()+1,this._miniMap.setZoom(this._miniMap.getZoom()-1)):e=this._mainMap.getZoom():e=n,this._lastMiniMapZoom=this._miniMap.getZoom(),e},_decideMinimized:function(){return this._userToggledDisplay?this._minimized:this.options.autoToggleDisplay?!!this._mainMap.getBounds().contains(this._miniMap.getBounds()):this._minimized},_isInteger:function(t){return"number"==typeof t},_isDefined:function(t){return void 0!==t},_onToggle:function(){t.Util.requestAnimFrame((function(){t.DomEvent.on(this._container,"transitionend",this._fireToggleEvents,this),t.Browser.any3d||t.Util.requestAnimFrame(this._fireToggleEvents,this)}),this)},_fireToggleEvents:function(){t.DomEvent.off(this._container,"transitionend",this._fireToggleEvents,this);var e={minimized:this._minimized};this.fire(this._minimized?"minimize":"restore",e),this.fire("toggle",e)}});return t.Map.mergeOptions({miniMapControl:!1}),t.Map.addInitHook((function(){this.options.miniMapControl&&(this.miniMapControl=(new e).addTo(this))})),e}),window));var Mn=ve('<div id="map-position" class="svelte-1k961ph"><div id="map-position-inner"> <a target="_blank" rel="noreferrer">view on osm.org</a> <br> <br> <br> <br> </div> <div id="map-position-close" class="svelte-1k961ph"><a href="#hide">hide</a></div></div>');function kn(t,e){let i;le(e,!1);let n=E(),o=E(),s=E(),r=E(),a=E(),l=E();function h(t,e){S(n,t.getCenter().lat.toFixed(5)+","+t.getCenter().lng.toFixed(5)),S(r,function(t){return"https://openstreetmap.org/#map="+t.getZoom()+"/"+t.getCenter().lat.toFixed(5)+"/"+t.getCenter().lng.toFixed(5)}(t)),S(o,t.getZoom()),S(s,function(t){var e=t.getBounds(),i=e.getWest(),n=e.getEast();return n-i>=360&&(i=t.getCenter().lng-179.999,n=t.getCenter().lng+179.999),n=L.latLng(77,n).wrap().lng,[(i=L.latLng(77,i).wrap().lng).toFixed(5),e.getNorth().toFixed(5),n.toFixed(5),e.getSouth().toFixed(5)].join(",")}(t)),S(l,"-"),e&&S(l,[e.lat.toFixed(5),e.lng.toFixed(5)].join(",")),i&&S(a,[i.lat.toFixed(5),i.lng.toFixed(5)].join(","))}xi.subscribe((t=>{t&&(t.on("move",(function(){h(t)})),t.on("mousemove",(function(e){h(t,e.latlng)})),t.on("click",(function(e){i=e.latlng,h(t)})),t.on("load",(function(){h(t)})))})),Qe();var c=Mn(),u=q(c),d=q(u),p=V(d),f=V(p,3),_=V(f,2),m=V(_,2),g=V(m,2),v=q(V(u,2));lt((()=>{Te(d,`map center: ${oe(n)??""} `),$e(p,"href",oe(r)),Te(f,` map zoom: ${oe(o)??""} `),Te(_,` viewbox: ${oe(s)??""} `),Te(m,` last click: ${oe(a)??""} `),Te(g,` mouse position: ${oe(l)??""}`)})),fe("click",v,(function(){document.getElementById("map-position").style.display="none",document.getElementById("show-map-position").style.display="block"})),we(t,c),he()}var Cn=ve('<!> <div id="map" class="svelte-1vbvdrk"></div> <button id="show-map-position" class="leaflet-bar btn btn-sm btn-outline-secondary svelte-1vbvdrk">show map bounds</button>',1);function En(t,e){le(e,!1);let i=ri(e,"display_minimap",8,!1),n=ri(e,"current_result",8,null),o=ri(e,"position_marker",8,null),s=[];function r(t){let e=function(t){const e=Nominatim_Config.Map_Tile_Attribution;let n=new Tn.map(t,{attributionControl:!1,scrollWheelZoom:!0,touchZoom:!1,center:[Nominatim_Config.Map_Default_Lat,Nominatim_Config.Map_Default_Lon],zoom:Nominatim_Config.Map_Default_Zoom});if(void 0!==Nominatim_Config.Map_Default_Bounds&&Nominatim_Config.Map_Default_Bounds&&n.fitBounds(Nominatim_Config.Map_Default_Bounds),e&&e.length&&Tn.control.attribution({prefix:'<a href="https://leafletjs.com/">Leaflet</a>'}).addTo(n),Tn.tileLayer(Nominatim_Config.Map_Tile_URL,{attribution:e}).addTo(n),i()){let t=new Tn.TileLayer(Nominatim_Config.Map_Tile_URL,{minZoom:0,maxZoom:13,attribution:e});new Tn.Control.MiniMap(t,{toggleDisplay:!0}).addTo(n)}const o=Tn.Control.extend({options:{position:"topright"},onAdd:()=>document.getElementById("show-map-position")});return n.addControl(new o),n}(t);return xi.set(e),a(n()),{destroy:()=>{xi.set(null),e.remove()}}}function a(t){let e=pi(xi);if(!e)return;if(function(){let t=pi(xi);t&&s.forEach((function(e){t.removeLayer(e)}))}(),o()){let t=Tn.circleMarker(o(),{radius:5,weight:2,fillColor:"#ff7800",color:"red",opacity:.75,zIndexOffset:100,clickable:!1});t.bindTooltip(`Search (${o()[0]},${o()[1]})`).openTooltip(),t.addTo(e),s.push(t)}var i=new URLSearchParams(window.location.search).get("viewbox");if(i){let t=i.split(","),n=Tn.latLngBounds([t[1],t[0]],[t[3],t[2]]),o=Tn.rectangle(n,{color:"#69d53e",weight:3,dashArray:"5 5",opacity:.8,fill:!1,interactive:!1});e.addLayer(o),s.push(o)}if(!t)return;let n=t.centroid?t.centroid.coordinates[1]:t.lat,r=t.centroid?t.centroid.coordinates[0]:t.lon,a=t.geometry||t.geojson;if(n&&r){let t=Tn.circleMarker([n,r],{radius:10,weight:2,fillColor:"#ff7800",color:"blue",opacity:.75});o()&&t.bindTooltip("Result").openTooltip(),e.addLayer(t),s.push(t)}if(a){var l=Tn.geoJson({type:"FeatureCollection",features:[{type:"Feature",geometry:a,properties:{}}]},{style:()=>({interactive:!1,color:"blue"})});e.addLayer(l),s.push(l),e.fitBounds(l.getBounds())}else n&&r&&o()?e.fitBounds([[n,r],o()],{padding:[50,50]}):n&&r&&e.setView([n,r],10)}st((()=>ce(n())),(()=>{a(n())})),rt(),Qe();var l=Cn(),h=U(l);kn(h,{});var c=V(h,2);!function(t,e,i){ot((()=>{var n=se((()=>e(t,i?.())||{}));if(n?.destroy)return()=>n.destroy()}))}(c,(t=>r(t))),fe("click",V(c,2),Xe((function(t){t.target.style.display="none",document.getElementById("map-position").style.display="block"}))),we(t,l),he()}var An=ve('<!> <div id="content" class="svelte-1d53ob0"><div class="sidebar svelte-1d53ob0"><!></div> <div id="map-wrapper" class="svelte-1d53ob0"><!></div></div>',1);function Sn(t,e){le(e,!1);const i=oi(),n=()=>ni(Mi,"$page",i);let o=E(),s=E();st((()=>n()),(()=>{let t=n();"search"===t.tab&&function(t){Bi(),S(o,{q:t.get("q"),street:t.get("street"),city:t.get("city"),county:t.get("county"),state:t.get("state"),country:t.get("country"),postalcode:t.get("postalcode"),polygon_geojson:Nominatim_Config.Search_AreaPolygons?1:0,viewbox:t.get("viewbox"),bounded:t.get("bounded"),dedupe:t.has("dedupe")&&"1"!==t.get("dedupe")?0:1,"accept-language":t.get("accept-language"),countrycodes:t.get("countrycodes"),layer:t.get("layer"),limit:t.get("limit"),polygon_threshold:t.get("polygon_threshold"),exclude_place_ids:t.get("exclude_place_ids"),format:"jsonv2"});let e=oe(o).street||oe(o).city||oe(o).county||oe(o).state||oe(o).country||oe(o).postalcode;oe(o).q||e?Oi("search",oe(o),(function(t){Li.set(t),e?(Bi("Result for "+[oe(o).street,oe(o).city,oe(o).county,oe(o).state,oe(o).country,oe(o).postalcode].filter((t=>t&&t.length>1)).join(", ")),document.querySelector(".nav-tabs a[href='#structured']").click(),document.querySelector("input[name=street]").focus()):(Bi("Result for "+oe(o).q),document.querySelector("input[name=q]").focus())})):Li.set(void 0)}(t.params)})),rt(),Qe();var r=An(),a=U(r);tn(a,{children:(t,e)=>{an(t,{get api_request_params(){return oe(o)},bStructuredSearch:undefined})},$$slots:{default:!0}});var l=q(V(a,2));vn(q(l),{get current_result(){return oe(s)},set current_result(t){S(s,t)},reverse_search:!1,$$legacy:!0}),En(q(V(l,2)),{get current_result(){return oe(s)},display_minimap:!0}),we(t,r),he()}var On=ve("<option> </option>"),zn=ve('<div class="col-auto"><label for="reverse-lat" class="svelte-1s4hp9x">lat</label></div> <div class="col-auto"><input id="reverse-lat" name="lat" type="text" class="form-control form-control-sm d-inline svelte-1s4hp9x" placeholder="latitude" pattern="^-?\\d+(\\.\\d+)?$"></div> <div class="col-auto"><button id="switch-coords" class="btn btn-outline-secondary btn-sm svelte-1s4hp9x" title="switch lat and lon"><></button></div> <div class="col-auto"><label for="reverse-lon" class="svelte-1s4hp9x">lon</label></div> <div class="col-auto"><input id="reverse-lon" name="lon" type="text" class="form-control form-control-sm svelte-1s4hp9x" placeholder="longitude" pattern="^-?\\d+(\\.\\d+)?$"></div> <div class="col-auto"><label for="reverse-zoom" class="svelte-1s4hp9x">max zoom</label></div> <div class="col-auto"><select id="reverse-zoom" name="zoom" class="form-select form-select-sm svelte-1s4hp9x"><option>---</option><!></select></div> <input type="hidden" name="layer"> <div class="col-auto"><button type="submit" class="btn btn-primary btn-sm mx-1">Search</button></div>',1),In=ve('<!> <details id="searchAdvancedOptions" class="mt-2 svelte-1s4hp9x"><summary><small>Advanced options</small></summary> <ul class="svelte-1s4hp9x"><li class="svelte-1s4hp9x"><label for="option_layer" class="svelte-1s4hp9x">Layer</label> <input id="option_layer" name="layer" placeholder="e.g. address,poi,railway,natural,manmade" data-api-param="layer" class="form-control form-control-sm d-inline w-auto api-param-setting"></li></ul></details>',1);function Dn(t,e){le(e,!1);let i=ri(e,"lat",12,""),n=ri(e,"lon",12,""),o=ri(e,"zoom",12,""),s=ri(e,"api_request_params",24,(()=>({})));function r(t,e,i){if(null===t||null===e)return;let n=new URLSearchParams;n.set("lat",t),n.set("lon",e),n.set("zoom",o()),Ei("reverse",n)}const a=xi.subscribe((t=>{t&&t.on("click",(t=>{let e=t.latlng.wrap();r(e.lat.toFixed(5),e.lng.toFixed(5))}))}));function l(t){var e=t.target.value.split(/,|%2C/);2===e.length&&(document.querySelector("input[name=lat]").value=L.Util.trim(e[0]),document.querySelector("input[name=lon]").value=L.Util.trim(e[1]))}var h;h=a,null===qt&&Pt(),ai((()=>()=>se(h))),Qe();var c=In(),u=U(c);nn(u,{page:"reverse",children:(t,e)=>{var a=zn(),h=V(U(a),2),c=q(h),u=V(h,2),d=q(u),p=V(u,4),f=q(p),_=V(p,4),m=q(_);lt((()=>{o(),function(t){var e=Ht,i=Wt;Ht=!0,Wt=new Set;var n,o=Wt;try{se(t)}finally{if(Ht=e,Ht)for(n of Wt)i.add(n);Wt=i}for(n of o)if(65536&n.f)for(const t of n.deps||[])2&t.f||A(t,null);else A(n,null)}((()=>{}))}));var g=q(m);g.value=(g.__value="",""),Ae(V(g),1,wi,Ee,((t,e,i)=>{var n=On();n.value=null==(n.__value=i)?"":i;var o=q(n);lt((()=>Te(o,`${i??""} - ${oe(e)??""}`))),we(t,n)}));var v=V(_,2);lt((()=>Ze(v,s().layer||""))),qe(c,i),fe("change",c,l),fe("click",d,Je(Xe((()=>r(n(),i()))))),qe(f,n),Ge(m,o),we(t,a)},$$slots:{default:!0}});var d=V(u,2),p=V(q(d),2),f=q(p),_=V(q(f),2);lt((()=>Ze(_,s().layer||""))),fe("change",_,(function(t){document.querySelector("input[name="+t.target.dataset.apiParam+"]").value=t.target.value})),we(t,c),he()}var Bn=ve('<!> <div id="content" class="svelte-1d53ob0"><div class="sidebar svelte-1d53ob0"><!></div> <div id="map-wrapper" class="svelte-1d53ob0"><!></div></div>',1);function Nn(t,e){le(e,!1);const i=oi(),n=()=>ni(Mi,"$page",i);let o=E(),s=E(),r=E();st((()=>n()),(()=>{let t=n();var e;"reverse"===t.tab&&(e=t.params,Bi(),S(o,{lat:e.get("lat"),lon:e.get("lon"),zoom:e.get("zoom")>1?Number(e.get("zoom")):Number(Nominatim_Config.Reverse_Default_Search_Zoom),layer:e.get("layer"),format:"jsonv2"}),oe(o).lat&&oe(o).lon?Oi("reverse",oe(o),(function(t){S(r,[oe(o).lat,oe(o).lon]),t&&!t.error?Li.set([t]):Li.set([]),Bi("Reverse result for "+oe(o).lat+","+oe(o).lon),document.querySelector("input[name=lat]").focus()})):Li.set(void 0))})),rt(),Qe();var a=Bn(),l=U(a);tn(l,{children:(t,e)=>{Dn(t,{get lat(){return oe(o).lat},get lon(){return oe(o).lon},get zoom(){return oe(o).zoom},get api_request_params(){return oe(o)}})},$$slots:{default:!0}});var h=q(V(l,2));vn(q(h),{get current_result(){return oe(s)},set current_result(t){S(s,t)},reverse_search:!0,$$legacy:!0}),En(q(V(h,2)),{get current_result(){return oe(s)},get position_marker(){return oe(r)},display_minimap:!0}),we(t,a),he()}var Zn=ve('<form class="form-inline svelte-1kvo9ki" action="details.html"><div class="row g-1"><div class="col-auto"><input type="edit" class="form-control form-control-sm me-1 svelte-1kvo9ki" pattern="^[1-9][0-9]*$|^[NWRnwr]-?[1-9][0-9]*$|.*openstreetmap.*"></div> <div class="col-auto"><button type="submit" class="btn btn-primary btn-sm">Show</button></div></div></form> <small class="form-text text-muted svelte-1kvo9ki">OSM type+id (<em class="svelte-1kvo9ki">N123</em>, <em class="svelte-1kvo9ki">n123</em>, <em class="svelte-1kvo9ki">W123</em>, <em class="svelte-1kvo9ki">w123</em>, <em class="svelte-1kvo9ki">R123</em>, <em class="svelte-1kvo9ki">r123</em>),\n Place id (<em class="svelte-1kvo9ki">1234</em>) or\n URL (<em class="svelte-1kvo9ki">https://openstreetmap.org/way/123</em>)</small>',1);var jn=ve('<span class="noname">No Name</span>'),$n=ve('<tr class="svelte-6a43i0"><td class="name fw-bold svelte-6a43i0"><!></td><td class="svelte-6a43i0"> </td><td class="svelte-6a43i0"><!></td><td class="svelte-6a43i0"> </td><td class="svelte-6a43i0"> </td><td class="svelte-6a43i0"><!></td><td class="svelte-6a43i0"><!></td></tr>');function Rn(t,e){le(e,!1);const i=E(),n=E();let o=ri(e,"addressLine",8),s=ri(e,"bDistanceInMeters",8),r=ri(e,"bMarkUnusedLines",8,!1),a=ri(e,"sCountryCode",8);st((()=>ce(o())),(()=>{S(i,o().isaddress)})),st((()=>{}),(()=>{S(n,Nominatim_Config.Reverse_Only)})),rt(),Qe();var l=$n(),h=q(l);ke(q(h),(()=>o().localname),(t=>{var e=ye();lt((()=>Te(e,o().localname))),we(t,e)}),(t=>{we(t,jn())}));var c=V(h),u=q(c);lt((()=>{return Te(u,(t=o(),e=t.class+":"+t.type,t.type&&"administrative"===t.type&&t.place_type&&(e=e+" ("+t.place_type+")"),gi(e)));var t,e}));var d=V(c);De(q(d),(()=>yi(o())));var p=V(d),f=q(p),_=V(p),m=q(_);lt((()=>{return Te(m,(t=o().admin_level)&&t<15?t:"");var t}));var g=V(_);De(q(g),(()=>{return t=o().distance,s()?t<1?"0":'<abbr class="distance" title="'+t+' meters">~'+(t>=1e3?Math.round(t/1e3,1)+" km":Math.round(t,0)+" m")+"</abbr>":0===t?"0":'<abbr class="distance" title="spheric distance '+t+'">~'+Math.round(1e3*t,4)/1e3+"</abbr>";var t})),ke(q(V(g)),(()=>o().osm_id),(t=>{hn(t,{get feature(){return o()},children:(t,e)=>{we(t,ye("details"))},$$slots:{default:!0}})}),(t=>{var e=be();ke(U(e),(()=>!oe(n)&&o().type.match(/^country/)),(t=>{var e=G((()=>({country:o().localname})));Zi(t,{page:"search",get params_hash(){return oe(e)},children:(t,e)=>{we(t,ye("search by name"))},$$slots:{default:!0}})}),(t=>{var e=be();ke(U(e),(()=>!oe(n)&&"postcode"===o().type),(t=>{var e=G((()=>({postalcode:o().localname,country:a()})));Zi(t,{page:"search",get params_hash(){return oe(e)},children:(t,e)=>{we(t,ye("search by name"))},$$slots:{default:!0}})}),null,!0),we(t,e)}),!0),we(t,e)})),lt((()=>{He(l,"notused",r()&&!oe(i)),Te(f,o().rank_address)})),we(t,l),he()}var Fn=ve('(<a href="#openHint">how?</a>) <div id="postcode-hint" class="my-2 p-2 svelte-6dtaih"><button type="button" class="btn-close float-end m-1" aria-label="Close"></button> <p>Nightly calculated from nearby places having this postcode. <a href="https://nominatim.org/release-docs/latest/admin/Maintenance/#updating-postcodes">Documentation</a>.</p> <p>You can search for those with an <a target="_blank" rel="noreferrer">Overpass Turbo query</a>.</p> <p><a href="https://nominatim.org/2022/06/26/state-of-postcodes.html" target="_blank" rel="noreferrer">How Nominatim uses postcodes</a>.</p></div>',1);var Hn=ve('<tr><td class="svelte-1184nr4"> </td><td class="svelte-1184nr4"><!></td></tr>');function Wn(t,e){let i=ri(e,"title",8);var n=Hn(),o=q(n),s=q(o);Be(q(V(o)),e,"default",{}),lt((()=>Te(s,i()))),we(t,n)}var qn=ve('<div class="line"><span class="name svelte-ndknvb"> </span> </div>');function Un(t,e){le(e,!1);let i=ri(e,"items",8);Qe();var n=be();Ae(U(n),1,(()=>Object.keys(i())),Ee,((t,e)=>{var n=qn(),o=q(n),s=q(o),r=V(o);lt((()=>{Te(s,i()[oe(e)]),Te(r,` (${oe(e)??""})`)})),we(t,n)})),we(t,n),he()}var Vn=ve('<span class="noname fw-bold">No Name</span>'),Kn=ve(" <!>",1),Gn=ve(' <a href="https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id">on this server</a>)',1),Yn=ve(" <!>",1),Xn=ve('<tr class="all-columns svelte-1bl6i9w"><td colspan="7" class="svelte-1bl6i9w"><h2 class="svelte-1bl6i9w">Linked Places</h2></td></tr> <!>',1),Jn=ve("<td> </td>"),Qn=ve("<tr><td> </td><!></tr>"),to=ve("<td> </td>"),eo=ve("<tr><td> </td><!></tr>"),io=ve('<tr class="all-columns svelte-1bl6i9w"><td colspan="7" class="svelte-1bl6i9w"><h3 class="svelte-1bl6i9w">Address Keywords</h3></td></tr> <!>',1),no=ve('<tr class="all-columns svelte-1bl6i9w"><td colspan="7" class="svelte-1bl6i9w"><h3 class="svelte-1bl6i9w">Name Keywords</h3></td></tr> <!> <!>',1),oo=ve("<tr><td>Place has no keywords</td></tr>"),so=ve('<tr><td><a class="btn btn-outline-secondary btn-sm">display keywords</a></td></tr>'),ro=ve('<tr class="all-columns svelte-1bl6i9w"><td colspan="7" class="svelte-1bl6i9w"><h2 class="svelte-1bl6i9w">Keywords</h2></td></tr> <!>',1),ao=ve('<tr class="all-columns svelte-1bl6i9w"><td colspan="7" class="svelte-1bl6i9w"><h3 class="svelte-1bl6i9w"> </h3></td></tr> <!>',1),lo=ve("<tr><td><p>There are more child objects which are not shown.</p></td></tr>"),ho=ve("<!> <!>",1),co=ve("<tr><td>Place is not parent of other places</td></tr>"),uo=ve('<tr><td><a class="btn btn-outline-secondary btn-sm">display child places</a></td></tr>'),po=ve('<div class="row"><div class="col-sm-10"><h1 class="svelte-1bl6i9w"> <small class="svelte-1bl6i9w"><!></small></h1></div> <div class="col-sm-2 text-end"><!></div></div> <div class="row"><div class="col-md-6"><table id="locationdetails" class="table table-striped table-responsive"><tbody><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!></tbody></table></div> <div class="col-md-6"><div id="map-wrapper" class="svelte-1bl6i9w"><!></div></div></div> <div class="row"><div class="col-md-12"><h2 class="svelte-1bl6i9w">Address</h2> <table id="address" class="table table-striped table-small"><thead><tr><th>Local name</th><th>Type</th><th>OSM</th><th>Address rank</th><th>Admin level</th><th>Distance</th><th></th></tr></thead><tbody><!><!><!><tr class="all-columns svelte-1bl6i9w"><td colspan="7" class="svelte-1bl6i9w"><h2 class="svelte-1bl6i9w">Parent Of</h2></td></tr><!></tbody></table></div></div>',1),fo=ve('<!> <div class="container"><!></div>',1);function _o(t,e){le(e,!1);const i=oi(),n=()=>ni(Mi,"$page",i),o=E();let s=E(),r=E(),a=E(),l=E(!1);st((()=>n()),(()=>{let t=n();var e;"details"===t.tab&&(e=t.params,S(a,{place_id:e.get("place_id"),osmtype:e.get("osmtype"),osmid:e.get("osmid"),class:e.get("class"),keywords:e.get("keywords"),addressdetails:1,hierarchy:"1"===e.get("hierarchy")?1:0,group_hierarchy:1,polygon_geojson:1,format:"json"}),S(l,!1),oe(a).place_id||oe(a).osmtype&&oe(a).osmid?(oe(a).place_id?Bi("Details for "+oe(a).place_id):Bi("Details for "+oe(a).osmtype+oe(a).osmid),Oi("details",oe(a),(function(t){window.scrollTo(0,0),S(l,!0),S(s,t&&!t.error?t:void 0)}))):S(s,void 0),S(r,window.location.search))})),st((()=>{}),(()=>{S(o,Nominatim_Config.Reverse_Only)})),rt(),Qe();var h=fo(),c=U(h);tn(c,{children:(t,e)=>{!function(t,e){le(e,!1);let i=ri(e,"api_request_params",24,(()=>({})));Qe();var n=Zn(),o=U(n),s=q(o),r=q(s),a=q(r);lt((()=>Ze(a,(i().osmtype||"")+(i().osmid||"")+(i().place_id||"")))),fe("submit",o,Je((function(t){let e=t.target.querySelector("input[type=edit]").value.trim(),i=e.match(/^\s*([NWR])(-?\d+)\s*$/i)||e.match(/\/(relation|way|node)\/(-?\d+)\s*$/);var n=new URLSearchParams;if(i)n.set("osmtype",i[1].charAt(0).toUpperCase()),n.set("osmid",i[2]);else{if(!e.match(/^\d+$/))return void alert("invalid input");n.set("place_id",e)}Ei("details",n)}))),we(t,n),he()}(t,{get api_request_params(){return oe(a)}})},$$slots:{default:!0}}),ke(q(V(c,2)),(()=>oe(s)),(t=>{var e=po(),i=U(e),n=q(i),l=q(n),h=q(l);lt((()=>Te(h,`${(oe(s).localname||`${vi(oe(s).osm_type)} ${oe(s).osm_id}`)??""} `))),hn(q(V(h)),{get feature(){return oe(s)},children:(t,e)=>{we(t,ye("link to this page"))},$$slots:{default:!0}}),dn(q(V(n,2)),{get aPlace(){return oe(s)}});var c=V(i,2),u=q(c),d=q(u),p=q(d),f=q(p);Wn(f,{title:"Name",children:(t,e)=>{var i=be();ke(U(i),(()=>oe(s).names&&"object"==typeof oe(s).names&&Object.keys(oe(s).names).length),(t=>{Un(t,{get items(){return oe(s).names}})}),(t=>{we(t,Vn())})),we(t,i)},$$slots:{default:!0}});var _=V(f);Wn(_,{title:"Type",children:(t,e)=>{var i=ye();lt((()=>Te(i,`${oe(s).category??""}:${oe(s).type??""}`))),we(t,i)},$$slots:{default:!0}});var m=V(_);Wn(m,{title:"Last Updated",children:(t,e)=>{var i=ye();lt((()=>Te(i,oe(s).indexed_date))),we(t,i)},$$slots:{default:!0}});var g=V(m);ke(g,(()=>function(t){return"boundary"===t.category&&"administrative"===t.type}(oe(s))),(t=>{Wn(t,{title:"Admin Level",children:(t,e)=>{var i=ye();lt((()=>Te(i,oe(s).admin_level))),we(t,i)},$$slots:{default:!0}})}));var v=V(g);Wn(v,{title:"Search Rank",children:(t,e)=>{var i=ye();lt((()=>Te(i,oe(s).rank_search))),we(t,i)},$$slots:{default:!0}});var y=V(v);Wn(y,{title:"Address Rank",children:(t,e)=>{var i=ye();lt((()=>{return Te(i,`${oe(s).rank_address??""} (${t=oe(s).rank_address,(t<4?"other":t<6?"country":t<8?"region":t<10?"state":t<12?"state district":t<14?"county":t<16?"municipality":t<18?"city / town / village":t<20?"city / village district":t<22?"suburb / hamlet":t<24?"neighbourhood":t<26?"city block / square":26===t?"major street":27===t?"minory street / path":t<=30?"house / building":"other")??""})`);var t})),we(t,i)},$$slots:{default:!0}});var b=V(y);ke(b,(()=>oe(s).calculated_importance),(t=>{Wn(t,{title:"Importance",children:(t,e)=>{var i=Kn(),n=U(i);ke(V(n),(()=>!oe(s).importance),(t=>{we(t,ye("(estimated)"))})),lt((()=>Te(n,`${oe(s).calculated_importance??""} `))),we(t,i)},$$slots:{default:!0}})}));var w=V(b);Wn(w,{title:"Coverage",children:(t,e)=>{var i=ye();lt((()=>Te(i,function(t){return t.isarea?"Polygon":"Point"}(oe(s))))),we(t,i)},$$slots:{default:!0}});var x=V(w);Wn(x,{title:"Centre Point (lat,lon)",children:(t,e)=>{var i=ye();lt((()=>Te(i,`${oe(s).centroid.coordinates[1]??""},${oe(s).centroid.coordinates[0]??""}`))),we(t,i)},$$slots:{default:!0}});var L=V(x);Wn(L,{title:"OSM",children:(t,e)=>{var i=be();De(U(i),(()=>yi(oe(s)))),we(t,i)},$$slots:{default:!0}});var T=V(L);Wn(T,{title:"Place Id",children:(t,e)=>{var i=Gn(),n=U(i);lt((()=>Te(n,`${oe(s).place_id??""}\n (`))),we(t,i)},$$slots:{default:!0}});var P=V(T);ke(P,(()=>oe(s).calculated_wikipedia),(t=>{Wn(t,{title:"Wikipedia Calculated",children:(t,e)=>{var i=be();De(U(i),(()=>function(t){if(!t.calculated_wikipedia)return"";var e=t.calculated_wikipedia.split(":",2),i=gi(t.calculated_wikipedia);return'<a href="https://'+gi(e[0])+".wikipedia.org/wiki/"+gi(e[1])+'" target="_blank">'+i+"</a>"}(oe(s)))),we(t,i)},$$slots:{default:!0}})}));var M=V(P);Wn(M,{title:"Computed Postcode",children:(t,e)=>{var i=be();ke(U(i),(()=>oe(s).calculated_postcode),(t=>{var e=Yn(),i=U(e);!function(t,e){le(e,!1);let i=ri(e,"postcode",8),n=ri(e,"lat",8),o=ri(e,"lon",8),s=`\n // Based on the map bounds, you can zoom out and rerun the query\n\n [timeout:30]; // in seconds\n\n // we define a shortcut\n // https://wiki.openstreetmap.org/wiki/Overpass_turbo/Extended_Overpass_Turbo_Queries\n {{postcode=${i()}}}\n\n (\n node["addr:postcode"="{{postcode}}"]({{bbox}});\n way["addr:postcode"="{{postcode}}"]({{bbox}});\n relation["addr:postcode"="{{postcode}}"]({{bbox}});\n\n node["postal_code"="{{postcode}}"]({{bbox}});\n way["postal_code"="{{postcode}}"]({{bbox}});\n relation["postal_code"="{{postcode}}"]({{bbox}});\n );\n\n out body;\n >;\n out skel qt;\n `.replace(/^ {4}/gm,""),r="https://overpass-turbo.eu/?Q="+encodeURIComponent(s)+"&C="+encodeURIComponent([n(),o(),15].join(";"))+"&R";Qe();var a=Fn(),l=V(U(a)),h=q(V(l,2)),c=V(h,4);$e(V(q(c)),"href",r),fe("click",l,Je(Xe((function(){document.getElementById("postcode-hint").style.display="block"})))),fe("click",h,Xe((function(){document.getElementById("postcode-hint").style.display="none"}))),we(t,a),he()}(V(i),{get postcode(){return oe(s).calculated_postcode},get lat(){return oe(s).centroid.coordinates[1]},get lon(){return oe(s).centroid.coordinates[0]}}),lt((()=>Te(i,`${oe(s).calculated_postcode??""} `))),we(t,e)})),we(t,i)},$$slots:{default:!0}});var k=V(M);Wn(k,{title:"Address Tags",children:(t,e)=>{Un(t,{get items(){return oe(s).addresstags}})},$$slots:{default:!0}}),Wn(V(k),{title:"Extra Tags",children:(t,e)=>{Un(t,{get items(){return oe(s).extratags}})},$$slots:{default:!0}});var C=q(V(u,2));En(q(C),{get current_result(){return oe(s)}});var E=q(V(c,2)),A=V(q(E),2),S=V(q(A)),O=q(S);ke(O,(()=>oe(s).address),(t=>{var e=be();Ae(U(e),1,(()=>oe(s).address),Ee,((t,e)=>{var i=G((()=>function(t){let e=t.address.find((t=>"country_code"===t.type));return e?e.localname:null}(oe(s))));Rn(t,{get addressLine(){return oe(e)},bMarkUnusedLines:!0,bDistanceInMeters:!1,get sCountryCode(){return oe(i)}})})),we(t,e)}));var z=V(O);ke(z,(()=>oe(s).linked_places),(t=>{var e=Xn();Ae(V(U(e),2),1,(()=>oe(s).linked_places),Ee,((t,e)=>{Rn(t,{get addressLine(){return oe(e)},bMarkUnusedLines:!0,bDistanceInMeters:!0})})),we(t,e)}));var I=V(z);ke(I,(()=>!oe(o)),(t=>{var e=ro();ke(V(U(e),2),(()=>oe(a).keywords),(t=>{var e=be();ke(U(e),(()=>{return(t=oe(s)).keywords&&t.keywords.name&&t.keywords.address&&(t.keywords.name.length>0||t.keywords.address.length>0);var t}),(t=>{var e=no(),i=V(U(e),2);Ae(i,1,(()=>oe(s).keywords.name),Ee,((t,e)=>{var i=Qn(),n=q(i),o=q(n);lt((()=>Te(o,bi(oe(e).token)))),ke(V(n),(()=>oe(e).id),(t=>{var i=Jn(),n=q(i);lt((()=>Te(n,`word id: ${oe(e).id??""}`))),we(t,i)})),we(t,i)})),ke(V(i,2),(()=>oe(s).keywords.address),(t=>{var e=io();Ae(V(U(e),2),1,(()=>oe(s).keywords.address),Ee,((t,e)=>{var i=eo(),n=q(i),o=q(n);lt((()=>Te(o,bi(oe(e).token)))),ke(V(n),(()=>oe(e).id),(t=>{var i=to(),n=q(i);lt((()=>Te(n,`word id: ${oe(e).id??""}`))),we(t,i)})),we(t,i)})),we(t,e)})),we(t,e)}),(t=>{we(t,oo())})),we(t,e)}),(t=>{var e=so(),i=q(e),n=q(i);lt((()=>$e(n,"href",`${oe(r)??""}&keywords=1`))),we(t,e)})),we(t,e)})),ke(V(I,2),(()=>oe(a).hierarchy),(t=>{var e=be();ke(U(e),(()=>oe(s).hierarchy&&"object"==typeof oe(s).hierarchy&&Object.keys(oe(s).hierarchy).length),(t=>{var e=ho(),i=U(e);Ae(i,1,(()=>Object.keys(oe(s).hierarchy)),Ee,((t,e)=>{var i=ao(),n=U(i),o=q(n),r=q(o),a=q(r);Ae(V(n,2),1,(()=>oe(s).hierarchy[oe(e)]),Ee,((t,e)=>{Rn(t,{get addressLine(){return oe(e)},bDistanceInMeters:!0})})),lt((()=>Te(a,oe(e)))),we(t,i)})),ke(V(i,2),(()=>Object.keys(oe(s).hierarchy)>500),(t=>{we(t,lo())})),we(t,e)}),(t=>{we(t,co())})),we(t,e)}),(t=>{var e=uo(),i=q(e),n=q(i);lt((()=>$e(n,"href",`${oe(r)??""}&hierarchy=1`))),we(t,e)})),we(t,e)}),(t=>{var e=be();ke(U(e),(()=>""!==window.location.search&&oe(l)),(t=>{we(t,ye("No such place found."))}),null,!0),we(t,e)})),we(t,h),he()}var mo=ve('<tr><td><!></td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td><a target="josm">josm</a></td></tr>'),go=ve('<!> <div class="container"><div class="row"><div class="col-sm-12"><h1>Broken polygons</h1> <p> </p> <table class="table table-striped table-hover"><thead><tr><th>OSM object</th><th>Class</th><th>Type</th><th>Name</th><th>Country Code</th><th>Error message</th><th>Updated</th><th></th></tr></thead><tbody></tbody></table></div></div></div>',1);var vo=ve("<tr><td><!></td><td> </td><td> </td><td><!></td><td> </td><td> </td></tr>"),yo=ve('<!> <div class="container"><div class="row"><div class="col-sm-12"><h1>Deletable</h1> <p> </p> <table class="table table-striped table-hover"><thead><tr><th>Place id</th><th>Country Code</th><th>Name</th><th>OSM object</th><th>Class</th><th>Type</th></tr></thead><tbody></tbody></table></div></div></div>',1);var bo=ve('<!> <div class="container"><div class="row"><div class="col-sm-12"><h1>Server status</h1> <dl><dt>API Endpoint</dt> <dd><a> </a></dd> <dt>Software version</dt> <dd> </dd> <dt>Database version</dt> <dd> </dd> <dt>Data last updated</dt> <dd> </dd></dl></div></div></div>',1);var wo=ve('<!> <div id="about-help" class="container svelte-1l5yrvt"></div>',1);var xo=ve("<!> <!>",1);const Lo=(To=function(t,e){le(e,!1);const i=oi(),n=()=>ni(Mi,"$page",i),o=E();Ei(),st((()=>n()),(()=>{S(o,n().tab)})),rt(),Qe();var s=xo();fe("popstate",j,(()=>Ei()));var r=U(s);ke(r,(()=>"search"===oe(o)),(t=>{Sn(t,{})}),(t=>{var e=be();ke(U(e),(()=>"reverse"===oe(o)),(t=>{Nn(t,{})}),(t=>{var e=be();ke(U(e),(()=>"details"===oe(o)),(t=>{_o(t,{})}),(t=>{var e=be();ke(U(e),(()=>"deletable"===oe(o)),(t=>{!function(t,e){le(e,!1);let i=E([]);ai((function(){Oi("deletable",{format:"json"},(function(t){S(i,t)})),Bi("Deletable objects")})),Qe();var n=yo(),o=U(n);tn(o,{});var s=q(V(o,2)),r=q(s),a=V(q(r),2),l=q(a),h=V(a,2);Ae(V(q(h)),5,(()=>oe(i)),Ee,((t,e)=>{var i=vo(),n=q(i);hn(q(n),{get feature(){return oe(e)},children:(t,i)=>{var n=ye();lt((()=>Te(n,oe(e).place_id))),we(t,n)},$$slots:{default:!0}});var o=V(n),s=q(o),r=V(o),a=q(r),l=V(r);De(q(l),(()=>yi(oe(e))));var h=V(l),c=q(h),u=q(V(h));lt((()=>{Te(s,oe(e).country_code),Te(a,oe(e).name),Te(c,oe(e).class),Te(u,oe(e).type)})),we(t,i)})),lt((()=>Te(l,`${oe(i).length??""} objects have been deleted in OSM but\n are still in the Nominatim database.`))),we(t,n),he()}(t,{})}),(t=>{var e=be();ke(U(e),(()=>"polygons"===oe(o)),(t=>{!function(t,e){le(e,!1);let i=E([]);ai((function(){Oi("polygons",{format:"json"},(function(t){S(i,t)})),Bi("Broken polygons")})),Qe();var n=go(),o=U(n);tn(o,{});var s=q(V(o,2)),r=q(s),a=V(q(r),2),l=q(a),h=V(a,2);Ae(V(q(h)),5,(()=>oe(i)),Ee,((t,e)=>{var i=mo(),n=q(i);De(q(n),(()=>yi(oe(e))));var o=V(n),s=q(o),r=V(o),a=q(r),l=V(r),h=q(l),c=V(l),u=q(c),d=V(c),p=q(d),f=V(d),_=q(f),m=q(V(f));lt((()=>$e(m,"href",`http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/${vi(oe(e).osm_type)??""}/${oe(e).osm_id??""}/full`))),lt((()=>{Te(s,oe(e).class),Te(a,oe(e).type),Te(h,oe(e).name),Te(u,oe(e).country_code||""),Te(p,oe(e).errormessage),Te(_,oe(e).updated)})),we(t,i)})),lt((()=>Te(l,`Total number of broken polygons: ${oe(i).length??""}.`))),we(t,n),he()}(t,{})}),(t=>{var e=be();ke(U(e),(()=>"status"===oe(o)),(t=>{!function(t,e){le(e,!1);let i=E({}),n=Nominatim_Config;ai((function(){Oi("status",{format:"json"},(function(t){S(i,t)})),Bi("Server status")})),Qe();var o=bo(),s=U(o);tn(s,{});var r=q(V(s,2)),a=q(r),l=V(q(a),2),h=V(q(l),2),c=q(h),u=q(c),d=V(h,4),p=q(d),f=V(d,4),_=q(f),m=q(V(f,4));lt((()=>{$e(c,"href",n.Nominatim_API_Endpoint),Te(u,n.Nominatim_API_Endpoint),Te(p,oe(i).software_version),Te(_,oe(i).database_version),Te(m,oe(i).data_updated)})),we(t,o),he()}(t,{})}),(t=>{var e=be();ke(U(e),(()=>"about"===oe(o)),(t=>{!function(t,e){le(e,!1),ai((()=>{Ii("theme/about-help.html",document.getElementById("about-help"))})),Qe();var i=wo();tn(U(i),{}),we(t,i),he()}(t,{})}),null,!0),we(t,e)}),!0),we(t,e)}),!0),we(t,e)}),!0),we(t,e)}),!0),we(t,e)}),!0),we(t,e)})),function(t){we(t,Ai())}(V(r,2)),we(t,s),he()},Po={target:document.body},function(t,{target:i,anchor:o,props:s={},events:r,context:a,intro:l=!0}){!function(){if(void 0===j){j=window;var t=Element.prototype,e=Node.prototype;$=n(e,"firstChild").get,R=n(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}();var h=new Set,c=t=>{for(var e=0;e<t.length;e++){var n=t[e];if(!h.has(n)){h.add(n);var o=Le(n);i.addEventListener(n,_e,{passive:o});var s=Pe.get(n);void 0===s?(document.addEventListener(n,_e,{passive:o}),Pe.set(n,1)):Pe.set(n,s+1)}}};c(e(de)),pe.add(c);var u=void 0,d=function(t){const e=et(64,t,!0);return()=>{ft(e)}}((()=>{var e=o??i.appendChild(F());return ct((()=>{a&&(le({}),qt.c=a),r&&(s.$$events=r),u=t(e,s)||{},a&&he()})),()=>{for(var t of h){i.removeEventListener(t,_e);var n=Pe.get(t);0==--n?(document.removeEventListener(t,_e),Pe.delete(t)):Pe.set(t,n)}pe.delete(c),Me.delete(u),e!==o&&e.parentNode?.removeChild(e)}}));return Me.set(u,d),u}(To,Po));var To,Po;return Lo}();
//# sourceMappingURL=bundle.js.map