@maptiler/geocoding-control 0.0.96-alpha.1 → 0.0.96-alpha.2

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(ht,vt){typeof exports=="object"&&typeof module<"u"?vt(exports,require("@maptiler/sdk")):typeof define=="function"&&define.amd?define(["exports","@maptiler/sdk"],vt):(ht=typeof globalThis<"u"?globalThis:ht||self,vt(ht.maptilersdkMaptilerGeocoder={},ht.maptilersdk))})(this,function(ht,vt){var kn,pi;"use strict";var zf=Object.defineProperty;var Uf=(ht,vt,te)=>vt in ht?zf(ht,vt,{enumerable:!0,configurable:!0,writable:!0,value:te}):ht[vt]=te;var sa=(ht,vt,te)=>(Uf(ht,typeof vt!="symbol"?vt+"":vt,te),te),sl=(ht,vt,te)=>{if(!vt.has(ht))throw TypeError("Cannot "+te)};var sr=(ht,vt,te)=>(sl(ht,vt,"read from private field"),te?te.call(ht):vt.get(ht)),aa=(ht,vt,te)=>{if(vt.has(ht))throw TypeError("Cannot add the same private member more than once");vt instanceof WeakSet?vt.add(ht):vt.set(ht,te)},ps=(ht,vt,te,bo)=>(sl(ht,vt,"write to private field"),bo?bo.call(ht,te):vt.set(ht,te),te);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 bo=te(vt);function It(){}function al(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 ar(r){r.forEach(ua)}function ca(r){return typeof r=="function"}function xr(r,t){return r!=r?t==t:r!==t||r&&typeof r=="object"||typeof r=="function"}let Po;function Me(r,t){return Po||(Po=document.createElement("a")),Po.href=t,r===Po.href}function ul(r){return Object.keys(r).length===0}function ll(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?al(e.ctx.slice(),r[1](n(t))):e.ctx}function cl(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 fl(r,t,e,n,i,o){if(i){const s=fa(t,e,n,o);r.p(s,i)}}function hl(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 Pt(r){r.parentNode&&r.parentNode.removeChild(r)}function gt(r){return document.createElement(r)}function Vn(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function Sr(r){return document.createTextNode(r)}function nn(){return Sr(" ")}function gl(){return Sr("")}function Ce(r,t,e,n){return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}function pl(r){return function(t){return t.preventDefault(),r.call(this,t)}}function b(r,t,e){e==null?r.removeAttribute(t):r.getAttribute(t)!==e&&r.setAttribute(t,e)}function dl(r){return Array.from(r.childNodes)}function Zi(r,t){t=""+t,r.data!==t&&(r.data=t)}function ga(r,t){r.value=t??""}function rn(r,t,e){r.classList.toggle(t,!!e)}function vl(r,t,{bubbles:e=!1,cancelable:n=!1}={}){return new CustomEvent(r,{detail:t,bubbles:e,cancelable:n})}let Ji;function $i(r){Ji=r}function pa(){if(!Ji)throw new Error("Function called outside component initialization");return Ji}function yl(r){pa().$$.on_destroy.push(r)}function ml(){const r=pa();return(t,e,{cancelable:n=!1}={})=>{const i=r.$$.callbacks[t];if(i){const o=vl(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 yi=[],ds=[];let mi=[];const va=[],_l=Promise.resolve();let vs=!1;function El(){vs||(vs=!0,_l.then(ya))}function ys(r){mi.push(r)}const ms=new Set;let _i=0;function ya(){if(_i!==0)return;const r=Ji;do{try{for(;_i<yi.length;){const t=yi[_i];_i++,$i(t),Il(t.$$)}}catch(t){throw yi.length=0,_i=0,t}for($i(null),yi.length=0,_i=0;ds.length;)ds.pop()();for(let t=0;t<mi.length;t+=1){const e=mi[t];ms.has(e)||(ms.add(e),e())}mi.length=0}while(yi.length);for(;va.length;)va.pop()();vs=!1,ms.clear(),$i(r)}function Il(r){if(r.fragment!==null){r.update(),ar(r.before_update);const t=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,t),r.after_update.forEach(ys)}}function Cl(r){const t=[],e=[];mi.forEach(n=>r.indexOf(n)===-1?t.push(n):e.push(n)),e.forEach(n=>n()),mi=t}const Ro=new Set;let Kr;function Oo(){Kr={r:0,c:[],p:Kr}}function To(){Kr.r||ar(Kr.c),Kr=Kr.p}function Gt(r,t){r&&r.i&&(Ro.delete(r),r.i(t))}function fe(r,t,e,n){if(r&&r.o){if(Ro.has(r))return;Ro.add(r),Kr.c.push(()=>{Ro.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 Nl(r,t){fe(r,1,1,()=>{t.delete(r.key)})}function xl(r,t,e,n,i,o,s,a,u,l,c,f){let h=r.length,g=o.length,p=h;const v={};for(;p--;)v[r[p].key]=p;const y=[],_=new Map,m=new Map,N=[];for(p=g;p--;){const T=f(i,o,p),A=e(T);let L=s.get(A);L?n&&N.push(()=>L.p(T,t)):(L=l(A,T),L.c()),_.set(A,y[p]=L),A in v&&m.set(A,Math.abs(p-v[A]))}const S=new Set,C=new Set;function w(T){Gt(T,1),T.m(a,c),s.set(T.key,T),c=T.first,g--}for(;h&&g;){const T=y[g-1],A=r[h-1],L=T.key,F=A.key;T===A?(c=T.first,h--,g--):_.has(F)?!s.has(L)||S.has(L)?w(T):C.has(F)?h--:m.get(L)>m.get(F)?(C.add(L),w(T)):(S.add(F),h--):(u(A,s),h--)}for(;h--;){const T=r[h];_.has(T.key)||u(T,s)}for(;g;)w(y[g-1]);return ar(N),y}function wr(r){r&&r.c()}function ur(r,t,e){const{fragment:n,after_update:i}=r.$$;n&&n.m(t,e),ys(()=>{const o=r.$$.on_mount.map(ua).filter(ca);r.$$.on_destroy?r.$$.on_destroy.push(...o):ar(o),r.$$.on_mount=[]}),i.forEach(ys)}function lr(r,t){const e=r.$$;e.fragment!==null&&(Cl(e.after_update),ar(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function Sl(r,t){r.$$.dirty[0]===-1&&(yi.push(r),El(),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=Ji;$i(r);const l=r.$$={fragment:null,ctx:[],props:o,update:It,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&&Sl(r,f)),h}):[],l.update(),c=!0,ar(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){const f=dl(t.target);l.fragment&&l.fragment.l(f),f.forEach(Pt)}else l.fragment&&l.fragment.c();t.intro&&Gt(r.$$.fragment),ur(r,t.target,t.anchor),ya()}$i(u)}class br{constructor(){sa(this,"$$");sa(this,"$$set")}$destroy(){lr(this,1),this.$destroy=It}$on(t,e){if(!ca(e))return It;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&&!ul(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const wl="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(wl);const qf="";function Ll(r){let t,e;return{c(){t=Vn("svg"),e=Vn("path"),b(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"),b(t,"viewBox","0 0 14 14"),b(t,"width","13"),b(t,"height","13"),b(t,"class","svelte-en2qvf")},m(n,i){At(n,t,i),nt(t,e)},p:It,i:It,o:It,d(n){n&&Pt(t)}}}class _a extends br{constructor(t){super(),Lr(this,t,null,Ll,xr,{})}}const Xf="";function bl(r){let t,e;return{c(){t=Vn("svg"),e=Vn("path"),b(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"),b(t,"viewBox","0 0 30 30"),b(t,"fill","none"),b(t,"xmlns","http://www.w3.org/2000/svg"),b(t,"class","svelte-d2loi5")},m(n,i){At(n,t,i),nt(t,e)},p:It,i:It,o:It,d(n){n&&Pt(t)}}}class Ea extends br{constructor(t){super(),Lr(this,t,null,bl,xr,{})}}const Yf="";function Pl(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"area.svg")||b(t,"src",e),b(t,"alt",r[6]),b(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"area.svg")&&b(t,"src",e),i&64&&b(t,"alt",n[6])},d(n){n&&Pt(t)}}}function Rl(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"poi.svg")||b(t,"src",e),b(t,"alt",r[6]),b(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"poi.svg")&&b(t,"src",e),i&64&&b(t,"alt",n[6])},d(n){n&&Pt(t)}}}function Ol(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"postal_code.svg")||b(t,"src",e),b(t,"alt",r[6]),b(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")&&b(t,"src",e),i&64&&b(t,"alt",n[6])},d(n){n&&Pt(t)}}}function Tl(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"street.svg")||b(t,"src",e),b(t,"alt",r[6]),b(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"street.svg")&&b(t,"src",e),i&64&&b(t,"alt",n[6])},d(n){n&&Pt(t)}}}function Dl(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"road.svg")||b(t,"src",e),b(t,"alt",r[6]),b(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"road.svg")&&b(t,"src",e),i&64&&b(t,"alt",n[6])},d(n){n&&Pt(t)}}}function Ml(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"housenumber.svg")||b(t,"src",e),b(t,"alt",r[6]),b(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"housenumber.svg")&&b(t,"src",e),i&64&&b(t,"alt",n[6])},d(n){n&&Pt(t)}}}function Al(r){let t,e,n,i;return{c(){t=gt("img"),Me(t.src,e=r[5])||b(t,"src",e),b(t,"alt",r[4]),b(t,"class","svelte-ltkwvy")},m(o,s){At(o,t,s),n||(i=Ce(t,"error",r[12]),n=!0)},p(o,s){s&32&&!Me(t.src,e=o[5])&&b(t,"src",e),s&16&&b(t,"alt",o[4])},d(o){o&&Pt(t),n=!1,i()}}}function Ia(r){let t,e;return{c(){t=gt("span"),e=Sr(r[6]),b(t,"class","secondary svelte-ltkwvy")},m(n,i){At(n,t,i),nt(t,e)},p(n,i){i&64&&Zi(e,n[6])},d(n){n&&Pt(t)}}}function Fl(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,v=r[0].place_name.replace(/[^,]*,?\s*/,"")+"",y,_,m;function N(L,F){var X,R;return F&1&&(e=null),F&1&&(n=null),F&1&&(i=null),L[5]?Al:L[0].address?Ml:((X=L[0].properties)==null?void 0:X.kind)==="road"||((R=L[0].properties)==null?void 0:R.kind)==="road_relation"?Dl:(e==null&&(e=!!L[0].id.startsWith("address.")),e?Tl:(n==null&&(n=!!L[0].id.startsWith("postal_code.")),n?Ol:(i==null&&(i=!!L[0].id.startsWith("poi.")),i?Rl:Pl)))}let S=N(r,-1),C=S(r),w=h&&Ia(r);return{c(){t=gt("li"),C.c(),o=nn(),s=gt("span"),a=gt("span"),u=gt("span"),c=Sr(l),f=nn(),w&&w.c(),g=nn(),p=gt("span"),y=Sr(v),b(u,"class","primary svelte-ltkwvy"),b(a,"class","svelte-ltkwvy"),b(p,"class","line2 svelte-ltkwvy"),b(s,"class","texts svelte-ltkwvy"),b(t,"tabindex","0"),b(t,"data-selected",r[1]),b(t,"class","svelte-ltkwvy"),rn(t,"selected",r[1])},m(L,F){At(L,t,F),C.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,y),_||(m=[Ce(t,"mouseenter",r[10]),Ce(t,"focus",r[11])],_=!0)},p(L,[F]){var X,R;S===(S=N(L,F))&&C?C.p(L,F):(C.d(1),C=S(L),C&&(C.c(),C.m(t,o))),F&1&&l!==(l=L[0].place_name.replace(/,.*/,"")+"")&&Zi(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&&v!==(v=L[0].place_name.replace(/[^,]*,?\s*/,"")+"")&&Zi(y,v),F&2&&b(t,"data-selected",L[1]),F&2&&rn(t,"selected",L[1])},i:It,o:It,d(L){L&&Pt(t),C.d(),w&&w.d(),_=!1,ar(m)}}}function Bl(r,t,e){var _;let n,i,{feature:o}=t,{selected:s=!1}=t,{showPlaceType:a}=t,{missingIconsCache:u}=t,{iconsBaseUrl:l}=t;const c=(_=o.properties)==null?void 0:_.categories;let f,h;function g(m){h&&u.add(h),e(9,n--,n)}function p(m){da.call(this,r,m)}function v(m){da.call(this,r,m)}const y=m=>g(m.currentTarget);return r.$$set=m=>{"feature"in m&&e(0,o=m.feature),"selected"in m&&e(1,s=m.selected),"showPlaceType"in m&&e(2,a=m.showPlaceType),"missingIconsCache"in m&&e(8,u=m.missingIconsCache),"iconsBaseUrl"in m&&e(3,l=m.iconsBaseUrl)},r.$$.update=()=>{var m,N,S,C;if(r.$$.dirty&824)do e(9,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.")?(N=(m=o.properties)==null?void 0:m.categories)==null?void 0:N.join(", "):((C=(S=o.properties)==null?void 0:S.place_type_name)==null?void 0:C[0])??o.place_type[0])},e(9,n=(c==null?void 0:c.length)??0),[o,s,a,l,f,h,i,g,u,n,p,v,y]}class kl extends br{constructor(t){super(),Lr(this,t,Bl,Fl,xr,{feature:0,selected:1,showPlaceType:2,missingIconsCache:8,iconsBaseUrl:3})}}const Wf="";function Gl(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>',b(t,"class","svelte-7cmwmc")},m(e,n){At(e,t,n)},p:It,i:It,o:It,d(e){e&&Pt(t)}}}class Vl extends br{constructor(t){super(),Lr(this,t,null,Gl,xr,{})}}const Hf="";function zl(r){let t,e;return{c(){t=Vn("svg"),e=Vn("path"),b(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"),b(t,"viewBox","0 0 60.006 21.412"),b(t,"width","14"),b(t,"height","20"),b(t,"class","svelte-en2qvf")},m(n,i){At(n,t,i),nt(t,e)},p:It,i:It,o:It,d(n){n&&Pt(t)}}}class Ul extends br{constructor(t){super(),Lr(this,t,null,zl,xr,{})}}const jf="";function ql(r){let t,e;return{c(){t=Vn("svg"),e=Vn("path"),b(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"),b(t,"width","14"),b(t,"height","14"),b(t,"viewBox","0 0 15 15"),b(t,"class","svelte-en2qvf")},m(n,i){At(n,t,i),nt(t,e)},p:It,i:It,o:It,d(n){n&&Pt(t)}}}class Xl extends br{constructor(t){super(),Lr(this,t,null,ql,xr,{})}}const Kf="";function Ca(r,t,e){const n=r.slice();return n[75]=t[e],n[77]=e,n}function Na(r){let t,e;return t=new Vl({}),{c(){wr(t.$$.fragment)},m(n,i){ur(t,n,i),e=!0},i(n){e||(Gt(t.$$.fragment,n),e=!0)},o(n){fe(t.$$.fragment,n),e=!1},d(n){lr(t,n)}}}function xa(r){let t,e,n,i,o;return e=new Ul({}),{c(){t=gt("button"),wr(e.$$.fragment),b(t,"type","button"),b(t,"title",r[9]),b(t,"class","svelte-1r7dvt7"),rn(t,"active",r[0])},m(s,a){At(s,t,a),ur(e,t,null),n=!0,i||(o=Ce(t,"click",r[61]),i=!0)},p(s,a){(!n||a[0]&512)&&b(t,"title",s[9]),(!n||a[0]&1)&&rn(t,"active",s[0])},i(s){n||(Gt(e.$$.fragment,s),n=!0)},o(s){fe(e.$$.fragment,s),n=!1},d(s){s&&Pt(t),lr(e),i=!1,o()}}}function Yl(r){let t,e=[],n=new Map,i,o,s,a=ma(r[13]);const u=l=>l[75].id+(l[75].address?","+l[75].address:"");for(let l=0;l<a.length;l+=1){let c=Ca(r,a,l),f=u(c);n.set(f,e[l]=Sa(f,c))}return{c(){t=gt("ul");for(let l=0;l<e.length;l+=1)e[l].c();b(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=[Ce(t,"mouseleave",r[65]),Ce(t,"blur",r[66])],o=!0)},p(l,c){c[0]&8940544&&(a=ma(l[13]),Oo(),e=xl(e,c,u,1,l,a,n,t,Nl,Sa,null,Ca),To())},i(l){if(!i){for(let c=0;c<a.length;c+=1)Gt(e[c]);i=!0}},o(l){for(let c=0;c<e.length;c+=1)fe(e[c]);i=!1},d(l){l&&Pt(t);for(let c=0;c<e.length;c+=1)e[c].d();o=!1,ar(s)}}}function Wl(r){let t,e,n,i,o,s;return e=new Ea({}),{c(){t=gt("div"),wr(e.$$.fragment),n=nn(),i=gt("div"),o=Sr(r[7]),b(i,"class","svelte-1r7dvt7"),b(t,"class","no-results svelte-1r7dvt7")},m(a,u){At(a,t,u),ur(e,t,null),nt(t,n),nt(t,i),nt(i,o),s=!0},p(a,u){(!s||u[0]&128)&&Zi(o,a[7])},i(a){s||(Gt(e.$$.fragment,a),s=!0)},o(a){fe(e.$$.fragment,a),s=!1},d(a){a&&Pt(t),lr(e)}}}function Hl(r){let t="",e;return{c(){e=Sr(t)},m(n,i){At(n,e,i)},p:It,i:It,o:It,d(n){n&&Pt(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"),wr(e.$$.fragment),n=nn(),i=gt("div"),o=Sr(r[6]),s=nn(),a=gt("button"),wr(u.$$.fragment),b(i,"class","svelte-1r7dvt7"),b(a,"class","svelte-1r7dvt7"),b(t,"class","error svelte-1r7dvt7")},m(h,g){At(h,t,g),ur(e,t,null),nt(t,n),nt(t,i),nt(i,o),nt(t,s),nt(t,a),ur(u,a,null),l=!0,c||(f=Ce(a,"click",r[62]),c=!0)},p(h,g){(!l||g[0]&64)&&Zi(o,h[6])},i(h){l||(Gt(e.$$.fragment,h),Gt(u.$$.fragment,h),l=!0)},o(h){fe(e.$$.fragment,h),fe(u.$$.fragment,h),l=!1},d(h){h&&Pt(t),lr(e),lr(u),c=!1,f()}}}function Sa(r,t){let e,n,i;function o(){return t[63](t[77])}function s(){return t[64](t[75])}return n=new kl({props:{feature:t[75],showPlaceType:t[10],selected:t[14]===t[77],missingIconsCache:t[19],iconsBaseUrl:t[11]}}),n.$on("mouseenter",o),n.$on("focus",s),{key:r,first:null,c(){e=gl(),wr(n.$$.fragment),this.first=e},m(a,u){At(a,e,u),ur(n,a,u),i=!0},p(a,u){t=a;const l={};u[0]&8192&&(l.feature=t[75]),u[0]&1024&&(l.showPlaceType=t[10]),u[0]&24576&&(l.selected=t[14]===t[77]),u[0]&2048&&(l.iconsBaseUrl=t[11]),n.$set(l)},i(a){i||(Gt(n.$$.fragment,a),i=!0)},o(a){fe(n.$$.fragment,a),i=!1},d(a){a&&Pt(e),lr(n,a)}}}function Kl(r){let t,e,n,i,o,s,a,u,l,c,f,h,g,p,v,y,_,m,N,S;i=new Xl({}),c=new _a({});let C=r[18]&&Na(),w=r[5]===!0&&xa(r);const T=r[53].default,A=ll(T,r,r[52],null),L=[jl,Hl,Wl,Yl],F=[];function X(R,Y){var D,W;return R[17]?0:R[15]?((D=R[13])==null?void 0:D.length)===0?2:R[15]&&((W=R[13])!=null&&W.length)?3:-1:1}return~(v=X(r))&&(y=F[v]=L[v](r)),{c(){t=gt("form"),e=gt("div"),n=gt("button"),wr(i.$$.fragment),o=nn(),s=gt("input"),a=nn(),u=gt("div"),l=gt("button"),wr(c.$$.fragment),f=nn(),C&&C.c(),h=nn(),w&&w.c(),g=nn(),A&&A.c(),p=nn(),y&&y.c(),b(n,"class","search-button svelte-1r7dvt7"),b(n,"type","button"),b(s,"placeholder",r[8]),b(s,"aria-label",r[8]),b(s,"class","svelte-1r7dvt7"),b(l,"type","button"),b(l,"title",r[3]),b(l,"class","svelte-1r7dvt7"),b(u,"class","clear-button-container svelte-1r7dvt7"),rn(u,"displayable",r[1]!==""),b(e,"class","input-group svelte-1r7dvt7"),b(t,"tabindex","0"),b(t,"class",_=ha(r[2])+" svelte-1r7dvt7"),rn(t,"can-collapse",r[4]&&r[1]==="")},m(R,Y){At(R,t,Y),nt(t,e),nt(e,n),ur(i,n,null),nt(e,o),nt(e,s),r[55](s),ga(s,r[1]),nt(e,a),nt(e,u),nt(u,l),ur(c,l,null),nt(u,f),C&&C.m(u,null),nt(e,h),w&&w.m(e,null),nt(e,g),A&&A.m(e,null),nt(t,p),~v&&F[v].m(t,null),m=!0,N||(S=[Ce(n,"click",r[54]),Ce(s,"input",r[56]),Ce(s,"focus",r[57]),Ce(s,"blur",r[58]),Ce(s,"keydown",r[21]),Ce(s,"input",r[59]),Ce(l,"click",r[60]),Ce(t,"submit",pl(r[20]))],N=!0)},p(R,Y){(!m||Y[0]&256)&&b(s,"placeholder",R[8]),(!m||Y[0]&256)&&b(s,"aria-label",R[8]),Y[0]&2&&s.value!==R[1]&&ga(s,R[1]),(!m||Y[0]&8)&&b(l,"title",R[3]),R[18]?C?Y[0]&262144&&Gt(C,1):(C=Na(),C.c(),Gt(C,1),C.m(u,null)):C&&(Oo(),fe(C,1,1,()=>{C=null}),To()),(!m||Y[0]&2)&&rn(u,"displayable",R[1]!==""),R[5]===!0?w?(w.p(R,Y),Y[0]&32&&Gt(w,1)):(w=xa(R),w.c(),Gt(w,1),w.m(e,g)):w&&(Oo(),fe(w,1,1,()=>{w=null}),To()),A&&A.p&&(!m||Y[1]&2097152)&&fl(A,T,R,R[52],m?cl(T,R[52],Y,null):hl(R[52]),null);let D=v;v=X(R),v===D?~v&&F[v].p(R,Y):(y&&(Oo(),fe(F[D],1,1,()=>{F[D]=null}),To()),~v?(y=F[v],y?y.p(R,Y):(y=F[v]=L[v](R),y.c()),Gt(y,1),y.m(t,null)):y=null),(!m||Y[0]&4&&_!==(_=ha(R[2])+" svelte-1r7dvt7"))&&b(t,"class",_),(!m||Y[0]&22)&&rn(t,"can-collapse",R[4]&&R[1]==="")},i(R){m||(Gt(i.$$.fragment,R),Gt(c.$$.fragment,R),Gt(C),Gt(w),Gt(A,R),Gt(y),m=!0)},o(R){fe(i.$$.fragment,R),fe(c.$$.fragment,R),fe(C),fe(w),fe(A,R),fe(y),m=!1},d(R){R&&Pt(t),lr(i),r[55](null),lr(c),C&&C.d(),w&&w.d(),A&&A.d(R),~v&&F[v].d(),N=!1,ar(S)}}}function Ql(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 wa(r){let t=[...r];return t[2]<t[0]&&(t[2]+=360),t}function Zl(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:v="Something went wrong…"}=t,{filter:y=()=>!0}=t,{flyTo:_=!0}=t,{fuzzyMatch:m=!0}=t,{language:N=void 0}=t,{limit:S=void 0}=t,{mapController:C=void 0}=t,{minLength:w=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:Et=void 0}=t,{zoom:$t=16}=t,{maxZoom:ce=18}=t,{apiUrl:Cr="https://api.maptiler.com/geocoding"}=t,{fetchParameters:tn={}}=t,{iconsBaseUrl:nr="https://cdn.maptiler.com/maptiler-geocoding-control/v0.0.96-alpha.1/icons/"}=t;function Gn(){rr.focus()}function Hi(){rr.blur()}function Nr(x,jt=!0){e(1,R=x),jt?(e(14,Ht=-1),il()):(na(),setTimeout(()=>{rr.focus(),rr.select()}))}let ji=!1,ft,Te,at,rl="",rr,Ht=-1,ir,hs=[],di,Ki,gs,ta;const xf=new Set,Hr=ml();yl(()=>{C&&(C.setEventHandler(void 0),C.indicateReverse(!1),C.setSelectedMarker(-1),C.setMarkers(void 0,void 0))});function il(x){if(Ki&&(clearTimeout(Ki),Ki=void 0),Ht>-1&&ft)e(49,at=ft[Ht]),e(1,R=at.place_name.replace(/,.*/,"")),e(17,ir=void 0),e(48,Te=void 0),e(14,Ht=-1);else if(R){const jt=x||!ol();ea(R,{exact:!0}).then(()=>{e(48,Te=ft),e(49,at=void 0),jt&&Sf()}).catch(or=>e(17,ir=or))}}function ol(){return/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(R)}async function ea(x,{byId:jt=!1,exact:or=!1}={}){e(17,ir=void 0);const Qi=ol(),en=new URLSearchParams;N!=null&&en.set("language",Array.isArray(N)?N.join(","):N),Et&&en.set("types",Et.join(",")),Qi||(u&&en.set("bbox",u.map(jr=>jr.toFixed(6)).join(",")),h&&en.set("country",Array.isArray(h)?h.join(","):h)),jt||(L&&en.set("proximity",L.map(jr=>jr.toFixed(6)).join(",")),(or||!W)&&en.set("autocomplete","false"),en.set("fuzzyMatch",String(m))),S!==void 0&&(!Qi||(Et==null?void 0:Et.length)===1)&&en.set("limit",String(S)),en.set("key",a);const vi=Cr+"/"+encodeURIComponent(x)+".json?"+en.toString();if(vi===rl){jt?(e(13,ft=void 0),e(49,at=hs[0])):e(13,ft=hs);return}rl=vi,di==null||di.abort();const De=new AbortController;e(18,di=De);let ia;try{ia=await fetch(vi,{signal:De.signal,...tn}).finally(()=>{De===di&&e(18,di=void 0)})}catch(jr){if(jr&&typeof jr=="object"&&"name"in jr&&jr.name==="AbortError")return;throw new Error}if(!ia.ok)throw new Error;const oa=await ia.json();Hr("response",{url:vi,featureCollection:oa}),jt?(e(13,ft=void 0),e(49,at=oa.features[0]),hs=[at]):(e(13,ft=oa.features.filter(y)),hs=ft,Qi&&rr.focus())}function Sf(){var or,Qi,en,vi;if(!(Te!=null&&Te.length)||!_)return;const x=[180,90,-180,-90],jt=!Te.some(De=>!De.matching_text);for(const De of Te)(jt||!De.matching_text)&&(x[0]=Math.min(x[0],((or=De.bbox)==null?void 0:or[0])??De.center[0]),x[1]=Math.min(x[1],((Qi=De.bbox)==null?void 0:Qi[1])??De.center[1]),x[2]=Math.max(x[2],((en=De.bbox)==null?void 0:en[2])??De.center[0]),x[3]=Math.max(x[3],((vi=De.bbox)==null?void 0:vi[3])??De.center[1]));C&&Te.length>0&&(at&&x[0]===x[2]&&x[1]===x[3]?C.flyTo(at.center,$t):C.fitBounds(wa(x),50,ce))}function wf(x){e(0,F=p==="always"),Nr(Ql(x[0],[-180,180],!0).toFixed(6)+","+x[1].toFixed(6))}function Lf(x){if(!ft)return;let jt=x.key==="ArrowDown"?1:x.key==="ArrowUp"?-1:0;jt?(Ht===-1&&jt===-1&&e(14,Ht=ft.length),e(14,Ht+=jt),Ht>=ft.length&&e(14,Ht=-1),x.preventDefault()):["ArrowLeft","ArrowRight","Home","End"].includes(x.key)&&e(14,Ht=-1)}function na(x=!0){if(e(17,ir=void 0),W){if(Ki&&clearTimeout(Ki),R.length<w)return;const jt=R;Ki=window.setTimeout(()=>{ea(jt).catch(or=>e(17,ir=or))},x?g:0)}else e(13,ft=void 0),e(17,ir=void 0)}function ra(x){e(49,at=x),e(1,R=x.place_name),e(14,Ht=-1)}const bf=()=>rr.focus();function Pf(x){ds[x?"unshift":"push"](()=>{rr=x,e(16,rr)})}function Rf(){R=this.value,e(1,R),e(12,ji),e(27,c)}const Of=()=>e(12,ji=!0),Tf=()=>e(12,ji=!1),Df=()=>na(),Mf=()=>{e(1,R=""),rr.focus()},Af=()=>e(0,F=!F),Ff=()=>e(17,ir=void 0),Bf=x=>e(14,Ht=x),kf=x=>ra(x),Gf=()=>e(14,Ht=-1),Vf=()=>{};return r.$$set=x=>{"class"in x&&e(2,s=x.class),"apiKey"in x&&e(25,a=x.apiKey),"bbox"in x&&e(26,u=x.bbox),"clearButtonTitle"in x&&e(3,l=x.clearButtonTitle),"clearOnBlur"in x&&e(27,c=x.clearOnBlur),"collapsed"in x&&e(4,f=x.collapsed),"country"in x&&e(28,h=x.country),"debounceSearch"in x&&e(29,g=x.debounceSearch),"enableReverse"in x&&e(5,p=x.enableReverse),"errorMessage"in x&&e(6,v=x.errorMessage),"filter"in x&&e(30,y=x.filter),"flyTo"in x&&e(31,_=x.flyTo),"fuzzyMatch"in x&&e(32,m=x.fuzzyMatch),"language"in x&&e(33,N=x.language),"limit"in x&&e(34,S=x.limit),"mapController"in x&&e(35,C=x.mapController),"minLength"in x&&e(36,w=x.minLength),"noResultsMessage"in x&&e(7,T=x.noResultsMessage),"placeholder"in x&&e(8,A=x.placeholder),"proximity"in x&&e(24,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,D=x.showPlaceType),"showResultsWhileTyping"in x&&e(38,W=x.showResultsWhileTyping),"trackProximity"in x&&e(39,ut=x.trackProximity),"types"in x&&e(40,Et=x.types),"zoom"in x&&e(41,$t=x.zoom),"maxZoom"in x&&e(42,ce=x.maxZoom),"apiUrl"in x&&e(43,Cr=x.apiUrl),"fetchParameters"in x&&e(44,tn=x.fetchParameters),"iconsBaseUrl"in x&&e(11,nr=x.iconsBaseUrl),"$$scope"in x&&e(52,o=x.$$scope)},r.$$.update=()=>{if(r.$$.dirty[1]&256&&(ut||e(24,L=void 0)),r.$$.dirty[0]&134221824&&setTimeout(()=>{e(15,gs=ji),c&&!ji&&e(1,R="")}),r.$$.dirty[0]&8194|r.$$.dirty[1]&32&&R.length<w&&(e(49,at=void 0),e(13,ft=void 0),e(17,ir=void 0),e(48,Te=ft)),r.$$.dirty[1]&262208&&Y&&at&&!at.address&&at.geometry.type==="Point"&&ea(at.id,{byId:!0}).catch(x=>e(17,ir=x)),r.$$.dirty[1]&789521&&(C&&at&&at.id!==ta&&_&&(!at.bbox||at.bbox[0]===at.bbox[2]&&at.bbox[1]===at.bbox[3]?C.flyTo(at.center,at.id.startsWith("poi.")||at.id.startsWith("address.")?ce:$t):C.fitBounds(wa(at.bbox),50,ce),e(13,ft=void 0),e(48,Te=void 0),e(14,Ht=-1)),e(50,ta=at==null?void 0:at.id)),r.$$.dirty[0]&8192|r.$$.dirty[1]&131072&&Te!==ft&&e(48,Te=void 0),r.$$.dirty[1]&393232&&C&&C.setMarkers(Te,at),r.$$.dirty[0]&2&&e(14,Ht=-1),r.$$.dirty[0]&40961|r.$$.dirty[1]&272&&C&&C.setEventHandler(x=>{switch(x.type){case"mapClick":F&&wf(x.coordinates);break;case"proximityChange":e(24,L=ut?x.proximity:void 0);break;case"markerClick":{const jt=ft==null?void 0:ft.find(or=>or.id===x.id);jt&&ra(jt)}break;case"markerMouseEnter":e(14,Ht=gs?(ft==null?void 0:ft.findIndex(jt=>jt.id===x.id))??-1:-1);break;case"markerMouseLeave":e(14,Ht=-1);break}}),r.$$.dirty[0]&16384|r.$$.dirty[1]&16&&(C==null||C.setSelectedMarker(Ht)),r.$$.dirty[0]&24576&&e(51,n=ft==null?void 0:ft[Ht]),r.$$.dirty[0]&2|r.$$.dirty[1]&16){const x=/^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(R);C==null||C.setReverseMarker(x?[Number(x[1]),Number(x[2])]:void 0)}r.$$.dirty[1]&1048576&&Hr("select",n),r.$$.dirty[1]&262144&&Hr("pick",at),r.$$.dirty[0]&40960&&Hr("optionsVisibilityChange",gs&&!!ft),r.$$.dirty[0]&8192&&Hr("featuresListed",ft),r.$$.dirty[1]&131072&&Hr("featuresMarked",Te),r.$$.dirty[0]&1&&Hr("reverseToggle",F),r.$$.dirty[0]&2&&Hr("queryChange",R),r.$$.dirty[0]&1|r.$$.dirty[1]&16&&C&&C.indicateReverse(F)},[F,R,s,l,f,p,v,T,A,X,D,nr,ji,ft,Ht,gs,rr,ir,di,xf,il,Lf,na,ra,L,a,u,c,h,g,y,_,m,N,S,C,w,Y,W,ut,Et,$t,ce,Cr,tn,Gn,Hi,Nr,Te,at,ta,n,o,i,bf,Pf,Rf,Of,Tf,Df,Mf,Af,Ff,Bf,kf,Gf,Vf]}let Jl=class extends br{constructor(t){super(),Lr(this,t,Zl,Kl,xr,{class:2,apiKey:25,bbox:26,clearButtonTitle:3,clearOnBlur:27,collapsed:4,country:28,debounceSearch:29,enableReverse:5,errorMessage:6,filter:30,flyTo:31,fuzzyMatch:32,language:33,limit:34,mapController:35,minLength:36,noResultsMessage:7,placeholder:8,proximity:24,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:37,showPlaceType:10,showResultsWhileTyping:38,trackProximity:39,types:40,zoom:41,maxZoom:42,apiUrl:43,fetchParameters:44,iconsBaseUrl:11,focus:45,blur:46,setQuery:47},null,[-1,-1,-1])}get focus(){return this.$$.ctx[45]}get blur(){return this.$$.ctx[46]}get setQuery(){return this.$$.ctx[47]}};/**
1
+ (function(ht,vt){typeof exports=="object"&&typeof module<"u"?vt(exports,require("@maptiler/sdk")):typeof define=="function"&&define.amd?define(["exports","@maptiler/sdk"],vt):(ht=typeof globalThis<"u"?globalThis:ht||self,vt(ht.maptilersdkMaptilerGeocoder={},ht.maptilersdk))})(this,function(ht,vt){var kn,pi;"use strict";var zf=Object.defineProperty;var Uf=(ht,vt,te)=>vt in ht?zf(ht,vt,{enumerable:!0,configurable:!0,writable:!0,value:te}):ht[vt]=te;var sa=(ht,vt,te)=>(Uf(ht,typeof vt!="symbol"?vt+"":vt,te),te),sl=(ht,vt,te)=>{if(!vt.has(ht))throw TypeError("Cannot "+te)};var sr=(ht,vt,te)=>(sl(ht,vt,"read from private field"),te?te.call(ht):vt.get(ht)),aa=(ht,vt,te)=>{if(vt.has(ht))throw TypeError("Cannot add the same private member more than once");vt instanceof WeakSet?vt.add(ht):vt.set(ht,te)},ps=(ht,vt,te,bo)=>(sl(ht,vt,"write to private field"),bo?bo.call(ht,te):vt.set(ht,te),te);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 bo=te(vt);function It(){}function al(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 ar(r){r.forEach(ua)}function ca(r){return typeof r=="function"}function xr(r,t){return r!=r?t==t:r!==t||r&&typeof r=="object"||typeof r=="function"}let Po;function Me(r,t){return Po||(Po=document.createElement("a")),Po.href=t,r===Po.href}function ul(r){return Object.keys(r).length===0}function ll(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?al(e.ctx.slice(),r[1](n(t))):e.ctx}function cl(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 fl(r,t,e,n,i,o){if(i){const s=fa(t,e,n,o);r.p(s,i)}}function hl(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 Pt(r){r.parentNode&&r.parentNode.removeChild(r)}function gt(r){return document.createElement(r)}function Vn(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function Sr(r){return document.createTextNode(r)}function nn(){return Sr(" ")}function gl(){return Sr("")}function Ce(r,t,e,n){return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}function pl(r){return function(t){return t.preventDefault(),r.call(this,t)}}function b(r,t,e){e==null?r.removeAttribute(t):r.getAttribute(t)!==e&&r.setAttribute(t,e)}function dl(r){return Array.from(r.childNodes)}function Zi(r,t){t=""+t,r.data!==t&&(r.data=t)}function ga(r,t){r.value=t??""}function rn(r,t,e){r.classList.toggle(t,!!e)}function vl(r,t,{bubbles:e=!1,cancelable:n=!1}={}){return new CustomEvent(r,{detail:t,bubbles:e,cancelable:n})}let Ji;function $i(r){Ji=r}function pa(){if(!Ji)throw new Error("Function called outside component initialization");return Ji}function yl(r){pa().$$.on_destroy.push(r)}function ml(){const r=pa();return(t,e,{cancelable:n=!1}={})=>{const i=r.$$.callbacks[t];if(i){const o=vl(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 yi=[],ds=[];let mi=[];const va=[],_l=Promise.resolve();let vs=!1;function El(){vs||(vs=!0,_l.then(ya))}function ys(r){mi.push(r)}const ms=new Set;let _i=0;function ya(){if(_i!==0)return;const r=Ji;do{try{for(;_i<yi.length;){const t=yi[_i];_i++,$i(t),Il(t.$$)}}catch(t){throw yi.length=0,_i=0,t}for($i(null),yi.length=0,_i=0;ds.length;)ds.pop()();for(let t=0;t<mi.length;t+=1){const e=mi[t];ms.has(e)||(ms.add(e),e())}mi.length=0}while(yi.length);for(;va.length;)va.pop()();vs=!1,ms.clear(),$i(r)}function Il(r){if(r.fragment!==null){r.update(),ar(r.before_update);const t=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,t),r.after_update.forEach(ys)}}function Cl(r){const t=[],e=[];mi.forEach(n=>r.indexOf(n)===-1?t.push(n):e.push(n)),e.forEach(n=>n()),mi=t}const Ro=new Set;let Kr;function Oo(){Kr={r:0,c:[],p:Kr}}function To(){Kr.r||ar(Kr.c),Kr=Kr.p}function Gt(r,t){r&&r.i&&(Ro.delete(r),r.i(t))}function fe(r,t,e,n){if(r&&r.o){if(Ro.has(r))return;Ro.add(r),Kr.c.push(()=>{Ro.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 Nl(r,t){fe(r,1,1,()=>{t.delete(r.key)})}function xl(r,t,e,n,i,o,s,a,u,l,c,f){let h=r.length,g=o.length,p=h;const v={};for(;p--;)v[r[p].key]=p;const y=[],_=new Map,m=new Map,N=[];for(p=g;p--;){const T=f(i,o,p),A=e(T);let L=s.get(A);L?n&&N.push(()=>L.p(T,t)):(L=l(A,T),L.c()),_.set(A,y[p]=L),A in v&&m.set(A,Math.abs(p-v[A]))}const S=new Set,C=new Set;function w(T){Gt(T,1),T.m(a,c),s.set(T.key,T),c=T.first,g--}for(;h&&g;){const T=y[g-1],A=r[h-1],L=T.key,F=A.key;T===A?(c=T.first,h--,g--):_.has(F)?!s.has(L)||S.has(L)?w(T):C.has(F)?h--:m.get(L)>m.get(F)?(C.add(L),w(T)):(S.add(F),h--):(u(A,s),h--)}for(;h--;){const T=r[h];_.has(T.key)||u(T,s)}for(;g;)w(y[g-1]);return ar(N),y}function wr(r){r&&r.c()}function ur(r,t,e){const{fragment:n,after_update:i}=r.$$;n&&n.m(t,e),ys(()=>{const o=r.$$.on_mount.map(ua).filter(ca);r.$$.on_destroy?r.$$.on_destroy.push(...o):ar(o),r.$$.on_mount=[]}),i.forEach(ys)}function lr(r,t){const e=r.$$;e.fragment!==null&&(Cl(e.after_update),ar(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function Sl(r,t){r.$$.dirty[0]===-1&&(yi.push(r),El(),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=Ji;$i(r);const l=r.$$={fragment:null,ctx:[],props:o,update:It,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&&Sl(r,f)),h}):[],l.update(),c=!0,ar(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){const f=dl(t.target);l.fragment&&l.fragment.l(f),f.forEach(Pt)}else l.fragment&&l.fragment.c();t.intro&&Gt(r.$$.fragment),ur(r,t.target,t.anchor),ya()}$i(u)}class br{constructor(){sa(this,"$$");sa(this,"$$set")}$destroy(){lr(this,1),this.$destroy=It}$on(t,e){if(!ca(e))return It;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&&!ul(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const wl="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(wl);const qf="";function Ll(r){let t,e;return{c(){t=Vn("svg"),e=Vn("path"),b(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"),b(t,"viewBox","0 0 14 14"),b(t,"width","13"),b(t,"height","13"),b(t,"class","svelte-en2qvf")},m(n,i){At(n,t,i),nt(t,e)},p:It,i:It,o:It,d(n){n&&Pt(t)}}}class _a extends br{constructor(t){super(),Lr(this,t,null,Ll,xr,{})}}const Xf="";function bl(r){let t,e;return{c(){t=Vn("svg"),e=Vn("path"),b(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"),b(t,"viewBox","0 0 30 30"),b(t,"fill","none"),b(t,"xmlns","http://www.w3.org/2000/svg"),b(t,"class","svelte-d2loi5")},m(n,i){At(n,t,i),nt(t,e)},p:It,i:It,o:It,d(n){n&&Pt(t)}}}class Ea extends br{constructor(t){super(),Lr(this,t,null,bl,xr,{})}}const Yf="";function Pl(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"area.svg")||b(t,"src",e),b(t,"alt",r[6]),b(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"area.svg")&&b(t,"src",e),i&64&&b(t,"alt",n[6])},d(n){n&&Pt(t)}}}function Rl(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"poi.svg")||b(t,"src",e),b(t,"alt",r[6]),b(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"poi.svg")&&b(t,"src",e),i&64&&b(t,"alt",n[6])},d(n){n&&Pt(t)}}}function Ol(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"postal_code.svg")||b(t,"src",e),b(t,"alt",r[6]),b(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")&&b(t,"src",e),i&64&&b(t,"alt",n[6])},d(n){n&&Pt(t)}}}function Tl(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"street.svg")||b(t,"src",e),b(t,"alt",r[6]),b(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"street.svg")&&b(t,"src",e),i&64&&b(t,"alt",n[6])},d(n){n&&Pt(t)}}}function Dl(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"road.svg")||b(t,"src",e),b(t,"alt",r[6]),b(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"road.svg")&&b(t,"src",e),i&64&&b(t,"alt",n[6])},d(n){n&&Pt(t)}}}function Ml(r){let t,e;return{c(){t=gt("img"),Me(t.src,e=r[3]+"housenumber.svg")||b(t,"src",e),b(t,"alt",r[6]),b(t,"class","svelte-ltkwvy")},m(n,i){At(n,t,i)},p(n,i){i&8&&!Me(t.src,e=n[3]+"housenumber.svg")&&b(t,"src",e),i&64&&b(t,"alt",n[6])},d(n){n&&Pt(t)}}}function Al(r){let t,e,n,i;return{c(){t=gt("img"),Me(t.src,e=r[5])||b(t,"src",e),b(t,"alt",r[4]),b(t,"class","svelte-ltkwvy")},m(o,s){At(o,t,s),n||(i=Ce(t,"error",r[12]),n=!0)},p(o,s){s&32&&!Me(t.src,e=o[5])&&b(t,"src",e),s&16&&b(t,"alt",o[4])},d(o){o&&Pt(t),n=!1,i()}}}function Ia(r){let t,e;return{c(){t=gt("span"),e=Sr(r[6]),b(t,"class","secondary svelte-ltkwvy")},m(n,i){At(n,t,i),nt(t,e)},p(n,i){i&64&&Zi(e,n[6])},d(n){n&&Pt(t)}}}function Fl(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,v=r[0].place_name.replace(/[^,]*,?\s*/,"")+"",y,_,m;function N(L,F){var X,R;return F&1&&(e=null),F&1&&(n=null),F&1&&(i=null),L[5]?Al:L[0].address?Ml:((X=L[0].properties)==null?void 0:X.kind)==="road"||((R=L[0].properties)==null?void 0:R.kind)==="road_relation"?Dl:(e==null&&(e=!!L[0].id.startsWith("address.")),e?Tl:(n==null&&(n=!!L[0].id.startsWith("postal_code.")),n?Ol:(i==null&&(i=!!L[0].id.startsWith("poi.")),i?Rl:Pl)))}let S=N(r,-1),C=S(r),w=h&&Ia(r);return{c(){t=gt("li"),C.c(),o=nn(),s=gt("span"),a=gt("span"),u=gt("span"),c=Sr(l),f=nn(),w&&w.c(),g=nn(),p=gt("span"),y=Sr(v),b(u,"class","primary svelte-ltkwvy"),b(a,"class","svelte-ltkwvy"),b(p,"class","line2 svelte-ltkwvy"),b(s,"class","texts svelte-ltkwvy"),b(t,"tabindex","0"),b(t,"data-selected",r[1]),b(t,"class","svelte-ltkwvy"),rn(t,"selected",r[1])},m(L,F){At(L,t,F),C.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,y),_||(m=[Ce(t,"mouseenter",r[10]),Ce(t,"focus",r[11])],_=!0)},p(L,[F]){var X,R;S===(S=N(L,F))&&C?C.p(L,F):(C.d(1),C=S(L),C&&(C.c(),C.m(t,o))),F&1&&l!==(l=L[0].place_name.replace(/,.*/,"")+"")&&Zi(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&&v!==(v=L[0].place_name.replace(/[^,]*,?\s*/,"")+"")&&Zi(y,v),F&2&&b(t,"data-selected",L[1]),F&2&&rn(t,"selected",L[1])},i:It,o:It,d(L){L&&Pt(t),C.d(),w&&w.d(),_=!1,ar(m)}}}function Bl(r,t,e){var _;let n,i,{feature:o}=t,{selected:s=!1}=t,{showPlaceType:a}=t,{missingIconsCache:u}=t,{iconsBaseUrl:l}=t;const c=(_=o.properties)==null?void 0:_.categories;let f,h;function g(m){h&&u.add(h),e(9,n--,n)}function p(m){da.call(this,r,m)}function v(m){da.call(this,r,m)}const y=m=>g(m.currentTarget);return r.$$set=m=>{"feature"in m&&e(0,o=m.feature),"selected"in m&&e(1,s=m.selected),"showPlaceType"in m&&e(2,a=m.showPlaceType),"missingIconsCache"in m&&e(8,u=m.missingIconsCache),"iconsBaseUrl"in m&&e(3,l=m.iconsBaseUrl)},r.$$.update=()=>{var m,N,S,C;if(r.$$.dirty&824)do e(9,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.")?(N=(m=o.properties)==null?void 0:m.categories)==null?void 0:N.join(", "):((C=(S=o.properties)==null?void 0:S.place_type_name)==null?void 0:C[0])??o.place_type[0])},e(9,n=(c==null?void 0:c.length)??0),[o,s,a,l,f,h,i,g,u,n,p,v,y]}class kl extends br{constructor(t){super(),Lr(this,t,Bl,Fl,xr,{feature:0,selected:1,showPlaceType:2,missingIconsCache:8,iconsBaseUrl:3})}}const Wf="";function Gl(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>',b(t,"class","svelte-7cmwmc")},m(e,n){At(e,t,n)},p:It,i:It,o:It,d(e){e&&Pt(t)}}}class Vl extends br{constructor(t){super(),Lr(this,t,null,Gl,xr,{})}}const Hf="";function zl(r){let t,e;return{c(){t=Vn("svg"),e=Vn("path"),b(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"),b(t,"viewBox","0 0 60.006 21.412"),b(t,"width","14"),b(t,"height","20"),b(t,"class","svelte-en2qvf")},m(n,i){At(n,t,i),nt(t,e)},p:It,i:It,o:It,d(n){n&&Pt(t)}}}class Ul extends br{constructor(t){super(),Lr(this,t,null,zl,xr,{})}}const jf="";function ql(r){let t,e;return{c(){t=Vn("svg"),e=Vn("path"),b(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"),b(t,"width","14"),b(t,"height","14"),b(t,"viewBox","0 0 15 15"),b(t,"class","svelte-en2qvf")},m(n,i){At(n,t,i),nt(t,e)},p:It,i:It,o:It,d(n){n&&Pt(t)}}}class Xl extends br{constructor(t){super(),Lr(this,t,null,ql,xr,{})}}const Kf="";function Ca(r,t,e){const n=r.slice();return n[75]=t[e],n[77]=e,n}function Na(r){let t,e;return t=new Vl({}),{c(){wr(t.$$.fragment)},m(n,i){ur(t,n,i),e=!0},i(n){e||(Gt(t.$$.fragment,n),e=!0)},o(n){fe(t.$$.fragment,n),e=!1},d(n){lr(t,n)}}}function xa(r){let t,e,n,i,o;return e=new Ul({}),{c(){t=gt("button"),wr(e.$$.fragment),b(t,"type","button"),b(t,"title",r[9]),b(t,"class","svelte-1r7dvt7"),rn(t,"active",r[0])},m(s,a){At(s,t,a),ur(e,t,null),n=!0,i||(o=Ce(t,"click",r[61]),i=!0)},p(s,a){(!n||a[0]&512)&&b(t,"title",s[9]),(!n||a[0]&1)&&rn(t,"active",s[0])},i(s){n||(Gt(e.$$.fragment,s),n=!0)},o(s){fe(e.$$.fragment,s),n=!1},d(s){s&&Pt(t),lr(e),i=!1,o()}}}function Yl(r){let t,e=[],n=new Map,i,o,s,a=ma(r[13]);const u=l=>l[75].id+(l[75].address?","+l[75].address:"");for(let l=0;l<a.length;l+=1){let c=Ca(r,a,l),f=u(c);n.set(f,e[l]=Sa(f,c))}return{c(){t=gt("ul");for(let l=0;l<e.length;l+=1)e[l].c();b(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=[Ce(t,"mouseleave",r[65]),Ce(t,"blur",r[66])],o=!0)},p(l,c){c[0]&8940544&&(a=ma(l[13]),Oo(),e=xl(e,c,u,1,l,a,n,t,Nl,Sa,null,Ca),To())},i(l){if(!i){for(let c=0;c<a.length;c+=1)Gt(e[c]);i=!0}},o(l){for(let c=0;c<e.length;c+=1)fe(e[c]);i=!1},d(l){l&&Pt(t);for(let c=0;c<e.length;c+=1)e[c].d();o=!1,ar(s)}}}function Wl(r){let t,e,n,i,o,s;return e=new Ea({}),{c(){t=gt("div"),wr(e.$$.fragment),n=nn(),i=gt("div"),o=Sr(r[7]),b(i,"class","svelte-1r7dvt7"),b(t,"class","no-results svelte-1r7dvt7")},m(a,u){At(a,t,u),ur(e,t,null),nt(t,n),nt(t,i),nt(i,o),s=!0},p(a,u){(!s||u[0]&128)&&Zi(o,a[7])},i(a){s||(Gt(e.$$.fragment,a),s=!0)},o(a){fe(e.$$.fragment,a),s=!1},d(a){a&&Pt(t),lr(e)}}}function Hl(r){let t="",e;return{c(){e=Sr(t)},m(n,i){At(n,e,i)},p:It,i:It,o:It,d(n){n&&Pt(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"),wr(e.$$.fragment),n=nn(),i=gt("div"),o=Sr(r[6]),s=nn(),a=gt("button"),wr(u.$$.fragment),b(i,"class","svelte-1r7dvt7"),b(a,"class","svelte-1r7dvt7"),b(t,"class","error svelte-1r7dvt7")},m(h,g){At(h,t,g),ur(e,t,null),nt(t,n),nt(t,i),nt(i,o),nt(t,s),nt(t,a),ur(u,a,null),l=!0,c||(f=Ce(a,"click",r[62]),c=!0)},p(h,g){(!l||g[0]&64)&&Zi(o,h[6])},i(h){l||(Gt(e.$$.fragment,h),Gt(u.$$.fragment,h),l=!0)},o(h){fe(e.$$.fragment,h),fe(u.$$.fragment,h),l=!1},d(h){h&&Pt(t),lr(e),lr(u),c=!1,f()}}}function Sa(r,t){let e,n,i;function o(){return t[63](t[77])}function s(){return t[64](t[75])}return n=new kl({props:{feature:t[75],showPlaceType:t[10],selected:t[14]===t[77],missingIconsCache:t[19],iconsBaseUrl:t[11]}}),n.$on("mouseenter",o),n.$on("focus",s),{key:r,first:null,c(){e=gl(),wr(n.$$.fragment),this.first=e},m(a,u){At(a,e,u),ur(n,a,u),i=!0},p(a,u){t=a;const l={};u[0]&8192&&(l.feature=t[75]),u[0]&1024&&(l.showPlaceType=t[10]),u[0]&24576&&(l.selected=t[14]===t[77]),u[0]&2048&&(l.iconsBaseUrl=t[11]),n.$set(l)},i(a){i||(Gt(n.$$.fragment,a),i=!0)},o(a){fe(n.$$.fragment,a),i=!1},d(a){a&&Pt(e),lr(n,a)}}}function Kl(r){let t,e,n,i,o,s,a,u,l,c,f,h,g,p,v,y,_,m,N,S;i=new Xl({}),c=new _a({});let C=r[18]&&Na(),w=r[5]===!0&&xa(r);const T=r[53].default,A=ll(T,r,r[52],null),L=[jl,Hl,Wl,Yl],F=[];function X(R,Y){var D,W;return R[17]?0:R[15]?((D=R[13])==null?void 0:D.length)===0?2:R[15]&&((W=R[13])!=null&&W.length)?3:-1:1}return~(v=X(r))&&(y=F[v]=L[v](r)),{c(){t=gt("form"),e=gt("div"),n=gt("button"),wr(i.$$.fragment),o=nn(),s=gt("input"),a=nn(),u=gt("div"),l=gt("button"),wr(c.$$.fragment),f=nn(),C&&C.c(),h=nn(),w&&w.c(),g=nn(),A&&A.c(),p=nn(),y&&y.c(),b(n,"class","search-button svelte-1r7dvt7"),b(n,"type","button"),b(s,"placeholder",r[8]),b(s,"aria-label",r[8]),b(s,"class","svelte-1r7dvt7"),b(l,"type","button"),b(l,"title",r[3]),b(l,"class","svelte-1r7dvt7"),b(u,"class","clear-button-container svelte-1r7dvt7"),rn(u,"displayable",r[1]!==""),b(e,"class","input-group svelte-1r7dvt7"),b(t,"tabindex","0"),b(t,"class",_=ha(r[2])+" svelte-1r7dvt7"),rn(t,"can-collapse",r[4]&&r[1]==="")},m(R,Y){At(R,t,Y),nt(t,e),nt(e,n),ur(i,n,null),nt(e,o),nt(e,s),r[55](s),ga(s,r[1]),nt(e,a),nt(e,u),nt(u,l),ur(c,l,null),nt(u,f),C&&C.m(u,null),nt(e,h),w&&w.m(e,null),nt(e,g),A&&A.m(e,null),nt(t,p),~v&&F[v].m(t,null),m=!0,N||(S=[Ce(n,"click",r[54]),Ce(s,"input",r[56]),Ce(s,"focus",r[57]),Ce(s,"blur",r[58]),Ce(s,"keydown",r[21]),Ce(s,"input",r[59]),Ce(l,"click",r[60]),Ce(t,"submit",pl(r[20]))],N=!0)},p(R,Y){(!m||Y[0]&256)&&b(s,"placeholder",R[8]),(!m||Y[0]&256)&&b(s,"aria-label",R[8]),Y[0]&2&&s.value!==R[1]&&ga(s,R[1]),(!m||Y[0]&8)&&b(l,"title",R[3]),R[18]?C?Y[0]&262144&&Gt(C,1):(C=Na(),C.c(),Gt(C,1),C.m(u,null)):C&&(Oo(),fe(C,1,1,()=>{C=null}),To()),(!m||Y[0]&2)&&rn(u,"displayable",R[1]!==""),R[5]===!0?w?(w.p(R,Y),Y[0]&32&&Gt(w,1)):(w=xa(R),w.c(),Gt(w,1),w.m(e,g)):w&&(Oo(),fe(w,1,1,()=>{w=null}),To()),A&&A.p&&(!m||Y[1]&2097152)&&fl(A,T,R,R[52],m?cl(T,R[52],Y,null):hl(R[52]),null);let D=v;v=X(R),v===D?~v&&F[v].p(R,Y):(y&&(Oo(),fe(F[D],1,1,()=>{F[D]=null}),To()),~v?(y=F[v],y?y.p(R,Y):(y=F[v]=L[v](R),y.c()),Gt(y,1),y.m(t,null)):y=null),(!m||Y[0]&4&&_!==(_=ha(R[2])+" svelte-1r7dvt7"))&&b(t,"class",_),(!m||Y[0]&22)&&rn(t,"can-collapse",R[4]&&R[1]==="")},i(R){m||(Gt(i.$$.fragment,R),Gt(c.$$.fragment,R),Gt(C),Gt(w),Gt(A,R),Gt(y),m=!0)},o(R){fe(i.$$.fragment,R),fe(c.$$.fragment,R),fe(C),fe(w),fe(A,R),fe(y),m=!1},d(R){R&&Pt(t),lr(i),r[55](null),lr(c),C&&C.d(),w&&w.d(),A&&A.d(R),~v&&F[v].d(),N=!1,ar(S)}}}function Ql(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 wa(r){let t=[...r];return t[2]<t[0]&&(t[2]+=360),t}function Zl(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:v="Something went wrong…"}=t,{filter:y=()=>!0}=t,{flyTo:_=!0}=t,{fuzzyMatch:m=!0}=t,{language:N=void 0}=t,{limit:S=void 0}=t,{mapController:C=void 0}=t,{minLength:w=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:Et=void 0}=t,{zoom:$t=16}=t,{maxZoom:ce=18}=t,{apiUrl:Cr="https://api.maptiler.com/geocoding"}=t,{fetchParameters:tn={}}=t,{iconsBaseUrl:nr="https://cdn.maptiler.com/maptiler-geocoding-control/v0.0.96-alpha.2/icons/"}=t;function Gn(){rr.focus()}function Hi(){rr.blur()}function Nr(x,jt=!0){e(1,R=x),jt?(e(14,Ht=-1),il()):(na(),setTimeout(()=>{rr.focus(),rr.select()}))}let ji=!1,ft,Te,at,rl="",rr,Ht=-1,ir,hs=[],di,Ki,gs,ta;const xf=new Set,Hr=ml();yl(()=>{C&&(C.setEventHandler(void 0),C.indicateReverse(!1),C.setSelectedMarker(-1),C.setMarkers(void 0,void 0))});function il(x){if(Ki&&(clearTimeout(Ki),Ki=void 0),Ht>-1&&ft)e(49,at=ft[Ht]),e(1,R=at.place_name.replace(/,.*/,"")),e(17,ir=void 0),e(48,Te=void 0),e(14,Ht=-1);else if(R){const jt=x||!ol();ea(R,{exact:!0}).then(()=>{e(48,Te=ft),e(49,at=void 0),jt&&Sf()}).catch(or=>e(17,ir=or))}}function ol(){return/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(R)}async function ea(x,{byId:jt=!1,exact:or=!1}={}){e(17,ir=void 0);const Qi=ol(),en=new URLSearchParams;N!=null&&en.set("language",Array.isArray(N)?N.join(","):N),Et&&en.set("types",Et.join(",")),Qi||(u&&en.set("bbox",u.map(jr=>jr.toFixed(6)).join(",")),h&&en.set("country",Array.isArray(h)?h.join(","):h)),jt||(L&&en.set("proximity",L.map(jr=>jr.toFixed(6)).join(",")),(or||!W)&&en.set("autocomplete","false"),en.set("fuzzyMatch",String(m))),S!==void 0&&(!Qi||(Et==null?void 0:Et.length)===1)&&en.set("limit",String(S)),en.set("key",a);const vi=Cr+"/"+encodeURIComponent(x)+".json?"+en.toString();if(vi===rl){jt?(e(13,ft=void 0),e(49,at=hs[0])):e(13,ft=hs);return}rl=vi,di==null||di.abort();const De=new AbortController;e(18,di=De);let ia;try{ia=await fetch(vi,{signal:De.signal,...tn}).finally(()=>{De===di&&e(18,di=void 0)})}catch(jr){if(jr&&typeof jr=="object"&&"name"in jr&&jr.name==="AbortError")return;throw new Error}if(!ia.ok)throw new Error;const oa=await ia.json();Hr("response",{url:vi,featureCollection:oa}),jt?(e(13,ft=void 0),e(49,at=oa.features[0]),hs=[at]):(e(13,ft=oa.features.filter(y)),hs=ft,Qi&&rr.focus())}function Sf(){var or,Qi,en,vi;if(!(Te!=null&&Te.length)||!_)return;const x=[180,90,-180,-90],jt=!Te.some(De=>!De.matching_text);for(const De of Te)(jt||!De.matching_text)&&(x[0]=Math.min(x[0],((or=De.bbox)==null?void 0:or[0])??De.center[0]),x[1]=Math.min(x[1],((Qi=De.bbox)==null?void 0:Qi[1])??De.center[1]),x[2]=Math.max(x[2],((en=De.bbox)==null?void 0:en[2])??De.center[0]),x[3]=Math.max(x[3],((vi=De.bbox)==null?void 0:vi[3])??De.center[1]));C&&Te.length>0&&(at&&x[0]===x[2]&&x[1]===x[3]?C.flyTo(at.center,$t):C.fitBounds(wa(x),50,ce))}function wf(x){e(0,F=p==="always"),Nr(Ql(x[0],[-180,180],!0).toFixed(6)+","+x[1].toFixed(6))}function Lf(x){if(!ft)return;let jt=x.key==="ArrowDown"?1:x.key==="ArrowUp"?-1:0;jt?(Ht===-1&&jt===-1&&e(14,Ht=ft.length),e(14,Ht+=jt),Ht>=ft.length&&e(14,Ht=-1),x.preventDefault()):["ArrowLeft","ArrowRight","Home","End"].includes(x.key)&&e(14,Ht=-1)}function na(x=!0){if(e(17,ir=void 0),W){if(Ki&&clearTimeout(Ki),R.length<w)return;const jt=R;Ki=window.setTimeout(()=>{ea(jt).catch(or=>e(17,ir=or))},x?g:0)}else e(13,ft=void 0),e(17,ir=void 0)}function ra(x){e(49,at=x),e(1,R=x.place_name),e(14,Ht=-1)}const bf=()=>rr.focus();function Pf(x){ds[x?"unshift":"push"](()=>{rr=x,e(16,rr)})}function Rf(){R=this.value,e(1,R),e(12,ji),e(27,c)}const Of=()=>e(12,ji=!0),Tf=()=>e(12,ji=!1),Df=()=>na(),Mf=()=>{e(1,R=""),rr.focus()},Af=()=>e(0,F=!F),Ff=()=>e(17,ir=void 0),Bf=x=>e(14,Ht=x),kf=x=>ra(x),Gf=()=>e(14,Ht=-1),Vf=()=>{};return r.$$set=x=>{"class"in x&&e(2,s=x.class),"apiKey"in x&&e(25,a=x.apiKey),"bbox"in x&&e(26,u=x.bbox),"clearButtonTitle"in x&&e(3,l=x.clearButtonTitle),"clearOnBlur"in x&&e(27,c=x.clearOnBlur),"collapsed"in x&&e(4,f=x.collapsed),"country"in x&&e(28,h=x.country),"debounceSearch"in x&&e(29,g=x.debounceSearch),"enableReverse"in x&&e(5,p=x.enableReverse),"errorMessage"in x&&e(6,v=x.errorMessage),"filter"in x&&e(30,y=x.filter),"flyTo"in x&&e(31,_=x.flyTo),"fuzzyMatch"in x&&e(32,m=x.fuzzyMatch),"language"in x&&e(33,N=x.language),"limit"in x&&e(34,S=x.limit),"mapController"in x&&e(35,C=x.mapController),"minLength"in x&&e(36,w=x.minLength),"noResultsMessage"in x&&e(7,T=x.noResultsMessage),"placeholder"in x&&e(8,A=x.placeholder),"proximity"in x&&e(24,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,D=x.showPlaceType),"showResultsWhileTyping"in x&&e(38,W=x.showResultsWhileTyping),"trackProximity"in x&&e(39,ut=x.trackProximity),"types"in x&&e(40,Et=x.types),"zoom"in x&&e(41,$t=x.zoom),"maxZoom"in x&&e(42,ce=x.maxZoom),"apiUrl"in x&&e(43,Cr=x.apiUrl),"fetchParameters"in x&&e(44,tn=x.fetchParameters),"iconsBaseUrl"in x&&e(11,nr=x.iconsBaseUrl),"$$scope"in x&&e(52,o=x.$$scope)},r.$$.update=()=>{if(r.$$.dirty[1]&256&&(ut||e(24,L=void 0)),r.$$.dirty[0]&134221824&&setTimeout(()=>{e(15,gs=ji),c&&!ji&&e(1,R="")}),r.$$.dirty[0]&8194|r.$$.dirty[1]&32&&R.length<w&&(e(49,at=void 0),e(13,ft=void 0),e(17,ir=void 0),e(48,Te=ft)),r.$$.dirty[1]&262208&&Y&&at&&!at.address&&at.geometry.type==="Point"&&ea(at.id,{byId:!0}).catch(x=>e(17,ir=x)),r.$$.dirty[1]&789521&&(C&&at&&at.id!==ta&&_&&(!at.bbox||at.bbox[0]===at.bbox[2]&&at.bbox[1]===at.bbox[3]?C.flyTo(at.center,at.id.startsWith("poi.")||at.id.startsWith("address.")?ce:$t):C.fitBounds(wa(at.bbox),50,ce),e(13,ft=void 0),e(48,Te=void 0),e(14,Ht=-1)),e(50,ta=at==null?void 0:at.id)),r.$$.dirty[0]&8192|r.$$.dirty[1]&131072&&Te!==ft&&e(48,Te=void 0),r.$$.dirty[1]&393232&&C&&C.setMarkers(Te,at),r.$$.dirty[0]&2&&e(14,Ht=-1),r.$$.dirty[0]&40961|r.$$.dirty[1]&272&&C&&C.setEventHandler(x=>{switch(x.type){case"mapClick":F&&wf(x.coordinates);break;case"proximityChange":e(24,L=ut?x.proximity:void 0);break;case"markerClick":{const jt=ft==null?void 0:ft.find(or=>or.id===x.id);jt&&ra(jt)}break;case"markerMouseEnter":e(14,Ht=gs?(ft==null?void 0:ft.findIndex(jt=>jt.id===x.id))??-1:-1);break;case"markerMouseLeave":e(14,Ht=-1);break}}),r.$$.dirty[0]&16384|r.$$.dirty[1]&16&&(C==null||C.setSelectedMarker(Ht)),r.$$.dirty[0]&24576&&e(51,n=ft==null?void 0:ft[Ht]),r.$$.dirty[0]&2|r.$$.dirty[1]&16){const x=/^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(R);C==null||C.setReverseMarker(x?[Number(x[1]),Number(x[2])]:void 0)}r.$$.dirty[1]&1048576&&Hr("select",n),r.$$.dirty[1]&262144&&Hr("pick",at),r.$$.dirty[0]&40960&&Hr("optionsVisibilityChange",gs&&!!ft),r.$$.dirty[0]&8192&&Hr("featuresListed",ft),r.$$.dirty[1]&131072&&Hr("featuresMarked",Te),r.$$.dirty[0]&1&&Hr("reverseToggle",F),r.$$.dirty[0]&2&&Hr("queryChange",R),r.$$.dirty[0]&1|r.$$.dirty[1]&16&&C&&C.indicateReverse(F)},[F,R,s,l,f,p,v,T,A,X,D,nr,ji,ft,Ht,gs,rr,ir,di,xf,il,Lf,na,ra,L,a,u,c,h,g,y,_,m,N,S,C,w,Y,W,ut,Et,$t,ce,Cr,tn,Gn,Hi,Nr,Te,at,ta,n,o,i,bf,Pf,Rf,Of,Tf,Df,Mf,Af,Ff,Bf,kf,Gf,Vf]}let Jl=class extends br{constructor(t){super(),Lr(this,t,Zl,Kl,xr,{class:2,apiKey:25,bbox:26,clearButtonTitle:3,clearOnBlur:27,collapsed:4,country:28,debounceSearch:29,enableReverse:5,errorMessage:6,filter:30,flyTo:31,fuzzyMatch:32,language:33,limit:34,mapController:35,minLength:36,noResultsMessage:7,placeholder:8,proximity:24,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:37,showPlaceType:10,showResultsWhileTyping:38,trackProximity:39,types:40,zoom:41,maxZoom:42,apiUrl:43,fetchParameters:44,iconsBaseUrl:11,focus:45,blur:46,setQuery:47},null,[-1,-1,-1])}get focus(){return this.$$.ctx[45]}get blur(){return this.$$.ctx[46]}get setQuery(){return this.$$.ctx[47]}};/**
2
2
  * splaytree v3.1.1
3
3
  * Fast Splay tree for Node and browser
4
4
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maptiler/geocoding-control",
3
- "version": "0.0.96-alpha.1",
3
+ "version": "0.0.96-alpha.2",
4
4
  "type": "module",
5
5
  "author": {
6
6
  "name": "Martin Ždila",
package/react.js CHANGED
@@ -1412,7 +1412,7 @@ function at(n) {
1412
1412
  return e[2] < e[0] && (e[2] += 360), e;
1413
1413
  }
1414
1414
  function Wn(n, e, t) {
1415
- let r, { $$slots: l = {}, $$scope: u } = e, { class: s = void 0 } = e, { apiKey: f } = e, { bbox: d = void 0 } = e, { clearButtonTitle: o = "clear" } = e, { clearOnBlur: m = !1 } = e, { collapsed: v = !1 } = e, { country: g = void 0 } = e, { debounceSearch: B = 200 } = e, { enableReverse: I = !1 } = e, { errorMessage: T = "Something went wrong…" } = e, { filter: M = () => !0 } = e, { flyTo: A = !0 } = e, { fuzzyMatch: y = !0 } = e, { language: O = void 0 } = e, { limit: F = void 0 } = e, { mapController: h = void 0 } = e, { minLength: b = 2 } = e, { noResultsMessage: C = "Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!" } = e, { placeholder: R = "Search" } = e, { proximity: _ = void 0 } = e, { reverseActive: w = I === "always" } = e, { reverseButtonTitle: Q = "toggle reverse geocoding" } = e, { searchValue: a = "" } = e, { showFullGeometry: z = !0 } = e, { showPlaceType: x = "ifNeeded" } = e, { showResultsWhileTyping: oe = !0 } = e, { trackProximity: Ce = !0 } = e, { types: fe = void 0 } = e, { zoom: Re = 16 } = e, { maxZoom: pe = 18 } = e, { apiUrl: Ue = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: Ae = {} } = e, { iconsBaseUrl: Qe = "https://cdn.maptiler.com/maptiler-geocoding-control/v0.0.96-alpha.1/icons/" } = e;
1415
+ let r, { $$slots: l = {}, $$scope: u } = e, { class: s = void 0 } = e, { apiKey: f } = e, { bbox: d = void 0 } = e, { clearButtonTitle: o = "clear" } = e, { clearOnBlur: m = !1 } = e, { collapsed: v = !1 } = e, { country: g = void 0 } = e, { debounceSearch: B = 200 } = e, { enableReverse: I = !1 } = e, { errorMessage: T = "Something went wrong…" } = e, { filter: M = () => !0 } = e, { flyTo: A = !0 } = e, { fuzzyMatch: y = !0 } = e, { language: O = void 0 } = e, { limit: F = void 0 } = e, { mapController: h = void 0 } = e, { minLength: b = 2 } = e, { noResultsMessage: C = "Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!" } = e, { placeholder: R = "Search" } = e, { proximity: _ = void 0 } = e, { reverseActive: w = I === "always" } = e, { reverseButtonTitle: Q = "toggle reverse geocoding" } = e, { searchValue: a = "" } = e, { showFullGeometry: z = !0 } = e, { showPlaceType: x = "ifNeeded" } = e, { showResultsWhileTyping: oe = !0 } = e, { trackProximity: Ce = !0 } = e, { types: fe = void 0 } = e, { zoom: Re = 16 } = e, { maxZoom: pe = 18 } = e, { apiUrl: Ue = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: Ae = {} } = e, { iconsBaseUrl: Qe = "https://cdn.maptiler.com/maptiler-geocoding-control/v0.0.96-alpha.2/icons/" } = e;
1416
1416
  function kt() {
1417
1417
  J.focus();
1418
1418
  }
package/react.umd.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(H,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],A):(H=typeof globalThis<"u"?globalThis:H||self,A(H.MapTilerGeocoder={},H.React))})(this,function(H,A){"use strict";var An=Object.defineProperty;var Wn=(H,A,M)=>A in H?An(H,A,{enumerable:!0,configurable:!0,writable:!0,value:M}):H[A]=M;var Qe=(H,A,M)=>(Wn(H,typeof A!="symbol"?A+"":A,M),M);function M(){}function kt(n,e){for(const t in e)n[t]=e[t];return n}function Je(n){return n()}function Xe(){return Object.create(null)}function ee(n){n.forEach(Je)}function Ye(n){return typeof n=="function"}function ue(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Le;function K(n,e){return Le||(Le=document.createElement("a")),Le.href=e,n===Le.href}function pt(n){return Object.keys(n).length===0}function Tt(n,e,t,r){if(n){const l=xe(n,e,t,r);return n[0](l)}}function xe(n,e,t,r){return n[1]&&r?kt(t.ctx.slice(),n[1](r(e))):t.ctx}function Mt(n,e,t,r){if(n[2]&&r){const l=n[2](r(t));if(e.dirty===void 0)return l;if(typeof l=="object"){const u=[],s=Math.max(e.dirty.length,l.length);for(let f=0;f<s;f+=1)u[f]=e.dirty[f]|l[f];return u}return e.dirty|l}return e.dirty}function Rt(n,e,t,r,l,u){if(l){const s=xe(e,t,r,u);n.p(s,l)}}function Bt(n){if(n.ctx.length>32){const e=[],t=n.ctx.length/32;for(let r=0;r<t;r++)e[r]=-1;return e}return-1}function $e(n){return n??""}function k(n,e){n.appendChild(e)}function z(n,e,t){n.insertBefore(e,t||null)}function P(n){n.parentNode&&n.parentNode.removeChild(n)}function S(n){return document.createElement(n)}function le(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function ie(n){return document.createTextNode(n)}function J(){return ie(" ")}function Ct(){return ie("")}function q(n,e,t,r){return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}function Lt(n){return function(e){return e.preventDefault(),n.call(this,e)}}function o(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function Et(n){return Array.from(n.childNodes)}function Me(n,e){e=""+e,n.data!==e&&(n.data=e)}function et(n,e){n.value=e??""}function se(n,e,t){n.classList.toggle(e,!!t)}function St(n,e,{bubbles:t=!1,cancelable:r=!1}={}){return new CustomEvent(n,{detail:e,bubbles:t,cancelable:r})}let Re;function Be(n){Re=n}function tt(){if(!Re)throw new Error("Function called outside component initialization");return Re}function It(n){tt().$$.on_destroy.push(n)}function Pt(){const n=tt();return(e,t,{cancelable:r=!1}={})=>{const l=n.$$.callbacks[e];if(l){const u=St(e,t,{cancelable:r});return l.slice().forEach(s=>{s.call(n,u)}),!u.defaultPrevented}return!0}}function nt(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(r=>r.call(this,e))}const be=[],We=[];let we=[];const rt=[],zt=Promise.resolve();let Ne=!1;function Ut(){Ne||(Ne=!0,zt.then(lt))}function je(n){we.push(n)}const Oe=new Set;let ve=0;function lt(){if(ve!==0)return;const n=Re;do{try{for(;ve<be.length;){const e=be[ve];ve++,Be(e),At(e.$$)}}catch(e){throw be.length=0,ve=0,e}for(Be(null),be.length=0,ve=0;We.length;)We.pop()();for(let e=0;e<we.length;e+=1){const t=we[e];Oe.has(t)||(Oe.add(t),t())}we.length=0}while(be.length);for(;rt.length;)rt.pop()();Ne=!1,Oe.clear(),Be(n)}function At(n){if(n.fragment!==null){n.update(),ee(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(je)}}function Wt(n){const e=[],t=[];we.forEach(r=>n.indexOf(r)===-1?e.push(r):t.push(r)),t.forEach(r=>r()),we=e}const Ee=new Set;let ae;function Se(){ae={r:0,c:[],p:ae}}function Ie(){ae.r||ee(ae.c),ae=ae.p}function W(n,e){n&&n.i&&(Ee.delete(n),n.i(e))}function Z(n,e,t,r){if(n&&n.o){if(Ee.has(n))return;Ee.add(n),ae.c.push(()=>{Ee.delete(n),r&&(t&&n.d(1),r())}),n.o(e)}else r&&r()}function it(n){return(n==null?void 0:n.length)!==void 0?n:Array.from(n)}function Nt(n,e){Z(n,1,1,()=>{e.delete(n.key)})}function jt(n,e,t,r,l,u,s,f,d,c,m,v){let g=n.length,B=u.length,I=g;const T={};for(;I--;)T[n[I].key]=I;const R=[],N=new Map,y=new Map,G=[];for(I=B;I--;){const C=v(l,u,I),L=t(C);let _=s.get(L);_?r&&G.push(()=>_.p(C,e)):(_=c(L,C),_.c()),N.set(L,R[I]=_),L in T&&y.set(L,Math.abs(I-T[L]))}const F=new Set,h=new Set;function b(C){W(C,1),C.m(f,m),s.set(C.key,C),m=C.first,B--}for(;g&&B;){const C=R[B-1],L=n[g-1],_=C.key,w=L.key;C===L?(m=C.first,g--,B--):N.has(w)?!s.has(_)||F.has(_)?b(C):h.has(w)?g--:y.get(_)>y.get(w)?(h.add(_),b(C)):(F.add(w),g--):(d(L,s),g--)}for(;g--;){const C=n[g];N.has(C.key)||d(C,s)}for(;B;)b(R[B-1]);return ee(G),R}function oe(n){n&&n.c()}function te(n,e,t){const{fragment:r,after_update:l}=n.$$;r&&r.m(e,t),je(()=>{const u=n.$$.on_mount.map(Je).filter(Ye);n.$$.on_destroy?n.$$.on_destroy.push(...u):ee(u),n.$$.on_mount=[]}),l.forEach(je)}function ne(n,e){const t=n.$$;t.fragment!==null&&(Wt(t.after_update),ee(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Ot(n,e){n.$$.dirty[0]===-1&&(be.push(n),Ut(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<<e%31}function de(n,e,t,r,l,u,s,f=[-1]){const d=Re;Be(n);const c=n.$$={fragment:null,ctx:[],props:u,update:M,not_equal:l,bound:Xe(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(d?d.$$.context:[])),callbacks:Xe(),dirty:f,skip_bound:!1,root:e.target||d.$$.root};s&&s(c.root);let m=!1;if(c.ctx=t?t(n,e.props||{},(v,g,...B)=>{const I=B.length?B[0]:g;return c.ctx&&l(c.ctx[v],c.ctx[v]=I)&&(!c.skip_bound&&c.bound[v]&&c.bound[v](I),m&&Ot(n,v)),g}):[],c.update(),m=!0,ee(c.before_update),c.fragment=r?r(c.ctx):!1,e.target){if(e.hydrate){const v=Et(e.target);c.fragment&&c.fragment.l(v),v.forEach(P)}else c.fragment&&c.fragment.c();e.intro&&W(n.$$.fragment),te(n,e.target,e.anchor),lt()}Be(d)}class he{constructor(){Qe(this,"$$");Qe(this,"$$set")}$destroy(){ne(this,1),this.$destroy=M}$on(e,t){if(!Ye(t))return M;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(t),()=>{const l=r.indexOf(t);l!==-1&&r.splice(l,1)}}$set(e){this.$$set&&!pt(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Gt="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Gt);const Nn="";function Ft(n){let e,t;return{c(){e=le("svg"),t=le("path"),o(t,"d","M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"),o(e,"viewBox","0 0 14 14"),o(e,"width","13"),o(e,"height","13"),o(e,"class","svelte-en2qvf")},m(r,l){z(r,e,l),k(e,t)},p:M,i:M,o:M,d(r){r&&P(e)}}}class st extends he{constructor(e){super(),de(this,e,null,Ft,ue,{})}}const jn="";function Zt(n){let e,t;return{c(){e=le("svg"),t=le("path"),o(t,"d","M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"),o(e,"viewBox","0 0 30 30"),o(e,"fill","none"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","svelte-d2loi5")},m(r,l){z(r,e,l),k(e,t)},p:M,i:M,o:M,d(r){r&&P(e)}}}class ot extends he{constructor(e){super(),de(this,e,null,Zt,ue,{})}}const On="";function qt(n){let e,t;return{c(){e=S("img"),K(e.src,t=n[3]+"area.svg")||o(e,"src",t),o(e,"alt",n[6]),o(e,"class","svelte-ltkwvy")},m(r,l){z(r,e,l)},p(r,l){l&8&&!K(e.src,t=r[3]+"area.svg")&&o(e,"src",t),l&64&&o(e,"alt",r[6])},d(r){r&&P(e)}}}function Vt(n){let e,t;return{c(){e=S("img"),K(e.src,t=n[3]+"poi.svg")||o(e,"src",t),o(e,"alt",n[6]),o(e,"class","svelte-ltkwvy")},m(r,l){z(r,e,l)},p(r,l){l&8&&!K(e.src,t=r[3]+"poi.svg")&&o(e,"src",t),l&64&&o(e,"alt",r[6])},d(r){r&&P(e)}}}function Dt(n){let e,t;return{c(){e=S("img"),K(e.src,t=n[3]+"postal_code.svg")||o(e,"src",t),o(e,"alt",n[6]),o(e,"class","svelte-ltkwvy")},m(r,l){z(r,e,l)},p(r,l){l&8&&!K(e.src,t=r[3]+"postal_code.svg")&&o(e,"src",t),l&64&&o(e,"alt",r[6])},d(r){r&&P(e)}}}function Kt(n){let e,t;return{c(){e=S("img"),K(e.src,t=n[3]+"street.svg")||o(e,"src",t),o(e,"alt",n[6]),o(e,"class","svelte-ltkwvy")},m(r,l){z(r,e,l)},p(r,l){l&8&&!K(e.src,t=r[3]+"street.svg")&&o(e,"src",t),l&64&&o(e,"alt",r[6])},d(r){r&&P(e)}}}function Ht(n){let e,t;return{c(){e=S("img"),K(e.src,t=n[3]+"road.svg")||o(e,"src",t),o(e,"alt",n[6]),o(e,"class","svelte-ltkwvy")},m(r,l){z(r,e,l)},p(r,l){l&8&&!K(e.src,t=r[3]+"road.svg")&&o(e,"src",t),l&64&&o(e,"alt",r[6])},d(r){r&&P(e)}}}function Qt(n){let e,t;return{c(){e=S("img"),K(e.src,t=n[3]+"housenumber.svg")||o(e,"src",t),o(e,"alt",n[6]),o(e,"class","svelte-ltkwvy")},m(r,l){z(r,e,l)},p(r,l){l&8&&!K(e.src,t=r[3]+"housenumber.svg")&&o(e,"src",t),l&64&&o(e,"alt",r[6])},d(r){r&&P(e)}}}function Jt(n){let e,t,r,l;return{c(){e=S("img"),K(e.src,t=n[5])||o(e,"src",t),o(e,"alt",n[4]),o(e,"class","svelte-ltkwvy")},m(u,s){z(u,e,s),r||(l=q(e,"error",n[12]),r=!0)},p(u,s){s&32&&!K(e.src,t=u[5])&&o(e,"src",t),s&16&&o(e,"alt",u[4])},d(u){u&&P(e),r=!1,l()}}}function ct(n){let e,t;return{c(){e=S("span"),t=ie(n[6]),o(e,"class","secondary svelte-ltkwvy")},m(r,l){z(r,e,l),k(e,t)},p(r,l){l&64&&Me(t,r[6])},d(r){r&&P(e)}}}function Xt(n){var C,L;let e,t,r,l,u,s,f,d,c=n[0].place_name.replace(/,.*/,"")+"",m,v,g=n[2]==="always"||n[2]&&!n[0].address&&((C=n[0].properties)==null?void 0:C.kind)!=="road"&&((L=n[0].properties)==null?void 0:L.kind)!=="road_relation"&&!n[0].id.startsWith("address.")&&!n[0].id.startsWith("postal_code.")&&(!n[0].id.startsWith("poi.")||!n[5]),B,I,T=n[0].place_name.replace(/[^,]*,?\s*/,"")+"",R,N,y;function G(_,w){var X,a;return w&1&&(t=null),w&1&&(r=null),w&1&&(l=null),_[5]?Jt:_[0].address?Qt:((X=_[0].properties)==null?void 0:X.kind)==="road"||((a=_[0].properties)==null?void 0:a.kind)==="road_relation"?Ht:(t==null&&(t=!!_[0].id.startsWith("address.")),t?Kt:(r==null&&(r=!!_[0].id.startsWith("postal_code.")),r?Dt:(l==null&&(l=!!_[0].id.startsWith("poi.")),l?Vt:qt)))}let F=G(n,-1),h=F(n),b=g&&ct(n);return{c(){e=S("li"),h.c(),u=J(),s=S("span"),f=S("span"),d=S("span"),m=ie(c),v=J(),b&&b.c(),B=J(),I=S("span"),R=ie(T),o(d,"class","primary svelte-ltkwvy"),o(f,"class","svelte-ltkwvy"),o(I,"class","line2 svelte-ltkwvy"),o(s,"class","texts svelte-ltkwvy"),o(e,"tabindex","0"),o(e,"data-selected",n[1]),o(e,"class","svelte-ltkwvy"),se(e,"selected",n[1])},m(_,w){z(_,e,w),h.m(e,null),k(e,u),k(e,s),k(s,f),k(f,d),k(d,m),k(f,v),b&&b.m(f,null),k(s,B),k(s,I),k(I,R),N||(y=[q(e,"mouseenter",n[10]),q(e,"focus",n[11])],N=!0)},p(_,[w]){var X,a;F===(F=G(_,w))&&h?h.p(_,w):(h.d(1),h=F(_),h&&(h.c(),h.m(e,u))),w&1&&c!==(c=_[0].place_name.replace(/,.*/,"")+"")&&Me(m,c),w&37&&(g=_[2]==="always"||_[2]&&!_[0].address&&((X=_[0].properties)==null?void 0:X.kind)!=="road"&&((a=_[0].properties)==null?void 0:a.kind)!=="road_relation"&&!_[0].id.startsWith("address.")&&!_[0].id.startsWith("postal_code.")&&(!_[0].id.startsWith("poi.")||!_[5])),g?b?b.p(_,w):(b=ct(_),b.c(),b.m(f,null)):b&&(b.d(1),b=null),w&1&&T!==(T=_[0].place_name.replace(/[^,]*,?\s*/,"")+"")&&Me(R,T),w&2&&o(e,"data-selected",_[1]),w&2&&se(e,"selected",_[1])},i:M,o:M,d(_){_&&P(e),h.d(),b&&b.d(),N=!1,ee(y)}}}function Yt(n,e,t){var N;let r,l,{feature:u}=e,{selected:s=!1}=e,{showPlaceType:f}=e,{missingIconsCache:d}=e,{iconsBaseUrl:c}=e;const m=(N=u.properties)==null?void 0:N.categories;let v,g;function B(y){g&&d.add(g),t(9,r--,r)}function I(y){nt.call(this,n,y)}function T(y){nt.call(this,n,y)}const R=y=>B(y.currentTarget);return n.$$set=y=>{"feature"in y&&t(0,u=y.feature),"selected"in y&&t(1,s=y.selected),"showPlaceType"in y&&t(2,f=y.showPlaceType),"missingIconsCache"in y&&t(8,d=y.missingIconsCache),"iconsBaseUrl"in y&&t(3,c=y.iconsBaseUrl)},n.$$.update=()=>{var y,G,F,h;if(n.$$.dirty&824)do t(9,r--,r),t(4,v=m==null?void 0:m[r]),t(5,g=v?c+v.replace(/ /g,"_")+".svg":void 0);while(r>-1&&(!g||d.has(g)));n.$$.dirty&1&&t(6,l=u.id.startsWith("poi.")?(G=(y=u.properties)==null?void 0:y.categories)==null?void 0:G.join(", "):((h=(F=u.properties)==null?void 0:F.place_type_name)==null?void 0:h[0])??u.place_type[0])},t(9,r=(m==null?void 0:m.length)??0),[u,s,f,c,v,g,l,B,d,r,I,T,R]}class xt extends he{constructor(e){super(),de(this,e,Yt,Xt,ue,{feature:0,selected:1,showPlaceType:2,missingIconsCache:8,iconsBaseUrl:3})}}const Gn="";function $t(n){let e;return{c(){e=S("div"),e.innerHTML='<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>',o(e,"class","svelte-7cmwmc")},m(t,r){z(t,e,r)},p:M,i:M,o:M,d(t){t&&P(e)}}}class en extends he{constructor(e){super(),de(this,e,null,$t,ue,{})}}const Fn="";function tn(n){let e,t;return{c(){e=le("svg"),t=le("path"),o(t,"d","M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"),o(e,"viewBox","0 0 60.006 21.412"),o(e,"width","14"),o(e,"height","20"),o(e,"class","svelte-en2qvf")},m(r,l){z(r,e,l),k(e,t)},p:M,i:M,o:M,d(r){r&&P(e)}}}class nn extends he{constructor(e){super(),de(this,e,null,tn,ue,{})}}const Zn="";function rn(n){let e,t;return{c(){e=le("svg"),t=le("path"),o(t,"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"),o(e,"width","14"),o(e,"height","14"),o(e,"viewBox","0 0 15 15"),o(e,"class","svelte-en2qvf")},m(r,l){z(r,e,l),k(e,t)},p:M,i:M,o:M,d(r){r&&P(e)}}}class ln extends he{constructor(e){super(),de(this,e,null,rn,ue,{})}}const qn="";function ft(n,e,t){const r=n.slice();return r[75]=e[t],r[77]=t,r}function ut(n){let e,t;return e=new en({}),{c(){oe(e.$$.fragment)},m(r,l){te(e,r,l),t=!0},i(r){t||(W(e.$$.fragment,r),t=!0)},o(r){Z(e.$$.fragment,r),t=!1},d(r){ne(e,r)}}}function at(n){let e,t,r,l,u;return t=new nn({}),{c(){e=S("button"),oe(t.$$.fragment),o(e,"type","button"),o(e,"title",n[9]),o(e,"class","svelte-1r7dvt7"),se(e,"active",n[0])},m(s,f){z(s,e,f),te(t,e,null),r=!0,l||(u=q(e,"click",n[61]),l=!0)},p(s,f){(!r||f[0]&512)&&o(e,"title",s[9]),(!r||f[0]&1)&&se(e,"active",s[0])},i(s){r||(W(t.$$.fragment,s),r=!0)},o(s){Z(t.$$.fragment,s),r=!1},d(s){s&&P(e),ne(t),l=!1,u()}}}function sn(n){let e,t=[],r=new Map,l,u,s,f=it(n[13]);const d=c=>c[75].id+(c[75].address?","+c[75].address:"");for(let c=0;c<f.length;c+=1){let m=ft(n,f,c),v=d(m);r.set(v,t[c]=dt(v,m))}return{c(){e=S("ul");for(let c=0;c<t.length;c+=1)t[c].c();o(e,"class","svelte-1r7dvt7")},m(c,m){z(c,e,m);for(let v=0;v<t.length;v+=1)t[v]&&t[v].m(e,null);l=!0,u||(s=[q(e,"mouseleave",n[65]),q(e,"blur",n[66])],u=!0)},p(c,m){m[0]&8940544&&(f=it(c[13]),Se(),t=jt(t,m,d,1,c,f,r,e,Nt,dt,null,ft),Ie())},i(c){if(!l){for(let m=0;m<f.length;m+=1)W(t[m]);l=!0}},o(c){for(let m=0;m<t.length;m+=1)Z(t[m]);l=!1},d(c){c&&P(e);for(let m=0;m<t.length;m+=1)t[m].d();u=!1,ee(s)}}}function on(n){let e,t,r,l,u,s;return t=new ot({}),{c(){e=S("div"),oe(t.$$.fragment),r=J(),l=S("div"),u=ie(n[7]),o(l,"class","svelte-1r7dvt7"),o(e,"class","no-results svelte-1r7dvt7")},m(f,d){z(f,e,d),te(t,e,null),k(e,r),k(e,l),k(l,u),s=!0},p(f,d){(!s||d[0]&128)&&Me(u,f[7])},i(f){s||(W(t.$$.fragment,f),s=!0)},o(f){Z(t.$$.fragment,f),s=!1},d(f){f&&P(e),ne(t)}}}function cn(n){let e="",t;return{c(){t=ie(e)},m(r,l){z(r,t,l)},p:M,i:M,o:M,d(r){r&&P(t)}}}function fn(n){let e,t,r,l,u,s,f,d,c,m,v;return t=new ot({}),d=new st({}),{c(){e=S("div"),oe(t.$$.fragment),r=J(),l=S("div"),u=ie(n[6]),s=J(),f=S("button"),oe(d.$$.fragment),o(l,"class","svelte-1r7dvt7"),o(f,"class","svelte-1r7dvt7"),o(e,"class","error svelte-1r7dvt7")},m(g,B){z(g,e,B),te(t,e,null),k(e,r),k(e,l),k(l,u),k(e,s),k(e,f),te(d,f,null),c=!0,m||(v=q(f,"click",n[62]),m=!0)},p(g,B){(!c||B[0]&64)&&Me(u,g[6])},i(g){c||(W(t.$$.fragment,g),W(d.$$.fragment,g),c=!0)},o(g){Z(t.$$.fragment,g),Z(d.$$.fragment,g),c=!1},d(g){g&&P(e),ne(t),ne(d),m=!1,v()}}}function dt(n,e){let t,r,l;function u(){return e[63](e[77])}function s(){return e[64](e[75])}return r=new xt({props:{feature:e[75],showPlaceType:e[10],selected:e[14]===e[77],missingIconsCache:e[19],iconsBaseUrl:e[11]}}),r.$on("mouseenter",u),r.$on("focus",s),{key:n,first:null,c(){t=Ct(),oe(r.$$.fragment),this.first=t},m(f,d){z(f,t,d),te(r,f,d),l=!0},p(f,d){e=f;const c={};d[0]&8192&&(c.feature=e[75]),d[0]&1024&&(c.showPlaceType=e[10]),d[0]&24576&&(c.selected=e[14]===e[77]),d[0]&2048&&(c.iconsBaseUrl=e[11]),r.$set(c)},i(f){l||(W(r.$$.fragment,f),l=!0)},o(f){Z(r.$$.fragment,f),l=!1},d(f){f&&P(t),ne(r,f)}}}function un(n){let e,t,r,l,u,s,f,d,c,m,v,g,B,I,T,R,N,y,G,F;l=new ln({}),m=new st({});let h=n[18]&&ut(),b=n[5]===!0&&at(n);const C=n[53].default,L=Tt(C,n,n[52],null),_=[fn,cn,on,sn],w=[];function X(a,U){var re,me;return a[17]?0:a[15]?((re=a[13])==null?void 0:re.length)===0?2:a[15]&&((me=a[13])!=null&&me.length)?3:-1:1}return~(T=X(n))&&(R=w[T]=_[T](n)),{c(){e=S("form"),t=S("div"),r=S("button"),oe(l.$$.fragment),u=J(),s=S("input"),f=J(),d=S("div"),c=S("button"),oe(m.$$.fragment),v=J(),h&&h.c(),g=J(),b&&b.c(),B=J(),L&&L.c(),I=J(),R&&R.c(),o(r,"class","search-button svelte-1r7dvt7"),o(r,"type","button"),o(s,"placeholder",n[8]),o(s,"aria-label",n[8]),o(s,"class","svelte-1r7dvt7"),o(c,"type","button"),o(c,"title",n[3]),o(c,"class","svelte-1r7dvt7"),o(d,"class","clear-button-container svelte-1r7dvt7"),se(d,"displayable",n[1]!==""),o(t,"class","input-group svelte-1r7dvt7"),o(e,"tabindex","0"),o(e,"class",N=$e(n[2])+" svelte-1r7dvt7"),se(e,"can-collapse",n[4]&&n[1]==="")},m(a,U){z(a,e,U),k(e,t),k(t,r),te(l,r,null),k(t,u),k(t,s),n[55](s),et(s,n[1]),k(t,f),k(t,d),k(d,c),te(m,c,null),k(d,v),h&&h.m(d,null),k(t,g),b&&b.m(t,null),k(t,B),L&&L.m(t,null),k(e,I),~T&&w[T].m(e,null),y=!0,G||(F=[q(r,"click",n[54]),q(s,"input",n[56]),q(s,"focus",n[57]),q(s,"blur",n[58]),q(s,"keydown",n[21]),q(s,"input",n[59]),q(c,"click",n[60]),q(e,"submit",Lt(n[20]))],G=!0)},p(a,U){(!y||U[0]&256)&&o(s,"placeholder",a[8]),(!y||U[0]&256)&&o(s,"aria-label",a[8]),U[0]&2&&s.value!==a[1]&&et(s,a[1]),(!y||U[0]&8)&&o(c,"title",a[3]),a[18]?h?U[0]&262144&&W(h,1):(h=ut(),h.c(),W(h,1),h.m(d,null)):h&&(Se(),Z(h,1,1,()=>{h=null}),Ie()),(!y||U[0]&2)&&se(d,"displayable",a[1]!==""),a[5]===!0?b?(b.p(a,U),U[0]&32&&W(b,1)):(b=at(a),b.c(),W(b,1),b.m(t,B)):b&&(Se(),Z(b,1,1,()=>{b=null}),Ie()),L&&L.p&&(!y||U[1]&2097152)&&Rt(L,C,a,a[52],y?Mt(C,a[52],U,null):Bt(a[52]),null);let re=T;T=X(a),T===re?~T&&w[T].p(a,U):(R&&(Se(),Z(w[re],1,1,()=>{w[re]=null}),Ie()),~T?(R=w[T],R?R.p(a,U):(R=w[T]=_[T](a),R.c()),W(R,1),R.m(e,null)):R=null),(!y||U[0]&4&&N!==(N=$e(a[2])+" svelte-1r7dvt7"))&&o(e,"class",N),(!y||U[0]&22)&&se(e,"can-collapse",a[4]&&a[1]==="")},i(a){y||(W(l.$$.fragment,a),W(m.$$.fragment,a),W(h),W(b),W(L,a),W(R),y=!0)},o(a){Z(l.$$.fragment,a),Z(m.$$.fragment,a),Z(h),Z(b),Z(L,a),Z(R),y=!1},d(a){a&&P(e),ne(l),n[55](null),ne(m),h&&h.d(),b&&b.d(),L&&L.d(a),~T&&w[T].d(),G=!1,ee(F)}}}function an(n,e,t){const r=e[1],l=e[0],u=r-l;return n===r&&t?n:((n-l)%u+u)%u+l}function ht(n){let e=[...n];return e[2]<e[0]&&(e[2]+=360),e}function dn(n,e,t){let r,{$$slots:l={},$$scope:u}=e,{class:s=void 0}=e,{apiKey:f}=e,{bbox:d=void 0}=e,{clearButtonTitle:c="clear"}=e,{clearOnBlur:m=!1}=e,{collapsed:v=!1}=e,{country:g=void 0}=e,{debounceSearch:B=200}=e,{enableReverse:I=!1}=e,{errorMessage:T="Something went wrong…"}=e,{filter:R=()=>!0}=e,{flyTo:N=!0}=e,{fuzzyMatch:y=!0}=e,{language:G=void 0}=e,{limit:F=void 0}=e,{mapController:h=void 0}=e,{minLength:b=2}=e,{noResultsMessage:C="Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!"}=e,{placeholder:L="Search"}=e,{proximity:_=void 0}=e,{reverseActive:w=I==="always"}=e,{reverseButtonTitle:X="toggle reverse geocoding"}=e,{searchValue:a=""}=e,{showFullGeometry:U=!0}=e,{showPlaceType:re="ifNeeded"}=e,{showResultsWhileTyping:me=!0}=e,{trackProximity:Pe=!0}=e,{types:_e=void 0}=e,{zoom:ze=16}=e,{maxZoom:Ce=18}=e,{apiUrl:Ge="https://api.maptiler.com/geocoding"}=e,{fetchParameters:Fe={}}=e,{iconsBaseUrl:gt="https://cdn.maptiler.com/maptiler-geocoding-control/v0.0.96-alpha.1/icons/"}=e;function gn(){Y.focus()}function yn(){Y.blur()}function yt(i,O=!0){t(1,a=i),O?(t(14,j=-1),wt()):(Ve(),setTimeout(()=>{Y.focus(),Y.select()}))}let ke=!1,E,V,p,bt="",Y,j=-1,x,Ue=[],ge,pe,Ae,Ze;const bn=new Set,ce=Pt();It(()=>{h&&(h.setEventHandler(void 0),h.indicateReverse(!1),h.setSelectedMarker(-1),h.setMarkers(void 0,void 0))});function wt(i){if(pe&&(clearTimeout(pe),pe=void 0),j>-1&&E)t(49,p=E[j]),t(1,a=p.place_name.replace(/,.*/,"")),t(17,x=void 0),t(48,V=void 0),t(14,j=-1);else if(a){const O=i||!vt();qe(a,{exact:!0}).then(()=>{t(48,V=E),t(49,p=void 0),O&&wn()}).catch($=>t(17,x=$))}}function vt(){return/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(a)}async function qe(i,{byId:O=!1,exact:$=!1}={}){t(17,x=void 0);const Te=vt(),Q=new URLSearchParams;G!=null&&Q.set("language",Array.isArray(G)?G.join(","):G),_e&&Q.set("types",_e.join(",")),Te||(d&&Q.set("bbox",d.map(fe=>fe.toFixed(6)).join(",")),g&&Q.set("country",Array.isArray(g)?g.join(","):g)),O||(_&&Q.set("proximity",_.map(fe=>fe.toFixed(6)).join(",")),($||!me)&&Q.set("autocomplete","false"),Q.set("fuzzyMatch",String(y))),F!==void 0&&(!Te||(_e==null?void 0:_e.length)===1)&&Q.set("limit",String(F)),Q.set("key",f);const ye=Ge+"/"+encodeURIComponent(i)+".json?"+Q.toString();if(ye===bt){O?(t(13,E=void 0),t(49,p=Ue[0])):t(13,E=Ue);return}bt=ye,ge==null||ge.abort();const D=new AbortController;t(18,ge=D);let Ke;try{Ke=await fetch(ye,{signal:D.signal,...Fe}).finally(()=>{D===ge&&t(18,ge=void 0)})}catch(fe){if(fe&&typeof fe=="object"&&"name"in fe&&fe.name==="AbortError")return;throw new Error}if(!Ke.ok)throw new Error;const He=await Ke.json();ce("response",{url:ye,featureCollection:He}),O?(t(13,E=void 0),t(49,p=He.features[0]),Ue=[p]):(t(13,E=He.features.filter(R)),Ue=E,Te&&Y.focus())}function wn(){var $,Te,Q,ye;if(!(V!=null&&V.length)||!N)return;const i=[180,90,-180,-90],O=!V.some(D=>!D.matching_text);for(const D of V)(O||!D.matching_text)&&(i[0]=Math.min(i[0],(($=D.bbox)==null?void 0:$[0])??D.center[0]),i[1]=Math.min(i[1],((Te=D.bbox)==null?void 0:Te[1])??D.center[1]),i[2]=Math.max(i[2],((Q=D.bbox)==null?void 0:Q[2])??D.center[0]),i[3]=Math.max(i[3],((ye=D.bbox)==null?void 0:ye[3])??D.center[1]));h&&V.length>0&&(p&&i[0]===i[2]&&i[1]===i[3]?h.flyTo(p.center,ze):h.fitBounds(ht(i),50,Ce))}function vn(i){t(0,w=I==="always"),yt(an(i[0],[-180,180],!0).toFixed(6)+","+i[1].toFixed(6))}function kn(i){if(!E)return;let O=i.key==="ArrowDown"?1:i.key==="ArrowUp"?-1:0;O?(j===-1&&O===-1&&t(14,j=E.length),t(14,j+=O),j>=E.length&&t(14,j=-1),i.preventDefault()):["ArrowLeft","ArrowRight","Home","End"].includes(i.key)&&t(14,j=-1)}function Ve(i=!0){if(t(17,x=void 0),me){if(pe&&clearTimeout(pe),a.length<b)return;const O=a;pe=window.setTimeout(()=>{qe(O).catch($=>t(17,x=$))},i?B:0)}else t(13,E=void 0),t(17,x=void 0)}function De(i){t(49,p=i),t(1,a=i.place_name),t(14,j=-1)}const pn=()=>Y.focus();function Tn(i){We[i?"unshift":"push"](()=>{Y=i,t(16,Y)})}function Mn(){a=this.value,t(1,a),t(12,ke),t(27,m)}const Rn=()=>t(12,ke=!0),Bn=()=>t(12,ke=!1),Cn=()=>Ve(),Ln=()=>{t(1,a=""),Y.focus()},En=()=>t(0,w=!w),Sn=()=>t(17,x=void 0),In=i=>t(14,j=i),Pn=i=>De(i),zn=()=>t(14,j=-1),Un=()=>{};return n.$$set=i=>{"class"in i&&t(2,s=i.class),"apiKey"in i&&t(25,f=i.apiKey),"bbox"in i&&t(26,d=i.bbox),"clearButtonTitle"in i&&t(3,c=i.clearButtonTitle),"clearOnBlur"in i&&t(27,m=i.clearOnBlur),"collapsed"in i&&t(4,v=i.collapsed),"country"in i&&t(28,g=i.country),"debounceSearch"in i&&t(29,B=i.debounceSearch),"enableReverse"in i&&t(5,I=i.enableReverse),"errorMessage"in i&&t(6,T=i.errorMessage),"filter"in i&&t(30,R=i.filter),"flyTo"in i&&t(31,N=i.flyTo),"fuzzyMatch"in i&&t(32,y=i.fuzzyMatch),"language"in i&&t(33,G=i.language),"limit"in i&&t(34,F=i.limit),"mapController"in i&&t(35,h=i.mapController),"minLength"in i&&t(36,b=i.minLength),"noResultsMessage"in i&&t(7,C=i.noResultsMessage),"placeholder"in i&&t(8,L=i.placeholder),"proximity"in i&&t(24,_=i.proximity),"reverseActive"in i&&t(0,w=i.reverseActive),"reverseButtonTitle"in i&&t(9,X=i.reverseButtonTitle),"searchValue"in i&&t(1,a=i.searchValue),"showFullGeometry"in i&&t(37,U=i.showFullGeometry),"showPlaceType"in i&&t(10,re=i.showPlaceType),"showResultsWhileTyping"in i&&t(38,me=i.showResultsWhileTyping),"trackProximity"in i&&t(39,Pe=i.trackProximity),"types"in i&&t(40,_e=i.types),"zoom"in i&&t(41,ze=i.zoom),"maxZoom"in i&&t(42,Ce=i.maxZoom),"apiUrl"in i&&t(43,Ge=i.apiUrl),"fetchParameters"in i&&t(44,Fe=i.fetchParameters),"iconsBaseUrl"in i&&t(11,gt=i.iconsBaseUrl),"$$scope"in i&&t(52,u=i.$$scope)},n.$$.update=()=>{if(n.$$.dirty[1]&256&&(Pe||t(24,_=void 0)),n.$$.dirty[0]&134221824&&setTimeout(()=>{t(15,Ae=ke),m&&!ke&&t(1,a="")}),n.$$.dirty[0]&8194|n.$$.dirty[1]&32&&a.length<b&&(t(49,p=void 0),t(13,E=void 0),t(17,x=void 0),t(48,V=E)),n.$$.dirty[1]&262208&&U&&p&&!p.address&&p.geometry.type==="Point"&&qe(p.id,{byId:!0}).catch(i=>t(17,x=i)),n.$$.dirty[1]&789521&&(h&&p&&p.id!==Ze&&N&&(!p.bbox||p.bbox[0]===p.bbox[2]&&p.bbox[1]===p.bbox[3]?h.flyTo(p.center,p.id.startsWith("poi.")||p.id.startsWith("address.")?Ce:ze):h.fitBounds(ht(p.bbox),50,Ce),t(13,E=void 0),t(48,V=void 0),t(14,j=-1)),t(50,Ze=p==null?void 0:p.id)),n.$$.dirty[0]&8192|n.$$.dirty[1]&131072&&V!==E&&t(48,V=void 0),n.$$.dirty[1]&393232&&h&&h.setMarkers(V,p),n.$$.dirty[0]&2&&t(14,j=-1),n.$$.dirty[0]&40961|n.$$.dirty[1]&272&&h&&h.setEventHandler(i=>{switch(i.type){case"mapClick":w&&vn(i.coordinates);break;case"proximityChange":t(24,_=Pe?i.proximity:void 0);break;case"markerClick":{const O=E==null?void 0:E.find($=>$.id===i.id);O&&De(O)}break;case"markerMouseEnter":t(14,j=Ae?(E==null?void 0:E.findIndex(O=>O.id===i.id))??-1:-1);break;case"markerMouseLeave":t(14,j=-1);break}}),n.$$.dirty[0]&16384|n.$$.dirty[1]&16&&(h==null||h.setSelectedMarker(j)),n.$$.dirty[0]&24576&&t(51,r=E==null?void 0:E[j]),n.$$.dirty[0]&2|n.$$.dirty[1]&16){const i=/^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(a);h==null||h.setReverseMarker(i?[Number(i[1]),Number(i[2])]:void 0)}n.$$.dirty[1]&1048576&&ce("select",r),n.$$.dirty[1]&262144&&ce("pick",p),n.$$.dirty[0]&40960&&ce("optionsVisibilityChange",Ae&&!!E),n.$$.dirty[0]&8192&&ce("featuresListed",E),n.$$.dirty[1]&131072&&ce("featuresMarked",V),n.$$.dirty[0]&1&&ce("reverseToggle",w),n.$$.dirty[0]&2&&ce("queryChange",a),n.$$.dirty[0]&1|n.$$.dirty[1]&16&&h&&h.indicateReverse(w)},[w,a,s,c,v,I,T,C,L,X,re,gt,ke,E,j,Ae,Y,x,ge,bn,wt,kn,Ve,De,_,f,d,m,g,B,R,N,y,G,F,h,b,U,me,Pe,_e,ze,Ce,Ge,Fe,gn,yn,yt,V,p,Ze,r,u,l,pn,Tn,Mn,Rn,Bn,Cn,Ln,En,Sn,In,Pn,zn,Un]}class hn extends he{constructor(e){super(),de(this,e,dn,un,ue,{class:2,apiKey:25,bbox:26,clearButtonTitle:3,clearOnBlur:27,collapsed:4,country:28,debounceSearch:29,enableReverse:5,errorMessage:6,filter:30,flyTo:31,fuzzyMatch:32,language:33,limit:34,mapController:35,minLength:36,noResultsMessage:7,placeholder:8,proximity:24,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:37,showPlaceType:10,showResultsWhileTyping:38,trackProximity:39,types:40,zoom:41,maxZoom:42,apiUrl:43,fetchParameters:44,iconsBaseUrl:11,focus:45,blur:46,setQuery:47},null,[-1,-1,-1])}get focus(){return this.$$.ctx[45]}get blur(){return this.$$.ctx[46]}get setQuery(){return this.$$.ctx[47]}}const mt=["featuresListed","featuresMarked","optionsVisibilityChange","pick","queryChange","response","reverseToggle","select"],mn=["apiKey","bbox","clearButtonTitle","clearOnBlur","collapsed","country","debounceSearch","enableReverse","reverseActive","errorMessage","filter","fuzzyMatch","language","limit","minLength","noResultsMessage","placeholder","proximity","reverseButtonTitle","showFullGeometry","showPlaceType","showResultsWhileTyping","trackProximity","types","zoom","mapController"];function _t(n){return"on"+n[0].toUpperCase()+n.slice(1)}const _n=A.forwardRef(function(e,t){const r=A.useRef(),l=A.useRef(),u={...e};for(const s of mt)delete u[_t(s)];A.useEffect(()=>{if(!r.current)throw new Error;const s=new hn({target:r.current,props:u});return l.current=s,()=>s.$destroy()},[]);for(const s of mn)A.useEffect(()=>{l.current&&e[s]!==void 0&&l.current.$set({[s]:e[s]})},[e[s]]);for(const s of mt){const f=e[_t(s)];A.useEffect(()=>{var d;return f&&((d=l.current)==null?void 0:d.$on(s,c=>{f(c.detail)}))},[f])}return A.useImperativeHandle(t,()=>({setQuery:(s,f=!0)=>{var d;return(d=l.current)==null?void 0:d.setQuery(s,f)},focus:()=>{var s;return(s=l.current)==null?void 0:s.focus()},blur:()=>{var s;return(s=l.current)==null?void 0:s.blur()}})),A.createElement("div",{ref:r})});H.GeocodingControl=_n,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"})});
1
+ (function(H,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],A):(H=typeof globalThis<"u"?globalThis:H||self,A(H.reactMaptilerGeocoder={},H.React))})(this,function(H,A){"use strict";var An=Object.defineProperty;var Wn=(H,A,M)=>A in H?An(H,A,{enumerable:!0,configurable:!0,writable:!0,value:M}):H[A]=M;var Qe=(H,A,M)=>(Wn(H,typeof A!="symbol"?A+"":A,M),M);function M(){}function kt(n,e){for(const t in e)n[t]=e[t];return n}function Je(n){return n()}function Xe(){return Object.create(null)}function ee(n){n.forEach(Je)}function Ye(n){return typeof n=="function"}function ue(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Le;function K(n,e){return Le||(Le=document.createElement("a")),Le.href=e,n===Le.href}function pt(n){return Object.keys(n).length===0}function Tt(n,e,t,r){if(n){const l=xe(n,e,t,r);return n[0](l)}}function xe(n,e,t,r){return n[1]&&r?kt(t.ctx.slice(),n[1](r(e))):t.ctx}function Mt(n,e,t,r){if(n[2]&&r){const l=n[2](r(t));if(e.dirty===void 0)return l;if(typeof l=="object"){const u=[],s=Math.max(e.dirty.length,l.length);for(let f=0;f<s;f+=1)u[f]=e.dirty[f]|l[f];return u}return e.dirty|l}return e.dirty}function Rt(n,e,t,r,l,u){if(l){const s=xe(e,t,r,u);n.p(s,l)}}function Bt(n){if(n.ctx.length>32){const e=[],t=n.ctx.length/32;for(let r=0;r<t;r++)e[r]=-1;return e}return-1}function $e(n){return n??""}function k(n,e){n.appendChild(e)}function z(n,e,t){n.insertBefore(e,t||null)}function P(n){n.parentNode&&n.parentNode.removeChild(n)}function S(n){return document.createElement(n)}function le(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function ie(n){return document.createTextNode(n)}function J(){return ie(" ")}function Ct(){return ie("")}function q(n,e,t,r){return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}function Lt(n){return function(e){return e.preventDefault(),n.call(this,e)}}function o(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function Et(n){return Array.from(n.childNodes)}function Me(n,e){e=""+e,n.data!==e&&(n.data=e)}function et(n,e){n.value=e??""}function se(n,e,t){n.classList.toggle(e,!!t)}function St(n,e,{bubbles:t=!1,cancelable:r=!1}={}){return new CustomEvent(n,{detail:e,bubbles:t,cancelable:r})}let Re;function Be(n){Re=n}function tt(){if(!Re)throw new Error("Function called outside component initialization");return Re}function It(n){tt().$$.on_destroy.push(n)}function Pt(){const n=tt();return(e,t,{cancelable:r=!1}={})=>{const l=n.$$.callbacks[e];if(l){const u=St(e,t,{cancelable:r});return l.slice().forEach(s=>{s.call(n,u)}),!u.defaultPrevented}return!0}}function nt(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(r=>r.call(this,e))}const be=[],We=[];let we=[];const rt=[],zt=Promise.resolve();let Ne=!1;function Ut(){Ne||(Ne=!0,zt.then(lt))}function je(n){we.push(n)}const Oe=new Set;let ve=0;function lt(){if(ve!==0)return;const n=Re;do{try{for(;ve<be.length;){const e=be[ve];ve++,Be(e),At(e.$$)}}catch(e){throw be.length=0,ve=0,e}for(Be(null),be.length=0,ve=0;We.length;)We.pop()();for(let e=0;e<we.length;e+=1){const t=we[e];Oe.has(t)||(Oe.add(t),t())}we.length=0}while(be.length);for(;rt.length;)rt.pop()();Ne=!1,Oe.clear(),Be(n)}function At(n){if(n.fragment!==null){n.update(),ee(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(je)}}function Wt(n){const e=[],t=[];we.forEach(r=>n.indexOf(r)===-1?e.push(r):t.push(r)),t.forEach(r=>r()),we=e}const Ee=new Set;let ae;function Se(){ae={r:0,c:[],p:ae}}function Ie(){ae.r||ee(ae.c),ae=ae.p}function W(n,e){n&&n.i&&(Ee.delete(n),n.i(e))}function Z(n,e,t,r){if(n&&n.o){if(Ee.has(n))return;Ee.add(n),ae.c.push(()=>{Ee.delete(n),r&&(t&&n.d(1),r())}),n.o(e)}else r&&r()}function it(n){return(n==null?void 0:n.length)!==void 0?n:Array.from(n)}function Nt(n,e){Z(n,1,1,()=>{e.delete(n.key)})}function jt(n,e,t,r,l,u,s,f,d,c,m,v){let g=n.length,B=u.length,I=g;const T={};for(;I--;)T[n[I].key]=I;const R=[],N=new Map,y=new Map,G=[];for(I=B;I--;){const C=v(l,u,I),L=t(C);let _=s.get(L);_?r&&G.push(()=>_.p(C,e)):(_=c(L,C),_.c()),N.set(L,R[I]=_),L in T&&y.set(L,Math.abs(I-T[L]))}const F=new Set,h=new Set;function b(C){W(C,1),C.m(f,m),s.set(C.key,C),m=C.first,B--}for(;g&&B;){const C=R[B-1],L=n[g-1],_=C.key,w=L.key;C===L?(m=C.first,g--,B--):N.has(w)?!s.has(_)||F.has(_)?b(C):h.has(w)?g--:y.get(_)>y.get(w)?(h.add(_),b(C)):(F.add(w),g--):(d(L,s),g--)}for(;g--;){const C=n[g];N.has(C.key)||d(C,s)}for(;B;)b(R[B-1]);return ee(G),R}function oe(n){n&&n.c()}function te(n,e,t){const{fragment:r,after_update:l}=n.$$;r&&r.m(e,t),je(()=>{const u=n.$$.on_mount.map(Je).filter(Ye);n.$$.on_destroy?n.$$.on_destroy.push(...u):ee(u),n.$$.on_mount=[]}),l.forEach(je)}function ne(n,e){const t=n.$$;t.fragment!==null&&(Wt(t.after_update),ee(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Ot(n,e){n.$$.dirty[0]===-1&&(be.push(n),Ut(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<<e%31}function de(n,e,t,r,l,u,s,f=[-1]){const d=Re;Be(n);const c=n.$$={fragment:null,ctx:[],props:u,update:M,not_equal:l,bound:Xe(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(d?d.$$.context:[])),callbacks:Xe(),dirty:f,skip_bound:!1,root:e.target||d.$$.root};s&&s(c.root);let m=!1;if(c.ctx=t?t(n,e.props||{},(v,g,...B)=>{const I=B.length?B[0]:g;return c.ctx&&l(c.ctx[v],c.ctx[v]=I)&&(!c.skip_bound&&c.bound[v]&&c.bound[v](I),m&&Ot(n,v)),g}):[],c.update(),m=!0,ee(c.before_update),c.fragment=r?r(c.ctx):!1,e.target){if(e.hydrate){const v=Et(e.target);c.fragment&&c.fragment.l(v),v.forEach(P)}else c.fragment&&c.fragment.c();e.intro&&W(n.$$.fragment),te(n,e.target,e.anchor),lt()}Be(d)}class he{constructor(){Qe(this,"$$");Qe(this,"$$set")}$destroy(){ne(this,1),this.$destroy=M}$on(e,t){if(!Ye(t))return M;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(t),()=>{const l=r.indexOf(t);l!==-1&&r.splice(l,1)}}$set(e){this.$$set&&!pt(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Gt="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Gt);const Nn="";function Ft(n){let e,t;return{c(){e=le("svg"),t=le("path"),o(t,"d","M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"),o(e,"viewBox","0 0 14 14"),o(e,"width","13"),o(e,"height","13"),o(e,"class","svelte-en2qvf")},m(r,l){z(r,e,l),k(e,t)},p:M,i:M,o:M,d(r){r&&P(e)}}}class st extends he{constructor(e){super(),de(this,e,null,Ft,ue,{})}}const jn="";function Zt(n){let e,t;return{c(){e=le("svg"),t=le("path"),o(t,"d","M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"),o(e,"viewBox","0 0 30 30"),o(e,"fill","none"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","svelte-d2loi5")},m(r,l){z(r,e,l),k(e,t)},p:M,i:M,o:M,d(r){r&&P(e)}}}class ot extends he{constructor(e){super(),de(this,e,null,Zt,ue,{})}}const On="";function qt(n){let e,t;return{c(){e=S("img"),K(e.src,t=n[3]+"area.svg")||o(e,"src",t),o(e,"alt",n[6]),o(e,"class","svelte-ltkwvy")},m(r,l){z(r,e,l)},p(r,l){l&8&&!K(e.src,t=r[3]+"area.svg")&&o(e,"src",t),l&64&&o(e,"alt",r[6])},d(r){r&&P(e)}}}function Vt(n){let e,t;return{c(){e=S("img"),K(e.src,t=n[3]+"poi.svg")||o(e,"src",t),o(e,"alt",n[6]),o(e,"class","svelte-ltkwvy")},m(r,l){z(r,e,l)},p(r,l){l&8&&!K(e.src,t=r[3]+"poi.svg")&&o(e,"src",t),l&64&&o(e,"alt",r[6])},d(r){r&&P(e)}}}function Dt(n){let e,t;return{c(){e=S("img"),K(e.src,t=n[3]+"postal_code.svg")||o(e,"src",t),o(e,"alt",n[6]),o(e,"class","svelte-ltkwvy")},m(r,l){z(r,e,l)},p(r,l){l&8&&!K(e.src,t=r[3]+"postal_code.svg")&&o(e,"src",t),l&64&&o(e,"alt",r[6])},d(r){r&&P(e)}}}function Kt(n){let e,t;return{c(){e=S("img"),K(e.src,t=n[3]+"street.svg")||o(e,"src",t),o(e,"alt",n[6]),o(e,"class","svelte-ltkwvy")},m(r,l){z(r,e,l)},p(r,l){l&8&&!K(e.src,t=r[3]+"street.svg")&&o(e,"src",t),l&64&&o(e,"alt",r[6])},d(r){r&&P(e)}}}function Ht(n){let e,t;return{c(){e=S("img"),K(e.src,t=n[3]+"road.svg")||o(e,"src",t),o(e,"alt",n[6]),o(e,"class","svelte-ltkwvy")},m(r,l){z(r,e,l)},p(r,l){l&8&&!K(e.src,t=r[3]+"road.svg")&&o(e,"src",t),l&64&&o(e,"alt",r[6])},d(r){r&&P(e)}}}function Qt(n){let e,t;return{c(){e=S("img"),K(e.src,t=n[3]+"housenumber.svg")||o(e,"src",t),o(e,"alt",n[6]),o(e,"class","svelte-ltkwvy")},m(r,l){z(r,e,l)},p(r,l){l&8&&!K(e.src,t=r[3]+"housenumber.svg")&&o(e,"src",t),l&64&&o(e,"alt",r[6])},d(r){r&&P(e)}}}function Jt(n){let e,t,r,l;return{c(){e=S("img"),K(e.src,t=n[5])||o(e,"src",t),o(e,"alt",n[4]),o(e,"class","svelte-ltkwvy")},m(u,s){z(u,e,s),r||(l=q(e,"error",n[12]),r=!0)},p(u,s){s&32&&!K(e.src,t=u[5])&&o(e,"src",t),s&16&&o(e,"alt",u[4])},d(u){u&&P(e),r=!1,l()}}}function ct(n){let e,t;return{c(){e=S("span"),t=ie(n[6]),o(e,"class","secondary svelte-ltkwvy")},m(r,l){z(r,e,l),k(e,t)},p(r,l){l&64&&Me(t,r[6])},d(r){r&&P(e)}}}function Xt(n){var C,L;let e,t,r,l,u,s,f,d,c=n[0].place_name.replace(/,.*/,"")+"",m,v,g=n[2]==="always"||n[2]&&!n[0].address&&((C=n[0].properties)==null?void 0:C.kind)!=="road"&&((L=n[0].properties)==null?void 0:L.kind)!=="road_relation"&&!n[0].id.startsWith("address.")&&!n[0].id.startsWith("postal_code.")&&(!n[0].id.startsWith("poi.")||!n[5]),B,I,T=n[0].place_name.replace(/[^,]*,?\s*/,"")+"",R,N,y;function G(_,w){var X,a;return w&1&&(t=null),w&1&&(r=null),w&1&&(l=null),_[5]?Jt:_[0].address?Qt:((X=_[0].properties)==null?void 0:X.kind)==="road"||((a=_[0].properties)==null?void 0:a.kind)==="road_relation"?Ht:(t==null&&(t=!!_[0].id.startsWith("address.")),t?Kt:(r==null&&(r=!!_[0].id.startsWith("postal_code.")),r?Dt:(l==null&&(l=!!_[0].id.startsWith("poi.")),l?Vt:qt)))}let F=G(n,-1),h=F(n),b=g&&ct(n);return{c(){e=S("li"),h.c(),u=J(),s=S("span"),f=S("span"),d=S("span"),m=ie(c),v=J(),b&&b.c(),B=J(),I=S("span"),R=ie(T),o(d,"class","primary svelte-ltkwvy"),o(f,"class","svelte-ltkwvy"),o(I,"class","line2 svelte-ltkwvy"),o(s,"class","texts svelte-ltkwvy"),o(e,"tabindex","0"),o(e,"data-selected",n[1]),o(e,"class","svelte-ltkwvy"),se(e,"selected",n[1])},m(_,w){z(_,e,w),h.m(e,null),k(e,u),k(e,s),k(s,f),k(f,d),k(d,m),k(f,v),b&&b.m(f,null),k(s,B),k(s,I),k(I,R),N||(y=[q(e,"mouseenter",n[10]),q(e,"focus",n[11])],N=!0)},p(_,[w]){var X,a;F===(F=G(_,w))&&h?h.p(_,w):(h.d(1),h=F(_),h&&(h.c(),h.m(e,u))),w&1&&c!==(c=_[0].place_name.replace(/,.*/,"")+"")&&Me(m,c),w&37&&(g=_[2]==="always"||_[2]&&!_[0].address&&((X=_[0].properties)==null?void 0:X.kind)!=="road"&&((a=_[0].properties)==null?void 0:a.kind)!=="road_relation"&&!_[0].id.startsWith("address.")&&!_[0].id.startsWith("postal_code.")&&(!_[0].id.startsWith("poi.")||!_[5])),g?b?b.p(_,w):(b=ct(_),b.c(),b.m(f,null)):b&&(b.d(1),b=null),w&1&&T!==(T=_[0].place_name.replace(/[^,]*,?\s*/,"")+"")&&Me(R,T),w&2&&o(e,"data-selected",_[1]),w&2&&se(e,"selected",_[1])},i:M,o:M,d(_){_&&P(e),h.d(),b&&b.d(),N=!1,ee(y)}}}function Yt(n,e,t){var N;let r,l,{feature:u}=e,{selected:s=!1}=e,{showPlaceType:f}=e,{missingIconsCache:d}=e,{iconsBaseUrl:c}=e;const m=(N=u.properties)==null?void 0:N.categories;let v,g;function B(y){g&&d.add(g),t(9,r--,r)}function I(y){nt.call(this,n,y)}function T(y){nt.call(this,n,y)}const R=y=>B(y.currentTarget);return n.$$set=y=>{"feature"in y&&t(0,u=y.feature),"selected"in y&&t(1,s=y.selected),"showPlaceType"in y&&t(2,f=y.showPlaceType),"missingIconsCache"in y&&t(8,d=y.missingIconsCache),"iconsBaseUrl"in y&&t(3,c=y.iconsBaseUrl)},n.$$.update=()=>{var y,G,F,h;if(n.$$.dirty&824)do t(9,r--,r),t(4,v=m==null?void 0:m[r]),t(5,g=v?c+v.replace(/ /g,"_")+".svg":void 0);while(r>-1&&(!g||d.has(g)));n.$$.dirty&1&&t(6,l=u.id.startsWith("poi.")?(G=(y=u.properties)==null?void 0:y.categories)==null?void 0:G.join(", "):((h=(F=u.properties)==null?void 0:F.place_type_name)==null?void 0:h[0])??u.place_type[0])},t(9,r=(m==null?void 0:m.length)??0),[u,s,f,c,v,g,l,B,d,r,I,T,R]}class xt extends he{constructor(e){super(),de(this,e,Yt,Xt,ue,{feature:0,selected:1,showPlaceType:2,missingIconsCache:8,iconsBaseUrl:3})}}const Gn="";function $t(n){let e;return{c(){e=S("div"),e.innerHTML='<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>',o(e,"class","svelte-7cmwmc")},m(t,r){z(t,e,r)},p:M,i:M,o:M,d(t){t&&P(e)}}}class en extends he{constructor(e){super(),de(this,e,null,$t,ue,{})}}const Fn="";function tn(n){let e,t;return{c(){e=le("svg"),t=le("path"),o(t,"d","M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"),o(e,"viewBox","0 0 60.006 21.412"),o(e,"width","14"),o(e,"height","20"),o(e,"class","svelte-en2qvf")},m(r,l){z(r,e,l),k(e,t)},p:M,i:M,o:M,d(r){r&&P(e)}}}class nn extends he{constructor(e){super(),de(this,e,null,tn,ue,{})}}const Zn="";function rn(n){let e,t;return{c(){e=le("svg"),t=le("path"),o(t,"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"),o(e,"width","14"),o(e,"height","14"),o(e,"viewBox","0 0 15 15"),o(e,"class","svelte-en2qvf")},m(r,l){z(r,e,l),k(e,t)},p:M,i:M,o:M,d(r){r&&P(e)}}}class ln extends he{constructor(e){super(),de(this,e,null,rn,ue,{})}}const qn="";function ft(n,e,t){const r=n.slice();return r[75]=e[t],r[77]=t,r}function ut(n){let e,t;return e=new en({}),{c(){oe(e.$$.fragment)},m(r,l){te(e,r,l),t=!0},i(r){t||(W(e.$$.fragment,r),t=!0)},o(r){Z(e.$$.fragment,r),t=!1},d(r){ne(e,r)}}}function at(n){let e,t,r,l,u;return t=new nn({}),{c(){e=S("button"),oe(t.$$.fragment),o(e,"type","button"),o(e,"title",n[9]),o(e,"class","svelte-1r7dvt7"),se(e,"active",n[0])},m(s,f){z(s,e,f),te(t,e,null),r=!0,l||(u=q(e,"click",n[61]),l=!0)},p(s,f){(!r||f[0]&512)&&o(e,"title",s[9]),(!r||f[0]&1)&&se(e,"active",s[0])},i(s){r||(W(t.$$.fragment,s),r=!0)},o(s){Z(t.$$.fragment,s),r=!1},d(s){s&&P(e),ne(t),l=!1,u()}}}function sn(n){let e,t=[],r=new Map,l,u,s,f=it(n[13]);const d=c=>c[75].id+(c[75].address?","+c[75].address:"");for(let c=0;c<f.length;c+=1){let m=ft(n,f,c),v=d(m);r.set(v,t[c]=dt(v,m))}return{c(){e=S("ul");for(let c=0;c<t.length;c+=1)t[c].c();o(e,"class","svelte-1r7dvt7")},m(c,m){z(c,e,m);for(let v=0;v<t.length;v+=1)t[v]&&t[v].m(e,null);l=!0,u||(s=[q(e,"mouseleave",n[65]),q(e,"blur",n[66])],u=!0)},p(c,m){m[0]&8940544&&(f=it(c[13]),Se(),t=jt(t,m,d,1,c,f,r,e,Nt,dt,null,ft),Ie())},i(c){if(!l){for(let m=0;m<f.length;m+=1)W(t[m]);l=!0}},o(c){for(let m=0;m<t.length;m+=1)Z(t[m]);l=!1},d(c){c&&P(e);for(let m=0;m<t.length;m+=1)t[m].d();u=!1,ee(s)}}}function on(n){let e,t,r,l,u,s;return t=new ot({}),{c(){e=S("div"),oe(t.$$.fragment),r=J(),l=S("div"),u=ie(n[7]),o(l,"class","svelte-1r7dvt7"),o(e,"class","no-results svelte-1r7dvt7")},m(f,d){z(f,e,d),te(t,e,null),k(e,r),k(e,l),k(l,u),s=!0},p(f,d){(!s||d[0]&128)&&Me(u,f[7])},i(f){s||(W(t.$$.fragment,f),s=!0)},o(f){Z(t.$$.fragment,f),s=!1},d(f){f&&P(e),ne(t)}}}function cn(n){let e="",t;return{c(){t=ie(e)},m(r,l){z(r,t,l)},p:M,i:M,o:M,d(r){r&&P(t)}}}function fn(n){let e,t,r,l,u,s,f,d,c,m,v;return t=new ot({}),d=new st({}),{c(){e=S("div"),oe(t.$$.fragment),r=J(),l=S("div"),u=ie(n[6]),s=J(),f=S("button"),oe(d.$$.fragment),o(l,"class","svelte-1r7dvt7"),o(f,"class","svelte-1r7dvt7"),o(e,"class","error svelte-1r7dvt7")},m(g,B){z(g,e,B),te(t,e,null),k(e,r),k(e,l),k(l,u),k(e,s),k(e,f),te(d,f,null),c=!0,m||(v=q(f,"click",n[62]),m=!0)},p(g,B){(!c||B[0]&64)&&Me(u,g[6])},i(g){c||(W(t.$$.fragment,g),W(d.$$.fragment,g),c=!0)},o(g){Z(t.$$.fragment,g),Z(d.$$.fragment,g),c=!1},d(g){g&&P(e),ne(t),ne(d),m=!1,v()}}}function dt(n,e){let t,r,l;function u(){return e[63](e[77])}function s(){return e[64](e[75])}return r=new xt({props:{feature:e[75],showPlaceType:e[10],selected:e[14]===e[77],missingIconsCache:e[19],iconsBaseUrl:e[11]}}),r.$on("mouseenter",u),r.$on("focus",s),{key:n,first:null,c(){t=Ct(),oe(r.$$.fragment),this.first=t},m(f,d){z(f,t,d),te(r,f,d),l=!0},p(f,d){e=f;const c={};d[0]&8192&&(c.feature=e[75]),d[0]&1024&&(c.showPlaceType=e[10]),d[0]&24576&&(c.selected=e[14]===e[77]),d[0]&2048&&(c.iconsBaseUrl=e[11]),r.$set(c)},i(f){l||(W(r.$$.fragment,f),l=!0)},o(f){Z(r.$$.fragment,f),l=!1},d(f){f&&P(t),ne(r,f)}}}function un(n){let e,t,r,l,u,s,f,d,c,m,v,g,B,I,T,R,N,y,G,F;l=new ln({}),m=new st({});let h=n[18]&&ut(),b=n[5]===!0&&at(n);const C=n[53].default,L=Tt(C,n,n[52],null),_=[fn,cn,on,sn],w=[];function X(a,U){var re,me;return a[17]?0:a[15]?((re=a[13])==null?void 0:re.length)===0?2:a[15]&&((me=a[13])!=null&&me.length)?3:-1:1}return~(T=X(n))&&(R=w[T]=_[T](n)),{c(){e=S("form"),t=S("div"),r=S("button"),oe(l.$$.fragment),u=J(),s=S("input"),f=J(),d=S("div"),c=S("button"),oe(m.$$.fragment),v=J(),h&&h.c(),g=J(),b&&b.c(),B=J(),L&&L.c(),I=J(),R&&R.c(),o(r,"class","search-button svelte-1r7dvt7"),o(r,"type","button"),o(s,"placeholder",n[8]),o(s,"aria-label",n[8]),o(s,"class","svelte-1r7dvt7"),o(c,"type","button"),o(c,"title",n[3]),o(c,"class","svelte-1r7dvt7"),o(d,"class","clear-button-container svelte-1r7dvt7"),se(d,"displayable",n[1]!==""),o(t,"class","input-group svelte-1r7dvt7"),o(e,"tabindex","0"),o(e,"class",N=$e(n[2])+" svelte-1r7dvt7"),se(e,"can-collapse",n[4]&&n[1]==="")},m(a,U){z(a,e,U),k(e,t),k(t,r),te(l,r,null),k(t,u),k(t,s),n[55](s),et(s,n[1]),k(t,f),k(t,d),k(d,c),te(m,c,null),k(d,v),h&&h.m(d,null),k(t,g),b&&b.m(t,null),k(t,B),L&&L.m(t,null),k(e,I),~T&&w[T].m(e,null),y=!0,G||(F=[q(r,"click",n[54]),q(s,"input",n[56]),q(s,"focus",n[57]),q(s,"blur",n[58]),q(s,"keydown",n[21]),q(s,"input",n[59]),q(c,"click",n[60]),q(e,"submit",Lt(n[20]))],G=!0)},p(a,U){(!y||U[0]&256)&&o(s,"placeholder",a[8]),(!y||U[0]&256)&&o(s,"aria-label",a[8]),U[0]&2&&s.value!==a[1]&&et(s,a[1]),(!y||U[0]&8)&&o(c,"title",a[3]),a[18]?h?U[0]&262144&&W(h,1):(h=ut(),h.c(),W(h,1),h.m(d,null)):h&&(Se(),Z(h,1,1,()=>{h=null}),Ie()),(!y||U[0]&2)&&se(d,"displayable",a[1]!==""),a[5]===!0?b?(b.p(a,U),U[0]&32&&W(b,1)):(b=at(a),b.c(),W(b,1),b.m(t,B)):b&&(Se(),Z(b,1,1,()=>{b=null}),Ie()),L&&L.p&&(!y||U[1]&2097152)&&Rt(L,C,a,a[52],y?Mt(C,a[52],U,null):Bt(a[52]),null);let re=T;T=X(a),T===re?~T&&w[T].p(a,U):(R&&(Se(),Z(w[re],1,1,()=>{w[re]=null}),Ie()),~T?(R=w[T],R?R.p(a,U):(R=w[T]=_[T](a),R.c()),W(R,1),R.m(e,null)):R=null),(!y||U[0]&4&&N!==(N=$e(a[2])+" svelte-1r7dvt7"))&&o(e,"class",N),(!y||U[0]&22)&&se(e,"can-collapse",a[4]&&a[1]==="")},i(a){y||(W(l.$$.fragment,a),W(m.$$.fragment,a),W(h),W(b),W(L,a),W(R),y=!0)},o(a){Z(l.$$.fragment,a),Z(m.$$.fragment,a),Z(h),Z(b),Z(L,a),Z(R),y=!1},d(a){a&&P(e),ne(l),n[55](null),ne(m),h&&h.d(),b&&b.d(),L&&L.d(a),~T&&w[T].d(),G=!1,ee(F)}}}function an(n,e,t){const r=e[1],l=e[0],u=r-l;return n===r&&t?n:((n-l)%u+u)%u+l}function ht(n){let e=[...n];return e[2]<e[0]&&(e[2]+=360),e}function dn(n,e,t){let r,{$$slots:l={},$$scope:u}=e,{class:s=void 0}=e,{apiKey:f}=e,{bbox:d=void 0}=e,{clearButtonTitle:c="clear"}=e,{clearOnBlur:m=!1}=e,{collapsed:v=!1}=e,{country:g=void 0}=e,{debounceSearch:B=200}=e,{enableReverse:I=!1}=e,{errorMessage:T="Something went wrong…"}=e,{filter:R=()=>!0}=e,{flyTo:N=!0}=e,{fuzzyMatch:y=!0}=e,{language:G=void 0}=e,{limit:F=void 0}=e,{mapController:h=void 0}=e,{minLength:b=2}=e,{noResultsMessage:C="Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!"}=e,{placeholder:L="Search"}=e,{proximity:_=void 0}=e,{reverseActive:w=I==="always"}=e,{reverseButtonTitle:X="toggle reverse geocoding"}=e,{searchValue:a=""}=e,{showFullGeometry:U=!0}=e,{showPlaceType:re="ifNeeded"}=e,{showResultsWhileTyping:me=!0}=e,{trackProximity:Pe=!0}=e,{types:_e=void 0}=e,{zoom:ze=16}=e,{maxZoom:Ce=18}=e,{apiUrl:Ge="https://api.maptiler.com/geocoding"}=e,{fetchParameters:Fe={}}=e,{iconsBaseUrl:gt="https://cdn.maptiler.com/maptiler-geocoding-control/v0.0.96-alpha.2/icons/"}=e;function gn(){Y.focus()}function yn(){Y.blur()}function yt(i,O=!0){t(1,a=i),O?(t(14,j=-1),wt()):(Ve(),setTimeout(()=>{Y.focus(),Y.select()}))}let ke=!1,E,V,p,bt="",Y,j=-1,x,Ue=[],ge,pe,Ae,Ze;const bn=new Set,ce=Pt();It(()=>{h&&(h.setEventHandler(void 0),h.indicateReverse(!1),h.setSelectedMarker(-1),h.setMarkers(void 0,void 0))});function wt(i){if(pe&&(clearTimeout(pe),pe=void 0),j>-1&&E)t(49,p=E[j]),t(1,a=p.place_name.replace(/,.*/,"")),t(17,x=void 0),t(48,V=void 0),t(14,j=-1);else if(a){const O=i||!vt();qe(a,{exact:!0}).then(()=>{t(48,V=E),t(49,p=void 0),O&&wn()}).catch($=>t(17,x=$))}}function vt(){return/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(a)}async function qe(i,{byId:O=!1,exact:$=!1}={}){t(17,x=void 0);const Te=vt(),Q=new URLSearchParams;G!=null&&Q.set("language",Array.isArray(G)?G.join(","):G),_e&&Q.set("types",_e.join(",")),Te||(d&&Q.set("bbox",d.map(fe=>fe.toFixed(6)).join(",")),g&&Q.set("country",Array.isArray(g)?g.join(","):g)),O||(_&&Q.set("proximity",_.map(fe=>fe.toFixed(6)).join(",")),($||!me)&&Q.set("autocomplete","false"),Q.set("fuzzyMatch",String(y))),F!==void 0&&(!Te||(_e==null?void 0:_e.length)===1)&&Q.set("limit",String(F)),Q.set("key",f);const ye=Ge+"/"+encodeURIComponent(i)+".json?"+Q.toString();if(ye===bt){O?(t(13,E=void 0),t(49,p=Ue[0])):t(13,E=Ue);return}bt=ye,ge==null||ge.abort();const D=new AbortController;t(18,ge=D);let Ke;try{Ke=await fetch(ye,{signal:D.signal,...Fe}).finally(()=>{D===ge&&t(18,ge=void 0)})}catch(fe){if(fe&&typeof fe=="object"&&"name"in fe&&fe.name==="AbortError")return;throw new Error}if(!Ke.ok)throw new Error;const He=await Ke.json();ce("response",{url:ye,featureCollection:He}),O?(t(13,E=void 0),t(49,p=He.features[0]),Ue=[p]):(t(13,E=He.features.filter(R)),Ue=E,Te&&Y.focus())}function wn(){var $,Te,Q,ye;if(!(V!=null&&V.length)||!N)return;const i=[180,90,-180,-90],O=!V.some(D=>!D.matching_text);for(const D of V)(O||!D.matching_text)&&(i[0]=Math.min(i[0],(($=D.bbox)==null?void 0:$[0])??D.center[0]),i[1]=Math.min(i[1],((Te=D.bbox)==null?void 0:Te[1])??D.center[1]),i[2]=Math.max(i[2],((Q=D.bbox)==null?void 0:Q[2])??D.center[0]),i[3]=Math.max(i[3],((ye=D.bbox)==null?void 0:ye[3])??D.center[1]));h&&V.length>0&&(p&&i[0]===i[2]&&i[1]===i[3]?h.flyTo(p.center,ze):h.fitBounds(ht(i),50,Ce))}function vn(i){t(0,w=I==="always"),yt(an(i[0],[-180,180],!0).toFixed(6)+","+i[1].toFixed(6))}function kn(i){if(!E)return;let O=i.key==="ArrowDown"?1:i.key==="ArrowUp"?-1:0;O?(j===-1&&O===-1&&t(14,j=E.length),t(14,j+=O),j>=E.length&&t(14,j=-1),i.preventDefault()):["ArrowLeft","ArrowRight","Home","End"].includes(i.key)&&t(14,j=-1)}function Ve(i=!0){if(t(17,x=void 0),me){if(pe&&clearTimeout(pe),a.length<b)return;const O=a;pe=window.setTimeout(()=>{qe(O).catch($=>t(17,x=$))},i?B:0)}else t(13,E=void 0),t(17,x=void 0)}function De(i){t(49,p=i),t(1,a=i.place_name),t(14,j=-1)}const pn=()=>Y.focus();function Tn(i){We[i?"unshift":"push"](()=>{Y=i,t(16,Y)})}function Mn(){a=this.value,t(1,a),t(12,ke),t(27,m)}const Rn=()=>t(12,ke=!0),Bn=()=>t(12,ke=!1),Cn=()=>Ve(),Ln=()=>{t(1,a=""),Y.focus()},En=()=>t(0,w=!w),Sn=()=>t(17,x=void 0),In=i=>t(14,j=i),Pn=i=>De(i),zn=()=>t(14,j=-1),Un=()=>{};return n.$$set=i=>{"class"in i&&t(2,s=i.class),"apiKey"in i&&t(25,f=i.apiKey),"bbox"in i&&t(26,d=i.bbox),"clearButtonTitle"in i&&t(3,c=i.clearButtonTitle),"clearOnBlur"in i&&t(27,m=i.clearOnBlur),"collapsed"in i&&t(4,v=i.collapsed),"country"in i&&t(28,g=i.country),"debounceSearch"in i&&t(29,B=i.debounceSearch),"enableReverse"in i&&t(5,I=i.enableReverse),"errorMessage"in i&&t(6,T=i.errorMessage),"filter"in i&&t(30,R=i.filter),"flyTo"in i&&t(31,N=i.flyTo),"fuzzyMatch"in i&&t(32,y=i.fuzzyMatch),"language"in i&&t(33,G=i.language),"limit"in i&&t(34,F=i.limit),"mapController"in i&&t(35,h=i.mapController),"minLength"in i&&t(36,b=i.minLength),"noResultsMessage"in i&&t(7,C=i.noResultsMessage),"placeholder"in i&&t(8,L=i.placeholder),"proximity"in i&&t(24,_=i.proximity),"reverseActive"in i&&t(0,w=i.reverseActive),"reverseButtonTitle"in i&&t(9,X=i.reverseButtonTitle),"searchValue"in i&&t(1,a=i.searchValue),"showFullGeometry"in i&&t(37,U=i.showFullGeometry),"showPlaceType"in i&&t(10,re=i.showPlaceType),"showResultsWhileTyping"in i&&t(38,me=i.showResultsWhileTyping),"trackProximity"in i&&t(39,Pe=i.trackProximity),"types"in i&&t(40,_e=i.types),"zoom"in i&&t(41,ze=i.zoom),"maxZoom"in i&&t(42,Ce=i.maxZoom),"apiUrl"in i&&t(43,Ge=i.apiUrl),"fetchParameters"in i&&t(44,Fe=i.fetchParameters),"iconsBaseUrl"in i&&t(11,gt=i.iconsBaseUrl),"$$scope"in i&&t(52,u=i.$$scope)},n.$$.update=()=>{if(n.$$.dirty[1]&256&&(Pe||t(24,_=void 0)),n.$$.dirty[0]&134221824&&setTimeout(()=>{t(15,Ae=ke),m&&!ke&&t(1,a="")}),n.$$.dirty[0]&8194|n.$$.dirty[1]&32&&a.length<b&&(t(49,p=void 0),t(13,E=void 0),t(17,x=void 0),t(48,V=E)),n.$$.dirty[1]&262208&&U&&p&&!p.address&&p.geometry.type==="Point"&&qe(p.id,{byId:!0}).catch(i=>t(17,x=i)),n.$$.dirty[1]&789521&&(h&&p&&p.id!==Ze&&N&&(!p.bbox||p.bbox[0]===p.bbox[2]&&p.bbox[1]===p.bbox[3]?h.flyTo(p.center,p.id.startsWith("poi.")||p.id.startsWith("address.")?Ce:ze):h.fitBounds(ht(p.bbox),50,Ce),t(13,E=void 0),t(48,V=void 0),t(14,j=-1)),t(50,Ze=p==null?void 0:p.id)),n.$$.dirty[0]&8192|n.$$.dirty[1]&131072&&V!==E&&t(48,V=void 0),n.$$.dirty[1]&393232&&h&&h.setMarkers(V,p),n.$$.dirty[0]&2&&t(14,j=-1),n.$$.dirty[0]&40961|n.$$.dirty[1]&272&&h&&h.setEventHandler(i=>{switch(i.type){case"mapClick":w&&vn(i.coordinates);break;case"proximityChange":t(24,_=Pe?i.proximity:void 0);break;case"markerClick":{const O=E==null?void 0:E.find($=>$.id===i.id);O&&De(O)}break;case"markerMouseEnter":t(14,j=Ae?(E==null?void 0:E.findIndex(O=>O.id===i.id))??-1:-1);break;case"markerMouseLeave":t(14,j=-1);break}}),n.$$.dirty[0]&16384|n.$$.dirty[1]&16&&(h==null||h.setSelectedMarker(j)),n.$$.dirty[0]&24576&&t(51,r=E==null?void 0:E[j]),n.$$.dirty[0]&2|n.$$.dirty[1]&16){const i=/^(-?\d+(?:\.\d*)?),(-?\d+(?:\.\d*)?)$/.exec(a);h==null||h.setReverseMarker(i?[Number(i[1]),Number(i[2])]:void 0)}n.$$.dirty[1]&1048576&&ce("select",r),n.$$.dirty[1]&262144&&ce("pick",p),n.$$.dirty[0]&40960&&ce("optionsVisibilityChange",Ae&&!!E),n.$$.dirty[0]&8192&&ce("featuresListed",E),n.$$.dirty[1]&131072&&ce("featuresMarked",V),n.$$.dirty[0]&1&&ce("reverseToggle",w),n.$$.dirty[0]&2&&ce("queryChange",a),n.$$.dirty[0]&1|n.$$.dirty[1]&16&&h&&h.indicateReverse(w)},[w,a,s,c,v,I,T,C,L,X,re,gt,ke,E,j,Ae,Y,x,ge,bn,wt,kn,Ve,De,_,f,d,m,g,B,R,N,y,G,F,h,b,U,me,Pe,_e,ze,Ce,Ge,Fe,gn,yn,yt,V,p,Ze,r,u,l,pn,Tn,Mn,Rn,Bn,Cn,Ln,En,Sn,In,Pn,zn,Un]}class hn extends he{constructor(e){super(),de(this,e,dn,un,ue,{class:2,apiKey:25,bbox:26,clearButtonTitle:3,clearOnBlur:27,collapsed:4,country:28,debounceSearch:29,enableReverse:5,errorMessage:6,filter:30,flyTo:31,fuzzyMatch:32,language:33,limit:34,mapController:35,minLength:36,noResultsMessage:7,placeholder:8,proximity:24,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:37,showPlaceType:10,showResultsWhileTyping:38,trackProximity:39,types:40,zoom:41,maxZoom:42,apiUrl:43,fetchParameters:44,iconsBaseUrl:11,focus:45,blur:46,setQuery:47},null,[-1,-1,-1])}get focus(){return this.$$.ctx[45]}get blur(){return this.$$.ctx[46]}get setQuery(){return this.$$.ctx[47]}}const mt=["featuresListed","featuresMarked","optionsVisibilityChange","pick","queryChange","response","reverseToggle","select"],mn=["apiKey","bbox","clearButtonTitle","clearOnBlur","collapsed","country","debounceSearch","enableReverse","reverseActive","errorMessage","filter","fuzzyMatch","language","limit","minLength","noResultsMessage","placeholder","proximity","reverseButtonTitle","showFullGeometry","showPlaceType","showResultsWhileTyping","trackProximity","types","zoom","mapController"];function _t(n){return"on"+n[0].toUpperCase()+n.slice(1)}const _n=A.forwardRef(function(e,t){const r=A.useRef(),l=A.useRef(),u={...e};for(const s of mt)delete u[_t(s)];A.useEffect(()=>{if(!r.current)throw new Error;const s=new hn({target:r.current,props:u});return l.current=s,()=>s.$destroy()},[]);for(const s of mn)A.useEffect(()=>{l.current&&e[s]!==void 0&&l.current.$set({[s]:e[s]})},[e[s]]);for(const s of mt){const f=e[_t(s)];A.useEffect(()=>{var d;return f&&((d=l.current)==null?void 0:d.$on(s,c=>{f(c.detail)}))},[f])}return A.useImperativeHandle(t,()=>({setQuery:(s,f=!0)=>{var d;return(d=l.current)==null?void 0:d.setQuery(s,f)},focus:()=>{var s;return(s=l.current)==null?void 0:s.focus()},blur:()=>{var s;return(s=l.current)==null?void 0:s.blur()}})),A.createElement("div",{ref:r})});H.GeocodingControl=_n,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"})});
2
2
  //# sourceMappingURL=react.umd.cjs.map