@maptiler/geocoding-control 0.0.91-git.535bd0 → 0.0.91-git.9f388b

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.
@@ -1,4 +1,4 @@
1
- (function(Mt,$t){typeof exports=="object"&&typeof module<"u"?$t(exports,require("@maptiler/sdk")):typeof define=="function"&&define.amd?define(["exports","@maptiler/sdk"],$t):(Mt=typeof globalThis<"u"?globalThis:Mt||self,$t(Mt.maptilersdkMaptilerGeocoder={},Mt.maptilersdk))})(this,function(Mt,$t){var Bn,pi;"use strict";var rl=(Mt,$t,en)=>{if(!$t.has(Mt))throw TypeError("Cannot "+en)};var or=(Mt,$t,en)=>(rl(Mt,$t,"read from private field"),en?en.call(Mt):$t.get(Mt)),oa=(Mt,$t,en)=>{if($t.has(Mt))throw TypeError("Cannot add the same private member more than once");$t instanceof WeakSet?$t.add(Mt):$t.set(Mt,en)},gs=(Mt,$t,en,Lo)=>(rl(Mt,$t,"write to private field"),Lo?Lo.call(Mt,en):$t.set(Mt,en),en);function en(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=en($t);function _t(){}function il(r,t){for(const e in t)r[e]=t[e];return r}function sa(r){return r()}function aa(){return Object.create(null)}function sr(r){r.forEach(sa)}function ua(r){return typeof r=="function"}function Nr(r,t){return r!=r?t==t:r!==t||r&&typeof r=="object"||typeof r=="function"}let bo;function xr(r,t){return bo||(bo=document.createElement("a")),bo.href=t,r===bo.href}function ol(r){return Object.keys(r).length===0}function sl(r,t,e,n){if(r){const i=la(r,t,e,n);return r[0](i)}}function la(r,t,e,n){return r[1]&&n?il(e.ctx.slice(),r[1](n(t))):e.ctx}function al(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 ul(r,t,e,n,i,o){if(i){const s=la(t,e,n,o);r.p(s,i)}}function ll(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 ca(r){return r??""}function nt(r,t){r.appendChild(t)}function Dt(r,t,e){r.insertBefore(t,e||null)}function Lt(r){r.parentNode&&r.parentNode.removeChild(r)}function ht(r){return document.createElement(r)}function zn(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function Sr(r){return document.createTextNode(r)}function nn(){return Sr(" ")}function cl(){return Sr("")}function Ie(r,t,e,n){return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}function fl(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 hl(r){return Array.from(r.childNodes)}function Qi(r,t){t=""+t,r.data!==t&&(r.data=t)}function fa(r,t){r.value=t??""}function rn(r,t,e){r.classList[e?"add":"remove"](t)}function gl(r,t,{bubbles:e=!1,cancelable:n=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(r,e,n,t),i}let Zi;function Ji(r){Zi=r}function ha(){if(!Zi)throw new Error("Function called outside component initialization");return Zi}function pl(r){ha().$$.on_destroy.push(r)}function dl(){const r=ha();return(t,e,{cancelable:n=!1}={})=>{const i=r.$$.callbacks[t];if(i){const o=gl(t,e,{cancelable:n});return i.slice().forEach(s=>{s.call(r,o)}),!o.defaultPrevented}return!0}}function ga(r,t){const e=r.$$.callbacks[t.type];e&&e.slice().forEach(n=>n.call(this,t))}const mi=[],ps=[];let _i=[];const pa=[],vl=Promise.resolve();let ds=!1;function yl(){ds||(ds=!0,vl.then(da))}function vs(r){_i.push(r)}const ys=new Set;let Ei=0;function da(){if(Ei!==0)return;const r=Zi;do{try{for(;Ei<mi.length;){const t=mi[Ei];Ei++,Ji(t),ml(t.$$)}}catch(t){throw mi.length=0,Ei=0,t}for(Ji(null),mi.length=0,Ei=0;ps.length;)ps.pop()();for(let t=0;t<_i.length;t+=1){const e=_i[t];ys.has(e)||(ys.add(e),e())}_i.length=0}while(mi.length);for(;pa.length;)pa.pop()();ds=!1,ys.clear(),Ji(r)}function ml(r){if(r.fragment!==null){r.update(),sr(r.before_update);const t=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,t),r.after_update.forEach(vs)}}function _l(r){const t=[],e=[];_i.forEach(n=>r.indexOf(n)===-1?t.push(n):e.push(n)),e.forEach(n=>n()),_i=t}const Po=new Set;let Kr;function Ro(){Kr={r:0,c:[],p:Kr}}function Oo(){Kr.r||sr(Kr.c),Kr=Kr.p}function Bt(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 El(r,t){ce(r,1,1,()=>{t.delete(r.key)})}function Il(r,t,e,n,i,o,s,a,u,l,c,f){let h=r.length,g=o.length,p=h;const y={};for(;p--;)y[r[p].key]=p;const d=[],m=new Map,E=new Map,C=[];for(p=g;p--;){const T=f(i,o,p),A=e(T);let L=s.get(A);L?n&&C.push(()=>L.p(T,t)):(L=l(A,T),L.c()),m.set(A,d[p]=L),A in y&&E.set(A,Math.abs(p-y[A]))}const w=new Set,N=new Set;function S(T){Bt(T,1),T.m(a,c),s.set(T.key,T),c=T.first,g--}for(;h&&g;){const T=d[g-1],A=r[h-1],L=T.key,F=A.key;T===A?(c=T.first,h--,g--):m.has(F)?!s.has(L)||w.has(L)?S(T):N.has(F)?h--:E.get(L)>E.get(F)?(N.add(L),S(T)):(w.add(F),h--):(u(A,s),h--)}for(;h--;){const T=r[h];m.has(T.key)||u(T,s)}for(;g;)S(d[g-1]);return sr(C),d}function wr(r){r&&r.c()}function ar(r,t,e,n){const{fragment:i,after_update:o}=r.$$;i&&i.m(t,e),n||vs(()=>{const s=r.$$.on_mount.map(sa).filter(ua);r.$$.on_destroy?r.$$.on_destroy.push(...s):sr(s),r.$$.on_mount=[]}),o.forEach(vs)}function ur(r,t){const e=r.$$;e.fragment!==null&&(_l(e.after_update),sr(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function Cl(r,t){r.$$.dirty[0]===-1&&(mi.push(r),yl(),r.$$.dirty.fill(0)),r.$$.dirty[t/31|0]|=1<<t%31}function Lr(r,t,e,n,i,o,s,a=[-1]){const u=Zi;Ji(r);const l=r.$$={fragment:null,ctx:[],props:o,update:_t,not_equal:i,bound:aa(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:aa(),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&&Cl(r,f)),h}):[],l.update(),c=!0,sr(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){const f=hl(t.target);l.fragment&&l.fragment.l(f),f.forEach(Lt)}else l.fragment&&l.fragment.c();t.intro&&Bt(r.$$.fragment),ar(r,t.target,t.anchor,t.customElement),da()}Ji(u)}class br{$destroy(){ur(this,1),this.$destroy=_t}$on(t,e){if(!ua(e))return _t;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&&!ol(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Ff="";function Nl(r){let t,e;return{c(){t=zn("svg"),e=zn("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){Dt(n,t,i),nt(t,e)},p:_t,i:_t,o:_t,d(n){n&&Lt(t)}}}class va extends br{constructor(t){super(),Lr(this,t,null,Nl,Nr,{})}}const kf="";function xl(r){let t,e;return{c(){t=zn("svg"),e=zn("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){Dt(n,t,i),nt(t,e)},p:_t,i:_t,o:_t,d(n){n&&Lt(t)}}}class ya extends br{constructor(t){super(),Lr(this,t,null,xl,Nr,{})}}const Bf="";function Sl(r){let t,e;return{c(){t=ht("img"),xr(t.src,e="/icons/area.svg")||P(t,"src",e),P(t,"alt",r[4]),P(t,"class","svelte-ltkwvy")},m(n,i){Dt(n,t,i)},p(n,i){i&16&&P(t,"alt",n[4])},d(n){n&&Lt(t)}}}function wl(r){let t,e;return{c(){t=ht("img"),xr(t.src,e="/icons/poi.svg")||P(t,"src",e),P(t,"alt",r[4]),P(t,"class","svelte-ltkwvy")},m(n,i){Dt(n,t,i)},p(n,i){i&16&&P(t,"alt",n[4])},d(n){n&&Lt(t)}}}function Ll(r){let t,e;return{c(){t=ht("img"),xr(t.src,e="/icons/postal_code.svg")||P(t,"src",e),P(t,"alt",r[4]),P(t,"class","svelte-ltkwvy")},m(n,i){Dt(n,t,i)},p(n,i){i&16&&P(t,"alt",n[4])},d(n){n&&Lt(t)}}}function bl(r){let t,e;return{c(){t=ht("img"),xr(t.src,e="/icons/street.svg")||P(t,"src",e),P(t,"alt",r[4]),P(t,"class","svelte-ltkwvy")},m(n,i){Dt(n,t,i)},p(n,i){i&16&&P(t,"alt",n[4])},d(n){n&&Lt(t)}}}function Pl(r){let t,e;return{c(){t=ht("img"),xr(t.src,e="/icons/road.svg")||P(t,"src",e),P(t,"alt",r[4]),P(t,"class","svelte-ltkwvy")},m(n,i){Dt(n,t,i)},p(n,i){i&16&&P(t,"alt",n[4])},d(n){n&&Lt(t)}}}function Rl(r){let t,e;return{c(){t=ht("img"),xr(t.src,e="/icons/housenumber.svg")||P(t,"src",e),P(t,"alt",r[4]),P(t,"class","svelte-ltkwvy")},m(n,i){Dt(n,t,i)},p(n,i){i&16&&P(t,"alt",n[4])},d(n){n&&Lt(t)}}}function Ol(r){let t,e,n,i;return{c(){t=ht("img"),xr(t.src,e=r[5])||P(t,"src",e),P(t,"alt",r[3]),P(t,"class","svelte-ltkwvy")},m(o,s){Dt(o,t,s),n||(i=Ie(t,"error",r[10]),n=!0)},p(o,s){s&32&&!xr(t.src,e=o[5])&&P(t,"src",e),s&8&&P(t,"alt",o[3])},d(o){o&&Lt(t),n=!1,i()}}}function ma(r){let t,e;return{c(){t=ht("span"),e=Sr(r[4]),P(t,"class","secondary svelte-ltkwvy")},m(n,i){Dt(n,t,i),nt(t,e)},p(n,i){i&16&&Qi(e,n[4])},d(n){n&&Lt(t)}}}function Tl(r){var T,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&&((T=r[0].properties)==null?void 0:T.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,y=r[0].place_name.replace(/[^,]*,?\s*/,"")+"",d,m,E;function C(L,F){var X,R;return F&1&&(e=null),F&1&&(n=null),F&1&&(i=null),L[5]?Ol:L[0].address?Rl:((X=L[0].properties)==null?void 0:X.kind)==="road"||((R=L[0].properties)==null?void 0:R.kind)==="road_relation"?Pl:(e==null&&(e=!!L[0].id.startsWith("address.")),e?bl:(n==null&&(n=!!L[0].id.startsWith("postal_code.")),n?Ll:(i==null&&(i=!!L[0].id.startsWith("poi.")),i?wl:Sl)))}let w=C(r,-1),N=w(r),S=h&&ma(r);return{c(){t=ht("li"),N.c(),o=nn(),s=ht("span"),a=ht("span"),u=ht("span"),c=Sr(l),f=nn(),S&&S.c(),g=nn(),p=ht("span"),d=Sr(y),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"),rn(t,"selected",r[1])},m(L,F){Dt(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),S&&S.m(a,null),nt(s,g),nt(s,p),nt(p,d),m||(E=[Ie(t,"mouseenter",r[8]),Ie(t,"focus",r[9])],m=!0)},p(L,[F]){var X,R;w===(w=C(L,F))&&N?N.p(L,F):(N.d(1),N=w(L),N&&(N.c(),N.m(t,o))),F&1&&l!==(l=L[0].place_name.replace(/,.*/,"")+"")&&Qi(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?S?S.p(L,F):(S=ma(L),S.c(),S.m(a,null)):S&&(S.d(1),S=null),F&1&&y!==(y=L[0].place_name.replace(/[^,]*,?\s*/,"")+"")&&Qi(d,y),F&2&&P(t,"data-selected",L[1]),F&2&&rn(t,"selected",L[1])},i:_t,o:_t,d(L){L&&Lt(t),N.d(),S&&S.d(),m=!1,sr(E)}}}function Dl(r,t,e){var y;let n,i,o,s,{feature:a}=t,{selected:u=!1}=t,{showPlaceType:l}=t;const c=(y=a.properties)==null?void 0:y.categories;function f(d){n>-1?e(7,n--,n):d.style.visibility="hidden"}function h(d){ga.call(this,r,d)}function g(d){ga.call(this,r,d)}const p=d=>f(d.currentTarget);return r.$$set=d=>{"feature"in d&&e(0,a=d.feature),"selected"in d&&e(1,u=d.selected),"showPlaceType"in d&&e(2,l=d.showPlaceType)},r.$$.update=()=>{var d,m,E,C;r.$$.dirty&128&&e(3,i=c==null?void 0:c[n]),r.$$.dirty&8&&e(5,o=i?`/icons/${i.replace(/ /g,"_")}.svg`:void 0),r.$$.dirty&1&&e(4,s=a.id.startsWith("poi.")?(m=(d=a.properties)==null?void 0:d.categories)==null?void 0:m.join(", "):((C=(E=a.properties)==null?void 0:E.place_type_name)==null?void 0:C[0])??a.place_type[0])},e(7,n=((c==null?void 0:c.length)??0)-1),[a,u,l,i,s,o,f,n,h,g,p]}class Ml extends br{constructor(t){super(),Lr(this,t,Dl,Tl,Nr,{feature:0,selected:1,showPlaceType:2})}}const Gf="";function Al(r){let t;return{c(){t=ht("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){Dt(e,t,n)},p:_t,i:_t,o:_t,d(e){e&&Lt(t)}}}class Fl extends br{constructor(t){super(),Lr(this,t,null,Al,Nr,{})}}const zf="";function kl(r){let t,e;return{c(){t=zn("svg"),e=zn("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){Dt(n,t,i),nt(t,e)},p:_t,i:_t,o:_t,d(n){n&&Lt(t)}}}class Bl extends br{constructor(t){super(),Lr(this,t,null,kl,Nr,{})}}const Vf="";function Gl(r){let t,e;return{c(){t=zn("svg"),e=zn("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){Dt(n,t,i),nt(t,e)},p:_t,i:_t,o:_t,d(n){n&&Lt(t)}}}class zl extends br{constructor(t){super(),Lr(this,t,null,Gl,Nr,{})}}const Uf="";function _a(r,t,e){const n=r.slice();return n[73]=t[e],n[75]=e,n}function Ea(r){let t,e;return t=new Fl({}),{c(){wr(t.$$.fragment)},m(n,i){ar(t,n,i),e=!0},i(n){e||(Bt(t.$$.fragment,n),e=!0)},o(n){ce(t.$$.fragment,n),e=!1},d(n){ur(t,n)}}}function Ia(r){let t,e,n,i,o;return e=new Bl({}),{c(){t=ht("button"),wr(e.$$.fragment),P(t,"type","button"),P(t,"title",r[9]),P(t,"class","svelte-1r7dvt7"),rn(t,"active",r[0])},m(s,a){Dt(s,t,a),ar(e,t,null),n=!0,i||(o=Ie(t,"click",r[59]),i=!0)},p(s,a){(!n||a[0]&512)&&P(t,"title",s[9]),(!n||a[0]&1)&&rn(t,"active",s[0])},i(s){n||(Bt(e.$$.fragment,s),n=!0)},o(s){ce(e.$$.fragment,s),n=!1},d(s){s&&Lt(t),ur(e),i=!1,o()}}}function Vl(r){let t,e=[],n=new Map,i,o,s,a=r[12];const u=l=>l[73].id;for(let l=0;l<a.length;l+=1){let c=_a(r,a,l),f=u(c);n.set(f,e[l]=Ca(f,c))}return{c(){t=ht("ul");for(let l=0;l<e.length;l+=1)e[l].c();P(t,"class","svelte-1r7dvt7")},m(l,c){Dt(l,t,c);for(let f=0;f<e.length;f+=1)e[f]&&e[f].m(t,null);i=!0,o||(s=[Ie(t,"mouseleave",r[63]),Ie(t,"blur",r[64])],o=!0)},p(l,c){c[0]&2110464&&(a=l[12],Ro(),e=Il(e,c,u,1,l,a,n,t,El,Ca,null,_a),Oo())},i(l){if(!i){for(let c=0;c<a.length;c+=1)Bt(e[c]);i=!0}},o(l){for(let c=0;c<e.length;c+=1)ce(e[c]);i=!1},d(l){l&&Lt(t);for(let c=0;c<e.length;c+=1)e[c].d();o=!1,sr(s)}}}function Ul(r){let t,e,n,i,o,s;return e=new ya({}),{c(){t=ht("div"),wr(e.$$.fragment),n=nn(),i=ht("div"),o=Sr(r[7]),P(i,"class","svelte-1r7dvt7"),P(t,"class","no-results svelte-1r7dvt7")},m(a,u){Dt(a,t,u),ar(e,t,null),nt(t,n),nt(t,i),nt(i,o),s=!0},p(a,u){(!s||u[0]&128)&&Qi(o,a[7])},i(a){s||(Bt(e.$$.fragment,a),s=!0)},o(a){ce(e.$$.fragment,a),s=!1},d(a){a&&Lt(t),ur(e)}}}function ql(r){let t="",e;return{c(){e=Sr(t)},m(n,i){Dt(n,e,i)},p:_t,i:_t,o:_t,d(n){n&&Lt(e)}}}function Xl(r){let t,e,n,i,o,s,a,u,l,c,f;return e=new ya({}),u=new va({}),{c(){t=ht("div"),wr(e.$$.fragment),n=nn(),i=ht("div"),o=Sr(r[6]),s=nn(),a=ht("button"),wr(u.$$.fragment),P(i,"class","svelte-1r7dvt7"),P(a,"class","svelte-1r7dvt7"),P(t,"class","error svelte-1r7dvt7")},m(h,g){Dt(h,t,g),ar(e,t,null),nt(t,n),nt(t,i),nt(i,o),nt(t,s),nt(t,a),ar(u,a,null),l=!0,c||(f=Ie(a,"click",r[60]),c=!0)},p(h,g){(!l||g[0]&64)&&Qi(o,h[6])},i(h){l||(Bt(e.$$.fragment,h),Bt(u.$$.fragment,h),l=!0)},o(h){ce(e.$$.fragment,h),ce(u.$$.fragment,h),l=!1},d(h){h&&Lt(t),ur(e),ur(u),c=!1,f()}}}function Ca(r,t){let e,n,i;function o(){return t[61](t[75])}function s(){return t[62](t[73])}return n=new Ml({props:{feature:t[73],showPlaceType:t[10],selected:t[13]===t[75]}}),n.$on("mouseenter",o),n.$on("focus",s),{key:r,first:null,c(){e=cl(),wr(n.$$.fragment),this.first=e},m(a,u){Dt(a,e,u),ar(n,a,u),i=!0},p(a,u){t=a;const l={};u[0]&4096&&(l.feature=t[73]),u[0]&1024&&(l.showPlaceType=t[10]),u[0]&12288&&(l.selected=t[13]===t[75]),n.$set(l)},i(a){i||(Bt(n.$$.fragment,a),i=!0)},o(a){ce(n.$$.fragment,a),i=!1},d(a){a&&Lt(e),ur(n,a)}}}function Yl(r){let t,e,n,i,o,s,a,u,l,c,f,h,g,p,y,d,m,E,C,w;i=new zl({}),c=new va({});let N=r[17]&&Ea(),S=r[5]===!0&&Ia(r);const T=r[51].default,A=sl(T,r,r[50],null),L=[Xl,ql,Ul,Vl],F=[];function X(R,Y){var D,W;return R[16]?0:R[14]?((D=R[12])==null?void 0:D.length)===0?2:R[14]&&((W=R[12])!=null&&W.length)?3:-1:1}return~(y=X(r))&&(d=F[y]=L[y](r)),{c(){t=ht("form"),e=ht("div"),n=ht("button"),wr(i.$$.fragment),o=nn(),s=ht("input"),a=nn(),u=ht("div"),l=ht("button"),wr(c.$$.fragment),f=nn(),N&&N.c(),h=nn(),S&&S.c(),g=nn(),A&&A.c(),p=nn(),d&&d.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"),rn(u,"displayable",r[1]!==""),P(e,"class","input-group svelte-1r7dvt7"),P(t,"tabindex","0"),P(t,"class",m=ca(r[2])+" svelte-1r7dvt7"),rn(t,"can-collapse",r[4]&&r[1]==="")},m(R,Y){Dt(R,t,Y),nt(t,e),nt(e,n),ar(i,n,null),nt(e,o),nt(e,s),r[53](s),fa(s,r[1]),nt(e,a),nt(e,u),nt(u,l),ar(c,l,null),nt(u,f),N&&N.m(u,null),nt(e,h),S&&S.m(e,null),nt(e,g),A&&A.m(e,null),nt(t,p),~y&&F[y].m(t,null),E=!0,C||(w=[Ie(n,"click",r[52]),Ie(s,"input",r[54]),Ie(s,"focus",r[55]),Ie(s,"blur",r[56]),Ie(s,"keydown",r[19]),Ie(s,"input",r[57]),Ie(l,"click",r[58]),Ie(t,"submit",fl(r[18]))],C=!0)},p(R,Y){(!E||Y[0]&256)&&P(s,"placeholder",R[8]),(!E||Y[0]&256)&&P(s,"aria-label",R[8]),Y[0]&2&&s.value!==R[1]&&fa(s,R[1]),(!E||Y[0]&8)&&P(l,"title",R[3]),R[17]?N?Y[0]&131072&&Bt(N,1):(N=Ea(),N.c(),Bt(N,1),N.m(u,null)):N&&(Ro(),ce(N,1,1,()=>{N=null}),Oo()),(!E||Y[0]&2)&&rn(u,"displayable",R[1]!==""),R[5]===!0?S?(S.p(R,Y),Y[0]&32&&Bt(S,1)):(S=Ia(R),S.c(),Bt(S,1),S.m(e,g)):S&&(Ro(),ce(S,1,1,()=>{S=null}),Oo()),A&&A.p&&(!E||Y[1]&524288)&&ul(A,T,R,R[50],E?al(T,R[50],Y,null):ll(R[50]),null);let D=y;y=X(R),y===D?~y&&F[y].p(R,Y):(d&&(Ro(),ce(F[D],1,1,()=>{F[D]=null}),Oo()),~y?(d=F[y],d?d.p(R,Y):(d=F[y]=L[y](R),d.c()),Bt(d,1),d.m(t,null)):d=null),(!E||Y[0]&4&&m!==(m=ca(R[2])+" svelte-1r7dvt7"))&&P(t,"class",m),(!E||Y[0]&22)&&rn(t,"can-collapse",R[4]&&R[1]==="")},i(R){E||(Bt(i.$$.fragment,R),Bt(c.$$.fragment,R),Bt(N),Bt(S),Bt(A,R),Bt(d),E=!0)},o(R){ce(i.$$.fragment,R),ce(c.$$.fragment,R),ce(N),ce(S),ce(A,R),ce(d),E=!1},d(R){R&&Lt(t),ur(i),r[53](null),ur(c),N&&N.d(),S&&S.d(),A&&A.d(R),~y&&F[y].d(),C=!1,sr(w)}}}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 Na(r){let t=[...r];return t[2]<t[0]&&(t[2]+=360),t}function Hl(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:y="Something went wrong…"}=t,{filter:d=()=>!0}=t,{flyTo:m=!0}=t,{fuzzyMatch:E=!0}=t,{language:C=void 0}=t,{limit:w=void 0}=t,{mapController:N=void 0}=t,{minLength:S=2}=t,{noResultsMessage:T="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=void 0}=t,{reverseActive:F=p==="always"}=t,{reverseButtonTitle:X="toggle reverse geocoding"}=t,{searchValue:R=""}=t,{showFullGeometry:Y=!0}=t,{showPlaceType:D="ifNeeded"}=t,{showResultsWhileTyping:W=!0}=t,{trackProximity:ut=!0}=t,{types:mt=void 0}=t,{zoom:Jt=16}=t,{maxZoom:le=18}=t,{apiUrl:Ir="https://api.maptiler.com/geocoding"}=t,{fetchParameters:Je={}}=t;function Cr(){nr.focus()}function Gn(){nr.blur()}function di(x,Ht=!0){e(1,R=x),Ht?(e(13,Wt=-1),el()):(ea(),setTimeout(()=>{nr.focus(),nr.select()}))}let $e=!1,ft,Oe,at,tl="",nr,Wt=-1,rr,fs=[],vi,ji,hs,$s;const Hr=dl();pl(()=>{N&&(N.setEventHandler(void 0),N.indicateReverse(!1),N.setSelectedMarker(-1),N.setMarkers(void 0,void 0))});function el(x){if(ji&&(clearTimeout(ji),ji=void 0),Wt>-1&&ft)e(47,at=ft[Wt]),e(1,R=at.place_name.replace(/,.*/,"")),e(16,rr=void 0),e(46,Oe=void 0),e(13,Wt=-1);else if(R){const Ht=x||!nl();ta(R,{exact:!0}).then(()=>{e(46,Oe=ft),e(47,at=void 0),Ht&&Ef()}).catch(ir=>e(16,rr=ir))}}function nl(){return/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(R)}async function ta(x,{byId:Ht=!1,exact:ir=!1}={}){e(16,rr=void 0);const Ki=nl(),tn=new URLSearchParams;C!=null&&tn.set("language",Array.isArray(C)?C.join(","):C),mt&&tn.set("types",mt.join(",")),Ki||(u&&tn.set("bbox",u.map(jr=>jr.toFixed(6)).join(",")),h&&tn.set("country",Array.isArray(h)?h.join(","):h)),Ht||(L&&tn.set("proximity",L.map(jr=>jr.toFixed(6)).join(",")),(ir||!W)&&tn.set("autocomplete","false"),tn.set("fuzzyMatch",String(E))),w!==void 0&&(!Ki||(mt==null?void 0:mt.length)===1)&&tn.set("limit",String(w)),tn.set("key",a);const yi=Ir+"/"+encodeURIComponent(x)+".json?"+tn.toString();if(yi===tl){Ht?(e(12,ft=void 0),e(47,at=fs[0])):e(12,ft=fs);return}tl=yi,vi==null||vi.abort();const Te=new AbortController;e(17,vi=Te);let ra;try{ra=await fetch(yi,{signal:Te.signal,...Je}).finally(()=>{Te===vi&&e(17,vi=void 0)})}catch(jr){if(jr&&typeof jr=="object"&&"name"in jr&&jr.name==="AbortError")return;throw new Error}if(!ra.ok)throw new Error;const ia=await ra.json();Hr("response",{url:yi,featureCollection:ia}),Ht?(e(12,ft=void 0),e(47,at=ia.features[0]),fs=[at]):(e(12,ft=ia.features.filter(d)),fs=ft,Ki&&nr.focus())}function Ef(){var ir,Ki,tn,yi;if(!(Oe!=null&&Oe.length)||!m)return;const x=[180,90,-180,-90],Ht=!Oe.some(Te=>!Te.matching_text);for(const Te of Oe)(Ht||!Te.matching_text)&&(x[0]=Math.min(x[0],((ir=Te.bbox)==null?void 0:ir[0])??Te.center[0]),x[1]=Math.min(x[1],((Ki=Te.bbox)==null?void 0:Ki[1])??Te.center[1]),x[2]=Math.max(x[2],((tn=Te.bbox)==null?void 0:tn[2])??Te.center[0]),x[3]=Math.max(x[3],((yi=Te.bbox)==null?void 0:yi[3])??Te.center[1]));N&&Oe.length>0&&(at&&x[0]===x[2]&&x[1]===x[3]?N.flyTo(at.center,Jt):N.fitBounds(Na(x),50,le))}function If(x){e(0,F=p==="always"),di(Wl(x[0],[-180,180],!0).toFixed(6)+","+x[1].toFixed(6))}function Cf(x){if(!ft)return;let Ht=x.key==="ArrowDown"?1:x.key==="ArrowUp"?-1:0;Ht?(Wt===-1&&Ht===-1&&e(13,Wt=ft.length),e(13,Wt+=Ht),Wt>=ft.length&&e(13,Wt=-1),x.preventDefault()):["ArrowLeft","ArrowRight","Home","End"].includes(x.key)&&e(13,Wt=-1)}function ea(x=!0){if(e(16,rr=void 0),W){if(ji&&clearTimeout(ji),R.length<S)return;const Ht=R;ji=window.setTimeout(()=>{ta(Ht).catch(ir=>e(16,rr=ir))},x?g:0)}else e(12,ft=void 0),e(16,rr=void 0)}function na(x){e(47,at=x),e(1,R=x.place_name),e(13,Wt=-1)}const Nf=()=>nr.focus();function xf(x){ps[x?"unshift":"push"](()=>{nr=x,e(15,nr)})}function Sf(){R=this.value,e(1,R),e(11,$e),e(25,c)}const wf=()=>e(11,$e=!0),Lf=()=>e(11,$e=!1),bf=()=>ea(),Pf=()=>{e(1,R=""),nr.focus()},Rf=()=>e(0,F=!F),Of=()=>e(16,rr=void 0),Tf=x=>e(13,Wt=x),Df=x=>na(x),Mf=()=>e(13,Wt=-1),Af=()=>{};return r.$$set=x=>{"class"in x&&e(2,s=x.class),"apiKey"in x&&e(23,a=x.apiKey),"bbox"in x&&e(24,u=x.bbox),"clearButtonTitle"in x&&e(3,l=x.clearButtonTitle),"clearOnBlur"in x&&e(25,c=x.clearOnBlur),"collapsed"in x&&e(4,f=x.collapsed),"country"in x&&e(26,h=x.country),"debounceSearch"in x&&e(27,g=x.debounceSearch),"enableReverse"in x&&e(5,p=x.enableReverse),"errorMessage"in x&&e(6,y=x.errorMessage),"filter"in x&&e(28,d=x.filter),"flyTo"in x&&e(29,m=x.flyTo),"fuzzyMatch"in x&&e(30,E=x.fuzzyMatch),"language"in x&&e(31,C=x.language),"limit"in x&&e(32,w=x.limit),"mapController"in x&&e(33,N=x.mapController),"minLength"in x&&e(34,S=x.minLength),"noResultsMessage"in x&&e(7,T=x.noResultsMessage),"placeholder"in x&&e(8,A=x.placeholder),"proximity"in x&&e(22,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(35,Y=x.showFullGeometry),"showPlaceType"in x&&e(10,D=x.showPlaceType),"showResultsWhileTyping"in x&&e(36,W=x.showResultsWhileTyping),"trackProximity"in x&&e(37,ut=x.trackProximity),"types"in x&&e(38,mt=x.types),"zoom"in x&&e(39,Jt=x.zoom),"maxZoom"in x&&e(40,le=x.maxZoom),"apiUrl"in x&&e(41,Ir=x.apiUrl),"fetchParameters"in x&&e(42,Je=x.fetchParameters),"$$scope"in x&&e(50,o=x.$$scope)},r.$$.update=()=>{if(r.$$.dirty[1]&64&&(ut||e(22,L=void 0)),r.$$.dirty[0]&33556480&&setTimeout(()=>{e(14,hs=$e),c&&!$e&&e(1,R="")}),r.$$.dirty[0]&4098|r.$$.dirty[1]&8&&R.length<S&&(e(47,at=void 0),e(12,ft=void 0),e(16,rr=void 0),e(46,Oe=ft)),r.$$.dirty[1]&65552&&Y&&at&&!at.address&&at.geometry.type==="Point"&&ta(at.id,{byId:!0}).catch(x=>e(16,rr=x)),r.$$.dirty[0]&536870912|r.$$.dirty[1]&197380&&(N&&at&&at.id!==$s&&m&&(!at.bbox||at.bbox[0]===at.bbox[2]&&at.bbox[1]===at.bbox[3]?N.flyTo(at.center,at.id.startsWith("poi.")||at.id.startsWith("address.")?le:Jt):N.fitBounds(Na(at.bbox),50,le),e(12,ft=void 0),e(46,Oe=void 0),e(13,Wt=-1)),e(48,$s=at==null?void 0:at.id)),r.$$.dirty[0]&4096|r.$$.dirty[1]&32768&&Oe!==ft&&e(46,Oe=void 0),r.$$.dirty[1]&98308&&N&&N.setMarkers(Oe,at),r.$$.dirty[0]&2&&e(13,Wt=-1),r.$$.dirty[0]&20481|r.$$.dirty[1]&68&&N&&N.setEventHandler(x=>{switch(x.type){case"mapClick":F&&If(x.coordinates);break;case"proximityChange":e(22,L=ut?x.proximity:void 0);break;case"markerClick":{const Ht=ft==null?void 0:ft.find(ir=>ir.id===x.id);Ht&&na(Ht)}break;case"markerMouseEnter":e(13,Wt=hs?(ft==null?void 0:ft.findIndex(Ht=>Ht.id===x.id))??-1:-1);break;case"markerMouseLeave":e(13,Wt=-1);break}}),r.$$.dirty[0]&8192|r.$$.dirty[1]&4&&(N==null||N.setSelectedMarker(Wt)),r.$$.dirty[0]&12288&&e(49,n=ft==null?void 0:ft[Wt]),r.$$.dirty[0]&2|r.$$.dirty[1]&4){const x=/^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(R);N==null||N.setReverseMarker(x?[Number(x[1]),Number(x[2])]:void 0)}r.$$.dirty[1]&262144&&Hr("select",n),r.$$.dirty[1]&65536&&Hr("pick",at),r.$$.dirty[0]&20480&&Hr("optionsVisibilityChange",hs&&!!ft),r.$$.dirty[0]&4096&&Hr("featuresListed",ft),r.$$.dirty[1]&32768&&Hr("featuresMarked",Oe),r.$$.dirty[0]&1&&Hr("reverseToggle",F),r.$$.dirty[0]&2&&Hr("queryChange",R),r.$$.dirty[0]&1|r.$$.dirty[1]&4&&N&&N.indicateReverse(F)},[F,R,s,l,f,p,y,T,A,X,D,$e,ft,Wt,hs,nr,rr,vi,el,Cf,ea,na,L,a,u,c,h,g,d,m,E,C,w,N,S,Y,W,ut,mt,Jt,le,Ir,Je,Cr,Gn,di,Oe,at,$s,n,o,i,Nf,xf,Sf,wf,Lf,bf,Pf,Rf,Of,Tf,Df,Mf,Af]}let jl=class extends br{constructor(t){super(),Lr(this,t,Hl,Yl,Nr,{class:2,apiKey:23,bbox:24,clearButtonTitle:3,clearOnBlur:25,collapsed:4,country:26,debounceSearch:27,enableReverse:5,errorMessage:6,filter:28,flyTo:29,fuzzyMatch:30,language:31,limit:32,mapController:33,minLength:34,noResultsMessage:7,placeholder:8,proximity:22,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:35,showPlaceType:10,showResultsWhileTyping:36,trackProximity:37,types:38,zoom:39,maxZoom:40,apiUrl:41,fetchParameters:42,focus:43,blur:44,setQuery:45},null,[-1,-1,-1])}get focus(){return this.$$.ctx[43]}get blur(){return this.$$.ctx[44]}get setQuery(){return this.$$.ctx[45]}};/**
1
+ (function(Mt,$t){typeof exports=="object"&&typeof module<"u"?$t(exports,require("@maptiler/sdk")):typeof define=="function"&&define.amd?define(["exports","@maptiler/sdk"],$t):(Mt=typeof globalThis<"u"?globalThis:Mt||self,$t(Mt.maptilersdkMaptilerGeocoder={},Mt.maptilersdk))})(this,function(Mt,$t){var Bn,pi;"use strict";var rl=(Mt,$t,en)=>{if(!$t.has(Mt))throw TypeError("Cannot "+en)};var or=(Mt,$t,en)=>(rl(Mt,$t,"read from private field"),en?en.call(Mt):$t.get(Mt)),oa=(Mt,$t,en)=>{if($t.has(Mt))throw TypeError("Cannot add the same private member more than once");$t instanceof WeakSet?$t.add(Mt):$t.set(Mt,en)},gs=(Mt,$t,en,Lo)=>(rl(Mt,$t,"write to private field"),Lo?Lo.call(Mt,en):$t.set(Mt,en),en);function en(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=en($t);function _t(){}function il(r,t){for(const e in t)r[e]=t[e];return r}function sa(r){return r()}function aa(){return Object.create(null)}function sr(r){r.forEach(sa)}function ua(r){return typeof r=="function"}function Nr(r,t){return r!=r?t==t:r!==t||r&&typeof r=="object"||typeof r=="function"}let bo;function xr(r,t){return bo||(bo=document.createElement("a")),bo.href=t,r===bo.href}function ol(r){return Object.keys(r).length===0}function sl(r,t,e,n){if(r){const i=la(r,t,e,n);return r[0](i)}}function la(r,t,e,n){return r[1]&&n?il(e.ctx.slice(),r[1](n(t))):e.ctx}function al(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 ul(r,t,e,n,i,o){if(i){const s=la(t,e,n,o);r.p(s,i)}}function ll(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 ca(r){return r??""}function nt(r,t){r.appendChild(t)}function Dt(r,t,e){r.insertBefore(t,e||null)}function Lt(r){r.parentNode&&r.parentNode.removeChild(r)}function ht(r){return document.createElement(r)}function zn(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function Sr(r){return document.createTextNode(r)}function nn(){return Sr(" ")}function cl(){return Sr("")}function Ie(r,t,e,n){return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}function fl(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 hl(r){return Array.from(r.childNodes)}function Qi(r,t){t=""+t,r.data!==t&&(r.data=t)}function fa(r,t){r.value=t??""}function rn(r,t,e){r.classList[e?"add":"remove"](t)}function gl(r,t,{bubbles:e=!1,cancelable:n=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(r,e,n,t),i}let Zi;function Ji(r){Zi=r}function ha(){if(!Zi)throw new Error("Function called outside component initialization");return Zi}function pl(r){ha().$$.on_destroy.push(r)}function dl(){const r=ha();return(t,e,{cancelable:n=!1}={})=>{const i=r.$$.callbacks[t];if(i){const o=gl(t,e,{cancelable:n});return i.slice().forEach(s=>{s.call(r,o)}),!o.defaultPrevented}return!0}}function ga(r,t){const e=r.$$.callbacks[t.type];e&&e.slice().forEach(n=>n.call(this,t))}const mi=[],ps=[];let _i=[];const pa=[],vl=Promise.resolve();let ds=!1;function yl(){ds||(ds=!0,vl.then(da))}function vs(r){_i.push(r)}const ys=new Set;let Ei=0;function da(){if(Ei!==0)return;const r=Zi;do{try{for(;Ei<mi.length;){const t=mi[Ei];Ei++,Ji(t),ml(t.$$)}}catch(t){throw mi.length=0,Ei=0,t}for(Ji(null),mi.length=0,Ei=0;ps.length;)ps.pop()();for(let t=0;t<_i.length;t+=1){const e=_i[t];ys.has(e)||(ys.add(e),e())}_i.length=0}while(mi.length);for(;pa.length;)pa.pop()();ds=!1,ys.clear(),Ji(r)}function ml(r){if(r.fragment!==null){r.update(),sr(r.before_update);const t=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,t),r.after_update.forEach(vs)}}function _l(r){const t=[],e=[];_i.forEach(n=>r.indexOf(n)===-1?t.push(n):e.push(n)),e.forEach(n=>n()),_i=t}const Po=new Set;let Kr;function Ro(){Kr={r:0,c:[],p:Kr}}function Oo(){Kr.r||sr(Kr.c),Kr=Kr.p}function Bt(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 El(r,t){ce(r,1,1,()=>{t.delete(r.key)})}function Il(r,t,e,n,i,o,s,a,u,l,c,f){let h=r.length,g=o.length,p=h;const y={};for(;p--;)y[r[p].key]=p;const d=[],m=new Map,E=new Map,C=[];for(p=g;p--;){const T=f(i,o,p),A=e(T);let L=s.get(A);L?n&&C.push(()=>L.p(T,t)):(L=l(A,T),L.c()),m.set(A,d[p]=L),A in y&&E.set(A,Math.abs(p-y[A]))}const w=new Set,N=new Set;function S(T){Bt(T,1),T.m(a,c),s.set(T.key,T),c=T.first,g--}for(;h&&g;){const T=d[g-1],A=r[h-1],L=T.key,F=A.key;T===A?(c=T.first,h--,g--):m.has(F)?!s.has(L)||w.has(L)?S(T):N.has(F)?h--:E.get(L)>E.get(F)?(N.add(L),S(T)):(w.add(F),h--):(u(A,s),h--)}for(;h--;){const T=r[h];m.has(T.key)||u(T,s)}for(;g;)S(d[g-1]);return sr(C),d}function wr(r){r&&r.c()}function ar(r,t,e,n){const{fragment:i,after_update:o}=r.$$;i&&i.m(t,e),n||vs(()=>{const s=r.$$.on_mount.map(sa).filter(ua);r.$$.on_destroy?r.$$.on_destroy.push(...s):sr(s),r.$$.on_mount=[]}),o.forEach(vs)}function ur(r,t){const e=r.$$;e.fragment!==null&&(_l(e.after_update),sr(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function Cl(r,t){r.$$.dirty[0]===-1&&(mi.push(r),yl(),r.$$.dirty.fill(0)),r.$$.dirty[t/31|0]|=1<<t%31}function Lr(r,t,e,n,i,o,s,a=[-1]){const u=Zi;Ji(r);const l=r.$$={fragment:null,ctx:[],props:o,update:_t,not_equal:i,bound:aa(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:aa(),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&&Cl(r,f)),h}):[],l.update(),c=!0,sr(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){const f=hl(t.target);l.fragment&&l.fragment.l(f),f.forEach(Lt)}else l.fragment&&l.fragment.c();t.intro&&Bt(r.$$.fragment),ar(r,t.target,t.anchor,t.customElement),da()}Ji(u)}class br{$destroy(){ur(this,1),this.$destroy=_t}$on(t,e){if(!ua(e))return _t;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&&!ol(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Ff="";function Nl(r){let t,e;return{c(){t=zn("svg"),e=zn("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){Dt(n,t,i),nt(t,e)},p:_t,i:_t,o:_t,d(n){n&&Lt(t)}}}class va extends br{constructor(t){super(),Lr(this,t,null,Nl,Nr,{})}}const kf="";function xl(r){let t,e;return{c(){t=zn("svg"),e=zn("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){Dt(n,t,i),nt(t,e)},p:_t,i:_t,o:_t,d(n){n&&Lt(t)}}}class ya extends br{constructor(t){super(),Lr(this,t,null,xl,Nr,{})}}const Bf="";function Sl(r){let t,e;return{c(){t=ht("img"),xr(t.src,e="/icons/area.svg")||P(t,"src",e),P(t,"alt",r[4]),P(t,"class","svelte-ltkwvy")},m(n,i){Dt(n,t,i)},p(n,i){i&16&&P(t,"alt",n[4])},d(n){n&&Lt(t)}}}function wl(r){let t,e;return{c(){t=ht("img"),xr(t.src,e="/icons/poi.svg")||P(t,"src",e),P(t,"alt",r[4]),P(t,"class","svelte-ltkwvy")},m(n,i){Dt(n,t,i)},p(n,i){i&16&&P(t,"alt",n[4])},d(n){n&&Lt(t)}}}function Ll(r){let t,e;return{c(){t=ht("img"),xr(t.src,e="/icons/postal_code.svg")||P(t,"src",e),P(t,"alt",r[4]),P(t,"class","svelte-ltkwvy")},m(n,i){Dt(n,t,i)},p(n,i){i&16&&P(t,"alt",n[4])},d(n){n&&Lt(t)}}}function bl(r){let t,e;return{c(){t=ht("img"),xr(t.src,e="/icons/street.svg")||P(t,"src",e),P(t,"alt",r[4]),P(t,"class","svelte-ltkwvy")},m(n,i){Dt(n,t,i)},p(n,i){i&16&&P(t,"alt",n[4])},d(n){n&&Lt(t)}}}function Pl(r){let t,e;return{c(){t=ht("img"),xr(t.src,e="/icons/road.svg")||P(t,"src",e),P(t,"alt",r[4]),P(t,"class","svelte-ltkwvy")},m(n,i){Dt(n,t,i)},p(n,i){i&16&&P(t,"alt",n[4])},d(n){n&&Lt(t)}}}function Rl(r){let t,e;return{c(){t=ht("img"),xr(t.src,e="/icons/housenumber.svg")||P(t,"src",e),P(t,"alt",r[4]),P(t,"class","svelte-ltkwvy")},m(n,i){Dt(n,t,i)},p(n,i){i&16&&P(t,"alt",n[4])},d(n){n&&Lt(t)}}}function Ol(r){let t,e,n,i;return{c(){t=ht("img"),xr(t.src,e=r[5])||P(t,"src",e),P(t,"alt",r[3]),P(t,"class","svelte-ltkwvy")},m(o,s){Dt(o,t,s),n||(i=Ie(t,"error",r[10]),n=!0)},p(o,s){s&32&&!xr(t.src,e=o[5])&&P(t,"src",e),s&8&&P(t,"alt",o[3])},d(o){o&&Lt(t),n=!1,i()}}}function ma(r){let t,e;return{c(){t=ht("span"),e=Sr(r[4]),P(t,"class","secondary svelte-ltkwvy")},m(n,i){Dt(n,t,i),nt(t,e)},p(n,i){i&16&&Qi(e,n[4])},d(n){n&&Lt(t)}}}function Tl(r){var T,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&&((T=r[0].properties)==null?void 0:T.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,y=r[0].place_name.replace(/[^,]*,?\s*/,"")+"",d,m,E;function C(L,F){var X,R;return F&1&&(e=null),F&1&&(n=null),F&1&&(i=null),L[5]?Ol:L[0].address?Rl:((X=L[0].properties)==null?void 0:X.kind)==="road"||((R=L[0].properties)==null?void 0:R.kind)==="road_relation"?Pl:(e==null&&(e=!!L[0].id.startsWith("address.")),e?bl:(n==null&&(n=!!L[0].id.startsWith("postal_code.")),n?Ll:(i==null&&(i=!!L[0].id.startsWith("poi.")),i?wl:Sl)))}let w=C(r,-1),N=w(r),S=h&&ma(r);return{c(){t=ht("li"),N.c(),o=nn(),s=ht("span"),a=ht("span"),u=ht("span"),c=Sr(l),f=nn(),S&&S.c(),g=nn(),p=ht("span"),d=Sr(y),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"),rn(t,"selected",r[1])},m(L,F){Dt(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),S&&S.m(a,null),nt(s,g),nt(s,p),nt(p,d),m||(E=[Ie(t,"mouseenter",r[8]),Ie(t,"focus",r[9])],m=!0)},p(L,[F]){var X,R;w===(w=C(L,F))&&N?N.p(L,F):(N.d(1),N=w(L),N&&(N.c(),N.m(t,o))),F&1&&l!==(l=L[0].place_name.replace(/,.*/,"")+"")&&Qi(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?S?S.p(L,F):(S=ma(L),S.c(),S.m(a,null)):S&&(S.d(1),S=null),F&1&&y!==(y=L[0].place_name.replace(/[^,]*,?\s*/,"")+"")&&Qi(d,y),F&2&&P(t,"data-selected",L[1]),F&2&&rn(t,"selected",L[1])},i:_t,o:_t,d(L){L&&Lt(t),N.d(),S&&S.d(),m=!1,sr(E)}}}function Dl(r,t,e){var y;let n,i,o,s,{feature:a}=t,{selected:u=!1}=t,{showPlaceType:l}=t;const c=(y=a.properties)==null?void 0:y.categories;function f(d){n>-1?e(7,n--,n):d.style.visibility="hidden"}function h(d){ga.call(this,r,d)}function g(d){ga.call(this,r,d)}const p=d=>f(d.currentTarget);return r.$$set=d=>{"feature"in d&&e(0,a=d.feature),"selected"in d&&e(1,u=d.selected),"showPlaceType"in d&&e(2,l=d.showPlaceType)},r.$$.update=()=>{var d,m,E,C;r.$$.dirty&128&&e(3,i=c==null?void 0:c[n]),r.$$.dirty&8&&e(5,o=i?`/icons/${i.replace(/ /g,"_")}.svg`:void 0),r.$$.dirty&1&&e(4,s=a.id.startsWith("poi.")?(m=(d=a.properties)==null?void 0:d.categories)==null?void 0:m.join(", "):((C=(E=a.properties)==null?void 0:E.place_type_name)==null?void 0:C[0])??a.place_type[0])},e(7,n=((c==null?void 0:c.length)??0)-1),[a,u,l,i,s,o,f,n,h,g,p]}class Ml extends br{constructor(t){super(),Lr(this,t,Dl,Tl,Nr,{feature:0,selected:1,showPlaceType:2})}}const Gf="";function Al(r){let t;return{c(){t=ht("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){Dt(e,t,n)},p:_t,i:_t,o:_t,d(e){e&&Lt(t)}}}class Fl extends br{constructor(t){super(),Lr(this,t,null,Al,Nr,{})}}const zf="";function kl(r){let t,e;return{c(){t=zn("svg"),e=zn("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){Dt(n,t,i),nt(t,e)},p:_t,i:_t,o:_t,d(n){n&&Lt(t)}}}class Bl extends br{constructor(t){super(),Lr(this,t,null,kl,Nr,{})}}const Vf="";function Gl(r){let t,e;return{c(){t=zn("svg"),e=zn("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){Dt(n,t,i),nt(t,e)},p:_t,i:_t,o:_t,d(n){n&&Lt(t)}}}class zl extends br{constructor(t){super(),Lr(this,t,null,Gl,Nr,{})}}const Uf="";function _a(r,t,e){const n=r.slice();return n[73]=t[e],n[75]=e,n}function Ea(r){let t,e;return t=new Fl({}),{c(){wr(t.$$.fragment)},m(n,i){ar(t,n,i),e=!0},i(n){e||(Bt(t.$$.fragment,n),e=!0)},o(n){ce(t.$$.fragment,n),e=!1},d(n){ur(t,n)}}}function Ia(r){let t,e,n,i,o;return e=new Bl({}),{c(){t=ht("button"),wr(e.$$.fragment),P(t,"type","button"),P(t,"title",r[9]),P(t,"class","svelte-1r7dvt7"),rn(t,"active",r[0])},m(s,a){Dt(s,t,a),ar(e,t,null),n=!0,i||(o=Ie(t,"click",r[59]),i=!0)},p(s,a){(!n||a[0]&512)&&P(t,"title",s[9]),(!n||a[0]&1)&&rn(t,"active",s[0])},i(s){n||(Bt(e.$$.fragment,s),n=!0)},o(s){ce(e.$$.fragment,s),n=!1},d(s){s&&Lt(t),ur(e),i=!1,o()}}}function Vl(r){let t,e=[],n=new Map,i,o,s,a=r[12];const u=l=>l[73].id+(l[73].address?","+l[73].address:"");for(let l=0;l<a.length;l+=1){let c=_a(r,a,l),f=u(c);n.set(f,e[l]=Ca(f,c))}return{c(){t=ht("ul");for(let l=0;l<e.length;l+=1)e[l].c();P(t,"class","svelte-1r7dvt7")},m(l,c){Dt(l,t,c);for(let f=0;f<e.length;f+=1)e[f]&&e[f].m(t,null);i=!0,o||(s=[Ie(t,"mouseleave",r[63]),Ie(t,"blur",r[64])],o=!0)},p(l,c){c[0]&2110464&&(a=l[12],Ro(),e=Il(e,c,u,1,l,a,n,t,El,Ca,null,_a),Oo())},i(l){if(!i){for(let c=0;c<a.length;c+=1)Bt(e[c]);i=!0}},o(l){for(let c=0;c<e.length;c+=1)ce(e[c]);i=!1},d(l){l&&Lt(t);for(let c=0;c<e.length;c+=1)e[c].d();o=!1,sr(s)}}}function Ul(r){let t,e,n,i,o,s;return e=new ya({}),{c(){t=ht("div"),wr(e.$$.fragment),n=nn(),i=ht("div"),o=Sr(r[7]),P(i,"class","svelte-1r7dvt7"),P(t,"class","no-results svelte-1r7dvt7")},m(a,u){Dt(a,t,u),ar(e,t,null),nt(t,n),nt(t,i),nt(i,o),s=!0},p(a,u){(!s||u[0]&128)&&Qi(o,a[7])},i(a){s||(Bt(e.$$.fragment,a),s=!0)},o(a){ce(e.$$.fragment,a),s=!1},d(a){a&&Lt(t),ur(e)}}}function ql(r){let t="",e;return{c(){e=Sr(t)},m(n,i){Dt(n,e,i)},p:_t,i:_t,o:_t,d(n){n&&Lt(e)}}}function Xl(r){let t,e,n,i,o,s,a,u,l,c,f;return e=new ya({}),u=new va({}),{c(){t=ht("div"),wr(e.$$.fragment),n=nn(),i=ht("div"),o=Sr(r[6]),s=nn(),a=ht("button"),wr(u.$$.fragment),P(i,"class","svelte-1r7dvt7"),P(a,"class","svelte-1r7dvt7"),P(t,"class","error svelte-1r7dvt7")},m(h,g){Dt(h,t,g),ar(e,t,null),nt(t,n),nt(t,i),nt(i,o),nt(t,s),nt(t,a),ar(u,a,null),l=!0,c||(f=Ie(a,"click",r[60]),c=!0)},p(h,g){(!l||g[0]&64)&&Qi(o,h[6])},i(h){l||(Bt(e.$$.fragment,h),Bt(u.$$.fragment,h),l=!0)},o(h){ce(e.$$.fragment,h),ce(u.$$.fragment,h),l=!1},d(h){h&&Lt(t),ur(e),ur(u),c=!1,f()}}}function Ca(r,t){let e,n,i;function o(){return t[61](t[75])}function s(){return t[62](t[73])}return n=new Ml({props:{feature:t[73],showPlaceType:t[10],selected:t[13]===t[75]}}),n.$on("mouseenter",o),n.$on("focus",s),{key:r,first:null,c(){e=cl(),wr(n.$$.fragment),this.first=e},m(a,u){Dt(a,e,u),ar(n,a,u),i=!0},p(a,u){t=a;const l={};u[0]&4096&&(l.feature=t[73]),u[0]&1024&&(l.showPlaceType=t[10]),u[0]&12288&&(l.selected=t[13]===t[75]),n.$set(l)},i(a){i||(Bt(n.$$.fragment,a),i=!0)},o(a){ce(n.$$.fragment,a),i=!1},d(a){a&&Lt(e),ur(n,a)}}}function Yl(r){let t,e,n,i,o,s,a,u,l,c,f,h,g,p,y,d,m,E,C,w;i=new zl({}),c=new va({});let N=r[17]&&Ea(),S=r[5]===!0&&Ia(r);const T=r[51].default,A=sl(T,r,r[50],null),L=[Xl,ql,Ul,Vl],F=[];function X(R,Y){var D,W;return R[16]?0:R[14]?((D=R[12])==null?void 0:D.length)===0?2:R[14]&&((W=R[12])!=null&&W.length)?3:-1:1}return~(y=X(r))&&(d=F[y]=L[y](r)),{c(){t=ht("form"),e=ht("div"),n=ht("button"),wr(i.$$.fragment),o=nn(),s=ht("input"),a=nn(),u=ht("div"),l=ht("button"),wr(c.$$.fragment),f=nn(),N&&N.c(),h=nn(),S&&S.c(),g=nn(),A&&A.c(),p=nn(),d&&d.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"),rn(u,"displayable",r[1]!==""),P(e,"class","input-group svelte-1r7dvt7"),P(t,"tabindex","0"),P(t,"class",m=ca(r[2])+" svelte-1r7dvt7"),rn(t,"can-collapse",r[4]&&r[1]==="")},m(R,Y){Dt(R,t,Y),nt(t,e),nt(e,n),ar(i,n,null),nt(e,o),nt(e,s),r[53](s),fa(s,r[1]),nt(e,a),nt(e,u),nt(u,l),ar(c,l,null),nt(u,f),N&&N.m(u,null),nt(e,h),S&&S.m(e,null),nt(e,g),A&&A.m(e,null),nt(t,p),~y&&F[y].m(t,null),E=!0,C||(w=[Ie(n,"click",r[52]),Ie(s,"input",r[54]),Ie(s,"focus",r[55]),Ie(s,"blur",r[56]),Ie(s,"keydown",r[19]),Ie(s,"input",r[57]),Ie(l,"click",r[58]),Ie(t,"submit",fl(r[18]))],C=!0)},p(R,Y){(!E||Y[0]&256)&&P(s,"placeholder",R[8]),(!E||Y[0]&256)&&P(s,"aria-label",R[8]),Y[0]&2&&s.value!==R[1]&&fa(s,R[1]),(!E||Y[0]&8)&&P(l,"title",R[3]),R[17]?N?Y[0]&131072&&Bt(N,1):(N=Ea(),N.c(),Bt(N,1),N.m(u,null)):N&&(Ro(),ce(N,1,1,()=>{N=null}),Oo()),(!E||Y[0]&2)&&rn(u,"displayable",R[1]!==""),R[5]===!0?S?(S.p(R,Y),Y[0]&32&&Bt(S,1)):(S=Ia(R),S.c(),Bt(S,1),S.m(e,g)):S&&(Ro(),ce(S,1,1,()=>{S=null}),Oo()),A&&A.p&&(!E||Y[1]&524288)&&ul(A,T,R,R[50],E?al(T,R[50],Y,null):ll(R[50]),null);let D=y;y=X(R),y===D?~y&&F[y].p(R,Y):(d&&(Ro(),ce(F[D],1,1,()=>{F[D]=null}),Oo()),~y?(d=F[y],d?d.p(R,Y):(d=F[y]=L[y](R),d.c()),Bt(d,1),d.m(t,null)):d=null),(!E||Y[0]&4&&m!==(m=ca(R[2])+" svelte-1r7dvt7"))&&P(t,"class",m),(!E||Y[0]&22)&&rn(t,"can-collapse",R[4]&&R[1]==="")},i(R){E||(Bt(i.$$.fragment,R),Bt(c.$$.fragment,R),Bt(N),Bt(S),Bt(A,R),Bt(d),E=!0)},o(R){ce(i.$$.fragment,R),ce(c.$$.fragment,R),ce(N),ce(S),ce(A,R),ce(d),E=!1},d(R){R&&Lt(t),ur(i),r[53](null),ur(c),N&&N.d(),S&&S.d(),A&&A.d(R),~y&&F[y].d(),C=!1,sr(w)}}}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 Na(r){let t=[...r];return t[2]<t[0]&&(t[2]+=360),t}function Hl(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:y="Something went wrong…"}=t,{filter:d=()=>!0}=t,{flyTo:m=!0}=t,{fuzzyMatch:E=!0}=t,{language:C=void 0}=t,{limit:w=void 0}=t,{mapController:N=void 0}=t,{minLength:S=2}=t,{noResultsMessage:T="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=void 0}=t,{reverseActive:F=p==="always"}=t,{reverseButtonTitle:X="toggle reverse geocoding"}=t,{searchValue:R=""}=t,{showFullGeometry:Y=!0}=t,{showPlaceType:D="ifNeeded"}=t,{showResultsWhileTyping:W=!0}=t,{trackProximity:ut=!0}=t,{types:mt=void 0}=t,{zoom:Jt=16}=t,{maxZoom:le=18}=t,{apiUrl:Ir="https://api.maptiler.com/geocoding"}=t,{fetchParameters:Je={}}=t;function Cr(){nr.focus()}function Gn(){nr.blur()}function di(x,Ht=!0){e(1,R=x),Ht?(e(13,Wt=-1),el()):(ea(),setTimeout(()=>{nr.focus(),nr.select()}))}let $e=!1,ft,Oe,at,tl="",nr,Wt=-1,rr,fs=[],vi,ji,hs,$s;const Hr=dl();pl(()=>{N&&(N.setEventHandler(void 0),N.indicateReverse(!1),N.setSelectedMarker(-1),N.setMarkers(void 0,void 0))});function el(x){if(ji&&(clearTimeout(ji),ji=void 0),Wt>-1&&ft)e(47,at=ft[Wt]),e(1,R=at.place_name.replace(/,.*/,"")),e(16,rr=void 0),e(46,Oe=void 0),e(13,Wt=-1);else if(R){const Ht=x||!nl();ta(R,{exact:!0}).then(()=>{e(46,Oe=ft),e(47,at=void 0),Ht&&Ef()}).catch(ir=>e(16,rr=ir))}}function nl(){return/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(R)}async function ta(x,{byId:Ht=!1,exact:ir=!1}={}){e(16,rr=void 0);const Ki=nl(),tn=new URLSearchParams;C!=null&&tn.set("language",Array.isArray(C)?C.join(","):C),mt&&tn.set("types",mt.join(",")),Ki||(u&&tn.set("bbox",u.map(jr=>jr.toFixed(6)).join(",")),h&&tn.set("country",Array.isArray(h)?h.join(","):h)),Ht||(L&&tn.set("proximity",L.map(jr=>jr.toFixed(6)).join(",")),(ir||!W)&&tn.set("autocomplete","false"),tn.set("fuzzyMatch",String(E))),w!==void 0&&(!Ki||(mt==null?void 0:mt.length)===1)&&tn.set("limit",String(w)),tn.set("key",a);const yi=Ir+"/"+encodeURIComponent(x)+".json?"+tn.toString();if(yi===tl){Ht?(e(12,ft=void 0),e(47,at=fs[0])):e(12,ft=fs);return}tl=yi,vi==null||vi.abort();const Te=new AbortController;e(17,vi=Te);let ra;try{ra=await fetch(yi,{signal:Te.signal,...Je}).finally(()=>{Te===vi&&e(17,vi=void 0)})}catch(jr){if(jr&&typeof jr=="object"&&"name"in jr&&jr.name==="AbortError")return;throw new Error}if(!ra.ok)throw new Error;const ia=await ra.json();Hr("response",{url:yi,featureCollection:ia}),Ht?(e(12,ft=void 0),e(47,at=ia.features[0]),fs=[at]):(e(12,ft=ia.features.filter(d)),fs=ft,Ki&&nr.focus())}function Ef(){var ir,Ki,tn,yi;if(!(Oe!=null&&Oe.length)||!m)return;const x=[180,90,-180,-90],Ht=!Oe.some(Te=>!Te.matching_text);for(const Te of Oe)(Ht||!Te.matching_text)&&(x[0]=Math.min(x[0],((ir=Te.bbox)==null?void 0:ir[0])??Te.center[0]),x[1]=Math.min(x[1],((Ki=Te.bbox)==null?void 0:Ki[1])??Te.center[1]),x[2]=Math.max(x[2],((tn=Te.bbox)==null?void 0:tn[2])??Te.center[0]),x[3]=Math.max(x[3],((yi=Te.bbox)==null?void 0:yi[3])??Te.center[1]));N&&Oe.length>0&&(at&&x[0]===x[2]&&x[1]===x[3]?N.flyTo(at.center,Jt):N.fitBounds(Na(x),50,le))}function If(x){e(0,F=p==="always"),di(Wl(x[0],[-180,180],!0).toFixed(6)+","+x[1].toFixed(6))}function Cf(x){if(!ft)return;let Ht=x.key==="ArrowDown"?1:x.key==="ArrowUp"?-1:0;Ht?(Wt===-1&&Ht===-1&&e(13,Wt=ft.length),e(13,Wt+=Ht),Wt>=ft.length&&e(13,Wt=-1),x.preventDefault()):["ArrowLeft","ArrowRight","Home","End"].includes(x.key)&&e(13,Wt=-1)}function ea(x=!0){if(e(16,rr=void 0),W){if(ji&&clearTimeout(ji),R.length<S)return;const Ht=R;ji=window.setTimeout(()=>{ta(Ht).catch(ir=>e(16,rr=ir))},x?g:0)}else e(12,ft=void 0),e(16,rr=void 0)}function na(x){e(47,at=x),e(1,R=x.place_name),e(13,Wt=-1)}const Nf=()=>nr.focus();function xf(x){ps[x?"unshift":"push"](()=>{nr=x,e(15,nr)})}function Sf(){R=this.value,e(1,R),e(11,$e),e(25,c)}const wf=()=>e(11,$e=!0),Lf=()=>e(11,$e=!1),bf=()=>ea(),Pf=()=>{e(1,R=""),nr.focus()},Rf=()=>e(0,F=!F),Of=()=>e(16,rr=void 0),Tf=x=>e(13,Wt=x),Df=x=>na(x),Mf=()=>e(13,Wt=-1),Af=()=>{};return r.$$set=x=>{"class"in x&&e(2,s=x.class),"apiKey"in x&&e(23,a=x.apiKey),"bbox"in x&&e(24,u=x.bbox),"clearButtonTitle"in x&&e(3,l=x.clearButtonTitle),"clearOnBlur"in x&&e(25,c=x.clearOnBlur),"collapsed"in x&&e(4,f=x.collapsed),"country"in x&&e(26,h=x.country),"debounceSearch"in x&&e(27,g=x.debounceSearch),"enableReverse"in x&&e(5,p=x.enableReverse),"errorMessage"in x&&e(6,y=x.errorMessage),"filter"in x&&e(28,d=x.filter),"flyTo"in x&&e(29,m=x.flyTo),"fuzzyMatch"in x&&e(30,E=x.fuzzyMatch),"language"in x&&e(31,C=x.language),"limit"in x&&e(32,w=x.limit),"mapController"in x&&e(33,N=x.mapController),"minLength"in x&&e(34,S=x.minLength),"noResultsMessage"in x&&e(7,T=x.noResultsMessage),"placeholder"in x&&e(8,A=x.placeholder),"proximity"in x&&e(22,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(35,Y=x.showFullGeometry),"showPlaceType"in x&&e(10,D=x.showPlaceType),"showResultsWhileTyping"in x&&e(36,W=x.showResultsWhileTyping),"trackProximity"in x&&e(37,ut=x.trackProximity),"types"in x&&e(38,mt=x.types),"zoom"in x&&e(39,Jt=x.zoom),"maxZoom"in x&&e(40,le=x.maxZoom),"apiUrl"in x&&e(41,Ir=x.apiUrl),"fetchParameters"in x&&e(42,Je=x.fetchParameters),"$$scope"in x&&e(50,o=x.$$scope)},r.$$.update=()=>{if(r.$$.dirty[1]&64&&(ut||e(22,L=void 0)),r.$$.dirty[0]&33556480&&setTimeout(()=>{e(14,hs=$e),c&&!$e&&e(1,R="")}),r.$$.dirty[0]&4098|r.$$.dirty[1]&8&&R.length<S&&(e(47,at=void 0),e(12,ft=void 0),e(16,rr=void 0),e(46,Oe=ft)),r.$$.dirty[1]&65552&&Y&&at&&!at.address&&at.geometry.type==="Point"&&ta(at.id,{byId:!0}).catch(x=>e(16,rr=x)),r.$$.dirty[0]&536870912|r.$$.dirty[1]&197380&&(N&&at&&at.id!==$s&&m&&(!at.bbox||at.bbox[0]===at.bbox[2]&&at.bbox[1]===at.bbox[3]?N.flyTo(at.center,at.id.startsWith("poi.")||at.id.startsWith("address.")?le:Jt):N.fitBounds(Na(at.bbox),50,le),e(12,ft=void 0),e(46,Oe=void 0),e(13,Wt=-1)),e(48,$s=at==null?void 0:at.id)),r.$$.dirty[0]&4096|r.$$.dirty[1]&32768&&Oe!==ft&&e(46,Oe=void 0),r.$$.dirty[1]&98308&&N&&N.setMarkers(Oe,at),r.$$.dirty[0]&2&&e(13,Wt=-1),r.$$.dirty[0]&20481|r.$$.dirty[1]&68&&N&&N.setEventHandler(x=>{switch(x.type){case"mapClick":F&&If(x.coordinates);break;case"proximityChange":e(22,L=ut?x.proximity:void 0);break;case"markerClick":{const Ht=ft==null?void 0:ft.find(ir=>ir.id===x.id);Ht&&na(Ht)}break;case"markerMouseEnter":e(13,Wt=hs?(ft==null?void 0:ft.findIndex(Ht=>Ht.id===x.id))??-1:-1);break;case"markerMouseLeave":e(13,Wt=-1);break}}),r.$$.dirty[0]&8192|r.$$.dirty[1]&4&&(N==null||N.setSelectedMarker(Wt)),r.$$.dirty[0]&12288&&e(49,n=ft==null?void 0:ft[Wt]),r.$$.dirty[0]&2|r.$$.dirty[1]&4){const x=/^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(R);N==null||N.setReverseMarker(x?[Number(x[1]),Number(x[2])]:void 0)}r.$$.dirty[1]&262144&&Hr("select",n),r.$$.dirty[1]&65536&&Hr("pick",at),r.$$.dirty[0]&20480&&Hr("optionsVisibilityChange",hs&&!!ft),r.$$.dirty[0]&4096&&Hr("featuresListed",ft),r.$$.dirty[1]&32768&&Hr("featuresMarked",Oe),r.$$.dirty[0]&1&&Hr("reverseToggle",F),r.$$.dirty[0]&2&&Hr("queryChange",R),r.$$.dirty[0]&1|r.$$.dirty[1]&4&&N&&N.indicateReverse(F)},[F,R,s,l,f,p,y,T,A,X,D,$e,ft,Wt,hs,nr,rr,vi,el,Cf,ea,na,L,a,u,c,h,g,d,m,E,C,w,N,S,Y,W,ut,mt,Jt,le,Ir,Je,Cr,Gn,di,Oe,at,$s,n,o,i,Nf,xf,Sf,wf,Lf,bf,Pf,Rf,Of,Tf,Df,Mf,Af]}let jl=class extends br{constructor(t){super(),Lr(this,t,Hl,Yl,Nr,{class:2,apiKey:23,bbox:24,clearButtonTitle:3,clearOnBlur:25,collapsed:4,country:26,debounceSearch:27,enableReverse:5,errorMessage:6,filter:28,flyTo:29,fuzzyMatch:30,language:31,limit:32,mapController:33,minLength:34,noResultsMessage:7,placeholder:8,proximity:22,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:35,showPlaceType:10,showResultsWhileTyping:36,trackProximity:37,types:38,zoom:39,maxZoom:40,apiUrl:41,fetchParameters:42,focus:43,blur:44,setQuery:45},null,[-1,-1,-1])}get focus(){return this.$$.ctx[43]}get blur(){return this.$$.ctx[44]}get setQuery(){return this.$$.ctx[45]}};/**
2
2
  * splaytree v3.1.1
3
3
  * Fast Splay tree for Node and browser
4
4
  *