@maptiler/geocoding-control 1.0.0-rc.8 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/maplibregl.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- var Yf=Object.defineProperty;var Hf=(ft,vt,te)=>vt in ft?Yf(ft,vt,{enumerable:!0,configurable:!0,writable:!0,value:te}):ft[vt]=te;var sa=(ft,vt,te)=>(Hf(ft,typeof vt!="symbol"?vt+"":vt,te),te),ul=(ft,vt,te)=>{if(!vt.has(ft))throw TypeError("Cannot "+te)};var xn=(ft,vt,te)=>(ul(ft,vt,"read from private field"),te?te.call(ft):vt.get(ft)),aa=(ft,vt,te)=>{if(vt.has(ft))throw TypeError("Cannot add the same private member more than once");vt instanceof WeakSet?vt.add(ft):vt.set(ft,te)},ds=(ft,vt,te,Lo)=>(ul(ft,vt,"write to private field"),Lo?Lo.call(ft,te):vt.set(ft,te),te);(function(ft,vt){typeof exports=="object"&&typeof module<"u"?vt(exports,require("maplibre-gl")):typeof define=="function"&&define.amd?define(["exports","maplibre-gl"],vt):(ft=typeof globalThis<"u"?globalThis:ft||self,vt(ft.maplibreglMaptilerGeocoder={},ft.maplibregl))})(this,function(ft,vt){var tn,pi;"use strict";function te(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>r[e]})}}return t.default=r,Object.freeze(t)}const Lo=te(vt);function Et(){}function ll(r,t){for(const e in t)r[e]=t[e];return r}function ua(r){return r()}function la(){return Object.create(null)}function ur(r){r.forEach(ua)}function ca(r){return typeof r=="function"}function Sr(r,t){return r!=r?t==t:r!==t||r&&typeof r=="object"||typeof r=="function"}let bo;function Me(r,t){return r===t?!0:(bo||(bo=document.createElement("a")),bo.href=t,r===bo.href)}function cl(r){return Object.keys(r).length===0}function fl(r,t,e,n){if(r){const i=fa(r,t,e,n);return r[0](i)}}function fa(r,t,e,n){return r[1]&&n?ll(e.ctx.slice(),r[1](n(t))):e.ctx}function hl(r,t,e,n){if(r[2]&&n){const i=r[2](n(e));if(t.dirty===void 0)return i;if(typeof i=="object"){const o=[],s=Math.max(t.dirty.length,i.length);for(let a=0;a<s;a+=1)o[a]=t.dirty[a]|i[a];return o}return t.dirty|i}return t.dirty}function gl(r,t,e,n,i,o){if(i){const s=fa(t,e,n,o);r.p(s,i)}}function pl(r){if(r.ctx.length>32){const t=[],e=r.ctx.length/32;for(let n=0;n<e;n++)t[n]=-1;return t}return-1}function ha(r){return r??""}function nt(r,t){r.appendChild(t)}function At(r,t,e){r.insertBefore(t,e||null)}function bt(r){r.parentNode&&r.parentNode.removeChild(r)}function gt(r){return document.createElement(r)}function Un(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function wr(r){return document.createTextNode(r)}function en(){return wr(" ")}function dl(){return wr("")}function Ne(r,t,e,n){return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}function vl(r){return function(t){return t.preventDefault(),r.call(this,t)}}function P(r,t,e){e==null?r.removeAttribute(t):r.getAttribute(t)!==e&&r.setAttribute(t,e)}function yl(r){return Array.from(r.childNodes)}function Ki(r,t){t=""+t,r.data!==t&&(r.data=t)}function ga(r,t){r.value=t??""}function nn(r,t,e){r.classList.toggle(t,!!e)}function ml(r,t,{bubbles:e=!1,cancelable:n=!1}={}){return new CustomEvent(r,{detail:t,bubbles:e,cancelable:n})}let Qi;function Zi(r){Qi=r}function pa(){if(!Qi)throw new Error("Function called outside component initialization");return Qi}function _l(r){pa().$$.on_destroy.push(r)}function El(){const r=pa();return(t,e,{cancelable:n=!1}={})=>{const i=r.$$.callbacks[t];if(i){const o=ml(t,e,{cancelable:n});return i.slice().forEach(s=>{s.call(r,o)}),!o.defaultPrevented}return!0}}function da(r,t){const e=r.$$.callbacks[t.type];e&&e.slice().forEach(n=>n.call(this,t))}const vi=[],vs=[];let yi=[];const va=[],Il=Promise.resolve();let ys=!1;function Cl(){ys||(ys=!0,Il.then(ya))}function ms(r){yi.push(r)}const _s=new Set;let mi=0;function ya(){if(mi!==0)return;const r=Qi;do{try{for(;mi<vi.length;){const t=vi[mi];mi++,Zi(t),Nl(t.$$)}}catch(t){throw vi.length=0,mi=0,t}for(Zi(null),vi.length=0,mi=0;vs.length;)vs.pop()();for(let t=0;t<yi.length;t+=1){const e=yi[t];_s.has(e)||(_s.add(e),e())}yi.length=0}while(vi.length);for(;va.length;)va.pop()();ys=!1,_s.clear(),Zi(r)}function Nl(r){if(r.fragment!==null){r.update(),ur(r.before_update);const t=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,t),r.after_update.forEach(ms)}}function xl(r){const t=[],e=[];yi.forEach(n=>r.indexOf(n)===-1?t.push(n):e.push(n)),e.forEach(n=>n()),yi=t}const Po=new Set;let Kr;function Ro(){Kr={r:0,c:[],p:Kr}}function Oo(){Kr.r||ur(Kr.c),Kr=Kr.p}function Vt(r,t){r&&r.i&&(Po.delete(r),r.i(t))}function ce(r,t,e,n){if(r&&r.o){if(Po.has(r))return;Po.add(r),Kr.c.push(()=>{Po.delete(r),n&&(e&&r.d(1),n())}),r.o(t)}else n&&n()}function ma(r){return(r==null?void 0:r.length)!==void 0?r:Array.from(r)}function Sl(r,t){ce(r,1,1,()=>{t.delete(r.key)})}function wl(r,t,e,n,i,o,s,a,u,l,c,f){let h=r.length,g=o.length,p=h;const d={};for(;p--;)d[r[p].key]=p;const v=[],_=new Map,C=new Map,E=[];for(p=g;p--;){const M=f(i,o,p),A=e(M);let L=s.get(A);L?n&&E.push(()=>L.p(M,t)):(L=l(A,M),L.c()),_.set(A,v[p]=L),A in d&&C.set(A,Math.abs(p-d[A]))}const S=new Set,N=new Set;function w(M){Vt(M,1),M.m(a,c),s.set(M.key,M),c=M.first,g--}for(;h&&g;){const M=v[g-1],A=r[h-1],L=M.key,F=A.key;M===A?(c=M.first,h--,g--):_.has(F)?!s.has(L)||S.has(L)?w(M):N.has(F)?h--:C.get(L)>C.get(F)?(N.add(L),w(M)):(S.add(F),h--):(u(A,s),h--)}for(;h--;){const M=r[h];_.has(M.key)||u(M,s)}for(;g;)w(v[g-1]);return ur(E),v}function Lr(r){r&&r.c()}function lr(r,t,e){const{fragment:n,after_update:i}=r.$$;n&&n.m(t,e),ms(()=>{const o=r.$$.on_mount.map(ua).filter(ca);r.$$.on_destroy?r.$$.on_destroy.push(...o):ur(o),r.$$.on_mount=[]}),i.forEach(ms)}function cr(r,t){const e=r.$$;e.fragment!==null&&(xl(e.after_update),ur(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function Ll(r,t){r.$$.dirty[0]===-1&&(vi.push(r),Cl(),r.$$.dirty.fill(0)),r.$$.dirty[t/31|0]|=1<<t%31}function br(r,t,e,n,i,o,s=null,a=[-1]){const u=Qi;Zi(r);const l=r.$$={fragment:null,ctx:[],props:o,update:Et,not_equal:i,bound:la(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:la(),dirty:a,skip_bound:!1,root:t.target||u.$$.root};s&&s(l.root);let c=!1;if(l.ctx=e?e(r,t.props||{},(f,h,...g)=>{const p=g.length?g[0]:h;return l.ctx&&i(l.ctx[f],l.ctx[f]=p)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](p),c&&Ll(r,f)),h}):[],l.update(),c=!0,ur(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){const f=yl(t.target);l.fragment&&l.fragment.l(f),f.forEach(bt)}else l.fragment&&l.fragment.c();t.intro&&Vt(r.$$.fragment),lr(r,t.target,t.anchor),ya()}Zi(u)}class Pr{constructor(){sa(this,"$$");sa(this,"$$set")}$destroy(){cr(this,1),this.$destroy=Et}$on(t,e){if(!ca(e))return Et;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const i=n.indexOf(e);i!==-1&&n.splice(i,1)}}$set(t){this.$$set&&!cl(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const bl="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(bl);const Wf="";function Pl(r){let t,e;return{c(){t=Un("svg"),e=Un("path"),P(e,"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"),P(t,"viewBox","0 0 14 14"),P(t,"width","13"),P(t,"height","13"),P(t,"class","svelte-en2qvf")},m(n,i){At(n,t,i),nt(t,e)},p:Et,i:Et,o:Et,d(n){n&&bt(t)}}}class _a extends Pr{constructor(t){super(),br(this,t,null,Pl,Sr,{})}}const jf="";function Rl(r){let t,e;return{c(){t=Un("svg"),e=Un("path"),P(e,"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"),P(t,"viewBox","0 0 30 30"),P(t,"fill","none"),P(t,"xmlns","http://www.w3.org/2000/svg"),P(t,"class","svelte-d2loi5")},m(n,i){At(n,t,i),nt(t,e)},p:Et,i:Et,o:Et,d(n){n&&bt(t)}}}class Ea extends Pr{constructor(t){super(),br(this,t,null,Rl,Sr,{})}}const Kf="";function Ol(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"area.svg")||P(t,"src",e),P(t,"alt",r[6]),P(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"area.svg")&&P(t,"src",e),i&64&&P(t,"alt",n[6])},d(n){n&&bt(t)}}}function Tl(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"poi.svg")||P(t,"src",e),P(t,"alt",r[6]),P(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"poi.svg")&&P(t,"src",e),i&64&&P(t,"alt",n[6])},d(n){n&&bt(t)}}}function Dl(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"postal_code.svg")||P(t,"src",e),P(t,"alt",r[6]),P(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"postal_code.svg")&&P(t,"src",e),i&64&&P(t,"alt",n[6])},d(n){n&&bt(t)}}}function Ml(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"street.svg")||P(t,"src",e),P(t,"alt",r[6]),P(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"street.svg")&&P(t,"src",e),i&64&&P(t,"alt",n[6])},d(n){n&&bt(t)}}}function Al(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"road.svg")||P(t,"src",e),P(t,"alt",r[6]),P(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"road.svg")&&P(t,"src",e),i&64&&P(t,"alt",n[6])},d(n){n&&bt(t)}}}function Fl(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"housenumber.svg")||P(t,"src",e),P(t,"alt",r[6]),P(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"housenumber.svg")&&P(t,"src",e),i&64&&P(t,"alt",n[6])},d(n){n&&bt(t)}}}function Bl(r){let t,e,n,i;return{c(){t=gt("img"),Me(t.src,e=r[5])||P(t,"src",e),P(t,"alt",r[4]),P(t,"class","svelte-ltkwvy")},m(o,s){At(o,t,s),n||(i=Ne(t,"error",r[13]),n=!0)},p(o,s){s&32&&!Me(t.src,e=o[5])&&P(t,"src",e),s&16&&P(t,"alt",o[4])},d(o){o&&bt(t),n=!1,i()}}}function Ia(r){let t,e;return{c(){t=gt("span"),e=wr(r[6]),P(t,"class","secondary svelte-ltkwvy")},m(n,i){At(n,t,i),nt(t,e)},p(n,i){i&64&&Ki(e,n[6])},d(n){n&&bt(t)}}}function kl(r){var M,A;let t,e,n,i,o,s,a,u,l=r[0].place_name.replace(/,.*/,"")+"",c,f,h=r[2]==="always"||r[2]&&!r[0].address&&((M=r[0].properties)==null?void 0:M.kind)!=="road"&&((A=r[0].properties)==null?void 0:A.kind)!=="road_relation"&&!r[0].id.startsWith("address.")&&!r[0].id.startsWith("postal_code.")&&(!r[0].id.startsWith("poi.")||!r[5]),g,p,d=r[0].place_name.replace(/[^,]*,?\s*/,"")+"",v,_,C;function E(L,F){var X,R;return F&1&&(e=null),F&1&&(n=null),F&1&&(i=null),L[5]?Bl:L[0].address?Fl:((X=L[0].properties)==null?void 0:X.kind)==="road"||((R=L[0].properties)==null?void 0:R.kind)==="road_relation"?Al:(e==null&&(e=!!L[0].id.startsWith("address.")),e?Ml:(n==null&&(n=!!L[0].id.startsWith("postal_code.")),n?Dl:(i==null&&(i=!!L[0].id.startsWith("poi.")),i?Tl:Ol)))}let S=E(r,-1),N=S(r),w=h&&Ia(r);return{c(){t=gt("li"),N.c(),o=en(),s=gt("span"),a=gt("span"),u=gt("span"),c=wr(l),f=en(),w&&w.c(),g=en(),p=gt("span"),v=wr(d),P(u,"class","primary svelte-ltkwvy"),P(a,"class","svelte-ltkwvy"),P(p,"class","line2 svelte-ltkwvy"),P(s,"class","texts svelte-ltkwvy"),P(t,"tabindex","0"),P(t,"data-selected",r[1]),P(t,"class","svelte-ltkwvy"),nn(t,"selected",r[1])},m(L,F){At(L,t,F),N.m(t,null),nt(t,o),nt(t,s),nt(s,a),nt(a,u),nt(u,c),nt(a,f),w&&w.m(a,null),nt(s,g),nt(s,p),nt(p,v),_||(C=[Ne(t,"mouseenter",r[11]),Ne(t,"focus",r[12])],_=!0)},p(L,[F]){var X,R;S===(S=E(L,F))&&N?N.p(L,F):(N.d(1),N=S(L),N&&(N.c(),N.m(t,o))),F&1&&l!==(l=L[0].place_name.replace(/,.*/,"")+"")&&Ki(c,l),F&37&&(h=L[2]==="always"||L[2]&&!L[0].address&&((X=L[0].properties)==null?void 0:X.kind)!=="road"&&((R=L[0].properties)==null?void 0:R.kind)!=="road_relation"&&!L[0].id.startsWith("address.")&&!L[0].id.startsWith("postal_code.")&&(!L[0].id.startsWith("poi.")||!L[5])),h?w?w.p(L,F):(w=Ia(L),w.c(),w.m(a,null)):w&&(w.d(1),w=null),F&1&&d!==(d=L[0].place_name.replace(/[^,]*,?\s*/,"")+"")&&Ki(v,d),F&2&&P(t,"data-selected",L[1]),F&2&&nn(t,"selected",L[1])},i:Et,o:Et,d(L){L&&bt(t),N.d(),w&&w.d(),_=!1,ur(C)}}}function Gl(r,t,e){var C;let n,i,{feature:o}=t,{selected:s=!1}=t,{showPlaceType:a}=t,{missingIconsCache:u}=t,{iconsBaseUrl:l}=t;const c=(C=o.properties)==null?void 0:C.categories;let f,h,g=0;function p(E){h&&u.add(h),e(9,g++,g)}function d(E){da.call(this,r,E)}function v(E){da.call(this,r,E)}const _=E=>p(E.currentTarget);return r.$$set=E=>{"feature"in E&&e(0,o=E.feature),"selected"in E&&e(1,s=E.selected),"showPlaceType"in E&&e(2,a=E.showPlaceType),"missingIconsCache"in E&&e(8,u=E.missingIconsCache),"iconsBaseUrl"in E&&e(3,l=E.iconsBaseUrl)},r.$$.update=()=>{var E,S,N,w;if(r.$$.dirty&1848)do e(10,n--,n),e(4,f=c==null?void 0:c[n]),e(5,h=f?l+f.replace(/ /g,"_")+".svg":void 0);while(n>-1&&(!h||u.has(h)));r.$$.dirty&1&&e(6,i=o.id.startsWith("poi.")?(S=(E=o.properties)==null?void 0:E.categories)==null?void 0:S.join(", "):((w=(N=o.properties)==null?void 0:N.place_type_name)==null?void 0:w[0])??o.place_type[0])},e(10,n=(c==null?void 0:c.length)??0),[o,s,a,l,f,h,i,p,u,g,n,d,v,_]}class Vl extends Pr{constructor(t){super(),br(this,t,Gl,kl,Sr,{feature:0,selected:1,showPlaceType:2,missingIconsCache:8,iconsBaseUrl:3})}}const Qf="";function zl(r){let t;return{c(){t=gt("div"),t.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>',P(t,"class","svelte-7cmwmc")},m(e,n){At(e,t,n)},p:Et,i:Et,o:Et,d(e){e&&bt(t)}}}class Ul extends Pr{constructor(t){super(),br(this,t,null,zl,Sr,{})}}const Zf="";function ql(r){let t,e;return{c(){t=Un("svg"),e=Un("path"),P(e,"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"),P(t,"viewBox","0 0 60.006 21.412"),P(t,"width","14"),P(t,"height","20"),P(t,"class","svelte-en2qvf")},m(n,i){At(n,t,i),nt(t,e)},p:Et,i:Et,o:Et,d(n){n&&bt(t)}}}class Xl extends Pr{constructor(t){super(),br(this,t,null,ql,Sr,{})}}const Jf="";function Yl(r){let t,e;return{c(){t=Un("svg"),e=Un("path"),P(e,"d","M13.101 14.261 8.74 9.899a4.797 4.797 0 0 1-1.425.748 5.165 5.165 0 0 1-1.603.248c-1.446 0-2.677-.5-3.693-1.503S.495 7.164.495 5.717c0-1.446.508-2.678 1.524-3.693C3.035 1.008 4.266.5 5.712.5c1.448 0 2.672.508 3.675 1.524 1.002 1.015 1.503 2.247 1.503 3.693 0 .558-.08 1.092-.239 1.603-.159.512-.411.98-.757 1.405l4.382 4.4a.74.74 0 0 1 .229.568.81.81 0 0 1-.249.568.787.787 0 0 1-.577.239.787.787 0 0 1-.578-.239ZM5.712 9.223c.97 0 1.796-.342 2.48-1.026a3.378 3.378 0 0 0 1.026-2.48c0-.982-.34-1.818-1.016-2.509-.677-.69-1.507-1.035-2.49-1.035a3.42 3.42 0 0 0-2.509 1.035 3.42 3.42 0 0 0-1.035 2.51c0 .982.345 1.812 1.035 2.488.691.678 1.527 1.017 2.51 1.017Z"),P(t,"width","14"),P(t,"height","14"),P(t,"viewBox","0 0 15 15"),P(t,"class","svelte-en2qvf")},m(n,i){At(n,t,i),nt(t,e)},p:Et,i:Et,o:Et,d(n){n&&bt(t)}}}class Hl extends Pr{constructor(t){super(),br(this,t,null,Yl,Sr,{})}}function Wl(r,t,e){const n=t[1],i=t[0],o=n-i;return r===n&&e?r:((r-i)%o+o)%o+i}function Ca(r){const t=[...r];return t[2]<t[0]&&(t[2]+=360),t}let Ji;async function jl(r,t,e){const n=r==null?void 0:r.getCenterAndZoom();for(const i of t??[])if(!(n&&(i.minZoom!=null&&i.minZoom>n[0]||i.maxZoom!=null&&i.maxZoom<n[0]))){if(i.type==="fixed")return i.coordinates.join(",");t:if(i.type==="client-geolocation"){if(Ji&&i.cachedLocationExpiry&&Ji.time+i.cachedLocationExpiry>Date.now()){if(!Ji.coords)break t;return Ji.coords}let o;try{return o=await new Promise((s,a)=>{e.signal.addEventListener("abort",()=>{a(Error("aborted"))}),navigator.geolocation.getCurrentPosition(u=>{s([u.coords.longitude,u.coords.latitude].map(l=>l.toFixed(6)).join(","))},u=>{a(u)},i)}),o}catch{}finally{i.cachedLocationExpiry&&(Ji={time:Date.now(),coords:o})}if(e.signal.aborted)return}if(i.type==="server-geolocation")return"ip";if(n&&i.type==="map-center")return n[1].toFixed(6)+","+n[2].toFixed(6)}}const $f="";function Na(r,t,e){const n=r.slice();return n[77]=t[e],n[79]=e,n}function xa(r){let t,e;return t=new Ul({}),{c(){Lr(t.$$.fragment)},m(n,i){lr(t,n,i),e=!0},i(n){e||(Vt(t.$$.fragment,n),e=!0)},o(n){ce(t.$$.fragment,n),e=!1},d(n){cr(t,n)}}}function Sa(r){let t,e,n,i,o;return e=new Xl({}),{c(){t=gt("button"),Lr(e.$$.fragment),P(t,"type","button"),P(t,"title",r[9]),P(t,"class","svelte-1r7dvt7"),nn(t,"active",r[0])},m(s,a){At(s,t,a),lr(e,t,null),n=!0,i||(o=Ne(t,"click",r[63]),i=!0)},p(s,a){(!n||a[0]&512)&&P(t,"title",s[9]),(!n||a[0]&1)&&nn(t,"active",s[0])},i(s){n||(Vt(e.$$.fragment,s),n=!0)},o(s){ce(e.$$.fragment,s),n=!1},d(s){s&&bt(t),cr(e),i=!1,o()}}}function Kl(r){let t,e=[],n=new Map,i,o,s,a=ma(r[13]);const u=l=>l[77].id+(l[77].address?","+l[77].address:"");for(let l=0;l<a.length;l+=1){let c=Na(r,a,l),f=u(c);n.set(f,e[l]=wa(f,c))}return{c(){t=gt("ul");for(let l=0;l<e.length;l+=1)e[l].c();P(t,"class","svelte-1r7dvt7")},m(l,c){At(l,t,c);for(let f=0;f<e.length;f+=1)e[f]&&e[f].m(t,null);i=!0,o||(s=[Ne(t,"mouseleave",r[67]),Ne(t,"blur",r[68])],o=!0)},p(l,c){c[0]&8940544&&(a=ma(l[13]),Ro(),e=wl(e,c,u,1,l,a,n,t,Sl,wa,null,Na),Oo())},i(l){if(!i){for(let c=0;c<a.length;c+=1)Vt(e[c]);i=!0}},o(l){for(let c=0;c<e.length;c+=1)ce(e[c]);i=!1},d(l){l&&bt(t);for(let c=0;c<e.length;c+=1)e[c].d();o=!1,ur(s)}}}function Ql(r){let t,e,n,i,o,s;return e=new Ea({}),{c(){t=gt("div"),Lr(e.$$.fragment),n=en(),i=gt("div"),o=wr(r[7]),P(i,"class","svelte-1r7dvt7"),P(t,"class","no-results svelte-1r7dvt7")},m(a,u){At(a,t,u),lr(e,t,null),nt(t,n),nt(t,i),nt(i,o),s=!0},p(a,u){(!s||u[0]&128)&&Ki(o,a[7])},i(a){s||(Vt(e.$$.fragment,a),s=!0)},o(a){ce(e.$$.fragment,a),s=!1},d(a){a&&bt(t),cr(e)}}}function Zl(r){let t="",e;return{c(){e=wr(t)},m(n,i){At(n,e,i)},p:Et,i:Et,o:Et,d(n){n&&bt(e)}}}function Jl(r){let t,e,n,i,o,s,a,u,l,c,f;return e=new Ea({}),u=new _a({}),{c(){t=gt("div"),Lr(e.$$.fragment),n=en(),i=gt("div"),o=wr(r[6]),s=en(),a=gt("button"),Lr(u.$$.fragment),P(i,"class","svelte-1r7dvt7"),P(a,"class","svelte-1r7dvt7"),P(t,"class","error svelte-1r7dvt7")},m(h,g){At(h,t,g),lr(e,t,null),nt(t,n),nt(t,i),nt(i,o),nt(t,s),nt(t,a),lr(u,a,null),l=!0,c||(f=Ne(a,"click",r[64]),c=!0)},p(h,g){(!l||g[0]&64)&&Ki(o,h[6])},i(h){l||(Vt(e.$$.fragment,h),Vt(u.$$.fragment,h),l=!0)},o(h){ce(e.$$.fragment,h),ce(u.$$.fragment,h),l=!1},d(h){h&&bt(t),cr(e),cr(u),c=!1,f()}}}function wa(r,t){let e,n,i;function o(){return t[65](t[79])}function s(){return t[66](t[77])}return n=new Vl({props:{feature:t[77],showPlaceType:t[10],selected:t[14]===t[79],missingIconsCache:t[19],iconsBaseUrl:t[11]}}),n.$on("mouseenter",o),n.$on("focus",s),{key:r,first:null,c(){e=dl(),Lr(n.$$.fragment),this.first=e},m(a,u){At(a,e,u),lr(n,a,u),i=!0},p(a,u){t=a;const l={};u[0]&8192&&(l.feature=t[77]),u[0]&1024&&(l.showPlaceType=t[10]),u[0]&24576&&(l.selected=t[14]===t[79]),u[0]&2048&&(l.iconsBaseUrl=t[11]),n.$set(l)},i(a){i||(Vt(n.$$.fragment,a),i=!0)},o(a){ce(n.$$.fragment,a),i=!1},d(a){a&&bt(e),cr(n,a)}}}function $l(r){let t,e,n,i,o,s,a,u,l,c,f,h,g,p,d,v,_,C,E,S;i=new Hl({}),c=new _a({});let N=r[18]&&xa(),w=r[5]===!0&&Sa(r);const M=r[55].default,A=fl(M,r,r[54],null),L=[Jl,Zl,Ql,Kl],F=[];function X(R,Y){var T,H;return R[17]?0:R[15]?((T=R[13])==null?void 0:T.length)===0?2:R[15]&&((H=R[13])!=null&&H.length)?3:-1:1}return~(d=X(r))&&(v=F[d]=L[d](r)),{c(){t=gt("form"),e=gt("div"),n=gt("button"),Lr(i.$$.fragment),o=en(),s=gt("input"),a=en(),u=gt("div"),l=gt("button"),Lr(c.$$.fragment),f=en(),N&&N.c(),h=en(),w&&w.c(),g=en(),A&&A.c(),p=en(),v&&v.c(),P(n,"class","search-button svelte-1r7dvt7"),P(n,"type","button"),P(s,"placeholder",r[8]),P(s,"aria-label",r[8]),P(s,"class","svelte-1r7dvt7"),P(l,"type","button"),P(l,"title",r[3]),P(l,"class","svelte-1r7dvt7"),P(u,"class","clear-button-container svelte-1r7dvt7"),nn(u,"displayable",r[1]!==""),P(e,"class","input-group svelte-1r7dvt7"),P(t,"tabindex","0"),P(t,"class",_=ha(r[2])+" svelte-1r7dvt7"),nn(t,"can-collapse",r[4]&&r[1]==="")},m(R,Y){At(R,t,Y),nt(t,e),nt(e,n),lr(i,n,null),nt(e,o),nt(e,s),r[57](s),ga(s,r[1]),nt(e,a),nt(e,u),nt(u,l),lr(c,l,null),nt(u,f),N&&N.m(u,null),nt(e,h),w&&w.m(e,null),nt(e,g),A&&A.m(e,null),nt(t,p),~d&&F[d].m(t,null),C=!0,E||(S=[Ne(n,"click",r[56]),Ne(s,"input",r[58]),Ne(s,"focus",r[59]),Ne(s,"blur",r[60]),Ne(s,"keydown",r[21]),Ne(s,"input",r[61]),Ne(l,"click",r[62]),Ne(t,"submit",vl(r[20]))],E=!0)},p(R,Y){(!C||Y[0]&256)&&P(s,"placeholder",R[8]),(!C||Y[0]&256)&&P(s,"aria-label",R[8]),Y[0]&2&&s.value!==R[1]&&ga(s,R[1]),(!C||Y[0]&8)&&P(l,"title",R[3]),R[18]?N?Y[0]&262144&&Vt(N,1):(N=xa(),N.c(),Vt(N,1),N.m(u,null)):N&&(Ro(),ce(N,1,1,()=>{N=null}),Oo()),(!C||Y[0]&2)&&nn(u,"displayable",R[1]!==""),R[5]===!0?w?(w.p(R,Y),Y[0]&32&&Vt(w,1)):(w=Sa(R),w.c(),Vt(w,1),w.m(e,g)):w&&(Ro(),ce(w,1,1,()=>{w=null}),Oo()),A&&A.p&&(!C||Y[1]&8388608)&&gl(A,M,R,R[54],C?hl(M,R[54],Y,null):pl(R[54]),null);let T=d;d=X(R),d===T?~d&&F[d].p(R,Y):(v&&(Ro(),ce(F[T],1,1,()=>{F[T]=null}),Oo()),~d?(v=F[d],v?v.p(R,Y):(v=F[d]=L[d](R),v.c()),Vt(v,1),v.m(t,null)):v=null),(!C||Y[0]&4&&_!==(_=ha(R[2])+" svelte-1r7dvt7"))&&P(t,"class",_),(!C||Y[0]&22)&&nn(t,"can-collapse",R[4]&&R[1]==="")},i(R){C||(Vt(i.$$.fragment,R),Vt(c.$$.fragment,R),Vt(N),Vt(w),Vt(A,R),Vt(v),C=!0)},o(R){ce(i.$$.fragment,R),ce(c.$$.fragment,R),ce(N),ce(w),ce(A,R),ce(v),C=!1},d(R){R&&bt(t),cr(i),r[57](null),cr(c),N&&N.d(),w&&w.d(),A&&A.d(R),~d&&F[d].d(),E=!1,ur(S)}}}function tc(r,t,e){let n,{$$slots:i={},$$scope:o}=t,{class:s=void 0}=t,{apiKey:a}=t,{bbox:u=void 0}=t,{clearButtonTitle:l="clear"}=t,{clearOnBlur:c=!1}=t,{collapsed:f=!1}=t,{country:h=void 0}=t,{debounceSearch:g=200}=t,{enableReverse:p=!1}=t,{errorMessage:d="Something went wrong…"}=t,{filter:v=()=>!0}=t,{flyTo:_=!0}=t,{fuzzyMatch:C=!0}=t,{language:E=void 0}=t,{limit:S=void 0}=t,{mapController:N=void 0}=t,{minLength:w=2}=t,{noResultsMessage:M="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!"}=t,{placeholder:A="Search"}=t,{proximity:L=[{type:"server-geolocation"}]}=t,{reverseActive:F=p==="always"}=t,{reverseButtonTitle:X="toggle reverse geocoding"}=t,{searchValue:R=""}=t,{showFullGeometry:Y=!0}=t,{showPlaceType:T="ifNeeded"}=t,{showResultsWhileTyping:H=!0}=t,{types:it=void 0}=t,{zoom:Mt=16}=t,{maxZoom:jt=18}=t,{apiUrl:Ie="https://api.maptiler.com/geocoding"}=t,{fetchParameters:Nr={}}=t,{iconsBaseUrl:Nn="https://cdn.maptiler.com/maptiler-geocoding-control/v1.0.0-rc.8/icons/"}=t,{adjustUrlQuery:Gn=x=>{}}=t;function Vn(){ir.focus()}function Hi(){ir.blur()}function xr(x,Kt=!0){e(1,R=x),Kt?(e(14,Gt=-1),ol()):(ra(),setTimeout(()=>{ir.focus(),ir.select()}))}function wf(){e(13,ct=void 0),e(51,ot=void 0),e(14,Gt=-1)}function Lf(){e(50,Ce=[]),e(51,ot=void 0)}let Wi=!1,ct,Ce,ot,il="",ir,Gt=-1,or,fs=[],di,ji,hs,ea;const bf=new Set,jr=El();_l(()=>{N&&(N.setEventHandler(void 0),N.indicateReverse(!1),N.setSelectedMarker(-1),N.setMarkers(void 0,void 0))});function ol(x){if(ji&&(clearTimeout(ji),ji=void 0),Gt>-1&&ct)e(51,ot=ct[Gt]),e(1,R=ot.place_name.replace(/,.*/,"")),e(17,or=void 0),e(50,Ce=void 0),e(14,Gt=-1);else if(R){const Kt=x||!sl();na(R,{exact:!0}).then(()=>{e(50,Ce=ct),e(51,ot=void 0),Kt&&Pf()}).catch(sr=>e(17,or=sr))}}function sl(){return/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(R)}async function na(x,{byId:Kt=!1,exact:sr=!1}={}){e(17,or=void 0),di==null||di.abort();const ar=new AbortController;e(18,di=ar);try{const De=sl(),zn=new URLSearchParams;if(E!==void 0&&zn.set("language",Array.isArray(E)?E.join(","):E??""),it&&zn.set("types",it.join(",")),u&&zn.set("bbox",u.map(ps=>ps.toFixed(6)).join(",")),h&&zn.set("country",Array.isArray(h)?h.join(","):h),!Kt&&!De){const ps=await jl(N,L,ar);ps&&zn.set("proximity",ps),(sr||!H)&&zn.set("autocomplete","false"),zn.set("fuzzyMatch",String(C))}S!==void 0&&(!De||(it==null?void 0:it.length)===1)&&zn.set("limit",String(S)),zn.set("key",a),Gn(zn);const gs=Ie+"/"+encodeURIComponent(x)+".json?"+zn.toString();if(gs===il){Kt?(e(13,ct=void 0),e(51,ot=fs[0])):e(13,ct=fs);return}il=gs;const al=await fetch(gs,{signal:ar.signal,...Nr});if(!al.ok)throw new Error;const oa=await al.json();jr("response",{url:gs,featureCollection:oa}),Kt?(e(13,ct=void 0),e(51,ot=oa.features[0]),fs=[ot]):(e(13,ct=oa.features.filter(v)),fs=ct,De&&ir.focus())}catch(De){if(De&&typeof De=="object"&&"name"in De&&De.name==="AbortError")return;throw De}finally{ar===di&&e(18,di=void 0)}}function Pf(){var sr;if(!(Ce!=null&&Ce.length)||!_)return;const x=[180,90,-180,-90],Kt=!Ce.some(ar=>!ar.matching_text);for(const ar of Ce)if(Kt||!ar.matching_text)for(const De of[0,1,2,3])x[De]=Math[De<2?"min":"max"](x[De],((sr=ar.bbox)==null?void 0:sr[De])??ar.center[De%2]);N&&Ce.length>0&&(ot&&x[0]===x[2]&&x[1]===x[3]?N.flyTo(ot.center,Mt):N.fitBounds(Ca(x),50,jt))}function Rf(x){e(0,F=p==="always"),xr(Wl(x[0],[-180,180],!0).toFixed(6)+","+x[1].toFixed(6))}function Of(x){if(!ct)return;let Kt=x.key==="ArrowDown"?1:x.key==="ArrowUp"?-1:0;Kt?(Gt===-1&&Kt===-1&&e(14,Gt=ct.length),e(14,Gt+=Kt),Gt>=ct.length&&e(14,Gt=-1),x.preventDefault()):["ArrowLeft","ArrowRight","Home","End"].includes(x.key)&&e(14,Gt=-1)}function ra(x=!0){if(e(17,or=void 0),H){if(ji&&clearTimeout(ji),R.length<w)return;const Kt=R;ji=window.setTimeout(()=>{na(Kt).catch(sr=>e(17,or=sr))},x?g:0)}else e(13,ct=void 0),e(17,or=void 0)}function ia(x){e(51,ot=x),e(1,R=x.place_name),e(14,Gt=-1)}const Tf=()=>ir.focus();function Df(x){vs[x?"unshift":"push"](()=>{ir=x,e(16,ir)})}function Mf(){R=this.value,e(1,R),e(12,Wi),e(26,c)}const Af=()=>e(12,Wi=!0),Ff=()=>e(12,Wi=!1),Bf=()=>ra(),kf=()=>{e(1,R=""),ir.focus()},Gf=()=>e(0,F=!F),Vf=()=>e(17,or=void 0),zf=x=>e(14,Gt=x),Uf=x=>ia(x),qf=()=>e(14,Gt=-1),Xf=()=>{};return r.$$set=x=>{"class"in x&&e(2,s=x.class),"apiKey"in x&&e(24,a=x.apiKey),"bbox"in x&&e(25,u=x.bbox),"clearButtonTitle"in x&&e(3,l=x.clearButtonTitle),"clearOnBlur"in x&&e(26,c=x.clearOnBlur),"collapsed"in x&&e(4,f=x.collapsed),"country"in x&&e(27,h=x.country),"debounceSearch"in x&&e(28,g=x.debounceSearch),"enableReverse"in x&&e(5,p=x.enableReverse),"errorMessage"in x&&e(6,d=x.errorMessage),"filter"in x&&e(29,v=x.filter),"flyTo"in x&&e(30,_=x.flyTo),"fuzzyMatch"in x&&e(31,C=x.fuzzyMatch),"language"in x&&e(32,E=x.language),"limit"in x&&e(33,S=x.limit),"mapController"in x&&e(34,N=x.mapController),"minLength"in x&&e(35,w=x.minLength),"noResultsMessage"in x&&e(7,M=x.noResultsMessage),"placeholder"in x&&e(8,A=x.placeholder),"proximity"in x&&e(36,L=x.proximity),"reverseActive"in x&&e(0,F=x.reverseActive),"reverseButtonTitle"in x&&e(9,X=x.reverseButtonTitle),"searchValue"in x&&e(1,R=x.searchValue),"showFullGeometry"in x&&e(37,Y=x.showFullGeometry),"showPlaceType"in x&&e(10,T=x.showPlaceType),"showResultsWhileTyping"in x&&e(38,H=x.showResultsWhileTyping),"types"in x&&e(39,it=x.types),"zoom"in x&&e(40,Mt=x.zoom),"maxZoom"in x&&e(41,jt=x.maxZoom),"apiUrl"in x&&e(42,Ie=x.apiUrl),"fetchParameters"in x&&e(43,Nr=x.fetchParameters),"iconsBaseUrl"in x&&e(11,Nn=x.iconsBaseUrl),"adjustUrlQuery"in x&&e(44,Gn=x.adjustUrlQuery),"$$scope"in x&&e(54,o=x.$$scope)},r.$$.update=()=>{if(r.$$.dirty[0]&67112960&&setTimeout(()=>{e(15,hs=Wi),c&&!Wi&&e(1,R="")}),r.$$.dirty[0]&8194|r.$$.dirty[1]&16&&R.length<w&&(e(51,ot=void 0),e(13,ct=void 0),e(17,or=void 0),e(50,Ce=ct)),r.$$.dirty[1]&1048640&&Y&&ot&&!ot.address&&ot.geometry.type==="Point"&&na(ot.id,{byId:!0}).catch(x=>e(17,or=x)),r.$$.dirty[0]&1073741824|r.$$.dirty[1]&3147272&&(N&&ot&&ot.id!==ea&&_&&(!ot.bbox||ot.bbox[0]===ot.bbox[2]&&ot.bbox[1]===ot.bbox[3]?N.flyTo(ot.center,ot.id.startsWith("poi.")||ot.id.startsWith("address.")?jt:Mt):N.fitBounds(Ca(ot.bbox),50,jt),e(13,ct=void 0),e(50,Ce=void 0),e(14,Gt=-1)),e(52,ea=ot==null?void 0:ot.id)),r.$$.dirty[0]&8192|r.$$.dirty[1]&524288&&Ce!==ct&&e(50,Ce=void 0),r.$$.dirty[1]&1572872&&N&&N.setMarkers(Ce,ot),r.$$.dirty[0]&2&&e(14,Gt=-1),r.$$.dirty[0]&40961|r.$$.dirty[1]&8&&N&&N.setEventHandler(x=>{switch(x.type){case"mapClick":F&&Rf(x.coordinates);break;case"markerClick":{const Kt=ct==null?void 0:ct.find(sr=>sr.id===x.id);Kt&&ia(Kt)}break;case"markerMouseEnter":e(14,Gt=hs?(ct==null?void 0:ct.findIndex(Kt=>Kt.id===x.id))??-1:-1);break;case"markerMouseLeave":e(14,Gt=-1);break}}),r.$$.dirty[0]&16384|r.$$.dirty[1]&8&&(N==null||N.setSelectedMarker(Gt)),r.$$.dirty[0]&24576&&e(53,n=ct==null?void 0:ct[Gt]),r.$$.dirty[0]&2|r.$$.dirty[1]&8){const x=/^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(R);N==null||N.setReverseMarker(x?[Number(x[1]),Number(x[2])]:void 0)}r.$$.dirty[1]&4194304&&jr("select",n),r.$$.dirty[1]&1048576&&jr("pick",ot),r.$$.dirty[0]&40960&&jr("optionsVisibilityChange",hs&&!!ct),r.$$.dirty[0]&8192&&jr("featuresListed",ct),r.$$.dirty[1]&524288&&jr("featuresMarked",Ce),r.$$.dirty[0]&1&&jr("reverseToggle",F),r.$$.dirty[0]&2&&jr("queryChange",R),r.$$.dirty[0]&1|r.$$.dirty[1]&8&&N&&N.indicateReverse(F)},[F,R,s,l,f,p,d,M,A,X,T,Nn,Wi,ct,Gt,hs,ir,or,di,bf,ol,Of,ra,ia,a,u,c,h,g,v,_,C,E,S,N,w,L,Y,H,it,Mt,jt,Ie,Nr,Gn,Vn,Hi,xr,wf,Lf,Ce,ot,ea,n,o,i,Tf,Df,Mf,Af,Ff,Bf,kf,Gf,Vf,zf,Uf,qf,Xf]}let ec=class extends Pr{constructor(t){super(),br(this,t,tc,$l,Sr,{class:2,apiKey:24,bbox:25,clearButtonTitle:3,clearOnBlur:26,collapsed:4,country:27,debounceSearch:28,enableReverse:5,errorMessage:6,filter:29,flyTo:30,fuzzyMatch:31,language:32,limit:33,mapController:34,minLength:35,noResultsMessage:7,placeholder:8,proximity:36,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:37,showPlaceType:10,showResultsWhileTyping:38,types:39,zoom:40,maxZoom:41,apiUrl:42,fetchParameters:43,iconsBaseUrl:11,adjustUrlQuery:44,focus:45,blur:46,setQuery:47,clearList:48,clearMap:49},null,[-1,-1,-1])}get focus(){return this.$$.ctx[45]}get blur(){return this.$$.ctx[46]}get setQuery(){return this.$$.ctx[47]}get clearList(){return this.$$.ctx[48]}get clearMap(){return this.$$.ctx[49]}};/**
1
+ var Yf=Object.defineProperty;var Hf=(ft,vt,te)=>vt in ft?Yf(ft,vt,{enumerable:!0,configurable:!0,writable:!0,value:te}):ft[vt]=te;var sa=(ft,vt,te)=>(Hf(ft,typeof vt!="symbol"?vt+"":vt,te),te),ul=(ft,vt,te)=>{if(!vt.has(ft))throw TypeError("Cannot "+te)};var xn=(ft,vt,te)=>(ul(ft,vt,"read from private field"),te?te.call(ft):vt.get(ft)),aa=(ft,vt,te)=>{if(vt.has(ft))throw TypeError("Cannot add the same private member more than once");vt instanceof WeakSet?vt.add(ft):vt.set(ft,te)},ds=(ft,vt,te,Lo)=>(ul(ft,vt,"write to private field"),Lo?Lo.call(ft,te):vt.set(ft,te),te);(function(ft,vt){typeof exports=="object"&&typeof module<"u"?vt(exports,require("maplibre-gl")):typeof define=="function"&&define.amd?define(["exports","maplibre-gl"],vt):(ft=typeof globalThis<"u"?globalThis:ft||self,vt(ft.maplibreglMaptilerGeocoder={},ft.maplibregl))})(this,function(ft,vt){var tn,pi;"use strict";function te(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>r[e]})}}return t.default=r,Object.freeze(t)}const Lo=te(vt);function Et(){}function ll(r,t){for(const e in t)r[e]=t[e];return r}function ua(r){return r()}function la(){return Object.create(null)}function ur(r){r.forEach(ua)}function ca(r){return typeof r=="function"}function Sr(r,t){return r!=r?t==t:r!==t||r&&typeof r=="object"||typeof r=="function"}let bo;function Me(r,t){return r===t?!0:(bo||(bo=document.createElement("a")),bo.href=t,r===bo.href)}function cl(r){return Object.keys(r).length===0}function fl(r,t,e,n){if(r){const i=fa(r,t,e,n);return r[0](i)}}function fa(r,t,e,n){return r[1]&&n?ll(e.ctx.slice(),r[1](n(t))):e.ctx}function hl(r,t,e,n){if(r[2]&&n){const i=r[2](n(e));if(t.dirty===void 0)return i;if(typeof i=="object"){const o=[],s=Math.max(t.dirty.length,i.length);for(let a=0;a<s;a+=1)o[a]=t.dirty[a]|i[a];return o}return t.dirty|i}return t.dirty}function gl(r,t,e,n,i,o){if(i){const s=fa(t,e,n,o);r.p(s,i)}}function pl(r){if(r.ctx.length>32){const t=[],e=r.ctx.length/32;for(let n=0;n<e;n++)t[n]=-1;return t}return-1}function ha(r){return r??""}function nt(r,t){r.appendChild(t)}function At(r,t,e){r.insertBefore(t,e||null)}function bt(r){r.parentNode&&r.parentNode.removeChild(r)}function gt(r){return document.createElement(r)}function Un(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function wr(r){return document.createTextNode(r)}function en(){return wr(" ")}function dl(){return wr("")}function Ne(r,t,e,n){return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}function vl(r){return function(t){return t.preventDefault(),r.call(this,t)}}function P(r,t,e){e==null?r.removeAttribute(t):r.getAttribute(t)!==e&&r.setAttribute(t,e)}function yl(r){return Array.from(r.childNodes)}function Ki(r,t){t=""+t,r.data!==t&&(r.data=t)}function ga(r,t){r.value=t??""}function nn(r,t,e){r.classList.toggle(t,!!e)}function ml(r,t,{bubbles:e=!1,cancelable:n=!1}={}){return new CustomEvent(r,{detail:t,bubbles:e,cancelable:n})}let Qi;function Zi(r){Qi=r}function pa(){if(!Qi)throw new Error("Function called outside component initialization");return Qi}function _l(r){pa().$$.on_destroy.push(r)}function El(){const r=pa();return(t,e,{cancelable:n=!1}={})=>{const i=r.$$.callbacks[t];if(i){const o=ml(t,e,{cancelable:n});return i.slice().forEach(s=>{s.call(r,o)}),!o.defaultPrevented}return!0}}function da(r,t){const e=r.$$.callbacks[t.type];e&&e.slice().forEach(n=>n.call(this,t))}const vi=[],vs=[];let yi=[];const va=[],Il=Promise.resolve();let ys=!1;function Cl(){ys||(ys=!0,Il.then(ya))}function ms(r){yi.push(r)}const _s=new Set;let mi=0;function ya(){if(mi!==0)return;const r=Qi;do{try{for(;mi<vi.length;){const t=vi[mi];mi++,Zi(t),Nl(t.$$)}}catch(t){throw vi.length=0,mi=0,t}for(Zi(null),vi.length=0,mi=0;vs.length;)vs.pop()();for(let t=0;t<yi.length;t+=1){const e=yi[t];_s.has(e)||(_s.add(e),e())}yi.length=0}while(vi.length);for(;va.length;)va.pop()();ys=!1,_s.clear(),Zi(r)}function Nl(r){if(r.fragment!==null){r.update(),ur(r.before_update);const t=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,t),r.after_update.forEach(ms)}}function xl(r){const t=[],e=[];yi.forEach(n=>r.indexOf(n)===-1?t.push(n):e.push(n)),e.forEach(n=>n()),yi=t}const Po=new Set;let Kr;function Ro(){Kr={r:0,c:[],p:Kr}}function Oo(){Kr.r||ur(Kr.c),Kr=Kr.p}function Vt(r,t){r&&r.i&&(Po.delete(r),r.i(t))}function ce(r,t,e,n){if(r&&r.o){if(Po.has(r))return;Po.add(r),Kr.c.push(()=>{Po.delete(r),n&&(e&&r.d(1),n())}),r.o(t)}else n&&n()}function ma(r){return(r==null?void 0:r.length)!==void 0?r:Array.from(r)}function Sl(r,t){ce(r,1,1,()=>{t.delete(r.key)})}function wl(r,t,e,n,i,o,s,a,u,l,c,f){let h=r.length,g=o.length,p=h;const d={};for(;p--;)d[r[p].key]=p;const v=[],_=new Map,C=new Map,E=[];for(p=g;p--;){const M=f(i,o,p),A=e(M);let L=s.get(A);L?n&&E.push(()=>L.p(M,t)):(L=l(A,M),L.c()),_.set(A,v[p]=L),A in d&&C.set(A,Math.abs(p-d[A]))}const S=new Set,N=new Set;function w(M){Vt(M,1),M.m(a,c),s.set(M.key,M),c=M.first,g--}for(;h&&g;){const M=v[g-1],A=r[h-1],L=M.key,F=A.key;M===A?(c=M.first,h--,g--):_.has(F)?!s.has(L)||S.has(L)?w(M):N.has(F)?h--:C.get(L)>C.get(F)?(N.add(L),w(M)):(S.add(F),h--):(u(A,s),h--)}for(;h--;){const M=r[h];_.has(M.key)||u(M,s)}for(;g;)w(v[g-1]);return ur(E),v}function Lr(r){r&&r.c()}function lr(r,t,e){const{fragment:n,after_update:i}=r.$$;n&&n.m(t,e),ms(()=>{const o=r.$$.on_mount.map(ua).filter(ca);r.$$.on_destroy?r.$$.on_destroy.push(...o):ur(o),r.$$.on_mount=[]}),i.forEach(ms)}function cr(r,t){const e=r.$$;e.fragment!==null&&(xl(e.after_update),ur(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function Ll(r,t){r.$$.dirty[0]===-1&&(vi.push(r),Cl(),r.$$.dirty.fill(0)),r.$$.dirty[t/31|0]|=1<<t%31}function br(r,t,e,n,i,o,s=null,a=[-1]){const u=Qi;Zi(r);const l=r.$$={fragment:null,ctx:[],props:o,update:Et,not_equal:i,bound:la(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:la(),dirty:a,skip_bound:!1,root:t.target||u.$$.root};s&&s(l.root);let c=!1;if(l.ctx=e?e(r,t.props||{},(f,h,...g)=>{const p=g.length?g[0]:h;return l.ctx&&i(l.ctx[f],l.ctx[f]=p)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](p),c&&Ll(r,f)),h}):[],l.update(),c=!0,ur(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){const f=yl(t.target);l.fragment&&l.fragment.l(f),f.forEach(bt)}else l.fragment&&l.fragment.c();t.intro&&Vt(r.$$.fragment),lr(r,t.target,t.anchor),ya()}Zi(u)}class Pr{constructor(){sa(this,"$$");sa(this,"$$set")}$destroy(){cr(this,1),this.$destroy=Et}$on(t,e){if(!ca(e))return Et;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const i=n.indexOf(e);i!==-1&&n.splice(i,1)}}$set(t){this.$$set&&!cl(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const bl="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(bl);const Wf="";function Pl(r){let t,e;return{c(){t=Un("svg"),e=Un("path"),P(e,"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"),P(t,"viewBox","0 0 14 14"),P(t,"width","13"),P(t,"height","13"),P(t,"class","svelte-en2qvf")},m(n,i){At(n,t,i),nt(t,e)},p:Et,i:Et,o:Et,d(n){n&&bt(t)}}}class _a extends Pr{constructor(t){super(),br(this,t,null,Pl,Sr,{})}}const jf="";function Rl(r){let t,e;return{c(){t=Un("svg"),e=Un("path"),P(e,"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"),P(t,"viewBox","0 0 30 30"),P(t,"fill","none"),P(t,"xmlns","http://www.w3.org/2000/svg"),P(t,"class","svelte-d2loi5")},m(n,i){At(n,t,i),nt(t,e)},p:Et,i:Et,o:Et,d(n){n&&bt(t)}}}class Ea extends Pr{constructor(t){super(),br(this,t,null,Rl,Sr,{})}}const Kf="";function Ol(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"area.svg")||P(t,"src",e),P(t,"alt",r[6]),P(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"area.svg")&&P(t,"src",e),i&64&&P(t,"alt",n[6])},d(n){n&&bt(t)}}}function Tl(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"poi.svg")||P(t,"src",e),P(t,"alt",r[6]),P(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"poi.svg")&&P(t,"src",e),i&64&&P(t,"alt",n[6])},d(n){n&&bt(t)}}}function Dl(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"postal_code.svg")||P(t,"src",e),P(t,"alt",r[6]),P(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"postal_code.svg")&&P(t,"src",e),i&64&&P(t,"alt",n[6])},d(n){n&&bt(t)}}}function Ml(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"street.svg")||P(t,"src",e),P(t,"alt",r[6]),P(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"street.svg")&&P(t,"src",e),i&64&&P(t,"alt",n[6])},d(n){n&&bt(t)}}}function Al(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"road.svg")||P(t,"src",e),P(t,"alt",r[6]),P(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"road.svg")&&P(t,"src",e),i&64&&P(t,"alt",n[6])},d(n){n&&bt(t)}}}function Fl(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"housenumber.svg")||P(t,"src",e),P(t,"alt",r[6]),P(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"housenumber.svg")&&P(t,"src",e),i&64&&P(t,"alt",n[6])},d(n){n&&bt(t)}}}function Bl(r){let t,e,n,i;return{c(){t=gt("img"),Me(t.src,e=r[5])||P(t,"src",e),P(t,"alt",r[4]),P(t,"class","svelte-ltkwvy")},m(o,s){At(o,t,s),n||(i=Ne(t,"error",r[13]),n=!0)},p(o,s){s&32&&!Me(t.src,e=o[5])&&P(t,"src",e),s&16&&P(t,"alt",o[4])},d(o){o&&bt(t),n=!1,i()}}}function Ia(r){let t,e;return{c(){t=gt("span"),e=wr(r[6]),P(t,"class","secondary svelte-ltkwvy")},m(n,i){At(n,t,i),nt(t,e)},p(n,i){i&64&&Ki(e,n[6])},d(n){n&&bt(t)}}}function kl(r){var M,A;let t,e,n,i,o,s,a,u,l=r[0].place_name.replace(/,.*/,"")+"",c,f,h=r[2]==="always"||r[2]&&!r[0].address&&((M=r[0].properties)==null?void 0:M.kind)!=="road"&&((A=r[0].properties)==null?void 0:A.kind)!=="road_relation"&&!r[0].id.startsWith("address.")&&!r[0].id.startsWith("postal_code.")&&(!r[0].id.startsWith("poi.")||!r[5]),g,p,d=r[0].place_name.replace(/[^,]*,?\s*/,"")+"",v,_,C;function E(L,F){var X,R;return F&1&&(e=null),F&1&&(n=null),F&1&&(i=null),L[5]?Bl:L[0].address?Fl:((X=L[0].properties)==null?void 0:X.kind)==="road"||((R=L[0].properties)==null?void 0:R.kind)==="road_relation"?Al:(e==null&&(e=!!L[0].id.startsWith("address.")),e?Ml:(n==null&&(n=!!L[0].id.startsWith("postal_code.")),n?Dl:(i==null&&(i=!!L[0].id.startsWith("poi.")),i?Tl:Ol)))}let S=E(r,-1),N=S(r),w=h&&Ia(r);return{c(){t=gt("li"),N.c(),o=en(),s=gt("span"),a=gt("span"),u=gt("span"),c=wr(l),f=en(),w&&w.c(),g=en(),p=gt("span"),v=wr(d),P(u,"class","primary svelte-ltkwvy"),P(a,"class","svelte-ltkwvy"),P(p,"class","line2 svelte-ltkwvy"),P(s,"class","texts svelte-ltkwvy"),P(t,"tabindex","0"),P(t,"data-selected",r[1]),P(t,"class","svelte-ltkwvy"),nn(t,"selected",r[1])},m(L,F){At(L,t,F),N.m(t,null),nt(t,o),nt(t,s),nt(s,a),nt(a,u),nt(u,c),nt(a,f),w&&w.m(a,null),nt(s,g),nt(s,p),nt(p,v),_||(C=[Ne(t,"mouseenter",r[11]),Ne(t,"focus",r[12])],_=!0)},p(L,[F]){var X,R;S===(S=E(L,F))&&N?N.p(L,F):(N.d(1),N=S(L),N&&(N.c(),N.m(t,o))),F&1&&l!==(l=L[0].place_name.replace(/,.*/,"")+"")&&Ki(c,l),F&37&&(h=L[2]==="always"||L[2]&&!L[0].address&&((X=L[0].properties)==null?void 0:X.kind)!=="road"&&((R=L[0].properties)==null?void 0:R.kind)!=="road_relation"&&!L[0].id.startsWith("address.")&&!L[0].id.startsWith("postal_code.")&&(!L[0].id.startsWith("poi.")||!L[5])),h?w?w.p(L,F):(w=Ia(L),w.c(),w.m(a,null)):w&&(w.d(1),w=null),F&1&&d!==(d=L[0].place_name.replace(/[^,]*,?\s*/,"")+"")&&Ki(v,d),F&2&&P(t,"data-selected",L[1]),F&2&&nn(t,"selected",L[1])},i:Et,o:Et,d(L){L&&bt(t),N.d(),w&&w.d(),_=!1,ur(C)}}}function Gl(r,t,e){var C;let n,i,{feature:o}=t,{selected:s=!1}=t,{showPlaceType:a}=t,{missingIconsCache:u}=t,{iconsBaseUrl:l}=t;const c=(C=o.properties)==null?void 0:C.categories;let f,h,g=0;function p(E){h&&u.add(h),e(9,g++,g)}function d(E){da.call(this,r,E)}function v(E){da.call(this,r,E)}const _=E=>p(E.currentTarget);return r.$$set=E=>{"feature"in E&&e(0,o=E.feature),"selected"in E&&e(1,s=E.selected),"showPlaceType"in E&&e(2,a=E.showPlaceType),"missingIconsCache"in E&&e(8,u=E.missingIconsCache),"iconsBaseUrl"in E&&e(3,l=E.iconsBaseUrl)},r.$$.update=()=>{var E,S,N,w;if(r.$$.dirty&1848)do e(10,n--,n),e(4,f=c==null?void 0:c[n]),e(5,h=f?l+f.replace(/ /g,"_")+".svg":void 0);while(n>-1&&(!h||u.has(h)));r.$$.dirty&1&&e(6,i=o.id.startsWith("poi.")?(S=(E=o.properties)==null?void 0:E.categories)==null?void 0:S.join(", "):((w=(N=o.properties)==null?void 0:N.place_type_name)==null?void 0:w[0])??o.place_type[0])},e(10,n=(c==null?void 0:c.length)??0),[o,s,a,l,f,h,i,p,u,g,n,d,v,_]}class Vl extends Pr{constructor(t){super(),br(this,t,Gl,kl,Sr,{feature:0,selected:1,showPlaceType:2,missingIconsCache:8,iconsBaseUrl:3})}}const Qf="";function zl(r){let t;return{c(){t=gt("div"),t.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>',P(t,"class","svelte-7cmwmc")},m(e,n){At(e,t,n)},p:Et,i:Et,o:Et,d(e){e&&bt(t)}}}class Ul extends Pr{constructor(t){super(),br(this,t,null,zl,Sr,{})}}const Zf="";function ql(r){let t,e;return{c(){t=Un("svg"),e=Un("path"),P(e,"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"),P(t,"viewBox","0 0 60.006 21.412"),P(t,"width","14"),P(t,"height","20"),P(t,"class","svelte-en2qvf")},m(n,i){At(n,t,i),nt(t,e)},p:Et,i:Et,o:Et,d(n){n&&bt(t)}}}class Xl extends Pr{constructor(t){super(),br(this,t,null,ql,Sr,{})}}const Jf="";function Yl(r){let t,e;return{c(){t=Un("svg"),e=Un("path"),P(e,"d","M13.101 14.261 8.74 9.899a4.797 4.797 0 0 1-1.425.748 5.165 5.165 0 0 1-1.603.248c-1.446 0-2.677-.5-3.693-1.503S.495 7.164.495 5.717c0-1.446.508-2.678 1.524-3.693C3.035 1.008 4.266.5 5.712.5c1.448 0 2.672.508 3.675 1.524 1.002 1.015 1.503 2.247 1.503 3.693 0 .558-.08 1.092-.239 1.603-.159.512-.411.98-.757 1.405l4.382 4.4a.74.74 0 0 1 .229.568.81.81 0 0 1-.249.568.787.787 0 0 1-.577.239.787.787 0 0 1-.578-.239ZM5.712 9.223c.97 0 1.796-.342 2.48-1.026a3.378 3.378 0 0 0 1.026-2.48c0-.982-.34-1.818-1.016-2.509-.677-.69-1.507-1.035-2.49-1.035a3.42 3.42 0 0 0-2.509 1.035 3.42 3.42 0 0 0-1.035 2.51c0 .982.345 1.812 1.035 2.488.691.678 1.527 1.017 2.51 1.017Z"),P(t,"width","14"),P(t,"height","14"),P(t,"viewBox","0 0 15 15"),P(t,"class","svelte-en2qvf")},m(n,i){At(n,t,i),nt(t,e)},p:Et,i:Et,o:Et,d(n){n&&bt(t)}}}class Hl extends Pr{constructor(t){super(),br(this,t,null,Yl,Sr,{})}}function Wl(r,t,e){const n=t[1],i=t[0],o=n-i;return r===n&&e?r:((r-i)%o+o)%o+i}function Ca(r){const t=[...r];return t[2]<t[0]&&(t[2]+=360),t}let Ji;async function jl(r,t,e){const n=r==null?void 0:r.getCenterAndZoom();for(const i of t??[])if(!(n&&(i.minZoom!=null&&i.minZoom>n[0]||i.maxZoom!=null&&i.maxZoom<n[0]))){if(i.type==="fixed")return i.coordinates.join(",");t:if(i.type==="client-geolocation"){if(Ji&&i.cachedLocationExpiry&&Ji.time+i.cachedLocationExpiry>Date.now()){if(!Ji.coords)break t;return Ji.coords}let o;try{return o=await new Promise((s,a)=>{e.signal.addEventListener("abort",()=>{a(Error("aborted"))}),navigator.geolocation.getCurrentPosition(u=>{s([u.coords.longitude,u.coords.latitude].map(l=>l.toFixed(6)).join(","))},u=>{a(u)},i)}),o}catch{}finally{i.cachedLocationExpiry&&(Ji={time:Date.now(),coords:o})}if(e.signal.aborted)return}if(i.type==="server-geolocation")return"ip";if(n&&i.type==="map-center")return n[1].toFixed(6)+","+n[2].toFixed(6)}}const $f="";function Na(r,t,e){const n=r.slice();return n[77]=t[e],n[79]=e,n}function xa(r){let t,e;return t=new Ul({}),{c(){Lr(t.$$.fragment)},m(n,i){lr(t,n,i),e=!0},i(n){e||(Vt(t.$$.fragment,n),e=!0)},o(n){ce(t.$$.fragment,n),e=!1},d(n){cr(t,n)}}}function Sa(r){let t,e,n,i,o;return e=new Xl({}),{c(){t=gt("button"),Lr(e.$$.fragment),P(t,"type","button"),P(t,"title",r[9]),P(t,"class","svelte-1r7dvt7"),nn(t,"active",r[0])},m(s,a){At(s,t,a),lr(e,t,null),n=!0,i||(o=Ne(t,"click",r[63]),i=!0)},p(s,a){(!n||a[0]&512)&&P(t,"title",s[9]),(!n||a[0]&1)&&nn(t,"active",s[0])},i(s){n||(Vt(e.$$.fragment,s),n=!0)},o(s){ce(e.$$.fragment,s),n=!1},d(s){s&&bt(t),cr(e),i=!1,o()}}}function Kl(r){let t,e=[],n=new Map,i,o,s,a=ma(r[13]);const u=l=>l[77].id+(l[77].address?","+l[77].address:"");for(let l=0;l<a.length;l+=1){let c=Na(r,a,l),f=u(c);n.set(f,e[l]=wa(f,c))}return{c(){t=gt("ul");for(let l=0;l<e.length;l+=1)e[l].c();P(t,"class","svelte-1r7dvt7")},m(l,c){At(l,t,c);for(let f=0;f<e.length;f+=1)e[f]&&e[f].m(t,null);i=!0,o||(s=[Ne(t,"mouseleave",r[67]),Ne(t,"blur",r[68])],o=!0)},p(l,c){c[0]&8940544&&(a=ma(l[13]),Ro(),e=wl(e,c,u,1,l,a,n,t,Sl,wa,null,Na),Oo())},i(l){if(!i){for(let c=0;c<a.length;c+=1)Vt(e[c]);i=!0}},o(l){for(let c=0;c<e.length;c+=1)ce(e[c]);i=!1},d(l){l&&bt(t);for(let c=0;c<e.length;c+=1)e[c].d();o=!1,ur(s)}}}function Ql(r){let t,e,n,i,o,s;return e=new Ea({}),{c(){t=gt("div"),Lr(e.$$.fragment),n=en(),i=gt("div"),o=wr(r[7]),P(i,"class","svelte-1r7dvt7"),P(t,"class","no-results svelte-1r7dvt7")},m(a,u){At(a,t,u),lr(e,t,null),nt(t,n),nt(t,i),nt(i,o),s=!0},p(a,u){(!s||u[0]&128)&&Ki(o,a[7])},i(a){s||(Vt(e.$$.fragment,a),s=!0)},o(a){ce(e.$$.fragment,a),s=!1},d(a){a&&bt(t),cr(e)}}}function Zl(r){let t="",e;return{c(){e=wr(t)},m(n,i){At(n,e,i)},p:Et,i:Et,o:Et,d(n){n&&bt(e)}}}function Jl(r){let t,e,n,i,o,s,a,u,l,c,f;return e=new Ea({}),u=new _a({}),{c(){t=gt("div"),Lr(e.$$.fragment),n=en(),i=gt("div"),o=wr(r[6]),s=en(),a=gt("button"),Lr(u.$$.fragment),P(i,"class","svelte-1r7dvt7"),P(a,"class","svelte-1r7dvt7"),P(t,"class","error svelte-1r7dvt7")},m(h,g){At(h,t,g),lr(e,t,null),nt(t,n),nt(t,i),nt(i,o),nt(t,s),nt(t,a),lr(u,a,null),l=!0,c||(f=Ne(a,"click",r[64]),c=!0)},p(h,g){(!l||g[0]&64)&&Ki(o,h[6])},i(h){l||(Vt(e.$$.fragment,h),Vt(u.$$.fragment,h),l=!0)},o(h){ce(e.$$.fragment,h),ce(u.$$.fragment,h),l=!1},d(h){h&&bt(t),cr(e),cr(u),c=!1,f()}}}function wa(r,t){let e,n,i;function o(){return t[65](t[79])}function s(){return t[66](t[77])}return n=new Vl({props:{feature:t[77],showPlaceType:t[10],selected:t[14]===t[79],missingIconsCache:t[19],iconsBaseUrl:t[11]}}),n.$on("mouseenter",o),n.$on("focus",s),{key:r,first:null,c(){e=dl(),Lr(n.$$.fragment),this.first=e},m(a,u){At(a,e,u),lr(n,a,u),i=!0},p(a,u){t=a;const l={};u[0]&8192&&(l.feature=t[77]),u[0]&1024&&(l.showPlaceType=t[10]),u[0]&24576&&(l.selected=t[14]===t[79]),u[0]&2048&&(l.iconsBaseUrl=t[11]),n.$set(l)},i(a){i||(Vt(n.$$.fragment,a),i=!0)},o(a){ce(n.$$.fragment,a),i=!1},d(a){a&&bt(e),cr(n,a)}}}function $l(r){let t,e,n,i,o,s,a,u,l,c,f,h,g,p,d,v,_,C,E,S;i=new Hl({}),c=new _a({});let N=r[18]&&xa(),w=r[5]===!0&&Sa(r);const M=r[55].default,A=fl(M,r,r[54],null),L=[Jl,Zl,Ql,Kl],F=[];function X(R,Y){var T,H;return R[17]?0:R[15]?((T=R[13])==null?void 0:T.length)===0?2:R[15]&&((H=R[13])!=null&&H.length)?3:-1:1}return~(d=X(r))&&(v=F[d]=L[d](r)),{c(){t=gt("form"),e=gt("div"),n=gt("button"),Lr(i.$$.fragment),o=en(),s=gt("input"),a=en(),u=gt("div"),l=gt("button"),Lr(c.$$.fragment),f=en(),N&&N.c(),h=en(),w&&w.c(),g=en(),A&&A.c(),p=en(),v&&v.c(),P(n,"class","search-button svelte-1r7dvt7"),P(n,"type","button"),P(s,"placeholder",r[8]),P(s,"aria-label",r[8]),P(s,"class","svelte-1r7dvt7"),P(l,"type","button"),P(l,"title",r[3]),P(l,"class","svelte-1r7dvt7"),P(u,"class","clear-button-container svelte-1r7dvt7"),nn(u,"displayable",r[1]!==""),P(e,"class","input-group svelte-1r7dvt7"),P(t,"tabindex","0"),P(t,"class",_=ha(r[2])+" svelte-1r7dvt7"),nn(t,"can-collapse",r[4]&&r[1]==="")},m(R,Y){At(R,t,Y),nt(t,e),nt(e,n),lr(i,n,null),nt(e,o),nt(e,s),r[57](s),ga(s,r[1]),nt(e,a),nt(e,u),nt(u,l),lr(c,l,null),nt(u,f),N&&N.m(u,null),nt(e,h),w&&w.m(e,null),nt(e,g),A&&A.m(e,null),nt(t,p),~d&&F[d].m(t,null),C=!0,E||(S=[Ne(n,"click",r[56]),Ne(s,"input",r[58]),Ne(s,"focus",r[59]),Ne(s,"blur",r[60]),Ne(s,"keydown",r[21]),Ne(s,"input",r[61]),Ne(l,"click",r[62]),Ne(t,"submit",vl(r[20]))],E=!0)},p(R,Y){(!C||Y[0]&256)&&P(s,"placeholder",R[8]),(!C||Y[0]&256)&&P(s,"aria-label",R[8]),Y[0]&2&&s.value!==R[1]&&ga(s,R[1]),(!C||Y[0]&8)&&P(l,"title",R[3]),R[18]?N?Y[0]&262144&&Vt(N,1):(N=xa(),N.c(),Vt(N,1),N.m(u,null)):N&&(Ro(),ce(N,1,1,()=>{N=null}),Oo()),(!C||Y[0]&2)&&nn(u,"displayable",R[1]!==""),R[5]===!0?w?(w.p(R,Y),Y[0]&32&&Vt(w,1)):(w=Sa(R),w.c(),Vt(w,1),w.m(e,g)):w&&(Ro(),ce(w,1,1,()=>{w=null}),Oo()),A&&A.p&&(!C||Y[1]&8388608)&&gl(A,M,R,R[54],C?hl(M,R[54],Y,null):pl(R[54]),null);let T=d;d=X(R),d===T?~d&&F[d].p(R,Y):(v&&(Ro(),ce(F[T],1,1,()=>{F[T]=null}),Oo()),~d?(v=F[d],v?v.p(R,Y):(v=F[d]=L[d](R),v.c()),Vt(v,1),v.m(t,null)):v=null),(!C||Y[0]&4&&_!==(_=ha(R[2])+" svelte-1r7dvt7"))&&P(t,"class",_),(!C||Y[0]&22)&&nn(t,"can-collapse",R[4]&&R[1]==="")},i(R){C||(Vt(i.$$.fragment,R),Vt(c.$$.fragment,R),Vt(N),Vt(w),Vt(A,R),Vt(v),C=!0)},o(R){ce(i.$$.fragment,R),ce(c.$$.fragment,R),ce(N),ce(w),ce(A,R),ce(v),C=!1},d(R){R&&bt(t),cr(i),r[57](null),cr(c),N&&N.d(),w&&w.d(),A&&A.d(R),~d&&F[d].d(),E=!1,ur(S)}}}function tc(r,t,e){let n,{$$slots:i={},$$scope:o}=t,{class:s=void 0}=t,{apiKey:a}=t,{bbox:u=void 0}=t,{clearButtonTitle:l="clear"}=t,{clearOnBlur:c=!1}=t,{collapsed:f=!1}=t,{country:h=void 0}=t,{debounceSearch:g=200}=t,{enableReverse:p=!1}=t,{errorMessage:d="Something went wrong…"}=t,{filter:v=()=>!0}=t,{flyTo:_=!0}=t,{fuzzyMatch:C=!0}=t,{language:E=void 0}=t,{limit:S=void 0}=t,{mapController:N=void 0}=t,{minLength:w=2}=t,{noResultsMessage:M="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!"}=t,{placeholder:A="Search"}=t,{proximity:L=[{type:"server-geolocation"}]}=t,{reverseActive:F=p==="always"}=t,{reverseButtonTitle:X="toggle reverse geocoding"}=t,{searchValue:R=""}=t,{showFullGeometry:Y=!0}=t,{showPlaceType:T="ifNeeded"}=t,{showResultsWhileTyping:H=!0}=t,{types:it=void 0}=t,{zoom:Mt=16}=t,{maxZoom:jt=18}=t,{apiUrl:Ie="https://api.maptiler.com/geocoding"}=t,{fetchParameters:Nr={}}=t,{iconsBaseUrl:Nn="https://cdn.maptiler.com/maptiler-geocoding-control/v1.0.0/icons/"}=t,{adjustUrlQuery:Gn=x=>{}}=t;function Vn(){ir.focus()}function Hi(){ir.blur()}function xr(x,Kt=!0){e(1,R=x),Kt?(e(14,Gt=-1),ol()):(ra(),setTimeout(()=>{ir.focus(),ir.select()}))}function wf(){e(13,ct=void 0),e(51,ot=void 0),e(14,Gt=-1)}function Lf(){e(50,Ce=[]),e(51,ot=void 0)}let Wi=!1,ct,Ce,ot,il="",ir,Gt=-1,or,fs=[],di,ji,hs,ea;const bf=new Set,jr=El();_l(()=>{N&&(N.setEventHandler(void 0),N.indicateReverse(!1),N.setSelectedMarker(-1),N.setMarkers(void 0,void 0))});function ol(x){if(ji&&(clearTimeout(ji),ji=void 0),Gt>-1&&ct)e(51,ot=ct[Gt]),e(1,R=ot.place_name.replace(/,.*/,"")),e(17,or=void 0),e(50,Ce=void 0),e(14,Gt=-1);else if(R){const Kt=x||!sl();na(R,{exact:!0}).then(()=>{e(50,Ce=ct),e(51,ot=void 0),Kt&&Pf()}).catch(sr=>e(17,or=sr))}}function sl(){return/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(R)}async function na(x,{byId:Kt=!1,exact:sr=!1}={}){e(17,or=void 0),di==null||di.abort();const ar=new AbortController;e(18,di=ar);try{const De=sl(),zn=new URLSearchParams;if(E!==void 0&&zn.set("language",Array.isArray(E)?E.join(","):E??""),it&&zn.set("types",it.join(",")),u&&zn.set("bbox",u.map(ps=>ps.toFixed(6)).join(",")),h&&zn.set("country",Array.isArray(h)?h.join(","):h),!Kt&&!De){const ps=await jl(N,L,ar);ps&&zn.set("proximity",ps),(sr||!H)&&zn.set("autocomplete","false"),zn.set("fuzzyMatch",String(C))}S!==void 0&&(!De||(it==null?void 0:it.length)===1)&&zn.set("limit",String(S)),zn.set("key",a),Gn(zn);const gs=Ie+"/"+encodeURIComponent(x)+".json?"+zn.toString();if(gs===il){Kt?(e(13,ct=void 0),e(51,ot=fs[0])):e(13,ct=fs);return}il=gs;const al=await fetch(gs,{signal:ar.signal,...Nr});if(!al.ok)throw new Error;const oa=await al.json();jr("response",{url:gs,featureCollection:oa}),Kt?(e(13,ct=void 0),e(51,ot=oa.features[0]),fs=[ot]):(e(13,ct=oa.features.filter(v)),fs=ct,De&&ir.focus())}catch(De){if(De&&typeof De=="object"&&"name"in De&&De.name==="AbortError")return;throw De}finally{ar===di&&e(18,di=void 0)}}function Pf(){var sr;if(!(Ce!=null&&Ce.length)||!_)return;const x=[180,90,-180,-90],Kt=!Ce.some(ar=>!ar.matching_text);for(const ar of Ce)if(Kt||!ar.matching_text)for(const De of[0,1,2,3])x[De]=Math[De<2?"min":"max"](x[De],((sr=ar.bbox)==null?void 0:sr[De])??ar.center[De%2]);N&&Ce.length>0&&(ot&&x[0]===x[2]&&x[1]===x[3]?N.flyTo(ot.center,Mt):N.fitBounds(Ca(x),50,jt))}function Rf(x){e(0,F=p==="always"),xr(Wl(x[0],[-180,180],!0).toFixed(6)+","+x[1].toFixed(6))}function Of(x){if(!ct)return;let Kt=x.key==="ArrowDown"?1:x.key==="ArrowUp"?-1:0;Kt?(Gt===-1&&Kt===-1&&e(14,Gt=ct.length),e(14,Gt+=Kt),Gt>=ct.length&&e(14,Gt=-1),x.preventDefault()):["ArrowLeft","ArrowRight","Home","End"].includes(x.key)&&e(14,Gt=-1)}function ra(x=!0){if(e(17,or=void 0),H){if(ji&&clearTimeout(ji),R.length<w)return;const Kt=R;ji=window.setTimeout(()=>{na(Kt).catch(sr=>e(17,or=sr))},x?g:0)}else e(13,ct=void 0),e(17,or=void 0)}function ia(x){e(51,ot=x),e(1,R=x.place_name),e(14,Gt=-1)}const Tf=()=>ir.focus();function Df(x){vs[x?"unshift":"push"](()=>{ir=x,e(16,ir)})}function Mf(){R=this.value,e(1,R),e(12,Wi),e(26,c)}const Af=()=>e(12,Wi=!0),Ff=()=>e(12,Wi=!1),Bf=()=>ra(),kf=()=>{e(1,R=""),ir.focus()},Gf=()=>e(0,F=!F),Vf=()=>e(17,or=void 0),zf=x=>e(14,Gt=x),Uf=x=>ia(x),qf=()=>e(14,Gt=-1),Xf=()=>{};return r.$$set=x=>{"class"in x&&e(2,s=x.class),"apiKey"in x&&e(24,a=x.apiKey),"bbox"in x&&e(25,u=x.bbox),"clearButtonTitle"in x&&e(3,l=x.clearButtonTitle),"clearOnBlur"in x&&e(26,c=x.clearOnBlur),"collapsed"in x&&e(4,f=x.collapsed),"country"in x&&e(27,h=x.country),"debounceSearch"in x&&e(28,g=x.debounceSearch),"enableReverse"in x&&e(5,p=x.enableReverse),"errorMessage"in x&&e(6,d=x.errorMessage),"filter"in x&&e(29,v=x.filter),"flyTo"in x&&e(30,_=x.flyTo),"fuzzyMatch"in x&&e(31,C=x.fuzzyMatch),"language"in x&&e(32,E=x.language),"limit"in x&&e(33,S=x.limit),"mapController"in x&&e(34,N=x.mapController),"minLength"in x&&e(35,w=x.minLength),"noResultsMessage"in x&&e(7,M=x.noResultsMessage),"placeholder"in x&&e(8,A=x.placeholder),"proximity"in x&&e(36,L=x.proximity),"reverseActive"in x&&e(0,F=x.reverseActive),"reverseButtonTitle"in x&&e(9,X=x.reverseButtonTitle),"searchValue"in x&&e(1,R=x.searchValue),"showFullGeometry"in x&&e(37,Y=x.showFullGeometry),"showPlaceType"in x&&e(10,T=x.showPlaceType),"showResultsWhileTyping"in x&&e(38,H=x.showResultsWhileTyping),"types"in x&&e(39,it=x.types),"zoom"in x&&e(40,Mt=x.zoom),"maxZoom"in x&&e(41,jt=x.maxZoom),"apiUrl"in x&&e(42,Ie=x.apiUrl),"fetchParameters"in x&&e(43,Nr=x.fetchParameters),"iconsBaseUrl"in x&&e(11,Nn=x.iconsBaseUrl),"adjustUrlQuery"in x&&e(44,Gn=x.adjustUrlQuery),"$$scope"in x&&e(54,o=x.$$scope)},r.$$.update=()=>{if(r.$$.dirty[0]&67112960&&setTimeout(()=>{e(15,hs=Wi),c&&!Wi&&e(1,R="")}),r.$$.dirty[0]&8194|r.$$.dirty[1]&16&&R.length<w&&(e(51,ot=void 0),e(13,ct=void 0),e(17,or=void 0),e(50,Ce=ct)),r.$$.dirty[1]&1048640&&Y&&ot&&!ot.address&&ot.geometry.type==="Point"&&na(ot.id,{byId:!0}).catch(x=>e(17,or=x)),r.$$.dirty[0]&1073741824|r.$$.dirty[1]&3147272&&(N&&ot&&ot.id!==ea&&_&&(!ot.bbox||ot.bbox[0]===ot.bbox[2]&&ot.bbox[1]===ot.bbox[3]?N.flyTo(ot.center,ot.id.startsWith("poi.")||ot.id.startsWith("address.")?jt:Mt):N.fitBounds(Ca(ot.bbox),50,jt),e(13,ct=void 0),e(50,Ce=void 0),e(14,Gt=-1)),e(52,ea=ot==null?void 0:ot.id)),r.$$.dirty[0]&8192|r.$$.dirty[1]&524288&&Ce!==ct&&e(50,Ce=void 0),r.$$.dirty[1]&1572872&&N&&N.setMarkers(Ce,ot),r.$$.dirty[0]&2&&e(14,Gt=-1),r.$$.dirty[0]&40961|r.$$.dirty[1]&8&&N&&N.setEventHandler(x=>{switch(x.type){case"mapClick":F&&Rf(x.coordinates);break;case"markerClick":{const Kt=ct==null?void 0:ct.find(sr=>sr.id===x.id);Kt&&ia(Kt)}break;case"markerMouseEnter":e(14,Gt=hs?(ct==null?void 0:ct.findIndex(Kt=>Kt.id===x.id))??-1:-1);break;case"markerMouseLeave":e(14,Gt=-1);break}}),r.$$.dirty[0]&16384|r.$$.dirty[1]&8&&(N==null||N.setSelectedMarker(Gt)),r.$$.dirty[0]&24576&&e(53,n=ct==null?void 0:ct[Gt]),r.$$.dirty[0]&2|r.$$.dirty[1]&8){const x=/^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(R);N==null||N.setReverseMarker(x?[Number(x[1]),Number(x[2])]:void 0)}r.$$.dirty[1]&4194304&&jr("select",n),r.$$.dirty[1]&1048576&&jr("pick",ot),r.$$.dirty[0]&40960&&jr("optionsVisibilityChange",hs&&!!ct),r.$$.dirty[0]&8192&&jr("featuresListed",ct),r.$$.dirty[1]&524288&&jr("featuresMarked",Ce),r.$$.dirty[0]&1&&jr("reverseToggle",F),r.$$.dirty[0]&2&&jr("queryChange",R),r.$$.dirty[0]&1|r.$$.dirty[1]&8&&N&&N.indicateReverse(F)},[F,R,s,l,f,p,d,M,A,X,T,Nn,Wi,ct,Gt,hs,ir,or,di,bf,ol,Of,ra,ia,a,u,c,h,g,v,_,C,E,S,N,w,L,Y,H,it,Mt,jt,Ie,Nr,Gn,Vn,Hi,xr,wf,Lf,Ce,ot,ea,n,o,i,Tf,Df,Mf,Af,Ff,Bf,kf,Gf,Vf,zf,Uf,qf,Xf]}let ec=class extends Pr{constructor(t){super(),br(this,t,tc,$l,Sr,{class:2,apiKey:24,bbox:25,clearButtonTitle:3,clearOnBlur:26,collapsed:4,country:27,debounceSearch:28,enableReverse:5,errorMessage:6,filter:29,flyTo:30,fuzzyMatch:31,language:32,limit:33,mapController:34,minLength:35,noResultsMessage:7,placeholder:8,proximity:36,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:37,showPlaceType:10,showResultsWhileTyping:38,types:39,zoom:40,maxZoom:41,apiUrl:42,fetchParameters:43,iconsBaseUrl:11,adjustUrlQuery:44,focus:45,blur:46,setQuery:47,clearList:48,clearMap:49},null,[-1,-1,-1])}get focus(){return this.$$.ctx[45]}get blur(){return this.$$.ctx[46]}get setQuery(){return this.$$.ctx[47]}get clearList(){return this.$$.ctx[48]}get clearMap(){return this.$$.ctx[49]}};/**
2
2
  * splaytree v3.1.1
3
3
  * Fast Splay tree for Node and browser
4
4
  *