@maptiler/geocoding-control
Version:
The Javascript & TypeScript Map Control component for MapTiler Geocoding service. Easy to be integrated into any JavaScript mapping application.
179 lines (171 loc) • 129 kB
JavaScript
(function(_,se){typeof exports=="object"&&typeof module<"u"?se(exports,require("ol"),require("ol/control"),require("ol/events/Event"),require("ol/geom"),require("ol/layer/Vector"),require("ol/proj"),require("ol/source/Vector"),require("ol/style/Fill"),require("ol/style/Icon"),require("ol/style/Stroke"),require("ol/style/Style"),require("ol/style/Text")):typeof define=="function"&&define.amd?define(["exports","ol","ol/control","ol/events/Event","ol/geom","ol/layer/Vector","ol/proj","ol/source/Vector","ol/style/Fill","ol/style/Icon","ol/style/Stroke","ol/style/Style","ol/style/Text"],se):(_=typeof globalThis<"u"?globalThis:_||self,se(_.maptilerGeocoder={},_.ol,_.ol.control,_.ol.events.Event,_.ol.geom,_.ol.layer.Vector,_.ol.proj,_.ol.source.Vector,_.ol.style.Fill,_.ol.style.Icon,_.ol.style.Stroke,_.ol.style.Style,_.ol.style.Text))})(this,(function(_,se,br,Er,oe,wr,ot,xr,ui,Sr,di,Lr,_r){"use strict";/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const lt=globalThis,Ct=lt.ShadowRoot&&(lt.ShadyCSS===void 0||lt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ot=Symbol(),fi=new WeakMap;let pi=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==Ot)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Ct&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=fi.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&fi.set(t,e))}return e}toString(){return this.cssText}};const at=r=>new pi(typeof r=="string"?r:r+"",void 0,Ot),_e=(r,...e)=>{const t=r.length===1?r[0]:e.reduce(((i,s,n)=>i+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+r[n+1]),r[0]);return new pi(t,r,Ot)},$r=(r,e)=>{if(Ct)r.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const t of e){const i=document.createElement("style"),s=lt.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=t.cssText,r.appendChild(i)}},mi=Ct?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return at(t)})(r):r;/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const{is:Mr,defineProperty:Tr,getOwnPropertyDescriptor:Ar,getOwnPropertyNames:Cr,getOwnPropertySymbols:Or,getPrototypeOf:kr}=Object,ct=globalThis,gi=ct.trustedTypes,Ir=gi?gi.emptyScript:"",Pr=ct.reactiveElementPolyfillSupport,De=(r,e)=>r,ht={toAttribute(r,e){switch(e){case Boolean:r=r?Ir:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},kt=(r,e)=>!Mr(r,e),yi={attribute:!0,type:String,converter:ht,reflect:!1,useDefault:!1,hasChanged:kt};Symbol.metadata??=Symbol("metadata"),ct.litPropertyMetadata??=new WeakMap;let Ge=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=yi){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(e,i,t);s!==void 0&&Tr(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){const{get:s,set:n}=Ar(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:s,set(o){const l=s?.call(this);n?.call(this,o),this.requestUpdate(e,l,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??yi}static _$Ei(){if(this.hasOwnProperty(De("elementProperties")))return;const e=kr(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(De("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(De("properties"))){const t=this.properties,i=[...Cr(t),...Or(t)];for(const s of i)this.createProperty(s,t[s])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,s]of t)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const s=this._$Eu(t,i);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const s of i)t.unshift(mi(s))}else e!==void 0&&t.push(mi(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return $r(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$ET(e,t){const i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(s!==void 0&&i.reflect===!0){const n=(i.converter?.toAttribute!==void 0?i.converter:ht).toAttribute(t,i.type);this._$Em=e,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(e,t){const i=this.constructor,s=i._$Eh.get(e);if(s!==void 0&&this._$Em!==s){const n=i.getPropertyOptions(s),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:ht;this._$Em=s;const l=o.fromAttribute(t,n.type);this[s]=l??this._$Ej?.get(s)??l,this._$Em=null}}requestUpdate(e,t,i){if(e!==void 0){const s=this.constructor,n=this[e];if(i??=s.getPropertyOptions(e),!((i.hasChanged??kt)(n,t)||i.useDefault&&i.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,i))))return;this.C(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:s,wrapped:n},o){i&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??t??this[e]),n!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),s===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[s,n]of this._$Ep)this[s]=n;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[s,n]of i){const{wrapped:o}=n,l=this[s];o!==!0||this._$AL.has(s)||l===void 0||this.C(s,void 0,n,l)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((i=>i.hostUpdate?.())),this.update(t)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};Ge.elementStyles=[],Ge.shadowRootOptions={mode:"open"},Ge[De("elementProperties")]=new Map,Ge[De("finalized")]=new Map,Pr?.({ReactiveElement:Ge}),(ct.reactiveElementVersions??=[]).push("2.1.1");/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const It=globalThis,ut=It.trustedTypes,vi=ut?ut.createPolicy("lit-html",{createHTML:r=>r}):void 0,bi="$lit$",$e=`lit$${Math.random().toFixed(9).slice(2)}$`,Ei="?"+$e,Nr=`<${Ei}>`,Ce=document,ze=()=>Ce.createComment(""),qe=r=>r===null||typeof r!="object"&&typeof r!="function",Pt=Array.isArray,Rr=r=>Pt(r)||typeof r?.[Symbol.iterator]=="function",Nt=`[
\f\r]`,He=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,wi=/-->/g,xi=/>/g,Oe=RegExp(`>|${Nt}(?:([^\\s"'>=/]+)(${Nt}*=${Nt}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),Si=/'/g,Li=/"/g,_i=/^(?:script|style|textarea|title)$/i,$i=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),Z=$i(1),je=$i(2),we=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),Mi=new WeakMap,ke=Ce.createTreeWalker(Ce,129);function Ti(r,e){if(!Pt(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return vi!==void 0?vi.createHTML(e):e}const Gr=(r,e)=>{const t=r.length-1,i=[];let s,n=e===2?"<svg>":e===3?"<math>":"",o=He;for(let l=0;l<t;l++){const u=r[l];let f,x,w=-1,$=0;for(;$<u.length&&(o.lastIndex=$,x=o.exec(u),x!==null);)$=o.lastIndex,o===He?x[1]==="!--"?o=wi:x[1]!==void 0?o=xi:x[2]!==void 0?(_i.test(x[2])&&(s=RegExp("</"+x[2],"g")),o=Oe):x[3]!==void 0&&(o=Oe):o===Oe?x[0]===">"?(o=s??He,w=-1):x[1]===void 0?w=-2:(w=o.lastIndex-x[2].length,f=x[1],o=x[3]===void 0?Oe:x[3]==='"'?Li:Si):o===Li||o===Si?o=Oe:o===wi||o===xi?o=He:(o=Oe,s=void 0);const M=o===Oe&&r[l+1].startsWith("/>")?" ":"";n+=o===He?u+Nr:w>=0?(i.push(f),u.slice(0,w)+bi+u.slice(w)+$e+M):u+$e+(w===-2?l:M)}return[Ti(r,n+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};class Ve{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let n=0,o=0;const l=e.length-1,u=this.parts,[f,x]=Gr(e,t);if(this.el=Ve.createElement(f,i),ke.currentNode=this.el.content,t===2||t===3){const w=this.el.content.firstChild;w.replaceWith(...w.childNodes)}for(;(s=ke.nextNode())!==null&&u.length<l;){if(s.nodeType===1){if(s.hasAttributes())for(const w of s.getAttributeNames())if(w.endsWith(bi)){const $=x[o++],M=s.getAttribute(w).split($e),T=/([.?@])?(.*)/.exec($);u.push({type:1,index:n,name:T[2],strings:M,ctor:T[1]==="."?Ur:T[1]==="?"?Br:T[1]==="@"?Wr:dt}),s.removeAttribute(w)}else w.startsWith($e)&&(u.push({type:6,index:n}),s.removeAttribute(w));if(_i.test(s.tagName)){const w=s.textContent.split($e),$=w.length-1;if($>0){s.textContent=ut?ut.emptyScript:"";for(let M=0;M<$;M++)s.append(w[M],ze()),ke.nextNode(),u.push({type:2,index:++n});s.append(w[$],ze())}}}else if(s.nodeType===8)if(s.data===Ei)u.push({type:2,index:n});else{let w=-1;for(;(w=s.data.indexOf($e,w+1))!==-1;)u.push({type:7,index:n}),w+=$e.length-1}n++}}static createElement(e,t){const i=Ce.createElement("template");return i.innerHTML=e,i}}function Fe(r,e,t=r,i){if(e===we)return e;let s=i!==void 0?t._$Co?.[i]:t._$Cl;const n=qe(e)?void 0:e._$litDirective$;return s?.constructor!==n&&(s?._$AO?.(!1),n===void 0?s=void 0:(s=new n(r),s._$AT(r,t,i)),i!==void 0?(t._$Co??=[])[i]=s:t._$Cl=s),s!==void 0&&(e=Fe(r,s._$AS(r,e.values),s,i)),e}let Fr=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:i}=this._$AD,s=(e?.creationScope??Ce).importNode(t,!0);ke.currentNode=s;let n=ke.nextNode(),o=0,l=0,u=i[0];for(;u!==void 0;){if(o===u.index){let f;u.type===2?f=new Ue(n,n.nextSibling,this,e):u.type===1?f=new u.ctor(n,u.name,u.strings,this,e):u.type===6&&(f=new Dr(n,this,e)),this._$AV.push(f),u=i[++l]}o!==u?.index&&(n=ke.nextNode(),o++)}return ke.currentNode=Ce,s}p(e){let t=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}};class Ue{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,i,s){this.type=2,this._$AH=V,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Fe(this,e,t),qe(e)?e===V||e==null||e===""?(this._$AH!==V&&this._$AR(),this._$AH=V):e!==this._$AH&&e!==we&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Rr(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==V&&qe(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ce.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:i}=e,s=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=Ve.createElement(Ti(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(t);else{const n=new Fr(s,this),o=n.u(this.options);n.p(t),this.T(o),this._$AH=n}}_$AC(e){let t=Mi.get(e.strings);return t===void 0&&Mi.set(e.strings,t=new Ve(e)),t}k(e){Pt(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,s=0;for(const n of e)s===t.length?t.push(i=new Ue(this.O(ze()),this.O(ze()),this,this.options)):i=t[s],i._$AI(n),s++;s<t.length&&(this._$AR(i&&i._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class dt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,s,n){this.type=1,this._$AH=V,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=V}_$AI(e,t=this,i,s){const n=this.strings;let o=!1;if(n===void 0)e=Fe(this,e,t,0),o=!qe(e)||e!==this._$AH&&e!==we,o&&(this._$AH=e);else{const l=e;let u,f;for(e=n[0],u=0;u<n.length-1;u++)f=Fe(this,l[i+u],t,u),f===we&&(f=this._$AH[u]),o||=!qe(f)||f!==this._$AH[u],f===V?e=V:e!==V&&(e+=(f??"")+n[u+1]),this._$AH[u]=f}o&&!s&&this.j(e)}j(e){e===V?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Ur extends dt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===V?void 0:e}}class Br extends dt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==V)}}class Wr extends dt{constructor(e,t,i,s,n){super(e,t,i,s,n),this.type=5}_$AI(e,t=this){if((e=Fe(this,e,t,0)??V)===we)return;const i=this._$AH,s=e===V&&i!==V||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,n=e!==V&&(i===V||s);s&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Dr{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){Fe(this,e)}}const zr={I:Ue},qr=It.litHtmlPolyfillSupport;qr?.(Ve,Ue),(It.litHtmlVersions??=[]).push("3.3.1");const Hr=(r,e,t)=>{const i=t?.renderBefore??e;let s=i._$litPart$;if(s===void 0){const n=t?.renderBefore??null;i._$litPart$=s=new Ue(e.insertBefore(ze(),n),n,void 0,t??{})}return s._$AI(r),s};/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const Rt=globalThis;let le=class extends Ge{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Hr(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return we}};le._$litElement$=!0,le.finalized=!0,Rt.litElementHydrateSupport?.({LitElement:le});const jr=Rt.litElementPolyfillSupport;jr?.({LitElement:le}),(Rt.litElementVersions??=[]).push("4.2.1");/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const Me=r=>(e,t)=>{t!==void 0?t.addInitializer((()=>{customElements.define(r,e)})):customElements.define(r,e)};/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const Vr={attribute:!0,type:String,converter:ht,reflect:!1,hasChanged:kt},Zr=(r=Vr,e,t)=>{const{kind:i,metadata:s}=t;let n=globalThis.litPropertyMetadata.get(s);if(n===void 0&&globalThis.litPropertyMetadata.set(s,n=new Map),i==="setter"&&((r=Object.create(r)).wrapped=!0),n.set(t.name,r),i==="accessor"){const{name:o}=t;return{set(l){const u=e.get.call(this);e.set.call(this,l),this.requestUpdate(o,u,r)},init(l){return l!==void 0&&this.C(o,void 0,r,l),l}}}if(i==="setter"){const{name:o}=t;return function(l){const u=this[o];e.call(this,l),this.requestUpdate(o,u,r)}}throw Error("Unsupported decorator location: "+i)};function P(r){return(e,t)=>typeof t=="object"?Zr(r,e,t):((i,s,n)=>{const o=s.hasOwnProperty(n);return s.constructor.createProperty(n,i),o?Object.getOwnPropertyDescriptor(s,n):void 0})(r,e,t)}/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function ee(r){return P({...r,state:!0,attribute:!1})}/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const Kr=(r,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(r,e,t),t);/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function Yr(r,e){return(t,i,s)=>{const n=o=>o.renderRoot?.querySelector(r)??null;return Kr(t,i,{get(){return n(this)}})}}var Xr=Object.getOwnPropertyDescriptor,Qr=(r,e,t,i)=>{for(var s=i>1?void 0:i?Xr(e,t):e,n=r.length-1,o;n>=0;n--)(o=r[n])&&(s=o(s)||s);return s};_.MaptilerGeocodeClearIconElement=class extends le{render(){return je`
<svg viewBox="0 0 14 14" width="13" height="13">
<path
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"
/>
</svg>
`}},_.MaptilerGeocodeClearIconElement.styles=_e`
svg {
display: block;
fill: var(--color-icon-button);
}
`,_.MaptilerGeocodeClearIconElement=Qr([Me("maptiler-geocode-clear-icon")],_.MaptilerGeocodeClearIconElement);var Jr=Object.getOwnPropertyDescriptor,es=(r,e,t,i)=>{for(var s=i>1?void 0:i?Jr(e,t):e,n=r.length-1,o;n>=0;n--)(o=r[n])&&(s=o(s)||s);return s};_.MaptilerGeocodeFailIconElement=class extends le{render(){return je`
<svg viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
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"
/>
</svg>
`}},_.MaptilerGeocodeFailIconElement.styles=_e`
svg {
display: block;
fill: #e15042;
}
`,_.MaptilerGeocodeFailIconElement=es([Me("maptiler-geocode-fail-icon")],_.MaptilerGeocodeFailIconElement);var ts=Object.getOwnPropertyDescriptor,is=(r,e,t,i)=>{for(var s=i>1?void 0:i?ts(e,t):e,n=r.length-1,o;n>=0;n--)(o=r[n])&&(s=o(s)||s);return s};_.MaptilerGeocodeLoadingIconElement=class extends le{render(){return Z`
<div>
<svg viewBox="0 0 18 18" width="24" height="24" class="loading-icon">
<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 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" />
</svg>
</div>
`}},_.MaptilerGeocodeLoadingIconElement.styles=_e`
div {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
pointer-events: none;
display: flex;
align-items: center;
}
.loading-icon {
animation: rotate 0.8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
}
@keyframes rotate {
from {
-webkit-transform: rotate(0);
transform: rotate(0);
}
to {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
`,_.MaptilerGeocodeLoadingIconElement=is([Me("maptiler-geocode-loading-icon")],_.MaptilerGeocodeLoadingIconElement);var rs=Object.getOwnPropertyDescriptor,ss=(r,e,t,i)=>{for(var s=i>1?void 0:i?rs(e,t):e,n=r.length-1,o;n>=0;n--)(o=r[n])&&(s=o(s)||s);return s};_.MaptilerGeocodeReverseGeocodingIconElement=class extends le{render(){return je`
<svg viewBox="0 0 60.006 21.412" width="14" height="20">
<path
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"
/>
</svg>
`}},_.MaptilerGeocodeReverseGeocodingIconElement.styles=_e`
svg {
display: block;
fill: var(--color-icon-button);
}
`,_.MaptilerGeocodeReverseGeocodingIconElement=ss([Me("maptiler-geocode-reverse-geocoding-icon")],_.MaptilerGeocodeReverseGeocodingIconElement);var ns=Object.getOwnPropertyDescriptor,os=(r,e,t,i)=>{for(var s=i>1?void 0:i?ns(e,t):e,n=r.length-1,o;n>=0;n--)(o=r[n])&&(s=o(s)||s);return s};_.MaptilerGeocodeSearchIconElement=class extends le{render(){return je`
<svg
xmlns="http://www.w3.org/2000/svg"
width="13"
height="13"
viewBox="0 0 13 13"
>
<circle cx="4.789" cy="4.787" r="3.85" />
<path d="M12.063 12.063 7.635 7.635" />
</svg>
`}},_.MaptilerGeocodeSearchIconElement.styles=_e`
circle {
stroke-width: 1.875;
fill: none;
}
path {
stroke-width: 1.875;
stroke-linecap: round;
}
svg {
display: block;
stroke: var(--color-icon-button);
}
`,_.MaptilerGeocodeSearchIconElement=os([Me("maptiler-geocode-search-icon")],_.MaptilerGeocodeSearchIconElement);const ls=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i,Ai=/^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/,Ci=/^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i,Oi=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i,ki=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i,Ii=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;function as(r){if(!["DMS","DM","DD"].includes(r))throw new Error("invalid format specified");if(this.decimalCoordinates&&this.decimalCoordinates.trim()){const e=this.decimalCoordinates.split(",").map(M=>Number(M.trim())),t=Number(e[0]),i=Number(e[1]),s=Math.abs(t),n=Math.abs(i),o=t>0?"N":"S",l=i>0?"E":"W";let u;r=="DD"&&(u=`${s}° ${o}, ${n}° ${l}`);const f=Math.floor(s),x=Math.floor(n),w=(s-f)*60,$=(n-x)*60;if(r=="DM"){let M=Pi(w,3).toFixed(3).padStart(6,"0"),T=Pi($,3).toFixed(3).padStart(6,"0");M.endsWith(".000")&&T.endsWith(".000")&&(M=M.replace(/\.000$/,""),T=T.replace(/\.000$/,"")),u=`${f}° ${M}' ${o}, ${x}° ${T}' ${l}`}if(r=="DMS"){const M=Math.floor(w),T=Math.floor($);let R=((w-M)*60).toFixed(1).padStart(4,"0"),F=(($-T)*60).toFixed(1).padStart(4,"0");const G=M.toString().padStart(2,"0"),L=T.toString().padStart(2,"0");R.endsWith(".0")&&F.endsWith(".0")&&(R=R.replace(/\.0$/,""),F=F.replace(/\.0$/,"")),u=`${f}° ${G}' ${R}" ${o}, ${x}° ${L}' ${F}" ${l}`}return u}else throw new Error("no decimal coordinates to convert")}function Pi(r,e){const t=Math.pow(10,e);return Math.round((r+Number.EPSILON)*t)/t}function Gt(r,e){e||(e=5),r=r.replace(/\s+/g," ").trim();let t=null,i=null,s="",n="",o=null,l=[],u=!1;if(ls.test(r))throw new Error("invalid coordinate value");if(Ai.test(r))if(l=Ai.exec(r),u=Ze(l),u)t=Math.abs(l[1])+l[2]/60,Number(l[1])<0&&(t*=-1),i=Math.abs(l[3])+l[4]/60,Number(l[3])<0&&(i*=-1),o="DM";else throw new Error("invalid coordinate format");else if(Ci.test(r))if(l=Ci.exec(r),u=Ze(l),u){if(t=l[2],i=l[6],t.includes(",")&&(t=t.replace(",",".")),i.includes(",")&&(i=i.replace(",",".")),o="DD",Number(Math.round(t))==Number(t))throw new Error("integer only coordinate provided");if(Number(Math.round(i))==Number(i))throw new Error("integer only coordinate provided");l[1]?(s=l[1],n=l[5]):l[4]&&(s=l[4],n=l[8])}else throw new Error("invalid decimal coordinate format");else if(Oi.test(r))if(l=Oi.exec(r),u=Ze(l),u)t=Math.abs(parseInt(l[2])),l[4]&&(t+=l[4]/60,o="DM"),l[6]&&(t+=l[6].replace(",",".")/3600,o="DMS"),parseInt(l[2])<0&&(t=-1*t),i=Math.abs(parseInt(l[9])),l[11]&&(i+=l[11]/60),l[13]&&(i+=l[13].replace(",",".")/3600),parseInt(l[9])<0&&(i=-1*i),l[1]?(s=l[1],n=l[8]):l[7]&&(s=l[7],n=l[14]);else throw new Error("invalid DMS coordinates format");else if(ki.test(r))if(l=ki.exec(r),u=Ze(l),u)t=Math.abs(parseInt(l[2])),l[4]&&(t+=l[4]/60,o="DM"),l[6]&&(t+=l[6]/3600,o="DMS"),parseInt(l[2])<0&&(t=-1*t),i=Math.abs(parseInt(l[10])),l[12]&&(i+=l[12]/60),l[14]&&(i+=l[14]/3600),parseInt(l[10])<0&&(i=-1*i),l[1]?(s=l[1],n=l[9]):l[8]&&(s=l[8],n=l[16]);else throw new Error("invalid DMS coordinates format");else if(Ii.test(r)){if(l=Ii.exec(r),u=Ze(l),l.filter(f=>f).length<=5)throw new Error("invalid coordinates format");if(u)t=Math.abs(parseInt(l[2])),l[4]&&(t+=l[4].replace(",",".")/60,o="DM"),l[6]&&(t+=l[6].replace(",",".")/3600,o="DMS"),parseInt(l[2])<0&&(t=-1*t),i=Math.abs(parseInt(l[10])),l[12]&&(i+=l[12].replace(",",".")/60),l[14]&&(i+=l[14].replace(",",".")/3600),parseInt(l[10])<0&&(i=-1*i),l[1]?(s=l[1],n=l[9]):l[8]&&(s=l[8],n=l[16]);else throw new Error("invalid coordinates format")}if(u){if(Math.abs(i)>=180)throw new Error("invalid longitude value");if(Math.abs(t)>=90)throw new Error("invalid latitude value");if(s&&!n||!s&&n)throw new Error("invalid coordinates value");if(s&&s==n)throw new Error("invalid coordinates format");t.toString().includes(",")&&(t=t.replace(",",".")),i.toString().includes(",")&&(i=i.replace(",","."));let f=/S|SOUTH/i;f.test(s)&&t>0&&(t=-1*t),f=/W|WEST/i,f.test(n)&&i>0&&(i=-1*i);const x=l[0].trim();let w,$;const M=/[,/;\u0020]/g,T=x.match(M);if(T==null){const G=Math.floor(r.length/2);w=x.substring(0,G).trim(),$=x.substring(G).trim()}else{let G;T.length%2==1?G=Math.floor(T.length/2):G=T.length/2-1;let L=0;if(G==0)L=x.indexOf(T[0]),w=x.substring(0,L).trim(),$=x.substring(L+1).trim();else{let Q=0,ne=0;for(;Q<=G;)L=x.indexOf(T[Q],ne),ne=L+1,Q++;w=x.substring(0,L).trim(),$=x.substring(L+1).trim()}}const R=w.split(".");if(R.length==2&&R[1]==0&&R[1].length!=2)throw new Error("invalid coordinates format");const F=$.split(".");if(F.length==2&&F[1]==0&&F[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(w)||/^\d+$/.test($))throw new Error("degree only coordinate/s provided");return t=Number(Number(t).toFixed(e)),i=Number(Number(i).toFixed(e)),Object.freeze({verbatimCoordinates:x,verbatimLatitude:w,verbatimLongitude:$,decimalLatitude:t,decimalLongitude:i,decimalCoordinates:`${t},${i}`,originalFormat:o,closeEnough:cs,toCoordinateFormat:as})}else throw new Error("coordinates pattern match failed")}function Ze(r){if(!isNaN(r[0]))return!1;const e=[...r];if(e.shift(),e.length%2>0)return!1;const t=/^[-+]?\d+([\.,]\d+)?$/,i=/[eastsouthnorthwest]+/i,s=e.length/2;for(let n=0;n<s;n++){const o=e[n],l=e[n+s],u=t.test(o)&&t.test(l),f=i.test(o)&&i.test(l),x=o==l;if(!(o==null&&l==null)){if(o==null||l==null)return!1;if(u||f||x)continue;return!1}}return!0}function Ni(r,e){const t=Math.abs(r-e);return Number(t.toFixed(6))<=1e-5}function cs(r){if(!r)throw new Error("coords must be provided");if(r.includes(",")){const e=r.split(",");if(Number(e[0])==NaN||Number(e[1])==NaN)throw new Error("coords are not valid decimals");return Ni(this.decimalLatitude,Number(e[0]))&&Ni(this.decimalLongitude,e[1])}else throw new Error("coords being tested must be separated by a comma")}const hs=Object.freeze({DMS:"DMS",DM:"DM",DD:"DD"});Gt.to=hs;const us=[{verbatimCoordinates:"40.123, -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:'40° 7´ 22.8" N 74° 7´ 22.8" W',verbatimLatitude:'40° 7´ 22.8" N',verbatimLongitude:'74° 7´ 22.8" W'},{verbatimCoordinates:"40° 7.38’ , -74° 7.38’",verbatimLatitude:"40° 7.38’",verbatimLongitude:"-74° 7.38’"},{verbatimCoordinates:"N40°7’22.8’’, W74°7’22.8’’",verbatimLatitude:"N40°7’22.8’’",verbatimLongitude:"W74°7’22.8’’"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:`40°7'22.8"N, 74°7'22.8"W`,verbatimLatitude:`40°7'22.8"N`,verbatimLongitude:`74°7'22.8"W`},{verbatimCoordinates:"40 7 22.8, -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"},{verbatimCoordinates:"40.123 -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123°,-74.123°",verbatimLatitude:"40.123°",verbatimLongitude:"-74.123°"},{verbatimCoordinates:"40.123N74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"4007.38N7407.38W",verbatimLatitude:"4007.38N",verbatimLongitude:"7407.38W"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:"400722.8N740722.8W",verbatimLatitude:"400722.8N",verbatimLongitude:"740722.8W"},{verbatimCoordinates:"N 40 7.38 W 74 7.38",verbatimLatitude:"N 40 7.38",verbatimLongitude:"W 74 7.38"},{verbatimCoordinates:"40:7:22.8N 74:7:22.8W",verbatimLatitude:"40:7:22.8N",verbatimLongitude:"74:7:22.8W"},{verbatimCoordinates:"40:7:23N,74:7:23W",verbatimLatitude:"40:7:23N",verbatimLongitude:"74:7:23W",decimalLatitude:40.1230555555,decimalLongitude:-74.1230555555},{verbatimCoordinates:'40°7’23"N 74°7’23"W',verbatimLatitude:'40°7’23"N',verbatimLongitude:'74°7’23"W',decimalLatitude:40.1230555555,decimalLongitude:-74.12305555555555},{verbatimCoordinates:'40°7’23"S 74°7’23"E',verbatimLatitude:'40°7’23"S',verbatimLongitude:'74°7’23"E',decimalLatitude:-40.1230555555,decimalLongitude:74.12305555555555},{verbatimCoordinates:'40°7’23" -74°7’23"',verbatimLatitude:'40°7’23"',verbatimLongitude:'-74°7’23"',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:'40d 7’ 23" N 74d 7’ 23" W',verbatimLatitude:'40d 7’ 23" N',verbatimLongitude:'74d 7’ 23" W',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:"40.123N 74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40 7 22.8; -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"}],ds={decimalLatitude:40.123,decimalLongitude:-74.123},fs=[{verbatimCoordinates:`50°4'17.698"south, 14°24'2.826"east`,verbatimLatitude:`50°4'17.698"south`,verbatimLongitude:`14°24'2.826"east`,decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"50d4m17.698S 14d24m2.826E",verbatimLatitude:"50d4m17.698S",verbatimLongitude:"14d24m2.826E",decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"40:26:46N,79:56:55W",verbatimLatitude:"40:26:46N",verbatimLongitude:"79:56:55W",decimalLatitude:40.44611111111111,decimalLongitude:-79.9486111111111},{verbatimCoordinates:"40:26:46.302N 79:56:55.903W",verbatimLatitude:"40:26:46.302N",verbatimLongitude:"79:56:55.903W",decimalLatitude:40.446195,decimalLongitude:-79.94886194444445},{verbatimCoordinates:"40°26′47″N 79°58′36″W",verbatimLatitude:"40°26′47″N",verbatimLongitude:"79°58′36″W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40d 26′ 47″ N 79d 58′ 36″ W",verbatimLatitude:"40d 26′ 47″ N",verbatimLongitude:"79d 58′ 36″ W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40.446195N 79.948862W",verbatimLatitude:"40.446195N",verbatimLongitude:"79.948862W",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40,446195° 79,948862°",verbatimLatitude:"40,446195°",verbatimLongitude:"79,948862°",decimalLatitude:40.446195,decimalLongitude:79.948862},{verbatimCoordinates:"40° 26.7717, -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.446195, -79.948862",verbatimLatitude:"40.446195",verbatimLongitude:"-79.948862",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.123256; -74.123256",verbatimLatitude:"40.123256",verbatimLongitude:"-74.123256",decimalLatitude:40.123256,decimalLongitude:-74.123256},{verbatimCoordinates:"18°24S 22°45E",verbatimLatitude:"18°24S",verbatimLongitude:"22°45E",decimalLatitude:-18.4,decimalLongitude:22.75}],ps=[{verbatimCoordinates:"10.432342S 10.6345345E",verbatimLatitude:"10.432342S",verbatimLongitude:"10.6345345E",decimalLatitude:-10.432342,decimalLongitude:10.6345345},{verbatimCoordinates:"10.00S 10.00E",verbatimLatitude:"10.00S",verbatimLongitude:"10.00E",decimalLatitude:-10,decimalLongitude:10},{verbatimCoordinates:"00.00S 01.00E",verbatimLatitude:"00.00S",verbatimLongitude:"01.00E",decimalLatitude:0,decimalLongitude:1},{verbatimCoordinates:"18.24S 22.45E",verbatimLatitude:"18.24S",verbatimLongitude:"22.45E",decimalLatitude:-18.4,decimalLongitude:22.75},{verbatimCoordinates:"27deg 15min 45.2sec S 18deg 32min 53.7sec E",verbatimLatitude:"27deg 15min 45.2sec S",verbatimLongitude:"18deg 32min 53.7sec E",decimalLatitude:-27.262555555555554,decimalLongitude:18.54825},{verbatimCoordinates:"-23.3245° S / 28.2344° E",verbatimLatitude:"-23.3245° S",verbatimLongitude:"28.2344° E",decimalLatitude:-23.3245,decimalLongitude:28.2344},{verbatimCoordinates:"40° 26.7717 -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"27.15.45S 18.32.53E",verbatimLatitude:"27.15.45S",verbatimLongitude:"18.32.53E",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"-27.15.45 18.32.53",verbatimLatitude:"-27.15.45",verbatimLongitude:"18.32.53",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"27.15.45.2S 18.32.53.4E",verbatimLatitude:"27.15.45.2S",verbatimLongitude:"18.32.53.4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"27.15.45,2S 18.32.53,4E",verbatimLatitude:"27.15.45,2S",verbatimLongitude:"18.32.53,4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"S23.43563 ° E22.45634 °",verbatimLatitude:"S23.43563 °",verbatimLongitude:"E22.45634 °",decimalLatitude:-23.43563,decimalLongitude:22.45634},{verbatimCoordinates:"27,71372° S 23,07771° E",verbatimLatitude:"27,71372° S",verbatimLongitude:"23,07771° E",decimalLatitude:-27.71372,decimalLongitude:23.07771},{verbatimCoordinates:"27.45.34 S 23.23.23 E",verbatimLatitude:"27.45.34 S",verbatimLongitude:"23.23.23 E",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"S 27.45.34 E 23.23.23",verbatimLatitude:"S 27.45.34",verbatimLongitude:"E 23.23.23",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"53 16.3863,4 52.8171",verbatimLatitude:"53 16.3863",verbatimLongitude:"4 52.8171",decimalLatitude:53.273105,decimalLongitude:4.88029},{verbatimCoordinates:"50 8.2914,-5 2.4447",verbatimLatitude:"50 8.2914",verbatimLongitude:"-5 2.4447",decimalLatitude:50.13819,decimalLongitude:-5.040745},{verbatimCoordinates:"N 48° 30,6410', E 18° 57,4583'",verbatimLatitude:"N 48° 30,6410'",verbatimLongitude:"E 18° 57,4583'",decimalLatitude:48.51068,decimalLongitude:18.95764},{verbatimCoordinates:"1.23456, 18.33453",verbatimLatitude:"1.23456",verbatimLongitude:"18.33453",decimalLatitude:1.23456,decimalLongitude:18.33453}];function ms(){const r=[];return us.forEach(e=>{e.decimalLatitude?r.push(e):r.push({...e,...ds})}),[...r,...fs,...ps]}const gs=ms();Gt.formats=gs.map(r=>r.verbatimCoordinates);const ys=Gt;/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const Ft={ATTRIBUTE:1,CHILD:2},Ut=r=>(...e)=>({_$litDirective$:r,values:e});let Bt=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const ft=Ut(class extends Bt{constructor(r){if(super(r),r.type!==Ft.ATTRIBUTE||r.name!=="class"||r.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter((e=>r[e])).join(" ")+" "}update(r,[e]){if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter((i=>i!==""))));for(const i in e)e[i]&&!this.nt?.has(i)&&this.st.add(i);return this.render(e)}const t=r.element.classList;for(const i of this.st)i in e||(t.remove(i),this.st.delete(i));for(const i in e){const s=!!e[i];s===this.st.has(i)||this.nt?.has(i)||(s?(t.add(i),this.st.add(i)):(t.remove(i),this.st.delete(i)))}return we}});/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const{I:vs}=zr,Ri=()=>document.createComment(""),Ke=(r,e,t)=>{const i=r._$AA.parentNode,s=e===void 0?r._$AB:e._$AA;if(t===void 0){const n=i.insertBefore(Ri(),s),o=i.insertBefore(Ri(),s);t=new vs(n,o,r,r.options)}else{const n=t._$AB.nextSibling,o=t._$AM,l=o!==r;if(l){let u;t._$AQ?.(r),t._$AM=r,t._$AP!==void 0&&(u=r._$AU)!==o._$AU&&t._$AP(u)}if(n!==s||l){let u=t._$AA;for(;u!==n;){const f=u.nextSibling;i.insertBefore(u,s),u=f}}}return t},Ie=(r,e,t=r)=>(r._$AI(e,t),r),bs={},Es=(r,e=bs)=>r._$AH=e,ws=r=>r._$AH,Wt=r=>{r._$AR(),r._$AA.remove()};/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const Gi=(r,e,t)=>{const i=new Map;for(let s=e;s<=t;s++)i.set(r[s],s);return i},xs=Ut(class extends Bt{constructor(r){if(super(r),r.type!==Ft.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,e,t){let i;t===void 0?t=e:e!==void 0&&(i=e);const s=[],n=[];let o=0;for(const l of r)s[o]=i?i(l,o):o,n[o]=t(l,o),o++;return{values:n,keys:s}}render(r,e,t){return this.dt(r,e,t).values}update(r,[e,t,i]){const s=ws(r),{values:n,keys:o}=this.dt(e,t,i);if(!Array.isArray(s))return this.ut=o,n;const l=this.ut??=[],u=[];let f,x,w=0,$=s.length-1,M=0,T=n.length-1;for(;w<=$&&M<=T;)if(s[w]===null)w++;else if(s[$]===null)$--;else if(l[w]===o[M])u[M]=Ie(s[w],n[M]),w++,M++;else if(l[$]===o[T])u[T]=Ie(s[$],n[T]),$--,T--;else if(l[w]===o[T])u[T]=Ie(s[w],n[T]),Ke(r,u[T+1],s[w]),w++,T--;else if(l[$]===o[M])u[M]=Ie(s[$],n[M]),Ke(r,s[w],s[$]),$--,M++;else if(f===void 0&&(f=Gi(o,M,T),x=Gi(l,w,$)),f.has(l[w]))if(f.has(l[$])){const R=x.get(o[M]),F=R!==void 0?s[R]:null;if(F===null){const G=Ke(r,s[w]);Ie(G,n[M]),u[M]=G}else u[M]=Ie(F,n[M]),Ke(r,s[w],F),s[R]=null;M++}else Wt(s[$]),$--;else Wt(s[w]),w++;for(;M<=T;){const R=Ke(r,u[T+1]);Ie(R,n[M]),u[M++]=R}for(;w<=$;){const R=s[w++];R!==null&&Wt(R)}return this.ut=o,Es(r,u),we}});function Ss(r,e,t){const i=e[1],s=e[0],n=i-s;return r===i&&t?r:((r-s)%n+n)%n+s}function pt(r){const e=[...r];return e[2]<e[0]&&(Math.abs((e[0]+e[2]+360)/2)>Math.abs((e[0]-360+e[2])/2)?e[0]-=360:e[2]+=360),e}let Ye;async function Ls(r,e,t){for(const i of e??[])if(!(r&&(i.minZoom!=null&&i.minZoom>r[0]||i.maxZoom!=null&&i.maxZoom<r[0]))){if(i.type==="fixed")return i.coordinates.join(",");if(i.type==="client-geolocation")if(Ye&&i.cachedLocationExpiry&&Ye.time+i.cachedLocationExpiry>Date.now()){if(Ye.coords)return Ye.coords}else{let s;try{return s=await new Promise((n,o)=>{t.signal.addEventListener("abort",()=>{o(Error("aborted"))}),navigator.geolocation.getCurrentPosition(l=>{n([l.coords.longitude,l.coords.latitude].map(u=>u.toFixed(6)).join(","))},l=>{o(l)},i)}),s}catch{}finally{i.cachedLocationExpiry&&(Ye={time:Date.now(),coords:s})}if(t.signal.aborted)return}if(i.type==="server-geolocation")return"ip";if(r&&i.type==="map-center")return r[1].toFixed(6)+","+r[2].toFixed(6)}}/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const Fi="important",_s=" !"+Fi,$s=Ut(class extends Bt{constructor(r){if(super(r),r.type!==Ft.ATTRIBUTE||r.name!=="style"||r.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(r){return Object.keys(r).reduce(((e,t)=>{const i=r[t];return i==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(r,[e]){const{style:t}=r.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const i of this.ft)e[i]==null&&(this.ft.delete(i),i.includes("-")?t.removeProperty(i):t[i]=null);for(const i in e){const s=e[i];if(s!=null){this.ft.add(i);const n=typeof s=="string"&&s.endsWith(_s);i.includes("-")||n?t.setProperty(i,n?s.slice(0,-11):s,n?Fi:""):t[i]=s}}return we}}),Ms=".sprite-icon{align-self:center;justify-self:center;opacity:.75;background-repeat:no-repeat}li{text-align:left;cursor:default;display:grid;grid-template-columns:40px 1fr;color:var(--color-text);padding:8px 0;font-size:14px;line-height:18px;min-width:fit-content;outline:0}li:first-child{padding-top:10px}li:last-child{padding-bottom:10px}li.picked{background-color:#e7edff}li.picked .secondary{color:#96a4c7;padding-left:4px}li.picked .line2{color:#96a4c7}li.selected{background-color:#f3f6ff;animation:backAndForth 5s linear infinite}li.selected .primary{color:#2b8bfb}li.selected .secondary{color:#a2adc7;padding-left:4px}li.selected .line2{color:#a2adc7}li>img{align-self:center;justify-self:center;opacity:.75}.texts{padding:0 17px 0 0}.texts>*{white-space:nowrap;display:block;min-width:fit-content}.primary{font-weight:600}.secondary{color:#aeb6c7;padding-left:4px}.line2{color:#aeb6c7}@keyframes backAndForth{0%{transform:translate(0)}10%{transform:translate(0)}45%{transform:translate(calc(-100% + 270px))}55%{transform:translate(calc(-100% + 270px))}90%{transform:translate(0)}to{transform:translate(0)}}";var Ts=Object.defineProperty,As=Object.getOwnPropertyDescriptor,Ui=r=>{throw TypeError(r)},ge=(r,e,t,i)=>{for(var s=i>1?void 0:i?As(e,t):e,n=r.length-1,o;n>=0;n--)(o=r[n])&&(s=(i?o(e,t,s):o(s))||s);return i&&s&&Ts(e,t,s),s},Bi=(r,e,t)=>e.has(r)||Ui("Cannot "+t),z=(r,e,t)=>(Bi(r,e,"read from private field"),t?t.call(r):e.get(r)),Cs=(r,e,t)=>e.has(r)?Ui("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),Be=(r,e,t)=>(Bi(r,e,"access private method"),t),B,mt,Xe,Y,Wi,Di,Dt,zt;const zi=typeof devicePixelRatio>"u"||devicePixelRatio>1.25,qi=zi?"@2x":"",We=zi?2:1;let Pe,Hi,ae=class extends le{constructor(){super(...arguments),Cs(this,B),this.itemStyle="default",this.showPlaceType="if-needed",this.missingIconsCache=new Set,this.iconsBaseUrl="",this.index=0}willUpdate(r){r.has("feature")&&z(this,B,mt)&&(this.index=z(this,B,mt).length,Be(this,B,Dt).call(this))}render(){return Z`
<li
tabindex="-1"
role="option"
aria-selected=${this.itemStyle==="selected"}
aria-checked=${this.itemStyle==="picked"}
class=${this.itemStyle}
@click=${()=>this.dispatchEvent(new CustomEvent("select"))}
>
${Pe&&this.spriteIcon?Z`
<div
class="sprite-icon"
style=${$s({width:`${this.spriteIcon.width/We}px`,height:`${this.spriteIcon.height/We}px`,backgroundImage:`url(${this.iconsBaseUrl}sprite${qi}.png)`,backgroundPosition:`-${this.spriteIcon.x/We}px -${this.spriteIcon.y/We}px`,backgroundSize:`${Pe.width/We}px ${Pe.height/We}px`})}
title=${z(this,B,Y)}
/>
`:this.imageUrl?Z` <img src=${this.imageUrl} alt=${this.category} title=${z(this,B,Y)} @error=${Be(this,B,Di)} />`:this.feature?.address?Z` <img src=${this.iconsBaseUrl+"housenumber.svg"} alt=${z(this,B,Y)} title=${z(this,B,Y)} /> `:this.feature?.id.startsWith("road.")?Z` <img src=${this.iconsBaseUrl+"road.svg"} alt=${z(this,B,Y)} title=${z(this,B,Y)} /> `:this.feature?.id.startsWith("address.")?Z` <img src=${this.iconsBaseUrl+"street.svg"} alt=${z(this,B,Y)} title=${z(this,B,Y)} /> `:this.feature?.id.startsWith("postal_code.")?Z` <img src=${this.iconsBaseUrl+"postal_code.svg"} alt=${z(this,B,Y)} title=${z(this,B,Y)} /> `:this.feature?.id.startsWith("poi.")?Z` <img src=${this.iconsBaseUrl+"poi.svg"} alt=${z(this,B,Y)} title=${z(this,B,Y)} /> `:z(this,B,Xe)?Z` <img src=${this.iconsBaseUrl+"reverse.svg"} alt=${z(this,B,Y)} title=${z(this,B,Y)} /> `:Z` <img src=${this.iconsBaseUrl+"area.svg"} alt=${z(this,B,Y)} title=${z(this,B,Y)} /> `}
<span class="texts">
<span>
<span class="primary"> ${z(this,B,Xe)?this.feature?.place_name:this.feature?.place_name.replace(/,.*/,"")} </span>
${this.showPlaceType==="always"||this.showPlaceType!=="never"&&!this.feature?.address&&!this.feature?.id.startsWith("road.")&&!this.feature?.id.startsWith("address.")&&!this.feature?.id.startsWith("postal_code.")&&(!this.feature?.id.startsWith("poi.")||!this.imageUrl)&&!z(this,B,Xe)?Z` <span class="secondary"> ${z(this,B,Y)} </span> `:V}
</span>
<span class="line2"> ${z(this,B,Xe)?this.feature?.text:this.feature?.place_name.replace(/[^,]*,?s*/,"")} </span>
</span>
</li>
`}};B=new WeakSet,mt=function(){return this.feature?.properties?.categories},Xe=function(){return this.feature?.place_type[0]==="reverse"},Y=function(){return this.feature?.properties?.categories?.join(", ")??this.feature?.place_type_name?.[0]??this.feature?.place_type[0]},Wi=function(){Hi??=fetch(`${this.iconsBaseUrl}sprite${qi}.json`).then(r=>r.json()).then(r=>{Pe=r}).catch(()=>{Pe=null})},Di=function(){this.imageUrl&&this.missingIconsCache.add(this.imageUrl),Be(this,B,Dt).call(this)},Dt=function(){Pe!==void 0?Be(this,B,zt).call(this):(Be(this,B,Wi).call(this),Hi?.then(()=>{Be(this,B,zt).call(this)}))},zt=function(){do{if(this.index--,this.category=z(this,B,mt)?.[this.index],this.spriteIcon=this.category?Pe?.icons[this.category]:void 0,this.spriteIcon)break;this.imageUrl=this.category?this.iconsBaseUrl+this.category.replace(/ /g,"_")+".svg":void 0}while(this.index>-1&&(!this.imageUrl||this.missingIconsCache.has(this.imageUrl)))},ae.styles=_e`
${at(Ms)}
`,ge([P({type:Object})],ae.prototype,"feature",2),ge([P({type:String})],ae.prototype,"itemStyle",2),ge([P({type:String})],ae.prototype,"showPlaceType",2),ge([P({attribute:!1})],ae.prototype,"missingIconsCache",2),ge([P({type:String})],ae.prototype,"iconsBaseUrl",2),ge([ee()],ae.prototype,"category",2),ge([ee()],ae.prototype,"imageUrl",2),ge([ee()],ae.prototype,"spriteIcon",2),ge([ee()],ae.pro