@maptiler/geocoding-control 2.1.6 → 2.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/leaflet.umd.js CHANGED
@@ -1,14 +1,14 @@
1
- (function(V,$){typeof exports=="object"&&typeof module<"u"?$(exports,require("leaflet")):typeof define=="function"&&define.amd?define(["exports","leaflet"],$):(V=typeof globalThis<"u"?globalThis:V||self,$(V.leafletMaptilerGeocoder={},V.L))})(this,function(V,$){"use strict";var Is=Object.defineProperty;var Sn=V=>{throw TypeError(V)};var Bs=(V,$,ge)=>$ in V?Is(V,$,{enumerable:!0,configurable:!0,writable:!0,value:ge}):V[$]=ge;var I=(V,$,ge)=>Bs(V,typeof $!="symbol"?$+"":$,ge),xn=(V,$,ge)=>$.has(V)||Sn("Cannot "+ge);var Te=(V,$,ge)=>(xn(V,$,"read from private field"),ge?ge.call(V):$.get(V)),pi=(V,$,ge)=>$.has(V)?Sn("Cannot add the same private member more than once"):$ instanceof WeakSet?$.add(V):$.set(V,ge),yi=(V,$,ge,be)=>(xn(V,$,"write to private field"),be?be.call(V,ge):$.set(V,ge),ge);var mn,pn,Le,ot;function ge(i){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const t in i)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>i[t]})}}return e.default=i,Object.freeze(e)}const be=ge($);function ie(){}function Mn(i,e){for(const t in e)i[t]=e[t];return i}function vi(i){return i()}function wi(){return Object.create(null)}function qe(i){i.forEach(vi)}function Ei(i){return typeof i=="function"}function Xe(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}let Ot;function pe(i,e){return i===e?!0:(Ot||(Ot=document.createElement("a")),Ot.href=e,i===Ot.href)}function Cn(i){return Object.keys(i).length===0}function Nn(i,e,t,n){if(i){const r=Li(i,e,t,n);return i[0](r)}}function Li(i,e,t,n){return i[1]&&n?Mn(t.ctx.slice(),i[1](n(e))):t.ctx}function kn(i,e,t,n){return i[2],e.dirty}function On(i,e,t,n,r,u){if(r){const a=Li(e,t,n,u);i.p(a,r)}}function Rn(i){if(i.ctx.length>32){const e=[],t=i.ctx.length/32;for(let n=0;n<t;n++)e[n]=-1;return e}return-1}function Rt(i){return i??""}function j(i,e){i.appendChild(e)}function ne(i,e,t){i.insertBefore(e,t||null)}function ee(i){i.parentNode&&i.parentNode.removeChild(i)}function Y(i){return document.createElement(i)}function Re(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function Qe(i){return document.createTextNode(i)}function we(){return Qe(" ")}function Pn(){return Qe("")}function fe(i,e,t,n){return i.addEventListener(e,t,n),()=>i.removeEventListener(e,t,n)}function An(i){return function(e){return e.preventDefault(),i.call(this,e)}}function x(i,e,t){t==null?i.removeAttribute(e):i.getAttribute(e)!==t&&i.setAttribute(e,t)}function In(i){return Array.from(i.childNodes)}function mt(i,e){e=""+e,i.data!==e&&(i.data=e)}function _i(i,e){i.value=e??""}function Be(i,e,t){i.classList.toggle(e,!!t)}function Bn(i,e,{bubbles:t=!1,cancelable:n=!1}={}){return new CustomEvent(i,{detail:e,bubbles:t,cancelable:n})}let pt;function yt(i){pt=i}function Si(){if(!pt)throw new Error("Function called outside component initialization");return pt}function Gn(i){Si().$$.on_destroy.push(i)}function xi(){const i=Si();return(e,t,{cancelable:n=!1}={})=>{const r=i.$$.callbacks[e];if(r){const u=Bn(e,t,{cancelable:n});return r.slice().forEach(a=>{a.call(i,u)}),!u.defaultPrevented}return!0}}function Wn(i,e){const t=i.$$.callbacks[e.type];t&&t.slice().forEach(n=>n.call(this,e))}const ft=[],Vt=[];let ct=[];const Ti=[],Dn=Promise.resolve();let Kt=!1;function zn(){Kt||(Kt=!0,Dn.then(Mi))}function Yt(i){ct.push(i)}const Xt=new Set;let ht=0;function Mi(){if(ht!==0)return;const i=pt;do{try{for(;ht<ft.length;){const e=ft[ht];ht++,yt(e),Un(e.$$)}}catch(e){throw ft.length=0,ht=0,e}for(yt(null),ft.length=0,ht=0;Vt.length;)Vt.pop()();for(let e=0;e<ct.length;e+=1){const t=ct[e];Xt.has(t)||(Xt.add(t),t())}ct.length=0}while(ft.length);for(;Ti.length;)Ti.pop()();Kt=!1,Xt.clear(),yt(i)}function Un(i){if(i.fragment!==null){i.update(),qe(i.before_update);const e=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,e),i.after_update.forEach(Yt)}}function Fn(i){const e=[],t=[];ct.forEach(n=>i.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),ct=e}const Pt=new Set;let rt;function At(){rt={r:0,c:[],p:rt}}function It(){rt.r||qe(rt.c),rt=rt.p}function le(i,e){i&&i.i&&(Pt.delete(i),i.i(e))}function de(i,e,t,n){if(i&&i.o){if(Pt.has(i))return;Pt.add(i),rt.c.push(()=>{Pt.delete(i),n&&(t&&i.d(1),n())}),i.o(e)}else n&&n()}function Ci(i){return(i==null?void 0:i.length)!==void 0?i:Array.from(i)}function qn(i,e){de(i,1,1,()=>{e.delete(i.key)})}function jn(i,e,t,n,r,u,a,o,g,c,E,_){let C=i.length,M=u.length,N=C;const P={};for(;N--;)P[i[N].key]=N;const R=[],k=new Map,S=new Map,O=[];for(N=M;N--;){const G=_(r,u,N),s=t(G);let l=a.get(s);l?O.push(()=>l.p(G,e)):(l=c(s,G),l.c()),k.set(s,R[N]=l),s in P&&S.set(s,Math.abs(N-P[s]))}const D=new Set,H=new Set;function K(G){le(G,1),G.m(o,E),a.set(G.key,G),E=G.first,M--}for(;C&&M;){const G=R[M-1],s=i[C-1],l=G.key,f=s.key;G===s?(E=G.first,C--,M--):k.has(f)?!a.has(l)||D.has(l)?K(G):H.has(f)?C--:S.get(l)>S.get(f)?(H.add(l),K(G)):(D.add(f),C--):(g(s,a),C--)}for(;C--;){const G=i[C];k.has(G.key)||g(G,a)}for(;M;)K(R[M-1]);return qe(O),R}function Je(i){i&&i.c()}function je(i,e,t){const{fragment:n,after_update:r}=i.$$;n&&n.m(e,t),Yt(()=>{const u=i.$$.on_mount.map(vi).filter(Ei);i.$$.on_destroy?i.$$.on_destroy.push(...u):qe(u),i.$$.on_mount=[]}),r.forEach(Yt)}function Ze(i,e){const t=i.$$;t.fragment!==null&&(Fn(t.after_update),qe(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Zn(i,e){i.$$.dirty[0]===-1&&(ft.push(i),zn(),i.$$.dirty.fill(0)),i.$$.dirty[e/31|0]|=1<<e%31}function $e(i,e,t,n,r,u,a=null,o=[-1]){const g=pt;yt(i);const c=i.$$={fragment:null,ctx:[],props:u,update:ie,not_equal:r,bound:wi(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(g?g.$$.context:[])),callbacks:wi(),dirty:o,skip_bound:!1,root:e.target||g.$$.root};a&&a(c.root);let E=!1;if(c.ctx=t?t(i,e.props||{},(_,C,...M)=>{const N=M.length?M[0]:C;return c.ctx&&r(c.ctx[_],c.ctx[_]=N)&&(!c.skip_bound&&c.bound[_]&&c.bound[_](N),E&&Zn(i,_)),C}):[],c.update(),E=!0,qe(c.before_update),c.fragment=n?n(c.ctx):!1,e.target){if(e.hydrate){const _=In(e.target);c.fragment&&c.fragment.l(_),_.forEach(ee)}else c.fragment&&c.fragment.c();e.intro&&le(i.$$.fragment),je(i,e.target,e.anchor),Mi()}yt(g)}class et{constructor(){I(this,"$$");I(this,"$$set")}$destroy(){Ze(this,1),this.$destroy=ie}$on(e,t){if(!Ei(t))return ie;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}$set(e){this.$$set&&!Cn(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Hn="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Hn);function Vn(i){let e,t;return{c(){e=Re("svg"),t=Re("path"),x(t,"d","M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"),x(e,"viewBox","0 0 14 14"),x(e,"width","13"),x(e,"height","13"),x(e,"class","svelte-en2qvf")},m(n,r){ne(n,e,r),j(e,t)},p:ie,i:ie,o:ie,d(n){n&&ee(e)}}}class Ni extends et{constructor(e){super(),$e(this,e,null,Vn,Xe,{})}}function Kn(i){let e,t;return{c(){e=Re("svg"),t=Re("path"),x(t,"d","M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"),x(e,"viewBox","0 0 30 30"),x(e,"fill","none"),x(e,"xmlns","http://www.w3.org/2000/svg"),x(e,"class","svelte-d2loi5")},m(n,r){ne(n,e,r),j(e,t)},p:ie,i:ie,o:ie,d(n){n&&ee(e)}}}class ki extends et{constructor(e){super(),$e(this,e,null,Kn,Xe,{})}}function Yn(i){let e,t;return{c(){e=Y("img"),pe(e.src,t=i[3]+"area.svg")||x(e,"src",t),x(e,"alt",i[7]),x(e,"title",i[7]),x(e,"class","svelte-w9y5n9")},m(n,r){ne(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"area.svg")&&x(e,"src",t),r&128&&x(e,"alt",n[7]),r&128&&x(e,"title",n[7])},d(n){n&&ee(e)}}}function Xn(i){let e,t;return{c(){e=Y("img"),pe(e.src,t=i[3]+"reverse.svg")||x(e,"src",t),x(e,"alt",i[7]),x(e,"title",i[7]),x(e,"class","svelte-w9y5n9")},m(n,r){ne(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"reverse.svg")&&x(e,"src",t),r&128&&x(e,"alt",n[7]),r&128&&x(e,"title",n[7])},d(n){n&&ee(e)}}}function Qn(i){let e,t;return{c(){e=Y("img"),pe(e.src,t=i[3]+"poi.svg")||x(e,"src",t),x(e,"alt",i[7]),x(e,"title",i[7]),x(e,"class","svelte-w9y5n9")},m(n,r){ne(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"poi.svg")&&x(e,"src",t),r&128&&x(e,"alt",n[7]),r&128&&x(e,"title",n[7])},d(n){n&&ee(e)}}}function Jn(i){let e,t;return{c(){e=Y("img"),pe(e.src,t=i[3]+"postal_code.svg")||x(e,"src",t),x(e,"alt",i[7]),x(e,"title",i[7]),x(e,"class","svelte-w9y5n9")},m(n,r){ne(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"postal_code.svg")&&x(e,"src",t),r&128&&x(e,"alt",n[7]),r&128&&x(e,"title",n[7])},d(n){n&&ee(e)}}}function $n(i){let e,t;return{c(){e=Y("img"),pe(e.src,t=i[3]+"street.svg")||x(e,"src",t),x(e,"alt",i[7]),x(e,"title",i[7]),x(e,"class","svelte-w9y5n9")},m(n,r){ne(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"street.svg")&&x(e,"src",t),r&128&&x(e,"alt",n[7]),r&128&&x(e,"title",n[7])},d(n){n&&ee(e)}}}function er(i){let e,t;return{c(){e=Y("img"),pe(e.src,t=i[3]+"road.svg")||x(e,"src",t),x(e,"alt",i[7]),x(e,"title",i[7]),x(e,"class","svelte-w9y5n9")},m(n,r){ne(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"road.svg")&&x(e,"src",t),r&128&&x(e,"alt",n[7]),r&128&&x(e,"title",n[7])},d(n){n&&ee(e)}}}function tr(i){let e,t;return{c(){e=Y("img"),pe(e.src,t=i[3]+"housenumber.svg")||x(e,"src",t),x(e,"alt",i[7]),x(e,"title",i[7]),x(e,"class","svelte-w9y5n9")},m(n,r){ne(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"housenumber.svg")&&x(e,"src",t),r&128&&x(e,"alt",n[7]),r&128&&x(e,"title",n[7])},d(n){n&&ee(e)}}}function ir(i){let e,t,n,r;return{c(){e=Y("img"),pe(e.src,t=i[5])||x(e,"src",t),x(e,"alt",i[4]),x(e,"title",i[7]),x(e,"class","svelte-w9y5n9")},m(u,a){ne(u,e,a),n||(r=fe(e,"error",i[14]),n=!0)},p(u,a){a&32&&!pe(e.src,t=u[5])&&x(e,"src",t),a&16&&x(e,"alt",u[4]),a&128&&x(e,"title",u[7])},d(u){u&&ee(e),n=!1,r()}}}function nr(i){let e,t;return{c(){e=Y("div"),x(e,"class","sprite-icon svelte-w9y5n9"),x(e,"style",t=`
1
+ (function(K,ee){typeof exports=="object"&&typeof module<"u"?ee(exports,require("leaflet")):typeof define=="function"&&define.amd?define(["exports","leaflet"],ee):(K=typeof globalThis<"u"?globalThis:K||self,ee(K.leafletMaptilerGeocoder={},K.L))})(this,function(K,ee){"use strict";var Bs=Object.defineProperty;var xn=K=>{throw TypeError(K)};var Gs=(K,ee,ge)=>ee in K?Bs(K,ee,{enumerable:!0,configurable:!0,writable:!0,value:ge}):K[ee]=ge;var P=(K,ee,ge)=>Gs(K,typeof ee!="symbol"?ee+"":ee,ge),Tn=(K,ee,ge)=>ee.has(K)||xn("Cannot "+ge);var Te=(K,ee,ge)=>(Tn(K,ee,"read from private field"),ge?ge.call(K):ee.get(K)),pi=(K,ee,ge)=>ee.has(K)?xn("Cannot add the same private member more than once"):ee instanceof WeakSet?ee.add(K):ee.set(K,ge),yi=(K,ee,ge,be)=>(Tn(K,ee,"write to private field"),be?be.call(K,ge):ee.set(K,ge),ge);var pn,yn,Le,ot;function ge(i){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const t in i)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>i[t]})}}return e.default=i,Object.freeze(e)}const be=ge(ee);function ne(){}function Cn(i,e){for(const t in e)i[t]=e[t];return i}function vi(i){return i()}function wi(){return Object.create(null)}function qe(i){i.forEach(vi)}function Ei(i){return typeof i=="function"}function Xe(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}let Pt;function pe(i,e){return i===e?!0:(Pt||(Pt=document.createElement("a")),Pt.href=e,i===Pt.href)}function Nn(i){return Object.keys(i).length===0}function kn(i,e,t,n){if(i){const r=Li(i,e,t,n);return i[0](r)}}function Li(i,e,t,n){return i[1]&&n?Cn(t.ctx.slice(),i[1](n(e))):t.ctx}function On(i,e,t,n){return i[2],e.dirty}function Rn(i,e,t,n,r,u){if(r){const a=Li(e,t,n,u);i.p(a,r)}}function Pn(i){if(i.ctx.length>32){const e=[],t=i.ctx.length/32;for(let n=0;n<t;n++)e[n]=-1;return e}return-1}function At(i){return i??""}function H(i,e){i.appendChild(e)}function te(i,e,t){i.insertBefore(e,t||null)}function $(i){i.parentNode&&i.parentNode.removeChild(i)}function Y(i){return document.createElement(i)}function Re(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function Qe(i){return document.createTextNode(i)}function we(){return Qe(" ")}function An(){return Qe("")}function ce(i,e,t,n){return i.addEventListener(e,t,n),()=>i.removeEventListener(e,t,n)}function In(i){return function(e){return e.preventDefault(),i.call(this,e)}}function _(i,e,t){t==null?i.removeAttribute(e):i.getAttribute(e)!==t&&i.setAttribute(e,t)}function Bn(i){return Array.from(i.childNodes)}function mt(i,e){e=""+e,i.data!==e&&(i.data=e)}function _i(i,e){i.value=e??""}function Be(i,e,t){i.classList.toggle(e,!!t)}function Gn(i,e,{bubbles:t=!1,cancelable:n=!1}={}){return new CustomEvent(i,{detail:e,bubbles:t,cancelable:n})}let pt;function yt(i){pt=i}function Si(){if(!pt)throw new Error("Function called outside component initialization");return pt}function Wn(i){Si().$$.on_destroy.push(i)}function xi(){const i=Si();return(e,t,{cancelable:n=!1}={})=>{const r=i.$$.callbacks[e];if(r){const u=Gn(e,t,{cancelable:n});return r.slice().forEach(a=>{a.call(i,u)}),!u.defaultPrevented}return!0}}function Dn(i,e){const t=i.$$.callbacks[e.type];t&&t.slice().forEach(n=>n.call(this,e))}const ft=[],Vt=[];let ct=[];const Ti=[],zn=Promise.resolve();let Kt=!1;function Un(){Kt||(Kt=!0,zn.then(Mi))}function Yt(i){ct.push(i)}const Xt=new Set;let ht=0;function Mi(){if(ht!==0)return;const i=pt;do{try{for(;ht<ft.length;){const e=ft[ht];ht++,yt(e),Fn(e.$$)}}catch(e){throw ft.length=0,ht=0,e}for(yt(null),ft.length=0,ht=0;Vt.length;)Vt.pop()();for(let e=0;e<ct.length;e+=1){const t=ct[e];Xt.has(t)||(Xt.add(t),t())}ct.length=0}while(ft.length);for(;Ti.length;)Ti.pop()();Kt=!1,Xt.clear(),yt(i)}function Fn(i){if(i.fragment!==null){i.update(),qe(i.before_update);const e=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,e),i.after_update.forEach(Yt)}}function qn(i){const e=[],t=[];ct.forEach(n=>i.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),ct=e}const It=new Set;let rt;function bt(){rt={r:0,c:[],p:rt}}function vt(){rt.r||qe(rt.c),rt=rt.p}function re(i,e){i&&i.i&&(It.delete(i),i.i(e))}function ae(i,e,t,n){if(i&&i.o){if(It.has(i))return;It.add(i),rt.c.push(()=>{It.delete(i),n&&(t&&i.d(1),n())}),i.o(e)}else n&&n()}function Ci(i){return(i==null?void 0:i.length)!==void 0?i:Array.from(i)}function jn(i,e){ae(i,1,1,()=>{e.delete(i.key)})}function Zn(i,e,t,n,r,u,a,o,g,f,L,x){let C=i.length,N=u.length,M=C;const k={};for(;M--;)k[i[M].key]=M;const W=[],O=new Map,S=new Map,A=[];for(M=N;M--;){const I=x(r,u,M),s=t(I);let l=a.get(s);l?A.push(()=>l.p(I,e)):(l=f(s,I),l.c()),O.set(s,W[M]=l),s in k&&S.set(s,Math.abs(M-k[s]))}const z=new Set,D=new Set;function U(I){re(I,1),I.m(o,L),a.set(I.key,I),L=I.first,N--}for(;C&&N;){const I=W[N-1],s=i[C-1],l=I.key,c=s.key;I===s?(L=I.first,C--,N--):O.has(c)?!a.has(l)||z.has(l)?U(I):D.has(c)?C--:S.get(l)>S.get(c)?(D.add(l),U(I)):(z.add(c),C--):(g(s,a),C--)}for(;C--;){const I=i[C];O.has(I.key)||g(I,a)}for(;N;)U(W[N-1]);return qe(A),W}function Je(i){i&&i.c()}function je(i,e,t){const{fragment:n,after_update:r}=i.$$;n&&n.m(e,t),Yt(()=>{const u=i.$$.on_mount.map(vi).filter(Ei);i.$$.on_destroy?i.$$.on_destroy.push(...u):qe(u),i.$$.on_mount=[]}),r.forEach(Yt)}function Ze(i,e){const t=i.$$;t.fragment!==null&&(qn(t.after_update),qe(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Hn(i,e){i.$$.dirty[0]===-1&&(ft.push(i),Un(),i.$$.dirty.fill(0)),i.$$.dirty[e/31|0]|=1<<e%31}function $e(i,e,t,n,r,u,a=null,o=[-1]){const g=pt;yt(i);const f=i.$$={fragment:null,ctx:[],props:u,update:ne,not_equal:r,bound:wi(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(g?g.$$.context:[])),callbacks:wi(),dirty:o,skip_bound:!1,root:e.target||g.$$.root};a&&a(f.root);let L=!1;if(f.ctx=t?t(i,e.props||{},(x,C,...N)=>{const M=N.length?N[0]:C;return f.ctx&&r(f.ctx[x],f.ctx[x]=M)&&(!f.skip_bound&&f.bound[x]&&f.bound[x](M),L&&Hn(i,x)),C}):[],f.update(),L=!0,qe(f.before_update),f.fragment=n?n(f.ctx):!1,e.target){if(e.hydrate){const x=Bn(e.target);f.fragment&&f.fragment.l(x),x.forEach($)}else f.fragment&&f.fragment.c();e.intro&&re(i.$$.fragment),je(i,e.target,e.anchor),Mi()}yt(g)}class et{constructor(){P(this,"$$");P(this,"$$set")}$destroy(){Ze(this,1),this.$destroy=ne}$on(e,t){if(!Ei(t))return ne;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}$set(e){this.$$set&&!Nn(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Vn="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Vn);function Kn(i){let e,t;return{c(){e=Re("svg"),t=Re("path"),_(t,"d","M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"),_(e,"viewBox","0 0 14 14"),_(e,"width","13"),_(e,"height","13"),_(e,"class","svelte-en2qvf")},m(n,r){te(n,e,r),H(e,t)},p:ne,i:ne,o:ne,d(n){n&&$(e)}}}class Ni extends et{constructor(e){super(),$e(this,e,null,Kn,Xe,{})}}function Yn(i){let e,t;return{c(){e=Re("svg"),t=Re("path"),_(t,"d","M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"),_(e,"viewBox","0 0 30 30"),_(e,"fill","none"),_(e,"xmlns","http://www.w3.org/2000/svg"),_(e,"class","svelte-d2loi5")},m(n,r){te(n,e,r),H(e,t)},p:ne,i:ne,o:ne,d(n){n&&$(e)}}}class ki extends et{constructor(e){super(),$e(this,e,null,Yn,Xe,{})}}function Xn(i){let e,t;return{c(){e=Y("img"),pe(e.src,t=i[3]+"area.svg")||_(e,"src",t),_(e,"alt",i[7]),_(e,"title",i[7]),_(e,"class","svelte-w9y5n9")},m(n,r){te(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"area.svg")&&_(e,"src",t),r&128&&_(e,"alt",n[7]),r&128&&_(e,"title",n[7])},d(n){n&&$(e)}}}function Qn(i){let e,t;return{c(){e=Y("img"),pe(e.src,t=i[3]+"reverse.svg")||_(e,"src",t),_(e,"alt",i[7]),_(e,"title",i[7]),_(e,"class","svelte-w9y5n9")},m(n,r){te(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"reverse.svg")&&_(e,"src",t),r&128&&_(e,"alt",n[7]),r&128&&_(e,"title",n[7])},d(n){n&&$(e)}}}function Jn(i){let e,t;return{c(){e=Y("img"),pe(e.src,t=i[3]+"poi.svg")||_(e,"src",t),_(e,"alt",i[7]),_(e,"title",i[7]),_(e,"class","svelte-w9y5n9")},m(n,r){te(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"poi.svg")&&_(e,"src",t),r&128&&_(e,"alt",n[7]),r&128&&_(e,"title",n[7])},d(n){n&&$(e)}}}function $n(i){let e,t;return{c(){e=Y("img"),pe(e.src,t=i[3]+"postal_code.svg")||_(e,"src",t),_(e,"alt",i[7]),_(e,"title",i[7]),_(e,"class","svelte-w9y5n9")},m(n,r){te(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"postal_code.svg")&&_(e,"src",t),r&128&&_(e,"alt",n[7]),r&128&&_(e,"title",n[7])},d(n){n&&$(e)}}}function er(i){let e,t;return{c(){e=Y("img"),pe(e.src,t=i[3]+"street.svg")||_(e,"src",t),_(e,"alt",i[7]),_(e,"title",i[7]),_(e,"class","svelte-w9y5n9")},m(n,r){te(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"street.svg")&&_(e,"src",t),r&128&&_(e,"alt",n[7]),r&128&&_(e,"title",n[7])},d(n){n&&$(e)}}}function tr(i){let e,t;return{c(){e=Y("img"),pe(e.src,t=i[3]+"road.svg")||_(e,"src",t),_(e,"alt",i[7]),_(e,"title",i[7]),_(e,"class","svelte-w9y5n9")},m(n,r){te(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"road.svg")&&_(e,"src",t),r&128&&_(e,"alt",n[7]),r&128&&_(e,"title",n[7])},d(n){n&&$(e)}}}function ir(i){let e,t;return{c(){e=Y("img"),pe(e.src,t=i[3]+"housenumber.svg")||_(e,"src",t),_(e,"alt",i[7]),_(e,"title",i[7]),_(e,"class","svelte-w9y5n9")},m(n,r){te(n,e,r)},p(n,r){r&8&&!pe(e.src,t=n[3]+"housenumber.svg")&&_(e,"src",t),r&128&&_(e,"alt",n[7]),r&128&&_(e,"title",n[7])},d(n){n&&$(e)}}}function nr(i){let e,t,n,r;return{c(){e=Y("img"),pe(e.src,t=i[5])||_(e,"src",t),_(e,"alt",i[4]),_(e,"title",i[7]),_(e,"class","svelte-w9y5n9")},m(u,a){te(u,e,a),n||(r=ce(e,"error",i[14]),n=!0)},p(u,a){a&32&&!pe(e.src,t=u[5])&&_(e,"src",t),a&16&&_(e,"alt",u[4]),a&128&&_(e,"title",u[7])},d(u){u&&$(e),n=!1,r()}}}function rr(i){let e,t;return{c(){e=Y("div"),_(e,"class","sprite-icon svelte-w9y5n9"),_(e,"style",t=`
2
2
  width: ${i[6].width/Me}px;
3
3
  height: ${i[6].height/Me}px;
4
4
  background-image: url(${i[3]}sprite${Qt}.png);
5
5
  background-position: -${i[6].x/Me}px -${i[6].y/Me}px;
6
6
  background-size: ${Pe.width/Me}px ${Pe.height/Me}px;
7
- `),x(e,"title",i[7])},m(n,r){ne(n,e,r)},p(n,r){r&72&&t!==(t=`
7
+ `),_(e,"title",i[7])},m(n,r){te(n,e,r)},p(n,r){r&72&&t!==(t=`
8
8
  width: ${n[6].width/Me}px;
9
9
  height: ${n[6].height/Me}px;
10
10
  background-image: url(${n[3]}sprite${Qt}.png);
11
11
  background-position: -${n[6].x/Me}px -${n[6].y/Me}px;
12
12
  background-size: ${Pe.width/Me}px ${Pe.height/Me}px;
13
- `)&&x(e,"style",t),r&128&&x(e,"title",n[7])},d(n){n&&ee(e)}}}function Oi(i){let e,t;return{c(){e=Y("span"),t=Qe(i[7]),x(e,"class","secondary svelte-w9y5n9")},m(n,r){ne(n,e,r),j(e,t)},p(n,r){r&128&&mt(t,n[7])},d(n){n&&ee(e)}}}function rr(i){let e,t,n,r,u,a,o,g,c,E=(i[8]?i[0].place_name:i[0].place_name.replace(/,.*/,""))+"",_,C,M=i[2]==="always"||i[2]!=="never"&&!i[0].address&&!i[0].id.startsWith("road.")&&!i[0].id.startsWith("address.")&&!i[0].id.startsWith("postal_code.")&&(!i[0].id.startsWith("poi.")||!i[5])&&!i[8],N,P,R=(i[8]?"":i[0].place_name.replace(/[^,]*,?\s*/,""))+"",k,S,O,D,H,K;function G(m,h){return h&1&&(t=null),h&1&&(n=null),h&1&&(r=null),h&1&&(u=null),Pe&&m[6]?nr:m[5]?ir:m[0].address?tr:(t==null&&(t=!!m[0].id.startsWith("road.")),t?er:(n==null&&(n=!!m[0].id.startsWith("address.")),n?$n:(r==null&&(r=!!m[0].id.startsWith("postal_code.")),r?Jn:(u==null&&(u=!!m[0].id.startsWith("poi.")),u?Qn:m[8]?Xn:Yn))))}let s=G(i,-1),l=s(i),f=M&&Oi(i);return{c(){e=Y("li"),l.c(),a=we(),o=Y("span"),g=Y("span"),c=Y("span"),_=Qe(E),C=we(),f&&f.c(),N=we(),P=Y("span"),k=Qe(R),x(c,"class","primary svelte-w9y5n9"),x(g,"class","svelte-w9y5n9"),x(P,"class","line2 svelte-w9y5n9"),x(o,"class","texts svelte-w9y5n9"),x(e,"tabindex","-1"),x(e,"role","option"),x(e,"aria-selected",S=i[1]==="selected"),x(e,"aria-checked",O=i[1]==="picked"),x(e,"class",D=Rt(i[1])+" svelte-w9y5n9")},m(m,h){ne(m,e,h),l.m(e,null),j(e,a),j(e,o),j(o,g),j(g,c),j(c,_),j(g,C),f&&f.m(g,null),j(o,N),j(o,P),j(P,k),H||(K=[fe(e,"mouseenter",i[13]),fe(e,"focus",i[15]),fe(e,"click",i[16])],H=!0)},p(m,[h]){s===(s=G(m,h))&&l?l.p(m,h):(l.d(1),l=s(m),l&&(l.c(),l.m(e,a))),h&257&&E!==(E=(m[8]?m[0].place_name:m[0].place_name.replace(/,.*/,""))+"")&&mt(_,E),h&293&&(M=m[2]==="always"||m[2]!=="never"&&!m[0].address&&!m[0].id.startsWith("road.")&&!m[0].id.startsWith("address.")&&!m[0].id.startsWith("postal_code.")&&(!m[0].id.startsWith("poi.")||!m[5])&&!m[8]),M?f?f.p(m,h):(f=Oi(m),f.c(),f.m(g,null)):f&&(f.d(1),f=null),h&257&&R!==(R=(m[8]?"":m[0].place_name.replace(/[^,]*,?\s*/,""))+"")&&mt(k,R),h&2&&S!==(S=m[1]==="selected")&&x(e,"aria-selected",S),h&2&&O!==(O=m[1]==="picked")&&x(e,"aria-checked",O),h&2&&D!==(D=Rt(m[1])+" svelte-w9y5n9")&&x(e,"class",D)},i:ie,o:ie,d(m){m&&ee(e),l.d(),f&&f.d(),H=!1,qe(K)}}}const Ri=typeof devicePixelRatio>"u"?1:devicePixelRatio>1.25,Qt=Ri?"@2x":"",Me=Ri?2:1;let Pe,Bt;function sr(i,e,t){let n,r,u,{feature:a}=e,{style:o="default"}=e,{showPlaceType:g}=e,{missingIconsCache:c}=e,{iconsBaseUrl:E}=e;const _=xi();let C,M,N,P;function R(){Bt??(Bt=fetch(`${E}sprite${Qt}.json`).then(s=>s.json()).then(s=>{Pe=s}).catch(()=>{Pe=null}))}function k(){M&&c.add(M),S()}function S(){Pe!==void 0?O():(R(),Bt==null||Bt.then(O))}function O(){do{if(P--,t(4,C=n==null?void 0:n[P]),t(6,N=C?Pe==null?void 0:Pe.icons[C]:void 0),N)break;t(5,M=C?E+C.replace(/ /g,"_")+".svg":void 0)}while(P>-1&&(!M||c.has(M)))}function D(s){Wn.call(this,i,s)}const H=()=>k(),K=()=>_("select",void 0),G=s=>{document.activeElement!==s.target&&_("select",void 0)};return i.$$set=s=>{"feature"in s&&t(0,a=s.feature),"style"in s&&t(1,o=s.style),"showPlaceType"in s&&t(2,g=s.showPlaceType),"missingIconsCache"in s&&t(11,c=s.missingIconsCache),"iconsBaseUrl"in s&&t(3,E=s.iconsBaseUrl)},i.$$.update=()=>{var s,l,f,m,h;i.$$.dirty&1&&t(12,n=(s=a.properties)==null?void 0:s.categories),i.$$.dirty&1&&t(8,r=a.place_type[0]==="reverse"),i.$$.dirty&1&&t(7,u=((f=(l=a.properties)==null?void 0:l.categories)==null?void 0:f.join(", "))??((h=(m=a.properties)==null?void 0:m.place_type_name)==null?void 0:h[0])??a.place_type[0]),i.$$.dirty&4096&&(P=(n==null?void 0:n.length)??0,S())},[a,o,g,E,C,M,N,u,r,_,k,c,n,D,H,K,G]}class or extends et{constructor(e){super(),$e(this,e,sr,rr,Xe,{feature:0,style:1,showPlaceType:2,missingIconsCache:11,iconsBaseUrl:3})}}function lr(i){let e;return{c(){e=Y("div"),e.innerHTML='<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>',x(e,"class","svelte-7cmwmc")},m(t,n){ne(t,e,n)},p:ie,i:ie,o:ie,d(t){t&&ee(e)}}}class ur extends et{constructor(e){super(),$e(this,e,null,lr,Xe,{})}}function ar(i){let e,t,n;return{c(){e=Re("svg"),t=Re("path"),x(t,"stroke-width","4"),x(t,"d","M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"),x(t,"class","svelte-gzo3ar"),x(e,"width",n=i[0]==="list"?20:void 0),x(e,"viewBox","0 0 70 85"),x(e,"fill","none"),x(e,"class","svelte-gzo3ar"),Be(e,"in-map",i[0]!=="list"),Be(e,"list-icon",i[0]==="list")},m(r,u){ne(r,e,u),j(e,t)},p(r,[u]){u&1&&n!==(n=r[0]==="list"?20:void 0)&&x(e,"width",n),u&1&&Be(e,"in-map",r[0]!=="list"),u&1&&Be(e,"list-icon",r[0]==="list")},i:ie,o:ie,d(r){r&&ee(e)}}}function fr(i,e,t){let{displayIn:n}=e;return i.$$set=r=>{"displayIn"in r&&t(0,n=r.displayIn)},[n]}class cr extends et{constructor(e){super(),$e(this,e,fr,ar,Xe,{displayIn:0})}}function hr(i){let e,t;return{c(){e=Re("svg"),t=Re("path"),x(t,"d","M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"),x(e,"viewBox","0 0 60.006 21.412"),x(e,"width","14"),x(e,"height","20"),x(e,"class","svelte-en2qvf")},m(n,r){ne(n,e,r),j(e,t)},p:ie,i:ie,o:ie,d(n){n&&ee(e)}}}class dr extends et{constructor(e){super(),$e(this,e,null,hr,Xe,{})}}function gr(i){let e,t,n;return{c(){e=Re("svg"),t=Re("circle"),n=Re("path"),x(t,"cx","4.789"),x(t,"cy","4.787"),x(t,"r","3.85"),x(t,"class","svelte-1aq105l"),x(n,"d","M12.063 12.063 7.635 7.635"),x(n,"class","svelte-1aq105l"),x(e,"xmlns","http://www.w3.org/2000/svg"),x(e,"width","13"),x(e,"height","13"),x(e,"viewBox","0 0 13 13"),x(e,"class","svelte-1aq105l")},m(r,u){ne(r,e,u),j(e,t),j(e,n)},p:ie,i:ie,o:ie,d(r){r&&ee(e)}}}class mr extends et{constructor(e){super(),$e(this,e,null,gr,Xe,{})}}function pr(i,e,t){const n=e[1],r=e[0],u=n-r;return i===n&&t?i:((i-r)%u+u)%u+r}function bt(i){const e=[...i];return e[2]<e[0]&&(Math.abs((e[0]+e[2]+360)/2)>Math.abs((e[0]-360+e[2])/2)?e[0]-=360:e[2]+=360),e}let vt;async function yr(i,e,t){const n=i==null?void 0:i.getCenterAndZoom();for(const r of e??[])if(!(n&&(r.minZoom!=null&&r.minZoom>n[0]||r.maxZoom!=null&&r.maxZoom<n[0]))){if(r.type==="fixed")return r.coordinates.join(",");e:if(r.type==="client-geolocation"){if(vt&&r.cachedLocationExpiry&&vt.time+r.cachedLocationExpiry>Date.now()){if(!vt.coords)break e;return vt.coords}let u;try{return u=await new Promise((a,o)=>{t.signal.addEventListener("abort",()=>{o(Error("aborted"))}),navigator.geolocation.getCurrentPosition(g=>{a([g.coords.longitude,g.coords.latitude].map(c=>c.toFixed(6)).join(","))},g=>{o(g)},r)}),u}catch{}finally{r.cachedLocationExpiry&&(vt={time:Date.now(),coords:u})}if(t.signal.aborted)return}if(r.type==="server-geolocation")return"ip";if(n&&r.type==="map-center")return n[1].toFixed(6)+","+n[2].toFixed(6)}}const br=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i,Pi=/^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/,Ai=/^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i,Ii=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i,Bi=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i,Gi=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;function vr(i){if(!["DMS","DM","DD"].includes(i))throw new Error("invalid format specified");if(this.decimalCoordinates&&this.decimalCoordinates.trim()){const e=this.decimalCoordinates.split(",").map(M=>Number(M.trim())),t=Number(e[0]),n=Number(e[1]),r=Math.abs(t),u=Math.abs(n),a=t>0?"N":"S",o=n>0?"E":"W";let g;i=="DD"&&(g=`${r}° ${a}, ${u}° ${o}`);const c=Math.floor(r),E=Math.floor(u),_=(r-c)*60,C=(u-E)*60;if(i=="DM"){let M=Wi(_,3).toFixed(3).padStart(6,"0"),N=Wi(C,3).toFixed(3).padStart(6,"0");M.endsWith(".000")&&N.endsWith(".000")&&(M=M.replace(/\.000$/,""),N=N.replace(/\.000$/,"")),g=`${c}° ${M}' ${a}, ${E}° ${N}' ${o}`}if(i=="DMS"){const M=Math.floor(_),N=Math.floor(C);let P=((_-M)*60).toFixed(1).padStart(4,"0"),R=((C-N)*60).toFixed(1).padStart(4,"0");const k=M.toString().padStart(2,"0"),S=N.toString().padStart(2,"0");P.endsWith(".0")&&R.endsWith(".0")&&(P=P.replace(/\.0$/,""),R=R.replace(/\.0$/,"")),g=`${c}° ${k}' ${P}" ${a}, ${E}° ${S}' ${R}" ${o}`}return g}else throw new Error("no decimal coordinates to convert")}function Wi(i,e){const t=Math.pow(10,e);return Math.round((i+Number.EPSILON)*t)/t}function Jt(i,e){e||(e=5),i=i.replace(/\s+/g," ").trim();let t=null,n=null,r="",u="",a=null,o=[],g=!1;if(br.test(i))throw new Error("invalid coordinate value");if(Pi.test(i))if(o=Pi.exec(i),g=wt(o),g)t=Math.abs(o[1])+o[2]/60,Number(o[1])<0&&(t*=-1),n=Math.abs(o[3])+o[4]/60,Number(o[3])<0&&(n*=-1),a="DM";else throw new Error("invalid coordinate format");else if(Ai.test(i))if(o=Ai.exec(i),g=wt(o),g){if(t=o[2],n=o[6],t.includes(",")&&(t=t.replace(",",".")),n.includes(",")&&(n=n.replace(",",".")),a="DD",Number(Math.round(t))==Number(t))throw new Error("integer only coordinate provided");if(Number(Math.round(n))==Number(n))throw new Error("integer only coordinate provided");o[1]?(r=o[1],u=o[5]):o[4]&&(r=o[4],u=o[8])}else throw new Error("invalid decimal coordinate format");else if(Ii.test(i))if(o=Ii.exec(i),g=wt(o),g)t=Math.abs(parseInt(o[2])),o[4]&&(t+=o[4]/60,a="DM"),o[6]&&(t+=o[6].replace(",",".")/3600,a="DMS"),parseInt(o[2])<0&&(t=-1*t),n=Math.abs(parseInt(o[9])),o[11]&&(n+=o[11]/60),o[13]&&(n+=o[13].replace(",",".")/3600),parseInt(o[9])<0&&(n=-1*n),o[1]?(r=o[1],u=o[8]):o[7]&&(r=o[7],u=o[14]);else throw new Error("invalid DMS coordinates format");else if(Bi.test(i))if(o=Bi.exec(i),g=wt(o),g)t=Math.abs(parseInt(o[2])),o[4]&&(t+=o[4]/60,a="DM"),o[6]&&(t+=o[6]/3600,a="DMS"),parseInt(o[2])<0&&(t=-1*t),n=Math.abs(parseInt(o[10])),o[12]&&(n+=o[12]/60),o[14]&&(n+=o[14]/3600),parseInt(o[10])<0&&(n=-1*n),o[1]?(r=o[1],u=o[9]):o[8]&&(r=o[8],u=o[16]);else throw new Error("invalid DMS coordinates format");else if(Gi.test(i)){if(o=Gi.exec(i),g=wt(o),o.filter(c=>c).length<=5)throw new Error("invalid coordinates format");if(g)t=Math.abs(parseInt(o[2])),o[4]&&(t+=o[4].replace(",",".")/60,a="DM"),o[6]&&(t+=o[6].replace(",",".")/3600,a="DMS"),parseInt(o[2])<0&&(t=-1*t),n=Math.abs(parseInt(o[10])),o[12]&&(n+=o[12].replace(",",".")/60),o[14]&&(n+=o[14].replace(",",".")/3600),parseInt(o[10])<0&&(n=-1*n),o[1]?(r=o[1],u=o[9]):o[8]&&(r=o[8],u=o[16]);else throw new Error("invalid coordinates format")}if(g){if(Math.abs(n)>=180)throw new Error("invalid longitude value");if(Math.abs(t)>=90)throw new Error("invalid latitude value");if(r&&!u||!r&&u)throw new Error("invalid coordinates value");if(r&&r==u)throw new Error("invalid coordinates format");t.toString().includes(",")&&(t=t.replace(",",".")),n.toString().includes(",")&&(n=n.replace(",","."));let c=/S|SOUTH/i;c.test(r)&&t>0&&(t=-1*t),c=/W|WEST/i,c.test(u)&&n>0&&(n=-1*n);const E=o[0].trim();let _,C;const M=/[,/;\u0020]/g,N=E.match(M);if(N==null){const k=Math.floor(i.length/2);_=E.substring(0,k).trim(),C=E.substring(k).trim()}else{let k;N.length%2==1?k=Math.floor(N.length/2):k=N.length/2-1;let S=0;if(k==0)S=E.indexOf(N[0]),_=E.substring(0,S).trim(),C=E.substring(S+1).trim();else{let O=0,D=0;for(;O<=k;)S=E.indexOf(N[O],D),D=S+1,O++;_=E.substring(0,S).trim(),C=E.substring(S+1).trim()}}const P=_.split(".");if(P.length==2&&P[1]==0&&P[1].length!=2)throw new Error("invalid coordinates format");const R=C.split(".");if(R.length==2&&R[1]==0&&R[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(_)||/^\d+$/.test(C))throw new Error("degree only coordinate/s provided");return t=Number(Number(t).toFixed(e)),n=Number(Number(n).toFixed(e)),Object.freeze({verbatimCoordinates:E,verbatimLatitude:_,verbatimLongitude:C,decimalLatitude:t,decimalLongitude:n,decimalCoordinates:`${t},${n}`,originalFormat:a,closeEnough:wr,toCoordinateFormat:vr})}else throw new Error("coordinates pattern match failed")}function wt(i){if(!isNaN(i[0]))return!1;const e=[...i];if(e.shift(),e.length%2>0)return!1;const t=/^[-+]?\d+([\.,]\d+)?$/,n=/[eastsouthnorthwest]+/i,r=e.length/2;for(let u=0;u<r;u++){const a=e[u],o=e[u+r],g=t.test(a)&&t.test(o),c=n.test(a)&&n.test(o),E=a==o;if(!(a==null&&o==null)){if(a==null||o==null)return!1;if(g||c||E)continue;return!1}}return!0}function Di(i,e){const t=Math.abs(i-e);return Number(t.toFixed(6))<=1e-5}function wr(i){if(!i)throw new Error("coords must be provided");if(i.includes(",")){const e=i.split(",");if(Number(e[0])==NaN||Number(e[1])==NaN)throw new Error("coords are not valid decimals");return Di(this.decimalLatitude,Number(e[0]))&&Di(this.decimalLongitude,e[1])}else throw new Error("coords being tested must be separated by a comma")}const Er=Object.freeze({DMS:"DMS",DM:"DM",DD:"DD"});Jt.to=Er;const Lr=[{verbatimCoordinates:"40.123, -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:'40° 7´ 22.8" N 74° 7´ 22.8" W',verbatimLatitude:'40° 7´ 22.8" N',verbatimLongitude:'74° 7´ 22.8" W'},{verbatimCoordinates:"40° 7.38’ , -74° 7.38’",verbatimLatitude:"40° 7.38’",verbatimLongitude:"-74° 7.38’"},{verbatimCoordinates:"N40°7’22.8’’, W74°7’22.8’’",verbatimLatitude:"N40°7’22.8’’",verbatimLongitude:"W74°7’22.8’’"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:`40°7'22.8"N, 74°7'22.8"W`,verbatimLatitude:`40°7'22.8"N`,verbatimLongitude:`74°7'22.8"W`},{verbatimCoordinates:"40 7 22.8, -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"},{verbatimCoordinates:"40.123 -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123°,-74.123°",verbatimLatitude:"40.123°",verbatimLongitude:"-74.123°"},{verbatimCoordinates:"40.123N74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"4007.38N7407.38W",verbatimLatitude:"4007.38N",verbatimLongitude:"7407.38W"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:"400722.8N740722.8W",verbatimLatitude:"400722.8N",verbatimLongitude:"740722.8W"},{verbatimCoordinates:"N 40 7.38 W 74 7.38",verbatimLatitude:"N 40 7.38",verbatimLongitude:"W 74 7.38"},{verbatimCoordinates:"40:7:22.8N 74:7:22.8W",verbatimLatitude:"40:7:22.8N",verbatimLongitude:"74:7:22.8W"},{verbatimCoordinates:"40:7:23N,74:7:23W",verbatimLatitude:"40:7:23N",verbatimLongitude:"74:7:23W",decimalLatitude:40.1230555555,decimalLongitude:-74.1230555555},{verbatimCoordinates:'40°7’23"N 74°7’23"W',verbatimLatitude:'40°7’23"N',verbatimLongitude:'74°7’23"W',decimalLatitude:40.1230555555,decimalLongitude:-74.12305555555555},{verbatimCoordinates:'40°7’23"S 74°7’23"E',verbatimLatitude:'40°7’23"S',verbatimLongitude:'74°7’23"E',decimalLatitude:-40.1230555555,decimalLongitude:74.12305555555555},{verbatimCoordinates:'40°7’23" -74°7’23"',verbatimLatitude:'40°7’23"',verbatimLongitude:'-74°7’23"',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:'40d 7’ 23" N 74d 7’ 23" W',verbatimLatitude:'40d 7’ 23" N',verbatimLongitude:'74d 7’ 23" W',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:"40.123N 74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40 7 22.8; -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"}],_r={decimalLatitude:40.123,decimalLongitude:-74.123},Sr=[{verbatimCoordinates:`50°4'17.698"south, 14°24'2.826"east`,verbatimLatitude:`50°4'17.698"south`,verbatimLongitude:`14°24'2.826"east`,decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"50d4m17.698S 14d24m2.826E",verbatimLatitude:"50d4m17.698S",verbatimLongitude:"14d24m2.826E",decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"40:26:46N,79:56:55W",verbatimLatitude:"40:26:46N",verbatimLongitude:"79:56:55W",decimalLatitude:40.44611111111111,decimalLongitude:-79.9486111111111},{verbatimCoordinates:"40:26:46.302N 79:56:55.903W",verbatimLatitude:"40:26:46.302N",verbatimLongitude:"79:56:55.903W",decimalLatitude:40.446195,decimalLongitude:-79.94886194444445},{verbatimCoordinates:"40°26′47″N 79°58′36″W",verbatimLatitude:"40°26′47″N",verbatimLongitude:"79°58′36″W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40d 26′ 47″ N 79d 58′ 36″ W",verbatimLatitude:"40d 26′ 47″ N",verbatimLongitude:"79d 58′ 36″ W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40.446195N 79.948862W",verbatimLatitude:"40.446195N",verbatimLongitude:"79.948862W",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40,446195° 79,948862°",verbatimLatitude:"40,446195°",verbatimLongitude:"79,948862°",decimalLatitude:40.446195,decimalLongitude:79.948862},{verbatimCoordinates:"40° 26.7717, -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.446195, -79.948862",verbatimLatitude:"40.446195",verbatimLongitude:"-79.948862",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.123256; -74.123256",verbatimLatitude:"40.123256",verbatimLongitude:"-74.123256",decimalLatitude:40.123256,decimalLongitude:-74.123256},{verbatimCoordinates:"18°24S 22°45E",verbatimLatitude:"18°24S",verbatimLongitude:"22°45E",decimalLatitude:-18.4,decimalLongitude:22.75}],xr=[{verbatimCoordinates:"10.432342S 10.6345345E",verbatimLatitude:"10.432342S",verbatimLongitude:"10.6345345E",decimalLatitude:-10.432342,decimalLongitude:10.6345345},{verbatimCoordinates:"10.00S 10.00E",verbatimLatitude:"10.00S",verbatimLongitude:"10.00E",decimalLatitude:-10,decimalLongitude:10},{verbatimCoordinates:"00.00S 01.00E",verbatimLatitude:"00.00S",verbatimLongitude:"01.00E",decimalLatitude:0,decimalLongitude:1},{verbatimCoordinates:"18.24S 22.45E",verbatimLatitude:"18.24S",verbatimLongitude:"22.45E",decimalLatitude:-18.4,decimalLongitude:22.75},{verbatimCoordinates:"27deg 15min 45.2sec S 18deg 32min 53.7sec E",verbatimLatitude:"27deg 15min 45.2sec S",verbatimLongitude:"18deg 32min 53.7sec E",decimalLatitude:-27.262555555555554,decimalLongitude:18.54825},{verbatimCoordinates:"-23.3245° S / 28.2344° E",verbatimLatitude:"-23.3245° S",verbatimLongitude:"28.2344° E",decimalLatitude:-23.3245,decimalLongitude:28.2344},{verbatimCoordinates:"40° 26.7717 -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"27.15.45S 18.32.53E",verbatimLatitude:"27.15.45S",verbatimLongitude:"18.32.53E",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"-27.15.45 18.32.53",verbatimLatitude:"-27.15.45",verbatimLongitude:"18.32.53",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"27.15.45.2S 18.32.53.4E",verbatimLatitude:"27.15.45.2S",verbatimLongitude:"18.32.53.4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"27.15.45,2S 18.32.53,4E",verbatimLatitude:"27.15.45,2S",verbatimLongitude:"18.32.53,4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"S23.43563 ° E22.45634 °",verbatimLatitude:"S23.43563 °",verbatimLongitude:"E22.45634 °",decimalLatitude:-23.43563,decimalLongitude:22.45634},{verbatimCoordinates:"27,71372° S 23,07771° E",verbatimLatitude:"27,71372° S",verbatimLongitude:"23,07771° E",decimalLatitude:-27.71372,decimalLongitude:23.07771},{verbatimCoordinates:"27.45.34 S 23.23.23 E",verbatimLatitude:"27.45.34 S",verbatimLongitude:"23.23.23 E",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"S 27.45.34 E 23.23.23",verbatimLatitude:"S 27.45.34",verbatimLongitude:"E 23.23.23",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"53 16.3863,4 52.8171",verbatimLatitude:"53 16.3863",verbatimLongitude:"4 52.8171",decimalLatitude:53.273105,decimalLongitude:4.88029},{verbatimCoordinates:"50 8.2914,-5 2.4447",verbatimLatitude:"50 8.2914",verbatimLongitude:"-5 2.4447",decimalLatitude:50.13819,decimalLongitude:-5.040745},{verbatimCoordinates:"N 48° 30,6410', E 18° 57,4583'",verbatimLatitude:"N 48° 30,6410'",verbatimLongitude:"E 18° 57,4583'",decimalLatitude:48.51068,decimalLongitude:18.95764},{verbatimCoordinates:"1.23456, 18.33453",verbatimLatitude:"1.23456",verbatimLongitude:"18.33453",decimalLatitude:1.23456,decimalLongitude:18.33453}];function Tr(){const i=[];return Lr.forEach(e=>{e.decimalLatitude?i.push(e):i.push({...e,..._r})}),[...i,...Sr,...xr]}const Mr=Tr();Jt.formats=Mr.map(i=>i.verbatimCoordinates);const Cr=Jt;function zi(i,e,t){const n=i.slice();return n[97]=e[t],n[99]=t,n}function Ui(i){let e,t;return e=new ur({}),{c(){Je(e.$$.fragment)},m(n,r){je(e,n,r),t=!0},i(n){t||(le(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ze(e,n)}}}function Fi(i){let e,t,n,r,u;return t=new dr({}),{c(){e=Y("button"),Je(t.$$.fragment),x(e,"type","button"),x(e,"title",i[10]),x(e,"class","svelte-bz0zu3"),Be(e,"active",i[0])},m(a,o){ne(a,e,o),je(t,e,null),n=!0,r||(u=fe(e,"click",i[79]),r=!0)},p(a,o){(!n||o[0]&1024)&&x(e,"title",a[10]),(!n||o[0]&1)&&Be(e,"active",a[0])},i(a){n||(le(t.$$.fragment,a),n=!0)},o(a){de(t.$$.fragment,a),n=!1},d(a){a&&ee(e),Ze(t),r=!1,u()}}}function Nr(i){let e,t=[],n=new Map,r,u,a,o=Ci(i[13]);const g=c=>c[97].id+(c[97].address?","+c[97].address:"");for(let c=0;c<o.length;c+=1){let E=zi(i,o,c),_=g(E);n.set(_,t[c]=qi(_,E))}return{c(){e=Y("ul");for(let c=0;c<t.length;c+=1)t[c].c();x(e,"class","options svelte-bz0zu3"),x(e,"role","listbox")},m(c,E){ne(c,e,E);for(let _=0;_<t.length;_+=1)t[_]&&t[_].m(e,null);r=!0,u||(a=[fe(e,"mouseleave",i[27]),fe(e,"blur",i[83]),fe(e,"keydown",i[23])],u=!0)},p(c,E){E[0]&102823936&&(o=Ci(c[13]),At(),t=jn(t,E,g,1,c,o,n,e,qn,qi,null,zi),It())},i(c){if(!r){for(let E=0;E<o.length;E+=1)le(t[E]);r=!0}},o(c){for(let E=0;E<t.length;E+=1)de(t[E]);r=!1},d(c){c&&ee(e);for(let E=0;E<t.length;E+=1)t[E].d();u=!1,qe(a)}}}function kr(i){let e,t,n,r,u,a;return t=new ki({}),{c(){e=Y("div"),Je(t.$$.fragment),n=we(),r=Y("div"),u=Qe(i[8]),x(r,"class","svelte-bz0zu3"),x(e,"class","no-results svelte-bz0zu3")},m(o,g){ne(o,e,g),je(t,e,null),j(e,n),j(e,r),j(r,u),a=!0},p(o,g){(!a||g[0]&256)&&mt(u,o[8])},i(o){a||(le(t.$$.fragment,o),a=!0)},o(o){de(t.$$.fragment,o),a=!1},d(o){o&&ee(e),Ze(t)}}}function Or(i){let e="",t;return{c(){t=Qe(e)},m(n,r){ne(n,t,r)},p:ie,i:ie,o:ie,d(n){n&&ee(t)}}}function Rr(i){let e,t,n,r,u,a,o,g,c,E,_;return t=new ki({}),g=new Ni({}),{c(){e=Y("div"),Je(t.$$.fragment),n=we(),r=Y("div"),u=Qe(i[7]),a=we(),o=Y("button"),Je(g.$$.fragment),x(r,"class","svelte-bz0zu3"),x(o,"class","svelte-bz0zu3"),x(e,"class","error svelte-bz0zu3")},m(C,M){ne(C,e,M),je(t,e,null),j(e,n),j(e,r),j(r,u),j(e,a),j(e,o),je(g,o,null),c=!0,E||(_=fe(o,"click",i[80]),E=!0)},p(C,M){(!c||M[0]&128)&&mt(u,C[7])},i(C){c||(le(t.$$.fragment,C),le(g.$$.fragment,C),c=!0)},o(C){de(t.$$.fragment,C),de(g.$$.fragment,C),c=!1},d(C){C&&ee(e),Ze(t),Ze(g),E=!1,_()}}}function qi(i,e){var o;let t,n,r;function u(){return e[81](e[99])}function a(){return e[82](e[97])}return n=new or({props:{feature:e[97],showPlaceType:e[11],style:e[15]===e[99]?"selected":((o=e[14])==null?void 0:o.id)===e[97].id?"picked":"default",missingIconsCache:e[21],iconsBaseUrl:e[12]}}),n.$on("mouseenter",u),n.$on("select",a),{key:i,first:null,c(){t=Pn(),Je(n.$$.fragment),this.first=t},m(g,c){ne(g,t,c),je(n,g,c),r=!0},p(g,c){var _;e=g;const E={};c[0]&8192&&(E.feature=e[97]),c[0]&2048&&(E.showPlaceType=e[11]),c[0]&57344&&(E.style=e[15]===e[99]?"selected":((_=e[14])==null?void 0:_.id)===e[97].id?"picked":"default"),c[0]&4096&&(E.iconsBaseUrl=e[12]),n.$set(E)},i(g){r||(le(n.$$.fragment,g),r=!0)},o(g){de(n.$$.fragment,g),r=!1},d(g){g&&ee(t),Ze(n,g)}}}function Pr(i){let e,t,n,r,u,a,o,g,c,E,_,C,M,N,P,R,k,S,O,D,H,K=!1;u=new mr({}),_=new Ni({});let G=i[20]&&Ui(),s=i[6]==="button"&&Fi(i);const l=i[70].default,f=Nn(l,i,i[69],null),m=[Rr,Or,kr,Nr],h=[];function b(p,d){var y,v;return p[19]?0:!p[16]&&!p[4]?1:((y=p[13])==null?void 0:y.length)===0?2:(v=p[13])!=null&&v.length&&(p[16]||p[4])?3:-1}return~(R=b(i))&&(k=h[R]=m[R](i)),{c(){e=we(),t=Y("form"),n=Y("div"),r=Y("button"),Je(u.$$.fragment),a=we(),o=Y("input"),g=we(),c=Y("div"),E=Y("button"),Je(_.$$.fragment),C=we(),G&&G.c(),M=we(),s&&s.c(),N=we(),f&&f.c(),P=we(),k&&k.c(),x(r,"class","search-button svelte-bz0zu3"),x(r,"type","button"),x(o,"placeholder",i[9]),x(o,"aria-label",i[9]),x(o,"class","svelte-bz0zu3"),x(E,"type","button"),x(E,"title",i[3]),x(E,"class","svelte-bz0zu3"),x(c,"class","clear-button-container svelte-bz0zu3"),Be(c,"displayable",i[1]!==""),x(n,"class","input-group svelte-bz0zu3"),x(t,"class",S=Rt(i[2])+" svelte-bz0zu3"),Be(t,"can-collapse",i[5]&&i[1]==="")},m(p,d){ne(p,e,d),ne(p,t,d),j(t,n),j(n,r),je(u,r,null),j(n,a),j(n,o),i[72](o),_i(o,i[1]),j(n,g),j(n,c),j(c,E),je(_,E,null),j(c,C),G&&G.m(c,null),j(n,M),s&&s.m(n,null),j(n,N),f&&f.m(n,null),j(t,P),~R&&h[R].m(t,null),O=!0,D||(H=[fe(r,"click",i[71]),fe(o,"input",i[73]),fe(o,"focus",i[74]),fe(o,"blur",i[75]),fe(o,"click",i[76]),fe(o,"keydown",i[23]),fe(o,"input",i[24]),fe(o,"change",i[77]),fe(E,"click",i[78]),fe(t,"submit",An(i[22]))],D=!0)},p(p,d){(!O||d[0]&512)&&x(o,"placeholder",p[9]),(!O||d[0]&512)&&x(o,"aria-label",p[9]),d[0]&2&&o.value!==p[1]&&_i(o,p[1]),(!O||d[0]&8)&&x(E,"title",p[3]),p[20]?G?d[0]&1048576&&le(G,1):(G=Ui(),G.c(),le(G,1),G.m(c,null)):G&&(At(),de(G,1,1,()=>{G=null}),It()),(!O||d[0]&2)&&Be(c,"displayable",p[1]!==""),p[6]==="button"?s?(s.p(p,d),d[0]&64&&le(s,1)):(s=Fi(p),s.c(),le(s,1),s.m(n,N)):s&&(At(),de(s,1,1,()=>{s=null}),It()),f&&f.p&&(!O||d[2]&128)&&On(f,l,p,p[69],O?kn(l,p[69],d,null):Rn(p[69]),null);let y=R;R=b(p),R===y?~R&&h[R].p(p,d):(k&&(At(),de(h[y],1,1,()=>{h[y]=null}),It()),~R?(k=h[R],k?k.p(p,d):(k=h[R]=m[R](p),k.c()),le(k,1),k.m(t,null)):k=null),(!O||d[0]&4&&S!==(S=Rt(p[2])+" svelte-bz0zu3"))&&x(t,"class",S),(!O||d[0]&38)&&Be(t,"can-collapse",p[5]&&p[1]==="")},i(p){O||(le(K),le(u.$$.fragment,p),le(_.$$.fragment,p),le(G),le(s),le(f,p),le(k),O=!0)},o(p){de(K),de(u.$$.fragment,p),de(_.$$.fragment,p),de(G),de(s),de(f,p),de(k),O=!1},d(p){p&&(ee(e),ee(t)),Ze(u),i[72](null),Ze(_),G&&G.d(),s&&s.d(),f&&f.d(p),~R&&h[R].d(),D=!1,qe(H)}}}function Ar(i,e,t){let n,r,u,{$$slots:a={},$$scope:o}=e;const g={continental_marine:4,country:4,major_landform:8,region:5,subregion:6,county:7,joint_municipality:8,joint_submunicipality:9,municipality:10,municipal_district:11,locality:12,neighbourhood:13,place:14,postal_code:14,road:16,poi:17,address:18,"poi.peak":15,"poi.shop":18,"poi.cafe":18,"poi.restaurant":18,"poi.aerodrome":13};let{class:c=void 0}=e,{apiKey:E}=e,{bbox:_=void 0}=e,{clearButtonTitle:C="clear"}=e,{clearOnBlur:M=!1}=e,{clearListOnPick:N=!1}=e,{keepListOpen:P=!1}=e,{collapsed:R=!1}=e,{country:k=void 0}=e,{debounceSearch:S=200}=e,{enableReverse:O="never"}=e,{errorMessage:D="Something went wrong…"}=e,{filter:H=()=>!0}=e,{flyTo:K=!0}=e,{fuzzyMatch:G=!0}=e,{language:s=void 0}=e,{limit:l=void 0}=e;const f=41415112612;let{reverseGeocodingLimit:m=f}=e,{mapController:h=void 0}=e,{minLength:b=2}=e,{noResultsMessage:p="Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!"}=e,{placeholder:d="Search"}=e,{proximity:y=[{type:"server-geolocation"}]}=e,{reverseActive:v=O==="always"}=e,{reverseButtonTitle:w="toggle reverse geocoding"}=e,{searchValue:T=""}=e,{pickedResultStyle:A="full-geometry"}=e,{showPlaceType:B="if-needed"}=e,{showResultsWhileTyping:q=!0}=e,{selectFirst:X=!0}=e,{flyToSelected:re=!1}=e,{markerOnSelected:F=!0}=e,{types:Z=void 0}=e;const ce=[];let{reverseGeocodingTypes:Ke=ce}=e,{exhaustiveReverseGeocoding:lt=!1}=e,{excludeTypes:ut=!1}=e;const _e=void 0;let{reverseGeocodingExcludeTypes:De=_e}=e,{zoom:me=g}=e,{apiUrl:he="https://api.maptiler.com/geocoding"}=e,{fetchParameters:te={}}=e,{iconsBaseUrl:yn="https://cdn.maptiler.com/maptiler-geocoding-control/v2.1.6/icons/"}=e,{adjustUrlQuery:ui=()=>{}}=e,{adjustUrl:ai=()=>{}}=e;function hs(L){Ie.focus(L)}function ds(){Ie.blur()}function bn(L,oe=!0,ue=!1){t(1,T=L),oe?(t(15,Q=-1),wn()):(En(void 0,!ue,ue),setTimeout(()=>{Ie.focus(),Ie.select()}))}function gs(){t(13,U=void 0),t(14,W=void 0),t(15,Q=-1)}function ms(){t(64,ae=[]),t(14,W=void 0)}let U,ae,W,vn="",Ie,Q=-1,ze,jt=[],at,dt,gt,fi,Ye=!1;const ps=new Set,it=xi();Gn(()=>{h&&(h.setEventHandler(void 0),h.indicateReverse(!1),h.setSelectedMarker(-1),h.setFeatures(void 0,void 0,!1))});function wn(L){if(t(17,Ye=!1),dt&&(clearTimeout(dt),dt=void 0),Q>-1&&U)t(14,W=U[Q]),t(1,T=W.place_type[0]==="reverse"?W.place_name:W.place_name.replace(/,.*/,"")),t(19,ze=void 0),t(64,ae=void 0),t(15,Q=-1);else if(T){const oe=L||!ci(T);hi(T,{exact:!0}).then(()=>{t(64,ae=U),t(14,W=void 0),oe&&ys()}).catch(ue=>t(19,ze=ue))}}function ci(L){try{return Cr(L,6)}catch{return!1}}async function hi(L,{byId:oe=!1,exact:ue=!1}={}){var xe,Ue,nt;t(19,ze=void 0),at==null||at.abort();const Se=new AbortController;t(20,at=Se);try{const J=ci(L),Mt=new URL(he+"/"+encodeURIComponent(J?J.decimalLongitude+","+J.decimalLatitude:L)+".json"),Oe=Mt.searchParams;s!==void 0&&Oe.set("language",Array.isArray(s)?s.join(","):s??"");const[mi]=(h==null?void 0:h.getCenterAndZoom())??[];let Fe=(xe=!J||Ke===ce?Z:Ke)==null?void 0:xe.map(ye=>typeof ye=="string"?ye:mi===void 0||(ye[0]??0)<=mi&&mi<(ye[1]??1/0)?ye[2]:void 0).filter(ye=>ye!==void 0);Fe&&(Fe=[...new Set(Fe)],Oe.set("types",Fe.join(",")));const _n=!J||De===_e?ut:De;if(_n&&Oe.set("excludeTypes",String(_n)),_&&Oe.set("bbox",_.map(ye=>ye.toFixed(6)).join(",")),k&&Oe.set("country",Array.isArray(k)?k.join(","):k),!oe&&!J){const ye=await yr(h,y,Se);ye&&Oe.set("proximity",ye),(ue||!q)&&Oe.set("autocomplete","false"),Oe.set("fuzzyMatch",String(G))}const Ct=m===f?l:m;Ct!==void 0&&Ct>1&&(Fe==null?void 0:Fe.length)!==1&&console.warn("For reverse geocoding when limit > 1 then types must contain single value."),J?(Ct===1||Ct!==void 0&&(lt||(Fe==null?void 0:Fe.length)===1))&&Oe.set("limit",String(Ct)):l!==void 0&&Oe.set("limit",String(l)),E&&Oe.set("key",E),ui(Oe),ai(Mt);const As=Mt.searchParams.get("types")===""&&Mt.searchParams.get("excludeTypes")!=="true",Zt=Mt.toString();if(Zt===vn){oe?(N&&t(13,U=void 0),t(14,W=jt[0])):(t(13,U=jt),((Ue=U[Q])==null?void 0:Ue.id)!==(r==null?void 0:r.id)&&t(15,Q=-1));return}vn=Zt;let Nt;if(As)Nt={type:"FeatureCollection",features:[]};else{const ye=await fetch(Zt,{signal:Se.signal,...te});if(!ye.ok)throw new Error(await ye.text());Nt=await ye.json()}it("response",{url:Zt,featureCollection:Nt}),oe?(N&&t(13,U=void 0),t(14,W=Nt.features[0]),jt=[W]):(t(13,U=Nt.features.filter(H)),J&&U.unshift({type:"Feature",properties:{},id:"reverse_"+J.decimalLongitude+"_"+J.decimalLatitude,text:J.decimalLatitude+", "+J.decimalLongitude,place_name:J.decimalLatitude+", "+J.decimalLongitude,place_type:["reverse"],center:[J.decimalLongitude,J.decimalLatitude],bbox:[J.decimalLongitude,J.decimalLatitude,J.decimalLongitude,J.decimalLatitude],geometry:{type:"Point",coordinates:[J.decimalLongitude,J.decimalLatitude]}}),jt=U,((nt=U[Q])==null?void 0:nt.id)!==(r==null?void 0:r.id)&&t(15,Q=-1),J&&Ie.focus())}catch(J){if(J&&typeof J=="object"&&"name"in J&&J.name==="AbortError")return;throw J}finally{Se===at&&t(20,at=void 0)}}function ys(){var Se;if(!(ae!=null&&ae.length)||!K)return;const L=[180,90,-180,-90],oe=!ae.some(xe=>!xe.matching_text);let ue;for(const xe of ae){const Ue=Tt(xe);if(ue=ue===void 0?Ue:Ue===void 0?ue:Math.max(ue,Ue),oe||!xe.matching_text)for(const nt of[0,1,2,3])L[nt]=Math[nt<2?"min":"max"](L[nt],((Se=xe.bbox)==null?void 0:Se[nt])??xe.center[nt%2])}h&&ae.length>0&&(W&&L[0]===L[2]&&L[1]===L[3]?h.flyTo(W.center,Tt(W)):h.fitBounds(bt(L),50,ue))}function di(){!W||!h||(!W.bbox||W.bbox[0]===W.bbox[2]&&W.bbox[1]===W.bbox[3]?h.flyTo(W.center,Tt(W)):h.fitBounds(bt(W.bbox),50,Tt(W)))}function Tt(L){var ue;if(!L.bbox||L.bbox[0]!==L.bbox[2]&&L.bbox[1]!==L.bbox[3])return;const oe=L.id.replace(/\..*/,"");return(Array.isArray((ue=L.properties)==null?void 0:ue.categories)?L.properties.categories.reduce((Se,xe)=>{const Ue=me[oe+"."+xe];return Se===void 0?Ue:Ue===void 0?Se:Math.max(Se,Ue)},void 0):void 0)??me[oe]}function bs(L){t(0,v=O==="always"),t(13,U=void 0),t(14,W=void 0),t(15,Q=-1),bn(L[1].toFixed(6)+", "+pr(L[0],[-180,180],!0).toFixed(6),!1,!0)}function vs(L){if(!U)return;let oe=L.key==="ArrowDown"?1:L.key==="ArrowUp"?-1:0;oe&&(Ie.focus(),t(17,Ye=!0),L.preventDefault(),W&&Q===-1&&t(15,Q=U.findIndex(ue=>ue.id===(W==null?void 0:W.id))),Q===(W||X?0:-1)&&oe===-1&&t(15,Q=U.length),t(15,Q+=oe),Q>=U.length&&t(15,Q=-1),Q<0&&(W||X)&&t(15,Q=0))}function En(L,oe=!0,ue=!1){if(t(19,ze=void 0),t(14,W=void 0),t(17,Ye=!0),q||ue){if(dt&&clearTimeout(dt),T.length<b)return;const Se=T;dt=window.setTimeout(()=>{hi(Se).catch(xe=>t(19,ze=xe))},oe?S:0)}else t(13,U=void 0),t(19,ze=void 0)}function gi(L){W&&(W==null?void 0:W.id)===(L==null?void 0:L.id)?di():(t(14,W=L),t(1,T=L.place_name))}function Ln(L){t(15,Q=L)}function ws(){(!X||W)&&t(15,Q=-1),re&&di()}const Es=()=>Ie.focus();function Ls(L){Vt[L?"unshift":"push"](()=>{Ie=L,t(18,Ie)})}function _s(){T=this.value,t(1,T),t(17,Ye),t(31,M),t(16,gt)}const Ss=()=>t(17,Ye=!0),xs=()=>t(17,Ye=!1),Ts=()=>t(17,Ye=!0),Ms=()=>t(14,W=void 0),Cs=()=>{t(1,T=""),t(14,W=void 0),Ie.focus()},Ns=()=>t(0,v=!v),ks=()=>t(19,ze=void 0),Os=L=>Ln(L),Rs=L=>gi(L),Ps=()=>{};return i.$$set=L=>{"class"in L&&t(2,c=L.class),"apiKey"in L&&t(29,E=L.apiKey),"bbox"in L&&t(30,_=L.bbox),"clearButtonTitle"in L&&t(3,C=L.clearButtonTitle),"clearOnBlur"in L&&t(31,M=L.clearOnBlur),"clearListOnPick"in L&&t(32,N=L.clearListOnPick),"keepListOpen"in L&&t(4,P=L.keepListOpen),"collapsed"in L&&t(5,R=L.collapsed),"country"in L&&t(33,k=L.country),"debounceSearch"in L&&t(34,S=L.debounceSearch),"enableReverse"in L&&t(6,O=L.enableReverse),"errorMessage"in L&&t(7,D=L.errorMessage),"filter"in L&&t(35,H=L.filter),"flyTo"in L&&t(36,K=L.flyTo),"fuzzyMatch"in L&&t(37,G=L.fuzzyMatch),"language"in L&&t(38,s=L.language),"limit"in L&&t(39,l=L.limit),"reverseGeocodingLimit"in L&&t(40,m=L.reverseGeocodingLimit),"mapController"in L&&t(41,h=L.mapController),"minLength"in L&&t(42,b=L.minLength),"noResultsMessage"in L&&t(8,p=L.noResultsMessage),"placeholder"in L&&t(9,d=L.placeholder),"proximity"in L&&t(43,y=L.proximity),"reverseActive"in L&&t(0,v=L.reverseActive),"reverseButtonTitle"in L&&t(10,w=L.reverseButtonTitle),"searchValue"in L&&t(1,T=L.searchValue),"pickedResultStyle"in L&&t(44,A=L.pickedResultStyle),"showPlaceType"in L&&t(11,B=L.showPlaceType),"showResultsWhileTyping"in L&&t(45,q=L.showResultsWhileTyping),"selectFirst"in L&&t(46,X=L.selectFirst),"flyToSelected"in L&&t(47,re=L.flyToSelected),"markerOnSelected"in L&&t(48,F=L.markerOnSelected),"types"in L&&t(49,Z=L.types),"reverseGeocodingTypes"in L&&t(50,Ke=L.reverseGeocodingTypes),"exhaustiveReverseGeocoding"in L&&t(51,lt=L.exhaustiveReverseGeocoding),"excludeTypes"in L&&t(52,ut=L.excludeTypes),"reverseGeocodingExcludeTypes"in L&&t(53,De=L.reverseGeocodingExcludeTypes),"zoom"in L&&t(54,me=L.zoom),"apiUrl"in L&&t(55,he=L.apiUrl),"fetchParameters"in L&&t(56,te=L.fetchParameters),"iconsBaseUrl"in L&&t(12,yn=L.iconsBaseUrl),"adjustUrlQuery"in L&&t(57,ui=L.adjustUrlQuery),"adjustUrl"in L&&t(58,ai=L.adjustUrl),"$$scope"in L&&t(69,o=L.$$scope)},i.$$.update=()=>{if(i.$$.dirty[0]&64&&t(0,v=O==="always"),i.$$.dirty[0]&16384|i.$$.dirty[1]&8192&&A!=="marker-only"&&W&&!W.address&&W.geometry.type==="Point"&&W.place_type[0]!=="reverse"&&hi(W.id,{byId:!0}).catch(L=>t(19,ze=L)),i.$$.dirty[0]&16384|i.$$.dirty[1]&1058|i.$$.dirty[2]&8&&(h&&W&&W.id!==fi&&K&&(di(),N&&t(13,U=void 0),t(64,ae=void 0),t(15,Q=-1)),t(65,fi=W==null?void 0:W.id)),i.$$.dirty[0]&196608|i.$$.dirty[1]&1&&setTimeout(()=>{t(16,gt=Ye),M&&!gt&&t(1,T="")}),i.$$.dirty[0]&8194|i.$$.dirty[1]&2048&&T.length<b&&(t(13,U=void 0),t(19,ze=void 0),t(64,ae=U)),i.$$.dirty[0]&57344|i.$$.dirty[1]&32768&&X&&U!=null&&U.length&&Q==-1&&!W&&t(15,Q=0),i.$$.dirty[0]&8192|i.$$.dirty[2]&4&&ae!==U&&t(64,ae=void 0),i.$$.dirty[0]&73729|i.$$.dirty[1]&1024|i.$$.dirty[2]&4&&h&&h.setEventHandler(L=>{switch(L.type){case"mapClick":v&&bs(L.coordinates);break;case"markerClick":{const oe=U==null?void 0:U.find(ue=>ue.id===L.id);oe&&gi(oe)}break;case"markerMouseEnter":ae&&t(15,Q=gt?(U==null?void 0:U.findIndex(oe=>oe.id===L.id))??-1:-1);break;case"markerMouseLeave":ae&&t(15,Q=-1);break}}),i.$$.dirty[0]&40960&&t(66,r=U==null?void 0:U[Q]),i.$$.dirty[1]&66592|i.$$.dirty[2]&16&&h&&r&&K&&re&&h.flyTo(r.center,Tt(r)),i.$$.dirty[1]&8192&&t(68,n=A==="full-geometry-including-polygon-center-marker"),i.$$.dirty[1]&132096|i.$$.dirty[2]&64&&(F||h==null||h.setFeatures(void 0,void 0,n)),i.$$.dirty[0]&16384|i.$$.dirty[1]&132096|i.$$.dirty[2]&84&&h&&F&&!ae&&(h.setFeatures(r?[r]:void 0,W,n),h.setSelectedMarker(r?0:-1)),i.$$.dirty[0]&16384|i.$$.dirty[1]&1024|i.$$.dirty[2]&68&&h&&h.setFeatures(ae,W,n),i.$$.dirty[0]&32768|i.$$.dirty[1]&1024|i.$$.dirty[2]&4&&ae&&h&&h.setSelectedMarker(Q),i.$$.dirty[0]&2|i.$$.dirty[1]&1024&&h){const L=ci(T);h.setReverseMarker(L?[L.decimalLongitude,L.decimalLatitude]:void 0)}i.$$.dirty[2]&16&&it("select",{feature:r}),i.$$.dirty[0]&16384&&it("pick",{feature:W}),i.$$.dirty[0]&73744&&t(67,u=!!(U!=null&&U.length)&&(gt||P)),i.$$.dirty[2]&32&&it("optionsvisibilitychange",{optionsVisible:u}),i.$$.dirty[0]&8192&&it("featureslisted",{features:U}),i.$$.dirty[2]&4&&it("featuresmarked",{features:ae}),i.$$.dirty[0]&1&&it("reversetoggle",{reverse:v}),i.$$.dirty[0]&2&&it("querychange",{query:T}),i.$$.dirty[0]&1|i.$$.dirty[1]&1024&&h&&h.indicateReverse(v)},[v,T,c,C,P,R,O,D,p,d,w,B,yn,U,W,Q,gt,Ye,Ie,ze,at,ps,wn,vs,En,gi,Ln,ws,g,E,_,M,N,k,S,H,K,G,s,l,m,h,b,y,A,q,X,re,F,Z,Ke,lt,ut,De,me,he,te,ui,ai,hs,ds,bn,gs,ms,ae,fi,r,u,n,o,a,Es,Ls,_s,Ss,xs,Ts,Ms,Cs,Ns,ks,Os,Rs,Ps]}let Ir=class extends et{constructor(e){super(),$e(this,e,Ar,Pr,Xe,{ZOOM_DEFAULTS:28,class:2,apiKey:29,bbox:30,clearButtonTitle:3,clearOnBlur:31,clearListOnPick:32,keepListOpen:4,collapsed:5,country:33,debounceSearch:34,enableReverse:6,errorMessage:7,filter:35,flyTo:36,fuzzyMatch:37,language:38,limit:39,reverseGeocodingLimit:40,mapController:41,minLength:42,noResultsMessage:8,placeholder:9,proximity:43,reverseActive:0,reverseButtonTitle:10,searchValue:1,pickedResultStyle:44,showPlaceType:11,showResultsWhileTyping:45,selectFirst:46,flyToSelected:47,markerOnSelected:48,types:49,reverseGeocodingTypes:50,exhaustiveReverseGeocoding:51,excludeTypes:52,reverseGeocodingExcludeTypes:53,zoom:54,apiUrl:55,fetchParameters:56,iconsBaseUrl:12,adjustUrlQuery:57,adjustUrl:58,focus:59,blur:60,setQuery:61,clearList:62,clearMap:63},null,[-1,-1,-1,-1])}get ZOOM_DEFAULTS(){return this.$$.ctx[28]}get focus(){return this.$$.ctx[59]}get blur(){return this.$$.ctx[60]}get setQuery(){return this.$$.ctx[61]}get clearList(){return this.$$.ctx[62]}get clearMap(){return this.$$.ctx[63]}};function Et(i,e,t={}){const n={type:"Feature"};return(t.id===0||t.id)&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.properties=e||{},n.geometry=i,n}function $t(i,e,t={}){for(const r of i){if(r.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(r[r.length-1].length!==r[0].length)throw new Error("First and last Position are not equivalent.");for(let u=0;u<r[r.length-1].length;u++)if(r[r.length-1][u]!==r[0][u])throw new Error("First and last Position are not equivalent.")}return Et({type:"Polygon",coordinates:i},e,t)}function Lt(i,e={}){const t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=i,t}function ji(i,e,t={}){return Et({type:"MultiPolygon",coordinates:i},e,t)}function Zi(i,e,t){if(i!==null)for(var n,r,u,a,o,g,c,E=0,_=0,C,M=i.type,N=M==="FeatureCollection",P=M==="Feature",R=N?i.features.length:1,k=0;k<R;k++){c=N?i.features[k].geometry:P?i.geometry:i,C=c?c.type==="GeometryCollection":!1,o=C?c.geometries.length:1;for(var S=0;S<o;S++){var O=0,D=0;if(a=C?c.geometries[S]:c,a!==null){g=a.coordinates;var H=a.type;switch(E=0,H){case null:break;case"Point":if(e(g,_,k,O,D)===!1)return!1;_++,O++;break;case"LineString":case"MultiPoint":for(n=0;n<g.length;n++){if(e(g[n],_,k,O,D)===!1)return!1;_++,H==="MultiPoint"&&O++}H==="LineString"&&O++;break;case"Polygon":case"MultiLineString":for(n=0;n<g.length;n++){for(r=0;r<g[n].length-E;r++){if(e(g[n][r],_,k,O,D)===!1)return!1;_++}H==="MultiLineString"&&O++,H==="Polygon"&&D++}H==="Polygon"&&O++;break;case"MultiPolygon":for(n=0;n<g.length;n++){for(D=0,r=0;r<g[n].length;r++){for(u=0;u<g[n][r].length-E;u++){if(e(g[n][r][u],_,k,O,D)===!1)return!1;_++}D++}O++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(Zi(a.geometries[n],e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ei(i,e){var t,n,r,u,a,o,g,c,E,_,C=0,M=i.type==="FeatureCollection",N=i.type==="Feature",P=M?i.features.length:1;for(t=0;t<P;t++){for(o=M?i.features[t].geometry:N?i.geometry:i,c=M?i.features[t].properties:N?i.properties:{},E=M?i.features[t].bbox:N?i.bbox:void 0,_=M?i.features[t].id:N?i.id:void 0,g=o?o.type==="GeometryCollection":!1,a=g?o.geometries.length:1,r=0;r<a;r++){if(u=g?o.geometries[r]:o,u===null){if(e(null,C,c,E,_)===!1)return!1;continue}switch(u.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(u,C,c,E,_)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<u.geometries.length;n++)if(e(u.geometries[n],C,c,E,_)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}C++}}function Br(i,e){ei(i,function(t,n,r,u,a){var o=t===null?null:t.type;switch(o){case null:case"Point":case"LineString":case"Polygon":return e(Et(t,r,{bbox:u,id:a}),n,0)===!1?!1:void 0}var g;switch(o){case"MultiPoint":g="Point";break;case"MultiLineString":g="LineString";break;case"MultiPolygon":g="Polygon";break}for(var c=0;c<t.coordinates.length;c++){var E=t.coordinates[c],_={type:g,coordinates:E};if(e(Et(_,r),n,c)===!1)return!1}})}function Gr(i,e={}){if(i.bbox!=null&&e.recompute!==!0)return i.bbox;const t=[1/0,1/0,-1/0,-1/0];return Zi(i,n=>{t[0]>n[0]&&(t[0]=n[0]),t[1]>n[1]&&(t[1]=n[1]),t[2]<n[0]&&(t[2]=n[0]),t[3]<n[1]&&(t[3]=n[1])}),t}var ti=Gr;function Wr(i){if(!i)throw new Error("geojson is required");switch(i.type){case"Feature":return Hi(i);case"FeatureCollection":return Dr(i);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return ii(i);default:throw new Error("unknown GeoJSON type")}}function Hi(i){const e={type:"Feature"};return Object.keys(i).forEach(t=>{switch(t){case"type":case"properties":case"geometry":return;default:e[t]=i[t]}}),e.properties=Vi(i.properties),i.geometry==null?e.geometry=null:e.geometry=ii(i.geometry),e}function Vi(i){const e={};return i&&Object.keys(i).forEach(t=>{const n=i[t];typeof n=="object"?n===null?e[t]=null:Array.isArray(n)?e[t]=n.map(r=>r):e[t]=Vi(n):e[t]=n}),e}function Dr(i){const e={type:"FeatureCollection"};return Object.keys(i).forEach(t=>{switch(t){case"type":case"features":return;default:e[t]=i[t]}}),e.features=i.features.map(t=>Hi(t)),e}function ii(i){const e={type:i.type};return i.bbox&&(e.bbox=i.bbox),i.type==="GeometryCollection"?(e.geometries=i.geometries.map(t=>ii(t)),e):(e.coordinates=Ki(i.coordinates),e)}function Ki(i){const e=i;return typeof e[0]!="object"?e.slice():e.map(t=>Ki(t))}var zr=Wr,Ur=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,ni=Math.ceil,Ce=Math.floor,ve="[BigNumber Error] ",Yi=ve+"Number primitive has more than 15 significant digits: ",Ae=1e14,z=14,Xi=9007199254740991,ri=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],tt=1e7,Ee=1e9;function Qi(i){var e,t,n,r=S.prototype={constructor:S,toString:null,valueOf:null},u=new S(1),a=20,o=4,g=-7,c=21,E=-1e7,_=1e7,C=!1,M=1,N=0,P={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},R="0123456789abcdefghijklmnopqrstuvwxyz",k=!0;function S(s,l){var f,m,h,b,p,d,y,v,w=this;if(!(w instanceof S))return new S(s,l);if(l==null){if(s&&s._isBigNumber===!0){w.s=s.s,!s.c||s.e>_?w.c=w.e=null:s.e<E?w.c=[w.e=0]:(w.e=s.e,w.c=s.c.slice());return}if((d=typeof s=="number")&&s*0==0){if(w.s=1/s<0?(s=-s,-1):1,s===~~s){for(b=0,p=s;p>=10;p/=10,b++);b>_?w.c=w.e=null:(w.e=b,w.c=[s]);return}v=String(s)}else{if(!Ur.test(v=String(s)))return n(w,v,d);w.s=v.charCodeAt(0)==45?(v=v.slice(1),-1):1}(b=v.indexOf("."))>-1&&(v=v.replace(".","")),(p=v.search(/e/i))>0?(b<0&&(b=p),b+=+v.slice(p+1),v=v.substring(0,p)):b<0&&(b=v.length)}else{if(se(l,2,R.length,"Base"),l==10&&k)return w=new S(s),K(w,a+w.e+1,o);if(v=String(s),d=typeof s=="number"){if(s*0!=0)return n(w,v,d,l);if(w.s=1/s<0?(v=v.slice(1),-1):1,S.DEBUG&&v.replace(/^0\.0*|\./,"").length>15)throw Error(Yi+s)}else w.s=v.charCodeAt(0)===45?(v=v.slice(1),-1):1;for(f=R.slice(0,l),b=p=0,y=v.length;p<y;p++)if(f.indexOf(m=v.charAt(p))<0){if(m=="."){if(p>b){b=y;continue}}else if(!h&&(v==v.toUpperCase()&&(v=v.toLowerCase())||v==v.toLowerCase()&&(v=v.toUpperCase()))){h=!0,p=-1,b=0;continue}return n(w,String(s),d,l)}d=!1,v=t(v,l,10,w.s),(b=v.indexOf("."))>-1?v=v.replace(".",""):b=v.length}for(p=0;v.charCodeAt(p)===48;p++);for(y=v.length;v.charCodeAt(--y)===48;);if(v=v.slice(p,++y)){if(y-=p,d&&S.DEBUG&&y>15&&(s>Xi||s!==Ce(s)))throw Error(Yi+w.s*s);if((b=b-p-1)>_)w.c=w.e=null;else if(b<E)w.c=[w.e=0];else{if(w.e=b,w.c=[],p=(b+1)%z,b<0&&(p+=z),p<y){for(p&&w.c.push(+v.slice(0,p)),y-=z;p<y;)w.c.push(+v.slice(p,p+=z));p=z-(v=v.slice(p)).length}else p-=y;for(;p--;v+="0");w.c.push(+v)}}else w.c=[w.e=0]}S.clone=Qi,S.ROUND_UP=0,S.ROUND_DOWN=1,S.ROUND_CEIL=2,S.ROUND_FLOOR=3,S.ROUND_HALF_UP=4,S.ROUND_HALF_DOWN=5,S.ROUND_HALF_EVEN=6,S.ROUND_HALF_CEIL=7,S.ROUND_HALF_FLOOR=8,S.EUCLID=9,S.config=S.set=function(s){var l,f;if(s!=null)if(typeof s=="object"){if(s.hasOwnProperty(l="DECIMAL_PLACES")&&(f=s[l],se(f,0,Ee,l),a=f),s.hasOwnProperty(l="ROUNDING_MODE")&&(f=s[l],se(f,0,8,l),o=f),s.hasOwnProperty(l="EXPONENTIAL_AT")&&(f=s[l],f&&f.pop?(se(f[0],-1e9,0,l),se(f[1],0,Ee,l),g=f[0],c=f[1]):(se(f,-1e9,Ee,l),g=-(c=f<0?-f:f))),s.hasOwnProperty(l="RANGE"))if(f=s[l],f&&f.pop)se(f[0],-1e9,-1,l),se(f[1],1,Ee,l),E=f[0],_=f[1];else if(se(f,-1e9,Ee,l),f)E=-(_=f<0?-f:f);else throw Error(ve+l+" cannot be zero: "+f);if(s.hasOwnProperty(l="CRYPTO"))if(f=s[l],f===!!f)if(f)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))C=f;else throw C=!f,Error(ve+"crypto unavailable");else C=f;else throw Error(ve+l+" not true or false: "+f);if(s.hasOwnProperty(l="MODULO_MODE")&&(f=s[l],se(f,0,9,l),M=f),s.hasOwnProperty(l="POW_PRECISION")&&(f=s[l],se(f,0,Ee,l),N=f),s.hasOwnProperty(l="FORMAT"))if(f=s[l],typeof f=="object")P=f;else throw Error(ve+l+" not an object: "+f);if(s.hasOwnProperty(l="ALPHABET"))if(f=s[l],typeof f=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(f))k=f.slice(0,10)=="0123456789",R=f;else throw Error(ve+l+" invalid: "+f)}else throw Error(ve+"Object expected: "+s);return{DECIMAL_PLACES:a,ROUNDING_MODE:o,EXPONENTIAL_AT:[g,c],RANGE:[E,_],CRYPTO:C,MODULO_MODE:M,POW_PRECISION:N,FORMAT:P,ALPHABET:R}},S.isBigNumber=function(s){if(!s||s._isBigNumber!==!0)return!1;if(!S.DEBUG)return!0;var l,f,m=s.c,h=s.e,b=s.s;e:if({}.toString.call(m)=="[object Array]"){if((b===1||b===-1)&&h>=-1e9&&h<=Ee&&h===Ce(h)){if(m[0]===0){if(h===0&&m.length===1)return!0;break e}if(l=(h+1)%z,l<1&&(l+=z),String(m[0]).length==l){for(l=0;l<m.length;l++)if(f=m[l],f<0||f>=Ae||f!==Ce(f))break e;if(f!==0)return!0}}}else if(m===null&&h===null&&(b===null||b===1||b===-1))return!0;throw Error(ve+"Invalid BigNumber: "+s)},S.maximum=S.max=function(){return D(arguments,-1)},S.minimum=S.min=function(){return D(arguments,1)},S.random=function(){var s=9007199254740992,l=Math.random()*s&2097151?function(){return Ce(Math.random()*s)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(f){var m,h,b,p,d,y=0,v=[],w=new S(u);if(f==null?f=a:se(f,0,Ee),p=ni(f/z),C)if(crypto.getRandomValues){for(m=crypto.getRandomValues(new Uint32Array(p*=2));y<p;)d=m[y]*131072+(m[y+1]>>>11),d>=9e15?(h=crypto.getRandomValues(new Uint32Array(2)),m[y]=h[0],m[y+1]=h[1]):(v.push(d%1e14),y+=2);y=p/2}else if(crypto.randomBytes){for(m=crypto.randomBytes(p*=7);y<p;)d=(m[y]&31)*281474976710656+m[y+1]*1099511627776+m[y+2]*4294967296+m[y+3]*16777216+(m[y+4]<<16)+(m[y+5]<<8)+m[y+6],d>=9e15?crypto.randomBytes(7).copy(m,y):(v.push(d%1e14),y+=7);y=p/7}else throw C=!1,Error(ve+"crypto unavailable");if(!C)for(;y<p;)d=l(),d<9e15&&(v[y++]=d%1e14);for(p=v[--y],f%=z,p&&f&&(d=ri[z-f],v[y]=Ce(p/d)*d);v[y]===0;v.pop(),y--);if(y<0)v=[b=0];else{for(b=-1;v[0]===0;v.splice(0,1),b-=z);for(y=1,d=v[0];d>=10;d/=10,y++);y<z&&(b-=z-y)}return w.e=b,w.c=v,w}}(),S.sum=function(){for(var s=1,l=arguments,f=new S(l[0]);s<l.length;)f=f.plus(l[s++]);return f},t=function(){var s="0123456789";function l(f,m,h,b){for(var p,d=[0],y,v=0,w=f.length;v<w;){for(y=d.length;y--;d[y]*=m);for(d[0]+=b.indexOf(f.charAt(v++)),p=0;p<d.length;p++)d[p]>h-1&&(d[p+1]==null&&(d[p+1]=0),d[p+1]+=d[p]/h|0,d[p]%=h)}return d.reverse()}return function(f,m,h,b,p){var d,y,v,w,T,A,B,q,X=f.indexOf("."),re=a,F=o;for(X>=0&&(w=N,N=0,f=f.replace(".",""),q=new S(m),A=q.pow(f.length-X),N=w,q.c=l(He(ke(A.c),A.e,"0"),10,h,s),q.e=q.c.length),B=l(f,m,h,p?(d=R,s):(d=s,R)),v=w=B.length;B[--w]==0;B.pop());if(!B[0])return d.charAt(0);if(X<0?--v:(A.c=B,A.e=v,A.s=b,A=e(A,q,re,F,h),B=A.c,T=A.r,v=A.e),y=v+re+1,X=B[y],w=h/2,T=T||y<0||B[y+1]!=null,T=F<4?(X!=null||T)&&(F==0||F==(A.s<0?3:2)):X>w||X==w&&(F==4||T||F==6&&B[y-1]&1||F==(A.s<0?8:7)),y<1||!B[0])f=T?He(d.charAt(1),-re,d.charAt(0)):d.charAt(0);else{if(B.length=y,T)for(--h;++B[--y]>h;)B[y]=0,y||(++v,B=[1].concat(B));for(w=B.length;!B[--w];);for(X=0,f="";X<=w;f+=d.charAt(B[X++]));f=He(f,v,d.charAt(0))}return f}}(),e=function(){function s(m,h,b){var p,d,y,v,w=0,T=m.length,A=h%tt,B=h/tt|0;for(m=m.slice();T--;)y=m[T]%tt,v=m[T]/tt|0,p=B*y+v*A,d=A*y+p%tt*tt+w,w=(d/b|0)+(p/tt|0)+B*v,m[T]=d%b;return w&&(m=[w].concat(m)),m}function l(m,h,b,p){var d,y;if(b!=p)y=b>p?1:-1;else for(d=y=0;d<b;d++)if(m[d]!=h[d]){y=m[d]>h[d]?1:-1;break}return y}function f(m,h,b,p){for(var d=0;b--;)m[b]-=d,d=m[b]<h[b]?1:0,m[b]=d*p+m[b]-h[b];for(;!m[0]&&m.length>1;m.splice(0,1));}return function(m,h,b,p,d){var y,v,w,T,A,B,q,X,re,F,Z,ce,Ke,lt,ut,_e,De,me=m.s==h.s?1:-1,he=m.c,te=h.c;if(!he||!he[0]||!te||!te[0])return new S(!m.s||!h.s||(he?te&&he[0]==te[0]:!te)?NaN:he&&he[0]==0||!te?me*0:me/0);for(X=new S(me),re=X.c=[],v=m.e-h.e,me=b+v+1,d||(d=Ae,v=Ne(m.e/z)-Ne(h.e/z),me=me/z|0),w=0;te[w]==(he[w]||0);w++);if(te[w]>(he[w]||0)&&v--,me<0)re.push(1),T=!0;else{for(lt=he.length,_e=te.length,w=0,me+=2,A=Ce(d/(te[0]+1)),A>1&&(te=s(te,A,d),he=s(he,A,d),_e=te.length,lt=he.length),Ke=_e,F=he.slice(0,_e),Z=F.length;Z<_e;F[Z++]=0);De=te.slice(),De=[0].concat(De),ut=te[0],te[1]>=d/2&&ut++;do{if(A=0,y=l(te,F,_e,Z),y<0){if(ce=F[0],_e!=Z&&(ce=ce*d+(F[1]||0)),A=Ce(ce/ut),A>1)for(A>=d&&(A=d-1),B=s(te,A,d),q=B.length,Z=F.length;l(B,F,q,Z)==1;)A--,f(B,_e<q?De:te,q,d),q=B.length,y=1;else A==0&&(y=A=1),B=te.slice(),q=B.length;if(q<Z&&(B=[0].concat(B)),f(F,B,Z,d),Z=F.length,y==-1)for(;l(te,F,_e,Z)<1;)A++,f(F,_e<Z?De:te,Z,d),Z=F.length}else y===0&&(A++,F=[0]);re[w++]=A,F[0]?F[Z++]=he[Ke]||0:(F=[he[Ke]],Z=1)}while((Ke++<lt||F[0]!=null)&&me--);T=F[0]!=null,re[0]||re.splice(0,1)}if(d==Ae){for(w=1,me=re[0];me>=10;me/=10,w++);K(X,b+(X.e=w+v*z-1)+1,p,T)}else X.e=v,X.r=+T;return X}}();function O(s,l,f,m){var h,b,p,d,y;if(f==null?f=o:se(f,0,8),!s.c)return s.toString();if(h=s.c[0],p=s.e,l==null)y=ke(s.c),y=m==1||m==2&&(p<=g||p>=c)?Wt(y,p):He(y,p,"0");else if(s=K(new S(s),l,f),b=s.e,y=ke(s.c),d=y.length,m==1||m==2&&(l<=b||b<=g)){for(;d<l;y+="0",d++);y=Wt(y,b)}else if(l-=p,y=He(y,b,"0"),b+1>d){if(--l>0)for(y+=".";l--;y+="0");}else if(l+=b-d,l>0)for(b+1==d&&(y+=".");l--;y+="0");return s.s<0&&h?"-"+y:y}function D(s,l){for(var f,m,h=1,b=new S(s[0]);h<s.length;h++)m=new S(s[h]),(!m.s||(f=st(b,m))===l||f===0&&b.s===l)&&(b=m);return b}function H(s,l,f){for(var m=1,h=l.length;!l[--h];l.pop());for(h=l[0];h>=10;h/=10,m++);return(f=m+f*z-1)>_?s.c=s.e=null:f<E?s.c=[s.e=0]:(s.e=f,s.c=l),s}n=function(){var s=/^(-?)0([xbo])(?=\w[\w.]*$)/i,l=/^([^.]+)\.$/,f=/^\.([^.]+)$/,m=/^-?(Infinity|NaN)$/,h=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(b,p,d,y){var v,w=d?p:p.replace(h,"");if(m.test(w))b.s=isNaN(w)?null:w<0?-1:1;else{if(!d&&(w=w.replace(s,function(T,A,B){return v=(B=B.toLowerCase())=="x"?16:B=="b"?2:8,!y||y==v?A:T}),y&&(v=y,w=w.replace(l,"$1").replace(f,"0.$1")),p!=w))return new S(w,v);if(S.DEBUG)throw Error(ve+"Not a"+(y?" base "+y:"")+" number: "+p);b.s=null}b.c=b.e=null}}();function K(s,l,f,m){var h,b,p,d,y,v,w,T=s.c,A=ri;if(T){e:{for(h=1,d=T[0];d>=10;d/=10,h++);if(b=l-h,b<0)b+=z,p=l,y=T[v=0],w=Ce(y/A[h-p-1]%10);else if(v=ni((b+1)/z),v>=T.length)if(m){for(;T.length<=v;T.push(0));y=w=0,h=1,b%=z,p=b-z+1}else break e;else{for(y=d=T[v],h=1;d>=10;d/=10,h++);b%=z,p=b-z+h,w=p<0?0:Ce(y/A[h-p-1]%10)}if(m=m||l<0||T[v+1]!=null||(p<0?y:y%A[h-p-1]),m=f<4?(w||m)&&(f==0||f==(s.s<0?3:2)):w>5||w==5&&(f==4||m||f==6&&(b>0?p>0?y/A[h-p]:0:T[v-1])%10&1||f==(s.s<0?8:7)),l<1||!T[0])return T.length=0,m?(l-=s.e+1,T[0]=A[(z-l%z)%z],s.e=-l||0):T[0]=s.e=0,s;if(b==0?(T.length=v,d=1,v--):(T.length=v+1,d=A[z-b],T[v]=p>0?Ce(y/A[h-p]%A[p])*d:0),m)for(;;)if(v==0){for(b=1,p=T[0];p>=10;p/=10,b++);for(p=T[0]+=d,d=1;p>=10;p/=10,d++);b!=d&&(s.e++,T[0]==Ae&&(T[0]=1));break}else{if(T[v]+=d,T[v]!=Ae)break;T[v--]=0,d=1}for(b=T.length;T[--b]===0;T.pop());}s.e>_?s.c=s.e=null:s.e<E&&(s.c=[s.e=0])}return s}function G(s){var l,f=s.e;return f===null?s.toString():(l=ke(s.c),l=f<=g||f>=c?Wt(l,f):He(l,f,"0"),s.s<0?"-"+l:l)}return r.absoluteValue=r.abs=function(){var s=new S(this);return s.s<0&&(s.s=1),s},r.comparedTo=function(s,l){return st(this,new S(s,l))},r.decimalPlaces=r.dp=function(s,l){var f,m,h,b=this;if(s!=null)return se(s,0,Ee),l==null?l=o:se(l,0,8),K(new S(b),s+b.e+1,l);if(!(f=b.c))return null;if(m=((h=f.length-1)-Ne(this.e/z))*z,h=f[h])for(;h%10==0;h/=10,m--);return m<0&&(m=0),m},r.dividedBy=r.div=function(s,l){return e(this,new S(s,l),a,o)},r.dividedToIntegerBy=r.idiv=function(s,l){return e(this,new S(s,l),0,1)},r.exponentiatedBy=r.pow=function(s,l){var f,m,h,b,p,d,y,v,w,T=this;if(s=new S(s),s.c&&!s.isInteger())throw Error(ve+"Exponent not an integer: "+G(s));if(l!=null&&(l=new S(l)),d=s.e>14,!T.c||!T.c[0]||T.c[0]==1&&!T.e&&T.c.length==1||!s.c||!s.c[0])return w=new S(Math.pow(+G(T),d?s.s*(2-Gt(s)):+G(s))),l?w.mod(l):w;if(y=s.s<0,l){if(l.c?!l.c[0]:!l.s)return new S(NaN);m=!y&&T.isInteger()&&l.isInteger(),m&&(T=T.mod(l))}else{if(s.e>9&&(T.e>0||T.e<-1||(T.e==0?T.c[0]>1||d&&T.c[1]>=24e7:T.c[0]<8e13||d&&T.c[0]<=9999975e7)))return b=T.s<0&&Gt(s)?-0:0,T.e>-1&&(b=1/b),new S(y?1/b:b);N&&(b=ni(N/z+2))}for(d?(f=new S(.5),y&&(s.s=1),v=Gt(s)):(h=Math.abs(+G(s)),v=h%2),w=new S(u);;){if(v){if(w=w.times(T),!w.c)break;b?w.c.length>b&&(w.c.length=b):m&&(w=w.mod(l))}if(h){if(h=Ce(h/2),h===0)break;v=h%2}else if(s=s.times(f),K(s,s.e+1,1),s.e>14)v=Gt(s);else{if(h=+G(s),h===0)break;v=h%2}T=T.times(T),b?T.c&&T.c.length>b&&(T.c.length=b):m&&(T=T.mod(l))}return m?w:(y&&(w=u.div(w)),l?w.mod(l):b?K(w,N,o,p):w)},r.integerValue=function(s){var l=new S(this);return s==null?s=o:se(s,0,8),K(l,l.e+1,s)},r.isEqualTo=r.eq=function(s,l){return st(this,new S(s,l))===0},r.isFinite=function(){return!!this.c},r.isGreaterThan=r.gt=function(s,l){return st(this,new S(s,l))>0},r.isGreaterThanOrEqualTo=r.gte=function(s,l){return(l=st(this,new S(s,l)))===1||l===0},r.isInteger=function(){return!!this.c&&Ne(this.e/z)>this.c.length-2},r.isLessThan=r.lt=function(s,l){return st(this,new S(s,l))<0},r.isLessThanOrEqualTo=r.lte=function(s,l){return(l=st(this,new S(s,l)))===-1||l===0},r.isNaN=function(){return!this.s},r.isNegative=function(){return this.s<0},r.isPositive=function(){return this.s>0},r.isZero=function(){return!!this.c&&this.c[0]==0},r.minus=function(s,l){var f,m,h,b,p=this,d=p.s;if(s=new S(s,l),l=s.s,!d||!l)return new S(NaN);if(d!=l)return s.s=-l,p.plus(s);var y=p.e/z,v=s.e/z,w=p.c,T=s.c;if(!y||!v){if(!w||!T)return w?(s.s=-l,s):new S(T?p:NaN);if(!w[0]||!T[0])return T[0]?(s.s=-l,s):new S(w[0]?p:o==3?-0:0)}if(y=Ne(y),v=Ne(v),w=w.slice(),d=y-v){for((b=d<0)?(d=-d,h=w):(v=y,h=T),h.reverse(),l=d;l--;h.push(0));h.reverse()}else for(m=(b=(d=w.length)<(l=T.length))?d:l,d=l=0;l<m;l++)if(w[l]!=T[l]){b=w[l]<T[l];break}if(b&&(h=w,w=T,T=h,s.s=-s.s),l=(m=T.length)-(f=w.length),l>0)for(;l--;w[f++]=0);for(l=Ae-1;m>d;){if(w[--m]<T[m]){for(f=m;f&&!w[--f];w[f]=l);--w[f],w[m]+=Ae}w[m]-=T[m]}for(;w[0]==0;w.splice(0,1),--v);return w[0]?H(s,w,v):(s.s=o==3?-1:1,s.c=[s.e=0],s)},r.modulo=r.mod=function(s,l){var f,m,h=this;return s=new S(s,l),!h.c||!s.s||s.c&&!s.c[0]?new S(NaN):!s.c||h.c&&!h.c[0]?new S(h):(M==9?(m=s.s,s.s=1,f=e(h,s,0,3),s.s=m,f.s*=m):f=e(h,s,0,M),s=h.minus(f.times(s)),!s.c[0]&&M==1&&(s.s=h.s),s)},r.multipliedBy=r.times=function(s,l){var f,m,h,b,p,d,y,v,w,T,A,B,q,X,re,F=this,Z=F.c,ce=(s=new S(s,l)).c;if(!Z||!ce||!Z[0]||!ce[0])return!F.s||!s.s||Z&&!Z[0]&&!ce||ce&&!ce[0]&&!Z?s.c=s.e=s.s=null:(s.s*=F.s,!Z||!ce?s.c=s.e=null:(s.c=[0],s.e=0)),s;for(m=Ne(F.e/z)+Ne(s.e/z),s.s*=F.s,y=Z.length,T=ce.length,y<T&&(q=Z,Z=ce,ce=q,h=y,y=T,T=h),h=y+T,q=[];h--;q.push(0));for(X=Ae,re=tt,h=T;--h>=0;){for(f=0,A=ce[h]%re,B=ce[h]/re|0,p=y,b=h+p;b>h;)v=Z[--p]%re,w=Z[p]/re|0,d=B*v+w*A,v=A*v+d%re*re+q[b]+f,f=(v/X|0)+(d/re|0)+B*w,q[b--]=v%X;q[b]=f}return f?++m:q.splice(0,1),H(s,q,m)},r.negated=function(){var s=new S(this);return s.s=-s.s||null,s},r.plus=function(s,l){var f,m=this,h=m.s;if(s=new S(s,l),l=s.s,!h||!l)return new S(NaN);if(h!=l)return s.s=-l,m.minus(s);var b=m.e/z,p=s.e/z,d=m.c,y=s.c;if(!b||!p){if(!d||!y)return new S(h/0);if(!d[0]||!y[0])return y[0]?s:new S(d[0]?m:h*0)}if(b=Ne(b),p=Ne(p),d=d.slice(),h=b-p){for(h>0?(p=b,f=y):(h=-h,f=d),f.reverse();h--;f.push(0));f.reverse()}for(h=d.length,l=y.length,h-l<0&&(f=y,y=d,d=f,l=h),h=0;l;)h=(d[--l]=d[l]+y[l]+h)/Ae|0,d[l]=Ae===d[l]?0:d[l]%Ae;return h&&(d=[h].concat(d),++p),H(s,d,p)},r.precision=r.sd=function(s,l){var f,m,h,b=this;if(s!=null&&s!==!!s)return se(s,1,Ee),l==null?l=o:se(l,0,8),K(new S(b),s,l);if(!(f=b.c))return null;if(h=f.length-1,m=h*z+1,h=f[h]){for(;h%10==0;h/=10,m--);for(h=f[0];h>=10;h/=10,m++);}return s&&b.e+1>m&&(m=b.e+1),m},r.shiftedBy=function(s){return se(s,-9007199254740991,Xi),this.times("1e"+s)},r.squareRoot=r.sqrt=function(){var s,l,f,m,h,b=this,p=b.c,d=b.s,y=b.e,v=a+4,w=new S("0.5");if(d!==1||!p||!p[0])return new S(!d||d<0&&(!p||p[0])?NaN:p?b:1/0);if(d=Math.sqrt(+G(b)),d==0||d==1/0?(l=ke(p),(l.length+y)%2==0&&(l+="0"),d=Math.sqrt(+l),y=Ne((y+1)/2)-(y<0||y%2),d==1/0?l="5e"+y:(l=d.toExponential(),l=l.slice(0,l.indexOf("e")+1)+y),f=new S(l)):f=new S(d+""),f.c[0]){for(y=f.e,d=y+v,d<3&&(d=0);;)if(h=f,f=w.times(h.plus(e(b,h,v,1))),ke(h.c).slice(0,d)===(l=ke(f.c)).slice(0,d))if(f.e<y&&--d,l=l.slice(d-3,d+1),l=="9999"||!m&&l=="4999"){if(!m&&(K(h,h.e+a+2,0),h.times(h).eq(b))){f=h;break}v+=4,d+=4,m=1}else{(!+l||!+l.slice(1)&&l.charAt(0)=="5")&&(K(f,f.e+a+2,1),s=!f.times(f).eq(b));break}}return K(f,f.e+a+1,o,s)},r.toExponential=function(s,l){return s!=null&&(se(s,0,Ee),s++),O(this,s,l,1)},r.toFixed=function(s,l){return s!=null&&(se(s,0,Ee),s=s+this.e+1),O(this,s,l)},r.toFormat=function(s,l,f){var m,h=this;if(f==null)s!=null&&l&&typeof l=="object"?(f=l,l=null):s&&typeof s=="object"?(f=s,s=l=null):f=P;else if(typeof f!="object")throw Error(ve+"Argument not an object: "+f);if(m=h.toFixed(s,l),h.c){var b,p=m.split("."),d=+f.groupSize,y=+f.secondaryGroupSize,v=f.groupSeparator||"",w=p[0],T=p[1],A=h.s<0,B=A?w.slice(1):w,q=B.length;if(y&&(b=d,d=y,y=b,q-=b),d>0&&q>0){for(b=q%d||d,w=B.substr(0,b);b<q;b+=d)w+=v+B.substr(b,d);y>0&&(w+=v+B.slice(b)),A&&(w="-"+w)}m=T?w+(f.decimalSeparator||"")+((y=+f.fractionGroupSize)?T.replace(new RegExp("\\d{"+y+"}\\B","g"),"$&"+(f.fractionGroupSeparator||"")):T):w}return(f.prefix||"")+m+(f.suffix||"")},r.toFraction=function(s){var l,f,m,h,b,p,d,y,v,w,T,A,B=this,q=B.c;if(s!=null&&(d=new S(s),!d.isInteger()&&(d.c||d.s!==1)||d.lt(u)))throw Error(ve+"Argument "+(d.isInteger()?"out of range: ":"not an integer: ")+G(d));if(!q)return new S(B);for(l=new S(u),v=f=new S(u),m=y=new S(u),A=ke(q),b=l.e=A.length-B.e-1,l.c[0]=ri[(p=b%z)<0?z+p:p],s=!s||d.comparedTo(l)>0?b>0?l:v:d,p=_,_=1/0,d=new S(A),y.c[0]=0;w=e(d,l,0,1),h=f.plus(w.times(m)),h.comparedTo(s)!=1;)f=m,m=h,v=y.plus(w.times(h=v)),y=h,l=d.minus(w.times(h=l)),d=h;return h=e(s.minus(f),m,0,1),y=y.plus(h.times(v)),f=f.plus(h.times(m)),y.s=v.s=B.s,b=b*2,T=e(v,m,b,o).minus(B).abs().comparedTo(e(y,f,b,o).minus(B).abs())<1?[v,m]:[y,f],_=p,T},r.toNumber=function(){return+G(this)},r.toPrecision=function(s,l){return s!=null&&se(s,1,Ee),O(this,s,l,2)},r.toString=function(s){var l,f=this,m=f.s,h=f.e;return h===null?m?(l="Infinity",m<0&&(l="-"+l)):l="NaN":(s==null?l=h<=g||h>=c?Wt(ke(f.c),h):He(ke(f.c),h,"0"):s===10&&k?(f=K(new S(f),a+h+1,o),l=He(ke(f.c),f.e,"0")):(se(s,2,R.length,"Base"),l=t(He(ke(f.c),h,"0"),10,s,m,!0)),m<0&&f.c[0]&&(l="-"+l)),l},r.valueOf=r.toJSON=function(){return G(this)},r._isBigNumber=!0,r[Symbol.toStringTag]="BigNumber",r[Symbol.for("nodejs.util.inspect.custom")]=r.valueOf,i!=null&&S.set(i),S}function Ne(i){var e=i|0;return i>0||i===e?e:e-1}function ke(i){for(var e,t,n=1,r=i.length,u=i[0]+"";n<r;){for(e=i[n++]+"",t=z-e.length;t--;e="0"+e);u+=e}for(r=u.length;u.charCodeAt(--r)===48;);return u.slice(0,r+1||1)}function st(i,e){var t,n,r=i.c,u=e.c,a=i.s,o=e.s,g=i.e,c=e.e;if(!a||!o)return null;if(t=r&&!r[0],n=u&&!u[0],t||n)return t?n?0:-o:a;if(a!=o)return a;if(t=a<0,n=g==c,!r||!u)return n?0:!r^t?1:-1;if(!n)return g>c^t?1:-1;for(o=(g=r.length)<(c=u.length)?g:c,a=0;a<o;a++)if(r[a]!=u[a])return r[a]>u[a]^t?1:-1;return g==c?0:g>c^t?1:-1}function se(i,e,t,n){if(i<e||i>t||i!==Ce(i))throw Error(ve+(n||"Argument")+(typeof i=="number"?i<e||i>t?" out of range: ":" not an integer: ":" not a primitive number: ")+String(i))}function Gt(i){var e=i.c.length-1;return Ne(i.e/z)==e&&i.c[e]%2!=0}function Wt(i,e){return(i.length>1?i.charAt(0)+"."+i.slice(1):i)+(e<0?"e":"e+")+e}function He(i,e,t){var n,r;if(e<0){for(r=t+".";++e;r+=t);i=r+i}else if(n=i.length,++e>n){for(r=t,e-=n;--e;r+=t);i+=r}else e<n&&(i=i.slice(0,e)+"."+i.slice(e));return i}var Ge=Qi(),Fr=class{constructor(i){I(this,"key");I(this,"left",null);I(this,"right",null);this.key=i}},_t=class extends Fr{constructor(i){super(i)}},qr=class{constructor(){I(this,"size",0);I(this,"modificationCount",0);I(this,"splayCount",0)}splay(i){const e=this.root;if(e==null)return this.compare(i,i),-1;let t=null,n=null,r=null,u=null,a=e;const o=this.compare;let g;for(;;)if(g=o(a.key,i),g>0){let c=a.left;if(c==null||(g=o(c.key,i),g>0&&(a.left=c.right,c.right=a,a=c,c=a.left,c==null)))break;t==null?n=a:t.left=a,t=a,a=c}else if(g<0){let c=a.right;if(c==null||(g=o(c.key,i),g<0&&(a.right=c.left,c.left=a,a=c,c=a.right,c==null)))break;r==null?u=a:r.right=a,r=a,a=c}else break;return r!=null&&(r.right=a.left,a.left=u),t!=null&&(t.left=a.right,a.right=n),this.root!==a&&(this.root=a,this.splayCount++),g}splayMin(i){let e=i,t=e.left;for(;t!=null;){const n=t;e.left=n.right,n.right=e,e=n,t=e.left}return e}splayMax(i){let e=i,t=e.right;for(;t!=null;){const n=t;e.right=n.left,n.left=e,e=n,t=e.right}return e}_delete(i){if(this.root==null||this.splay(i)!=0)return null;let t=this.root;const n=t,r=t.left;if(this.size--,r==null)this.root=t.right;else{const u=t.right;t=this.splayMax(r),t.right=u,this.root=t}return this.modificationCount++,n}addNewRoot(i,e){this.size++,this.modificationCount++;const t=this.root;if(t==null){this.root=i;return}e<0?(i.left=t,i.right=t.right,t.right=null):(i.right=t,i.left=t.left,t.left=null),this.root=i}_first(){const i=this.root;return i==null?null:(this.root=this.splayMin(i),this.root)}_last(){const i=this.root;return i==null?null:(this.root=this.splayMax(i),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(i){return this.validKey(i)&&this.splay(i)==0}defaultCompare(){return(i,e)=>i<e?-1:i>e?1:0}wrap(){return{getRoot:()=>this.root,setRoot:i=>{this.root=i},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:i=>{this.splayCount=i},splay:i=>this.splay(i),has:i=>this.has(i)}}},Dt=class kt extends qr{constructor(t,n){super();I(this,"root",null);I(this,"compare");I(this,"validKey");I(this,mn,"[object Set]");this.compare=t??this.defaultCompare(),this.validKey=n??(r=>r!=null&&r!=null)}delete(t){return this.validKey(t)?this._delete(t)!=null:!1}deleteAll(t){for(const n of t)this.delete(n)}forEach(t){const n=this[Symbol.iterator]();let r;for(;r=n.next(),!r.done;)t(r.value,r.value,this)}add(t){const n=this.splay(t);return n!=0&&this.addNewRoot(new _t(t),n),this}addAndReturn(t){const n=this.splay(t);return n!=0&&this.addNewRoot(new _t(t),n),this.root.key}addAll(t){for(const n of t)this.add(n)}isEmpty(){return this.root==null}isNotEmpty(){return this.root!=null}single(){if(this.size==0)throw"Bad state: No element";if(this.size>1)throw"Bad state: Too many element";return this.root.key}first(){if(this.size==0)throw"Bad state: No element";return this._first().key}last(){if(this.size==0)throw"Bad state: No element";return this._last().key}lastBefore(t){if(t==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(t)<0)return this.root.key;let r=this.root.left;if(r==null)return null;let u=r.right;for(;u!=null;)r=u,u=r.right;return r.key}firstAfter(t){if(t==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(t)>0)return this.root.key;let r=this.root.right;if(r==null)return null;let u=r.left;for(;u!=null;)r=u,u=r.left;return r.key}retainAll(t){const n=new kt(this.compare,this.validKey),r=this.modificationCount;for(const u of t){if(r!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(u)&&this.splay(u)==0&&n.add(this.root.key)}n.size!=this.size&&(this.root=n.root,this.size=n.size,this.modificationCount++)}lookup(t){return!this.validKey(t)||this.splay(t)!=0?null:this.root.key}intersection(t){const n=new kt(this.compare,this.validKey);for(const r of this)t.has(r)&&n.add(r);return n}difference(t){const n=new kt(this.compare,this.validKey);for(const r of this)t.has(r)||n.add(r);return n}union(t){const n=this.clone();return n.addAll(t),n}clone(){const t=new kt(this.compare,this.validKey);return t.size=this.size,t.root=this.copyNode(this.root),t}copyNode(t){if(t==null)return null;function n(u,a){let o,g;do{if(o=u.left,g=u.right,o!=null){const c=new _t(o.key);a.left=c,n(o,c)}if(g!=null){const c=new _t(g.key);a.right=c,u=g,a=c}}while(g!=null)}const r=new _t(t.key);return n(t,r),r}toSet(){return this.clone()}entries(){return new Zr(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[(pn=Symbol.iterator,mn=Symbol.toStringTag,pn)](){return new jr(this.wrap())}},Ji=class{constructor(i){I(this,"tree");I(this,"path",new Array);I(this,"modificationCount",null);I(this,"splayCount");this.tree=i,this.splayCount=i.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;const i=this.path[this.path.length-1];return this.getValue(i)}rebuildPath(i){this.path.splice(0,this.path.length),this.tree.splay(i),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(i){for(;i!=null;)this.path.push(i),i=i.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(this.modificationCount==null){this.modificationCount=this.tree.getModificationCount();let t=this.tree.getRoot();for(;t!=null;)this.path.push(t),t=t.left;return this.path.length>0}throw"Concurrent modification during iteration."}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let i=this.path[this.path.length-1],e=i.right;if(e!=null){for(;e!=null;)this.path.push(e),e=e.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===i;)i=this.path.pop();return this.path.length>0}},jr=class extends Ji{getValue(i){return i.key}},Zr=class extends Ji{getValue(i){return[i.key,i.key]}},$i=i=>()=>i,si=i=>{const e=i?(t,n)=>n.minus(t).abs().isLessThanOrEqualTo(i):$i(!1);return(t,n)=>e(t,n)?0:t.comparedTo(n)};function Hr(i){const e=i?(t,n,r,u,a)=>t.exponentiatedBy(2).isLessThanOrEqualTo(u.minus(n).exponentiatedBy(2).plus(a.minus(r).exponentiatedBy(2)).times(i)):$i(!1);return(t,n,r)=>{const u=t.x,a=t.y,o=r.x,g=r.y,c=a.minus(g).times(n.x.minus(o)).minus(u.minus(o).times(n.y.minus(g)));return e(c,u,a,o,g)?0:c.comparedTo(0)}}var Vr=i=>i,Kr=i=>{if(i){const e=new Dt(si(i)),t=new Dt(si(i)),n=(u,a)=>a.addAndReturn(u),r=u=>({x:n(u.x,e),y:n(u.y,t)});return r({x:new Ge(0),y:new Ge(0)}),r}return Vr},oi=i=>({set:e=>{Ve=oi(e)},reset:()=>oi(i),compare:si(i),snap:Kr(i),orient:Hr(i)}),Ve=oi(),St=(i,e)=>i.ll.x.isLessThanOrEqualTo(e.x)&&e.x.isLessThanOrEqualTo(i.ur.x)&&i.ll.y.isLessThanOrEqualTo(e.y)&&e.y.isLessThanOrEqualTo(i.ur.y),li=(i,e)=>{if(e.ur.x.isLessThan(i.ll.x)||i.ur.x.isLessThan(e.ll.x)||e.ur.y.isLessThan(i.ll.y)||i.ur.y.isLessThan(e.ll.y))return null;const t=i.ll.x.isLessThan(e.ll.x)?e.ll.x:i.ll.x,n=i.ur.x.isLessThan(e.ur.x)?i.ur.x:e.ur.x,r=i.ll.y.isLessThan(e.ll.y)?e.ll.y:i.ll.y,u=i.ur.y.isLessThan(e.ur.y)?i.ur.y:e.ur.y;return{ll:{x:t,y:r},ur:{x:n,y:u}}},zt=(i,e)=>i.x.times(e.y).minus(i.y.times(e.x)),en=(i,e)=>i.x.times(e.x).plus(i.y.times(e.y)),Ut=i=>en(i,i).sqrt(),Yr=(i,e,t)=>{const n={x:e.x.minus(i.x),y:e.y.minus(i.y)},r={x:t.x.minus(i.x),y:t.y.minus(i.y)};return zt(r,n).div(Ut(r)).div(Ut(n))},Xr=(i,e,t)=>{const n={x:e.x.minus(i.x),y:e.y.minus(i.y)},r={x:t.x.minus(i.x),y:t.y.minus(i.y)};return en(r,n).div(Ut(r)).div(Ut(n))},tn=(i,e,t)=>e.y.isZero()?null:{x:i.x.plus(e.x.div(e.y).times(t.minus(i.y))),y:t},nn=(i,e,t)=>e.x.isZero()?null:{x:t,y:i.y.plus(e.y.div(e.x).times(t.minus(i.x)))},Qr=(i,e,t,n)=>{if(e.x.isZero())return nn(t,n,i.x);if(n.x.isZero())return nn(i,e,t.x);if(e.y.isZero())return tn(t,n,i.y);if(n.y.isZero())return tn(i,e,t.y);const r=zt(e,n);if(r.isZero())return null;const u={x:t.x.minus(i.x),y:t.y.minus(i.y)},a=zt(u,e).div(r),o=zt(u,n).div(r),g=i.x.plus(o.times(e.x)),c=t.x.plus(a.times(n.x)),E=i.y.plus(o.times(e.y)),_=t.y.plus(a.times(n.y)),C=g.plus(c).div(2),M=E.plus(_).div(2);return{x:C,y:M}},We=class Tn{constructor(e,t){I(this,"point");I(this,"isLeft");I(this,"segment");I(this,"otherSE");I(this,"consumedBy");e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=t}static compare(e,t){const n=Tn.comparePoints(e.point,t.point);return n!==0?n:(e.point!==t.point&&e.link(t),e.isLeft!==t.isLeft?e.isLeft?1:-1:qt.compare(e.segment,t.segment))}static comparePoints(e,t){return e.x.isLessThan(t.x)?-1:e.x.isGreaterThan(t.x)?1:e.y.isLessThan(t.y)?-1:e.y.isGreaterThan(t.y)?1:0}link(e){if(e.point===this.point)throw new Error("Tried to link already linked events");const t=e.point.events;for(let n=0,r=t.length;n<r;n++){const u=t[n];this.point.events.push(u),u.point=this.point}this.checkForConsuming()}checkForConsuming(){const e=this.point.events.length;for(let t=0;t<e;t++){const n=this.point.events[t];if(n.segment.consumedBy===void 0)for(let r=t+1;r<e;r++){const u=this.point.events[r];u.consumedBy===void 0&&n.otherSE.point.events===u.otherSE.point.events&&n.segment.consume(u.segment)}}}getAvailableLinkedEvents(){const e=[];for(let t=0,n=this.point.events.length;t<n;t++){const r=this.point.events[t];r!==this&&!r.segment.ringOut&&r.segment.isInResult()&&e.push(r)}return e}getLeftmostComparator(e){const t=new Map,n=r=>{const u=r.otherSE;t.set(r,{sine:Yr(this.point,e.point,u.point),cosine:Xr(this.point,e.point,u.point)})};return(r,u)=>{t.has(r)||n(r),t.has(u)||n(u);const{sine:a,cosine:o}=t.get(r),{sine:g,cosine:c}=t.get(u);return a.isGreaterThanOrEqualTo(0)&&g.isGreaterThanOrEqualTo(0)?o.isLessThan(c)?1:o.isGreaterThan(c)?-1:0:a.isLessThan(0)&&g.isLessThan(0)?o.isLessThan(c)?-1:o.isGreaterThan(c)?1:0:g.isLessThan(a)?-1:g.isGreaterThan(a)?1:0}}},Jr=class bi{constructor(e){I(this,"events");I(this,"poly");I(this,"_isExteriorRing");I(this,"_enclosingRing");this.events=e;for(let t=0,n=e.length;t<n;t++)e[t].segment.ringOut=this;this.poly=null}static factory(e){const t=[];for(let n=0,r=e.length;n<r;n++){const u=e[n];if(!u.isInResult()||u.ringOut)continue;let a=null,o=u.leftSE,g=u.rightSE;const c=[o],E=o.point,_=[];for(;a=o,o=g,c.push(o),o.point!==E;)for(;;){const C=o.getAvailableLinkedEvents();if(C.length===0){const P=c[0].point,R=c[c.length-1].point;throw new Error(`Unable to complete output ring starting at [${P.x}, ${P.y}]. Last matching segment found ends at [${R.x}, ${R.y}].`)}if(C.length===1){g=C[0].otherSE;break}let M=null;for(let P=0,R=_.length;P<R;P++)if(_[P].point===o.point){M=P;break}if(M!==null){const P=_.splice(M)[0],R=c.splice(P.index);R.unshift(R[0].otherSE),t.push(new bi(R.reverse()));continue}_.push({index:c.length,point:o.point});const N=o.getLeftmostComparator(a);g=C.sort(N)[0].otherSE;break}t.push(new bi(c))}return t}getGeom(){let e=this.events[0].point;const t=[e];for(let c=1,E=this.events.length-1;c<E;c++){const _=this.events[c].point,C=this.events[c+1].point;Ve.orient(_,e,C)!==0&&(t.push(_),e=_)}if(t.length===1)return null;const n=t[0],r=t[1];Ve.orient(n,e,r)===0&&t.shift(),t.push(t[0]);const u=this.isExteriorRing()?1:-1,a=this.isExteriorRing()?0:t.length-1,o=this.isExteriorRing()?t.length:-1,g=[];for(let c=a;c!=o;c+=u)g.push([t[c].x.toNumber(),t[c].y.toNumber()]);return g}isExteriorRing(){if(this._isExteriorRing===void 0){const e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){var r,u;let e=this.events[0];for(let a=1,o=this.events.length;a<o;a++){const g=this.events[a];We.compare(e,g)>0&&(e=g)}let t=e.segment.prevInResult(),n=t?t.prevInResult():null;for(;;){if(!t)return null;if(!n)return t.ringOut;if(n.ringOut!==t.ringOut)return((r=n.ringOut)==null?void 0:r.enclosingRing())!==t.ringOut?t.ringOut:(u=t.ringOut)==null?void 0:u.enclosingRing();t=n.prevInResult(),n=t?t.prevInResult():null}}},rn=class{constructor(i){I(this,"exteriorRing");I(this,"interiorRings");this.exteriorRing=i,i.poly=this,this.interiorRings=[]}addInterior(i){this.interiorRings.push(i),i.poly=this}getGeom(){const i=this.exteriorRing.getGeom();if(i===null)return null;const e=[i];for(let t=0,n=this.interiorRings.length;t<n;t++){const r=this.interiorRings[t].getGeom();r!==null&&e.push(r)}return e}},$r=class{constructor(i){I(this,"rings");I(this,"polys");this.rings=i,this.polys=this._composePolys(i)}getGeom(){const i=[];for(let e=0,t=this.polys.length;e<t;e++){const n=this.polys[e].getGeom();n!==null&&i.push(n)}return i}_composePolys(i){var t;const e=[];for(let n=0,r=i.length;n<r;n++){const u=i[n];if(!u.poly)if(u.isExteriorRing())e.push(new rn(u));else{const a=u.enclosingRing();a!=null&&a.poly||e.push(new rn(a)),(t=a==null?void 0:a.poly)==null||t.addInterior(u)}}return e}},es=class{constructor(i,e=qt.compare){I(this,"queue");I(this,"tree");I(this,"segments");this.queue=i,this.tree=new Dt(e),this.segments=[]}process(i){const e=i.segment,t=[];if(i.consumedBy)return i.isLeft?this.queue.delete(i.otherSE):this.tree.delete(e),t;i.isLeft&&this.tree.add(e);let n=e,r=e;do n=this.tree.lastBefore(n);while(n!=null&&n.consumedBy!=null);do r=this.tree.firstAfter(r);while(r!=null&&r.consumedBy!=null);if(i.isLeft){let u=null;if(n){const o=n.getIntersection(e);if(o!==null&&(e.isAnEndpoint(o)||(u=o),!n.isAnEndpoint(o))){const g=this._splitSafely(n,o);for(let c=0,E=g.length;c<E;c++)t.push(g[c])}}let a=null;if(r){const o=r.getIntersection(e);if(o!==null&&(e.isAnEndpoint(o)||(a=o),!r.isAnEndpoint(o))){const g=this._splitSafely(r,o);for(let c=0,E=g.length;c<E;c++)t.push(g[c])}}if(u!==null||a!==null){let o=null;u===null?o=a:a===null?o=u:o=We.comparePoints(u,a)<=0?u:a,this.queue.delete(e.rightSE),t.push(e.rightSE);const g=e.split(o);for(let c=0,E=g.length;c<E;c++)t.push(g[c])}t.length>0?(this.tree.delete(e),t.push(i)):(this.segments.push(e),e.prev=n)}else{if(n&&r){const u=n.getIntersection(r);if(u!==null){if(!n.isAnEndpoint(u)){const a=this._splitSafely(n,u);for(let o=0,g=a.length;o<g;o++)t.push(a[o])}if(!r.isAnEndpoint(u)){const a=this._splitSafely(r,u);for(let o=0,g=a.length;o<g;o++)t.push(a[o])}}}this.tree.delete(e)}return t}_splitSafely(i,e){this.tree.delete(i);const t=i.rightSE;this.queue.delete(t);const n=i.split(e);return n.push(t),i.consumedBy===void 0&&this.tree.add(i),n}},ts=class{constructor(){I(this,"type");I(this,"numMultiPolys")}run(i,e,t){xt.type=i;const n=[new on(e,!0)];for(let c=0,E=t.length;c<E;c++)n.push(new on(t[c],!1));if(xt.numMultiPolys=n.length,xt.type==="difference"){const c=n[0];let E=1;for(;E<n.length;)li(n[E].bbox,c.bbox)!==null?E++:n.splice(E,1)}if(xt.type==="intersection")for(let c=0,E=n.length;c<E;c++){const _=n[c];for(let C=c+1,M=n.length;C<M;C++)if(li(_.bbox,n[C].bbox)===null)return[]}const r=new Dt(We.compare);for(let c=0,E=n.length;c<E;c++){const _=n[c].getSweepEvents();for(let C=0,M=_.length;C<M;C++)r.add(_[C])}const u=new es(r);let a=null;for(r.size!=0&&(a=r.first(),r.delete(a));a;){const c=u.process(a);for(let E=0,_=c.length;E<_;E++){const C=c[E];C.consumedBy===void 0&&r.add(C)}r.size!=0?(a=r.first(),r.delete(a)):a=null}Ve.reset();const o=Jr.factory(u.segments);return new $r(o).getGeom()}},xt=new ts,Ft=xt,is=0,qt=class Ht{constructor(e,t,n,r){I(this,"id");I(this,"leftSE");I(this,"rightSE");I(this,"rings");I(this,"windings");I(this,"ringOut");I(this,"consumedBy");I(this,"prev");I(this,"_prevInResult");I(this,"_beforeState");I(this,"_afterState");I(this,"_isInResult");this.id=++is,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=n,this.windings=r}static compare(e,t){const n=e.leftSE.point.x,r=t.leftSE.point.x,u=e.rightSE.point.x,a=t.rightSE.point.x;if(a.isLessThan(n))return 1;if(u.isLessThan(r))return-1;const o=e.leftSE.point.y,g=t.leftSE.point.y,c=e.rightSE.point.y,E=t.rightSE.point.y;if(n.isLessThan(r)){if(g.isLessThan(o)&&g.isLessThan(c))return 1;if(g.isGreaterThan(o)&&g.isGreaterThan(c))return-1;const _=e.comparePoint(t.leftSE.point);if(_<0)return 1;if(_>0)return-1;const C=t.comparePoint(e.rightSE.point);return C!==0?C:-1}if(n.isGreaterThan(r)){if(o.isLessThan(g)&&o.isLessThan(E))return-1;if(o.isGreaterThan(g)&&o.isGreaterThan(E))return 1;const _=t.comparePoint(e.leftSE.point);if(_!==0)return _;const C=e.comparePoint(t.rightSE.point);return C<0?1:C>0?-1:1}if(o.isLessThan(g))return-1;if(o.isGreaterThan(g))return 1;if(u.isLessThan(a)){const _=t.comparePoint(e.rightSE.point);if(_!==0)return _}if(u.isGreaterThan(a)){const _=e.comparePoint(t.rightSE.point);if(_<0)return 1;if(_>0)return-1}if(!u.eq(a)){const _=c.minus(o),C=u.minus(n),M=E.minus(g),N=a.minus(r);if(_.isGreaterThan(C)&&M.isLessThan(N))return 1;if(_.isLessThan(C)&&M.isGreaterThan(N))return-1}return u.isGreaterThan(a)?1:u.isLessThan(a)||c.isLessThan(E)?-1:c.isGreaterThan(E)?1:e.id<t.id?-1:e.id>t.id?1:0}static fromRing(e,t,n){let r,u,a;const o=We.comparePoints(e,t);if(o<0)r=e,u=t,a=1;else if(o>0)r=t,u=e,a=-1;else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);const g=new We(r,!0),c=new We(u,!1);return new Ht(g,c,[n],[a])}replaceRightSE(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e.isLessThan(t)?e:t},ur:{x:this.rightSE.point.x,y:e.isGreaterThan(t)?e:t}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(e){return e.x.eq(this.leftSE.point.x)&&e.y.eq(this.leftSE.point.y)||e.x.eq(this.rightSE.point.x)&&e.y.eq(this.rightSE.point.y)}comparePoint(e){return Ve.orient(this.leftSE.point,e,this.rightSE.point)}getIntersection(e){const t=this.bbox(),n=e.bbox(),r=li(t,n);if(r===null)return null;const u=this.leftSE.point,a=this.rightSE.point,o=e.leftSE.point,g=e.rightSE.point,c=St(t,o)&&this.comparePoint(o)===0,E=St(n,u)&&e.comparePoint(u)===0,_=St(t,g)&&this.comparePoint(g)===0,C=St(n,a)&&e.comparePoint(a)===0;if(E&&c)return C&&!_?a:!C&&_?g:null;if(E)return _&&u.x.eq(g.x)&&u.y.eq(g.y)?null:u;if(c)return C&&a.x.eq(o.x)&&a.y.eq(o.y)?null:o;if(C&&_)return null;if(C)return a;if(_)return g;const M=Qr(u,this.vector(),o,e.vector());return M===null||!St(r,M)?null:Ve.snap(M)}split(e){const t=[],n=e.events!==void 0,r=new We(e,!0),u=new We(e,!1),a=this.rightSE;this.replaceRightSE(u),t.push(u),t.push(r);const o=new Ht(r,a,this.rings.slice(),this.windings.slice());return We.comparePoints(o.leftSE.point,o.rightSE.point)>0&&o.swapEvents(),We.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(r.checkForConsuming(),u.checkForConsuming()),t}swapEvents(){const e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let t=0,n=this.windings.length;t<n;t++)this.windings[t]*=-1}consume(e){let t=this,n=e;for(;t.consumedBy;)t=t.consumedBy;for(;n.consumedBy;)n=n.consumedBy;const r=Ht.compare(t,n);if(r!==0){if(r>0){const u=t;t=n,n=u}if(t.prev===n){const u=t;t=n,n=u}for(let u=0,a=n.rings.length;u<a;u++){const o=n.rings[u],g=n.windings[u],c=t.rings.indexOf(o);c===-1?(t.rings.push(o),t.windings.push(g)):t.windings[c]+=g}n.rings=null,n.windings=null,n.consumedBy=t,n.leftSE.consumedBy=t.leftSE,n.rightSE.consumedBy=t.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{const e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;const e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};const t=this._afterState.rings,n=this._afterState.windings,r=this._afterState.multiPolys;for(let o=0,g=this.rings.length;o<g;o++){const c=this.rings[o],E=this.windings[o],_=t.indexOf(c);_===-1?(t.push(c),n.push(E)):n[_]+=E}const u=[],a=[];for(let o=0,g=t.length;o<g;o++){if(n[o]===0)continue;const c=t[o],E=c.poly;if(a.indexOf(E)===-1)if(c.isExterior)u.push(E);else{a.indexOf(E)===-1&&a.push(E);const _=u.indexOf(c.poly);_!==-1&&u.splice(_,1)}}for(let o=0,g=u.length;o<g;o++){const c=u[o].multiPoly;r.indexOf(c)===-1&&r.push(c)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;const e=this.beforeState().multiPolys,t=this.afterState().multiPolys;switch(Ft.type){case"union":{const n=e.length===0,r=t.length===0;this._isInResult=n!==r;break}case"intersection":{let n,r;e.length<t.length?(n=e.length,r=t.length):(n=t.length,r=e.length),this._isInResult=r===Ft.numMultiPolys&&n<r;break}case"xor":{const n=Math.abs(e.length-t.length);this._isInResult=n%2===1;break}case"difference":{const n=r=>r.length===1&&r[0].isSubject;this._isInResult=n(e)!==n(t);break}}return this._isInResult}},sn=class{constructor(i,e,t){I(this,"poly");I(this,"isExterior");I(this,"segments");I(this,"bbox");if(!Array.isArray(i)||i.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=t,this.segments=[],typeof i[0][0]!="number"||typeof i[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const n=Ve.snap({x:new Ge(i[0][0]),y:new Ge(i[0][1])});this.bbox={ll:{x:n.x,y:n.y},ur:{x:n.x,y:n.y}};let r=n;for(let u=1,a=i.length;u<a;u++){if(typeof i[u][0]!="number"||typeof i[u][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const o=Ve.snap({x:new Ge(i[u][0]),y:new Ge(i[u][1])});o.x.eq(r.x)&&o.y.eq(r.y)||(this.segments.push(qt.fromRing(r,o,this)),o.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=o.x),o.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=o.y),o.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=o.x),o.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=o.y),r=o)}(!n.x.eq(r.x)||!n.y.eq(r.y))&&this.segments.push(qt.fromRing(r,n,this))}getSweepEvents(){const i=[];for(let e=0,t=this.segments.length;e<t;e++){const n=this.segments[e];i.push(n.leftSE),i.push(n.rightSE)}return i}},ns=class{constructor(i,e){I(this,"multiPoly");I(this,"exteriorRing");I(this,"interiorRings");I(this,"bbox");if(!Array.isArray(i))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new sn(i[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let t=1,n=i.length;t<n;t++){const r=new sn(i[t],this,!1);r.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=r.bbox.ll.x),r.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=r.bbox.ll.y),r.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=r.bbox.ur.y),this.interiorRings.push(r)}this.multiPoly=e}getSweepEvents(){const i=this.exteriorRing.getSweepEvents();for(let e=0,t=this.interiorRings.length;e<t;e++){const n=this.interiorRings[e].getSweepEvents();for(let r=0,u=n.length;r<u;r++)i.push(n[r])}return i}},on=class{constructor(i,e){I(this,"isSubject");I(this,"polys");I(this,"bbox");if(!Array.isArray(i))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof i[0][0][0]=="number"&&(i=[i])}catch{}this.polys=[],this.bbox={ll:{x:new Ge(Number.POSITIVE_INFINITY),y:new Ge(Number.POSITIVE_INFINITY)},ur:{x:new Ge(Number.NEGATIVE_INFINITY),y:new Ge(Number.NEGATIVE_INFINITY)}};for(let t=0,n=i.length;t<n;t++){const r=new ns(i[t],this);r.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=r.bbox.ll.x),r.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=r.bbox.ll.y),r.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=r.bbox.ur.y),this.polys.push(r)}this.isSubject=e}getSweepEvents(){const i=[];for(let e=0,t=this.polys.length;e<t;e++){const n=this.polys[e].getSweepEvents();for(let r=0,u=n.length;r<u;r++)i.push(n[r])}return i}},rs=(i,...e)=>Ft.run("union",i,e),ss=(i,...e)=>Ft.run("difference",i,e);Ve.set;function os(i,e={}){const t=[];if(ei(i,r=>{t.push(r.coordinates)}),t.length<2)throw new Error("Must have at least 2 geometries");const n=rs(t[0],...t.slice(1));return n.length===0?null:n.length===1?$t(n[0],e.properties):ji(n,e.properties)}var ln=os;function ls(i){const e=[];if(ei(i,r=>{e.push(r.coordinates)}),e.length<2)throw new Error("Must have at least two features");const t=i.features[0].properties||{},n=ss(e[0],...e.slice(1));return n.length===0?null:n.length===1?$t(n[0],t):ji(n,t)}var us=ls;function as(i){if(!i)throw new Error("geojson is required");var e=[];return Br(i,function(t){e.push(t)}),Lt(e)}var fs=as;function un(i,e){const t=us(Lt([$t([[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]]),i]));if(!t)return;t.properties={isMask:!0};const n=bt(ti(i)),r=(n[2]-n[0])/360/1e3,u=n[0]<-180,a=n[2]>180,o=fs(i);if(o.features.length>1&&(u||a))for(const g of o.features){const c=bt(ti(g));if(a&&c[0]<-180+r)for(const E of g.geometry.coordinates)for(const _ of E)_[0]+=360-r;if(u&&c[2]>180-r)for(const E of g.geometry.coordinates)for(const _ of E)_[0]-=360-r}e(Lt([o.features.length<2?i:ln(o)??i,t]))}const an=i=>{var n,r,u;const e=(n=i==null?void 0:i.geometry)==null?void 0:n.type,t=(r=i==null?void 0:i.properties)!=null&&r.isMask?0:e==="LineString"||e==="MultiLineString"?3:2;return{color:"#3170fe",fillColor:"#000",fillOpacity:(u=i==null?void 0:i.properties)!=null&&u.isMask?.1:0,weight:t,dashArray:[t,t],lineCap:"butt"}};function fn(i,e=!0,t=!0,n={},r={},u=an){let a;const o=[];let g,c;const E=be.geoJSON(void 0,{style:u===!0?an:u===!1?void 0:u??void 0,interactive:!1}).addTo(i),_=M=>{a==null||a({type:"mapClick",coordinates:[M.latlng.lng,M.latlng.lat]})};function C(M,N=!1){const P=document.createElement("div");return new cr({props:{displayIn:"leaflet"},target:P}),new be.Marker(M,{interactive:N,icon:new be.DivIcon({html:P,className:"",iconAnchor:[12,26],iconSize:[25,30],tooltipAnchor:[1,-24]})})}return{setEventHandler(M){M?(a=M,i.on("click",_)):(a=void 0,i.off("click",_))},flyTo(M,N){i.flyTo([M[1],M[0]],N,{duration:2,...n})},fitBounds(M,N,P){i.flyToBounds([[M[1],M[0]],[M[3],M[2]]],{padding:[N,N],duration:2,...P?{maxZoom:P}:{},...r})},indicateReverse(M){i.getContainer().style.cursor=M?"crosshair":""},setReverseMarker(M){var P;if(!e)return;const N=M&&[M[1],M[0]];c?N?c.setLatLng(N):(c.remove(),c=void 0):N&&(e instanceof Function?c=e(i)??void 0:(c=(typeof e=="object"?new be.Marker(N,e):C(N)).addTo(i),(P=c.getElement())==null||P.classList.add("marker-reverse")))},setFeatures(M,N,P){function R(k){E.clearLayers(),k&&E.addData(k)}for(const k of o)k.remove();o.length=0,R();e:if(N){let k=!1;if(N.geometry.type==="GeometryCollection"){const S=N.geometry.geometries.filter(O=>O.type==="Polygon"||O.type==="MultiPolygon");t:if(S.length>0){const O=ln(Lt(S.map(D=>Et(D))));if(!O)break t;un({...N,geometry:O.geometry},R),k=!0}else{const O=N.geometry.geometries.filter(D=>D.type==="LineString"||D.type==="MultiLineString");O.length>0&&(R({...N,geometry:{type:"GeometryCollection",geometries:O}}),k=!0)}}if(!k){if(N.geometry.type==="Polygon"||N.geometry.type==="MultiPolygon")un(N,S=>{if(!S)return;const O=[...S.features],D=bt(ti(N)),H=D[2]-D[0];D[0]-H/4<-180&&O.push(...cn(S,-360).features),D[2]+H/4>180&&O.push(...cn(S,360).features),R(Lt(O))});else if(N.geometry.type==="LineString"||N.geometry.type==="MultiLineString"){R(N);break e}}if(!P&&!N.geometry.type.endsWith("Point"))break e;if(e instanceof Function){const S=e(i,N);S&&o.push(S.addTo(i))}else if(e){const S=[N.center[1],N.center[0]];o.push(typeof e=="object"?new be.Marker(S,e):C(S).addTo(i))}}if(t)for(const k of M??[]){if(k===N)continue;const S=[k.center[1],k.center[0]];let O;if(t instanceof Function){if(O=t(i,k),!O)continue}else O=(typeof t=="object"?new be.Marker(S,t):C(S,!0)).addTo(i).bindTooltip(k.place_type[0]==="reverse"?k.place_name:k.place_name.replace(/,.*/,""),{direction:"top"});const D=O.getElement();D&&(D.addEventListener("click",H=>{H.stopPropagation(),a==null||a({type:"markerClick",id:k.id})}),D.addEventListener("mouseenter",()=>{a==null||a({type:"markerMouseEnter",id:k.id})}),D.addEventListener("mouseleave",()=>{a==null||a({type:"markerMouseLeave",id:k.id})}),D.classList.toggle("marker-fuzzy",!!k.matching_text)),o.push(O)}},setSelectedMarker(M){var N,P;g&&((N=g.getElement())==null||N.classList.toggle("marker-selected",!1)),g=M>-1?o[M]:void 0,(P=g==null?void 0:g.getElement())==null||P.classList.toggle("marker-selected",!0)},getCenterAndZoom(){const M=i.getCenter();return[i.getZoom(),M.lng,M.lat]}}}function cn(i,e){const t=zr(i);for(const n of t.features)if(n.geometry.type=="MultiPolygon")for(const r of n.geometry.coordinates)hn(r,e);else hn(n.geometry.coordinates,e);return t}function hn(i,e){for(const t of i)for(const n of t)n[0]+=e}class dn extends be.Control{}be.Util.extend(dn.prototype,be.Evented.prototype);class gn extends dn{constructor(t){super(t);pi(this,Le);pi(this,ot);yi(this,ot,t)}onAdd(t){const n=document.createElement("div");n.className="leaflet-ctrl-geocoder",be.DomEvent.disableClickPropagation(n),be.DomEvent.disableScrollPropagation(n);const{marker:r,showResultMarkers:u,flyTo:a,fullGeometryStyle:o,position:g,...c}=Te(this,ot),E=typeof a=="boolean"?{}:a,_=fn(t,r,u,E,E,o);yi(this,Le,new Ir({target:n,props:{mapController:_,flyTo:a===void 0?!0:!!a,...c}}));const C={select:void 0,pick:void 0,featureslisted:void 0,featuresmarked:void 0,response:void 0,optionsvisibilitychange:void 0,reversetoggle:void 0,querychange:void 0};for(const M in C)Te(this,Le).$on(M,N=>this.fire(M,N.detail));return n}setOptions(t){var g;Object.assign(Te(this,ot),t);const{marker:n,showResultMarkers:r,flyTo:u,fullGeometryStyle:a,...o}=Te(this,ot);(g=Te(this,Le))==null||g.$set(o)}setQuery(t,n=!0){var r;(r=Te(this,Le))==null||r.setQuery(t,n)}clearMap(){var t;(t=Te(this,Le))==null||t.clearMap()}clearList(){var t;(t=Te(this,Le))==null||t.clearList()}setReverseMode(t){var n;(n=Te(this,Le))==null||n.$set({reverseActive:t})}focus(t){var n;(n=Te(this,Le))==null||n.focus(t)}blur(){var t;(t=Te(this,Le))==null||t.blur()}onRemove(){var t;(t=Te(this,Le))==null||t.$destroy()}}Le=new WeakMap,ot=new WeakMap;function cs(...i){return new gn(...i)}window.L&&typeof window.L=="object"&&typeof window.L.control=="function"&&(window.L.control.maptilerGeocoding=cs),V.GeocodingControl=gn,V.createLeafletMapController=fn,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})});
13
+ `)&&_(e,"style",t),r&128&&_(e,"title",n[7])},d(n){n&&$(e)}}}function Oi(i){let e,t;return{c(){e=Y("span"),t=Qe(i[7]),_(e,"class","secondary svelte-w9y5n9")},m(n,r){te(n,e,r),H(e,t)},p(n,r){r&128&&mt(t,n[7])},d(n){n&&$(e)}}}function sr(i){let e,t,n,r,u,a,o,g,f,L=(i[8]?i[0].place_name:i[0].place_name.replace(/,.*/,""))+"",x,C,N=i[2]==="always"||i[2]!=="never"&&!i[0].address&&!i[0].id.startsWith("road.")&&!i[0].id.startsWith("address.")&&!i[0].id.startsWith("postal_code.")&&(!i[0].id.startsWith("poi.")||!i[5])&&!i[8],M,k,W=(i[8]?"":i[0].place_name.replace(/[^,]*,?\s*/,""))+"",O,S,A,z,D,U;function I(m,h){return h&1&&(t=null),h&1&&(n=null),h&1&&(r=null),h&1&&(u=null),Pe&&m[6]?rr:m[5]?nr:m[0].address?ir:(t==null&&(t=!!m[0].id.startsWith("road.")),t?tr:(n==null&&(n=!!m[0].id.startsWith("address.")),n?er:(r==null&&(r=!!m[0].id.startsWith("postal_code.")),r?$n:(u==null&&(u=!!m[0].id.startsWith("poi.")),u?Jn:m[8]?Qn:Xn))))}let s=I(i,-1),l=s(i),c=N&&Oi(i);return{c(){e=Y("li"),l.c(),a=we(),o=Y("span"),g=Y("span"),f=Y("span"),x=Qe(L),C=we(),c&&c.c(),M=we(),k=Y("span"),O=Qe(W),_(f,"class","primary svelte-w9y5n9"),_(g,"class","svelte-w9y5n9"),_(k,"class","line2 svelte-w9y5n9"),_(o,"class","texts svelte-w9y5n9"),_(e,"tabindex","-1"),_(e,"role","option"),_(e,"aria-selected",S=i[1]==="selected"),_(e,"aria-checked",A=i[1]==="picked"),_(e,"class",z=At(i[1])+" svelte-w9y5n9")},m(m,h){te(m,e,h),l.m(e,null),H(e,a),H(e,o),H(o,g),H(g,f),H(f,x),H(g,C),c&&c.m(g,null),H(o,M),H(o,k),H(k,O),D||(U=[ce(e,"mouseenter",i[13]),ce(e,"focus",i[15]),ce(e,"click",i[16])],D=!0)},p(m,[h]){s===(s=I(m,h))&&l?l.p(m,h):(l.d(1),l=s(m),l&&(l.c(),l.m(e,a))),h&257&&L!==(L=(m[8]?m[0].place_name:m[0].place_name.replace(/,.*/,""))+"")&&mt(x,L),h&293&&(N=m[2]==="always"||m[2]!=="never"&&!m[0].address&&!m[0].id.startsWith("road.")&&!m[0].id.startsWith("address.")&&!m[0].id.startsWith("postal_code.")&&(!m[0].id.startsWith("poi.")||!m[5])&&!m[8]),N?c?c.p(m,h):(c=Oi(m),c.c(),c.m(g,null)):c&&(c.d(1),c=null),h&257&&W!==(W=(m[8]?"":m[0].place_name.replace(/[^,]*,?\s*/,""))+"")&&mt(O,W),h&2&&S!==(S=m[1]==="selected")&&_(e,"aria-selected",S),h&2&&A!==(A=m[1]==="picked")&&_(e,"aria-checked",A),h&2&&z!==(z=At(m[1])+" svelte-w9y5n9")&&_(e,"class",z)},i:ne,o:ne,d(m){m&&$(e),l.d(),c&&c.d(),D=!1,qe(U)}}}const Ri=typeof devicePixelRatio>"u"?1:devicePixelRatio>1.25,Qt=Ri?"@2x":"",Me=Ri?2:1;let Pe,Bt;function or(i,e,t){let n,r,u,{feature:a}=e,{style:o="default"}=e,{showPlaceType:g}=e,{missingIconsCache:f}=e,{iconsBaseUrl:L}=e;const x=xi();let C,N,M,k;function W(){Bt??(Bt=fetch(`${L}sprite${Qt}.json`).then(s=>s.json()).then(s=>{Pe=s}).catch(()=>{Pe=null}))}function O(){N&&f.add(N),S()}function S(){Pe!==void 0?A():(W(),Bt==null||Bt.then(A))}function A(){do{if(k--,t(4,C=n==null?void 0:n[k]),t(6,M=C?Pe==null?void 0:Pe.icons[C]:void 0),M)break;t(5,N=C?L+C.replace(/ /g,"_")+".svg":void 0)}while(k>-1&&(!N||f.has(N)))}function z(s){Dn.call(this,i,s)}const D=()=>O(),U=()=>x("select",void 0),I=s=>{document.activeElement!==s.target&&x("select",void 0)};return i.$$set=s=>{"feature"in s&&t(0,a=s.feature),"style"in s&&t(1,o=s.style),"showPlaceType"in s&&t(2,g=s.showPlaceType),"missingIconsCache"in s&&t(11,f=s.missingIconsCache),"iconsBaseUrl"in s&&t(3,L=s.iconsBaseUrl)},i.$$.update=()=>{var s,l,c,m,h;i.$$.dirty&1&&t(12,n=(s=a.properties)==null?void 0:s.categories),i.$$.dirty&1&&t(8,r=a.place_type[0]==="reverse"),i.$$.dirty&1&&t(7,u=((c=(l=a.properties)==null?void 0:l.categories)==null?void 0:c.join(", "))??((h=(m=a.properties)==null?void 0:m.place_type_name)==null?void 0:h[0])??a.place_type[0]),i.$$.dirty&4096&&(k=(n==null?void 0:n.length)??0,S())},[a,o,g,L,C,N,M,u,r,x,O,f,n,z,D,U,I]}class lr extends et{constructor(e){super(),$e(this,e,or,sr,Xe,{feature:0,style:1,showPlaceType:2,missingIconsCache:11,iconsBaseUrl:3})}}function ur(i){let e;return{c(){e=Y("div"),e.innerHTML='<svg viewBox="0 0 18 18" width="24" height="24" class="loading-icon svelte-1ocfouu"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>',_(e,"class","svelte-1ocfouu")},m(t,n){te(t,e,n)},p:ne,i:ne,o:ne,d(t){t&&$(e)}}}class ar extends et{constructor(e){super(),$e(this,e,null,ur,Xe,{})}}function fr(i){let e,t,n;return{c(){e=Re("svg"),t=Re("path"),_(t,"stroke-width","4"),_(t,"d","M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"),_(t,"class","svelte-gzo3ar"),_(e,"width",n=i[0]==="list"?20:void 0),_(e,"viewBox","0 0 70 85"),_(e,"fill","none"),_(e,"class","svelte-gzo3ar"),Be(e,"in-map",i[0]!=="list"),Be(e,"list-icon",i[0]==="list")},m(r,u){te(r,e,u),H(e,t)},p(r,[u]){u&1&&n!==(n=r[0]==="list"?20:void 0)&&_(e,"width",n),u&1&&Be(e,"in-map",r[0]!=="list"),u&1&&Be(e,"list-icon",r[0]==="list")},i:ne,o:ne,d(r){r&&$(e)}}}function cr(i,e,t){let{displayIn:n}=e;return i.$$set=r=>{"displayIn"in r&&t(0,n=r.displayIn)},[n]}class hr extends et{constructor(e){super(),$e(this,e,cr,fr,Xe,{displayIn:0})}}function dr(i){let e,t;return{c(){e=Re("svg"),t=Re("path"),_(t,"d","M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"),_(e,"viewBox","0 0 60.006 21.412"),_(e,"width","14"),_(e,"height","20"),_(e,"class","svelte-en2qvf")},m(n,r){te(n,e,r),H(e,t)},p:ne,i:ne,o:ne,d(n){n&&$(e)}}}class gr extends et{constructor(e){super(),$e(this,e,null,dr,Xe,{})}}function mr(i){let e,t,n;return{c(){e=Re("svg"),t=Re("circle"),n=Re("path"),_(t,"cx","4.789"),_(t,"cy","4.787"),_(t,"r","3.85"),_(t,"class","svelte-1aq105l"),_(n,"d","M12.063 12.063 7.635 7.635"),_(n,"class","svelte-1aq105l"),_(e,"xmlns","http://www.w3.org/2000/svg"),_(e,"width","13"),_(e,"height","13"),_(e,"viewBox","0 0 13 13"),_(e,"class","svelte-1aq105l")},m(r,u){te(r,e,u),H(e,t),H(e,n)},p:ne,i:ne,o:ne,d(r){r&&$(e)}}}class pr extends et{constructor(e){super(),$e(this,e,null,mr,Xe,{})}}function yr(i,e,t){const n=e[1],r=e[0],u=n-r;return i===n&&t?i:((i-r)%u+u)%u+r}function wt(i){const e=[...i];return e[2]<e[0]&&(Math.abs((e[0]+e[2]+360)/2)>Math.abs((e[0]-360+e[2])/2)?e[0]-=360:e[2]+=360),e}let Et;async function br(i,e,t){const n=i==null?void 0:i.getCenterAndZoom();for(const r of e??[])if(!(n&&(r.minZoom!=null&&r.minZoom>n[0]||r.maxZoom!=null&&r.maxZoom<n[0]))){if(r.type==="fixed")return r.coordinates.join(",");e:if(r.type==="client-geolocation"){if(Et&&r.cachedLocationExpiry&&Et.time+r.cachedLocationExpiry>Date.now()){if(!Et.coords)break e;return Et.coords}let u;try{return u=await new Promise((a,o)=>{t.signal.addEventListener("abort",()=>{o(Error("aborted"))}),navigator.geolocation.getCurrentPosition(g=>{a([g.coords.longitude,g.coords.latitude].map(f=>f.toFixed(6)).join(","))},g=>{o(g)},r)}),u}catch{}finally{r.cachedLocationExpiry&&(Et={time:Date.now(),coords:u})}if(t.signal.aborted)return}if(r.type==="server-geolocation")return"ip";if(n&&r.type==="map-center")return n[1].toFixed(6)+","+n[2].toFixed(6)}}const vr=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i,Pi=/^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/,Ai=/^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i,Ii=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i,Bi=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i,Gi=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;function wr(i){if(!["DMS","DM","DD"].includes(i))throw new Error("invalid format specified");if(this.decimalCoordinates&&this.decimalCoordinates.trim()){const e=this.decimalCoordinates.split(",").map(N=>Number(N.trim())),t=Number(e[0]),n=Number(e[1]),r=Math.abs(t),u=Math.abs(n),a=t>0?"N":"S",o=n>0?"E":"W";let g;i=="DD"&&(g=`${r}° ${a}, ${u}° ${o}`);const f=Math.floor(r),L=Math.floor(u),x=(r-f)*60,C=(u-L)*60;if(i=="DM"){let N=Wi(x,3).toFixed(3).padStart(6,"0"),M=Wi(C,3).toFixed(3).padStart(6,"0");N.endsWith(".000")&&M.endsWith(".000")&&(N=N.replace(/\.000$/,""),M=M.replace(/\.000$/,"")),g=`${f}° ${N}' ${a}, ${L}° ${M}' ${o}`}if(i=="DMS"){const N=Math.floor(x),M=Math.floor(C);let k=((x-N)*60).toFixed(1).padStart(4,"0"),W=((C-M)*60).toFixed(1).padStart(4,"0");const O=N.toString().padStart(2,"0"),S=M.toString().padStart(2,"0");k.endsWith(".0")&&W.endsWith(".0")&&(k=k.replace(/\.0$/,""),W=W.replace(/\.0$/,"")),g=`${f}° ${O}' ${k}" ${a}, ${L}° ${S}' ${W}" ${o}`}return g}else throw new Error("no decimal coordinates to convert")}function Wi(i,e){const t=Math.pow(10,e);return Math.round((i+Number.EPSILON)*t)/t}function Jt(i,e){e||(e=5),i=i.replace(/\s+/g," ").trim();let t=null,n=null,r="",u="",a=null,o=[],g=!1;if(vr.test(i))throw new Error("invalid coordinate value");if(Pi.test(i))if(o=Pi.exec(i),g=Lt(o),g)t=Math.abs(o[1])+o[2]/60,Number(o[1])<0&&(t*=-1),n=Math.abs(o[3])+o[4]/60,Number(o[3])<0&&(n*=-1),a="DM";else throw new Error("invalid coordinate format");else if(Ai.test(i))if(o=Ai.exec(i),g=Lt(o),g){if(t=o[2],n=o[6],t.includes(",")&&(t=t.replace(",",".")),n.includes(",")&&(n=n.replace(",",".")),a="DD",Number(Math.round(t))==Number(t))throw new Error("integer only coordinate provided");if(Number(Math.round(n))==Number(n))throw new Error("integer only coordinate provided");o[1]?(r=o[1],u=o[5]):o[4]&&(r=o[4],u=o[8])}else throw new Error("invalid decimal coordinate format");else if(Ii.test(i))if(o=Ii.exec(i),g=Lt(o),g)t=Math.abs(parseInt(o[2])),o[4]&&(t+=o[4]/60,a="DM"),o[6]&&(t+=o[6].replace(",",".")/3600,a="DMS"),parseInt(o[2])<0&&(t=-1*t),n=Math.abs(parseInt(o[9])),o[11]&&(n+=o[11]/60),o[13]&&(n+=o[13].replace(",",".")/3600),parseInt(o[9])<0&&(n=-1*n),o[1]?(r=o[1],u=o[8]):o[7]&&(r=o[7],u=o[14]);else throw new Error("invalid DMS coordinates format");else if(Bi.test(i))if(o=Bi.exec(i),g=Lt(o),g)t=Math.abs(parseInt(o[2])),o[4]&&(t+=o[4]/60,a="DM"),o[6]&&(t+=o[6]/3600,a="DMS"),parseInt(o[2])<0&&(t=-1*t),n=Math.abs(parseInt(o[10])),o[12]&&(n+=o[12]/60),o[14]&&(n+=o[14]/3600),parseInt(o[10])<0&&(n=-1*n),o[1]?(r=o[1],u=o[9]):o[8]&&(r=o[8],u=o[16]);else throw new Error("invalid DMS coordinates format");else if(Gi.test(i)){if(o=Gi.exec(i),g=Lt(o),o.filter(f=>f).length<=5)throw new Error("invalid coordinates format");if(g)t=Math.abs(parseInt(o[2])),o[4]&&(t+=o[4].replace(",",".")/60,a="DM"),o[6]&&(t+=o[6].replace(",",".")/3600,a="DMS"),parseInt(o[2])<0&&(t=-1*t),n=Math.abs(parseInt(o[10])),o[12]&&(n+=o[12].replace(",",".")/60),o[14]&&(n+=o[14].replace(",",".")/3600),parseInt(o[10])<0&&(n=-1*n),o[1]?(r=o[1],u=o[9]):o[8]&&(r=o[8],u=o[16]);else throw new Error("invalid coordinates format")}if(g){if(Math.abs(n)>=180)throw new Error("invalid longitude value");if(Math.abs(t)>=90)throw new Error("invalid latitude value");if(r&&!u||!r&&u)throw new Error("invalid coordinates value");if(r&&r==u)throw new Error("invalid coordinates format");t.toString().includes(",")&&(t=t.replace(",",".")),n.toString().includes(",")&&(n=n.replace(",","."));let f=/S|SOUTH/i;f.test(r)&&t>0&&(t=-1*t),f=/W|WEST/i,f.test(u)&&n>0&&(n=-1*n);const L=o[0].trim();let x,C;const N=/[,/;\u0020]/g,M=L.match(N);if(M==null){const O=Math.floor(i.length/2);x=L.substring(0,O).trim(),C=L.substring(O).trim()}else{let O;M.length%2==1?O=Math.floor(M.length/2):O=M.length/2-1;let S=0;if(O==0)S=L.indexOf(M[0]),x=L.substring(0,S).trim(),C=L.substring(S+1).trim();else{let A=0,z=0;for(;A<=O;)S=L.indexOf(M[A],z),z=S+1,A++;x=L.substring(0,S).trim(),C=L.substring(S+1).trim()}}const k=x.split(".");if(k.length==2&&k[1]==0&&k[1].length!=2)throw new Error("invalid coordinates format");const W=C.split(".");if(W.length==2&&W[1]==0&&W[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(x)||/^\d+$/.test(C))throw new Error("degree only coordinate/s provided");return t=Number(Number(t).toFixed(e)),n=Number(Number(n).toFixed(e)),Object.freeze({verbatimCoordinates:L,verbatimLatitude:x,verbatimLongitude:C,decimalLatitude:t,decimalLongitude:n,decimalCoordinates:`${t},${n}`,originalFormat:a,closeEnough:Er,toCoordinateFormat:wr})}else throw new Error("coordinates pattern match failed")}function Lt(i){if(!isNaN(i[0]))return!1;const e=[...i];if(e.shift(),e.length%2>0)return!1;const t=/^[-+]?\d+([\.,]\d+)?$/,n=/[eastsouthnorthwest]+/i,r=e.length/2;for(let u=0;u<r;u++){const a=e[u],o=e[u+r],g=t.test(a)&&t.test(o),f=n.test(a)&&n.test(o),L=a==o;if(!(a==null&&o==null)){if(a==null||o==null)return!1;if(g||f||L)continue;return!1}}return!0}function Di(i,e){const t=Math.abs(i-e);return Number(t.toFixed(6))<=1e-5}function Er(i){if(!i)throw new Error("coords must be provided");if(i.includes(",")){const e=i.split(",");if(Number(e[0])==NaN||Number(e[1])==NaN)throw new Error("coords are not valid decimals");return Di(this.decimalLatitude,Number(e[0]))&&Di(this.decimalLongitude,e[1])}else throw new Error("coords being tested must be separated by a comma")}const Lr=Object.freeze({DMS:"DMS",DM:"DM",DD:"DD"});Jt.to=Lr;const _r=[{verbatimCoordinates:"40.123, -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:'40° 7´ 22.8" N 74° 7´ 22.8" W',verbatimLatitude:'40° 7´ 22.8" N',verbatimLongitude:'74° 7´ 22.8" W'},{verbatimCoordinates:"40° 7.38’ , -74° 7.38’",verbatimLatitude:"40° 7.38’",verbatimLongitude:"-74° 7.38’"},{verbatimCoordinates:"N40°7’22.8’’, W74°7’22.8’’",verbatimLatitude:"N40°7’22.8’’",verbatimLongitude:"W74°7’22.8’’"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:`40°7'22.8"N, 74°7'22.8"W`,verbatimLatitude:`40°7'22.8"N`,verbatimLongitude:`74°7'22.8"W`},{verbatimCoordinates:"40 7 22.8, -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"},{verbatimCoordinates:"40.123 -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123°,-74.123°",verbatimLatitude:"40.123°",verbatimLongitude:"-74.123°"},{verbatimCoordinates:"40.123N74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"4007.38N7407.38W",verbatimLatitude:"4007.38N",verbatimLongitude:"7407.38W"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:"400722.8N740722.8W",verbatimLatitude:"400722.8N",verbatimLongitude:"740722.8W"},{verbatimCoordinates:"N 40 7.38 W 74 7.38",verbatimLatitude:"N 40 7.38",verbatimLongitude:"W 74 7.38"},{verbatimCoordinates:"40:7:22.8N 74:7:22.8W",verbatimLatitude:"40:7:22.8N",verbatimLongitude:"74:7:22.8W"},{verbatimCoordinates:"40:7:23N,74:7:23W",verbatimLatitude:"40:7:23N",verbatimLongitude:"74:7:23W",decimalLatitude:40.1230555555,decimalLongitude:-74.1230555555},{verbatimCoordinates:'40°7’23"N 74°7’23"W',verbatimLatitude:'40°7’23"N',verbatimLongitude:'74°7’23"W',decimalLatitude:40.1230555555,decimalLongitude:-74.12305555555555},{verbatimCoordinates:'40°7’23"S 74°7’23"E',verbatimLatitude:'40°7’23"S',verbatimLongitude:'74°7’23"E',decimalLatitude:-40.1230555555,decimalLongitude:74.12305555555555},{verbatimCoordinates:'40°7’23" -74°7’23"',verbatimLatitude:'40°7’23"',verbatimLongitude:'-74°7’23"',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:'40d 7’ 23" N 74d 7’ 23" W',verbatimLatitude:'40d 7’ 23" N',verbatimLongitude:'74d 7’ 23" W',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:"40.123N 74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40 7 22.8; -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"}],Sr={decimalLatitude:40.123,decimalLongitude:-74.123},xr=[{verbatimCoordinates:`50°4'17.698"south, 14°24'2.826"east`,verbatimLatitude:`50°4'17.698"south`,verbatimLongitude:`14°24'2.826"east`,decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"50d4m17.698S 14d24m2.826E",verbatimLatitude:"50d4m17.698S",verbatimLongitude:"14d24m2.826E",decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"40:26:46N,79:56:55W",verbatimLatitude:"40:26:46N",verbatimLongitude:"79:56:55W",decimalLatitude:40.44611111111111,decimalLongitude:-79.9486111111111},{verbatimCoordinates:"40:26:46.302N 79:56:55.903W",verbatimLatitude:"40:26:46.302N",verbatimLongitude:"79:56:55.903W",decimalLatitude:40.446195,decimalLongitude:-79.94886194444445},{verbatimCoordinates:"40°26′47″N 79°58′36″W",verbatimLatitude:"40°26′47″N",verbatimLongitude:"79°58′36″W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40d 26′ 47″ N 79d 58′ 36″ W",verbatimLatitude:"40d 26′ 47″ N",verbatimLongitude:"79d 58′ 36″ W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40.446195N 79.948862W",verbatimLatitude:"40.446195N",verbatimLongitude:"79.948862W",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40,446195° 79,948862°",verbatimLatitude:"40,446195°",verbatimLongitude:"79,948862°",decimalLatitude:40.446195,decimalLongitude:79.948862},{verbatimCoordinates:"40° 26.7717, -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.446195, -79.948862",verbatimLatitude:"40.446195",verbatimLongitude:"-79.948862",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.123256; -74.123256",verbatimLatitude:"40.123256",verbatimLongitude:"-74.123256",decimalLatitude:40.123256,decimalLongitude:-74.123256},{verbatimCoordinates:"18°24S 22°45E",verbatimLatitude:"18°24S",verbatimLongitude:"22°45E",decimalLatitude:-18.4,decimalLongitude:22.75}],Tr=[{verbatimCoordinates:"10.432342S 10.6345345E",verbatimLatitude:"10.432342S",verbatimLongitude:"10.6345345E",decimalLatitude:-10.432342,decimalLongitude:10.6345345},{verbatimCoordinates:"10.00S 10.00E",verbatimLatitude:"10.00S",verbatimLongitude:"10.00E",decimalLatitude:-10,decimalLongitude:10},{verbatimCoordinates:"00.00S 01.00E",verbatimLatitude:"00.00S",verbatimLongitude:"01.00E",decimalLatitude:0,decimalLongitude:1},{verbatimCoordinates:"18.24S 22.45E",verbatimLatitude:"18.24S",verbatimLongitude:"22.45E",decimalLatitude:-18.4,decimalLongitude:22.75},{verbatimCoordinates:"27deg 15min 45.2sec S 18deg 32min 53.7sec E",verbatimLatitude:"27deg 15min 45.2sec S",verbatimLongitude:"18deg 32min 53.7sec E",decimalLatitude:-27.262555555555554,decimalLongitude:18.54825},{verbatimCoordinates:"-23.3245° S / 28.2344° E",verbatimLatitude:"-23.3245° S",verbatimLongitude:"28.2344° E",decimalLatitude:-23.3245,decimalLongitude:28.2344},{verbatimCoordinates:"40° 26.7717 -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"27.15.45S 18.32.53E",verbatimLatitude:"27.15.45S",verbatimLongitude:"18.32.53E",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"-27.15.45 18.32.53",verbatimLatitude:"-27.15.45",verbatimLongitude:"18.32.53",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"27.15.45.2S 18.32.53.4E",verbatimLatitude:"27.15.45.2S",verbatimLongitude:"18.32.53.4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"27.15.45,2S 18.32.53,4E",verbatimLatitude:"27.15.45,2S",verbatimLongitude:"18.32.53,4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"S23.43563 ° E22.45634 °",verbatimLatitude:"S23.43563 °",verbatimLongitude:"E22.45634 °",decimalLatitude:-23.43563,decimalLongitude:22.45634},{verbatimCoordinates:"27,71372° S 23,07771° E",verbatimLatitude:"27,71372° S",verbatimLongitude:"23,07771° E",decimalLatitude:-27.71372,decimalLongitude:23.07771},{verbatimCoordinates:"27.45.34 S 23.23.23 E",verbatimLatitude:"27.45.34 S",verbatimLongitude:"23.23.23 E",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"S 27.45.34 E 23.23.23",verbatimLatitude:"S 27.45.34",verbatimLongitude:"E 23.23.23",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"53 16.3863,4 52.8171",verbatimLatitude:"53 16.3863",verbatimLongitude:"4 52.8171",decimalLatitude:53.273105,decimalLongitude:4.88029},{verbatimCoordinates:"50 8.2914,-5 2.4447",verbatimLatitude:"50 8.2914",verbatimLongitude:"-5 2.4447",decimalLatitude:50.13819,decimalLongitude:-5.040745},{verbatimCoordinates:"N 48° 30,6410', E 18° 57,4583'",verbatimLatitude:"N 48° 30,6410'",verbatimLongitude:"E 18° 57,4583'",decimalLatitude:48.51068,decimalLongitude:18.95764},{verbatimCoordinates:"1.23456, 18.33453",verbatimLatitude:"1.23456",verbatimLongitude:"18.33453",decimalLatitude:1.23456,decimalLongitude:18.33453}];function Mr(){const i=[];return _r.forEach(e=>{e.decimalLatitude?i.push(e):i.push({...e,...Sr})}),[...i,...xr,...Tr]}const Cr=Mr();Jt.formats=Cr.map(i=>i.verbatimCoordinates);const Nr=Jt;function zi(i,e,t){const n=i.slice();return n[97]=e[t],n[99]=t,n}function Ui(i){let e,t,n,r,u;return t=new Ni({}),{c(){e=Y("button"),Je(t.$$.fragment),_(e,"type","button"),_(e,"title",i[3]),_(e,"class","svelte-bz0zu3")},m(a,o){te(a,e,o),je(t,e,null),n=!0,r||(u=ce(e,"click",i[78]),r=!0)},p(a,o){(!n||o[0]&8)&&_(e,"title",a[3])},i(a){n||(re(t.$$.fragment,a),n=!0)},o(a){ae(t.$$.fragment,a),n=!1},d(a){a&&$(e),Ze(t),r=!1,u()}}}function Fi(i){let e,t;return e=new ar({}),{c(){Je(e.$$.fragment)},m(n,r){je(e,n,r),t=!0},i(n){t||(re(e.$$.fragment,n),t=!0)},o(n){ae(e.$$.fragment,n),t=!1},d(n){Ze(e,n)}}}function qi(i){let e,t,n,r,u;return t=new gr({}),{c(){e=Y("button"),Je(t.$$.fragment),_(e,"type","button"),_(e,"title",i[10]),_(e,"class","svelte-bz0zu3"),Be(e,"active",i[0])},m(a,o){te(a,e,o),je(t,e,null),n=!0,r||(u=ce(e,"click",i[79]),r=!0)},p(a,o){(!n||o[0]&1024)&&_(e,"title",a[10]),(!n||o[0]&1)&&Be(e,"active",a[0])},i(a){n||(re(t.$$.fragment,a),n=!0)},o(a){ae(t.$$.fragment,a),n=!1},d(a){a&&$(e),Ze(t),r=!1,u()}}}function kr(i){let e,t=[],n=new Map,r,u,a,o=Ci(i[13]);const g=f=>f[97].id+(f[97].address?","+f[97].address:"");for(let f=0;f<o.length;f+=1){let L=zi(i,o,f),x=g(L);n.set(x,t[f]=ji(x,L))}return{c(){e=Y("ul");for(let f=0;f<t.length;f+=1)t[f].c();_(e,"class","options svelte-bz0zu3"),_(e,"role","listbox")},m(f,L){te(f,e,L);for(let x=0;x<t.length;x+=1)t[x]&&t[x].m(e,null);r=!0,u||(a=[ce(e,"mouseleave",i[27]),ce(e,"blur",i[83]),ce(e,"keydown",i[23])],u=!0)},p(f,L){L[0]&102823936&&(o=Ci(f[13]),bt(),t=Zn(t,L,g,1,f,o,n,e,jn,ji,null,zi),vt())},i(f){if(!r){for(let L=0;L<o.length;L+=1)re(t[L]);r=!0}},o(f){for(let L=0;L<t.length;L+=1)ae(t[L]);r=!1},d(f){f&&$(e);for(let L=0;L<t.length;L+=1)t[L].d();u=!1,qe(a)}}}function Or(i){let e,t,n,r,u,a;return t=new ki({}),{c(){e=Y("div"),Je(t.$$.fragment),n=we(),r=Y("div"),u=Qe(i[8]),_(r,"class","svelte-bz0zu3"),_(e,"class","no-results svelte-bz0zu3")},m(o,g){te(o,e,g),je(t,e,null),H(e,n),H(e,r),H(r,u),a=!0},p(o,g){(!a||g[0]&256)&&mt(u,o[8])},i(o){a||(re(t.$$.fragment,o),a=!0)},o(o){ae(t.$$.fragment,o),a=!1},d(o){o&&$(e),Ze(t)}}}function Rr(i){let e="",t;return{c(){t=Qe(e)},m(n,r){te(n,t,r)},p:ne,i:ne,o:ne,d(n){n&&$(t)}}}function Pr(i){let e,t,n,r,u,a,o,g,f,L,x;return t=new ki({}),g=new Ni({}),{c(){e=Y("div"),Je(t.$$.fragment),n=we(),r=Y("div"),u=Qe(i[7]),a=we(),o=Y("button"),Je(g.$$.fragment),_(r,"class","svelte-bz0zu3"),_(o,"class","svelte-bz0zu3"),_(e,"class","error svelte-bz0zu3")},m(C,N){te(C,e,N),je(t,e,null),H(e,n),H(e,r),H(r,u),H(e,a),H(e,o),je(g,o,null),f=!0,L||(x=ce(o,"click",i[80]),L=!0)},p(C,N){(!f||N[0]&128)&&mt(u,C[7])},i(C){f||(re(t.$$.fragment,C),re(g.$$.fragment,C),f=!0)},o(C){ae(t.$$.fragment,C),ae(g.$$.fragment,C),f=!1},d(C){C&&$(e),Ze(t),Ze(g),L=!1,x()}}}function ji(i,e){var o;let t,n,r;function u(){return e[81](e[99])}function a(){return e[82](e[97])}return n=new lr({props:{feature:e[97],showPlaceType:e[11],style:e[15]===e[99]?"selected":((o=e[14])==null?void 0:o.id)===e[97].id?"picked":"default",missingIconsCache:e[21],iconsBaseUrl:e[12]}}),n.$on("mouseenter",u),n.$on("select",a),{key:i,first:null,c(){t=An(),Je(n.$$.fragment),this.first=t},m(g,f){te(g,t,f),je(n,g,f),r=!0},p(g,f){var x;e=g;const L={};f[0]&8192&&(L.feature=e[97]),f[0]&2048&&(L.showPlaceType=e[11]),f[0]&57344&&(L.style=e[15]===e[99]?"selected":((x=e[14])==null?void 0:x.id)===e[97].id?"picked":"default"),f[0]&4096&&(L.iconsBaseUrl=e[12]),n.$set(L)},i(g){r||(re(n.$$.fragment,g),r=!0)},o(g){ae(n.$$.fragment,g),r=!1},d(g){g&&$(t),Ze(n,g)}}}function Ar(i){let e,t,n,r,u,a,o,g,f,L,x,C,N,M,k,W,O,S,A,z=!1;u=new pr({});let D=!i[20]&&Ui(i),U=i[20]&&Fi(),I=i[6]==="button"&&qi(i);const s=i[70].default,l=kn(s,i,i[69],null),c=[Pr,Rr,Or,kr],m=[];function h(d,b){var p,y;return d[19]?0:!d[16]&&!d[4]?1:((p=d[13])==null?void 0:p.length)===0?2:(y=d[13])!=null&&y.length&&(d[16]||d[4])?3:-1}return~(M=h(i))&&(k=m[M]=c[M](i)),{c(){e=we(),t=Y("form"),n=Y("div"),r=Y("button"),Je(u.$$.fragment),a=we(),o=Y("input"),g=we(),f=Y("div"),D&&D.c(),L=we(),U&&U.c(),x=we(),I&&I.c(),C=we(),l&&l.c(),N=we(),k&&k.c(),_(r,"class","search-button svelte-bz0zu3"),_(r,"type","button"),_(o,"placeholder",i[9]),_(o,"aria-label",i[9]),_(o,"class","svelte-bz0zu3"),_(f,"class","clear-button-container svelte-bz0zu3"),Be(f,"displayable",i[1]!==""),_(n,"class","input-group svelte-bz0zu3"),_(t,"class",W=At(i[2])+" svelte-bz0zu3"),Be(t,"can-collapse",i[5]&&i[1]==="")},m(d,b){te(d,e,b),te(d,t,b),H(t,n),H(n,r),je(u,r,null),H(n,a),H(n,o),i[72](o),_i(o,i[1]),H(n,g),H(n,f),D&&D.m(f,null),H(f,L),U&&U.m(f,null),H(n,x),I&&I.m(n,null),H(n,C),l&&l.m(n,null),H(t,N),~M&&m[M].m(t,null),O=!0,S||(A=[ce(r,"click",i[71]),ce(o,"input",i[73]),ce(o,"focus",i[74]),ce(o,"blur",i[75]),ce(o,"click",i[76]),ce(o,"keydown",i[23]),ce(o,"input",i[24]),ce(o,"change",i[77]),ce(t,"submit",In(i[22]))],S=!0)},p(d,b){(!O||b[0]&512)&&_(o,"placeholder",d[9]),(!O||b[0]&512)&&_(o,"aria-label",d[9]),b[0]&2&&o.value!==d[1]&&_i(o,d[1]),d[20]?D&&(bt(),ae(D,1,1,()=>{D=null}),vt()):D?(D.p(d,b),b[0]&1048576&&re(D,1)):(D=Ui(d),D.c(),re(D,1),D.m(f,L)),d[20]?U?b[0]&1048576&&re(U,1):(U=Fi(),U.c(),re(U,1),U.m(f,null)):U&&(bt(),ae(U,1,1,()=>{U=null}),vt()),(!O||b[0]&2)&&Be(f,"displayable",d[1]!==""),d[6]==="button"?I?(I.p(d,b),b[0]&64&&re(I,1)):(I=qi(d),I.c(),re(I,1),I.m(n,C)):I&&(bt(),ae(I,1,1,()=>{I=null}),vt()),l&&l.p&&(!O||b[2]&128)&&Rn(l,s,d,d[69],O?On(s,d[69],b,null):Pn(d[69]),null);let p=M;M=h(d),M===p?~M&&m[M].p(d,b):(k&&(bt(),ae(m[p],1,1,()=>{m[p]=null}),vt()),~M?(k=m[M],k?k.p(d,b):(k=m[M]=c[M](d),k.c()),re(k,1),k.m(t,null)):k=null),(!O||b[0]&4&&W!==(W=At(d[2])+" svelte-bz0zu3"))&&_(t,"class",W),(!O||b[0]&38)&&Be(t,"can-collapse",d[5]&&d[1]==="")},i(d){O||(re(z),re(u.$$.fragment,d),re(D),re(U),re(I),re(l,d),re(k),O=!0)},o(d){ae(z),ae(u.$$.fragment,d),ae(D),ae(U),ae(I),ae(l,d),ae(k),O=!1},d(d){d&&($(e),$(t)),Ze(u),i[72](null),D&&D.d(),U&&U.d(),I&&I.d(),l&&l.d(d),~M&&m[M].d(),S=!1,qe(A)}}}function Ir(i,e,t){let n,r,u,{$$slots:a={},$$scope:o}=e;const g={continental_marine:4,country:4,major_landform:8,region:5,subregion:6,county:7,joint_municipality:8,joint_submunicipality:9,municipality:10,municipal_district:11,locality:12,neighbourhood:13,place:14,postal_code:14,road:16,poi:17,address:18,"poi.peak":15,"poi.shop":18,"poi.cafe":18,"poi.restaurant":18,"poi.aerodrome":13};let{class:f=void 0}=e,{apiKey:L=void 0}=e,{bbox:x=void 0}=e,{clearButtonTitle:C="clear"}=e,{clearOnBlur:N=!1}=e,{clearListOnPick:M=!1}=e,{keepListOpen:k=!1}=e,{collapsed:W=!1}=e,{country:O=void 0}=e,{debounceSearch:S=200}=e,{enableReverse:A="never"}=e,{errorMessage:z="Something went wrong…"}=e,{filter:D=()=>!0}=e,{flyTo:U=!0}=e,{fuzzyMatch:I=!0}=e,{language:s=void 0}=e,{limit:l=void 0}=e;const c=41415112612;let{reverseGeocodingLimit:m=c}=e,{mapController:h=void 0}=e,{minLength:d=2}=e,{noResultsMessage:b="Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!"}=e,{placeholder:p="Search"}=e,{proximity:y=[{type:"server-geolocation"}]}=e,{reverseActive:v=A==="always"}=e,{reverseButtonTitle:w="toggle reverse geocoding"}=e,{searchValue:T=""}=e,{pickedResultStyle:R="full-geometry"}=e,{showPlaceType:B="if-needed"}=e,{showResultsWhileTyping:Z=!0}=e,{selectFirst:X=!0}=e,{flyToSelected:se=!1}=e,{markerOnSelected:j=!0}=e,{types:V=void 0}=e;const he=[];let{reverseGeocodingTypes:Ke=he}=e,{exhaustiveReverseGeocoding:lt=!1}=e,{excludeTypes:ut=!1}=e;const _e=void 0;let{reverseGeocodingExcludeTypes:De=_e}=e,{zoom:me=g}=e,{apiUrl:de="https://api.maptiler.com/geocoding"}=e,{fetchParameters:ie={}}=e,{iconsBaseUrl:bn="https://cdn.maptiler.com/maptiler-geocoding-control/v2.1.7/icons/"}=e,{adjustUrlQuery:ui=()=>{}}=e,{adjustUrl:ai=()=>{}}=e;function ds(E){Ie.focus(E)}function gs(){Ie.blur()}function vn(E,le=!0,ue=!1){t(1,T=E),le?(t(15,Q=-1),En()):(Ln(void 0,!ue,ue),setTimeout(()=>{Ie.focus(),Ie.select()}))}function ms(){t(13,q=void 0),t(14,G=void 0),t(15,Q=-1)}function ps(){t(64,fe=[]),t(14,G=void 0)}let q,fe,G,wn="",Ie,Q=-1,ze,jt=[],at,dt,gt,fi,Ye=!1;const ys=new Set,it=xi();Wn(()=>{h&&(h.setEventHandler(void 0),h.indicateReverse(!1),h.setSelectedMarker(-1),h.setFeatures(void 0,void 0,!1))});function En(E){if(t(17,Ye=!1),dt&&(clearTimeout(dt),dt=void 0),Q>-1&&q)t(14,G=q[Q]),t(1,T=G.place_type[0]==="reverse"?G.place_name:G.place_name.replace(/,.*/,"")),t(19,ze=void 0),t(64,fe=void 0),t(15,Q=-1);else if(T){const le=E||!ci(T);hi(T,{exact:!0}).then(()=>{t(64,fe=q),t(14,G=void 0),le&&bs()}).catch(ue=>t(19,ze=ue))}}function ci(E){try{return Nr(E,6)}catch{return!1}}async function hi(E,{byId:le=!1,exact:ue=!1}={}){var xe,Ue,nt;t(19,ze=void 0),at==null||at.abort();const Se=new AbortController;t(20,at=Se);try{const J=ci(E),Nt=new URL(de+"/"+encodeURIComponent(J?J.decimalLongitude+","+J.decimalLatitude:E)+".json"),Oe=Nt.searchParams;s!==void 0&&Oe.set("language",Array.isArray(s)?s.join(","):s??"");const[mi]=(h==null?void 0:h.getCenterAndZoom())??[];let Fe=(xe=!J||Ke===he?V:Ke)==null?void 0:xe.map(ye=>typeof ye=="string"?ye:mi===void 0||(ye[0]??0)<=mi&&mi<(ye[1]??1/0)?ye[2]:void 0).filter(ye=>ye!==void 0);Fe&&(Fe=[...new Set(Fe)],Oe.set("types",Fe.join(",")));const Sn=!J||De===_e?ut:De;if(Sn&&Oe.set("excludeTypes",String(Sn)),x&&Oe.set("bbox",x.map(ye=>ye.toFixed(6)).join(",")),O&&Oe.set("country",Array.isArray(O)?O.join(","):O),!le&&!J){const ye=await br(h,y,Se);ye&&Oe.set("proximity",ye),(ue||!Z)&&Oe.set("autocomplete","false"),Oe.set("fuzzyMatch",String(I))}const kt=m===c?l:m;kt!==void 0&&kt>1&&(Fe==null?void 0:Fe.length)!==1&&console.warn("For reverse geocoding when limit > 1 then types must contain single value."),J?(kt===1||kt!==void 0&&(lt||(Fe==null?void 0:Fe.length)===1))&&Oe.set("limit",String(kt)):l!==void 0&&Oe.set("limit",String(l)),L&&Oe.set("key",L),ui(Oe),ai(Nt);const Is=Nt.searchParams.get("types")===""&&Nt.searchParams.get("excludeTypes")!=="true",Zt=Nt.toString();if(Zt===wn){le?(M&&t(13,q=void 0),t(14,G=jt[0])):(t(13,q=jt),((Ue=q[Q])==null?void 0:Ue.id)!==(r==null?void 0:r.id)&&t(15,Q=-1));return}wn=Zt;let Ot;if(Is)Ot={type:"FeatureCollection",features:[]};else{const ye=await fetch(Zt,{signal:Se.signal,...ie});if(!ye.ok)throw new Error(await ye.text());Ot=await ye.json()}it("response",{url:Zt,featureCollection:Ot}),le?(M&&t(13,q=void 0),t(14,G=Ot.features[0]),jt=[G]):(t(13,q=Ot.features.filter(D)),J&&q.unshift({type:"Feature",properties:{},id:"reverse_"+J.decimalLongitude+"_"+J.decimalLatitude,text:J.decimalLatitude+", "+J.decimalLongitude,place_name:J.decimalLatitude+", "+J.decimalLongitude,place_type:["reverse"],center:[J.decimalLongitude,J.decimalLatitude],bbox:[J.decimalLongitude,J.decimalLatitude,J.decimalLongitude,J.decimalLatitude],geometry:{type:"Point",coordinates:[J.decimalLongitude,J.decimalLatitude]}}),jt=q,((nt=q[Q])==null?void 0:nt.id)!==(r==null?void 0:r.id)&&t(15,Q=-1),J&&Ie.focus())}catch(J){if(J&&typeof J=="object"&&"name"in J&&J.name==="AbortError")return;throw J}finally{Se===at&&t(20,at=void 0)}}function bs(){var Se;if(!(fe!=null&&fe.length)||!U)return;const E=[180,90,-180,-90],le=!fe.some(xe=>!xe.matching_text);let ue;for(const xe of fe){const Ue=Ct(xe);if(ue=ue===void 0?Ue:Ue===void 0?ue:Math.max(ue,Ue),le||!xe.matching_text)for(const nt of[0,1,2,3])E[nt]=Math[nt<2?"min":"max"](E[nt],((Se=xe.bbox)==null?void 0:Se[nt])??xe.center[nt%2])}h&&fe.length>0&&(G&&E[0]===E[2]&&E[1]===E[3]?h.flyTo(G.center,Ct(G)):h.fitBounds(wt(E),50,ue))}function di(){!G||!h||(!G.bbox||G.bbox[0]===G.bbox[2]&&G.bbox[1]===G.bbox[3]?h.flyTo(G.center,Ct(G)):h.fitBounds(wt(G.bbox),50,Ct(G)))}function Ct(E){var ue;if(!E.bbox||E.bbox[0]!==E.bbox[2]&&E.bbox[1]!==E.bbox[3])return;const le=E.id.replace(/\..*/,"");return(Array.isArray((ue=E.properties)==null?void 0:ue.categories)?E.properties.categories.reduce((Se,xe)=>{const Ue=me[le+"."+xe];return Se===void 0?Ue:Ue===void 0?Se:Math.max(Se,Ue)},void 0):void 0)??me[le]}function vs(E){t(0,v=A==="always"),t(13,q=void 0),t(14,G=void 0),t(15,Q=-1),vn(E[1].toFixed(6)+", "+yr(E[0],[-180,180],!0).toFixed(6),!1,!0)}function ws(E){if(!q)return;let le=E.key==="ArrowDown"?1:E.key==="ArrowUp"?-1:0;le&&(Ie.focus(),t(17,Ye=!0),E.preventDefault(),G&&Q===-1&&t(15,Q=q.findIndex(ue=>ue.id===(G==null?void 0:G.id))),Q===(G||X?0:-1)&&le===-1&&t(15,Q=q.length),t(15,Q+=le),Q>=q.length&&t(15,Q=-1),Q<0&&(G||X)&&t(15,Q=0))}function Ln(E,le=!0,ue=!1){if(t(19,ze=void 0),t(14,G=void 0),t(17,Ye=!0),Z||ue){if(dt&&clearTimeout(dt),T.length<d)return;const Se=T;dt=window.setTimeout(()=>{hi(Se).catch(xe=>t(19,ze=xe))},le?S:0)}else t(13,q=void 0),t(19,ze=void 0)}function gi(E){G&&(G==null?void 0:G.id)===(E==null?void 0:E.id)?di():(t(14,G=E),t(1,T=E.place_name))}function _n(E){t(15,Q=E)}function Es(){(!X||G)&&t(15,Q=-1),se&&di()}const Ls=()=>Ie.focus();function _s(E){Vt[E?"unshift":"push"](()=>{Ie=E,t(18,Ie)})}function Ss(){T=this.value,t(1,T),t(17,Ye),t(31,N),t(16,gt)}const xs=()=>t(17,Ye=!0),Ts=()=>t(17,Ye=!1),Ms=()=>t(17,Ye=!0),Cs=()=>t(14,G=void 0),Ns=()=>{t(1,T=""),t(14,G=void 0),Ie.focus()},ks=()=>t(0,v=!v),Os=()=>t(19,ze=void 0),Rs=E=>_n(E),Ps=E=>gi(E),As=()=>{};return i.$$set=E=>{"class"in E&&t(2,f=E.class),"apiKey"in E&&t(29,L=E.apiKey),"bbox"in E&&t(30,x=E.bbox),"clearButtonTitle"in E&&t(3,C=E.clearButtonTitle),"clearOnBlur"in E&&t(31,N=E.clearOnBlur),"clearListOnPick"in E&&t(32,M=E.clearListOnPick),"keepListOpen"in E&&t(4,k=E.keepListOpen),"collapsed"in E&&t(5,W=E.collapsed),"country"in E&&t(33,O=E.country),"debounceSearch"in E&&t(34,S=E.debounceSearch),"enableReverse"in E&&t(6,A=E.enableReverse),"errorMessage"in E&&t(7,z=E.errorMessage),"filter"in E&&t(35,D=E.filter),"flyTo"in E&&t(36,U=E.flyTo),"fuzzyMatch"in E&&t(37,I=E.fuzzyMatch),"language"in E&&t(38,s=E.language),"limit"in E&&t(39,l=E.limit),"reverseGeocodingLimit"in E&&t(40,m=E.reverseGeocodingLimit),"mapController"in E&&t(41,h=E.mapController),"minLength"in E&&t(42,d=E.minLength),"noResultsMessage"in E&&t(8,b=E.noResultsMessage),"placeholder"in E&&t(9,p=E.placeholder),"proximity"in E&&t(43,y=E.proximity),"reverseActive"in E&&t(0,v=E.reverseActive),"reverseButtonTitle"in E&&t(10,w=E.reverseButtonTitle),"searchValue"in E&&t(1,T=E.searchValue),"pickedResultStyle"in E&&t(44,R=E.pickedResultStyle),"showPlaceType"in E&&t(11,B=E.showPlaceType),"showResultsWhileTyping"in E&&t(45,Z=E.showResultsWhileTyping),"selectFirst"in E&&t(46,X=E.selectFirst),"flyToSelected"in E&&t(47,se=E.flyToSelected),"markerOnSelected"in E&&t(48,j=E.markerOnSelected),"types"in E&&t(49,V=E.types),"reverseGeocodingTypes"in E&&t(50,Ke=E.reverseGeocodingTypes),"exhaustiveReverseGeocoding"in E&&t(51,lt=E.exhaustiveReverseGeocoding),"excludeTypes"in E&&t(52,ut=E.excludeTypes),"reverseGeocodingExcludeTypes"in E&&t(53,De=E.reverseGeocodingExcludeTypes),"zoom"in E&&t(54,me=E.zoom),"apiUrl"in E&&t(55,de=E.apiUrl),"fetchParameters"in E&&t(56,ie=E.fetchParameters),"iconsBaseUrl"in E&&t(12,bn=E.iconsBaseUrl),"adjustUrlQuery"in E&&t(57,ui=E.adjustUrlQuery),"adjustUrl"in E&&t(58,ai=E.adjustUrl),"$$scope"in E&&t(69,o=E.$$scope)},i.$$.update=()=>{if(i.$$.dirty[0]&64&&t(0,v=A==="always"),i.$$.dirty[0]&16384|i.$$.dirty[1]&8192&&R!=="marker-only"&&G&&!G.address&&G.geometry.type==="Point"&&G.place_type[0]!=="reverse"&&hi(G.id,{byId:!0}).catch(E=>t(19,ze=E)),i.$$.dirty[0]&16384|i.$$.dirty[1]&1058|i.$$.dirty[2]&8&&(h&&G&&G.id!==fi&&U&&(di(),M&&t(13,q=void 0),t(64,fe=void 0),t(15,Q=-1)),t(65,fi=G==null?void 0:G.id)),i.$$.dirty[0]&196608|i.$$.dirty[1]&1&&setTimeout(()=>{t(16,gt=Ye),N&&!gt&&t(1,T="")}),i.$$.dirty[0]&8194|i.$$.dirty[1]&2048&&T.length<d&&(t(13,q=void 0),t(19,ze=void 0),t(64,fe=q)),i.$$.dirty[0]&57344|i.$$.dirty[1]&32768&&X&&q!=null&&q.length&&Q==-1&&!G&&t(15,Q=0),i.$$.dirty[0]&8192|i.$$.dirty[2]&4&&fe!==q&&t(64,fe=void 0),i.$$.dirty[0]&73729|i.$$.dirty[1]&1024|i.$$.dirty[2]&4&&h&&h.setEventHandler(E=>{switch(E.type){case"mapClick":v&&vs(E.coordinates);break;case"markerClick":{const le=q==null?void 0:q.find(ue=>ue.id===E.id);le&&gi(le)}break;case"markerMouseEnter":fe&&t(15,Q=gt?(q==null?void 0:q.findIndex(le=>le.id===E.id))??-1:-1);break;case"markerMouseLeave":fe&&t(15,Q=-1);break}}),i.$$.dirty[0]&40960&&t(66,r=q==null?void 0:q[Q]),i.$$.dirty[1]&66592|i.$$.dirty[2]&16&&h&&r&&U&&se&&h.flyTo(r.center,Ct(r)),i.$$.dirty[1]&8192&&t(68,n=R==="full-geometry-including-polygon-center-marker"),i.$$.dirty[1]&132096|i.$$.dirty[2]&64&&(j||h==null||h.setFeatures(void 0,void 0,n)),i.$$.dirty[0]&16384|i.$$.dirty[1]&132096|i.$$.dirty[2]&84&&h&&j&&!fe&&(h.setFeatures(r?[r]:void 0,G,n),h.setSelectedMarker(r?0:-1)),i.$$.dirty[0]&16384|i.$$.dirty[1]&1024|i.$$.dirty[2]&68&&h&&h.setFeatures(fe,G,n),i.$$.dirty[0]&32768|i.$$.dirty[1]&1024|i.$$.dirty[2]&4&&fe&&h&&h.setSelectedMarker(Q),i.$$.dirty[0]&2|i.$$.dirty[1]&1024&&h){const E=ci(T);h.setReverseMarker(E?[E.decimalLongitude,E.decimalLatitude]:void 0)}i.$$.dirty[2]&16&&it("select",{feature:r}),i.$$.dirty[0]&16384&&it("pick",{feature:G}),i.$$.dirty[0]&73744&&t(67,u=!!(q!=null&&q.length)&&(gt||k)),i.$$.dirty[2]&32&&it("optionsvisibilitychange",{optionsVisible:u}),i.$$.dirty[0]&8192&&it("featureslisted",{features:q}),i.$$.dirty[2]&4&&it("featuresmarked",{features:fe}),i.$$.dirty[0]&1&&it("reversetoggle",{reverse:v}),i.$$.dirty[0]&2&&it("querychange",{query:T}),i.$$.dirty[0]&1|i.$$.dirty[1]&1024&&h&&h.indicateReverse(v)},[v,T,f,C,k,W,A,z,b,p,w,B,bn,q,G,Q,gt,Ye,Ie,ze,at,ys,En,ws,Ln,gi,_n,Es,g,L,x,N,M,O,S,D,U,I,s,l,m,h,d,y,R,Z,X,se,j,V,Ke,lt,ut,De,me,de,ie,ui,ai,ds,gs,vn,ms,ps,fe,fi,r,u,n,o,a,Ls,_s,Ss,xs,Ts,Ms,Cs,Ns,ks,Os,Rs,Ps,As]}let Br=class extends et{constructor(e){super(),$e(this,e,Ir,Ar,Xe,{ZOOM_DEFAULTS:28,class:2,apiKey:29,bbox:30,clearButtonTitle:3,clearOnBlur:31,clearListOnPick:32,keepListOpen:4,collapsed:5,country:33,debounceSearch:34,enableReverse:6,errorMessage:7,filter:35,flyTo:36,fuzzyMatch:37,language:38,limit:39,reverseGeocodingLimit:40,mapController:41,minLength:42,noResultsMessage:8,placeholder:9,proximity:43,reverseActive:0,reverseButtonTitle:10,searchValue:1,pickedResultStyle:44,showPlaceType:11,showResultsWhileTyping:45,selectFirst:46,flyToSelected:47,markerOnSelected:48,types:49,reverseGeocodingTypes:50,exhaustiveReverseGeocoding:51,excludeTypes:52,reverseGeocodingExcludeTypes:53,zoom:54,apiUrl:55,fetchParameters:56,iconsBaseUrl:12,adjustUrlQuery:57,adjustUrl:58,focus:59,blur:60,setQuery:61,clearList:62,clearMap:63},null,[-1,-1,-1,-1])}get ZOOM_DEFAULTS(){return this.$$.ctx[28]}get focus(){return this.$$.ctx[59]}get blur(){return this.$$.ctx[60]}get setQuery(){return this.$$.ctx[61]}get clearList(){return this.$$.ctx[62]}get clearMap(){return this.$$.ctx[63]}};function _t(i,e,t={}){const n={type:"Feature"};return(t.id===0||t.id)&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.properties=e||{},n.geometry=i,n}function $t(i,e,t={}){for(const r of i){if(r.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(r[r.length-1].length!==r[0].length)throw new Error("First and last Position are not equivalent.");for(let u=0;u<r[r.length-1].length;u++)if(r[r.length-1][u]!==r[0][u])throw new Error("First and last Position are not equivalent.")}return _t({type:"Polygon",coordinates:i},e,t)}function St(i,e={}){const t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=i,t}function Zi(i,e,t={}){return _t({type:"MultiPolygon",coordinates:i},e,t)}function Hi(i,e,t){if(i!==null)for(var n,r,u,a,o,g,f,L=0,x=0,C,N=i.type,M=N==="FeatureCollection",k=N==="Feature",W=M?i.features.length:1,O=0;O<W;O++){f=M?i.features[O].geometry:k?i.geometry:i,C=f?f.type==="GeometryCollection":!1,o=C?f.geometries.length:1;for(var S=0;S<o;S++){var A=0,z=0;if(a=C?f.geometries[S]:f,a!==null){g=a.coordinates;var D=a.type;switch(L=0,D){case null:break;case"Point":if(e(g,x,O,A,z)===!1)return!1;x++,A++;break;case"LineString":case"MultiPoint":for(n=0;n<g.length;n++){if(e(g[n],x,O,A,z)===!1)return!1;x++,D==="MultiPoint"&&A++}D==="LineString"&&A++;break;case"Polygon":case"MultiLineString":for(n=0;n<g.length;n++){for(r=0;r<g[n].length-L;r++){if(e(g[n][r],x,O,A,z)===!1)return!1;x++}D==="MultiLineString"&&A++,D==="Polygon"&&z++}D==="Polygon"&&A++;break;case"MultiPolygon":for(n=0;n<g.length;n++){for(z=0,r=0;r<g[n].length;r++){for(u=0;u<g[n][r].length-L;u++){if(e(g[n][r][u],x,O,A,z)===!1)return!1;x++}z++}A++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(Hi(a.geometries[n],e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ei(i,e){var t,n,r,u,a,o,g,f,L,x,C=0,N=i.type==="FeatureCollection",M=i.type==="Feature",k=N?i.features.length:1;for(t=0;t<k;t++){for(o=N?i.features[t].geometry:M?i.geometry:i,f=N?i.features[t].properties:M?i.properties:{},L=N?i.features[t].bbox:M?i.bbox:void 0,x=N?i.features[t].id:M?i.id:void 0,g=o?o.type==="GeometryCollection":!1,a=g?o.geometries.length:1,r=0;r<a;r++){if(u=g?o.geometries[r]:o,u===null){if(e(null,C,f,L,x)===!1)return!1;continue}switch(u.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(u,C,f,L,x)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<u.geometries.length;n++)if(e(u.geometries[n],C,f,L,x)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}C++}}function Gr(i,e){ei(i,function(t,n,r,u,a){var o=t===null?null:t.type;switch(o){case null:case"Point":case"LineString":case"Polygon":return e(_t(t,r,{bbox:u,id:a}),n,0)===!1?!1:void 0}var g;switch(o){case"MultiPoint":g="Point";break;case"MultiLineString":g="LineString";break;case"MultiPolygon":g="Polygon";break}for(var f=0;f<t.coordinates.length;f++){var L=t.coordinates[f],x={type:g,coordinates:L};if(e(_t(x,r),n,f)===!1)return!1}})}function Wr(i,e={}){if(i.bbox!=null&&e.recompute!==!0)return i.bbox;const t=[1/0,1/0,-1/0,-1/0];return Hi(i,n=>{t[0]>n[0]&&(t[0]=n[0]),t[1]>n[1]&&(t[1]=n[1]),t[2]<n[0]&&(t[2]=n[0]),t[3]<n[1]&&(t[3]=n[1])}),t}var ti=Wr;function Dr(i){if(!i)throw new Error("geojson is required");switch(i.type){case"Feature":return Vi(i);case"FeatureCollection":return zr(i);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return ii(i);default:throw new Error("unknown GeoJSON type")}}function Vi(i){const e={type:"Feature"};return Object.keys(i).forEach(t=>{switch(t){case"type":case"properties":case"geometry":return;default:e[t]=i[t]}}),e.properties=Ki(i.properties),i.geometry==null?e.geometry=null:e.geometry=ii(i.geometry),e}function Ki(i){const e={};return i&&Object.keys(i).forEach(t=>{const n=i[t];typeof n=="object"?n===null?e[t]=null:Array.isArray(n)?e[t]=n.map(r=>r):e[t]=Ki(n):e[t]=n}),e}function zr(i){const e={type:"FeatureCollection"};return Object.keys(i).forEach(t=>{switch(t){case"type":case"features":return;default:e[t]=i[t]}}),e.features=i.features.map(t=>Vi(t)),e}function ii(i){const e={type:i.type};return i.bbox&&(e.bbox=i.bbox),i.type==="GeometryCollection"?(e.geometries=i.geometries.map(t=>ii(t)),e):(e.coordinates=Yi(i.coordinates),e)}function Yi(i){const e=i;return typeof e[0]!="object"?e.slice():e.map(t=>Yi(t))}var Ur=Dr,Fr=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,ni=Math.ceil,Ce=Math.floor,ve="[BigNumber Error] ",Xi=ve+"Number primitive has more than 15 significant digits: ",Ae=1e14,F=14,Qi=9007199254740991,ri=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],tt=1e7,Ee=1e9;function Ji(i){var e,t,n,r=S.prototype={constructor:S,toString:null,valueOf:null},u=new S(1),a=20,o=4,g=-7,f=21,L=-1e7,x=1e7,C=!1,N=1,M=0,k={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},W="0123456789abcdefghijklmnopqrstuvwxyz",O=!0;function S(s,l){var c,m,h,d,b,p,y,v,w=this;if(!(w instanceof S))return new S(s,l);if(l==null){if(s&&s._isBigNumber===!0){w.s=s.s,!s.c||s.e>x?w.c=w.e=null:s.e<L?w.c=[w.e=0]:(w.e=s.e,w.c=s.c.slice());return}if((p=typeof s=="number")&&s*0==0){if(w.s=1/s<0?(s=-s,-1):1,s===~~s){for(d=0,b=s;b>=10;b/=10,d++);d>x?w.c=w.e=null:(w.e=d,w.c=[s]);return}v=String(s)}else{if(!Fr.test(v=String(s)))return n(w,v,p);w.s=v.charCodeAt(0)==45?(v=v.slice(1),-1):1}(d=v.indexOf("."))>-1&&(v=v.replace(".","")),(b=v.search(/e/i))>0?(d<0&&(d=b),d+=+v.slice(b+1),v=v.substring(0,b)):d<0&&(d=v.length)}else{if(oe(l,2,W.length,"Base"),l==10&&O)return w=new S(s),U(w,a+w.e+1,o);if(v=String(s),p=typeof s=="number"){if(s*0!=0)return n(w,v,p,l);if(w.s=1/s<0?(v=v.slice(1),-1):1,S.DEBUG&&v.replace(/^0\.0*|\./,"").length>15)throw Error(Xi+s)}else w.s=v.charCodeAt(0)===45?(v=v.slice(1),-1):1;for(c=W.slice(0,l),d=b=0,y=v.length;b<y;b++)if(c.indexOf(m=v.charAt(b))<0){if(m=="."){if(b>d){d=y;continue}}else if(!h&&(v==v.toUpperCase()&&(v=v.toLowerCase())||v==v.toLowerCase()&&(v=v.toUpperCase()))){h=!0,b=-1,d=0;continue}return n(w,String(s),p,l)}p=!1,v=t(v,l,10,w.s),(d=v.indexOf("."))>-1?v=v.replace(".",""):d=v.length}for(b=0;v.charCodeAt(b)===48;b++);for(y=v.length;v.charCodeAt(--y)===48;);if(v=v.slice(b,++y)){if(y-=b,p&&S.DEBUG&&y>15&&(s>Qi||s!==Ce(s)))throw Error(Xi+w.s*s);if((d=d-b-1)>x)w.c=w.e=null;else if(d<L)w.c=[w.e=0];else{if(w.e=d,w.c=[],b=(d+1)%F,d<0&&(b+=F),b<y){for(b&&w.c.push(+v.slice(0,b)),y-=F;b<y;)w.c.push(+v.slice(b,b+=F));b=F-(v=v.slice(b)).length}else b-=y;for(;b--;v+="0");w.c.push(+v)}}else w.c=[w.e=0]}S.clone=Ji,S.ROUND_UP=0,S.ROUND_DOWN=1,S.ROUND_CEIL=2,S.ROUND_FLOOR=3,S.ROUND_HALF_UP=4,S.ROUND_HALF_DOWN=5,S.ROUND_HALF_EVEN=6,S.ROUND_HALF_CEIL=7,S.ROUND_HALF_FLOOR=8,S.EUCLID=9,S.config=S.set=function(s){var l,c;if(s!=null)if(typeof s=="object"){if(s.hasOwnProperty(l="DECIMAL_PLACES")&&(c=s[l],oe(c,0,Ee,l),a=c),s.hasOwnProperty(l="ROUNDING_MODE")&&(c=s[l],oe(c,0,8,l),o=c),s.hasOwnProperty(l="EXPONENTIAL_AT")&&(c=s[l],c&&c.pop?(oe(c[0],-1e9,0,l),oe(c[1],0,Ee,l),g=c[0],f=c[1]):(oe(c,-1e9,Ee,l),g=-(f=c<0?-c:c))),s.hasOwnProperty(l="RANGE"))if(c=s[l],c&&c.pop)oe(c[0],-1e9,-1,l),oe(c[1],1,Ee,l),L=c[0],x=c[1];else if(oe(c,-1e9,Ee,l),c)L=-(x=c<0?-c:c);else throw Error(ve+l+" cannot be zero: "+c);if(s.hasOwnProperty(l="CRYPTO"))if(c=s[l],c===!!c)if(c)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))C=c;else throw C=!c,Error(ve+"crypto unavailable");else C=c;else throw Error(ve+l+" not true or false: "+c);if(s.hasOwnProperty(l="MODULO_MODE")&&(c=s[l],oe(c,0,9,l),N=c),s.hasOwnProperty(l="POW_PRECISION")&&(c=s[l],oe(c,0,Ee,l),M=c),s.hasOwnProperty(l="FORMAT"))if(c=s[l],typeof c=="object")k=c;else throw Error(ve+l+" not an object: "+c);if(s.hasOwnProperty(l="ALPHABET"))if(c=s[l],typeof c=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(c))O=c.slice(0,10)=="0123456789",W=c;else throw Error(ve+l+" invalid: "+c)}else throw Error(ve+"Object expected: "+s);return{DECIMAL_PLACES:a,ROUNDING_MODE:o,EXPONENTIAL_AT:[g,f],RANGE:[L,x],CRYPTO:C,MODULO_MODE:N,POW_PRECISION:M,FORMAT:k,ALPHABET:W}},S.isBigNumber=function(s){if(!s||s._isBigNumber!==!0)return!1;if(!S.DEBUG)return!0;var l,c,m=s.c,h=s.e,d=s.s;e:if({}.toString.call(m)=="[object Array]"){if((d===1||d===-1)&&h>=-1e9&&h<=Ee&&h===Ce(h)){if(m[0]===0){if(h===0&&m.length===1)return!0;break e}if(l=(h+1)%F,l<1&&(l+=F),String(m[0]).length==l){for(l=0;l<m.length;l++)if(c=m[l],c<0||c>=Ae||c!==Ce(c))break e;if(c!==0)return!0}}}else if(m===null&&h===null&&(d===null||d===1||d===-1))return!0;throw Error(ve+"Invalid BigNumber: "+s)},S.maximum=S.max=function(){return z(arguments,-1)},S.minimum=S.min=function(){return z(arguments,1)},S.random=function(){var s=9007199254740992,l=Math.random()*s&2097151?function(){return Ce(Math.random()*s)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(c){var m,h,d,b,p,y=0,v=[],w=new S(u);if(c==null?c=a:oe(c,0,Ee),b=ni(c/F),C)if(crypto.getRandomValues){for(m=crypto.getRandomValues(new Uint32Array(b*=2));y<b;)p=m[y]*131072+(m[y+1]>>>11),p>=9e15?(h=crypto.getRandomValues(new Uint32Array(2)),m[y]=h[0],m[y+1]=h[1]):(v.push(p%1e14),y+=2);y=b/2}else if(crypto.randomBytes){for(m=crypto.randomBytes(b*=7);y<b;)p=(m[y]&31)*281474976710656+m[y+1]*1099511627776+m[y+2]*4294967296+m[y+3]*16777216+(m[y+4]<<16)+(m[y+5]<<8)+m[y+6],p>=9e15?crypto.randomBytes(7).copy(m,y):(v.push(p%1e14),y+=7);y=b/7}else throw C=!1,Error(ve+"crypto unavailable");if(!C)for(;y<b;)p=l(),p<9e15&&(v[y++]=p%1e14);for(b=v[--y],c%=F,b&&c&&(p=ri[F-c],v[y]=Ce(b/p)*p);v[y]===0;v.pop(),y--);if(y<0)v=[d=0];else{for(d=-1;v[0]===0;v.splice(0,1),d-=F);for(y=1,p=v[0];p>=10;p/=10,y++);y<F&&(d-=F-y)}return w.e=d,w.c=v,w}}(),S.sum=function(){for(var s=1,l=arguments,c=new S(l[0]);s<l.length;)c=c.plus(l[s++]);return c},t=function(){var s="0123456789";function l(c,m,h,d){for(var b,p=[0],y,v=0,w=c.length;v<w;){for(y=p.length;y--;p[y]*=m);for(p[0]+=d.indexOf(c.charAt(v++)),b=0;b<p.length;b++)p[b]>h-1&&(p[b+1]==null&&(p[b+1]=0),p[b+1]+=p[b]/h|0,p[b]%=h)}return p.reverse()}return function(c,m,h,d,b){var p,y,v,w,T,R,B,Z,X=c.indexOf("."),se=a,j=o;for(X>=0&&(w=M,M=0,c=c.replace(".",""),Z=new S(m),R=Z.pow(c.length-X),M=w,Z.c=l(He(ke(R.c),R.e,"0"),10,h,s),Z.e=Z.c.length),B=l(c,m,h,b?(p=W,s):(p=s,W)),v=w=B.length;B[--w]==0;B.pop());if(!B[0])return p.charAt(0);if(X<0?--v:(R.c=B,R.e=v,R.s=d,R=e(R,Z,se,j,h),B=R.c,T=R.r,v=R.e),y=v+se+1,X=B[y],w=h/2,T=T||y<0||B[y+1]!=null,T=j<4?(X!=null||T)&&(j==0||j==(R.s<0?3:2)):X>w||X==w&&(j==4||T||j==6&&B[y-1]&1||j==(R.s<0?8:7)),y<1||!B[0])c=T?He(p.charAt(1),-se,p.charAt(0)):p.charAt(0);else{if(B.length=y,T)for(--h;++B[--y]>h;)B[y]=0,y||(++v,B=[1].concat(B));for(w=B.length;!B[--w];);for(X=0,c="";X<=w;c+=p.charAt(B[X++]));c=He(c,v,p.charAt(0))}return c}}(),e=function(){function s(m,h,d){var b,p,y,v,w=0,T=m.length,R=h%tt,B=h/tt|0;for(m=m.slice();T--;)y=m[T]%tt,v=m[T]/tt|0,b=B*y+v*R,p=R*y+b%tt*tt+w,w=(p/d|0)+(b/tt|0)+B*v,m[T]=p%d;return w&&(m=[w].concat(m)),m}function l(m,h,d,b){var p,y;if(d!=b)y=d>b?1:-1;else for(p=y=0;p<d;p++)if(m[p]!=h[p]){y=m[p]>h[p]?1:-1;break}return y}function c(m,h,d,b){for(var p=0;d--;)m[d]-=p,p=m[d]<h[d]?1:0,m[d]=p*b+m[d]-h[d];for(;!m[0]&&m.length>1;m.splice(0,1));}return function(m,h,d,b,p){var y,v,w,T,R,B,Z,X,se,j,V,he,Ke,lt,ut,_e,De,me=m.s==h.s?1:-1,de=m.c,ie=h.c;if(!de||!de[0]||!ie||!ie[0])return new S(!m.s||!h.s||(de?ie&&de[0]==ie[0]:!ie)?NaN:de&&de[0]==0||!ie?me*0:me/0);for(X=new S(me),se=X.c=[],v=m.e-h.e,me=d+v+1,p||(p=Ae,v=Ne(m.e/F)-Ne(h.e/F),me=me/F|0),w=0;ie[w]==(de[w]||0);w++);if(ie[w]>(de[w]||0)&&v--,me<0)se.push(1),T=!0;else{for(lt=de.length,_e=ie.length,w=0,me+=2,R=Ce(p/(ie[0]+1)),R>1&&(ie=s(ie,R,p),de=s(de,R,p),_e=ie.length,lt=de.length),Ke=_e,j=de.slice(0,_e),V=j.length;V<_e;j[V++]=0);De=ie.slice(),De=[0].concat(De),ut=ie[0],ie[1]>=p/2&&ut++;do{if(R=0,y=l(ie,j,_e,V),y<0){if(he=j[0],_e!=V&&(he=he*p+(j[1]||0)),R=Ce(he/ut),R>1)for(R>=p&&(R=p-1),B=s(ie,R,p),Z=B.length,V=j.length;l(B,j,Z,V)==1;)R--,c(B,_e<Z?De:ie,Z,p),Z=B.length,y=1;else R==0&&(y=R=1),B=ie.slice(),Z=B.length;if(Z<V&&(B=[0].concat(B)),c(j,B,V,p),V=j.length,y==-1)for(;l(ie,j,_e,V)<1;)R++,c(j,_e<V?De:ie,V,p),V=j.length}else y===0&&(R++,j=[0]);se[w++]=R,j[0]?j[V++]=de[Ke]||0:(j=[de[Ke]],V=1)}while((Ke++<lt||j[0]!=null)&&me--);T=j[0]!=null,se[0]||se.splice(0,1)}if(p==Ae){for(w=1,me=se[0];me>=10;me/=10,w++);U(X,d+(X.e=w+v*F-1)+1,b,T)}else X.e=v,X.r=+T;return X}}();function A(s,l,c,m){var h,d,b,p,y;if(c==null?c=o:oe(c,0,8),!s.c)return s.toString();if(h=s.c[0],b=s.e,l==null)y=ke(s.c),y=m==1||m==2&&(b<=g||b>=f)?Wt(y,b):He(y,b,"0");else if(s=U(new S(s),l,c),d=s.e,y=ke(s.c),p=y.length,m==1||m==2&&(l<=d||d<=g)){for(;p<l;y+="0",p++);y=Wt(y,d)}else if(l-=b,y=He(y,d,"0"),d+1>p){if(--l>0)for(y+=".";l--;y+="0");}else if(l+=d-p,l>0)for(d+1==p&&(y+=".");l--;y+="0");return s.s<0&&h?"-"+y:y}function z(s,l){for(var c,m,h=1,d=new S(s[0]);h<s.length;h++)m=new S(s[h]),(!m.s||(c=st(d,m))===l||c===0&&d.s===l)&&(d=m);return d}function D(s,l,c){for(var m=1,h=l.length;!l[--h];l.pop());for(h=l[0];h>=10;h/=10,m++);return(c=m+c*F-1)>x?s.c=s.e=null:c<L?s.c=[s.e=0]:(s.e=c,s.c=l),s}n=function(){var s=/^(-?)0([xbo])(?=\w[\w.]*$)/i,l=/^([^.]+)\.$/,c=/^\.([^.]+)$/,m=/^-?(Infinity|NaN)$/,h=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(d,b,p,y){var v,w=p?b:b.replace(h,"");if(m.test(w))d.s=isNaN(w)?null:w<0?-1:1;else{if(!p&&(w=w.replace(s,function(T,R,B){return v=(B=B.toLowerCase())=="x"?16:B=="b"?2:8,!y||y==v?R:T}),y&&(v=y,w=w.replace(l,"$1").replace(c,"0.$1")),b!=w))return new S(w,v);if(S.DEBUG)throw Error(ve+"Not a"+(y?" base "+y:"")+" number: "+b);d.s=null}d.c=d.e=null}}();function U(s,l,c,m){var h,d,b,p,y,v,w,T=s.c,R=ri;if(T){e:{for(h=1,p=T[0];p>=10;p/=10,h++);if(d=l-h,d<0)d+=F,b=l,y=T[v=0],w=Ce(y/R[h-b-1]%10);else if(v=ni((d+1)/F),v>=T.length)if(m){for(;T.length<=v;T.push(0));y=w=0,h=1,d%=F,b=d-F+1}else break e;else{for(y=p=T[v],h=1;p>=10;p/=10,h++);d%=F,b=d-F+h,w=b<0?0:Ce(y/R[h-b-1]%10)}if(m=m||l<0||T[v+1]!=null||(b<0?y:y%R[h-b-1]),m=c<4?(w||m)&&(c==0||c==(s.s<0?3:2)):w>5||w==5&&(c==4||m||c==6&&(d>0?b>0?y/R[h-b]:0:T[v-1])%10&1||c==(s.s<0?8:7)),l<1||!T[0])return T.length=0,m?(l-=s.e+1,T[0]=R[(F-l%F)%F],s.e=-l||0):T[0]=s.e=0,s;if(d==0?(T.length=v,p=1,v--):(T.length=v+1,p=R[F-d],T[v]=b>0?Ce(y/R[h-b]%R[b])*p:0),m)for(;;)if(v==0){for(d=1,b=T[0];b>=10;b/=10,d++);for(b=T[0]+=p,p=1;b>=10;b/=10,p++);d!=p&&(s.e++,T[0]==Ae&&(T[0]=1));break}else{if(T[v]+=p,T[v]!=Ae)break;T[v--]=0,p=1}for(d=T.length;T[--d]===0;T.pop());}s.e>x?s.c=s.e=null:s.e<L&&(s.c=[s.e=0])}return s}function I(s){var l,c=s.e;return c===null?s.toString():(l=ke(s.c),l=c<=g||c>=f?Wt(l,c):He(l,c,"0"),s.s<0?"-"+l:l)}return r.absoluteValue=r.abs=function(){var s=new S(this);return s.s<0&&(s.s=1),s},r.comparedTo=function(s,l){return st(this,new S(s,l))},r.decimalPlaces=r.dp=function(s,l){var c,m,h,d=this;if(s!=null)return oe(s,0,Ee),l==null?l=o:oe(l,0,8),U(new S(d),s+d.e+1,l);if(!(c=d.c))return null;if(m=((h=c.length-1)-Ne(this.e/F))*F,h=c[h])for(;h%10==0;h/=10,m--);return m<0&&(m=0),m},r.dividedBy=r.div=function(s,l){return e(this,new S(s,l),a,o)},r.dividedToIntegerBy=r.idiv=function(s,l){return e(this,new S(s,l),0,1)},r.exponentiatedBy=r.pow=function(s,l){var c,m,h,d,b,p,y,v,w,T=this;if(s=new S(s),s.c&&!s.isInteger())throw Error(ve+"Exponent not an integer: "+I(s));if(l!=null&&(l=new S(l)),p=s.e>14,!T.c||!T.c[0]||T.c[0]==1&&!T.e&&T.c.length==1||!s.c||!s.c[0])return w=new S(Math.pow(+I(T),p?s.s*(2-Gt(s)):+I(s))),l?w.mod(l):w;if(y=s.s<0,l){if(l.c?!l.c[0]:!l.s)return new S(NaN);m=!y&&T.isInteger()&&l.isInteger(),m&&(T=T.mod(l))}else{if(s.e>9&&(T.e>0||T.e<-1||(T.e==0?T.c[0]>1||p&&T.c[1]>=24e7:T.c[0]<8e13||p&&T.c[0]<=9999975e7)))return d=T.s<0&&Gt(s)?-0:0,T.e>-1&&(d=1/d),new S(y?1/d:d);M&&(d=ni(M/F+2))}for(p?(c=new S(.5),y&&(s.s=1),v=Gt(s)):(h=Math.abs(+I(s)),v=h%2),w=new S(u);;){if(v){if(w=w.times(T),!w.c)break;d?w.c.length>d&&(w.c.length=d):m&&(w=w.mod(l))}if(h){if(h=Ce(h/2),h===0)break;v=h%2}else if(s=s.times(c),U(s,s.e+1,1),s.e>14)v=Gt(s);else{if(h=+I(s),h===0)break;v=h%2}T=T.times(T),d?T.c&&T.c.length>d&&(T.c.length=d):m&&(T=T.mod(l))}return m?w:(y&&(w=u.div(w)),l?w.mod(l):d?U(w,M,o,b):w)},r.integerValue=function(s){var l=new S(this);return s==null?s=o:oe(s,0,8),U(l,l.e+1,s)},r.isEqualTo=r.eq=function(s,l){return st(this,new S(s,l))===0},r.isFinite=function(){return!!this.c},r.isGreaterThan=r.gt=function(s,l){return st(this,new S(s,l))>0},r.isGreaterThanOrEqualTo=r.gte=function(s,l){return(l=st(this,new S(s,l)))===1||l===0},r.isInteger=function(){return!!this.c&&Ne(this.e/F)>this.c.length-2},r.isLessThan=r.lt=function(s,l){return st(this,new S(s,l))<0},r.isLessThanOrEqualTo=r.lte=function(s,l){return(l=st(this,new S(s,l)))===-1||l===0},r.isNaN=function(){return!this.s},r.isNegative=function(){return this.s<0},r.isPositive=function(){return this.s>0},r.isZero=function(){return!!this.c&&this.c[0]==0},r.minus=function(s,l){var c,m,h,d,b=this,p=b.s;if(s=new S(s,l),l=s.s,!p||!l)return new S(NaN);if(p!=l)return s.s=-l,b.plus(s);var y=b.e/F,v=s.e/F,w=b.c,T=s.c;if(!y||!v){if(!w||!T)return w?(s.s=-l,s):new S(T?b:NaN);if(!w[0]||!T[0])return T[0]?(s.s=-l,s):new S(w[0]?b:o==3?-0:0)}if(y=Ne(y),v=Ne(v),w=w.slice(),p=y-v){for((d=p<0)?(p=-p,h=w):(v=y,h=T),h.reverse(),l=p;l--;h.push(0));h.reverse()}else for(m=(d=(p=w.length)<(l=T.length))?p:l,p=l=0;l<m;l++)if(w[l]!=T[l]){d=w[l]<T[l];break}if(d&&(h=w,w=T,T=h,s.s=-s.s),l=(m=T.length)-(c=w.length),l>0)for(;l--;w[c++]=0);for(l=Ae-1;m>p;){if(w[--m]<T[m]){for(c=m;c&&!w[--c];w[c]=l);--w[c],w[m]+=Ae}w[m]-=T[m]}for(;w[0]==0;w.splice(0,1),--v);return w[0]?D(s,w,v):(s.s=o==3?-1:1,s.c=[s.e=0],s)},r.modulo=r.mod=function(s,l){var c,m,h=this;return s=new S(s,l),!h.c||!s.s||s.c&&!s.c[0]?new S(NaN):!s.c||h.c&&!h.c[0]?new S(h):(N==9?(m=s.s,s.s=1,c=e(h,s,0,3),s.s=m,c.s*=m):c=e(h,s,0,N),s=h.minus(c.times(s)),!s.c[0]&&N==1&&(s.s=h.s),s)},r.multipliedBy=r.times=function(s,l){var c,m,h,d,b,p,y,v,w,T,R,B,Z,X,se,j=this,V=j.c,he=(s=new S(s,l)).c;if(!V||!he||!V[0]||!he[0])return!j.s||!s.s||V&&!V[0]&&!he||he&&!he[0]&&!V?s.c=s.e=s.s=null:(s.s*=j.s,!V||!he?s.c=s.e=null:(s.c=[0],s.e=0)),s;for(m=Ne(j.e/F)+Ne(s.e/F),s.s*=j.s,y=V.length,T=he.length,y<T&&(Z=V,V=he,he=Z,h=y,y=T,T=h),h=y+T,Z=[];h--;Z.push(0));for(X=Ae,se=tt,h=T;--h>=0;){for(c=0,R=he[h]%se,B=he[h]/se|0,b=y,d=h+b;d>h;)v=V[--b]%se,w=V[b]/se|0,p=B*v+w*R,v=R*v+p%se*se+Z[d]+c,c=(v/X|0)+(p/se|0)+B*w,Z[d--]=v%X;Z[d]=c}return c?++m:Z.splice(0,1),D(s,Z,m)},r.negated=function(){var s=new S(this);return s.s=-s.s||null,s},r.plus=function(s,l){var c,m=this,h=m.s;if(s=new S(s,l),l=s.s,!h||!l)return new S(NaN);if(h!=l)return s.s=-l,m.minus(s);var d=m.e/F,b=s.e/F,p=m.c,y=s.c;if(!d||!b){if(!p||!y)return new S(h/0);if(!p[0]||!y[0])return y[0]?s:new S(p[0]?m:h*0)}if(d=Ne(d),b=Ne(b),p=p.slice(),h=d-b){for(h>0?(b=d,c=y):(h=-h,c=p),c.reverse();h--;c.push(0));c.reverse()}for(h=p.length,l=y.length,h-l<0&&(c=y,y=p,p=c,l=h),h=0;l;)h=(p[--l]=p[l]+y[l]+h)/Ae|0,p[l]=Ae===p[l]?0:p[l]%Ae;return h&&(p=[h].concat(p),++b),D(s,p,b)},r.precision=r.sd=function(s,l){var c,m,h,d=this;if(s!=null&&s!==!!s)return oe(s,1,Ee),l==null?l=o:oe(l,0,8),U(new S(d),s,l);if(!(c=d.c))return null;if(h=c.length-1,m=h*F+1,h=c[h]){for(;h%10==0;h/=10,m--);for(h=c[0];h>=10;h/=10,m++);}return s&&d.e+1>m&&(m=d.e+1),m},r.shiftedBy=function(s){return oe(s,-9007199254740991,Qi),this.times("1e"+s)},r.squareRoot=r.sqrt=function(){var s,l,c,m,h,d=this,b=d.c,p=d.s,y=d.e,v=a+4,w=new S("0.5");if(p!==1||!b||!b[0])return new S(!p||p<0&&(!b||b[0])?NaN:b?d:1/0);if(p=Math.sqrt(+I(d)),p==0||p==1/0?(l=ke(b),(l.length+y)%2==0&&(l+="0"),p=Math.sqrt(+l),y=Ne((y+1)/2)-(y<0||y%2),p==1/0?l="5e"+y:(l=p.toExponential(),l=l.slice(0,l.indexOf("e")+1)+y),c=new S(l)):c=new S(p+""),c.c[0]){for(y=c.e,p=y+v,p<3&&(p=0);;)if(h=c,c=w.times(h.plus(e(d,h,v,1))),ke(h.c).slice(0,p)===(l=ke(c.c)).slice(0,p))if(c.e<y&&--p,l=l.slice(p-3,p+1),l=="9999"||!m&&l=="4999"){if(!m&&(U(h,h.e+a+2,0),h.times(h).eq(d))){c=h;break}v+=4,p+=4,m=1}else{(!+l||!+l.slice(1)&&l.charAt(0)=="5")&&(U(c,c.e+a+2,1),s=!c.times(c).eq(d));break}}return U(c,c.e+a+1,o,s)},r.toExponential=function(s,l){return s!=null&&(oe(s,0,Ee),s++),A(this,s,l,1)},r.toFixed=function(s,l){return s!=null&&(oe(s,0,Ee),s=s+this.e+1),A(this,s,l)},r.toFormat=function(s,l,c){var m,h=this;if(c==null)s!=null&&l&&typeof l=="object"?(c=l,l=null):s&&typeof s=="object"?(c=s,s=l=null):c=k;else if(typeof c!="object")throw Error(ve+"Argument not an object: "+c);if(m=h.toFixed(s,l),h.c){var d,b=m.split("."),p=+c.groupSize,y=+c.secondaryGroupSize,v=c.groupSeparator||"",w=b[0],T=b[1],R=h.s<0,B=R?w.slice(1):w,Z=B.length;if(y&&(d=p,p=y,y=d,Z-=d),p>0&&Z>0){for(d=Z%p||p,w=B.substr(0,d);d<Z;d+=p)w+=v+B.substr(d,p);y>0&&(w+=v+B.slice(d)),R&&(w="-"+w)}m=T?w+(c.decimalSeparator||"")+((y=+c.fractionGroupSize)?T.replace(new RegExp("\\d{"+y+"}\\B","g"),"$&"+(c.fractionGroupSeparator||"")):T):w}return(c.prefix||"")+m+(c.suffix||"")},r.toFraction=function(s){var l,c,m,h,d,b,p,y,v,w,T,R,B=this,Z=B.c;if(s!=null&&(p=new S(s),!p.isInteger()&&(p.c||p.s!==1)||p.lt(u)))throw Error(ve+"Argument "+(p.isInteger()?"out of range: ":"not an integer: ")+I(p));if(!Z)return new S(B);for(l=new S(u),v=c=new S(u),m=y=new S(u),R=ke(Z),d=l.e=R.length-B.e-1,l.c[0]=ri[(b=d%F)<0?F+b:b],s=!s||p.comparedTo(l)>0?d>0?l:v:p,b=x,x=1/0,p=new S(R),y.c[0]=0;w=e(p,l,0,1),h=c.plus(w.times(m)),h.comparedTo(s)!=1;)c=m,m=h,v=y.plus(w.times(h=v)),y=h,l=p.minus(w.times(h=l)),p=h;return h=e(s.minus(c),m,0,1),y=y.plus(h.times(v)),c=c.plus(h.times(m)),y.s=v.s=B.s,d=d*2,T=e(v,m,d,o).minus(B).abs().comparedTo(e(y,c,d,o).minus(B).abs())<1?[v,m]:[y,c],x=b,T},r.toNumber=function(){return+I(this)},r.toPrecision=function(s,l){return s!=null&&oe(s,1,Ee),A(this,s,l,2)},r.toString=function(s){var l,c=this,m=c.s,h=c.e;return h===null?m?(l="Infinity",m<0&&(l="-"+l)):l="NaN":(s==null?l=h<=g||h>=f?Wt(ke(c.c),h):He(ke(c.c),h,"0"):s===10&&O?(c=U(new S(c),a+h+1,o),l=He(ke(c.c),c.e,"0")):(oe(s,2,W.length,"Base"),l=t(He(ke(c.c),h,"0"),10,s,m,!0)),m<0&&c.c[0]&&(l="-"+l)),l},r.valueOf=r.toJSON=function(){return I(this)},r._isBigNumber=!0,r[Symbol.toStringTag]="BigNumber",r[Symbol.for("nodejs.util.inspect.custom")]=r.valueOf,i!=null&&S.set(i),S}function Ne(i){var e=i|0;return i>0||i===e?e:e-1}function ke(i){for(var e,t,n=1,r=i.length,u=i[0]+"";n<r;){for(e=i[n++]+"",t=F-e.length;t--;e="0"+e);u+=e}for(r=u.length;u.charCodeAt(--r)===48;);return u.slice(0,r+1||1)}function st(i,e){var t,n,r=i.c,u=e.c,a=i.s,o=e.s,g=i.e,f=e.e;if(!a||!o)return null;if(t=r&&!r[0],n=u&&!u[0],t||n)return t?n?0:-o:a;if(a!=o)return a;if(t=a<0,n=g==f,!r||!u)return n?0:!r^t?1:-1;if(!n)return g>f^t?1:-1;for(o=(g=r.length)<(f=u.length)?g:f,a=0;a<o;a++)if(r[a]!=u[a])return r[a]>u[a]^t?1:-1;return g==f?0:g>f^t?1:-1}function oe(i,e,t,n){if(i<e||i>t||i!==Ce(i))throw Error(ve+(n||"Argument")+(typeof i=="number"?i<e||i>t?" out of range: ":" not an integer: ":" not a primitive number: ")+String(i))}function Gt(i){var e=i.c.length-1;return Ne(i.e/F)==e&&i.c[e]%2!=0}function Wt(i,e){return(i.length>1?i.charAt(0)+"."+i.slice(1):i)+(e<0?"e":"e+")+e}function He(i,e,t){var n,r;if(e<0){for(r=t+".";++e;r+=t);i=r+i}else if(n=i.length,++e>n){for(r=t,e-=n;--e;r+=t);i+=r}else e<n&&(i=i.slice(0,e)+"."+i.slice(e));return i}var Ge=Ji(),qr=class{constructor(i){P(this,"key");P(this,"left",null);P(this,"right",null);this.key=i}},xt=class extends qr{constructor(i){super(i)}},jr=class{constructor(){P(this,"size",0);P(this,"modificationCount",0);P(this,"splayCount",0)}splay(i){const e=this.root;if(e==null)return this.compare(i,i),-1;let t=null,n=null,r=null,u=null,a=e;const o=this.compare;let g;for(;;)if(g=o(a.key,i),g>0){let f=a.left;if(f==null||(g=o(f.key,i),g>0&&(a.left=f.right,f.right=a,a=f,f=a.left,f==null)))break;t==null?n=a:t.left=a,t=a,a=f}else if(g<0){let f=a.right;if(f==null||(g=o(f.key,i),g<0&&(a.right=f.left,f.left=a,a=f,f=a.right,f==null)))break;r==null?u=a:r.right=a,r=a,a=f}else break;return r!=null&&(r.right=a.left,a.left=u),t!=null&&(t.left=a.right,a.right=n),this.root!==a&&(this.root=a,this.splayCount++),g}splayMin(i){let e=i,t=e.left;for(;t!=null;){const n=t;e.left=n.right,n.right=e,e=n,t=e.left}return e}splayMax(i){let e=i,t=e.right;for(;t!=null;){const n=t;e.right=n.left,n.left=e,e=n,t=e.right}return e}_delete(i){if(this.root==null||this.splay(i)!=0)return null;let t=this.root;const n=t,r=t.left;if(this.size--,r==null)this.root=t.right;else{const u=t.right;t=this.splayMax(r),t.right=u,this.root=t}return this.modificationCount++,n}addNewRoot(i,e){this.size++,this.modificationCount++;const t=this.root;if(t==null){this.root=i;return}e<0?(i.left=t,i.right=t.right,t.right=null):(i.right=t,i.left=t.left,t.left=null),this.root=i}_first(){const i=this.root;return i==null?null:(this.root=this.splayMin(i),this.root)}_last(){const i=this.root;return i==null?null:(this.root=this.splayMax(i),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(i){return this.validKey(i)&&this.splay(i)==0}defaultCompare(){return(i,e)=>i<e?-1:i>e?1:0}wrap(){return{getRoot:()=>this.root,setRoot:i=>{this.root=i},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:i=>{this.splayCount=i},splay:i=>this.splay(i),has:i=>this.has(i)}}},Dt=class Rt extends jr{constructor(t,n){super();P(this,"root",null);P(this,"compare");P(this,"validKey");P(this,pn,"[object Set]");this.compare=t??this.defaultCompare(),this.validKey=n??(r=>r!=null&&r!=null)}delete(t){return this.validKey(t)?this._delete(t)!=null:!1}deleteAll(t){for(const n of t)this.delete(n)}forEach(t){const n=this[Symbol.iterator]();let r;for(;r=n.next(),!r.done;)t(r.value,r.value,this)}add(t){const n=this.splay(t);return n!=0&&this.addNewRoot(new xt(t),n),this}addAndReturn(t){const n=this.splay(t);return n!=0&&this.addNewRoot(new xt(t),n),this.root.key}addAll(t){for(const n of t)this.add(n)}isEmpty(){return this.root==null}isNotEmpty(){return this.root!=null}single(){if(this.size==0)throw"Bad state: No element";if(this.size>1)throw"Bad state: Too many element";return this.root.key}first(){if(this.size==0)throw"Bad state: No element";return this._first().key}last(){if(this.size==0)throw"Bad state: No element";return this._last().key}lastBefore(t){if(t==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(t)<0)return this.root.key;let r=this.root.left;if(r==null)return null;let u=r.right;for(;u!=null;)r=u,u=r.right;return r.key}firstAfter(t){if(t==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(t)>0)return this.root.key;let r=this.root.right;if(r==null)return null;let u=r.left;for(;u!=null;)r=u,u=r.left;return r.key}retainAll(t){const n=new Rt(this.compare,this.validKey),r=this.modificationCount;for(const u of t){if(r!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(u)&&this.splay(u)==0&&n.add(this.root.key)}n.size!=this.size&&(this.root=n.root,this.size=n.size,this.modificationCount++)}lookup(t){return!this.validKey(t)||this.splay(t)!=0?null:this.root.key}intersection(t){const n=new Rt(this.compare,this.validKey);for(const r of this)t.has(r)&&n.add(r);return n}difference(t){const n=new Rt(this.compare,this.validKey);for(const r of this)t.has(r)||n.add(r);return n}union(t){const n=this.clone();return n.addAll(t),n}clone(){const t=new Rt(this.compare,this.validKey);return t.size=this.size,t.root=this.copyNode(this.root),t}copyNode(t){if(t==null)return null;function n(u,a){let o,g;do{if(o=u.left,g=u.right,o!=null){const f=new xt(o.key);a.left=f,n(o,f)}if(g!=null){const f=new xt(g.key);a.right=f,u=g,a=f}}while(g!=null)}const r=new xt(t.key);return n(t,r),r}toSet(){return this.clone()}entries(){return new Hr(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[(yn=Symbol.iterator,pn=Symbol.toStringTag,yn)](){return new Zr(this.wrap())}},$i=class{constructor(i){P(this,"tree");P(this,"path",new Array);P(this,"modificationCount",null);P(this,"splayCount");this.tree=i,this.splayCount=i.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;const i=this.path[this.path.length-1];return this.getValue(i)}rebuildPath(i){this.path.splice(0,this.path.length),this.tree.splay(i),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(i){for(;i!=null;)this.path.push(i),i=i.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(this.modificationCount==null){this.modificationCount=this.tree.getModificationCount();let t=this.tree.getRoot();for(;t!=null;)this.path.push(t),t=t.left;return this.path.length>0}throw"Concurrent modification during iteration."}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let i=this.path[this.path.length-1],e=i.right;if(e!=null){for(;e!=null;)this.path.push(e),e=e.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===i;)i=this.path.pop();return this.path.length>0}},Zr=class extends $i{getValue(i){return i.key}},Hr=class extends $i{getValue(i){return[i.key,i.key]}},en=i=>()=>i,si=i=>{const e=i?(t,n)=>n.minus(t).abs().isLessThanOrEqualTo(i):en(!1);return(t,n)=>e(t,n)?0:t.comparedTo(n)};function Vr(i){const e=i?(t,n,r,u,a)=>t.exponentiatedBy(2).isLessThanOrEqualTo(u.minus(n).exponentiatedBy(2).plus(a.minus(r).exponentiatedBy(2)).times(i)):en(!1);return(t,n,r)=>{const u=t.x,a=t.y,o=r.x,g=r.y,f=a.minus(g).times(n.x.minus(o)).minus(u.minus(o).times(n.y.minus(g)));return e(f,u,a,o,g)?0:f.comparedTo(0)}}var Kr=i=>i,Yr=i=>{if(i){const e=new Dt(si(i)),t=new Dt(si(i)),n=(u,a)=>a.addAndReturn(u),r=u=>({x:n(u.x,e),y:n(u.y,t)});return r({x:new Ge(0),y:new Ge(0)}),r}return Kr},oi=i=>({set:e=>{Ve=oi(e)},reset:()=>oi(i),compare:si(i),snap:Yr(i),orient:Vr(i)}),Ve=oi(),Tt=(i,e)=>i.ll.x.isLessThanOrEqualTo(e.x)&&e.x.isLessThanOrEqualTo(i.ur.x)&&i.ll.y.isLessThanOrEqualTo(e.y)&&e.y.isLessThanOrEqualTo(i.ur.y),li=(i,e)=>{if(e.ur.x.isLessThan(i.ll.x)||i.ur.x.isLessThan(e.ll.x)||e.ur.y.isLessThan(i.ll.y)||i.ur.y.isLessThan(e.ll.y))return null;const t=i.ll.x.isLessThan(e.ll.x)?e.ll.x:i.ll.x,n=i.ur.x.isLessThan(e.ur.x)?i.ur.x:e.ur.x,r=i.ll.y.isLessThan(e.ll.y)?e.ll.y:i.ll.y,u=i.ur.y.isLessThan(e.ur.y)?i.ur.y:e.ur.y;return{ll:{x:t,y:r},ur:{x:n,y:u}}},zt=(i,e)=>i.x.times(e.y).minus(i.y.times(e.x)),tn=(i,e)=>i.x.times(e.x).plus(i.y.times(e.y)),Ut=i=>tn(i,i).sqrt(),Xr=(i,e,t)=>{const n={x:e.x.minus(i.x),y:e.y.minus(i.y)},r={x:t.x.minus(i.x),y:t.y.minus(i.y)};return zt(r,n).div(Ut(r)).div(Ut(n))},Qr=(i,e,t)=>{const n={x:e.x.minus(i.x),y:e.y.minus(i.y)},r={x:t.x.minus(i.x),y:t.y.minus(i.y)};return tn(r,n).div(Ut(r)).div(Ut(n))},nn=(i,e,t)=>e.y.isZero()?null:{x:i.x.plus(e.x.div(e.y).times(t.minus(i.y))),y:t},rn=(i,e,t)=>e.x.isZero()?null:{x:t,y:i.y.plus(e.y.div(e.x).times(t.minus(i.x)))},Jr=(i,e,t,n)=>{if(e.x.isZero())return rn(t,n,i.x);if(n.x.isZero())return rn(i,e,t.x);if(e.y.isZero())return nn(t,n,i.y);if(n.y.isZero())return nn(i,e,t.y);const r=zt(e,n);if(r.isZero())return null;const u={x:t.x.minus(i.x),y:t.y.minus(i.y)},a=zt(u,e).div(r),o=zt(u,n).div(r),g=i.x.plus(o.times(e.x)),f=t.x.plus(a.times(n.x)),L=i.y.plus(o.times(e.y)),x=t.y.plus(a.times(n.y)),C=g.plus(f).div(2),N=L.plus(x).div(2);return{x:C,y:N}},We=class Mn{constructor(e,t){P(this,"point");P(this,"isLeft");P(this,"segment");P(this,"otherSE");P(this,"consumedBy");e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=t}static compare(e,t){const n=Mn.comparePoints(e.point,t.point);return n!==0?n:(e.point!==t.point&&e.link(t),e.isLeft!==t.isLeft?e.isLeft?1:-1:qt.compare(e.segment,t.segment))}static comparePoints(e,t){return e.x.isLessThan(t.x)?-1:e.x.isGreaterThan(t.x)?1:e.y.isLessThan(t.y)?-1:e.y.isGreaterThan(t.y)?1:0}link(e){if(e.point===this.point)throw new Error("Tried to link already linked events");const t=e.point.events;for(let n=0,r=t.length;n<r;n++){const u=t[n];this.point.events.push(u),u.point=this.point}this.checkForConsuming()}checkForConsuming(){const e=this.point.events.length;for(let t=0;t<e;t++){const n=this.point.events[t];if(n.segment.consumedBy===void 0)for(let r=t+1;r<e;r++){const u=this.point.events[r];u.consumedBy===void 0&&n.otherSE.point.events===u.otherSE.point.events&&n.segment.consume(u.segment)}}}getAvailableLinkedEvents(){const e=[];for(let t=0,n=this.point.events.length;t<n;t++){const r=this.point.events[t];r!==this&&!r.segment.ringOut&&r.segment.isInResult()&&e.push(r)}return e}getLeftmostComparator(e){const t=new Map,n=r=>{const u=r.otherSE;t.set(r,{sine:Xr(this.point,e.point,u.point),cosine:Qr(this.point,e.point,u.point)})};return(r,u)=>{t.has(r)||n(r),t.has(u)||n(u);const{sine:a,cosine:o}=t.get(r),{sine:g,cosine:f}=t.get(u);return a.isGreaterThanOrEqualTo(0)&&g.isGreaterThanOrEqualTo(0)?o.isLessThan(f)?1:o.isGreaterThan(f)?-1:0:a.isLessThan(0)&&g.isLessThan(0)?o.isLessThan(f)?-1:o.isGreaterThan(f)?1:0:g.isLessThan(a)?-1:g.isGreaterThan(a)?1:0}}},$r=class bi{constructor(e){P(this,"events");P(this,"poly");P(this,"_isExteriorRing");P(this,"_enclosingRing");this.events=e;for(let t=0,n=e.length;t<n;t++)e[t].segment.ringOut=this;this.poly=null}static factory(e){const t=[];for(let n=0,r=e.length;n<r;n++){const u=e[n];if(!u.isInResult()||u.ringOut)continue;let a=null,o=u.leftSE,g=u.rightSE;const f=[o],L=o.point,x=[];for(;a=o,o=g,f.push(o),o.point!==L;)for(;;){const C=o.getAvailableLinkedEvents();if(C.length===0){const k=f[0].point,W=f[f.length-1].point;throw new Error(`Unable to complete output ring starting at [${k.x}, ${k.y}]. Last matching segment found ends at [${W.x}, ${W.y}].`)}if(C.length===1){g=C[0].otherSE;break}let N=null;for(let k=0,W=x.length;k<W;k++)if(x[k].point===o.point){N=k;break}if(N!==null){const k=x.splice(N)[0],W=f.splice(k.index);W.unshift(W[0].otherSE),t.push(new bi(W.reverse()));continue}x.push({index:f.length,point:o.point});const M=o.getLeftmostComparator(a);g=C.sort(M)[0].otherSE;break}t.push(new bi(f))}return t}getGeom(){let e=this.events[0].point;const t=[e];for(let f=1,L=this.events.length-1;f<L;f++){const x=this.events[f].point,C=this.events[f+1].point;Ve.orient(x,e,C)!==0&&(t.push(x),e=x)}if(t.length===1)return null;const n=t[0],r=t[1];Ve.orient(n,e,r)===0&&t.shift(),t.push(t[0]);const u=this.isExteriorRing()?1:-1,a=this.isExteriorRing()?0:t.length-1,o=this.isExteriorRing()?t.length:-1,g=[];for(let f=a;f!=o;f+=u)g.push([t[f].x.toNumber(),t[f].y.toNumber()]);return g}isExteriorRing(){if(this._isExteriorRing===void 0){const e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){var r,u;let e=this.events[0];for(let a=1,o=this.events.length;a<o;a++){const g=this.events[a];We.compare(e,g)>0&&(e=g)}let t=e.segment.prevInResult(),n=t?t.prevInResult():null;for(;;){if(!t)return null;if(!n)return t.ringOut;if(n.ringOut!==t.ringOut)return((r=n.ringOut)==null?void 0:r.enclosingRing())!==t.ringOut?t.ringOut:(u=t.ringOut)==null?void 0:u.enclosingRing();t=n.prevInResult(),n=t?t.prevInResult():null}}},sn=class{constructor(i){P(this,"exteriorRing");P(this,"interiorRings");this.exteriorRing=i,i.poly=this,this.interiorRings=[]}addInterior(i){this.interiorRings.push(i),i.poly=this}getGeom(){const i=this.exteriorRing.getGeom();if(i===null)return null;const e=[i];for(let t=0,n=this.interiorRings.length;t<n;t++){const r=this.interiorRings[t].getGeom();r!==null&&e.push(r)}return e}},es=class{constructor(i){P(this,"rings");P(this,"polys");this.rings=i,this.polys=this._composePolys(i)}getGeom(){const i=[];for(let e=0,t=this.polys.length;e<t;e++){const n=this.polys[e].getGeom();n!==null&&i.push(n)}return i}_composePolys(i){var t;const e=[];for(let n=0,r=i.length;n<r;n++){const u=i[n];if(!u.poly)if(u.isExteriorRing())e.push(new sn(u));else{const a=u.enclosingRing();a!=null&&a.poly||e.push(new sn(a)),(t=a==null?void 0:a.poly)==null||t.addInterior(u)}}return e}},ts=class{constructor(i,e=qt.compare){P(this,"queue");P(this,"tree");P(this,"segments");this.queue=i,this.tree=new Dt(e),this.segments=[]}process(i){const e=i.segment,t=[];if(i.consumedBy)return i.isLeft?this.queue.delete(i.otherSE):this.tree.delete(e),t;i.isLeft&&this.tree.add(e);let n=e,r=e;do n=this.tree.lastBefore(n);while(n!=null&&n.consumedBy!=null);do r=this.tree.firstAfter(r);while(r!=null&&r.consumedBy!=null);if(i.isLeft){let u=null;if(n){const o=n.getIntersection(e);if(o!==null&&(e.isAnEndpoint(o)||(u=o),!n.isAnEndpoint(o))){const g=this._splitSafely(n,o);for(let f=0,L=g.length;f<L;f++)t.push(g[f])}}let a=null;if(r){const o=r.getIntersection(e);if(o!==null&&(e.isAnEndpoint(o)||(a=o),!r.isAnEndpoint(o))){const g=this._splitSafely(r,o);for(let f=0,L=g.length;f<L;f++)t.push(g[f])}}if(u!==null||a!==null){let o=null;u===null?o=a:a===null?o=u:o=We.comparePoints(u,a)<=0?u:a,this.queue.delete(e.rightSE),t.push(e.rightSE);const g=e.split(o);for(let f=0,L=g.length;f<L;f++)t.push(g[f])}t.length>0?(this.tree.delete(e),t.push(i)):(this.segments.push(e),e.prev=n)}else{if(n&&r){const u=n.getIntersection(r);if(u!==null){if(!n.isAnEndpoint(u)){const a=this._splitSafely(n,u);for(let o=0,g=a.length;o<g;o++)t.push(a[o])}if(!r.isAnEndpoint(u)){const a=this._splitSafely(r,u);for(let o=0,g=a.length;o<g;o++)t.push(a[o])}}}this.tree.delete(e)}return t}_splitSafely(i,e){this.tree.delete(i);const t=i.rightSE;this.queue.delete(t);const n=i.split(e);return n.push(t),i.consumedBy===void 0&&this.tree.add(i),n}},is=class{constructor(){P(this,"type");P(this,"numMultiPolys")}run(i,e,t){Mt.type=i;const n=[new ln(e,!0)];for(let f=0,L=t.length;f<L;f++)n.push(new ln(t[f],!1));if(Mt.numMultiPolys=n.length,Mt.type==="difference"){const f=n[0];let L=1;for(;L<n.length;)li(n[L].bbox,f.bbox)!==null?L++:n.splice(L,1)}if(Mt.type==="intersection")for(let f=0,L=n.length;f<L;f++){const x=n[f];for(let C=f+1,N=n.length;C<N;C++)if(li(x.bbox,n[C].bbox)===null)return[]}const r=new Dt(We.compare);for(let f=0,L=n.length;f<L;f++){const x=n[f].getSweepEvents();for(let C=0,N=x.length;C<N;C++)r.add(x[C])}const u=new ts(r);let a=null;for(r.size!=0&&(a=r.first(),r.delete(a));a;){const f=u.process(a);for(let L=0,x=f.length;L<x;L++){const C=f[L];C.consumedBy===void 0&&r.add(C)}r.size!=0?(a=r.first(),r.delete(a)):a=null}Ve.reset();const o=$r.factory(u.segments);return new es(o).getGeom()}},Mt=new is,Ft=Mt,ns=0,qt=class Ht{constructor(e,t,n,r){P(this,"id");P(this,"leftSE");P(this,"rightSE");P(this,"rings");P(this,"windings");P(this,"ringOut");P(this,"consumedBy");P(this,"prev");P(this,"_prevInResult");P(this,"_beforeState");P(this,"_afterState");P(this,"_isInResult");this.id=++ns,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=n,this.windings=r}static compare(e,t){const n=e.leftSE.point.x,r=t.leftSE.point.x,u=e.rightSE.point.x,a=t.rightSE.point.x;if(a.isLessThan(n))return 1;if(u.isLessThan(r))return-1;const o=e.leftSE.point.y,g=t.leftSE.point.y,f=e.rightSE.point.y,L=t.rightSE.point.y;if(n.isLessThan(r)){if(g.isLessThan(o)&&g.isLessThan(f))return 1;if(g.isGreaterThan(o)&&g.isGreaterThan(f))return-1;const x=e.comparePoint(t.leftSE.point);if(x<0)return 1;if(x>0)return-1;const C=t.comparePoint(e.rightSE.point);return C!==0?C:-1}if(n.isGreaterThan(r)){if(o.isLessThan(g)&&o.isLessThan(L))return-1;if(o.isGreaterThan(g)&&o.isGreaterThan(L))return 1;const x=t.comparePoint(e.leftSE.point);if(x!==0)return x;const C=e.comparePoint(t.rightSE.point);return C<0?1:C>0?-1:1}if(o.isLessThan(g))return-1;if(o.isGreaterThan(g))return 1;if(u.isLessThan(a)){const x=t.comparePoint(e.rightSE.point);if(x!==0)return x}if(u.isGreaterThan(a)){const x=e.comparePoint(t.rightSE.point);if(x<0)return 1;if(x>0)return-1}if(!u.eq(a)){const x=f.minus(o),C=u.minus(n),N=L.minus(g),M=a.minus(r);if(x.isGreaterThan(C)&&N.isLessThan(M))return 1;if(x.isLessThan(C)&&N.isGreaterThan(M))return-1}return u.isGreaterThan(a)?1:u.isLessThan(a)||f.isLessThan(L)?-1:f.isGreaterThan(L)?1:e.id<t.id?-1:e.id>t.id?1:0}static fromRing(e,t,n){let r,u,a;const o=We.comparePoints(e,t);if(o<0)r=e,u=t,a=1;else if(o>0)r=t,u=e,a=-1;else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);const g=new We(r,!0),f=new We(u,!1);return new Ht(g,f,[n],[a])}replaceRightSE(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e.isLessThan(t)?e:t},ur:{x:this.rightSE.point.x,y:e.isGreaterThan(t)?e:t}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(e){return e.x.eq(this.leftSE.point.x)&&e.y.eq(this.leftSE.point.y)||e.x.eq(this.rightSE.point.x)&&e.y.eq(this.rightSE.point.y)}comparePoint(e){return Ve.orient(this.leftSE.point,e,this.rightSE.point)}getIntersection(e){const t=this.bbox(),n=e.bbox(),r=li(t,n);if(r===null)return null;const u=this.leftSE.point,a=this.rightSE.point,o=e.leftSE.point,g=e.rightSE.point,f=Tt(t,o)&&this.comparePoint(o)===0,L=Tt(n,u)&&e.comparePoint(u)===0,x=Tt(t,g)&&this.comparePoint(g)===0,C=Tt(n,a)&&e.comparePoint(a)===0;if(L&&f)return C&&!x?a:!C&&x?g:null;if(L)return x&&u.x.eq(g.x)&&u.y.eq(g.y)?null:u;if(f)return C&&a.x.eq(o.x)&&a.y.eq(o.y)?null:o;if(C&&x)return null;if(C)return a;if(x)return g;const N=Jr(u,this.vector(),o,e.vector());return N===null||!Tt(r,N)?null:Ve.snap(N)}split(e){const t=[],n=e.events!==void 0,r=new We(e,!0),u=new We(e,!1),a=this.rightSE;this.replaceRightSE(u),t.push(u),t.push(r);const o=new Ht(r,a,this.rings.slice(),this.windings.slice());return We.comparePoints(o.leftSE.point,o.rightSE.point)>0&&o.swapEvents(),We.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(r.checkForConsuming(),u.checkForConsuming()),t}swapEvents(){const e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let t=0,n=this.windings.length;t<n;t++)this.windings[t]*=-1}consume(e){let t=this,n=e;for(;t.consumedBy;)t=t.consumedBy;for(;n.consumedBy;)n=n.consumedBy;const r=Ht.compare(t,n);if(r!==0){if(r>0){const u=t;t=n,n=u}if(t.prev===n){const u=t;t=n,n=u}for(let u=0,a=n.rings.length;u<a;u++){const o=n.rings[u],g=n.windings[u],f=t.rings.indexOf(o);f===-1?(t.rings.push(o),t.windings.push(g)):t.windings[f]+=g}n.rings=null,n.windings=null,n.consumedBy=t,n.leftSE.consumedBy=t.leftSE,n.rightSE.consumedBy=t.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{const e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;const e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};const t=this._afterState.rings,n=this._afterState.windings,r=this._afterState.multiPolys;for(let o=0,g=this.rings.length;o<g;o++){const f=this.rings[o],L=this.windings[o],x=t.indexOf(f);x===-1?(t.push(f),n.push(L)):n[x]+=L}const u=[],a=[];for(let o=0,g=t.length;o<g;o++){if(n[o]===0)continue;const f=t[o],L=f.poly;if(a.indexOf(L)===-1)if(f.isExterior)u.push(L);else{a.indexOf(L)===-1&&a.push(L);const x=u.indexOf(f.poly);x!==-1&&u.splice(x,1)}}for(let o=0,g=u.length;o<g;o++){const f=u[o].multiPoly;r.indexOf(f)===-1&&r.push(f)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;const e=this.beforeState().multiPolys,t=this.afterState().multiPolys;switch(Ft.type){case"union":{const n=e.length===0,r=t.length===0;this._isInResult=n!==r;break}case"intersection":{let n,r;e.length<t.length?(n=e.length,r=t.length):(n=t.length,r=e.length),this._isInResult=r===Ft.numMultiPolys&&n<r;break}case"xor":{const n=Math.abs(e.length-t.length);this._isInResult=n%2===1;break}case"difference":{const n=r=>r.length===1&&r[0].isSubject;this._isInResult=n(e)!==n(t);break}}return this._isInResult}},on=class{constructor(i,e,t){P(this,"poly");P(this,"isExterior");P(this,"segments");P(this,"bbox");if(!Array.isArray(i)||i.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=t,this.segments=[],typeof i[0][0]!="number"||typeof i[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const n=Ve.snap({x:new Ge(i[0][0]),y:new Ge(i[0][1])});this.bbox={ll:{x:n.x,y:n.y},ur:{x:n.x,y:n.y}};let r=n;for(let u=1,a=i.length;u<a;u++){if(typeof i[u][0]!="number"||typeof i[u][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const o=Ve.snap({x:new Ge(i[u][0]),y:new Ge(i[u][1])});o.x.eq(r.x)&&o.y.eq(r.y)||(this.segments.push(qt.fromRing(r,o,this)),o.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=o.x),o.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=o.y),o.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=o.x),o.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=o.y),r=o)}(!n.x.eq(r.x)||!n.y.eq(r.y))&&this.segments.push(qt.fromRing(r,n,this))}getSweepEvents(){const i=[];for(let e=0,t=this.segments.length;e<t;e++){const n=this.segments[e];i.push(n.leftSE),i.push(n.rightSE)}return i}},rs=class{constructor(i,e){P(this,"multiPoly");P(this,"exteriorRing");P(this,"interiorRings");P(this,"bbox");if(!Array.isArray(i))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new on(i[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let t=1,n=i.length;t<n;t++){const r=new on(i[t],this,!1);r.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=r.bbox.ll.x),r.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=r.bbox.ll.y),r.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=r.bbox.ur.y),this.interiorRings.push(r)}this.multiPoly=e}getSweepEvents(){const i=this.exteriorRing.getSweepEvents();for(let e=0,t=this.interiorRings.length;e<t;e++){const n=this.interiorRings[e].getSweepEvents();for(let r=0,u=n.length;r<u;r++)i.push(n[r])}return i}},ln=class{constructor(i,e){P(this,"isSubject");P(this,"polys");P(this,"bbox");if(!Array.isArray(i))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof i[0][0][0]=="number"&&(i=[i])}catch{}this.polys=[],this.bbox={ll:{x:new Ge(Number.POSITIVE_INFINITY),y:new Ge(Number.POSITIVE_INFINITY)},ur:{x:new Ge(Number.NEGATIVE_INFINITY),y:new Ge(Number.NEGATIVE_INFINITY)}};for(let t=0,n=i.length;t<n;t++){const r=new rs(i[t],this);r.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=r.bbox.ll.x),r.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=r.bbox.ll.y),r.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=r.bbox.ur.y),this.polys.push(r)}this.isSubject=e}getSweepEvents(){const i=[];for(let e=0,t=this.polys.length;e<t;e++){const n=this.polys[e].getSweepEvents();for(let r=0,u=n.length;r<u;r++)i.push(n[r])}return i}},ss=(i,...e)=>Ft.run("union",i,e),os=(i,...e)=>Ft.run("difference",i,e);Ve.set;function ls(i,e={}){const t=[];if(ei(i,r=>{t.push(r.coordinates)}),t.length<2)throw new Error("Must have at least 2 geometries");const n=ss(t[0],...t.slice(1));return n.length===0?null:n.length===1?$t(n[0],e.properties):Zi(n,e.properties)}var un=ls;function us(i){const e=[];if(ei(i,r=>{e.push(r.coordinates)}),e.length<2)throw new Error("Must have at least two features");const t=i.features[0].properties||{},n=os(e[0],...e.slice(1));return n.length===0?null:n.length===1?$t(n[0],t):Zi(n,t)}var as=us;function fs(i){if(!i)throw new Error("geojson is required");var e=[];return Gr(i,function(t){e.push(t)}),St(e)}var cs=fs;function an(i,e){const t=as(St([$t([[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]]),i]));if(!t)return;t.properties={isMask:!0};const n=wt(ti(i)),r=(n[2]-n[0])/360/1e3,u=n[0]<-180,a=n[2]>180,o=cs(i);if(o.features.length>1&&(u||a))for(const g of o.features){const f=wt(ti(g));if(a&&f[0]<-180+r)for(const L of g.geometry.coordinates)for(const x of L)x[0]+=360-r;if(u&&f[2]>180-r)for(const L of g.geometry.coordinates)for(const x of L)x[0]-=360-r}e(St([o.features.length<2?i:un(o)??i,t]))}const fn=i=>{var n,r,u;const e=(n=i==null?void 0:i.geometry)==null?void 0:n.type,t=(r=i==null?void 0:i.properties)!=null&&r.isMask?0:e==="LineString"||e==="MultiLineString"?3:2;return{color:"#3170fe",fillColor:"#000",fillOpacity:(u=i==null?void 0:i.properties)!=null&&u.isMask?.1:0,weight:t,dashArray:[t,t],lineCap:"butt"}};function cn(i,e=!0,t=!0,n={},r={},u=fn){let a;const o=[];let g,f;const L=be.geoJSON(void 0,{style:u===!0?fn:u===!1?void 0:u??void 0,interactive:!1}).addTo(i),x=N=>{a==null||a({type:"mapClick",coordinates:[N.latlng.lng,N.latlng.lat]})};function C(N,M=!1){const k=document.createElement("div");return new hr({props:{displayIn:"leaflet"},target:k}),new be.Marker(N,{interactive:M,icon:new be.DivIcon({html:k,className:"",iconAnchor:[12,26],iconSize:[25,30],tooltipAnchor:[1,-24]})})}return{setEventHandler(N){N?(a=N,i.on("click",x)):(a=void 0,i.off("click",x))},flyTo(N,M){i.flyTo([N[1],N[0]],M,{duration:2,...n})},fitBounds(N,M,k){i.flyToBounds([[N[1],N[0]],[N[3],N[2]]],{padding:[M,M],duration:2,...k?{maxZoom:k}:{},...r})},indicateReverse(N){i.getContainer().style.cursor=N?"crosshair":""},setReverseMarker(N){var k;if(!e)return;const M=N&&[N[1],N[0]];f?M?f.setLatLng(M):(f.remove(),f=void 0):M&&(e instanceof Function?f=e(i)??void 0:(f=(typeof e=="object"?new be.Marker(M,e):C(M)).addTo(i),(k=f.getElement())==null||k.classList.add("marker-reverse")))},setFeatures(N,M,k){function W(O){L.clearLayers(),O&&L.addData(O)}for(const O of o)O.remove();o.length=0,W();e:if(M){let O=!1;if(M.geometry.type==="GeometryCollection"){const S=M.geometry.geometries.filter(A=>A.type==="Polygon"||A.type==="MultiPolygon");t:if(S.length>0){const A=un(St(S.map(z=>_t(z))));if(!A)break t;an({...M,geometry:A.geometry},W),O=!0}else{const A=M.geometry.geometries.filter(z=>z.type==="LineString"||z.type==="MultiLineString");A.length>0&&(W({...M,geometry:{type:"GeometryCollection",geometries:A}}),O=!0)}}if(!O){if(M.geometry.type==="Polygon"||M.geometry.type==="MultiPolygon")an(M,S=>{if(!S)return;const A=[...S.features],z=wt(ti(M)),D=z[2]-z[0];z[0]-D/4<-180&&A.push(...hn(S,-360).features),z[2]+D/4>180&&A.push(...hn(S,360).features),W(St(A))});else if(M.geometry.type==="LineString"||M.geometry.type==="MultiLineString"){W(M);break e}}if(!k&&!M.geometry.type.endsWith("Point"))break e;if(e instanceof Function){const S=e(i,M);S&&o.push(S.addTo(i))}else if(e){const S=[M.center[1],M.center[0]];o.push(typeof e=="object"?new be.Marker(S,e):C(S).addTo(i))}}if(t)for(const O of N??[]){if(O===M)continue;const S=[O.center[1],O.center[0]];let A;if(t instanceof Function){if(A=t(i,O),!A)continue}else A=(typeof t=="object"?new be.Marker(S,t):C(S,!0)).addTo(i).bindTooltip(O.place_type[0]==="reverse"?O.place_name:O.place_name.replace(/,.*/,""),{direction:"top"});const z=A.getElement();z&&(z.addEventListener("click",D=>{D.stopPropagation(),a==null||a({type:"markerClick",id:O.id})}),z.addEventListener("mouseenter",()=>{a==null||a({type:"markerMouseEnter",id:O.id})}),z.addEventListener("mouseleave",()=>{a==null||a({type:"markerMouseLeave",id:O.id})}),z.classList.toggle("marker-fuzzy",!!O.matching_text)),o.push(A)}},setSelectedMarker(N){var M,k;g&&((M=g.getElement())==null||M.classList.toggle("marker-selected",!1)),g=N>-1?o[N]:void 0,(k=g==null?void 0:g.getElement())==null||k.classList.toggle("marker-selected",!0)},getCenterAndZoom(){const N=i.getCenter();return[i.getZoom(),N.lng,N.lat]}}}function hn(i,e){const t=Ur(i);for(const n of t.features)if(n.geometry.type=="MultiPolygon")for(const r of n.geometry.coordinates)dn(r,e);else dn(n.geometry.coordinates,e);return t}function dn(i,e){for(const t of i)for(const n of t)n[0]+=e}class gn extends be.Control{}be.Util.extend(gn.prototype,be.Evented.prototype);class mn extends gn{constructor(t){super(t);pi(this,Le);pi(this,ot);yi(this,ot,t)}onAdd(t){const n=document.createElement("div");n.className="leaflet-ctrl-geocoder",be.DomEvent.disableClickPropagation(n),be.DomEvent.disableScrollPropagation(n);const{marker:r,showResultMarkers:u,flyTo:a,fullGeometryStyle:o,position:g,...f}=Te(this,ot),L=typeof a=="boolean"?{}:a,x=cn(t,r,u,L,L,o);yi(this,Le,new Br({target:n,props:{mapController:x,flyTo:a===void 0?!0:!!a,...f}}));const C={select:void 0,pick:void 0,featureslisted:void 0,featuresmarked:void 0,response:void 0,optionsvisibilitychange:void 0,reversetoggle:void 0,querychange:void 0};for(const N in C)Te(this,Le).$on(N,M=>this.fire(N,M.detail));return n}setOptions(t){var g;Object.assign(Te(this,ot),t);const{marker:n,showResultMarkers:r,flyTo:u,fullGeometryStyle:a,...o}=Te(this,ot);(g=Te(this,Le))==null||g.$set(o)}setQuery(t,n=!0){var r;(r=Te(this,Le))==null||r.setQuery(t,n)}clearMap(){var t;(t=Te(this,Le))==null||t.clearMap()}clearList(){var t;(t=Te(this,Le))==null||t.clearList()}setReverseMode(t){var n;(n=Te(this,Le))==null||n.$set({reverseActive:t})}focus(t){var n;(n=Te(this,Le))==null||n.focus(t)}blur(){var t;(t=Te(this,Le))==null||t.blur()}onRemove(){var t;(t=Te(this,Le))==null||t.$destroy()}}Le=new WeakMap,ot=new WeakMap;function hs(...i){return new mn(...i)}window.L&&typeof window.L=="object"&&typeof window.L.control=="function"&&(window.L.control.maptilerGeocoding=hs),K.GeocodingControl=mn,K.createLeafletMapController=cn,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})});
14
14
  //# sourceMappingURL=leaflet.umd.js.map